├── .gitignore ├── .versions ├── Gulpfile.js ├── README.md ├── blaze-material-ui-tests.js ├── demo.png ├── lib ├── iron-elements │ ├── IronIcon │ │ ├── IronIcon.js │ │ ├── IronIcon.scss │ │ ├── IronIcon.tpl.jade │ │ └── README.md │ └── IronSelector │ │ ├── IronSelector.js │ │ ├── IronSelector.scss │ │ ├── IronSelector.tpl.jade │ │ └── README.md ├── layout │ └── layout.scss ├── molecules │ └── MarkedElement │ │ ├── MarkedElement.js │ │ ├── MarkedElement.scss │ │ ├── MarkedElement.tpl.jade │ │ └── README.md ├── paper-elements │ ├── PaperButton │ │ ├── PaperButton.js │ │ ├── PaperButton.scss │ │ ├── PaperButton.tpl.jade │ │ └── README.md │ ├── PaperCheckbox │ │ ├── PaperCheckbox.js │ │ ├── PaperCheckbox.scss │ │ ├── PaperCheckbox.tpl.jade │ │ └── README.md │ ├── PaperDialog │ │ ├── PaperDialog.js │ │ ├── PaperDialog.scss │ │ ├── PaperDialog.tpl.jade │ │ └── README.md │ ├── PaperDrawerPanel │ │ ├── PaperDrawerPanel.js │ │ ├── PaperDrawerPanel.scss │ │ ├── PaperDrawerPanel.tpl.jade │ │ ├── PaperDrawerPanelDrawer.tpl.jade │ │ ├── PaperDrawerPanelMain.tpl.jade │ │ └── README.md │ ├── PaperDropdown │ │ ├── PaperDropdown.js │ │ ├── PaperDropdown.scss │ │ ├── PaperDropdown.tpl.jade │ │ └── README.md │ ├── PaperDropdownMenu │ │ ├── PaperDropdownMenu.js │ │ ├── PaperDropdownMenu.scss │ │ ├── PaperDropdownMenu.tpl.jade │ │ └── README.md │ ├── PaperFab │ │ ├── PaperFab.js │ │ ├── PaperFab.scss │ │ ├── PaperFab.tpl.jade │ │ └── README.md │ ├── PaperHeaderPanel │ │ ├── PaperHeaderPanel.js │ │ ├── PaperHeaderPanel.scss │ │ ├── PaperHeaderPanel.tpl.jade │ │ ├── PaperHeaderPanelMain.tpl.jade │ │ └── README.md │ ├── PaperIconButton │ │ ├── PaperIconButton.js │ │ ├── PaperIconButton.scss │ │ ├── PaperIconButton.tpl.jade │ │ └── README.md │ ├── PaperInput │ │ ├── PaperInput.js │ │ ├── PaperInput.scss │ │ ├── PaperInput.tpl.jade │ │ ├── PaperInputContainer.tpl.jade │ │ └── README.md │ ├── PaperItem │ │ ├── PaperItem.js │ │ ├── PaperItem.scss │ │ ├── PaperItem.tpl.jade │ │ └── README.md │ ├── PaperMaterial │ │ ├── PaperMaterial.js │ │ ├── PaperMaterial.scss │ │ ├── PaperMaterial.tpl.jade │ │ └── README.md │ ├── PaperMenu │ │ ├── PaperMenu.js │ │ ├── PaperMenu.scss │ │ ├── PaperMenu.tpl.jade │ │ └── README.md │ ├── PaperMenuButton │ │ ├── PaperMenuButton.js │ │ ├── PaperMenuButton.scss │ │ ├── PaperMenuButton.tpl.jade │ │ └── README.md │ ├── PaperProgress │ │ ├── PaperProgress.js │ │ ├── PaperProgress.scss │ │ ├── PaperProgress.tpl.jade │ │ └── README.md │ ├── PaperRadioButton │ │ ├── PaperRadioButton.js │ │ ├── PaperRadioButton.scss │ │ ├── PaperRadioButton.tpl.jade │ │ └── README.md │ ├── PaperRipple │ │ ├── PaperRipple.js │ │ ├── PaperRipple.scss │ │ ├── PaperRipple.tpl.jade │ │ └── README.md │ ├── PaperSpinner │ │ ├── PaperSpinner.js │ │ ├── PaperSpinner.scss │ │ ├── PaperSpinner.tpl.jade │ │ └── README.md │ ├── PaperTab │ │ ├── PaperTab.js │ │ ├── PaperTab.scss │ │ ├── PaperTab.tpl.jade │ │ └── README.md │ ├── PaperTabs │ │ ├── PaperTabs.js │ │ ├── PaperTabs.scss │ │ ├── PaperTabs.tpl.jade │ │ └── README.md │ ├── PaperToast │ │ ├── PaperToast.js │ │ ├── PaperToast.scss │ │ ├── PaperToast.tpl.jade │ │ └── README.md │ ├── PaperToggleButton │ │ ├── PaperToggleButton.js │ │ ├── PaperToggleButton.scss │ │ ├── PaperToggleButton.tpl.jade │ │ └── README.md │ ├── PaperToolbar │ │ ├── PaperToolbar.js │ │ ├── PaperToolbar.scss │ │ ├── PaperToolbar.tpl.jade │ │ ├── PaperToolbarBottom.tpl.jade │ │ ├── PaperToolbarMiddle.tpl.jade │ │ ├── PaperToolbarTop.tpl.jade │ │ └── README.md │ └── PaperTooltip │ │ ├── PaperTooltip.js │ │ ├── PaperTooltip.scss │ │ ├── PaperTooltip.tpl.jade │ │ └── README.md └── services │ └── IconService.js ├── package.js ├── package.json └── vendors ├── autogrowtextarea ├── .gitignore ├── README ├── bower.json ├── index.html ├── jquery-1.8.1.min.js ├── jquery.autogrowtextarea.js └── jquery.autogrowtextarea.min.js ├── highlight ├── CHANGES.md ├── LICENSE ├── README.md ├── README.ru.md ├── highlight.pack.js └── styles │ ├── agate.css │ ├── androidstudio.css │ ├── arta.css │ ├── ascetic.css │ ├── atelier-cave.dark.css │ ├── atelier-cave.light.css │ ├── atelier-dune.dark.css │ ├── atelier-dune.light.css │ ├── atelier-estuary.dark.css │ ├── atelier-estuary.light.css │ ├── atelier-forest.dark.css │ ├── atelier-forest.light.css │ ├── atelier-heath.dark.css │ ├── atelier-heath.light.css │ ├── atelier-lakeside.dark.css │ ├── atelier-lakeside.light.css │ ├── atelier-plateau.dark.css │ ├── atelier-plateau.light.css │ ├── atelier-savanna.dark.css │ ├── atelier-savanna.light.css │ ├── atelier-seaside.dark.css │ ├── atelier-seaside.light.css │ ├── atelier-sulphurpool.dark.css │ ├── atelier-sulphurpool.light.css │ ├── brown_paper.css │ ├── brown_papersq.png │ ├── codepen-embed.css │ ├── color-brewer.css │ ├── dark.css │ ├── darkula.css │ ├── default.css │ ├── docco.css │ ├── far.css │ ├── foundation.css │ ├── github-gist.css │ ├── github.css │ ├── googlecode.css │ ├── grayscale.css │ ├── hopscotch.css │ ├── hybrid.css │ ├── idea.css │ ├── ir_black.css │ ├── kimbie.dark.css │ ├── kimbie.light.css │ ├── magula.css │ ├── mono-blue.css │ ├── monokai.css │ ├── monokai_sublime.css │ ├── obsidian.css │ ├── paraiso.dark.css │ ├── paraiso.light.css │ ├── pojoaque.css │ ├── pojoaque.jpg │ ├── railscasts.css │ ├── rainbow.css │ ├── school_book.css │ ├── school_book.png │ ├── solarized_dark.css │ ├── solarized_light.css │ ├── sunburst.css │ ├── tomorrow-night-blue.css │ ├── tomorrow-night-bright.css │ ├── tomorrow-night-eighties.css │ ├── tomorrow-night.css │ ├── tomorrow.css │ ├── vs.css │ ├── xcode.css │ └── zenburn.css ├── marked ├── .npmignore ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── bin │ └── marked ├── bower.json ├── component.json ├── doc │ ├── broken.md │ └── todo.md ├── index.js ├── lib │ └── marked.js ├── man │ └── marked.1 ├── marked.min.js └── package.json └── remarkable ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .gitignore ├── .nojekyll ├── .npmignore ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── benchmark ├── fixtures │ ├── block-bq-flat.md │ ├── block-bq-nested.md │ ├── block-code.md │ ├── block-fences.md │ ├── block-heading.md │ ├── block-hr.md │ ├── block-html.md │ ├── block-lheading.md │ ├── block-list-flat.md │ ├── block-list-nested.md │ ├── block-ref-flat.md │ ├── block-ref-nested.md │ ├── block-tables.md │ ├── inline-autolink.md │ ├── inline-backticks.md │ ├── inline-em-flat.md │ ├── inline-em-nested.md │ ├── inline-em-worst.md │ ├── inline-entity.md │ ├── inline-escape.md │ ├── inline-html.md │ ├── inline-links-flat.md │ ├── inline-links-nested.md │ ├── inline-newlines.md │ ├── lorem1.txt │ ├── rawtabs.md │ └── spec.txt ├── implementations │ ├── commonmark-reference │ │ └── index.js │ ├── current-commonmark │ │ └── index.js │ ├── current │ │ └── index.js │ └── marked-0.3.2 │ │ └── index.js ├── index.js └── profile.js ├── bin └── remarkable.js ├── bower.json ├── dist ├── remarkable.js └── remarkable.min.js ├── index.js ├── lib ├── common │ ├── entities.js │ ├── html_blocks.js │ ├── html_re.js │ ├── url_schemas.js │ └── utils.js ├── configs │ ├── commonmark.js │ ├── default.js │ └── full.js ├── helpers │ ├── normalize_link.js │ ├── normalize_reference.js │ ├── parse_link_destination.js │ ├── parse_link_label.js │ └── parse_link_title.js ├── index.js ├── parser_block.js ├── parser_core.js ├── parser_inline.js ├── renderer.js ├── ruler.js ├── rules.js ├── rules_block │ ├── blockquote.js │ ├── code.js │ ├── deflist.js │ ├── fences.js │ ├── footnote.js │ ├── heading.js │ ├── hr.js │ ├── htmlblock.js │ ├── lheading.js │ ├── list.js │ ├── paragraph.js │ ├── state_block.js │ └── table.js ├── rules_core │ ├── abbr.js │ ├── abbr2.js │ ├── block.js │ ├── footnote_tail.js │ ├── inline.js │ ├── linkify.js │ ├── references.js │ ├── replacements.js │ └── smartquotes.js └── rules_inline │ ├── autolink.js │ ├── backticks.js │ ├── del.js │ ├── emphasis.js │ ├── entity.js │ ├── escape.js │ ├── footnote_inline.js │ ├── footnote_ref.js │ ├── htmltag.js │ ├── ins.js │ ├── links.js │ ├── mark.js │ ├── newline.js │ ├── state_inline.js │ ├── sub.js │ ├── sup.js │ └── text.js ├── package.json ├── support ├── demodata.js ├── entities.js └── specsplit.js └── test ├── commonmark.js ├── fixtures ├── commonmark │ ├── bad.txt │ ├── good.txt │ └── spec.txt └── remarkable │ ├── abbr.txt │ ├── commonmark_extras.txt │ ├── deflist.txt │ ├── del.txt │ ├── footnotes.txt │ ├── ins.txt │ ├── linkify.txt │ ├── mark.txt │ ├── proto.txt │ ├── smartquotes.txt │ ├── sub.txt │ ├── sup.txt │ ├── tables.txt │ ├── typographer.txt │ └── xss.txt ├── misc.js ├── remarkable.js ├── ruler.js └── utils.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | #backup files 6 | *.bak 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | 13 | # Temporary files 14 | tmp 15 | 16 | # Directory for instrumented libs generated by jscoverage/JSCover 17 | lib-cov 18 | 19 | # Coverage directory used by tools like istanbul 20 | coverage 21 | 22 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 23 | .grunt 24 | 25 | # node-waf configuration 26 | .lock-wscript 27 | 28 | # Compiled binary addons (http://nodejs.org/api/addons.html) 29 | build/Release 30 | 31 | # Dependency directory 32 | # https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git 33 | node_modules -------------------------------------------------------------------------------- /.versions: -------------------------------------------------------------------------------- 1 | babel-compiler@5.8.24_1 2 | babel-runtime@0.1.4 3 | base64@1.0.4 4 | binary-heap@1.0.4 5 | blaze@2.1.3 6 | blaze-tools@1.0.4 7 | boilerplate-generator@1.0.4 8 | caching-compiler@1.0.0 9 | caching-html-compiler@1.0.2 10 | callback-hook@1.0.4 11 | check@1.1.0 12 | codefights:blaze-material-ui@0.1.8 13 | coffeescript@1.0.11 14 | ddp@1.2.2 15 | ddp-client@1.2.1 16 | ddp-common@1.2.2 17 | ddp-server@1.2.2 18 | deps@1.0.9 19 | diff-sequence@1.0.1 20 | ecmascript@0.1.6 21 | ecmascript-runtime@0.2.6 22 | ejson@1.0.7 23 | fourseven:scss@3.3.3_3 24 | geojson-utils@1.0.4 25 | html-tools@1.0.5 26 | htmljs@1.0.5 27 | id-map@1.0.4 28 | jquery@1.11.4 29 | local-test:codefights:blaze-material-ui@0.1.8 30 | logging@1.0.8 31 | meteor@1.1.10 32 | minifiers@1.1.7 33 | minimongo@1.0.10 34 | mongo@1.1.3 35 | mongo-id@1.0.1 36 | mquandalle:jade@0.4.4 37 | mquandalle:jade-compiler@0.4.4 38 | npm-mongo@1.4.39_1 39 | observe-sequence@1.0.7 40 | ordered-dict@1.0.4 41 | peerlibrary:assert@0.2.5 42 | peerlibrary:base-component@0.13.0 43 | peerlibrary:blaze-components@0.14.0 44 | peerlibrary:computed-field@0.3.0 45 | peerlibrary:reactive-field@0.1.0 46 | promise@0.5.1 47 | random@1.0.5 48 | reactive-var@1.0.6 49 | retry@1.0.4 50 | routepolicy@1.0.6 51 | spacebars@1.0.7 52 | spacebars-compiler@1.0.7 53 | templating@1.1.5 54 | templating-tools@1.0.0 55 | tinytest@1.0.6 56 | tracker@1.0.9 57 | ui@1.0.8 58 | underscore@1.0.4 59 | webapp@1.2.3 60 | webapp-hashing@1.0.5 61 | -------------------------------------------------------------------------------- /Gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var argv = require('yargs').argv; 3 | var template = require('gulp-template'); 4 | var rename = require("gulp-rename"); 5 | 6 | 7 | gulp.task('component', [], function() { 8 | return gulp.src('gulp/template/*') 9 | .pipe(template({name: argv.name})) 10 | .pipe(rename(function (path) { 11 | path.dirname = argv.name; 12 | if(path.basename !== 'README') { 13 | path.basename = argv.name; 14 | } 15 | if(path.extname === '.jade') { 16 | path.extname = '.tpl.jade'; 17 | } 18 | })) 19 | .pipe(gulp.dest('./lib/'+ argv.type)); 20 | }); 21 | 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # blaze-material-ui 2 | 3 | > This is an alpha release so use it at your own risk. See below for a list of apps that use this in production 4 | 5 | 6 | ## Installation 7 | 8 | ```shell 9 | meteor add codefights:blaze-material-ui 10 | ``` 11 | 12 | ## Screenshots 13 | 14 | ![demo](https://raw.githubusercontent.com/Code-Fights/blaze-material-ui/master/demo.png) 15 | 16 | 17 | ## Demos 18 | 19 | ### Component Catalog 20 | [official demo page](http://blaze-material-ui.meteor.com/) 21 | 22 | ### Apps using this library 23 | [CodeFights](https://codefights.com) 24 | 25 | 26 | ## Browser support 27 | 28 | Currently targeted browsers are: 29 | 30 | * Chrome (Desktop, Android) 31 | * Firefox 32 | * Safari 33 | 34 | (some browsers might have layout issues) 35 | 36 | ## Issues 37 | 38 | Please feel free to contribute or report issues. 39 | 40 | Since this is an alpha version we are making a new concept for or release candidate. It is most likely going to be a complete rewrite but we are happy about feedback and suggestions. 41 | 42 | 43 | ## Paper elements for Meteor 44 | 45 | This library provides material design elements in meteor. 46 | It is built on top of [meteor-blaze-components](https://github.com/peerlibrary/meteor-blaze-components) which uses [blaze](https://github.com/meteor/blaze) 47 | 48 | 49 | ## Create components from gulp 50 | 51 | ```shell 52 | ## requires --type and --name to be set 53 | ## --type will declare the folder 54 | ## --name will declare the component name 55 | gulp component --type=paper-elements --name=PaperButton 56 | ``` 57 | 58 | will create 59 | ``` 60 | lib 61 | ┗━┳ paper-elements 62 | ┗━┳ PaperButton 63 | ┣━ PaperButton.js 64 | ┣━ PaperButton.scss 65 | ┗━ PaperButton.tpl.jade 66 | ``` 67 | 68 | ## Usage 69 | 70 | ### Spacebars 71 | ```handlebars 72 | 73 | {{#PaperButton}} 74 | Button 75 | {{/PaperButton}} 76 | 77 | ``` 78 | 79 | ### Jade 80 | ```jade 81 | body 82 | +PaperButton() 83 | | Button 84 | ``` 85 | -------------------------------------------------------------------------------- /blaze-material-ui-tests.js: -------------------------------------------------------------------------------- 1 | // Write your tests here! 2 | // Here is an example. 3 | Tinytest.add('example', function (test) { 4 | test.equal(true, true); 5 | }); 6 | -------------------------------------------------------------------------------- /demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeSignal/blaze-material-ui/5c8e9d59919b14f7d85b3c7934b0d7e311707b48/demo.png -------------------------------------------------------------------------------- /lib/iron-elements/IronIcon/IronIcon.js: -------------------------------------------------------------------------------- 1 | Material = Material || {}; 2 | 3 | Material.IronIcon = IronIcon = class IronIcon extends BlazeComponent { 4 | 5 | constructor() { 6 | super(); 7 | } 8 | 9 | onCreated() { 10 | this.iconService = Material.iconService; 11 | } 12 | /** 13 | * @param {String} name The name of the icon (category:iconName) 14 | * @return {String} Retuns an SVG 15 | */ 16 | getSVG(name) { 17 | 18 | let icon = this.data().icon.split(':'); 19 | let group; 20 | let iconName; 21 | let svg; 22 | if (icon[1]) { 23 | group = icon[0]; 24 | iconName = icon[1]; 25 | svg = this.iconService.getIcon(group, iconName); 26 | 27 | } else { 28 | svg = ''; 29 | } 30 | return svg; 31 | } 32 | 33 | }; 34 | 35 | IronIcon.register('IronIcon'); -------------------------------------------------------------------------------- /lib/iron-elements/IronIcon/IronIcon.scss: -------------------------------------------------------------------------------- 1 | iron-icon { 2 | display: inline-block; 3 | vertical-align: middle; 4 | background-repeat: no-repeat; 5 | fill: currentcolor; 6 | position: relative; 7 | height: 24px; 8 | width: 24px; 9 | pointer-events: none; 10 | } -------------------------------------------------------------------------------- /lib/iron-elements/IronIcon/IronIcon.tpl.jade: -------------------------------------------------------------------------------- 1 | iron-icon(class=className 2 | aria-label=label 3 | data-id=id 4 | icon=icon)!= getSVG 5 | -------------------------------------------------------------------------------- /lib/iron-elements/IronIcon/README.md: -------------------------------------------------------------------------------- 1 | # IronIcon 2 | 3 | ## Reference 4 | * Material Icon Library - https://www.google.com/design/icons/ 5 | 6 | ## Usage 7 | 8 | Basic usage 9 | 10 | ```handlebars 11 | {{>IronIcon icon="navigation:menu"}} 12 | ``` 13 | 14 | Add a custom className 15 | 16 | ```handlebars 17 | {{>IronIcon className="category:icon-name"}} 18 | ``` 19 | -------------------------------------------------------------------------------- /lib/iron-elements/IronSelector/IronSelector.js: -------------------------------------------------------------------------------- 1 | Material = Material || {} 2 | 3 | 4 | Material.IronSelector = IronSelector = class IronSelector extends BlazeComponent { 5 | 6 | constructor() { 7 | super(); 8 | this.updateSelectedIndex = this.updateSelectedIndex.bind(this); 9 | this.updateSelection = this.updateSelection.bind(this); 10 | } 11 | 12 | /** 13 | * set defaults 14 | */ 15 | onCreated () { 16 | this.selected = new ReactiveVar(0); 17 | //console.log(this.data().onUpdate) 18 | //this.updateParent = this.data().update; 19 | this.autorun(this.updateSelectedIndex); 20 | } 21 | 22 | updateSelectedIndex () { 23 | this.selected.set(this.data().selected || 0); 24 | } 25 | 26 | 27 | handleClick (e) { 28 | var $element = $(e.target).closest('iron-selector>*'); 29 | let inScope = $(e.target).closest('iron-selector')[0] == $(this.firstNode())[0]; 30 | if (!inScope) { 31 | return false; 32 | } 33 | var selected = $element.index(); 34 | this.selected.set(selected); 35 | this.updateSelection(); 36 | if (typeof this.data().onUpdate === 'function') { 37 | this.data().onUpdate(this); 38 | } 39 | 40 | } 41 | 42 | updateSelection () { 43 | let selected = parseInt(this.selected.get(),10); 44 | var $elements = this.findAll('>*>*'); 45 | $elements.forEach((item, index)=>{ 46 | let isSelected = index === selected; 47 | item.classList.toggle('iron-selected', isSelected); 48 | }); 49 | } 50 | 51 | /** 52 | * after render 53 | */ 54 | onRendered () { 55 | this.selector = this.childrenComponentsWith('selected'); 56 | this.autorun(this.updateSelection); 57 | 58 | } 59 | 60 | events () { 61 | return [{ 62 | 'click': this.handleClick 63 | }]; 64 | } 65 | } 66 | 67 | IronSelector.register('IronSelector'); -------------------------------------------------------------------------------- /lib/iron-elements/IronSelector/IronSelector.scss: -------------------------------------------------------------------------------- 1 | iron-selector { 2 | visibility: hidden; 3 | > * { 4 | visibility: visible; 5 | } 6 | } -------------------------------------------------------------------------------- /lib/iron-elements/IronSelector/IronSelector.tpl.jade: -------------------------------------------------------------------------------- 1 | iron-selector(class=className selected=selected.get) 2 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/iron-elements/IronSelector/README.md: -------------------------------------------------------------------------------- 1 | # IronSelector 2 | 3 | 4 | ## Screenshot 5 | ![IronSelector ](../../../examples/readme/IronSelector.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{#IronSelector}} 13 | 1 14 | 2 15 | 3 16 | 4 17 | {{/IronSelector}} 18 | ``` 19 | 20 | Add a custom className 21 | 22 | ``` 23 | {{#IronSelector className="my-custom-class"}} 24 | 1 25 | 2 26 | 3 27 | 4 28 | {{/IronSelector}} 29 | ``` 30 | 31 | 32 | ``` 33 | {{#IronSelector selected="2"}} 34 | 1 35 | 2 36 | 3 37 | 4 38 | {{/IronSelector}} 39 | ``` 40 | 41 | 42 | ## JavaScript Callback 43 | 44 | ```handlebars 45 | {{#IronSelector onUpdate=myUpdateCallback}} 46 | 1 47 | 2 48 | 3 49 | 4 50 | {{/IronSelector}} 51 | 52 | ``` 53 | ```javascript 54 | myUpdateCallback: function(instance) { 55 | return function(selector){ 56 | alert('selected: ' + selector.selected.get()); 57 | }(instance) 58 | } 59 | ``` -------------------------------------------------------------------------------- /lib/molecules/MarkedElement/MarkedElement.js: -------------------------------------------------------------------------------- 1 | class MarkedElement extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated() {} 7 | 8 | /** 9 | * after render 10 | */ 11 | onRendered() {} 12 | 13 | /** 14 | * Run markdown via the 'marked.js' library 15 | * https://github.com/chjj/marked 16 | * @return {String} Returns raw HTML as a string 17 | * @usage 18 | * 19 | * ### Spacebars 20 | * ```handlebars 21 | *
{{{getParsed}}}
22 | * ``` 23 | * 24 | * ### Jade 25 | * ```jade 26 | * div!=getParsed 27 | * ``` 28 | */ 29 | getParsed() { 30 | var md = new Remarkable({ 31 | html: true, // Enable HTML tags in source 32 | xhtmlOut: false, // Use '/' to close single tags (
) 33 | breaks: true, // Convert '\n' in paragraphs into
34 | langPrefix: 'language-', // CSS language prefix for fenced blocks 35 | linkify: true, // Autoconvert URL-like text to links 36 | 37 | // Enable some language-neutral replacement + quotes beautification 38 | typographer: false, 39 | 40 | // Double + single quotes replacement pairs, when typographer enabled, 41 | // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German. 42 | quotes: '“”‘’', 43 | 44 | // Highlighter function. Should return escaped HTML, 45 | // or '' if the source string is not changed 46 | highlight: function(str, lang) { 47 | if (lang && hljs.getLanguage(lang)) { 48 | try { 49 | return hljs.highlight(lang, str).value; 50 | } catch ( err ) {} 51 | } 52 | 53 | try { 54 | return hljs.highlightAuto(str).value; 55 | } catch ( err ) {} 56 | 57 | return ''; // use external default escaping 58 | } 59 | }); 60 | 61 | return HTML.Raw(md.render(this.data().markdown)).value; 62 | } 63 | } 64 | 65 | MarkedElement.register('MarkedElement'); -------------------------------------------------------------------------------- /lib/molecules/MarkedElement/MarkedElement.scss: -------------------------------------------------------------------------------- 1 | marked-element { 2 | 3 | } -------------------------------------------------------------------------------- /lib/molecules/MarkedElement/MarkedElement.tpl.jade: -------------------------------------------------------------------------------- 1 | marked-element(class=className)!= getParsed -------------------------------------------------------------------------------- /lib/molecules/MarkedElement/README.md: -------------------------------------------------------------------------------- 1 | # MarkedElement 2 | 3 | 4 | ## Screenshot 5 | ![MarkedElement](../../../examples/readme/MarkedElement.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{> marked-element}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ``` 18 | {{> MarkedElement className="my-custom-class"}} 19 | ``` 20 | 21 | Set markdown 22 | 23 | ``` 24 | {{> MarkedElement markdown="`Markdown` __WOW__"}} 25 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperButton/PaperButton.scss: -------------------------------------------------------------------------------- 1 | paper-button { 2 | display: inline-block; 3 | position: relative; 4 | box-sizing: border-box; 5 | min-width: 5.14em; 6 | margin: 0 0.29em; 7 | background: transparent; 8 | text-align: center; 9 | font: inherit; 10 | text-transform: uppercase; 11 | outline: none; 12 | border-radius: 3px; 13 | user-select: none; 14 | cursor: pointer; 15 | z-index: 0; 16 | 17 | div { 18 | padding: 0.7em 0.57em; 19 | } 20 | 21 | &.keyboard-focus.paper-button { 22 | font-weight: bold; 23 | } 24 | 25 | &[disabled] { 26 | background: #eaeaea; 27 | color: #a8a8a8; 28 | cursor: auto; 29 | pointer-events: none; 30 | } 31 | 32 | &[noink] paper-ripple.paper-button { 33 | display: none; 34 | } 35 | 36 | paper-material.paper-button { 37 | border-radius: inherit; 38 | } 39 | 40 | .content.paper-button * { 41 | text-transform: inherit; 42 | } 43 | 44 | .content.paper-button { 45 | padding: 0.7em 0.57em; 46 | } 47 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperButton/PaperButton.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-button(class=className 2 | title=title 3 | disabled=disabled 4 | pressed=pressed.get 5 | focused=focused.get 6 | active=active.get 7 | toggles=toggled.get 8 | aria-label=title 9 | tabindex='0' 10 | role="button" 11 | event-hook=eventHook.get) 12 | if ink 13 | +PaperRipple(fit='' id="ripple") 14 | if elevated 15 | +PaperMaterial(elevation=elevation.get 16 | className="content paper-button" 17 | animated='' 18 | id="shadow") 19 | +Template.contentBlock 20 | else 21 | div 22 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/paper-elements/PaperButton/README.md: -------------------------------------------------------------------------------- 1 | # PaperButton 2 | 3 | 4 | ## Screenshot 5 | ![PaperButton ](../../../examples/readme/PaperButton.png) 6 | 7 | ## Usage 8 | 9 | * Basic usage 10 | ```handlebars 11 | {{#PaperButton}}[content]{{/PaperButton}} 12 | ``` 13 | 14 | * Add a custom className 15 | ```handlebars 16 | {{#PaperButton className="my-custom-class"}}[content]{{/PaperButton}} 17 | ``` 18 | 19 | ## Properties 20 | 21 | * Raised 22 | 23 | ```handlebars 24 | {{#PaperButton elevated="true"}}[content]{{/PaperButton}} 25 | ``` 26 | 27 | * Toggle 28 | 29 | ```handlebars 30 | {{#PaperButton toggles="true"}}[content]{{/PaperButton}} 31 | ``` 32 | 33 | * Noink 34 | 35 | ```handlebars 36 | {{#PaperButton noink="true"}}[content]{{/PaperButton}} 37 | ``` 38 | 39 | * Disabled 40 | 41 | ```handlebars 42 | {{#PaperButton disabled=""}}[content]{{/PaperButton}} 43 | ``` 44 | 45 | ## Styling 46 | 47 | Style the button with CSS as you would a normal DOM element. 48 | 49 | ```css 50 | .my-custom-class { 51 | background: blue; 52 | color: white; 53 | } 54 | ``` 55 | 56 | By default, the ripple is the same color as the foreground at 25% opacity. You may customize the color using this selector: 57 | 58 | ```css 59 | .my-custom-class[data-id=shadow] paper-ripple { 60 | color: darkblue; 61 | } 62 | ``` 63 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperCheckbox/PaperCheckbox.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-checkbox(class=className 2 | role="checkbox" 3 | tabindex="-1" 4 | aria-pressed=pressed.get 5 | aria-disabled=disabled 6 | aria-checked=checked.get 7 | aria-label=label 8 | focused=focused.get 9 | pressed=pressed.get 10 | disabled=disabled 11 | checked=checked.get) 12 | div(data-id="checkboxContainer" 13 | class="paper-checkbox") 14 | input(type="checkbox" 15 | checked=checked.get 16 | class=className 17 | tabindex="0" 18 | id=id 19 | name=name 20 | value=value 21 | disabled=disabled) 22 | div(data-id="checkbox" class="#{checked.get} paper-checkbox") 23 | div(data-id="checkmark" class="#{hidden.get} paper-checkbox") 24 | +PaperRipple(id="ink" className="paper-checkbox" centered="") 25 | div(data-id="checkboxLabel" 26 | class="paper-checkbox" 27 | aria-hidden="true")= label -------------------------------------------------------------------------------- /lib/paper-elements/PaperCheckbox/README.md: -------------------------------------------------------------------------------- 1 | # PaperCheckbox 2 | 3 | 4 | ## Screenshot 5 | ![PaperCheckbox ](../../../examples/readme/PaperCheckbox.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{> PaperCheckbox}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ``` 18 | {{> PaperCheckbox className="my-custom-class"}} 19 | ``` 20 | 21 | ## Properties 22 | 23 | * Checked 24 | 25 | ```handlebars 26 | {{#PaperCheckbox checked="checked"}}[content]{{/PaperCheckbox}} 27 | ``` 28 | 29 | * Disabled 30 | 31 | ```handlebars 32 | {{#PaperCheckbox disabled=""}}[content]{{/PaperCheckbox}} 33 | ``` 34 | 35 | ## Styling 36 | 37 | Style the checkmark with CSS as you would a normal DOM element. 38 | 39 | ```css 40 | // Default Checkbox 41 | .my-custom-class [data-id=checkbox] { 42 | background-color: blue; 43 | border-color: transparent; 44 | } 45 | 46 | // Checked Checkbox 47 | .my-custom-class [data-id=checkbox].checked.paper-checkbox { 48 | background-color: darkblue; 49 | border-color: darkblue; 50 | } 51 | 52 | // Checkmark 53 | .my-custom-class [data-id=checkmark].paper-checkbox { 54 | border-color: white; 55 | } 56 | 57 | // Checkbox Label 58 | .my-custom-class [data-id=checkboxLabel].paper-check { 59 | color: blue; 60 | } 61 | ``` 62 | 63 | By default, the ripple is the same color as the foreground at 25% opacity. You may customize the color using this selector: 64 | 65 | ```css 66 | .my-custom-class::shadow paper-ripple { 67 | color: darkblue; 68 | } 69 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperDialog/PaperDialog.js: -------------------------------------------------------------------------------- 1 | class PaperDialog extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated () {} 7 | 8 | /** 9 | * after render 10 | */ 11 | onRendered () { 12 | this.node = this.firstNode(); 13 | this.openDialog(); 14 | } 15 | 16 | closeDialog() { 17 | setTimeout(()=>{ 18 | this.node.style.display = 'none'; 19 | 20 | }, 100); 21 | } 22 | 23 | openDialog() { 24 | 25 | let top = 119; 26 | let left = 12; 27 | let maxHeight = 252; 28 | let maxWidth = 1064; 29 | 30 | let style = { 31 | outline: 'none', 32 | zIndex: 12, 33 | top: `${top}`, 34 | left: `${left}`, 35 | boxSizing: 'border-box', 36 | //maxHeight: `${maxHeight}px`, 37 | maxWidth: `${maxWidth}px`, 38 | position: 'fixed' 39 | } 40 | 41 | for (let prop in style) { 42 | this.node.style[prop] = style[prop]; 43 | } 44 | 45 | 46 | //this.node.style.display = 'block'; 47 | } 48 | 49 | dismissDialog() { 50 | this.closeDialog(); 51 | 52 | } 53 | 54 | confirmDialog() { 55 | this.closeDialog(); 56 | } 57 | 58 | events() { 59 | return [{ 60 | 'click [event-hook=dialog-dismiss]' : this.dismissDialog, 61 | 'click [event-hook=dialog-confirm]' : this.confirmDialog, 62 | }]; 63 | } 64 | } 65 | 66 | PaperDialog.register('PaperDialog'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperDialog/PaperDialog.scss: -------------------------------------------------------------------------------- 1 | paper-dialog { 2 | display: none; 3 | margin: 24px 40px; 4 | 5 | > * { 6 | margin-top: 20px; 7 | padding: 0 24px; 8 | } 9 | 10 | > .no-padding { 11 | padding: 0; 12 | } 13 | 14 | > *:first-child { 15 | margin-top: 24px; 16 | } 17 | 18 | > *:last-child { 19 | margin-bottom: 24px; 20 | } 21 | 22 | h2 { 23 | position: relative; 24 | margin: 0; 25 | } 26 | 27 | .buttons { 28 | position: relative; 29 | padding: 8px 8px 8px 24px; 30 | margin: 0; 31 | } 32 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperDialog/PaperDialog.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-dialog(class=className 2 | role="dialog" 3 | data-id=id 4 | tabindex="-1" 5 | aria-modal="false") 6 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/paper-elements/PaperDialog/README.md: -------------------------------------------------------------------------------- 1 | # PaperDialog 2 | 3 | 4 | ## Screenshot 5 | ![PaperDialog ](../../../examples/readme/PaperDialog.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{> PaperDialog}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ``` 18 | {{> PaperDialog className="my-custom-class"}} 19 | ``` 20 | 21 | Use an argument 22 | 23 | ``` 24 | {{> PaperDialog argument="some-argument"}} 25 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperDrawerPanel/PaperDrawerPanel.js: -------------------------------------------------------------------------------- 1 | Material = Material || {} 2 | 3 | Material.PaperDrawerPanel = PaperDrawerPanel = class PaperDrawerPanel extends BlazeComponent { 4 | 5 | constructor() { 6 | super(); 7 | this.classNames = new ReactiveVar('wide-layout left-drawer paper-drawer-panel transition'); 8 | this.handleResize = this.handleResize.bind(this); 9 | } 10 | /** 11 | * set defaults 12 | */ 13 | onCreated() { 14 | this.handleResize(); 15 | } 16 | 17 | /** 18 | * after render 19 | */ 20 | onRendered() { 21 | var main = this.childrenComponents('IronSelector'); 22 | this.selector = this.childrenComponentsWith('selected')[0]; 23 | this.firstNode().component = this.component(); 24 | 25 | // handle resize 26 | window.addEventListener('resize', this.handleResize); 27 | 28 | } 29 | 30 | onDestroyed(){ 31 | window.removeEventListener('resize', this.handleResize); 32 | } 33 | 34 | handleResize() { 35 | if (window.innerWidth < 900) { 36 | this.classNames.set('narrow-layout left-drawer paper-drawer-panel transition'); 37 | } else { 38 | this.classNames.set('wide-layout left-drawer paper-drawer-panel transition'); 39 | } 40 | } 41 | 42 | selectDrawer() { 43 | this.selector.selected.set(1); 44 | this.selector.updateSelection(); 45 | } 46 | 47 | selectMain() { 48 | this.selector.selected.set(0); 49 | this.selector.updateSelection(); 50 | } 51 | 52 | events() { 53 | return [{ 54 | 'click .paper-drawer-toggle:first': this.selectDrawer, 55 | 'click [data-id=scrim]': this.selectMain 56 | }]; 57 | } 58 | } 59 | 60 | PaperDrawerPanel.register('PaperDrawerPanel'); 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperDrawerPanel/PaperDrawerPanel.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-drawer-panel(class=className) 2 | +IronSelector(selected=0 className=classNames.get) 3 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/paper-elements/PaperDrawerPanel/PaperDrawerPanelDrawer.tpl.jade: -------------------------------------------------------------------------------- 1 | div(class='paper-drawer-panel' data-id='drawer' style="width:256px;") 2 | +Template.contentBlock 3 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperDrawerPanel/PaperDrawerPanelMain.tpl.jade: -------------------------------------------------------------------------------- 1 | div(class='paper-drawer-panel' data-id='main' style="left:256px;") 2 | div(main) 3 | +Template.contentBlock 4 | div(data-id="scrim" class="paper-drawer-panel") 5 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperDrawerPanel/README.md: -------------------------------------------------------------------------------- 1 | # PaperDrawerPanel 2 | 3 | 4 | ## Screenshot 5 | ![PaperDrawerPanel ](../../../examples/readme/PaperDrawerPanel.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ```handlebars 12 | {{#PaperDrawerPanel}} 13 | {{#PaperDrawerPanelMain}} 14 | 15 | Main Content 16 | 17 | {{/PaperDrawerPanelMain}} 18 | {{#PaperDrawerPanelDrawer}} 19 | 20 | Drawer Content 21 | 22 | {{/PaperDrawerPanelDrawer}} 23 | {{/PaperDrawerPanel}} 24 | ``` 25 | 26 | ## Description 27 | 28 | The PaperDrawerPanel provides/requires 3 components. 29 | 30 | 1. PaperDrawerPanel 31 | * the wrapper aound the content 32 | * handles the selection 33 | 2. PaperDrawerPanelMain 34 | * The main content 35 | 3. PaperDrawerPanelMain 36 | * The drawer content 37 | 38 | 39 | For the logic to work you need to use this structure to define where your content should appear 40 | 41 | Any nestewd button with the classname `drawer-toggle-button` will toggle the sidebar. You can have multiple toggle buttons for the same panel -------------------------------------------------------------------------------- /lib/paper-elements/PaperDropdown/PaperDropdown.js: -------------------------------------------------------------------------------- 1 | class PaperDropdown extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated () {} 7 | 8 | /** 9 | * after render 10 | */ 11 | onRendered () {} 12 | } 13 | 14 | PaperDropdown.register('PaperDropdown'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperDropdown/PaperDropdown.scss: -------------------------------------------------------------------------------- 1 | paper-dropdown { 2 | display: inline-block; 3 | position: relative; 4 | padding: 8px; 5 | outline: none; 6 | -webkit-user-select: none; 7 | -moz-user-select: none; 8 | -ms-user-select: none; 9 | user-select: none; 10 | cursor: pointer; 11 | z-index: 0; 12 | 13 | &[disabled] { 14 | color: #c9c9c9; 15 | pointer-events: none; 16 | cursor: auto; 17 | } 18 | 19 | [data-id=ripple] { 20 | pointer-events: none; 21 | z-index: -1; 22 | } 23 | 24 | [data-id=icon] { 25 | display: block; 26 | pointer-events: none; 27 | } 28 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperDropdown/PaperDropdown.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-dropdown(class=className 2 | tabindex="-1") 3 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/paper-elements/PaperDropdown/README.md: -------------------------------------------------------------------------------- 1 | # PaperDropdown 2 | 3 | 4 | ## Screenshot 5 | ![PaperDropdown ](../../../examples/readme/PaperDropdown.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{> PaperDropdown}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ``` 18 | {{> PaperDropdown className="my-custom-class"}} 19 | ``` 20 | 21 | Use an argument 22 | 23 | ``` 24 | {{> PaperDropdown argument="some-argument"}} 25 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperDropdownMenu/PaperDropdownMenu.js: -------------------------------------------------------------------------------- 1 | class PaperDropdownMenu extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated () {} 7 | 8 | /** 9 | * after render 10 | */ 11 | onRendered () {} 12 | } 13 | 14 | PaperDropdownMenu.register('PaperDropdownMenu'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperDropdownMenu/PaperDropdownMenu.scss: -------------------------------------------------------------------------------- 1 | paper-dropdown-menu { 2 | -moz-user-select: none; 3 | -ms-user-select: none; 4 | -webkit-user-select: none; 5 | user-select: none; 6 | cursor: pointer; 7 | padding: 0.5em 0 0.25em; 8 | margin: 1.1em 0; 9 | border-bottom: 1px solid #757575; 10 | outline: none; 11 | 12 | [data-id=label]:not(.selectedItem), [data-id=arrow] { 13 | color: #757575; 14 | } 15 | 16 | [data-id=label] { 17 | overflow: hidden; 18 | white-space: nowrap; 19 | text-overflow: ellipsis; 20 | } 21 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperDropdownMenu/PaperDropdownMenu.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-dropdown-menu(class=className 2 | label=label 3 | relative="" 4 | layout="" 5 | inline="" 6 | horizontal="" 7 | center="" 8 | tabindex="0") 9 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/paper-elements/PaperDropdownMenu/README.md: -------------------------------------------------------------------------------- 1 | # PaperDropdownMenu 2 | 3 | 4 | ## Screenshot 5 | ![PaperDropdownMenu ](../../../examples/readme/PaperDropdownMenu.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{> PaperDropdownMenu}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ``` 18 | {{> PaperDropdownMenu className="my-custom-class"}} 19 | ``` 20 | 21 | Use an argument 22 | 23 | ``` 24 | {{> PaperDropdownMenu argument="some-argument"}} 25 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperFab/PaperFab.scss: -------------------------------------------------------------------------------- 1 | paper-fab { 2 | display: inline-block; 3 | position: relative; 4 | outline: none; 5 | user-select: none; 6 | cursor: pointer; 7 | z-index: 0; 8 | box-sizing: border-box; 9 | width: 56px; 10 | height: 56px; 11 | background: #d23f31; 12 | color: #fff; 13 | fill: currentColor; 14 | border-radius: 50%; 15 | border: 0; 16 | padding: 16px; 17 | 18 | &[mini] { 19 | width: 40px; 20 | height: 40px; 21 | padding: 8px; 22 | } 23 | 24 | &[disabled] { 25 | color: #c9c9c9; 26 | pointer-events: none; 27 | cursor: auto; 28 | } 29 | 30 | [data-id=ripple] { 31 | pointer-events: none; 32 | z-index: -1; 33 | } 34 | 35 | [data-id=shadow] { 36 | border-radius: inherit; 37 | pointer-events: none; 38 | } 39 | 40 | [data-id=icon] { 41 | display: block; 42 | pointer-events: none; 43 | } 44 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperFab/PaperFab.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-fab(class=className 2 | title=title 3 | mini=mini 4 | pressed=getPressed 5 | focused=getFocused 6 | disabled=disabled.get 7 | active=getActive 8 | icon=icon 9 | aria-label=title 10 | tabindex='0' 11 | role="button" 12 | event-hook=eventHook) 13 | +PaperRipple(fit='' id="ripple") 14 | +PaperMaterial(elevation=getElevation 15 | fit='' 16 | animated='' 17 | id="shadow") 18 | if icon 19 | +IronIcon(label=title icon=icon id="icon") 20 | else 21 | +Template.contentBlock 22 | 23 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperFab/README.md: -------------------------------------------------------------------------------- 1 | # PaperFab 2 | 3 | 4 | ## Screenshot 5 | ![PaperFab ](../../../examples/readme/PaperFab.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ```handlebars 12 | {{>PaperFab}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ```handlebars 18 | {{>PaperFab className="my-custom-class"}} 19 | ``` 20 | 21 | Change the icon 22 | 23 | ```handlebars 24 | {{>PaperFab icon="category:icon-name"}} 25 | ``` 26 | 27 | ## Properties 28 | 29 | * Disabled 30 | 31 | ```handlebars 32 | {{#PaperFab disabled=""}}[content]{{/PaperFab}} 33 | ``` 34 | 35 | ## Styling 36 | 37 | Style the fab with CSS as you would a normal DOM element. 38 | 39 | ```css 40 | .my-custom-class { 41 | background-color: blue; 42 | color: white; 43 | } 44 | ``` 45 | 46 | By default, the ripple is the same color as the foreground at 25% opacity. You may customize the color using this selector: 47 | 48 | ```css 49 | .my-custom-class::shadow paper-ripple { 50 | color: darkblue; 51 | } 52 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperHeaderPanel/PaperHeaderPanel.js: -------------------------------------------------------------------------------- 1 | class PaperHeaderPanel extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated () { 7 | this.paperHeaderClass = new ReactiveVar('paper-header'); 8 | this.mode = new ReactiveVar(this.data().mode || 'standard'); 9 | this.dynamicShadow = ['waterfall', 'waterfall-tall']; 10 | this.staticShadow = ['standard']; 11 | } 12 | 13 | onRendered(){ 14 | this.mainContainer = this.find('[data-id="mainContainer"]'); 15 | this.header = this.find('paper-toolbar') || this.find('.paper-header'); 16 | let staticShadow = this.staticShadow.indexOf(this.mode.get()) > -1; 17 | 18 | if(staticShadow) { 19 | this.addShadow(); 20 | } 21 | if(this.mode.get() === 'waterfall-tall') { 22 | this.header.classList.add('medium-tall'); 23 | } 24 | } 25 | 26 | addShadow () { 27 | if (!this.header){ 28 | return false; 29 | } 30 | this.header.classList.add('has-shadow'); 31 | } 32 | 33 | removeShadow () { 34 | if (!this.header){ 35 | return false; 36 | } 37 | this.header.classList.remove('has-shadow'); 38 | } 39 | 40 | handleScroll(){ 41 | if (this.mainContainer && this.mainContainer.scrollTop >= 0) { 42 | let scrollTop = this.mainContainer.scrollTop; 43 | let dynamicShadow = this.dynamicShadow.indexOf(this.mode.get()) > -1; 44 | if(scrollTop > 0 && dynamicShadow) { 45 | this.addShadow(); 46 | } else if (dynamicShadow) { 47 | this.removeShadow(); 48 | } 49 | if(scrollTop > 0 && this.mode.get() === 'waterfall-tall') { 50 | this.header.classList.remove('medium-tall'); 51 | } else if(scrollTop <= 0 && this.mode.get() === 'waterfall-tall') { 52 | this.header.classList.add('medium-tall'); 53 | } 54 | } 55 | } 56 | 57 | events(){ 58 | return [{ 59 | 'scroll': this.handleScroll 60 | }] 61 | } 62 | } 63 | 64 | PaperHeaderPanel.register('PaperHeaderPanel'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperHeaderPanel/PaperHeaderPanel.scss: -------------------------------------------------------------------------------- 1 | paper-header-panel { 2 | display: block; 3 | position: relative; 4 | height: 100%; 5 | z-index: 0; 6 | 7 | [data-id=mainContainer].paper-header-panel { 8 | position: relative; 9 | overflow-y: auto; 10 | overflow-x: hidden; 11 | -webkit-overflow-scrolling: touch; 12 | flex-basis: 0.0001px; 13 | } 14 | 15 | &[mode=scroll] [data-id=mainContainer].paper-header-panel { 16 | overflow: visible; 17 | } 18 | 19 | &[mode=scroll] { 20 | overflow-y: auto; 21 | overflow-x: hidden; 22 | -webkit-overflow-scrolling: touch; 23 | } 24 | 25 | &[mode=cover] [data-id=mainContainer].paper-header-panel { 26 | position: absolute; 27 | top: 0; 28 | right: 0; 29 | bottom: 0; 30 | left: 0; 31 | } 32 | 33 | paper-toolbar, 34 | .paper-header { 35 | position: relative; 36 | overflow: visible !important; 37 | } 38 | 39 | paper-toolbar:after, 40 | .paper-header:after { 41 | content: ''; 42 | transition: opacity 0.5s, transform 0.5s; 43 | opacity: 0; 44 | width: 100%; 45 | position: absolute; 46 | left: 0px; 47 | right: 0px; 48 | z-index: 1; 49 | transform: scale3d(1, 0, 1); 50 | transform-origin: 0% 0%; 51 | } 52 | 53 | paper-toolbar.has-shadow:after, 54 | .paper-header.has-shadow:after { 55 | opacity: 1; 56 | transform: scale3d(1, 1, 1); 57 | } 58 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperHeaderPanel/PaperHeaderPanel.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-header-panel(class=className mode=mode.get) 2 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/paper-elements/PaperHeaderPanel/PaperHeaderPanelMain.tpl.jade: -------------------------------------------------------------------------------- 1 | div(data-id="mainContainer" class="paper-header-panel") 2 | +Template.contentBlock 3 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperHeaderPanel/README.md: -------------------------------------------------------------------------------- 1 | # PaperHeaderPanel 2 | 3 | 4 | ## Screenshot 5 | ![PaperHeaderPanel ](../../../examples/readme/PaperHeaderPanel.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ```handlebars 12 | {{#PaperHeaderPanel mode="waterfall" className="paper-header-panel-0 yellow"}} 13 |
Waterfall
14 | {{#PaperHeaderPanelMain}} 15 |
content
16 | {{/PaperHeaderPanelMain}} 17 | {{/PaperHeaderPanel}} 18 | ``` 19 | 20 | `
Waterfall
` can be replaced by a PaperToolbar 21 | 22 | the mode defines the way the panel behaves on scroll -------------------------------------------------------------------------------- /lib/paper-elements/PaperIconButton/PaperIconButton.js: -------------------------------------------------------------------------------- 1 | class PaperIconButton extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated () { 7 | this.focused = new ReactiveVar(false); 8 | this.pressed = new ReactiveVar(false); 9 | this.active = new ReactiveVar(false); 10 | } 11 | 12 | /** 13 | * after render 14 | */ 15 | onRendered () { 16 | // find the ripples container 17 | this.ripple = this.childrenComponentsWith('rippleCounter')[0]; 18 | } 19 | 20 | /** 21 | * handle the focus event 22 | * 1. not focused while pressed 23 | */ 24 | onFocus () { 25 | if (!this.pressed.get()) { 26 | this.focused.set(''); 27 | } 28 | }; 29 | /** 30 | * handle the blur event 31 | * 1. not focused 32 | */ 33 | onBlur () { 34 | this.focused.set(false); 35 | } 36 | 37 | /** 38 | * handle the mousedown event 39 | * 1. pressed 40 | * 2. active 41 | * 3. not focused 42 | * 4. send event to ripple 43 | * @param {Event} 44 | */ 45 | onDown (event) { 46 | this.pressed.set(''); 47 | this.active.set(''); 48 | this.focused.set(false); 49 | this.ripple.onDown(event); 50 | } 51 | 52 | /** 53 | * handle the mouseup event 54 | * 1. only if pressed 55 | * 2. not pressed 56 | * 3. not active 57 | * 4. send event to ripple 58 | * @param {Event} 59 | */ 60 | onUp (event) { 61 | if(this.pressed.get()!==false) { 62 | this.pressed.set(false); 63 | this.active.set(false); 64 | this.ripple.onUp(event); 65 | } 66 | } 67 | 68 | /** 69 | * @return {Object} The events 70 | */ 71 | events () { 72 | return [{ 73 | 'blur': this.onBlur, 74 | 'focus': this.onFocus, 75 | 'mousedown': this.onDown, 76 | 'mouseleave': this.onUp, 77 | 'mouseup': this.onUp 78 | }]; 79 | } 80 | } 81 | 82 | 83 | PaperIconButton.register('PaperIconButton') 84 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperIconButton/PaperIconButton.scss: -------------------------------------------------------------------------------- 1 | paper-icon-button { 2 | display: inline-block; 3 | position: relative; 4 | padding: 8px; 5 | outline: none; 6 | user-select: none; 7 | cursor: pointer; 8 | z-index: 0; 9 | border-radius: 50%; 10 | box-sizing: content-box; 11 | } 12 | 13 | paper-icon-button [data-id=ink].paper-icon-button { 14 | opacity: 0.6; 15 | } 16 | 17 | paper-icon-button[disabled] { 18 | pointer-events: none; 19 | cursor: auto; 20 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperIconButton/PaperIconButton.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-icon-button(class=className 2 | title=title 3 | mini=mini 4 | pressed=pressed.get 5 | focused=focused.get 6 | active=active.get 7 | disabled=disabled 8 | icon=icon 9 | aria-label=title 10 | tabindex='0' 11 | role="button" 12 | event-hook=eventHook) 13 | +PaperRipple(fit='' id="ink" className="circle paper-icon-button" centered="") 14 | if icon 15 | +IronIcon(label=title icon=icon id="icon") 16 | else 17 | +Template.contentBlock 18 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperIconButton/README.md: -------------------------------------------------------------------------------- 1 | # PaperIconButton 2 | 3 | 4 | ## Screenshot 5 | ![PaperIconButton ](../../../examples/readme/PaperIconButton.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ```handlebars 12 | {{>PaperIconButton}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ```handlebars 18 | {{>PaperIconButton className="my-custom-class"}} 19 | ``` 20 | 21 | Change the icon 22 | 23 | ```handlebars 24 | {{>PaperIconButton icon="refresh"}} 25 | ``` 26 | 27 | ## Properties 28 | 29 | * Disabled 30 | 31 | ```handlebars 32 | {{#PaperIconButton disabled=""}}[content]{{/PaperFab}} 33 | ``` 34 | 35 | ## Styling 36 | 37 | Style the fab with CSS as you would a normal DOM element. 38 | 39 | ```css 40 | .my-custom-class { 41 | color: blue; 42 | } 43 | ``` 44 | 45 | By default, the ripple is the same color as the foreground at 25% opacity. You may customize the color using this selector: 46 | 47 | ```css 48 | .my-custom-class::shadow paper-ripple { 49 | color: darkblue; 50 | } 51 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperInput/PaperInput.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-input(class=className 2 | label=label 3 | aria-disabled=disabled 4 | focused=focused.get 5 | disabled=disabled) 6 | +PaperInputContainer -------------------------------------------------------------------------------- /lib/paper-elements/PaperInput/PaperInputContainer.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-input-container(class=className 2 | disabled=disabled) 3 | div(class="floated-label-placeholder paper-input-container")   4 | div(class="input-content paper-input-container #{float.get}") 5 | label(class="paper-input")=label 6 | if textarea.get 7 | textarea(type=type 8 | name=name 9 | data-id="textrea" 10 | class="paper-input" 11 | disabled=disabled 12 | rows="1" 13 | placeholder=placeholder 14 | readonly=readonly)= value 15 | else 16 | input(type=type 17 | name=name 18 | data-id="input" 19 | class="paper-input" 20 | value=value 21 | disabled=disabled 22 | placeholder=placeholder 23 | readonly=readonly) 24 | div(class="underline paper-input-container #{highlight.get}") 25 | div(class="unfocused-line fit paper-input-container") 26 | div(class="focused-line fit paper-input-container") 27 | div(class="add-on-content paper-input-container") -------------------------------------------------------------------------------- /lib/paper-elements/PaperInput/README.md: -------------------------------------------------------------------------------- 1 | # PaperInput 2 | 3 | 4 | ## Screenshot 5 | ![PaperInput ](../../../examples/readme/PaperInput.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ```handlebars 12 | {{> PaperInput}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ```handlebars 18 | {{> PaperInput className="my-custom-class"}} 19 | ``` 20 | 21 | Add a custom label 22 | 23 | ```handlebars 24 | {{> PaperInput label="my-custom-label"}} 25 | ``` 26 | 27 | ## Properties 28 | 29 | * No Label Float 30 | 31 | ```handlebars 32 | {{#PaperInput labelFloat="false"}}[content]{{/PaperInput}} 33 | ``` 34 | 35 | * Disabled 36 | 37 | ```handlebars 38 | {{#PaperInput disabled=""}}[content]{{/PaperInput}} 39 | ``` 40 | 41 | ## Styling 42 | 43 | Style the input with CSS as you would a normal DOM element. 44 | 45 | ```css 46 | // Label 47 | .my-custom-class .label-is-highlighted label { 48 | color: blue; 49 | } 50 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperItem/PaperItem.js: -------------------------------------------------------------------------------- 1 | class PaperItem extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated () {} 7 | 8 | /** 9 | * after render 10 | */ 11 | onRendered () { 12 | this.link = this.find('a'); 13 | } 14 | 15 | events(){ 16 | return [{ 17 | 'click': ()=> { 18 | if (this.link) { 19 | //this.link.click() 20 | } 21 | } 22 | }] 23 | } 24 | } 25 | 26 | PaperItem.register('PaperItem'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperItem/PaperItem.scss: -------------------------------------------------------------------------------- 1 | paper-item { 2 | display: block; 3 | padding: 0px 16px; 4 | 5 | > *:not(:first-child):not(:last-child) { 6 | margin-right: 16px; 7 | } 8 | 9 | a { 10 | color: currentColor; 11 | text-decoration: none; 12 | } 13 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperItem/PaperItem.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-item(class=className 2 | role="listitem" 3 | event-hook=eventHook) 4 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/paper-elements/PaperItem/README.md: -------------------------------------------------------------------------------- 1 | # PaperItem 2 | 3 | 4 | ## Screenshot 5 | ![PaperItem ](../../../examples/readme/PaperItem.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{> PaperItem}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ``` 18 | {{> PaperItem className="my-custom-class"}} 19 | ``` 20 | 21 | Use an argument 22 | 23 | ``` 24 | {{> PaperItem argument="some-argument"}} 25 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperMaterial/PaperMaterial.js: -------------------------------------------------------------------------------- 1 | class PaperMaterial extends BlazeComponent {} 2 | PaperMaterial.register('PaperMaterial'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperMaterial/PaperMaterial.scss: -------------------------------------------------------------------------------- 1 | paper-material, 2 | paper-animated-material { 3 | display: block; 4 | position: relative; 5 | } 6 | 7 | paper-material { 8 | &[animated] { 9 | transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1); 10 | } 11 | 12 | &[elevation="1"] { 13 | box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 14 | 0 1px 5px 0 rgba(0, 0, 0, 0.12), 15 | 0 3px 1px -2px rgba(0, 0, 0, 0.2); 16 | } 17 | 18 | &[elevation="2"] { 19 | box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 20 | 0 1px 10px 0 rgba(0, 0, 0, 0.12), 21 | 0 2px 4px -1px rgba(0, 0, 0, 0.4); 22 | } 23 | 24 | &[elevation="3"] { 25 | box-shadow:0 6px 10px 0 rgba(0, 0, 0, 0.14), 26 | 0 1px 18px 0 rgba(0, 0, 0, 0.12), 27 | 0 3px 5px -1px rgba(0, 0, 0, 0.4); 28 | } 29 | 30 | &[elevation="4"] { 31 | box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 32 | 0 3px 14px 2px rgba(0, 0, 0, 0.12), 33 | 0 5px 5px -3px rgba(0, 0, 0, 0.4); 34 | } 35 | 36 | &[elevation="5"] { 37 | box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 38 | 0 6px 30px 5px rgba(0, 0, 0, 0.12), 39 | 0 8px 10px -5px rgba(0, 0, 0, 0.4); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperMaterial/PaperMaterial.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-material(class=className 2 | data-id=id 3 | fit=fit 4 | animated=animated 5 | elevation=elevation) 6 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/paper-elements/PaperMaterial/README.md: -------------------------------------------------------------------------------- 1 | # PaperMaterial 2 | 3 | 4 | ## Screenshot 5 | ![PaperMaterial ](../../../examples/readme/PaperMaterial.png) 6 | 7 | ## Usage 8 | 9 | * Basic usage 10 | 11 | ```handlebars 12 | {{>PaperMaterial}} 13 | ``` 14 | 15 | * Add a custom className 16 | 17 | ```handlebars 18 | {{>PaperMaterial className="my-custom-class"}} 19 | ``` 20 | 21 | * Add a content 22 | 23 | ```handlebars 24 | {{#PaperMaterial}}[content]{{# PaperMaterial}} 25 | ``` 26 | 27 | ## Properties 28 | 29 | * Elevation 30 | 31 | ```handlebars 32 | {{>PaperMaterial elevation=3}} 33 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperMenu/PaperMenu.js: -------------------------------------------------------------------------------- 1 | class PaperMenu extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated() { 7 | this.id = new ReactiveVar(this.data().id); 8 | this.selected = new ReactiveVar(this.data().defaultSelected); 9 | } 10 | 11 | /** 12 | * after render 13 | */ 14 | onRendered() { 15 | this.selector = this.childrenComponentsWith('selected')[0]; 16 | } 17 | 18 | handleUpdate() { 19 | return () => { 20 | let selected = this.selector.selected.get(); 21 | this.selected.set(selected); 22 | if (typeof this.data().onUpdate === 'function') { 23 | this.data().onUpdate(); 24 | } 25 | }; 26 | } 27 | } 28 | 29 | PaperMenu.register('PaperMenu'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperMenu/PaperMenu.scss: -------------------------------------------------------------------------------- 1 | paper-menu { 2 | outline: 0; 3 | display: block; 4 | padding: 8px 0; 5 | position: relative; 6 | background: #fff; 7 | color: #000; 8 | 9 | .content > .iron-selected { 10 | font-weight: bold; 11 | } 12 | 13 | .content > *:focus { 14 | position: relative; 15 | outline: 0; 16 | } 17 | 18 | .content > *:focus:after { 19 | background: currentColor; 20 | opacity: 0.12; 21 | content: ''; 22 | } 23 | 24 | .content > *[colored]:focus:after { 25 | opacity: 0.26; 26 | } 27 | 28 | paper-material { 29 | pointer-events: none; 30 | } 31 | 32 | paper-menu { 33 | min-width: min-content; 34 | min-width: -webkit-min-content; 35 | z-index: 9; 36 | } 37 | 38 | paper-item { 39 | white-space: nowrap; 40 | } 41 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperMenu/PaperMenu.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-menu(class=className 2 | role="menu" 3 | tabindex="-1" 4 | data-id=id.get 5 | selected=selected.get) 6 | +PaperMaterial(elevation="2" fit="") 7 | +IronSelector(className="content" selected=defaultSelected onUpdate=handleUpdate) 8 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/paper-elements/PaperMenu/README.md: -------------------------------------------------------------------------------- 1 | # PaperMenu 2 | 3 | 4 | ## Screenshot 5 | ![PaperMenu ](../../../examples/readme/PaperMenu.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{> PaperMenu}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ``` 18 | {{> PaperMenu className="my-custom-class"}} 19 | ``` 20 | 21 | Use an argument 22 | 23 | ``` 24 | {{> PaperMenu argument="some-argument"}} 25 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperMenuButton/PaperMenuButton.js: -------------------------------------------------------------------------------- 1 | class PaperMenuButton extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated() { 7 | this.closeMenu = this.closeMenu.bind(this); 8 | this.openMenu = this.openMenu.bind(this); 9 | this.toggleMenu = this.toggleMenu.bind(this); 10 | document.body.addEventListener('click', this.closeMenu); 11 | } 12 | 13 | onDestroyed() { 14 | document.body.removeEventListener('click', this.closeMenu); 15 | } 16 | 17 | /** 18 | * after render 19 | */ 20 | onRendered() { 21 | this.input = this.find('input'); 22 | this.selector = this.find('iron-selector'); 23 | this.material = this.find('paper-material'); 24 | } 25 | 26 | closeMenu(e) { 27 | if (this.open) { 28 | let outsideMenu = $(e.target).closest('paper-menu-button')[0] !== $(this.firstNode())[0]; 29 | if (outsideMenu) { 30 | this.firstNode().classList.remove('open'); 31 | this.open = false; 32 | } 33 | } 34 | } 35 | 36 | openMenu() { 37 | this.open = true; 38 | this.firstNode().classList.add('open'); 39 | } 40 | 41 | toggleMenu() { 42 | this.firstNode().classList.toggle('open'); 43 | } 44 | 45 | 46 | events() { 47 | return [{ 48 | 'click [event-hook=menu-open]': this.openMenu 49 | }]; 50 | } 51 | } 52 | 53 | PaperMenuButton.register('PaperMenuButton'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperMenuButton/PaperMenuButton.scss: -------------------------------------------------------------------------------- 1 | paper-menu-button { 2 | display: inline-block; 3 | position: relative; 4 | padding: 8px; 5 | outline: none; 6 | 7 | &[disabled] { 8 | cursor: auto; 9 | } 10 | 11 | &[vertical-align="top"] paper-menu.paper-menu-button { 12 | margin-bottom: 20px; 13 | margin-top: -10px; 14 | top: 10px; 15 | } 16 | 17 | &[vertical-align="bottom"] paper-menu.paper-menu-button { 18 | bottom: 10px; 19 | margin-bottom: -10px; 20 | margin-top: 20px; 21 | } 22 | 23 | &[horizontal-align="right"] paper-menu.paper-menu-button { 24 | right: 10px; 25 | } 26 | 27 | &[horizontal-align="left"] paper-menu.paper-menu-button { 28 | left: 10px; 29 | } 30 | 31 | &.paper-menu-button { 32 | border-radius: 2px; 33 | } 34 | 35 | paper-icon-button { 36 | paper-ripple { 37 | pointer-events: none; 38 | } 39 | } 40 | 41 | > .paper-menu-button { 42 | position: absolute; 43 | display: none; 44 | z-index: 9; 45 | min-width: calc(100% - 16px); 46 | } 47 | 48 | &.open { 49 | > .paper-menu-button { 50 | display: block; 51 | } 52 | } 53 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperMenuButton/PaperMenuButton.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-menu-button(class=className 2 | role="group" 3 | aria-haspopup="true" 4 | aria-disabled="false" 5 | horizontal-align=horizontalAlign 6 | vertical-align=verticalAlign) 7 | label(event-hook="menu-open") #{label} 8 | +PaperIconButton(icon=icon eventHook="menu-open") 9 | +PaperMenu(className="paper-menu-button") 10 | +Template.contentBlock 11 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperMenuButton/README.md: -------------------------------------------------------------------------------- 1 | # PaperMenuButton 2 | 3 | 4 | ## Screenshot 5 | ![PaperMenuButton ](../../../examples/readme/PaperMenuButton.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{>PaperMenuButton}} 13 | {{#PaperItem className="paper-item-0" }}Foo{{/PaperItem}} 14 | {{#PaperItem className="paper-item-0" }}Foo{{/PaperItem}} 15 | {{/PaperMenuButton}} 16 | ``` 17 | 18 | Add a custom className 19 | 20 | ``` 21 | {{#PaperMenuButton className="my-custom-class"}} 22 | {{#PaperItem className="paper-item-0" }}Foo{{/PaperItem}} 23 | {{#PaperItem className="paper-item-0" }}Foo{{/PaperItem}} 24 | {{/PaperMenuButton}} 25 | 26 | ``` 27 | 28 | Links in content 29 | 30 | ``` 31 | {{#PaperMenuButton icon="navigation:arrow-drop_down" horizontalAlign="left" verticalAlign="top"}} 32 | {{#PaperItem className="paper-item-0" }}Inbox{{/PaperItem}} 33 | {{#PaperItem className="paper-item-0" }}Starred{{/PaperItem}} 34 | {{#PaperItem className="paper-item-0" }}Sent mail{{/PaperItem}} 35 | {{#PaperItem className="paper-item-0" }}Draft{{/PaperItem}} 36 | {{/PaperMenuButton}} 37 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperProgress/PaperProgress.js: -------------------------------------------------------------------------------- 1 | class PaperProgress extends BlazeComponent { 2 | 3 | /** 4 | * get the progress as a float 5 | * can be used when e.g. scaling the progressbar `scale({{getProgress}}) 6 | * @return {Float} Returns a value from 0 to 1 7 | */ 8 | getProgress() { 9 | var value = this.data().value; 10 | var max = this.data().max 11 | return value/max; 12 | } 13 | } 14 | 15 | PaperProgress.register('PaperProgress'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperProgress/PaperProgress.scss: -------------------------------------------------------------------------------- 1 | paper-progress { 2 | display: inline-block; 3 | width: 200px; 4 | height: 4px; 5 | 6 | [data-id=progressContainer].paper-progress { 7 | position: relative; 8 | height: 100%; 9 | overflow: hidden; 10 | } 11 | 12 | [data-id=activeProgress].paper-progress, 13 | [data-id=secondaryProgress].paper-progress { 14 | transform-origin: left center; 15 | transform: scaleX(0); 16 | } 17 | 18 | [data-id=activeProgress][indeterminate].paper-progress { 19 | transform-origin: center center; 20 | animation: indeterminate-bar 1s linear infinite; 21 | } 22 | } 23 | 24 | @keyframes indeterminate-bar { 25 | 0% { 26 | transform: translate(-50%) scaleX(0); 27 | } 28 | 29 | 50% { 30 | transform: translate(0%) scaleX(0.3); 31 | } 32 | 33 | 100% { 34 | transform: translate(50%) scaleX(0); 35 | } 36 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperProgress/PaperProgress.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-progress(value=value class=className) 2 | div(data-id="progressContainer" 3 | role="progressbar" 4 | class="paper-progress" 5 | aria-valuenow=value 6 | aria-valuemin=min 7 | aria-valuemax=max) 8 | div(data-id="secondaryProgress" 9 | fit="" 10 | class="paper-progress" ) 11 | div(data-id="activeProgress" 12 | fit="" 13 | indeterminate=indeterminate 14 | class="paper-progress" 15 | style='transform:scaleX(#{getProgress});-webkit-transform:scaleX(#{getProgress})') 16 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperProgress/README.md: -------------------------------------------------------------------------------- 1 | # PaperProgress 2 | 3 | ## Screenshot 4 | ![PaperProgress ](../../../examples/readme/PaperProgress.png) 5 | 6 | ## Usage 7 | 8 | * Basic usage 9 | 10 | ```handlebars 11 | {{> PaperMaterial}} 12 | ``` 13 | 14 | * Add a custom className 15 | 16 | ```handlebars 17 | {{> PaperProgress className="my-custom-class"}} 18 | ``` 19 | 20 | * Set the min & max 21 | 22 | ```handlebars 23 | {{> PaperProgress min=0 max=100}} 24 | ``` 25 | 26 | * Change the value 27 | 28 | ```handlebars 29 | {{> PaperProgress value=30}} 30 | ``` 31 | 32 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperRadioButton/PaperRadioButton.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-radio-button(class=className 2 | role="radio" 3 | tabindex="-1" 4 | aria-pressed=pressed.get 5 | aria-disabled=disabled 6 | aria-label=label 7 | focused=focused.get 8 | pressed=pressed.get 9 | disabled=disabled) 10 | div(data-id="radioContainer" 11 | class="paper-radio-button") 12 | input(type="radio" 13 | checked=checked 14 | name=name 15 | id=id 16 | value=value 17 | tabindex="0" 18 | disabled=disabled) 19 | div(data-id="offRadio" 20 | class="paper-radio-button") 21 | div(data-id="onRadio" 22 | class="paper-radio-button") 23 | +PaperRipple(id="ink" className="paper-radio-button" centered="true" ) 24 | div(data-id="radioLabel" 25 | class="paper-radio-button" 26 | aria-hidden="true")= label -------------------------------------------------------------------------------- /lib/paper-elements/PaperRadioButton/README.md: -------------------------------------------------------------------------------- 1 | # PaperRadioButton 2 | 3 | 4 | ## Screenshot 5 | ![PaperRadioButton ](../../../examples/readme/PaperRadioButton.png) 6 | 7 | ## Usage 8 | 9 | * Basic usage 10 | 11 | ``` 12 | {{> PaperRadioButton}} 13 | ``` 14 | 15 | * Add a custom className 16 | 17 | ``` 18 | {{> PaperRadioButton className="my-custom-class"}} 19 | ``` 20 | 21 | * Use an argument 22 | 23 | ``` 24 | {{> PaperRadioButton argument="some-argument"}} 25 | ``` 26 | 27 | ## Properties 28 | 29 | * Checked 30 | 31 | ```handlebars 32 | {{#PaperRadioButton checked="checked"}}[content]{{/PaperRadioButton}} 33 | ``` 34 | 35 | * Disabled 36 | 37 | ```handlebars 38 | {{#PaperRadioButton disabled=""}}[content]{{/PaperRadioButton}} 39 | ``` 40 | 41 | ## Styling 42 | 43 | Style the radio button with CSS as you would a normal DOM element. 44 | 45 | ```css 46 | // onRadio 47 | .my-custom-class [data-id=onRadio] { 48 | background-color: blue; 49 | } 50 | 51 | // offRadio 52 | .my-custom-class [data-id=offRadio] { 53 | background-color: transparent; 54 | border-color: blue; 55 | } 56 | ``` 57 | 58 | By default, the ripple is the same color as the foreground at 25% opacity. You may customize the color using this selector: 59 | 60 | ```css 61 | .my-custom-class::shadow paper-ripple { 62 | color: darkblue; 63 | } 64 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperRipple/PaperRipple.scss: -------------------------------------------------------------------------------- 1 | paper-ripple { 2 | display: block; 3 | position: relative; 4 | border-radius: inherit; 5 | overflow: hidden; 6 | 7 | &[noink] { 8 | pointer-events: none; 9 | } 10 | 11 | [data-id=bg], 12 | [data-id=waves], 13 | .wave-container, 14 | .wave { 15 | pointer-events: none; 16 | position: absolute; 17 | top: 0; 18 | left: 0; 19 | width: 100%; 20 | height: 100%; 21 | } 22 | 23 | [data-id=waves] { 24 | border-radius: inherit; 25 | -webkit-mask-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYGBgAAgwAAAEAAGbA+oJAAAAAElFTkSuQmCC"); 26 | } 27 | 28 | [data-id=bg], .wave { 29 | opacity: 0; 30 | } 31 | 32 | [data-id=waves], .wave { 33 | overflow: hidden; 34 | } 35 | 36 | .wave-container, .wave { 37 | border-radius: 50%; 38 | } 39 | 40 | .circle [data-id=bg], 41 | paper-ripple.circle [data-id=waves] { 42 | border-radius: 50%; 43 | } 44 | 45 | .wave-container { 46 | background-color: currentColor; 47 | overflow: hidden; 48 | animation: paper-ripple-grow 0.5s ease-in-out forwards; 49 | 50 | &.remove { 51 | transition: all 0.5s 0.2s ease-in-out; 52 | background-color: transparent; 53 | } 54 | } 55 | } 56 | 57 | @keyframes paper-ripple-grow { 58 | $max-opacity: 0.2; 59 | 60 | 0% { 61 | transform: scale(0); 62 | opacity: 0; 63 | } 64 | 65 | 20% { 66 | opacity: $max-opacity; 67 | } 68 | 69 | 80% { 70 | transform: scale(1); 71 | opacity: $max-opacity; 72 | } 73 | 74 | 100% { 75 | transform: scale(1); 76 | opacity: $max-opacity; 77 | } 78 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperRipple/PaperRipple.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-ripple(class=className 2 | fit 3 | data-id=id) 4 | div(data-id="bg") 5 | div(data-id="waves") 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperRipple/README.md: -------------------------------------------------------------------------------- 1 | # PaperRipple 2 | 3 | ## Usage 4 | 5 | * Basic usage 6 | 7 | ```handlebars 8 | {{>PaperRipple}} 9 | ``` 10 | 11 | * Add a custom className 12 | 13 | ```handlebars 14 | {{>PaperRipple className="my-custom-class"}} 15 | ``` 16 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperSpinner/PaperSpinner.js: -------------------------------------------------------------------------------- 1 | class PaperSpinner extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated () {} 7 | 8 | /** 9 | * after render 10 | */ 11 | onRendered () {} 12 | } 13 | 14 | PaperSpinner.register('PaperSpinner'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperSpinner/PaperSpinner.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-spinner(active=active aria-label=title class=className) 2 | div(data-id="spinnerContainer" class="#{active} paper-spinner") 3 | 4 | div(class="spinner-layer layer-1 paper-spinner") 5 | div(class="circle-clipper left paper-spinner") 6 | div(class="circle paper-spinner") 7 | div(class="gap-patch paper-spinner") 8 | div(class="circle paper-spinner") 9 | div(class="circle-clipper right paper-spinner") 10 | div(class="circle paper-spinner") 11 | 12 | div(class="spinner-layer layer-2 paper-spinner") 13 | div(class="circle-clipper left paper-spinner") 14 | div(class="circle paper-spinner") 15 | div(class="gap-patch paper-spinner") 16 | div(class="circle paper-spinner") 17 | div(class="circle-clipper right paper-spinner") 18 | div(class="circle paper-spinner") 19 | 20 | div(class="spinner-layer layer-3 paper-spinner") 21 | div(class="circle-clipper left paper-spinner") 22 | div(class="circle paper-spinner") 23 | div(class="gap-patch paper-spinner") 24 | div(class="circle paper-spinner") 25 | div(class="circle-clipper right paper-spinner") 26 | div(class="circle paper-spinner") 27 | 28 | div(class="spinner-layer layer-4 paper-spinner") 29 | div(class="circle-clipper left paper-spinner") 30 | div(class="circle paper-spinner") 31 | div(class="gap-patch paper-spinner") 32 | div(class="circle paper-spinner") 33 | div(class="circle-clipper right paper-spinner") 34 | div(class="circle paper-spinner") 35 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperSpinner/README.md: -------------------------------------------------------------------------------- 1 | # PaperSpinner 2 | 3 | ## Screenshot 4 | ![PaperSpinner ](../../../examples/readme/PaperSpinner.png) 5 | 6 | ## Usage 7 | 8 | * Basic usage 9 | 10 | ```handlebars 11 | {{>PaperSpinner}} 12 | ``` 13 | 14 | * Add a custom className 15 | 16 | ```handlebars 17 | {{>PaperSpinner className="my-custom-class"}} 18 | ``` 19 | 20 | * Activate 21 | 22 | ```handlebars 23 | {{>PaperSpinner active="active"}} 24 | ``` 25 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperTab/PaperTab.js: -------------------------------------------------------------------------------- 1 | Material = Material || {} 2 | 3 | Material.PaperTab = PaperTab = class PaperTab extends BlazeComponent { 4 | 5 | /** 6 | * set defaults 7 | */ 8 | onCreated() {} 9 | 10 | /** 11 | * after render 12 | */ 13 | onRendered() { 14 | 15 | // find the ripples container 16 | this.ripple = this.childrenComponentsWith('rippleElements')[0]; 17 | } 18 | 19 | 20 | /** 21 | * handle the mousedown event 22 | * 1. send event to ripple 23 | * @param {Event} 24 | */ 25 | onDown(event) { 26 | this.ripple.onDown(event); 27 | } 28 | 29 | /** 30 | * handle the click event 31 | * 1. click link if present 32 | * @param {Event} 33 | */ 34 | onClick(event) { 35 | var link = this.find('a'); 36 | 37 | if (link) { 38 | link.click(); 39 | } 40 | } 41 | 42 | /** 43 | * handle the mouseup event 44 | * 1. send event to ripple 45 | * @param {Event} 46 | */ 47 | onUp(event) { 48 | this.ripple.onUp(event); 49 | } 50 | /** 51 | * @return {Object} The events 52 | */ 53 | events() { 54 | return [{ 55 | 'mousedown': this.onDown, 56 | 'mouseleave': this.onUp, 57 | 'mouseup': this.onUp, 58 | 'click': this.onClick 59 | }]; 60 | } 61 | } 62 | 63 | PaperTab.register('PaperTab'); 64 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperTab/PaperTab.scss: -------------------------------------------------------------------------------- 1 | paper-tab { 2 | position: relative; 3 | padding: 0 12px; 4 | overflow: hidden; 5 | cursor: pointer; 6 | min-width: min-content; 7 | 8 | &:focus { 9 | outline: none; 10 | } 11 | 12 | &[link] { 13 | padding: 0; 14 | } 15 | 16 | .tab-content.paper-tab { 17 | height: 100%; 18 | transform: translateZ(0); 19 | transition: opacity 0.1s cubic-bezier(0.4, 0, 1, 1); 20 | } 21 | 22 | .tab-content.paper-tab, paper-ripple.paper-tab { 23 | pointer-events: none; 24 | } 25 | 26 | &:not(.iron-selected) > .tab-content.paper-tab { 27 | opacity: 0.8; 28 | } 29 | 30 | &:focus .tab-content.paper-tab { 31 | opacity: 1; 32 | font-weight: 700; 33 | } 34 | 35 | [data-id=ink].paper-tab { 36 | pointer-events: none; 37 | 38 | .wave-container { 39 | animation-name: tab-paper-ripple-grow; 40 | } 41 | } 42 | 43 | .tab-content.paper-tab > a { 44 | height: 100%; 45 | flex: 1; 46 | flex-basis: 0.01px; 47 | } 48 | } 49 | 50 | @keyframes tab-paper-ripple-grow { 51 | $max-opacity: 0.85; 52 | 53 | 0% { 54 | transform: scale(0); 55 | opacity: 0; 56 | } 57 | 58 | 20% { 59 | opacity: $max-opacity; 60 | } 61 | 62 | 80% { 63 | transform: scale(1); 64 | opacity: $max-opacity; 65 | } 66 | 67 | 100% { 68 | transform: scale(1); 69 | opacity: $max-opacity; 70 | } 71 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperTab/PaperTab.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-tab(class=className 2 | role="tab" 3 | aria-disabled="false" 4 | link=link 5 | event-hook=eventHook) 6 | +PaperRipple(className="paper-tab" id="ink") 7 | div(class="tab-content paper-tab" flex auto center-center vertical layout) 8 | if link 9 | a(href=link layout horizontal center) 10 | +Template.contentBlock 11 | else 12 | +Template.contentBlock 13 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperTab/README.md: -------------------------------------------------------------------------------- 1 | # PaperTab 2 | 3 | 4 | ## Screenshot 5 | ![PaperTab ](../../../examples/readme/PaperTab.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{> PaperTab}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ``` 18 | {{> PaperTab className="my-custom-class"}} 19 | ``` 20 | 21 | Use an argument 22 | 23 | ``` 24 | {{> PaperTab argument="some-argument"}} 25 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperTabs/PaperTabs.scss: -------------------------------------------------------------------------------- 1 | paper-tabs { 2 | height: 48px; 3 | font-size: 14px; 4 | font-weight: 500; 5 | overflow: hidden; 6 | user-select: none; 7 | -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 8 | 9 | &:focus { 10 | outline: 0; 11 | } 12 | 13 | [data-id=tabsContainer].paper-tabs { 14 | position: relative; 15 | height: 100%; 16 | white-space: nowrap; 17 | overflow: hidden; 18 | } 19 | 20 | [data-id=tabsContent].paper-tabs { 21 | height: 100%; 22 | } 23 | 24 | [data-id=tabsContent].scrollable.paper-tabs { 25 | position: absolute; 26 | white-space: nowrap; 27 | } 28 | 29 | .hidden.paper-tabs { 30 | display: none; 31 | } 32 | 33 | .not-visible.paper-tabs { 34 | opacity: 0; 35 | } 36 | 37 | paper-icon-button.paper-tabs { 38 | width: 24px; 39 | padding: 16px; 40 | } 41 | 42 | iron-selector { 43 | position: relative; 44 | } 45 | 46 | [data-id=selectionBar].paper-tabs { 47 | position: absolute; 48 | height: 2px; 49 | bottom: 0; 50 | left: 0; 51 | right: 0; 52 | transform-origin: left center; 53 | transform: scale(0); 54 | transition: transform; 55 | } 56 | 57 | [data-id=selectionBar].align-bottom.paper-tabs { 58 | top: 0; 59 | bottom: auto; 60 | } 61 | 62 | [data-id=selectionBar].expand.paper-tabs { 63 | transition-duration: 0.15s; 64 | transition-timing-function: cubic-bezier(0.4, 0, 1, 1); 65 | } 66 | 67 | [data-id=selectionBar].contract.paper-tabs { 68 | transition-duration: 0.18s; 69 | transition-timing-function: cubic-bezier(0, 0, 0.2, 1); 70 | } 71 | 72 | [data-id=selectionBar].paper-tabs > *:not([data-id=selectionBar]) { 73 | height: 100%; 74 | } 75 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperTabs/PaperTabs.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-tabs(class=className role="tablist" tabindex="0" scrollable=scrollable) 2 | if (scrollable) 3 | +PaperIconButton(icon="navigation:chevron-left") 4 | div(data-id="tabsContainer" flex class="paper-tabs") 5 | div(data-id="tabsContent" horizontal layout class="paper-tabs") 6 | +IronSelector(selected=selected) 7 | +Template.contentBlock 8 | div(data-id="selectionBar" class="paper-tabs" style=style.get) 9 | if (scrollable) 10 | +PaperIconButton(icon="navigation:chevron-right") 11 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperTabs/README.md: -------------------------------------------------------------------------------- 1 | # PaperTabs 2 | 3 | 4 | ## Screenshot 5 | ![PaperTabs ](../../../examples/readme/PaperTabs.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{> PaperTabs}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ``` 18 | {{> PaperTabs className="my-custom-class"}} 19 | ``` 20 | 21 | Use an argument 22 | 23 | ``` 24 | {{> PaperTabs argument="some-argument"}} 25 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperToast/PaperToast.js: -------------------------------------------------------------------------------- 1 | class PaperToast extends BlazeComponent { 2 | 3 | constructor() { 4 | super(); 5 | this.deactivate = this.deactivate.bind(this); 6 | this.closeOnClick = this.closeOnClick.bind(this); 7 | } 8 | /** 9 | * set defaults 10 | */ 11 | onCreated() { 12 | this.props = this.data() || {}; 13 | this.active = new ReactiveVar(this.props.active); 14 | } 15 | 16 | removeToast(e) { 17 | if (e.animationName === 'hide-toast') { 18 | e.target.removeEventListener('animationend', this.removeToast); 19 | e.target.remove(); 20 | } 21 | } 22 | 23 | deactivate() { 24 | this.active.set(false); 25 | this.handleClose(); 26 | this.firstNode().addEventListener('animationend', this.removeToast); 27 | } 28 | 29 | closeOnClick() { 30 | clearTimeout(this.timer); 31 | this.deactivate(); 32 | } 33 | 34 | activate() { 35 | this.active.set(true); 36 | } 37 | 38 | handleClose() { 39 | if (typeof this.props.onClose === 'function') { 40 | this.data().onClose(); 41 | } 42 | } 43 | /** 44 | * after render 45 | */ 46 | onRendered() { 47 | if (this.active.get()) { 48 | this.timer = setTimeout(this.deactivate, this.props.delay || 3000); 49 | } 50 | } 51 | 52 | onDestroyed() { 53 | clearTimeout(this.timer); 54 | } 55 | 56 | events() { 57 | return [{ 58 | 'click [event-hook=close-toast]': this.closeOnClick 59 | }]; 60 | } 61 | } 62 | 63 | PaperToast.register('PaperToast'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperToast/PaperToast.scss: -------------------------------------------------------------------------------- 1 | paper-toast { 2 | display: inline-block; 3 | position: fixed; 4 | background: #323232; 5 | color: #f1f1f1; 6 | min-height: 48px; 7 | min-width: 288px; 8 | padding: 16px 24px 12px; 9 | box-sizing: border-box; 10 | box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26); 11 | border-radius: 2px; 12 | bottom: 12px; 13 | left: 12px; 14 | font-size: 14px; 15 | cursor: default; 16 | transition: visibility 0.3s, transform 0.3s; 17 | transform: translateY(100px); 18 | visibility: hidden; 19 | z-index: 99; 20 | 21 | &.capsule { 22 | border-radius: 24px; 23 | } 24 | 25 | &.fit-bottom { 26 | bottom: 0; 27 | left: 0; 28 | width: 100%; 29 | min-width: 0; 30 | border-radius: 0; 31 | } 32 | 33 | &[active] { 34 | visibility: visible; 35 | transform: translateY(0px); 36 | } 37 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperToast/PaperToast.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-toast(class=className 2 | text=text 3 | aria-hidden="true" active=active.get 4 | layout horizontal center) 5 | span(data-id="label" class="paper-toast" flex) 6 | //- HTML rendering should be removed (keep it for now) 7 | if text 8 | | !{text} 9 | else 10 | +Template.contentBlock 11 | if dismissable 12 | +PaperIconButton(icon="navigation:close" eventHook="close-toast") -------------------------------------------------------------------------------- /lib/paper-elements/PaperToast/README.md: -------------------------------------------------------------------------------- 1 | # PaperToast 2 | 3 | 4 | ## Screenshot 5 | ![PaperToast ](../../../examples/readme/PaperToast.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ```handlebars 12 | {{> PaperToast}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ```handlebars 18 | {{> PaperToast className="my-custom-class"}} 19 | ``` 20 | 21 | Add custom text 22 | 23 | ```handlebars 24 | {{> PaperToast text="Woo hoo! Paper Toast has arrived!"}} 25 | ``` 26 | 27 | Add custom text 28 | 29 | ```handlebars 30 | {{#PaperToast }} 31 |
Put some PB and J on me
32 | {{/PaperToast }} 33 | ``` 34 | 35 | 36 | ## Styling 37 | 38 | Style the checkmark with CSS as you would a normal DOM element. 39 | 40 | ```css 41 | .my-custom-class { 42 | background-color: blue; 43 | color: white; 44 | } 45 | ``` 46 | 47 | ## JavaScript Callback 48 | 49 | ```handlebars 50 | {{> PaperToast onClose=myCloseCallback}} 51 | 52 | ``` 53 | ```javascript 54 | myCloseCallback: function() { 55 | return function(){ 56 | alert('toast was closed'); 57 | } 58 | } 59 | 60 | ``` 61 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperToggleButton/PaperToggleButton.js: -------------------------------------------------------------------------------- 1 | class PaperToggleButton extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated () { 7 | this.focused = new ReactiveVar(false); 8 | this.pressed = new ReactiveVar(false); 9 | this.checked = new ReactiveVar(this.data() && this.data().checked ? 'checked' : false); 10 | 11 | 12 | } 13 | 14 | /** 15 | * Handle the click of the toggle button 16 | */ 17 | handleClick(){ 18 | let checked = this.checked.get() 19 | this.checked.set(!checked ? 'checked' : false); 20 | } 21 | 22 | /** 23 | * after render 24 | */ 25 | onRendered () { 26 | 27 | // find the ripples container 28 | this.ripple = this.childrenComponentsWith('rippleElements')[0]; 29 | } 30 | 31 | 32 | /** 33 | * handle the focus event 34 | * 1. not focused while pressed 35 | * 2. elevated 36 | */ 37 | onFocus () { 38 | if (!this.pressed.get()) { 39 | this.focused.set(''); 40 | } 41 | this.ripple.onDown(event); 42 | } 43 | 44 | /** 45 | * handle the blur event 46 | * 1. not focused 47 | * 2. not elevated 48 | */ 49 | onBlur () { 50 | this.focused.set(false); 51 | this.ripple.onUp(event); 52 | } 53 | 54 | /** 55 | * handle the mousedown event 56 | * 1. send event to ripple 57 | * @param {Event} 58 | */ 59 | onDown(event) { 60 | this.ripple.onDown(event); 61 | } 62 | 63 | /** 64 | * handle the mouseup event 65 | * 1. send event to ripple 66 | * @param {Event} 67 | */ 68 | onUp(event) { 69 | this.ripple.onUp(event); 70 | } 71 | 72 | /** 73 | * @return {Object} The events 74 | */ 75 | events() { 76 | return [{ 77 | 'mousedown [data-id=toggleButton]': this.onDown, 78 | 'mouseleave [data-id=toggleButton]': this.onUp, 79 | 'mouseup [data-id=toggleButton]': this.onUp, 80 | 'blur [data-id=toggleButton]': this.onBlur, 81 | 'focus [data-id=toggleButton]': this.onFocus, 82 | 'click': this.handleClick 83 | }] 84 | } 85 | } 86 | 87 | PaperToggleButton.register('PaperToggleButton'); 88 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperToggleButton/PaperToggleButton.scss: -------------------------------------------------------------------------------- 1 | paper-toggle-button { 2 | display: inline-block; 3 | 4 | &[disabled] { 5 | pointer-events: none; 6 | } 7 | 8 | &:focus { 9 | outline: none; 10 | } 11 | 12 | [data-id=toggleContainer].paper-toggle-button { 13 | position: relative; 14 | width: 36px; 15 | height: 14px; 16 | } 17 | 18 | [data-id=toggleBar].paper-toggle-button { 19 | position: absolute; 20 | height: 100%; 21 | width: 100%; 22 | border-radius: 8px; 23 | pointer-events: none; 24 | opacity: 0.4; 25 | transition: background-color linear .08s; 26 | } 27 | 28 | &[checked] [data-id=toggleBar].paper-toggle-button { 29 | opacity: 0.5; 30 | } 31 | 32 | &[disabled] [data-id=toggleBar].paper-toggle-button { 33 | background-color: #000; 34 | opacity: 0.12; 35 | } 36 | 37 | [data-id=toggleButton].paper-toggle-button { 38 | position: absolute; 39 | top: -3px; 40 | height: 20px; 41 | width: 20px; 42 | border-radius: 50%; 43 | box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.6); 44 | transition: -webkit-transform linear .08s, background-color linear .08s; 45 | transition: transform linear .08s, background-color linear .08s; 46 | will-change: transform; 47 | } 48 | 49 | [data-id=toggleButton].dragging.paper-toggle-button { 50 | -webkit-transition: none; 51 | transition: none; 52 | } 53 | 54 | &[checked] [data-id=toggleButton].paper-toggle-button { 55 | -webkit-transform: translate(16px, 0); 56 | transform: translate(16px, 0); 57 | } 58 | 59 | &[disabled] [data-id=toggleButton].paper-toggle-button { 60 | background-color: #bdbdbd !important; 61 | opacity: 1; 62 | } 63 | 64 | [data-id=ink].paper-toggle-button { 65 | position: absolute; 66 | top: -14px; 67 | left: -14px; 68 | width: 48px; 69 | height: 48px; 70 | opacity: 0.5; 71 | pointer-events: none; 72 | } 73 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperToggleButton/PaperToggleButton.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-toggle-button(class=className 2 | role="checkbox" 3 | aria-pressed=pressed.get 4 | tabindex="0" 5 | aria-disabled=disabled.get 6 | toggles="" 7 | focused=focused.get 8 | pressed=pressed.get 9 | disabled=disabled.get 10 | checked=checked.get) 11 | div(data-id="toggleContainer" class="paper-toggle-button") 12 | div(data-id="toggleBar" class="toggle-bar paper-toggle-button") 13 | div(data-id="toggleButton" class="toggle-button paper-toggle-button") 14 | +PaperRipple(id="ink" className="paper-toggle-button" centered="") -------------------------------------------------------------------------------- /lib/paper-elements/PaperToggleButton/README.md: -------------------------------------------------------------------------------- 1 | # PaperToggleButton 2 | 3 | 4 | ## Screenshot 5 | ![PaperToggleButton ](../../../examples/readme/PaperToggleButton.png) 6 | 7 | ## Usage 8 | 9 | * Basic usage 10 | 11 | ``` 12 | {{> PaperToggleButton}} 13 | ``` 14 | 15 | * Add a custom className 16 | 17 | ``` 18 | {{> PaperToggleButton className="my-custom-class"}} 19 | ``` 20 | 21 | * Use an argument 22 | 23 | ``` 24 | {{> PaperToggleButton argument="some-argument"}} 25 | ``` 26 | 27 | ## Properties 28 | 29 | * Checked 30 | 31 | ```handlebars 32 | {{#PaperToggleButton checked="checked"}}[content]{{/PaperToggleButton}} 33 | ``` 34 | 35 | * Disabled 36 | 37 | ```handlebars 38 | {{#PaperToggleButton disabled=""}}[content]{{/PaperToggleButton}} 39 | ``` 40 | 41 | ## Styling 42 | 43 | Style the radio button with CSS as you would a normal DOM element. 44 | 45 | ```css 46 | // Toggle Button 47 | .my-custom-class .toggle-button.paper-toggle-button { 48 | background-color: darkblue; 49 | } 50 | 51 | // Toggle Bar 52 | .my-custom-class .toggle-bar.paper-toggle-button { 53 | background-color: blue; 54 | } 55 | ``` 56 | 57 | By default, the ripple is the same color as the foreground at 25% opacity. You may customize the color using this selector: 58 | 59 | ```css 60 | .my-custom-class::shadow paper-ripple { 61 | color: darkblue; 62 | } 63 | ``` -------------------------------------------------------------------------------- /lib/paper-elements/PaperToolbar/PaperToolbar.js: -------------------------------------------------------------------------------- 1 | class PaperToolbar extends BlazeComponent { 2 | 3 | /** 4 | * set defaults 5 | */ 6 | onCreated () { 7 | } 8 | 9 | /** 10 | * after render 11 | */ 12 | onRendered () { 13 | 14 | } 15 | } 16 | 17 | PaperToolbar.register('PaperToolbar'); -------------------------------------------------------------------------------- /lib/paper-elements/PaperToolbar/PaperToolbar.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-toolbar(class=className role="toolbar") 2 | +Template.contentBlock 3 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperToolbar/PaperToolbarBottom.tpl.jade: -------------------------------------------------------------------------------- 1 | div(data-id="bottomBar" class="toolbar-tools paper-toolbar" center horizontal layout) 2 | +Template.contentBlock 3 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperToolbar/PaperToolbarMiddle.tpl.jade: -------------------------------------------------------------------------------- 1 | div(data-id="middleBar" class="toolbar-tools paper-toolbar" center horizontal layout) 2 | +Template.contentBlock 3 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperToolbar/PaperToolbarTop.tpl.jade: -------------------------------------------------------------------------------- 1 | div(data-id="topBar" class="toolbar-tools paper-toolbar" center horizontal layout) 2 | +Template.contentBlock 3 | -------------------------------------------------------------------------------- /lib/paper-elements/PaperToolbar/README.md: -------------------------------------------------------------------------------- 1 | # PaperToolbar 2 | 3 | ## Screenshot 4 | ![PaperToolbar ](../../../examples/readme/PaperToolbar.png) 5 | 6 | ## Usage 7 | 8 | Basic usage 9 | 10 | ```handlebars 11 | {{#PaperToolbar}} 12 |
[content]
13 | {{/PaperToolbar}} 14 | ``` 15 | 16 | Add a custom className 17 | 18 | ```handlebars 19 | {{#PaperToolbar className="my-custom-class"}} 20 | {{#PaperToolbarTop}} 21 | [content] 22 | {{/PaperToolbarTop}} 23 | 24 | {{/PaperToolbar}} 25 | ``` 26 | 27 | Change Size 28 | 29 | ```handlebars 30 | {{#PaperToolbar className="[medium-tall || tall]"}} 31 | {{#PaperToolbarTop}} 32 | [content] 33 | {{/PaperToolbarTop}} 34 | {{/PaperToolbar}} 35 | ``` 36 | 37 | Pin to section 38 | 39 | ```handlebars 40 | {{#PaperToolbar className="paper-toolbar-1 medium-tall"}} 41 | 42 | {{#PaperToolbarTop}} 43 | {{>PaperIconButton icon="navigation:menu"}} 44 | Toolbar Top 45 | {{>PaperIconButton icon="navigation:more-vert"}} 46 | {{/PaperToolbarTop}} 47 | 48 | {{#PaperToolbarMiddle}} 49 | {{>PaperIconButton icon="navigation:refresh"}} 50 | Toolbar Middle 51 | {{>PaperIconButton icon="navigation:more-vert"}} 52 | {{/PaperToolbarMiddle}} 53 | 54 | {{#PaperToolbarBottom}} 55 | {{>PaperIconButton icon="navigation:refresh"}} 56 | Toolbar Bottom 57 | {{>PaperIconButton icon="navigation:more-vert"}} 58 | {{/PaperToolbarBottom}} 59 | 60 | {{/PaperToolbar}} 61 | ``` 62 | 63 | The PaperDrawerPanel provides 4 components. 64 | 65 | 1. PaperToolbar 66 | * the wrapper aound the content 67 | 2. PaperToolbarTop 68 | * The top content 69 | 3. PaperToolbarMiddle 70 | * The middle content 71 | 3. PaperToolbarBottom 72 | * The bottom content 73 | 74 | 75 | For the logic to work you need to use this structure to define where your content should appear -------------------------------------------------------------------------------- /lib/paper-elements/PaperTooltip/PaperTooltip.scss: -------------------------------------------------------------------------------- 1 | paper-tooltip { 2 | display: block; 3 | position: absolute; 4 | outline: none; 5 | min-width: 100px; 6 | z-index: 9999; 7 | 8 | [data-id=tooltip].paper-tooltip { 9 | outline: none; 10 | font-size: 10px; 11 | padding: 8px; 12 | border-radius: 2px; 13 | z-index: 1002; 14 | } 15 | } -------------------------------------------------------------------------------- /lib/paper-elements/PaperTooltip/PaperTooltip.tpl.jade: -------------------------------------------------------------------------------- 1 | paper-tooltip(class=className 2 | data-id=id 3 | role="tooltip" 4 | tabindex="-1") 5 | div(data-id="tooltip" class="paper-tooltip" hidden=hidden.get) 6 | +Template.contentBlock -------------------------------------------------------------------------------- /lib/paper-elements/PaperTooltip/README.md: -------------------------------------------------------------------------------- 1 | # PaperTooltip 2 | 3 | 4 | ## Screenshot 5 | ![PaperTooltip ](../../../examples/readme/PaperTooltip.png) 6 | 7 | ## Usage 8 | 9 | Basic usage 10 | 11 | ``` 12 | {{> PaperTooltip}} 13 | ``` 14 | 15 | Add a custom className 16 | 17 | ``` 18 | {{> PaperTooltip className="my-custom-class"}} 19 | ``` 20 | 21 | Use an argument 22 | 23 | ``` 24 | {{> PaperTooltip argument="some-argument"}} 25 | ``` -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blaze-material-ui", 3 | "version": "0.1.14", 4 | "description": "blaze components for material design", 5 | "main": "Gulpfile.js", 6 | "directories": { 7 | "example": "examples" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/Code-Fights/blaze-material-ui.git" 15 | }, 16 | "keywords": [ 17 | "material", 18 | "design", 19 | "polymer", 20 | "meteor", 21 | "components", 22 | "blaze" 23 | ], 24 | "author": "Gregor Adams ", 25 | "license": "MIT", 26 | "bugs": { 27 | "url": "https://github.com/Code-Fights/blaze-material-ui/issues" 28 | }, 29 | "homepage": "https://github.com/Code-Fights/blaze-material-ui#readme", 30 | "devDependencies": { 31 | "gulp": "^3.9.0", 32 | "gulp-rename": "^1.2.2", 33 | "gulp-template": "^3.0.0", 34 | "yargs": "^3.11.0" 35 | }, 36 | "dependencies": { 37 | "marked": "^0.3.3" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendors/autogrowtextarea/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | -------------------------------------------------------------------------------- /vendors/autogrowtextarea/README: -------------------------------------------------------------------------------- 1 | This is the Official github repo of the Autogrow Textarea Plugin. 2 | 3 | You may want to read my full blog post here : 4 | http://www.technoreply.com/autogrow-textarea-plugin-3-0/ 5 | 6 | The plugin is licensed under Beerware. Go crazy! 7 | -------------------------------------------------------------------------------- /vendors/autogrowtextarea/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "autogrow-textarea", 3 | "version": "3.1.0", 4 | "main": "jquery.autogrowtextarea.js", 5 | "dependencies": { 6 | "jquery": ">=1.8" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /vendors/autogrowtextarea/jquery.autogrowtextarea.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * ---------------------------------------------------------------------------- 3 | * "THE BEER-WARE LICENSE" (Revision 42): 4 | * wrote this file. As long as you retain this notice you 5 | * can do whatever you want with this stuff. If we meet some day, and you think 6 | * this stuff is worth it, you can buy me a beer in return. Jevin O. Sewaruth 7 | * ---------------------------------------------------------------------------- 8 | * 9 | * Autogrow Textarea Plugin Version v3.0 10 | * http://www.technoreply.com/autogrow-textarea-plugin-3-0 11 | * 12 | * THIS PLUGIN IS DELIVERD ON A PAY WHAT YOU WHANT BASIS. IF THE PLUGIN WAS USEFUL TO YOU, PLEASE CONSIDER BUYING THE PLUGIN HERE : 13 | * https://sites.fastspring.com/technoreply/instant/autogrowtextareaplugin 14 | * 15 | * Date: October 15, 2012 16 | */ 17 | ;jQuery.fn.autoGrow=function(a){return this.each(function(){var d=jQuery.extend({extraLine:true},a);var e=function(g){jQuery(g).after('
');return jQuery(g).next(".autogrow-textarea-mirror")[0]};var b=function(g){f.innerHTML=String(g.value).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/ /g," ").replace(/\n/g,"
")+(d.extraLine?".
.":"");if(jQuery(g).height()!=jQuery(f).height()){jQuery(g).height(jQuery(f).height())}};var c=function(){b(this)};var f=e(this);f.style.display="none";f.style.wordWrap="break-word";f.style.whiteSpace="normal";f.style.padding=jQuery(this).css("padding");f.style.width=jQuery(this).css("width");f.style.fontFamily=jQuery(this).css("font-family");f.style.fontSize=jQuery(this).css("font-size");f.style.lineHeight=jQuery(this).css("line-height");this.style.overflow="hidden";this.style.minHeight=this.rows+"em";this.onkeyup=c;b(this)})}; -------------------------------------------------------------------------------- /vendors/highlight/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2006, Ivan Sagalaev 2 | All rights reserved. 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of highlight.js nor the names of its contributors 12 | may be used to endorse or promote products derived from this software 13 | without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY 16 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /vendors/highlight/styles/androidstudio.css: -------------------------------------------------------------------------------- 1 | /* 2 | Date: 24 Fev 2015 3 | Author: Pedro Oliveira 4 | */ 5 | 6 | .hljs { 7 | color: #a9b7c6; 8 | background: #282b2e; 9 | display: block; 10 | overflow-x: auto; 11 | padding: 0.5em; 12 | -webkit-text-size-adjust: none; 13 | } 14 | 15 | .hljs-number { 16 | color: #6897BB; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-deletion { 21 | color: #cc7832; 22 | } 23 | 24 | .hljs-comment { 25 | color: #808080; 26 | } 27 | 28 | .hljs-annotation { 29 | color: #bbb529; 30 | } 31 | 32 | .hljs-string, 33 | .hljs-addition { 34 | color: #6A8759; 35 | } 36 | 37 | .hljs-function .hljs-title, 38 | .hljs-change { 39 | color: #ffc66d; 40 | } 41 | 42 | .hljs-tag .hljs-title, 43 | .hljs-doctype { 44 | color: #e8bf6a; 45 | } 46 | 47 | .hljs-tag .hljs-attribute { 48 | color: #bababa; 49 | } 50 | 51 | .hljs-tag .hljs-value { 52 | color: #a5c261; 53 | } 54 | -------------------------------------------------------------------------------- /vendors/highlight/styles/ascetic.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Original style from softwaremaniacs.org (c) Ivan Sagalaev 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: white; 12 | color: black; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | .hljs-string, 17 | .hljs-tag .hljs-value, 18 | .hljs-filter .hljs-argument, 19 | .hljs-addition, 20 | .hljs-change, 21 | .hljs-name, 22 | .apache .hljs-tag, 23 | .apache .hljs-cbracket, 24 | .nginx .hljs-built_in, 25 | .tex .hljs-formula { 26 | color: #888; 27 | } 28 | 29 | .hljs-comment, 30 | .hljs-shebang, 31 | .hljs-doctype, 32 | .hljs-pi, 33 | .hljs-deletion, 34 | .apache .hljs-sqbracket { 35 | color: #ccc; 36 | } 37 | 38 | .hljs-keyword, 39 | .hljs-tag .hljs-title, 40 | .ini .hljs-title, 41 | .lisp .hljs-title, 42 | .http .hljs-title, 43 | .nginx .hljs-title, 44 | .css .hljs-tag, 45 | .hljs-winutils, 46 | .hljs-flow, 47 | .apache .hljs-tag, 48 | .tex .hljs-command, 49 | .hljs-request, 50 | .hljs-status { 51 | font-weight: bold; 52 | } 53 | -------------------------------------------------------------------------------- /vendors/highlight/styles/atelier-dune.dark.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Dark - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Dune Comment */ 6 | .hljs-comment { 7 | color: #999580; 8 | } 9 | 10 | /* Atelier-Dune Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #d73737; 25 | } 26 | 27 | /* Atelier-Dune Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #b65611; 35 | } 36 | 37 | /* Atelier-Dune Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #ae9513; 41 | } 42 | 43 | /* Atelier-Dune Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #60ac39; 51 | } 52 | 53 | /* Atelier-Dune Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #1fad83; 57 | } 58 | 59 | /* Atelier-Dune Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #6684e1; 69 | } 70 | 71 | /* Atelier-Dune Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #b854d4; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #20201d; 81 | color: #a6a28c; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /vendors/highlight/styles/atelier-dune.light.css: -------------------------------------------------------------------------------- 1 | /* Base16 Atelier Dune Light - Theme */ 2 | /* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 3 | /* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ 4 | 5 | /* Atelier-Dune Comment */ 6 | .hljs-comment { 7 | color: #7d7a68; 8 | } 9 | 10 | /* Atelier-Dune Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .hljs-name, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #d73737; 25 | } 26 | 27 | /* Atelier-Dune Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #b65611; 35 | } 36 | 37 | /* Atelier-Dune Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #ae9513; 41 | } 42 | 43 | /* Atelier-Dune Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .ruby .hljs-symbol, 49 | .xml .hljs-cdata { 50 | color: #60ac39; 51 | } 52 | 53 | /* Atelier-Dune Aqua */ 54 | .hljs-title, 55 | .css .hljs-hexcolor { 56 | color: #1fad83; 57 | } 58 | 59 | /* Atelier-Dune Blue */ 60 | .hljs-function, 61 | .python .hljs-decorator, 62 | .python .hljs-title, 63 | .ruby .hljs-function .hljs-title, 64 | .ruby .hljs-title .hljs-keyword, 65 | .perl .hljs-sub, 66 | .javascript .hljs-title, 67 | .coffeescript .hljs-title { 68 | color: #6684e1; 69 | } 70 | 71 | /* Atelier-Dune Purple */ 72 | .hljs-keyword, 73 | .javascript .hljs-function { 74 | color: #b854d4; 75 | } 76 | 77 | .hljs { 78 | display: block; 79 | overflow-x: auto; 80 | background: #fefbec; 81 | color: #6e6b5e; 82 | padding: 0.5em; 83 | -webkit-text-size-adjust: none; 84 | } 85 | 86 | .coffeescript .javascript, 87 | .javascript .xml, 88 | .tex .hljs-formula, 89 | .xml .javascript, 90 | .xml .vbscript, 91 | .xml .css, 92 | .xml .hljs-cdata { 93 | opacity: 0.5; 94 | } 95 | -------------------------------------------------------------------------------- /vendors/highlight/styles/brown_papersq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeSignal/blaze-material-ui/5c8e9d59919b14f7d85b3c7934b0d7e311707b48/vendors/highlight/styles/brown_papersq.png -------------------------------------------------------------------------------- /vendors/highlight/styles/codepen-embed.css: -------------------------------------------------------------------------------- 1 | /* 2 | codepen.io Embed Theme 3 | Author: Justin Perry 4 | Original theme - https://github.com/chriskempson/tomorrow-theme 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #222; 12 | color: #fff; 13 | font-family: Menlo, Monaco, 'Andale Mono', 'Lucida Console', 'Courier New', monospace; 14 | -webkit-text-size-adjust: none; 15 | } 16 | 17 | .hljs-comment, 18 | .hljs-title { 19 | color: #777; 20 | } 21 | 22 | .hljs-variable, 23 | .hljs-attribute, 24 | .hljs-tag, 25 | .hljs-regexp, 26 | .hljs-name, 27 | .ruby .constant, 28 | .xml .tag .title, 29 | .xml .pi, 30 | .xml .doctype, 31 | .html .doctype { 32 | color: #ab875d; 33 | } 34 | 35 | .css .value { 36 | color: #cd6a51; 37 | } 38 | 39 | .css .value .function, 40 | .css .value .string { 41 | color: #a67f59; 42 | } 43 | 44 | .css .value .number { 45 | color: #9b869c; 46 | } 47 | 48 | .css .id, 49 | .css .class, 50 | .css-pseudo, 51 | .css .selector, 52 | .css .tag { 53 | color: #dfc48c; 54 | } 55 | 56 | .hljs-number, 57 | .hljs-preprocessor, 58 | .hljs-built_in, 59 | .hljs-literal, 60 | .hljs-params, 61 | .hljs-constant { 62 | color: #ab875d; 63 | } 64 | 65 | .ruby .class .title, 66 | .css .rules .attribute { 67 | color: #9b869b; 68 | } 69 | 70 | .hljs-string, 71 | .hljs-value, 72 | .hljs-inheritance, 73 | .hljs-header, 74 | .ruby .symbol, 75 | .xml .cdata { 76 | color: #8f9c6c; 77 | } 78 | 79 | .css .hexcolor { 80 | color: #cd6a51; 81 | } 82 | 83 | .function, 84 | .python .decorator, 85 | .python .title, 86 | .ruby .function .title, 87 | .ruby .title .keyword, 88 | .perl .sub, 89 | .javascript .title, 90 | .coffeescript .title { 91 | color: #fff; 92 | } 93 | 94 | .hljs-keyword, 95 | .javascript .function { 96 | color: #8f9c6c; 97 | } 98 | -------------------------------------------------------------------------------- /vendors/highlight/styles/hopscotch.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Hopscotch 3 | * by Jan T. Sott 4 | * https://github.com/idleberg/Hopscotch 5 | * 6 | * This work is licensed under the Creative Commons CC0 1.0 Universal License 7 | */ 8 | 9 | /* Comment */ 10 | .hljs-comment, 11 | .hljs-title { 12 | color: #989498; 13 | } 14 | 15 | /* Red */ 16 | .hljs-variable, 17 | .hljs-attribute, 18 | .hljs-tag, 19 | .hljs-regexp, 20 | .ruby .hljs-constant, 21 | .xml .hljs-tag .hljs-title, 22 | .xml .hljs-pi, 23 | .xml .hljs-doctype, 24 | .html .hljs-doctype, 25 | .css .hljs-id, 26 | .css .hljs-class, 27 | .css .hljs-pseudo { 28 | color: #dd464c; 29 | } 30 | 31 | /* Orange */ 32 | .hljs-number, 33 | .hljs-preprocessor, 34 | .hljs-built_in, 35 | .hljs-literal, 36 | .hljs-params, 37 | .hljs-constant { 38 | color: #fd8b19; 39 | } 40 | 41 | /* Yellow */ 42 | .ruby .hljs-class .hljs-title, 43 | .css .hljs-rules .hljs-attribute { 44 | color: #fdcc59; 45 | } 46 | 47 | /* Green */ 48 | .hljs-string, 49 | .hljs-value, 50 | .hljs-inheritance, 51 | .hljs-header, 52 | .ruby .hljs-symbol, 53 | .xml .hljs-cdata { 54 | color: #8fc13e; 55 | } 56 | 57 | /* Aqua */ 58 | .css .hljs-hexcolor { 59 | color: #149b93; 60 | } 61 | 62 | /* Blue */ 63 | .hljs-function, 64 | .python .hljs-decorator, 65 | .python .hljs-title, 66 | .ruby .hljs-function .hljs-title, 67 | .ruby .hljs-title .hljs-keyword, 68 | .perl .hljs-sub, 69 | .javascript .hljs-title, 70 | .coffeescript .hljs-title { 71 | color: #1290bf; 72 | } 73 | 74 | /* Purple */ 75 | .hljs-keyword, 76 | .javascript .hljs-function { 77 | color: #c85e7c; 78 | } 79 | 80 | .hljs { 81 | display: block; 82 | background: #322931; 83 | color: #b9b5b8; 84 | padding: 0.5em; 85 | } 86 | 87 | .coffeescript .javascript, 88 | .javascript .xml, 89 | .tex .hljs-formula, 90 | .xml .javascript, 91 | .xml .vbscript, 92 | .xml .css, 93 | .xml .hljs-cdata { 94 | opacity: 0.5; 95 | } 96 | -------------------------------------------------------------------------------- /vendors/highlight/styles/ir_black.css: -------------------------------------------------------------------------------- 1 | /* 2 | IR_Black style (c) Vasily Mikhailitchenko 3 | */ 4 | 5 | .hljs { 6 | display: block; 7 | overflow-x: auto; 8 | padding: 0.5em; 9 | background: #000; 10 | color: #f8f8f8; 11 | -webkit-text-size-adjust: none; 12 | } 13 | 14 | .hljs-shebang, 15 | .hljs-comment { 16 | color: #7c7c7c; 17 | } 18 | 19 | .hljs-keyword, 20 | .hljs-tag, 21 | .tex .hljs-command, 22 | .hljs-request, 23 | .hljs-status, 24 | .clojure .hljs-attribute { 25 | color: #96cbfe; 26 | } 27 | 28 | .hljs-sub .hljs-keyword, 29 | .method, 30 | .hljs-list .hljs-title, 31 | .nginx .hljs-title { 32 | color: #ffffb6; 33 | } 34 | 35 | .hljs-string, 36 | .hljs-tag .hljs-value, 37 | .hljs-cdata, 38 | .hljs-filter .hljs-argument, 39 | .hljs-attr_selector, 40 | .apache .hljs-cbracket, 41 | .hljs-date, 42 | .coffeescript .hljs-attribute { 43 | color: #a8ff60; 44 | } 45 | 46 | .hljs-subst { 47 | color: #daefa3; 48 | } 49 | 50 | .hljs-regexp { 51 | color: #e9c062; 52 | } 53 | 54 | .hljs-title, 55 | .hljs-sub .hljs-identifier, 56 | .hljs-pi, 57 | .hljs-decorator, 58 | .tex .hljs-special, 59 | .hljs-type, 60 | .hljs-constant, 61 | .smalltalk .hljs-class, 62 | .hljs-doctag, 63 | .nginx .hljs-built_in { 64 | color: #ffffb6; 65 | } 66 | 67 | .hljs-symbol, 68 | .ruby .hljs-symbol .hljs-string, 69 | .hljs-number, 70 | .hljs-variable, 71 | .vbscript, 72 | .hljs-literal, 73 | .hljs-name { 74 | color: #c6c5fe; 75 | } 76 | 77 | .css .hljs-tag { 78 | color: #96cbfe; 79 | } 80 | 81 | .css .hljs-rule .hljs-property, 82 | .css .hljs-id { 83 | color: #ffffb6; 84 | } 85 | 86 | .css .hljs-class { 87 | color: #fff; 88 | } 89 | 90 | .hljs-hexcolor { 91 | color: #c6c5fe; 92 | } 93 | 94 | .hljs-number { 95 | color:#ff73fd; 96 | } 97 | 98 | .coffeescript .javascript, 99 | .javascript .xml, 100 | .tex .hljs-formula, 101 | .xml .javascript, 102 | .xml .vbscript, 103 | .xml .css, 104 | .xml .hljs-cdata { 105 | opacity: 0.7; 106 | } 107 | -------------------------------------------------------------------------------- /vendors/highlight/styles/kimbie.dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Kimbie (dark) 3 | Author: Jan T. Sott 4 | License: Creative Commons Attribution-ShareAlike 4.0 Unported License 5 | URL: https://github.com/idleberg/Kimbie-highlight.js 6 | */ 7 | 8 | /* Kimbie Comment */ 9 | .hljs-comment, 10 | .hljs-title { 11 | color: #d6baad; 12 | } 13 | 14 | /* Kimbie Red */ 15 | .hljs-variable, 16 | .hljs-attribute, 17 | .hljs-tag, 18 | .hljs-regexp, 19 | .hljs-name, 20 | .ruby .hljs-constant, 21 | .xml .hljs-tag .hljs-title, 22 | .xml .hljs-pi, 23 | .xml .hljs-doctype, 24 | .html .hljs-doctype, 25 | .css .hljs-id, 26 | .css .hljs-class, 27 | .css .hljs-pseudo { 28 | color: #dc3958; 29 | } 30 | 31 | /* Kimbie Orange */ 32 | .hljs-number, 33 | .hljs-preprocessor, 34 | .hljs-built_in, 35 | .hljs-literal, 36 | .hljs-params, 37 | .hljs-constant { 38 | color: #f79a32; 39 | } 40 | 41 | /* Kimbie Yellow */ 42 | .ruby .hljs-class .hljs-title, 43 | .css .hljs-rule .hljs-attribute { 44 | color: #f06431; 45 | } 46 | 47 | /* Kimbie Green */ 48 | .hljs-string, 49 | .hljs-value, 50 | .hljs-inheritance, 51 | .hljs-header, 52 | .ruby .hljs-symbol, 53 | .xml .hljs-cdata { 54 | color: #889b4a; 55 | } 56 | 57 | /* Kimbie Aqua */ 58 | .css .hljs-hexcolor { 59 | color: #088649; 60 | } 61 | 62 | /* Kimbie Blue */ 63 | .hljs-function, 64 | .python .hljs-decorator, 65 | .python .hljs-title, 66 | .ruby .hljs-function .hljs-title, 67 | .ruby .hljs-title .hljs-keyword, 68 | .perl .hljs-sub, 69 | .javascript .hljs-title, 70 | .coffeescript .hljs-title { 71 | color: #8ab1b0; 72 | } 73 | 74 | /* Kimbie Purple */ 75 | .hljs-keyword, 76 | .javascript .hljs-function { 77 | color: #98676a; 78 | } 79 | 80 | .hljs { 81 | display: block; 82 | overflow-x: auto; 83 | background: #221a0f; 84 | color: #d3af86; 85 | padding: 0.5em; 86 | -webkit-text-size-adjust: none; 87 | } 88 | 89 | .coffeescript .javascript, 90 | .javascript .xml, 91 | .tex .hljs-formula, 92 | .xml .javascript, 93 | .xml .vbscript, 94 | .xml .css, 95 | .xml .hljs-cdata { 96 | opacity: 0.5; 97 | } 98 | -------------------------------------------------------------------------------- /vendors/highlight/styles/kimbie.light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Name: Kimbie (light) 3 | Author: Jan T. Sott 4 | License: Creative Commons Attribution-ShareAlike 4.0 Unported License 5 | URL: https://github.com/idleberg/Kimbie-highlight.js 6 | */ 7 | 8 | /* Kimbie Comment */ 9 | .hljs-comment, 10 | .hljs-title { 11 | color: #a57a4c; 12 | } 13 | 14 | /* Kimbie Red */ 15 | .hljs-variable, 16 | .hljs-attribute, 17 | .hljs-tag, 18 | .hljs-regexp, 19 | .hljs-name, 20 | .ruby .hljs-constant, 21 | .xml .hljs-tag .hljs-title, 22 | .xml .hljs-pi, 23 | .xml .hljs-doctype, 24 | .html .hljs-doctype, 25 | .css .hljs-id, 26 | .css .hljs-class, 27 | .css .hljs-pseudo { 28 | color: #dc3958; 29 | } 30 | 31 | /* Kimbie Orange */ 32 | .hljs-number, 33 | .hljs-preprocessor, 34 | .hljs-built_in, 35 | .hljs-literal, 36 | .hljs-params, 37 | .hljs-constant { 38 | color: #f79a32; 39 | } 40 | 41 | /* Kimbie Yellow */ 42 | .ruby .hljs-class .hljs-title, 43 | .css .hljs-rule .hljs-attribute { 44 | color: #f06431; 45 | } 46 | 47 | /* Kimbie Green */ 48 | .hljs-string, 49 | .hljs-value, 50 | .hljs-inheritance, 51 | .hljs-header, 52 | .ruby .hljs-symbol, 53 | .xml .hljs-cdata { 54 | color: #889b4a; 55 | } 56 | 57 | /* Kimbie Aqua */ 58 | .css .hljs-hexcolor { 59 | color: #088649; 60 | } 61 | 62 | /* Kimbie Blue */ 63 | .hljs-function, 64 | .python .hljs-decorator, 65 | .python .hljs-title, 66 | .ruby .hljs-function .hljs-title, 67 | .ruby .hljs-title .hljs-keyword, 68 | .perl .hljs-sub, 69 | .javascript .hljs-title, 70 | .coffeescript .hljs-title { 71 | color: #8ab1b0; 72 | } 73 | 74 | /* Kimbie Purple */ 75 | .hljs-keyword, 76 | .javascript .hljs-function { 77 | color: #98676a; 78 | } 79 | 80 | .hljs { 81 | display: block; 82 | overflow-x: auto; 83 | background: #fbebd4; 84 | color: #84613d; 85 | padding: 0.5em; 86 | -webkit-text-size-adjust: none; 87 | } 88 | 89 | .coffeescript .javascript, 90 | .javascript .xml, 91 | .tex .hljs-formula, 92 | .xml .javascript, 93 | .xml .vbscript, 94 | .xml .css, 95 | .xml .hljs-cdata { 96 | opacity: 0.5; 97 | } 98 | -------------------------------------------------------------------------------- /vendors/highlight/styles/mono-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | Five-color theme from a single blue hue. 3 | */ 4 | .hljs { 5 | display: block; 6 | overflow-x: auto; 7 | padding: 0.5em; 8 | background: #eaeef3; 9 | -webkit-text-size-adjust: none; 10 | } 11 | 12 | .hljs, 13 | .hljs-list .hljs-built_in { 14 | color: #00193a; 15 | } 16 | 17 | .hljs-keyword, 18 | .hljs-title, 19 | .hljs-important, 20 | .hljs-request, 21 | .hljs-header, 22 | .hljs-doctag { 23 | font-weight: bold; 24 | } 25 | 26 | .hljs-comment, 27 | .hljs-chunk { 28 | color: #738191; 29 | } 30 | 31 | .hljs-string, 32 | .hljs-title, 33 | .hljs-parent, 34 | .hljs-built_in, 35 | .hljs-literal, 36 | .hljs-filename, 37 | .hljs-value, 38 | .hljs-addition, 39 | .hljs-tag, 40 | .hljs-argument, 41 | .hljs-link_label, 42 | .hljs-blockquote, 43 | .hljs-header, 44 | .hljs-name { 45 | color: #0048ab; 46 | } 47 | 48 | .hljs-decorator, 49 | .hljs-prompt, 50 | .hljs-subst, 51 | .hljs-symbol, 52 | .hljs-doctype, 53 | .hljs-regexp, 54 | .hljs-preprocessor, 55 | .hljs-pragma, 56 | .hljs-pi, 57 | .hljs-attribute, 58 | .hljs-attr_selector, 59 | .hljs-xmlDocTag, 60 | .hljs-deletion, 61 | .hljs-shebang, 62 | .hljs-string .hljs-variable, 63 | .hljs-link_url, 64 | .hljs-bullet, 65 | .hljs-sqbracket, 66 | .hljs-phony { 67 | color: #4c81c9; 68 | } 69 | -------------------------------------------------------------------------------- /vendors/highlight/styles/paraiso.dark.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (dark) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-title { 10 | color: #8d8687; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-attribute, 16 | .hljs-tag, 17 | .hljs-regexp, 18 | .hljs-name, 19 | .ruby .hljs-constant, 20 | .xml .hljs-tag .hljs-title, 21 | .xml .hljs-pi, 22 | .xml .hljs-doctype, 23 | .html .hljs-doctype, 24 | .css .hljs-id, 25 | .css .hljs-class, 26 | .css .hljs-pseudo { 27 | color: #ef6155; 28 | } 29 | 30 | /* Paraíso Orange */ 31 | .hljs-number, 32 | .hljs-preprocessor, 33 | .hljs-built_in, 34 | .hljs-literal, 35 | .hljs-params, 36 | .hljs-constant { 37 | color: #f99b15; 38 | } 39 | 40 | /* Paraíso Yellow */ 41 | .ruby .hljs-class .hljs-title, 42 | .css .hljs-rule .hljs-attribute { 43 | color: #fec418; 44 | } 45 | 46 | /* Paraíso Green */ 47 | .hljs-string, 48 | .hljs-value, 49 | .hljs-inheritance, 50 | .hljs-header, 51 | .ruby .hljs-symbol, 52 | .xml .hljs-cdata { 53 | color: #48b685; 54 | } 55 | 56 | /* Paraíso Aqua */ 57 | .css .hljs-hexcolor { 58 | color: #5bc4bf; 59 | } 60 | 61 | /* Paraíso Blue */ 62 | .hljs-function, 63 | .python .hljs-decorator, 64 | .python .hljs-title, 65 | .ruby .hljs-function .hljs-title, 66 | .ruby .hljs-title .hljs-keyword, 67 | .perl .hljs-sub, 68 | .javascript .hljs-title, 69 | .coffeescript .hljs-title { 70 | color: #06b6ef; 71 | } 72 | 73 | /* Paraíso Purple */ 74 | .hljs-keyword, 75 | .javascript .hljs-function { 76 | color: #815ba4; 77 | } 78 | 79 | .hljs { 80 | display: block; 81 | overflow-x: auto; 82 | background: #2f1e2e; 83 | color: #a39e9b; 84 | padding: 0.5em; 85 | -webkit-text-size-adjust: none; 86 | } 87 | 88 | .coffeescript .javascript, 89 | .javascript .xml, 90 | .tex .hljs-formula, 91 | .xml .javascript, 92 | .xml .vbscript, 93 | .xml .css, 94 | .xml .hljs-cdata { 95 | opacity: 0.5; 96 | } 97 | -------------------------------------------------------------------------------- /vendors/highlight/styles/paraiso.light.css: -------------------------------------------------------------------------------- 1 | /* 2 | Paraíso (light) 3 | Created by Jan T. Sott (http://github.com/idleberg) 4 | Inspired by the art of Rubens LP (http://www.rubenslp.com.br) 5 | */ 6 | 7 | /* Paraíso Comment */ 8 | .hljs-comment, 9 | .hljs-title { 10 | color: #776e71; 11 | } 12 | 13 | /* Paraíso Red */ 14 | .hljs-variable, 15 | .hljs-attribute, 16 | .hljs-tag, 17 | .hljs-regexp, 18 | .hljs-name, 19 | .ruby .hljs-constant, 20 | .xml .hljs-tag .hljs-title, 21 | .xml .hljs-pi, 22 | .xml .hljs-doctype, 23 | .html .hljs-doctype, 24 | .css .hljs-id, 25 | .css .hljs-class, 26 | .css .hljs-pseudo { 27 | color: #ef6155; 28 | } 29 | 30 | /* Paraíso Orange */ 31 | .hljs-number, 32 | .hljs-preprocessor, 33 | .hljs-built_in, 34 | .hljs-literal, 35 | .hljs-params, 36 | .hljs-constant { 37 | color: #f99b15; 38 | } 39 | 40 | /* Paraíso Yellow */ 41 | .ruby .hljs-class .hljs-title, 42 | .css .hljs-rule .hljs-attribute { 43 | color: #fec418; 44 | } 45 | 46 | /* Paraíso Green */ 47 | .hljs-string, 48 | .hljs-value, 49 | .hljs-inheritance, 50 | .hljs-header, 51 | .ruby .hljs-symbol, 52 | .xml .hljs-cdata { 53 | color: #48b685; 54 | } 55 | 56 | /* Paraíso Aqua */ 57 | .css .hljs-hexcolor { 58 | color: #5bc4bf; 59 | } 60 | 61 | /* Paraíso Blue */ 62 | .hljs-function, 63 | .python .hljs-decorator, 64 | .python .hljs-title, 65 | .ruby .hljs-function .hljs-title, 66 | .ruby .hljs-title .hljs-keyword, 67 | .perl .hljs-sub, 68 | .javascript .hljs-title, 69 | .coffeescript .hljs-title { 70 | color: #06b6ef; 71 | } 72 | 73 | /* Paraíso Purple */ 74 | .hljs-keyword, 75 | .javascript .hljs-function { 76 | color: #815ba4; 77 | } 78 | 79 | .hljs { 80 | display: block; 81 | overflow-x: auto; 82 | background: #e7e9db; 83 | color: #4f424c; 84 | padding: 0.5em; 85 | -webkit-text-size-adjust: none; 86 | } 87 | 88 | .coffeescript .javascript, 89 | .javascript .xml, 90 | .tex .hljs-formula, 91 | .xml .javascript, 92 | .xml .vbscript, 93 | .xml .css, 94 | .xml .hljs-cdata { 95 | opacity: 0.5; 96 | } 97 | -------------------------------------------------------------------------------- /vendors/highlight/styles/pojoaque.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeSignal/blaze-material-ui/5c8e9d59919b14f7d85b3c7934b0d7e311707b48/vendors/highlight/styles/pojoaque.jpg -------------------------------------------------------------------------------- /vendors/highlight/styles/rainbow.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Style with support for rainbow parens 4 | 5 | */ 6 | 7 | .hljs { 8 | display: block; 9 | overflow-x: auto; 10 | padding: 0.5em; 11 | background: #474949; 12 | color: #d1d9e1; 13 | -webkit-text-size-adjust: none; 14 | } 15 | 16 | 17 | .hljs-body, 18 | .hljs-collection { 19 | color: #d1d9e1; 20 | } 21 | 22 | .hljs-comment, 23 | .diff .hljs-header, 24 | .hljs-doctype, 25 | .lisp .hljs-string { 26 | color: #969896; 27 | font-style: italic; 28 | } 29 | 30 | .hljs-keyword, 31 | .clojure .hljs-attribute, 32 | .hljs-winutils, 33 | .javascript .hljs-title, 34 | .hljs-addition, 35 | .css .hljs-tag { 36 | color: #cc99cc; 37 | } 38 | 39 | .hljs-number { color: #f99157; } 40 | 41 | .hljs-command, 42 | .hljs-string, 43 | .hljs-tag .hljs-value, 44 | .hljs-doctag, 45 | .tex .hljs-formula, 46 | .hljs-regexp, 47 | .hljs-hexcolor { 48 | color: #8abeb7; 49 | } 50 | 51 | .hljs-title, 52 | .hljs-localvars, 53 | .hljs-function .hljs-title, 54 | .hljs-chunk, 55 | .hljs-decorator, 56 | .hljs-built_in, 57 | .hljs-identifier { 58 | color: #b5bd68; 59 | } 60 | 61 | .hljs-class .hljs-keyword { 62 | color: #f2777a; 63 | } 64 | 65 | .hljs-variable, 66 | .smalltalk .hljs-number, 67 | .hljs-constant, 68 | .hljs-class .hljs-title, 69 | .hljs-parent, 70 | .haskell .hljs-label, 71 | .hljs-id, 72 | .hljs-name { 73 | color: #ffcc66; 74 | } 75 | 76 | .hljs-tag .hljs-title, 77 | .hljs-rule .hljs-property, 78 | .django .hljs-tag .hljs-keyword { 79 | font-weight: bold; 80 | } 81 | 82 | .hljs-attribute { 83 | color: #81a2be; 84 | } 85 | 86 | .hljs-preprocessor, 87 | .hljs-pragma, 88 | .hljs-pi, 89 | .hljs-shebang, 90 | .hljs-symbol, 91 | .hljs-symbol .hljs-string, 92 | .diff .hljs-change, 93 | .hljs-special, 94 | .hljs-attr_selector, 95 | .hljs-important, 96 | .hljs-subst, 97 | .hljs-cdata { 98 | color: #f99157; 99 | } 100 | 101 | .hljs-deletion { 102 | color: #dc322f; 103 | } 104 | 105 | .tex .hljs-formula { 106 | background: #eee8d5; 107 | } 108 | -------------------------------------------------------------------------------- /vendors/highlight/styles/school_book.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeSignal/blaze-material-ui/5c8e9d59919b14f7d85b3c7934b0d7e311707b48/vendors/highlight/styles/school_book.png -------------------------------------------------------------------------------- /vendors/highlight/styles/tomorrow-night-bright.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Bright Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment { 7 | color: #969896; 8 | } 9 | 10 | /* Tomorrow Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .ruby .hljs-constant, 16 | .xml .hljs-tag .hljs-title, 17 | .xml .hljs-pi, 18 | .xml .hljs-doctype, 19 | .html .hljs-doctype, 20 | .css .hljs-id, 21 | .css .hljs-class, 22 | .css .hljs-pseudo { 23 | color: #d54e53; 24 | } 25 | 26 | /* Tomorrow Orange */ 27 | .hljs-number, 28 | .hljs-preprocessor, 29 | .hljs-pragma, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #e78c45; 35 | } 36 | 37 | /* Tomorrow Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #e7c547; 41 | } 42 | 43 | /* Tomorrow Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .hljs-name, 49 | .ruby .hljs-symbol, 50 | .xml .hljs-cdata { 51 | color: #b9ca4a; 52 | } 53 | 54 | /* Tomorrow Aqua */ 55 | .hljs-title, 56 | .css .hljs-hexcolor { 57 | color: #70c0b1; 58 | } 59 | 60 | /* Tomorrow Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #7aa6da; 70 | } 71 | 72 | /* Tomorrow Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #c397d8; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | overflow-x: auto; 81 | background: black; 82 | color: #eaeaea; 83 | padding: 0.5em; 84 | -webkit-text-size-adjust: none; 85 | } 86 | 87 | .coffeescript .javascript, 88 | .javascript .xml, 89 | .tex .hljs-formula, 90 | .xml .javascript, 91 | .xml .vbscript, 92 | .xml .css, 93 | .xml .hljs-cdata { 94 | opacity: 0.5; 95 | } 96 | -------------------------------------------------------------------------------- /vendors/highlight/styles/tomorrow-night-eighties.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Eighties Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 4 | 5 | /* Tomorrow Comment */ 6 | .hljs-comment { 7 | color: #999999; 8 | } 9 | 10 | /* Tomorrow Red */ 11 | .hljs-variable, 12 | .hljs-attribute, 13 | .hljs-tag, 14 | .hljs-regexp, 15 | .ruby .hljs-constant, 16 | .xml .hljs-tag .hljs-title, 17 | .xml .hljs-pi, 18 | .xml .hljs-doctype, 19 | .html .hljs-doctype, 20 | .css .hljs-id, 21 | .css .hljs-class, 22 | .css .hljs-pseudo { 23 | color: #f2777a; 24 | } 25 | 26 | /* Tomorrow Orange */ 27 | .hljs-number, 28 | .hljs-preprocessor, 29 | .hljs-pragma, 30 | .hljs-built_in, 31 | .hljs-literal, 32 | .hljs-params, 33 | .hljs-constant { 34 | color: #f99157; 35 | } 36 | 37 | /* Tomorrow Yellow */ 38 | .ruby .hljs-class .hljs-title, 39 | .css .hljs-rule .hljs-attribute { 40 | color: #ffcc66; 41 | } 42 | 43 | /* Tomorrow Green */ 44 | .hljs-string, 45 | .hljs-value, 46 | .hljs-inheritance, 47 | .hljs-header, 48 | .hljs-name, 49 | .ruby .hljs-symbol, 50 | .xml .hljs-cdata { 51 | color: #99cc99; 52 | } 53 | 54 | /* Tomorrow Aqua */ 55 | .hljs-title, 56 | .css .hljs-hexcolor { 57 | color: #66cccc; 58 | } 59 | 60 | /* Tomorrow Blue */ 61 | .hljs-function, 62 | .python .hljs-decorator, 63 | .python .hljs-title, 64 | .ruby .hljs-function .hljs-title, 65 | .ruby .hljs-title .hljs-keyword, 66 | .perl .hljs-sub, 67 | .javascript .hljs-title, 68 | .coffeescript .hljs-title { 69 | color: #6699cc; 70 | } 71 | 72 | /* Tomorrow Purple */ 73 | .hljs-keyword, 74 | .javascript .hljs-function { 75 | color: #cc99cc; 76 | } 77 | 78 | .hljs { 79 | display: block; 80 | overflow-x: auto; 81 | background: #2d2d2d; 82 | color: #cccccc; 83 | padding: 0.5em; 84 | -webkit-text-size-adjust: none; 85 | } 86 | 87 | .coffeescript .javascript, 88 | .javascript .xml, 89 | .tex .hljs-formula, 90 | .xml .javascript, 91 | .xml .vbscript, 92 | .xml .css, 93 | .xml .hljs-cdata { 94 | opacity: 0.5; 95 | } 96 | -------------------------------------------------------------------------------- /vendors/highlight/styles/tomorrow-night.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Night Theme */ 2 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 3 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 4 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 5 | 6 | /* Tomorrow Comment */ 7 | .hljs-comment { 8 | color: #969896; 9 | } 10 | 11 | /* Tomorrow Red */ 12 | .hljs-variable, 13 | .hljs-attribute, 14 | .hljs-tag, 15 | .hljs-regexp, 16 | .ruby .hljs-constant, 17 | .xml .hljs-tag .hljs-title, 18 | .xml .hljs-pi, 19 | .xml .hljs-doctype, 20 | .html .hljs-doctype, 21 | .css .hljs-id, 22 | .css .hljs-class, 23 | .css .hljs-pseudo { 24 | color: #cc6666; 25 | } 26 | 27 | /* Tomorrow Orange */ 28 | .hljs-number, 29 | .hljs-preprocessor, 30 | .hljs-pragma, 31 | .hljs-built_in, 32 | .hljs-literal, 33 | .hljs-params, 34 | .hljs-constant { 35 | color: #de935f; 36 | } 37 | 38 | /* Tomorrow Yellow */ 39 | .ruby .hljs-class .hljs-title, 40 | .css .hljs-rule .hljs-attribute { 41 | color: #f0c674; 42 | } 43 | 44 | /* Tomorrow Green */ 45 | .hljs-string, 46 | .hljs-value, 47 | .hljs-inheritance, 48 | .hljs-header, 49 | .hljs-name, 50 | .ruby .hljs-symbol, 51 | .xml .hljs-cdata { 52 | color: #b5bd68; 53 | } 54 | 55 | /* Tomorrow Aqua */ 56 | .hljs-title, 57 | .css .hljs-hexcolor { 58 | color: #8abeb7; 59 | } 60 | 61 | /* Tomorrow Blue */ 62 | .hljs-function, 63 | .python .hljs-decorator, 64 | .python .hljs-title, 65 | .ruby .hljs-function .hljs-title, 66 | .ruby .hljs-title .hljs-keyword, 67 | .perl .hljs-sub, 68 | .javascript .hljs-title, 69 | .coffeescript .hljs-title { 70 | color: #81a2be; 71 | } 72 | 73 | /* Tomorrow Purple */ 74 | .hljs-keyword, 75 | .javascript .hljs-function { 76 | color: #b294bb; 77 | } 78 | 79 | .hljs { 80 | display: block; 81 | overflow-x: auto; 82 | background: #1d1f21; 83 | color: #c5c8c6; 84 | padding: 0.5em; 85 | -webkit-text-size-adjust: none; 86 | } 87 | 88 | .coffeescript .javascript, 89 | .javascript .xml, 90 | .tex .hljs-formula, 91 | .xml .javascript, 92 | .xml .vbscript, 93 | .xml .css, 94 | .xml .hljs-cdata { 95 | opacity: 0.5; 96 | } 97 | -------------------------------------------------------------------------------- /vendors/highlight/styles/tomorrow.css: -------------------------------------------------------------------------------- 1 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 2 | 3 | /* Tomorrow Comment */ 4 | .hljs-comment { 5 | color: #8e908c; 6 | } 7 | 8 | /* Tomorrow Red */ 9 | .hljs-variable, 10 | .hljs-attribute, 11 | .hljs-tag, 12 | .hljs-regexp, 13 | .ruby .hljs-constant, 14 | .xml .hljs-tag .hljs-title, 15 | .xml .hljs-pi, 16 | .xml .hljs-doctype, 17 | .html .hljs-doctype, 18 | .css .hljs-id, 19 | .css .hljs-class, 20 | .css .hljs-pseudo { 21 | color: #c82829; 22 | } 23 | 24 | /* Tomorrow Orange */ 25 | .hljs-number, 26 | .hljs-preprocessor, 27 | .hljs-pragma, 28 | .hljs-built_in, 29 | .hljs-literal, 30 | .hljs-params, 31 | .hljs-constant { 32 | color: #f5871f; 33 | } 34 | 35 | /* Tomorrow Yellow */ 36 | .ruby .hljs-class .hljs-title, 37 | .css .hljs-rule .hljs-attribute { 38 | color: #eab700; 39 | } 40 | 41 | /* Tomorrow Green */ 42 | .hljs-string, 43 | .hljs-value, 44 | .hljs-inheritance, 45 | .hljs-header, 46 | .hljs-name, 47 | .ruby .hljs-symbol, 48 | .xml .hljs-cdata { 49 | color: #718c00; 50 | } 51 | 52 | /* Tomorrow Aqua */ 53 | .hljs-title, 54 | .css .hljs-hexcolor { 55 | color: #3e999f; 56 | } 57 | 58 | /* Tomorrow Blue */ 59 | .hljs-function, 60 | .python .hljs-decorator, 61 | .python .hljs-title, 62 | .ruby .hljs-function .hljs-title, 63 | .ruby .hljs-title .hljs-keyword, 64 | .perl .hljs-sub, 65 | .javascript .hljs-title, 66 | .coffeescript .hljs-title { 67 | color: #4271ae; 68 | } 69 | 70 | /* Tomorrow Purple */ 71 | .hljs-keyword, 72 | .javascript .hljs-function { 73 | color: #8959a8; 74 | } 75 | 76 | .hljs { 77 | display: block; 78 | overflow-x: auto; 79 | background: white; 80 | color: #4d4d4c; 81 | padding: 0.5em; 82 | -webkit-text-size-adjust: none; 83 | } 84 | 85 | .coffeescript .javascript, 86 | .javascript .xml, 87 | .tex .hljs-formula, 88 | .xml .javascript, 89 | .xml .vbscript, 90 | .xml .css, 91 | .xml .hljs-cdata { 92 | opacity: 0.5; 93 | } 94 | -------------------------------------------------------------------------------- /vendors/highlight/styles/vs.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Visual Studio-like style based on original C# coloring by Jason Diamond 4 | 5 | */ 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: white; 11 | color: black; 12 | -webkit-text-size-adjust: none; 13 | } 14 | 15 | .hljs-comment, 16 | .hljs-annotation, 17 | .diff .hljs-header, 18 | .hljs-chunk, 19 | .apache .hljs-cbracket { 20 | color: #008000; 21 | } 22 | 23 | .hljs-keyword, 24 | .hljs-id, 25 | .hljs-built_in, 26 | .smalltalk .hljs-class, 27 | .hljs-winutils, 28 | .bash .hljs-variable, 29 | .tex .hljs-command, 30 | .hljs-request, 31 | .hljs-status, 32 | .nginx .hljs-title, 33 | .xml .hljs-tag, 34 | .xml .hljs-tag .hljs-value { 35 | color: #00f; 36 | } 37 | 38 | .hljs-string, 39 | .hljs-title, 40 | .hljs-parent, 41 | .hljs-tag .hljs-value, 42 | .hljs-rule .hljs-value, 43 | .ruby .hljs-symbol, 44 | .ruby .hljs-symbol .hljs-string, 45 | .hljs-template_tag, 46 | .django .hljs-variable, 47 | .hljs-addition, 48 | .hljs-flow, 49 | .hljs-stream, 50 | .apache .hljs-tag, 51 | .hljs-date, 52 | .tex .hljs-formula, 53 | .coffeescript .hljs-attribute, 54 | .hljs-name { 55 | color: #a31515; 56 | } 57 | 58 | .ruby .hljs-string, 59 | .hljs-decorator, 60 | .hljs-filter .hljs-argument, 61 | .hljs-localvars, 62 | .hljs-array, 63 | .hljs-attr_selector, 64 | .hljs-pseudo, 65 | .hljs-pi, 66 | .hljs-doctype, 67 | .hljs-deletion, 68 | .hljs-envvar, 69 | .hljs-shebang, 70 | .hljs-preprocessor, 71 | .hljs-pragma, 72 | .userType, 73 | .apache .hljs-sqbracket, 74 | .nginx .hljs-built_in, 75 | .tex .hljs-special, 76 | .hljs-prompt { 77 | color: #2b91af; 78 | } 79 | 80 | .hljs-doctag, 81 | .hljs-xmlDocTag { 82 | color: #808080; 83 | } 84 | 85 | .hljs-type, 86 | .hljs-typename { font-weight: bold; } 87 | 88 | .vhdl .hljs-string { color: #666666; } 89 | .vhdl .hljs-literal { color: #a31515; } 90 | .vhdl .hljs-attribute { color: #00b0e8; } 91 | 92 | .xml .hljs-attribute { color: #f00; } 93 | -------------------------------------------------------------------------------- /vendors/marked/.npmignore: -------------------------------------------------------------------------------- 1 | .git* 2 | test/ 3 | -------------------------------------------------------------------------------- /vendors/marked/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "0.10" 4 | - "0.8" 5 | - "0.6" 6 | -------------------------------------------------------------------------------- /vendors/marked/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011-2014, Christopher Jeffrey (https://github.com/chjj/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /vendors/marked/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | @cp lib/marked.js marked.js 3 | @uglifyjs --comments '/\*[^\0]+?Copyright[^\0]+?\*/' -o marked.min.js lib/marked.js 4 | 5 | clean: 6 | @rm marked.js 7 | @rm marked.min.js 8 | 9 | bench: 10 | @node test --bench 11 | 12 | .PHONY: clean all 13 | -------------------------------------------------------------------------------- /vendors/marked/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "marked", 3 | "version": "0.3.2", 4 | "homepage": "https://github.com/chjj/marked", 5 | "authors": [ 6 | "Christopher Jeffrey " 7 | ], 8 | "description": "A markdown parser built for speed", 9 | "keywords": [ 10 | "markdown", 11 | "markup", 12 | "html" 13 | ], 14 | "main": "lib/marked.js", 15 | "license": "MIT", 16 | "ignore": [ 17 | "**/.*", 18 | "node_modules", 19 | "bower_components", 20 | "app/bower_components", 21 | "test", 22 | "tests" 23 | ] 24 | } 25 | -------------------------------------------------------------------------------- /vendors/marked/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "marked", 3 | "version": "0.3.2", 4 | "repo": "chjj/marked", 5 | "description": "A markdown parser built for speed", 6 | "keywords": ["markdown", "markup", "html"], 7 | "scripts": ["lib/marked.js"], 8 | "main": "lib/marked.js", 9 | "license": "MIT" 10 | } 11 | -------------------------------------------------------------------------------- /vendors/marked/doc/todo.md: -------------------------------------------------------------------------------- 1 | # Todo 2 | 3 | -------------------------------------------------------------------------------- /vendors/marked/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/marked'); 2 | -------------------------------------------------------------------------------- /vendors/marked/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "marked", 3 | "description": "A markdown parser built for speed", 4 | "author": { 5 | "name": "Christopher Jeffrey" 6 | }, 7 | "version": "0.3.3", 8 | "main": "./lib/marked.js", 9 | "bin": { 10 | "marked": "./bin/marked" 11 | }, 12 | "man": [ 13 | "./man/marked.1" 14 | ], 15 | "preferGlobal": true, 16 | "repository": { 17 | "type": "git", 18 | "url": "git://github.com/chjj/marked.git" 19 | }, 20 | "homepage": "https://github.com/chjj/marked", 21 | "bugs": { 22 | "url": "http://github.com/chjj/marked/issues" 23 | }, 24 | "license": "MIT", 25 | "keywords": [ 26 | "markdown", 27 | "markup", 28 | "html" 29 | ], 30 | "tags": [ 31 | "markdown", 32 | "markup", 33 | "html" 34 | ], 35 | "devDependencies": { 36 | "markdown": "*", 37 | "showdown": "*", 38 | "robotskirt": "*" 39 | }, 40 | "scripts": { 41 | "test": "node test", 42 | "bench": "node test --bench" 43 | }, 44 | "gitHead": "2b5802f258c5e23e48366f2377fbb4c807f47658", 45 | "_id": "marked@0.3.3", 46 | "_shasum": "08bad9cac13736f6cceddc202344f1b0bf255390", 47 | "_from": "marked@*", 48 | "_npmVersion": "2.3.0", 49 | "_nodeVersion": "0.10.35", 50 | "_npmUser": { 51 | "name": "chjj", 52 | "email": "chjjeffrey@gmail.com" 53 | }, 54 | "maintainers": [ 55 | { 56 | "name": "chjj", 57 | "email": "chjjeffrey@gmail.com" 58 | } 59 | ], 60 | "dist": { 61 | "shasum": "08bad9cac13736f6cceddc202344f1b0bf255390", 62 | "tarball": "http://registry.npmjs.org/marked/-/marked-0.3.3.tgz" 63 | }, 64 | "directories": {}, 65 | "_resolved": "https://registry.npmjs.org/marked/-/marked-0.3.3.tgz", 66 | "readme": "ERROR: No README data found!" 67 | } 68 | -------------------------------------------------------------------------------- /vendors/remarkable/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | trim_trailing_whitespace = true 7 | insert_final_newline = true 8 | 9 | [{.,}*.{js{,*},y{a,}ml}] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.{md,txt}] 14 | indent_style = space 15 | indent_size = 4 16 | trim_trailing_whitespace = false 17 | 18 | [Makefile] 19 | indent_style = tab 20 | -------------------------------------------------------------------------------- /vendors/remarkable/.eslintignore: -------------------------------------------------------------------------------- 1 | benchmark/implementations/ 2 | coverage/ 3 | demo/sample.js 4 | dist/ 5 | node_modules/ 6 | -------------------------------------------------------------------------------- /vendors/remarkable/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | coverage/ 3 | *.DS_Store 4 | *.sublime* 5 | -------------------------------------------------------------------------------- /vendors/remarkable/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeSignal/blaze-material-ui/5c8e9d59919b14f7d85b3c7934b0d7e311707b48/vendors/remarkable/.nojekyll -------------------------------------------------------------------------------- /vendors/remarkable/.npmignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | coverage/ 3 | *.DS_Store 4 | *.sublime* 5 | 6 | 7 | # npmignore 8 | benchmark/ 9 | demo/ 10 | support/ 11 | test/ 12 | .* 13 | Makefile 14 | verbfile.js 15 | CHANGELOG.md 16 | CONTRIBUTING.md -------------------------------------------------------------------------------- /vendors/remarkable/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '0.10' 4 | script: make test-ci 5 | -------------------------------------------------------------------------------- /vendors/remarkable/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | > Before submitting a pull request to Remarkable: 4 | 5 | 1. Run `npm test` to be sure that all tests are passing. 6 | 2. Run `node benchmark` to ensure that performance has not degraded. 7 | 3. DO NOT include any auto-generated browser or demo files in your commit. 8 | 4. Commit to the [dev](https://github.com/jonschlinkert/remarkable/tree/dev) branch, never master. 9 | 10 | Thanks! 11 | -------------------------------------------------------------------------------- /vendors/remarkable/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Jon Schlinkert, Vitaly Puzrin. 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation 7 | files (the "Software"), to deal in the Software without 8 | restriction, including without limitation the rights to use, 9 | copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the 11 | Software is furnished to do so, subject to the following 12 | conditions: 13 | 14 | The above copyright notice and this permission notice shall be 15 | included in all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 18 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 19 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 20 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 21 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 22 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 24 | OTHER DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-bq-flat.md: -------------------------------------------------------------------------------- 1 | > the simple example of a blockquote 2 | > the simple example of a blockquote 3 | > the simple example of a blockquote 4 | > the simple example of a blockquote 5 | ... continuation 6 | ... continuation 7 | ... continuation 8 | ... continuation 9 | 10 | empty blockquote: 11 | 12 | > 13 | > 14 | > 15 | > 16 | 17 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-bq-nested.md: -------------------------------------------------------------------------------- 1 | >>>>>> deeply nested blockquote 2 | >>>>> deeply nested blockquote 3 | >>>> deeply nested blockquote 4 | >>> deeply nested blockquote 5 | >> deeply nested blockquote 6 | > deeply nested blockquote 7 | 8 | > deeply nested blockquote 9 | >> deeply nested blockquote 10 | >>> deeply nested blockquote 11 | >>>> deeply nested blockquote 12 | >>>>> deeply nested blockquote 13 | >>>>>> deeply nested blockquote 14 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-code.md: -------------------------------------------------------------------------------- 1 | 2 | an 3 | example 4 | 5 | of 6 | 7 | 8 | 9 | a code 10 | block 11 | 12 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-fences.md: -------------------------------------------------------------------------------- 1 | 2 | ``````````text 3 | an 4 | example 5 | ``` 6 | of 7 | 8 | 9 | a fenced 10 | ``` 11 | code 12 | block 13 | `````````` 14 | 15 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-heading.md: -------------------------------------------------------------------------------- 1 | # heading 2 | ### heading 3 | ##### heading 4 | 5 | # heading # 6 | ### heading ### 7 | ##### heading \#\#\#\#\###### 8 | 9 | ############ not a heading 10 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-hr.md: -------------------------------------------------------------------------------- 1 | 2 | * * * * * 3 | 4 | - - - - - 5 | 6 | ________ 7 | 8 | 9 | ************************* text 10 | 11 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-html.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | blah blah 4 | 5 |
6 | 7 | 8 | 9 | 12 | 13 |
10 | **test** 11 |
14 | 15 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 |
20 | 21 | test 22 | 23 |
28 | 29 | 32 | 33 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-lheading.md: -------------------------------------------------------------------------------- 1 | heading 2 | --- 3 | 4 | heading 5 | =================================== 6 | 7 | not a heading 8 | ----------------------------------- text 9 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-list-flat.md: -------------------------------------------------------------------------------- 1 | - tidy 2 | - bullet 3 | - list 4 | 5 | 6 | - loose 7 | 8 | - bullet 9 | 10 | - list 11 | 12 | 13 | 0. ordered 14 | 1. list 15 | 2. example 16 | 17 | 18 | - 19 | - 20 | - 21 | - 22 | 23 | 24 | 1. 25 | 2. 26 | 3. 27 | 28 | 29 | - an example 30 | of a list item 31 | with a continuation 32 | 33 | this part is inside the list 34 | 35 | this part is just a paragraph 36 | 37 | 38 | 1. test 39 | - test 40 | 1. test 41 | - test 42 | 43 | 44 | 111111111111111111111111111111111111111111. is this a valid bullet? 45 | 46 | - _________________________ 47 | 48 | - this 49 | - is 50 | 51 | a 52 | 53 | long 54 | - loose 55 | - list 56 | 57 | - with 58 | - some 59 | 60 | tidy 61 | 62 | - list 63 | - items 64 | - in 65 | 66 | - between 67 | - _________________________ 68 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-list-nested.md: -------------------------------------------------------------------------------- 1 | 2 | - this 3 | - is 4 | - a 5 | - deeply 6 | - nested 7 | - bullet 8 | - list 9 | 10 | 11 | 1. this 12 | 2. is 13 | 3. a 14 | 4. deeply 15 | 5. nested 16 | 6. unordered 17 | 7. list 18 | 19 | 20 | - 1 21 | - 2 22 | - 3 23 | - 4 24 | - 5 25 | - 6 26 | - 7 27 | - 6 28 | - 5 29 | - 4 30 | - 3 31 | - 2 32 | - 1 33 | 34 | 35 | - - - - - - - - - deeply-nested one-element item 36 | 37 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-ref-flat.md: -------------------------------------------------------------------------------- 1 | [1] [2] [3] [1] [2] [3] 2 | 3 | [looooooooooooooooooooooooooooooooooooooooooooooooooong label] 4 | 5 | [1]: 6 | [2]: http://something.example.com/foo/bar 'test' 7 | [3]: 8 | http://foo/bar 9 | [ looooooooooooooooooooooooooooooooooooooooooooooooooong label ]: 10 | 111 11 | 'test' 12 | [[[[[[[[[[[[[[[[[[[[ this should not slow down anything ]]]]]]]]]]]]]]]]]]]]: q 13 | (as long as it is not referenced anywhere) 14 | 15 | [[[[[[[[[[[[[[[[[[[[]: this is not a valid reference 16 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-ref-nested.md: -------------------------------------------------------------------------------- 1 | [[[[[[[foo]]]]]]] 2 | 3 | [[[[[[[foo]]]]]]]: bar 4 | [[[[[[foo]]]]]]: bar 5 | [[[[[foo]]]]]: bar 6 | [[[[foo]]]]: bar 7 | [[[foo]]]: bar 8 | [[foo]]: bar 9 | [foo]: bar 10 | 11 | [*[*[*[*[foo]*]*]*]*] 12 | 13 | [*[*[*[*[foo]*]*]*]*]: bar 14 | [*[*[*[foo]*]*]*]: bar 15 | [*[*[foo]*]*]: bar 16 | [*[foo]*]: bar 17 | [foo]: bar 18 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/block-tables.md: -------------------------------------------------------------------------------- 1 | | Heading 1 | Heading 2 2 | | --------- | --------- 3 | | Cell 1 | Cell 2 4 | | Cell 3 | Cell 4 5 | 6 | | Header 1 | Header 2 | Header 3 | Header 4 | 7 | | :------: | -------: | :------- | -------- | 8 | | Cell 1 | Cell 2 | Cell 3 | Cell 4 | 9 | | Cell 5 | Cell 6 | Cell 7 | Cell 8 | 10 | 11 | Test code 12 | 13 | Header 1 | Header 2 14 | -------- | -------- 15 | Cell 1 | Cell 2 16 | Cell 3 | Cell 4 17 | 18 | Header 1|Header 2|Header 3|Header 4 19 | :-------|:------:|-------:|-------- 20 | Cell 1 |Cell 2 |Cell 3 |Cell 4 21 | *Cell 5*|Cell 6 |Cell 7 |Cell 8 22 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-autolink.md: -------------------------------------------------------------------------------- 1 | closed (valid) autolinks: 2 | 3 | 4 | 5 | 6 | 7 | 8 | these are not autolinks: 9 | 10 | 15 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-backticks.md: -------------------------------------------------------------------------------- 1 | `lots`of`backticks` 2 | 3 | ``i``wonder``how``this``will``be``parsed`` 4 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-em-flat.md: -------------------------------------------------------------------------------- 1 | *this* *is* *your* *basic* *boring* *emphasis* 2 | 3 | _this_ _is_ _your_ _basic_ _boring_ _emphasis_ 4 | 5 | **this** **is** **your** **basic** **boring** **emphasis** 6 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-em-nested.md: -------------------------------------------------------------------------------- 1 | *this *is *a *bunch* of* nested* emphases* 2 | 3 | __this __is __a __bunch__ of__ nested__ emphases__ 4 | 5 | ***this ***is ***a ***bunch*** of*** nested*** emphases*** 6 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-em-worst.md: -------------------------------------------------------------------------------- 1 | *this *is *a *worst *case *for *em *backtracking 2 | 3 | __this __is __a __worst __case __for __em __backtracking 4 | 5 | ***this ***is ***a ***worst ***case ***for ***em ***backtracking 6 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-entity.md: -------------------------------------------------------------------------------- 1 | entities: 2 | 3 |   & © Æ Ď ¾ ℋ ⅆ ∲ 4 | 5 | # Ӓ Ϡ � 6 | 7 | non-entities: 8 | 9 | &18900987654321234567890; &1234567890098765432123456789009876543212345678987654; 10 | 11 | &qwertyuioppoiuytrewqwer; &oiuytrewqwertyuioiuytrewqwertyuioytrewqwertyuiiuytri; 12 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-escape.md: -------------------------------------------------------------------------------- 1 | 2 | \t\e\s\t\i\n\g \e\s\c\a\p\e \s\e\q\u\e\n\c\e\s 3 | 4 | \!\\\"\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\? 5 | 6 | \@ \[ \] \^ \_ \` \{ \| \} \~ \- \' 7 | 8 | \ 9 | \\ 10 | \\\ 11 | \\\\ 12 | \\\\\ 13 | 14 | \ \ \ \ 15 | 16 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-html.md: -------------------------------------------------------------------------------- 1 | Taking commonmark tests from the spec for benchmarking here: 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 12 | 13 | <33> <__> 14 | 15 | 16 | 17 | 28 | 29 | foo 31 | 32 | foo 33 | 34 | foo 35 | 36 | foo 37 | 38 | foo &<]]> 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-links-flat.md: -------------------------------------------------------------------------------- 1 | Valid links: 2 | 3 | [this is a link]() 4 | [this is a link]() 5 | [this is a link](http://something.example.com/foo/bar 'test') 6 | ![this is an image]() 7 | ![this is an image]() 8 | ![this is an image](http://something.example.com/foo/bar 'test') 9 | 10 | [escape test](<\>\>\>\>\>\>\>\>\>\>\>\>\>\>> '\'\'\'\'\'\'\'\'\'\'\'\'\'\'') 11 | [escape test \]\]\]\]\]\]\]\]\]\]\]\]\]\]\]\]](\)\)\)\)\)\)\)\)\)\)\)\)\)\)) 12 | 13 | Invalid links: 14 | 15 | [this is not a link 16 | 17 | [this is not a link]( 18 | 19 | [this is not a link](http://something.example.com/foo/bar 'test' 20 | 21 | [this is not a link]((((((((((((((((((((((((((((((((((((((((((((((( 22 | 23 | [this is not a link]((((((((((()))))))))) (((((((((())))))))))) 24 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-links-nested.md: -------------------------------------------------------------------------------- 1 | Valid links: 2 | 3 | [[[[[[[[](test)](test)](test)](test)](test)](test)](test)] 4 | 5 | [ [[[[[[[[[[[[[[[[[[ [](test) ]]]]]]]]]]]]]]]]]] ](test) 6 | 7 | Invalid links: 8 | 9 | [[[[[[[[[ 10 | 11 | [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 12 | 13 | ![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![![ 14 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/inline-newlines.md: -------------------------------------------------------------------------------- 1 | 2 | this\ 3 | should\ 4 | be\ 5 | separated\ 6 | by\ 7 | newlines 8 | 9 | this 10 | should 11 | be 12 | separated 13 | by 14 | newlines 15 | too 16 | 17 | this 18 | should 19 | not 20 | be 21 | separated 22 | by 23 | newlines 24 | 25 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/fixtures/rawtabs.md: -------------------------------------------------------------------------------- 1 | 2 | this is a test for tab expansion, be careful not to replace them with spaces 3 | 4 | 1 4444 5 | 22 333 6 | 333 22 7 | 4444 1 8 | 9 | 10 | tab-indented line 11 | space-indented line 12 | tab-indented line 13 | 14 | 15 | a lot of spaces in between here 16 | 17 | a lot of tabs in between here 18 | 19 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/implementations/commonmark-reference/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var commonmark = require('commonmark'); 4 | var parser = new commonmark.DocParser(); 5 | var renderer = new commonmark.HtmlRenderer(); 6 | 7 | exports.run = function(data) { 8 | return renderer.render(parser.parse(data)); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/implementations/current-commonmark/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var Remarkable = require('../../../'); 4 | var md = new Remarkable('commonmark'); 5 | 6 | exports.run = function(data) { 7 | return md.render(data); 8 | } 9 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/implementations/current/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var Remarkable = require('../../../'); 4 | var md = new Remarkable({ 5 | html: true, 6 | linkify: true, 7 | typographer: true 8 | }); 9 | 10 | exports.run = function(data) { 11 | return md.render(data); 12 | } 13 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/implementations/marked-0.3.2/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | var marked = new require('marked'); 4 | 5 | exports.run = function(data) { 6 | return marked(data); 7 | } 8 | -------------------------------------------------------------------------------- /vendors/remarkable/benchmark/profile.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /*eslint no-console:0*/ 3 | 'use strict'; 4 | 5 | var fs = require('fs'); 6 | var path = require('path'); 7 | var Remarkable = require('../'); 8 | 9 | var md = new Remarkable({ 10 | html: true, 11 | linkify: false, 12 | typographer: false 13 | }); 14 | 15 | // var data = fs.readFileSync(path.join(__dirname, '/fixtures/lorem1.txt'), 'utf8'); 16 | var data = fs.readFileSync(path.join(__dirname, '../test/fixtures/commonmark/spec.txt'), 'utf8'); 17 | 18 | for (var i = 0; i < 20; i++) { 19 | md.render(data); 20 | } 21 | -------------------------------------------------------------------------------- /vendors/remarkable/bin/remarkable.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | /*eslint no-console:0*/ 3 | 4 | 'use strict'; 5 | 6 | 7 | var fs = require('fs'); 8 | var argparse = require('argparse'); 9 | 10 | var Remarkable = require('..'); 11 | 12 | //////////////////////////////////////////////////////////////////////////////// 13 | 14 | var cli = new argparse.ArgumentParser({ 15 | prog: 'remarkable', 16 | version: require('../package.json').version, 17 | addHelp: true 18 | }); 19 | 20 | cli.addArgument([ 'file' ], { 21 | help: 'File to read', 22 | nargs: '?', 23 | defaultValue: '-' 24 | }); 25 | 26 | var options = cli.parseArgs(); 27 | 28 | 29 | function readFile(filename, encoding, callback) { 30 | if (options.file === '-') { 31 | var chunks = []; 32 | 33 | // read from stdin 34 | process.stdin.on('data', function(chunk) { 35 | chunks.push(chunk); 36 | }); 37 | 38 | process.stdin.on('end', function() { 39 | return callback(null, Buffer.concat(chunks).toString(encoding)); 40 | }); 41 | } else { 42 | fs.readFile(filename, encoding, callback); 43 | } 44 | } 45 | 46 | 47 | //////////////////////////////////////////////////////////////////////////////// 48 | 49 | readFile(options.file, 'utf8', function (err, input) { 50 | var output, md; 51 | 52 | if (err) { 53 | if (err.code === 'ENOENT') { 54 | console.error('File not found: ' + options.file); 55 | process.exit(2); 56 | } 57 | 58 | console.error(err.stack || err.message || String(err)); 59 | process.exit(1); 60 | } 61 | 62 | md = new Remarkable('full', { 63 | html: true, 64 | xhtmlOut: true, 65 | typographer: true, 66 | linkify: true 67 | }); 68 | 69 | try { 70 | output = md.render(input); 71 | } catch (e) { 72 | console.error(e.stack || e.message || String(e)); 73 | process.exit(1); 74 | } 75 | 76 | process.stdout.write(output); 77 | process.exit(0); 78 | }); 79 | -------------------------------------------------------------------------------- /vendors/remarkable/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "remarkable", 3 | "main": "dist/remarkable.js", 4 | "homepage": "https://github.com/jonschlinkert/remarkable", 5 | "description": "Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one.", 6 | "keywords": [ 7 | "markdown", 8 | "md", 9 | "commonmark", 10 | "parser" 11 | ], 12 | "license": "MIT", 13 | "ignore": [ 14 | "**/.*", 15 | "benchmark", 16 | "bower_components", 17 | "coverage", 18 | "demo", 19 | "lib", 20 | "node_modules", 21 | "support", 22 | "test", 23 | "Makefile", 24 | "index*" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /vendors/remarkable/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | module.exports = require('./lib/'); 5 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/common/html_blocks.js: -------------------------------------------------------------------------------- 1 | // List of valid html blocks names, accorting to commonmark spec 2 | // http://jgm.github.io/CommonMark/spec.html#html-blocks 3 | 4 | 'use strict'; 5 | 6 | var html_blocks = {}; 7 | 8 | [ 9 | 'article', 10 | 'aside', 11 | 'button', 12 | 'blockquote', 13 | 'body', 14 | 'canvas', 15 | 'caption', 16 | 'col', 17 | 'colgroup', 18 | 'dd', 19 | 'div', 20 | 'dl', 21 | 'dt', 22 | 'embed', 23 | 'fieldset', 24 | 'figcaption', 25 | 'figure', 26 | 'footer', 27 | 'form', 28 | 'h1', 29 | 'h2', 30 | 'h3', 31 | 'h4', 32 | 'h5', 33 | 'h6', 34 | 'header', 35 | 'hgroup', 36 | 'hr', 37 | 'iframe', 38 | 'li', 39 | 'map', 40 | 'object', 41 | 'ol', 42 | 'output', 43 | 'p', 44 | 'pre', 45 | 'progress', 46 | 'script', 47 | 'section', 48 | 'style', 49 | 'table', 50 | 'tbody', 51 | 'td', 52 | 'textarea', 53 | 'tfoot', 54 | 'th', 55 | 'tr', 56 | 'thead', 57 | 'ul', 58 | 'video' 59 | ].forEach(function (name) { html_blocks[name] = true; }); 60 | 61 | 62 | module.exports = html_blocks; 63 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/common/html_re.js: -------------------------------------------------------------------------------- 1 | // Regexps to match html elements 2 | 3 | 'use strict'; 4 | 5 | 6 | function replace(regex, options) { 7 | regex = regex.source; 8 | options = options || ''; 9 | 10 | return function self(name, val) { 11 | if (!name) { 12 | return new RegExp(regex, options); 13 | } 14 | val = val.source || val; 15 | regex = regex.replace(name, val); 16 | return self; 17 | }; 18 | } 19 | 20 | 21 | var attr_name = /[a-zA-Z_:][a-zA-Z0-9:._-]*/; 22 | 23 | var unquoted = /[^"'=<>`\x00-\x20]+/; 24 | var single_quoted = /'[^']*'/; 25 | var double_quoted = /"[^"]*"/; 26 | 27 | /*eslint no-spaced-func:0*/ 28 | var attr_value = replace(/(?:unquoted|single_quoted|double_quoted)/) 29 | ('unquoted', unquoted) 30 | ('single_quoted', single_quoted) 31 | ('double_quoted', double_quoted) 32 | (); 33 | 34 | var attribute = replace(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/) 35 | ('attr_name', attr_name) 36 | ('attr_value', attr_value) 37 | (); 38 | 39 | var open_tag = replace(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/) 40 | ('attribute', attribute) 41 | (); 42 | 43 | var close_tag = /<\/[A-Za-z][A-Za-z0-9]*\s*>/; 44 | var comment = //; 45 | var processing = /<[?].*?[?]>/; 46 | var declaration = /]*>/; 47 | var cdata = /])*\]\]>/; 48 | 49 | var HTML_TAG_RE = replace(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/) 50 | ('open_tag', open_tag) 51 | ('close_tag', close_tag) 52 | ('comment', comment) 53 | ('processing', processing) 54 | ('declaration', declaration) 55 | ('cdata', cdata) 56 | (); 57 | 58 | 59 | module.exports.HTML_TAG_RE = HTML_TAG_RE; 60 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/configs/commonmark.js: -------------------------------------------------------------------------------- 1 | // Commonmark default options 2 | 3 | 'use strict'; 4 | 5 | 6 | module.exports = { 7 | options: { 8 | html: true, // Enable HTML tags in source 9 | xhtmlOut: true, // Use '/' to close single tags (
) 10 | breaks: false, // Convert '\n' in paragraphs into
11 | langPrefix: 'language-', // CSS language prefix for fenced blocks 12 | linkify: false, // autoconvert URL-like texts to links 13 | 14 | // Enable some language-neutral replacements + quotes beautification 15 | typographer: false, 16 | 17 | // Double + single quotes replacement pairs, when typographer enabled, 18 | // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German. 19 | quotes: '“”‘’', 20 | 21 | // Highlighter function. Should return escaped HTML, 22 | // or '' if input not changed 23 | // 24 | // function (/*str, lang*/) { return ''; } 25 | // 26 | highlight: null, 27 | 28 | maxNesting: 20 // Internal protection, recursion limit 29 | }, 30 | 31 | components: { 32 | 33 | core: { 34 | rules: [ 35 | 'block', 36 | 'inline', 37 | 'references', 38 | 'abbr2' 39 | ] 40 | }, 41 | 42 | block: { 43 | rules: [ 44 | 'blockquote', 45 | 'code', 46 | 'fences', 47 | 'heading', 48 | 'hr', 49 | 'htmlblock', 50 | 'lheading', 51 | 'list', 52 | 'paragraph' 53 | ] 54 | }, 55 | 56 | inline: { 57 | rules: [ 58 | 'autolink', 59 | 'backticks', 60 | 'emphasis', 61 | 'entity', 62 | 'escape', 63 | 'htmltag', 64 | 'links', 65 | 'newline', 66 | 'text' 67 | ] 68 | } 69 | } 70 | }; 71 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/configs/default.js: -------------------------------------------------------------------------------- 1 | // Remarkable default options 2 | 3 | 'use strict'; 4 | 5 | 6 | module.exports = { 7 | options: { 8 | html: false, // Enable HTML tags in source 9 | xhtmlOut: false, // Use '/' to close single tags (
) 10 | breaks: false, // Convert '\n' in paragraphs into
11 | langPrefix: 'language-', // CSS language prefix for fenced blocks 12 | linkify: false, // autoconvert URL-like texts to links 13 | 14 | // Enable some language-neutral replacements + quotes beautification 15 | typographer: false, 16 | 17 | // Double + single quotes replacement pairs, when typographer enabled, 18 | // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German. 19 | quotes: '“”‘’', 20 | 21 | // Highlighter function. Should return escaped HTML, 22 | // or '' if input not changed 23 | // 24 | // function (/*str, lang*/) { return ''; } 25 | // 26 | highlight: null, 27 | 28 | maxNesting: 20 // Internal protection, recursion limit 29 | }, 30 | 31 | components: { 32 | 33 | core: { 34 | rules: [ 35 | 'block', 36 | 'inline', 37 | 'references', 38 | 'replacements', 39 | 'linkify', 40 | 'smartquotes', 41 | 'references', 42 | 'abbr2', 43 | 'footnote_tail' 44 | ] 45 | }, 46 | 47 | block: { 48 | rules: [ 49 | 'blockquote', 50 | 'code', 51 | 'fences', 52 | 'heading', 53 | 'hr', 54 | 'htmlblock', 55 | 'lheading', 56 | 'list', 57 | 'paragraph', 58 | 'table' 59 | ] 60 | }, 61 | 62 | inline: { 63 | rules: [ 64 | 'autolink', 65 | 'backticks', 66 | 'del', 67 | 'emphasis', 68 | 'entity', 69 | 'escape', 70 | 'footnote_ref', 71 | 'htmltag', 72 | 'links', 73 | 'newline', 74 | 'text' 75 | ] 76 | } 77 | } 78 | }; 79 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/configs/full.js: -------------------------------------------------------------------------------- 1 | // Remarkable default options 2 | 3 | 'use strict'; 4 | 5 | 6 | module.exports = { 7 | options: { 8 | html: false, // Enable HTML tags in source 9 | xhtmlOut: false, // Use '/' to close single tags (
) 10 | breaks: false, // Convert '\n' in paragraphs into
11 | langPrefix: 'language-', // CSS language prefix for fenced blocks 12 | linkify: false, // autoconvert URL-like texts to links 13 | 14 | // Enable some language-neutral replacements + quotes beautification 15 | typographer: false, 16 | 17 | // Double + single quotes replacement pairs, when typographer enabled, 18 | // and smartquotes on. Set doubles to '«»' for Russian, '„“' for German. 19 | quotes: '“”‘’', 20 | 21 | // Highlighter function. Should return escaped HTML, 22 | // or '' if input not changed 23 | // 24 | // function (/*str, lang*/) { return ''; } 25 | // 26 | highlight: null, 27 | 28 | maxNesting: 20 // Internal protection, recursion limit 29 | }, 30 | 31 | components: { 32 | // Don't restrict core/block/inline rules 33 | core: {}, 34 | block: {}, 35 | inline: {} 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/helpers/normalize_link.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var replaceEntities = require('../common/utils').replaceEntities; 4 | 5 | module.exports = function normalizeLink(url) { 6 | var normalized = replaceEntities(url); 7 | // We shouldn't care about the result of malformed URIs, 8 | // and should not throw an exception. 9 | try { 10 | normalized = decodeURI(normalized); 11 | } catch (err) {} 12 | return encodeURI(normalized); 13 | }; 14 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/helpers/normalize_reference.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function normalizeReference(str) { 4 | // use .toUpperCase() instead of .toLowerCase() 5 | // here to avoid a conflict with Object.prototype 6 | // members (most notably, `__proto__`) 7 | return str.trim().replace(/\s+/g, ' ').toUpperCase(); 8 | }; 9 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/helpers/parse_link_label.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Parse link labels 5 | * 6 | * This function assumes that first character (`[`) already matches; 7 | * returns the end of the label. 8 | * 9 | * @param {Object} state 10 | * @param {Number} start 11 | * @api private 12 | */ 13 | 14 | module.exports = function parseLinkLabel(state, start) { 15 | var level, found, marker, 16 | labelEnd = -1, 17 | max = state.posMax, 18 | oldPos = state.pos, 19 | oldFlag = state.isInLabel; 20 | 21 | if (state.isInLabel) { return -1; } 22 | 23 | if (state.labelUnmatchedScopes) { 24 | state.labelUnmatchedScopes--; 25 | return -1; 26 | } 27 | 28 | state.pos = start + 1; 29 | state.isInLabel = true; 30 | level = 1; 31 | 32 | while (state.pos < max) { 33 | marker = state.src.charCodeAt(state.pos); 34 | if (marker === 0x5B /* [ */) { 35 | level++; 36 | } else if (marker === 0x5D /* ] */) { 37 | level--; 38 | if (level === 0) { 39 | found = true; 40 | break; 41 | } 42 | } 43 | 44 | state.parser.skipToken(state); 45 | } 46 | 47 | if (found) { 48 | labelEnd = state.pos; 49 | state.labelUnmatchedScopes = 0; 50 | } else { 51 | state.labelUnmatchedScopes = level - 1; 52 | } 53 | 54 | // restore old state 55 | state.pos = oldPos; 56 | state.isInLabel = oldFlag; 57 | 58 | return labelEnd; 59 | }; 60 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/helpers/parse_link_title.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | 4 | var unescapeMd = require('../common/utils').unescapeMd; 5 | 6 | /** 7 | * Parse link title 8 | * 9 | * - on success it returns a string and updates state.pos; 10 | * - on failure it returns null 11 | * 12 | * @param {Object} state 13 | * @param {Number} pos 14 | * @api private 15 | */ 16 | 17 | module.exports = function parseLinkTitle(state, pos) { 18 | var code, 19 | start = pos, 20 | max = state.posMax, 21 | marker = state.src.charCodeAt(pos); 22 | 23 | if (marker !== 0x22 /* " */ && marker !== 0x27 /* ' */ && marker !== 0x28 /* ( */) { return false; } 24 | 25 | pos++; 26 | 27 | // if opening marker is "(", switch it to closing marker ")" 28 | if (marker === 0x28) { marker = 0x29; } 29 | 30 | while (pos < max) { 31 | code = state.src.charCodeAt(pos); 32 | if (code === marker) { 33 | state.pos = pos + 1; 34 | state.linkContent = unescapeMd(state.src.slice(start + 1, pos)); 35 | return true; 36 | } 37 | if (code === 0x5C /* \ */ && pos + 1 < max) { 38 | pos += 2; 39 | continue; 40 | } 41 | 42 | pos++; 43 | } 44 | 45 | return false; 46 | }; 47 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/parser_core.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Local dependencies 5 | */ 6 | 7 | var Ruler = require('./ruler'); 8 | 9 | /** 10 | * Core parser `rules` 11 | */ 12 | 13 | var _rules = [ 14 | [ 'block', require('./rules_core/block') ], 15 | [ 'abbr', require('./rules_core/abbr') ], 16 | [ 'references', require('./rules_core/references') ], 17 | [ 'inline', require('./rules_core/inline') ], 18 | [ 'footnote_tail', require('./rules_core/footnote_tail') ], 19 | [ 'abbr2', require('./rules_core/abbr2') ], 20 | [ 'replacements', require('./rules_core/replacements') ], 21 | [ 'smartquotes', require('./rules_core/smartquotes') ], 22 | [ 'linkify', require('./rules_core/linkify') ] 23 | ]; 24 | 25 | /** 26 | * Class for top level (`core`) parser rules 27 | * 28 | * @api private 29 | */ 30 | 31 | function Core() { 32 | this.options = {}; 33 | this.ruler = new Ruler(); 34 | for (var i = 0; i < _rules.length; i++) { 35 | this.ruler.push(_rules[i][0], _rules[i][1]); 36 | } 37 | } 38 | 39 | /** 40 | * Process rules with the given `state` 41 | * 42 | * @param {Object} `state` 43 | * @api private 44 | */ 45 | 46 | Core.prototype.process = function (state) { 47 | var i, l, rules; 48 | rules = this.ruler.getRules(''); 49 | for (i = 0, l = rules.length; i < l; i++) { 50 | rules[i](state); 51 | } 52 | }; 53 | 54 | /** 55 | * Expose `Core` 56 | */ 57 | 58 | module.exports = Core; 59 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/renderer.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Local dependencies 5 | */ 6 | 7 | var utils = require('./common/utils'); 8 | var rules = require('./rules'); 9 | 10 | /** 11 | * Expose `Renderer` 12 | */ 13 | 14 | module.exports = Renderer; 15 | 16 | /** 17 | * Renderer class. Renders HTML and exposes `rules` to allow 18 | * local modifications. 19 | */ 20 | 21 | function Renderer() { 22 | this.rules = utils.assign({}, rules); 23 | 24 | // exported helper, for custom rules only 25 | this.getBreak = rules.getBreak; 26 | } 27 | 28 | /** 29 | * Render a string of inline HTML with the given `tokens` and 30 | * `options`. 31 | * 32 | * @param {Array} `tokens` 33 | * @param {Object} `options` 34 | * @param {Object} `env` 35 | * @return {String} 36 | * @api public 37 | */ 38 | 39 | Renderer.prototype.renderInline = function (tokens, options, env) { 40 | var _rules = this.rules; 41 | var len = tokens.length, i = 0; 42 | var result = ''; 43 | 44 | while (len--) { 45 | result += _rules[tokens[i].type](tokens, i++, options, env, this); 46 | } 47 | 48 | return result; 49 | }; 50 | 51 | /** 52 | * Render a string of HTML with the given `tokens` and 53 | * `options`. 54 | * 55 | * @param {Array} `tokens` 56 | * @param {Object} `options` 57 | * @param {Object} `env` 58 | * @return {String} 59 | * @api public 60 | */ 61 | 62 | Renderer.prototype.render = function (tokens, options, env) { 63 | var _rules = this.rules; 64 | var len = tokens.length, i = -1; 65 | var result = ''; 66 | 67 | while (++i < len) { 68 | if (tokens[i].type === 'inline') { 69 | result += this.renderInline(tokens[i].children, options, env); 70 | } else { 71 | result += _rules[tokens[i].type](tokens, i, options, env, this); 72 | } 73 | } 74 | return result; 75 | }; 76 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_block/code.js: -------------------------------------------------------------------------------- 1 | // Code block (4 spaces padded) 2 | 3 | 'use strict'; 4 | 5 | 6 | module.exports = function code(state, startLine, endLine/*, silent*/) { 7 | var nextLine, last; 8 | 9 | if (state.tShift[startLine] - state.blkIndent < 4) { return false; } 10 | 11 | last = nextLine = startLine + 1; 12 | 13 | while (nextLine < endLine) { 14 | if (state.isEmpty(nextLine)) { 15 | nextLine++; 16 | continue; 17 | } 18 | if (state.tShift[nextLine] - state.blkIndent >= 4) { 19 | nextLine++; 20 | last = nextLine; 21 | continue; 22 | } 23 | break; 24 | } 25 | 26 | state.line = nextLine; 27 | state.tokens.push({ 28 | type: 'code', 29 | content: state.getLines(startLine, last, 4 + state.blkIndent, true), 30 | block: true, 31 | lines: [ startLine, state.line ], 32 | level: state.level 33 | }); 34 | 35 | return true; 36 | }; 37 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_block/heading.js: -------------------------------------------------------------------------------- 1 | // heading (#, ##, ...) 2 | 3 | 'use strict'; 4 | 5 | 6 | module.exports = function heading(state, startLine, endLine, silent) { 7 | var ch, level, tmp, 8 | pos = state.bMarks[startLine] + state.tShift[startLine], 9 | max = state.eMarks[startLine]; 10 | 11 | if (pos >= max) { return false; } 12 | 13 | ch = state.src.charCodeAt(pos); 14 | 15 | if (ch !== 0x23/* # */ || pos >= max) { return false; } 16 | 17 | // count heading level 18 | level = 1; 19 | ch = state.src.charCodeAt(++pos); 20 | while (ch === 0x23/* # */ && pos < max && level <= 6) { 21 | level++; 22 | ch = state.src.charCodeAt(++pos); 23 | } 24 | 25 | if (level > 6 || (pos < max && ch !== 0x20/* space */)) { return false; } 26 | 27 | if (silent) { return true; } 28 | 29 | // Let's cut tails like ' ### ' from the end of string 30 | 31 | max = state.skipCharsBack(max, 0x20, pos); // space 32 | tmp = state.skipCharsBack(max, 0x23, pos); // # 33 | if (tmp > pos && state.src.charCodeAt(tmp - 1) === 0x20/* space */) { 34 | max = tmp; 35 | } 36 | 37 | state.line = startLine + 1; 38 | 39 | state.tokens.push({ type: 'heading_open', 40 | hLevel: level, 41 | lines: [ startLine, state.line ], 42 | level: state.level 43 | }); 44 | 45 | // only if header is not empty 46 | if (pos < max) { 47 | state.tokens.push({ 48 | type: 'inline', 49 | content: state.src.slice(pos, max).trim(), 50 | level: state.level + 1, 51 | lines: [ startLine, state.line ], 52 | children: [] 53 | }); 54 | } 55 | state.tokens.push({ type: 'heading_close', hLevel: level, level: state.level }); 56 | 57 | return true; 58 | }; 59 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_block/hr.js: -------------------------------------------------------------------------------- 1 | // Horizontal rule 2 | 3 | 'use strict'; 4 | 5 | 6 | module.exports = function hr(state, startLine, endLine, silent) { 7 | var marker, cnt, ch, 8 | pos = state.bMarks[startLine], 9 | max = state.eMarks[startLine]; 10 | 11 | pos += state.tShift[startLine]; 12 | 13 | if (pos > max) { return false; } 14 | 15 | marker = state.src.charCodeAt(pos++); 16 | 17 | // Check hr marker 18 | if (marker !== 0x2A/* * */ && 19 | marker !== 0x2D/* - */ && 20 | marker !== 0x5F/* _ */) { 21 | return false; 22 | } 23 | 24 | // markers can be mixed with spaces, but there should be at least 3 one 25 | 26 | cnt = 1; 27 | while (pos < max) { 28 | ch = state.src.charCodeAt(pos++); 29 | if (ch !== marker && ch !== 0x20/* space */) { return false; } 30 | if (ch === marker) { cnt++; } 31 | } 32 | 33 | if (cnt < 3) { return false; } 34 | 35 | if (silent) { return true; } 36 | 37 | state.line = startLine + 1; 38 | state.tokens.push({ 39 | type: 'hr', 40 | lines: [ startLine, state.line ], 41 | level: state.level 42 | }); 43 | 44 | return true; 45 | }; 46 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_block/lheading.js: -------------------------------------------------------------------------------- 1 | // lheading (---, ===) 2 | 3 | 'use strict'; 4 | 5 | 6 | module.exports = function lheading(state, startLine, endLine/*, silent*/) { 7 | var marker, pos, max, 8 | next = startLine + 1; 9 | 10 | if (next >= endLine) { return false; } 11 | if (state.tShift[next] < state.blkIndent) { return false; } 12 | 13 | // Scan next line 14 | 15 | if (state.tShift[next] - state.blkIndent > 3) { return false; } 16 | 17 | pos = state.bMarks[next] + state.tShift[next]; 18 | max = state.eMarks[next]; 19 | 20 | if (pos >= max) { return false; } 21 | 22 | marker = state.src.charCodeAt(pos); 23 | 24 | if (marker !== 0x2D/* - */ && marker !== 0x3D/* = */) { return false; } 25 | 26 | pos = state.skipChars(pos, marker); 27 | 28 | pos = state.skipSpaces(pos); 29 | 30 | if (pos < max) { return false; } 31 | 32 | pos = state.bMarks[startLine] + state.tShift[startLine]; 33 | 34 | state.line = next + 1; 35 | state.tokens.push({ 36 | type: 'heading_open', 37 | hLevel: marker === 0x3D/* = */ ? 1 : 2, 38 | lines: [ startLine, state.line ], 39 | level: state.level 40 | }); 41 | state.tokens.push({ 42 | type: 'inline', 43 | content: state.src.slice(pos, state.eMarks[startLine]).trim(), 44 | level: state.level + 1, 45 | lines: [ startLine, state.line - 1 ], 46 | children: [] 47 | }); 48 | state.tokens.push({ 49 | type: 'heading_close', 50 | hLevel: marker === 0x3D/* = */ ? 1 : 2, 51 | level: state.level 52 | }); 53 | 54 | return true; 55 | }; 56 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_block/paragraph.js: -------------------------------------------------------------------------------- 1 | // Paragraph 2 | 3 | 'use strict'; 4 | 5 | 6 | module.exports = function paragraph(state, startLine/*, endLine*/) { 7 | var endLine, content, terminate, i, l, 8 | nextLine = startLine + 1, 9 | terminatorRules; 10 | 11 | endLine = state.lineMax; 12 | 13 | // jump line-by-line until empty one or EOF 14 | if (nextLine < endLine && !state.isEmpty(nextLine)) { 15 | terminatorRules = state.parser.ruler.getRules('paragraph'); 16 | 17 | for (; nextLine < endLine && !state.isEmpty(nextLine); nextLine++) { 18 | // this would be a code block normally, but after paragraph 19 | // it's considered a lazy continuation regardless of what's there 20 | if (state.tShift[nextLine] - state.blkIndent > 3) { continue; } 21 | 22 | // Some tags can terminate paragraph without empty line. 23 | terminate = false; 24 | for (i = 0, l = terminatorRules.length; i < l; i++) { 25 | if (terminatorRules[i](state, nextLine, endLine, true)) { 26 | terminate = true; 27 | break; 28 | } 29 | } 30 | if (terminate) { break; } 31 | } 32 | } 33 | 34 | content = state.getLines(startLine, nextLine, state.blkIndent, false).trim(); 35 | 36 | state.line = nextLine; 37 | if (content.length) { 38 | state.tokens.push({ 39 | type: 'paragraph_open', 40 | tight: false, 41 | lines: [ startLine, state.line ], 42 | level: state.level 43 | }); 44 | state.tokens.push({ 45 | type: 'inline', 46 | content: content, 47 | level: state.level + 1, 48 | lines: [ startLine, state.line ], 49 | children: [] 50 | }); 51 | state.tokens.push({ 52 | type: 'paragraph_close', 53 | tight: false, 54 | level: state.level 55 | }); 56 | } 57 | 58 | return true; 59 | }; 60 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_core/block.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function block(state) { 4 | 5 | if (state.inlineMode) { 6 | state.tokens.push({ 7 | type: 'inline', 8 | content: state.src.replace(/\n/g, ' ').trim(), 9 | level: 0, 10 | lines: [ 0, 1 ], 11 | children: [] 12 | }); 13 | 14 | } else { 15 | state.block.parse(state.src, state.options, state.env, state.tokens); 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_core/inline.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function inline(state) { 4 | var tokens = state.tokens, tok, i, l; 5 | 6 | // Parse inlines 7 | for (i = 0, l = tokens.length; i < l; i++) { 8 | tok = tokens[i]; 9 | if (tok.type === 'inline') { 10 | state.inline.parse(tok.content, state.options, state.env, tok.children); 11 | } 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_core/replacements.js: -------------------------------------------------------------------------------- 1 | // Simple typographical replacements 2 | // 3 | 'use strict'; 4 | 5 | // TODO: 6 | // - fractionals 1/2, 1/4, 3/4 -> ½, ¼, ¾ 7 | // - miltiplication 2 x 4 -> 2 × 4 8 | 9 | var RARE_RE = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/; 10 | 11 | var SCOPED_ABBR_RE = /\((c|tm|r|p)\)/ig; 12 | var SCOPED_ABBR = { 13 | 'c': '©', 14 | 'r': '®', 15 | 'p': '§', 16 | 'tm': '™' 17 | }; 18 | 19 | function replaceScopedAbbr(str) { 20 | if (str.indexOf('(') < 0) { return str; } 21 | 22 | return str.replace(SCOPED_ABBR_RE, function(match, name) { 23 | return SCOPED_ABBR[name.toLowerCase()]; 24 | }); 25 | } 26 | 27 | 28 | module.exports = function replace(state) { 29 | var i, token, text, inlineTokens, blkIdx; 30 | 31 | if (!state.options.typographer) { return; } 32 | 33 | for (blkIdx = state.tokens.length - 1; blkIdx >= 0; blkIdx--) { 34 | 35 | if (state.tokens[blkIdx].type !== 'inline') { continue; } 36 | 37 | inlineTokens = state.tokens[blkIdx].children; 38 | 39 | for (i = inlineTokens.length - 1; i >= 0; i--) { 40 | token = inlineTokens[i]; 41 | if (token.type === 'text') { 42 | text = token.content; 43 | 44 | text = replaceScopedAbbr(text); 45 | 46 | if (RARE_RE.test(text)) { 47 | text = text 48 | .replace(/\+-/g, '±') 49 | // .., ..., ....... -> … 50 | // but ?..... & !..... -> ?.. & !.. 51 | .replace(/\.{2,}/g, '…').replace(/([?!])…/g, '$1..') 52 | .replace(/([?!]){4,}/g, '$1$1$1').replace(/,{2,}/g, ',') 53 | // em-dash 54 | .replace(/(^|[^-])---([^-]|$)/mg, '$1\u2014$2') 55 | // en-dash 56 | .replace(/(^|\s)--(\s|$)/mg, '$1\u2013$2') 57 | .replace(/(^|[^-\s])--([^-\s]|$)/mg, '$1\u2013$2'); 58 | } 59 | 60 | token.content = text; 61 | } 62 | } 63 | } 64 | }; 65 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_inline/backticks.js: -------------------------------------------------------------------------------- 1 | // Parse backticks 2 | 3 | 'use strict'; 4 | 5 | module.exports = function backticks(state, silent) { 6 | var start, max, marker, matchStart, matchEnd, 7 | pos = state.pos, 8 | ch = state.src.charCodeAt(pos); 9 | 10 | if (ch !== 0x60/* ` */) { return false; } 11 | 12 | start = pos; 13 | pos++; 14 | max = state.posMax; 15 | 16 | while (pos < max && state.src.charCodeAt(pos) === 0x60/* ` */) { pos++; } 17 | 18 | marker = state.src.slice(start, pos); 19 | 20 | matchStart = matchEnd = pos; 21 | 22 | while ((matchStart = state.src.indexOf('`', matchEnd)) !== -1) { 23 | matchEnd = matchStart + 1; 24 | 25 | while (matchEnd < max && state.src.charCodeAt(matchEnd) === 0x60/* ` */) { matchEnd++; } 26 | 27 | if (matchEnd - matchStart === marker.length) { 28 | if (!silent) { 29 | state.push({ 30 | type: 'code', 31 | content: state.src.slice(pos, matchStart) 32 | .replace(/[ \n]+/g, ' ') 33 | .trim(), 34 | block: false, 35 | level: state.level 36 | }); 37 | } 38 | state.pos = matchEnd; 39 | return true; 40 | } 41 | } 42 | 43 | if (!silent) { state.pending += marker; } 44 | state.pos += marker.length; 45 | return true; 46 | }; 47 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_inline/entity.js: -------------------------------------------------------------------------------- 1 | // Process html entity - {, ¯, ", ... 2 | 3 | 'use strict'; 4 | 5 | var entities = require('../common/entities'); 6 | var has = require('../common/utils').has; 7 | var isValidEntityCode = require('../common/utils').isValidEntityCode; 8 | var fromCodePoint = require('../common/utils').fromCodePoint; 9 | 10 | 11 | var DIGITAL_RE = /^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i; 12 | var NAMED_RE = /^&([a-z][a-z0-9]{1,31});/i; 13 | 14 | 15 | module.exports = function entity(state, silent) { 16 | var ch, code, match, pos = state.pos, max = state.posMax; 17 | 18 | if (state.src.charCodeAt(pos) !== 0x26/* & */) { return false; } 19 | 20 | if (pos + 1 < max) { 21 | ch = state.src.charCodeAt(pos + 1); 22 | 23 | if (ch === 0x23 /* # */) { 24 | match = state.src.slice(pos).match(DIGITAL_RE); 25 | if (match) { 26 | if (!silent) { 27 | code = match[1][0].toLowerCase() === 'x' ? parseInt(match[1].slice(1), 16) : parseInt(match[1], 10); 28 | state.pending += isValidEntityCode(code) ? fromCodePoint(code) : fromCodePoint(0xFFFD); 29 | } 30 | state.pos += match[0].length; 31 | return true; 32 | } 33 | } else { 34 | match = state.src.slice(pos).match(NAMED_RE); 35 | if (match) { 36 | if (has(entities, match[1])) { 37 | if (!silent) { state.pending += entities[match[1]]; } 38 | state.pos += match[0].length; 39 | return true; 40 | } 41 | } 42 | } 43 | } 44 | 45 | if (!silent) { state.pending += '&'; } 46 | state.pos++; 47 | return true; 48 | }; 49 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_inline/escape.js: -------------------------------------------------------------------------------- 1 | // Proceess escaped chars and hardbreaks 2 | 3 | 'use strict'; 4 | 5 | var ESCAPED = []; 6 | 7 | for (var i = 0; i < 256; i++) { ESCAPED.push(0); } 8 | 9 | '\\!"#$%&\'()*+,./:;<=>?@[]^_`{|}~-' 10 | .split('').forEach(function(ch) { ESCAPED[ch.charCodeAt(0)] = 1; }); 11 | 12 | 13 | module.exports = function escape(state, silent) { 14 | var ch, pos = state.pos, max = state.posMax; 15 | 16 | if (state.src.charCodeAt(pos) !== 0x5C/* \ */) { return false; } 17 | 18 | pos++; 19 | 20 | if (pos < max) { 21 | ch = state.src.charCodeAt(pos); 22 | 23 | if (ch < 256 && ESCAPED[ch] !== 0) { 24 | if (!silent) { state.pending += state.src[pos]; } 25 | state.pos += 2; 26 | return true; 27 | } 28 | 29 | if (ch === 0x0A) { 30 | if (!silent) { 31 | state.push({ 32 | type: 'hardbreak', 33 | level: state.level 34 | }); 35 | } 36 | 37 | pos++; 38 | // skip leading whitespaces from next line 39 | while (pos < max && state.src.charCodeAt(pos) === 0x20) { pos++; } 40 | 41 | state.pos = pos; 42 | return true; 43 | } 44 | } 45 | 46 | if (!silent) { state.pending += '\\'; } 47 | state.pos++; 48 | return true; 49 | }; 50 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_inline/footnote_inline.js: -------------------------------------------------------------------------------- 1 | // Process inline footnotes (^[...]) 2 | 3 | 'use strict'; 4 | 5 | var parseLinkLabel = require('../helpers/parse_link_label'); 6 | 7 | 8 | module.exports = function footnote_inline(state, silent) { 9 | var labelStart, 10 | labelEnd, 11 | footnoteId, 12 | oldLength, 13 | max = state.posMax, 14 | start = state.pos; 15 | 16 | if (start + 2 >= max) { return false; } 17 | if (state.src.charCodeAt(start) !== 0x5E/* ^ */) { return false; } 18 | if (state.src.charCodeAt(start + 1) !== 0x5B/* [ */) { return false; } 19 | if (state.level >= state.options.maxNesting) { return false; } 20 | 21 | labelStart = start + 2; 22 | labelEnd = parseLinkLabel(state, start + 1); 23 | 24 | // parser failed to find ']', so it's not a valid note 25 | if (labelEnd < 0) { return false; } 26 | 27 | // We found the end of the link, and know for a fact it's a valid link; 28 | // so all that's left to do is to call tokenizer. 29 | // 30 | if (!silent) { 31 | if (!state.env.footnotes) { state.env.footnotes = {}; } 32 | if (!state.env.footnotes.list) { state.env.footnotes.list = []; } 33 | footnoteId = state.env.footnotes.list.length; 34 | 35 | state.pos = labelStart; 36 | state.posMax = labelEnd; 37 | 38 | state.push({ 39 | type: 'footnote_ref', 40 | id: footnoteId, 41 | level: state.level 42 | }); 43 | state.linkLevel++; 44 | oldLength = state.tokens.length; 45 | state.parser.tokenize(state); 46 | state.env.footnotes.list[footnoteId] = { tokens: state.tokens.splice(oldLength) }; 47 | state.linkLevel--; 48 | } 49 | 50 | state.pos = labelEnd + 1; 51 | state.posMax = max; 52 | return true; 53 | }; 54 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_inline/footnote_ref.js: -------------------------------------------------------------------------------- 1 | // Process footnote references ([^...]) 2 | 3 | 'use strict'; 4 | 5 | 6 | module.exports = function footnote_ref(state, silent) { 7 | var label, 8 | pos, 9 | footnoteId, 10 | footnoteSubId, 11 | max = state.posMax, 12 | start = state.pos; 13 | 14 | // should be at least 4 chars - "[^x]" 15 | if (start + 3 > max) { return false; } 16 | 17 | if (!state.env.footnotes || !state.env.footnotes.refs) { return false; } 18 | if (state.src.charCodeAt(start) !== 0x5B/* [ */) { return false; } 19 | if (state.src.charCodeAt(start + 1) !== 0x5E/* ^ */) { return false; } 20 | if (state.level >= state.options.maxNesting) { return false; } 21 | 22 | for (pos = start + 2; pos < max; pos++) { 23 | if (state.src.charCodeAt(pos) === 0x20) { return false; } 24 | if (state.src.charCodeAt(pos) === 0x0A) { return false; } 25 | if (state.src.charCodeAt(pos) === 0x5D /* ] */) { 26 | break; 27 | } 28 | } 29 | 30 | if (pos === start + 2) { return false; } // no empty footnote labels 31 | if (pos >= max) { return false; } 32 | pos++; 33 | 34 | label = state.src.slice(start + 2, pos - 1); 35 | if (typeof state.env.footnotes.refs[':' + label] === 'undefined') { return false; } 36 | 37 | if (!silent) { 38 | if (!state.env.footnotes.list) { state.env.footnotes.list = []; } 39 | 40 | if (state.env.footnotes.refs[':' + label] < 0) { 41 | footnoteId = state.env.footnotes.list.length; 42 | state.env.footnotes.list[footnoteId] = { label: label, count: 0 }; 43 | state.env.footnotes.refs[':' + label] = footnoteId; 44 | } else { 45 | footnoteId = state.env.footnotes.refs[':' + label]; 46 | } 47 | 48 | footnoteSubId = state.env.footnotes.list[footnoteId].count; 49 | state.env.footnotes.list[footnoteId].count++; 50 | 51 | state.push({ 52 | type: 'footnote_ref', 53 | id: footnoteId, 54 | subId: footnoteSubId, 55 | level: state.level 56 | }); 57 | } 58 | 59 | state.pos = pos; 60 | state.posMax = max; 61 | return true; 62 | }; 63 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_inline/htmltag.js: -------------------------------------------------------------------------------- 1 | // Process html tags 2 | 3 | 'use strict'; 4 | 5 | 6 | var HTML_TAG_RE = require('../common/html_re').HTML_TAG_RE; 7 | 8 | 9 | function isLetter(ch) { 10 | /*eslint no-bitwise:0*/ 11 | var lc = ch | 0x20; // to lower case 12 | return (lc >= 0x61/* a */) && (lc <= 0x7a/* z */); 13 | } 14 | 15 | 16 | module.exports = function htmltag(state, silent) { 17 | var ch, match, max, pos = state.pos; 18 | 19 | if (!state.options.html) { return false; } 20 | 21 | // Check start 22 | max = state.posMax; 23 | if (state.src.charCodeAt(pos) !== 0x3C/* < */ || 24 | pos + 2 >= max) { 25 | return false; 26 | } 27 | 28 | // Quick fail on second char 29 | ch = state.src.charCodeAt(pos + 1); 30 | if (ch !== 0x21/* ! */ && 31 | ch !== 0x3F/* ? */ && 32 | ch !== 0x2F/* / */ && 33 | !isLetter(ch)) { 34 | return false; 35 | } 36 | 37 | match = state.src.slice(pos).match(HTML_TAG_RE); 38 | if (!match) { return false; } 39 | 40 | if (!silent) { 41 | state.push({ 42 | type: 'htmltag', 43 | content: state.src.slice(pos, pos + match[0].length), 44 | level: state.level 45 | }); 46 | } 47 | state.pos += match[0].length; 48 | return true; 49 | }; 50 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_inline/newline.js: -------------------------------------------------------------------------------- 1 | // Proceess '\n' 2 | 3 | 'use strict'; 4 | 5 | module.exports = function newline(state, silent) { 6 | var pmax, max, pos = state.pos; 7 | 8 | if (state.src.charCodeAt(pos) !== 0x0A/* \n */) { return false; } 9 | 10 | pmax = state.pending.length - 1; 11 | max = state.posMax; 12 | 13 | // ' \n' -> hardbreak 14 | // Lookup in pending chars is bad practice! Don't copy to other rules! 15 | // Pending string is stored in concat mode, indexed lookups will cause 16 | // convertion to flat mode. 17 | if (!silent) { 18 | if (pmax >= 0 && state.pending.charCodeAt(pmax) === 0x20) { 19 | if (pmax >= 1 && state.pending.charCodeAt(pmax - 1) === 0x20) { 20 | state.pending = state.pending.replace(/ +$/, ''); 21 | state.push({ 22 | type: 'hardbreak', 23 | level: state.level 24 | }); 25 | } else { 26 | state.pending = state.pending.slice(0, -1); 27 | state.push({ 28 | type: 'softbreak', 29 | level: state.level 30 | }); 31 | } 32 | 33 | } else { 34 | state.push({ 35 | type: 'softbreak', 36 | level: state.level 37 | }); 38 | } 39 | } 40 | 41 | pos++; 42 | 43 | // skip heading spaces for next line 44 | while (pos < max && state.src.charCodeAt(pos) === 0x20) { pos++; } 45 | 46 | state.pos = pos; 47 | return true; 48 | }; 49 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_inline/sub.js: -------------------------------------------------------------------------------- 1 | // Process ~subscript~ 2 | 3 | 'use strict'; 4 | 5 | // same as UNESCAPE_MD_RE plus a space 6 | var UNESCAPE_RE = /\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g; 7 | 8 | module.exports = function sub(state, silent) { 9 | var found, 10 | content, 11 | max = state.posMax, 12 | start = state.pos; 13 | 14 | if (state.src.charCodeAt(start) !== 0x7E/* ~ */) { return false; } 15 | if (silent) { return false; } // don't run any pairs in validation mode 16 | if (start + 2 >= max) { return false; } 17 | if (state.level >= state.options.maxNesting) { return false; } 18 | 19 | state.pos = start + 1; 20 | 21 | while (state.pos < max) { 22 | if (state.src.charCodeAt(state.pos) === 0x7E/* ~ */) { 23 | found = true; 24 | break; 25 | } 26 | 27 | state.parser.skipToken(state); 28 | } 29 | 30 | if (!found || start + 1 === state.pos) { 31 | state.pos = start; 32 | return false; 33 | } 34 | 35 | content = state.src.slice(start + 1, state.pos); 36 | 37 | // don't allow unescaped spaces/newlines inside 38 | if (content.match(/(^|[^\\])(\\\\)*\s/)) { 39 | state.pos = start; 40 | return false; 41 | } 42 | 43 | // found! 44 | state.posMax = state.pos; 45 | state.pos = start + 1; 46 | 47 | if (!silent) { 48 | state.push({ 49 | type: 'sub', 50 | level: state.level, 51 | content: content.replace(UNESCAPE_RE, '$1') 52 | }); 53 | } 54 | 55 | state.pos = state.posMax + 1; 56 | state.posMax = max; 57 | return true; 58 | }; 59 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_inline/sup.js: -------------------------------------------------------------------------------- 1 | // Process ^superscript^ 2 | 3 | 'use strict'; 4 | 5 | // same as UNESCAPE_MD_RE plus a space 6 | var UNESCAPE_RE = /\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g; 7 | 8 | module.exports = function sup(state, silent) { 9 | var found, 10 | content, 11 | max = state.posMax, 12 | start = state.pos; 13 | 14 | if (state.src.charCodeAt(start) !== 0x5E/* ^ */) { return false; } 15 | if (silent) { return false; } // don't run any pairs in validation mode 16 | if (start + 2 >= max) { return false; } 17 | if (state.level >= state.options.maxNesting) { return false; } 18 | 19 | state.pos = start + 1; 20 | 21 | while (state.pos < max) { 22 | if (state.src.charCodeAt(state.pos) === 0x5E/* ^ */) { 23 | found = true; 24 | break; 25 | } 26 | 27 | state.parser.skipToken(state); 28 | } 29 | 30 | if (!found || start + 1 === state.pos) { 31 | state.pos = start; 32 | return false; 33 | } 34 | 35 | content = state.src.slice(start + 1, state.pos); 36 | 37 | // don't allow unescaped spaces/newlines inside 38 | if (content.match(/(^|[^\\])(\\\\)*\s/)) { 39 | state.pos = start; 40 | return false; 41 | } 42 | 43 | // found! 44 | state.posMax = state.pos; 45 | state.pos = start + 1; 46 | 47 | if (!silent) { 48 | state.push({ 49 | type: 'sup', 50 | level: state.level, 51 | content: content.replace(UNESCAPE_RE, '$1') 52 | }); 53 | } 54 | 55 | state.pos = state.posMax + 1; 56 | state.posMax = max; 57 | return true; 58 | }; 59 | -------------------------------------------------------------------------------- /vendors/remarkable/lib/rules_inline/text.js: -------------------------------------------------------------------------------- 1 | // Skip text characters for text token, place those to pending buffer 2 | // and increment current pos 3 | 4 | 'use strict'; 5 | 6 | 7 | // Rule to skip pure text 8 | // '{}$%@~+=:' reserved for extentions 9 | 10 | function isTerminatorChar(ch) { 11 | switch (ch) { 12 | case 0x0A/* \n */: 13 | case 0x5C/* \ */: 14 | case 0x60/* ` */: 15 | case 0x2A/* * */: 16 | case 0x5F/* _ */: 17 | case 0x5E/* ^ */: 18 | case 0x5B/* [ */: 19 | case 0x5D/* ] */: 20 | case 0x21/* ! */: 21 | case 0x26/* & */: 22 | case 0x3C/* < */: 23 | case 0x3E/* > */: 24 | case 0x7B/* { */: 25 | case 0x7D/* } */: 26 | case 0x24/* $ */: 27 | case 0x25/* % */: 28 | case 0x40/* @ */: 29 | case 0x7E/* ~ */: 30 | case 0x2B/* + */: 31 | case 0x3D/* = */: 32 | case 0x3A/* : */: 33 | return true; 34 | default: 35 | return false; 36 | } 37 | } 38 | 39 | module.exports = function text(state, silent) { 40 | var pos = state.pos; 41 | 42 | while (pos < state.posMax && !isTerminatorChar(state.src.charCodeAt(pos))) { 43 | pos++; 44 | } 45 | 46 | if (pos === state.pos) { return false; } 47 | 48 | if (!silent) { state.pending += state.src.slice(state.pos, pos); } 49 | 50 | state.pos = pos; 51 | 52 | return true; 53 | }; 54 | -------------------------------------------------------------------------------- /vendors/remarkable/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "remarkable", 3 | "version": "1.6.0", 4 | "description": "Markdown parser, done right. 100% Commonmark support, extensions, syntax plugins, high speed - all in one.", 5 | "homepage": "https://github.com/jonschlinkert/remarkable", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/jonschlinkert/remarkable.git" 9 | }, 10 | "maintainers": ["jonschlinkert ", "doowb "], 11 | "bugs": { 12 | "url": "https://github.com/jonschlinkert/remarkable/issues" 13 | }, 14 | "license": "MIT", 15 | "main": "index.js", 16 | "scripts": { 17 | "test": "make test" 18 | }, 19 | "dependencies": { 20 | "argparse": "~0.1.15", 21 | "autolinker": "~0.15.0" 22 | }, 23 | "devDependencies": { 24 | "ansi": "^0.3.0", 25 | "autoprefixer-stylus": "^0.3.0", 26 | "benchmark": "^1.0.0", 27 | "browserify": "*", 28 | "commonmark": "0.12.0", 29 | "coveralls": "^2.11.2", 30 | "eslint": "0.10.1", 31 | "eslint-plugin-nodeca": "^1.0.0", 32 | "istanbul": "*", 33 | "jade": "^1.6.0", 34 | "marked": "0.3.2", 35 | "stylus": "^0.49.1", 36 | "mocha": "*", 37 | "uglify-js": "*" 38 | }, 39 | "keywords": [ 40 | "md", 41 | "markdown", 42 | "process", 43 | "text", 44 | "parse", 45 | "parser", 46 | "render", 47 | "renderer", 48 | "commonmark" 49 | ] 50 | } 51 | -------------------------------------------------------------------------------- /vendors/remarkable/support/demodata.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Build demo data for embedding into html 4 | 5 | /*eslint no-console:0*/ 6 | 7 | var fs = require('fs'); 8 | var path = require('path'); 9 | 10 | console.log(JSON.stringify({ 11 | self: { 12 | demo: { 13 | code: fs.readFileSync(path.join(__dirname, '../demo/sample.js'), 'utf8'), 14 | source: fs.readFileSync(path.join(__dirname, '../demo/sample.md'), 'utf8') 15 | } 16 | } 17 | }, null, 2)); 18 | -------------------------------------------------------------------------------- /vendors/remarkable/support/entities.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // 4 | // Markdown entities generator (from html5 entities) 5 | // 6 | 'use strict'; 7 | 8 | /*eslint no-console:0*/ 9 | 10 | 11 | var http = require('http'); 12 | 13 | function codeToUni(code) { 14 | var result = code.toString(16).toUpperCase(); 15 | while (result.length < 4) { result = '0' + result; } 16 | return '\\u' + result; 17 | } 18 | 19 | function strToUni(str) { 20 | var result = codeToUni(str.charCodeAt(0)); 21 | if (str.length > 1) { 22 | result += codeToUni(str.charCodeAt(1)); 23 | } 24 | return result; 25 | } 26 | 27 | http.get('http://www.w3.org/TR/html5/entities.json', function (res) { 28 | var body = ''; 29 | res.on('data', function(chunk) { 30 | body += chunk; 31 | }); 32 | res.on('end', function() { 33 | var entities = JSON.parse(body); 34 | var out = {}; 35 | 36 | Object.keys(entities).forEach(function (entity) { 37 | // Skip legacy - not allosed in markdown 38 | if (entity[entity.length - 1] !== ';') { return; } 39 | 40 | out[entity.slice(1, -1)] = strToUni(entities[entity].characters); 41 | }); 42 | 43 | var result = []; 44 | 45 | Object.keys(out).forEach(function (key) { 46 | result.push(' "' + key + '":"' + out[key] + '"'); 47 | }); 48 | 49 | console.log('{\n' + result.join(',\n') + '\n}'); 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /vendors/remarkable/test/commonmark.js: -------------------------------------------------------------------------------- 1 | /*global describe*/ 2 | 'use strict'; 3 | 4 | 5 | var path = require('path'); 6 | 7 | 8 | var utils = require('./utils'); 9 | var Remarked = require('../'); 10 | 11 | 12 | describe('CommonMark', function () { 13 | var md = new Remarked('commonmark'); 14 | 15 | utils.addTests(path.join(__dirname, 'fixtures/commonmark/good.txt'), md); 16 | }); 17 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/abbr.txt: -------------------------------------------------------------------------------- 1 | 2 | An example from php markdown readme: 3 | 4 | . 5 | *[HTML]: Hyper Text Markup Language 6 | *[W3C]: World Wide Web Consortium 7 | The HTML specification 8 | is maintained by the W3C. 9 | . 10 |

The HTML specification 11 | is maintained by the W3C.

12 | . 13 | 14 | They can be multiline (see pandoc implementation). Not sure about newlines, but we should at least skip those definitions: 15 | 16 | . 17 | *[ 18 | foo 19 | bar 20 | ]: desc 21 | foo 22 | . 23 |

foo

24 | . 25 | 26 | They can contain arbitrary markup (see pandoc implementation): 27 | 28 | . 29 | *[`]:`]: foo 30 | \`]:\` 31 | . 32 |

`]:`

33 | . 34 | 35 | Can contain matched brackets: 36 | 37 | . 38 | *[[abbr]]: foo 39 | [abbr] 40 | . 41 |

[abbr]

42 | . 43 | 44 | No empty abbreviations: 45 | 46 | . 47 | *[foo]: 48 | foo 49 | . 50 |

*[foo]: 51 | foo

52 | . 53 | 54 | Intersecting abbreviations (first should match): 55 | 56 | . 57 | *[Bar Foo]: 123 58 | *[Foo Bar]: 456 59 | 60 | Foo Bar Foo 61 | 62 | Bar Foo Bar 63 | . 64 |

Foo Bar Foo

65 |

Bar Foo Bar

66 | . 67 | 68 | Don't bother with nested abbreviations (yet?): 69 | 70 | . 71 | *[JS]: javascript 72 | *[HTTP]: hyper text blah blah 73 | *[JS HTTP]: is awesome 74 | JS HTTP is a collection of low-level javascript HTTP-related modules 75 | . 76 |

JS HTTP is a collection of low-level javascript HTTP-related modules

77 | . 78 | 79 | Don't match the middle of the string: 80 | 81 | . 82 | *[foo]: blah 83 | *[bar]: blah 84 | foobar 85 | . 86 |

foobar

87 | . 88 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/del.txt: -------------------------------------------------------------------------------- 1 | . 2 | ~~Strikeout~~ 3 | . 4 |

Strikeout

5 | . 6 | 7 | Strikeouts have the same priority as emphases: 8 | 9 | . 10 | **~~test**~~ 11 | 12 | ~~**test~~** 13 | . 14 |

~~test~~

15 |

**test**

16 | . 17 | 18 | Strikeouts have the same priority as emphases with respect to links: 19 | . 20 | [~~link]()~~ 21 | 22 | ~~[link~~]() 23 | . 24 |

~~link~~

25 |

~~link~~

26 | . 27 | 28 | Strikeouts have the same priority as emphases with respect to backticks: 29 | . 30 | ~~`code~~` 31 | 32 | `~~code`~~ 33 | . 34 |

~~code~~

35 |

~~code~~

36 | . 37 | 38 | Nested strikeouts: 39 | . 40 | ~~foo ~~bar~~ baz~~ 41 | . 42 |

foo bar baz

43 | . 44 | 45 | . 46 | ~~f **o ~~o b~~ a** r~~ 47 | . 48 |

f o o b a r

49 | . 50 | 51 | Should not have a whitespace between text and "~~": 52 | . 53 | foo ~~ bar ~~ baz 54 | . 55 |

foo ~~ bar ~~ baz

56 | . 57 | 58 | 59 | Newline should be considered a whitespace: 60 | 61 | . 62 | ~~test 63 | ~~ 64 | 65 | ~~ 66 | test~~ 67 | 68 | ~~ 69 | test 70 | ~~ 71 | . 72 |

~~test 73 | ~~

74 |

~~ 75 | test~~

76 |

~~ 77 | test 78 | ~~

79 | . 80 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/ins.txt: -------------------------------------------------------------------------------- 1 | . 2 | ++Insert++ 3 | . 4 |

Insert

5 | . 6 | 7 | 8 | These are not inserts, you have to use exactly two "++": 9 | . 10 | x +++foo+++ 11 | 12 | x ++foo+++ 13 | 14 | x +++foo++ 15 | . 16 |

x +++foo+++

17 |

x ++foo+++

18 |

x +++foo++

19 | . 20 | 21 | Inserts have the same priority as emphases: 22 | 23 | . 24 | **++test**++ 25 | 26 | ++**test++** 27 | . 28 |

++test++

29 |

**test**

30 | . 31 | 32 | Inserts have the same priority as emphases with respect to links: 33 | . 34 | [++link]()++ 35 | 36 | ++[link++]() 37 | . 38 |

++link++

39 |

++link++

40 | . 41 | 42 | Inserts have the same priority as emphases with respect to backticks: 43 | . 44 | ++`code++` 45 | 46 | `++code`++ 47 | . 48 |

++code++

49 |

++code++

50 | . 51 | 52 | Nested inserts: 53 | . 54 | ++foo ++bar++ baz++ 55 | . 56 |

foo bar baz

57 | . 58 | 59 | . 60 | ++f **o ++o b++ a** r++ 61 | . 62 |

f o o b a r

63 | . 64 | 65 | Should not have a whitespace between text and "++": 66 | . 67 | foo ++ bar ++ baz 68 | . 69 |

foo ++ bar ++ baz

70 | . 71 | 72 | 73 | Newline should be considered a whitespace: 74 | 75 | . 76 | ++test 77 | ++ 78 | 79 | ++ 80 | test++ 81 | 82 | ++ 83 | test 84 | ++ 85 | . 86 |

++test 87 | ++

88 |

++ 89 | test++

90 |

++ 91 | test 92 | ++

93 | . 94 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/linkify.txt: -------------------------------------------------------------------------------- 1 | linkify 2 | . 3 | url http://www.youtube.com/watch?v=5Jt5GEr4AYg. 4 | . 5 |

url http://www.youtube.com/watch?v=5Jt5GEr4AYg.

6 | . 7 | 8 | 9 | don't touch text in links 10 | . 11 | [https://example.com](https://example.com) 12 | . 13 |

https://example.com

14 | . 15 | 16 | 17 | don't touch text in autolinks 18 | . 19 | 20 | . 21 |

https://example.com

22 | . 23 | 24 | 25 | don't touch text in html tags 26 | . 27 | https://example.com 28 | . 29 |

https://example.com

30 | . 31 | 32 | 33 | match links without protocol 34 | . 35 | www.example.org 36 | . 37 |

www.example.org

38 | . 39 | 40 | 41 | properly cut domain end 42 | . 43 | www.example.org版权所有 44 | . 45 |

www.example.org版权所有

46 | . 47 | 48 | 49 | emails 50 | . 51 | test@example.com 52 | 53 | mailto:test@example.com 54 | . 55 |

test@example.com

56 |

mailto:test@example.com

57 | . 58 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/mark.txt: -------------------------------------------------------------------------------- 1 | . 2 | ==Mark== 3 | . 4 |

Mark

5 | . 6 | 7 | 8 | These are not marks, you have to use exactly two "==": 9 | . 10 | x ===foo=== 11 | 12 | x ==foo=== 13 | 14 | x ===foo== 15 | . 16 |

x ===foo===

17 |

x ==foo===

18 |

x ===foo==

19 | . 20 | 21 | Marks have the same priority as emphases: 22 | 23 | . 24 | **==test**== 25 | 26 | ==**test==** 27 | . 28 |

==test==

29 |

**test**

30 | . 31 | 32 | Marks have the same priority as emphases with respect to links: 33 | . 34 | [==link]()== 35 | 36 | ==[link==]() 37 | . 38 |

==link==

39 |

==link==

40 | . 41 | 42 | Marks have the same priority as emphases with respect to backticks: 43 | . 44 | ==`code==` 45 | 46 | `==code`== 47 | . 48 |

==code==

49 |

==code==

50 | . 51 | 52 | Nested marks: 53 | . 54 | ==foo ==bar== baz== 55 | . 56 |

foo bar baz

57 | . 58 | 59 | . 60 | ==f **o ==o b== a** r== 61 | . 62 |

f o o b a r

63 | . 64 | 65 | Should not have a whitespace between text and "==": 66 | . 67 | foo == bar == baz 68 | . 69 |

foo == bar == baz

70 | . 71 | 72 | 73 | Newline should be considered a whitespace: 74 | 75 | . 76 | ==test 77 | == 78 | 79 | == 80 | test== 81 | 82 | == 83 | test 84 | == 85 | . 86 |

==test

87 |

== 88 | test==

89 |

== 90 | test 91 | ==

92 | . 93 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/proto.txt: -------------------------------------------------------------------------------- 1 | 2 | . 3 | [__proto__] 4 | 5 | [__proto__]: blah 6 | . 7 |

proto

8 | . 9 | 10 | . 11 | [^__proto__] 12 | 13 | [^__proto__]: blah 14 | . 15 |

[1]

16 |
17 |
18 |
    19 |
  1. blah

    20 |
  2. 21 |
22 |
23 | . 24 | 25 | . 26 | *[__proto__]: blah 27 | 28 | __proto__ \_\_proto\_\_ 29 | . 30 |

proto __proto__

31 | . 32 | 33 | . 34 | [hasOwnProperty] 35 | 36 | [hasOwnProperty]: blah 37 | . 38 |

hasOwnProperty

39 | . 40 | 41 | . 42 | [^hasOwnProperty] 43 | 44 | [^hasOwnProperty]: blah 45 | . 46 |

[1]

47 |
48 |
49 |
    50 |
  1. blah

    51 |
  2. 52 |
53 |
54 | . 55 | 56 | . 57 | *[hasOwnProperty]: blah 58 | 59 | hasOwnProperty 60 | . 61 |

hasOwnProperty

62 | . 63 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/smartquotes.txt: -------------------------------------------------------------------------------- 1 | Should parse nested quotes: 2 | 3 | . 4 | "foo 'bar' baz" 5 | . 6 |

“foo ‘bar’ baz”

7 | . 8 | 9 | . 10 | 'foo 'bar' baz' 11 | . 12 |

‘foo ‘bar’ baz’

13 | . 14 | 15 | 16 | Should not overlap quotes: 17 | 18 | . 19 | 'foo "bar' baz" 20 | . 21 |

‘foo "bar’ baz"

22 | . 23 | 24 | 25 | Should match quotes on the same level: 26 | 27 | . 28 | "foo *bar* baz" 29 | . 30 |

“foo bar baz”

31 | . 32 | 33 | 34 | Should not match quotes on different levels: 35 | 36 | . 37 | *"foo* bar" 38 | 39 | "foo *bar"* 40 | . 41 |

"foo bar"

42 |

"foo bar"

43 | . 44 | 45 | . 46 | *"foo* bar *baz"* 47 | . 48 |

"foo bar baz"

49 | . 50 | 51 | 52 | Should try and find matching quote in this case: 53 | 54 | . 55 | "foo "bar 'baz" 56 | . 57 |

"foo “bar 'baz”

58 | . 59 | 60 | 61 | Should not touch 'inches' in quotes: 62 | 63 | . 64 | "Monitor 21"" 65 | . 66 |

“Monitor 21"”

67 | . 68 | 69 | 70 | Should render an apostrophe as a rsquo: 71 | 72 | . 73 | This isn't and can't be the best approach to implement this... 74 | . 75 |

This isn’t and can’t be the best approach to implement this…

76 | . 77 | 78 | 79 | Apostrophe could end the word, that's why original smartypants replaces all of them as rsquo: 80 | 81 | . 82 | users' stuff 83 | . 84 |

users’ stuff

85 | . 86 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/sub.txt: -------------------------------------------------------------------------------- 1 | 2 | . 3 | ~foo\~ 4 | . 5 |

~foo~

6 | . 7 | 8 | . 9 | ~foo bar~ 10 | . 11 |

~foo bar~

12 | . 13 | 14 | . 15 | ~foo\ bar\ baz~ 16 | . 17 |

foo bar baz

18 | . 19 | 20 | . 21 | ~\ foo\ ~ 22 | . 23 |

foo

24 | . 25 | 26 | . 27 | ~foo\\\\\\\ bar~ 28 | . 29 |

foo\\\ bar

30 | . 31 | 32 | . 33 | ~foo\\\\\\ bar~ 34 | . 35 |

~foo\\\ bar~

36 | . 37 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/sup.txt: -------------------------------------------------------------------------------- 1 | 2 | . 3 | ^test^ 4 | . 5 |

test

6 | . 7 | 8 | . 9 | ^foo\^ 10 | . 11 |

^foo^

12 | . 13 | 14 | . 15 | 2^4 + 3^5 16 | . 17 |

2^4 + 3^5

18 | . 19 | 20 | . 21 | ^foo~bar^baz^bar~foo^ 22 | . 23 |

foo~barbazbar~foo

24 | . 25 | 26 | . 27 | ^\ foo\ ^ 28 | . 29 |

foo

30 | . 31 | 32 | . 33 | ^foo\\\\\\\ bar^ 34 | . 35 |

foo\\\ bar

36 | . 37 | 38 | . 39 | ^foo\\\\\\ bar^ 40 | . 41 |

^foo\\\ bar^

42 | . 43 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/typographer.txt: -------------------------------------------------------------------------------- 1 | . 2 | (bad) 3 | . 4 |

(bad)

5 | . 6 | 7 | 8 | copyright 9 | . 10 | (c) (C) 11 | . 12 |

© ©

13 | . 14 | 15 | 16 | reserved 17 | . 18 | (r) (R) 19 | . 20 |

® ®

21 | . 22 | 23 | 24 | trademark 25 | . 26 | (tm) (TM) 27 | . 28 |

™ ™

29 | . 30 | 31 | 32 | paragraph 33 | . 34 | (p) (P) 35 | . 36 |

§ §

37 | . 38 | 39 | 40 | plus-minus 41 | . 42 | +-5 43 | . 44 |

±5

45 | . 46 | 47 | 48 | ellipsis 49 | . 50 | test.. test... test..... test?..... test!.... 51 | . 52 |

test… test… test… test?.. test!..

53 | . 54 | 55 | 56 | dupes 57 | . 58 | !!!!!! ???? ,, 59 | . 60 |

!!! ??? ,

61 | . 62 | 63 | 64 | dashes 65 | . 66 | ---remarkable --- super--- 67 | 68 | remarkable---awesome 69 | 70 | abc ---- 71 | . 72 |

—remarkable — super—

73 |

remarkable—awesome

74 |

abc ----

75 | . 76 | . 77 | --remarkable -- super-- 78 | 79 | remarkable--awesome 80 | . 81 |

–remarkable – super–

82 |

remarkable–awesome

83 | . 84 | 85 | -------------------------------------------------------------------------------- /vendors/remarkable/test/fixtures/remarkable/xss.txt: -------------------------------------------------------------------------------- 1 | . 2 | [normal link](javascript) 3 | . 4 |

normal link

5 | . 6 | 7 | 8 | 9 | Should not allow some protocols in links and images 10 | 11 | . 12 | [xss link](javascript:alert(1)) 13 | 14 | [xss link](JAVASCRIPT:alert(1)) 15 | 16 | [xss link](vbscript:alert(1)) 17 | 18 | [xss link](VBSCRIPT:alert(1)) 19 | 20 | [xss link](file:///123) 21 | . 22 |

[xss link](javascript:alert(1))

23 |

[xss link](JAVASCRIPT:alert(1))

24 |

[xss link](vbscript:alert(1))

25 |

[xss link](VBSCRIPT:alert(1))

26 |

[xss link](file:///123)

27 | . 28 | 29 | 30 | . 31 | [xss link]("><script>alert("xss")</script>) 32 | . 33 |

xss link

34 | . 35 | 36 | . 37 | [xss link]() 38 | . 39 |

[xss link](<javascript:alert(1)>)

40 | . 41 | 42 | . 43 | [xss link](javascript:alert(1)) 44 | . 45 |

[xss link](javascript:alert(1))

46 | . 47 | 48 | 49 | Image parser use the same code base. 50 | 51 | . 52 | ![xss link](javascript:alert(1)) 53 | . 54 |

![xss link](javascript:alert(1))

55 | . 56 | 57 | 58 | Autolinks 59 | 60 | . 61 | 62 | 63 | 64 | . 65 |

<javascript:alert(1)>

66 |

<javascript:alert(1)>

67 | . 68 | 69 | 70 | Linkifier 71 | 72 | . 73 | javascript:alert(1) 74 | 75 | javascript:alert(1) 76 | . 77 |

javascript:alert(1)

78 |

javascript:alert(1)

79 | . 80 | -------------------------------------------------------------------------------- /vendors/remarkable/test/remarkable.js: -------------------------------------------------------------------------------- 1 | /*global describe*/ 2 | 'use strict'; 3 | 4 | 5 | var path = require('path'); 6 | 7 | 8 | var utils = require('./utils'); 9 | var Remarkable = require('../'); 10 | 11 | 12 | describe('remarkable', function () { 13 | var md = new Remarkable('full', { 14 | html: true, 15 | langPrefix: '', 16 | typographer: true, 17 | linkify: true 18 | }); 19 | 20 | utils.addTests(path.join(__dirname, 'fixtures/remarkable'), md); 21 | }); 22 | -------------------------------------------------------------------------------- /vendors/remarkable/test/utils.js: -------------------------------------------------------------------------------- 1 | /*global describe, it*/ 2 | 'use strict'; 3 | 4 | 5 | var fs = require('fs'); 6 | var path = require('path'); 7 | var assert = require('assert'); 8 | 9 | 10 | function addTests(fPath, markdown, skip) { 11 | var input, 12 | stat = fs.statSync(fPath); 13 | 14 | if (stat.isFile()) { 15 | input = fs.readFileSync(fPath, 'utf8'); 16 | 17 | input = input.replace(/→/g, '\t'); 18 | 19 | describe(fPath, function () { 20 | input.replace(/^\.\n([\s\S]*?)^\.\n([\s\S]*?)^\.$/gm, function(__, md, html, offset, orig) { 21 | var line = orig.slice(0, offset).split(/\r?\n/g).length; 22 | 23 | // Also skip tests if file name starts with "_" 24 | if (!skip && path.basename(fPath)[0] !== '_') { 25 | it('line ' + line, function () { 26 | assert.strictEqual(html, markdown.render(md)); 27 | }); 28 | } else { 29 | it.skip('line ' + line, function () { 30 | assert.strictEqual(html, markdown.render(md)); 31 | }); 32 | } 33 | }); 34 | }); 35 | 36 | return; 37 | } 38 | 39 | if (stat.isDirectory()) { 40 | fs.readdirSync(fPath).forEach(function (name) { 41 | addTests(path.join(fPath, name), markdown, skip); 42 | }); 43 | } 44 | } 45 | 46 | 47 | module.exports.addTests = addTests; 48 | --------------------------------------------------------------------------------