@muze-nl/simplystore 0.1.2
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/.dockerignore +8 -0
- package/.github/workflows/docker-build.yml +45 -0
- package/.gitignore~ +1 -0
- package/Dockerfile +60 -0
- package/LICENSE +21 -0
- package/README.md +99 -0
- package/data.jsontag +20 -0
- package/design/access-management.md +25 -0
- package/design/acid.md +31 -0
- package/design/commands.md +25 -0
- package/design/identity.md +71 -0
- package/design/immutability.md +26 -0
- package/design/jsontag-selector.md +365 -0
- package/design/multitasking.md +13 -0
- package/design/thoughts.md +32 -0
- package/docs/docker.md +129 -0
- package/package.json +29 -0
- package/package.json~ +29 -0
- package/src/run.mjs +3 -0
- package/src/server.mjs +323 -0
- package/src/triplestore.mjs +182 -0
- package/www/assets/css/style.css +2296 -0
- package/www/assets/feather-sprite.svg +1 -0
- package/www/assets/img/simplystore-narrow-white.svg +138 -0
- package/www/assets/img/simplystore-narrow.svg +138 -0
- package/www/assets/img/simplystore-white.svg +153 -0
- package/www/assets/img/simplystore.svg +153 -0
- package/www/codemirror/AUTHORS +979 -0
- package/www/codemirror/CHANGELOG.md +2208 -0
- package/www/codemirror/CONTRIBUTING.md +92 -0
- package/www/codemirror/LICENSE +21 -0
- package/www/codemirror/README.md +47 -0
- package/www/codemirror/addon/comment/comment.js +211 -0
- package/www/codemirror/addon/comment/continuecomment.js +114 -0
- package/www/codemirror/addon/dialog/dialog.css +32 -0
- package/www/codemirror/addon/dialog/dialog.js +163 -0
- package/www/codemirror/addon/display/autorefresh.js +47 -0
- package/www/codemirror/addon/display/fullscreen.css +6 -0
- package/www/codemirror/addon/display/fullscreen.js +41 -0
- package/www/codemirror/addon/display/panel.js +133 -0
- package/www/codemirror/addon/display/placeholder.js +78 -0
- package/www/codemirror/addon/display/rulers.js +51 -0
- package/www/codemirror/addon/edit/closebrackets.js +201 -0
- package/www/codemirror/addon/edit/closetag.js +185 -0
- package/www/codemirror/addon/edit/continuelist.js +101 -0
- package/www/codemirror/addon/edit/matchbrackets.js +160 -0
- package/www/codemirror/addon/edit/matchtags.js +66 -0
- package/www/codemirror/addon/edit/trailingspace.js +27 -0
- package/www/codemirror/addon/fold/brace-fold.js +119 -0
- package/www/codemirror/addon/fold/comment-fold.js +59 -0
- package/www/codemirror/addon/fold/foldcode.js +159 -0
- package/www/codemirror/addon/fold/foldgutter.css +20 -0
- package/www/codemirror/addon/fold/foldgutter.js +169 -0
- package/www/codemirror/addon/fold/indent-fold.js +48 -0
- package/www/codemirror/addon/fold/markdown-fold.js +49 -0
- package/www/codemirror/addon/fold/xml-fold.js +184 -0
- package/www/codemirror/addon/hint/anyword-hint.js +41 -0
- package/www/codemirror/addon/hint/css-hint.js +66 -0
- package/www/codemirror/addon/hint/html-hint.js +351 -0
- package/www/codemirror/addon/hint/javascript-hint.js +162 -0
- package/www/codemirror/addon/hint/show-hint.css +37 -0
- package/www/codemirror/addon/hint/show-hint.js +523 -0
- package/www/codemirror/addon/hint/sql-hint.js +304 -0
- package/www/codemirror/addon/hint/xml-hint.js +132 -0
- package/www/codemirror/addon/lint/coffeescript-lint.js +47 -0
- package/www/codemirror/addon/lint/css-lint.js +40 -0
- package/www/codemirror/addon/lint/html-lint.js +59 -0
- package/www/codemirror/addon/lint/javascript-lint.js +65 -0
- package/www/codemirror/addon/lint/json-lint.js +40 -0
- package/www/codemirror/addon/lint/lint.css +79 -0
- package/www/codemirror/addon/lint/lint.js +291 -0
- package/www/codemirror/addon/lint/yaml-lint.js +41 -0
- package/www/codemirror/addon/merge/merge.css +119 -0
- package/www/codemirror/addon/merge/merge.js +1018 -0
- package/www/codemirror/addon/mode/loadmode.js +66 -0
- package/www/codemirror/addon/mode/multiplex.js +136 -0
- package/www/codemirror/addon/mode/multiplex_test.js +49 -0
- package/www/codemirror/addon/mode/overlay.js +90 -0
- package/www/codemirror/addon/mode/simple.js +216 -0
- package/www/codemirror/addon/runmode/colorize.js +40 -0
- package/www/codemirror/addon/runmode/runmode-standalone.js +334 -0
- package/www/codemirror/addon/runmode/runmode.js +76 -0
- package/www/codemirror/addon/runmode/runmode.node.js +329 -0
- package/www/codemirror/addon/scroll/annotatescrollbar.js +128 -0
- package/www/codemirror/addon/scroll/scrollpastend.js +48 -0
- package/www/codemirror/addon/scroll/simplescrollbars.css +66 -0
- package/www/codemirror/addon/scroll/simplescrollbars.js +152 -0
- package/www/codemirror/addon/search/jump-to-line.js +53 -0
- package/www/codemirror/addon/search/match-highlighter.js +167 -0
- package/www/codemirror/addon/search/matchesonscrollbar.css +8 -0
- package/www/codemirror/addon/search/matchesonscrollbar.js +97 -0
- package/www/codemirror/addon/search/search.js +295 -0
- package/www/codemirror/addon/search/searchcursor.js +305 -0
- package/www/codemirror/addon/selection/active-line.js +72 -0
- package/www/codemirror/addon/selection/mark-selection.js +119 -0
- package/www/codemirror/addon/selection/selection-pointer.js +98 -0
- package/www/codemirror/addon/tern/tern.css +87 -0
- package/www/codemirror/addon/tern/tern.js +756 -0
- package/www/codemirror/addon/tern/worker.js +44 -0
- package/www/codemirror/addon/wrap/hardwrap.js +160 -0
- package/www/codemirror/bin/source-highlight +48 -0
- package/www/codemirror/keymap/emacs.js +545 -0
- package/www/codemirror/keymap/sublime.js +720 -0
- package/www/codemirror/keymap/vim.js +5978 -0
- package/www/codemirror/lib/codemirror.css +344 -0
- package/www/codemirror/lib/codemirror.js +9874 -0
- package/www/codemirror/mode/apl/apl.js +174 -0
- package/www/codemirror/mode/asciiarmor/asciiarmor.js +74 -0
- package/www/codemirror/mode/asn.1/asn.1.js +204 -0
- package/www/codemirror/mode/asterisk/asterisk.js +220 -0
- package/www/codemirror/mode/brainfuck/brainfuck.js +85 -0
- package/www/codemirror/mode/clike/clike.js +940 -0
- package/www/codemirror/mode/clojure/clojure.js +292 -0
- package/www/codemirror/mode/cmake/cmake.js +97 -0
- package/www/codemirror/mode/cobol/cobol.js +255 -0
- package/www/codemirror/mode/coffeescript/coffeescript.js +359 -0
- package/www/codemirror/mode/commonlisp/commonlisp.js +125 -0
- package/www/codemirror/mode/crystal/crystal.js +433 -0
- package/www/codemirror/mode/css/css.js +862 -0
- package/www/codemirror/mode/cypher/cypher.js +152 -0
- package/www/codemirror/mode/d/d.js +223 -0
- package/www/codemirror/mode/dart/dart.js +166 -0
- package/www/codemirror/mode/diff/diff.js +47 -0
- package/www/codemirror/mode/django/django.js +356 -0
- package/www/codemirror/mode/dockerfile/dockerfile.js +211 -0
- package/www/codemirror/mode/dtd/dtd.js +142 -0
- package/www/codemirror/mode/dylan/dylan.js +352 -0
- package/www/codemirror/mode/ebnf/ebnf.js +195 -0
- package/www/codemirror/mode/ecl/ecl.js +206 -0
- package/www/codemirror/mode/eiffel/eiffel.js +160 -0
- package/www/codemirror/mode/elm/elm.js +245 -0
- package/www/codemirror/mode/erlang/erlang.js +619 -0
- package/www/codemirror/mode/factor/factor.js +85 -0
- package/www/codemirror/mode/fcl/fcl.js +173 -0
- package/www/codemirror/mode/forth/forth.js +180 -0
- package/www/codemirror/mode/fortran/fortran.js +188 -0
- package/www/codemirror/mode/gas/gas.js +353 -0
- package/www/codemirror/mode/gfm/gfm.js +129 -0
- package/www/codemirror/mode/gherkin/gherkin.js +178 -0
- package/www/codemirror/mode/go/go.js +187 -0
- package/www/codemirror/mode/groovy/groovy.js +247 -0
- package/www/codemirror/mode/haml/haml.js +161 -0
- package/www/codemirror/mode/handlebars/handlebars.js +70 -0
- package/www/codemirror/mode/haskell/haskell.js +268 -0
- package/www/codemirror/mode/haskell-literate/haskell-literate.js +43 -0
- package/www/codemirror/mode/haxe/haxe.js +515 -0
- package/www/codemirror/mode/htmlembedded/htmlembedded.js +37 -0
- package/www/codemirror/mode/htmlmixed/htmlmixed.js +153 -0
- package/www/codemirror/mode/http/http.js +113 -0
- package/www/codemirror/mode/idl/idl.js +290 -0
- package/www/codemirror/mode/javascript/javascript.js +960 -0
- package/www/codemirror/mode/jinja2/jinja2.js +193 -0
- package/www/codemirror/mode/jsx/jsx.js +148 -0
- package/www/codemirror/mode/julia/julia.js +390 -0
- package/www/codemirror/mode/livescript/livescript.js +280 -0
- package/www/codemirror/mode/lua/lua.js +160 -0
- package/www/codemirror/mode/markdown/markdown.js +886 -0
- package/www/codemirror/mode/mathematica/mathematica.js +176 -0
- package/www/codemirror/mode/mbox/mbox.js +129 -0
- package/www/codemirror/mode/meta.js +221 -0
- package/www/codemirror/mode/mirc/mirc.js +193 -0
- package/www/codemirror/mode/mllike/mllike.js +359 -0
- package/www/codemirror/mode/modelica/modelica.js +245 -0
- package/www/codemirror/mode/mscgen/mscgen.js +175 -0
- package/www/codemirror/mode/mumps/mumps.js +148 -0
- package/www/codemirror/mode/nginx/nginx.js +178 -0
- package/www/codemirror/mode/nsis/nsis.js +95 -0
- package/www/codemirror/mode/ntriples/ntriples.js +195 -0
- package/www/codemirror/mode/octave/octave.js +139 -0
- package/www/codemirror/mode/oz/oz.js +252 -0
- package/www/codemirror/mode/pascal/pascal.js +136 -0
- package/www/codemirror/mode/pegjs/pegjs.js +111 -0
- package/www/codemirror/mode/perl/perl.js +836 -0
- package/www/codemirror/mode/php/php.js +234 -0
- package/www/codemirror/mode/pig/pig.js +178 -0
- package/www/codemirror/mode/powershell/powershell.js +398 -0
- package/www/codemirror/mode/properties/properties.js +78 -0
- package/www/codemirror/mode/protobuf/protobuf.js +72 -0
- package/www/codemirror/mode/pug/pug.js +591 -0
- package/www/codemirror/mode/puppet/puppet.js +220 -0
- package/www/codemirror/mode/python/python.js +402 -0
- package/www/codemirror/mode/q/q.js +139 -0
- package/www/codemirror/mode/r/r.js +190 -0
- package/www/codemirror/mode/rpm/changes/index.html +66 -0
- package/www/codemirror/mode/rpm/rpm.js +109 -0
- package/www/codemirror/mode/rst/rst.js +557 -0
- package/www/codemirror/mode/ruby/ruby.js +303 -0
- package/www/codemirror/mode/rust/rust.js +72 -0
- package/www/codemirror/mode/sas/sas.js +303 -0
- package/www/codemirror/mode/sass/sass.js +459 -0
- package/www/codemirror/mode/scheme/scheme.js +284 -0
- package/www/codemirror/mode/shell/shell.js +168 -0
- package/www/codemirror/mode/sieve/sieve.js +193 -0
- package/www/codemirror/mode/slim/slim.js +575 -0
- package/www/codemirror/mode/smalltalk/smalltalk.js +168 -0
- package/www/codemirror/mode/smarty/smarty.js +225 -0
- package/www/codemirror/mode/solr/solr.js +104 -0
- package/www/codemirror/mode/soy/soy.js +665 -0
- package/www/codemirror/mode/sparql/sparql.js +184 -0
- package/www/codemirror/mode/spreadsheet/spreadsheet.js +112 -0
- package/www/codemirror/mode/sql/sql.js +525 -0
- package/www/codemirror/mode/stex/stex.js +264 -0
- package/www/codemirror/mode/stylus/stylus.js +775 -0
- package/www/codemirror/mode/swift/swift.js +221 -0
- package/www/codemirror/mode/tcl/tcl.js +140 -0
- package/www/codemirror/mode/textile/textile.js +469 -0
- package/www/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- package/www/codemirror/mode/tiddlywiki/tiddlywiki.js +308 -0
- package/www/codemirror/mode/tiki/tiki.css +26 -0
- package/www/codemirror/mode/tiki/tiki.js +312 -0
- package/www/codemirror/mode/toml/toml.js +88 -0
- package/www/codemirror/mode/tornado/tornado.js +68 -0
- package/www/codemirror/mode/troff/troff.js +84 -0
- package/www/codemirror/mode/ttcn/ttcn.js +283 -0
- package/www/codemirror/mode/ttcn-cfg/ttcn-cfg.js +214 -0
- package/www/codemirror/mode/turtle/turtle.js +162 -0
- package/www/codemirror/mode/twig/twig.js +141 -0
- package/www/codemirror/mode/vb/vb.js +275 -0
- package/www/codemirror/mode/vbscript/vbscript.js +350 -0
- package/www/codemirror/mode/velocity/velocity.js +202 -0
- package/www/codemirror/mode/verilog/verilog.js +781 -0
- package/www/codemirror/mode/vhdl/vhdl.js +189 -0
- package/www/codemirror/mode/vue/vue.js +77 -0
- package/www/codemirror/mode/wast/wast.js +132 -0
- package/www/codemirror/mode/webidl/webidl.js +195 -0
- package/www/codemirror/mode/xml/xml.js +417 -0
- package/www/codemirror/mode/xquery/xquery.js +448 -0
- package/www/codemirror/mode/yacas/yacas.js +204 -0
- package/www/codemirror/mode/yaml/yaml.js +120 -0
- package/www/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js +72 -0
- package/www/codemirror/mode/z80/z80.js +116 -0
- package/www/codemirror/package.json +52 -0
- package/www/codemirror/rollup.config.js +52 -0
- package/www/codemirror/src/addon/runmode/codemirror-standalone.js +24 -0
- package/www/codemirror/src/addon/runmode/codemirror.node.js +21 -0
- package/www/codemirror/src/addon/runmode/runmode-standalone.js +2 -0
- package/www/codemirror/src/addon/runmode/runmode.node.js +2 -0
- package/www/codemirror/src/codemirror.js +3 -0
- package/www/codemirror/src/display/Display.js +116 -0
- package/www/codemirror/src/display/focus.js +50 -0
- package/www/codemirror/src/display/gutters.js +44 -0
- package/www/codemirror/src/display/highlight_worker.js +55 -0
- package/www/codemirror/src/display/line_numbers.js +48 -0
- package/www/codemirror/src/display/mode_state.js +22 -0
- package/www/codemirror/src/display/operations.js +206 -0
- package/www/codemirror/src/display/scroll_events.js +132 -0
- package/www/codemirror/src/display/scrollbars.js +194 -0
- package/www/codemirror/src/display/scrolling.js +186 -0
- package/www/codemirror/src/display/selection.js +173 -0
- package/www/codemirror/src/display/update_display.js +267 -0
- package/www/codemirror/src/display/update_line.js +189 -0
- package/www/codemirror/src/display/update_lines.js +82 -0
- package/www/codemirror/src/display/view_tracking.js +153 -0
- package/www/codemirror/src/edit/CodeMirror.js +217 -0
- package/www/codemirror/src/edit/commands.js +178 -0
- package/www/codemirror/src/edit/deleteNearSelection.js +30 -0
- package/www/codemirror/src/edit/drop_events.js +130 -0
- package/www/codemirror/src/edit/fromTextArea.js +61 -0
- package/www/codemirror/src/edit/global_events.js +45 -0
- package/www/codemirror/src/edit/key_events.js +163 -0
- package/www/codemirror/src/edit/legacy.js +62 -0
- package/www/codemirror/src/edit/main.js +69 -0
- package/www/codemirror/src/edit/methods.js +555 -0
- package/www/codemirror/src/edit/mouse_events.js +417 -0
- package/www/codemirror/src/edit/options.js +194 -0
- package/www/codemirror/src/edit/utils.js +7 -0
- package/www/codemirror/src/input/ContentEditableInput.js +546 -0
- package/www/codemirror/src/input/TextareaInput.js +380 -0
- package/www/codemirror/src/input/indent.js +71 -0
- package/www/codemirror/src/input/input.js +134 -0
- package/www/codemirror/src/input/keymap.js +147 -0
- package/www/codemirror/src/input/keynames.js +17 -0
- package/www/codemirror/src/input/movement.js +111 -0
- package/www/codemirror/src/line/highlight.js +284 -0
- package/www/codemirror/src/line/line_data.js +349 -0
- package/www/codemirror/src/line/pos.js +40 -0
- package/www/codemirror/src/line/saw_special_spans.js +10 -0
- package/www/codemirror/src/line/spans.js +390 -0
- package/www/codemirror/src/line/utils_line.js +85 -0
- package/www/codemirror/src/measurement/position_measurement.js +702 -0
- package/www/codemirror/src/measurement/widgets.js +26 -0
- package/www/codemirror/src/model/Doc.js +436 -0
- package/www/codemirror/src/model/change_measurement.js +61 -0
- package/www/codemirror/src/model/changes.js +339 -0
- package/www/codemirror/src/model/chunk.js +167 -0
- package/www/codemirror/src/model/document_data.js +112 -0
- package/www/codemirror/src/model/history.js +228 -0
- package/www/codemirror/src/model/line_widget.js +78 -0
- package/www/codemirror/src/model/mark_text.js +293 -0
- package/www/codemirror/src/model/selection.js +84 -0
- package/www/codemirror/src/model/selection_updates.js +216 -0
- package/www/codemirror/src/modes.js +96 -0
- package/www/codemirror/src/util/StringStream.js +90 -0
- package/www/codemirror/src/util/bidi.js +215 -0
- package/www/codemirror/src/util/browser.js +34 -0
- package/www/codemirror/src/util/dom.js +101 -0
- package/www/codemirror/src/util/event.js +103 -0
- package/www/codemirror/src/util/feature_detection.js +84 -0
- package/www/codemirror/src/util/misc.js +168 -0
- package/www/codemirror/src/util/operation_group.js +72 -0
- package/www/codemirror/theme/3024-day.css +41 -0
- package/www/codemirror/theme/3024-night.css +39 -0
- package/www/codemirror/theme/abbott.css +268 -0
- package/www/codemirror/theme/abcdef.css +32 -0
- package/www/codemirror/theme/ambiance-mobile.css +5 -0
- package/www/codemirror/theme/ambiance.css +74 -0
- package/www/codemirror/theme/ayu-dark.css +44 -0
- package/www/codemirror/theme/ayu-mirage.css +45 -0
- package/www/codemirror/theme/base16-dark.css +40 -0
- package/www/codemirror/theme/base16-light.css +38 -0
- package/www/codemirror/theme/bespin.css +34 -0
- package/www/codemirror/theme/blackboard.css +32 -0
- package/www/codemirror/theme/cobalt.css +25 -0
- package/www/codemirror/theme/colorforth.css +33 -0
- package/www/codemirror/theme/darcula.css +53 -0
- package/www/codemirror/theme/dracula.css +40 -0
- package/www/codemirror/theme/duotone-dark.css +35 -0
- package/www/codemirror/theme/duotone-light.css +36 -0
- package/www/codemirror/theme/eclipse.css +23 -0
- package/www/codemirror/theme/elegant.css +13 -0
- package/www/codemirror/theme/erlang-dark.css +34 -0
- package/www/codemirror/theme/gruvbox-dark.css +39 -0
- package/www/codemirror/theme/hopscotch.css +34 -0
- package/www/codemirror/theme/icecoder.css +43 -0
- package/www/codemirror/theme/idea.css +42 -0
- package/www/codemirror/theme/isotope.css +34 -0
- package/www/codemirror/theme/juejin.css +30 -0
- package/www/codemirror/theme/lesser-dark.css +47 -0
- package/www/codemirror/theme/liquibyte.css +95 -0
- package/www/codemirror/theme/lucario.css +37 -0
- package/www/codemirror/theme/material-darker.css +135 -0
- package/www/codemirror/theme/material-ocean.css +141 -0
- package/www/codemirror/theme/material-palenight.css +141 -0
- package/www/codemirror/theme/material.css +141 -0
- package/www/codemirror/theme/mbo.css +37 -0
- package/www/codemirror/theme/mdn-like.css +46 -0
- package/www/codemirror/theme/midnight.css +39 -0
- package/www/codemirror/theme/monokai.css +41 -0
- package/www/codemirror/theme/moxer.css +143 -0
- package/www/codemirror/theme/neat.css +12 -0
- package/www/codemirror/theme/neo.css +43 -0
- package/www/codemirror/theme/night.css +27 -0
- package/www/codemirror/theme/nord.css +42 -0
- package/www/codemirror/theme/oceanic-next.css +46 -0
- package/www/codemirror/theme/panda-syntax.css +85 -0
- package/www/codemirror/theme/paraiso-dark.css +38 -0
- package/www/codemirror/theme/paraiso-light.css +38 -0
- package/www/codemirror/theme/pastel-on-dark.css +52 -0
- package/www/codemirror/theme/railscasts.css +34 -0
- package/www/codemirror/theme/rubyblue.css +25 -0
- package/www/codemirror/theme/seti.css +44 -0
- package/www/codemirror/theme/shadowfox.css +52 -0
- package/www/codemirror/theme/solarized.css +165 -0
- package/www/codemirror/theme/ssms.css +16 -0
- package/www/codemirror/theme/the-matrix.css +30 -0
- package/www/codemirror/theme/tomorrow-night-bright.css +35 -0
- package/www/codemirror/theme/tomorrow-night-eighties.css +38 -0
- package/www/codemirror/theme/ttcn.css +64 -0
- package/www/codemirror/theme/twilight.css +32 -0
- package/www/codemirror/theme/vibrant-ink.css +34 -0
- package/www/codemirror/theme/xq-dark.css +53 -0
- package/www/codemirror/theme/xq-light.css +43 -0
- package/www/codemirror/theme/yeti.css +44 -0
- package/www/codemirror/theme/yonce.css +59 -0
- package/www/codemirror/theme/zenburn.css +37 -0
- package/www/index.html +216 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2011 by MarkLogic Corporation
|
|
3
|
+
Author: Mike Brevoort <mike@brevoort.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; }
|
|
24
|
+
.cm-s-xq-dark div.CodeMirror-selected { background: #27007A; }
|
|
25
|
+
.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); }
|
|
26
|
+
.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); }
|
|
27
|
+
.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; }
|
|
28
|
+
.cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; }
|
|
29
|
+
.cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; }
|
|
30
|
+
.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; }
|
|
31
|
+
.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white; }
|
|
32
|
+
|
|
33
|
+
.cm-s-xq-dark span.cm-keyword { color: #FFBD40; }
|
|
34
|
+
.cm-s-xq-dark span.cm-atom { color: #6C8CD5; }
|
|
35
|
+
.cm-s-xq-dark span.cm-number { color: #164; }
|
|
36
|
+
.cm-s-xq-dark span.cm-def { color: #FFF; text-decoration:underline; }
|
|
37
|
+
.cm-s-xq-dark span.cm-variable { color: #FFF; }
|
|
38
|
+
.cm-s-xq-dark span.cm-variable-2 { color: #EEE; }
|
|
39
|
+
.cm-s-xq-dark span.cm-variable-3, .cm-s-xq-dark span.cm-type { color: #DDD; }
|
|
40
|
+
.cm-s-xq-dark span.cm-property {}
|
|
41
|
+
.cm-s-xq-dark span.cm-operator {}
|
|
42
|
+
.cm-s-xq-dark span.cm-comment { color: gray; }
|
|
43
|
+
.cm-s-xq-dark span.cm-string { color: #9FEE00; }
|
|
44
|
+
.cm-s-xq-dark span.cm-meta { color: yellow; }
|
|
45
|
+
.cm-s-xq-dark span.cm-qualifier { color: #FFF700; }
|
|
46
|
+
.cm-s-xq-dark span.cm-builtin { color: #30a; }
|
|
47
|
+
.cm-s-xq-dark span.cm-bracket { color: #cc7; }
|
|
48
|
+
.cm-s-xq-dark span.cm-tag { color: #FFBD40; }
|
|
49
|
+
.cm-s-xq-dark span.cm-attribute { color: #FFF700; }
|
|
50
|
+
.cm-s-xq-dark span.cm-error { color: #f00; }
|
|
51
|
+
|
|
52
|
+
.cm-s-xq-dark .CodeMirror-activeline-background { background: #27282E; }
|
|
53
|
+
.cm-s-xq-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; }
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (C) 2011 by MarkLogic Corporation
|
|
3
|
+
Author: Mike Brevoort <mike@brevoort.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
.cm-s-xq-light span.cm-keyword { line-height: 1em; font-weight: bold; color: #5A5CAD; }
|
|
24
|
+
.cm-s-xq-light span.cm-atom { color: #6C8CD5; }
|
|
25
|
+
.cm-s-xq-light span.cm-number { color: #164; }
|
|
26
|
+
.cm-s-xq-light span.cm-def { text-decoration:underline; }
|
|
27
|
+
.cm-s-xq-light span.cm-variable { color: black; }
|
|
28
|
+
.cm-s-xq-light span.cm-variable-2 { color:black; }
|
|
29
|
+
.cm-s-xq-light span.cm-variable-3, .cm-s-xq-light span.cm-type { color: black; }
|
|
30
|
+
.cm-s-xq-light span.cm-property {}
|
|
31
|
+
.cm-s-xq-light span.cm-operator {}
|
|
32
|
+
.cm-s-xq-light span.cm-comment { color: #0080FF; font-style: italic; }
|
|
33
|
+
.cm-s-xq-light span.cm-string { color: red; }
|
|
34
|
+
.cm-s-xq-light span.cm-meta { color: yellow; }
|
|
35
|
+
.cm-s-xq-light span.cm-qualifier { color: grey; }
|
|
36
|
+
.cm-s-xq-light span.cm-builtin { color: #7EA656; }
|
|
37
|
+
.cm-s-xq-light span.cm-bracket { color: #cc7; }
|
|
38
|
+
.cm-s-xq-light span.cm-tag { color: #3F7F7F; }
|
|
39
|
+
.cm-s-xq-light span.cm-attribute { color: #7F007F; }
|
|
40
|
+
.cm-s-xq-light span.cm-error { color: #f00; }
|
|
41
|
+
|
|
42
|
+
.cm-s-xq-light .CodeMirror-activeline-background { background: #e8f2ff; }
|
|
43
|
+
.cm-s-xq-light .CodeMirror-matchingbracket { outline:1px solid grey;color:black !important;background:yellow; }
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
Name: yeti
|
|
4
|
+
Author: Michael Kaminsky (http://github.com/mkaminsky11)
|
|
5
|
+
|
|
6
|
+
Original yeti color scheme by Jesse Weed (https://github.com/jesseweed/yeti-syntax)
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
.cm-s-yeti.CodeMirror {
|
|
12
|
+
background-color: #ECEAE8 !important;
|
|
13
|
+
color: #d1c9c0 !important;
|
|
14
|
+
border: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cm-s-yeti .CodeMirror-gutters {
|
|
18
|
+
color: #adaba6;
|
|
19
|
+
background-color: #E5E1DB;
|
|
20
|
+
border: none;
|
|
21
|
+
}
|
|
22
|
+
.cm-s-yeti .CodeMirror-cursor { border-left: solid thin #d1c9c0; }
|
|
23
|
+
.cm-s-yeti .CodeMirror-linenumber { color: #adaba6; }
|
|
24
|
+
.cm-s-yeti.CodeMirror-focused div.CodeMirror-selected { background: #DCD8D2; }
|
|
25
|
+
.cm-s-yeti .CodeMirror-line::selection, .cm-s-yeti .CodeMirror-line > span::selection, .cm-s-yeti .CodeMirror-line > span > span::selection { background: #DCD8D2; }
|
|
26
|
+
.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; }
|
|
27
|
+
.cm-s-yeti span.cm-comment { color: #d4c8be; }
|
|
28
|
+
.cm-s-yeti span.cm-string, .cm-s-yeti span.cm-string-2 { color: #96c0d8; }
|
|
29
|
+
.cm-s-yeti span.cm-number { color: #a074c4; }
|
|
30
|
+
.cm-s-yeti span.cm-variable { color: #55b5db; }
|
|
31
|
+
.cm-s-yeti span.cm-variable-2 { color: #a074c4; }
|
|
32
|
+
.cm-s-yeti span.cm-def { color: #55b5db; }
|
|
33
|
+
.cm-s-yeti span.cm-operator { color: #9fb96e; }
|
|
34
|
+
.cm-s-yeti span.cm-keyword { color: #9fb96e; }
|
|
35
|
+
.cm-s-yeti span.cm-atom { color: #a074c4; }
|
|
36
|
+
.cm-s-yeti span.cm-meta { color: #96c0d8; }
|
|
37
|
+
.cm-s-yeti span.cm-tag { color: #96c0d8; }
|
|
38
|
+
.cm-s-yeti span.cm-attribute { color: #9fb96e; }
|
|
39
|
+
.cm-s-yeti span.cm-qualifier { color: #96c0d8; }
|
|
40
|
+
.cm-s-yeti span.cm-property { color: #a074c4; }
|
|
41
|
+
.cm-s-yeti span.cm-builtin { color: #a074c4; }
|
|
42
|
+
.cm-s-yeti span.cm-variable-3, .cm-s-yeti span.cm-type { color: #96c0d8; }
|
|
43
|
+
.cm-s-yeti .CodeMirror-activeline-background { background: #E7E4E0; }
|
|
44
|
+
.cm-s-yeti .CodeMirror-matchingbracket { text-decoration: underline; }
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
Name: yoncé
|
|
4
|
+
Author: Thomas MacLean (http://github.com/thomasmaclean)
|
|
5
|
+
|
|
6
|
+
Original yoncé color scheme by Mina Markham (https://github.com/minamarkham)
|
|
7
|
+
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.cm-s-yonce.CodeMirror { background: #1C1C1C; color: #d4d4d4; } /**/
|
|
11
|
+
.cm-s-yonce div.CodeMirror-selected { background: rgba(252, 69, 133, 0.478); } /**/
|
|
12
|
+
.cm-s-yonce .CodeMirror-selectedtext,
|
|
13
|
+
.cm-s-yonce .CodeMirror-selected,
|
|
14
|
+
.cm-s-yonce .CodeMirror-line::selection,
|
|
15
|
+
.cm-s-yonce .CodeMirror-line > span::selection,
|
|
16
|
+
.cm-s-yonce .CodeMirror-line > span > span::selection,
|
|
17
|
+
.cm-s-yonce .CodeMirror-line::-moz-selection,
|
|
18
|
+
.cm-s-yonce .CodeMirror-line > span::-moz-selection,
|
|
19
|
+
.cm-s-yonce .CodeMirror-line > span > span::-moz-selection { background: rgba(252, 67, 132, 0.47); }
|
|
20
|
+
|
|
21
|
+
.cm-s-yonce.CodeMirror pre { padding-left: 0px; }
|
|
22
|
+
.cm-s-yonce .CodeMirror-gutters {background: #1C1C1C; border-right: 0px;}
|
|
23
|
+
.cm-s-yonce .CodeMirror-linenumber {color: #777777; padding-right: 10px; }
|
|
24
|
+
.cm-s-yonce .CodeMirror-activeline .CodeMirror-linenumber.CodeMirror-gutter-elt { background: #1C1C1C; color: #fc4384; }
|
|
25
|
+
.cm-s-yonce .CodeMirror-linenumber { color: #777; }
|
|
26
|
+
.cm-s-yonce .CodeMirror-cursor { border-left: 2px solid #FC4384; }
|
|
27
|
+
.cm-s-yonce .cm-searching { background: rgba(243, 155, 53, .3) !important; outline: 1px solid #F39B35; }
|
|
28
|
+
.cm-s-yonce .cm-searching.CodeMirror-selectedtext { background: rgba(243, 155, 53, .7) !important; color: white; }
|
|
29
|
+
|
|
30
|
+
.cm-s-yonce .cm-keyword { color: #00A7AA; } /**/
|
|
31
|
+
.cm-s-yonce .cm-atom { color: #F39B35; }
|
|
32
|
+
.cm-s-yonce .cm-number, .cm-s-yonce span.cm-type { color: #A06FCA; } /**/
|
|
33
|
+
.cm-s-yonce .cm-def { color: #98E342; }
|
|
34
|
+
.cm-s-yonce .cm-property,
|
|
35
|
+
.cm-s-yonce span.cm-variable { color: #D4D4D4; font-style: italic; }
|
|
36
|
+
.cm-s-yonce span.cm-variable-2 { color: #da7dae; font-style: italic; }
|
|
37
|
+
.cm-s-yonce span.cm-variable-3 { color: #A06FCA; }
|
|
38
|
+
.cm-s-yonce .cm-type.cm-def { color: #FC4384; font-style: normal; text-decoration: underline; }
|
|
39
|
+
.cm-s-yonce .cm-property.cm-def { color: #FC4384; font-style: normal; }
|
|
40
|
+
.cm-s-yonce .cm-callee { color: #FC4384; font-style: normal; }
|
|
41
|
+
.cm-s-yonce .cm-operator { color: #FC4384; } /**/
|
|
42
|
+
.cm-s-yonce .cm-qualifier,
|
|
43
|
+
.cm-s-yonce .cm-tag { color: #FC4384; }
|
|
44
|
+
.cm-s-yonce .cm-tag.cm-bracket { color: #D4D4D4; }
|
|
45
|
+
.cm-s-yonce .cm-attribute { color: #A06FCA; }
|
|
46
|
+
.cm-s-yonce .cm-comment { color:#696d70; font-style:italic; font-weight:normal; } /**/
|
|
47
|
+
.cm-s-yonce .cm-comment.cm-tag { color: #FC4384 }
|
|
48
|
+
.cm-s-yonce .cm-comment.cm-attribute { color: #D4D4D4; }
|
|
49
|
+
.cm-s-yonce .cm-string { color:#E6DB74; } /**/
|
|
50
|
+
.cm-s-yonce .cm-string-2 { color:#F39B35; } /*?*/
|
|
51
|
+
.cm-s-yonce .cm-meta { color: #D4D4D4; background: inherit; }
|
|
52
|
+
.cm-s-yonce .cm-builtin { color: #FC4384; } /*?*/
|
|
53
|
+
.cm-s-yonce .cm-header { color: #da7dae; }
|
|
54
|
+
.cm-s-yonce .cm-hr { color: #98E342; }
|
|
55
|
+
.cm-s-yonce .cm-link { color:#696d70; font-style:italic; text-decoration:none; } /**/
|
|
56
|
+
.cm-s-yonce .cm-error { border-bottom: 1px solid #C42412; }
|
|
57
|
+
|
|
58
|
+
.cm-s-yonce .CodeMirror-activeline-background { background: #272727; }
|
|
59
|
+
.cm-s-yonce .CodeMirror-matchingbracket { outline:1px solid grey; color:#D4D4D4 !important; }
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* "
|
|
3
|
+
* Using Zenburn color palette from the Emacs Zenburn Theme
|
|
4
|
+
* https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el
|
|
5
|
+
*
|
|
6
|
+
* Also using parts of https://github.com/xavi/coderay-lighttable-theme
|
|
7
|
+
* "
|
|
8
|
+
* From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; }
|
|
12
|
+
.cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; }
|
|
13
|
+
.cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white; }
|
|
14
|
+
.cm-s-zenburn.CodeMirror { background-color: #3f3f3f; color: #dcdccc; }
|
|
15
|
+
.cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; }
|
|
16
|
+
.cm-s-zenburn span.cm-comment { color: #7f9f7f; }
|
|
17
|
+
.cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; }
|
|
18
|
+
.cm-s-zenburn span.cm-atom { color: #bfebbf; }
|
|
19
|
+
.cm-s-zenburn span.cm-def { color: #dcdccc; }
|
|
20
|
+
.cm-s-zenburn span.cm-variable { color: #dfaf8f; }
|
|
21
|
+
.cm-s-zenburn span.cm-variable-2 { color: #dcdccc; }
|
|
22
|
+
.cm-s-zenburn span.cm-string { color: #cc9393; }
|
|
23
|
+
.cm-s-zenburn span.cm-string-2 { color: #cc9393; }
|
|
24
|
+
.cm-s-zenburn span.cm-number { color: #dcdccc; }
|
|
25
|
+
.cm-s-zenburn span.cm-tag { color: #93e0e3; }
|
|
26
|
+
.cm-s-zenburn span.cm-property { color: #dfaf8f; }
|
|
27
|
+
.cm-s-zenburn span.cm-attribute { color: #dfaf8f; }
|
|
28
|
+
.cm-s-zenburn span.cm-qualifier { color: #7cb8bb; }
|
|
29
|
+
.cm-s-zenburn span.cm-meta { color: #f0dfaf; }
|
|
30
|
+
.cm-s-zenburn span.cm-header { color: #f0efd0; }
|
|
31
|
+
.cm-s-zenburn span.cm-operator { color: #f0efd0; }
|
|
32
|
+
.cm-s-zenburn span.CodeMirror-matchingbracket { box-sizing: border-box; background: transparent; border-bottom: 1px solid; }
|
|
33
|
+
.cm-s-zenburn span.CodeMirror-nonmatchingbracket { border-bottom: 1px solid; background: none; }
|
|
34
|
+
.cm-s-zenburn .CodeMirror-activeline { background: #000000; }
|
|
35
|
+
.cm-s-zenburn .CodeMirror-activeline-background { background: #000000; }
|
|
36
|
+
.cm-s-zenburn div.CodeMirror-selected { background: #545454; }
|
|
37
|
+
.cm-s-zenburn .CodeMirror-focused div.CodeMirror-selected { background: #4f4f4f; }
|
package/www/index.html
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<meta charset="utf-8">
|
|
3
|
+
<link rel="stylesheet" href="/assets/css/style.css">
|
|
4
|
+
<style>
|
|
5
|
+
:root {
|
|
6
|
+
--ds-primary: var(--ds-simplystore);
|
|
7
|
+
--ds-primary-contrast: var(--ds-simplystore-contrast);
|
|
8
|
+
--ds-primary-gradient: var(--ds-simplystore-gradient);
|
|
9
|
+
--ds-primary-gradient-bump: var(--ds-simplystore-gradient-bump);
|
|
10
|
+
}
|
|
11
|
+
#databrowser {
|
|
12
|
+
border: 0;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
width: 50%;
|
|
16
|
+
height: 80vh;
|
|
17
|
+
}
|
|
18
|
+
form.Query {
|
|
19
|
+
width: 49%;
|
|
20
|
+
float: left;
|
|
21
|
+
height: calc(100vh - 65px);
|
|
22
|
+
margin-right: 1%;
|
|
23
|
+
margin-top: 65px;
|
|
24
|
+
}
|
|
25
|
+
.CodeMirror {
|
|
26
|
+
height: 100% !important;
|
|
27
|
+
}
|
|
28
|
+
.dataBrowser {
|
|
29
|
+
height: calc(100vh - 65px);
|
|
30
|
+
margin-top: 65px;
|
|
31
|
+
}
|
|
32
|
+
body {
|
|
33
|
+
position: fixed;
|
|
34
|
+
width: 100%;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
37
|
+
<body class="ds-nightmode">
|
|
38
|
+
<header>
|
|
39
|
+
<nav class="ds-toolbar">
|
|
40
|
+
<div class="simply-title">
|
|
41
|
+
<img src="/assets/img/simplystore-narrow.svg" alt="SimplyStore">
|
|
42
|
+
</div>
|
|
43
|
+
<button data-simply-command="run-query" class="ds-button ds-button-icon">
|
|
44
|
+
<svg class="ds-icon ds-icon-feather">
|
|
45
|
+
<use xlink:href="/assets/feather-sprite.svg#search">
|
|
46
|
+
</use></svg>
|
|
47
|
+
Run Query
|
|
48
|
+
</button>
|
|
49
|
+
<button data-simply-command="load-query-dropdown" class="ds-button ds-button-icon">
|
|
50
|
+
<svg class="ds-icon ds-icon-feather">
|
|
51
|
+
<use xlink:href="/assets/feather-sprite.svg#download">
|
|
52
|
+
</use></svg>
|
|
53
|
+
Load Query
|
|
54
|
+
<nav class="ds-dropdown-nav">
|
|
55
|
+
<ul class="ds-dropdown-list" data-simply-list="queries">
|
|
56
|
+
<template>
|
|
57
|
+
<li class="ds-dropdown-item" data-simply-command="load-query"><span data-simply-field="query">Query</span></li>
|
|
58
|
+
</template>
|
|
59
|
+
</ul>
|
|
60
|
+
</nav>
|
|
61
|
+
</button>
|
|
62
|
+
<button data-simply-command="save-query" class="ds-button ds-button-icon">
|
|
63
|
+
<svg class="ds-icon ds-icon-feather">
|
|
64
|
+
<use xlink:href="/assets/feather-sprite.svg#bookmark">
|
|
65
|
+
</use></svg>
|
|
66
|
+
Save Query
|
|
67
|
+
</button>
|
|
68
|
+
<span class="ds-push-right"></span>
|
|
69
|
+
<button class="ds-button ds-button-icon">
|
|
70
|
+
<svg class="ds-icon ds-icon-feather">
|
|
71
|
+
<use xlink:href="/assets/feather-sprite.svg#help-circle">
|
|
72
|
+
</use></svg>
|
|
73
|
+
Help
|
|
74
|
+
</button>
|
|
75
|
+
</nav>
|
|
76
|
+
</header>
|
|
77
|
+
|
|
78
|
+
<form data-simply-command="query" class="Query" data-simply-keyboard="query">
|
|
79
|
+
<textarea name="query" id="codeEditor" class="CodeMirror"></textarea>
|
|
80
|
+
</form>
|
|
81
|
+
|
|
82
|
+
<div class="dataBrowser">
|
|
83
|
+
<textarea id="databrowser" class="CodeMirror" data-simply-field="data"></textarea>
|
|
84
|
+
</div>
|
|
85
|
+
|
|
86
|
+
<script src="/codemirror/lib/codemirror.js"></script>
|
|
87
|
+
<link rel="stylesheet" href="/codemirror/lib/codemirror.css">
|
|
88
|
+
<link rel="stylesheet" href="/codemirror/addon/lint/lint.css">
|
|
89
|
+
<script src="/codemirror/mode/javascript/javascript.js"></script>
|
|
90
|
+
<link rel="stylesheet" href="/codemirror/theme/material-ocean.css">
|
|
91
|
+
<script src="https://unpkg.com/jshint@2.13.6/dist/jshint.js"></script>
|
|
92
|
+
<script src="/codemirror/addon/lint/lint.js"></script>
|
|
93
|
+
<script src="/codemirror/addon/lint/javascript-lint.js"></script>
|
|
94
|
+
<script src="https://unpkg.com/@muze-nl/jsontag@0.8.3/dist/browser.js"></script>
|
|
95
|
+
<script src="https://cdn.simplyedit.io/1/simply-edit.js"></script>
|
|
96
|
+
<script src="https://unpkg.com/simplyview@2.0.3/dist/simply.everything.js"></script>
|
|
97
|
+
<script>
|
|
98
|
+
var codeEditor = CodeMirror.fromTextArea(document.getElementById('codeEditor'), {
|
|
99
|
+
lineNumbers: true,
|
|
100
|
+
styleActiveLine: true,
|
|
101
|
+
matchBrackets: true,
|
|
102
|
+
theme: 'material-ocean',
|
|
103
|
+
mode: 'javascript'
|
|
104
|
+
})
|
|
105
|
+
codeEditor.focus()
|
|
106
|
+
var browser = CodeMirror.fromTextArea(document.getElementById('databrowser'), {
|
|
107
|
+
theme: 'material-ocean',
|
|
108
|
+
readOnly: true
|
|
109
|
+
})
|
|
110
|
+
</script>
|
|
111
|
+
<script>
|
|
112
|
+
const databrowser = simply.app({
|
|
113
|
+
routes: {
|
|
114
|
+
'/:*': async (params) => {
|
|
115
|
+
await databrowser.actions.query(window.location.pathname)
|
|
116
|
+
browser.setValue(databrowser.view.data)
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
commands: {
|
|
120
|
+
'run-query': async function(button, value) {
|
|
121
|
+
await this.app.actions.query(window.location.pathname, codeEditor.getValue())
|
|
122
|
+
browser.setValue(databrowser.view.data)
|
|
123
|
+
},
|
|
124
|
+
query: async function(form, values) {
|
|
125
|
+
await this.app.actions.query(window.location.pathname, values.query)
|
|
126
|
+
browser.setValue(databrowser.view.data)
|
|
127
|
+
},
|
|
128
|
+
'load-query-dropdown': async function(button) {
|
|
129
|
+
button.querySelector('nav.ds-dropdown-nav').style='display:block'
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
actions: {
|
|
133
|
+
query: async function(path, query) {
|
|
134
|
+
try {
|
|
135
|
+
let data;
|
|
136
|
+
if (query) {
|
|
137
|
+
data = await api.post(path, query)
|
|
138
|
+
} else {
|
|
139
|
+
data = await api.get(path)
|
|
140
|
+
}
|
|
141
|
+
databrowser.view.data = JSONTag.stringify(data, null, 4)
|
|
142
|
+
return data
|
|
143
|
+
} catch(err) {
|
|
144
|
+
databrowser.view.data = JSONTag.stringify(err, null, 4)
|
|
145
|
+
return err
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
keyboard: {
|
|
150
|
+
query: {
|
|
151
|
+
'Control+Enter': async function() {
|
|
152
|
+
await databrowser.actions.query(window.location.pathname, codeEditor.getValue())
|
|
153
|
+
browser.setValue(databrowser.view.data)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
view: {
|
|
158
|
+
queries: [
|
|
159
|
+
{
|
|
160
|
+
query: 'Test Query'
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
})
|
|
165
|
+
|
|
166
|
+
const apiBase = window.location.protocol+'//'+window.location.host;
|
|
167
|
+
const api = {
|
|
168
|
+
get: function(path, params) {
|
|
169
|
+
let url = apiBase+path;
|
|
170
|
+
if (!params && window.location.search) {
|
|
171
|
+
url += window.location.search
|
|
172
|
+
}
|
|
173
|
+
if (params) {
|
|
174
|
+
var args = Object.keys(params).map(param => encodeURIComponent(param)+'='+encodeURIComponent(params[param])).join('&')
|
|
175
|
+
url += '?' + args
|
|
176
|
+
}
|
|
177
|
+
return fetch(url, {
|
|
178
|
+
headers: {
|
|
179
|
+
'Accept': 'application/jsontag'
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
.then(response => {
|
|
183
|
+
let jsontag = response.text().then(JSONTag.parse)
|
|
184
|
+
if (response.ok) {
|
|
185
|
+
return jsontag
|
|
186
|
+
}
|
|
187
|
+
return jsontag.then(Promise.reject.bind(Promise))
|
|
188
|
+
})
|
|
189
|
+
},
|
|
190
|
+
post: function(path, query, params) {
|
|
191
|
+
let url = apiBase+path;
|
|
192
|
+
if (!params && window.location.search) {
|
|
193
|
+
url += window.location.search
|
|
194
|
+
}
|
|
195
|
+
if (params) {
|
|
196
|
+
var args = Object.keys(params).map(param => encodeURIComponent(param)+'='+encodeURIComponent(params[param])).join('&')
|
|
197
|
+
url += '?' + args
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return fetch(url, {
|
|
201
|
+
method: 'POST',
|
|
202
|
+
headers: {
|
|
203
|
+
'Accept': 'application/jsontag'
|
|
204
|
+
},
|
|
205
|
+
body: query
|
|
206
|
+
})
|
|
207
|
+
.then(response => {
|
|
208
|
+
let jsontag = response.text().then(JSONTag.parse)
|
|
209
|
+
if (response.ok) {
|
|
210
|
+
return jsontag
|
|
211
|
+
}
|
|
212
|
+
return jsontag.then(Promise.reject.bind(Promise))
|
|
213
|
+
})
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
</script>
|