├── .arcconfig ├── .arclint ├── .babelrc ├── .gitignore ├── .gitmodules ├── .npmignore ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── docs ├── favicon.ico ├── images │ ├── bg1.jpg │ ├── bg2.jpg │ ├── bg3.jpg │ └── logo.png ├── js │ ├── JSXTransformer.js │ ├── codemirror.js │ ├── es5-sham.min.js │ ├── es5-shim.min.js │ ├── foldcode.js │ ├── html5shiv.min.js │ ├── javascript.js │ ├── katex.js │ └── showdown.js └── stylesheets │ ├── codemirror.css │ ├── fonts │ ├── KaTeX_AMS-Regular.ttf │ ├── KaTeX_AMS-Regular.woff │ ├── KaTeX_AMS-Regular.woff2 │ ├── KaTeX_Caligraphic-Bold.ttf │ ├── KaTeX_Caligraphic-Bold.woff │ ├── KaTeX_Caligraphic-Bold.woff2 │ ├── KaTeX_Caligraphic-Regular.ttf │ ├── KaTeX_Caligraphic-Regular.woff │ ├── KaTeX_Caligraphic-Regular.woff2 │ ├── KaTeX_Fraktur-Bold.ttf │ ├── KaTeX_Fraktur-Bold.woff │ ├── KaTeX_Fraktur-Bold.woff2 │ ├── KaTeX_Fraktur-Regular.ttf │ ├── KaTeX_Fraktur-Regular.woff │ ├── KaTeX_Fraktur-Regular.woff2 │ ├── KaTeX_Main-Bold.ttf │ ├── KaTeX_Main-Bold.woff │ ├── KaTeX_Main-Bold.woff2 │ ├── KaTeX_Main-BoldItalic.ttf │ ├── KaTeX_Main-BoldItalic.woff │ ├── KaTeX_Main-BoldItalic.woff2 │ ├── KaTeX_Main-Italic.ttf │ ├── KaTeX_Main-Italic.woff │ ├── KaTeX_Main-Italic.woff2 │ ├── KaTeX_Main-Regular.ttf │ ├── KaTeX_Main-Regular.woff │ ├── KaTeX_Main-Regular.woff2 │ ├── KaTeX_Math-Italic.ttf │ ├── KaTeX_Math-Italic.woff │ ├── KaTeX_Math-Italic.woff2 │ ├── KaTeX_SansSerif-Bold.ttf │ ├── KaTeX_SansSerif-Bold.woff │ ├── KaTeX_SansSerif-Bold.woff2 │ ├── KaTeX_SansSerif-Italic.ttf │ ├── KaTeX_SansSerif-Italic.woff │ ├── KaTeX_SansSerif-Italic.woff2 │ ├── KaTeX_SansSerif-Regular.ttf │ ├── KaTeX_SansSerif-Regular.woff │ ├── KaTeX_SansSerif-Regular.woff2 │ ├── KaTeX_Script-Regular.ttf │ ├── KaTeX_Script-Regular.woff │ ├── KaTeX_Script-Regular.woff2 │ ├── KaTeX_Size1-Regular.ttf │ ├── KaTeX_Size1-Regular.woff │ ├── KaTeX_Size1-Regular.woff2 │ ├── KaTeX_Size2-Regular.ttf │ ├── KaTeX_Size2-Regular.woff │ ├── KaTeX_Size2-Regular.woff2 │ ├── KaTeX_Size3-Regular.ttf │ ├── KaTeX_Size3-Regular.woff │ ├── KaTeX_Size3-Regular.woff2 │ ├── KaTeX_Size4-Regular.ttf │ ├── KaTeX_Size4-Regular.woff │ ├── KaTeX_Size4-Regular.woff2 │ ├── KaTeX_Typewriter-Regular.ttf │ ├── KaTeX_Typewriter-Regular.woff │ └── KaTeX_Typewriter-Regular.woff2 │ ├── index.css │ ├── katex.css │ ├── pygments.css │ ├── react.css │ └── reset.css ├── examples ├── backbone-mixin.jsx ├── blur-input.jsx ├── button-group.jsx ├── drag-target.jsx ├── i18n.jsx ├── info-tip.jsx ├── layered-component-mixin.jsx ├── modal.jsx ├── multi-button-group.jsx ├── set-interval-mixin.jsx ├── sortable.jsx ├── state-from-store-mixin.jsx ├── tex.jsx ├── timeago.jsx ├── timeout-transition-group.jsx ├── tooltip.jsx └── window-drag.jsx ├── js ├── backbone-mixin.jsx ├── blur-input.jsx ├── button-group.jsx ├── drag-target.jsx ├── i18n.jsx ├── info-tip.jsx ├── katex-a11y.js ├── layered-component-mixin.jsx ├── modal.jsx ├── multi-button-group.jsx ├── set-interval-mixin.jsx ├── sortable.jsx ├── state-from-store-mixin.jsx ├── styles.js ├── tex.jsx ├── timeago.jsx ├── timeout-transition-group.jsx ├── tooltip.jsx └── window-drag.jsx ├── lint_blacklist.txt ├── make_template.py ├── package-lock.json ├── package.json ├── prepublish.js ├── reactify-components.jsx ├── requirements.txt ├── template.html └── test ├── blur-input-test.jsx ├── button-group-test.jsx ├── drag-target-test.jsx ├── i18n-test.jsx ├── katex-a11y-math.txt ├── katex-a11y-test.jsx ├── katex-a11y-tex.json ├── layered-component-mixin-test.jsx ├── modal_test.jsx ├── state-from-store-mixin.jsx ├── test-helper.js ├── tex-test.jsx └── window-drag-test.jsx /.arcconfig: -------------------------------------------------------------------------------- 1 | { 2 | "conduit_uri": "https://phabricator.khanacademy.org/", 3 | "lint.engine": "ArcanistConfigurationDrivenLintEngine" 4 | } 5 | -------------------------------------------------------------------------------- /.arclint: -------------------------------------------------------------------------------- 1 | { 2 | "linters": { 3 | "khan-linter": { 4 | "type": "script-and-regex", 5 | "script-and-regex.script": "ka-lint --always-exit-0 --blacklist=yes --propose-arc-fixes", 6 | "script-and-regex.regex": "\/^((?P[^:]*):(?P\\d+):((?P\\d+):)? (?P((?PE)|(?PW))\\S+) (?P[^\\x00\n]*)(\\x00(?P[^\\x00]*)\\x00(?P[^\\x00]*)\\x00)?)|(?PSKIPPING.*)$\/m" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015", "react"] 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | !/js/*.js 3 | !/test/*.js 4 | node_modules 5 | index.html 6 | venv 7 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "react-live-editor"] 2 | path = react-live-editor 3 | url = https://github.com/Khan/react-live-editor 4 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | docs 3 | venv 4 | requirements.txt 5 | Makefile 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '4' 4 | env: 5 | - CXX=g++-4.8 6 | addons: 7 | apt: 8 | sources: 9 | - ubuntu-toolchain-r-test 10 | packages: 11 | - g++-4.8 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Khan Academy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all docs pydeps jsdeps 2 | 3 | all: bundle.js docs 4 | 5 | pydeps: 6 | pip install -r requirements.txt 7 | 8 | jsdeps: 9 | npm install 10 | 11 | docs: docs/preview-bundle.js docs/index.html 12 | 13 | pages: docs 14 | # switch to the other branch, move everything out of docs, commit, and push 15 | git checkout gh-pages 16 | git checkout master -- docs 17 | cp -r docs/* . 18 | rm -rf docs 19 | git add . 20 | git commit -anm "Automatic commit by $(shell git config --get user.name) ($(shell git config --get user.email))" 21 | git push 22 | git checkout master 23 | 24 | bundle.js: jsdeps 25 | ./node_modules/.bin/browserify -t [ babelify --presets [ es2015 react ] ] js/*.jsx -o bundle.js 26 | 27 | docs/index.html: pydeps 28 | ./make_template.py 29 | 30 | docs/preview-bundle.js: jsdeps 31 | ./node_modules/.bin/browserify -d -t [ babelify --presets [ es2015 react ] ] reactify-components.jsx -o docs/preview-bundle.js 32 | 33 | watch-preview: jsdeps 34 | ./node_modules/.bin/watchify -d -t [ babelify --presets [ es2015 react ] ] js/*.jsx reactify-components.jsx -o docs/preview-bundle.js 35 | 36 | test: jsdeps 37 | ./node_modules/.bin/mocha --reporter spec --compilers jsx:babel-register -r test/test-helper.js test/*test.jsx 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/Khan/react-components.svg?branch=master)](https://travis-ci.org/Khan/react-components) 2 | 3 | # Khan Academy React Components 4 | 5 | Some components we build for Khan Academy that the world might find useful. 6 | 7 | See http://khan.github.io/react-components/ for a demo and descriptions of 8 | the individual components. 9 | 10 | ## License 11 | 12 | [MIT License](http://opensource.org/licenses/MIT) 13 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Khan/react-components/a9315ce68a8a5d2afafe42f965988cbb10ce10f6/docs/favicon.ico -------------------------------------------------------------------------------- /docs/images/bg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Khan/react-components/a9315ce68a8a5d2afafe42f965988cbb10ce10f6/docs/images/bg1.jpg -------------------------------------------------------------------------------- /docs/images/bg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Khan/react-components/a9315ce68a8a5d2afafe42f965988cbb10ce10f6/docs/images/bg2.jpg -------------------------------------------------------------------------------- /docs/images/bg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Khan/react-components/a9315ce68a8a5d2afafe42f965988cbb10ce10f6/docs/images/bg3.jpg -------------------------------------------------------------------------------- /docs/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Khan/react-components/a9315ce68a8a5d2afafe42f965988cbb10ce10f6/docs/images/logo.png -------------------------------------------------------------------------------- /docs/js/es5-sham.min.js: -------------------------------------------------------------------------------- 1 | (function(definition){if(typeof define=="function"){define(definition)}else if(typeof YUI=="function"){YUI.add("es5-sham",definition)}else{definition()}})(function(){var call=Function.prototype.call;var prototypeOfObject=Object.prototype;var owns=call.bind(prototypeOfObject.hasOwnProperty);var defineGetter;var defineSetter;var lookupGetter;var lookupSetter;var supportsAccessors;if(supportsAccessors=owns(prototypeOfObject,"__defineGetter__")){defineGetter=call.bind(prototypeOfObject.__defineGetter__);defineSetter=call.bind(prototypeOfObject.__defineSetter__);lookupGetter=call.bind(prototypeOfObject.__lookupGetter__);lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)}if(!Object.getPrototypeOf){Object.getPrototypeOf=function getPrototypeOf(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}}function doesGetOwnPropertyDescriptorWork(object){try{object.sentinel=0;return Object.getOwnPropertyDescriptor(object,"sentinel").value===0}catch(exception){}}if(Object.defineProperty){var getOwnPropertyDescriptorWorksOnObject=doesGetOwnPropertyDescriptorWork({});var getOwnPropertyDescriptorWorksOnDom=typeof document=="undefined"||doesGetOwnPropertyDescriptorWork(document.createElement("div"));if(!getOwnPropertyDescriptorWorksOnDom||!getOwnPropertyDescriptorWorksOnObject){var getOwnPropertyDescriptorFallback=Object.getOwnPropertyDescriptor}}if(!Object.getOwnPropertyDescriptor||getOwnPropertyDescriptorFallback){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function getOwnPropertyDescriptor(object,property){if(typeof object!="object"&&typeof object!="function"||object===null){throw new TypeError(ERR_NON_OBJECT+object)}if(getOwnPropertyDescriptorFallback){try{return getOwnPropertyDescriptorFallback.call(Object,object,property)}catch(exception){}}if(!owns(object,property)){return}var descriptor={enumerable:true,configurable:true};if(supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property);var setter=lookupSetter(object,property);object.__proto__=prototype;if(getter||setter){if(getter){descriptor.get=getter}if(setter){descriptor.set=setter}return descriptor}}descriptor.value=object[property];descriptor.writable=true;return descriptor}}if(!Object.getOwnPropertyNames){Object.getOwnPropertyNames=function getOwnPropertyNames(object){return Object.keys(object)}}if(!Object.create){var createEmpty;var supportsProto=Object.prototype.__proto__===null;if(supportsProto||typeof document=="undefined"){createEmpty=function(){return{__proto__:null}}}else{createEmpty=function(){var iframe=document.createElement("iframe");var parent=document.body||document.documentElement;iframe.style.display="none";parent.appendChild(iframe);iframe.src="javascript:";var empty=iframe.contentWindow.Object.prototype;parent.removeChild(iframe);iframe=null;delete empty.constructor;delete empty.hasOwnProperty;delete empty.propertyIsEnumerable;delete empty.isPrototypeOf;delete empty.toLocaleString;delete empty.toString;delete empty.valueOf;empty.__proto__=null;function Empty(){}Empty.prototype=empty;createEmpty=function(){return new Empty};return new Empty}}Object.create=function create(prototype,properties){var object;function Type(){}if(prototype===null){object=createEmpty()}else{if(typeof prototype!=="object"&&typeof prototype!=="function"){throw new TypeError("Object prototype may only be an Object or null")}Type.prototype=prototype;object=new Type;object.__proto__=prototype}if(properties!==void 0){Object.defineProperties(object,properties)}return object}}function doesDefinePropertyWork(object){try{Object.defineProperty(object,"sentinel",{});return"sentinel"in object}catch(exception){}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({});var definePropertyWorksOnDom=typeof document=="undefined"||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom){var definePropertyFallback=Object.defineProperty,definePropertiesFallback=Object.defineProperties}}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ";var ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ";var ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined "+"on this javascript engine";Object.defineProperty=function defineProperty(object,property,descriptor){if(typeof object!="object"&&typeof object!="function"||object===null){throw new TypeError(ERR_NON_OBJECT_TARGET+object)}if(typeof descriptor!="object"&&typeof descriptor!="function"||descriptor===null){throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor)}if(definePropertyFallback){try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}}if(owns(descriptor,"value")){if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject;delete object[property];object[property]=descriptor.value;object.__proto__=prototype}else{object[property]=descriptor.value}}else{if(!supportsAccessors){throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED)}if(owns(descriptor,"get")){defineGetter(object,property,descriptor.get)}if(owns(descriptor,"set")){defineSetter(object,property,descriptor.set)}}return object}}if(!Object.defineProperties||definePropertiesFallback){Object.defineProperties=function defineProperties(object,properties){if(definePropertiesFallback){try{return definePropertiesFallback.call(Object,object,properties)}catch(exception){}}for(var property in properties){if(owns(properties,property)&&property!="__proto__"){Object.defineProperty(object,property,properties[property])}}return object}}if(!Object.seal){Object.seal=function seal(object){return object}}if(!Object.freeze){Object.freeze=function freeze(object){return object}}try{Object.freeze(function(){})}catch(exception){Object.freeze=function freeze(freezeObject){return function freeze(object){if(typeof object=="function"){return object}else{return freezeObject(object)}}}(Object.freeze)}if(!Object.preventExtensions){Object.preventExtensions=function preventExtensions(object){return object}}if(!Object.isSealed){Object.isSealed=function isSealed(object){return false}}if(!Object.isFrozen){Object.isFrozen=function isFrozen(object){return false}}if(!Object.isExtensible){Object.isExtensible=function isExtensible(object){if(Object(object)!==object){throw new TypeError}var name="";while(owns(object,name)){name+="?"}object[name]=true;var returnValue=owns(object,name);delete object[name];return returnValue}}}); 2 | //# sourceMappingURL=es5-sham.map -------------------------------------------------------------------------------- /docs/js/foldcode.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | "use strict"; 13 | 14 | function doFold(cm, pos, options, force) { 15 | if (options && options.call) { 16 | var finder = options; 17 | options = null; 18 | } else { 19 | var finder = getOption(cm, options, "rangeFinder"); 20 | } 21 | if (typeof pos == "number") pos = CodeMirror.Pos(pos, 0); 22 | var minSize = getOption(cm, options, "minFoldSize"); 23 | 24 | function getRange(allowFolded) { 25 | var range = finder(cm, pos); 26 | if (!range || range.to.line - range.from.line < minSize) return null; 27 | var marks = cm.findMarksAt(range.from); 28 | for (var i = 0; i < marks.length; ++i) { 29 | if (marks[i].__isFold && force !== "fold") { 30 | if (!allowFolded) return null; 31 | range.cleared = true; 32 | marks[i].clear(); 33 | } 34 | } 35 | return range; 36 | } 37 | 38 | var range = getRange(true); 39 | if (getOption(cm, options, "scanUp")) while (!range && pos.line > cm.firstLine()) { 40 | pos = CodeMirror.Pos(pos.line - 1, 0); 41 | range = getRange(false); 42 | } 43 | if (!range || range.cleared || force === "unfold") return; 44 | 45 | var myWidget = makeWidget(cm, options); 46 | CodeMirror.on(myWidget, "mousedown", function(e) { 47 | myRange.clear(); 48 | CodeMirror.e_preventDefault(e); 49 | }); 50 | var myRange = cm.markText(range.from, range.to, { 51 | replacedWith: myWidget, 52 | clearOnEnter: true, 53 | __isFold: true 54 | }); 55 | myRange.on("clear", function(from, to) { 56 | CodeMirror.signal(cm, "unfold", cm, from, to); 57 | }); 58 | CodeMirror.signal(cm, "fold", cm, range.from, range.to); 59 | } 60 | 61 | function makeWidget(cm, options) { 62 | var widget = getOption(cm, options, "widget"); 63 | if (typeof widget == "string") { 64 | var text = document.createTextNode(widget); 65 | widget = document.createElement("span"); 66 | widget.appendChild(text); 67 | widget.className = "CodeMirror-foldmarker"; 68 | } 69 | return widget; 70 | } 71 | 72 | // Clumsy backwards-compatible interface 73 | CodeMirror.newFoldFunction = function(rangeFinder, widget) { 74 | return function(cm, pos) { doFold(cm, pos, {rangeFinder: rangeFinder, widget: widget}); }; 75 | }; 76 | 77 | // New-style interface 78 | CodeMirror.defineExtension("foldCode", function(pos, options, force) { 79 | doFold(this, pos, options, force); 80 | }); 81 | 82 | CodeMirror.defineExtension("isFolded", function(pos) { 83 | var marks = this.findMarksAt(pos); 84 | for (var i = 0; i < marks.length; ++i) 85 | if (marks[i].__isFold) return true; 86 | }); 87 | 88 | CodeMirror.commands.toggleFold = function(cm) { 89 | cm.foldCode(cm.getCursor()); 90 | }; 91 | CodeMirror.commands.fold = function(cm) { 92 | cm.foldCode(cm.getCursor(), null, "fold"); 93 | }; 94 | CodeMirror.commands.unfold = function(cm) { 95 | cm.foldCode(cm.getCursor(), null, "unfold"); 96 | }; 97 | CodeMirror.commands.foldAll = function(cm) { 98 | cm.operation(function() { 99 | for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++) 100 | cm.foldCode(CodeMirror.Pos(i, 0), null, "fold"); 101 | }); 102 | }; 103 | CodeMirror.commands.unfoldAll = function(cm) { 104 | cm.operation(function() { 105 | for (var i = cm.firstLine(), e = cm.lastLine(); i <= e; i++) 106 | cm.foldCode(CodeMirror.Pos(i, 0), null, "unfold"); 107 | }); 108 | }; 109 | 110 | CodeMirror.registerHelper("fold", "combine", function() { 111 | var funcs = Array.prototype.slice.call(arguments, 0); 112 | return function(cm, start) { 113 | for (var i = 0; i < funcs.length; ++i) { 114 | var found = funcs[i](cm, start); 115 | if (found) return found; 116 | } 117 | }; 118 | }); 119 | 120 | CodeMirror.registerHelper("fold", "auto", function(cm, start) { 121 | var helpers = cm.getHelpers(start, "fold"); 122 | for (var i = 0; i < helpers.length; i++) { 123 | var cur = helpers[i](cm, start); 124 | if (cur) return cur; 125 | } 126 | }); 127 | 128 | var defaultOptions = { 129 | rangeFinder: CodeMirror.fold.auto, 130 | widget: "\u2194", 131 | minFoldSize: 0, 132 | scanUp: false 133 | }; 134 | 135 | CodeMirror.defineOption("foldOptions", null); 136 | 137 | function getOption(cm, options, name) { 138 | if (options && options[name] !== undefined) 139 | return options[name]; 140 | var editorOptions = cm.options.foldOptions; 141 | if (editorOptions && editorOptions[name] !== undefined) 142 | return editorOptions[name]; 143 | return defaultOptions[name]; 144 | } 145 | }); 146 | -------------------------------------------------------------------------------- /docs/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); 8 | for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d