79 lines
39 KiB
JSON
79 lines
39 KiB
JSON
|
|
{
|
||
|
|
"tiddlers": {
|
||
|
|
"$:/config/codemirror/autocomplete": {
|
||
|
|
"title": "$:/config/codemirror/autocomplete",
|
||
|
|
"text": "{\n\t\"Ctrl-Space\": \"autocomplete\"\n}",
|
||
|
|
"type": "json",
|
||
|
|
"created": "20210328004023360",
|
||
|
|
"extend": "extraKeys",
|
||
|
|
"modified": "20210328004023360"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/addon/hint/anyword-hint.js": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/addon/hint/anyword-hint.js",
|
||
|
|
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n(function (mod) {\n\tif (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n\t\tmod(require(\"../../lib/codemirror\"));\n\telse if (typeof define == \"function\" && define.amd) // AMD\n\t\tdefine([\"../../lib/codemirror\"], mod);\n\telse // Plain browser env\n\t\tmod(CodeMirror);\n})(function (CodeMirror) {\n\t\"use strict\";\n\n\tCodeMirror.registerHelper('hint', 'anyword', function (editor) {\n\t\tvar cur = editor.getCursor();\n\t\tvar curLine = editor.getLine(cur.line);\n\t\tvar start = cur.ch;\n\t\tvar end = start;\n\t\tvar max_length = 30\n\n\t\tvar escapeChars = ['.', ']', '}', '>']\n\t\tvar stopChars = ['[', '{', '|', '\"']\n\n\t\twhile (start) {\n\t\t\tvar ch = curLine.charAt(start - 1)\n\t\t\tif (end - start > max_length || escapeChars.includes(ch)) {\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tif (!(stopChars.includes(ch))) {\n\t\t\t\tstart--;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tvar curWord = start !== end && curLine.slice(start, end);\n\t\tif (curLine.charAt(start) == '$') {\n\t\t\treturn {\n\t\t\t\tlist: $tw.wiki.filterTiddlers(`[all[tiddlers]search:title:literal[${curWord}]!prefix[$:/state]]`),\n\t\t\t\tfrom: CodeMirror.Pos(cur.line, start),\n\t\t\t\tto: CodeMirror.Pos(cur.line, end)\n\t\t\t}\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tlist: $tw.wiki.filterTiddlers(`[all[tiddlers]!is[system]!is[shadow]search:title:literal[${curWord}]!prefix[$:/state]]`),\n\t\t\t\tfrom: CodeMirror.Pos(cur.line, start),\n\t\t\t\tto: CodeMirror.Pos(cur.line, end)\n\t\t\t}\n\t\t}\n\t})\n});",
|
||
|
|
"created": "20210328004232522",
|
||
|
|
"modified": "20210328010801763",
|
||
|
|
"module-type": "codemirror",
|
||
|
|
"type": "application/javascript"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/addon/hint/show-hint.css": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/addon/hint/show-hint.css",
|
||
|
|
"text": ".CodeMirror-hints {\n position: absolute;\n z-index: 10;\n overflow: hidden;\n list-style: none;\n\n margin: 0;\n padding: 2px;\n\n -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n border-radius: 3px;\n border: 1px solid silver;\n\n background: white;\n font-size: 90%;\n font-family: monospace;\n\n max-height: 20em;\n overflow-y: auto;\n}\n\n.CodeMirror-hint {\n margin: 0;\n padding: 0 4px;\n border-radius: 2px;\n white-space: pre;\n color: black;\n cursor: pointer;\n}\n\nli.CodeMirror-hint-active {\n background: #08f;\n color: white;\n}\n",
|
||
|
|
"created": "20210328012141944",
|
||
|
|
"modified": "20210328012141944",
|
||
|
|
"tags": "$:/tags/Stylesheet",
|
||
|
|
"type": "text/css"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/addon/hint/show-hint.js": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/addon/hint/show-hint.js",
|
||
|
|
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n! function (t) {\n \"object\" == typeof exports && \"object\" == typeof module ? t(require(\"../../lib/codemirror\")) : \"function\" == typeof define && define.amd ? define([\"../../lib/codemirror\"], t) : t(CodeMirror)\n}(function (W) {\n \"use strict\";\n var I = \"CodeMirror-hint-active\";\n\n function o(t, i) {\n this.cm = t, this.options = i, this.widget = null, this.debounce = 0, this.tick = 0, this.startPos = this.cm.getCursor(\"start\"), this.startLen = this.cm.getLine(this.startPos.line).length - this.cm.getSelection().length;\n var e = this;\n t.on(\"cursorActivity\", this.activityFunc = function () {\n e.cursorActivity()\n })\n }\n W.showHint = function (t, i, e) {\n if (!i) return t.showHint(e);\n e && e.async && (i.async = !0);\n var n = {\n hint: i\n };\n if (e)\n for (var o in e) n[o] = e[o];\n return t.showHint(n)\n }, W.defineExtension(\"showHint\", function (t) {\n t = function (t, i, e) {\n var n = t.options.hintOptions,\n o = {};\n for (var s in l) o[s] = l[s];\n if (n)\n for (var s in n) void 0 !== n[s] && (o[s] = n[s]);\n if (e)\n for (var s in e) void 0 !== e[s] && (o[s] = e[s]);\n o.hint.resolve && (o.hint = o.hint.resolve(t, i));\n return o\n }(this, this.getCursor(\"start\"), t);\n var i = this.listSelections();\n if (!(1 < i.length)) {\n if (this.somethingSelected()) {\n if (!t.hint.supportsSelection) return;\n for (var e = 0; e < i.length; e++)\n if (i[e].head.line != i[e].anchor.line) return\n }\n this.state.completionActive && this.state.completionActive.close();\n var n = this.state.completionActive = new o(this, t);\n n.options.hint && (W.signal(this, \"startCompletion\", this), n.update(!0))\n }\n }), W.defineExtension(\"closeHint\", function () {\n this.state.completionActive && this.state.completionActive.close()\n });\n var s = window.requestAnimationFrame || function (t) {\n return setTimeout(t, 1e3 / 60)\n },\n c = window.cancelAnimationFrame || clearTimeout;\n\n function B(t) {\n return \"string\" == typeof t ? t : t.text\n }\n\n function K(t, i) {\n for (; i && i != t;) {\n if (\"LI\" === i.nodeName.toUpperCase() && i.parentNode == t) return i;\n i = i.parentNode\n }\n }\n\n function n(o, t) {\n this.completion = o, this.data = t, this.picked = !1;\n var e = this,\n s = o.cm,\n c = s.getInputField().ownerDocument,\n r = c.defaultView || c.parentWindow,\n l = this.hints = c.createElement(\"ul\"),\n i = o.cm.options.theme;\n l.className = \"CodeMirror-hints \" + i, this.selectedHint = t.selectedHint || 0;\n for (var n = t.list, h = 0; h < n.length; ++h) {\n var a = l.appendChild(c.createElement(\"li\")),\n u = n[h],\n f = \"CodeMirror-hint\" + (h != this.selectedHint ? \"\" : \" \" + I);\n null != u.className && (f = u.className + \" \" + f), a.className = f, u.render ? u.render(a, t, u) : a.appendChild(c.createTextNode(u.displayText || B(u))), a.hintId = h\n }\n var p, d, m, g = o.options.container || c.body,\n v = s.cursorCoords(o.options.alignWithWord ? t.from : null),\n y = v.left,\n w = v.bottom,\n H = !0,\n C = 0,\n b = 0;\n g !== c.body && (d = (p = -1 !== [\"absolute\", \"relative\", \"fixed\"].indexOf(r.getComputedStyle(g).position) ? g : g.offsetParent).getBoundingClientRect(), m = c.body.getBoundingClientRect(), C = d.left - m.left - p.scroll
|
||
|
|
"created": "20210328012150088",
|
||
|
|
"modified": "20210328012150088",
|
||
|
|
"module-type": "codemirror",
|
||
|
|
"type": "application/javascript"
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/mode/tw5/tw5.css": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/mode/tw5/tw5.css",
|
||
|
|
"created": "20200815103937889",
|
||
|
|
"modified": "20210328054714579",
|
||
|
|
"module-type": "codemirror-theme",
|
||
|
|
"name": "cmplus",
|
||
|
|
"tags": "$:/tags/Stylesheet",
|
||
|
|
"type": "text/vnd.tiddlywiki",
|
||
|
|
"text": "```\n/*\nTiddlywiki Metadata\n----\nName: $:/plugins/tiddlywiki/codemirror/mode/tw5/tw5.css\n\nAdditional Fields - \nmodule-type: codemirror-theme\nname: cmplus\n*/\n```\n\n.cm-s-cmplus{\n line-height: 1.5em;\n background: <<colour tiddler-editor-background>> !important;\n color: <<colour foreground>> !important;\n}\n\n.cm-s-cmplus .CodeMirror-lines {\n padding: 8px 0;\n}\n\n.cm-s-cmplus .CodeMirror-linenumber {\n color: <<cmcolour linenumber>>;\n}\n\n.cm-s-cmplus .CodeMirror-gutters {\n background-color: <<colour page-background>>;\n padding-right: 10px;\n z-index: 3;\n border: none;\n}\n\n.cm-s-cmplus div.CodeMirror-cursor {\n border-left: 3px solid <<colour very-muted-foreground>>;\n}\n\n.cm-s-cmplus .CodeMirror-activeline-background {\n background: <<colour tiddler-editor-fields-even>>;\n}\n\n.cm-s-cmplus .CodeMirror-selected {\n background: <<cmcolour selected>> !important;\n}\n\n.cm-s-cmplus .cm-comment {\n font-style: italic;\n color: <<colour muted-foreground>>;\n}\n\n.cm-s-cmplus .CodeMirror-matchingbracket {\n text-decoration: underline;\n color: <<cmcolour matching-bracket>> !important;\n}\n\n.cm-s-cmplus .cm-strikethrough {\n text-decoration-color: <<colour very-muted-foreground>>; \n}\n\n.cm-s-cmplus .cm-underlined {\n text-decoration-line: underline;\n text-decoration-style: solid;\n text-decoration-color: <<colour very-muted-foreground>>;\n}\n\n.cm-s-cmplus .cm-superscript {\n vertical-align: super;\n font-size: 0.7em;\n line-height: 0.1em;\n}\n\n.cm-s-cmplus .cm-subscript {\n font-size: 0.7em;\n line-height: 0.5;\n}\n\n.cm-s-cmplus .cm-macro {\n color: <<cmcolour macro>>;\n font-family: {{$:/themes/tiddlywiki/vanilla/settings/codefontfamily}};\n}\n\n.cm-s-cmplus .cm-keyword {\n color: <<cmcolour keyword>>;\n font-family: {{$:/themes/tiddlywiki/vanilla/settings/codefontfamily}};\n font-weight: 600;\n}\n\n.cm-s-cmplus .cm-quote {\n font-style: italic;\n padding-left: 0.6em;\n border-left: <<cmcolour quote>> solid 0.2em;\n}\n\n.cm-s-cmplus .cm-hr {\n color: <<cmcolour hr>>;\n}\n\n.cm-s-cmplus .cm-h1 {\n color: <<cmcolour h1>>;\n font-weight: 700;\n font-size: 1.383em;\n line-height: 1.802em;\n}\n\n.cm-s-cmplus .cm-h2 {\n color: <<cmcolour h2>>;\n font-weight: 600;\n font-size: 1.296em;\n line-height: 1.602em;\n}\n\n.cm-s-cmplus .cm-h3 {\n color: <<cmcolour h3>>;\n font-weight: 500;\n font-size: 1.215em;\n line-height: 1.424em;\n}\n\n.cm-s-cmplus .cm-h4 {\n color: <<cmcolour h4>>;\n font-weight: 400;\n font-size: 1.138em;\n line-height: 1.266em;\n}\n\n.cm-s-cmplus .cm-h5 {\n color: <<cmcolour h5>>;\n font-weight: 400;\n font-size: 1.067em;\n line-height: 1.125em;\n}\n\n.cm-s-cmplus .cm-h6 {\n color: <<cmcolour h6>>;\n font-weight: 400;\n}\n\n.cm-s-cmplus .cm-link {\n color: <<cmcolour link>>;\n text-decoration: none;\n font-weight: 600;\n}\n\n.cm-s-cmplus .cm-internallink {\n color: <<cmcolour internallink>>;\n font-weight:600;\n}\n\n.cm-s-cmplus .cm-externallink {\n color: <<cmcolour externallink>>;\n text-decoration: underline;\n}\n\n.cm-s-cmplus .cm-transclude {\n color: <<cmcolour transclude>>;\n}\n\n.cm-s-cmplus .cm-pre {\n color: <<cmcolour pre>>;\t\t\n font-family: {{$:/plugins/adithyab/cmplus/settings##monospace-font}};\n}\n\n.cm-s-cmplus .cm-monospace {\n color: <<cmcolour monospace>>;\n font-family: {{$:/plugins/adithyab/cmplus/settings##monospace-font}};\n}\n\n.cm-s-cmplus .cm-list1 {\n color: <<cmcolour list1>>;\n padding-left: 1em;\n padding-right: 0.5em;\n font-family: {{$:/themes/tiddlywiki/vanilla/settings/codefontfamily}};\n}\n\n.cm-s-cmplus .cm-list2 {\n color: <<cmcolour list2>>;\n padding-left: 2em;\n padding-right: 0.5em;\n font-family: {{$:/themes/tiddlywiki/vanilla/settings/codefontfamily}};\n}\n\n.cm-s-cmplus .cm-list3 {\n color: <<cmcolour list3>>;\n padding-left: 3em;\n padding-right: 0.5em;\n font-family: {{$:/themes/tiddlyw
|
||
|
|
},
|
||
|
|
"$:/plugins/tiddlywiki/codemirror/mode/tw5/tw5.js": {
|
||
|
|
"title": "$:/plugins/tiddlywiki/codemirror/mode/tw5/tw5.js",
|
||
|
|
"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: https://codemirror.net/LICENSE\n\n/***\n\n|''Name''|tw5.js|\n|''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror|\n|''Original Contributor''|PMario|\n|''Author''|[[adithya-badidey|https://github.com/adithya-badidey]]|\n|''Version''|0.1.8|\n|''Status''|''stable''|\n|''Source''|[[GitHub|https://github.com/adithya-badidey/TW5-codemirror-plus]]|\n|''Documentation''|https://codemirror.tiddlyspace.com/|\n|''License''|[[MIT License|http://www.opensource.org/licenses/mit-license.php]]|\n|''Requires''|codemirror.js|\n|''Keywords''|syntax highlighting color code mirror codemirror|\n\n!! Tiddlywiki Metadata\nName: $:/plugins/tiddlywiki/codemirror/mode/tw5/tw5.js\nType: application/javascript\nAdditional Field:\nmodule-type: codemirror\n \nInfo: CoreVersion parameter is needed for TiddlyWiki only!\n\n***/\n\n(function (mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function (CodeMirror) {\n \"use strict\";\n\n CodeMirror.defineMode(\"tiddlywiki5\", function () {\n // Tokenizer\n var textwords = {};\n\n var keywords = {\n \"changecount\": true, \"colour\": true,\n \"colour-picker\": true, \"contrastcolour\": true,\n \"copy-to-clipboard\": true, \"csvtiddlers\": true,\n \"datauri\": true, \"dumpvariables\": true,\n \"image-picker\": true, \"jsontiddler\": true,\n \"jsontiddlers\": true, \"lingo\": true,\n \"list-links\": true, \"list-links-draggable\": true,\n \"list-tagged-draggable\": true, \"list-thumbnails\": true,\n \"makedatauri\": true, \"now\": true,\n \"qualify\": true, \"resolvepath\": true,\n \"box-shadow\": true, \"filter\": true,\n \"transition\": true, \"background-linear-gradient\": true,\n \"transform-origin\": true, \"toc\": true,\n \"toc-expandable\": true, \"toc-selective-expandable\": true,\n \"toc-tabbed-internal-nav\": true, \"toc-tabbed-external-nav\": true,\n \"tabs\": true, \"tag\": true,\n \"tag-picker\": true, \"tag-pill\": true,\n \"thumbnail\": true, \"timeline\": true,\n \"tree\": true, \"unusedtitle\": true,\n \"version\": true\n };\n\n var isSpaceName = /[\\w_\\-]/i,\n reHR = /^\\-\\-\\-\\-+$/, // <hr>\n reBlockQuote = /^<<</,\n rePreStart = /^```$/;\n\n function chain(stream, state, f) {\n state.tokenize = f;\n return f(stream, state);\n }\n\n function tokenBase(stream, state) {\n var sol = stream.sol(), // sol() -> Returns true only if the stream is at the start of the line.\n ch = stream.peek(); // Returns the next character in the stream without advancing it. Will return a null at the end of the line.\n\n // check start of blocks\n if (sol && /[<\\/\\*{}\\-`]/.test(ch)) { //is at the start of a line and the next char is not\n if (stream.match(reBlockQuote)) {\n return chain(stream, state, twTokenQuote);\n }\n \n if (stream.match(reHR))\n return 'hr';\n\n if (stream.match(rePreStart))\n return chain(stream, state, twTokenPre);\n }\n\n stream.next();\n if (sol && /[\\/\\*!#;:>|]/.test(ch)) {\n if (ch == \"!\") { // tw header\n var count = 1;\n while (stream.eat('!'))\n count++;\n stream.skipToEnd();\n return \"h\" +
|
||
|
|
"created": "20200818164318584",
|
||
|
|
"modified": "20210327052450347",
|
||
|
|
"module-type": "codemirror",
|
||
|
|
"revision": "1",
|
||
|
|
"type": "application/javascript"
|
||
|
|
},
|
||
|
|
"$:/plugins/adithyab/cmplus/macros": {
|
||
|
|
"title": "$:/plugins/adithyab/cmplus/macros",
|
||
|
|
"created": "20210328020051916",
|
||
|
|
"modified": "20210328053732117",
|
||
|
|
"tags": "$:/tags/Macro",
|
||
|
|
"type": "text/vnd.tiddlywiki",
|
||
|
|
"text": "\\define cmcolour(name)\n{{$:/plugins/adithyab/cmplus/settings##$name$}}\n\\end"
|
||
|
|
},
|
||
|
|
"$:/plugins/adithyab/cmplus/readme": {
|
||
|
|
"title": "$:/plugins/adithyab/cmplus/readme",
|
||
|
|
"created": "20210328060842133",
|
||
|
|
"modified": "20210328060929665",
|
||
|
|
"tags": "",
|
||
|
|
"type": "text/vnd.tiddlywiki",
|
||
|
|
"text": "!! TW5 CodeMirrorPlus\nTowards making a better editor for TiddlyWiki5.\n"
|
||
|
|
},
|
||
|
|
"$:/plugins/adithyab/cmplus/settings": {
|
||
|
|
"title": "$:/plugins/adithyab/cmplus/settings",
|
||
|
|
"text": "monospace-font:monospace,\"Courier New\"\nselected:rgba(100,100,100,0.3)\nlinenumber:<<colour primary>>\nkeyword:<<colour code-foreground>>\nmacro:<<colour code-foreground>>\nquote:<<colour primary>>\npre:<<colour foreground>>\nexternallink:<<colour external-link-foreground>>\ninternallink:<<colour tiddler-title-foreground>>\nlink:<<colour tiddler-title-foreground>>\ntransclude:<<colour tiddler-title-foreground>>\nmonospace:<<colour foreground>>\nlist1:<<colour primary>>\nlist2:<<colour primary>>\nlist3:<<colour primary>>\nlist4:<<colour primary>>\nlist5:<<colour primary>>\nlist6:<<colour primary>>\nh1:<<colour primary>>\nh2:<<colour primary>>\nh3:<<colour primary>>\nh4:<<colour primary>>\nh5:<<colour primary>>\nh6:<<colour primary>>\nhr:<<colour primary>>",
|
||
|
|
"type": "application/x-tiddler-dictionary",
|
||
|
|
"created": "20210328015904035",
|
||
|
|
"modified": "20210328054754059",
|
||
|
|
"tags": ""
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|