@muze-nl/simplystore 0.3.6 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/package.json~ +33 -0
- package/src/server.mjs +68 -61
- package/www/codemirror/addon/comment/comment.js +0 -211
- package/www/codemirror/addon/comment/continuecomment.js +0 -114
- package/www/codemirror/addon/dialog/dialog.css +0 -32
- package/www/codemirror/addon/dialog/dialog.js +0 -163
- package/www/codemirror/addon/display/autorefresh.js +0 -47
- package/www/codemirror/addon/display/fullscreen.css +0 -6
- package/www/codemirror/addon/display/fullscreen.js +0 -41
- package/www/codemirror/addon/display/panel.js +0 -133
- package/www/codemirror/addon/display/placeholder.js +0 -78
- package/www/codemirror/addon/display/rulers.js +0 -51
- package/www/codemirror/addon/edit/closebrackets.js +0 -201
- package/www/codemirror/addon/edit/closetag.js +0 -185
- package/www/codemirror/addon/edit/continuelist.js +0 -101
- package/www/codemirror/addon/edit/matchbrackets.js +0 -160
- package/www/codemirror/addon/edit/matchtags.js +0 -66
- package/www/codemirror/addon/edit/trailingspace.js +0 -27
- package/www/codemirror/addon/fold/brace-fold.js +0 -119
- package/www/codemirror/addon/fold/comment-fold.js +0 -59
- package/www/codemirror/addon/fold/foldcode.js +0 -159
- package/www/codemirror/addon/fold/foldgutter.css +0 -20
- package/www/codemirror/addon/fold/foldgutter.js +0 -169
- package/www/codemirror/addon/fold/indent-fold.js +0 -48
- package/www/codemirror/addon/fold/markdown-fold.js +0 -49
- package/www/codemirror/addon/fold/xml-fold.js +0 -184
- package/www/codemirror/addon/hint/anyword-hint.js +0 -41
- package/www/codemirror/addon/hint/css-hint.js +0 -66
- package/www/codemirror/addon/hint/html-hint.js +0 -351
- package/www/codemirror/addon/hint/javascript-hint.js +0 -162
- package/www/codemirror/addon/hint/show-hint.css +0 -37
- package/www/codemirror/addon/hint/show-hint.js +0 -523
- package/www/codemirror/addon/hint/sql-hint.js +0 -304
- package/www/codemirror/addon/hint/xml-hint.js +0 -132
- package/www/codemirror/addon/lint/coffeescript-lint.js +0 -47
- package/www/codemirror/addon/lint/css-lint.js +0 -40
- package/www/codemirror/addon/lint/html-lint.js +0 -59
- package/www/codemirror/addon/lint/json-lint.js +0 -40
- package/www/codemirror/addon/lint/yaml-lint.js +0 -41
- package/www/codemirror/addon/merge/merge.css +0 -119
- package/www/codemirror/addon/merge/merge.js +0 -1018
- package/www/codemirror/addon/mode/loadmode.js +0 -66
- package/www/codemirror/addon/mode/multiplex.js +0 -136
- package/www/codemirror/addon/mode/multiplex_test.js +0 -49
- package/www/codemirror/addon/mode/overlay.js +0 -90
- package/www/codemirror/addon/mode/simple.js +0 -216
- package/www/codemirror/addon/runmode/colorize.js +0 -40
- package/www/codemirror/addon/runmode/runmode-standalone.js +0 -334
- package/www/codemirror/addon/runmode/runmode.js +0 -76
- package/www/codemirror/addon/runmode/runmode.node.js +0 -329
- package/www/codemirror/addon/scroll/annotatescrollbar.js +0 -128
- package/www/codemirror/addon/scroll/scrollpastend.js +0 -48
- package/www/codemirror/addon/scroll/simplescrollbars.css +0 -66
- package/www/codemirror/addon/scroll/simplescrollbars.js +0 -152
- package/www/codemirror/addon/search/jump-to-line.js +0 -53
- package/www/codemirror/addon/search/match-highlighter.js +0 -167
- package/www/codemirror/addon/search/matchesonscrollbar.css +0 -8
- package/www/codemirror/addon/search/matchesonscrollbar.js +0 -97
- package/www/codemirror/addon/search/search.js +0 -295
- package/www/codemirror/addon/search/searchcursor.js +0 -305
- package/www/codemirror/addon/selection/active-line.js +0 -72
- package/www/codemirror/addon/selection/mark-selection.js +0 -119
- package/www/codemirror/addon/selection/selection-pointer.js +0 -98
- package/www/codemirror/addon/tern/tern.css +0 -87
- package/www/codemirror/addon/tern/tern.js +0 -756
- package/www/codemirror/addon/tern/worker.js +0 -44
- package/www/codemirror/addon/wrap/hardwrap.js +0 -160
- package/www/codemirror/bin/source-highlight +0 -48
- package/www/codemirror/keymap/emacs.js +0 -545
- package/www/codemirror/keymap/sublime.js +0 -720
- package/www/codemirror/keymap/vim.js +0 -5978
- package/www/codemirror/mode/apl/apl.js +0 -174
- package/www/codemirror/mode/asciiarmor/asciiarmor.js +0 -74
- package/www/codemirror/mode/asn.1/asn.1.js +0 -204
- package/www/codemirror/mode/asterisk/asterisk.js +0 -220
- package/www/codemirror/mode/brainfuck/brainfuck.js +0 -85
- package/www/codemirror/mode/clike/clike.js +0 -940
- package/www/codemirror/mode/clojure/clojure.js +0 -292
- package/www/codemirror/mode/cmake/cmake.js +0 -97
- package/www/codemirror/mode/cobol/cobol.js +0 -255
- package/www/codemirror/mode/coffeescript/coffeescript.js +0 -359
- package/www/codemirror/mode/commonlisp/commonlisp.js +0 -125
- package/www/codemirror/mode/crystal/crystal.js +0 -433
- package/www/codemirror/mode/css/css.js +0 -862
- package/www/codemirror/mode/cypher/cypher.js +0 -152
- package/www/codemirror/mode/d/d.js +0 -223
- package/www/codemirror/mode/dart/dart.js +0 -166
- package/www/codemirror/mode/diff/diff.js +0 -47
- package/www/codemirror/mode/django/django.js +0 -356
- package/www/codemirror/mode/dockerfile/dockerfile.js +0 -211
- package/www/codemirror/mode/dtd/dtd.js +0 -142
- package/www/codemirror/mode/dylan/dylan.js +0 -352
- package/www/codemirror/mode/ebnf/ebnf.js +0 -195
- package/www/codemirror/mode/ecl/ecl.js +0 -206
- package/www/codemirror/mode/eiffel/eiffel.js +0 -160
- package/www/codemirror/mode/elm/elm.js +0 -245
- package/www/codemirror/mode/erlang/erlang.js +0 -619
- package/www/codemirror/mode/factor/factor.js +0 -85
- package/www/codemirror/mode/fcl/fcl.js +0 -173
- package/www/codemirror/mode/forth/forth.js +0 -180
- package/www/codemirror/mode/fortran/fortran.js +0 -188
- package/www/codemirror/mode/gas/gas.js +0 -353
- package/www/codemirror/mode/gfm/gfm.js +0 -129
- package/www/codemirror/mode/gherkin/gherkin.js +0 -178
- package/www/codemirror/mode/go/go.js +0 -187
- package/www/codemirror/mode/groovy/groovy.js +0 -247
- package/www/codemirror/mode/haml/haml.js +0 -161
- package/www/codemirror/mode/handlebars/handlebars.js +0 -70
- package/www/codemirror/mode/haskell/haskell.js +0 -268
- package/www/codemirror/mode/haskell-literate/haskell-literate.js +0 -43
- package/www/codemirror/mode/haxe/haxe.js +0 -515
- package/www/codemirror/mode/htmlembedded/htmlembedded.js +0 -37
- package/www/codemirror/mode/htmlmixed/htmlmixed.js +0 -153
- package/www/codemirror/mode/http/http.js +0 -113
- package/www/codemirror/mode/idl/idl.js +0 -290
- package/www/codemirror/mode/jinja2/jinja2.js +0 -193
- package/www/codemirror/mode/jsx/jsx.js +0 -148
- package/www/codemirror/mode/julia/julia.js +0 -390
- package/www/codemirror/mode/livescript/livescript.js +0 -280
- package/www/codemirror/mode/lua/lua.js +0 -160
- package/www/codemirror/mode/markdown/markdown.js +0 -886
- package/www/codemirror/mode/mathematica/mathematica.js +0 -176
- package/www/codemirror/mode/mbox/mbox.js +0 -129
- package/www/codemirror/mode/meta.js +0 -221
- package/www/codemirror/mode/mirc/mirc.js +0 -193
- package/www/codemirror/mode/mllike/mllike.js +0 -359
- package/www/codemirror/mode/modelica/modelica.js +0 -245
- package/www/codemirror/mode/mscgen/mscgen.js +0 -175
- package/www/codemirror/mode/mumps/mumps.js +0 -148
- package/www/codemirror/mode/nginx/nginx.js +0 -178
- package/www/codemirror/mode/nsis/nsis.js +0 -95
- package/www/codemirror/mode/ntriples/ntriples.js +0 -195
- package/www/codemirror/mode/octave/octave.js +0 -139
- package/www/codemirror/mode/oz/oz.js +0 -252
- package/www/codemirror/mode/pascal/pascal.js +0 -136
- package/www/codemirror/mode/pegjs/pegjs.js +0 -111
- package/www/codemirror/mode/perl/perl.js +0 -836
- package/www/codemirror/mode/php/php.js +0 -234
- package/www/codemirror/mode/pig/pig.js +0 -178
- package/www/codemirror/mode/powershell/powershell.js +0 -398
- package/www/codemirror/mode/properties/properties.js +0 -78
- package/www/codemirror/mode/protobuf/protobuf.js +0 -72
- package/www/codemirror/mode/pug/pug.js +0 -591
- package/www/codemirror/mode/puppet/puppet.js +0 -220
- package/www/codemirror/mode/python/python.js +0 -402
- package/www/codemirror/mode/q/q.js +0 -139
- package/www/codemirror/mode/r/r.js +0 -190
- package/www/codemirror/mode/rpm/changes/index.html +0 -66
- package/www/codemirror/mode/rpm/rpm.js +0 -109
- package/www/codemirror/mode/rst/rst.js +0 -557
- package/www/codemirror/mode/ruby/ruby.js +0 -303
- package/www/codemirror/mode/rust/rust.js +0 -72
- package/www/codemirror/mode/sas/sas.js +0 -303
- package/www/codemirror/mode/sass/sass.js +0 -459
- package/www/codemirror/mode/scheme/scheme.js +0 -284
- package/www/codemirror/mode/shell/shell.js +0 -168
- package/www/codemirror/mode/sieve/sieve.js +0 -193
- package/www/codemirror/mode/slim/slim.js +0 -575
- package/www/codemirror/mode/smalltalk/smalltalk.js +0 -168
- package/www/codemirror/mode/smarty/smarty.js +0 -225
- package/www/codemirror/mode/solr/solr.js +0 -104
- package/www/codemirror/mode/soy/soy.js +0 -665
- package/www/codemirror/mode/sparql/sparql.js +0 -184
- package/www/codemirror/mode/spreadsheet/spreadsheet.js +0 -112
- package/www/codemirror/mode/sql/sql.js +0 -525
- package/www/codemirror/mode/stex/stex.js +0 -264
- package/www/codemirror/mode/stylus/stylus.js +0 -775
- package/www/codemirror/mode/swift/swift.js +0 -221
- package/www/codemirror/mode/tcl/tcl.js +0 -140
- package/www/codemirror/mode/textile/textile.js +0 -469
- package/www/codemirror/mode/tiddlywiki/tiddlywiki.css +0 -14
- package/www/codemirror/mode/tiddlywiki/tiddlywiki.js +0 -308
- package/www/codemirror/mode/tiki/tiki.css +0 -26
- package/www/codemirror/mode/tiki/tiki.js +0 -312
- package/www/codemirror/mode/toml/toml.js +0 -88
- package/www/codemirror/mode/tornado/tornado.js +0 -68
- package/www/codemirror/mode/troff/troff.js +0 -84
- package/www/codemirror/mode/ttcn/ttcn.js +0 -283
- package/www/codemirror/mode/ttcn-cfg/ttcn-cfg.js +0 -214
- package/www/codemirror/mode/turtle/turtle.js +0 -162
- package/www/codemirror/mode/twig/twig.js +0 -141
- package/www/codemirror/mode/vb/vb.js +0 -275
- package/www/codemirror/mode/vbscript/vbscript.js +0 -350
- package/www/codemirror/mode/velocity/velocity.js +0 -202
- package/www/codemirror/mode/verilog/verilog.js +0 -781
- package/www/codemirror/mode/vhdl/vhdl.js +0 -189
- package/www/codemirror/mode/vue/vue.js +0 -77
- package/www/codemirror/mode/wast/wast.js +0 -132
- package/www/codemirror/mode/webidl/webidl.js +0 -195
- package/www/codemirror/mode/xml/xml.js +0 -417
- package/www/codemirror/mode/xquery/xquery.js +0 -448
- package/www/codemirror/mode/yacas/yacas.js +0 -204
- package/www/codemirror/mode/yaml/yaml.js +0 -120
- package/www/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js +0 -72
- package/www/codemirror/mode/z80/z80.js +0 -116
- package/www/codemirror/rollup.config.js +0 -52
- package/www/codemirror/src/addon/runmode/codemirror-standalone.js +0 -24
- package/www/codemirror/src/addon/runmode/codemirror.node.js +0 -21
- package/www/codemirror/src/addon/runmode/runmode-standalone.js +0 -2
- package/www/codemirror/src/addon/runmode/runmode.node.js +0 -2
- package/www/codemirror/src/codemirror.js +0 -3
- package/www/codemirror/src/display/Display.js +0 -116
- package/www/codemirror/src/display/focus.js +0 -50
- package/www/codemirror/src/display/gutters.js +0 -44
- package/www/codemirror/src/display/highlight_worker.js +0 -55
- package/www/codemirror/src/display/line_numbers.js +0 -48
- package/www/codemirror/src/display/mode_state.js +0 -22
- package/www/codemirror/src/display/operations.js +0 -206
- package/www/codemirror/src/display/scroll_events.js +0 -132
- package/www/codemirror/src/display/scrollbars.js +0 -194
- package/www/codemirror/src/display/scrolling.js +0 -186
- package/www/codemirror/src/display/selection.js +0 -173
- package/www/codemirror/src/display/update_display.js +0 -267
- package/www/codemirror/src/display/update_line.js +0 -189
- package/www/codemirror/src/display/update_lines.js +0 -82
- package/www/codemirror/src/display/view_tracking.js +0 -153
- package/www/codemirror/src/edit/CodeMirror.js +0 -217
- package/www/codemirror/src/edit/commands.js +0 -178
- package/www/codemirror/src/edit/deleteNearSelection.js +0 -30
- package/www/codemirror/src/edit/drop_events.js +0 -130
- package/www/codemirror/src/edit/fromTextArea.js +0 -61
- package/www/codemirror/src/edit/global_events.js +0 -45
- package/www/codemirror/src/edit/key_events.js +0 -163
- package/www/codemirror/src/edit/legacy.js +0 -62
- package/www/codemirror/src/edit/main.js +0 -69
- package/www/codemirror/src/edit/methods.js +0 -555
- package/www/codemirror/src/edit/mouse_events.js +0 -417
- package/www/codemirror/src/edit/options.js +0 -194
- package/www/codemirror/src/edit/utils.js +0 -7
- package/www/codemirror/src/input/ContentEditableInput.js +0 -546
- package/www/codemirror/src/input/TextareaInput.js +0 -380
- package/www/codemirror/src/input/indent.js +0 -71
- package/www/codemirror/src/input/input.js +0 -134
- package/www/codemirror/src/input/keymap.js +0 -147
- package/www/codemirror/src/input/keynames.js +0 -17
- package/www/codemirror/src/input/movement.js +0 -111
- package/www/codemirror/src/line/highlight.js +0 -284
- package/www/codemirror/src/line/line_data.js +0 -349
- package/www/codemirror/src/line/pos.js +0 -40
- package/www/codemirror/src/line/saw_special_spans.js +0 -10
- package/www/codemirror/src/line/spans.js +0 -390
- package/www/codemirror/src/line/utils_line.js +0 -85
- package/www/codemirror/src/measurement/position_measurement.js +0 -702
- package/www/codemirror/src/measurement/widgets.js +0 -26
- package/www/codemirror/src/model/Doc.js +0 -436
- package/www/codemirror/src/model/change_measurement.js +0 -61
- package/www/codemirror/src/model/changes.js +0 -339
- package/www/codemirror/src/model/chunk.js +0 -167
- package/www/codemirror/src/model/document_data.js +0 -112
- package/www/codemirror/src/model/history.js +0 -228
- package/www/codemirror/src/model/line_widget.js +0 -78
- package/www/codemirror/src/model/mark_text.js +0 -293
- package/www/codemirror/src/model/selection.js +0 -84
- package/www/codemirror/src/model/selection_updates.js +0 -216
- package/www/codemirror/src/modes.js +0 -96
- package/www/codemirror/src/util/StringStream.js +0 -90
- package/www/codemirror/src/util/bidi.js +0 -215
- package/www/codemirror/src/util/browser.js +0 -34
- package/www/codemirror/src/util/dom.js +0 -101
- package/www/codemirror/src/util/event.js +0 -103
- package/www/codemirror/src/util/feature_detection.js +0 -84
- package/www/codemirror/src/util/misc.js +0 -168
- package/www/codemirror/src/util/operation_group.js +0 -72
- package/www/codemirror/theme/3024-day.css +0 -41
- package/www/codemirror/theme/3024-night.css +0 -39
- package/www/codemirror/theme/abbott.css +0 -268
- package/www/codemirror/theme/abcdef.css +0 -32
- package/www/codemirror/theme/ambiance-mobile.css +0 -5
- package/www/codemirror/theme/ambiance.css +0 -74
- package/www/codemirror/theme/ayu-dark.css +0 -44
- package/www/codemirror/theme/ayu-mirage.css +0 -45
- package/www/codemirror/theme/base16-dark.css +0 -40
- package/www/codemirror/theme/base16-light.css +0 -38
- package/www/codemirror/theme/bespin.css +0 -34
- package/www/codemirror/theme/blackboard.css +0 -32
- package/www/codemirror/theme/cobalt.css +0 -25
- package/www/codemirror/theme/colorforth.css +0 -33
- package/www/codemirror/theme/darcula.css +0 -53
- package/www/codemirror/theme/dracula.css +0 -40
- package/www/codemirror/theme/duotone-dark.css +0 -35
- package/www/codemirror/theme/duotone-light.css +0 -36
- package/www/codemirror/theme/eclipse.css +0 -23
- package/www/codemirror/theme/elegant.css +0 -13
- package/www/codemirror/theme/erlang-dark.css +0 -34
- package/www/codemirror/theme/gruvbox-dark.css +0 -39
- package/www/codemirror/theme/hopscotch.css +0 -34
- package/www/codemirror/theme/icecoder.css +0 -43
- package/www/codemirror/theme/idea.css +0 -42
- package/www/codemirror/theme/isotope.css +0 -34
- package/www/codemirror/theme/juejin.css +0 -30
- package/www/codemirror/theme/lesser-dark.css +0 -47
- package/www/codemirror/theme/liquibyte.css +0 -95
- package/www/codemirror/theme/lucario.css +0 -37
- package/www/codemirror/theme/material-darker.css +0 -135
- package/www/codemirror/theme/material-palenight.css +0 -141
- package/www/codemirror/theme/material.css +0 -141
- package/www/codemirror/theme/mbo.css +0 -37
- package/www/codemirror/theme/mdn-like.css +0 -46
- package/www/codemirror/theme/midnight.css +0 -39
- package/www/codemirror/theme/monokai.css +0 -41
- package/www/codemirror/theme/moxer.css +0 -143
- package/www/codemirror/theme/neat.css +0 -12
- package/www/codemirror/theme/neo.css +0 -43
- package/www/codemirror/theme/night.css +0 -27
- package/www/codemirror/theme/nord.css +0 -42
- package/www/codemirror/theme/oceanic-next.css +0 -46
- package/www/codemirror/theme/panda-syntax.css +0 -85
- package/www/codemirror/theme/paraiso-dark.css +0 -38
- package/www/codemirror/theme/paraiso-light.css +0 -38
- package/www/codemirror/theme/pastel-on-dark.css +0 -52
- package/www/codemirror/theme/railscasts.css +0 -34
- package/www/codemirror/theme/rubyblue.css +0 -25
- package/www/codemirror/theme/seti.css +0 -44
- package/www/codemirror/theme/shadowfox.css +0 -52
- package/www/codemirror/theme/solarized.css +0 -165
- package/www/codemirror/theme/ssms.css +0 -16
- package/www/codemirror/theme/the-matrix.css +0 -30
- package/www/codemirror/theme/tomorrow-night-bright.css +0 -35
- package/www/codemirror/theme/tomorrow-night-eighties.css +0 -38
- package/www/codemirror/theme/ttcn.css +0 -64
- package/www/codemirror/theme/twilight.css +0 -32
- package/www/codemirror/theme/vibrant-ink.css +0 -34
- package/www/codemirror/theme/xq-dark.css +0 -53
- package/www/codemirror/theme/xq-light.css +0 -43
- package/www/codemirror/theme/yeti.css +0 -44
- package/www/codemirror/theme/yonce.css +0 -59
- package/www/codemirror/theme/zenburn.css +0 -37
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
function copyObj(obj, target, overwrite) {
|
|
5
|
-
if (!target) { target = {}; }
|
|
6
|
-
for (var prop in obj)
|
|
7
|
-
{ if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
|
|
8
|
-
{ target[prop] = obj[prop]; } }
|
|
9
|
-
return target
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// Counts the column offset in a string, taking tabs into account.
|
|
13
|
-
// Used mostly to find indentation.
|
|
14
|
-
function countColumn(string, end, tabSize, startIndex, startValue) {
|
|
15
|
-
if (end == null) {
|
|
16
|
-
end = string.search(/[^\s\u00a0]/);
|
|
17
|
-
if (end == -1) { end = string.length; }
|
|
18
|
-
}
|
|
19
|
-
for (var i = startIndex || 0, n = startValue || 0;;) {
|
|
20
|
-
var nextTab = string.indexOf("\t", i);
|
|
21
|
-
if (nextTab < 0 || nextTab >= end)
|
|
22
|
-
{ return n + (end - i) }
|
|
23
|
-
n += nextTab - i;
|
|
24
|
-
n += tabSize - (n % tabSize);
|
|
25
|
-
i = nextTab + 1;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function nothing() {}
|
|
30
|
-
|
|
31
|
-
function createObj(base, props) {
|
|
32
|
-
var inst;
|
|
33
|
-
if (Object.create) {
|
|
34
|
-
inst = Object.create(base);
|
|
35
|
-
} else {
|
|
36
|
-
nothing.prototype = base;
|
|
37
|
-
inst = new nothing();
|
|
38
|
-
}
|
|
39
|
-
if (props) { copyObj(props, inst); }
|
|
40
|
-
return inst
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// STRING STREAM
|
|
44
|
-
|
|
45
|
-
// Fed to the mode parsers, provides helper functions to make
|
|
46
|
-
// parsers more succinct.
|
|
47
|
-
|
|
48
|
-
var StringStream = function(string, tabSize, lineOracle) {
|
|
49
|
-
this.pos = this.start = 0;
|
|
50
|
-
this.string = string;
|
|
51
|
-
this.tabSize = tabSize || 8;
|
|
52
|
-
this.lastColumnPos = this.lastColumnValue = 0;
|
|
53
|
-
this.lineStart = 0;
|
|
54
|
-
this.lineOracle = lineOracle;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
StringStream.prototype.eol = function () {return this.pos >= this.string.length};
|
|
58
|
-
StringStream.prototype.sol = function () {return this.pos == this.lineStart};
|
|
59
|
-
StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};
|
|
60
|
-
StringStream.prototype.next = function () {
|
|
61
|
-
if (this.pos < this.string.length)
|
|
62
|
-
{ return this.string.charAt(this.pos++) }
|
|
63
|
-
};
|
|
64
|
-
StringStream.prototype.eat = function (match) {
|
|
65
|
-
var ch = this.string.charAt(this.pos);
|
|
66
|
-
var ok;
|
|
67
|
-
if (typeof match == "string") { ok = ch == match; }
|
|
68
|
-
else { ok = ch && (match.test ? match.test(ch) : match(ch)); }
|
|
69
|
-
if (ok) {++this.pos; return ch}
|
|
70
|
-
};
|
|
71
|
-
StringStream.prototype.eatWhile = function (match) {
|
|
72
|
-
var start = this.pos;
|
|
73
|
-
while (this.eat(match)){}
|
|
74
|
-
return this.pos > start
|
|
75
|
-
};
|
|
76
|
-
StringStream.prototype.eatSpace = function () {
|
|
77
|
-
var start = this.pos;
|
|
78
|
-
while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; }
|
|
79
|
-
return this.pos > start
|
|
80
|
-
};
|
|
81
|
-
StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};
|
|
82
|
-
StringStream.prototype.skipTo = function (ch) {
|
|
83
|
-
var found = this.string.indexOf(ch, this.pos);
|
|
84
|
-
if (found > -1) {this.pos = found; return true}
|
|
85
|
-
};
|
|
86
|
-
StringStream.prototype.backUp = function (n) {this.pos -= n;};
|
|
87
|
-
StringStream.prototype.column = function () {
|
|
88
|
-
if (this.lastColumnPos < this.start) {
|
|
89
|
-
this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
|
|
90
|
-
this.lastColumnPos = this.start;
|
|
91
|
-
}
|
|
92
|
-
return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
|
|
93
|
-
};
|
|
94
|
-
StringStream.prototype.indentation = function () {
|
|
95
|
-
return countColumn(this.string, null, this.tabSize) -
|
|
96
|
-
(this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
|
|
97
|
-
};
|
|
98
|
-
StringStream.prototype.match = function (pattern, consume, caseInsensitive) {
|
|
99
|
-
if (typeof pattern == "string") {
|
|
100
|
-
var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };
|
|
101
|
-
var substr = this.string.substr(this.pos, pattern.length);
|
|
102
|
-
if (cased(substr) == cased(pattern)) {
|
|
103
|
-
if (consume !== false) { this.pos += pattern.length; }
|
|
104
|
-
return true
|
|
105
|
-
}
|
|
106
|
-
} else {
|
|
107
|
-
var match = this.string.slice(this.pos).match(pattern);
|
|
108
|
-
if (match && match.index > 0) { return null }
|
|
109
|
-
if (match && consume !== false) { this.pos += match[0].length; }
|
|
110
|
-
return match
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};
|
|
114
|
-
StringStream.prototype.hideFirstChars = function (n, inner) {
|
|
115
|
-
this.lineStart += n;
|
|
116
|
-
try { return inner() }
|
|
117
|
-
finally { this.lineStart -= n; }
|
|
118
|
-
};
|
|
119
|
-
StringStream.prototype.lookAhead = function (n) {
|
|
120
|
-
var oracle = this.lineOracle;
|
|
121
|
-
return oracle && oracle.lookAhead(n)
|
|
122
|
-
};
|
|
123
|
-
StringStream.prototype.baseToken = function () {
|
|
124
|
-
var oracle = this.lineOracle;
|
|
125
|
-
return oracle && oracle.baseToken(this.pos)
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
// Known modes, by name and by MIME
|
|
129
|
-
var modes = {}, mimeModes = {};
|
|
130
|
-
|
|
131
|
-
// Extra arguments are stored as the mode's dependencies, which is
|
|
132
|
-
// used by (legacy) mechanisms like loadmode.js to automatically
|
|
133
|
-
// load a mode. (Preferred mechanism is the require/define calls.)
|
|
134
|
-
function defineMode(name, mode) {
|
|
135
|
-
if (arguments.length > 2)
|
|
136
|
-
{ mode.dependencies = Array.prototype.slice.call(arguments, 2); }
|
|
137
|
-
modes[name] = mode;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function defineMIME(mime, spec) {
|
|
141
|
-
mimeModes[mime] = spec;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// Given a MIME type, a {name, ...options} config object, or a name
|
|
145
|
-
// string, return a mode config object.
|
|
146
|
-
function resolveMode(spec) {
|
|
147
|
-
if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
|
|
148
|
-
spec = mimeModes[spec];
|
|
149
|
-
} else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
|
|
150
|
-
var found = mimeModes[spec.name];
|
|
151
|
-
if (typeof found == "string") { found = {name: found}; }
|
|
152
|
-
spec = createObj(found, spec);
|
|
153
|
-
spec.name = found.name;
|
|
154
|
-
} else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
|
|
155
|
-
return resolveMode("application/xml")
|
|
156
|
-
} else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
|
|
157
|
-
return resolveMode("application/json")
|
|
158
|
-
}
|
|
159
|
-
if (typeof spec == "string") { return {name: spec} }
|
|
160
|
-
else { return spec || {name: "null"} }
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Given a mode spec (anything that resolveMode accepts), find and
|
|
164
|
-
// initialize an actual mode object.
|
|
165
|
-
function getMode(options, spec) {
|
|
166
|
-
spec = resolveMode(spec);
|
|
167
|
-
var mfactory = modes[spec.name];
|
|
168
|
-
if (!mfactory) { return getMode(options, "text/plain") }
|
|
169
|
-
var modeObj = mfactory(options, spec);
|
|
170
|
-
if (modeExtensions.hasOwnProperty(spec.name)) {
|
|
171
|
-
var exts = modeExtensions[spec.name];
|
|
172
|
-
for (var prop in exts) {
|
|
173
|
-
if (!exts.hasOwnProperty(prop)) { continue }
|
|
174
|
-
if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; }
|
|
175
|
-
modeObj[prop] = exts[prop];
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
modeObj.name = spec.name;
|
|
179
|
-
if (spec.helperType) { modeObj.helperType = spec.helperType; }
|
|
180
|
-
if (spec.modeProps) { for (var prop$1 in spec.modeProps)
|
|
181
|
-
{ modeObj[prop$1] = spec.modeProps[prop$1]; } }
|
|
182
|
-
|
|
183
|
-
return modeObj
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// This can be used to attach properties to mode objects from
|
|
187
|
-
// outside the actual mode definition.
|
|
188
|
-
var modeExtensions = {};
|
|
189
|
-
function extendMode(mode, properties) {
|
|
190
|
-
var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
|
|
191
|
-
copyObj(properties, exts);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function copyState(mode, state) {
|
|
195
|
-
if (state === true) { return state }
|
|
196
|
-
if (mode.copyState) { return mode.copyState(state) }
|
|
197
|
-
var nstate = {};
|
|
198
|
-
for (var n in state) {
|
|
199
|
-
var val = state[n];
|
|
200
|
-
if (val instanceof Array) { val = val.concat([]); }
|
|
201
|
-
nstate[n] = val;
|
|
202
|
-
}
|
|
203
|
-
return nstate
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// Given a mode and a state (for that mode), find the inner mode and
|
|
207
|
-
// state at the position that the state refers to.
|
|
208
|
-
function innerMode(mode, state) {
|
|
209
|
-
var info;
|
|
210
|
-
while (mode.innerMode) {
|
|
211
|
-
info = mode.innerMode(state);
|
|
212
|
-
if (!info || info.mode == mode) { break }
|
|
213
|
-
state = info.state;
|
|
214
|
-
mode = info.mode;
|
|
215
|
-
}
|
|
216
|
-
return info || {mode: mode, state: state}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
function startState(mode, a1, a2) {
|
|
220
|
-
return mode.startState ? mode.startState(a1, a2) : true
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
var modeMethods = {
|
|
224
|
-
__proto__: null,
|
|
225
|
-
modes: modes,
|
|
226
|
-
mimeModes: mimeModes,
|
|
227
|
-
defineMode: defineMode,
|
|
228
|
-
defineMIME: defineMIME,
|
|
229
|
-
resolveMode: resolveMode,
|
|
230
|
-
getMode: getMode,
|
|
231
|
-
modeExtensions: modeExtensions,
|
|
232
|
-
extendMode: extendMode,
|
|
233
|
-
copyState: copyState,
|
|
234
|
-
innerMode: innerMode,
|
|
235
|
-
startState: startState
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
// declare global: globalThis, CodeMirror
|
|
239
|
-
|
|
240
|
-
// Create a minimal CodeMirror needed to use runMode, and assign to root.
|
|
241
|
-
var root = typeof globalThis !== 'undefined' ? globalThis : window;
|
|
242
|
-
root.CodeMirror = {};
|
|
243
|
-
|
|
244
|
-
// Copy StringStream and mode methods into CodeMirror object.
|
|
245
|
-
CodeMirror.StringStream = StringStream;
|
|
246
|
-
for (var exported in modeMethods) { CodeMirror[exported] = modeMethods[exported]; }
|
|
247
|
-
|
|
248
|
-
// Minimal default mode.
|
|
249
|
-
CodeMirror.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });
|
|
250
|
-
CodeMirror.defineMIME("text/plain", "null");
|
|
251
|
-
|
|
252
|
-
CodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min;
|
|
253
|
-
CodeMirror.splitLines = function(string) { return string.split(/\r?\n|\r/) };
|
|
254
|
-
CodeMirror.countColumn = countColumn;
|
|
255
|
-
|
|
256
|
-
CodeMirror.defaults = { indentUnit: 2 };
|
|
257
|
-
|
|
258
|
-
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
259
|
-
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
260
|
-
|
|
261
|
-
(function(mod) {
|
|
262
|
-
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
|
263
|
-
{ mod(require("../../lib/codemirror")); }
|
|
264
|
-
else if (typeof define == "function" && define.amd) // AMD
|
|
265
|
-
{ define(["../../lib/codemirror"], mod); }
|
|
266
|
-
else // Plain browser env
|
|
267
|
-
{ mod(CodeMirror); }
|
|
268
|
-
})(function(CodeMirror) {
|
|
269
|
-
|
|
270
|
-
CodeMirror.runMode = function(string, modespec, callback, options) {
|
|
271
|
-
var mode = CodeMirror.getMode(CodeMirror.defaults, modespec);
|
|
272
|
-
var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize;
|
|
273
|
-
|
|
274
|
-
// Create a tokenizing callback function if passed-in callback is a DOM element.
|
|
275
|
-
if (callback.appendChild) {
|
|
276
|
-
var ie = /MSIE \d/.test(navigator.userAgent);
|
|
277
|
-
var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
|
|
278
|
-
var node = callback, col = 0;
|
|
279
|
-
node.textContent = "";
|
|
280
|
-
callback = function(text, style) {
|
|
281
|
-
if (text == "\n") {
|
|
282
|
-
// Emitting LF or CRLF on IE8 or earlier results in an incorrect display.
|
|
283
|
-
// Emitting a carriage return makes everything ok.
|
|
284
|
-
node.appendChild(document.createTextNode(ie_lt9 ? '\r' : text));
|
|
285
|
-
col = 0;
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
var content = "";
|
|
289
|
-
// replace tabs
|
|
290
|
-
for (var pos = 0;;) {
|
|
291
|
-
var idx = text.indexOf("\t", pos);
|
|
292
|
-
if (idx == -1) {
|
|
293
|
-
content += text.slice(pos);
|
|
294
|
-
col += text.length - pos;
|
|
295
|
-
break;
|
|
296
|
-
} else {
|
|
297
|
-
col += idx - pos;
|
|
298
|
-
content += text.slice(pos, idx);
|
|
299
|
-
var size = tabSize - col % tabSize;
|
|
300
|
-
col += size;
|
|
301
|
-
for (var i = 0; i < size; ++i) { content += " "; }
|
|
302
|
-
pos = idx + 1;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
// Create a node with token style and append it to the callback DOM element.
|
|
306
|
-
if (style) {
|
|
307
|
-
var sp = node.appendChild(document.createElement("span"));
|
|
308
|
-
sp.className = "cm-" + style.replace(/ +/g, " cm-");
|
|
309
|
-
sp.appendChild(document.createTextNode(content));
|
|
310
|
-
} else {
|
|
311
|
-
node.appendChild(document.createTextNode(content));
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
var lines = CodeMirror.splitLines(string), state = (options && options.state) || CodeMirror.startState(mode);
|
|
317
|
-
for (var i = 0, e = lines.length; i < e; ++i) {
|
|
318
|
-
if (i) { callback("\n"); }
|
|
319
|
-
var stream = new CodeMirror.StringStream(lines[i], null, {
|
|
320
|
-
lookAhead: function(n) { return lines[i + n] },
|
|
321
|
-
baseToken: function() {}
|
|
322
|
-
});
|
|
323
|
-
if (!stream.string && mode.blankLine) { mode.blankLine(state); }
|
|
324
|
-
while (!stream.eol()) {
|
|
325
|
-
var style = mode.token(stream, state);
|
|
326
|
-
callback(stream.current(), style, i, stream.start, state, mode);
|
|
327
|
-
stream.start = stream.pos;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
}());
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
|
2
|
-
// Distributed under an MIT license: https://codemirror.net/5/LICENSE
|
|
3
|
-
|
|
4
|
-
(function(mod) {
|
|
5
|
-
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
|
6
|
-
mod(require("../../lib/codemirror"));
|
|
7
|
-
else if (typeof define == "function" && define.amd) // AMD
|
|
8
|
-
define(["../../lib/codemirror"], mod);
|
|
9
|
-
else // Plain browser env
|
|
10
|
-
mod(CodeMirror);
|
|
11
|
-
})(function(CodeMirror) {
|
|
12
|
-
"use strict";
|
|
13
|
-
|
|
14
|
-
CodeMirror.runMode = function(string, modespec, callback, options) {
|
|
15
|
-
var mode = CodeMirror.getMode(CodeMirror.defaults, modespec);
|
|
16
|
-
var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize;
|
|
17
|
-
|
|
18
|
-
// Create a tokenizing callback function if passed-in callback is a DOM element.
|
|
19
|
-
if (callback.appendChild) {
|
|
20
|
-
var ie = /MSIE \d/.test(navigator.userAgent);
|
|
21
|
-
var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
|
|
22
|
-
var node = callback, col = 0;
|
|
23
|
-
node.textContent = "";
|
|
24
|
-
callback = function(text, style) {
|
|
25
|
-
if (text == "\n") {
|
|
26
|
-
// Emitting LF or CRLF on IE8 or earlier results in an incorrect display.
|
|
27
|
-
// Emitting a carriage return makes everything ok.
|
|
28
|
-
node.appendChild(document.createTextNode(ie_lt9 ? '\r' : text));
|
|
29
|
-
col = 0;
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
var content = "";
|
|
33
|
-
// replace tabs
|
|
34
|
-
for (var pos = 0;;) {
|
|
35
|
-
var idx = text.indexOf("\t", pos);
|
|
36
|
-
if (idx == -1) {
|
|
37
|
-
content += text.slice(pos);
|
|
38
|
-
col += text.length - pos;
|
|
39
|
-
break;
|
|
40
|
-
} else {
|
|
41
|
-
col += idx - pos;
|
|
42
|
-
content += text.slice(pos, idx);
|
|
43
|
-
var size = tabSize - col % tabSize;
|
|
44
|
-
col += size;
|
|
45
|
-
for (var i = 0; i < size; ++i) content += " ";
|
|
46
|
-
pos = idx + 1;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
// Create a node with token style and append it to the callback DOM element.
|
|
50
|
-
if (style) {
|
|
51
|
-
var sp = node.appendChild(document.createElement("span"));
|
|
52
|
-
sp.className = "cm-" + style.replace(/ +/g, " cm-");
|
|
53
|
-
sp.appendChild(document.createTextNode(content));
|
|
54
|
-
} else {
|
|
55
|
-
node.appendChild(document.createTextNode(content));
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
var lines = CodeMirror.splitLines(string), state = (options && options.state) || CodeMirror.startState(mode);
|
|
61
|
-
for (var i = 0, e = lines.length; i < e; ++i) {
|
|
62
|
-
if (i) callback("\n");
|
|
63
|
-
var stream = new CodeMirror.StringStream(lines[i], null, {
|
|
64
|
-
lookAhead: function(n) { return lines[i + n] },
|
|
65
|
-
baseToken: function() {}
|
|
66
|
-
});
|
|
67
|
-
if (!stream.string && mode.blankLine) mode.blankLine(state);
|
|
68
|
-
while (!stream.eol()) {
|
|
69
|
-
var style = mode.token(stream, state);
|
|
70
|
-
callback(stream.current(), style, i, stream.start, state, mode);
|
|
71
|
-
stream.start = stream.pos;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
});
|