mirror of
https://github.com/chinchang/web-maker.git
synced 2025-08-04 12:27:28 +02:00
Merge branch 'build' into gh-pages
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
"computed-property-spacing": ["error", "never"],
|
||||
"consistent-return": "error",
|
||||
"consistent-this": "off",
|
||||
"curly": "error",
|
||||
"curly": "off",
|
||||
"default-case": "error",
|
||||
"dot-location": ["error", "property"],
|
||||
"dot-notation": "error",
|
||||
@@ -28,7 +28,7 @@
|
||||
"func-names": "off",
|
||||
"func-style": ["error", "declaration", { "allowArrowFunctions": true }],
|
||||
"generator-star-spacing": "error",
|
||||
"global-require": "error",
|
||||
"global-require": "off",
|
||||
"guard-for-in": "error",
|
||||
"handle-callback-err": "error",
|
||||
"id-blacklist": "error",
|
||||
@@ -46,7 +46,7 @@
|
||||
"new-parens": "error",
|
||||
"newline-after-var": "off",
|
||||
"newline-before-return": "off",
|
||||
"newline-per-chained-call": "error",
|
||||
"newline-per-chained-call": "off",
|
||||
"no-alert": "off",
|
||||
"no-array-constructor": "error",
|
||||
"no-bitwise": "off",
|
||||
@@ -115,12 +115,12 @@
|
||||
"no-shadow": "error",
|
||||
"no-shadow-restricted-names": "error",
|
||||
"no-spaced-func": "error",
|
||||
"no-sync": "error",
|
||||
"no-sync": "off",
|
||||
"no-ternary": "off",
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-undefined": "error",
|
||||
"no-undefined": "off",
|
||||
"no-underscore-dangle": "error",
|
||||
"no-unmodified-loop-condition": "error",
|
||||
"no-unneeded-ternary": "error",
|
||||
@@ -138,7 +138,7 @@
|
||||
"no-warning-comments": "off",
|
||||
"no-whitespace-before-property": "error",
|
||||
"no-with": "error",
|
||||
"object-curly-spacing": ["error", "always"],
|
||||
"object-curly-spacing": "off",
|
||||
"object-property-newline": "off",
|
||||
"object-shorthand": "off",
|
||||
"one-var": "off",
|
||||
@@ -200,6 +200,8 @@
|
||||
"escodegen": true,
|
||||
"utils": true,
|
||||
"Promise": true,
|
||||
"Inlet": true
|
||||
"Inlet": true,
|
||||
"db": true,
|
||||
"firebase": true
|
||||
}
|
||||
}
|
||||
|
BIN
app/FiraCode.ttf
Normal file
BIN
app/FiraCode.ttf
Normal file
Binary file not shown.
BIN
app/Fixedsys.ttf
Normal file
BIN
app/Fixedsys.ttf
Normal file
Binary file not shown.
BIN
app/Inconsolata.ttf
Executable file
BIN
app/Inconsolata.ttf
Executable file
Binary file not shown.
BIN
app/Monoid.ttf
Normal file
BIN
app/Monoid.ttf
Normal file
Binary file not shown.
BIN
app/icon-48.png
Normal file
BIN
app/icon-48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
589
app/index.html
Normal file
589
app/index.html
Normal file
@@ -0,0 +1,589 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Web Maker</title>
|
||||
|
||||
<style>
|
||||
/* Critically acclaimed CSS */
|
||||
.saved-items-pane {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 450px;
|
||||
transform: translateX(100%);
|
||||
}
|
||||
.modal {
|
||||
visibility: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="vendor.css">
|
||||
|
||||
<link rel="stylesheet" id="editorThemeLinkTag" href="lib/codemirror/theme/monokai.css"></link>
|
||||
|
||||
<link rel="stylesheet" href="style.css">
|
||||
|
||||
<style id="fontStyleTemplate" type="template">
|
||||
@font-face {
|
||||
font-family: 'fontname';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(fontname.ttf) format('truetype');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
|
||||
}
|
||||
.Codemirror pre {
|
||||
font-family: 'fontname', monospace;
|
||||
}
|
||||
</style>
|
||||
<style type="text/css" id="fontStyleTag">
|
||||
@font-face {
|
||||
font-family: 'FiraCode';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(FiraCode.ttf) format('truetype');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
|
||||
}
|
||||
.Codemirror pre {
|
||||
font-family: 'FiraCode', monospace;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="main-container">
|
||||
<div class="main-header">
|
||||
<input type="text" id="js-title-input" title="Click to edit" class="item-title-input" value="Untitled Work">
|
||||
<div class="main-header__btn-wrap flex flex-v-center">
|
||||
<a id="runBtn" class="hide flex flex-v-center hint--rounded hint--bottom-left" aria-label="Run preview (Ctrl/⌘ + Shift + 5)" d-click="setPreviewContent">
|
||||
<svg style="width: 14px; height: 14px;">
|
||||
<use xlink:href="#play-icon"></use>
|
||||
</svg>Run
|
||||
</a>
|
||||
|
||||
<a d-open-modal="addLibraryModal" data-event-category="ui" data-event-action="addLibraryButtonClick" class="flex-v-center hint--rounded hint--bottom-left" aria-label="Add a JS/CSS library">
|
||||
Add library <span id="js-external-lib-count" style="display:none;" class="count-label"></span>
|
||||
</a>
|
||||
|
||||
<a class="flex flex-v-center hint--rounded hint--bottom-left" aria-label="Start a new creation" d-click="onNewBtnClick">
|
||||
<svg style="vertical-align:middle;width:14px;height:14px" viewBox="0 0 24 24">
|
||||
<path d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" />
|
||||
</svg>New
|
||||
</a>
|
||||
<a id="saveBtn" class="flex flex-v-center hint--rounded hint--bottom-left" aria-label="Save current creation (Ctrl/⌘ + S)" d-click="onSaveBtnClick">
|
||||
<svg style="vertical-align:middle;width:14px;height:14px" viewBox="0 0 24 24">
|
||||
<path d="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z" />
|
||||
</svg>Save</a>
|
||||
<a class="flex flex-v-center hint--rounded hint--bottom-left" aria-label="Open a saved creation (Ctrl/⌘ + O)" d-click="onOpenBtnClick">
|
||||
<svg style="width:14px;height:14px;vertical-align:middle;" viewBox="0 0 24 24">
|
||||
<path d="M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z" />
|
||||
</svg>Open
|
||||
</a>
|
||||
<a class="show-when-app hide-on-login flex flex-v-center hint--rounded hint--bottom-left" aria-label="Login/Signup" d-open-modal="loginModal">
|
||||
Login/Signup
|
||||
</a>
|
||||
<a d-open-modal="profileModal" aria-label="See profile or Logout" class="hide-on-logout">
|
||||
<img id="headerAvatarImg" width="20" src="" class="main-header__avatar-img"/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-wrap flex flex-grow">
|
||||
<div class="code-side" id="js-code-side">
|
||||
<div data-code-wrap-id="0" id="js-html-code" data-type="html" class="code-wrap">
|
||||
<div class="js-code-wrap__header code-wrap__header" title="Double click to toggle code pane">
|
||||
<label class="btn-group" dropdow title="Click to change">
|
||||
<span id="js-html-mode-label" class="code-wrap__header-label">HTML</span><span class="caret"></span>
|
||||
<select data-type="html" class="js-mode-select hidden-select" name="">
|
||||
<option value="html">HTML</option>
|
||||
<option value="markdown">Markdown</option>
|
||||
<option value="jade">Pug</option>
|
||||
</select>
|
||||
</label>
|
||||
<div class="code-wrap__header-right-options">
|
||||
<a class="js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn" title="Toggle code pane">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div data-code-wrap-id="1" id="js-css-code" data-type="css" class="code-wrap">
|
||||
<div class="js-code-wrap__header code-wrap__header" title="Double click to toggle code pane">
|
||||
<label class="btn-group" title="Click to change">
|
||||
<span id="js-css-mode-label" class="code-wrap__header-label">CSS</span><span class="caret"></span>
|
||||
<select data-type="css" class="js-mode-select hidden-select" name="">
|
||||
<option value="css">CSS</option>
|
||||
<option value="scss">SCSS</option>
|
||||
<option value="sass">SASS</option>
|
||||
<option value="less">LESS</option>
|
||||
<option value="stylus">Stylus</option>
|
||||
<option value="acss">Atomic CSS</option>
|
||||
</select>
|
||||
</label>
|
||||
<div class="code-wrap__header-right-options">
|
||||
<a href="#" id="cssSettingsBtn" title="Atomic CSS configuration" d-click="openCssSettingsModal" class="code-wrap__header-btn hide">
|
||||
<svg>
|
||||
<use xlink:href="#settings-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a class="js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn" title="Toggle code pane">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div data-code-wrap-id="2" id="js-js-code" data-type="js" class="code-wrap">
|
||||
<div class="js-code-wrap__header code-wrap__header" title="Double click to toggle code pane">
|
||||
<label class="btn-group" title="Click to change">
|
||||
<span id="js-js-mode-label" class="code-wrap__header-label">JS</span><span class="caret"></span>
|
||||
<select data-type="js" class="js-mode-select hidden-select">
|
||||
<option value="js">JS</option>
|
||||
<option value="coffee">CoffeeScript</option>
|
||||
<option value="es6">ES6 (Babel)</option>
|
||||
<option value="typescript">TypeScript</option>
|
||||
</select>
|
||||
</label>
|
||||
<div class="code-wrap__header-right-options">
|
||||
<a class="js-code-collapse-btn code-wrap__header-btn code-wrap__collapse-btn" title="Toggle code pane">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="demo-side" id="js-demo-side">
|
||||
<iframe src="about://blank" frameborder="0" id="demo-frame" allowfullscreen></iframe>
|
||||
<div id="consoleEl" class="console is-minimized">
|
||||
<div id="consoleLogEl" class="console__log" class="code">
|
||||
<div class="js-console__header code-wrap__header" title="Double click to toggle console">
|
||||
<span class="code-wrap__header-label">Console (<span id="logCountEl">0</span>)</span>
|
||||
<div class="code-wrap__header-right-options">
|
||||
<a class="code-wrap__header-btn" title="Clear console (CTRL + L)" d-click="onClearConsoleBtnClick">
|
||||
<svg>
|
||||
<use xlink:href="#cancel-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<a class="code-wrap__header-btn code-wrap__collapse-btn" title="Toggle console" d-click="toggleConsole">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="consolePromptEl" class="console__prompt flex flex-v-center">
|
||||
<svg width="18" height="18" fill="#346fd2">
|
||||
<use xlink:href="#chevron-icon"></use>
|
||||
</svg>
|
||||
<input d-keyup="evalConsoleExpr" class="console-exec-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="global-console-container" id="globalConsoleContainerEl"></div>
|
||||
<div id="footer" class="footer">
|
||||
<div class="footer__right fr">
|
||||
<a id="saveHtmlBtn" class="mode-btn hint--rounded hint--top-left" data-hint="Save as HTML file">
|
||||
<svg viewBox="0 0 24 24">
|
||||
<path d="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z" />
|
||||
</svg>
|
||||
</a>
|
||||
<svg style="display: none;" xmlns="http://www.w3.org/2000/svg">
|
||||
<symbol id="codepen-logo" viewBox="0 0 120 120"><path class="outer-ring" d="M60.048 0C26.884 0 0 26.9 0 60.048s26.884 60 60 60.047c33.163 0 60.047-26.883 60.047-60.047 S93.211 0 60 0z M60.048 110.233c-27.673 0-50.186-22.514-50.186-50.186S32.375 9.9 60 9.9 c27.672 0 50.2 22.5 50.2 50.186S87.72 110.2 60 110.233z"/><path class="inner-box" d="M97.147 48.319c-0.007-0.047-0.019-0.092-0.026-0.139c-0.016-0.09-0.032-0.18-0.056-0.268 c-0.014-0.053-0.033-0.104-0.05-0.154c-0.025-0.078-0.051-0.156-0.082-0.232c-0.021-0.053-0.047-0.105-0.071-0.156 c-0.033-0.072-0.068-0.143-0.108-0.211c-0.029-0.051-0.061-0.1-0.091-0.148c-0.043-0.066-0.087-0.131-0.135-0.193 c-0.035-0.047-0.072-0.094-0.109-0.139c-0.051-0.059-0.104-0.117-0.159-0.172c-0.042-0.043-0.083-0.086-0.127-0.125 c-0.059-0.053-0.119-0.104-0.181-0.152c-0.048-0.037-0.095-0.074-0.145-0.109c-0.019-0.012-0.035-0.027-0.053-0.039L61.817 23.5 c-1.072-0.715-2.468-0.715-3.54 0L24.34 46.081c-0.018 0.012-0.034 0.027-0.053 0.039c-0.05 0.035-0.097 0.072-0.144 0.1 c-0.062 0.049-0.123 0.1-0.181 0.152c-0.045 0.039-0.086 0.082-0.128 0.125c-0.056 0.055-0.108 0.113-0.158 0.2 c-0.038 0.045-0.075 0.092-0.11 0.139c-0.047 0.062-0.092 0.127-0.134 0.193c-0.032 0.049-0.062 0.098-0.092 0.1 c-0.039 0.068-0.074 0.139-0.108 0.211c-0.024 0.051-0.05 0.104-0.071 0.156c-0.031 0.076-0.057 0.154-0.082 0.2 c-0.017 0.051-0.035 0.102-0.05 0.154c-0.023 0.088-0.039 0.178-0.056 0.268c-0.008 0.047-0.02 0.092-0.025 0.1 c-0.019 0.137-0.029 0.275-0.029 0.416V71.36c0 0.1 0 0.3 0 0.418c0.006 0 0 0.1 0 0.1 c0.017 0.1 0 0.2 0.1 0.268c0.015 0.1 0 0.1 0.1 0.154c0.025 0.1 0.1 0.2 0.1 0.2 c0.021 0.1 0 0.1 0.1 0.154c0.034 0.1 0.1 0.1 0.1 0.213c0.029 0 0.1 0.1 0.1 0.1 c0.042 0.1 0.1 0.1 0.1 0.193c0.035 0 0.1 0.1 0.1 0.139c0.05 0.1 0.1 0.1 0.2 0.2 c0.042 0 0.1 0.1 0.1 0.125c0.058 0.1 0.1 0.1 0.2 0.152c0.047 0 0.1 0.1 0.1 0.1 c0.019 0 0 0 0.1 0.039L58.277 96.64c0.536 0.4 1.2 0.5 1.8 0.537c0.616 0 1.233-0.18 1.77-0.537 l33.938-22.625c0.018-0.012 0.034-0.027 0.053-0.039c0.05-0.035 0.097-0.072 0.145-0.109c0.062-0.049 0.122-0.1 0.181-0.152 c0.044-0.039 0.085-0.082 0.127-0.125c0.056-0.055 0.108-0.113 0.159-0.172c0.037-0.045 0.074-0.09 0.109-0.139 c0.048-0.062 0.092-0.127 0.135-0.193c0.03-0.049 0.062-0.098 0.091-0.146c0.04-0.07 0.075-0.141 0.108-0.213 c0.024-0.051 0.05-0.102 0.071-0.154c0.031-0.078 0.057-0.156 0.082-0.234c0.017-0.051 0.036-0.102 0.05-0.154 c0.023-0.088 0.04-0.178 0.056-0.268c0.008-0.045 0.02-0.092 0.026-0.137c0.018-0.139 0.028-0.277 0.028-0.418V48.735 C97.176 48.6 97.2 48.5 97.1 48.319z M63.238 32.073l25.001 16.666L77.072 56.21l-13.834-9.254V32.073z M56.856 32.1 v14.883L43.023 56.21l-11.168-7.471L56.856 32.073z M29.301 54.708l7.983 5.34l-7.983 5.34V54.708z M56.856 88.022L31.855 71.4 l11.168-7.469l13.833 9.252V88.022z M60.048 67.597l-11.286-7.549l11.286-7.549l11.285 7.549L60.048 67.597z M63.238 88.022V73.14 l13.834-9.252l11.167 7.469L63.238 88.022z M90.794 65.388l-7.982-5.34l7.982-5.34V65.388z"/></symbol>
|
||||
</svg>
|
||||
|
||||
<a href="" id="codepenBtn" class="mode-btn hint--rounded hint--top-left" aria-label="Edit on CodePen">
|
||||
<svg>
|
||||
<use xlink:href="#codepen-logo"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<a href="" id="screenshotBtn" class="mode-btn hint--rounded hint--top-left show-when-extension" d-click="takeScreenshot" aria-label="Take screenshot of preview">
|
||||
<svg style="width:24px;height:24px" viewBox="0 0 24 24">
|
||||
<path d="M4,4H7L9,2H15L17,4H20A2,2 0 0,1 22,6V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9Z" />
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<div class="footer__separator"></div>
|
||||
|
||||
<a id="layoutBtn1" class="mode-btn">
|
||||
<svg viewBox="0 0 100 100" style="transform:rotate(-90deg)">
|
||||
<use xlink:href="#mode-icon" />
|
||||
</svg>
|
||||
</a>
|
||||
<a id="layoutBtn2" class="mode-btn">
|
||||
<svg viewBox="0 0 100 100">
|
||||
<use xlink:href="#mode-icon" />
|
||||
</svg>
|
||||
</a>
|
||||
<a id="layoutBtn3" class="mode-btn">
|
||||
<svg viewBox="0 0 100 100" style="transform:rotate(90deg)">
|
||||
<use xlink:href="#mode-icon" />
|
||||
</svg>
|
||||
</a>
|
||||
<a id="layoutBtn4" class="mode-btn hint--top-left hint--rounded" aria-label="Full Screen">
|
||||
<svg viewBox="0 0 100 100">
|
||||
<rect x="0" y="0" width="100" height="100" />
|
||||
</svg>
|
||||
</a>
|
||||
<a class="mode-btn hint--top-left hint--rounded" aria-label="Detach Preview" d-click="openDetachedPreview">
|
||||
<svg viewBox="0 0 24 24">
|
||||
<path d="M22,17V7H6V17H22M22,5A2,2 0 0,1 24,7V17C24,18.11 23.1,19 22,19H16V21H18V23H10V21H12V19H6C4.89,19 4,18.11 4,17V7A2,2 0 0,1 6,5H22M2,3V15H0V3A2,2 0 0,1 2,1H20V3H2Z" />
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
|
||||
<div class="footer__separator"></div>
|
||||
|
||||
<a id="notificationsBtn" class="notifications-btn mode-btn hint--top-left hint--rounded" aria-label="Notifications">
|
||||
<svg viewBox="0 0 24 24">
|
||||
<path d="M14,20A2,2 0 0,1 12,22A2,2 0 0,1 10,20H14M12,2A1,1 0 0,1 13,3V4.08C15.84,4.56 18,7.03 18,10V16L21,19H3L6,16V10C6,7.03 8.16,4.56 11,4.08V3A1,1 0 0,1 12,2Z" />
|
||||
</svg>
|
||||
<span class="notifications-btn__dot"></span>
|
||||
</a>
|
||||
<a d-open-modal="settingsModal" data-event-category="ui" data-event-action="settingsBtnClick" class="mode-btn hint--top-left hint--rounded" aria-label="Settings">
|
||||
<svg>
|
||||
<use xlink:href="#settings-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<a href="https://webmakerapp.com/" target="_blank"><div class="logo"></div></a>
|
||||
©<span class="web-maker-with-tag">Web Maker</span>
|
||||
<a d-open-modal="helpModal" data-event-category="ui" data-event-action="helpButtonClick" class="footer__link hint--rounded hint--top-right" aria-label="Help">
|
||||
<svg style="width:20px; height:20px; vertical-align:text-bottom" viewBox="0 0 24 24">
|
||||
<path d="M15.07,11.25L14.17,12.17C13.45,12.89 13,13.5 13,15H11V14.5C11,13.39 11.45,12.39 12.17,11.67L13.41,10.41C13.78,10.05 14,9.55 14,9C14,7.89 13.1,7 12,7A2,2 0 0,0 10,9H8A4,4 0 0,1 12,5A4,4 0 0,1 16,9C16,9.88 15.64,10.67 15.07,11.25M13,19H11V17H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z" />
|
||||
</svg>
|
||||
</a>
|
||||
<a d-open-modal="keyboardShortcutsModal" data-event-category="ui" data-event-action="keyboardShortcutButtonClick" class="footer__link hint--rounded hint--top-right" aria-label="Keyboard shortcuts">
|
||||
<svg style="width:20px; height:20px; vertical-align:text-bottom">
|
||||
<use xlink:href="#keyboard-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<!-- #00ACED -->
|
||||
<a class="footer__link hint--rounded hint--top-right" aria-label="Tweet about 'Web Maker'" href="http://twitter.com/share?url=https://webmakerapp.com/&text=Web Maker - A blazing fast %26 offline web playground! via @webmakerApp&related=webmakerApp&hashtags=web,playground,chrome,extension" target="_blank">
|
||||
<svg style="width:20px; height:20px; vertical-align:text-bottom">
|
||||
<use xlink:href="#twitter-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="addLibraryModal">
|
||||
<div class="modal__content">
|
||||
<a d-click="onModalCloseBtnClick" href="" aria-label="Close add library modal" title="Close" class="js-modal__close-btn modal__close-btn">
|
||||
<svg>
|
||||
<use xlink:href="#cross-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<h1>Add Library</h1>
|
||||
|
||||
<input type="text" id="externalLibrarySearchInput" class="full-width" placeholder="Type here to search libraries">
|
||||
<div class="tar opacity--70">
|
||||
<small>Powered by cdnjs</small>
|
||||
</div>
|
||||
<div style="margin:20px 0;">
|
||||
Choose from popular libraries:
|
||||
<select name="" id="js-add-library-select">
|
||||
<option value="">-------</option>
|
||||
<optgroup label="JavaScript Libraries">
|
||||
|
||||
</optgroup>
|
||||
<optgroup label="CSS Libraries">
|
||||
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<h3>JavaScript</h3>
|
||||
<p style="font-size: 0.8em;" class="show-when-extension opacity--70">Note: You can load external scripts from following domains: localhost, https://ajax.googleapis.com, https://code.jquery.com, https://cdnjs.cloudflare.com, https://unpkg.com, https://maxcdn.com, https://cdn77.com, https://maxcdn.bootstrapcdn.com, https://cdn.jsdelivr.net/, https://rawgit.com, https://wzrd.in</p>
|
||||
<textarea id="js-external-js" class="full-width" id="" cols="30" rows="5" placeholder="Start typing name of a library. Put each library in new line"></textarea>
|
||||
|
||||
<h3>CSS</h3>
|
||||
<textarea id="js-external-css" class="full-width" id="" cols="30" rows="5" placeholder="Start typing name of a library. Put each library in new line"></textarea>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="cssSettingsModal">
|
||||
<div class="modal__content">
|
||||
<a d-click="onModalCloseBtnClick" href="" aria-label="Close CSS settings modal" title="Close" class="js-modal__close-btn modal__close-btn">
|
||||
<svg>
|
||||
<use xlink:href="#cross-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<h1>Atomic CSS Settings</h1>
|
||||
<h3>Configure Atomizer settings. <a href="https://github.com/acss-io/atomizer#api" target="_blank">Read more</a> about available settings.</h3>
|
||||
<div style="height: calc(100vh - 350px);">
|
||||
<textarea id="acssSettingsTextarea" cols="30" rows="10"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="helpModal">
|
||||
<div class="modal__content" d-html="partials/help-modal.html"></div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="keyboardShortcutsModal">
|
||||
<div class="modal__content" d-html="partials/keyboard-shortcuts.html"></div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="onboardModal">
|
||||
<div class="modal__content" d-html="partials/onboard-modal.html"></div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="loginModal">
|
||||
<div class="modal__content" d-html="partials/login-modal.html"></div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="profileModal">
|
||||
<div class="modal__content">
|
||||
<a d-click="onModalCloseBtnClick" href="" aria-label="Close logout modal" title="Close" class="js-modal__close-btn modal__close-btn">
|
||||
<svg>
|
||||
<use xlink:href="#cross-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<div class="tac">
|
||||
<img height="80" class="profile-modal__avatar-img" src="" id="profileAvatarImg" alt="Profile image">
|
||||
<h3 id="profileUserName" class="mb-2"></h3>
|
||||
<p>
|
||||
<button class="btn" aria-label="Logout from your account" d-click="logout">Logout</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal modal--settings" id="settingsModal">
|
||||
<div class="modal__content">
|
||||
<a d-click="onModalCloseBtnClick" href="" aria-label="Close Settings" title="Close" class="js-modal__close-btn modal__close-btn">
|
||||
<svg>
|
||||
<use xlink:href="#cross-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
<h1>Settings</h1>
|
||||
|
||||
<h3>Indentation</h3>
|
||||
<div class="line" title="I know this is tough, but you have to decide one!">
|
||||
<label>
|
||||
<input type="radio" checked="true" name="indentation" value="spaces" d-change="updateSetting" data-setting="indentWith"> Spaces
|
||||
</label>
|
||||
<label class="ml-1">
|
||||
<input type="radio" name="indentation" value="tabs" d-change="updateSetting" data-setting="indentWith"> Tabs
|
||||
</label>
|
||||
</div>
|
||||
<label class="line" title="">
|
||||
Indentation Size <input type="range" class="va-m ml-1" value="2" min="1" max="7" list="indentationSizeList" data-setting="indentSize" d-change="updateSetting">
|
||||
<span id="indentationSizeValueEl"></span>
|
||||
<datalist id="indentationSizeList">
|
||||
<option>1</option>
|
||||
<option>2</option>
|
||||
<option>3</option>
|
||||
<option>4</option>
|
||||
<option>5</option>
|
||||
<option>6</option>
|
||||
<option>7</option>
|
||||
</datalist>
|
||||
</label>
|
||||
<hr>
|
||||
|
||||
<h3>Editor</h3>
|
||||
<div class="flex">
|
||||
|
||||
<div>
|
||||
<label class="line">
|
||||
Default Preprocessors
|
||||
</label>
|
||||
<div class="flex line">
|
||||
<select style="flex:1;margin-left:20px" data-setting="htmlMode" d-change="updateSetting">
|
||||
<option value="html">HTML</option>
|
||||
<option value="markdown">Markdown</option>
|
||||
<option value="jade">Pug</option>
|
||||
</select>
|
||||
<select style="flex:1;margin-left:20px" data-setting="cssMode" d-change="updateSetting">
|
||||
<option value="css">CSS</option>
|
||||
<option value="scss">SCSS</option>
|
||||
<option value="sass">SASS</option>
|
||||
<option value="less">LESS</option>
|
||||
<option value="stylus">Stylus</option>
|
||||
<option value="acss">Atomic CSS</option>
|
||||
</select>
|
||||
<select style="flex:1;margin-left:20px" data-setting="jsMode" d-change="updateSetting">
|
||||
<option value="js">JS</option>
|
||||
<option value="coffee">CoffeeScript</option>
|
||||
<option value="es6">ES6 (Babel)</option>
|
||||
<option value="typescript">TypeScript</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="line">
|
||||
Theme
|
||||
<select style="flex:1;margin:0 20px" data-setting="editorTheme" d-change="updateSetting"></select>
|
||||
</label>
|
||||
<label class="line">
|
||||
Font
|
||||
<select style="flex:1;margin:0 20px" data-setting="editorFont" d-change="updateSetting">
|
||||
<option value="FiraCode">Fira Code</option>
|
||||
<option value="Inconsolata">Inconsolata</option>
|
||||
<option value="Monoid">Monoid</option>
|
||||
<option value="FixedSys">FixedSys</option>
|
||||
<option disabled="disabled">----</option>
|
||||
<option value="other">Other font from system</option>
|
||||
</select>
|
||||
<input id="customEditorFontInput" type="text" value="" placeholder="Custom font name here" data-setting="editorCustomFont" d-change="updateSetting">
|
||||
</label>
|
||||
<label class="line">
|
||||
Font Size <input type="number" value="16" data-setting="fontSize" d-change="updateSetting"> px
|
||||
|
||||
</label>
|
||||
<div class="line">
|
||||
Key bindings
|
||||
<label class="ml-1">
|
||||
<input type="radio" checked="true" name="keymap" value="sublime" d-change="updateSetting" data-setting="keymap"> Sublime
|
||||
</label>
|
||||
<label class="ml-1">
|
||||
<input type="radio" name="keymap" value="vim" d-change="updateSetting" data-setting="keymap"> Vim
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-2">
|
||||
<label class="line" title="Toggle wrapping of long sentences onto new line">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="lineWrap"> Line wrap
|
||||
</label>
|
||||
<label class="line" title="Your Preview will refresh when you resize the preview split">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="refreshOnResize"> Refresh preview on resize
|
||||
</label>
|
||||
<label class="line" title="Turns on the auto-completion suggestions as you type">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="autoComplete"> Auto-complete suggestions
|
||||
</label>
|
||||
<label class="line" title="Refreshes the preview as you code. Otherwise use the Run button">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="autoPreview"> Auto-preview
|
||||
</label>
|
||||
<label class="line" title="Auto-save keeps saving your code at regular intervals after you hit the first save manually">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="autoSave"> Auto-save
|
||||
</label>
|
||||
<label class="line" title="Loads the last open creation when app starts">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="preserveLastCode"> Preserve last written code
|
||||
</label>
|
||||
<label class="line" title="Turning this on will start showing Web Maker in every new tab you open">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="replaceNewTab"> Replace new tab page
|
||||
</label>
|
||||
<label class="line" title="Preserves the console logs across your preview refreshes">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="preserveConsoleLogs"> Preserve console logs
|
||||
</label>
|
||||
<label class="line" title="Switch to lighter version for better performance. Removes things like blur etc.">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="lightVersion"> Fast/light version
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>Fun</h3>
|
||||
<p>
|
||||
<label class="line" title="Enjoy wonderful particle blasts while you type">
|
||||
<input type="checkbox" d-change="updateSetting" data-setting="isCodeBlastOn"> Code blast!
|
||||
</label>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal" id="notificationsModal">
|
||||
<div class="modal__content" d-html="partials/changelog.html"></div>
|
||||
</div>
|
||||
|
||||
<div id="js-saved-items-pane" class="saved-items-pane">
|
||||
<button class="btn saved-items-pane__close-btn" id="js-saved-items-pane-close-btn">X</button>
|
||||
<div class="flex flex-v-center" style="justify-content: space-between;">
|
||||
<h3>My Library <span id="savedItemCountEl"></span></h3>
|
||||
|
||||
<div class="main-header__btn-wrap">
|
||||
<a d-click="exportItems" href="" class="btn btn-icon hint--bottom-left hint--rounded hint--medium" aria-label="Export all your creations into a single importable file.">Export
|
||||
</a>
|
||||
<a d-click="onImportBtnClicked" href="" class="btn btn-icon hint--bottom-left hint--rounded hint--medium" aria-label="Only the file that you export through the 'Export' button can be imported.">Import
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<input type="" id="searchInput" class="search-input" d-input="onSearchInputChange" placeholder="Search your creations here...">
|
||||
|
||||
<div id="js-saved-items-wrap" class="saved-items-pane__container">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-overlay"></div>
|
||||
|
||||
<svg width="30" height="30" viewBox="0 0 100 100" fill="rgba(255, 255, 255, 0.09)">
|
||||
<defs>
|
||||
<g id="mode-icon">
|
||||
<rect x="0" y="0" width="28" height="47" />
|
||||
<rect x="36" y="0" width="28" height="47"/>
|
||||
<rect x="72" y="0" width="28" height="47"/>
|
||||
<rect x="0" y="53" width="100" height="47"/>
|
||||
</g>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
<div class="alerts-container" id="js-alerts-container"></div>
|
||||
<form style="display:none;" action="https://codepen.io/pen/define" method="POST" target="_blank" id="js-codepen-form">
|
||||
<input type="hidden" name="data" value='{"title": "New Pen!", "html": "<div>Hello, World!</div>"}'>
|
||||
</form>
|
||||
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" style="display:none">
|
||||
<symbol id="logo" viewBox="-145 -2 372 175">
|
||||
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-145.000000, -1.000000)">
|
||||
<polygon id="Path-1" fill="#FF4600" points="31 0 232 0 132 173.310547"></polygon>
|
||||
<polygon id="Path-1" fill="#FF6C00" points="0 0 201 0 101 173.310547"></polygon>
|
||||
<polygon id="Path-1" fill="#FF6C00" transform="translate(271.500000, 86.500000) scale(1, -1) translate(-271.500000, -86.500000) " points="171 0 372 0 272 173.310547"></polygon>
|
||||
<polygon id="Path-1" fill="#FF4600" transform="translate(241.500000, 86.500000) scale(1, -1) translate(-241.500000, -86.500000) " points="141 0 342 0 242 173.310547"></polygon>
|
||||
</g>
|
||||
</symbol>
|
||||
<symbol id="bug-icon" viewBox="0 0 24 24">
|
||||
<path d="M14,12H10V10H14M14,16H10V14H14M20,8H17.19C16.74,7.22 16.12,6.55 15.37,6.04L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.5,5 12,5C11.5,5 11.04,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6.04C7.88,6.55 7.26,7.22 6.81,8H4V10H6.09C6.04,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.04,15.67 6.09,16H4V18H6.81C7.85,19.79 9.78,21 12,21C14.22,21 16.15,19.79 17.19,18H20V16H17.91C17.96,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.96,10.33 17.91,10H20V8Z" />
|
||||
</symbol>
|
||||
<symbol id="google-icon" viewBox="0 0 24 24">
|
||||
<path d="M21.35,11.1H12.18V13.83H18.69C18.36,17.64 15.19,19.27 12.19,19.27C8.36,19.27 5,16.25 5,12C5,7.9 8.2,4.73 12.2,4.73C15.29,4.73 17.1,6.7 17.1,6.7L19,4.72C19,4.72 16.56,2 12.1,2C6.42,2 2.03,6.8 2.03,12C2.03,17.05 6.16,22 12.25,22C17.6,22 21.5,18.33 21.5,12.91C21.5,11.76 21.35,11.1 21.35,11.1V11.1Z" />
|
||||
</symbol>
|
||||
<symbol id="fb-icon" viewBox="0 0 24 24">
|
||||
<path d="M17,2V2H17V6H15C14.31,6 14,6.81 14,7.5V10H14L17,10V14H14V22H10V14H7V10H10V6A4,4 0 0,1 14,2H17Z" />
|
||||
</symbol>
|
||||
<symbol id="github-icon" viewBox="0 0 24 24">
|
||||
<path d="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z" />
|
||||
</symbol>
|
||||
<symbol id="settings-icon" viewBox="0 0 24 24">
|
||||
<path d="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"></path>
|
||||
</symbol>
|
||||
<symbol id="twitter-icon" viewBox="0 0 16 16">
|
||||
<path d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809
|
||||
c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/>
|
||||
</symbol>
|
||||
<symbol id="heart-icon" viewBox="0 0 24 24">
|
||||
<path d="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z" />
|
||||
</symbol>
|
||||
<symbol id="play-icon" viewBox="0 0 24 24">
|
||||
<svg>
|
||||
<path d="M8,5.14V19.14L19,12.14L8,5.14Z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="cancel-icon" viewBox="0 0 24 24">
|
||||
<svg>
|
||||
<path d="M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2M12,4A8,8 0 0,0 4,12C4,13.85 4.63,15.55 5.68,16.91L16.91,5.68C15.55,4.63 13.85,4 12,4M12,20A8,8 0 0,0 20,12C20,10.15 19.37,8.45 18.32,7.09L7.09,18.32C8.45,19.37 10.15,20 12,20Z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="chevron-icon" viewBox="0 0 24 24">
|
||||
<svg>
|
||||
<path d="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="chat-icon" viewBox="0 0 24 24">
|
||||
<path d="M20,2H4A2,2 0 0,0 2,4V22L6,18H20A2,2 0 0,0 22,16V4A2,2 0 0,0 20,2M8,14H6V12H8V14M8,11H6V9H8V11M8,8H6V6H8V8M15,14H10V12H15V14M18,11H10V9H18V11M18,8H10V6H18V8Z" />
|
||||
</symbol>
|
||||
<symbol id="gift-icon" viewBox="0 0 24 24">
|
||||
<path d="M22,12V20A2,2 0 0,1 20,22H4A2,2 0 0,1 2,20V12A1,1 0 0,1 1,11V8A2,2 0 0,1 3,6H6.17C6.06,5.69 6,5.35 6,5A3,3 0 0,1 9,2C10,2 10.88,2.5 11.43,3.24V3.23L12,4L12.57,3.23V3.24C13.12,2.5 14,2 15,2A3,3 0 0,1 18,5C18,5.35 17.94,5.69 17.83,6H21A2,2 0 0,1 23,8V11A1,1 0 0,1 22,12M4,20H11V12H4V20M20,20V12H13V20H20M9,4A1,1 0 0,0 8,5A1,1 0 0,0 9,6A1,1 0 0,0 10,5A1,1 0 0,0 9,4M15,4A1,1 0 0,0 14,5A1,1 0 0,0 15,6A1,1 0 0,0 16,5A1,1 0 0,0 15,4M3,8V10H11V8H3M13,8V10H21V8H13Z" />
|
||||
<symbol id="gift-icon" viewBox="0 0 24 24">
|
||||
</symbol>
|
||||
<symbol id="cross-icon" viewBox="0 0 24 24">
|
||||
<path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />
|
||||
</symbol>
|
||||
<symbol id="keyboard-icon" viewBox="0 0 24 24">
|
||||
<path d="M19,10H17V8H19M19,13H17V11H19M16,10H14V8H16M16,13H14V11H16M16,17H8V15H16M7,10H5V8H7M7,13H5V11H7M8,11H10V13H8M8,8H10V10H8M11,11H13V13H11M11,8H13V10H11M20,5H4C2.89,5 2,5.89 2,7V17A2,2 0 0,0 4,19H20A2,2 0 0,0 22,17V7C22,5.89 21.1,5 20,5Z" />
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<script src="vendor.js"></script>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
355
app/lib/codemirror/mode/coffeescript/coffeescript.js
vendored
Normal file
355
app/lib/codemirror/mode/coffeescript/coffeescript.js
vendored
Normal file
@@ -0,0 +1,355 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
/**
|
||||
* Link to the project's GitHub page:
|
||||
* https://github.com/pickhardt/coffeescript-codemirror-mode
|
||||
*/
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("coffeescript", function(conf, parserConf) {
|
||||
var ERRORCLASS = "error";
|
||||
|
||||
function wordRegexp(words) {
|
||||
return new RegExp("^((" + words.join(")|(") + "))\\b");
|
||||
}
|
||||
|
||||
var operators = /^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/;
|
||||
var delimiters = /^(?:[()\[\]{},:`=;]|\.\.?\.?)/;
|
||||
var identifiers = /^[_A-Za-z$][_A-Za-z$0-9]*/;
|
||||
var atProp = /^@[_A-Za-z$][_A-Za-z$0-9]*/;
|
||||
|
||||
var wordOperators = wordRegexp(["and", "or", "not",
|
||||
"is", "isnt", "in",
|
||||
"instanceof", "typeof"]);
|
||||
var indentKeywords = ["for", "while", "loop", "if", "unless", "else",
|
||||
"switch", "try", "catch", "finally", "class"];
|
||||
var commonKeywords = ["break", "by", "continue", "debugger", "delete",
|
||||
"do", "in", "of", "new", "return", "then",
|
||||
"this", "@", "throw", "when", "until", "extends"];
|
||||
|
||||
var keywords = wordRegexp(indentKeywords.concat(commonKeywords));
|
||||
|
||||
indentKeywords = wordRegexp(indentKeywords);
|
||||
|
||||
|
||||
var stringPrefixes = /^('{3}|\"{3}|['\"])/;
|
||||
var regexPrefixes = /^(\/{3}|\/)/;
|
||||
var commonConstants = ["Infinity", "NaN", "undefined", "null", "true", "false", "on", "off", "yes", "no"];
|
||||
var constants = wordRegexp(commonConstants);
|
||||
|
||||
// Tokenizers
|
||||
function tokenBase(stream, state) {
|
||||
// Handle scope changes
|
||||
if (stream.sol()) {
|
||||
if (state.scope.align === null) state.scope.align = false;
|
||||
var scopeOffset = state.scope.offset;
|
||||
if (stream.eatSpace()) {
|
||||
var lineOffset = stream.indentation();
|
||||
if (lineOffset > scopeOffset && state.scope.type == "coffee") {
|
||||
return "indent";
|
||||
} else if (lineOffset < scopeOffset) {
|
||||
return "dedent";
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
if (scopeOffset > 0) {
|
||||
dedent(stream, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (stream.eatSpace()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var ch = stream.peek();
|
||||
|
||||
// Handle docco title comment (single line)
|
||||
if (stream.match("####")) {
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
}
|
||||
|
||||
// Handle multi line comments
|
||||
if (stream.match("###")) {
|
||||
state.tokenize = longComment;
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
|
||||
// Single line comment
|
||||
if (ch === "#") {
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
}
|
||||
|
||||
// Handle number literals
|
||||
if (stream.match(/^-?[0-9\.]/, false)) {
|
||||
var floatLiteral = false;
|
||||
// Floats
|
||||
if (stream.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)) {
|
||||
floatLiteral = true;
|
||||
}
|
||||
if (stream.match(/^-?\d+\.\d*/)) {
|
||||
floatLiteral = true;
|
||||
}
|
||||
if (stream.match(/^-?\.\d+/)) {
|
||||
floatLiteral = true;
|
||||
}
|
||||
|
||||
if (floatLiteral) {
|
||||
// prevent from getting extra . on 1..
|
||||
if (stream.peek() == "."){
|
||||
stream.backUp(1);
|
||||
}
|
||||
return "number";
|
||||
}
|
||||
// Integers
|
||||
var intLiteral = false;
|
||||
// Hex
|
||||
if (stream.match(/^-?0x[0-9a-f]+/i)) {
|
||||
intLiteral = true;
|
||||
}
|
||||
// Decimal
|
||||
if (stream.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)) {
|
||||
intLiteral = true;
|
||||
}
|
||||
// Zero by itself with no other piece of number.
|
||||
if (stream.match(/^-?0(?![\dx])/i)) {
|
||||
intLiteral = true;
|
||||
}
|
||||
if (intLiteral) {
|
||||
return "number";
|
||||
}
|
||||
}
|
||||
|
||||
// Handle strings
|
||||
if (stream.match(stringPrefixes)) {
|
||||
state.tokenize = tokenFactory(stream.current(), false, "string");
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
// Handle regex literals
|
||||
if (stream.match(regexPrefixes)) {
|
||||
if (stream.current() != "/" || stream.match(/^.*\//, false)) { // prevent highlight of division
|
||||
state.tokenize = tokenFactory(stream.current(), true, "string-2");
|
||||
return state.tokenize(stream, state);
|
||||
} else {
|
||||
stream.backUp(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Handle operators and delimiters
|
||||
if (stream.match(operators) || stream.match(wordOperators)) {
|
||||
return "operator";
|
||||
}
|
||||
if (stream.match(delimiters)) {
|
||||
return "punctuation";
|
||||
}
|
||||
|
||||
if (stream.match(constants)) {
|
||||
return "atom";
|
||||
}
|
||||
|
||||
if (stream.match(atProp) || state.prop && stream.match(identifiers)) {
|
||||
return "property";
|
||||
}
|
||||
|
||||
if (stream.match(keywords)) {
|
||||
return "keyword";
|
||||
}
|
||||
|
||||
if (stream.match(identifiers)) {
|
||||
return "variable";
|
||||
}
|
||||
|
||||
// Handle non-detected items
|
||||
stream.next();
|
||||
return ERRORCLASS;
|
||||
}
|
||||
|
||||
function tokenFactory(delimiter, singleline, outclass) {
|
||||
return function(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
stream.eatWhile(/[^'"\/\\]/);
|
||||
if (stream.eat("\\")) {
|
||||
stream.next();
|
||||
if (singleline && stream.eol()) {
|
||||
return outclass;
|
||||
}
|
||||
} else if (stream.match(delimiter)) {
|
||||
state.tokenize = tokenBase;
|
||||
return outclass;
|
||||
} else {
|
||||
stream.eat(/['"\/]/);
|
||||
}
|
||||
}
|
||||
if (singleline) {
|
||||
if (parserConf.singleLineStringErrors) {
|
||||
outclass = ERRORCLASS;
|
||||
} else {
|
||||
state.tokenize = tokenBase;
|
||||
}
|
||||
}
|
||||
return outclass;
|
||||
};
|
||||
}
|
||||
|
||||
function longComment(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
stream.eatWhile(/[^#]/);
|
||||
if (stream.match("###")) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
stream.eatWhile("#");
|
||||
}
|
||||
return "comment";
|
||||
}
|
||||
|
||||
function indent(stream, state, type) {
|
||||
type = type || "coffee";
|
||||
var offset = 0, align = false, alignOffset = null;
|
||||
for (var scope = state.scope; scope; scope = scope.prev) {
|
||||
if (scope.type === "coffee" || scope.type == "}") {
|
||||
offset = scope.offset + conf.indentUnit;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (type !== "coffee") {
|
||||
align = null;
|
||||
alignOffset = stream.column() + stream.current().length;
|
||||
} else if (state.scope.align) {
|
||||
state.scope.align = false;
|
||||
}
|
||||
state.scope = {
|
||||
offset: offset,
|
||||
type: type,
|
||||
prev: state.scope,
|
||||
align: align,
|
||||
alignOffset: alignOffset
|
||||
};
|
||||
}
|
||||
|
||||
function dedent(stream, state) {
|
||||
if (!state.scope.prev) return;
|
||||
if (state.scope.type === "coffee") {
|
||||
var _indent = stream.indentation();
|
||||
var matched = false;
|
||||
for (var scope = state.scope; scope; scope = scope.prev) {
|
||||
if (_indent === scope.offset) {
|
||||
matched = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!matched) {
|
||||
return true;
|
||||
}
|
||||
while (state.scope.prev && state.scope.offset !== _indent) {
|
||||
state.scope = state.scope.prev;
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
state.scope = state.scope.prev;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function tokenLexer(stream, state) {
|
||||
var style = state.tokenize(stream, state);
|
||||
var current = stream.current();
|
||||
|
||||
// Handle scope changes.
|
||||
if (current === "return") {
|
||||
state.dedent = true;
|
||||
}
|
||||
if (((current === "->" || current === "=>") && stream.eol())
|
||||
|| style === "indent") {
|
||||
indent(stream, state);
|
||||
}
|
||||
var delimiter_index = "[({".indexOf(current);
|
||||
if (delimiter_index !== -1) {
|
||||
indent(stream, state, "])}".slice(delimiter_index, delimiter_index+1));
|
||||
}
|
||||
if (indentKeywords.exec(current)){
|
||||
indent(stream, state);
|
||||
}
|
||||
if (current == "then"){
|
||||
dedent(stream, state);
|
||||
}
|
||||
|
||||
|
||||
if (style === "dedent") {
|
||||
if (dedent(stream, state)) {
|
||||
return ERRORCLASS;
|
||||
}
|
||||
}
|
||||
delimiter_index = "])}".indexOf(current);
|
||||
if (delimiter_index !== -1) {
|
||||
while (state.scope.type == "coffee" && state.scope.prev)
|
||||
state.scope = state.scope.prev;
|
||||
if (state.scope.type == current)
|
||||
state.scope = state.scope.prev;
|
||||
}
|
||||
if (state.dedent && stream.eol()) {
|
||||
if (state.scope.type == "coffee" && state.scope.prev)
|
||||
state.scope = state.scope.prev;
|
||||
state.dedent = false;
|
||||
}
|
||||
|
||||
return style;
|
||||
}
|
||||
|
||||
var external = {
|
||||
startState: function(basecolumn) {
|
||||
return {
|
||||
tokenize: tokenBase,
|
||||
scope: {offset:basecolumn || 0, type:"coffee", prev: null, align: false},
|
||||
prop: false,
|
||||
dedent: 0
|
||||
};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
var fillAlign = state.scope.align === null && state.scope;
|
||||
if (fillAlign && stream.sol()) fillAlign.align = false;
|
||||
|
||||
var style = tokenLexer(stream, state);
|
||||
if (style && style != "comment") {
|
||||
if (fillAlign) fillAlign.align = true;
|
||||
state.prop = style == "punctuation" && stream.current() == "."
|
||||
}
|
||||
|
||||
return style;
|
||||
},
|
||||
|
||||
indent: function(state, text) {
|
||||
if (state.tokenize != tokenBase) return 0;
|
||||
var scope = state.scope;
|
||||
var closer = text && "])}".indexOf(text.charAt(0)) > -1;
|
||||
if (closer) while (scope.type == "coffee" && scope.prev) scope = scope.prev;
|
||||
var closes = closer && scope.type === text.charAt(0);
|
||||
if (scope.align)
|
||||
return scope.alignOffset - (closes ? 1 : 0);
|
||||
else
|
||||
return (closes ? scope.prev : scope).offset;
|
||||
},
|
||||
|
||||
lineComment: "#",
|
||||
fold: "indent"
|
||||
};
|
||||
return external;
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-coffeescript", "coffeescript");
|
||||
CodeMirror.defineMIME("text/coffeescript", "coffeescript");
|
||||
|
||||
});
|
825
app/lib/codemirror/mode/css/css.js
vendored
Normal file
825
app/lib/codemirror/mode/css/css.js
vendored
Normal file
@@ -0,0 +1,825 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("css", function(config, parserConfig) {
|
||||
var inline = parserConfig.inline
|
||||
if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
|
||||
|
||||
var indentUnit = config.indentUnit,
|
||||
tokenHooks = parserConfig.tokenHooks,
|
||||
documentTypes = parserConfig.documentTypes || {},
|
||||
mediaTypes = parserConfig.mediaTypes || {},
|
||||
mediaFeatures = parserConfig.mediaFeatures || {},
|
||||
mediaValueKeywords = parserConfig.mediaValueKeywords || {},
|
||||
propertyKeywords = parserConfig.propertyKeywords || {},
|
||||
nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
|
||||
fontProperties = parserConfig.fontProperties || {},
|
||||
counterDescriptors = parserConfig.counterDescriptors || {},
|
||||
colorKeywords = parserConfig.colorKeywords || {},
|
||||
valueKeywords = parserConfig.valueKeywords || {},
|
||||
allowNested = parserConfig.allowNested,
|
||||
supportsAtComponent = parserConfig.supportsAtComponent === true;
|
||||
|
||||
var type, override;
|
||||
function ret(style, tp) { type = tp; return style; }
|
||||
|
||||
// Tokenizers
|
||||
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (tokenHooks[ch]) {
|
||||
var result = tokenHooks[ch](stream, state);
|
||||
if (result !== false) return result;
|
||||
}
|
||||
if (ch == "@") {
|
||||
stream.eatWhile(/[\w\\\-]/);
|
||||
return ret("def", stream.current());
|
||||
} else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
|
||||
return ret(null, "compare");
|
||||
} else if (ch == "\"" || ch == "'") {
|
||||
state.tokenize = tokenString(ch);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == "#") {
|
||||
stream.eatWhile(/[\w\\\-]/);
|
||||
return ret("atom", "hash");
|
||||
} else if (ch == "!") {
|
||||
stream.match(/^\s*\w*/);
|
||||
return ret("keyword", "important");
|
||||
} else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
|
||||
stream.eatWhile(/[\w.%]/);
|
||||
return ret("number", "unit");
|
||||
} else if (ch === "-") {
|
||||
if (/[\d.]/.test(stream.peek())) {
|
||||
stream.eatWhile(/[\w.%]/);
|
||||
return ret("number", "unit");
|
||||
} else if (stream.match(/^-[\w\\\-]+/)) {
|
||||
stream.eatWhile(/[\w\\\-]/);
|
||||
if (stream.match(/^\s*:/, false))
|
||||
return ret("variable-2", "variable-definition");
|
||||
return ret("variable-2", "variable");
|
||||
} else if (stream.match(/^\w+-/)) {
|
||||
return ret("meta", "meta");
|
||||
}
|
||||
} else if (/[,+>*\/]/.test(ch)) {
|
||||
return ret(null, "select-op");
|
||||
} else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
|
||||
return ret("qualifier", "qualifier");
|
||||
} else if (/[:;{}\[\]\(\)]/.test(ch)) {
|
||||
return ret(null, ch);
|
||||
} else if ((ch == "u" && stream.match(/rl(-prefix)?\(/)) ||
|
||||
(ch == "d" && stream.match("omain(")) ||
|
||||
(ch == "r" && stream.match("egexp("))) {
|
||||
stream.backUp(1);
|
||||
state.tokenize = tokenParenthesized;
|
||||
return ret("property", "word");
|
||||
} else if (/[\w\\\-]/.test(ch)) {
|
||||
stream.eatWhile(/[\w\\\-]/);
|
||||
return ret("property", "word");
|
||||
} else {
|
||||
return ret(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
function tokenString(quote) {
|
||||
return function(stream, state) {
|
||||
var escaped = false, ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == quote && !escaped) {
|
||||
if (quote == ")") stream.backUp(1);
|
||||
break;
|
||||
}
|
||||
escaped = !escaped && ch == "\\";
|
||||
}
|
||||
if (ch == quote || !escaped && quote != ")") state.tokenize = null;
|
||||
return ret("string", "string");
|
||||
};
|
||||
}
|
||||
|
||||
function tokenParenthesized(stream, state) {
|
||||
stream.next(); // Must be '('
|
||||
if (!stream.match(/\s*[\"\')]/, false))
|
||||
state.tokenize = tokenString(")");
|
||||
else
|
||||
state.tokenize = null;
|
||||
return ret(null, "(");
|
||||
}
|
||||
|
||||
// Context management
|
||||
|
||||
function Context(type, indent, prev) {
|
||||
this.type = type;
|
||||
this.indent = indent;
|
||||
this.prev = prev;
|
||||
}
|
||||
|
||||
function pushContext(state, stream, type, indent) {
|
||||
state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
|
||||
return type;
|
||||
}
|
||||
|
||||
function popContext(state) {
|
||||
if (state.context.prev)
|
||||
state.context = state.context.prev;
|
||||
return state.context.type;
|
||||
}
|
||||
|
||||
function pass(type, stream, state) {
|
||||
return states[state.context.type](type, stream, state);
|
||||
}
|
||||
function popAndPass(type, stream, state, n) {
|
||||
for (var i = n || 1; i > 0; i--)
|
||||
state.context = state.context.prev;
|
||||
return pass(type, stream, state);
|
||||
}
|
||||
|
||||
// Parser
|
||||
|
||||
function wordAsValue(stream) {
|
||||
var word = stream.current().toLowerCase();
|
||||
if (valueKeywords.hasOwnProperty(word))
|
||||
override = "atom";
|
||||
else if (colorKeywords.hasOwnProperty(word))
|
||||
override = "keyword";
|
||||
else
|
||||
override = "variable";
|
||||
}
|
||||
|
||||
var states = {};
|
||||
|
||||
states.top = function(type, stream, state) {
|
||||
if (type == "{") {
|
||||
return pushContext(state, stream, "block");
|
||||
} else if (type == "}" && state.context.prev) {
|
||||
return popContext(state);
|
||||
} else if (supportsAtComponent && /@component/.test(type)) {
|
||||
return pushContext(state, stream, "atComponentBlock");
|
||||
} else if (/^@(-moz-)?document$/.test(type)) {
|
||||
return pushContext(state, stream, "documentTypes");
|
||||
} else if (/^@(media|supports|(-moz-)?document|import)$/.test(type)) {
|
||||
return pushContext(state, stream, "atBlock");
|
||||
} else if (/^@(font-face|counter-style)/.test(type)) {
|
||||
state.stateArg = type;
|
||||
return "restricted_atBlock_before";
|
||||
} else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(type)) {
|
||||
return "keyframes";
|
||||
} else if (type && type.charAt(0) == "@") {
|
||||
return pushContext(state, stream, "at");
|
||||
} else if (type == "hash") {
|
||||
override = "builtin";
|
||||
} else if (type == "word") {
|
||||
override = "tag";
|
||||
} else if (type == "variable-definition") {
|
||||
return "maybeprop";
|
||||
} else if (type == "interpolation") {
|
||||
return pushContext(state, stream, "interpolation");
|
||||
} else if (type == ":") {
|
||||
return "pseudo";
|
||||
} else if (allowNested && type == "(") {
|
||||
return pushContext(state, stream, "parens");
|
||||
}
|
||||
return state.context.type;
|
||||
};
|
||||
|
||||
states.block = function(type, stream, state) {
|
||||
if (type == "word") {
|
||||
var word = stream.current().toLowerCase();
|
||||
if (propertyKeywords.hasOwnProperty(word)) {
|
||||
override = "property";
|
||||
return "maybeprop";
|
||||
} else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
|
||||
override = "string-2";
|
||||
return "maybeprop";
|
||||
} else if (allowNested) {
|
||||
override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
|
||||
return "block";
|
||||
} else {
|
||||
override += " error";
|
||||
return "maybeprop";
|
||||
}
|
||||
} else if (type == "meta") {
|
||||
return "block";
|
||||
} else if (!allowNested && (type == "hash" || type == "qualifier")) {
|
||||
override = "error";
|
||||
return "block";
|
||||
} else {
|
||||
return states.top(type, stream, state);
|
||||
}
|
||||
};
|
||||
|
||||
states.maybeprop = function(type, stream, state) {
|
||||
if (type == ":") return pushContext(state, stream, "prop");
|
||||
return pass(type, stream, state);
|
||||
};
|
||||
|
||||
states.prop = function(type, stream, state) {
|
||||
if (type == ";") return popContext(state);
|
||||
if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
|
||||
if (type == "}" || type == "{") return popAndPass(type, stream, state);
|
||||
if (type == "(") return pushContext(state, stream, "parens");
|
||||
|
||||
if (type == "hash" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {
|
||||
override += " error";
|
||||
} else if (type == "word") {
|
||||
wordAsValue(stream);
|
||||
} else if (type == "interpolation") {
|
||||
return pushContext(state, stream, "interpolation");
|
||||
}
|
||||
return "prop";
|
||||
};
|
||||
|
||||
states.propBlock = function(type, _stream, state) {
|
||||
if (type == "}") return popContext(state);
|
||||
if (type == "word") { override = "property"; return "maybeprop"; }
|
||||
return state.context.type;
|
||||
};
|
||||
|
||||
states.parens = function(type, stream, state) {
|
||||
if (type == "{" || type == "}") return popAndPass(type, stream, state);
|
||||
if (type == ")") return popContext(state);
|
||||
if (type == "(") return pushContext(state, stream, "parens");
|
||||
if (type == "interpolation") return pushContext(state, stream, "interpolation");
|
||||
if (type == "word") wordAsValue(stream);
|
||||
return "parens";
|
||||
};
|
||||
|
||||
states.pseudo = function(type, stream, state) {
|
||||
if (type == "word") {
|
||||
override = "variable-3";
|
||||
return state.context.type;
|
||||
}
|
||||
return pass(type, stream, state);
|
||||
};
|
||||
|
||||
states.documentTypes = function(type, stream, state) {
|
||||
if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
|
||||
override = "tag";
|
||||
return state.context.type;
|
||||
} else {
|
||||
return states.atBlock(type, stream, state);
|
||||
}
|
||||
};
|
||||
|
||||
states.atBlock = function(type, stream, state) {
|
||||
if (type == "(") return pushContext(state, stream, "atBlock_parens");
|
||||
if (type == "}" || type == ";") return popAndPass(type, stream, state);
|
||||
if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
|
||||
|
||||
if (type == "interpolation") return pushContext(state, stream, "interpolation");
|
||||
|
||||
if (type == "word") {
|
||||
var word = stream.current().toLowerCase();
|
||||
if (word == "only" || word == "not" || word == "and" || word == "or")
|
||||
override = "keyword";
|
||||
else if (mediaTypes.hasOwnProperty(word))
|
||||
override = "attribute";
|
||||
else if (mediaFeatures.hasOwnProperty(word))
|
||||
override = "property";
|
||||
else if (mediaValueKeywords.hasOwnProperty(word))
|
||||
override = "keyword";
|
||||
else if (propertyKeywords.hasOwnProperty(word))
|
||||
override = "property";
|
||||
else if (nonStandardPropertyKeywords.hasOwnProperty(word))
|
||||
override = "string-2";
|
||||
else if (valueKeywords.hasOwnProperty(word))
|
||||
override = "atom";
|
||||
else if (colorKeywords.hasOwnProperty(word))
|
||||
override = "keyword";
|
||||
else
|
||||
override = "error";
|
||||
}
|
||||
return state.context.type;
|
||||
};
|
||||
|
||||
states.atComponentBlock = function(type, stream, state) {
|
||||
if (type == "}")
|
||||
return popAndPass(type, stream, state);
|
||||
if (type == "{")
|
||||
return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
|
||||
if (type == "word")
|
||||
override = "error";
|
||||
return state.context.type;
|
||||
};
|
||||
|
||||
states.atBlock_parens = function(type, stream, state) {
|
||||
if (type == ")") return popContext(state);
|
||||
if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
|
||||
return states.atBlock(type, stream, state);
|
||||
};
|
||||
|
||||
states.restricted_atBlock_before = function(type, stream, state) {
|
||||
if (type == "{")
|
||||
return pushContext(state, stream, "restricted_atBlock");
|
||||
if (type == "word" && state.stateArg == "@counter-style") {
|
||||
override = "variable";
|
||||
return "restricted_atBlock_before";
|
||||
}
|
||||
return pass(type, stream, state);
|
||||
};
|
||||
|
||||
states.restricted_atBlock = function(type, stream, state) {
|
||||
if (type == "}") {
|
||||
state.stateArg = null;
|
||||
return popContext(state);
|
||||
}
|
||||
if (type == "word") {
|
||||
if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
|
||||
(state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
|
||||
override = "error";
|
||||
else
|
||||
override = "property";
|
||||
return "maybeprop";
|
||||
}
|
||||
return "restricted_atBlock";
|
||||
};
|
||||
|
||||
states.keyframes = function(type, stream, state) {
|
||||
if (type == "word") { override = "variable"; return "keyframes"; }
|
||||
if (type == "{") return pushContext(state, stream, "top");
|
||||
return pass(type, stream, state);
|
||||
};
|
||||
|
||||
states.at = function(type, stream, state) {
|
||||
if (type == ";") return popContext(state);
|
||||
if (type == "{" || type == "}") return popAndPass(type, stream, state);
|
||||
if (type == "word") override = "tag";
|
||||
else if (type == "hash") override = "builtin";
|
||||
return "at";
|
||||
};
|
||||
|
||||
states.interpolation = function(type, stream, state) {
|
||||
if (type == "}") return popContext(state);
|
||||
if (type == "{" || type == ";") return popAndPass(type, stream, state);
|
||||
if (type == "word") override = "variable";
|
||||
else if (type != "variable" && type != "(" && type != ")") override = "error";
|
||||
return "interpolation";
|
||||
};
|
||||
|
||||
return {
|
||||
startState: function(base) {
|
||||
return {tokenize: null,
|
||||
state: inline ? "block" : "top",
|
||||
stateArg: null,
|
||||
context: new Context(inline ? "block" : "top", base || 0, null)};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (!state.tokenize && stream.eatSpace()) return null;
|
||||
var style = (state.tokenize || tokenBase)(stream, state);
|
||||
if (style && typeof style == "object") {
|
||||
type = style[1];
|
||||
style = style[0];
|
||||
}
|
||||
override = style;
|
||||
state.state = states[state.state](type, stream, state);
|
||||
return override;
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
var cx = state.context, ch = textAfter && textAfter.charAt(0);
|
||||
var indent = cx.indent;
|
||||
if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
|
||||
if (cx.prev) {
|
||||
if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
|
||||
cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
|
||||
// Resume indentation from parent context.
|
||||
cx = cx.prev;
|
||||
indent = cx.indent;
|
||||
} else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
|
||||
ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
|
||||
// Dedent relative to current context.
|
||||
indent = Math.max(0, cx.indent - indentUnit);
|
||||
cx = cx.prev;
|
||||
}
|
||||
}
|
||||
return indent;
|
||||
},
|
||||
|
||||
electricChars: "}",
|
||||
blockCommentStart: "/*",
|
||||
blockCommentEnd: "*/",
|
||||
fold: "brace"
|
||||
};
|
||||
});
|
||||
|
||||
function keySet(array) {
|
||||
var keys = {};
|
||||
for (var i = 0; i < array.length; ++i) {
|
||||
keys[array[i]] = true;
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
var documentTypes_ = [
|
||||
"domain", "regexp", "url", "url-prefix"
|
||||
], documentTypes = keySet(documentTypes_);
|
||||
|
||||
var mediaTypes_ = [
|
||||
"all", "aural", "braille", "handheld", "print", "projection", "screen",
|
||||
"tty", "tv", "embossed"
|
||||
], mediaTypes = keySet(mediaTypes_);
|
||||
|
||||
var mediaFeatures_ = [
|
||||
"width", "min-width", "max-width", "height", "min-height", "max-height",
|
||||
"device-width", "min-device-width", "max-device-width", "device-height",
|
||||
"min-device-height", "max-device-height", "aspect-ratio",
|
||||
"min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
|
||||
"min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
|
||||
"max-color", "color-index", "min-color-index", "max-color-index",
|
||||
"monochrome", "min-monochrome", "max-monochrome", "resolution",
|
||||
"min-resolution", "max-resolution", "scan", "grid", "orientation",
|
||||
"device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
|
||||
"pointer", "any-pointer", "hover", "any-hover"
|
||||
], mediaFeatures = keySet(mediaFeatures_);
|
||||
|
||||
var mediaValueKeywords_ = [
|
||||
"landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
|
||||
"interlace", "progressive"
|
||||
], mediaValueKeywords = keySet(mediaValueKeywords_);
|
||||
|
||||
var propertyKeywords_ = [
|
||||
"align-content", "align-items", "align-self", "alignment-adjust",
|
||||
"alignment-baseline", "anchor-point", "animation", "animation-delay",
|
||||
"animation-direction", "animation-duration", "animation-fill-mode",
|
||||
"animation-iteration-count", "animation-name", "animation-play-state",
|
||||
"animation-timing-function", "appearance", "azimuth", "backface-visibility",
|
||||
"background", "background-attachment", "background-blend-mode", "background-clip",
|
||||
"background-color", "background-image", "background-origin", "background-position",
|
||||
"background-repeat", "background-size", "baseline-shift", "binding",
|
||||
"bleed", "bookmark-label", "bookmark-level", "bookmark-state",
|
||||
"bookmark-target", "border", "border-bottom", "border-bottom-color",
|
||||
"border-bottom-left-radius", "border-bottom-right-radius",
|
||||
"border-bottom-style", "border-bottom-width", "border-collapse",
|
||||
"border-color", "border-image", "border-image-outset",
|
||||
"border-image-repeat", "border-image-slice", "border-image-source",
|
||||
"border-image-width", "border-left", "border-left-color",
|
||||
"border-left-style", "border-left-width", "border-radius", "border-right",
|
||||
"border-right-color", "border-right-style", "border-right-width",
|
||||
"border-spacing", "border-style", "border-top", "border-top-color",
|
||||
"border-top-left-radius", "border-top-right-radius", "border-top-style",
|
||||
"border-top-width", "border-width", "bottom", "box-decoration-break",
|
||||
"box-shadow", "box-sizing", "break-after", "break-before", "break-inside",
|
||||
"caption-side", "clear", "clip", "color", "color-profile", "column-count",
|
||||
"column-fill", "column-gap", "column-rule", "column-rule-color",
|
||||
"column-rule-style", "column-rule-width", "column-span", "column-width",
|
||||
"columns", "content", "counter-increment", "counter-reset", "crop", "cue",
|
||||
"cue-after", "cue-before", "cursor", "direction", "display",
|
||||
"dominant-baseline", "drop-initial-after-adjust",
|
||||
"drop-initial-after-align", "drop-initial-before-adjust",
|
||||
"drop-initial-before-align", "drop-initial-size", "drop-initial-value",
|
||||
"elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis",
|
||||
"flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap",
|
||||
"float", "float-offset", "flow-from", "flow-into", "font", "font-feature-settings",
|
||||
"font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust",
|
||||
"font-stretch", "font-style", "font-synthesis", "font-variant",
|
||||
"font-variant-alternates", "font-variant-caps", "font-variant-east-asian",
|
||||
"font-variant-ligatures", "font-variant-numeric", "font-variant-position",
|
||||
"font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow",
|
||||
"grid-auto-position", "grid-auto-rows", "grid-column", "grid-column-end",
|
||||
"grid-column-start", "grid-row", "grid-row-end", "grid-row-start",
|
||||
"grid-template", "grid-template-areas", "grid-template-columns",
|
||||
"grid-template-rows", "hanging-punctuation", "height", "hyphens",
|
||||
"icon", "image-orientation", "image-rendering", "image-resolution",
|
||||
"inline-box-align", "justify-content", "left", "letter-spacing",
|
||||
"line-break", "line-height", "line-stacking", "line-stacking-ruby",
|
||||
"line-stacking-shift", "line-stacking-strategy", "list-style",
|
||||
"list-style-image", "list-style-position", "list-style-type", "margin",
|
||||
"margin-bottom", "margin-left", "margin-right", "margin-top",
|
||||
"marker-offset", "marks", "marquee-direction", "marquee-loop",
|
||||
"marquee-play-count", "marquee-speed", "marquee-style", "max-height",
|
||||
"max-width", "min-height", "min-width", "move-to", "nav-down", "nav-index",
|
||||
"nav-left", "nav-right", "nav-up", "object-fit", "object-position",
|
||||
"opacity", "order", "orphans", "outline",
|
||||
"outline-color", "outline-offset", "outline-style", "outline-width",
|
||||
"overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y",
|
||||
"padding", "padding-bottom", "padding-left", "padding-right", "padding-top",
|
||||
"page", "page-break-after", "page-break-before", "page-break-inside",
|
||||
"page-policy", "pause", "pause-after", "pause-before", "perspective",
|
||||
"perspective-origin", "pitch", "pitch-range", "play-during", "position",
|
||||
"presentation-level", "punctuation-trim", "quotes", "region-break-after",
|
||||
"region-break-before", "region-break-inside", "region-fragment",
|
||||
"rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness",
|
||||
"right", "rotation", "rotation-point", "ruby-align", "ruby-overhang",
|
||||
"ruby-position", "ruby-span", "shape-image-threshold", "shape-inside", "shape-margin",
|
||||
"shape-outside", "size", "speak", "speak-as", "speak-header",
|
||||
"speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set",
|
||||
"tab-size", "table-layout", "target", "target-name", "target-new",
|
||||
"target-position", "text-align", "text-align-last", "text-decoration",
|
||||
"text-decoration-color", "text-decoration-line", "text-decoration-skip",
|
||||
"text-decoration-style", "text-emphasis", "text-emphasis-color",
|
||||
"text-emphasis-position", "text-emphasis-style", "text-height",
|
||||
"text-indent", "text-justify", "text-outline", "text-overflow", "text-shadow",
|
||||
"text-size-adjust", "text-space-collapse", "text-transform", "text-underline-position",
|
||||
"text-wrap", "top", "transform", "transform-origin", "transform-style",
|
||||
"transition", "transition-delay", "transition-duration",
|
||||
"transition-property", "transition-timing-function", "unicode-bidi",
|
||||
"vertical-align", "visibility", "voice-balance", "voice-duration",
|
||||
"voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress",
|
||||
"voice-volume", "volume", "white-space", "widows", "width", "word-break",
|
||||
"word-spacing", "word-wrap", "z-index",
|
||||
// SVG-specific
|
||||
"clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
|
||||
"flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
|
||||
"color-interpolation", "color-interpolation-filters",
|
||||
"color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
|
||||
"marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke",
|
||||
"stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
|
||||
"stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
|
||||
"baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
|
||||
"glyph-orientation-vertical", "text-anchor", "writing-mode"
|
||||
], propertyKeywords = keySet(propertyKeywords_);
|
||||
|
||||
var nonStandardPropertyKeywords_ = [
|
||||
"scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
|
||||
"scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
|
||||
"scrollbar-3d-light-color", "scrollbar-track-color", "shape-inside",
|
||||
"searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",
|
||||
"searchfield-results-decoration", "zoom"
|
||||
], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
|
||||
|
||||
var fontProperties_ = [
|
||||
"font-family", "src", "unicode-range", "font-variant", "font-feature-settings",
|
||||
"font-stretch", "font-weight", "font-style"
|
||||
], fontProperties = keySet(fontProperties_);
|
||||
|
||||
var counterDescriptors_ = [
|
||||
"additive-symbols", "fallback", "negative", "pad", "prefix", "range",
|
||||
"speak-as", "suffix", "symbols", "system"
|
||||
], counterDescriptors = keySet(counterDescriptors_);
|
||||
|
||||
var colorKeywords_ = [
|
||||
"aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
|
||||
"bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
|
||||
"burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
|
||||
"cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
|
||||
"darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
|
||||
"darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
|
||||
"darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
|
||||
"deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
|
||||
"floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
|
||||
"gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
|
||||
"hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
|
||||
"lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
|
||||
"lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
|
||||
"lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
|
||||
"lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
|
||||
"maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
|
||||
"mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
|
||||
"mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
|
||||
"navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
|
||||
"orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
|
||||
"papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
|
||||
"purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
|
||||
"salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
|
||||
"slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
|
||||
"teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
|
||||
"whitesmoke", "yellow", "yellowgreen"
|
||||
], colorKeywords = keySet(colorKeywords_);
|
||||
|
||||
var valueKeywords_ = [
|
||||
"above", "absolute", "activeborder", "additive", "activecaption", "afar",
|
||||
"after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
|
||||
"always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
|
||||
"arabic-indic", "armenian", "asterisks", "attr", "auto", "avoid", "avoid-column", "avoid-page",
|
||||
"avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary",
|
||||
"bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
|
||||
"both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
|
||||
"buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
|
||||
"capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
|
||||
"cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
|
||||
"cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
|
||||
"col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
|
||||
"compact", "condensed", "contain", "content",
|
||||
"content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
|
||||
"cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
|
||||
"decimal-leading-zero", "default", "default-button", "destination-atop",
|
||||
"destination-in", "destination-out", "destination-over", "devanagari", "difference",
|
||||
"disc", "discard", "disclosure-closed", "disclosure-open", "document",
|
||||
"dot-dash", "dot-dot-dash",
|
||||
"dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
|
||||
"element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
|
||||
"ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
|
||||
"ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
|
||||
"ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
|
||||
"ethiopic-halehame-gez", "ethiopic-halehame-om-et",
|
||||
"ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
|
||||
"ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
|
||||
"ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
|
||||
"extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
|
||||
"forwards", "from", "geometricPrecision", "georgian", "graytext", "groove",
|
||||
"gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
|
||||
"help", "hidden", "hide", "higher", "highlight", "highlighttext",
|
||||
"hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
|
||||
"inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
|
||||
"infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
|
||||
"inline-block", "inline-flex", "inline-table", "inset", "inside", "intrinsic", "invert",
|
||||
"italic", "japanese-formal", "japanese-informal", "justify", "kannada",
|
||||
"katakana", "katakana-iroha", "keep-all", "khmer",
|
||||
"korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
|
||||
"landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
|
||||
"line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
|
||||
"local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
|
||||
"lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
|
||||
"lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "match", "matrix", "matrix3d",
|
||||
"media-controls-background", "media-current-time-display",
|
||||
"media-fullscreen-button", "media-mute-button", "media-play-button",
|
||||
"media-return-to-realtime-button", "media-rewind-button",
|
||||
"media-seek-back-button", "media-seek-forward-button", "media-slider",
|
||||
"media-sliderthumb", "media-time-remaining-display", "media-volume-slider",
|
||||
"media-volume-slider-container", "media-volume-sliderthumb", "medium",
|
||||
"menu", "menulist", "menulist-button", "menulist-text",
|
||||
"menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
|
||||
"mix", "mongolian", "monospace", "move", "multiple", "multiply", "myanmar", "n-resize",
|
||||
"narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
|
||||
"no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
|
||||
"ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "open-quote",
|
||||
"optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
|
||||
"outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
|
||||
"painted", "page", "paused", "persian", "perspective", "plus-darker", "plus-lighter",
|
||||
"pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
|
||||
"progress", "push-button", "radial-gradient", "radio", "read-only",
|
||||
"read-write", "read-write-plaintext-only", "rectangle", "region",
|
||||
"relative", "repeat", "repeating-linear-gradient",
|
||||
"repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
|
||||
"rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
|
||||
"rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
|
||||
"s-resize", "sans-serif", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
|
||||
"scroll", "scrollbar", "se-resize", "searchfield",
|
||||
"searchfield-cancel-button", "searchfield-decoration",
|
||||
"searchfield-results-button", "searchfield-results-decoration",
|
||||
"semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama",
|
||||
"simp-chinese-formal", "simp-chinese-informal", "single",
|
||||
"skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
|
||||
"slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
|
||||
"small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
|
||||
"source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "spell-out", "square",
|
||||
"square-button", "start", "static", "status-bar", "stretch", "stroke", "sub",
|
||||
"subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "table",
|
||||
"table-caption", "table-cell", "table-column", "table-column-group",
|
||||
"table-footer-group", "table-header-group", "table-row", "table-row-group",
|
||||
"tamil",
|
||||
"telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
|
||||
"thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
|
||||
"threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
|
||||
"tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
|
||||
"trad-chinese-formal", "trad-chinese-informal",
|
||||
"translate", "translate3d", "translateX", "translateY", "translateZ",
|
||||
"transparent", "ultra-condensed", "ultra-expanded", "underline", "up",
|
||||
"upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
|
||||
"upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
|
||||
"var", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
|
||||
"visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
|
||||
"window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
|
||||
"xx-large", "xx-small"
|
||||
], valueKeywords = keySet(valueKeywords_);
|
||||
|
||||
var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
|
||||
.concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
|
||||
.concat(valueKeywords_);
|
||||
CodeMirror.registerHelper("hintWords", "css", allWords);
|
||||
|
||||
function tokenCComment(stream, state) {
|
||||
var maybeEnd = false, ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (maybeEnd && ch == "/") {
|
||||
state.tokenize = null;
|
||||
break;
|
||||
}
|
||||
maybeEnd = (ch == "*");
|
||||
}
|
||||
return ["comment", "comment"];
|
||||
}
|
||||
|
||||
CodeMirror.defineMIME("text/css", {
|
||||
documentTypes: documentTypes,
|
||||
mediaTypes: mediaTypes,
|
||||
mediaFeatures: mediaFeatures,
|
||||
mediaValueKeywords: mediaValueKeywords,
|
||||
propertyKeywords: propertyKeywords,
|
||||
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
||||
fontProperties: fontProperties,
|
||||
counterDescriptors: counterDescriptors,
|
||||
colorKeywords: colorKeywords,
|
||||
valueKeywords: valueKeywords,
|
||||
tokenHooks: {
|
||||
"/": function(stream, state) {
|
||||
if (!stream.eat("*")) return false;
|
||||
state.tokenize = tokenCComment;
|
||||
return tokenCComment(stream, state);
|
||||
}
|
||||
},
|
||||
name: "css"
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-scss", {
|
||||
mediaTypes: mediaTypes,
|
||||
mediaFeatures: mediaFeatures,
|
||||
mediaValueKeywords: mediaValueKeywords,
|
||||
propertyKeywords: propertyKeywords,
|
||||
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
||||
colorKeywords: colorKeywords,
|
||||
valueKeywords: valueKeywords,
|
||||
fontProperties: fontProperties,
|
||||
allowNested: true,
|
||||
tokenHooks: {
|
||||
"/": function(stream, state) {
|
||||
if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return ["comment", "comment"];
|
||||
} else if (stream.eat("*")) {
|
||||
state.tokenize = tokenCComment;
|
||||
return tokenCComment(stream, state);
|
||||
} else {
|
||||
return ["operator", "operator"];
|
||||
}
|
||||
},
|
||||
":": function(stream) {
|
||||
if (stream.match(/\s*\{/))
|
||||
return [null, "{"];
|
||||
return false;
|
||||
},
|
||||
"$": function(stream) {
|
||||
stream.match(/^[\w-]+/);
|
||||
if (stream.match(/^\s*:/, false))
|
||||
return ["variable-2", "variable-definition"];
|
||||
return ["variable-2", "variable"];
|
||||
},
|
||||
"#": function(stream) {
|
||||
if (!stream.eat("{")) return false;
|
||||
return [null, "interpolation"];
|
||||
}
|
||||
},
|
||||
name: "css",
|
||||
helperType: "scss"
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-less", {
|
||||
mediaTypes: mediaTypes,
|
||||
mediaFeatures: mediaFeatures,
|
||||
mediaValueKeywords: mediaValueKeywords,
|
||||
propertyKeywords: propertyKeywords,
|
||||
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
||||
colorKeywords: colorKeywords,
|
||||
valueKeywords: valueKeywords,
|
||||
fontProperties: fontProperties,
|
||||
allowNested: true,
|
||||
tokenHooks: {
|
||||
"/": function(stream, state) {
|
||||
if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return ["comment", "comment"];
|
||||
} else if (stream.eat("*")) {
|
||||
state.tokenize = tokenCComment;
|
||||
return tokenCComment(stream, state);
|
||||
} else {
|
||||
return ["operator", "operator"];
|
||||
}
|
||||
},
|
||||
"@": function(stream) {
|
||||
if (stream.eat("{")) return [null, "interpolation"];
|
||||
if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/, false)) return false;
|
||||
stream.eatWhile(/[\w\\\-]/);
|
||||
if (stream.match(/^\s*:/, false))
|
||||
return ["variable-2", "variable-definition"];
|
||||
return ["variable-2", "variable"];
|
||||
},
|
||||
"&": function() {
|
||||
return ["atom", "atom"];
|
||||
}
|
||||
},
|
||||
name: "css",
|
||||
helperType: "less"
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-gss", {
|
||||
documentTypes: documentTypes,
|
||||
mediaTypes: mediaTypes,
|
||||
mediaFeatures: mediaFeatures,
|
||||
propertyKeywords: propertyKeywords,
|
||||
nonStandardPropertyKeywords: nonStandardPropertyKeywords,
|
||||
fontProperties: fontProperties,
|
||||
counterDescriptors: counterDescriptors,
|
||||
colorKeywords: colorKeywords,
|
||||
valueKeywords: valueKeywords,
|
||||
supportsAtComponent: true,
|
||||
tokenHooks: {
|
||||
"/": function(stream, state) {
|
||||
if (!stream.eat("*")) return false;
|
||||
state.tokenize = tokenCComment;
|
||||
return tokenCComment(stream, state);
|
||||
}
|
||||
},
|
||||
name: "css",
|
||||
helperType: "gss"
|
||||
});
|
||||
|
||||
});
|
103
app/lib/codemirror/mode/css/gss.html
vendored
Normal file
103
app/lib/codemirror/mode/css/gss.html
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: Closure Stylesheets (GSS) mode</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../../lib/codemirror.css">
|
||||
<link rel="stylesheet" href="../../addon/hint/show-hint.css">
|
||||
<script src="../../lib/codemirror.js"></script>
|
||||
<script src="css.js"></script>
|
||||
<script src="../../addon/hint/show-hint.js"></script>
|
||||
<script src="../../addon/hint/css-hint.js"></script>
|
||||
<style>.CodeMirror {background: #f8f8f8;}</style>
|
||||
<div id=nav>
|
||||
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../index.html">Home</a>
|
||||
<li><a href="../../doc/manual.html">Manual</a>
|
||||
<li><a href="https://github.com/codemirror/codemirror">Code</a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="../index.html">Language modes</a>
|
||||
<li><a class=active href="#">Closure Stylesheets (GSS)</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>Closure Stylesheets (GSS) mode</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
/* Some example Closure Stylesheets */
|
||||
|
||||
@provide 'some.styles';
|
||||
|
||||
@require 'other.styles';
|
||||
|
||||
@component {
|
||||
|
||||
@def FONT_FAMILY "Times New Roman", Georgia, Serif;
|
||||
@def FONT_SIZE_NORMAL 15px;
|
||||
@def FONT_NORMAL normal FONT_SIZE_NORMAL FONT_FAMILY;
|
||||
|
||||
@def BG_COLOR rgb(235, 239, 249);
|
||||
|
||||
@def DIALOG_BORDER_COLOR rgb(107, 144, 218);
|
||||
@def DIALOG_BG_COLOR BG_COLOR;
|
||||
|
||||
@def LEFT_HAND_NAV_WIDTH 180px;
|
||||
@def LEFT_HAND_NAV_PADDING 3px;
|
||||
|
||||
@defmixin size(WIDTH, HEIGHT) {
|
||||
width: WIDTH;
|
||||
height: HEIGHT;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: BG_COLOR;
|
||||
margin: 0;
|
||||
padding: 3em 6em;
|
||||
font: FONT_NORMAL;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#navigation a {
|
||||
font-weight: bold;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
.dialog {
|
||||
background-color: DIALOG_BG_COLOR;
|
||||
border: 1px solid DIALOG_BORDER_COLOR;
|
||||
}
|
||||
|
||||
.content {
|
||||
position: absolute;
|
||||
margin-left: add(LEFT_HAND_NAV_PADDING, /* padding left */
|
||||
LEFT_HAND_NAV_WIDTH,
|
||||
LEFT_HAND_NAV_PADDING); /* padding right */
|
||||
|
||||
}
|
||||
|
||||
.logo {
|
||||
@mixin size(150px, 55px);
|
||||
background-image: url('http://www.google.com/images/logo_sm.gif');
|
||||
}
|
||||
|
||||
}
|
||||
</textarea></form>
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
extraKeys: {"Ctrl-Space": "autocomplete"},
|
||||
lineNumbers: true,
|
||||
matchBrackets: "text/x-less",
|
||||
mode: "text/x-gss"
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>A mode for <a href="https://github.com/google/closure-stylesheets">Closure Stylesheets</a> (GSS).</p>
|
||||
<p><strong>MIME type defined:</strong> <code>text/x-gss</code>.</p>
|
||||
|
||||
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#gss_*">normal</a>, <a href="../../test/index.html#verbose,gss_*">verbose</a>.</p>
|
||||
|
||||
</article>
|
17
app/lib/codemirror/mode/css/gss_test.js
vendored
Normal file
17
app/lib/codemirror/mode/css/gss_test.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-gss");
|
||||
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "gss"); }
|
||||
|
||||
MT("atComponent",
|
||||
"[def @component] {",
|
||||
"[tag foo] {",
|
||||
" [property color]: [keyword black];",
|
||||
"}",
|
||||
"}");
|
||||
|
||||
})();
|
152
app/lib/codemirror/mode/css/less.html
vendored
Normal file
152
app/lib/codemirror/mode/css/less.html
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: LESS mode</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../../lib/codemirror.css">
|
||||
<script src="../../lib/codemirror.js"></script>
|
||||
<script src="../../addon/edit/matchbrackets.js"></script>
|
||||
<script src="css.js"></script>
|
||||
<style>.CodeMirror {border: 1px solid #ddd; line-height: 1.2;}</style>
|
||||
<div id=nav>
|
||||
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../index.html">Home</a>
|
||||
<li><a href="../../doc/manual.html">Manual</a>
|
||||
<li><a href="https://github.com/codemirror/codemirror">Code</a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="../index.html">Language modes</a>
|
||||
<li><a class=active href="#">LESS</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>LESS mode</h2>
|
||||
<form><textarea id="code" name="code">@media screen and (device-aspect-ratio: 16/9) { … }
|
||||
@media screen and (device-aspect-ratio: 1280/720) { … }
|
||||
@media screen and (device-aspect-ratio: 2560/1440) { … }
|
||||
|
||||
html:lang(fr-be)
|
||||
|
||||
tr:nth-child(2n+1) /* represents every odd row of an HTML table */
|
||||
|
||||
img:nth-of-type(2n+1) { float: right; }
|
||||
img:nth-of-type(2n) { float: left; }
|
||||
|
||||
body > h2:not(:first-of-type):not(:last-of-type)
|
||||
|
||||
html|*:not(:link):not(:visited)
|
||||
*|*:not(:hover)
|
||||
p::first-line { text-transform: uppercase }
|
||||
|
||||
@namespace foo url(http://www.example.com);
|
||||
foo|h1 { color: blue } /* first rule */
|
||||
|
||||
span[hello="Ocean"][goodbye="Land"]
|
||||
|
||||
E[foo]{
|
||||
padding:65px;
|
||||
}
|
||||
|
||||
input[type="search"]::-webkit-search-decoration,
|
||||
input[type="search"]::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none; // Inner-padding issues in Chrome OSX, Safari 5
|
||||
}
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner { // Inner padding and border oddities in FF3/4
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
.btn {
|
||||
// reset here as of 2.0.3 due to Recess property order
|
||||
border-color: #ccc;
|
||||
border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);
|
||||
}
|
||||
fieldset span button, fieldset span input[type="file"] {
|
||||
font-size:12px;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.rounded-corners (@radius: 5px) {
|
||||
border-radius: @radius;
|
||||
-webkit-border-radius: @radius;
|
||||
-moz-border-radius: @radius;
|
||||
}
|
||||
|
||||
@import url("something.css");
|
||||
|
||||
@light-blue: hsl(190, 50%, 65%);
|
||||
|
||||
#menu {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: 3;
|
||||
clear: both;
|
||||
display: block;
|
||||
background-color: @blue;
|
||||
height: 42px;
|
||||
border-top: 2px solid lighten(@alpha-blue, 20%);
|
||||
border-bottom: 2px solid darken(@alpha-blue, 25%);
|
||||
.box-shadow(0, 1px, 8px, 0.6);
|
||||
-moz-box-shadow: 0 0 0 #000; // Because firefox sucks.
|
||||
|
||||
&.docked {
|
||||
background-color: hsla(210, 60%, 40%, 0.4);
|
||||
}
|
||||
&:hover {
|
||||
background-color: @blue;
|
||||
}
|
||||
|
||||
#dropdown {
|
||||
margin: 0 0 0 117px;
|
||||
padding: 0;
|
||||
padding-top: 5px;
|
||||
display: none;
|
||||
width: 190px;
|
||||
border-top: 2px solid @medium;
|
||||
color: @highlight;
|
||||
border: 2px solid darken(@medium, 25%);
|
||||
border-left-color: darken(@medium, 15%);
|
||||
border-right-color: darken(@medium, 15%);
|
||||
border-top-width: 0;
|
||||
background-color: darken(@medium, 10%);
|
||||
ul {
|
||||
padding: 0px;
|
||||
}
|
||||
li {
|
||||
font-size: 14px;
|
||||
display: block;
|
||||
text-align: left;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
a {
|
||||
display: block;
|
||||
padding: 0px 15px;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
&:hover {
|
||||
background-color: darken(@medium, 15%);
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.border-radius(5px, bottom);
|
||||
.box-shadow(0, 6px, 8px, 0.5);
|
||||
}
|
||||
}
|
||||
</textarea></form>
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers : true,
|
||||
matchBrackets : true,
|
||||
mode: "text/x-less"
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>The LESS mode is a sub-mode of the <a href="index.html">CSS mode</a> (defined in <code>css.js</code>).</p>
|
||||
|
||||
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#less_*">normal</a>, <a href="../../test/index.html#verbose,less_*">verbose</a>.</p>
|
||||
</article>
|
157
app/lib/codemirror/mode/css/scss.html
vendored
Normal file
157
app/lib/codemirror/mode/css/scss.html
vendored
Normal file
@@ -0,0 +1,157 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: SCSS mode</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../../lib/codemirror.css">
|
||||
<script src="../../lib/codemirror.js"></script>
|
||||
<script src="css.js"></script>
|
||||
<style>.CodeMirror {background: #f8f8f8;}</style>
|
||||
<div id=nav>
|
||||
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../index.html">Home</a>
|
||||
<li><a href="../../doc/manual.html">Manual</a>
|
||||
<li><a href="https://github.com/codemirror/codemirror">Code</a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="../index.html">Language modes</a>
|
||||
<li><a class=active href="#">SCSS</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>SCSS mode</h2>
|
||||
<form><textarea id="code" name="code">
|
||||
/* Some example SCSS */
|
||||
|
||||
@import "compass/css3";
|
||||
$variable: #333;
|
||||
|
||||
$blue: #3bbfce;
|
||||
$margin: 16px;
|
||||
|
||||
.content-navigation {
|
||||
#nested {
|
||||
background-color: black;
|
||||
}
|
||||
border-color: $blue;
|
||||
color:
|
||||
darken($blue, 9%);
|
||||
}
|
||||
|
||||
.border {
|
||||
padding: $margin / 2;
|
||||
margin: $margin / 2;
|
||||
border-color: $blue;
|
||||
}
|
||||
|
||||
@mixin table-base {
|
||||
th {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
td, th {padding: 2px}
|
||||
}
|
||||
|
||||
table.hl {
|
||||
margin: 2em 0;
|
||||
td.ln {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
li {
|
||||
font: {
|
||||
family: serif;
|
||||
weight: bold;
|
||||
size: 1.2em;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin left($dist) {
|
||||
float: left;
|
||||
margin-left: $dist;
|
||||
}
|
||||
|
||||
#data {
|
||||
@include left(10px);
|
||||
@include table-base;
|
||||
}
|
||||
|
||||
.source {
|
||||
@include flow-into(target);
|
||||
border: 10px solid green;
|
||||
margin: 20px;
|
||||
width: 200px; }
|
||||
|
||||
.new-container {
|
||||
@include flow-from(target);
|
||||
border: 10px solid red;
|
||||
margin: 20px;
|
||||
width: 200px; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 3em 6em;
|
||||
font-family: tahoma, arial, sans-serif;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
@mixin yellow() {
|
||||
background: yellow;
|
||||
}
|
||||
|
||||
.big {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.nested {
|
||||
@include border-radius(3px);
|
||||
@extend .big;
|
||||
p {
|
||||
background: whitesmoke;
|
||||
a {
|
||||
color: red;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#navigation a {
|
||||
font-weight: bold;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2.5em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.7em;
|
||||
}
|
||||
|
||||
h1:before, h2:before {
|
||||
content: "::";
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: courier, monospace;
|
||||
font-size: 80%;
|
||||
color: #418A8A;
|
||||
}
|
||||
</textarea></form>
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
mode: "text/x-scss"
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>The SCSS mode is a sub-mode of the <a href="index.html">CSS mode</a> (defined in <code>css.js</code>).</p>
|
||||
|
||||
<p><strong>Parsing/Highlighting Tests:</strong> <a href="../../test/index.html#scss_*">normal</a>, <a href="../../test/index.html#verbose,scss_*">verbose</a>.</p>
|
||||
|
||||
</article>
|
161
app/lib/codemirror/mode/haml/haml.js
vendored
Normal file
161
app/lib/codemirror/mode/haml/haml.js
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../ruby/ruby"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../ruby/ruby"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
// full haml mode. This handled embedded ruby and html fragments too
|
||||
CodeMirror.defineMode("haml", function(config) {
|
||||
var htmlMode = CodeMirror.getMode(config, {name: "htmlmixed"});
|
||||
var rubyMode = CodeMirror.getMode(config, "ruby");
|
||||
|
||||
function rubyInQuote(endQuote) {
|
||||
return function(stream, state) {
|
||||
var ch = stream.peek();
|
||||
if (ch == endQuote && state.rubyState.tokenize.length == 1) {
|
||||
// step out of ruby context as it seems to complete processing all the braces
|
||||
stream.next();
|
||||
state.tokenize = html;
|
||||
return "closeAttributeTag";
|
||||
} else {
|
||||
return ruby(stream, state);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function ruby(stream, state) {
|
||||
if (stream.match("-#")) {
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
}
|
||||
return rubyMode.token(stream, state.rubyState);
|
||||
}
|
||||
|
||||
function html(stream, state) {
|
||||
var ch = stream.peek();
|
||||
|
||||
// handle haml declarations. All declarations that cant be handled here
|
||||
// will be passed to html mode
|
||||
if (state.previousToken.style == "comment" ) {
|
||||
if (state.indented > state.previousToken.indented) {
|
||||
stream.skipToEnd();
|
||||
return "commentLine";
|
||||
}
|
||||
}
|
||||
|
||||
if (state.startOfLine) {
|
||||
if (ch == "!" && stream.match("!!")) {
|
||||
stream.skipToEnd();
|
||||
return "tag";
|
||||
} else if (stream.match(/^%[\w:#\.]+=/)) {
|
||||
state.tokenize = ruby;
|
||||
return "hamlTag";
|
||||
} else if (stream.match(/^%[\w:]+/)) {
|
||||
return "hamlTag";
|
||||
} else if (ch == "/" ) {
|
||||
stream.skipToEnd();
|
||||
return "comment";
|
||||
}
|
||||
}
|
||||
|
||||
if (state.startOfLine || state.previousToken.style == "hamlTag") {
|
||||
if ( ch == "#" || ch == ".") {
|
||||
stream.match(/[\w-#\.]*/);
|
||||
return "hamlAttribute";
|
||||
}
|
||||
}
|
||||
|
||||
// donot handle --> as valid ruby, make it HTML close comment instead
|
||||
if (state.startOfLine && !stream.match("-->", false) && (ch == "=" || ch == "-" )) {
|
||||
state.tokenize = ruby;
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
|
||||
if (state.previousToken.style == "hamlTag" ||
|
||||
state.previousToken.style == "closeAttributeTag" ||
|
||||
state.previousToken.style == "hamlAttribute") {
|
||||
if (ch == "(") {
|
||||
state.tokenize = rubyInQuote(")");
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == "{") {
|
||||
if (!stream.match(/^\{%.*/)) {
|
||||
state.tokenize = rubyInQuote("}");
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return htmlMode.token(stream, state.htmlState);
|
||||
}
|
||||
|
||||
return {
|
||||
// default to html mode
|
||||
startState: function() {
|
||||
var htmlState = htmlMode.startState();
|
||||
var rubyState = rubyMode.startState();
|
||||
return {
|
||||
htmlState: htmlState,
|
||||
rubyState: rubyState,
|
||||
indented: 0,
|
||||
previousToken: { style: null, indented: 0},
|
||||
tokenize: html
|
||||
};
|
||||
},
|
||||
|
||||
copyState: function(state) {
|
||||
return {
|
||||
htmlState : CodeMirror.copyState(htmlMode, state.htmlState),
|
||||
rubyState: CodeMirror.copyState(rubyMode, state.rubyState),
|
||||
indented: state.indented,
|
||||
previousToken: state.previousToken,
|
||||
tokenize: state.tokenize
|
||||
};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (stream.sol()) {
|
||||
state.indented = stream.indentation();
|
||||
state.startOfLine = true;
|
||||
}
|
||||
if (stream.eatSpace()) return null;
|
||||
var style = state.tokenize(stream, state);
|
||||
state.startOfLine = false;
|
||||
// dont record comment line as we only want to measure comment line with
|
||||
// the opening comment block
|
||||
if (style && style != "commentLine") {
|
||||
state.previousToken = { style: style, indented: state.indented };
|
||||
}
|
||||
// if current state is ruby and the previous token is not `,` reset the
|
||||
// tokenize to html
|
||||
if (stream.eol() && state.tokenize == ruby) {
|
||||
stream.backUp(1);
|
||||
var ch = stream.peek();
|
||||
stream.next();
|
||||
if (ch && ch != ",") {
|
||||
state.tokenize = html;
|
||||
}
|
||||
}
|
||||
// reprocess some of the specific style tag when finish setting previousToken
|
||||
if (style == "hamlTag") {
|
||||
style = "tag";
|
||||
} else if (style == "commentLine") {
|
||||
style = "comment";
|
||||
} else if (style == "hamlAttribute") {
|
||||
style = "attribute";
|
||||
} else if (style == "closeAttributeTag") {
|
||||
style = null;
|
||||
}
|
||||
return style;
|
||||
}
|
||||
};
|
||||
}, "htmlmixed", "ruby");
|
||||
|
||||
CodeMirror.defineMIME("text/x-haml", "haml");
|
||||
});
|
28
app/lib/codemirror/mode/htmlembedded/htmlembedded.js
vendored
Normal file
28
app/lib/codemirror/mode/htmlembedded/htmlembedded.js
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"),
|
||||
require("../../addon/mode/multiplex"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../htmlmixed/htmlmixed",
|
||||
"../../addon/mode/multiplex"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("htmlembedded", function(config, parserConfig) {
|
||||
return CodeMirror.multiplexingMode(CodeMirror.getMode(config, "htmlmixed"), {
|
||||
open: parserConfig.open || parserConfig.scriptStartRegex || "<%",
|
||||
close: parserConfig.close || parserConfig.scriptEndRegex || "%>",
|
||||
mode: CodeMirror.getMode(config, parserConfig.scriptingModeSpec)
|
||||
});
|
||||
}, "htmlmixed");
|
||||
|
||||
CodeMirror.defineMIME("application/x-ejs", {name: "htmlembedded", scriptingModeSpec:"javascript"});
|
||||
CodeMirror.defineMIME("application/x-aspx", {name: "htmlembedded", scriptingModeSpec:"text/x-csharp"});
|
||||
CodeMirror.defineMIME("application/x-jsp", {name: "htmlembedded", scriptingModeSpec:"text/x-java"});
|
||||
CodeMirror.defineMIME("application/x-erb", {name: "htmlembedded", scriptingModeSpec:"ruby"});
|
||||
});
|
152
app/lib/codemirror/mode/htmlmixed/htmlmixed.js
vendored
Normal file
152
app/lib/codemirror/mode/htmlmixed/htmlmixed.js
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"), require("../css/css"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript", "../css/css"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
var defaultTags = {
|
||||
script: [
|
||||
["lang", /(javascript|babel)/i, "javascript"],
|
||||
["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i, "javascript"],
|
||||
["type", /./, "text/plain"],
|
||||
[null, null, "javascript"]
|
||||
],
|
||||
style: [
|
||||
["lang", /^css$/i, "css"],
|
||||
["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"],
|
||||
["type", /./, "text/plain"],
|
||||
[null, null, "css"]
|
||||
]
|
||||
};
|
||||
|
||||
function maybeBackup(stream, pat, style) {
|
||||
var cur = stream.current(), close = cur.search(pat);
|
||||
if (close > -1) {
|
||||
stream.backUp(cur.length - close);
|
||||
} else if (cur.match(/<\/?$/)) {
|
||||
stream.backUp(cur.length);
|
||||
if (!stream.match(pat, false)) stream.match(cur);
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
var attrRegexpCache = {};
|
||||
function getAttrRegexp(attr) {
|
||||
var regexp = attrRegexpCache[attr];
|
||||
if (regexp) return regexp;
|
||||
return attrRegexpCache[attr] = new RegExp("\\s+" + attr + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*");
|
||||
}
|
||||
|
||||
function getAttrValue(text, attr) {
|
||||
var match = text.match(getAttrRegexp(attr))
|
||||
return match ? match[2] : ""
|
||||
}
|
||||
|
||||
function getTagRegexp(tagName, anchored) {
|
||||
return new RegExp((anchored ? "^" : "") + "<\/\s*" + tagName + "\s*>", "i");
|
||||
}
|
||||
|
||||
function addTags(from, to) {
|
||||
for (var tag in from) {
|
||||
var dest = to[tag] || (to[tag] = []);
|
||||
var source = from[tag];
|
||||
for (var i = source.length - 1; i >= 0; i--)
|
||||
dest.unshift(source[i])
|
||||
}
|
||||
}
|
||||
|
||||
function findMatchingMode(tagInfo, tagText) {
|
||||
for (var i = 0; i < tagInfo.length; i++) {
|
||||
var spec = tagInfo[i];
|
||||
if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2];
|
||||
}
|
||||
}
|
||||
|
||||
CodeMirror.defineMode("htmlmixed", function (config, parserConfig) {
|
||||
var htmlMode = CodeMirror.getMode(config, {
|
||||
name: "xml",
|
||||
htmlMode: true,
|
||||
multilineTagIndentFactor: parserConfig.multilineTagIndentFactor,
|
||||
multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag
|
||||
});
|
||||
|
||||
var tags = {};
|
||||
var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;
|
||||
addTags(defaultTags, tags);
|
||||
if (configTags) addTags(configTags, tags);
|
||||
if (configScript) for (var i = configScript.length - 1; i >= 0; i--)
|
||||
tags.script.unshift(["type", configScript[i].matches, configScript[i].mode])
|
||||
|
||||
function html(stream, state) {
|
||||
var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName
|
||||
if (tag && !/[<>\s\/]/.test(stream.current()) &&
|
||||
(tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) &&
|
||||
tags.hasOwnProperty(tagName)) {
|
||||
state.inTag = tagName + " "
|
||||
} else if (state.inTag && tag && />$/.test(stream.current())) {
|
||||
var inTag = /^([\S]+) (.*)/.exec(state.inTag)
|
||||
state.inTag = null
|
||||
var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2])
|
||||
var mode = CodeMirror.getMode(config, modeSpec)
|
||||
var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false);
|
||||
state.token = function (stream, state) {
|
||||
if (stream.match(endTagA, false)) {
|
||||
state.token = html;
|
||||
state.localState = state.localMode = null;
|
||||
return null;
|
||||
}
|
||||
return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState));
|
||||
};
|
||||
state.localMode = mode;
|
||||
state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, ""));
|
||||
} else if (state.inTag) {
|
||||
state.inTag += stream.current()
|
||||
if (stream.eol()) state.inTag += " "
|
||||
}
|
||||
return style;
|
||||
};
|
||||
|
||||
return {
|
||||
startState: function () {
|
||||
var state = htmlMode.startState();
|
||||
return {token: html, inTag: null, localMode: null, localState: null, htmlState: state};
|
||||
},
|
||||
|
||||
copyState: function (state) {
|
||||
var local;
|
||||
if (state.localState) {
|
||||
local = CodeMirror.copyState(state.localMode, state.localState);
|
||||
}
|
||||
return {token: state.token, inTag: state.inTag,
|
||||
localMode: state.localMode, localState: local,
|
||||
htmlState: CodeMirror.copyState(htmlMode, state.htmlState)};
|
||||
},
|
||||
|
||||
token: function (stream, state) {
|
||||
return state.token(stream, state);
|
||||
},
|
||||
|
||||
indent: function (state, textAfter) {
|
||||
if (!state.localMode || /^\s*<\//.test(textAfter))
|
||||
return htmlMode.indent(state.htmlState, textAfter);
|
||||
else if (state.localMode.indent)
|
||||
return state.localMode.indent(state.localState, textAfter);
|
||||
else
|
||||
return CodeMirror.Pass;
|
||||
},
|
||||
|
||||
innerMode: function (state) {
|
||||
return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode};
|
||||
}
|
||||
};
|
||||
}, "xml", "javascript", "css");
|
||||
|
||||
CodeMirror.defineMIME("text/html", "htmlmixed");
|
||||
});
|
742
app/lib/codemirror/mode/javascript/javascript.js
vendored
Normal file
742
app/lib/codemirror/mode/javascript/javascript.js
vendored
Normal file
@@ -0,0 +1,742 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
// TODO actually recognize syntax of TypeScript constructs
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
function expressionAllowed(stream, state, backUp) {
|
||||
return /^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(state.lastType) ||
|
||||
(state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0))))
|
||||
}
|
||||
|
||||
CodeMirror.defineMode("javascript", function(config, parserConfig) {
|
||||
var indentUnit = config.indentUnit;
|
||||
var statementIndent = parserConfig.statementIndent;
|
||||
var jsonldMode = parserConfig.jsonld;
|
||||
var jsonMode = parserConfig.json || jsonldMode;
|
||||
var isTS = parserConfig.typescript;
|
||||
var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/;
|
||||
|
||||
// Tokenizer
|
||||
|
||||
var keywords = function(){
|
||||
function kw(type) {return {type: type, style: "keyword"};}
|
||||
var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
|
||||
var operator = kw("operator"), atom = {type: "atom", style: "atom"};
|
||||
|
||||
var jsKeywords = {
|
||||
"if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
|
||||
"return": C, "break": C, "continue": C, "new": kw("new"), "delete": C, "throw": C, "debugger": C,
|
||||
"var": kw("var"), "const": kw("var"), "let": kw("var"),
|
||||
"function": kw("function"), "catch": kw("catch"),
|
||||
"for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
|
||||
"in": operator, "typeof": operator, "instanceof": operator,
|
||||
"true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
|
||||
"this": kw("this"), "class": kw("class"), "super": kw("atom"),
|
||||
"yield": C, "export": kw("export"), "import": kw("import"), "extends": C
|
||||
};
|
||||
|
||||
// Extend the 'normal' keywords with the TypeScript language extensions
|
||||
if (isTS) {
|
||||
var type = {type: "variable", style: "variable-3"};
|
||||
var tsKeywords = {
|
||||
// object-like things
|
||||
"interface": kw("class"),
|
||||
"implements": C,
|
||||
"namespace": C,
|
||||
"module": kw("module"),
|
||||
"enum": kw("module"),
|
||||
|
||||
// scope modifiers
|
||||
"public": kw("modifier"),
|
||||
"private": kw("modifier"),
|
||||
"protected": kw("modifier"),
|
||||
"abstract": kw("modifier"),
|
||||
|
||||
// operators
|
||||
"as": operator,
|
||||
|
||||
// types
|
||||
"string": type, "number": type, "boolean": type, "any": type
|
||||
};
|
||||
|
||||
for (var attr in tsKeywords) {
|
||||
jsKeywords[attr] = tsKeywords[attr];
|
||||
}
|
||||
}
|
||||
|
||||
return jsKeywords;
|
||||
}();
|
||||
|
||||
var isOperatorChar = /[+\-*&%=<>!?|~^]/;
|
||||
var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
|
||||
|
||||
function readRegexp(stream) {
|
||||
var escaped = false, next, inSet = false;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (!escaped) {
|
||||
if (next == "/" && !inSet) return;
|
||||
if (next == "[") inSet = true;
|
||||
else if (inSet && next == "]") inSet = false;
|
||||
}
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
}
|
||||
|
||||
// Used as scratch variables to communicate multiple values without
|
||||
// consing up tons of objects.
|
||||
var type, content;
|
||||
function ret(tp, style, cont) {
|
||||
type = tp; content = cont;
|
||||
return style;
|
||||
}
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (ch == '"' || ch == "'") {
|
||||
state.tokenize = tokenString(ch);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
|
||||
return ret("number", "number");
|
||||
} else if (ch == "." && stream.match("..")) {
|
||||
return ret("spread", "meta");
|
||||
} else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
||||
return ret(ch);
|
||||
} else if (ch == "=" && stream.eat(">")) {
|
||||
return ret("=>", "operator");
|
||||
} else if (ch == "0" && stream.eat(/x/i)) {
|
||||
stream.eatWhile(/[\da-f]/i);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "0" && stream.eat(/o/i)) {
|
||||
stream.eatWhile(/[0-7]/i);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "0" && stream.eat(/b/i)) {
|
||||
stream.eatWhile(/[01]/i);
|
||||
return ret("number", "number");
|
||||
} else if (/\d/.test(ch)) {
|
||||
stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
|
||||
return ret("number", "number");
|
||||
} else if (ch == "/") {
|
||||
if (stream.eat("*")) {
|
||||
state.tokenize = tokenComment;
|
||||
return tokenComment(stream, state);
|
||||
} else if (stream.eat("/")) {
|
||||
stream.skipToEnd();
|
||||
return ret("comment", "comment");
|
||||
} else if (expressionAllowed(stream, state, 1)) {
|
||||
readRegexp(stream);
|
||||
stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);
|
||||
return ret("regexp", "string-2");
|
||||
} else {
|
||||
stream.eatWhile(isOperatorChar);
|
||||
return ret("operator", "operator", stream.current());
|
||||
}
|
||||
} else if (ch == "`") {
|
||||
state.tokenize = tokenQuasi;
|
||||
return tokenQuasi(stream, state);
|
||||
} else if (ch == "#") {
|
||||
stream.skipToEnd();
|
||||
return ret("error", "error");
|
||||
} else if (isOperatorChar.test(ch)) {
|
||||
stream.eatWhile(isOperatorChar);
|
||||
return ret("operator", "operator", stream.current());
|
||||
} else if (wordRE.test(ch)) {
|
||||
stream.eatWhile(wordRE);
|
||||
var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
|
||||
return (known && state.lastType != ".") ? ret(known.type, known.style, word) :
|
||||
ret("variable", "variable", word);
|
||||
}
|
||||
}
|
||||
|
||||
function tokenString(quote) {
|
||||
return function(stream, state) {
|
||||
var escaped = false, next;
|
||||
if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
|
||||
state.tokenize = tokenBase;
|
||||
return ret("jsonld-keyword", "meta");
|
||||
}
|
||||
while ((next = stream.next()) != null) {
|
||||
if (next == quote && !escaped) break;
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
if (!escaped) state.tokenize = tokenBase;
|
||||
return ret("string", "string");
|
||||
};
|
||||
}
|
||||
|
||||
function tokenComment(stream, state) {
|
||||
var maybeEnd = false, ch;
|
||||
while (ch = stream.next()) {
|
||||
if (ch == "/" && maybeEnd) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
maybeEnd = (ch == "*");
|
||||
}
|
||||
return ret("comment", "comment");
|
||||
}
|
||||
|
||||
function tokenQuasi(stream, state) {
|
||||
var escaped = false, next;
|
||||
while ((next = stream.next()) != null) {
|
||||
if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
|
||||
state.tokenize = tokenBase;
|
||||
break;
|
||||
}
|
||||
escaped = !escaped && next == "\\";
|
||||
}
|
||||
return ret("quasi", "string-2", stream.current());
|
||||
}
|
||||
|
||||
var brackets = "([{}])";
|
||||
// This is a crude lookahead trick to try and notice that we're
|
||||
// parsing the argument patterns for a fat-arrow function before we
|
||||
// actually hit the arrow token. It only works if the arrow is on
|
||||
// the same line as the arguments and there's no strange noise
|
||||
// (comments) in between. Fallback is to only notice when we hit the
|
||||
// arrow, and not declare the arguments as locals for the arrow
|
||||
// body.
|
||||
function findFatArrow(stream, state) {
|
||||
if (state.fatArrowAt) state.fatArrowAt = null;
|
||||
var arrow = stream.string.indexOf("=>", stream.start);
|
||||
if (arrow < 0) return;
|
||||
|
||||
var depth = 0, sawSomething = false;
|
||||
for (var pos = arrow - 1; pos >= 0; --pos) {
|
||||
var ch = stream.string.charAt(pos);
|
||||
var bracket = brackets.indexOf(ch);
|
||||
if (bracket >= 0 && bracket < 3) {
|
||||
if (!depth) { ++pos; break; }
|
||||
if (--depth == 0) break;
|
||||
} else if (bracket >= 3 && bracket < 6) {
|
||||
++depth;
|
||||
} else if (wordRE.test(ch)) {
|
||||
sawSomething = true;
|
||||
} else if (/["'\/]/.test(ch)) {
|
||||
return;
|
||||
} else if (sawSomething && !depth) {
|
||||
++pos;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (sawSomething && !depth) state.fatArrowAt = pos;
|
||||
}
|
||||
|
||||
// Parser
|
||||
|
||||
var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true};
|
||||
|
||||
function JSLexical(indented, column, type, align, prev, info) {
|
||||
this.indented = indented;
|
||||
this.column = column;
|
||||
this.type = type;
|
||||
this.prev = prev;
|
||||
this.info = info;
|
||||
if (align != null) this.align = align;
|
||||
}
|
||||
|
||||
function inScope(state, varname) {
|
||||
for (var v = state.localVars; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
for (var cx = state.context; cx; cx = cx.prev) {
|
||||
for (var v = cx.vars; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
}
|
||||
}
|
||||
|
||||
function parseJS(state, style, type, content, stream) {
|
||||
var cc = state.cc;
|
||||
// Communicate our context to the combinators.
|
||||
// (Less wasteful than consing up a hundred closures on every call.)
|
||||
cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style;
|
||||
|
||||
if (!state.lexical.hasOwnProperty("align"))
|
||||
state.lexical.align = true;
|
||||
|
||||
while(true) {
|
||||
var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
|
||||
if (combinator(type, content)) {
|
||||
while(cc.length && cc[cc.length - 1].lex)
|
||||
cc.pop()();
|
||||
if (cx.marked) return cx.marked;
|
||||
if (type == "variable" && inScope(state, content)) return "variable-2";
|
||||
return style;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Combinator utils
|
||||
|
||||
var cx = {state: null, column: null, marked: null, cc: null};
|
||||
function pass() {
|
||||
for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
|
||||
}
|
||||
function cont() {
|
||||
pass.apply(null, arguments);
|
||||
return true;
|
||||
}
|
||||
function register(varname) {
|
||||
function inList(list) {
|
||||
for (var v = list; v; v = v.next)
|
||||
if (v.name == varname) return true;
|
||||
return false;
|
||||
}
|
||||
var state = cx.state;
|
||||
cx.marked = "def";
|
||||
if (state.context) {
|
||||
if (inList(state.localVars)) return;
|
||||
state.localVars = {name: varname, next: state.localVars};
|
||||
} else {
|
||||
if (inList(state.globalVars)) return;
|
||||
if (parserConfig.globalVars)
|
||||
state.globalVars = {name: varname, next: state.globalVars};
|
||||
}
|
||||
}
|
||||
|
||||
// Combinators
|
||||
|
||||
var defaultVars = {name: "this", next: {name: "arguments"}};
|
||||
function pushcontext() {
|
||||
cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
|
||||
cx.state.localVars = defaultVars;
|
||||
}
|
||||
function popcontext() {
|
||||
cx.state.localVars = cx.state.context.vars;
|
||||
cx.state.context = cx.state.context.prev;
|
||||
}
|
||||
function pushlex(type, info) {
|
||||
var result = function() {
|
||||
var state = cx.state, indent = state.indented;
|
||||
if (state.lexical.type == "stat") indent = state.lexical.indented;
|
||||
else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
|
||||
indent = outer.indented;
|
||||
state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
|
||||
};
|
||||
result.lex = true;
|
||||
return result;
|
||||
}
|
||||
function poplex() {
|
||||
var state = cx.state;
|
||||
if (state.lexical.prev) {
|
||||
if (state.lexical.type == ")")
|
||||
state.indented = state.lexical.indented;
|
||||
state.lexical = state.lexical.prev;
|
||||
}
|
||||
}
|
||||
poplex.lex = true;
|
||||
|
||||
function expect(wanted) {
|
||||
function exp(type) {
|
||||
if (type == wanted) return cont();
|
||||
else if (wanted == ";") return pass();
|
||||
else return cont(exp);
|
||||
};
|
||||
return exp;
|
||||
}
|
||||
|
||||
function statement(type, value) {
|
||||
if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
|
||||
if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
|
||||
if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
|
||||
if (type == "{") return cont(pushlex("}"), block, poplex);
|
||||
if (type == ";") return cont();
|
||||
if (type == "if") {
|
||||
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
|
||||
cx.state.cc.pop()();
|
||||
return cont(pushlex("form"), expression, statement, poplex, maybeelse);
|
||||
}
|
||||
if (type == "function") return cont(functiondef);
|
||||
if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
|
||||
if (type == "variable") return cont(pushlex("stat"), maybelabel);
|
||||
if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
|
||||
block, poplex, poplex);
|
||||
if (type == "case") return cont(expression, expect(":"));
|
||||
if (type == "default") return cont(expect(":"));
|
||||
if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
|
||||
statement, poplex, popcontext);
|
||||
if (type == "class") return cont(pushlex("form"), className, poplex);
|
||||
if (type == "export") return cont(pushlex("stat"), afterExport, poplex);
|
||||
if (type == "import") return cont(pushlex("stat"), afterImport, poplex);
|
||||
if (type == "module") return cont(pushlex("form"), pattern, pushlex("}"), expect("{"), block, poplex, poplex)
|
||||
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
||||
}
|
||||
function expression(type) {
|
||||
return expressionInner(type, false);
|
||||
}
|
||||
function expressionNoComma(type) {
|
||||
return expressionInner(type, true);
|
||||
}
|
||||
function expressionInner(type, noComma) {
|
||||
if (cx.state.fatArrowAt == cx.stream.start) {
|
||||
var body = noComma ? arrowBodyNoComma : arrowBody;
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(pattern, ")"), poplex, expect("=>"), body, popcontext);
|
||||
else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
|
||||
}
|
||||
|
||||
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
||||
if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
|
||||
if (type == "function") return cont(functiondef, maybeop);
|
||||
if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
|
||||
if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop);
|
||||
if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
|
||||
if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
|
||||
if (type == "{") return contCommasep(objprop, "}", null, maybeop);
|
||||
if (type == "quasi") return pass(quasi, maybeop);
|
||||
if (type == "new") return cont(maybeTarget(noComma));
|
||||
return cont();
|
||||
}
|
||||
function maybeexpression(type) {
|
||||
if (type.match(/[;\}\)\],]/)) return pass();
|
||||
return pass(expression);
|
||||
}
|
||||
function maybeexpressionNoComma(type) {
|
||||
if (type.match(/[;\}\)\],]/)) return pass();
|
||||
return pass(expressionNoComma);
|
||||
}
|
||||
|
||||
function maybeoperatorComma(type, value) {
|
||||
if (type == ",") return cont(expression);
|
||||
return maybeoperatorNoComma(type, value, false);
|
||||
}
|
||||
function maybeoperatorNoComma(type, value, noComma) {
|
||||
var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
|
||||
var expr = noComma == false ? expression : expressionNoComma;
|
||||
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
|
||||
if (type == "operator") {
|
||||
if (/\+\+|--/.test(value)) return cont(me);
|
||||
if (value == "?") return cont(expression, expect(":"), expr);
|
||||
return cont(expr);
|
||||
}
|
||||
if (type == "quasi") { return pass(quasi, me); }
|
||||
if (type == ";") return;
|
||||
if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
|
||||
if (type == ".") return cont(property, me);
|
||||
if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
|
||||
}
|
||||
function quasi(type, value) {
|
||||
if (type != "quasi") return pass();
|
||||
if (value.slice(value.length - 2) != "${") return cont(quasi);
|
||||
return cont(expression, continueQuasi);
|
||||
}
|
||||
function continueQuasi(type) {
|
||||
if (type == "}") {
|
||||
cx.marked = "string-2";
|
||||
cx.state.tokenize = tokenQuasi;
|
||||
return cont(quasi);
|
||||
}
|
||||
}
|
||||
function arrowBody(type) {
|
||||
findFatArrow(cx.stream, cx.state);
|
||||
return pass(type == "{" ? statement : expression);
|
||||
}
|
||||
function arrowBodyNoComma(type) {
|
||||
findFatArrow(cx.stream, cx.state);
|
||||
return pass(type == "{" ? statement : expressionNoComma);
|
||||
}
|
||||
function maybeTarget(noComma) {
|
||||
return function(type) {
|
||||
if (type == ".") return cont(noComma ? targetNoComma : target);
|
||||
else return pass(noComma ? expressionNoComma : expression);
|
||||
};
|
||||
}
|
||||
function target(_, value) {
|
||||
if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); }
|
||||
}
|
||||
function targetNoComma(_, value) {
|
||||
if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); }
|
||||
}
|
||||
function maybelabel(type) {
|
||||
if (type == ":") return cont(poplex, statement);
|
||||
return pass(maybeoperatorComma, expect(";"), poplex);
|
||||
}
|
||||
function property(type) {
|
||||
if (type == "variable") {cx.marked = "property"; return cont();}
|
||||
}
|
||||
function objprop(type, value) {
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
cx.marked = "property";
|
||||
if (value == "get" || value == "set") return cont(getterSetter);
|
||||
return cont(afterprop);
|
||||
} else if (type == "number" || type == "string") {
|
||||
cx.marked = jsonldMode ? "property" : (cx.style + " property");
|
||||
return cont(afterprop);
|
||||
} else if (type == "jsonld-keyword") {
|
||||
return cont(afterprop);
|
||||
} else if (type == "modifier") {
|
||||
return cont(objprop)
|
||||
} else if (type == "[") {
|
||||
return cont(expression, expect("]"), afterprop);
|
||||
} else if (type == "spread") {
|
||||
return cont(expression);
|
||||
}
|
||||
}
|
||||
function getterSetter(type) {
|
||||
if (type != "variable") return pass(afterprop);
|
||||
cx.marked = "property";
|
||||
return cont(functiondef);
|
||||
}
|
||||
function afterprop(type) {
|
||||
if (type == ":") return cont(expressionNoComma);
|
||||
if (type == "(") return pass(functiondef);
|
||||
}
|
||||
function commasep(what, end) {
|
||||
function proceed(type) {
|
||||
if (type == ",") {
|
||||
var lex = cx.state.lexical;
|
||||
if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
|
||||
return cont(what, proceed);
|
||||
}
|
||||
if (type == end) return cont();
|
||||
return cont(expect(end));
|
||||
}
|
||||
return function(type) {
|
||||
if (type == end) return cont();
|
||||
return pass(what, proceed);
|
||||
};
|
||||
}
|
||||
function contCommasep(what, end, info) {
|
||||
for (var i = 3; i < arguments.length; i++)
|
||||
cx.cc.push(arguments[i]);
|
||||
return cont(pushlex(end, info), commasep(what, end), poplex);
|
||||
}
|
||||
function block(type) {
|
||||
if (type == "}") return cont();
|
||||
return pass(statement, block);
|
||||
}
|
||||
function maybetype(type) {
|
||||
if (isTS && type == ":") return cont(typedef);
|
||||
}
|
||||
function maybedefault(_, value) {
|
||||
if (value == "=") return cont(expressionNoComma);
|
||||
}
|
||||
function typedef(type) {
|
||||
if (type == "variable") {cx.marked = "variable-3"; return cont();}
|
||||
}
|
||||
function vardef() {
|
||||
return pass(pattern, maybetype, maybeAssign, vardefCont);
|
||||
}
|
||||
function pattern(type, value) {
|
||||
if (type == "modifier") return cont(pattern)
|
||||
if (type == "variable") { register(value); return cont(); }
|
||||
if (type == "spread") return cont(pattern);
|
||||
if (type == "[") return contCommasep(pattern, "]");
|
||||
if (type == "{") return contCommasep(proppattern, "}");
|
||||
}
|
||||
function proppattern(type, value) {
|
||||
if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
|
||||
register(value);
|
||||
return cont(maybeAssign);
|
||||
}
|
||||
if (type == "variable") cx.marked = "property";
|
||||
if (type == "spread") return cont(pattern);
|
||||
if (type == "}") return pass();
|
||||
return cont(expect(":"), pattern, maybeAssign);
|
||||
}
|
||||
function maybeAssign(_type, value) {
|
||||
if (value == "=") return cont(expressionNoComma);
|
||||
}
|
||||
function vardefCont(type) {
|
||||
if (type == ",") return cont(vardef);
|
||||
}
|
||||
function maybeelse(type, value) {
|
||||
if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
|
||||
}
|
||||
function forspec(type) {
|
||||
if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
|
||||
}
|
||||
function forspec1(type) {
|
||||
if (type == "var") return cont(vardef, expect(";"), forspec2);
|
||||
if (type == ";") return cont(forspec2);
|
||||
if (type == "variable") return cont(formaybeinof);
|
||||
return pass(expression, expect(";"), forspec2);
|
||||
}
|
||||
function formaybeinof(_type, value) {
|
||||
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
|
||||
return cont(maybeoperatorComma, forspec2);
|
||||
}
|
||||
function forspec2(type, value) {
|
||||
if (type == ";") return cont(forspec3);
|
||||
if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
|
||||
return pass(expression, expect(";"), forspec3);
|
||||
}
|
||||
function forspec3(type) {
|
||||
if (type != ")") cont(expression);
|
||||
}
|
||||
function functiondef(type, value) {
|
||||
if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
|
||||
if (type == "variable") {register(value); return cont(functiondef);}
|
||||
if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, statement, popcontext);
|
||||
}
|
||||
function funarg(type) {
|
||||
if (type == "spread") return cont(funarg);
|
||||
return pass(pattern, maybetype, maybedefault);
|
||||
}
|
||||
function className(type, value) {
|
||||
if (type == "variable") {register(value); return cont(classNameAfter);}
|
||||
}
|
||||
function classNameAfter(type, value) {
|
||||
if (value == "extends") return cont(expression, classNameAfter);
|
||||
if (type == "{") return cont(pushlex("}"), classBody, poplex);
|
||||
}
|
||||
function classBody(type, value) {
|
||||
if (type == "variable" || cx.style == "keyword") {
|
||||
if (value == "static") {
|
||||
cx.marked = "keyword";
|
||||
return cont(classBody);
|
||||
}
|
||||
cx.marked = "property";
|
||||
if (value == "get" || value == "set") return cont(classGetterSetter, functiondef, classBody);
|
||||
return cont(functiondef, classBody);
|
||||
}
|
||||
if (value == "*") {
|
||||
cx.marked = "keyword";
|
||||
return cont(classBody);
|
||||
}
|
||||
if (type == ";") return cont(classBody);
|
||||
if (type == "}") return cont();
|
||||
}
|
||||
function classGetterSetter(type) {
|
||||
if (type != "variable") return pass();
|
||||
cx.marked = "property";
|
||||
return cont();
|
||||
}
|
||||
function afterExport(_type, value) {
|
||||
if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
|
||||
if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
|
||||
return pass(statement);
|
||||
}
|
||||
function afterImport(type) {
|
||||
if (type == "string") return cont();
|
||||
return pass(importSpec, maybeFrom);
|
||||
}
|
||||
function importSpec(type, value) {
|
||||
if (type == "{") return contCommasep(importSpec, "}");
|
||||
if (type == "variable") register(value);
|
||||
if (value == "*") cx.marked = "keyword";
|
||||
return cont(maybeAs);
|
||||
}
|
||||
function maybeAs(_type, value) {
|
||||
if (value == "as") { cx.marked = "keyword"; return cont(importSpec); }
|
||||
}
|
||||
function maybeFrom(_type, value) {
|
||||
if (value == "from") { cx.marked = "keyword"; return cont(expression); }
|
||||
}
|
||||
function arrayLiteral(type) {
|
||||
if (type == "]") return cont();
|
||||
return pass(expressionNoComma, maybeArrayComprehension);
|
||||
}
|
||||
function maybeArrayComprehension(type) {
|
||||
if (type == "for") return pass(comprehension, expect("]"));
|
||||
if (type == ",") return cont(commasep(maybeexpressionNoComma, "]"));
|
||||
return pass(commasep(expressionNoComma, "]"));
|
||||
}
|
||||
function comprehension(type) {
|
||||
if (type == "for") return cont(forspec, comprehension);
|
||||
if (type == "if") return cont(expression, comprehension);
|
||||
}
|
||||
|
||||
function isContinuedStatement(state, textAfter) {
|
||||
return state.lastType == "operator" || state.lastType == "," ||
|
||||
isOperatorChar.test(textAfter.charAt(0)) ||
|
||||
/[,.]/.test(textAfter.charAt(0));
|
||||
}
|
||||
|
||||
// Interface
|
||||
|
||||
return {
|
||||
startState: function(basecolumn) {
|
||||
var state = {
|
||||
tokenize: tokenBase,
|
||||
lastType: "sof",
|
||||
cc: [],
|
||||
lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
|
||||
localVars: parserConfig.localVars,
|
||||
context: parserConfig.localVars && {vars: parserConfig.localVars},
|
||||
indented: basecolumn || 0
|
||||
};
|
||||
if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
|
||||
state.globalVars = parserConfig.globalVars;
|
||||
return state;
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (stream.sol()) {
|
||||
if (!state.lexical.hasOwnProperty("align"))
|
||||
state.lexical.align = false;
|
||||
state.indented = stream.indentation();
|
||||
findFatArrow(stream, state);
|
||||
}
|
||||
if (state.tokenize != tokenComment && stream.eatSpace()) return null;
|
||||
var style = state.tokenize(stream, state);
|
||||
if (type == "comment") return style;
|
||||
state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
|
||||
return parseJS(state, style, type, content, stream);
|
||||
},
|
||||
|
||||
indent: function(state, textAfter) {
|
||||
if (state.tokenize == tokenComment) return CodeMirror.Pass;
|
||||
if (state.tokenize != tokenBase) return 0;
|
||||
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
|
||||
// Kludge to prevent 'maybelse' from blocking lexical scope pops
|
||||
if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
|
||||
var c = state.cc[i];
|
||||
if (c == poplex) lexical = lexical.prev;
|
||||
else if (c != maybeelse) break;
|
||||
}
|
||||
if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
|
||||
if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
|
||||
lexical = lexical.prev;
|
||||
var type = lexical.type, closing = firstChar == type;
|
||||
|
||||
if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
|
||||
else if (type == "form" && firstChar == "{") return lexical.indented;
|
||||
else if (type == "form") return lexical.indented + indentUnit;
|
||||
else if (type == "stat")
|
||||
return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
|
||||
else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
|
||||
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
|
||||
else if (lexical.align) return lexical.column + (closing ? 0 : 1);
|
||||
else return lexical.indented + (closing ? 0 : indentUnit);
|
||||
},
|
||||
|
||||
electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
|
||||
blockCommentStart: jsonMode ? null : "/*",
|
||||
blockCommentEnd: jsonMode ? null : "*/",
|
||||
lineComment: jsonMode ? null : "//",
|
||||
fold: "brace",
|
||||
closeBrackets: "()[]{}''\"\"``",
|
||||
|
||||
helperType: jsonMode ? "json" : "javascript",
|
||||
jsonldMode: jsonldMode,
|
||||
jsonMode: jsonMode,
|
||||
|
||||
expressionAllowed: expressionAllowed,
|
||||
skipExpression: function(state) {
|
||||
var top = state.cc[state.cc.length - 1]
|
||||
if (top == expression || top == expressionNoComma) state.cc.pop()
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/);
|
||||
|
||||
CodeMirror.defineMIME("text/javascript", "javascript");
|
||||
CodeMirror.defineMIME("text/ecmascript", "javascript");
|
||||
CodeMirror.defineMIME("application/javascript", "javascript");
|
||||
CodeMirror.defineMIME("application/x-javascript", "javascript");
|
||||
CodeMirror.defineMIME("application/ecmascript", "javascript");
|
||||
CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
|
||||
CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
|
||||
CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
|
||||
CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
|
||||
CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
|
||||
|
||||
});
|
72
app/lib/codemirror/mode/javascript/json-ld.html
vendored
Normal file
72
app/lib/codemirror/mode/javascript/json-ld.html
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: JSON-LD mode</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../../lib/codemirror.css">
|
||||
<script src="../../lib/codemirror.js"></script>
|
||||
<script src="../../addon/edit/matchbrackets.js"></script>
|
||||
<script src="../../addon/comment/continuecomment.js"></script>
|
||||
<script src="../../addon/comment/comment.js"></script>
|
||||
<script src="javascript.js"></script>
|
||||
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
|
||||
<div id="nav">
|
||||
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"/></a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../index.html">Home</a>
|
||||
<li><a href="../../doc/manual.html">Manual</a>
|
||||
<li><a href="https://github.com/codemirror/codemirror">Code</a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="../index.html">Language modes</a>
|
||||
<li><a class=active href="#">JSON-LD</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>JSON-LD mode</h2>
|
||||
|
||||
|
||||
<div><textarea id="code" name="code">
|
||||
{
|
||||
"@context": {
|
||||
"name": "http://schema.org/name",
|
||||
"description": "http://schema.org/description",
|
||||
"image": {
|
||||
"@id": "http://schema.org/image",
|
||||
"@type": "@id"
|
||||
},
|
||||
"geo": "http://schema.org/geo",
|
||||
"latitude": {
|
||||
"@id": "http://schema.org/latitude",
|
||||
"@type": "xsd:float"
|
||||
},
|
||||
"longitude": {
|
||||
"@id": "http://schema.org/longitude",
|
||||
"@type": "xsd:float"
|
||||
},
|
||||
"xsd": "http://www.w3.org/2001/XMLSchema#"
|
||||
},
|
||||
"name": "The Empire State Building",
|
||||
"description": "The Empire State Building is a 102-story landmark in New York City.",
|
||||
"image": "http://www.civil.usherbrooke.ca/cours/gci215a/empire-state-building.jpg",
|
||||
"geo": {
|
||||
"latitude": "40.75",
|
||||
"longitude": "73.98"
|
||||
}
|
||||
}
|
||||
</textarea></div>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
matchBrackets: true,
|
||||
autoCloseBrackets: true,
|
||||
mode: "application/ld+json",
|
||||
lineWrapping: true
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>This is a specialization of the <a href="index.html">JavaScript mode</a>.</p>
|
||||
</article>
|
61
app/lib/codemirror/mode/javascript/typescript.html
vendored
Normal file
61
app/lib/codemirror/mode/javascript/typescript.html
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
<!doctype html>
|
||||
|
||||
<title>CodeMirror: TypeScript mode</title>
|
||||
<meta charset="utf-8"/>
|
||||
<link rel=stylesheet href="../../doc/docs.css">
|
||||
|
||||
<link rel="stylesheet" href="../../lib/codemirror.css">
|
||||
<script src="../../lib/codemirror.js"></script>
|
||||
<script src="javascript.js"></script>
|
||||
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
|
||||
<div id=nav>
|
||||
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
|
||||
|
||||
<ul>
|
||||
<li><a href="../../index.html">Home</a>
|
||||
<li><a href="../../doc/manual.html">Manual</a>
|
||||
<li><a href="https://github.com/codemirror/codemirror">Code</a>
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="../index.html">Language modes</a>
|
||||
<li><a class=active href="#">TypeScript</a>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<article>
|
||||
<h2>TypeScript mode</h2>
|
||||
|
||||
|
||||
<div><textarea id="code" name="code">
|
||||
class Greeter {
|
||||
greeting: string;
|
||||
constructor (message: string) {
|
||||
this.greeting = message;
|
||||
}
|
||||
greet() {
|
||||
return "Hello, " + this.greeting;
|
||||
}
|
||||
}
|
||||
|
||||
var greeter = new Greeter("world");
|
||||
|
||||
var button = document.createElement('button')
|
||||
button.innerText = "Say Hello"
|
||||
button.onclick = function() {
|
||||
alert(greeter.greet())
|
||||
}
|
||||
|
||||
document.body.appendChild(button)
|
||||
|
||||
</textarea></div>
|
||||
|
||||
<script>
|
||||
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
mode: "text/typescript"
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>This is a specialization of the <a href="index.html">JavaScript mode</a>.</p>
|
||||
</article>
|
148
app/lib/codemirror/mode/jsx/jsx.js
vendored
Normal file
148
app/lib/codemirror/mode/jsx/jsx.js
vendored
Normal file
@@ -0,0 +1,148 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"))
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript"], mod)
|
||||
else // Plain browser env
|
||||
mod(CodeMirror)
|
||||
})(function(CodeMirror) {
|
||||
"use strict"
|
||||
|
||||
// Depth means the amount of open braces in JS context, in XML
|
||||
// context 0 means not in tag, 1 means in tag, and 2 means in tag
|
||||
// and js block comment.
|
||||
function Context(state, mode, depth, prev) {
|
||||
this.state = state; this.mode = mode; this.depth = depth; this.prev = prev
|
||||
}
|
||||
|
||||
function copyContext(context) {
|
||||
return new Context(CodeMirror.copyState(context.mode, context.state),
|
||||
context.mode,
|
||||
context.depth,
|
||||
context.prev && copyContext(context.prev))
|
||||
}
|
||||
|
||||
CodeMirror.defineMode("jsx", function(config, modeConfig) {
|
||||
var xmlMode = CodeMirror.getMode(config, {name: "xml", allowMissing: true, multilineTagIndentPastTag: false})
|
||||
var jsMode = CodeMirror.getMode(config, modeConfig && modeConfig.base || "javascript")
|
||||
|
||||
function flatXMLIndent(state) {
|
||||
var tagName = state.tagName
|
||||
state.tagName = null
|
||||
var result = xmlMode.indent(state, "")
|
||||
state.tagName = tagName
|
||||
return result
|
||||
}
|
||||
|
||||
function token(stream, state) {
|
||||
if (state.context.mode == xmlMode)
|
||||
return xmlToken(stream, state, state.context)
|
||||
else
|
||||
return jsToken(stream, state, state.context)
|
||||
}
|
||||
|
||||
function xmlToken(stream, state, cx) {
|
||||
if (cx.depth == 2) { // Inside a JS /* */ comment
|
||||
if (stream.match(/^.*?\*\//)) cx.depth = 1
|
||||
else stream.skipToEnd()
|
||||
return "comment"
|
||||
}
|
||||
|
||||
if (stream.peek() == "{") {
|
||||
xmlMode.skipAttribute(cx.state)
|
||||
|
||||
var indent = flatXMLIndent(cx.state), xmlContext = cx.state.context
|
||||
// If JS starts on same line as tag
|
||||
if (xmlContext && stream.match(/^[^>]*>\s*$/, false)) {
|
||||
while (xmlContext.prev && !xmlContext.startOfLine)
|
||||
xmlContext = xmlContext.prev
|
||||
// If tag starts the line, use XML indentation level
|
||||
if (xmlContext.startOfLine) indent -= config.indentUnit
|
||||
// Else use JS indentation level
|
||||
else if (cx.prev.state.lexical) indent = cx.prev.state.lexical.indented
|
||||
// Else if inside of tag
|
||||
} else if (cx.depth == 1) {
|
||||
indent += config.indentUnit
|
||||
}
|
||||
|
||||
state.context = new Context(CodeMirror.startState(jsMode, indent),
|
||||
jsMode, 0, state.context)
|
||||
return null
|
||||
}
|
||||
|
||||
if (cx.depth == 1) { // Inside of tag
|
||||
if (stream.peek() == "<") { // Tag inside of tag
|
||||
xmlMode.skipAttribute(cx.state)
|
||||
state.context = new Context(CodeMirror.startState(xmlMode, flatXMLIndent(cx.state)),
|
||||
xmlMode, 0, state.context)
|
||||
return null
|
||||
} else if (stream.match("//")) {
|
||||
stream.skipToEnd()
|
||||
return "comment"
|
||||
} else if (stream.match("/*")) {
|
||||
cx.depth = 2
|
||||
return token(stream, state)
|
||||
}
|
||||
}
|
||||
|
||||
var style = xmlMode.token(stream, cx.state), cur = stream.current(), stop
|
||||
if (/\btag\b/.test(style)) {
|
||||
if (/>$/.test(cur)) {
|
||||
if (cx.state.context) cx.depth = 0
|
||||
else state.context = state.context.prev
|
||||
} else if (/^</.test(cur)) {
|
||||
cx.depth = 1
|
||||
}
|
||||
} else if (!style && (stop = cur.indexOf("{")) > -1) {
|
||||
stream.backUp(cur.length - stop)
|
||||
}
|
||||
return style
|
||||
}
|
||||
|
||||
function jsToken(stream, state, cx) {
|
||||
if (stream.peek() == "<" && jsMode.expressionAllowed(stream, cx.state)) {
|
||||
jsMode.skipExpression(cx.state)
|
||||
state.context = new Context(CodeMirror.startState(xmlMode, jsMode.indent(cx.state, "")),
|
||||
xmlMode, 0, state.context)
|
||||
return null
|
||||
}
|
||||
|
||||
var style = jsMode.token(stream, cx.state)
|
||||
if (!style && cx.depth != null) {
|
||||
var cur = stream.current()
|
||||
if (cur == "{") {
|
||||
cx.depth++
|
||||
} else if (cur == "}") {
|
||||
if (--cx.depth == 0) state.context = state.context.prev
|
||||
}
|
||||
}
|
||||
return style
|
||||
}
|
||||
|
||||
return {
|
||||
startState: function() {
|
||||
return {context: new Context(CodeMirror.startState(jsMode), jsMode)}
|
||||
},
|
||||
|
||||
copyState: function(state) {
|
||||
return {context: copyContext(state.context)}
|
||||
},
|
||||
|
||||
token: token,
|
||||
|
||||
indent: function(state, textAfter, fullLine) {
|
||||
return state.context.mode.indent(state.context.state, textAfter, fullLine)
|
||||
},
|
||||
|
||||
innerMode: function(state) {
|
||||
return state.context
|
||||
}
|
||||
}
|
||||
}, "xml", "javascript")
|
||||
|
||||
CodeMirror.defineMIME("text/jsx", "jsx")
|
||||
CodeMirror.defineMIME("text/typescript-jsx", {name: "jsx", base: {name: "javascript", typescript: true}})
|
||||
});
|
797
app/lib/codemirror/mode/markdown/markdown.js
vendored
Normal file
797
app/lib/codemirror/mode/markdown/markdown.js
vendored
Normal file
@@ -0,0 +1,797 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../xml/xml"), require("../meta"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../xml/xml", "../meta"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
||||
|
||||
var htmlMode = CodeMirror.getMode(cmCfg, "text/html");
|
||||
var htmlModeMissing = htmlMode.name == "null"
|
||||
|
||||
function getMode(name) {
|
||||
if (CodeMirror.findModeByName) {
|
||||
var found = CodeMirror.findModeByName(name);
|
||||
if (found) name = found.mime || found.mimes[0];
|
||||
}
|
||||
var mode = CodeMirror.getMode(cmCfg, name);
|
||||
return mode.name == "null" ? null : mode;
|
||||
}
|
||||
|
||||
// Should characters that affect highlighting be highlighted separate?
|
||||
// Does not include characters that will be output (such as `1.` and `-` for lists)
|
||||
if (modeCfg.highlightFormatting === undefined)
|
||||
modeCfg.highlightFormatting = false;
|
||||
|
||||
// Maximum number of nested blockquotes. Set to 0 for infinite nesting.
|
||||
// Excess `>` will emit `error` token.
|
||||
if (modeCfg.maxBlockquoteDepth === undefined)
|
||||
modeCfg.maxBlockquoteDepth = 0;
|
||||
|
||||
// Should underscores in words open/close em/strong?
|
||||
if (modeCfg.underscoresBreakWords === undefined)
|
||||
modeCfg.underscoresBreakWords = true;
|
||||
|
||||
// Use `fencedCodeBlocks` to configure fenced code blocks. false to
|
||||
// disable, string to specify a precise regexp that the fence should
|
||||
// match, and true to allow three or more backticks or tildes (as
|
||||
// per CommonMark).
|
||||
|
||||
// Turn on task lists? ("- [ ] " and "- [x] ")
|
||||
if (modeCfg.taskLists === undefined) modeCfg.taskLists = false;
|
||||
|
||||
// Turn on strikethrough syntax
|
||||
if (modeCfg.strikethrough === undefined)
|
||||
modeCfg.strikethrough = false;
|
||||
|
||||
// Allow token types to be overridden by user-provided token types.
|
||||
if (modeCfg.tokenTypeOverrides === undefined)
|
||||
modeCfg.tokenTypeOverrides = {};
|
||||
|
||||
var tokenTypes = {
|
||||
header: "header",
|
||||
code: "comment",
|
||||
quote: "quote",
|
||||
list1: "variable-2",
|
||||
list2: "variable-3",
|
||||
list3: "keyword",
|
||||
hr: "hr",
|
||||
image: "tag",
|
||||
formatting: "formatting",
|
||||
linkInline: "link",
|
||||
linkEmail: "link",
|
||||
linkText: "link",
|
||||
linkHref: "string",
|
||||
em: "em",
|
||||
strong: "strong",
|
||||
strikethrough: "strikethrough"
|
||||
};
|
||||
|
||||
for (var tokenType in tokenTypes) {
|
||||
if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {
|
||||
tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];
|
||||
}
|
||||
}
|
||||
|
||||
var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/
|
||||
, ulRE = /^[*\-+]\s+/
|
||||
, olRE = /^[0-9]+([.)])\s+/
|
||||
, taskListRE = /^\[(x| )\](?=\s)/ // Must follow ulRE or olRE
|
||||
, atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/
|
||||
, setextHeaderRE = /^ *(?:\={1,}|-{1,})\s*$/
|
||||
, textRE = /^[^#!\[\]*_\\<>` "'(~]+/
|
||||
, fencedCodeRE = new RegExp("^(" + (modeCfg.fencedCodeBlocks === true ? "~~~+|```+" : modeCfg.fencedCodeBlocks) +
|
||||
")[ \\t]*([\\w+#\-]*)");
|
||||
|
||||
function switchInline(stream, state, f) {
|
||||
state.f = state.inline = f;
|
||||
return f(stream, state);
|
||||
}
|
||||
|
||||
function switchBlock(stream, state, f) {
|
||||
state.f = state.block = f;
|
||||
return f(stream, state);
|
||||
}
|
||||
|
||||
function lineIsEmpty(line) {
|
||||
return !line || !/\S/.test(line.string)
|
||||
}
|
||||
|
||||
// Blocks
|
||||
|
||||
function blankLine(state) {
|
||||
// Reset linkTitle state
|
||||
state.linkTitle = false;
|
||||
// Reset EM state
|
||||
state.em = false;
|
||||
// Reset STRONG state
|
||||
state.strong = false;
|
||||
// Reset strikethrough state
|
||||
state.strikethrough = false;
|
||||
// Reset state.quote
|
||||
state.quote = 0;
|
||||
// Reset state.indentedCode
|
||||
state.indentedCode = false;
|
||||
if (htmlModeMissing && state.f == htmlBlock) {
|
||||
state.f = inlineNormal;
|
||||
state.block = blockNormal;
|
||||
}
|
||||
// Reset state.trailingSpace
|
||||
state.trailingSpace = 0;
|
||||
state.trailingSpaceNewLine = false;
|
||||
// Mark this line as blank
|
||||
state.prevLine = state.thisLine
|
||||
state.thisLine = null
|
||||
return null;
|
||||
}
|
||||
|
||||
function blockNormal(stream, state) {
|
||||
|
||||
var sol = stream.sol();
|
||||
|
||||
var prevLineIsList = state.list !== false,
|
||||
prevLineIsIndentedCode = state.indentedCode;
|
||||
|
||||
state.indentedCode = false;
|
||||
|
||||
if (prevLineIsList) {
|
||||
if (state.indentationDiff >= 0) { // Continued list
|
||||
if (state.indentationDiff < 4) { // Only adjust indentation if *not* a code block
|
||||
state.indentation -= state.indentationDiff;
|
||||
}
|
||||
state.list = null;
|
||||
} else if (state.indentation > 0) {
|
||||
state.list = null;
|
||||
} else { // No longer a list
|
||||
state.list = false;
|
||||
}
|
||||
}
|
||||
|
||||
var match = null;
|
||||
if (state.indentationDiff >= 4) {
|
||||
stream.skipToEnd();
|
||||
if (prevLineIsIndentedCode || lineIsEmpty(state.prevLine)) {
|
||||
state.indentation -= 4;
|
||||
state.indentedCode = true;
|
||||
return tokenTypes.code;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else if (stream.eatSpace()) {
|
||||
return null;
|
||||
} else if ((match = stream.match(atxHeaderRE)) && match[1].length <= 6) {
|
||||
state.header = match[1].length;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "header";
|
||||
state.f = state.inline;
|
||||
return getType(state);
|
||||
} else if (!lineIsEmpty(state.prevLine) && !state.quote && !prevLineIsList &&
|
||||
!prevLineIsIndentedCode && (match = stream.match(setextHeaderRE))) {
|
||||
state.header = match[0].charAt(0) == '=' ? 1 : 2;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "header";
|
||||
state.f = state.inline;
|
||||
return getType(state);
|
||||
} else if (stream.eat('>')) {
|
||||
state.quote = sol ? 1 : state.quote + 1;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "quote";
|
||||
stream.eatSpace();
|
||||
return getType(state);
|
||||
} else if (stream.peek() === '[') {
|
||||
return switchInline(stream, state, footnoteLink);
|
||||
} else if (stream.match(hrRE, true)) {
|
||||
state.hr = true;
|
||||
return tokenTypes.hr;
|
||||
} else if ((lineIsEmpty(state.prevLine) || prevLineIsList) && (stream.match(ulRE, false) || stream.match(olRE, false))) {
|
||||
var listType = null;
|
||||
if (stream.match(ulRE, true)) {
|
||||
listType = 'ul';
|
||||
} else {
|
||||
stream.match(olRE, true);
|
||||
listType = 'ol';
|
||||
}
|
||||
state.indentation = stream.column() + stream.current().length;
|
||||
state.list = true;
|
||||
|
||||
// While this list item's marker's indentation
|
||||
// is less than the deepest list item's content's indentation,
|
||||
// pop the deepest list item indentation off the stack.
|
||||
while (state.listStack && stream.column() < state.listStack[state.listStack.length - 1]) {
|
||||
state.listStack.pop();
|
||||
}
|
||||
|
||||
// Add this list item's content's indentation to the stack
|
||||
state.listStack.push(state.indentation);
|
||||
|
||||
if (modeCfg.taskLists && stream.match(taskListRE, false)) {
|
||||
state.taskList = true;
|
||||
}
|
||||
state.f = state.inline;
|
||||
if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
|
||||
return getType(state);
|
||||
} else if (modeCfg.fencedCodeBlocks && (match = stream.match(fencedCodeRE, true))) {
|
||||
state.fencedChars = match[1]
|
||||
// try switching mode
|
||||
state.localMode = getMode(match[2]);
|
||||
if (state.localMode) state.localState = CodeMirror.startState(state.localMode);
|
||||
state.f = state.block = local;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
||||
state.code = -1
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
return switchInline(stream, state, state.inline);
|
||||
}
|
||||
|
||||
function htmlBlock(stream, state) {
|
||||
var style = htmlMode.token(stream, state.htmlState);
|
||||
if (!htmlModeMissing) {
|
||||
var inner = CodeMirror.innerMode(htmlMode, state.htmlState)
|
||||
if ((inner.mode.name == "xml" && inner.state.tagStart === null &&
|
||||
(!inner.state.context && inner.state.tokenize.isInText)) ||
|
||||
(state.md_inside && stream.current().indexOf(">") > -1)) {
|
||||
state.f = inlineNormal;
|
||||
state.block = blockNormal;
|
||||
state.htmlState = null;
|
||||
}
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
function local(stream, state) {
|
||||
if (state.fencedChars && stream.match(state.fencedChars, false)) {
|
||||
state.localMode = state.localState = null;
|
||||
state.f = state.block = leavingLocal;
|
||||
return null;
|
||||
} else if (state.localMode) {
|
||||
return state.localMode.token(stream, state.localState);
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
return tokenTypes.code;
|
||||
}
|
||||
}
|
||||
|
||||
function leavingLocal(stream, state) {
|
||||
stream.match(state.fencedChars);
|
||||
state.block = blockNormal;
|
||||
state.f = inlineNormal;
|
||||
state.fencedChars = null;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
||||
state.code = 1
|
||||
var returnType = getType(state);
|
||||
state.code = 0
|
||||
return returnType;
|
||||
}
|
||||
|
||||
// Inline
|
||||
function getType(state) {
|
||||
var styles = [];
|
||||
|
||||
if (state.formatting) {
|
||||
styles.push(tokenTypes.formatting);
|
||||
|
||||
if (typeof state.formatting === "string") state.formatting = [state.formatting];
|
||||
|
||||
for (var i = 0; i < state.formatting.length; i++) {
|
||||
styles.push(tokenTypes.formatting + "-" + state.formatting[i]);
|
||||
|
||||
if (state.formatting[i] === "header") {
|
||||
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);
|
||||
}
|
||||
|
||||
// Add `formatting-quote` and `formatting-quote-#` for blockquotes
|
||||
// Add `error` instead if the maximum blockquote nesting depth is passed
|
||||
if (state.formatting[i] === "quote") {
|
||||
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
|
||||
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);
|
||||
} else {
|
||||
styles.push("error");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state.taskOpen) {
|
||||
styles.push("meta");
|
||||
return styles.length ? styles.join(' ') : null;
|
||||
}
|
||||
if (state.taskClosed) {
|
||||
styles.push("property");
|
||||
return styles.length ? styles.join(' ') : null;
|
||||
}
|
||||
|
||||
if (state.linkHref) {
|
||||
styles.push(tokenTypes.linkHref, "url");
|
||||
} else { // Only apply inline styles to non-url text
|
||||
if (state.strong) { styles.push(tokenTypes.strong); }
|
||||
if (state.em) { styles.push(tokenTypes.em); }
|
||||
if (state.strikethrough) { styles.push(tokenTypes.strikethrough); }
|
||||
if (state.linkText) { styles.push(tokenTypes.linkText); }
|
||||
if (state.code) { styles.push(tokenTypes.code); }
|
||||
}
|
||||
|
||||
if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); }
|
||||
|
||||
if (state.quote) {
|
||||
styles.push(tokenTypes.quote);
|
||||
|
||||
// Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth
|
||||
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
|
||||
styles.push(tokenTypes.quote + "-" + state.quote);
|
||||
} else {
|
||||
styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);
|
||||
}
|
||||
}
|
||||
|
||||
if (state.list !== false) {
|
||||
var listMod = (state.listStack.length - 1) % 3;
|
||||
if (!listMod) {
|
||||
styles.push(tokenTypes.list1);
|
||||
} else if (listMod === 1) {
|
||||
styles.push(tokenTypes.list2);
|
||||
} else {
|
||||
styles.push(tokenTypes.list3);
|
||||
}
|
||||
}
|
||||
|
||||
if (state.trailingSpaceNewLine) {
|
||||
styles.push("trailing-space-new-line");
|
||||
} else if (state.trailingSpace) {
|
||||
styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
|
||||
}
|
||||
|
||||
return styles.length ? styles.join(' ') : null;
|
||||
}
|
||||
|
||||
function handleText(stream, state) {
|
||||
if (stream.match(textRE, true)) {
|
||||
return getType(state);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function inlineNormal(stream, state) {
|
||||
var style = state.text(stream, state);
|
||||
if (typeof style !== 'undefined')
|
||||
return style;
|
||||
|
||||
if (state.list) { // List marker (*, +, -, 1., etc)
|
||||
state.list = null;
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (state.taskList) {
|
||||
var taskOpen = stream.match(taskListRE, true)[1] !== "x";
|
||||
if (taskOpen) state.taskOpen = true;
|
||||
else state.taskClosed = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "task";
|
||||
state.taskList = false;
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
state.taskOpen = false;
|
||||
state.taskClosed = false;
|
||||
|
||||
if (state.header && stream.match(/^#+$/, true)) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = "header";
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
// Get sol() value now, before character is consumed
|
||||
var sol = stream.sol();
|
||||
|
||||
var ch = stream.next();
|
||||
|
||||
// Matches link titles present on next line
|
||||
if (state.linkTitle) {
|
||||
state.linkTitle = false;
|
||||
var matchCh = ch;
|
||||
if (ch === '(') {
|
||||
matchCh = ')';
|
||||
}
|
||||
matchCh = (matchCh+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
|
||||
var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh;
|
||||
if (stream.match(new RegExp(regex), true)) {
|
||||
return tokenTypes.linkHref;
|
||||
}
|
||||
}
|
||||
|
||||
// If this block is changed, it may need to be updated in GFM mode
|
||||
if (ch === '`') {
|
||||
var previousFormatting = state.formatting;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "code";
|
||||
stream.eatWhile('`');
|
||||
var count = stream.current().length
|
||||
if (state.code == 0) {
|
||||
state.code = count
|
||||
return getType(state)
|
||||
} else if (count == state.code) { // Must be exact
|
||||
var t = getType(state)
|
||||
state.code = 0
|
||||
return t
|
||||
} else {
|
||||
state.formatting = previousFormatting
|
||||
return getType(state)
|
||||
}
|
||||
} else if (state.code) {
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (ch === '\\') {
|
||||
stream.next();
|
||||
if (modeCfg.highlightFormatting) {
|
||||
var type = getType(state);
|
||||
var formattingEscape = tokenTypes.formatting + "-escape";
|
||||
return type ? type + " " + formattingEscape : formattingEscape;
|
||||
}
|
||||
}
|
||||
|
||||
if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
|
||||
stream.match(/\[[^\]]*\]/);
|
||||
state.inline = state.f = linkHref;
|
||||
return tokenTypes.image;
|
||||
}
|
||||
|
||||
if (ch === '[' && stream.match(/[^\]]*\](\(.*\)| ?\[.*?\])/, false)) {
|
||||
state.linkText = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
if (ch === ']' && state.linkText && stream.match(/\(.*?\)| ?\[.*?\]/, false)) {
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
state.linkText = false;
|
||||
state.inline = state.f = linkHref;
|
||||
return type;
|
||||
}
|
||||
|
||||
if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
|
||||
state.f = state.inline = linkInline;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
if (type){
|
||||
type += " ";
|
||||
} else {
|
||||
type = "";
|
||||
}
|
||||
return type + tokenTypes.linkInline;
|
||||
}
|
||||
|
||||
if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
|
||||
state.f = state.inline = linkInline;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
if (type){
|
||||
type += " ";
|
||||
} else {
|
||||
type = "";
|
||||
}
|
||||
return type + tokenTypes.linkEmail;
|
||||
}
|
||||
|
||||
if (ch === '<' && stream.match(/^(!--|\w)/, false)) {
|
||||
var end = stream.string.indexOf(">", stream.pos);
|
||||
if (end != -1) {
|
||||
var atts = stream.string.substring(stream.start, end);
|
||||
if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
|
||||
}
|
||||
stream.backUp(1);
|
||||
state.htmlState = CodeMirror.startState(htmlMode);
|
||||
return switchBlock(stream, state, htmlBlock);
|
||||
}
|
||||
|
||||
if (ch === '<' && stream.match(/^\/\w*?>/)) {
|
||||
state.md_inside = false;
|
||||
return "tag";
|
||||
}
|
||||
|
||||
var ignoreUnderscore = false;
|
||||
if (!modeCfg.underscoresBreakWords) {
|
||||
if (ch === '_' && stream.peek() !== '_' && stream.match(/(\w)/, false)) {
|
||||
var prevPos = stream.pos - 2;
|
||||
if (prevPos >= 0) {
|
||||
var prevCh = stream.string.charAt(prevPos);
|
||||
if (prevCh !== '_' && prevCh.match(/(\w)/, false)) {
|
||||
ignoreUnderscore = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ch === '*' || (ch === '_' && !ignoreUnderscore)) {
|
||||
if (sol && stream.peek() === ' ') {
|
||||
// Do nothing, surrounded by newline and space
|
||||
} else if (state.strong === ch && stream.eat(ch)) { // Remove STRONG
|
||||
if (modeCfg.highlightFormatting) state.formatting = "strong";
|
||||
var t = getType(state);
|
||||
state.strong = false;
|
||||
return t;
|
||||
} else if (!state.strong && stream.eat(ch)) { // Add STRONG
|
||||
state.strong = ch;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "strong";
|
||||
return getType(state);
|
||||
} else if (state.em === ch) { // Remove EM
|
||||
if (modeCfg.highlightFormatting) state.formatting = "em";
|
||||
var t = getType(state);
|
||||
state.em = false;
|
||||
return t;
|
||||
} else if (!state.em) { // Add EM
|
||||
state.em = ch;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "em";
|
||||
return getType(state);
|
||||
}
|
||||
} else if (ch === ' ') {
|
||||
if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces
|
||||
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
|
||||
return getType(state);
|
||||
} else { // Not surrounded by spaces, back up pointer
|
||||
stream.backUp(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (modeCfg.strikethrough) {
|
||||
if (ch === '~' && stream.eatWhile(ch)) {
|
||||
if (state.strikethrough) {// Remove strikethrough
|
||||
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
|
||||
var t = getType(state);
|
||||
state.strikethrough = false;
|
||||
return t;
|
||||
} else if (stream.match(/^[^\s]/, false)) {// Add strikethrough
|
||||
state.strikethrough = true;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
|
||||
return getType(state);
|
||||
}
|
||||
} else if (ch === ' ') {
|
||||
if (stream.match(/^~~/, true)) { // Probably surrounded by space
|
||||
if (stream.peek() === ' ') { // Surrounded by spaces, ignore
|
||||
return getType(state);
|
||||
} else { // Not surrounded by spaces, back up pointer
|
||||
stream.backUp(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ch === ' ') {
|
||||
if (stream.match(/ +$/, false)) {
|
||||
state.trailingSpace++;
|
||||
} else if (state.trailingSpace) {
|
||||
state.trailingSpaceNewLine = true;
|
||||
}
|
||||
}
|
||||
|
||||
return getType(state);
|
||||
}
|
||||
|
||||
function linkInline(stream, state) {
|
||||
var ch = stream.next();
|
||||
|
||||
if (ch === ">") {
|
||||
state.f = state.inline = inlineNormal;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var type = getType(state);
|
||||
if (type){
|
||||
type += " ";
|
||||
} else {
|
||||
type = "";
|
||||
}
|
||||
return type + tokenTypes.linkInline;
|
||||
}
|
||||
|
||||
stream.match(/^[^>]+/, true);
|
||||
|
||||
return tokenTypes.linkInline;
|
||||
}
|
||||
|
||||
function linkHref(stream, state) {
|
||||
// Check if space, and return NULL if so (to avoid marking the space)
|
||||
if(stream.eatSpace()){
|
||||
return null;
|
||||
}
|
||||
var ch = stream.next();
|
||||
if (ch === '(' || ch === '[') {
|
||||
state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]", 0);
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link-string";
|
||||
state.linkHref = true;
|
||||
return getType(state);
|
||||
}
|
||||
return 'error';
|
||||
}
|
||||
|
||||
var linkRE = {
|
||||
")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,
|
||||
"]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/
|
||||
}
|
||||
|
||||
function getLinkHrefInside(endChar) {
|
||||
return function(stream, state) {
|
||||
var ch = stream.next();
|
||||
|
||||
if (ch === endChar) {
|
||||
state.f = state.inline = inlineNormal;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link-string";
|
||||
var returnState = getType(state);
|
||||
state.linkHref = false;
|
||||
return returnState;
|
||||
}
|
||||
|
||||
stream.match(linkRE[endChar])
|
||||
state.linkHref = true;
|
||||
return getType(state);
|
||||
};
|
||||
}
|
||||
|
||||
function footnoteLink(stream, state) {
|
||||
if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
|
||||
state.f = footnoteLinkInside;
|
||||
stream.next(); // Consume [
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
state.linkText = true;
|
||||
return getType(state);
|
||||
}
|
||||
return switchInline(stream, state, inlineNormal);
|
||||
}
|
||||
|
||||
function footnoteLinkInside(stream, state) {
|
||||
if (stream.match(/^\]:/, true)) {
|
||||
state.f = state.inline = footnoteUrl;
|
||||
if (modeCfg.highlightFormatting) state.formatting = "link";
|
||||
var returnType = getType(state);
|
||||
state.linkText = false;
|
||||
return returnType;
|
||||
}
|
||||
|
||||
stream.match(/^([^\]\\]|\\.)+/, true);
|
||||
|
||||
return tokenTypes.linkText;
|
||||
}
|
||||
|
||||
function footnoteUrl(stream, state) {
|
||||
// Check if space, and return NULL if so (to avoid marking the space)
|
||||
if(stream.eatSpace()){
|
||||
return null;
|
||||
}
|
||||
// Match URL
|
||||
stream.match(/^[^\s]+/, true);
|
||||
// Check for link title
|
||||
if (stream.peek() === undefined) { // End of line, set flag to check next line
|
||||
state.linkTitle = true;
|
||||
} else { // More content on line, check if link title
|
||||
stream.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, true);
|
||||
}
|
||||
state.f = state.inline = inlineNormal;
|
||||
return tokenTypes.linkHref + " url";
|
||||
}
|
||||
|
||||
var mode = {
|
||||
startState: function() {
|
||||
return {
|
||||
f: blockNormal,
|
||||
|
||||
prevLine: null,
|
||||
thisLine: null,
|
||||
|
||||
block: blockNormal,
|
||||
htmlState: null,
|
||||
indentation: 0,
|
||||
|
||||
inline: inlineNormal,
|
||||
text: handleText,
|
||||
|
||||
formatting: false,
|
||||
linkText: false,
|
||||
linkHref: false,
|
||||
linkTitle: false,
|
||||
code: 0,
|
||||
em: false,
|
||||
strong: false,
|
||||
header: 0,
|
||||
hr: false,
|
||||
taskList: false,
|
||||
list: false,
|
||||
listStack: [],
|
||||
quote: 0,
|
||||
trailingSpace: 0,
|
||||
trailingSpaceNewLine: false,
|
||||
strikethrough: false,
|
||||
fencedChars: null
|
||||
};
|
||||
},
|
||||
|
||||
copyState: function(s) {
|
||||
return {
|
||||
f: s.f,
|
||||
|
||||
prevLine: s.prevLine,
|
||||
thisLine: s.thisLine,
|
||||
|
||||
block: s.block,
|
||||
htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
|
||||
indentation: s.indentation,
|
||||
|
||||
localMode: s.localMode,
|
||||
localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
|
||||
|
||||
inline: s.inline,
|
||||
text: s.text,
|
||||
formatting: false,
|
||||
linkTitle: s.linkTitle,
|
||||
code: s.code,
|
||||
em: s.em,
|
||||
strong: s.strong,
|
||||
strikethrough: s.strikethrough,
|
||||
header: s.header,
|
||||
hr: s.hr,
|
||||
taskList: s.taskList,
|
||||
list: s.list,
|
||||
listStack: s.listStack.slice(0),
|
||||
quote: s.quote,
|
||||
indentedCode: s.indentedCode,
|
||||
trailingSpace: s.trailingSpace,
|
||||
trailingSpaceNewLine: s.trailingSpaceNewLine,
|
||||
md_inside: s.md_inside,
|
||||
fencedChars: s.fencedChars
|
||||
};
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
|
||||
// Reset state.formatting
|
||||
state.formatting = false;
|
||||
|
||||
if (stream != state.thisLine) {
|
||||
var forceBlankLine = state.header || state.hr;
|
||||
|
||||
// Reset state.header and state.hr
|
||||
state.header = 0;
|
||||
state.hr = false;
|
||||
|
||||
if (stream.match(/^\s*$/, true) || forceBlankLine) {
|
||||
blankLine(state);
|
||||
if (!forceBlankLine) return null
|
||||
state.prevLine = null
|
||||
}
|
||||
|
||||
state.prevLine = state.thisLine
|
||||
state.thisLine = stream
|
||||
|
||||
// Reset state.taskList
|
||||
state.taskList = false;
|
||||
|
||||
// Reset state.trailingSpace
|
||||
state.trailingSpace = 0;
|
||||
state.trailingSpaceNewLine = false;
|
||||
|
||||
state.f = state.block;
|
||||
var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, ' ').length;
|
||||
state.indentationDiff = Math.min(indentation - state.indentation, 4);
|
||||
state.indentation = state.indentation + state.indentationDiff;
|
||||
if (indentation > 0) return null;
|
||||
}
|
||||
return state.f(stream, state);
|
||||
},
|
||||
|
||||
innerMode: function(state) {
|
||||
if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode};
|
||||
if (state.localState) return {state: state.localState, mode: state.localMode};
|
||||
return {state: state, mode: mode};
|
||||
},
|
||||
|
||||
blankLine: blankLine,
|
||||
|
||||
getType: getType,
|
||||
|
||||
fold: "markdown"
|
||||
};
|
||||
return mode;
|
||||
}, "xml");
|
||||
|
||||
CodeMirror.defineMIME("text/x-markdown", "markdown");
|
||||
|
||||
});
|
208
app/lib/codemirror/mode/meta.js
vendored
Normal file
208
app/lib/codemirror/mode/meta.js
vendored
Normal file
@@ -0,0 +1,208 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.modeInfo = [
|
||||
{name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]},
|
||||
{name: "PGP", mimes: ["application/pgp", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["pgp"]},
|
||||
{name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"]},
|
||||
{name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i},
|
||||
{name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]},
|
||||
{name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h"]},
|
||||
{name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]},
|
||||
{name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]},
|
||||
{name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp"]},
|
||||
{name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]},
|
||||
{name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]},
|
||||
{name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"]},
|
||||
{name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists.txt$/},
|
||||
{name: "CoffeeScript", mime: "text/x-coffeescript", mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]},
|
||||
{name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]},
|
||||
{name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"]},
|
||||
{name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]},
|
||||
{name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"]},
|
||||
{name: "CSS", mime: "text/css", mode: "css", ext: ["css"]},
|
||||
{name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]},
|
||||
{name: "D", mime: "text/x-d", mode: "d", ext: ["d"]},
|
||||
{name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"]},
|
||||
{name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]},
|
||||
{name: "Django", mime: "text/x-django", mode: "django"},
|
||||
{name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/},
|
||||
{name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]},
|
||||
{name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]},
|
||||
{name: "EBNF", mime: "text/x-ebnf", mode: "ebnf"},
|
||||
{name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]},
|
||||
{name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"]},
|
||||
{name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]},
|
||||
{name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"]},
|
||||
{name: "Embedded Javascript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]},
|
||||
{name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]},
|
||||
{name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]},
|
||||
{name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]},
|
||||
{name: "FCL", mime: "text/x-fcl", mode: "fcl"},
|
||||
{name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]},
|
||||
{name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90"]},
|
||||
{name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]},
|
||||
{name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]},
|
||||
{name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]},
|
||||
{name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history).md$/i},
|
||||
{name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]},
|
||||
{name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"]},
|
||||
{name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]},
|
||||
{name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]},
|
||||
{name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]},
|
||||
{name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]},
|
||||
{name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]},
|
||||
{name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"]},
|
||||
{name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm"], alias: ["xhtml"]},
|
||||
{name: "HTTP", mime: "message/http", mode: "http"},
|
||||
{name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"]},
|
||||
{name: "Jade", mime: "text/x-jade", mode: "jade", ext: ["jade"]},
|
||||
{name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]},
|
||||
{name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"]},
|
||||
{name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],
|
||||
mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"]},
|
||||
{name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"]},
|
||||
{name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]},
|
||||
{name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]},
|
||||
{name: "Jinja2", mime: "null", mode: "jinja2"},
|
||||
{name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"]},
|
||||
{name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]},
|
||||
{name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]},
|
||||
{name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]},
|
||||
{name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]},
|
||||
{name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]},
|
||||
{name: "mIRC", mime: "text/mirc", mode: "mirc"},
|
||||
{name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"},
|
||||
{name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb"]},
|
||||
{name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]},
|
||||
{name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]},
|
||||
{name: "MS SQL", mime: "text/x-mssql", mode: "sql"},
|
||||
{name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"]},
|
||||
{name: "MySQL", mime: "text/x-mysql", mode: "sql"},
|
||||
{name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i},
|
||||
{name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"]},
|
||||
{name: "NTriples", mime: "text/n-triples", mode: "ntriples", ext: ["nt"]},
|
||||
{name: "Objective C", mime: "text/x-objectivec", mode: "clike", ext: ["m", "mm"], alias: ["objective-c", "objc"]},
|
||||
{name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]},
|
||||
{name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]},
|
||||
{name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"]},
|
||||
{name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]},
|
||||
{name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"]},
|
||||
{name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]},
|
||||
{name: "PHP", mime: "application/x-httpd-php", mode: "php", ext: ["php", "php3", "php4", "php5", "phtml"]},
|
||||
{name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]},
|
||||
{name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]},
|
||||
{name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]},
|
||||
{name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]},
|
||||
{name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]},
|
||||
{name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]},
|
||||
{name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/},
|
||||
{name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]},
|
||||
{name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]},
|
||||
{name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r"], alias: ["rscript"]},
|
||||
{name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]},
|
||||
{name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"},
|
||||
{name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]},
|
||||
{name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]},
|
||||
{name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]},
|
||||
{name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"]},
|
||||
{name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]},
|
||||
{name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]},
|
||||
{name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]},
|
||||
{name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]},
|
||||
{name: "Shell", mime: "text/x-sh", mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/},
|
||||
{name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"]},
|
||||
{name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"]},
|
||||
{name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]},
|
||||
{name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]},
|
||||
{name: "Solr", mime: "text/x-solr", mode: "solr"},
|
||||
{name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"]},
|
||||
{name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]},
|
||||
{name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]},
|
||||
{name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]},
|
||||
{name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]},
|
||||
{name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]},
|
||||
{name: "sTeX", mime: "text/x-stex", mode: "stex"},
|
||||
{name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx"], alias: ["tex"]},
|
||||
{name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v"]},
|
||||
{name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]},
|
||||
{name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"]},
|
||||
{name: "TiddlyWiki ", mime: "text/x-tiddlywiki", mode: "tiddlywiki"},
|
||||
{name: "Tiki wiki", mime: "text/tiki", mode: "tiki"},
|
||||
{name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"]},
|
||||
{name: "Tornado", mime: "text/x-tornado", mode: "tornado"},
|
||||
{name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]},
|
||||
{name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"]},
|
||||
{name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"]},
|
||||
{name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]},
|
||||
{name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]},
|
||||
{name: "Twig", mime: "text/x-twig", mode: "twig"},
|
||||
{name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]},
|
||||
{name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]},
|
||||
{name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"]},
|
||||
{name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]},
|
||||
{name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]},
|
||||
{name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]},
|
||||
{name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd"], alias: ["rss", "wsdl", "xsd"]},
|
||||
{name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]},
|
||||
{name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]},
|
||||
{name: "YAML", mime: "text/x-yaml", mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]},
|
||||
{name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]},
|
||||
{name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]},
|
||||
{name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]},
|
||||
{name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]}
|
||||
];
|
||||
// Ensure all modes have a mime property for backwards compatibility
|
||||
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
||||
var info = CodeMirror.modeInfo[i];
|
||||
if (info.mimes) info.mime = info.mimes[0];
|
||||
}
|
||||
|
||||
CodeMirror.findModeByMIME = function(mime) {
|
||||
mime = mime.toLowerCase();
|
||||
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
||||
var info = CodeMirror.modeInfo[i];
|
||||
if (info.mime == mime) return info;
|
||||
if (info.mimes) for (var j = 0; j < info.mimes.length; j++)
|
||||
if (info.mimes[j] == mime) return info;
|
||||
}
|
||||
};
|
||||
|
||||
CodeMirror.findModeByExtension = function(ext) {
|
||||
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
||||
var info = CodeMirror.modeInfo[i];
|
||||
if (info.ext) for (var j = 0; j < info.ext.length; j++)
|
||||
if (info.ext[j] == ext) return info;
|
||||
}
|
||||
};
|
||||
|
||||
CodeMirror.findModeByFileName = function(filename) {
|
||||
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
||||
var info = CodeMirror.modeInfo[i];
|
||||
if (info.file && info.file.test(filename)) return info;
|
||||
}
|
||||
var dot = filename.lastIndexOf(".");
|
||||
var ext = dot > -1 && filename.substring(dot + 1, filename.length);
|
||||
if (ext) return CodeMirror.findModeByExtension(ext);
|
||||
};
|
||||
|
||||
CodeMirror.findModeByName = function(name) {
|
||||
name = name.toLowerCase();
|
||||
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
||||
var info = CodeMirror.modeInfo[i];
|
||||
if (info.name.toLowerCase() == name) return info;
|
||||
if (info.alias) for (var j = 0; j < info.alias.length; j++)
|
||||
if (info.alias[j].toLowerCase() == name) return info;
|
||||
}
|
||||
};
|
||||
});
|
591
app/lib/codemirror/mode/pug/pug.js
vendored
Normal file
591
app/lib/codemirror/mode/pug/pug.js
vendored
Normal file
@@ -0,0 +1,591 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"), require("../javascript/javascript"), require("../css/css"), require("../htmlmixed/htmlmixed"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror", "../javascript/javascript", "../css/css", "../htmlmixed/htmlmixed"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("pug", function (config) {
|
||||
// token types
|
||||
var KEYWORD = 'keyword';
|
||||
var DOCTYPE = 'meta';
|
||||
var ID = 'builtin';
|
||||
var CLASS = 'qualifier';
|
||||
|
||||
var ATTRS_NEST = {
|
||||
'{': '}',
|
||||
'(': ')',
|
||||
'[': ']'
|
||||
};
|
||||
|
||||
var jsMode = CodeMirror.getMode(config, 'javascript');
|
||||
|
||||
function State() {
|
||||
this.javaScriptLine = false;
|
||||
this.javaScriptLineExcludesColon = false;
|
||||
|
||||
this.javaScriptArguments = false;
|
||||
this.javaScriptArgumentsDepth = 0;
|
||||
|
||||
this.isInterpolating = false;
|
||||
this.interpolationNesting = 0;
|
||||
|
||||
this.jsState = CodeMirror.startState(jsMode);
|
||||
|
||||
this.restOfLine = '';
|
||||
|
||||
this.isIncludeFiltered = false;
|
||||
this.isEach = false;
|
||||
|
||||
this.lastTag = '';
|
||||
this.scriptType = '';
|
||||
|
||||
// Attributes Mode
|
||||
this.isAttrs = false;
|
||||
this.attrsNest = [];
|
||||
this.inAttributeName = true;
|
||||
this.attributeIsType = false;
|
||||
this.attrValue = '';
|
||||
|
||||
// Indented Mode
|
||||
this.indentOf = Infinity;
|
||||
this.indentToken = '';
|
||||
|
||||
this.innerMode = null;
|
||||
this.innerState = null;
|
||||
|
||||
this.innerModeForLine = false;
|
||||
}
|
||||
/**
|
||||
* Safely copy a state
|
||||
*
|
||||
* @return {State}
|
||||
*/
|
||||
State.prototype.copy = function () {
|
||||
var res = new State();
|
||||
res.javaScriptLine = this.javaScriptLine;
|
||||
res.javaScriptLineExcludesColon = this.javaScriptLineExcludesColon;
|
||||
res.javaScriptArguments = this.javaScriptArguments;
|
||||
res.javaScriptArgumentsDepth = this.javaScriptArgumentsDepth;
|
||||
res.isInterpolating = this.isInterpolating;
|
||||
res.interpolationNesting = this.interpolationNesting;
|
||||
|
||||
res.jsState = CodeMirror.copyState(jsMode, this.jsState);
|
||||
|
||||
res.innerMode = this.innerMode;
|
||||
if (this.innerMode && this.innerState) {
|
||||
res.innerState = CodeMirror.copyState(this.innerMode, this.innerState);
|
||||
}
|
||||
|
||||
res.restOfLine = this.restOfLine;
|
||||
|
||||
res.isIncludeFiltered = this.isIncludeFiltered;
|
||||
res.isEach = this.isEach;
|
||||
res.lastTag = this.lastTag;
|
||||
res.scriptType = this.scriptType;
|
||||
res.isAttrs = this.isAttrs;
|
||||
res.attrsNest = this.attrsNest.slice();
|
||||
res.inAttributeName = this.inAttributeName;
|
||||
res.attributeIsType = this.attributeIsType;
|
||||
res.attrValue = this.attrValue;
|
||||
res.indentOf = this.indentOf;
|
||||
res.indentToken = this.indentToken;
|
||||
|
||||
res.innerModeForLine = this.innerModeForLine;
|
||||
|
||||
return res;
|
||||
};
|
||||
|
||||
function javaScript(stream, state) {
|
||||
if (stream.sol()) {
|
||||
// if javaScriptLine was set at end of line, ignore it
|
||||
state.javaScriptLine = false;
|
||||
state.javaScriptLineExcludesColon = false;
|
||||
}
|
||||
if (state.javaScriptLine) {
|
||||
if (state.javaScriptLineExcludesColon && stream.peek() === ':') {
|
||||
state.javaScriptLine = false;
|
||||
state.javaScriptLineExcludesColon = false;
|
||||
return;
|
||||
}
|
||||
var tok = jsMode.token(stream, state.jsState);
|
||||
if (stream.eol()) state.javaScriptLine = false;
|
||||
return tok || true;
|
||||
}
|
||||
}
|
||||
function javaScriptArguments(stream, state) {
|
||||
if (state.javaScriptArguments) {
|
||||
if (state.javaScriptArgumentsDepth === 0 && stream.peek() !== '(') {
|
||||
state.javaScriptArguments = false;
|
||||
return;
|
||||
}
|
||||
if (stream.peek() === '(') {
|
||||
state.javaScriptArgumentsDepth++;
|
||||
} else if (stream.peek() === ')') {
|
||||
state.javaScriptArgumentsDepth--;
|
||||
}
|
||||
if (state.javaScriptArgumentsDepth === 0) {
|
||||
state.javaScriptArguments = false;
|
||||
return;
|
||||
}
|
||||
|
||||
var tok = jsMode.token(stream, state.jsState);
|
||||
return tok || true;
|
||||
}
|
||||
}
|
||||
|
||||
function yieldStatement(stream) {
|
||||
if (stream.match(/^yield\b/)) {
|
||||
return 'keyword';
|
||||
}
|
||||
}
|
||||
|
||||
function doctype(stream) {
|
||||
if (stream.match(/^(?:doctype) *([^\n]+)?/)) {
|
||||
return DOCTYPE;
|
||||
}
|
||||
}
|
||||
|
||||
function interpolation(stream, state) {
|
||||
if (stream.match('#{')) {
|
||||
state.isInterpolating = true;
|
||||
state.interpolationNesting = 0;
|
||||
return 'punctuation';
|
||||
}
|
||||
}
|
||||
|
||||
function interpolationContinued(stream, state) {
|
||||
if (state.isInterpolating) {
|
||||
if (stream.peek() === '}') {
|
||||
state.interpolationNesting--;
|
||||
if (state.interpolationNesting < 0) {
|
||||
stream.next();
|
||||
state.isInterpolating = false;
|
||||
return 'punctuation';
|
||||
}
|
||||
} else if (stream.peek() === '{') {
|
||||
state.interpolationNesting++;
|
||||
}
|
||||
return jsMode.token(stream, state.jsState) || true;
|
||||
}
|
||||
}
|
||||
|
||||
function caseStatement(stream, state) {
|
||||
if (stream.match(/^case\b/)) {
|
||||
state.javaScriptLine = true;
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
|
||||
function when(stream, state) {
|
||||
if (stream.match(/^when\b/)) {
|
||||
state.javaScriptLine = true;
|
||||
state.javaScriptLineExcludesColon = true;
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
|
||||
function defaultStatement(stream) {
|
||||
if (stream.match(/^default\b/)) {
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
|
||||
function extendsStatement(stream, state) {
|
||||
if (stream.match(/^extends?\b/)) {
|
||||
state.restOfLine = 'string';
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
|
||||
function append(stream, state) {
|
||||
if (stream.match(/^append\b/)) {
|
||||
state.restOfLine = 'variable';
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
function prepend(stream, state) {
|
||||
if (stream.match(/^prepend\b/)) {
|
||||
state.restOfLine = 'variable';
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
function block(stream, state) {
|
||||
if (stream.match(/^block\b *(?:(prepend|append)\b)?/)) {
|
||||
state.restOfLine = 'variable';
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
|
||||
function include(stream, state) {
|
||||
if (stream.match(/^include\b/)) {
|
||||
state.restOfLine = 'string';
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
|
||||
function includeFiltered(stream, state) {
|
||||
if (stream.match(/^include:([a-zA-Z0-9\-]+)/, false) && stream.match('include')) {
|
||||
state.isIncludeFiltered = true;
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
|
||||
function includeFilteredContinued(stream, state) {
|
||||
if (state.isIncludeFiltered) {
|
||||
var tok = filter(stream, state);
|
||||
state.isIncludeFiltered = false;
|
||||
state.restOfLine = 'string';
|
||||
return tok;
|
||||
}
|
||||
}
|
||||
|
||||
function mixin(stream, state) {
|
||||
if (stream.match(/^mixin\b/)) {
|
||||
state.javaScriptLine = true;
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
|
||||
function call(stream, state) {
|
||||
if (stream.match(/^\+([-\w]+)/)) {
|
||||
if (!stream.match(/^\( *[-\w]+ *=/, false)) {
|
||||
state.javaScriptArguments = true;
|
||||
state.javaScriptArgumentsDepth = 0;
|
||||
}
|
||||
return 'variable';
|
||||
}
|
||||
if (stream.match(/^\+#{/, false)) {
|
||||
stream.next();
|
||||
state.mixinCallAfter = true;
|
||||
return interpolation(stream, state);
|
||||
}
|
||||
}
|
||||
function callArguments(stream, state) {
|
||||
if (state.mixinCallAfter) {
|
||||
state.mixinCallAfter = false;
|
||||
if (!stream.match(/^\( *[-\w]+ *=/, false)) {
|
||||
state.javaScriptArguments = true;
|
||||
state.javaScriptArgumentsDepth = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function conditional(stream, state) {
|
||||
if (stream.match(/^(if|unless|else if|else)\b/)) {
|
||||
state.javaScriptLine = true;
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
|
||||
function each(stream, state) {
|
||||
if (stream.match(/^(- *)?(each|for)\b/)) {
|
||||
state.isEach = true;
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
function eachContinued(stream, state) {
|
||||
if (state.isEach) {
|
||||
if (stream.match(/^ in\b/)) {
|
||||
state.javaScriptLine = true;
|
||||
state.isEach = false;
|
||||
return KEYWORD;
|
||||
} else if (stream.sol() || stream.eol()) {
|
||||
state.isEach = false;
|
||||
} else if (stream.next()) {
|
||||
while (!stream.match(/^ in\b/, false) && stream.next());
|
||||
return 'variable';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function whileStatement(stream, state) {
|
||||
if (stream.match(/^while\b/)) {
|
||||
state.javaScriptLine = true;
|
||||
return KEYWORD;
|
||||
}
|
||||
}
|
||||
|
||||
function tag(stream, state) {
|
||||
var captures;
|
||||
if (captures = stream.match(/^(\w(?:[-:\w]*\w)?)\/?/)) {
|
||||
state.lastTag = captures[1].toLowerCase();
|
||||
if (state.lastTag === 'script') {
|
||||
state.scriptType = 'application/javascript';
|
||||
}
|
||||
return 'tag';
|
||||
}
|
||||
}
|
||||
|
||||
function filter(stream, state) {
|
||||
if (stream.match(/^:([\w\-]+)/)) {
|
||||
var innerMode;
|
||||
if (config && config.innerModes) {
|
||||
innerMode = config.innerModes(stream.current().substring(1));
|
||||
}
|
||||
if (!innerMode) {
|
||||
innerMode = stream.current().substring(1);
|
||||
}
|
||||
if (typeof innerMode === 'string') {
|
||||
innerMode = CodeMirror.getMode(config, innerMode);
|
||||
}
|
||||
setInnerMode(stream, state, innerMode);
|
||||
return 'atom';
|
||||
}
|
||||
}
|
||||
|
||||
function code(stream, state) {
|
||||
if (stream.match(/^(!?=|-)/)) {
|
||||
state.javaScriptLine = true;
|
||||
return 'punctuation';
|
||||
}
|
||||
}
|
||||
|
||||
function id(stream) {
|
||||
if (stream.match(/^#([\w-]+)/)) {
|
||||
return ID;
|
||||
}
|
||||
}
|
||||
|
||||
function className(stream) {
|
||||
if (stream.match(/^\.([\w-]+)/)) {
|
||||
return CLASS;
|
||||
}
|
||||
}
|
||||
|
||||
function attrs(stream, state) {
|
||||
if (stream.peek() == '(') {
|
||||
stream.next();
|
||||
state.isAttrs = true;
|
||||
state.attrsNest = [];
|
||||
state.inAttributeName = true;
|
||||
state.attrValue = '';
|
||||
state.attributeIsType = false;
|
||||
return 'punctuation';
|
||||
}
|
||||
}
|
||||
|
||||
function attrsContinued(stream, state) {
|
||||
if (state.isAttrs) {
|
||||
if (ATTRS_NEST[stream.peek()]) {
|
||||
state.attrsNest.push(ATTRS_NEST[stream.peek()]);
|
||||
}
|
||||
if (state.attrsNest[state.attrsNest.length - 1] === stream.peek()) {
|
||||
state.attrsNest.pop();
|
||||
} else if (stream.eat(')')) {
|
||||
state.isAttrs = false;
|
||||
return 'punctuation';
|
||||
}
|
||||
if (state.inAttributeName && stream.match(/^[^=,\)!]+/)) {
|
||||
if (stream.peek() === '=' || stream.peek() === '!') {
|
||||
state.inAttributeName = false;
|
||||
state.jsState = CodeMirror.startState(jsMode);
|
||||
if (state.lastTag === 'script' && stream.current().trim().toLowerCase() === 'type') {
|
||||
state.attributeIsType = true;
|
||||
} else {
|
||||
state.attributeIsType = false;
|
||||
}
|
||||
}
|
||||
return 'attribute';
|
||||
}
|
||||
|
||||
var tok = jsMode.token(stream, state.jsState);
|
||||
if (state.attributeIsType && tok === 'string') {
|
||||
state.scriptType = stream.current().toString();
|
||||
}
|
||||
if (state.attrsNest.length === 0 && (tok === 'string' || tok === 'variable' || tok === 'keyword')) {
|
||||
try {
|
||||
Function('', 'var x ' + state.attrValue.replace(/,\s*$/, '').replace(/^!/, ''));
|
||||
state.inAttributeName = true;
|
||||
state.attrValue = '';
|
||||
stream.backUp(stream.current().length);
|
||||
return attrsContinued(stream, state);
|
||||
} catch (ex) {
|
||||
//not the end of an attribute
|
||||
}
|
||||
}
|
||||
state.attrValue += stream.current();
|
||||
return tok || true;
|
||||
}
|
||||
}
|
||||
|
||||
function attributesBlock(stream, state) {
|
||||
if (stream.match(/^&attributes\b/)) {
|
||||
state.javaScriptArguments = true;
|
||||
state.javaScriptArgumentsDepth = 0;
|
||||
return 'keyword';
|
||||
}
|
||||
}
|
||||
|
||||
function indent(stream) {
|
||||
if (stream.sol() && stream.eatSpace()) {
|
||||
return 'indent';
|
||||
}
|
||||
}
|
||||
|
||||
function comment(stream, state) {
|
||||
if (stream.match(/^ *\/\/(-)?([^\n]*)/)) {
|
||||
state.indentOf = stream.indentation();
|
||||
state.indentToken = 'comment';
|
||||
return 'comment';
|
||||
}
|
||||
}
|
||||
|
||||
function colon(stream) {
|
||||
if (stream.match(/^: */)) {
|
||||
return 'colon';
|
||||
}
|
||||
}
|
||||
|
||||
function text(stream, state) {
|
||||
if (stream.match(/^(?:\| ?| )([^\n]+)/)) {
|
||||
return 'string';
|
||||
}
|
||||
if (stream.match(/^(<[^\n]*)/, false)) {
|
||||
// html string
|
||||
setInnerMode(stream, state, 'htmlmixed');
|
||||
state.innerModeForLine = true;
|
||||
return innerMode(stream, state, true);
|
||||
}
|
||||
}
|
||||
|
||||
function dot(stream, state) {
|
||||
if (stream.eat('.')) {
|
||||
var innerMode = null;
|
||||
if (state.lastTag === 'script' && state.scriptType.toLowerCase().indexOf('javascript') != -1) {
|
||||
innerMode = state.scriptType.toLowerCase().replace(/"|'/g, '');
|
||||
} else if (state.lastTag === 'style') {
|
||||
innerMode = 'css';
|
||||
}
|
||||
setInnerMode(stream, state, innerMode);
|
||||
return 'dot';
|
||||
}
|
||||
}
|
||||
|
||||
function fail(stream) {
|
||||
stream.next();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
function setInnerMode(stream, state, mode) {
|
||||
mode = CodeMirror.mimeModes[mode] || mode;
|
||||
mode = config.innerModes ? config.innerModes(mode) || mode : mode;
|
||||
mode = CodeMirror.mimeModes[mode] || mode;
|
||||
mode = CodeMirror.getMode(config, mode);
|
||||
state.indentOf = stream.indentation();
|
||||
|
||||
if (mode && mode.name !== 'null') {
|
||||
state.innerMode = mode;
|
||||
} else {
|
||||
state.indentToken = 'string';
|
||||
}
|
||||
}
|
||||
function innerMode(stream, state, force) {
|
||||
if (stream.indentation() > state.indentOf || (state.innerModeForLine && !stream.sol()) || force) {
|
||||
if (state.innerMode) {
|
||||
if (!state.innerState) {
|
||||
state.innerState = state.innerMode.startState ? CodeMirror.startState(state.innerMode, stream.indentation()) : {};
|
||||
}
|
||||
return stream.hideFirstChars(state.indentOf + 2, function () {
|
||||
return state.innerMode.token(stream, state.innerState) || true;
|
||||
});
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
return state.indentToken;
|
||||
}
|
||||
} else if (stream.sol()) {
|
||||
state.indentOf = Infinity;
|
||||
state.indentToken = null;
|
||||
state.innerMode = null;
|
||||
state.innerState = null;
|
||||
}
|
||||
}
|
||||
function restOfLine(stream, state) {
|
||||
if (stream.sol()) {
|
||||
// if restOfLine was set at end of line, ignore it
|
||||
state.restOfLine = '';
|
||||
}
|
||||
if (state.restOfLine) {
|
||||
stream.skipToEnd();
|
||||
var tok = state.restOfLine;
|
||||
state.restOfLine = '';
|
||||
return tok;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function startState() {
|
||||
return new State();
|
||||
}
|
||||
function copyState(state) {
|
||||
return state.copy();
|
||||
}
|
||||
/**
|
||||
* Get the next token in the stream
|
||||
*
|
||||
* @param {Stream} stream
|
||||
* @param {State} state
|
||||
*/
|
||||
function nextToken(stream, state) {
|
||||
var tok = innerMode(stream, state)
|
||||
|| restOfLine(stream, state)
|
||||
|| interpolationContinued(stream, state)
|
||||
|| includeFilteredContinued(stream, state)
|
||||
|| eachContinued(stream, state)
|
||||
|| attrsContinued(stream, state)
|
||||
|| javaScript(stream, state)
|
||||
|| javaScriptArguments(stream, state)
|
||||
|| callArguments(stream, state)
|
||||
|
||||
|| yieldStatement(stream, state)
|
||||
|| doctype(stream, state)
|
||||
|| interpolation(stream, state)
|
||||
|| caseStatement(stream, state)
|
||||
|| when(stream, state)
|
||||
|| defaultStatement(stream, state)
|
||||
|| extendsStatement(stream, state)
|
||||
|| append(stream, state)
|
||||
|| prepend(stream, state)
|
||||
|| block(stream, state)
|
||||
|| include(stream, state)
|
||||
|| includeFiltered(stream, state)
|
||||
|| mixin(stream, state)
|
||||
|| call(stream, state)
|
||||
|| conditional(stream, state)
|
||||
|| each(stream, state)
|
||||
|| whileStatement(stream, state)
|
||||
|| tag(stream, state)
|
||||
|| filter(stream, state)
|
||||
|| code(stream, state)
|
||||
|| id(stream, state)
|
||||
|| className(stream, state)
|
||||
|| attrs(stream, state)
|
||||
|| attributesBlock(stream, state)
|
||||
|| indent(stream, state)
|
||||
|| text(stream, state)
|
||||
|| comment(stream, state)
|
||||
|| colon(stream, state)
|
||||
|| dot(stream, state)
|
||||
|| fail(stream, state);
|
||||
|
||||
return tok === true ? null : tok;
|
||||
}
|
||||
return {
|
||||
startState: startState,
|
||||
copyState: copyState,
|
||||
token: nextToken
|
||||
};
|
||||
}, 'javascript', 'css', 'htmlmixed');
|
||||
|
||||
CodeMirror.defineMIME('text/x-pug', 'pug');
|
||||
CodeMirror.defineMIME('text/x-jade', 'pug');
|
||||
|
||||
});
|
414
app/lib/codemirror/mode/sass/sass.js
vendored
Normal file
414
app/lib/codemirror/mode/sass/sass.js
vendored
Normal file
@@ -0,0 +1,414 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
CodeMirror.defineMode("sass", function(config) {
|
||||
function tokenRegexp(words) {
|
||||
return new RegExp("^" + words.join("|"));
|
||||
}
|
||||
|
||||
var keywords = ["true", "false", "null", "auto"];
|
||||
var keywordsRegexp = new RegExp("^" + keywords.join("|"));
|
||||
|
||||
var operators = ["\\(", "\\)", "=", ">", "<", "==", ">=", "<=", "\\+", "-",
|
||||
"\\!=", "/", "\\*", "%", "and", "or", "not", ";","\\{","\\}",":"];
|
||||
var opRegexp = tokenRegexp(operators);
|
||||
|
||||
var pseudoElementsRegexp = /^::?[a-zA-Z_][\w\-]*/;
|
||||
|
||||
function urlTokens(stream, state) {
|
||||
var ch = stream.peek();
|
||||
|
||||
if (ch === ")") {
|
||||
stream.next();
|
||||
state.tokenizer = tokenBase;
|
||||
return "operator";
|
||||
} else if (ch === "(") {
|
||||
stream.next();
|
||||
stream.eatSpace();
|
||||
|
||||
return "operator";
|
||||
} else if (ch === "'" || ch === '"') {
|
||||
state.tokenizer = buildStringTokenizer(stream.next());
|
||||
return "string";
|
||||
} else {
|
||||
state.tokenizer = buildStringTokenizer(")", false);
|
||||
return "string";
|
||||
}
|
||||
}
|
||||
function comment(indentation, multiLine) {
|
||||
return function(stream, state) {
|
||||
if (stream.sol() && stream.indentation() <= indentation) {
|
||||
state.tokenizer = tokenBase;
|
||||
return tokenBase(stream, state);
|
||||
}
|
||||
|
||||
if (multiLine && stream.skipTo("*/")) {
|
||||
stream.next();
|
||||
stream.next();
|
||||
state.tokenizer = tokenBase;
|
||||
} else {
|
||||
stream.skipToEnd();
|
||||
}
|
||||
|
||||
return "comment";
|
||||
};
|
||||
}
|
||||
|
||||
function buildStringTokenizer(quote, greedy) {
|
||||
if (greedy == null) { greedy = true; }
|
||||
|
||||
function stringTokenizer(stream, state) {
|
||||
var nextChar = stream.next();
|
||||
var peekChar = stream.peek();
|
||||
var previousChar = stream.string.charAt(stream.pos-2);
|
||||
|
||||
var endingString = ((nextChar !== "\\" && peekChar === quote) || (nextChar === quote && previousChar !== "\\"));
|
||||
|
||||
if (endingString) {
|
||||
if (nextChar !== quote && greedy) { stream.next(); }
|
||||
state.tokenizer = tokenBase;
|
||||
return "string";
|
||||
} else if (nextChar === "#" && peekChar === "{") {
|
||||
state.tokenizer = buildInterpolationTokenizer(stringTokenizer);
|
||||
stream.next();
|
||||
return "operator";
|
||||
} else {
|
||||
return "string";
|
||||
}
|
||||
}
|
||||
|
||||
return stringTokenizer;
|
||||
}
|
||||
|
||||
function buildInterpolationTokenizer(currentTokenizer) {
|
||||
return function(stream, state) {
|
||||
if (stream.peek() === "}") {
|
||||
stream.next();
|
||||
state.tokenizer = currentTokenizer;
|
||||
return "operator";
|
||||
} else {
|
||||
return tokenBase(stream, state);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function indent(state) {
|
||||
if (state.indentCount == 0) {
|
||||
state.indentCount++;
|
||||
var lastScopeOffset = state.scopes[0].offset;
|
||||
var currentOffset = lastScopeOffset + config.indentUnit;
|
||||
state.scopes.unshift({ offset:currentOffset });
|
||||
}
|
||||
}
|
||||
|
||||
function dedent(state) {
|
||||
if (state.scopes.length == 1) return;
|
||||
|
||||
state.scopes.shift();
|
||||
}
|
||||
|
||||
function tokenBase(stream, state) {
|
||||
var ch = stream.peek();
|
||||
|
||||
// Comment
|
||||
if (stream.match("/*")) {
|
||||
state.tokenizer = comment(stream.indentation(), true);
|
||||
return state.tokenizer(stream, state);
|
||||
}
|
||||
if (stream.match("//")) {
|
||||
state.tokenizer = comment(stream.indentation(), false);
|
||||
return state.tokenizer(stream, state);
|
||||
}
|
||||
|
||||
// Interpolation
|
||||
if (stream.match("#{")) {
|
||||
state.tokenizer = buildInterpolationTokenizer(tokenBase);
|
||||
return "operator";
|
||||
}
|
||||
|
||||
// Strings
|
||||
if (ch === '"' || ch === "'") {
|
||||
stream.next();
|
||||
state.tokenizer = buildStringTokenizer(ch);
|
||||
return "string";
|
||||
}
|
||||
|
||||
if(!state.cursorHalf){// state.cursorHalf === 0
|
||||
// first half i.e. before : for key-value pairs
|
||||
// including selectors
|
||||
|
||||
if (ch === ".") {
|
||||
stream.next();
|
||||
if (stream.match(/^[\w-]+/)) {
|
||||
indent(state);
|
||||
return "atom";
|
||||
} else if (stream.peek() === "#") {
|
||||
indent(state);
|
||||
return "atom";
|
||||
}
|
||||
}
|
||||
|
||||
if (ch === "#") {
|
||||
stream.next();
|
||||
// ID selectors
|
||||
if (stream.match(/^[\w-]+/)) {
|
||||
indent(state);
|
||||
return "atom";
|
||||
}
|
||||
if (stream.peek() === "#") {
|
||||
indent(state);
|
||||
return "atom";
|
||||
}
|
||||
}
|
||||
|
||||
// Variables
|
||||
if (ch === "$") {
|
||||
stream.next();
|
||||
stream.eatWhile(/[\w-]/);
|
||||
return "variable-2";
|
||||
}
|
||||
|
||||
// Numbers
|
||||
if (stream.match(/^-?[0-9\.]+/))
|
||||
return "number";
|
||||
|
||||
// Units
|
||||
if (stream.match(/^(px|em|in)\b/))
|
||||
return "unit";
|
||||
|
||||
if (stream.match(keywordsRegexp))
|
||||
return "keyword";
|
||||
|
||||
if (stream.match(/^url/) && stream.peek() === "(") {
|
||||
state.tokenizer = urlTokens;
|
||||
return "atom";
|
||||
}
|
||||
|
||||
if (ch === "=") {
|
||||
// Match shortcut mixin definition
|
||||
if (stream.match(/^=[\w-]+/)) {
|
||||
indent(state);
|
||||
return "meta";
|
||||
}
|
||||
}
|
||||
|
||||
if (ch === "+") {
|
||||
// Match shortcut mixin definition
|
||||
if (stream.match(/^\+[\w-]+/)){
|
||||
return "variable-3";
|
||||
}
|
||||
}
|
||||
|
||||
if(ch === "@"){
|
||||
if(stream.match(/@extend/)){
|
||||
if(!stream.match(/\s*[\w]/))
|
||||
dedent(state);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Indent Directives
|
||||
if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)) {
|
||||
indent(state);
|
||||
return "meta";
|
||||
}
|
||||
|
||||
// Other Directives
|
||||
if (ch === "@") {
|
||||
stream.next();
|
||||
stream.eatWhile(/[\w-]/);
|
||||
return "meta";
|
||||
}
|
||||
|
||||
if (stream.eatWhile(/[\w-]/)){
|
||||
if(stream.match(/ *: *[\w-\+\$#!\("']/,false)){
|
||||
return "property";
|
||||
}
|
||||
else if(stream.match(/ *:/,false)){
|
||||
indent(state);
|
||||
state.cursorHalf = 1;
|
||||
return "atom";
|
||||
}
|
||||
else if(stream.match(/ *,/,false)){
|
||||
return "atom";
|
||||
}
|
||||
else{
|
||||
indent(state);
|
||||
return "atom";
|
||||
}
|
||||
}
|
||||
|
||||
if(ch === ":"){
|
||||
if (stream.match(pseudoElementsRegexp)){ // could be a pseudo-element
|
||||
return "keyword";
|
||||
}
|
||||
stream.next();
|
||||
state.cursorHalf=1;
|
||||
return "operator";
|
||||
}
|
||||
|
||||
} // cursorHalf===0 ends here
|
||||
else{
|
||||
|
||||
if (ch === "#") {
|
||||
stream.next();
|
||||
// Hex numbers
|
||||
if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){
|
||||
if(!stream.peek()){
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "number";
|
||||
}
|
||||
}
|
||||
|
||||
// Numbers
|
||||
if (stream.match(/^-?[0-9\.]+/)){
|
||||
if(!stream.peek()){
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "number";
|
||||
}
|
||||
|
||||
// Units
|
||||
if (stream.match(/^(px|em|in)\b/)){
|
||||
if(!stream.peek()){
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "unit";
|
||||
}
|
||||
|
||||
if (stream.match(keywordsRegexp)){
|
||||
if(!stream.peek()){
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "keyword";
|
||||
}
|
||||
|
||||
if (stream.match(/^url/) && stream.peek() === "(") {
|
||||
state.tokenizer = urlTokens;
|
||||
if(!stream.peek()){
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "atom";
|
||||
}
|
||||
|
||||
// Variables
|
||||
if (ch === "$") {
|
||||
stream.next();
|
||||
stream.eatWhile(/[\w-]/);
|
||||
if(!stream.peek()){
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "variable-3";
|
||||
}
|
||||
|
||||
// bang character for !important, !default, etc.
|
||||
if (ch === "!") {
|
||||
stream.next();
|
||||
if(!stream.peek()){
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return stream.match(/^[\w]+/) ? "keyword": "operator";
|
||||
}
|
||||
|
||||
if (stream.match(opRegexp)){
|
||||
if(!stream.peek()){
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "operator";
|
||||
}
|
||||
|
||||
// attributes
|
||||
if (stream.eatWhile(/[\w-]/)) {
|
||||
if(!stream.peek()){
|
||||
state.cursorHalf = 0;
|
||||
}
|
||||
return "attribute";
|
||||
}
|
||||
|
||||
//stream.eatSpace();
|
||||
if(!stream.peek()){
|
||||
state.cursorHalf = 0;
|
||||
return null;
|
||||
}
|
||||
|
||||
} // else ends here
|
||||
|
||||
if (stream.match(opRegexp))
|
||||
return "operator";
|
||||
|
||||
// If we haven't returned by now, we move 1 character
|
||||
// and return an error
|
||||
stream.next();
|
||||
return null;
|
||||
}
|
||||
|
||||
function tokenLexer(stream, state) {
|
||||
if (stream.sol()) state.indentCount = 0;
|
||||
var style = state.tokenizer(stream, state);
|
||||
var current = stream.current();
|
||||
|
||||
if (current === "@return" || current === "}"){
|
||||
dedent(state);
|
||||
}
|
||||
|
||||
if (style !== null) {
|
||||
var startOfToken = stream.pos - current.length;
|
||||
|
||||
var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount);
|
||||
|
||||
var newScopes = [];
|
||||
|
||||
for (var i = 0; i < state.scopes.length; i++) {
|
||||
var scope = state.scopes[i];
|
||||
|
||||
if (scope.offset <= withCurrentIndent)
|
||||
newScopes.push(scope);
|
||||
}
|
||||
|
||||
state.scopes = newScopes;
|
||||
}
|
||||
|
||||
|
||||
return style;
|
||||
}
|
||||
|
||||
return {
|
||||
startState: function() {
|
||||
return {
|
||||
tokenizer: tokenBase,
|
||||
scopes: [{offset: 0, type: "sass"}],
|
||||
indentCount: 0,
|
||||
cursorHalf: 0, // cursor half tells us if cursor lies after (1)
|
||||
// or before (0) colon (well... more or less)
|
||||
definedVars: [],
|
||||
definedMixins: []
|
||||
};
|
||||
},
|
||||
token: function(stream, state) {
|
||||
var style = tokenLexer(stream, state);
|
||||
|
||||
state.lastToken = { style: style, content: stream.current() };
|
||||
|
||||
return style;
|
||||
},
|
||||
|
||||
indent: function(state) {
|
||||
return state.scopes[0].offset;
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/x-sass", "sass");
|
||||
|
||||
});
|
769
app/lib/codemirror/mode/stylus/stylus.js
vendored
Normal file
769
app/lib/codemirror/mode/stylus/stylus.js
vendored
Normal file
File diff suppressed because one or more lines are too long
394
app/lib/codemirror/mode/xml/xml.js
vendored
Normal file
394
app/lib/codemirror/mode/xml/xml.js
vendored
Normal file
@@ -0,0 +1,394 @@
|
||||
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||
// Distributed under an MIT license: http://codemirror.net/LICENSE
|
||||
|
||||
(function(mod) {
|
||||
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||
mod(require("../../lib/codemirror"));
|
||||
else if (typeof define == "function" && define.amd) // AMD
|
||||
define(["../../lib/codemirror"], mod);
|
||||
else // Plain browser env
|
||||
mod(CodeMirror);
|
||||
})(function(CodeMirror) {
|
||||
"use strict";
|
||||
|
||||
var htmlConfig = {
|
||||
autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,
|
||||
'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,
|
||||
'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,
|
||||
'track': true, 'wbr': true, 'menuitem': true},
|
||||
implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,
|
||||
'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,
|
||||
'th': true, 'tr': true},
|
||||
contextGrabbers: {
|
||||
'dd': {'dd': true, 'dt': true},
|
||||
'dt': {'dd': true, 'dt': true},
|
||||
'li': {'li': true},
|
||||
'option': {'option': true, 'optgroup': true},
|
||||
'optgroup': {'optgroup': true},
|
||||
'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,
|
||||
'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,
|
||||
'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,
|
||||
'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,
|
||||
'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},
|
||||
'rp': {'rp': true, 'rt': true},
|
||||
'rt': {'rp': true, 'rt': true},
|
||||
'tbody': {'tbody': true, 'tfoot': true},
|
||||
'td': {'td': true, 'th': true},
|
||||
'tfoot': {'tbody': true},
|
||||
'th': {'td': true, 'th': true},
|
||||
'thead': {'tbody': true, 'tfoot': true},
|
||||
'tr': {'tr': true}
|
||||
},
|
||||
doNotIndent: {"pre": true},
|
||||
allowUnquoted: true,
|
||||
allowMissing: true,
|
||||
caseFold: true
|
||||
}
|
||||
|
||||
var xmlConfig = {
|
||||
autoSelfClosers: {},
|
||||
implicitlyClosed: {},
|
||||
contextGrabbers: {},
|
||||
doNotIndent: {},
|
||||
allowUnquoted: false,
|
||||
allowMissing: false,
|
||||
caseFold: false
|
||||
}
|
||||
|
||||
CodeMirror.defineMode("xml", function(editorConf, config_) {
|
||||
var indentUnit = editorConf.indentUnit
|
||||
var config = {}
|
||||
var defaults = config_.htmlMode ? htmlConfig : xmlConfig
|
||||
for (var prop in defaults) config[prop] = defaults[prop]
|
||||
for (var prop in config_) config[prop] = config_[prop]
|
||||
|
||||
// Return variables for tokenizers
|
||||
var type, setStyle;
|
||||
|
||||
function inText(stream, state) {
|
||||
function chain(parser) {
|
||||
state.tokenize = parser;
|
||||
return parser(stream, state);
|
||||
}
|
||||
|
||||
var ch = stream.next();
|
||||
if (ch == "<") {
|
||||
if (stream.eat("!")) {
|
||||
if (stream.eat("[")) {
|
||||
if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>"));
|
||||
else return null;
|
||||
} else if (stream.match("--")) {
|
||||
return chain(inBlock("comment", "-->"));
|
||||
} else if (stream.match("DOCTYPE", true, true)) {
|
||||
stream.eatWhile(/[\w\._\-]/);
|
||||
return chain(doctype(1));
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else if (stream.eat("?")) {
|
||||
stream.eatWhile(/[\w\._\-]/);
|
||||
state.tokenize = inBlock("meta", "?>");
|
||||
return "meta";
|
||||
} else {
|
||||
type = stream.eat("/") ? "closeTag" : "openTag";
|
||||
state.tokenize = inTag;
|
||||
return "tag bracket";
|
||||
}
|
||||
} else if (ch == "&") {
|
||||
var ok;
|
||||
if (stream.eat("#")) {
|
||||
if (stream.eat("x")) {
|
||||
ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
|
||||
} else {
|
||||
ok = stream.eatWhile(/[\d]/) && stream.eat(";");
|
||||
}
|
||||
} else {
|
||||
ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
|
||||
}
|
||||
return ok ? "atom" : "error";
|
||||
} else {
|
||||
stream.eatWhile(/[^&<]/);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
inText.isInText = true;
|
||||
|
||||
function inTag(stream, state) {
|
||||
var ch = stream.next();
|
||||
if (ch == ">" || (ch == "/" && stream.eat(">"))) {
|
||||
state.tokenize = inText;
|
||||
type = ch == ">" ? "endTag" : "selfcloseTag";
|
||||
return "tag bracket";
|
||||
} else if (ch == "=") {
|
||||
type = "equals";
|
||||
return null;
|
||||
} else if (ch == "<") {
|
||||
state.tokenize = inText;
|
||||
state.state = baseState;
|
||||
state.tagName = state.tagStart = null;
|
||||
var next = state.tokenize(stream, state);
|
||||
return next ? next + " tag error" : "tag error";
|
||||
} else if (/[\'\"]/.test(ch)) {
|
||||
state.tokenize = inAttribute(ch);
|
||||
state.stringStartCol = stream.column();
|
||||
return state.tokenize(stream, state);
|
||||
} else {
|
||||
stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);
|
||||
return "word";
|
||||
}
|
||||
}
|
||||
|
||||
function inAttribute(quote) {
|
||||
var closure = function(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
if (stream.next() == quote) {
|
||||
state.tokenize = inTag;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return "string";
|
||||
};
|
||||
closure.isInAttribute = true;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function inBlock(style, terminator) {
|
||||
return function(stream, state) {
|
||||
while (!stream.eol()) {
|
||||
if (stream.match(terminator)) {
|
||||
state.tokenize = inText;
|
||||
break;
|
||||
}
|
||||
stream.next();
|
||||
}
|
||||
return style;
|
||||
};
|
||||
}
|
||||
function doctype(depth) {
|
||||
return function(stream, state) {
|
||||
var ch;
|
||||
while ((ch = stream.next()) != null) {
|
||||
if (ch == "<") {
|
||||
state.tokenize = doctype(depth + 1);
|
||||
return state.tokenize(stream, state);
|
||||
} else if (ch == ">") {
|
||||
if (depth == 1) {
|
||||
state.tokenize = inText;
|
||||
break;
|
||||
} else {
|
||||
state.tokenize = doctype(depth - 1);
|
||||
return state.tokenize(stream, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
return "meta";
|
||||
};
|
||||
}
|
||||
|
||||
function Context(state, tagName, startOfLine) {
|
||||
this.prev = state.context;
|
||||
this.tagName = tagName;
|
||||
this.indent = state.indented;
|
||||
this.startOfLine = startOfLine;
|
||||
if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))
|
||||
this.noIndent = true;
|
||||
}
|
||||
function popContext(state) {
|
||||
if (state.context) state.context = state.context.prev;
|
||||
}
|
||||
function maybePopContext(state, nextTagName) {
|
||||
var parentTagName;
|
||||
while (true) {
|
||||
if (!state.context) {
|
||||
return;
|
||||
}
|
||||
parentTagName = state.context.tagName;
|
||||
if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||
|
||||
!config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
|
||||
return;
|
||||
}
|
||||
popContext(state);
|
||||
}
|
||||
}
|
||||
|
||||
function baseState(type, stream, state) {
|
||||
if (type == "openTag") {
|
||||
state.tagStart = stream.column();
|
||||
return tagNameState;
|
||||
} else if (type == "closeTag") {
|
||||
return closeTagNameState;
|
||||
} else {
|
||||
return baseState;
|
||||
}
|
||||
}
|
||||
function tagNameState(type, stream, state) {
|
||||
if (type == "word") {
|
||||
state.tagName = stream.current();
|
||||
setStyle = "tag";
|
||||
return attrState;
|
||||
} else {
|
||||
setStyle = "error";
|
||||
return tagNameState;
|
||||
}
|
||||
}
|
||||
function closeTagNameState(type, stream, state) {
|
||||
if (type == "word") {
|
||||
var tagName = stream.current();
|
||||
if (state.context && state.context.tagName != tagName &&
|
||||
config.implicitlyClosed.hasOwnProperty(state.context.tagName))
|
||||
popContext(state);
|
||||
if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {
|
||||
setStyle = "tag";
|
||||
return closeState;
|
||||
} else {
|
||||
setStyle = "tag error";
|
||||
return closeStateErr;
|
||||
}
|
||||
} else {
|
||||
setStyle = "error";
|
||||
return closeStateErr;
|
||||
}
|
||||
}
|
||||
|
||||
function closeState(type, _stream, state) {
|
||||
if (type != "endTag") {
|
||||
setStyle = "error";
|
||||
return closeState;
|
||||
}
|
||||
popContext(state);
|
||||
return baseState;
|
||||
}
|
||||
function closeStateErr(type, stream, state) {
|
||||
setStyle = "error";
|
||||
return closeState(type, stream, state);
|
||||
}
|
||||
|
||||
function attrState(type, _stream, state) {
|
||||
if (type == "word") {
|
||||
setStyle = "attribute";
|
||||
return attrEqState;
|
||||
} else if (type == "endTag" || type == "selfcloseTag") {
|
||||
var tagName = state.tagName, tagStart = state.tagStart;
|
||||
state.tagName = state.tagStart = null;
|
||||
if (type == "selfcloseTag" ||
|
||||
config.autoSelfClosers.hasOwnProperty(tagName)) {
|
||||
maybePopContext(state, tagName);
|
||||
} else {
|
||||
maybePopContext(state, tagName);
|
||||
state.context = new Context(state, tagName, tagStart == state.indented);
|
||||
}
|
||||
return baseState;
|
||||
}
|
||||
setStyle = "error";
|
||||
return attrState;
|
||||
}
|
||||
function attrEqState(type, stream, state) {
|
||||
if (type == "equals") return attrValueState;
|
||||
if (!config.allowMissing) setStyle = "error";
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
function attrValueState(type, stream, state) {
|
||||
if (type == "string") return attrContinuedState;
|
||||
if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;}
|
||||
setStyle = "error";
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
function attrContinuedState(type, stream, state) {
|
||||
if (type == "string") return attrContinuedState;
|
||||
return attrState(type, stream, state);
|
||||
}
|
||||
|
||||
return {
|
||||
startState: function(baseIndent) {
|
||||
var state = {tokenize: inText,
|
||||
state: baseState,
|
||||
indented: baseIndent || 0,
|
||||
tagName: null, tagStart: null,
|
||||
context: null}
|
||||
if (baseIndent != null) state.baseIndent = baseIndent
|
||||
return state
|
||||
},
|
||||
|
||||
token: function(stream, state) {
|
||||
if (!state.tagName && stream.sol())
|
||||
state.indented = stream.indentation();
|
||||
|
||||
if (stream.eatSpace()) return null;
|
||||
type = null;
|
||||
var style = state.tokenize(stream, state);
|
||||
if ((style || type) && style != "comment") {
|
||||
setStyle = null;
|
||||
state.state = state.state(type || style, stream, state);
|
||||
if (setStyle)
|
||||
style = setStyle == "error" ? style + " error" : setStyle;
|
||||
}
|
||||
return style;
|
||||
},
|
||||
|
||||
indent: function(state, textAfter, fullLine) {
|
||||
var context = state.context;
|
||||
// Indent multi-line strings (e.g. css).
|
||||
if (state.tokenize.isInAttribute) {
|
||||
if (state.tagStart == state.indented)
|
||||
return state.stringStartCol + 1;
|
||||
else
|
||||
return state.indented + indentUnit;
|
||||
}
|
||||
if (context && context.noIndent) return CodeMirror.Pass;
|
||||
if (state.tokenize != inTag && state.tokenize != inText)
|
||||
return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
|
||||
// Indent the starts of attribute names.
|
||||
if (state.tagName) {
|
||||
if (config.multilineTagIndentPastTag !== false)
|
||||
return state.tagStart + state.tagName.length + 2;
|
||||
else
|
||||
return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
|
||||
}
|
||||
if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter)) return 0;
|
||||
var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
|
||||
if (tagAfter && tagAfter[1]) { // Closing tag spotted
|
||||
while (context) {
|
||||
if (context.tagName == tagAfter[2]) {
|
||||
context = context.prev;
|
||||
break;
|
||||
} else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {
|
||||
context = context.prev;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (tagAfter) { // Opening tag spotted
|
||||
while (context) {
|
||||
var grabbers = config.contextGrabbers[context.tagName];
|
||||
if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))
|
||||
context = context.prev;
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (context && context.prev && !context.startOfLine)
|
||||
context = context.prev;
|
||||
if (context) return context.indent + indentUnit;
|
||||
else return state.baseIndent || 0;
|
||||
},
|
||||
|
||||
electricInput: /<\/[\s\w:]+>$/,
|
||||
blockCommentStart: "<!--",
|
||||
blockCommentEnd: "-->",
|
||||
|
||||
configuration: config.htmlMode ? "html" : "xml",
|
||||
helperType: config.htmlMode ? "html" : "xml",
|
||||
|
||||
skipAttribute: function(state) {
|
||||
if (state.state == attrValueState)
|
||||
state.state = attrState
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
CodeMirror.defineMIME("text/xml", "xml");
|
||||
CodeMirror.defineMIME("application/xml", "xml");
|
||||
if (!CodeMirror.mimeModes.hasOwnProperty("text/html"))
|
||||
CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true});
|
||||
|
||||
});
|
41
app/lib/codemirror/theme/3024-day.css
vendored
Normal file
41
app/lib/codemirror/theme/3024-day.css
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
|
||||
Name: 3024 day
|
||||
Author: Jan T. Sott (http://github.com/idleberg)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-3024-day.CodeMirror { background: #f7f7f7; color: #3a3432; }
|
||||
.cm-s-3024-day div.CodeMirror-selected { background: #d6d5d4; }
|
||||
|
||||
.cm-s-3024-day .CodeMirror-line::selection, .cm-s-3024-day .CodeMirror-line > span::selection, .cm-s-3024-day .CodeMirror-line > span > span::selection { background: #d6d5d4; }
|
||||
.cm-s-3024-day .CodeMirror-line::-moz-selection, .cm-s-3024-day .CodeMirror-line > span::-moz-selection, .cm-s-3024-day .CodeMirror-line > span > span::selection { background: #d9d9d9; }
|
||||
|
||||
.cm-s-3024-day .CodeMirror-gutters { background: #f7f7f7; border-right: 0px; }
|
||||
.cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; }
|
||||
.cm-s-3024-day .CodeMirror-guttermarker-subtle { color: #807d7c; }
|
||||
.cm-s-3024-day .CodeMirror-linenumber { color: #807d7c; }
|
||||
|
||||
.cm-s-3024-day .CodeMirror-cursor { border-left: 1px solid #5c5855; }
|
||||
|
||||
.cm-s-3024-day span.cm-comment { color: #cdab53; }
|
||||
.cm-s-3024-day span.cm-atom { color: #a16a94; }
|
||||
.cm-s-3024-day span.cm-number { color: #a16a94; }
|
||||
|
||||
.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute { color: #01a252; }
|
||||
.cm-s-3024-day span.cm-keyword { color: #db2d20; }
|
||||
.cm-s-3024-day span.cm-string { color: #fded02; }
|
||||
|
||||
.cm-s-3024-day span.cm-variable { color: #01a252; }
|
||||
.cm-s-3024-day span.cm-variable-2 { color: #01a0e4; }
|
||||
.cm-s-3024-day span.cm-def { color: #e8bbd0; }
|
||||
.cm-s-3024-day span.cm-bracket { color: #3a3432; }
|
||||
.cm-s-3024-day span.cm-tag { color: #db2d20; }
|
||||
.cm-s-3024-day span.cm-link { color: #a16a94; }
|
||||
.cm-s-3024-day span.cm-error { background: #db2d20; color: #5c5855; }
|
||||
|
||||
.cm-s-3024-day .CodeMirror-activeline-background { background: #e8f2ff; }
|
||||
.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: #a16a94 !important; }
|
39
app/lib/codemirror/theme/3024-night.css
vendored
Normal file
39
app/lib/codemirror/theme/3024-night.css
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
|
||||
Name: 3024 night
|
||||
Author: Jan T. Sott (http://github.com/idleberg)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-3024-night.CodeMirror { background: #090300; color: #d6d5d4; }
|
||||
.cm-s-3024-night div.CodeMirror-selected { background: #3a3432; }
|
||||
.cm-s-3024-night .CodeMirror-line::selection, .cm-s-3024-night .CodeMirror-line > span::selection, .cm-s-3024-night .CodeMirror-line > span > span::selection { background: rgba(58, 52, 50, .99); }
|
||||
.cm-s-3024-night .CodeMirror-line::-moz-selection, .cm-s-3024-night .CodeMirror-line > span::-moz-selection, .cm-s-3024-night .CodeMirror-line > span > span::-moz-selection { background: rgba(58, 52, 50, .99); }
|
||||
.cm-s-3024-night .CodeMirror-gutters { background: #090300; border-right: 0px; }
|
||||
.cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; }
|
||||
.cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; }
|
||||
.cm-s-3024-night .CodeMirror-linenumber { color: #5c5855; }
|
||||
|
||||
.cm-s-3024-night .CodeMirror-cursor { border-left: 1px solid #807d7c; }
|
||||
|
||||
.cm-s-3024-night span.cm-comment { color: #cdab53; }
|
||||
.cm-s-3024-night span.cm-atom { color: #a16a94; }
|
||||
.cm-s-3024-night span.cm-number { color: #a16a94; }
|
||||
|
||||
.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute { color: #01a252; }
|
||||
.cm-s-3024-night span.cm-keyword { color: #db2d20; }
|
||||
.cm-s-3024-night span.cm-string { color: #fded02; }
|
||||
|
||||
.cm-s-3024-night span.cm-variable { color: #01a252; }
|
||||
.cm-s-3024-night span.cm-variable-2 { color: #01a0e4; }
|
||||
.cm-s-3024-night span.cm-def { color: #e8bbd0; }
|
||||
.cm-s-3024-night span.cm-bracket { color: #d6d5d4; }
|
||||
.cm-s-3024-night span.cm-tag { color: #db2d20; }
|
||||
.cm-s-3024-night span.cm-link { color: #a16a94; }
|
||||
.cm-s-3024-night span.cm-error { background: #db2d20; color: #807d7c; }
|
||||
|
||||
.cm-s-3024-night .CodeMirror-activeline-background { background: #2F2F2F; }
|
||||
.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
32
app/lib/codemirror/theme/abcdef.css
vendored
Normal file
32
app/lib/codemirror/theme/abcdef.css
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
.cm-s-abcdef.CodeMirror { background: #0f0f0f; color: #defdef; }
|
||||
.cm-s-abcdef div.CodeMirror-selected { background: #515151; }
|
||||
.cm-s-abcdef .CodeMirror-line::selection, .cm-s-abcdef .CodeMirror-line > span::selection, .cm-s-abcdef .CodeMirror-line > span > span::selection { background: rgba(56, 56, 56, 0.99); }
|
||||
.cm-s-abcdef .CodeMirror-line::-moz-selection, .cm-s-abcdef .CodeMirror-line > span::-moz-selection, .cm-s-abcdef .CodeMirror-line > span > span::-moz-selection { background: rgba(56, 56, 56, 0.99); }
|
||||
.cm-s-abcdef .CodeMirror-gutters { background: #555; border-right: 2px solid #314151; }
|
||||
.cm-s-abcdef .CodeMirror-guttermarker { color: #222; }
|
||||
.cm-s-abcdef .CodeMirror-guttermarker-subtle { color: azure; }
|
||||
.cm-s-abcdef .CodeMirror-linenumber { color: #FFFFFF; }
|
||||
.cm-s-abcdef .CodeMirror-cursor { border-left: 1px solid #00FF00; }
|
||||
|
||||
.cm-s-abcdef span.cm-keyword { color: darkgoldenrod; font-weight: bold; }
|
||||
.cm-s-abcdef span.cm-atom { color: #77F; }
|
||||
.cm-s-abcdef span.cm-number { color: violet; }
|
||||
.cm-s-abcdef span.cm-def { color: #fffabc; }
|
||||
.cm-s-abcdef span.cm-variable { color: #abcdef; }
|
||||
.cm-s-abcdef span.cm-variable-2 { color: #cacbcc; }
|
||||
.cm-s-abcdef span.cm-variable-3 { color: #def; }
|
||||
.cm-s-abcdef span.cm-property { color: #fedcba; }
|
||||
.cm-s-abcdef span.cm-operator { color: #ff0; }
|
||||
.cm-s-abcdef span.cm-comment { color: #7a7b7c; font-style: italic;}
|
||||
.cm-s-abcdef span.cm-string { color: #2b4; }
|
||||
.cm-s-abcdef span.cm-meta { color: #C9F; }
|
||||
.cm-s-abcdef span.cm-qualifier { color: #FFF700; }
|
||||
.cm-s-abcdef span.cm-builtin { color: #30aabc; }
|
||||
.cm-s-abcdef span.cm-bracket { color: #8a8a8a; }
|
||||
.cm-s-abcdef span.cm-tag { color: #FFDD44; }
|
||||
.cm-s-abcdef span.cm-attribute { color: #DDFF00; }
|
||||
.cm-s-abcdef span.cm-error { color: #FF0000; }
|
||||
.cm-s-abcdef span.cm-header { color: aquamarine; font-weight: bold; }
|
||||
.cm-s-abcdef span.cm-link { color: blueviolet; }
|
||||
|
||||
.cm-s-abcdef .CodeMirror-activeline-background { background: #314151; }
|
5
app/lib/codemirror/theme/ambiance-mobile.css
vendored
Normal file
5
app/lib/codemirror/theme/ambiance-mobile.css
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.cm-s-ambiance.CodeMirror {
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
74
app/lib/codemirror/theme/ambiance.css
vendored
Normal file
74
app/lib/codemirror/theme/ambiance.css
vendored
Normal file
File diff suppressed because one or more lines are too long
38
app/lib/codemirror/theme/base16-dark.css
vendored
Normal file
38
app/lib/codemirror/theme/base16-dark.css
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
|
||||
Name: Base16 Default Dark
|
||||
Author: Chris Kempson (http://chriskempson.com)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-base16-dark.CodeMirror { background: #151515; color: #e0e0e0; }
|
||||
.cm-s-base16-dark div.CodeMirror-selected { background: #303030; }
|
||||
.cm-s-base16-dark .CodeMirror-line::selection, .cm-s-base16-dark .CodeMirror-line > span::selection, .cm-s-base16-dark .CodeMirror-line > span > span::selection { background: rgba(48, 48, 48, .99); }
|
||||
.cm-s-base16-dark .CodeMirror-line::-moz-selection, .cm-s-base16-dark .CodeMirror-line > span::-moz-selection, .cm-s-base16-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(48, 48, 48, .99); }
|
||||
.cm-s-base16-dark .CodeMirror-gutters { background: #151515; border-right: 0px; }
|
||||
.cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; }
|
||||
.cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; }
|
||||
.cm-s-base16-dark .CodeMirror-linenumber { color: #505050; }
|
||||
.cm-s-base16-dark .CodeMirror-cursor { border-left: 1px solid #b0b0b0; }
|
||||
|
||||
.cm-s-base16-dark span.cm-comment { color: #8f5536; }
|
||||
.cm-s-base16-dark span.cm-atom { color: #aa759f; }
|
||||
.cm-s-base16-dark span.cm-number { color: #aa759f; }
|
||||
|
||||
.cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute { color: #90a959; }
|
||||
.cm-s-base16-dark span.cm-keyword { color: #ac4142; }
|
||||
.cm-s-base16-dark span.cm-string { color: #f4bf75; }
|
||||
|
||||
.cm-s-base16-dark span.cm-variable { color: #90a959; }
|
||||
.cm-s-base16-dark span.cm-variable-2 { color: #6a9fb5; }
|
||||
.cm-s-base16-dark span.cm-def { color: #d28445; }
|
||||
.cm-s-base16-dark span.cm-bracket { color: #e0e0e0; }
|
||||
.cm-s-base16-dark span.cm-tag { color: #ac4142; }
|
||||
.cm-s-base16-dark span.cm-link { color: #aa759f; }
|
||||
.cm-s-base16-dark span.cm-error { background: #ac4142; color: #b0b0b0; }
|
||||
|
||||
.cm-s-base16-dark .CodeMirror-activeline-background { background: #202020; }
|
||||
.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
38
app/lib/codemirror/theme/base16-light.css
vendored
Normal file
38
app/lib/codemirror/theme/base16-light.css
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
|
||||
Name: Base16 Default Light
|
||||
Author: Chris Kempson (http://chriskempson.com)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-base16-light.CodeMirror { background: #f5f5f5; color: #202020; }
|
||||
.cm-s-base16-light div.CodeMirror-selected { background: #e0e0e0; }
|
||||
.cm-s-base16-light .CodeMirror-line::selection, .cm-s-base16-light .CodeMirror-line > span::selection, .cm-s-base16-light .CodeMirror-line > span > span::selection { background: #e0e0e0; }
|
||||
.cm-s-base16-light .CodeMirror-line::-moz-selection, .cm-s-base16-light .CodeMirror-line > span::-moz-selection, .cm-s-base16-light .CodeMirror-line > span > span::-moz-selection { background: #e0e0e0; }
|
||||
.cm-s-base16-light .CodeMirror-gutters { background: #f5f5f5; border-right: 0px; }
|
||||
.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; }
|
||||
.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; }
|
||||
.cm-s-base16-light .CodeMirror-linenumber { color: #b0b0b0; }
|
||||
.cm-s-base16-light .CodeMirror-cursor { border-left: 1px solid #505050; }
|
||||
|
||||
.cm-s-base16-light span.cm-comment { color: #8f5536; }
|
||||
.cm-s-base16-light span.cm-atom { color: #aa759f; }
|
||||
.cm-s-base16-light span.cm-number { color: #aa759f; }
|
||||
|
||||
.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute { color: #90a959; }
|
||||
.cm-s-base16-light span.cm-keyword { color: #ac4142; }
|
||||
.cm-s-base16-light span.cm-string { color: #f4bf75; }
|
||||
|
||||
.cm-s-base16-light span.cm-variable { color: #90a959; }
|
||||
.cm-s-base16-light span.cm-variable-2 { color: #6a9fb5; }
|
||||
.cm-s-base16-light span.cm-def { color: #d28445; }
|
||||
.cm-s-base16-light span.cm-bracket { color: #202020; }
|
||||
.cm-s-base16-light span.cm-tag { color: #ac4142; }
|
||||
.cm-s-base16-light span.cm-link { color: #aa759f; }
|
||||
.cm-s-base16-light span.cm-error { background: #ac4142; color: #505050; }
|
||||
|
||||
.cm-s-base16-light .CodeMirror-activeline-background { background: #DDDCDC; }
|
||||
.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
34
app/lib/codemirror/theme/base2tone-meadow-dark.css
vendored
Normal file
34
app/lib/codemirror/theme/base2tone-meadow-dark.css
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
Name: Base2Tone-Meadow
|
||||
Author: by Bram de Haan, adapted from DuoTone themes by Simurai (http://simurai.com/projects/2016/01/01/duotone-themes)
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg), adapted by Bram de Haan (https://github.com/atelierbram/)
|
||||
*/
|
||||
|
||||
.cm-s-Base2Tone-Meadow-dark.CodeMirror { background: #192834; color: #47adf5; }
|
||||
.cm-s-Base2Tone-Meadow-dark div.CodeMirror-selected { background: #335166!important; }
|
||||
.cm-s-Base2Tone-Meadow-dark .CodeMirror-gutters { background: #192834; border-right: 0px; }
|
||||
.cm-s-Base2Tone-Meadow-dark .CodeMirror-linenumber { color: #335166; }
|
||||
|
||||
/* begin cursor */
|
||||
.cm-s-Base2Tone-Meadow-dark .CodeMirror-cursor { border-left: 1px solid #80bf40; /* border-left: 1px solid #80bf4080; */ border-right: .5em solid #80bf40; /* border-right: .5em solid #80bf4080; */ opacity: .5; }
|
||||
.cm-s-Base2Tone-Meadow-dark .CodeMirror-activeline-background { background: #223644; /* background: #22364480; */ opacity: .5;}
|
||||
.cm-s-Base2Tone-Meadow-dark .cm-fat-cursor .CodeMirror-cursor { background: #80bf40; /* background: #80bf4080; */ opacity: .5;}
|
||||
/* end cursor */
|
||||
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-atom, .cm-s-Base2Tone-Meadow-dark span.cm-number, .cm-s-Base2Tone-Meadow-dark span.cm-keyword, .cm-s-Base2Tone-Meadow-dark span.cm-variable, .cm-s-Base2Tone-Meadow-dark span.cm-attribute, .cm-s-Base2Tone-Meadow-dark span.cm-quote, .cm-s-Base2Tone-Meadow-dark span.cm-hr, .cm-s-Base2Tone-Meadow-dark span.cm-link { color: #a6f655; }
|
||||
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-property { color: #4299d7; }
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-punctuation, .cm-s-Base2Tone-Meadow-dark span.cm-unit, .cm-s-Base2Tone-Meadow-dark span.cm-negative { color: #66a329; }
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-string { color: #8cdd3c; }
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-operator { color: #80bf40; }
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-positive { color: #1b6498; }
|
||||
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-variable-2, .cm-s-Base2Tone-Meadow-dark span.cm-variable-3, .cm-s-Base2Tone-Meadow-dark span.cm-string-2, .cm-s-Base2Tone-Meadow-dark span.cm-url { color: #2172ab; }
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-def, .cm-s-Base2Tone-Meadow-dark span.cm-tag, .cm-s-Base2Tone-Meadow-dark span.cm-builtin, .cm-s-Base2Tone-Meadow-dark span.cm-qualifier, .cm-s-Base2Tone-Meadow-dark span.cm-header, .cm-s-Base2Tone-Meadow-dark span.cm-em { color: #d1ecff; }
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-bracket, .cm-s-Base2Tone-Meadow-dark span.cm-comment { color: #3d5e76; }
|
||||
|
||||
/* using #f00 red for errors, don't think any of the colorscheme variables will stand out enough, ... maybe by giving it a background-color ... */
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-error, .cm-s-Base2Tone-Meadow-dark span.cm-invalidchar { color: #f00; }
|
||||
|
||||
.cm-s-Base2Tone-Meadow-dark span.cm-header { font-weight: normal; }
|
||||
.cm-s-Base2Tone-Meadow-dark .CodeMirror-matchingbracket { text-decoration: underline; color: #d1ecff!important; }
|
34
app/lib/codemirror/theme/bespin.css
vendored
Normal file
34
app/lib/codemirror/theme/bespin.css
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: Bespin
|
||||
Author: Mozilla / Jan T. Sott
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-bespin.CodeMirror {background: #28211c; color: #9d9b97;}
|
||||
.cm-s-bespin div.CodeMirror-selected {background: #36312e !important;}
|
||||
.cm-s-bespin .CodeMirror-gutters {background: #28211c; border-right: 0px;}
|
||||
.cm-s-bespin .CodeMirror-linenumber {color: #666666;}
|
||||
.cm-s-bespin .CodeMirror-cursor {border-left: 1px solid #797977 !important;}
|
||||
|
||||
.cm-s-bespin span.cm-comment {color: #937121;}
|
||||
.cm-s-bespin span.cm-atom {color: #9b859d;}
|
||||
.cm-s-bespin span.cm-number {color: #9b859d;}
|
||||
|
||||
.cm-s-bespin span.cm-property, .cm-s-bespin span.cm-attribute {color: #54be0d;}
|
||||
.cm-s-bespin span.cm-keyword {color: #cf6a4c;}
|
||||
.cm-s-bespin span.cm-string {color: #f9ee98;}
|
||||
|
||||
.cm-s-bespin span.cm-variable {color: #54be0d;}
|
||||
.cm-s-bespin span.cm-variable-2 {color: #5ea6ea;}
|
||||
.cm-s-bespin span.cm-def {color: #cf7d34;}
|
||||
.cm-s-bespin span.cm-error {background: #cf6a4c; color: #797977;}
|
||||
.cm-s-bespin span.cm-bracket {color: #9d9b97;}
|
||||
.cm-s-bespin span.cm-tag {color: #cf6a4c;}
|
||||
.cm-s-bespin span.cm-link {color: #9b859d;}
|
||||
|
||||
.cm-s-bespin .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
.cm-s-bespin .CodeMirror-activeline-background { background: #404040; }
|
32
app/lib/codemirror/theme/blackboard.css
vendored
Normal file
32
app/lib/codemirror/theme/blackboard.css
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
/* Port of TextMate's Blackboard theme */
|
||||
|
||||
.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; }
|
||||
.cm-s-blackboard div.CodeMirror-selected { background: #253B76; }
|
||||
.cm-s-blackboard .CodeMirror-line::selection, .cm-s-blackboard .CodeMirror-line > span::selection, .cm-s-blackboard .CodeMirror-line > span > span::selection { background: rgba(37, 59, 118, .99); }
|
||||
.cm-s-blackboard .CodeMirror-line::-moz-selection, .cm-s-blackboard .CodeMirror-line > span::-moz-selection, .cm-s-blackboard .CodeMirror-line > span > span::-moz-selection { background: rgba(37, 59, 118, .99); }
|
||||
.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; }
|
||||
.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; }
|
||||
.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; }
|
||||
.cm-s-blackboard .CodeMirror-linenumber { color: #888; }
|
||||
.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7; }
|
||||
|
||||
.cm-s-blackboard .cm-keyword { color: #FBDE2D; }
|
||||
.cm-s-blackboard .cm-atom { color: #D8FA3C; }
|
||||
.cm-s-blackboard .cm-number { color: #D8FA3C; }
|
||||
.cm-s-blackboard .cm-def { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-variable { color: #FF6400; }
|
||||
.cm-s-blackboard .cm-operator { color: #FBDE2D; }
|
||||
.cm-s-blackboard .cm-comment { color: #AEAEAE; }
|
||||
.cm-s-blackboard .cm-string { color: #61CE3C; }
|
||||
.cm-s-blackboard .cm-string-2 { color: #61CE3C; }
|
||||
.cm-s-blackboard .cm-meta { color: #D8FA3C; }
|
||||
.cm-s-blackboard .cm-builtin { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-tag { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-attribute { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-header { color: #FF6400; }
|
||||
.cm-s-blackboard .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-blackboard .cm-link { color: #8DA6CE; }
|
||||
.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; }
|
||||
|
||||
.cm-s-blackboard .CodeMirror-activeline-background { background: #3C3636; }
|
||||
.cm-s-blackboard .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; }
|
25
app/lib/codemirror/theme/cobalt.css
vendored
Normal file
25
app/lib/codemirror/theme/cobalt.css
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
.cm-s-cobalt.CodeMirror { background: #002240; color: white; }
|
||||
.cm-s-cobalt div.CodeMirror-selected { background: #b36539; }
|
||||
.cm-s-cobalt .CodeMirror-line::selection, .cm-s-cobalt .CodeMirror-line > span::selection, .cm-s-cobalt .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); }
|
||||
.cm-s-cobalt .CodeMirror-line::-moz-selection, .cm-s-cobalt .CodeMirror-line > span::-moz-selection, .cm-s-cobalt .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); }
|
||||
.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
||||
.cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; }
|
||||
.cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
||||
.cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
|
||||
.cm-s-cobalt span.cm-comment { color: #08f; }
|
||||
.cm-s-cobalt span.cm-atom { color: #845dc4; }
|
||||
.cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; }
|
||||
.cm-s-cobalt span.cm-keyword { color: #ffee80; }
|
||||
.cm-s-cobalt span.cm-string { color: #3ad900; }
|
||||
.cm-s-cobalt span.cm-meta { color: #ff9d00; }
|
||||
.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; }
|
||||
.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; }
|
||||
.cm-s-cobalt span.cm-bracket { color: #d8d8d8; }
|
||||
.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; }
|
||||
.cm-s-cobalt span.cm-link { color: #845dc4; }
|
||||
.cm-s-cobalt span.cm-error { color: #9d1e15; }
|
||||
|
||||
.cm-s-cobalt .CodeMirror-activeline-background { background: #002D57; }
|
||||
.cm-s-cobalt .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; }
|
33
app/lib/codemirror/theme/colorforth.css
vendored
Normal file
33
app/lib/codemirror/theme/colorforth.css
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
.cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; }
|
||||
.cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
||||
.cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; }
|
||||
.cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; }
|
||||
.cm-s-colorforth .CodeMirror-linenumber { color: #bababa; }
|
||||
.cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
|
||||
.cm-s-colorforth span.cm-comment { color: #ededed; }
|
||||
.cm-s-colorforth span.cm-def { color: #ff1c1c; font-weight:bold; }
|
||||
.cm-s-colorforth span.cm-keyword { color: #ffd900; }
|
||||
.cm-s-colorforth span.cm-builtin { color: #00d95a; }
|
||||
.cm-s-colorforth span.cm-variable { color: #73ff00; }
|
||||
.cm-s-colorforth span.cm-string { color: #007bff; }
|
||||
.cm-s-colorforth span.cm-number { color: #00c4ff; }
|
||||
.cm-s-colorforth span.cm-atom { color: #606060; }
|
||||
|
||||
.cm-s-colorforth span.cm-variable-2 { color: #EEE; }
|
||||
.cm-s-colorforth span.cm-variable-3 { color: #DDD; }
|
||||
.cm-s-colorforth span.cm-property {}
|
||||
.cm-s-colorforth span.cm-operator {}
|
||||
|
||||
.cm-s-colorforth span.cm-meta { color: yellow; }
|
||||
.cm-s-colorforth span.cm-qualifier { color: #FFF700; }
|
||||
.cm-s-colorforth span.cm-bracket { color: #cc7; }
|
||||
.cm-s-colorforth span.cm-tag { color: #FFBD40; }
|
||||
.cm-s-colorforth span.cm-attribute { color: #FFF700; }
|
||||
.cm-s-colorforth span.cm-error { color: #f00; }
|
||||
|
||||
.cm-s-colorforth div.CodeMirror-selected { background: #333d53; }
|
||||
|
||||
.cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); }
|
||||
|
||||
.cm-s-colorforth .CodeMirror-activeline-background { background: #253540; }
|
40
app/lib/codemirror/theme/dracula.css
vendored
Normal file
40
app/lib/codemirror/theme/dracula.css
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
|
||||
Name: dracula
|
||||
Author: Michael Kaminsky (http://github.com/mkaminsky11)
|
||||
|
||||
Original dracula color scheme by Zeno Rocha (https://github.com/zenorocha/dracula-theme)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
.cm-s-dracula.CodeMirror, .cm-s-dracula .CodeMirror-gutters {
|
||||
background-color: #282a36 !important;
|
||||
color: #f8f8f2 !important;
|
||||
border: none;
|
||||
}
|
||||
.cm-s-dracula .CodeMirror-gutters { color: #282a36; }
|
||||
.cm-s-dracula .CodeMirror-cursor { border-left: solid thin #f8f8f0; }
|
||||
.cm-s-dracula .CodeMirror-linenumber { color: #6D8A88; }
|
||||
.cm-s-dracula .CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-dracula .CodeMirror-line::selection, .cm-s-dracula .CodeMirror-line > span::selection, .cm-s-dracula .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-dracula .CodeMirror-line::-moz-selection, .cm-s-dracula .CodeMirror-line > span::-moz-selection, .cm-s-dracula .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-dracula span.cm-comment { color: #6272a4; }
|
||||
.cm-s-dracula span.cm-string, .cm-s-dracula span.cm-string-2 { color: #f1fa8c; }
|
||||
.cm-s-dracula span.cm-number { color: #bd93f9; }
|
||||
.cm-s-dracula span.cm-variable { color: #50fa7b; }
|
||||
.cm-s-dracula span.cm-variable-2 { color: white; }
|
||||
.cm-s-dracula span.cm-def { color: #50fa7b; }
|
||||
.cm-s-dracula span.cm-operator { color: #ff79c6; }
|
||||
.cm-s-dracula span.cm-keyword { color: #ff79c6; }
|
||||
.cm-s-dracula span.cm-atom { color: #bd93f9; }
|
||||
.cm-s-dracula span.cm-meta { color: #f8f8f2; }
|
||||
.cm-s-dracula span.cm-tag { color: #ff79c6; }
|
||||
.cm-s-dracula span.cm-attribute { color: #50fa7b; }
|
||||
.cm-s-dracula span.cm-qualifier { color: #50fa7b; }
|
||||
.cm-s-dracula span.cm-property { color: #66d9ef; }
|
||||
.cm-s-dracula span.cm-builtin { color: #50fa7b; }
|
||||
.cm-s-dracula span.cm-variable-3 { color: #ffb86c; }
|
||||
|
||||
.cm-s-dracula .CodeMirror-activeline-background { background: rgba(255,255,255,0.1); }
|
||||
.cm-s-dracula .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
35
app/lib/codemirror/theme/duotone-dark.css
vendored
Normal file
35
app/lib/codemirror/theme/duotone-dark.css
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
Name: DuoTone-Dark
|
||||
Author: by Bram de Haan, adapted from DuoTone themes by Simurai (http://simurai.com/projects/2016/01/01/duotone-themes)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg), adapted by Bram de Haan (https://github.com/atelierbram/)
|
||||
*/
|
||||
|
||||
.cm-s-duotone-dark.CodeMirror { background: #2a2734; color: #6c6783; }
|
||||
.cm-s-duotone-dark div.CodeMirror-selected { background: #545167!important; }
|
||||
.cm-s-duotone-dark .CodeMirror-gutters { background: #2a2734; border-right: 0px; }
|
||||
.cm-s-duotone-dark .CodeMirror-linenumber { color: #545167; }
|
||||
|
||||
/* begin cursor */
|
||||
.cm-s-duotone-dark .CodeMirror-cursor { border-left: 1px solid #ffad5c; /* border-left: 1px solid #ffad5c80; */ border-right: .5em solid #ffad5c; /* border-right: .5em solid #ffad5c80; */ opacity: .5; }
|
||||
.cm-s-duotone-dark .CodeMirror-activeline-background { background: #363342; /* background: #36334280; */ opacity: .5;}
|
||||
.cm-s-duotone-dark .cm-fat-cursor .CodeMirror-cursor { background: #ffad5c; /* background: #ffad5c80; */ opacity: .5;}
|
||||
/* end cursor */
|
||||
|
||||
.cm-s-duotone-dark span.cm-atom, .cm-s-duotone-dark span.cm-number, .cm-s-duotone-dark span.cm-keyword, .cm-s-duotone-dark span.cm-variable, .cm-s-duotone-dark span.cm-attribute, .cm-s-duotone-dark span.cm-quote, .cm-s-duotone-dark span.cm-hr, .cm-s-duotone-dark span.cm-link { color: #ffcc99; }
|
||||
|
||||
.cm-s-duotone-dark span.cm-property { color: #9a86fd; }
|
||||
.cm-s-duotone-dark span.cm-punctuation, .cm-s-duotone-dark span.cm-unit, .cm-s-duotone-dark span.cm-negative { color: #e09142; }
|
||||
.cm-s-duotone-dark span.cm-string { color: #ffb870; }
|
||||
.cm-s-duotone-dark span.cm-operator { color: #ffad5c; }
|
||||
.cm-s-duotone-dark span.cm-positive { color: #6a51e6; }
|
||||
|
||||
.cm-s-duotone-dark span.cm-variable-2, .cm-s-duotone-dark span.cm-variable-3, .cm-s-duotone-dark span.cm-string-2, .cm-s-duotone-dark span.cm-url { color: #7a63ee; }
|
||||
.cm-s-duotone-dark span.cm-def, .cm-s-duotone-dark span.cm-tag, .cm-s-duotone-dark span.cm-builtin, .cm-s-duotone-dark span.cm-qualifier, .cm-s-duotone-dark span.cm-header, .cm-s-duotone-dark span.cm-em { color: #eeebff; }
|
||||
.cm-s-duotone-dark span.cm-bracket, .cm-s-duotone-dark span.cm-comment { color: #6c6783; }
|
||||
|
||||
/* using #f00 red for errors, don't think any of the colorscheme variables will stand out enough, ... maybe by giving it a background-color ... */
|
||||
.cm-s-duotone-dark span.cm-error, .cm-s-duotone-dark span.cm-invalidchar { color: #f00; }
|
||||
|
||||
.cm-s-duotone-dark span.cm-header { font-weight: normal; }
|
||||
.cm-s-duotone-dark .CodeMirror-matchingbracket { text-decoration: underline; color: #eeebff !important; }
|
36
app/lib/codemirror/theme/duotone-light.css
vendored
Normal file
36
app/lib/codemirror/theme/duotone-light.css
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
Name: DuoTone-Light
|
||||
Author: by Bram de Haan, adapted from DuoTone themes by Simurai (http://simurai.com/projects/2016/01/01/duotone-themes)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg), adapted by Bram de Haan (https://github.com/atelierbram/)
|
||||
*/
|
||||
|
||||
.cm-s-duotone-light.CodeMirror { background: #faf8f5; color: #b29762; }
|
||||
.cm-s-duotone-light div.CodeMirror-selected { background: #e3dcce !important; }
|
||||
.cm-s-duotone-light .CodeMirror-gutters { background: #faf8f5; border-right: 0px; }
|
||||
.cm-s-duotone-light .CodeMirror-linenumber { color: #cdc4b1; }
|
||||
|
||||
/* begin cursor */
|
||||
.cm-s-duotone-light .CodeMirror-cursor { border-left: 1px solid #93abdc; /* border-left: 1px solid #93abdc80; */ border-right: .5em solid #93abdc; /* border-right: .5em solid #93abdc80; */ opacity: .5; }
|
||||
.cm-s-duotone-light .CodeMirror-activeline-background { background: #e3dcce; /* background: #e3dcce80; */ opacity: .5; }
|
||||
.cm-s-duotone-light .cm-fat-cursor .CodeMirror-cursor { background: #93abdc; /* #93abdc80; */ opacity: .5; }
|
||||
/* end cursor */
|
||||
|
||||
.cm-s-duotone-light span.cm-atom, .cm-s-duotone-light span.cm-number, .cm-s-duotone-light span.cm-keyword, .cm-s-duotone-light span.cm-variable, .cm-s-duotone-light span.cm-attribute, .cm-s-duotone-light span.cm-quote, .cm-s-duotone-light-light span.cm-hr, .cm-s-duotone-light-light span.cm-link { color: #063289; }
|
||||
|
||||
.cm-s-duotone-light span.cm-property { color: #b29762; }
|
||||
.cm-s-duotone-light span.cm-punctuation, .cm-s-duotone-light span.cm-unit, .cm-s-duotone-light span.cm-negative { color: #063289; }
|
||||
.cm-s-duotone-light span.cm-string, .cm-s-duotone-light span.cm-operator { color: #1659df; }
|
||||
.cm-s-duotone-light span.cm-positive { color: #896724; }
|
||||
|
||||
.cm-s-duotone-light span.cm-variable-2, .cm-s-duotone-light span.cm-variable-3, .cm-s-duotone-light span.cm-string-2, .cm-s-duotone-light span.cm-url { color: #896724; }
|
||||
.cm-s-duotone-light span.cm-def, .cm-s-duotone-light span.cm-tag, .cm-s-duotone-light span.cm-builtin, .cm-s-duotone-light span.cm-qualifier, .cm-s-duotone-light span.cm-header, .cm-s-duotone-light span.cm-em { color: #2d2006; }
|
||||
.cm-s-duotone-light span.cm-bracket, .cm-s-duotone-light span.cm-comment { color: #b6ad9a; }
|
||||
|
||||
/* using #f00 red for errors, don't think any of the colorscheme variables will stand out enough, ... maybe by giving it a background-color ... */
|
||||
/* .cm-s-duotone-light span.cm-error { background: #896724; color: #728fcb; } */
|
||||
.cm-s-duotone-light span.cm-error, .cm-s-duotone-light span.cm-invalidchar { color: #f00; }
|
||||
|
||||
.cm-s-duotone-light span.cm-header { font-weight: normal; }
|
||||
.cm-s-duotone-light .CodeMirror-matchingbracket { text-decoration: underline; color: #faf8f5 !important; }
|
||||
|
23
app/lib/codemirror/theme/eclipse.css
vendored
Normal file
23
app/lib/codemirror/theme/eclipse.css
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
.cm-s-eclipse span.cm-meta { color: #FF1717; }
|
||||
.cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; }
|
||||
.cm-s-eclipse span.cm-atom { color: #219; }
|
||||
.cm-s-eclipse span.cm-number { color: #164; }
|
||||
.cm-s-eclipse span.cm-def { color: #00f; }
|
||||
.cm-s-eclipse span.cm-variable { color: black; }
|
||||
.cm-s-eclipse span.cm-variable-2 { color: #0000C0; }
|
||||
.cm-s-eclipse span.cm-variable-3 { color: #0000C0; }
|
||||
.cm-s-eclipse span.cm-property { color: black; }
|
||||
.cm-s-eclipse span.cm-operator { color: black; }
|
||||
.cm-s-eclipse span.cm-comment { color: #3F7F5F; }
|
||||
.cm-s-eclipse span.cm-string { color: #2A00FF; }
|
||||
.cm-s-eclipse span.cm-string-2 { color: #f50; }
|
||||
.cm-s-eclipse span.cm-qualifier { color: #555; }
|
||||
.cm-s-eclipse span.cm-builtin { color: #30a; }
|
||||
.cm-s-eclipse span.cm-bracket { color: #cc7; }
|
||||
.cm-s-eclipse span.cm-tag { color: #170; }
|
||||
.cm-s-eclipse span.cm-attribute { color: #00c; }
|
||||
.cm-s-eclipse span.cm-link { color: #219; }
|
||||
.cm-s-eclipse span.cm-error { color: #f00; }
|
||||
|
||||
.cm-s-eclipse .CodeMirror-activeline-background { background: #e8f2ff; }
|
||||
.cm-s-eclipse .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
|
13
app/lib/codemirror/theme/elegant.css
vendored
Normal file
13
app/lib/codemirror/theme/elegant.css
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
.cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom { color: #762; }
|
||||
.cm-s-elegant span.cm-comment { color: #262; font-style: italic; line-height: 1em; }
|
||||
.cm-s-elegant span.cm-meta { color: #555; font-style: italic; line-height: 1em; }
|
||||
.cm-s-elegant span.cm-variable { color: black; }
|
||||
.cm-s-elegant span.cm-variable-2 { color: #b11; }
|
||||
.cm-s-elegant span.cm-qualifier { color: #555; }
|
||||
.cm-s-elegant span.cm-keyword { color: #730; }
|
||||
.cm-s-elegant span.cm-builtin { color: #30a; }
|
||||
.cm-s-elegant span.cm-link { color: #762; }
|
||||
.cm-s-elegant span.cm-error { background-color: #fdd; }
|
||||
|
||||
.cm-s-elegant .CodeMirror-activeline-background { background: #e8f2ff; }
|
||||
.cm-s-elegant .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
|
34
app/lib/codemirror/theme/erlang-dark.css
vendored
Normal file
34
app/lib/codemirror/theme/erlang-dark.css
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
.cm-s-erlang-dark.CodeMirror { background: #002240; color: white; }
|
||||
.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539; }
|
||||
.cm-s-erlang-dark .CodeMirror-line::selection, .cm-s-erlang-dark .CodeMirror-line > span::selection, .cm-s-erlang-dark .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); }
|
||||
.cm-s-erlang-dark .CodeMirror-line::-moz-selection, .cm-s-erlang-dark .CodeMirror-line > span::-moz-selection, .cm-s-erlang-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); }
|
||||
.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
||||
.cm-s-erlang-dark .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
||||
.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
|
||||
.cm-s-erlang-dark span.cm-quote { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-atom { color: #f133f1; }
|
||||
.cm-s-erlang-dark span.cm-attribute { color: #ff80e1; }
|
||||
.cm-s-erlang-dark span.cm-bracket { color: #ff9d00; }
|
||||
.cm-s-erlang-dark span.cm-builtin { color: #eaa; }
|
||||
.cm-s-erlang-dark span.cm-comment { color: #77f; }
|
||||
.cm-s-erlang-dark span.cm-def { color: #e7a; }
|
||||
.cm-s-erlang-dark span.cm-keyword { color: #ffee80; }
|
||||
.cm-s-erlang-dark span.cm-meta { color: #50fefe; }
|
||||
.cm-s-erlang-dark span.cm-number { color: #ffd0d0; }
|
||||
.cm-s-erlang-dark span.cm-operator { color: #d55; }
|
||||
.cm-s-erlang-dark span.cm-property { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-qualifier { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-special { color: #ffbbbb; }
|
||||
.cm-s-erlang-dark span.cm-string { color: #3ad900; }
|
||||
.cm-s-erlang-dark span.cm-string-2 { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-tag { color: #9effff; }
|
||||
.cm-s-erlang-dark span.cm-variable { color: #50fe50; }
|
||||
.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; }
|
||||
.cm-s-erlang-dark span.cm-variable-3 { color: #ccc; }
|
||||
.cm-s-erlang-dark span.cm-error { color: #9d1e15; }
|
||||
|
||||
.cm-s-erlang-dark .CodeMirror-activeline-background { background: #013461; }
|
||||
.cm-s-erlang-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
34
app/lib/codemirror/theme/hopscotch.css
vendored
Normal file
34
app/lib/codemirror/theme/hopscotch.css
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: Hopscotch
|
||||
Author: Jan T. Sott
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-hopscotch.CodeMirror {background: #322931; color: #d5d3d5;}
|
||||
.cm-s-hopscotch div.CodeMirror-selected {background: #433b42 !important;}
|
||||
.cm-s-hopscotch .CodeMirror-gutters {background: #322931; border-right: 0px;}
|
||||
.cm-s-hopscotch .CodeMirror-linenumber {color: #797379;}
|
||||
.cm-s-hopscotch .CodeMirror-cursor {border-left: 1px solid #989498 !important;}
|
||||
|
||||
.cm-s-hopscotch span.cm-comment {color: #b33508;}
|
||||
.cm-s-hopscotch span.cm-atom {color: #c85e7c;}
|
||||
.cm-s-hopscotch span.cm-number {color: #c85e7c;}
|
||||
|
||||
.cm-s-hopscotch span.cm-property, .cm-s-hopscotch span.cm-attribute {color: #8fc13e;}
|
||||
.cm-s-hopscotch span.cm-keyword {color: #dd464c;}
|
||||
.cm-s-hopscotch span.cm-string {color: #fdcc59;}
|
||||
|
||||
.cm-s-hopscotch span.cm-variable {color: #8fc13e;}
|
||||
.cm-s-hopscotch span.cm-variable-2 {color: #1290bf;}
|
||||
.cm-s-hopscotch span.cm-def {color: #fd8b19;}
|
||||
.cm-s-hopscotch span.cm-error {background: #dd464c; color: #989498;}
|
||||
.cm-s-hopscotch span.cm-bracket {color: #d5d3d5;}
|
||||
.cm-s-hopscotch span.cm-tag {color: #dd464c;}
|
||||
.cm-s-hopscotch span.cm-link {color: #c85e7c;}
|
||||
|
||||
.cm-s-hopscotch .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
.cm-s-hopscotch .CodeMirror-activeline-background { background: #302020; }
|
43
app/lib/codemirror/theme/icecoder.css
vendored
Normal file
43
app/lib/codemirror/theme/icecoder.css
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
ICEcoder default theme by Matt Pass, used in code editor available at https://icecoder.net
|
||||
*/
|
||||
|
||||
.cm-s-icecoder { color: #666; background: #1d1d1b; }
|
||||
|
||||
.cm-s-icecoder span.cm-keyword { color: #eee; font-weight:bold; } /* off-white 1 */
|
||||
.cm-s-icecoder span.cm-atom { color: #e1c76e; } /* yellow */
|
||||
.cm-s-icecoder span.cm-number { color: #6cb5d9; } /* blue */
|
||||
.cm-s-icecoder span.cm-def { color: #b9ca4a; } /* green */
|
||||
|
||||
.cm-s-icecoder span.cm-variable { color: #6cb5d9; } /* blue */
|
||||
.cm-s-icecoder span.cm-variable-2 { color: #cc1e5c; } /* pink */
|
||||
.cm-s-icecoder span.cm-variable-3 { color: #f9602c; } /* orange */
|
||||
|
||||
.cm-s-icecoder span.cm-property { color: #eee; } /* off-white 1 */
|
||||
.cm-s-icecoder span.cm-operator { color: #9179bb; } /* purple */
|
||||
.cm-s-icecoder span.cm-comment { color: #97a3aa; } /* grey-blue */
|
||||
|
||||
.cm-s-icecoder span.cm-string { color: #b9ca4a; } /* green */
|
||||
.cm-s-icecoder span.cm-string-2 { color: #6cb5d9; } /* blue */
|
||||
|
||||
.cm-s-icecoder span.cm-meta { color: #555; } /* grey */
|
||||
|
||||
.cm-s-icecoder span.cm-qualifier { color: #555; } /* grey */
|
||||
.cm-s-icecoder span.cm-builtin { color: #214e7b; } /* bright blue */
|
||||
.cm-s-icecoder span.cm-bracket { color: #cc7; } /* grey-yellow */
|
||||
|
||||
.cm-s-icecoder span.cm-tag { color: #e8e8e8; } /* off-white 2 */
|
||||
.cm-s-icecoder span.cm-attribute { color: #099; } /* teal */
|
||||
|
||||
.cm-s-icecoder span.cm-header { color: #6a0d6a; } /* purple-pink */
|
||||
.cm-s-icecoder span.cm-quote { color: #186718; } /* dark green */
|
||||
.cm-s-icecoder span.cm-hr { color: #888; } /* mid-grey */
|
||||
.cm-s-icecoder span.cm-link { color: #e1c76e; } /* yellow */
|
||||
.cm-s-icecoder span.cm-error { color: #d00; } /* red */
|
||||
|
||||
.cm-s-icecoder .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
.cm-s-icecoder div.CodeMirror-selected { color: #fff; background: #037; }
|
||||
.cm-s-icecoder .CodeMirror-gutters { background: #1d1d1b; min-width: 41px; border-right: 0; }
|
||||
.cm-s-icecoder .CodeMirror-linenumber { color: #555; cursor: default; }
|
||||
.cm-s-icecoder .CodeMirror-matchingbracket { color: #fff !important; background: #555 !important; }
|
||||
.cm-s-icecoder .CodeMirror-activeline-background { background: #000; }
|
34
app/lib/codemirror/theme/isotope.css
vendored
Normal file
34
app/lib/codemirror/theme/isotope.css
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: Isotope
|
||||
Author: David Desandro / Jan T. Sott
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-isotope.CodeMirror {background: #000000; color: #e0e0e0;}
|
||||
.cm-s-isotope div.CodeMirror-selected {background: #404040 !important;}
|
||||
.cm-s-isotope .CodeMirror-gutters {background: #000000; border-right: 0px;}
|
||||
.cm-s-isotope .CodeMirror-linenumber {color: #808080;}
|
||||
.cm-s-isotope .CodeMirror-cursor {border-left: 1px solid #c0c0c0 !important;}
|
||||
|
||||
.cm-s-isotope span.cm-comment {color: #3300ff;}
|
||||
.cm-s-isotope span.cm-atom {color: #cc00ff;}
|
||||
.cm-s-isotope span.cm-number {color: #cc00ff;}
|
||||
|
||||
.cm-s-isotope span.cm-property, .cm-s-isotope span.cm-attribute {color: #33ff00;}
|
||||
.cm-s-isotope span.cm-keyword {color: #ff0000;}
|
||||
.cm-s-isotope span.cm-string {color: #ff0099;}
|
||||
|
||||
.cm-s-isotope span.cm-variable {color: #33ff00;}
|
||||
.cm-s-isotope span.cm-variable-2 {color: #0066ff;}
|
||||
.cm-s-isotope span.cm-def {color: #ff9900;}
|
||||
.cm-s-isotope span.cm-error {background: #ff0000; color: #c0c0c0;}
|
||||
.cm-s-isotope span.cm-bracket {color: #e0e0e0;}
|
||||
.cm-s-isotope span.cm-tag {color: #ff0000;}
|
||||
.cm-s-isotope span.cm-link {color: #cc00ff;}
|
||||
|
||||
.cm-s-isotope .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
.cm-s-isotope .CodeMirror-activeline-background { background: #202020; }
|
47
app/lib/codemirror/theme/lesser-dark.css
vendored
Normal file
47
app/lib/codemirror/theme/lesser-dark.css
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
http://lesscss.org/ dark theme
|
||||
Ported to CodeMirror by Peter Kroon
|
||||
*/
|
||||
.cm-s-lesser-dark {
|
||||
line-height: 1.3em;
|
||||
}
|
||||
.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; }
|
||||
.cm-s-lesser-dark div.CodeMirror-selected { background: #45443B; } /* 33322B*/
|
||||
.cm-s-lesser-dark .CodeMirror-line::selection, .cm-s-lesser-dark .CodeMirror-line > span::selection, .cm-s-lesser-dark .CodeMirror-line > span > span::selection { background: rgba(69, 68, 59, .99); }
|
||||
.cm-s-lesser-dark .CodeMirror-line::-moz-selection, .cm-s-lesser-dark .CodeMirror-line > span::-moz-selection, .cm-s-lesser-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(69, 68, 59, .99); }
|
||||
.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/
|
||||
|
||||
.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/
|
||||
|
||||
.cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; }
|
||||
.cm-s-lesser-dark .CodeMirror-guttermarker { color: #599eff; }
|
||||
.cm-s-lesser-dark .CodeMirror-guttermarker-subtle { color: #777; }
|
||||
.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; }
|
||||
|
||||
.cm-s-lesser-dark span.cm-header { color: #a0a; }
|
||||
.cm-s-lesser-dark span.cm-quote { color: #090; }
|
||||
.cm-s-lesser-dark span.cm-keyword { color: #599eff; }
|
||||
.cm-s-lesser-dark span.cm-atom { color: #C2B470; }
|
||||
.cm-s-lesser-dark span.cm-number { color: #B35E4D; }
|
||||
.cm-s-lesser-dark span.cm-def { color: white; }
|
||||
.cm-s-lesser-dark span.cm-variable { color:#D9BF8C; }
|
||||
.cm-s-lesser-dark span.cm-variable-2 { color: #669199; }
|
||||
.cm-s-lesser-dark span.cm-variable-3 { color: white; }
|
||||
.cm-s-lesser-dark span.cm-property { color: #92A75C; }
|
||||
.cm-s-lesser-dark span.cm-operator { color: #92A75C; }
|
||||
.cm-s-lesser-dark span.cm-comment { color: #666; }
|
||||
.cm-s-lesser-dark span.cm-string { color: #BCD279; }
|
||||
.cm-s-lesser-dark span.cm-string-2 { color: #f50; }
|
||||
.cm-s-lesser-dark span.cm-meta { color: #738C73; }
|
||||
.cm-s-lesser-dark span.cm-qualifier { color: #555; }
|
||||
.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; }
|
||||
.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }
|
||||
.cm-s-lesser-dark span.cm-tag { color: #669199; }
|
||||
.cm-s-lesser-dark span.cm-attribute { color: #00c; }
|
||||
.cm-s-lesser-dark span.cm-hr { color: #999; }
|
||||
.cm-s-lesser-dark span.cm-link { color: #00c; }
|
||||
.cm-s-lesser-dark span.cm-error { color: #9d1e15; }
|
||||
|
||||
.cm-s-lesser-dark .CodeMirror-activeline-background { background: #3C3A3A; }
|
||||
.cm-s-lesser-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
95
app/lib/codemirror/theme/liquibyte.css
vendored
Normal file
95
app/lib/codemirror/theme/liquibyte.css
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
.cm-s-liquibyte.CodeMirror {
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
line-height: 1.2em;
|
||||
font-size: 1em;
|
||||
}
|
||||
.cm-s-liquibyte .CodeMirror-focused .cm-matchhighlight {
|
||||
text-decoration: underline;
|
||||
text-decoration-color: #0f0;
|
||||
text-decoration-style: wavy;
|
||||
}
|
||||
.cm-s-liquibyte .cm-trailingspace {
|
||||
text-decoration: line-through;
|
||||
text-decoration-color: #f00;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
.cm-s-liquibyte .cm-tab {
|
||||
text-decoration: line-through;
|
||||
text-decoration-color: #404040;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
.cm-s-liquibyte .CodeMirror-gutters { background-color: #262626; border-right: 1px solid #505050; padding-right: 0.8em; }
|
||||
.cm-s-liquibyte .CodeMirror-gutter-elt div { font-size: 1.2em; }
|
||||
.cm-s-liquibyte .CodeMirror-guttermarker { }
|
||||
.cm-s-liquibyte .CodeMirror-guttermarker-subtle { }
|
||||
.cm-s-liquibyte .CodeMirror-linenumber { color: #606060; padding-left: 0; }
|
||||
.cm-s-liquibyte .CodeMirror-cursor { border-left: 1px solid #eee; }
|
||||
|
||||
.cm-s-liquibyte span.cm-comment { color: #008000; }
|
||||
.cm-s-liquibyte span.cm-def { color: #ffaf40; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-keyword { color: #c080ff; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-builtin { color: #ffaf40; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-variable { color: #5967ff; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-string { color: #ff8000; }
|
||||
.cm-s-liquibyte span.cm-number { color: #0f0; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-atom { color: #bf3030; font-weight: bold; }
|
||||
|
||||
.cm-s-liquibyte span.cm-variable-2 { color: #007f7f; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-variable-3 { color: #c080ff; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-property { color: #999; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-operator { color: #fff; }
|
||||
|
||||
.cm-s-liquibyte span.cm-meta { color: #0f0; }
|
||||
.cm-s-liquibyte span.cm-qualifier { color: #fff700; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-bracket { color: #cc7; }
|
||||
.cm-s-liquibyte span.cm-tag { color: #ff0; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-attribute { color: #c080ff; font-weight: bold; }
|
||||
.cm-s-liquibyte span.cm-error { color: #f00; }
|
||||
|
||||
.cm-s-liquibyte div.CodeMirror-selected { background-color: rgba(255, 0, 0, 0.25); }
|
||||
|
||||
.cm-s-liquibyte span.cm-compilation { background-color: rgba(255, 255, 255, 0.12); }
|
||||
|
||||
.cm-s-liquibyte .CodeMirror-activeline-background { background-color: rgba(0, 255, 0, 0.15); }
|
||||
|
||||
/* Default styles for common addons */
|
||||
.cm-s-liquibyte .CodeMirror span.CodeMirror-matchingbracket { color: #0f0; font-weight: bold; }
|
||||
.cm-s-liquibyte .CodeMirror span.CodeMirror-nonmatchingbracket { color: #f00; font-weight: bold; }
|
||||
.CodeMirror-matchingtag { background-color: rgba(150, 255, 0, .3); }
|
||||
/* Scrollbars */
|
||||
/* Simple */
|
||||
.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div:hover, div.CodeMirror-simplescroll-vertical div:hover {
|
||||
background-color: rgba(80, 80, 80, .7);
|
||||
}
|
||||
.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div, div.CodeMirror-simplescroll-vertical div {
|
||||
background-color: rgba(80, 80, 80, .3);
|
||||
border: 1px solid #404040;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.cm-s-liquibyte div.CodeMirror-simplescroll-vertical div {
|
||||
border-top: 1px solid #404040;
|
||||
border-bottom: 1px solid #404040;
|
||||
}
|
||||
.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div {
|
||||
border-left: 1px solid #404040;
|
||||
border-right: 1px solid #404040;
|
||||
}
|
||||
.cm-s-liquibyte div.CodeMirror-simplescroll-vertical {
|
||||
background-color: #262626;
|
||||
}
|
||||
.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal {
|
||||
background-color: #262626;
|
||||
border-top: 1px solid #404040;
|
||||
}
|
||||
/* Overlay */
|
||||
.cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div, div.CodeMirror-overlayscroll-vertical div {
|
||||
background-color: #404040;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.cm-s-liquibyte div.CodeMirror-overlayscroll-vertical div {
|
||||
border: 1px solid #404040;
|
||||
}
|
||||
.cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div {
|
||||
border: 1px solid #404040;
|
||||
}
|
53
app/lib/codemirror/theme/material.css
vendored
Normal file
53
app/lib/codemirror/theme/material.css
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
|
||||
Name: material
|
||||
Author: Michael Kaminsky (http://github.com/mkaminsky11)
|
||||
|
||||
Original material color scheme by Mattia Astorino (https://github.com/equinusocio/material-theme)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-material.CodeMirror {
|
||||
background-color: #263238;
|
||||
color: rgba(233, 237, 237, 1);
|
||||
}
|
||||
.cm-s-material .CodeMirror-gutters {
|
||||
background: #263238;
|
||||
color: rgb(83,127,126);
|
||||
border: none;
|
||||
}
|
||||
.cm-s-material .CodeMirror-guttermarker, .cm-s-material .CodeMirror-guttermarker-subtle, .cm-s-material .CodeMirror-linenumber { color: rgb(83,127,126); }
|
||||
.cm-s-material .CodeMirror-cursor { border-left: 1px solid #f8f8f0; }
|
||||
.cm-s-material div.CodeMirror-selected { background: rgba(255, 255, 255, 0.15); }
|
||||
.cm-s-material.CodeMirror-focused div.CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-material .CodeMirror-line::selection, .cm-s-material .CodeMirror-line > span::selection, .cm-s-material .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-material .CodeMirror-line::-moz-selection, .cm-s-material .CodeMirror-line > span::-moz-selection, .cm-s-material .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); }
|
||||
|
||||
.cm-s-material .CodeMirror-activeline-background { background: rgba(0, 0, 0, 0); }
|
||||
.cm-s-material .cm-keyword { color: rgba(199, 146, 234, 1); }
|
||||
.cm-s-material .cm-operator { color: rgba(233, 237, 237, 1); }
|
||||
.cm-s-material .cm-variable-2 { color: #80CBC4; }
|
||||
.cm-s-material .cm-variable-3 { color: #82B1FF; }
|
||||
.cm-s-material .cm-builtin { color: #DECB6B; }
|
||||
.cm-s-material .cm-atom { color: #F77669; }
|
||||
.cm-s-material .cm-number { color: #F77669; }
|
||||
.cm-s-material .cm-def { color: rgba(233, 237, 237, 1); }
|
||||
.cm-s-material .cm-string { color: #C3E88D; }
|
||||
.cm-s-material .cm-string-2 { color: #80CBC4; }
|
||||
.cm-s-material .cm-comment { color: #546E7A; }
|
||||
.cm-s-material .cm-variable { color: #82B1FF; }
|
||||
.cm-s-material .cm-tag { color: #80CBC4; }
|
||||
.cm-s-material .cm-meta { color: #80CBC4; }
|
||||
.cm-s-material .cm-attribute { color: #FFCB6B; }
|
||||
.cm-s-material .cm-property { color: #80CBAE; }
|
||||
.cm-s-material .cm-qualifier { color: #DECB6B; }
|
||||
.cm-s-material .cm-variable-3 { color: #DECB6B; }
|
||||
.cm-s-material .cm-tag { color: rgba(255, 83, 112, 1); }
|
||||
.cm-s-material .cm-error {
|
||||
color: rgba(255, 255, 255, 1.0);
|
||||
background-color: #EC5F67;
|
||||
}
|
||||
.cm-s-material .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: white !important;
|
||||
}
|
37
app/lib/codemirror/theme/mbo.css
vendored
Normal file
37
app/lib/codemirror/theme/mbo.css
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/****************************************************************/
|
||||
/* Based on mbonaci's Brackets mbo theme */
|
||||
/* https://github.com/mbonaci/global/blob/master/Mbo.tmTheme */
|
||||
/* Create your own: http://tmtheme-editor.herokuapp.com */
|
||||
/****************************************************************/
|
||||
|
||||
.cm-s-mbo.CodeMirror { background: #2c2c2c; color: #ffffec; }
|
||||
.cm-s-mbo div.CodeMirror-selected { background: #716C62; }
|
||||
.cm-s-mbo .CodeMirror-line::selection, .cm-s-mbo .CodeMirror-line > span::selection, .cm-s-mbo .CodeMirror-line > span > span::selection { background: rgba(113, 108, 98, .99); }
|
||||
.cm-s-mbo .CodeMirror-line::-moz-selection, .cm-s-mbo .CodeMirror-line > span::-moz-selection, .cm-s-mbo .CodeMirror-line > span > span::-moz-selection { background: rgba(113, 108, 98, .99); }
|
||||
.cm-s-mbo .CodeMirror-gutters { background: #4e4e4e; border-right: 0px; }
|
||||
.cm-s-mbo .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; }
|
||||
.cm-s-mbo .CodeMirror-linenumber { color: #dadada; }
|
||||
.cm-s-mbo .CodeMirror-cursor { border-left: 1px solid #ffffec; }
|
||||
|
||||
.cm-s-mbo span.cm-comment { color: #95958a; }
|
||||
.cm-s-mbo span.cm-atom { color: #00a8c6; }
|
||||
.cm-s-mbo span.cm-number { color: #00a8c6; }
|
||||
|
||||
.cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute { color: #9ddfe9; }
|
||||
.cm-s-mbo span.cm-keyword { color: #ffb928; }
|
||||
.cm-s-mbo span.cm-string { color: #ffcf6c; }
|
||||
.cm-s-mbo span.cm-string.cm-property { color: #ffffec; }
|
||||
|
||||
.cm-s-mbo span.cm-variable { color: #ffffec; }
|
||||
.cm-s-mbo span.cm-variable-2 { color: #00a8c6; }
|
||||
.cm-s-mbo span.cm-def { color: #ffffec; }
|
||||
.cm-s-mbo span.cm-bracket { color: #fffffc; font-weight: bold; }
|
||||
.cm-s-mbo span.cm-tag { color: #9ddfe9; }
|
||||
.cm-s-mbo span.cm-link { color: #f54b07; }
|
||||
.cm-s-mbo span.cm-error { border-bottom: #636363; color: #ffffec; }
|
||||
.cm-s-mbo span.cm-qualifier { color: #ffffec; }
|
||||
|
||||
.cm-s-mbo .CodeMirror-activeline-background { background: #494b41; }
|
||||
.cm-s-mbo .CodeMirror-matchingbracket { color: #ffb928 !important; }
|
||||
.cm-s-mbo .CodeMirror-matchingtag { background: rgba(255, 255, 255, .37); }
|
46
app/lib/codemirror/theme/mdn-like.css
vendored
Normal file
46
app/lib/codemirror/theme/mdn-like.css
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
MDN-LIKE Theme - Mozilla
|
||||
Ported to CodeMirror by Peter Kroon <plakroon@gmail.com>
|
||||
Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues
|
||||
GitHub: @peterkroon
|
||||
|
||||
The mdn-like theme is inspired on the displayed code examples at: https://developer.mozilla.org/en-US/docs/Web/CSS/animation
|
||||
|
||||
*/
|
||||
.cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; }
|
||||
.cm-s-mdn-like div.CodeMirror-selected { background: #cfc; }
|
||||
.cm-s-mdn-like .CodeMirror-line::selection, .cm-s-mdn-like .CodeMirror-line > span::selection, .cm-s-mdn-like .CodeMirror-line > span > span::selection { background: #cfc; }
|
||||
.cm-s-mdn-like .CodeMirror-line::-moz-selection, .cm-s-mdn-like .CodeMirror-line > span::-moz-selection, .cm-s-mdn-like .CodeMirror-line > span > span::-moz-selection { background: #cfc; }
|
||||
|
||||
.cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; }
|
||||
.cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; padding-left: 8px; }
|
||||
.cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; }
|
||||
|
||||
.cm-s-mdn-like .cm-keyword { color: #6262FF; }
|
||||
.cm-s-mdn-like .cm-atom { color: #F90; }
|
||||
.cm-s-mdn-like .cm-number { color: #ca7841; }
|
||||
.cm-s-mdn-like .cm-def { color: #8DA6CE; }
|
||||
.cm-s-mdn-like span.cm-variable-2, .cm-s-mdn-like span.cm-tag { color: #690; }
|
||||
.cm-s-mdn-like span.cm-variable-3, .cm-s-mdn-like span.cm-def { color: #07a; }
|
||||
|
||||
.cm-s-mdn-like .cm-variable { color: #07a; }
|
||||
.cm-s-mdn-like .cm-property { color: #905; }
|
||||
.cm-s-mdn-like .cm-qualifier { color: #690; }
|
||||
|
||||
.cm-s-mdn-like .cm-operator { color: #cda869; }
|
||||
.cm-s-mdn-like .cm-comment { color:#777; font-weight:normal; }
|
||||
.cm-s-mdn-like .cm-string { color:#07a; font-style:italic; }
|
||||
.cm-s-mdn-like .cm-string-2 { color:#bd6b18; } /*?*/
|
||||
.cm-s-mdn-like .cm-meta { color: #000; } /*?*/
|
||||
.cm-s-mdn-like .cm-builtin { color: #9B7536; } /*?*/
|
||||
.cm-s-mdn-like .cm-tag { color: #997643; }
|
||||
.cm-s-mdn-like .cm-attribute { color: #d6bb6d; } /*?*/
|
||||
.cm-s-mdn-like .cm-header { color: #FF6400; }
|
||||
.cm-s-mdn-like .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-mdn-like .cm-link { color:#ad9361; font-style:italic; text-decoration:none; }
|
||||
.cm-s-mdn-like .cm-error { border-bottom: 1px solid red; }
|
||||
|
||||
div.cm-s-mdn-like .CodeMirror-activeline-background { background: #efefff; }
|
||||
div.cm-s-mdn-like span.CodeMirror-matchingbracket { outline:1px solid grey; color: inherit; }
|
||||
|
||||
.cm-s-mdn-like.CodeMirror { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6ATccrwlKuwC/jhznnPF4CgVzhhVf4xp2EixcBActO75iZ8/fM9zAs2OMzKdslgXWJ9XG8PQoOAMA5fGcsvORgv0doBXyHrCwfLJAOwo71QLNkb8n2Pl6EWiR7OCibtkPaz4Kc/0NNAze2gju3zOwekALDaCFPI5vjPFmgGY5AZqyGEvH1x7QfIb8YtxMnA/b+QQ0aQDAwc6JMFg8CbQZ4qoYEEHbRwNojuK3EHwd7VALSgq+MNDKzfT58T8qdpADrgW0GmgcAS1lhzztJmkAzcPNOQbsWEALBDSlMKUG0Eq4CLAQWvEVQ9WU57gZJwZtgPO3r9oBTQ9WO8TjqXINx8R0EYpiZEUWOF3FxkbJkgU9B2f41YBrIj5ZfsQa0M5kTgiAAqM3ShXLgu8XMqcrQBvJ0CL5pnTsfMB13oB8athpAq2XOQmcGmoACCLydx7nToa23ATaSIY2ichfOdPTGxlasXMLaL0MLZAOwAKIM+y8CmicobGdCcbbK9DzN+yYGVoNNI5iUKTMyYOjPse4A8SM1MmcXgU0toOq1yO/v8FOxlASyc7TgeYaAMBJHcY1CcCwGI/TK4AmDbDyKYBBtFUkRwto8gygiQEaByFgJ00BH2M8JWwQS1nafDXQCidWyOI8AcjDCSjCLk8ngObuAm3JAHAdubAmOaK06V8MNEsKPJOhobSprwQa6gD7DclRQdqcwL4zxqgBrQcabUiBLclRDKAlWp+etPkBaNMA0AKlrHwTdEByZAA4GM+SNluSY6wAzcMNewxmgig5Ks0nkrSpBvSaQHMdKTBAnLojOdYyGpQ254602ZILPdTD1hdlggdIm74jbTp8vDwF5ZYUeLWGJpWsh6XNyXgcYwVoJQTEhhTYkxzZjiU5npU2TaB979TQehlaAVq4kaGpiPwwwLkYUuBbQwocyQTv1tA0+1UFWoJF3iv1oq+qoSk8EQdJmwHkziIF7oOZk14EGitibAdjLYYK78H5vZOhtWpoI0ATGHs0Q8OMb4Ey+2bU2UYztCtA0wFAs7TplGLRVQCcqaFdGSPCeTI1QNIC52iWNzof6Uib7xjEp07mNNoUYmVosVItHrHzRlLgBn9LFyRHaQCtVUMbtTNhoXWiTOO9k/V8BdAc1Oq0ArSQs6/5SU0hckNy9NnXqQY0PGYo5dWJ7nINaN6o958FWin27aBaWRka1r5myvLOAm0j30eBJqCxHLReVclxhxOEN2JfDWjxBtAC7MIH1fVaGdoOp4qJYDgKtKPSFNID2gSnGldrCqkFZ+5UeQXQBIRrSwocbdZYQT/2LwRahBPBXoHrB8nxaGROST62DKUbQOMMzZIC9abkuELfQzQALWTnDNAm8KHWFOJgJ5+SHIvTPcmx1xQyZRhNL5Qci689aXMEaN/uNIWkEwDAvFpOZmgsBaaGnbs1NPa1Jm32gBZAIh1pCtG7TSH4aE0y1uVY4uqoFPisGlpP2rSA5qTecWn5agK6BzSpgAyD+wFaqhnYoSZ1Vwr8CmlTQbrcO3ZaX0NAEyMbYaAlyquFoLKK3SPby9CeVUPThrSJmkCAE0CrKUQadi4DrdSlWhmah0YL9z9vClH59YGbHx1J8VZTyAjQepJjmXwAKTDQI3omc3p1U4gDUf6RfcdYfrUp5ClAi2J3Ba6UOXGo+K+bQrjjssitG2SJzshaLwMtXgRagUNpYYoVkMSBLM+9GGiJZMvduG6DRZ4qc04DMPtQQxOjEtACmhO7K1AbNbQDEggZyJwscFpAGwENhoBeUwh3bWolhe8BTYVKxQEWrSUn/uhcM5KhvUu/+eQu0Lzhi+VrK0PrZZNDQKs9cpYUuFYgMVpD4/NxenJTiMCNqdUEUf1qZWjppLT5qSkkUZbCwkbZMSuVnu80hfSkzRbQeqCZSAh6huR4VtoM2gHAlLf72smuWgE+VV7XpE25Ab2WFDgyhnSuKbs4GuGzCjR+tIoUuMFg3kgcWKLTwRqanJQ2W00hAsenfaApRC42hbCvK1SlE0HtE9BGgneJO+ELamitD1YjjOYnNYVcraGhtKkW0EqVVeDx733I2NH581k1NNxNLG0i0IJ8/NjVaOZ0tYZ2Vtr0Xv7tPV3hkWp9EFkgS/J0vosngTaSoaG06WHi+xObQkaAdlbanP8B2+2l0f90LmUAAAAASUVORK5CYII=); }
|
45
app/lib/codemirror/theme/midnight.css
vendored
Normal file
45
app/lib/codemirror/theme/midnight.css
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */
|
||||
|
||||
/*<!--match-->*/
|
||||
.cm-s-midnight span.CodeMirror-matchhighlight { background: #494949; }
|
||||
.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; }
|
||||
|
||||
/*<!--activeline-->*/
|
||||
.cm-s-midnight .CodeMirror-activeline-background { background: #253540; }
|
||||
|
||||
.cm-s-midnight.CodeMirror {
|
||||
background: #0F192A;
|
||||
color: #D1EDFF;
|
||||
}
|
||||
|
||||
.cm-s-midnight.CodeMirror { border-top: 1px solid black; border-bottom: 1px solid black; }
|
||||
|
||||
.cm-s-midnight div.CodeMirror-selected { background: #314D67; }
|
||||
.cm-s-midnight .CodeMirror-line::selection, .cm-s-midnight .CodeMirror-line > span::selection, .cm-s-midnight .CodeMirror-line > span > span::selection { background: rgba(49, 77, 103, .99); }
|
||||
.cm-s-midnight .CodeMirror-line::-moz-selection, .cm-s-midnight .CodeMirror-line > span::-moz-selection, .cm-s-midnight .CodeMirror-line > span > span::-moz-selection { background: rgba(49, 77, 103, .99); }
|
||||
.cm-s-midnight .CodeMirror-gutters { background: #0F192A; border-right: 1px solid; }
|
||||
.cm-s-midnight .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
||||
.cm-s-midnight .CodeMirror-linenumber { color: #D0D0D0; }
|
||||
.cm-s-midnight .CodeMirror-cursor { border-left: 1px solid #F8F8F0; }
|
||||
|
||||
.cm-s-midnight span.cm-comment { color: #428BDD; }
|
||||
.cm-s-midnight span.cm-atom { color: #AE81FF; }
|
||||
.cm-s-midnight span.cm-number { color: #D1EDFF; }
|
||||
|
||||
.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute { color: #A6E22E; }
|
||||
.cm-s-midnight span.cm-keyword { color: #E83737; }
|
||||
.cm-s-midnight span.cm-string { color: #1DC116; }
|
||||
|
||||
.cm-s-midnight span.cm-variable { color: #FFAA3E; }
|
||||
.cm-s-midnight span.cm-variable-2 { color: #FFAA3E; }
|
||||
.cm-s-midnight span.cm-def { color: #4DD; }
|
||||
.cm-s-midnight span.cm-bracket { color: #D1EDFF; }
|
||||
.cm-s-midnight span.cm-tag { color: #449; }
|
||||
.cm-s-midnight span.cm-link { color: #AE81FF; }
|
||||
.cm-s-midnight span.cm-error { background: #F92672; color: #F8F8F0; }
|
||||
|
||||
.cm-s-midnight .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: white !important;
|
||||
}
|
36
app/lib/codemirror/theme/monokai.css
vendored
Normal file
36
app/lib/codemirror/theme/monokai.css
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/* Based on Sublime Text's Monokai theme */
|
||||
|
||||
.cm-s-monokai.CodeMirror { background: #272822; color: #f8f8f2; }
|
||||
.cm-s-monokai div.CodeMirror-selected { background: #49483E; }
|
||||
.cm-s-monokai .CodeMirror-line::selection, .cm-s-monokai .CodeMirror-line > span::selection, .cm-s-monokai .CodeMirror-line > span > span::selection { background: rgba(73, 72, 62, .99); }
|
||||
.cm-s-monokai .CodeMirror-line::-moz-selection, .cm-s-monokai .CodeMirror-line > span::-moz-selection, .cm-s-monokai .CodeMirror-line > span > span::-moz-selection { background: rgba(73, 72, 62, .99); }
|
||||
.cm-s-monokai .CodeMirror-gutters { background: #272822; border-right: 0px; }
|
||||
.cm-s-monokai .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
||||
.cm-s-monokai .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-monokai .CodeMirror-cursor { border-left: 1px solid #f8f8f0; }
|
||||
|
||||
.cm-s-monokai span.cm-comment { color: #75715e; }
|
||||
.cm-s-monokai span.cm-atom { color: #ae81ff; }
|
||||
.cm-s-monokai span.cm-number { color: #ae81ff; }
|
||||
|
||||
.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute { color: #a6e22e; }
|
||||
.cm-s-monokai span.cm-keyword { color: #f92672; }
|
||||
.cm-s-monokai span.cm-builtin { color: #66d9ef; }
|
||||
.cm-s-monokai span.cm-string { color: #e6db74; }
|
||||
|
||||
.cm-s-monokai span.cm-variable { color: #f8f8f2; }
|
||||
.cm-s-monokai span.cm-variable-2 { color: #9effff; }
|
||||
.cm-s-monokai span.cm-variable-3 { color: #66d9ef; }
|
||||
.cm-s-monokai span.cm-def { color: #fd971f; }
|
||||
.cm-s-monokai span.cm-bracket { color: #f8f8f2; }
|
||||
.cm-s-monokai span.cm-tag { color: #f92672; }
|
||||
.cm-s-monokai span.cm-header { color: #ae81ff; }
|
||||
.cm-s-monokai span.cm-link { color: #ae81ff; }
|
||||
.cm-s-monokai span.cm-error { background: #f92672; color: #f8f8f0; }
|
||||
|
||||
.cm-s-monokai .CodeMirror-activeline-background { background: #373831; }
|
||||
.cm-s-monokai .CodeMirror-matchingbracket {
|
||||
text-decoration: underline;
|
||||
color: white !important;
|
||||
}
|
12
app/lib/codemirror/theme/neat.css
vendored
Normal file
12
app/lib/codemirror/theme/neat.css
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
.cm-s-neat span.cm-comment { color: #a86; }
|
||||
.cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; }
|
||||
.cm-s-neat span.cm-string { color: #a22; }
|
||||
.cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; }
|
||||
.cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; }
|
||||
.cm-s-neat span.cm-variable { color: black; }
|
||||
.cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; }
|
||||
.cm-s-neat span.cm-meta { color: #555; }
|
||||
.cm-s-neat span.cm-link { color: #3a3; }
|
||||
|
||||
.cm-s-neat .CodeMirror-activeline-background { background: #e8f2ff; }
|
||||
.cm-s-neat .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; }
|
43
app/lib/codemirror/theme/neo.css
vendored
Normal file
43
app/lib/codemirror/theme/neo.css
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/* neo theme for codemirror */
|
||||
|
||||
/* Color scheme */
|
||||
|
||||
.cm-s-neo.CodeMirror {
|
||||
background-color:#ffffff;
|
||||
color:#2e383c;
|
||||
line-height:1.4375;
|
||||
}
|
||||
.cm-s-neo .cm-comment { color:#75787b; }
|
||||
.cm-s-neo .cm-keyword, .cm-s-neo .cm-property { color:#1d75b3; }
|
||||
.cm-s-neo .cm-atom,.cm-s-neo .cm-number { color:#75438a; }
|
||||
.cm-s-neo .cm-node,.cm-s-neo .cm-tag { color:#9c3328; }
|
||||
.cm-s-neo .cm-string { color:#b35e14; }
|
||||
.cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier { color:#047d65; }
|
||||
|
||||
|
||||
/* Editor styling */
|
||||
|
||||
.cm-s-neo pre {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
.cm-s-neo .CodeMirror-gutters {
|
||||
border:none;
|
||||
border-right:10px solid transparent;
|
||||
background-color:transparent;
|
||||
}
|
||||
|
||||
.cm-s-neo .CodeMirror-linenumber {
|
||||
padding:0;
|
||||
color:#e0e2e5;
|
||||
}
|
||||
|
||||
.cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; }
|
||||
.cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; }
|
||||
|
||||
.cm-s-neo .CodeMirror-cursor {
|
||||
width: auto;
|
||||
border: 0;
|
||||
background: rgba(155,157,162,0.37);
|
||||
z-index: 1;
|
||||
}
|
27
app/lib/codemirror/theme/night.css
vendored
Normal file
27
app/lib/codemirror/theme/night.css
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
/* Loosely based on the Midnight Textmate theme */
|
||||
|
||||
.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; }
|
||||
.cm-s-night div.CodeMirror-selected { background: #447; }
|
||||
.cm-s-night .CodeMirror-line::selection, .cm-s-night .CodeMirror-line > span::selection, .cm-s-night .CodeMirror-line > span > span::selection { background: rgba(68, 68, 119, .99); }
|
||||
.cm-s-night .CodeMirror-line::-moz-selection, .cm-s-night .CodeMirror-line > span::-moz-selection, .cm-s-night .CodeMirror-line > span > span::-moz-selection { background: rgba(68, 68, 119, .99); }
|
||||
.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
||||
.cm-s-night .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; }
|
||||
.cm-s-night .CodeMirror-linenumber { color: #f8f8f8; }
|
||||
.cm-s-night .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
|
||||
.cm-s-night span.cm-comment { color: #8900d1; }
|
||||
.cm-s-night span.cm-atom { color: #845dc4; }
|
||||
.cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; }
|
||||
.cm-s-night span.cm-keyword { color: #599eff; }
|
||||
.cm-s-night span.cm-string { color: #37f14a; }
|
||||
.cm-s-night span.cm-meta { color: #7678e2; }
|
||||
.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; }
|
||||
.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; }
|
||||
.cm-s-night span.cm-bracket { color: #8da6ce; }
|
||||
.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; }
|
||||
.cm-s-night span.cm-link { color: #845dc4; }
|
||||
.cm-s-night span.cm-error { color: #9d1e15; }
|
||||
|
||||
.cm-s-night .CodeMirror-activeline-background { background: #1C005A; }
|
||||
.cm-s-night .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
85
app/lib/codemirror/theme/panda-syntax.css
vendored
Normal file
85
app/lib/codemirror/theme/panda-syntax.css
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
Name: Panda Syntax
|
||||
Author: Siamak Mokhtari (http://github.com/siamak/)
|
||||
CodeMirror template by Siamak Mokhtari (https://github.com/siamak/atom-panda-syntax)
|
||||
*/
|
||||
.cm-s-panda-syntax {
|
||||
background: #292A2B;
|
||||
color: #E6E6E6;
|
||||
line-height: 1.5;
|
||||
font-family: 'Operator Mono', 'Source Sans Pro', Menlo, Monaco, Consolas, Courier New, monospace;
|
||||
}
|
||||
.cm-s-panda-syntax .CodeMirror-cursor { border-color: #ff2c6d; }
|
||||
.cm-s-panda-syntax .CodeMirror-activeline-background {
|
||||
background: rgba(99, 123, 156, 0.1);
|
||||
}
|
||||
.cm-s-panda-syntax .CodeMirror-selected {
|
||||
background: #FFF;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-comment {
|
||||
font-style: italic;
|
||||
color: #676B79;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-operator {
|
||||
color: #f3f3f3;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-string {
|
||||
color: #19F9D8;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-string-2 {
|
||||
color: #FFB86C;
|
||||
}
|
||||
|
||||
.cm-s-panda-syntax .cm-tag {
|
||||
color: #ff2c6d;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-meta {
|
||||
color: #b084eb;
|
||||
}
|
||||
|
||||
.cm-s-panda-syntax .cm-number {
|
||||
color: #FFB86C;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-atom {
|
||||
color: #ff2c6d;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-keyword {
|
||||
color: #FF75B5;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-variable {
|
||||
color: #ffb86c;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-variable-2 {
|
||||
color: #ff9ac1;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-variable-3 {
|
||||
color: #ff9ac1;
|
||||
}
|
||||
|
||||
.cm-s-panda-syntax .cm-def {
|
||||
color: #e6e6e6;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-property {
|
||||
color: #f3f3f3;
|
||||
}
|
||||
.cm-s-panda-syntax .cm-unit {
|
||||
color: #ffb86c;
|
||||
}
|
||||
|
||||
.cm-s-panda-syntax .cm-attribute {
|
||||
color: #ffb86c;
|
||||
}
|
||||
|
||||
.cm-s-panda-syntax .CodeMirror-matchingbracket {
|
||||
border-bottom: 1px dotted #19F9D8;
|
||||
padding-bottom: 2px;
|
||||
color: #e6e6e6;
|
||||
}
|
||||
.cm-s-panda-syntax .CodeMirror-gutters {
|
||||
background: #292a2b;
|
||||
border-right-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.cm-s-panda-syntax .CodeMirror-linenumber {
|
||||
color: #e6e6e6;
|
||||
opacity: 0.6;
|
||||
}
|
38
app/lib/codemirror/theme/paraiso-dark.css
vendored
Normal file
38
app/lib/codemirror/theme/paraiso-dark.css
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
|
||||
Name: Paraíso (Dark)
|
||||
Author: Jan T. Sott
|
||||
|
||||
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
|
||||
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-paraiso-dark.CodeMirror { background: #2f1e2e; color: #b9b6b0; }
|
||||
.cm-s-paraiso-dark div.CodeMirror-selected { background: #41323f; }
|
||||
.cm-s-paraiso-dark .CodeMirror-line::selection, .cm-s-paraiso-dark .CodeMirror-line > span::selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::selection { background: rgba(65, 50, 63, .99); }
|
||||
.cm-s-paraiso-dark .CodeMirror-line::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(65, 50, 63, .99); }
|
||||
.cm-s-paraiso-dark .CodeMirror-gutters { background: #2f1e2e; border-right: 0px; }
|
||||
.cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; }
|
||||
.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; }
|
||||
.cm-s-paraiso-dark .CodeMirror-linenumber { color: #776e71; }
|
||||
.cm-s-paraiso-dark .CodeMirror-cursor { border-left: 1px solid #8d8687; }
|
||||
|
||||
.cm-s-paraiso-dark span.cm-comment { color: #e96ba8; }
|
||||
.cm-s-paraiso-dark span.cm-atom { color: #815ba4; }
|
||||
.cm-s-paraiso-dark span.cm-number { color: #815ba4; }
|
||||
|
||||
.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute { color: #48b685; }
|
||||
.cm-s-paraiso-dark span.cm-keyword { color: #ef6155; }
|
||||
.cm-s-paraiso-dark span.cm-string { color: #fec418; }
|
||||
|
||||
.cm-s-paraiso-dark span.cm-variable { color: #48b685; }
|
||||
.cm-s-paraiso-dark span.cm-variable-2 { color: #06b6ef; }
|
||||
.cm-s-paraiso-dark span.cm-def { color: #f99b15; }
|
||||
.cm-s-paraiso-dark span.cm-bracket { color: #b9b6b0; }
|
||||
.cm-s-paraiso-dark span.cm-tag { color: #ef6155; }
|
||||
.cm-s-paraiso-dark span.cm-link { color: #815ba4; }
|
||||
.cm-s-paraiso-dark span.cm-error { background: #ef6155; color: #8d8687; }
|
||||
|
||||
.cm-s-paraiso-dark .CodeMirror-activeline-background { background: #4D344A; }
|
||||
.cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
38
app/lib/codemirror/theme/paraiso-light.css
vendored
Normal file
38
app/lib/codemirror/theme/paraiso-light.css
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
|
||||
Name: Paraíso (Light)
|
||||
Author: Jan T. Sott
|
||||
|
||||
Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror)
|
||||
Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-paraiso-light.CodeMirror { background: #e7e9db; color: #41323f; }
|
||||
.cm-s-paraiso-light div.CodeMirror-selected { background: #b9b6b0; }
|
||||
.cm-s-paraiso-light .CodeMirror-line::selection, .cm-s-paraiso-light .CodeMirror-line > span::selection, .cm-s-paraiso-light .CodeMirror-line > span > span::selection { background: #b9b6b0; }
|
||||
.cm-s-paraiso-light .CodeMirror-line::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span > span::-moz-selection { background: #b9b6b0; }
|
||||
.cm-s-paraiso-light .CodeMirror-gutters { background: #e7e9db; border-right: 0px; }
|
||||
.cm-s-paraiso-light .CodeMirror-guttermarker { color: black; }
|
||||
.cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; }
|
||||
.cm-s-paraiso-light .CodeMirror-linenumber { color: #8d8687; }
|
||||
.cm-s-paraiso-light .CodeMirror-cursor { border-left: 1px solid #776e71; }
|
||||
|
||||
.cm-s-paraiso-light span.cm-comment { color: #e96ba8; }
|
||||
.cm-s-paraiso-light span.cm-atom { color: #815ba4; }
|
||||
.cm-s-paraiso-light span.cm-number { color: #815ba4; }
|
||||
|
||||
.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute { color: #48b685; }
|
||||
.cm-s-paraiso-light span.cm-keyword { color: #ef6155; }
|
||||
.cm-s-paraiso-light span.cm-string { color: #fec418; }
|
||||
|
||||
.cm-s-paraiso-light span.cm-variable { color: #48b685; }
|
||||
.cm-s-paraiso-light span.cm-variable-2 { color: #06b6ef; }
|
||||
.cm-s-paraiso-light span.cm-def { color: #f99b15; }
|
||||
.cm-s-paraiso-light span.cm-bracket { color: #41323f; }
|
||||
.cm-s-paraiso-light span.cm-tag { color: #ef6155; }
|
||||
.cm-s-paraiso-light span.cm-link { color: #815ba4; }
|
||||
.cm-s-paraiso-light span.cm-error { background: #ef6155; color: #776e71; }
|
||||
|
||||
.cm-s-paraiso-light .CodeMirror-activeline-background { background: #CFD1C4; }
|
||||
.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
52
app/lib/codemirror/theme/pastel-on-dark.css
vendored
Normal file
52
app/lib/codemirror/theme/pastel-on-dark.css
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Pastel On Dark theme ported from ACE editor
|
||||
* @license MIT
|
||||
* @copyright AtomicPages LLC 2014
|
||||
* @author Dennis Thompson, AtomicPages LLC
|
||||
* @version 1.1
|
||||
* @source https://github.com/atomicpages/codemirror-pastel-on-dark-theme
|
||||
*/
|
||||
|
||||
.cm-s-pastel-on-dark.CodeMirror {
|
||||
background: #2c2827;
|
||||
color: #8F938F;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.cm-s-pastel-on-dark div.CodeMirror-selected { background: rgba(221,240,255,0.2); }
|
||||
.cm-s-pastel-on-dark .CodeMirror-line::selection, .cm-s-pastel-on-dark .CodeMirror-line > span::selection, .cm-s-pastel-on-dark .CodeMirror-line > span > span::selection { background: rgba(221,240,255,0.2); }
|
||||
.cm-s-pastel-on-dark .CodeMirror-line::-moz-selection, .cm-s-pastel-on-dark .CodeMirror-line > span::-moz-selection, .cm-s-pastel-on-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(221,240,255,0.2); }
|
||||
|
||||
.cm-s-pastel-on-dark .CodeMirror-gutters {
|
||||
background: #34302f;
|
||||
border-right: 0px;
|
||||
padding: 0 3px;
|
||||
}
|
||||
.cm-s-pastel-on-dark .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-pastel-on-dark .CodeMirror-guttermarker-subtle { color: #8F938F; }
|
||||
.cm-s-pastel-on-dark .CodeMirror-linenumber { color: #8F938F; }
|
||||
.cm-s-pastel-on-dark .CodeMirror-cursor { border-left: 1px solid #A7A7A7; }
|
||||
.cm-s-pastel-on-dark span.cm-comment { color: #A6C6FF; }
|
||||
.cm-s-pastel-on-dark span.cm-atom { color: #DE8E30; }
|
||||
.cm-s-pastel-on-dark span.cm-number { color: #CCCCCC; }
|
||||
.cm-s-pastel-on-dark span.cm-property { color: #8F938F; }
|
||||
.cm-s-pastel-on-dark span.cm-attribute { color: #a6e22e; }
|
||||
.cm-s-pastel-on-dark span.cm-keyword { color: #AEB2F8; }
|
||||
.cm-s-pastel-on-dark span.cm-string { color: #66A968; }
|
||||
.cm-s-pastel-on-dark span.cm-variable { color: #AEB2F8; }
|
||||
.cm-s-pastel-on-dark span.cm-variable-2 { color: #BEBF55; }
|
||||
.cm-s-pastel-on-dark span.cm-variable-3 { color: #DE8E30; }
|
||||
.cm-s-pastel-on-dark span.cm-def { color: #757aD8; }
|
||||
.cm-s-pastel-on-dark span.cm-bracket { color: #f8f8f2; }
|
||||
.cm-s-pastel-on-dark span.cm-tag { color: #C1C144; }
|
||||
.cm-s-pastel-on-dark span.cm-link { color: #ae81ff; }
|
||||
.cm-s-pastel-on-dark span.cm-qualifier,.cm-s-pastel-on-dark span.cm-builtin { color: #C1C144; }
|
||||
.cm-s-pastel-on-dark span.cm-error {
|
||||
background: #757aD8;
|
||||
color: #f8f8f0;
|
||||
}
|
||||
.cm-s-pastel-on-dark .CodeMirror-activeline-background { background: rgba(255, 255, 255, 0.031); }
|
||||
.cm-s-pastel-on-dark .CodeMirror-matchingbracket {
|
||||
border: 1px solid rgba(255,255,255,0.25);
|
||||
color: #8F938F !important;
|
||||
margin: -1px -1px 0 -1px;
|
||||
}
|
34
app/lib/codemirror/theme/railscasts.css
vendored
Normal file
34
app/lib/codemirror/theme/railscasts.css
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
|
||||
Name: Railscasts
|
||||
Author: Ryan Bates (http://railscasts.com)
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-railscasts.CodeMirror {background: #2b2b2b; color: #f4f1ed;}
|
||||
.cm-s-railscasts div.CodeMirror-selected {background: #272935 !important;}
|
||||
.cm-s-railscasts .CodeMirror-gutters {background: #2b2b2b; border-right: 0px;}
|
||||
.cm-s-railscasts .CodeMirror-linenumber {color: #5a647e;}
|
||||
.cm-s-railscasts .CodeMirror-cursor {border-left: 1px solid #d4cfc9 !important;}
|
||||
|
||||
.cm-s-railscasts span.cm-comment {color: #bc9458;}
|
||||
.cm-s-railscasts span.cm-atom {color: #b6b3eb;}
|
||||
.cm-s-railscasts span.cm-number {color: #b6b3eb;}
|
||||
|
||||
.cm-s-railscasts span.cm-property, .cm-s-railscasts span.cm-attribute {color: #a5c261;}
|
||||
.cm-s-railscasts span.cm-keyword {color: #da4939;}
|
||||
.cm-s-railscasts span.cm-string {color: #ffc66d;}
|
||||
|
||||
.cm-s-railscasts span.cm-variable {color: #a5c261;}
|
||||
.cm-s-railscasts span.cm-variable-2 {color: #6d9cbe;}
|
||||
.cm-s-railscasts span.cm-def {color: #cc7833;}
|
||||
.cm-s-railscasts span.cm-error {background: #da4939; color: #d4cfc9;}
|
||||
.cm-s-railscasts span.cm-bracket {color: #f4f1ed;}
|
||||
.cm-s-railscasts span.cm-tag {color: #da4939;}
|
||||
.cm-s-railscasts span.cm-link {color: #b6b3eb;}
|
||||
|
||||
.cm-s-railscasts .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;}
|
||||
.cm-s-railscasts .CodeMirror-activeline-background { background: #303040; }
|
25
app/lib/codemirror/theme/rubyblue.css
vendored
Normal file
25
app/lib/codemirror/theme/rubyblue.css
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
.cm-s-rubyblue.CodeMirror { background: #112435; color: white; }
|
||||
.cm-s-rubyblue div.CodeMirror-selected { background: #38566F; }
|
||||
.cm-s-rubyblue .CodeMirror-line::selection, .cm-s-rubyblue .CodeMirror-line > span::selection, .cm-s-rubyblue .CodeMirror-line > span > span::selection { background: rgba(56, 86, 111, 0.99); }
|
||||
.cm-s-rubyblue .CodeMirror-line::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span > span::-moz-selection { background: rgba(56, 86, 111, 0.99); }
|
||||
.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; }
|
||||
.cm-s-rubyblue .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; }
|
||||
.cm-s-rubyblue .CodeMirror-linenumber { color: white; }
|
||||
.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
|
||||
.cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; }
|
||||
.cm-s-rubyblue span.cm-atom { color: #F4C20B; }
|
||||
.cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; }
|
||||
.cm-s-rubyblue span.cm-keyword { color: #F0F; }
|
||||
.cm-s-rubyblue span.cm-string { color: #F08047; }
|
||||
.cm-s-rubyblue span.cm-meta { color: #F0F; }
|
||||
.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; }
|
||||
.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; }
|
||||
.cm-s-rubyblue span.cm-bracket { color: #F0F; }
|
||||
.cm-s-rubyblue span.cm-link { color: #F4C20B; }
|
||||
.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; }
|
||||
.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; }
|
||||
.cm-s-rubyblue span.cm-error { color: #AF2018; }
|
||||
|
||||
.cm-s-rubyblue .CodeMirror-activeline-background { background: #173047; }
|
44
app/lib/codemirror/theme/seti.css
vendored
Normal file
44
app/lib/codemirror/theme/seti.css
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
|
||||
Name: seti
|
||||
Author: Michael Kaminsky (http://github.com/mkaminsky11)
|
||||
|
||||
Original seti color scheme by Jesse Weed (https://github.com/jesseweed/seti-syntax)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
.cm-s-seti.CodeMirror {
|
||||
background-color: #151718 !important;
|
||||
color: #CFD2D1 !important;
|
||||
border: none;
|
||||
}
|
||||
.cm-s-seti .CodeMirror-gutters {
|
||||
color: #404b53;
|
||||
background-color: #0E1112;
|
||||
border: none;
|
||||
}
|
||||
.cm-s-seti .CodeMirror-cursor { border-left: solid thin #f8f8f0; }
|
||||
.cm-s-seti .CodeMirror-linenumber { color: #6D8A88; }
|
||||
.cm-s-seti.CodeMirror-focused div.CodeMirror-selected { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-seti .CodeMirror-line::selection, .cm-s-seti .CodeMirror-line > span::selection, .cm-s-seti .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-seti .CodeMirror-line::-moz-selection, .cm-s-seti .CodeMirror-line > span::-moz-selection, .cm-s-seti .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); }
|
||||
.cm-s-seti span.cm-comment { color: #41535b; }
|
||||
.cm-s-seti span.cm-string, .cm-s-seti span.cm-string-2 { color: #55b5db; }
|
||||
.cm-s-seti span.cm-number { color: #cd3f45; }
|
||||
.cm-s-seti span.cm-variable { color: #55b5db; }
|
||||
.cm-s-seti span.cm-variable-2 { color: #a074c4; }
|
||||
.cm-s-seti span.cm-def { color: #55b5db; }
|
||||
.cm-s-seti span.cm-keyword { color: #ff79c6; }
|
||||
.cm-s-seti span.cm-operator { color: #9fca56; }
|
||||
.cm-s-seti span.cm-keyword { color: #e6cd69; }
|
||||
.cm-s-seti span.cm-atom { color: #cd3f45; }
|
||||
.cm-s-seti span.cm-meta { color: #55b5db; }
|
||||
.cm-s-seti span.cm-tag { color: #55b5db; }
|
||||
.cm-s-seti span.cm-attribute { color: #9fca56; }
|
||||
.cm-s-seti span.cm-qualifier { color: #9fca56; }
|
||||
.cm-s-seti span.cm-property { color: #a074c4; }
|
||||
.cm-s-seti span.cm-variable-3 { color: #9fca56; }
|
||||
.cm-s-seti span.cm-builtin { color: #9fca56; }
|
||||
.cm-s-seti .CodeMirror-activeline-background { background: #101213; }
|
||||
.cm-s-seti .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
169
app/lib/codemirror/theme/solarized dark.css
vendored
Normal file
169
app/lib/codemirror/theme/solarized dark.css
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
Solarized theme for code-mirror
|
||||
http://ethanschoonover.com/solarized
|
||||
*/
|
||||
|
||||
/*
|
||||
Solarized color palette
|
||||
http://ethanschoonover.com/solarized/img/solarized-palette.png
|
||||
*/
|
||||
|
||||
.solarized.base03 { color: #002b36; }
|
||||
.solarized.base02 { color: #073642; }
|
||||
.solarized.base01 { color: #586e75; }
|
||||
.solarized.base00 { color: #657b83; }
|
||||
.solarized.base0 { color: #839496; }
|
||||
.solarized.base1 { color: #93a1a1; }
|
||||
.solarized.base2 { color: #eee8d5; }
|
||||
.solarized.base3 { color: #fdf6e3; }
|
||||
.solarized.solar-yellow { color: #b58900; }
|
||||
.solarized.solar-orange { color: #cb4b16; }
|
||||
.solarized.solar-red { color: #dc322f; }
|
||||
.solarized.solar-magenta { color: #d33682; }
|
||||
.solarized.solar-violet { color: #6c71c4; }
|
||||
.solarized.solar-blue { color: #268bd2; }
|
||||
.solarized.solar-cyan { color: #2aa198; }
|
||||
.solarized.solar-green { color: #859900; }
|
||||
|
||||
/* Color scheme for code-mirror */
|
||||
|
||||
.cm-s-solarized {
|
||||
line-height: 1.45em;
|
||||
color-profile: sRGB;
|
||||
rendering-intent: auto;
|
||||
}
|
||||
.cm-s-solarized.cm-s-dark {
|
||||
color: #839496;
|
||||
background-color: #002b36;
|
||||
text-shadow: #002b36 0 1px;
|
||||
}
|
||||
.cm-s-solarized.cm-s-light {
|
||||
background-color: #fdf6e3;
|
||||
color: #657b83;
|
||||
text-shadow: #eee8d5 0 1px;
|
||||
}
|
||||
|
||||
.cm-s-solarized .CodeMirror-widget {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.cm-s-solarized .cm-header { color: #586e75; }
|
||||
.cm-s-solarized .cm-quote { color: #93a1a1; }
|
||||
|
||||
.cm-s-solarized .cm-keyword { color: #cb4b16; }
|
||||
.cm-s-solarized .cm-atom { color: #d33682; }
|
||||
.cm-s-solarized .cm-number { color: #d33682; }
|
||||
.cm-s-solarized .cm-def { color: #2aa198; }
|
||||
|
||||
.cm-s-solarized .cm-variable { color: #839496; }
|
||||
.cm-s-solarized .cm-variable-2 { color: #b58900; }
|
||||
.cm-s-solarized .cm-variable-3 { color: #6c71c4; }
|
||||
|
||||
.cm-s-solarized .cm-property { color: #2aa198; }
|
||||
.cm-s-solarized .cm-operator { color: #6c71c4; }
|
||||
|
||||
.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; }
|
||||
|
||||
.cm-s-solarized .cm-string { color: #859900; }
|
||||
.cm-s-solarized .cm-string-2 { color: #b58900; }
|
||||
|
||||
.cm-s-solarized .cm-meta { color: #859900; }
|
||||
.cm-s-solarized .cm-qualifier { color: #b58900; }
|
||||
.cm-s-solarized .cm-builtin { color: #d33682; }
|
||||
.cm-s-solarized .cm-bracket { color: #cb4b16; }
|
||||
.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; }
|
||||
.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; }
|
||||
.cm-s-solarized .cm-tag { color: #93a1a1; }
|
||||
.cm-s-solarized .cm-attribute { color: #2aa198; }
|
||||
.cm-s-solarized .cm-hr {
|
||||
color: transparent;
|
||||
border-top: 1px solid #586e75;
|
||||
display: block;
|
||||
}
|
||||
.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; }
|
||||
.cm-s-solarized .cm-special { color: #6c71c4; }
|
||||
.cm-s-solarized .cm-em {
|
||||
color: #999;
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
.cm-s-solarized .cm-strong { color: #eee; }
|
||||
.cm-s-solarized .cm-error,
|
||||
.cm-s-solarized .cm-invalidchar {
|
||||
color: #586e75;
|
||||
border-bottom: 1px dotted #dc322f;
|
||||
}
|
||||
|
||||
.cm-s-solarized.cm-s-dark div.CodeMirror-selected { background: #073642; }
|
||||
.cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); }
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-line::-moz-selection, .cm-s-dark .CodeMirror-line > span::-moz-selection, .cm-s-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(7, 54, 66, 0.99); }
|
||||
|
||||
.cm-s-solarized.cm-s-light div.CodeMirror-selected { background: #eee8d5; }
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-line::selection, .cm-s-light .CodeMirror-line > span::selection, .cm-s-light .CodeMirror-line > span > span::selection { background: #eee8d5; }
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-line::-moz-selection, .cm-s-ligh .CodeMirror-line > span::-moz-selection, .cm-s-ligh .CodeMirror-line > span > span::-moz-selection { background: #eee8d5; }
|
||||
|
||||
/* Editor styling */
|
||||
|
||||
|
||||
|
||||
/* Little shadow on the view-port of the buffer view */
|
||||
.cm-s-solarized.CodeMirror {
|
||||
-moz-box-shadow: inset 7px 0 12px -6px #000;
|
||||
-webkit-box-shadow: inset 7px 0 12px -6px #000;
|
||||
box-shadow: inset 7px 0 12px -6px #000;
|
||||
}
|
||||
|
||||
/* Remove gutter border */
|
||||
.cm-s-solarized .CodeMirror-gutters {
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
/* Gutter colors and line number styling based of color scheme (dark / light) */
|
||||
|
||||
/* Dark */
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-gutters {
|
||||
background-color: #073642;
|
||||
}
|
||||
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-linenumber {
|
||||
color: #586e75;
|
||||
text-shadow: #021014 0 -1px;
|
||||
}
|
||||
|
||||
/* Light */
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-gutters {
|
||||
background-color: #eee8d5;
|
||||
}
|
||||
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-linenumber {
|
||||
color: #839496;
|
||||
}
|
||||
|
||||
/* Common */
|
||||
.cm-s-solarized .CodeMirror-linenumber {
|
||||
padding: 0 5px;
|
||||
}
|
||||
.cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; }
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; }
|
||||
|
||||
.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {
|
||||
color: #586e75;
|
||||
}
|
||||
|
||||
/* Cursor */
|
||||
.cm-s-solarized .CodeMirror-cursor { border-left: 1px solid #819090; }
|
||||
|
||||
/* Fat cursor */
|
||||
.cm-s-solarized.cm-s-light.cm-fat-cursor .CodeMirror-cursor { background: #77ee77; }
|
||||
.cm-s-solarized.cm-s-light .cm-animate-fat-cursor { background-color: #77ee77; }
|
||||
.cm-s-solarized.cm-s-dark.cm-fat-cursor .CodeMirror-cursor { background: #586e75; }
|
||||
.cm-s-solarized.cm-s-dark .cm-animate-fat-cursor { background-color: #586e75; }
|
||||
|
||||
/* Active line */
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-activeline-background {
|
||||
background: rgba(0, 0, 0, 0.06);
|
||||
}
|
169
app/lib/codemirror/theme/solarized light.css
vendored
Normal file
169
app/lib/codemirror/theme/solarized light.css
vendored
Normal file
@@ -0,0 +1,169 @@
|
||||
/*
|
||||
Solarized theme for code-mirror
|
||||
http://ethanschoonover.com/solarized
|
||||
*/
|
||||
|
||||
/*
|
||||
Solarized color palette
|
||||
http://ethanschoonover.com/solarized/img/solarized-palette.png
|
||||
*/
|
||||
|
||||
.solarized.base03 { color: #002b36; }
|
||||
.solarized.base02 { color: #073642; }
|
||||
.solarized.base01 { color: #586e75; }
|
||||
.solarized.base00 { color: #657b83; }
|
||||
.solarized.base0 { color: #839496; }
|
||||
.solarized.base1 { color: #93a1a1; }
|
||||
.solarized.base2 { color: #eee8d5; }
|
||||
.solarized.base3 { color: #fdf6e3; }
|
||||
.solarized.solar-yellow { color: #b58900; }
|
||||
.solarized.solar-orange { color: #cb4b16; }
|
||||
.solarized.solar-red { color: #dc322f; }
|
||||
.solarized.solar-magenta { color: #d33682; }
|
||||
.solarized.solar-violet { color: #6c71c4; }
|
||||
.solarized.solar-blue { color: #268bd2; }
|
||||
.solarized.solar-cyan { color: #2aa198; }
|
||||
.solarized.solar-green { color: #859900; }
|
||||
|
||||
/* Color scheme for code-mirror */
|
||||
|
||||
.cm-s-solarized {
|
||||
line-height: 1.45em;
|
||||
color-profile: sRGB;
|
||||
rendering-intent: auto;
|
||||
}
|
||||
.cm-s-solarized.cm-s-dark {
|
||||
color: #839496;
|
||||
background-color: #002b36;
|
||||
text-shadow: #002b36 0 1px;
|
||||
}
|
||||
.cm-s-solarized.cm-s-light {
|
||||
background-color: #fdf6e3;
|
||||
color: #657b83;
|
||||
text-shadow: #eee8d5 0 1px;
|
||||
}
|
||||
|
||||
.cm-s-solarized .CodeMirror-widget {
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.cm-s-solarized .cm-header { color: #586e75; }
|
||||
.cm-s-solarized .cm-quote { color: #93a1a1; }
|
||||
|
||||
.cm-s-solarized .cm-keyword { color: #cb4b16; }
|
||||
.cm-s-solarized .cm-atom { color: #d33682; }
|
||||
.cm-s-solarized .cm-number { color: #d33682; }
|
||||
.cm-s-solarized .cm-def { color: #2aa198; }
|
||||
|
||||
.cm-s-solarized .cm-variable { color: #839496; }
|
||||
.cm-s-solarized .cm-variable-2 { color: #b58900; }
|
||||
.cm-s-solarized .cm-variable-3 { color: #6c71c4; }
|
||||
|
||||
.cm-s-solarized .cm-property { color: #2aa198; }
|
||||
.cm-s-solarized .cm-operator { color: #6c71c4; }
|
||||
|
||||
.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; }
|
||||
|
||||
.cm-s-solarized .cm-string { color: #859900; }
|
||||
.cm-s-solarized .cm-string-2 { color: #b58900; }
|
||||
|
||||
.cm-s-solarized .cm-meta { color: #859900; }
|
||||
.cm-s-solarized .cm-qualifier { color: #b58900; }
|
||||
.cm-s-solarized .cm-builtin { color: #d33682; }
|
||||
.cm-s-solarized .cm-bracket { color: #cb4b16; }
|
||||
.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; }
|
||||
.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; }
|
||||
.cm-s-solarized .cm-tag { color: #93a1a1; }
|
||||
.cm-s-solarized .cm-attribute { color: #2aa198; }
|
||||
.cm-s-solarized .cm-hr {
|
||||
color: transparent;
|
||||
border-top: 1px solid #586e75;
|
||||
display: block;
|
||||
}
|
||||
.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; }
|
||||
.cm-s-solarized .cm-special { color: #6c71c4; }
|
||||
.cm-s-solarized .cm-em {
|
||||
color: #999;
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
.cm-s-solarized .cm-strong { color: #eee; }
|
||||
.cm-s-solarized .cm-error,
|
||||
.cm-s-solarized .cm-invalidchar {
|
||||
color: #586e75;
|
||||
border-bottom: 1px dotted #dc322f;
|
||||
}
|
||||
|
||||
.cm-s-solarized.cm-s-dark div.CodeMirror-selected { background: #073642; }
|
||||
.cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); }
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-line::-moz-selection, .cm-s-dark .CodeMirror-line > span::-moz-selection, .cm-s-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(7, 54, 66, 0.99); }
|
||||
|
||||
.cm-s-solarized.cm-s-light div.CodeMirror-selected { background: #eee8d5; }
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-line::selection, .cm-s-light .CodeMirror-line > span::selection, .cm-s-light .CodeMirror-line > span > span::selection { background: #eee8d5; }
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-line::-moz-selection, .cm-s-ligh .CodeMirror-line > span::-moz-selection, .cm-s-ligh .CodeMirror-line > span > span::-moz-selection { background: #eee8d5; }
|
||||
|
||||
/* Editor styling */
|
||||
|
||||
|
||||
|
||||
/* Little shadow on the view-port of the buffer view */
|
||||
.cm-s-solarized.CodeMirror {
|
||||
-moz-box-shadow: inset 7px 0 12px -6px #000;
|
||||
-webkit-box-shadow: inset 7px 0 12px -6px #000;
|
||||
box-shadow: inset 7px 0 12px -6px #000;
|
||||
}
|
||||
|
||||
/* Remove gutter border */
|
||||
.cm-s-solarized .CodeMirror-gutters {
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
/* Gutter colors and line number styling based of color scheme (dark / light) */
|
||||
|
||||
/* Dark */
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-gutters {
|
||||
background-color: #073642;
|
||||
}
|
||||
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-linenumber {
|
||||
color: #586e75;
|
||||
text-shadow: #021014 0 -1px;
|
||||
}
|
||||
|
||||
/* Light */
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-gutters {
|
||||
background-color: #eee8d5;
|
||||
}
|
||||
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-linenumber {
|
||||
color: #839496;
|
||||
}
|
||||
|
||||
/* Common */
|
||||
.cm-s-solarized .CodeMirror-linenumber {
|
||||
padding: 0 5px;
|
||||
}
|
||||
.cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; }
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; }
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; }
|
||||
|
||||
.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text {
|
||||
color: #586e75;
|
||||
}
|
||||
|
||||
/* Cursor */
|
||||
.cm-s-solarized .CodeMirror-cursor { border-left: 1px solid #819090; }
|
||||
|
||||
/* Fat cursor */
|
||||
.cm-s-solarized.cm-s-light.cm-fat-cursor .CodeMirror-cursor { background: #77ee77; }
|
||||
.cm-s-solarized.cm-s-light .cm-animate-fat-cursor { background-color: #77ee77; }
|
||||
.cm-s-solarized.cm-s-dark.cm-fat-cursor .CodeMirror-cursor { background: #586e75; }
|
||||
.cm-s-solarized.cm-s-dark .cm-animate-fat-cursor { background-color: #586e75; }
|
||||
|
||||
/* Active line */
|
||||
.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background {
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
.cm-s-solarized.cm-s-light .CodeMirror-activeline-background {
|
||||
background: rgba(0, 0, 0, 0.06);
|
||||
}
|
30
app/lib/codemirror/theme/the-matrix.css
vendored
Normal file
30
app/lib/codemirror/theme/the-matrix.css
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; }
|
||||
.cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D; }
|
||||
.cm-s-the-matrix .CodeMirror-line::selection, .cm-s-the-matrix .CodeMirror-line > span::selection, .cm-s-the-matrix .CodeMirror-line > span > span::selection { background: rgba(45, 45, 45, 0.99); }
|
||||
.cm-s-the-matrix .CodeMirror-line::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span > span::-moz-selection { background: rgba(45, 45, 45, 0.99); }
|
||||
.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; }
|
||||
.cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; }
|
||||
.cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; }
|
||||
.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; }
|
||||
.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00; }
|
||||
|
||||
.cm-s-the-matrix span.cm-keyword { color: #008803; font-weight: bold; }
|
||||
.cm-s-the-matrix span.cm-atom { color: #3FF; }
|
||||
.cm-s-the-matrix span.cm-number { color: #FFB94F; }
|
||||
.cm-s-the-matrix span.cm-def { color: #99C; }
|
||||
.cm-s-the-matrix span.cm-variable { color: #F6C; }
|
||||
.cm-s-the-matrix span.cm-variable-2 { color: #C6F; }
|
||||
.cm-s-the-matrix span.cm-variable-3 { color: #96F; }
|
||||
.cm-s-the-matrix span.cm-property { color: #62FFA0; }
|
||||
.cm-s-the-matrix span.cm-operator { color: #999; }
|
||||
.cm-s-the-matrix span.cm-comment { color: #CCCCCC; }
|
||||
.cm-s-the-matrix span.cm-string { color: #39C; }
|
||||
.cm-s-the-matrix span.cm-meta { color: #C9F; }
|
||||
.cm-s-the-matrix span.cm-qualifier { color: #FFF700; }
|
||||
.cm-s-the-matrix span.cm-builtin { color: #30a; }
|
||||
.cm-s-the-matrix span.cm-bracket { color: #cc7; }
|
||||
.cm-s-the-matrix span.cm-tag { color: #FFBD40; }
|
||||
.cm-s-the-matrix span.cm-attribute { color: #FFF700; }
|
||||
.cm-s-the-matrix span.cm-error { color: #FF0000; }
|
||||
|
||||
.cm-s-the-matrix .CodeMirror-activeline-background { background: #040; }
|
35
app/lib/codemirror/theme/tomorrow-night-bright.css
vendored
Normal file
35
app/lib/codemirror/theme/tomorrow-night-bright.css
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
|
||||
Name: Tomorrow Night - Bright
|
||||
Author: Chris Kempson
|
||||
|
||||
Port done by Gerard Braad <me@gbraad.nl>
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-tomorrow-night-bright.CodeMirror { background: #000000; color: #eaeaea; }
|
||||
.cm-s-tomorrow-night-bright div.CodeMirror-selected { background: #424242; }
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-gutters { background: #000000; border-right: 0px; }
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-guttermarker { color: #e78c45; }
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle { color: #777; }
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-linenumber { color: #424242; }
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-cursor { border-left: 1px solid #6A6A6A; }
|
||||
|
||||
.cm-s-tomorrow-night-bright span.cm-comment { color: #d27b53; }
|
||||
.cm-s-tomorrow-night-bright span.cm-atom { color: #a16a94; }
|
||||
.cm-s-tomorrow-night-bright span.cm-number { color: #a16a94; }
|
||||
|
||||
.cm-s-tomorrow-night-bright span.cm-property, .cm-s-tomorrow-night-bright span.cm-attribute { color: #99cc99; }
|
||||
.cm-s-tomorrow-night-bright span.cm-keyword { color: #d54e53; }
|
||||
.cm-s-tomorrow-night-bright span.cm-string { color: #e7c547; }
|
||||
|
||||
.cm-s-tomorrow-night-bright span.cm-variable { color: #b9ca4a; }
|
||||
.cm-s-tomorrow-night-bright span.cm-variable-2 { color: #7aa6da; }
|
||||
.cm-s-tomorrow-night-bright span.cm-def { color: #e78c45; }
|
||||
.cm-s-tomorrow-night-bright span.cm-bracket { color: #eaeaea; }
|
||||
.cm-s-tomorrow-night-bright span.cm-tag { color: #d54e53; }
|
||||
.cm-s-tomorrow-night-bright span.cm-link { color: #a16a94; }
|
||||
.cm-s-tomorrow-night-bright span.cm-error { background: #d54e53; color: #6A6A6A; }
|
||||
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-activeline-background { background: #2a2a2a; }
|
||||
.cm-s-tomorrow-night-bright .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
38
app/lib/codemirror/theme/tomorrow-night-eighties.css
vendored
Normal file
38
app/lib/codemirror/theme/tomorrow-night-eighties.css
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
|
||||
Name: Tomorrow Night - Eighties
|
||||
Author: Chris Kempson
|
||||
|
||||
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror)
|
||||
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
|
||||
|
||||
*/
|
||||
|
||||
.cm-s-tomorrow-night-eighties.CodeMirror { background: #000000; color: #CCCCCC; }
|
||||
.cm-s-tomorrow-night-eighties div.CodeMirror-selected { background: #2D2D2D; }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-line::selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span::selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span > span::selection { background: rgba(45, 45, 45, 0.99); }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-line::-moz-selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span::-moz-selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span > span::-moz-selection { background: rgba(45, 45, 45, 0.99); }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-gutters { background: #000000; border-right: 0px; }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker { color: #f2777a; }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle { color: #777; }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-linenumber { color: #515151; }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-cursor { border-left: 1px solid #6A6A6A; }
|
||||
|
||||
.cm-s-tomorrow-night-eighties span.cm-comment { color: #d27b53; }
|
||||
.cm-s-tomorrow-night-eighties span.cm-atom { color: #a16a94; }
|
||||
.cm-s-tomorrow-night-eighties span.cm-number { color: #a16a94; }
|
||||
|
||||
.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute { color: #99cc99; }
|
||||
.cm-s-tomorrow-night-eighties span.cm-keyword { color: #f2777a; }
|
||||
.cm-s-tomorrow-night-eighties span.cm-string { color: #ffcc66; }
|
||||
|
||||
.cm-s-tomorrow-night-eighties span.cm-variable { color: #99cc99; }
|
||||
.cm-s-tomorrow-night-eighties span.cm-variable-2 { color: #6699cc; }
|
||||
.cm-s-tomorrow-night-eighties span.cm-def { color: #f99157; }
|
||||
.cm-s-tomorrow-night-eighties span.cm-bracket { color: #CCCCCC; }
|
||||
.cm-s-tomorrow-night-eighties span.cm-tag { color: #f2777a; }
|
||||
.cm-s-tomorrow-night-eighties span.cm-link { color: #a16a94; }
|
||||
.cm-s-tomorrow-night-eighties span.cm-error { background: #f2777a; color: #6A6A6A; }
|
||||
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background { background: #343600; }
|
||||
.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; }
|
64
app/lib/codemirror/theme/ttcn.css
vendored
Normal file
64
app/lib/codemirror/theme/ttcn.css
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
.cm-s-ttcn .cm-quote { color: #090; }
|
||||
.cm-s-ttcn .cm-negative { color: #d44; }
|
||||
.cm-s-ttcn .cm-positive { color: #292; }
|
||||
.cm-s-ttcn .cm-header, .cm-strong { font-weight: bold; }
|
||||
.cm-s-ttcn .cm-em { font-style: italic; }
|
||||
.cm-s-ttcn .cm-link { text-decoration: underline; }
|
||||
.cm-s-ttcn .cm-strikethrough { text-decoration: line-through; }
|
||||
.cm-s-ttcn .cm-header { color: #00f; font-weight: bold; }
|
||||
|
||||
.cm-s-ttcn .cm-atom { color: #219; }
|
||||
.cm-s-ttcn .cm-attribute { color: #00c; }
|
||||
.cm-s-ttcn .cm-bracket { color: #997; }
|
||||
.cm-s-ttcn .cm-comment { color: #333333; }
|
||||
.cm-s-ttcn .cm-def { color: #00f; }
|
||||
.cm-s-ttcn .cm-em { font-style: italic; }
|
||||
.cm-s-ttcn .cm-error { color: #f00; }
|
||||
.cm-s-ttcn .cm-hr { color: #999; }
|
||||
.cm-s-ttcn .cm-invalidchar { color: #f00; }
|
||||
.cm-s-ttcn .cm-keyword { font-weight:bold; }
|
||||
.cm-s-ttcn .cm-link { color: #00c; text-decoration: underline; }
|
||||
.cm-s-ttcn .cm-meta { color: #555; }
|
||||
.cm-s-ttcn .cm-negative { color: #d44; }
|
||||
.cm-s-ttcn .cm-positive { color: #292; }
|
||||
.cm-s-ttcn .cm-qualifier { color: #555; }
|
||||
.cm-s-ttcn .cm-strikethrough { text-decoration: line-through; }
|
||||
.cm-s-ttcn .cm-string { color: #006400; }
|
||||
.cm-s-ttcn .cm-string-2 { color: #f50; }
|
||||
.cm-s-ttcn .cm-strong { font-weight: bold; }
|
||||
.cm-s-ttcn .cm-tag { color: #170; }
|
||||
.cm-s-ttcn .cm-variable { color: #8B2252; }
|
||||
.cm-s-ttcn .cm-variable-2 { color: #05a; }
|
||||
.cm-s-ttcn .cm-variable-3 { color: #085; }
|
||||
|
||||
.cm-s-ttcn .cm-invalidchar { color: #f00; }
|
||||
|
||||
/* ASN */
|
||||
.cm-s-ttcn .cm-accessTypes,
|
||||
.cm-s-ttcn .cm-compareTypes { color: #27408B; }
|
||||
.cm-s-ttcn .cm-cmipVerbs { color: #8B2252; }
|
||||
.cm-s-ttcn .cm-modifier { color:#D2691E; }
|
||||
.cm-s-ttcn .cm-status { color:#8B4545; }
|
||||
.cm-s-ttcn .cm-storage { color:#A020F0; }
|
||||
.cm-s-ttcn .cm-tags { color:#006400; }
|
||||
|
||||
/* CFG */
|
||||
.cm-s-ttcn .cm-externalCommands { color: #8B4545; font-weight:bold; }
|
||||
.cm-s-ttcn .cm-fileNCtrlMaskOptions,
|
||||
.cm-s-ttcn .cm-sectionTitle { color: #2E8B57; font-weight:bold; }
|
||||
|
||||
/* TTCN */
|
||||
.cm-s-ttcn .cm-booleanConsts,
|
||||
.cm-s-ttcn .cm-otherConsts,
|
||||
.cm-s-ttcn .cm-verdictConsts { color: #006400; }
|
||||
.cm-s-ttcn .cm-configOps,
|
||||
.cm-s-ttcn .cm-functionOps,
|
||||
.cm-s-ttcn .cm-portOps,
|
||||
.cm-s-ttcn .cm-sutOps,
|
||||
.cm-s-ttcn .cm-timerOps,
|
||||
.cm-s-ttcn .cm-verdictOps { color: #0000FF; }
|
||||
.cm-s-ttcn .cm-preprocessor,
|
||||
.cm-s-ttcn .cm-templateMatch,
|
||||
.cm-s-ttcn .cm-ttcn3Macros { color: #27408B; }
|
||||
.cm-s-ttcn .cm-types { color: #A52A2A; font-weight:bold; }
|
||||
.cm-s-ttcn .cm-visibilityModifiers { font-weight:bold; }
|
32
app/lib/codemirror/theme/twilight.css
vendored
Normal file
32
app/lib/codemirror/theme/twilight.css
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
.cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/
|
||||
.cm-s-twilight div.CodeMirror-selected { background: #323232; } /**/
|
||||
.cm-s-twilight .CodeMirror-line::selection, .cm-s-twilight .CodeMirror-line > span::selection, .cm-s-twilight .CodeMirror-line > span > span::selection { background: rgba(50, 50, 50, 0.99); }
|
||||
.cm-s-twilight .CodeMirror-line::-moz-selection, .cm-s-twilight .CodeMirror-line > span::-moz-selection, .cm-s-twilight .CodeMirror-line > span > span::-moz-selection { background: rgba(50, 50, 50, 0.99); }
|
||||
|
||||
.cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; }
|
||||
.cm-s-twilight .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-twilight .CodeMirror-guttermarker-subtle { color: #aaa; }
|
||||
.cm-s-twilight .CodeMirror-linenumber { color: #aaa; }
|
||||
.cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
|
||||
.cm-s-twilight .cm-keyword { color: #f9ee98; } /**/
|
||||
.cm-s-twilight .cm-atom { color: #FC0; }
|
||||
.cm-s-twilight .cm-number { color: #ca7841; } /**/
|
||||
.cm-s-twilight .cm-def { color: #8DA6CE; }
|
||||
.cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/
|
||||
.cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/
|
||||
.cm-s-twilight .cm-operator { color: #cda869; } /**/
|
||||
.cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/
|
||||
.cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/
|
||||
.cm-s-twilight .cm-string-2 { color:#bd6b18; } /*?*/
|
||||
.cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/
|
||||
.cm-s-twilight .cm-builtin { color: #cda869; } /*?*/
|
||||
.cm-s-twilight .cm-tag { color: #997643; } /**/
|
||||
.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/
|
||||
.cm-s-twilight .cm-header { color: #FF6400; }
|
||||
.cm-s-twilight .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/
|
||||
.cm-s-twilight .cm-error { border-bottom: 1px solid red; }
|
||||
|
||||
.cm-s-twilight .CodeMirror-activeline-background { background: #27282E; }
|
||||
.cm-s-twilight .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
34
app/lib/codemirror/theme/vibrant-ink.css
vendored
Normal file
34
app/lib/codemirror/theme/vibrant-ink.css
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* Taken from the popular Visual Studio Vibrant Ink Schema */
|
||||
|
||||
.cm-s-vibrant-ink.CodeMirror { background: black; color: white; }
|
||||
.cm-s-vibrant-ink div.CodeMirror-selected { background: #35493c; }
|
||||
.cm-s-vibrant-ink .CodeMirror-line::selection, .cm-s-vibrant-ink .CodeMirror-line > span::selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::selection { background: rgba(53, 73, 60, 0.99); }
|
||||
.cm-s-vibrant-ink .CodeMirror-line::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::-moz-selection { background: rgba(53, 73, 60, 0.99); }
|
||||
|
||||
.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; }
|
||||
.cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; }
|
||||
.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle { color: #d0d0d0; }
|
||||
.cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; }
|
||||
.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
|
||||
.cm-s-vibrant-ink .cm-keyword { color: #CC7832; }
|
||||
.cm-s-vibrant-ink .cm-atom { color: #FC0; }
|
||||
.cm-s-vibrant-ink .cm-number { color: #FFEE98; }
|
||||
.cm-s-vibrant-ink .cm-def { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D; }
|
||||
.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D; }
|
||||
.cm-s-vibrant-ink .cm-operator { color: #888; }
|
||||
.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; }
|
||||
.cm-s-vibrant-ink .cm-string { color: #A5C25C; }
|
||||
.cm-s-vibrant-ink .cm-string-2 { color: red; }
|
||||
.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; }
|
||||
.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; }
|
||||
.cm-s-vibrant-ink .cm-header { color: #FF6400; }
|
||||
.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; }
|
||||
.cm-s-vibrant-ink .cm-link { color: blue; }
|
||||
.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; }
|
||||
|
||||
.cm-s-vibrant-ink .CodeMirror-activeline-background { background: #27282E; }
|
||||
.cm-s-vibrant-ink .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
53
app/lib/codemirror/theme/xq-dark.css
vendored
Normal file
53
app/lib/codemirror/theme/xq-dark.css
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
Copyright (C) 2011 by MarkLogic Corporation
|
||||
Author: Mike Brevoort <mike@brevoort.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
|
||||
.cm-s-xq-dark div.CodeMirror-selected { background: #27007A; }
|
||||
.cm-s-xq-dark .CodeMirror-line::selection, .cm-s-xq-dark .CodeMirror-line > span::selection, .cm-s-xq-dark .CodeMirror-line > span > span::selection { background: rgba(39, 0, 122, 0.99); }
|
||||
.cm-s-xq-dark .CodeMirror-line::-moz-selection, .cm-s-xq-dark .CodeMirror-line > span::-moz-selection, .cm-s-xq-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(39, 0, 122, 0.99); }
|
||||
.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
||||
.cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }
|
||||
.cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }
|
||||
.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }
|
||||
.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
|
||||
.cm-s-xq-dark span.cm-keyword { color: #FFBD40; }
|
||||
.cm-s-xq-dark span.cm-atom { color: #6C8CD5; }
|
||||
.cm-s-xq-dark span.cm-number { color: #164; }
|
||||
.cm-s-xq-dark span.cm-def { color: #FFF; text-decoration:underline; }
|
||||
.cm-s-xq-dark span.cm-variable { color: #FFF; }
|
||||
.cm-s-xq-dark span.cm-variable-2 { color: #EEE; }
|
||||
.cm-s-xq-dark span.cm-variable-3 { color: #DDD; }
|
||||
.cm-s-xq-dark span.cm-property {}
|
||||
.cm-s-xq-dark span.cm-operator {}
|
||||
.cm-s-xq-dark span.cm-comment { color: gray; }
|
||||
.cm-s-xq-dark span.cm-string { color: #9FEE00; }
|
||||
.cm-s-xq-dark span.cm-meta { color: yellow; }
|
||||
.cm-s-xq-dark span.cm-qualifier { color: #FFF700; }
|
||||
.cm-s-xq-dark span.cm-builtin { color: #30a; }
|
||||
.cm-s-xq-dark span.cm-bracket { color: #cc7; }
|
||||
.cm-s-xq-dark span.cm-tag { color: #FFBD40; }
|
||||
.cm-s-xq-dark span.cm-attribute { color: #FFF700; }
|
||||
.cm-s-xq-dark span.cm-error { color: #f00; }
|
||||
|
||||
.cm-s-xq-dark .CodeMirror-activeline-background { background: #27282E; }
|
||||
.cm-s-xq-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
43
app/lib/codemirror/theme/xq-light.css
vendored
Normal file
43
app/lib/codemirror/theme/xq-light.css
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
Copyright (C) 2011 by MarkLogic Corporation
|
||||
Author: Mike Brevoort <mike@brevoort.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
.cm-s-xq-light span.cm-keyword { line-height: 1em; font-weight: bold; color: #5A5CAD; }
|
||||
.cm-s-xq-light span.cm-atom { color: #6C8CD5; }
|
||||
.cm-s-xq-light span.cm-number { color: #164; }
|
||||
.cm-s-xq-light span.cm-def { text-decoration:underline; }
|
||||
.cm-s-xq-light span.cm-variable { color: black; }
|
||||
.cm-s-xq-light span.cm-variable-2 { color:black; }
|
||||
.cm-s-xq-light span.cm-variable-3 { color: black; }
|
||||
.cm-s-xq-light span.cm-property {}
|
||||
.cm-s-xq-light span.cm-operator {}
|
||||
.cm-s-xq-light span.cm-comment { color: #0080FF; font-style: italic; }
|
||||
.cm-s-xq-light span.cm-string { color: red; }
|
||||
.cm-s-xq-light span.cm-meta { color: yellow; }
|
||||
.cm-s-xq-light span.cm-qualifier { color: grey; }
|
||||
.cm-s-xq-light span.cm-builtin { color: #7EA656; }
|
||||
.cm-s-xq-light span.cm-bracket { color: #cc7; }
|
||||
.cm-s-xq-light span.cm-tag { color: #3F7F7F; }
|
||||
.cm-s-xq-light span.cm-attribute { color: #7F007F; }
|
||||
.cm-s-xq-light span.cm-error { color: #f00; }
|
||||
|
||||
.cm-s-xq-light .CodeMirror-activeline-background { background: #e8f2ff; }
|
||||
.cm-s-xq-light .CodeMirror-matchingbracket { outline:1px solid grey;color:black !important;background:yellow; }
|
44
app/lib/codemirror/theme/yeti.css
vendored
Normal file
44
app/lib/codemirror/theme/yeti.css
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
|
||||
Name: yeti
|
||||
Author: Michael Kaminsky (http://github.com/mkaminsky11)
|
||||
|
||||
Original yeti color scheme by Jesse Weed (https://github.com/jesseweed/yeti-syntax)
|
||||
|
||||
*/
|
||||
|
||||
|
||||
.cm-s-yeti.CodeMirror {
|
||||
background-color: #ECEAE8 !important;
|
||||
color: #d1c9c0 !important;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.cm-s-yeti .CodeMirror-gutters {
|
||||
color: #adaba6;
|
||||
background-color: #E5E1DB;
|
||||
border: none;
|
||||
}
|
||||
.cm-s-yeti .CodeMirror-cursor { border-left: solid thin #d1c9c0; }
|
||||
.cm-s-yeti .CodeMirror-linenumber { color: #adaba6; }
|
||||
.cm-s-yeti.CodeMirror-focused div.CodeMirror-selected { background: #DCD8D2; }
|
||||
.cm-s-yeti .CodeMirror-line::selection, .cm-s-yeti .CodeMirror-line > span::selection, .cm-s-yeti .CodeMirror-line > span > span::selection { background: #DCD8D2; }
|
||||
.cm-s-yeti .CodeMirror-line::-moz-selection, .cm-s-yeti .CodeMirror-line > span::-moz-selection, .cm-s-yeti .CodeMirror-line > span > span::-moz-selection { background: #DCD8D2; }
|
||||
.cm-s-yeti span.cm-comment { color: #d4c8be; }
|
||||
.cm-s-yeti span.cm-string, .cm-s-yeti span.cm-string-2 { color: #96c0d8; }
|
||||
.cm-s-yeti span.cm-number { color: #a074c4; }
|
||||
.cm-s-yeti span.cm-variable { color: #55b5db; }
|
||||
.cm-s-yeti span.cm-variable-2 { color: #a074c4; }
|
||||
.cm-s-yeti span.cm-def { color: #55b5db; }
|
||||
.cm-s-yeti span.cm-operator { color: #9fb96e; }
|
||||
.cm-s-yeti span.cm-keyword { color: #9fb96e; }
|
||||
.cm-s-yeti span.cm-atom { color: #a074c4; }
|
||||
.cm-s-yeti span.cm-meta { color: #96c0d8; }
|
||||
.cm-s-yeti span.cm-tag { color: #96c0d8; }
|
||||
.cm-s-yeti span.cm-attribute { color: #9fb96e; }
|
||||
.cm-s-yeti span.cm-qualifier { color: #96c0d8; }
|
||||
.cm-s-yeti span.cm-property { color: #a074c4; }
|
||||
.cm-s-yeti span.cm-builtin { color: #a074c4; }
|
||||
.cm-s-yeti span.cm-variable-3 { color: #96c0d8; }
|
||||
.cm-s-yeti .CodeMirror-activeline-background { background: #E7E4E0; }
|
||||
.cm-s-yeti .CodeMirror-matchingbracket { text-decoration: underline; }
|
37
app/lib/codemirror/theme/zenburn.css
vendored
Normal file
37
app/lib/codemirror/theme/zenburn.css
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* "
|
||||
* Using Zenburn color palette from the Emacs Zenburn Theme
|
||||
* https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el
|
||||
*
|
||||
* Also using parts of https://github.com/xavi/coderay-lighttable-theme
|
||||
* "
|
||||
* From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css
|
||||
*/
|
||||
|
||||
.cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; }
|
||||
.cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; }
|
||||
.cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white; }
|
||||
.cm-s-zenburn { background-color: #3f3f3f; color: #dcdccc; }
|
||||
.cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; }
|
||||
.cm-s-zenburn span.cm-comment { color: #7f9f7f; }
|
||||
.cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; }
|
||||
.cm-s-zenburn span.cm-atom { color: #bfebbf; }
|
||||
.cm-s-zenburn span.cm-def { color: #dcdccc; }
|
||||
.cm-s-zenburn span.cm-variable { color: #dfaf8f; }
|
||||
.cm-s-zenburn span.cm-variable-2 { color: #dcdccc; }
|
||||
.cm-s-zenburn span.cm-string { color: #cc9393; }
|
||||
.cm-s-zenburn span.cm-string-2 { color: #cc9393; }
|
||||
.cm-s-zenburn span.cm-number { color: #dcdccc; }
|
||||
.cm-s-zenburn span.cm-tag { color: #93e0e3; }
|
||||
.cm-s-zenburn span.cm-property { color: #dfaf8f; }
|
||||
.cm-s-zenburn span.cm-attribute { color: #dfaf8f; }
|
||||
.cm-s-zenburn span.cm-qualifier { color: #7cb8bb; }
|
||||
.cm-s-zenburn span.cm-meta { color: #f0dfaf; }
|
||||
.cm-s-zenburn span.cm-header { color: #f0efd0; }
|
||||
.cm-s-zenburn span.cm-operator { color: #f0efd0; }
|
||||
.cm-s-zenburn span.CodeMirror-matchingbracket { box-sizing: border-box; background: transparent; border-bottom: 1px solid; }
|
||||
.cm-s-zenburn span.CodeMirror-nonmatchingbracket { border-bottom: 1px solid; background: none; }
|
||||
.cm-s-zenburn .CodeMirror-activeline { background: #000000; }
|
||||
.cm-s-zenburn .CodeMirror-activeline-background { background: #000000; }
|
||||
.cm-s-zenburn div.CodeMirror-selected { background: #545454; }
|
||||
.cm-s-zenburn .CodeMirror-focused div.CodeMirror-selected { background: #4f4f4f; }
|
1
app/lib/screenlog.js
Normal file
1
app/lib/screenlog.js
Normal file
@@ -0,0 +1 @@
|
||||
var mainWindow=window.parent.onMessageFromConsole?window.parent:window.parent.opener;(function(){function a(a,b){var c=document.createElement(a);return c.style.cssText=b,c}function b(){var b=a('div','z-index:2147483647;font-family:Helvetica,Arial,sans-serif;font-size:10px;font-weight:bold;padding:5px;text-align:left;opacity:0.8;position:fixed;right:0;top:0;min-width:200px;max-height:50vh;overflow:auto;background:'+_options.bgColor+';'+_options.css);return b}function c(b){return function(){if(_options.proxyCallback&&_options.proxyCallback.apply(null,arguments),!_options.noUi){var c=a('div','line-height:18px;min-height:18px;background:'+(m.children.length%2?'rgba(255,255,255,0.1)':'')+';color:'+b),d=[].slice.call(arguments).reduce(function(a,b){return a+' '+('object'==typeof b?JSON.stringify(b):b)},'');c.textContent=d,m.appendChild(c),_options.autoScroll&&(m.scrollTop=m.scrollHeight-m.clientHeight)}}}function d(){return _options.noUi?void mainWindow.clearConsole():void(m.innerHTML='')}function e(){return c(_options.logColor).apply(null,arguments)}function f(){return c(_options.infoColor).apply(null,arguments)}function g(){return c(_options.warnColor).apply(null,arguments)}function h(){return c(_options.errorColor).apply(null,arguments)}function i(a){for(var b in a)a.hasOwnProperty(b)&&_options.hasOwnProperty(b)&&(_options[b]=a[b])}function j(){if(!n)throw'You need to call `screenLog.init()` first.'}function k(a){return function(){return j(),a.apply(this,arguments)}}function l(a,b){return function(){a.apply(this,arguments),'function'==typeof o[b]&&o[b].apply(console,arguments)}}var m,n=!1,o={};_options={bgColor:'black',logColor:'lightgreen',infoColor:'blue',warnColor:'orange',errorColor:'red',freeConsole:!1,css:'',autoScroll:!0,proxyCallback:null,noUi:!1},window.addEventListener('error',function(){c(_options.errorColor).call(null,arguments[0].error.stack)}),window.screenLog={init:function(a){n||(n=!0,a&&i(a),!_options.noUi&&(m=b(),document.body.appendChild(m)),!_options.freeConsole&&(o.log=console.log,o.clear=console.clear,o.info=console.info,o.warn=console.warn,o.error=console.error,console.log=l(e,'log'),console.clear=l(d,'clear'),console.info=l(f,'info'),console.warn=l(g,'warn'),console.error=l(h,'error')))},log:l(k(e),'log'),clear:l(k(d),'clear'),info:l(k(d),'info'),warn:l(k(g),'warn'),error:l(k(h),'error'),destroy:k(function(){n=!1,console.log=o.log,console.clear=o.clear,console.info=o.info,console.warn=o.warn,console.error=o.error,m.remove()})}})(),screenLog.init({noUi:!0,proxyCallback:function(){mainWindow.onMessageFromConsole.apply(null,arguments)}}),window._wmEvaluate=function(a){try{var b=eval(a)}catch(a){return void mainWindow.onMessageFromConsole.call(null,a)}mainWindow.onMessageFromConsole.call(null,b)};
|
290
app/partials/changelog.html
Normal file
290
app/partials/changelog.html
Normal file
@@ -0,0 +1,290 @@
|
||||
<a d-click="onModalCloseBtnClick" href="" aria-label="Close notifications" title="Close" class="js-modal__close-btn modal__close-btn">
|
||||
<svg>
|
||||
<use xlink:href="#cross-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<h1>Whats new?</h1>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.9.6</span>
|
||||
<ul>
|
||||
<li><strong>Bugfix</strong>: Fix close buttons not working in notifications and keyboard shortcuts modal.</li>
|
||||
<li><strong>Bugfix</strong>: Fix keyboard shortcut to see keyboard shortcuts :) Thanks <a href="https://github.com/ClassicOldSong" target="_blank">ClassicOldSong</a>.</li>
|
||||
|
||||
<br>
|
||||
<li><strong>🚀 Announcement</strong>: Web Maker has a <a href="https://gitter.im/web-maker-app/Lobby" target="_blank">chat lobby on Gitter</a> now - incase you need any help or just want to say Hi!</li>
|
||||
<li><a href="https://github.com/chinchang/web-maker/issues" target="_blank">Suggest features or report bugs.</a></li>
|
||||
<li>Web Maker now has more than 50K weekly active users! Thank you for being a part of this community of awesome developers. If you find Web Maker helpful, <a href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews" target="_blank" class="btn">Please rate Web Maker <span class="star"></span></a> <a href="http://twitter.com/share?url=https://webmakerapp.com/&text=Web Maker - A blazing fast %26 offline web playground! via @webmakerApp&related=webmakerApp&hashtags=web,editor,chrome,extension" target="_blank" target="_blank" class="btn">Share it</a> <a aria-label="Support the developer" href="https://www.paypal.me/kushagragour" target="_blank" class="btn btn-icon">Support the developer</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.9.5</span>
|
||||
<ul>
|
||||
<li><a href="https://medium.com/web-maker/release-2-9-5-add-library-search-pane-collapsing-ux-improvements-more-1085216c1301" target="_blank">Read blog post about this release.</a></li>
|
||||
<li><strong>Keyboard shortcuts panel</strong>: Add a list of all keyboard shotcuts. Access with <code> Ctrl/⌘ + Shift + ?</code> or click keyboard button in footer.</li>
|
||||
<li><strong>Add external library</strong>: Better UX for searching third party libraries.</li>
|
||||
<li><strong>Improvement</strong>: Code panes now go fullscreen when double-clicked on their headers - which is much more intuitive behavior based on feedback from lot of developers.</li>
|
||||
<li><strong>Improvement</strong>: Add <code>allowfullscreen</code> attribute on iframes. Thanks <a href="https://github.com/ClassicOldSong" target="_blank">ClassicOldSong</a>.</li>
|
||||
<li><strong>Bugfix</strong> - Stop screenlog.js from showing up in the exported HTML.</li>
|
||||
<li>Popular external libraries list updated. Thanks <a href="https://github.com/jlapitan" target="_blank">jlapitan</a>.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.9.4</span>
|
||||
<ul>
|
||||
<li><strong>Improvement</strong>: Atomic CSS (Atomizer) has been updated to latest version. Now you can do things like psuedo elements. Learn More.</li>
|
||||
<li><strong>Bugfix</strong> - Logging circular objects is now possible. It won't show in the Web Maker console, but will show fine in browser's console.</li>
|
||||
<li><strong>Bugfix</strong> - Console's z-index issue has been fixed.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.9.3</span>
|
||||
<ul>
|
||||
<li>Choose the save location while exporting your saved creations. Now easily sync them to your Dropbox or any cloud storage.</li>
|
||||
<li>All modals inside the app now have a close button.</li>
|
||||
<li>Checkbox that showed on clicking a boolean value is now removed. Thanks <a href="https://github.com/gauravmuk" target="_blank">Gaurav Nanda</a>.</li>
|
||||
<li><strong>Bugfix</strong> - Screenshots on retina device are now correct. Thanks <a href="https://github.com/AshBardhan" target="_blank">Ashish Bardhan</a>.</li>
|
||||
<li><strong>Bugfix</strong> - Double console log in detached mode fixed.</li>
|
||||
<li><strong>Bugfix</strong> - Console.clear now works in detached mode too.</li>
|
||||
<li><strong>Bugfix</strong> - DOCTYPE added in preview.</li>
|
||||
<li><strong>Bugfix</strong> - Typo correction in README. Thanks <a href="https://github.com/AdilMah" target="_blank">Adil Mahmood</a>.</li>
|
||||
<li>gstatic.com is available to load external JavaScripts from.</li>
|
||||
<li>Popular libraries list updated. Thanks <a href="https://github.com/diomed" target="_blank">diomed</a>.</li>
|
||||
<li>Added <a href="https://github.com/chinchang/web-maker/blob/master/CONTRIBUTING.md" target="_blank">contribution guidelines</a> in the Github repository.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.9.2</span>
|
||||
<ul>
|
||||
<li>Minor bug fixes.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.9.1</span>
|
||||
<ul>
|
||||
<li><a href="https://medium.com/web-maker/v2-9-lots-of-goodies-bd1e939571f6" target="_blank">Read blog post about last release.</a></li>
|
||||
<li>Use Ctrl/Cmd+D to select next occurence of matching selection.</li>
|
||||
<li>Improve onboard experience.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.9.0</span>
|
||||
<ul>
|
||||
<li><a href="https://medium.com/web-maker/v2-9-lots-of-goodies-bd1e939571f6" target="_blank">Read blog post about this release.</a></li>
|
||||
<li><strong>Detached Preview</strong> - Yes, you read that correct! You can now detach your preview and send it to your secondary monitor.
|
||||
</li>
|
||||
<li><strong>Find & Replace</strong> - Long awaited, now its there. Ctrl/Cmd+f to find and add Alt to replace.</li>
|
||||
<li><strong>Atomic CSS (Atomizer) configurations</strong> - Add custom config for Atomic CSS. <a href="https://github.com/acss-io/atomizer#api" target="_blank">Read more</a>.</li>
|
||||
<li><strong>Light mode</strong> - This new setting makes Web Maker drop some heavy effects like blur etc to gain more performance. Thanks <a href="https://github.com/iamandrewluca" target="_blank">Andrew</a>.</li>
|
||||
<li><strong>Preserve logs setting</strong> - Choose whether or not to preserve logs across preview refreshes. Thanks <a href="https://github.com/BasitAli" target="_blank">Basit</a>.</li>
|
||||
<li><strong>Line wrap setting</strong> - As the name says.</li>
|
||||
<li>Semantic UI added to popular libraries.</li>
|
||||
<li>Bootstrap, Vue, UI-Kit and more updated to latest versions in popular libraries.</li>
|
||||
<li>UX improvements in settings UI</li>
|
||||
|
||||
<li><strong>Bugfix</strong> - Trigger preview refresh anytime with Ctrl/⌘ + Shift + 5. Even with auto-preview on.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.8.1</span>
|
||||
<ul>
|
||||
<li>Vue.js & UIKit version updated to latest version in 'Add Library' list.</li>
|
||||
<li>UTF-8 charset added to preview HTML to support universal characters.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.8.0</span>
|
||||
<ul>
|
||||
<li><a href="https://medium.com/web-maker/release-v2-8-is-out-f44e6ea5d9c4" target="_blank">Read blog post about this release.</a></li>
|
||||
<li><strong>Auto Save</strong> - Your creations now auto-save after your
|
||||
first manual save. This is configurable from settings.
|
||||
</li>
|
||||
<li><strong>Base2Tone-Meadow Editor Theme</strong> - First user contributed theme.
|
||||
Thanks to Diomed.</li>
|
||||
<li><strong>Use System Fonts</strong> - You can now use any of your existing
|
||||
system fonts in the editor!</li>
|
||||
<li><strong>Matching Tag Highlight</strong> - Cursor over any HTML tag would
|
||||
highlight the matching pair tag.</li>
|
||||
<li>Auto-completion suggestion can now be switched off from settings.</li>
|
||||
<li><strong>Improvement</strong> - Stop white flicker in editor when the app
|
||||
opens.</li>
|
||||
<li><strong>Bugfix</strong> - Add Babel Polyfill to enable use of next-gen
|
||||
built-ins like Promise or WeakMap.
|
||||
</li>
|
||||
<li>Vue.js version updated to 2.4.0 in popular library list.</li>
|
||||
<li>Downloads permission is optional. Asked only when you take screenshot.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.7.2</span>
|
||||
<ul>
|
||||
<li><strong>External Libraries</strong> - Add Foundation.js and update UIKit 3 to latest beta.</li>
|
||||
<li><strong>rawgit.com</strong> & <strong>wzrd.in</strong> domains are now allowed for loading external libraries from.</li>
|
||||
<li>Minor booting speed improvements</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.7.1</span>
|
||||
<ul>
|
||||
<li><strong>Framer.js support</strong> - You can now load the latest framer.js library from <a href="https://builds.framerjs.com/" target="_blank">framer builds page</a> and start coding framer prototypes.</li>
|
||||
<li><strong>Bugfix</strong>: Edit on CodePen is back in action.</li>
|
||||
<li><strong>Bugfix</strong>: Autocompletion menu doesn't show on cut and paste now.</li>
|
||||
<li><strong>Bugfix</strong>: Updated & fixed urls of some common external libraries to latest versions. UIKit3 & Bootstrap 4α are now in the list.</li>
|
||||
<li>Preprocessor selector are now more accessible.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.7.0</span>
|
||||
<ul>
|
||||
<li><strong>Fork any creation!</strong>: Now you can fork any existing creation of yours to start a new work based on it. One big use case of this feature is "Templates"! <a target="_blank" href="https://kushagragour.in/blog/2017/05/web-maker-fork-templates/?utm_source=webmakerapp&utm_medium=referral">Read more about it</a>.</li>
|
||||
<li><strong>Fonts 😍 </strong>: Super-awesome 4 fonts (mostly with ligature support) now available to choose from. Fira Code is the default font now.</li>
|
||||
<li>Updated most used external libraries to latest versions.</li>
|
||||
<li><strong>Bugfix</strong>: Add missing Bootstrap JS file to most used external libraries list.</li>
|
||||
<li>Several other minor bugfixes and improvements to make Web Maker awesome!</li>
|
||||
|
||||
<li>Great news to share with you - Web Maker has been featured on the Chrome Webstore homepage! Thanks for all the love :)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.6.1</span>
|
||||
<ul>
|
||||
<li><strong>Bugfix</strong>: Emojis vanishing while exporting to Codepen has been fixed.</li>
|
||||
<li><strong>Bugfix</strong>: <code>console.clear()</code> now doesn't error and clears the inbuilt console.</li>
|
||||
<li><strong>Bugfix</strong>: External libraries added to the creation are exported as well to Codepen.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.6.0</span>
|
||||
<ul>
|
||||
<li><strong>The "Console"</strong>: The most awaited feature is here! There is now an inbuilt console to see your logs, errors and for quickly evaluating JavaScript code inside your preview. Enjoy! I also a <a href="https://kushagragour.in/blog/2017/05/web-maker-console-is-here/?utm_source=webmakerapp&utm_medium=referral"
|
||||
target="_blank">blog post about it</a>.</li>
|
||||
<li>Number slider which popped on clicking any number in the code has been removed due to poor user experience.</li>
|
||||
<li>Minor usability improvements.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.5.0</span>
|
||||
<ul>
|
||||
<li><strong>Atomic CSS</strong>: Use can now use Atomic CSS(ACSS) in your work! <a href="https://acss.io/" target="_blank">Read more about it here</a>.</li>
|
||||
<li><strong>Search your saved creations</strong>: Easily search through all your saved creations by title.</li>
|
||||
<li><strong>Configurable Auto-preview</strong> - You can turn off the auto preview in settings if you don't want the preview to update as you type.</li>
|
||||
<li><strong>Configurable refresh on resize</strong> - You can configure whether you want the preview to refresh when you resize the preview panel.</li>
|
||||
<li><strong>Bugfix</strong> - Fix indentation <a href="https://github.com/chinchang/web-maker/issues/104" target="_blank">issue</a> with custom indentation size.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.4.2</span>
|
||||
<ul>
|
||||
<li><strong>Improved infinite loop protection</strong>: Infinite loop protection is now faster and more reliable. And works without the need of Escodegen. Thanks to Ariya Hidayat!</li>
|
||||
<li><strong>Bugfix</strong> - Default parameters not working in JavaScript is fixed.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.4.0</span>
|
||||
<ul>
|
||||
<li><strong>Import/Export</strong>: Your creations are most important. Now export all your creations into a single file as a backup that can be imported anytime & anywhere.</li>
|
||||
<li><strong>Editor themes</strong>: You have been heard. Now you can choose from a huge list of wonderful editor themes!</li>
|
||||
<li><strong>Identation settings</strong>: Not a spaces fan? Switch to tabs and set your indentation size.</li>
|
||||
<li><strong>Vim key bindings</strong>: Rejoice Vim lovers!</li>
|
||||
<li><strong>Code blast</strong>: Why don't you try coding with this switched on from the settings? Go on...</li>
|
||||
<li><strong>Important</strong>: Due to security policy changes from Chrome 57 onwards, Web Maker now allows loading external JavaScript libraries only from certain whitelisted domains (localhost, https://ajax.googleapis.com, https://code.jquery.com, https://cdnjs.cloudflare.com,
|
||||
https://unpkg.com, https://maxcdn.com, https://cdn77.com, https://maxcdn.bootstrapcdn.com, https://cdn.jsdelivr.net/)</li>
|
||||
<li>Save button now highlights when you have unsaved changes.</li>
|
||||
<li>Jade is now called Pug. Just a name change.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.3.2</span>
|
||||
<ul>
|
||||
<li>Update Babel to support latest and coolest ES6 features.</li>
|
||||
<li>Improve onboarding experience at first install.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.3.1</span>
|
||||
<ul>
|
||||
<li><strong>Bugfix</strong> - Splitting of code and preview panes is remembered by the editor.</li>
|
||||
<li>Title of the creation is used for the file name when saving as HTML.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.3.0</span>
|
||||
<ul>
|
||||
<li><strong>Add Library Autocompletion</strong> - Just start typing the name of library and you'll be shown matching libraries from cdnjs.</li>
|
||||
<li><strong>Preview Screenshot Capture</strong> - Want to grab a nice screenshot of your creation. You have it! Click and capture.</li>
|
||||
<li><strong>Auto Indent Code</strong> - Select your code and hit Shift-Tab to auto-indent it!</li>
|
||||
<li><strong>Keyboard Navigation in Saved List</strong> - Now select your creation using arrow keys and hit ENTER to open it.</li>
|
||||
<li>Highlight active line in code panes.</li>
|
||||
<li><strong>Bugfix</strong> - Fix in generated title of new creation.</li>
|
||||
<li><strong>Bugfix</strong> - HTML autocompletion is manual triggered now with Ctrl+Space.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.2.0</span>
|
||||
<ul>
|
||||
<li><strong>Code Autocompletion</strong> - See code suggestions while you type!</li>
|
||||
<li><strong>Full Screen Preview</strong> - Checkout your creation in a full-screen layout.</li>
|
||||
<li><strong>SASS</strong> - SASS support added for CSS.</li>
|
||||
<li><strong>Faster CSS update</strong> - Preview updates instantly without refresh when just CSS is changed.</li>
|
||||
<li><strong>Bugfix</strong> - Indentation fixed while going on new line.</li>
|
||||
<li><strong>Bugfix</strong> - Works even in Chrome Canary now. Though libraries can be added only through CDNs.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.1.0</span>
|
||||
<ul>
|
||||
<li><strong>TypeScript</strong> - Now you can code in TypeScript too!</li>
|
||||
<li><strong>Stylus Preprocessor</strong> - Stylus supported adding for CSS.</li>
|
||||
<li><strong>Code Folding</strong> - Collapse large code blocks for easy editing.</li>
|
||||
<li><strong>Bugfix</strong> - Support JSX in JavaScript.</li>
|
||||
<li>Better onboarding for first time users.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="notification">
|
||||
<span class="notification__version">2.0.0</span>
|
||||
<ul>
|
||||
<li><strong>Save and Load</strong> - Long pending and super-useful, now you can save your creations and resume them anytime later.</li>
|
||||
<li><strong>Insert JS & CSS</strong> - Load popular JavaScript & CSS libraries in your work without writing any code.</li>
|
||||
<li><strong>Collapsed Panes</strong> - Collapse/uncollapse code panes with a single click. Your pane configuration is even saved with every creation!</li>
|
||||
<li><strong>Quick color & number change</strong> - Click on any color or number and experiment with quick values using a slider.</li>
|
||||
<li><strong>Linting</strong> - See your code errors right where you are coding.</li>
|
||||
<li>No more browser hang due to infinite loops!</li>
|
||||
<!-- <li><a href="https://kushagragour.in/blog/web-maker-2">Read more about this big release</a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
<div class="notification">
|
||||
<span class="notification__version">1.7.0</span>
|
||||
<ul>
|
||||
<li><strong>Preprocessors!</strong> - Enjoy a whole list of preprocessors for HTML(Jade & markdown), CSS(SCSS & LESS) and JavaScript(CoffeeScript & Babel).</li>
|
||||
<li>More awesome font for code.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="notification">
|
||||
<span class="notification__version">1.6.0</span>
|
||||
<ul>
|
||||
<li>You can now configure Web-Maker to not replace new tab page from the settings. It is always accessible from the icon in the top-right.</li>
|
||||
<li>Download current code as HTML file with Ctrl/⌘ + S keyboard shortcut.</li>
|
||||
<li>New notifications panel added so you are always aware of the new changes in Web-Maker.</li>
|
||||
</ul>
|
||||
</div>
|
37
app/partials/help-modal.html
Normal file
37
app/partials/help-modal.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<a d-click="onModalCloseBtnClick" href="" aria-label="Close help modal" title="Close" class="js-modal__close-btn modal__close-btn">
|
||||
<svg>
|
||||
<use xlink:href="#cross-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<h1><div class="web-maker-with-tag">Web Maker</div><small style="font-size:14px;"> v2.9.6</small></h1>
|
||||
|
||||
<div>
|
||||
<p>Made with <span style="margin-right: 8px;">💖</span> & <span style="margin-right: 8px;">🙌</span> by <a href="https://twitter.com/chinchang457" target="_blank">Kushagra Gour</a></p>
|
||||
<p>Tweet out your feature requests, comments & suggestions to <a target="_blank" href="https://twitter.com/webmakerApp">@webmakerApp</a>.</p>
|
||||
<p>Like this extension? Please <a href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews" target="_blank">rate it here</a>.</p>
|
||||
<p>
|
||||
<a aria-label="Rate Web Maker" href="https://chrome.google.com/webstore/detail/web-maker/lkfkkhfhhdkiemehlpkgjeojomhpccnh/reviews" target="_blank" class="btn btn-icon"><svg><use xlink:href="#heart-icon"></use></svg>Show some love</a>
|
||||
<a aria-label="Chat" href="https://gitter.im/web-maker-app/Lobby" target="_blank" class="btn btn-icon"><svg><use xlink:href="#chat-icon"></use></svg>Chat</a>
|
||||
<a aria-label="Report a Bug" href="https://github.com/chinchang/web-maker/issues" target="_blank" class="btn btn-icon"><svg><use xlink:href="#bug-icon"></use></svg>Report a bug</a>
|
||||
<a aria-label="Support the developer" href="https://www.paypal.me/kushagragour" target="_blank" class="btn btn-icon"><svg><use xlink:href="#gift-icon"></use></svg>Support the developer</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<h3>Awesome libraries used</h3>
|
||||
<ul>
|
||||
<li><a target="_blank" href="https://kushagragour.in/lab/hint/">Hint.css</a> & <a target="_blank" href="https://github.com/chinchang/screenlog.js">Screenlog.js</a> - By me :)</li>
|
||||
<li><a target="_blank" href="https://nathancahill.github.io/Split.js/">Split.js</a> - Nathan Cahill</li>
|
||||
<li><a target="_blank" href="https://codemirror.net/">Codemirror</a> - Marijn Haverbeke</li>
|
||||
<li><a target="_blank" href="https://emmet.io/">Emmet</a> - Sergey Chikuyonok</li>
|
||||
<li><a target="_blank" href="http://esprima.org/">Esprima</a> - Ariya Hidayat</li>
|
||||
<li><a target="_blank" href="https://github.com/enjalot/Inlet">Inlet</a> - Ian Johnson</li>
|
||||
<li><a target="_blank" href="https://webmakerapp.com/">Web Maker!</a> - whhat!</li>
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<h3>License</h3>
|
||||
"Web Maker" is <a target="_blank" href="https://github.com/chinchang/web-maker">open-source</a> under the <a href="https://opensource.org/licenses/MIT" target="_blank">MIT License</a>.
|
||||
</p>
|
||||
</div>
|
106
app/partials/keyboard-shortcuts.html
Normal file
106
app/partials/keyboard-shortcuts.html
Normal file
@@ -0,0 +1,106 @@
|
||||
<a d-click="onModalCloseBtnClick" href="" aria-label="Close keyboard shortcuts modal" title="Close" class="js-modal__close-btn modal__close-btn">
|
||||
<svg>
|
||||
<use xlink:href="#cross-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<h1>Keyboard Shortcuts</h1>
|
||||
|
||||
<div class="flex">
|
||||
<div>
|
||||
<h2>Global</h2>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + Shift + ?
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">See keyboard shortcuts</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + Shift + 5
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Refresh preview</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + S
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Save current creations</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + O
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Open list of saved creations</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl + L
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Clear console (works when console input is focused)</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Esc
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Close saved creations panel & modals</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="ml-2">
|
||||
<h2>Editor</h2>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + F
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Find</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + G
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Select next match</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + Shift + G
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Select previous match</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + Opt/Alt + F
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Find & replace</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Shift + Tab
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Realign code</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + ]
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Indent code right</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + [
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Indent code left</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Tab
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Emmet code completion <a href="https://emmet.io/" target="_blank">Read more</a></span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="kbd-shortcut__keys">
|
||||
Ctrl/⌘ + /
|
||||
</span>
|
||||
<span class="kbd-shortcut__details">Single line comment</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
28
app/partials/login-modal.html
Normal file
28
app/partials/login-modal.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<a d-click="onModalCloseBtnClick" href="" aria-label="Close Login modal" title="Close" class="js-modal__close-btn modal__close-btn">
|
||||
<svg>
|
||||
<use xlink:href="#cross-icon"></use>
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
<h2>Login / Signup</h2>
|
||||
|
||||
<div>
|
||||
<p>
|
||||
<button class="btn btn-icon btn--big full-width social-login-btn--github" data-auth-provider="github">
|
||||
<svg><use xlink:href="#github-icon"></use></svg>Login with Github
|
||||
</button>
|
||||
</p>
|
||||
<p>
|
||||
<button d-click="login" class="btn btn-icon btn--big full-width social-login-btn--google" data-auth-provider="google">
|
||||
<svg><use xlink:href="#google-icon"></use></svg>Login with Google
|
||||
</button>
|
||||
</p>
|
||||
<p class="mb-2">
|
||||
<button d-click="login" class="btn btn-icon btn--big full-width social-login-btn--facebook" data-auth-provider="facebook">
|
||||
<svg><use xlink:href="#fb-icon"></use></svg>Login with Facebook
|
||||
</button>
|
||||
</p>
|
||||
<p>
|
||||
Join a community of 50,000+ Developers
|
||||
</p>
|
||||
</div>
|
53
app/partials/onboard-modal.html
Normal file
53
app/partials/onboard-modal.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<div class="tac">
|
||||
<svg width="130px" height="50px">
|
||||
<use xlink:href="#logo" />
|
||||
</svg>
|
||||
<h1 style="margin-top:20px">Welcome to Web Maker</h1>
|
||||
</div>
|
||||
|
||||
<div class="flex" style="margin-top;: 100px;">
|
||||
<div class="onboard-step">
|
||||
<div class="tac">
|
||||
<svg class="onboard-step__icon" viewBox="0 0 24 24">
|
||||
<path d="M13.64,21.97C13.14,22.21 12.54,22 12.31,21.5L10.13,16.76L7.62,18.78C7.45,18.92 7.24,19 7,19A1,1 0 0,1 6,18V3A1,1 0 0,1 7,2C7.24,2 7.47,2.09 7.64,2.23L7.65,2.22L19.14,11.86C19.57,12.22 19.62,12.85 19.27,13.27C19.12,13.45 18.91,13.57 18.7,13.61L15.54,14.23L17.74,18.96C18,19.46 17.76,20.05 17.26,20.28L13.64,21.97Z"
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
<p>
|
||||
Open Web Maker anytime by clicking the
|
||||
<svg class="relative" style="top:5px;" width="40" height="30">
|
||||
<use xlink:href="#logo" />
|
||||
</svg> button in top-right side of your browser.
|
||||
</p>
|
||||
</div>
|
||||
<div class="onboard-step">
|
||||
<div class="tac">
|
||||
<svg class="onboard-step__icon" viewBox="0 0 24 24">
|
||||
<use xlink:href="#settings-icon"></use>
|
||||
</svg>
|
||||
</div>
|
||||
<p>
|
||||
Configure and customize settings by clicking the gear icon (
|
||||
<svg style="width:18px;height:18px;position:relative;top:3px;fill:#888"
|
||||
viewBox="0 0 24 24">
|
||||
<use xlink:href="#settings-icon"></use>
|
||||
</svg>) in bottom right of the app.
|
||||
</p>
|
||||
</div>
|
||||
<div class="onboard-step">
|
||||
<div class="tac">
|
||||
<svg class="onboard-step__icon" style="stroke-width:0.2px;">
|
||||
<use xlink:href="#twitter-icon"></use>
|
||||
</svg>
|
||||
</div>
|
||||
<p>
|
||||
Follow <a href="https://twitter.com/intent/follow?screen_name=webmakerApp">@webmakerApp</a> to know about the new upcoming
|
||||
features!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="tac">
|
||||
<button class="btn" d-click="closeAllOverlays">Lets start!</button>
|
||||
</p>
|
1
app/script.js
Normal file
1
app/script.js
Normal file
File diff suppressed because one or more lines are too long
268
app/service-worker.js
Normal file
268
app/service-worker.js
Normal file
File diff suppressed because one or more lines are too long
1
app/style.css
Normal file
1
app/style.css
Normal file
File diff suppressed because one or more lines are too long
3
app/vendor.css
Normal file
3
app/vendor.css
Normal file
File diff suppressed because one or more lines are too long
1
app/vendor.js
Normal file
1
app/vendor.js
Normal file
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# RUN PRETTIER
|
||||
jsjsonfiles=$(git diff --staged --name-only | grep ".*\.\(js\|json\)")
|
||||
echo "$jsjsonfiles" | xargs ./node_modules/.bin/prettier --single-quote --use-tabs --write
|
||||
echo "$jsjsonfiles" | xargs git add
|
||||
filesToPrettify=$(git diff --staged --name-only | grep ".*\.\(js\|json\|css\|md\)")
|
||||
echo "$fileToPrettify" | xargs ./node_modules/.bin/prettier --single-quote --use-tabs --write
|
||||
echo "$fileToPrettify" | xargs git add
|
||||
|
||||
# Fetch .js or .json filed from staged files
|
||||
jsfiles=$(git diff --staged --name-only --diff-filter=ACM | grep '\.js$')
|
||||
@@ -11,7 +11,7 @@ jsfiles=$(git diff --staged --name-only --diff-filter=ACM | grep '\.js$')
|
||||
[ -z "$jsfiles" ] && exit 0
|
||||
|
||||
# ESLINT CHECK
|
||||
eslintresult=$(./node_modules/.bin/eslint --ignore-pattern '/src/lib/*' --color $jsfiles --quiet)
|
||||
eslintresult=$(./node_modules/.bin/eslint --ignore-pattern '/src/lib/*' --fix --color $jsfiles --quiet)
|
||||
|
||||
if [[ $eslintresult != "" ]]; then
|
||||
echo "$eslintresult"
|
||||
|
77
gulpfile.js
Normal file
77
gulpfile.js
Normal file
@@ -0,0 +1,77 @@
|
||||
/*eslint-env node*/
|
||||
|
||||
const fs = require('fs');
|
||||
const gulp = require('gulp');
|
||||
const useref = require('gulp-useref');
|
||||
const cleanCSS = require('gulp-clean-css');
|
||||
const babelMinify = require('babel-minify');
|
||||
|
||||
function minifyJs(fileName) {
|
||||
const content = fs.readFileSync(fileName, "utf8");
|
||||
const minifiedContent = babelMinify(content).code;
|
||||
fs.writeFileSync(fileName, minifiedContent);
|
||||
console.log(`[${fileName}]: ${content.length}kb -> ${minifiedContent.length}kb`)
|
||||
}
|
||||
gulp.task('copyFiles', [], function() {
|
||||
gulp
|
||||
.src('src/lib/codemirror/theme/*')
|
||||
.pipe(gulp.dest('app/lib/codemirror/theme'));
|
||||
gulp
|
||||
.src('src/lib/codemirror/mode/**/*')
|
||||
.pipe(gulp.dest('app/lib/codemirror/mode'));
|
||||
gulp
|
||||
.src('src/lib/transpilers/*')
|
||||
.pipe(gulp.dest('app/lib/transpilers'));
|
||||
gulp.src('src/partials/*').pipe(gulp.dest('app/partials'));
|
||||
gulp.src('src/lib/screenlog.js').pipe(gulp.dest('app/lib'));
|
||||
gulp.src('src/icon-48.png').pipe(gulp.dest('app'));
|
||||
gulp
|
||||
.src([
|
||||
'src/FiraCode.ttf',
|
||||
'src/Fixedsys.ttf',
|
||||
'src/Inconsolata.ttf',
|
||||
'src/Monoid.ttf'
|
||||
])
|
||||
.pipe(gulp.dest('app'));
|
||||
});
|
||||
|
||||
gulp.task('useRef', ['copyFiles'], function() {
|
||||
return gulp
|
||||
.src('src/index.html')
|
||||
.pipe(useref())
|
||||
.pipe(gulp.dest('app'));
|
||||
});
|
||||
|
||||
gulp.task('minify', ['useRef'], function() {
|
||||
minifyJs('app/script.js');
|
||||
minifyJs('app/vendor.js');
|
||||
minifyJs('app/lib/screenlog.js');
|
||||
|
||||
gulp.src('app/*.css')
|
||||
.pipe(cleanCSS({ debug: true }, (details) => {
|
||||
console.log(`${details.name}: ${details.stats.originalSize}`);
|
||||
console.log(`${details.name}: ${details.stats.minifiedSize}`);
|
||||
}))
|
||||
.pipe(gulp.dest('app'));
|
||||
});
|
||||
|
||||
gulp.task('generate-service-worker', ['minify'], function(callback) {
|
||||
var swPrecache = require('sw-precache');
|
||||
var rootDir = 'app';
|
||||
|
||||
swPrecache.write(
|
||||
`${rootDir}/service-worker.js`,
|
||||
{
|
||||
staticFileGlobs: [
|
||||
rootDir + '/**/*.{js,html,css,png,jpg,gif,svg,eot,ttf,woff}'
|
||||
],
|
||||
stripPrefix: `${rootDir}/`,
|
||||
|
||||
// has to be increased to around 2.8mb for sass.worker.js
|
||||
maximumFileSizeToCacheInBytes: 2900000
|
||||
},
|
||||
callback
|
||||
);
|
||||
});
|
||||
|
||||
gulp.task('default', ['generate-service-worker']);
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user