@axdspub/axiom-ui-forms 0.2.8 → 0.2.9
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/library/axiom-ui-forms.d.ts +36 -4
- package/library/esm/_virtual/index10.js +2 -2
- package/library/esm/_virtual/index11.js +2 -2
- package/library/esm/_virtual/index12.js +6 -2
- package/library/esm/_virtual/index12.js.map +1 -1
- package/library/esm/_virtual/index13.js +6 -2
- package/library/esm/_virtual/index13.js.map +1 -1
- package/library/esm/_virtual/index14.js +2 -2
- package/library/esm/_virtual/index15.js +4 -0
- package/library/esm/_virtual/index15.js.map +1 -0
- package/library/esm/_virtual/index16.js +4 -0
- package/library/esm/_virtual/index16.js.map +1 -0
- package/library/esm/_virtual/index17.js +4 -0
- package/library/esm/_virtual/index17.js.map +1 -0
- package/library/esm/_virtual/index6.js +2 -2
- package/library/esm/_virtual/index6.js.map +1 -1
- package/library/esm/_virtual/index7.js +2 -2
- package/library/esm/_virtual/index7.js.map +1 -1
- package/library/esm/_virtual/index8.js +2 -2
- package/library/esm/_virtual/index9.js +2 -2
- package/library/esm/_virtual/utilities.js +4 -0
- package/library/esm/_virtual/utilities.js.map +1 -0
- package/library/esm/node_modules/@axdspub/axiom-ui-utilities/library/index.js +241 -9
- package/library/esm/node_modules/@axdspub/axiom-ui-utilities/library/index.js.map +1 -1
- package/library/esm/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
- package/library/esm/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/library/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
- package/library/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
- package/library/esm/node_modules/@codemirror/autocomplete/dist/index.js +1652 -0
- package/library/esm/node_modules/@codemirror/autocomplete/dist/index.js.map +1 -0
- package/library/esm/node_modules/@codemirror/commands/dist/index.js +1444 -0
- package/library/esm/node_modules/@codemirror/commands/dist/index.js.map +1 -0
- package/library/esm/node_modules/@codemirror/lang-json/dist/index.js +33 -0
- package/library/esm/node_modules/@codemirror/lang-json/dist/index.js.map +1 -0
- package/library/esm/node_modules/@codemirror/lang-yaml/dist/index.js +59 -0
- package/library/esm/node_modules/@codemirror/lang-yaml/dist/index.js.map +1 -0
- package/library/esm/node_modules/@codemirror/language/dist/index.js +1821 -0
- package/library/esm/node_modules/@codemirror/language/dist/index.js.map +1 -0
- package/library/esm/node_modules/@codemirror/lint/dist/index.js +589 -0
- package/library/esm/node_modules/@codemirror/lint/dist/index.js.map +1 -0
- package/library/esm/node_modules/@codemirror/search/dist/index.js +1227 -0
- package/library/esm/node_modules/@codemirror/search/dist/index.js.map +1 -0
- package/library/esm/node_modules/@codemirror/state/dist/index.js +3882 -0
- package/library/esm/node_modules/@codemirror/state/dist/index.js.map +1 -0
- package/library/esm/node_modules/@codemirror/theme-one-dark/dist/index.js +114 -0
- package/library/esm/node_modules/@codemirror/theme-one-dark/dist/index.js.map +1 -0
- package/library/esm/node_modules/@codemirror/view/dist/index.js +11052 -0
- package/library/esm/node_modules/@codemirror/view/dist/index.js.map +1 -0
- package/library/esm/node_modules/@lezer/common/dist/index.js +1704 -0
- package/library/esm/node_modules/@lezer/common/dist/index.js.map +1 -0
- package/library/esm/node_modules/@lezer/highlight/dist/index.js +876 -0
- package/library/esm/node_modules/@lezer/highlight/dist/index.js.map +1 -0
- package/library/esm/node_modules/@lezer/json/dist/index.js +38 -0
- package/library/esm/node_modules/@lezer/json/dist/index.js.map +1 -0
- package/library/esm/node_modules/@lezer/lr/dist/index.js +1855 -0
- package/library/esm/node_modules/@lezer/lr/dist/index.js.map +1 -0
- package/library/esm/node_modules/@lezer/yaml/dist/index.js +392 -0
- package/library/esm/node_modules/@lezer/yaml/dist/index.js.map +1 -0
- package/library/esm/node_modules/@marijn/find-cluster-break/src/index.js +83 -0
- package/library/esm/node_modules/@marijn/find-cluster-break/src/index.js.map +1 -0
- package/library/esm/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js +67 -1
- package/library/esm/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js.map +1 -1
- package/library/esm/node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.js +100 -0
- package/library/esm/node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.js.map +1 -0
- package/library/esm/node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.js +58 -0
- package/library/esm/node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.js.map +1 -0
- package/library/esm/node_modules/@uiw/react-codemirror/esm/index.js +89 -0
- package/library/esm/node_modules/@uiw/react-codemirror/esm/index.js.map +1 -0
- package/library/esm/node_modules/@uiw/react-codemirror/esm/theme/light.js +12 -0
- package/library/esm/node_modules/@uiw/react-codemirror/esm/theme/light.js.map +1 -0
- package/library/esm/node_modules/@uiw/react-codemirror/esm/useCodeMirror.js +151 -0
- package/library/esm/node_modules/@uiw/react-codemirror/esm/useCodeMirror.js.map +1 -0
- package/library/esm/node_modules/@uiw/react-codemirror/esm/utils.js +19 -0
- package/library/esm/node_modules/@uiw/react-codemirror/esm/utils.js.map +1 -0
- package/library/esm/node_modules/@ungap/structured-clone/esm/deserialize.js +77 -0
- package/library/esm/node_modules/@ungap/structured-clone/esm/deserialize.js.map +1 -0
- package/library/esm/node_modules/@ungap/structured-clone/esm/index.js +25 -0
- package/library/esm/node_modules/@ungap/structured-clone/esm/index.js.map +1 -0
- package/library/esm/node_modules/@ungap/structured-clone/esm/serialize.js +159 -0
- package/library/esm/node_modules/@ungap/structured-clone/esm/serialize.js.map +1 -0
- package/library/esm/node_modules/@ungap/structured-clone/esm/types.js +14 -0
- package/library/esm/node_modules/@ungap/structured-clone/esm/types.js.map +1 -0
- package/library/esm/node_modules/ajv/dist/compile/index.js +1 -1
- package/library/esm/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
- package/library/esm/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
- package/library/esm/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
- package/library/esm/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
- package/library/esm/node_modules/bail/index.js +15 -0
- package/library/esm/node_modules/bail/index.js.map +1 -0
- package/library/esm/node_modules/comma-separated-tokens/index.js +37 -0
- package/library/esm/node_modules/comma-separated-tokens/index.js.map +1 -0
- package/library/esm/node_modules/crelt/index.js +30 -0
- package/library/esm/node_modules/crelt/index.js.map +1 -0
- package/library/esm/node_modules/decode-named-character-reference/index.dom.js +39 -0
- package/library/esm/node_modules/decode-named-character-reference/index.dom.js.map +1 -0
- package/library/esm/node_modules/devlop/lib/default.js +6 -0
- package/library/esm/node_modules/devlop/lib/default.js.map +1 -0
- package/library/esm/node_modules/estree-util-is-identifier-name/lib/index.js +31 -0
- package/library/esm/node_modules/estree-util-is-identifier-name/lib/index.js.map +1 -0
- package/library/esm/node_modules/extend/index.js +127 -0
- package/library/esm/node_modules/extend/index.js.map +1 -0
- package/library/esm/node_modules/fast-uri/index.js +1 -1
- package/library/esm/node_modules/hast-util-to-jsx-runtime/lib/index.js +791 -0
- package/library/esm/node_modules/hast-util-to-jsx-runtime/lib/index.js.map +1 -0
- package/library/esm/node_modules/hast-util-whitespace/lib/index.js +37 -0
- package/library/esm/node_modules/hast-util-whitespace/lib/index.js.map +1 -0
- package/library/esm/node_modules/html-url-attributes/lib/index.js +34 -0
- package/library/esm/node_modules/html-url-attributes/lib/index.js.map +1 -0
- package/library/esm/node_modules/inline-style-parser/index.js +268 -0
- package/library/esm/node_modules/inline-style-parser/index.js.map +1 -0
- package/library/esm/node_modules/js-yaml/dist/js-yaml.js +3850 -0
- package/library/esm/node_modules/js-yaml/dist/js-yaml.js.map +1 -0
- package/library/esm/node_modules/json-schema-traverse/index.js +1 -1
- package/library/esm/node_modules/mdast-util-from-markdown/lib/index.js +1181 -0
- package/library/esm/node_modules/mdast-util-from-markdown/lib/index.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/footer.js +197 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/footer.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +31 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/break.js +27 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/break.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/code.js +51 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/code.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/delete.js +31 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/delete.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +31 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +74 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/heading.js +31 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/heading.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/html.js +32 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/html.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +45 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/image.js +40 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/image.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/index.js +67 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/index.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +36 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +50 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/link.js +41 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/link.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +126 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/list-item.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/list.js +57 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/list.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +31 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/root.js +27 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/root.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/strong.js +31 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/strong.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +33 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +70 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table-row.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table.js +65 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/text.js +29 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/text.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +31 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/index.js +105 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/index.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/revert.js +56 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/revert.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/state.js +322 -0
- package/library/esm/node_modules/mdast-util-to-hast/lib/state.js.map +1 -0
- package/library/esm/node_modules/mdast-util-to-string/lib/index.js +111 -0
- package/library/esm/node_modules/mdast-util-to-string/lib/index.js.map +1 -0
- package/library/esm/node_modules/micromark/lib/constructs.js +108 -0
- package/library/esm/node_modules/micromark/lib/constructs.js.map +1 -0
- package/library/esm/node_modules/micromark/lib/create-tokenizer.js +576 -0
- package/library/esm/node_modules/micromark/lib/create-tokenizer.js.map +1 -0
- package/library/esm/node_modules/micromark/lib/initialize/content.js +83 -0
- package/library/esm/node_modules/micromark/lib/initialize/content.js.map +1 -0
- package/library/esm/node_modules/micromark/lib/initialize/document.js +361 -0
- package/library/esm/node_modules/micromark/lib/initialize/document.js.map +1 -0
- package/library/esm/node_modules/micromark/lib/initialize/flow.js +62 -0
- package/library/esm/node_modules/micromark/lib/initialize/flow.js.map +1 -0
- package/library/esm/node_modules/micromark/lib/initialize/text.js +213 -0
- package/library/esm/node_modules/micromark/lib/initialize/text.js.map +1 -0
- package/library/esm/node_modules/micromark/lib/parse.js +60 -0
- package/library/esm/node_modules/micromark/lib/parse.js.map +1 -0
- package/library/esm/node_modules/micromark/lib/postprocess.js +22 -0
- package/library/esm/node_modules/micromark/lib/postprocess.js.map +1 -0
- package/library/esm/node_modules/micromark/lib/preprocess.js +118 -0
- package/library/esm/node_modules/micromark/lib/preprocess.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/attention.js +245 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/attention.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/autolink.js +237 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/autolink.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/blank-line.js +65 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/block-quote.js +147 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/block-quote.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/character-escape.js +68 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/character-escape.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/character-reference.js +153 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/character-reference.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/code-fenced.js +464 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/code-fenced.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/code-indented.js +181 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/code-indented.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/code-text.js +228 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/code-text.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/content.js +167 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/content.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/definition.js +258 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/definition.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +64 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/heading-atx.js +199 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/heading-atx.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/html-flow.js +880 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/html-flow.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/html-text.js +682 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/html-text.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/label-end.js +564 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/label-end.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/label-start-image.js +106 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/label-start-image.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/label-start-link.js +59 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/label-start-link.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/line-ending.js +36 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/line-ending.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/list.js +217 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/list.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/setext-underline.js +189 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/setext-underline.js.map +1 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/thematic-break.js +106 -0
- package/library/esm/node_modules/micromark-core-commonmark/lib/thematic-break.js.map +1 -0
- package/library/esm/node_modules/micromark-factory-destination/index.js +210 -0
- package/library/esm/node_modules/micromark-factory-destination/index.js.map +1 -0
- package/library/esm/node_modules/micromark-factory-label/index.js +152 -0
- package/library/esm/node_modules/micromark-factory-label/index.js.map +1 -0
- package/library/esm/node_modules/micromark-factory-space/index.js +68 -0
- package/library/esm/node_modules/micromark-factory-space/index.js.map +1 -0
- package/library/esm/node_modules/micromark-factory-title/index.js +162 -0
- package/library/esm/node_modules/micromark-factory-title/index.js.map +1 -0
- package/library/esm/node_modules/micromark-factory-whitespace/index.js +48 -0
- package/library/esm/node_modules/micromark-factory-whitespace/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-character/index.js +249 -0
- package/library/esm/node_modules/micromark-util-character/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-chunked/index.js +84 -0
- package/library/esm/node_modules/micromark-util-chunked/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-classify-character/index.js +31 -0
- package/library/esm/node_modules/micromark-util-classify-character/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-combine-extensions/index.js +96 -0
- package/library/esm/node_modules/micromark-util-combine-extensions/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-decode-numeric-character-reference/index.js +35 -0
- package/library/esm/node_modules/micromark-util-decode-numeric-character-reference/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-decode-string/index.js +49 -0
- package/library/esm/node_modules/micromark-util-decode-string/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-html-tag-name/index.js +96 -0
- package/library/esm/node_modules/micromark-util-html-tag-name/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-normalize-identifier/index.js +36 -0
- package/library/esm/node_modules/micromark-util-normalize-identifier/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-resolve-all/index.js +35 -0
- package/library/esm/node_modules/micromark-util-resolve-all/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-sanitize-uri/index.js +67 -0
- package/library/esm/node_modules/micromark-util-sanitize-uri/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-subtokenize/index.js +227 -0
- package/library/esm/node_modules/micromark-util-subtokenize/index.js.map +1 -0
- package/library/esm/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +254 -0
- package/library/esm/node_modules/micromark-util-subtokenize/lib/splice-buffer.js.map +1 -0
- package/library/esm/node_modules/property-information/index.js +16 -0
- package/library/esm/node_modules/property-information/index.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/aria.js +64 -0
- package/library/esm/node_modules/property-information/lib/aria.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/find.js +101 -0
- package/library/esm/node_modules/property-information/lib/find.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/hast-to-react.js +33 -0
- package/library/esm/node_modules/property-information/lib/hast-to-react.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/html.js +318 -0
- package/library/esm/node_modules/property-information/lib/html.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/normalize.js +15 -0
- package/library/esm/node_modules/property-information/lib/normalize.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/svg.js +564 -0
- package/library/esm/node_modules/property-information/lib/svg.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/util/case-insensitive-transform.js +16 -0
- package/library/esm/node_modules/property-information/lib/util/case-insensitive-transform.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/util/case-sensitive-transform.js +14 -0
- package/library/esm/node_modules/property-information/lib/util/case-sensitive-transform.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/util/create.js +47 -0
- package/library/esm/node_modules/property-information/lib/util/create.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/util/defined-info.js +64 -0
- package/library/esm/node_modules/property-information/lib/util/defined-info.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/util/info.js +35 -0
- package/library/esm/node_modules/property-information/lib/util/info.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/util/merge.js +31 -0
- package/library/esm/node_modules/property-information/lib/util/merge.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/util/schema.js +32 -0
- package/library/esm/node_modules/property-information/lib/util/schema.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/util/types.js +16 -0
- package/library/esm/node_modules/property-information/lib/util/types.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/xlink.js +20 -0
- package/library/esm/node_modules/property-information/lib/xlink.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/xml.js +12 -0
- package/library/esm/node_modules/property-information/lib/xml.js.map +1 -0
- package/library/esm/node_modules/property-information/lib/xmlns.js +12 -0
- package/library/esm/node_modules/property-information/lib/xmlns.js.map +1 -0
- package/library/esm/node_modules/react-markdown/lib/index.js +267 -0
- package/library/esm/node_modules/react-markdown/lib/index.js.map +1 -0
- package/library/esm/node_modules/react-router/dist/development/chunk-HA7DTUK3.js +1 -1
- package/library/esm/node_modules/react-router/node_modules/cookie/dist/index.js +1 -1
- package/library/esm/node_modules/remark-parse/lib/index.js +43 -0
- package/library/esm/node_modules/remark-parse/lib/index.js.map +1 -0
- package/library/esm/node_modules/remark-rehype/lib/index.js +132 -0
- package/library/esm/node_modules/remark-rehype/lib/index.js.map +1 -0
- package/library/esm/node_modules/space-separated-tokens/index.js +23 -0
- package/library/esm/node_modules/space-separated-tokens/index.js.map +1 -0
- package/library/esm/node_modules/style-mod/src/style-mod.js +175 -0
- package/library/esm/node_modules/style-mod/src/style-mod.js.map +1 -0
- package/library/esm/node_modules/style-to-js/cjs/index.js +38 -0
- package/library/esm/node_modules/style-to-js/cjs/index.js.map +1 -0
- package/library/esm/node_modules/style-to-js/cjs/utilities.js +58 -0
- package/library/esm/node_modules/style-to-js/cjs/utilities.js.map +1 -0
- package/library/esm/node_modules/style-to-object/cjs/index.js +56 -0
- package/library/esm/node_modules/style-to-object/cjs/index.js.map +1 -0
- package/library/esm/node_modules/trim-lines/index.js +72 -0
- package/library/esm/node_modules/trim-lines/index.js.map +1 -0
- package/library/esm/node_modules/trough/lib/index.js +209 -0
- package/library/esm/node_modules/trough/lib/index.js.map +1 -0
- package/library/esm/node_modules/unified/lib/callable-instance.js +47 -0
- package/library/esm/node_modules/unified/lib/callable-instance.js.map +1 -0
- package/library/esm/node_modules/unified/lib/index.js +979 -0
- package/library/esm/node_modules/unified/lib/index.js.map +1 -0
- package/library/esm/node_modules/unified/node_modules/is-plain-obj/index.js +11 -0
- package/library/esm/node_modules/unified/node_modules/is-plain-obj/index.js.map +1 -0
- package/library/esm/node_modules/unist-util-is/lib/index.js +179 -0
- package/library/esm/node_modules/unist-util-is/lib/index.js.map +1 -0
- package/library/esm/node_modules/unist-util-position/lib/index.js +98 -0
- package/library/esm/node_modules/unist-util-position/lib/index.js.map +1 -0
- package/library/esm/node_modules/unist-util-stringify-position/lib/index.js +87 -0
- package/library/esm/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
- package/library/esm/node_modules/unist-util-visit/lib/index.js +95 -0
- package/library/esm/node_modules/unist-util-visit/lib/index.js.map +1 -0
- package/library/esm/node_modules/unist-util-visit-parents/lib/color.js +10 -0
- package/library/esm/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
- package/library/esm/node_modules/unist-util-visit-parents/lib/index.js +188 -0
- package/library/esm/node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
- package/library/esm/node_modules/vfile/lib/index.js +644 -0
- package/library/esm/node_modules/vfile/lib/index.js.map +1 -0
- package/library/esm/node_modules/vfile/lib/minpath.browser.js +427 -0
- package/library/esm/node_modules/vfile/lib/minpath.browser.js.map +1 -0
- package/library/esm/node_modules/vfile/lib/minproc.browser.js +11 -0
- package/library/esm/node_modules/vfile/lib/minproc.browser.js.map +1 -0
- package/library/esm/node_modules/vfile/lib/minurl.browser.js +77 -0
- package/library/esm/node_modules/vfile/lib/minurl.browser.js.map +1 -0
- package/library/esm/node_modules/vfile/lib/minurl.shared.js +34 -0
- package/library/esm/node_modules/vfile/lib/minurl.shared.js.map +1 -0
- package/library/esm/node_modules/vfile-message/lib/index.js +305 -0
- package/library/esm/node_modules/vfile-message/lib/index.js.map +1 -0
- package/library/esm/node_modules/w3c-keyname/index.js +122 -0
- package/library/esm/node_modules/w3c-keyname/index.js.map +1 -0
- package/library/esm/src/Form/Components/FieldLabel.js +13 -3
- package/library/esm/src/Form/Components/FieldLabel.js.map +1 -1
- package/library/esm/src/Form/Components/InlineMarkdown.js +15 -0
- package/library/esm/src/Form/Components/InlineMarkdown.js.map +1 -0
- package/library/esm/src/Form/Components/Inputs/Boolean.js +5 -2
- package/library/esm/src/Form/Components/Inputs/Boolean.js.map +1 -1
- package/library/esm/src/Form/Components/Inputs/GeoJSONInputLoader.js +1 -1
- package/library/esm/src/Form/Components/Inputs/Geometry.js +290 -329
- package/library/esm/src/Form/Components/Inputs/Geometry.js.map +1 -1
- package/library/esm/src/Form/Components/Inputs/JSON.js +132 -0
- package/library/esm/src/Form/Components/Inputs/JSON.js.map +1 -0
- package/library/esm/src/Form/Components/Inputs/JSONInputLoader.js +19 -0
- package/library/esm/src/Form/Components/Inputs/JSONInputLoader.js.map +1 -0
- package/library/esm/src/Form/Components/Inputs/Number.js +78 -8
- package/library/esm/src/Form/Components/Inputs/Number.js.map +1 -1
- package/library/esm/src/Form/Components/Inputs/inputMap.js +2 -2
- package/library/esm/src/Form/Components/Inputs/inputMap.js.map +1 -1
- package/library/esm/src/Form/Creator/FormCreator.js +6 -2
- package/library/esm/src/Form/Creator/FormCreator.js.map +1 -1
- package/library/esm/src/Form/Creator/FormHeader.js +7 -5
- package/library/esm/src/Form/Creator/FormHeader.js.map +1 -1
- package/library/esm/src/Form/Creator/Page.js +4 -3
- package/library/esm/src/Form/Creator/Page.js.map +1 -1
- package/library/esm/src/Form/Manage/CopyableJSONOutput.js +41 -0
- package/library/esm/src/Form/Manage/CopyableJSONOutput.js.map +1 -0
- package/library/esm/src/Form/helpers.js +1 -1
- package/library/esm/src/Form/helpers.js.map +1 -1
- package/library/esm/src/Form/schemaToFormHelpers.js +87 -1
- package/library/esm/src/Form/schemaToFormHelpers.js.map +1 -1
- package/library/esm/src/library.js +1 -1
- package/package.json +7 -1
- package/library/esm/src/Form/Components/Inputs/JSONString.js +0 -34
- package/library/esm/src/Form/Components/Inputs/JSONString.js.map +0 -1
@@ -0,0 +1,1227 @@
|
|
1
|
+
import { EditorView, getPanel, ViewPlugin, showPanel, Decoration, runScopeHandlers } from '../../view/dist/index.js';
|
2
|
+
import { StateField, StateEffect, Prec, EditorSelection, Facet, combineConfig, codePointAt, codePointSize, fromCodePoint, EditorState, RangeSetBuilder, CharCategory, findClusterBreak } from '../../state/dist/index.js';
|
3
|
+
import crelt from '../../../crelt/index.js';
|
4
|
+
|
5
|
+
const basicNormalize = typeof String.prototype.normalize == "function"
|
6
|
+
? x => x.normalize("NFKD") : x => x;
|
7
|
+
/**
|
8
|
+
A search cursor provides an iterator over text matches in a
|
9
|
+
document.
|
10
|
+
*/
|
11
|
+
class SearchCursor {
|
12
|
+
/**
|
13
|
+
Create a text cursor. The query is the search string, `from` to
|
14
|
+
`to` provides the region to search.
|
15
|
+
|
16
|
+
When `normalize` is given, it will be called, on both the query
|
17
|
+
string and the content it is matched against, before comparing.
|
18
|
+
You can, for example, create a case-insensitive search by
|
19
|
+
passing `s => s.toLowerCase()`.
|
20
|
+
|
21
|
+
Text is always normalized with
|
22
|
+
[`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
|
23
|
+
(when supported).
|
24
|
+
*/
|
25
|
+
constructor(text, query, from = 0, to = text.length, normalize, test) {
|
26
|
+
this.test = test;
|
27
|
+
/**
|
28
|
+
The current match (only holds a meaningful value after
|
29
|
+
[`next`](https://codemirror.net/6/docs/ref/#search.SearchCursor.next) has been called and when
|
30
|
+
`done` is false).
|
31
|
+
*/
|
32
|
+
this.value = { from: 0, to: 0 };
|
33
|
+
/**
|
34
|
+
Whether the end of the iterated region has been reached.
|
35
|
+
*/
|
36
|
+
this.done = false;
|
37
|
+
this.matches = [];
|
38
|
+
this.buffer = "";
|
39
|
+
this.bufferPos = 0;
|
40
|
+
this.iter = text.iterRange(from, to);
|
41
|
+
this.bufferStart = from;
|
42
|
+
this.normalize = normalize ? x => normalize(basicNormalize(x)) : basicNormalize;
|
43
|
+
this.query = this.normalize(query);
|
44
|
+
}
|
45
|
+
peek() {
|
46
|
+
if (this.bufferPos == this.buffer.length) {
|
47
|
+
this.bufferStart += this.buffer.length;
|
48
|
+
this.iter.next();
|
49
|
+
if (this.iter.done)
|
50
|
+
return -1;
|
51
|
+
this.bufferPos = 0;
|
52
|
+
this.buffer = this.iter.value;
|
53
|
+
}
|
54
|
+
return codePointAt(this.buffer, this.bufferPos);
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
Look for the next match. Updates the iterator's
|
58
|
+
[`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
|
59
|
+
[`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
|
60
|
+
at least once before using the cursor.
|
61
|
+
*/
|
62
|
+
next() {
|
63
|
+
while (this.matches.length)
|
64
|
+
this.matches.pop();
|
65
|
+
return this.nextOverlapping();
|
66
|
+
}
|
67
|
+
/**
|
68
|
+
The `next` method will ignore matches that partially overlap a
|
69
|
+
previous match. This method behaves like `next`, but includes
|
70
|
+
such matches.
|
71
|
+
*/
|
72
|
+
nextOverlapping() {
|
73
|
+
for (;;) {
|
74
|
+
let next = this.peek();
|
75
|
+
if (next < 0) {
|
76
|
+
this.done = true;
|
77
|
+
return this;
|
78
|
+
}
|
79
|
+
let str = fromCodePoint(next), start = this.bufferStart + this.bufferPos;
|
80
|
+
this.bufferPos += codePointSize(next);
|
81
|
+
let norm = this.normalize(str);
|
82
|
+
if (norm.length)
|
83
|
+
for (let i = 0, pos = start;; i++) {
|
84
|
+
let code = norm.charCodeAt(i);
|
85
|
+
let match = this.match(code, pos, this.bufferPos + this.bufferStart);
|
86
|
+
if (i == norm.length - 1) {
|
87
|
+
if (match) {
|
88
|
+
this.value = match;
|
89
|
+
return this;
|
90
|
+
}
|
91
|
+
break;
|
92
|
+
}
|
93
|
+
if (pos == start && i < str.length && str.charCodeAt(i) == code)
|
94
|
+
pos++;
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
match(code, pos, end) {
|
99
|
+
let match = null;
|
100
|
+
for (let i = 0; i < this.matches.length; i += 2) {
|
101
|
+
let index = this.matches[i], keep = false;
|
102
|
+
if (this.query.charCodeAt(index) == code) {
|
103
|
+
if (index == this.query.length - 1) {
|
104
|
+
match = { from: this.matches[i + 1], to: end };
|
105
|
+
}
|
106
|
+
else {
|
107
|
+
this.matches[i]++;
|
108
|
+
keep = true;
|
109
|
+
}
|
110
|
+
}
|
111
|
+
if (!keep) {
|
112
|
+
this.matches.splice(i, 2);
|
113
|
+
i -= 2;
|
114
|
+
}
|
115
|
+
}
|
116
|
+
if (this.query.charCodeAt(0) == code) {
|
117
|
+
if (this.query.length == 1)
|
118
|
+
match = { from: pos, to: end };
|
119
|
+
else
|
120
|
+
this.matches.push(1, pos);
|
121
|
+
}
|
122
|
+
if (match && this.test && !this.test(match.from, match.to, this.buffer, this.bufferStart))
|
123
|
+
match = null;
|
124
|
+
return match;
|
125
|
+
}
|
126
|
+
}
|
127
|
+
if (typeof Symbol != "undefined")
|
128
|
+
SearchCursor.prototype[Symbol.iterator] = function () { return this; };
|
129
|
+
|
130
|
+
const empty = { from: -1, to: -1, match: /*@__PURE__*//.*/.exec("") };
|
131
|
+
const baseFlags = "gm" + (/x/.unicode == null ? "" : "u");
|
132
|
+
/**
|
133
|
+
This class is similar to [`SearchCursor`](https://codemirror.net/6/docs/ref/#search.SearchCursor)
|
134
|
+
but searches for a regular expression pattern instead of a plain
|
135
|
+
string.
|
136
|
+
*/
|
137
|
+
class RegExpCursor {
|
138
|
+
/**
|
139
|
+
Create a cursor that will search the given range in the given
|
140
|
+
document. `query` should be the raw pattern (as you'd pass it to
|
141
|
+
`new RegExp`).
|
142
|
+
*/
|
143
|
+
constructor(text, query, options, from = 0, to = text.length) {
|
144
|
+
this.text = text;
|
145
|
+
this.to = to;
|
146
|
+
this.curLine = "";
|
147
|
+
/**
|
148
|
+
Set to `true` when the cursor has reached the end of the search
|
149
|
+
range.
|
150
|
+
*/
|
151
|
+
this.done = false;
|
152
|
+
/**
|
153
|
+
Will contain an object with the extent of the match and the
|
154
|
+
match object when [`next`](https://codemirror.net/6/docs/ref/#search.RegExpCursor.next)
|
155
|
+
sucessfully finds a match.
|
156
|
+
*/
|
157
|
+
this.value = empty;
|
158
|
+
if (/\\[sWDnr]|\n|\r|\[\^/.test(query))
|
159
|
+
return new MultilineRegExpCursor(text, query, options, from, to);
|
160
|
+
this.re = new RegExp(query, baseFlags + ((options === null || options === void 0 ? void 0 : options.ignoreCase) ? "i" : ""));
|
161
|
+
this.test = options === null || options === void 0 ? void 0 : options.test;
|
162
|
+
this.iter = text.iter();
|
163
|
+
let startLine = text.lineAt(from);
|
164
|
+
this.curLineStart = startLine.from;
|
165
|
+
this.matchPos = toCharEnd(text, from);
|
166
|
+
this.getLine(this.curLineStart);
|
167
|
+
}
|
168
|
+
getLine(skip) {
|
169
|
+
this.iter.next(skip);
|
170
|
+
if (this.iter.lineBreak) {
|
171
|
+
this.curLine = "";
|
172
|
+
}
|
173
|
+
else {
|
174
|
+
this.curLine = this.iter.value;
|
175
|
+
if (this.curLineStart + this.curLine.length > this.to)
|
176
|
+
this.curLine = this.curLine.slice(0, this.to - this.curLineStart);
|
177
|
+
this.iter.next();
|
178
|
+
}
|
179
|
+
}
|
180
|
+
nextLine() {
|
181
|
+
this.curLineStart = this.curLineStart + this.curLine.length + 1;
|
182
|
+
if (this.curLineStart > this.to)
|
183
|
+
this.curLine = "";
|
184
|
+
else
|
185
|
+
this.getLine(0);
|
186
|
+
}
|
187
|
+
/**
|
188
|
+
Move to the next match, if there is one.
|
189
|
+
*/
|
190
|
+
next() {
|
191
|
+
for (let off = this.matchPos - this.curLineStart;;) {
|
192
|
+
this.re.lastIndex = off;
|
193
|
+
let match = this.matchPos <= this.to && this.re.exec(this.curLine);
|
194
|
+
if (match) {
|
195
|
+
let from = this.curLineStart + match.index, to = from + match[0].length;
|
196
|
+
this.matchPos = toCharEnd(this.text, to + (from == to ? 1 : 0));
|
197
|
+
if (from == this.curLineStart + this.curLine.length)
|
198
|
+
this.nextLine();
|
199
|
+
if ((from < to || from > this.value.to) && (!this.test || this.test(from, to, match))) {
|
200
|
+
this.value = { from, to, match };
|
201
|
+
return this;
|
202
|
+
}
|
203
|
+
off = this.matchPos - this.curLineStart;
|
204
|
+
}
|
205
|
+
else if (this.curLineStart + this.curLine.length < this.to) {
|
206
|
+
this.nextLine();
|
207
|
+
off = 0;
|
208
|
+
}
|
209
|
+
else {
|
210
|
+
this.done = true;
|
211
|
+
return this;
|
212
|
+
}
|
213
|
+
}
|
214
|
+
}
|
215
|
+
}
|
216
|
+
const flattened = /*@__PURE__*/new WeakMap();
|
217
|
+
// Reusable (partially) flattened document strings
|
218
|
+
class FlattenedDoc {
|
219
|
+
constructor(from, text) {
|
220
|
+
this.from = from;
|
221
|
+
this.text = text;
|
222
|
+
}
|
223
|
+
get to() { return this.from + this.text.length; }
|
224
|
+
static get(doc, from, to) {
|
225
|
+
let cached = flattened.get(doc);
|
226
|
+
if (!cached || cached.from >= to || cached.to <= from) {
|
227
|
+
let flat = new FlattenedDoc(from, doc.sliceString(from, to));
|
228
|
+
flattened.set(doc, flat);
|
229
|
+
return flat;
|
230
|
+
}
|
231
|
+
if (cached.from == from && cached.to == to)
|
232
|
+
return cached;
|
233
|
+
let { text, from: cachedFrom } = cached;
|
234
|
+
if (cachedFrom > from) {
|
235
|
+
text = doc.sliceString(from, cachedFrom) + text;
|
236
|
+
cachedFrom = from;
|
237
|
+
}
|
238
|
+
if (cached.to < to)
|
239
|
+
text += doc.sliceString(cached.to, to);
|
240
|
+
flattened.set(doc, new FlattenedDoc(cachedFrom, text));
|
241
|
+
return new FlattenedDoc(from, text.slice(from - cachedFrom, to - cachedFrom));
|
242
|
+
}
|
243
|
+
}
|
244
|
+
class MultilineRegExpCursor {
|
245
|
+
constructor(text, query, options, from, to) {
|
246
|
+
this.text = text;
|
247
|
+
this.to = to;
|
248
|
+
this.done = false;
|
249
|
+
this.value = empty;
|
250
|
+
this.matchPos = toCharEnd(text, from);
|
251
|
+
this.re = new RegExp(query, baseFlags + ((options === null || options === void 0 ? void 0 : options.ignoreCase) ? "i" : ""));
|
252
|
+
this.test = options === null || options === void 0 ? void 0 : options.test;
|
253
|
+
this.flat = FlattenedDoc.get(text, from, this.chunkEnd(from + 5000 /* Chunk.Base */));
|
254
|
+
}
|
255
|
+
chunkEnd(pos) {
|
256
|
+
return pos >= this.to ? this.to : this.text.lineAt(pos).to;
|
257
|
+
}
|
258
|
+
next() {
|
259
|
+
for (;;) {
|
260
|
+
let off = this.re.lastIndex = this.matchPos - this.flat.from;
|
261
|
+
let match = this.re.exec(this.flat.text);
|
262
|
+
// Skip empty matches directly after the last match
|
263
|
+
if (match && !match[0] && match.index == off) {
|
264
|
+
this.re.lastIndex = off + 1;
|
265
|
+
match = this.re.exec(this.flat.text);
|
266
|
+
}
|
267
|
+
if (match) {
|
268
|
+
let from = this.flat.from + match.index, to = from + match[0].length;
|
269
|
+
// If a match goes almost to the end of a noncomplete chunk, try
|
270
|
+
// again, since it'll likely be able to match more
|
271
|
+
if ((this.flat.to >= this.to || match.index + match[0].length <= this.flat.text.length - 10) &&
|
272
|
+
(!this.test || this.test(from, to, match))) {
|
273
|
+
this.value = { from, to, match };
|
274
|
+
this.matchPos = toCharEnd(this.text, to + (from == to ? 1 : 0));
|
275
|
+
return this;
|
276
|
+
}
|
277
|
+
}
|
278
|
+
if (this.flat.to == this.to) {
|
279
|
+
this.done = true;
|
280
|
+
return this;
|
281
|
+
}
|
282
|
+
// Grow the flattened doc
|
283
|
+
this.flat = FlattenedDoc.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
|
284
|
+
}
|
285
|
+
}
|
286
|
+
}
|
287
|
+
if (typeof Symbol != "undefined") {
|
288
|
+
RegExpCursor.prototype[Symbol.iterator] = MultilineRegExpCursor.prototype[Symbol.iterator] =
|
289
|
+
function () { return this; };
|
290
|
+
}
|
291
|
+
function validRegExp(source) {
|
292
|
+
try {
|
293
|
+
new RegExp(source, baseFlags);
|
294
|
+
return true;
|
295
|
+
}
|
296
|
+
catch (_a) {
|
297
|
+
return false;
|
298
|
+
}
|
299
|
+
}
|
300
|
+
function toCharEnd(text, pos) {
|
301
|
+
if (pos >= text.length)
|
302
|
+
return pos;
|
303
|
+
let line = text.lineAt(pos), next;
|
304
|
+
while (pos < line.to && (next = line.text.charCodeAt(pos - line.from)) >= 0xDC00 && next < 0xE000)
|
305
|
+
pos++;
|
306
|
+
return pos;
|
307
|
+
}
|
308
|
+
|
309
|
+
function createLineDialog(view) {
|
310
|
+
let line = String(view.state.doc.lineAt(view.state.selection.main.head).number);
|
311
|
+
let input = crelt("input", { class: "cm-textfield", name: "line", value: line });
|
312
|
+
let dom = crelt("form", {
|
313
|
+
class: "cm-gotoLine",
|
314
|
+
onkeydown: (event) => {
|
315
|
+
if (event.keyCode == 27) { // Escape
|
316
|
+
event.preventDefault();
|
317
|
+
view.dispatch({ effects: dialogEffect.of(false) });
|
318
|
+
view.focus();
|
319
|
+
}
|
320
|
+
else if (event.keyCode == 13) { // Enter
|
321
|
+
event.preventDefault();
|
322
|
+
go();
|
323
|
+
}
|
324
|
+
},
|
325
|
+
onsubmit: (event) => {
|
326
|
+
event.preventDefault();
|
327
|
+
go();
|
328
|
+
}
|
329
|
+
}, crelt("label", view.state.phrase("Go to line"), ": ", input), " ", crelt("button", { class: "cm-button", type: "submit" }, view.state.phrase("go")), crelt("button", {
|
330
|
+
name: "close",
|
331
|
+
onclick: () => {
|
332
|
+
view.dispatch({ effects: dialogEffect.of(false) });
|
333
|
+
view.focus();
|
334
|
+
},
|
335
|
+
"aria-label": view.state.phrase("close"),
|
336
|
+
type: "button"
|
337
|
+
}, ["×"]));
|
338
|
+
function go() {
|
339
|
+
let match = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(input.value);
|
340
|
+
if (!match)
|
341
|
+
return;
|
342
|
+
let { state } = view, startLine = state.doc.lineAt(state.selection.main.head);
|
343
|
+
let [, sign, ln, cl, percent] = match;
|
344
|
+
let col = cl ? +cl.slice(1) : 0;
|
345
|
+
let line = ln ? +ln : startLine.number;
|
346
|
+
if (ln && percent) {
|
347
|
+
let pc = line / 100;
|
348
|
+
if (sign)
|
349
|
+
pc = pc * (sign == "-" ? -1 : 1) + (startLine.number / state.doc.lines);
|
350
|
+
line = Math.round(state.doc.lines * pc);
|
351
|
+
}
|
352
|
+
else if (ln && sign) {
|
353
|
+
line = line * (sign == "-" ? -1 : 1) + startLine.number;
|
354
|
+
}
|
355
|
+
let docLine = state.doc.line(Math.max(1, Math.min(state.doc.lines, line)));
|
356
|
+
let selection = EditorSelection.cursor(docLine.from + Math.max(0, Math.min(col, docLine.length)));
|
357
|
+
view.dispatch({
|
358
|
+
effects: [dialogEffect.of(false), EditorView.scrollIntoView(selection.from, { y: 'center' })],
|
359
|
+
selection,
|
360
|
+
});
|
361
|
+
view.focus();
|
362
|
+
}
|
363
|
+
return { dom };
|
364
|
+
}
|
365
|
+
const dialogEffect = /*@__PURE__*/StateEffect.define();
|
366
|
+
const dialogField = /*@__PURE__*/StateField.define({
|
367
|
+
create() { return true; },
|
368
|
+
update(value, tr) {
|
369
|
+
for (let e of tr.effects)
|
370
|
+
if (e.is(dialogEffect))
|
371
|
+
value = e.value;
|
372
|
+
return value;
|
373
|
+
},
|
374
|
+
provide: f => showPanel.from(f, val => val ? createLineDialog : null)
|
375
|
+
});
|
376
|
+
/**
|
377
|
+
Command that shows a dialog asking the user for a line number, and
|
378
|
+
when a valid position is provided, moves the cursor to that line.
|
379
|
+
|
380
|
+
Supports line numbers, relative line offsets prefixed with `+` or
|
381
|
+
`-`, document percentages suffixed with `%`, and an optional
|
382
|
+
column position by adding `:` and a second number after the line
|
383
|
+
number.
|
384
|
+
*/
|
385
|
+
const gotoLine = view => {
|
386
|
+
let panel = getPanel(view, createLineDialog);
|
387
|
+
if (!panel) {
|
388
|
+
let effects = [dialogEffect.of(true)];
|
389
|
+
if (view.state.field(dialogField, false) == null)
|
390
|
+
effects.push(StateEffect.appendConfig.of([dialogField, baseTheme$1]));
|
391
|
+
view.dispatch({ effects });
|
392
|
+
panel = getPanel(view, createLineDialog);
|
393
|
+
}
|
394
|
+
if (panel)
|
395
|
+
panel.dom.querySelector("input").select();
|
396
|
+
return true;
|
397
|
+
};
|
398
|
+
const baseTheme$1 = /*@__PURE__*/EditorView.baseTheme({
|
399
|
+
".cm-panel.cm-gotoLine": {
|
400
|
+
padding: "2px 6px 4px",
|
401
|
+
position: "relative",
|
402
|
+
"& label": { fontSize: "80%" },
|
403
|
+
"& [name=close]": {
|
404
|
+
position: "absolute",
|
405
|
+
top: "0", bottom: "0",
|
406
|
+
right: "4px",
|
407
|
+
backgroundColor: "inherit",
|
408
|
+
border: "none",
|
409
|
+
font: "inherit",
|
410
|
+
padding: "0"
|
411
|
+
}
|
412
|
+
}
|
413
|
+
});
|
414
|
+
|
415
|
+
const defaultHighlightOptions = {
|
416
|
+
highlightWordAroundCursor: false,
|
417
|
+
minSelectionLength: 1,
|
418
|
+
maxMatches: 100,
|
419
|
+
wholeWords: false
|
420
|
+
};
|
421
|
+
const highlightConfig = /*@__PURE__*/Facet.define({
|
422
|
+
combine(options) {
|
423
|
+
return combineConfig(options, defaultHighlightOptions, {
|
424
|
+
highlightWordAroundCursor: (a, b) => a || b,
|
425
|
+
minSelectionLength: Math.min,
|
426
|
+
maxMatches: Math.min
|
427
|
+
});
|
428
|
+
}
|
429
|
+
});
|
430
|
+
/**
|
431
|
+
This extension highlights text that matches the selection. It uses
|
432
|
+
the `"cm-selectionMatch"` class for the highlighting. When
|
433
|
+
`highlightWordAroundCursor` is enabled, the word at the cursor
|
434
|
+
itself will be highlighted with `"cm-selectionMatch-main"`.
|
435
|
+
*/
|
436
|
+
function highlightSelectionMatches(options) {
|
437
|
+
let ext = [defaultTheme, matchHighlighter];
|
438
|
+
return ext;
|
439
|
+
}
|
440
|
+
const matchDeco = /*@__PURE__*/Decoration.mark({ class: "cm-selectionMatch" });
|
441
|
+
const mainMatchDeco = /*@__PURE__*/Decoration.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
|
442
|
+
// Whether the characters directly outside the given positions are non-word characters
|
443
|
+
function insideWordBoundaries(check, state, from, to) {
|
444
|
+
return (from == 0 || check(state.sliceDoc(from - 1, from)) != CharCategory.Word) &&
|
445
|
+
(to == state.doc.length || check(state.sliceDoc(to, to + 1)) != CharCategory.Word);
|
446
|
+
}
|
447
|
+
// Whether the characters directly at the given positions are word characters
|
448
|
+
function insideWord(check, state, from, to) {
|
449
|
+
return check(state.sliceDoc(from, from + 1)) == CharCategory.Word
|
450
|
+
&& check(state.sliceDoc(to - 1, to)) == CharCategory.Word;
|
451
|
+
}
|
452
|
+
const matchHighlighter = /*@__PURE__*/ViewPlugin.fromClass(class {
|
453
|
+
constructor(view) {
|
454
|
+
this.decorations = this.getDeco(view);
|
455
|
+
}
|
456
|
+
update(update) {
|
457
|
+
if (update.selectionSet || update.docChanged || update.viewportChanged)
|
458
|
+
this.decorations = this.getDeco(update.view);
|
459
|
+
}
|
460
|
+
getDeco(view) {
|
461
|
+
let conf = view.state.facet(highlightConfig);
|
462
|
+
let { state } = view, sel = state.selection;
|
463
|
+
if (sel.ranges.length > 1)
|
464
|
+
return Decoration.none;
|
465
|
+
let range = sel.main, query, check = null;
|
466
|
+
if (range.empty) {
|
467
|
+
if (!conf.highlightWordAroundCursor)
|
468
|
+
return Decoration.none;
|
469
|
+
let word = state.wordAt(range.head);
|
470
|
+
if (!word)
|
471
|
+
return Decoration.none;
|
472
|
+
check = state.charCategorizer(range.head);
|
473
|
+
query = state.sliceDoc(word.from, word.to);
|
474
|
+
}
|
475
|
+
else {
|
476
|
+
let len = range.to - range.from;
|
477
|
+
if (len < conf.minSelectionLength || len > 200)
|
478
|
+
return Decoration.none;
|
479
|
+
if (conf.wholeWords) {
|
480
|
+
query = state.sliceDoc(range.from, range.to); // TODO: allow and include leading/trailing space?
|
481
|
+
check = state.charCategorizer(range.head);
|
482
|
+
if (!(insideWordBoundaries(check, state, range.from, range.to) &&
|
483
|
+
insideWord(check, state, range.from, range.to)))
|
484
|
+
return Decoration.none;
|
485
|
+
}
|
486
|
+
else {
|
487
|
+
query = state.sliceDoc(range.from, range.to);
|
488
|
+
if (!query)
|
489
|
+
return Decoration.none;
|
490
|
+
}
|
491
|
+
}
|
492
|
+
let deco = [];
|
493
|
+
for (let part of view.visibleRanges) {
|
494
|
+
let cursor = new SearchCursor(state.doc, query, part.from, part.to);
|
495
|
+
while (!cursor.next().done) {
|
496
|
+
let { from, to } = cursor.value;
|
497
|
+
if (!check || insideWordBoundaries(check, state, from, to)) {
|
498
|
+
if (range.empty && from <= range.from && to >= range.to)
|
499
|
+
deco.push(mainMatchDeco.range(from, to));
|
500
|
+
else if (from >= range.to || to <= range.from)
|
501
|
+
deco.push(matchDeco.range(from, to));
|
502
|
+
if (deco.length > conf.maxMatches)
|
503
|
+
return Decoration.none;
|
504
|
+
}
|
505
|
+
}
|
506
|
+
}
|
507
|
+
return Decoration.set(deco);
|
508
|
+
}
|
509
|
+
}, {
|
510
|
+
decorations: v => v.decorations
|
511
|
+
});
|
512
|
+
const defaultTheme = /*@__PURE__*/EditorView.baseTheme({
|
513
|
+
".cm-selectionMatch": { backgroundColor: "#99ff7780" },
|
514
|
+
".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
|
515
|
+
});
|
516
|
+
// Select the words around the cursors.
|
517
|
+
const selectWord = ({ state, dispatch }) => {
|
518
|
+
let { selection } = state;
|
519
|
+
let newSel = EditorSelection.create(selection.ranges.map(range => state.wordAt(range.head) || EditorSelection.cursor(range.head)), selection.mainIndex);
|
520
|
+
if (newSel.eq(selection))
|
521
|
+
return false;
|
522
|
+
dispatch(state.update({ selection: newSel }));
|
523
|
+
return true;
|
524
|
+
};
|
525
|
+
// Find next occurrence of query relative to last cursor. Wrap around
|
526
|
+
// the document if there are no more matches.
|
527
|
+
function findNextOccurrence(state, query) {
|
528
|
+
let { main, ranges } = state.selection;
|
529
|
+
let word = state.wordAt(main.head), fullWord = word && word.from == main.from && word.to == main.to;
|
530
|
+
for (let cycled = false, cursor = new SearchCursor(state.doc, query, ranges[ranges.length - 1].to);;) {
|
531
|
+
cursor.next();
|
532
|
+
if (cursor.done) {
|
533
|
+
if (cycled)
|
534
|
+
return null;
|
535
|
+
cursor = new SearchCursor(state.doc, query, 0, Math.max(0, ranges[ranges.length - 1].from - 1));
|
536
|
+
cycled = true;
|
537
|
+
}
|
538
|
+
else {
|
539
|
+
if (cycled && ranges.some(r => r.from == cursor.value.from))
|
540
|
+
continue;
|
541
|
+
if (fullWord) {
|
542
|
+
let word = state.wordAt(cursor.value.from);
|
543
|
+
if (!word || word.from != cursor.value.from || word.to != cursor.value.to)
|
544
|
+
continue;
|
545
|
+
}
|
546
|
+
return cursor.value;
|
547
|
+
}
|
548
|
+
}
|
549
|
+
}
|
550
|
+
/**
|
551
|
+
Select next occurrence of the current selection. Expand selection
|
552
|
+
to the surrounding word when the selection is empty.
|
553
|
+
*/
|
554
|
+
const selectNextOccurrence = ({ state, dispatch }) => {
|
555
|
+
let { ranges } = state.selection;
|
556
|
+
if (ranges.some(sel => sel.from === sel.to))
|
557
|
+
return selectWord({ state, dispatch });
|
558
|
+
let searchedText = state.sliceDoc(ranges[0].from, ranges[0].to);
|
559
|
+
if (state.selection.ranges.some(r => state.sliceDoc(r.from, r.to) != searchedText))
|
560
|
+
return false;
|
561
|
+
let range = findNextOccurrence(state, searchedText);
|
562
|
+
if (!range)
|
563
|
+
return false;
|
564
|
+
dispatch(state.update({
|
565
|
+
selection: state.selection.addRange(EditorSelection.range(range.from, range.to), false),
|
566
|
+
effects: EditorView.scrollIntoView(range.to)
|
567
|
+
}));
|
568
|
+
return true;
|
569
|
+
};
|
570
|
+
|
571
|
+
const searchConfigFacet = /*@__PURE__*/Facet.define({
|
572
|
+
combine(configs) {
|
573
|
+
return combineConfig(configs, {
|
574
|
+
top: false,
|
575
|
+
caseSensitive: false,
|
576
|
+
literal: false,
|
577
|
+
regexp: false,
|
578
|
+
wholeWord: false,
|
579
|
+
createPanel: view => new SearchPanel(view),
|
580
|
+
scrollToMatch: range => EditorView.scrollIntoView(range)
|
581
|
+
});
|
582
|
+
}
|
583
|
+
});
|
584
|
+
/**
|
585
|
+
A search query. Part of the editor's search state.
|
586
|
+
*/
|
587
|
+
class SearchQuery {
|
588
|
+
/**
|
589
|
+
Create a query object.
|
590
|
+
*/
|
591
|
+
constructor(config) {
|
592
|
+
this.search = config.search;
|
593
|
+
this.caseSensitive = !!config.caseSensitive;
|
594
|
+
this.literal = !!config.literal;
|
595
|
+
this.regexp = !!config.regexp;
|
596
|
+
this.replace = config.replace || "";
|
597
|
+
this.valid = !!this.search && (!this.regexp || validRegExp(this.search));
|
598
|
+
this.unquoted = this.unquote(this.search);
|
599
|
+
this.wholeWord = !!config.wholeWord;
|
600
|
+
}
|
601
|
+
/**
|
602
|
+
@internal
|
603
|
+
*/
|
604
|
+
unquote(text) {
|
605
|
+
return this.literal ? text :
|
606
|
+
text.replace(/\\([nrt\\])/g, (_, ch) => ch == "n" ? "\n" : ch == "r" ? "\r" : ch == "t" ? "\t" : "\\");
|
607
|
+
}
|
608
|
+
/**
|
609
|
+
Compare this query to another query.
|
610
|
+
*/
|
611
|
+
eq(other) {
|
612
|
+
return this.search == other.search && this.replace == other.replace &&
|
613
|
+
this.caseSensitive == other.caseSensitive && this.regexp == other.regexp &&
|
614
|
+
this.wholeWord == other.wholeWord;
|
615
|
+
}
|
616
|
+
/**
|
617
|
+
@internal
|
618
|
+
*/
|
619
|
+
create() {
|
620
|
+
return this.regexp ? new RegExpQuery(this) : new StringQuery(this);
|
621
|
+
}
|
622
|
+
/**
|
623
|
+
Get a search cursor for this query, searching through the given
|
624
|
+
range in the given state.
|
625
|
+
*/
|
626
|
+
getCursor(state, from = 0, to) {
|
627
|
+
let st = state.doc ? state : EditorState.create({ doc: state });
|
628
|
+
if (to == null)
|
629
|
+
to = st.doc.length;
|
630
|
+
return this.regexp ? regexpCursor(this, st, from, to) : stringCursor(this, st, from, to);
|
631
|
+
}
|
632
|
+
}
|
633
|
+
class QueryType {
|
634
|
+
constructor(spec) {
|
635
|
+
this.spec = spec;
|
636
|
+
}
|
637
|
+
}
|
638
|
+
function stringCursor(spec, state, from, to) {
|
639
|
+
return new SearchCursor(state.doc, spec.unquoted, from, to, spec.caseSensitive ? undefined : x => x.toLowerCase(), spec.wholeWord ? stringWordTest(state.doc, state.charCategorizer(state.selection.main.head)) : undefined);
|
640
|
+
}
|
641
|
+
function stringWordTest(doc, categorizer) {
|
642
|
+
return (from, to, buf, bufPos) => {
|
643
|
+
if (bufPos > from || bufPos + buf.length < to) {
|
644
|
+
bufPos = Math.max(0, from - 2);
|
645
|
+
buf = doc.sliceString(bufPos, Math.min(doc.length, to + 2));
|
646
|
+
}
|
647
|
+
return (categorizer(charBefore(buf, from - bufPos)) != CharCategory.Word ||
|
648
|
+
categorizer(charAfter(buf, from - bufPos)) != CharCategory.Word) &&
|
649
|
+
(categorizer(charAfter(buf, to - bufPos)) != CharCategory.Word ||
|
650
|
+
categorizer(charBefore(buf, to - bufPos)) != CharCategory.Word);
|
651
|
+
};
|
652
|
+
}
|
653
|
+
class StringQuery extends QueryType {
|
654
|
+
constructor(spec) {
|
655
|
+
super(spec);
|
656
|
+
}
|
657
|
+
nextMatch(state, curFrom, curTo) {
|
658
|
+
let cursor = stringCursor(this.spec, state, curTo, state.doc.length).nextOverlapping();
|
659
|
+
if (cursor.done) {
|
660
|
+
let end = Math.min(state.doc.length, curFrom + this.spec.unquoted.length);
|
661
|
+
cursor = stringCursor(this.spec, state, 0, end).nextOverlapping();
|
662
|
+
}
|
663
|
+
return cursor.done || cursor.value.from == curFrom && cursor.value.to == curTo ? null : cursor.value;
|
664
|
+
}
|
665
|
+
// Searching in reverse is, rather than implementing an inverted search
|
666
|
+
// cursor, done by scanning chunk after chunk forward.
|
667
|
+
prevMatchInRange(state, from, to) {
|
668
|
+
for (let pos = to;;) {
|
669
|
+
let start = Math.max(from, pos - 10000 /* FindPrev.ChunkSize */ - this.spec.unquoted.length);
|
670
|
+
let cursor = stringCursor(this.spec, state, start, pos), range = null;
|
671
|
+
while (!cursor.nextOverlapping().done)
|
672
|
+
range = cursor.value;
|
673
|
+
if (range)
|
674
|
+
return range;
|
675
|
+
if (start == from)
|
676
|
+
return null;
|
677
|
+
pos -= 10000 /* FindPrev.ChunkSize */;
|
678
|
+
}
|
679
|
+
}
|
680
|
+
prevMatch(state, curFrom, curTo) {
|
681
|
+
let found = this.prevMatchInRange(state, 0, curFrom);
|
682
|
+
if (!found)
|
683
|
+
found = this.prevMatchInRange(state, Math.max(0, curTo - this.spec.unquoted.length), state.doc.length);
|
684
|
+
return found && (found.from != curFrom || found.to != curTo) ? found : null;
|
685
|
+
}
|
686
|
+
getReplacement(_result) { return this.spec.unquote(this.spec.replace); }
|
687
|
+
matchAll(state, limit) {
|
688
|
+
let cursor = stringCursor(this.spec, state, 0, state.doc.length), ranges = [];
|
689
|
+
while (!cursor.next().done) {
|
690
|
+
if (ranges.length >= limit)
|
691
|
+
return null;
|
692
|
+
ranges.push(cursor.value);
|
693
|
+
}
|
694
|
+
return ranges;
|
695
|
+
}
|
696
|
+
highlight(state, from, to, add) {
|
697
|
+
let cursor = stringCursor(this.spec, state, Math.max(0, from - this.spec.unquoted.length), Math.min(to + this.spec.unquoted.length, state.doc.length));
|
698
|
+
while (!cursor.next().done)
|
699
|
+
add(cursor.value.from, cursor.value.to);
|
700
|
+
}
|
701
|
+
}
|
702
|
+
function regexpCursor(spec, state, from, to) {
|
703
|
+
return new RegExpCursor(state.doc, spec.search, {
|
704
|
+
ignoreCase: !spec.caseSensitive,
|
705
|
+
test: spec.wholeWord ? regexpWordTest(state.charCategorizer(state.selection.main.head)) : undefined
|
706
|
+
}, from, to);
|
707
|
+
}
|
708
|
+
function charBefore(str, index) {
|
709
|
+
return str.slice(findClusterBreak(str, index, false), index);
|
710
|
+
}
|
711
|
+
function charAfter(str, index) {
|
712
|
+
return str.slice(index, findClusterBreak(str, index));
|
713
|
+
}
|
714
|
+
function regexpWordTest(categorizer) {
|
715
|
+
return (_from, _to, match) => !match[0].length ||
|
716
|
+
(categorizer(charBefore(match.input, match.index)) != CharCategory.Word ||
|
717
|
+
categorizer(charAfter(match.input, match.index)) != CharCategory.Word) &&
|
718
|
+
(categorizer(charAfter(match.input, match.index + match[0].length)) != CharCategory.Word ||
|
719
|
+
categorizer(charBefore(match.input, match.index + match[0].length)) != CharCategory.Word);
|
720
|
+
}
|
721
|
+
class RegExpQuery extends QueryType {
|
722
|
+
nextMatch(state, curFrom, curTo) {
|
723
|
+
let cursor = regexpCursor(this.spec, state, curTo, state.doc.length).next();
|
724
|
+
if (cursor.done)
|
725
|
+
cursor = regexpCursor(this.spec, state, 0, curFrom).next();
|
726
|
+
return cursor.done ? null : cursor.value;
|
727
|
+
}
|
728
|
+
prevMatchInRange(state, from, to) {
|
729
|
+
for (let size = 1;; size++) {
|
730
|
+
let start = Math.max(from, to - size * 10000 /* FindPrev.ChunkSize */);
|
731
|
+
let cursor = regexpCursor(this.spec, state, start, to), range = null;
|
732
|
+
while (!cursor.next().done)
|
733
|
+
range = cursor.value;
|
734
|
+
if (range && (start == from || range.from > start + 10))
|
735
|
+
return range;
|
736
|
+
if (start == from)
|
737
|
+
return null;
|
738
|
+
}
|
739
|
+
}
|
740
|
+
prevMatch(state, curFrom, curTo) {
|
741
|
+
return this.prevMatchInRange(state, 0, curFrom) ||
|
742
|
+
this.prevMatchInRange(state, curTo, state.doc.length);
|
743
|
+
}
|
744
|
+
getReplacement(result) {
|
745
|
+
return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (m, i) => {
|
746
|
+
if (i == "&")
|
747
|
+
return result.match[0];
|
748
|
+
if (i == "$")
|
749
|
+
return "$";
|
750
|
+
for (let l = i.length; l > 0; l--) {
|
751
|
+
let n = +i.slice(0, l);
|
752
|
+
if (n > 0 && n < result.match.length)
|
753
|
+
return result.match[n] + i.slice(l);
|
754
|
+
}
|
755
|
+
return m;
|
756
|
+
});
|
757
|
+
}
|
758
|
+
matchAll(state, limit) {
|
759
|
+
let cursor = regexpCursor(this.spec, state, 0, state.doc.length), ranges = [];
|
760
|
+
while (!cursor.next().done) {
|
761
|
+
if (ranges.length >= limit)
|
762
|
+
return null;
|
763
|
+
ranges.push(cursor.value);
|
764
|
+
}
|
765
|
+
return ranges;
|
766
|
+
}
|
767
|
+
highlight(state, from, to, add) {
|
768
|
+
let cursor = regexpCursor(this.spec, state, Math.max(0, from - 250 /* RegExp.HighlightMargin */), Math.min(to + 250 /* RegExp.HighlightMargin */, state.doc.length));
|
769
|
+
while (!cursor.next().done)
|
770
|
+
add(cursor.value.from, cursor.value.to);
|
771
|
+
}
|
772
|
+
}
|
773
|
+
/**
|
774
|
+
A state effect that updates the current search query. Note that
|
775
|
+
this only has an effect if the search state has been initialized
|
776
|
+
(by including [`search`](https://codemirror.net/6/docs/ref/#search.search) in your configuration or
|
777
|
+
by running [`openSearchPanel`](https://codemirror.net/6/docs/ref/#search.openSearchPanel) at least
|
778
|
+
once).
|
779
|
+
*/
|
780
|
+
const setSearchQuery = /*@__PURE__*/StateEffect.define();
|
781
|
+
const togglePanel = /*@__PURE__*/StateEffect.define();
|
782
|
+
const searchState = /*@__PURE__*/StateField.define({
|
783
|
+
create(state) {
|
784
|
+
return new SearchState(defaultQuery(state).create(), null);
|
785
|
+
},
|
786
|
+
update(value, tr) {
|
787
|
+
for (let effect of tr.effects) {
|
788
|
+
if (effect.is(setSearchQuery))
|
789
|
+
value = new SearchState(effect.value.create(), value.panel);
|
790
|
+
else if (effect.is(togglePanel))
|
791
|
+
value = new SearchState(value.query, effect.value ? createSearchPanel : null);
|
792
|
+
}
|
793
|
+
return value;
|
794
|
+
},
|
795
|
+
provide: f => showPanel.from(f, val => val.panel)
|
796
|
+
});
|
797
|
+
class SearchState {
|
798
|
+
constructor(query, panel) {
|
799
|
+
this.query = query;
|
800
|
+
this.panel = panel;
|
801
|
+
}
|
802
|
+
}
|
803
|
+
const matchMark = /*@__PURE__*/Decoration.mark({ class: "cm-searchMatch" }), selectedMatchMark = /*@__PURE__*/Decoration.mark({ class: "cm-searchMatch cm-searchMatch-selected" });
|
804
|
+
const searchHighlighter = /*@__PURE__*/ViewPlugin.fromClass(class {
|
805
|
+
constructor(view) {
|
806
|
+
this.view = view;
|
807
|
+
this.decorations = this.highlight(view.state.field(searchState));
|
808
|
+
}
|
809
|
+
update(update) {
|
810
|
+
let state = update.state.field(searchState);
|
811
|
+
if (state != update.startState.field(searchState) || update.docChanged || update.selectionSet || update.viewportChanged)
|
812
|
+
this.decorations = this.highlight(state);
|
813
|
+
}
|
814
|
+
highlight({ query, panel }) {
|
815
|
+
if (!panel || !query.spec.valid)
|
816
|
+
return Decoration.none;
|
817
|
+
let { view } = this;
|
818
|
+
let builder = new RangeSetBuilder();
|
819
|
+
for (let i = 0, ranges = view.visibleRanges, l = ranges.length; i < l; i++) {
|
820
|
+
let { from, to } = ranges[i];
|
821
|
+
while (i < l - 1 && to > ranges[i + 1].from - 2 * 250 /* RegExp.HighlightMargin */)
|
822
|
+
to = ranges[++i].to;
|
823
|
+
query.highlight(view.state, from, to, (from, to) => {
|
824
|
+
let selected = view.state.selection.ranges.some(r => r.from == from && r.to == to);
|
825
|
+
builder.add(from, to, selected ? selectedMatchMark : matchMark);
|
826
|
+
});
|
827
|
+
}
|
828
|
+
return builder.finish();
|
829
|
+
}
|
830
|
+
}, {
|
831
|
+
decorations: v => v.decorations
|
832
|
+
});
|
833
|
+
function searchCommand(f) {
|
834
|
+
return view => {
|
835
|
+
let state = view.state.field(searchState, false);
|
836
|
+
return state && state.query.spec.valid ? f(view, state) : openSearchPanel(view);
|
837
|
+
};
|
838
|
+
}
|
839
|
+
/**
|
840
|
+
Open the search panel if it isn't already open, and move the
|
841
|
+
selection to the first match after the current main selection.
|
842
|
+
Will wrap around to the start of the document when it reaches the
|
843
|
+
end.
|
844
|
+
*/
|
845
|
+
const findNext = /*@__PURE__*/searchCommand((view, { query }) => {
|
846
|
+
let { to } = view.state.selection.main;
|
847
|
+
let next = query.nextMatch(view.state, to, to);
|
848
|
+
if (!next)
|
849
|
+
return false;
|
850
|
+
let selection = EditorSelection.single(next.from, next.to);
|
851
|
+
let config = view.state.facet(searchConfigFacet);
|
852
|
+
view.dispatch({
|
853
|
+
selection,
|
854
|
+
effects: [announceMatch(view, next), config.scrollToMatch(selection.main, view)],
|
855
|
+
userEvent: "select.search"
|
856
|
+
});
|
857
|
+
selectSearchInput(view);
|
858
|
+
return true;
|
859
|
+
});
|
860
|
+
/**
|
861
|
+
Move the selection to the previous instance of the search query,
|
862
|
+
before the current main selection. Will wrap past the start
|
863
|
+
of the document to start searching at the end again.
|
864
|
+
*/
|
865
|
+
const findPrevious = /*@__PURE__*/searchCommand((view, { query }) => {
|
866
|
+
let { state } = view, { from } = state.selection.main;
|
867
|
+
let prev = query.prevMatch(state, from, from);
|
868
|
+
if (!prev)
|
869
|
+
return false;
|
870
|
+
let selection = EditorSelection.single(prev.from, prev.to);
|
871
|
+
let config = view.state.facet(searchConfigFacet);
|
872
|
+
view.dispatch({
|
873
|
+
selection,
|
874
|
+
effects: [announceMatch(view, prev), config.scrollToMatch(selection.main, view)],
|
875
|
+
userEvent: "select.search"
|
876
|
+
});
|
877
|
+
selectSearchInput(view);
|
878
|
+
return true;
|
879
|
+
});
|
880
|
+
/**
|
881
|
+
Select all instances of the search query.
|
882
|
+
*/
|
883
|
+
const selectMatches = /*@__PURE__*/searchCommand((view, { query }) => {
|
884
|
+
let ranges = query.matchAll(view.state, 1000);
|
885
|
+
if (!ranges || !ranges.length)
|
886
|
+
return false;
|
887
|
+
view.dispatch({
|
888
|
+
selection: EditorSelection.create(ranges.map(r => EditorSelection.range(r.from, r.to))),
|
889
|
+
userEvent: "select.search.matches"
|
890
|
+
});
|
891
|
+
return true;
|
892
|
+
});
|
893
|
+
/**
|
894
|
+
Select all instances of the currently selected text.
|
895
|
+
*/
|
896
|
+
const selectSelectionMatches = ({ state, dispatch }) => {
|
897
|
+
let sel = state.selection;
|
898
|
+
if (sel.ranges.length > 1 || sel.main.empty)
|
899
|
+
return false;
|
900
|
+
let { from, to } = sel.main;
|
901
|
+
let ranges = [], main = 0;
|
902
|
+
for (let cur = new SearchCursor(state.doc, state.sliceDoc(from, to)); !cur.next().done;) {
|
903
|
+
if (ranges.length > 1000)
|
904
|
+
return false;
|
905
|
+
if (cur.value.from == from)
|
906
|
+
main = ranges.length;
|
907
|
+
ranges.push(EditorSelection.range(cur.value.from, cur.value.to));
|
908
|
+
}
|
909
|
+
dispatch(state.update({
|
910
|
+
selection: EditorSelection.create(ranges, main),
|
911
|
+
userEvent: "select.search.matches"
|
912
|
+
}));
|
913
|
+
return true;
|
914
|
+
};
|
915
|
+
/**
|
916
|
+
Replace the current match of the search query.
|
917
|
+
*/
|
918
|
+
const replaceNext = /*@__PURE__*/searchCommand((view, { query }) => {
|
919
|
+
let { state } = view, { from, to } = state.selection.main;
|
920
|
+
if (state.readOnly)
|
921
|
+
return false;
|
922
|
+
let match = query.nextMatch(state, from, from);
|
923
|
+
if (!match)
|
924
|
+
return false;
|
925
|
+
let next = match;
|
926
|
+
let changes = [], selection, replacement;
|
927
|
+
let effects = [];
|
928
|
+
if (next.from == from && next.to == to) {
|
929
|
+
replacement = state.toText(query.getReplacement(next));
|
930
|
+
changes.push({ from: next.from, to: next.to, insert: replacement });
|
931
|
+
next = query.nextMatch(state, next.from, next.to);
|
932
|
+
effects.push(EditorView.announce.of(state.phrase("replaced match on line $", state.doc.lineAt(from).number) + "."));
|
933
|
+
}
|
934
|
+
if (next) {
|
935
|
+
let off = changes.length == 0 || changes[0].from >= match.to ? 0 : match.to - match.from - replacement.length;
|
936
|
+
selection = EditorSelection.single(next.from - off, next.to - off);
|
937
|
+
effects.push(announceMatch(view, next));
|
938
|
+
effects.push(state.facet(searchConfigFacet).scrollToMatch(selection.main, view));
|
939
|
+
}
|
940
|
+
view.dispatch({
|
941
|
+
changes, selection, effects,
|
942
|
+
userEvent: "input.replace"
|
943
|
+
});
|
944
|
+
return true;
|
945
|
+
});
|
946
|
+
/**
|
947
|
+
Replace all instances of the search query with the given
|
948
|
+
replacement.
|
949
|
+
*/
|
950
|
+
const replaceAll = /*@__PURE__*/searchCommand((view, { query }) => {
|
951
|
+
if (view.state.readOnly)
|
952
|
+
return false;
|
953
|
+
let changes = query.matchAll(view.state, 1e9).map(match => {
|
954
|
+
let { from, to } = match;
|
955
|
+
return { from, to, insert: query.getReplacement(match) };
|
956
|
+
});
|
957
|
+
if (!changes.length)
|
958
|
+
return false;
|
959
|
+
let announceText = view.state.phrase("replaced $ matches", changes.length) + ".";
|
960
|
+
view.dispatch({
|
961
|
+
changes,
|
962
|
+
effects: EditorView.announce.of(announceText),
|
963
|
+
userEvent: "input.replace.all"
|
964
|
+
});
|
965
|
+
return true;
|
966
|
+
});
|
967
|
+
function createSearchPanel(view) {
|
968
|
+
return view.state.facet(searchConfigFacet).createPanel(view);
|
969
|
+
}
|
970
|
+
function defaultQuery(state, fallback) {
|
971
|
+
var _a, _b, _c, _d, _e;
|
972
|
+
let sel = state.selection.main;
|
973
|
+
let selText = sel.empty || sel.to > sel.from + 100 ? "" : state.sliceDoc(sel.from, sel.to);
|
974
|
+
if (fallback && !selText)
|
975
|
+
return fallback;
|
976
|
+
let config = state.facet(searchConfigFacet);
|
977
|
+
return new SearchQuery({
|
978
|
+
search: ((_a = fallback === null || fallback === void 0 ? void 0 : fallback.literal) !== null && _a !== void 0 ? _a : config.literal) ? selText : selText.replace(/\n/g, "\\n"),
|
979
|
+
caseSensitive: (_b = fallback === null || fallback === void 0 ? void 0 : fallback.caseSensitive) !== null && _b !== void 0 ? _b : config.caseSensitive,
|
980
|
+
literal: (_c = fallback === null || fallback === void 0 ? void 0 : fallback.literal) !== null && _c !== void 0 ? _c : config.literal,
|
981
|
+
regexp: (_d = fallback === null || fallback === void 0 ? void 0 : fallback.regexp) !== null && _d !== void 0 ? _d : config.regexp,
|
982
|
+
wholeWord: (_e = fallback === null || fallback === void 0 ? void 0 : fallback.wholeWord) !== null && _e !== void 0 ? _e : config.wholeWord
|
983
|
+
});
|
984
|
+
}
|
985
|
+
function getSearchInput(view) {
|
986
|
+
let panel = getPanel(view, createSearchPanel);
|
987
|
+
return panel && panel.dom.querySelector("[main-field]");
|
988
|
+
}
|
989
|
+
function selectSearchInput(view) {
|
990
|
+
let input = getSearchInput(view);
|
991
|
+
if (input && input == view.root.activeElement)
|
992
|
+
input.select();
|
993
|
+
}
|
994
|
+
/**
|
995
|
+
Make sure the search panel is open and focused.
|
996
|
+
*/
|
997
|
+
const openSearchPanel = view => {
|
998
|
+
let state = view.state.field(searchState, false);
|
999
|
+
if (state && state.panel) {
|
1000
|
+
let searchInput = getSearchInput(view);
|
1001
|
+
if (searchInput && searchInput != view.root.activeElement) {
|
1002
|
+
let query = defaultQuery(view.state, state.query.spec);
|
1003
|
+
if (query.valid)
|
1004
|
+
view.dispatch({ effects: setSearchQuery.of(query) });
|
1005
|
+
searchInput.focus();
|
1006
|
+
searchInput.select();
|
1007
|
+
}
|
1008
|
+
}
|
1009
|
+
else {
|
1010
|
+
view.dispatch({ effects: [
|
1011
|
+
togglePanel.of(true),
|
1012
|
+
state ? setSearchQuery.of(defaultQuery(view.state, state.query.spec)) : StateEffect.appendConfig.of(searchExtensions)
|
1013
|
+
] });
|
1014
|
+
}
|
1015
|
+
return true;
|
1016
|
+
};
|
1017
|
+
/**
|
1018
|
+
Close the search panel.
|
1019
|
+
*/
|
1020
|
+
const closeSearchPanel = view => {
|
1021
|
+
let state = view.state.field(searchState, false);
|
1022
|
+
if (!state || !state.panel)
|
1023
|
+
return false;
|
1024
|
+
let panel = getPanel(view, createSearchPanel);
|
1025
|
+
if (panel && panel.dom.contains(view.root.activeElement))
|
1026
|
+
view.focus();
|
1027
|
+
view.dispatch({ effects: togglePanel.of(false) });
|
1028
|
+
return true;
|
1029
|
+
};
|
1030
|
+
/**
|
1031
|
+
Default search-related key bindings.
|
1032
|
+
|
1033
|
+
- Mod-f: [`openSearchPanel`](https://codemirror.net/6/docs/ref/#search.openSearchPanel)
|
1034
|
+
- F3, Mod-g: [`findNext`](https://codemirror.net/6/docs/ref/#search.findNext)
|
1035
|
+
- Shift-F3, Shift-Mod-g: [`findPrevious`](https://codemirror.net/6/docs/ref/#search.findPrevious)
|
1036
|
+
- Mod-Alt-g: [`gotoLine`](https://codemirror.net/6/docs/ref/#search.gotoLine)
|
1037
|
+
- Mod-d: [`selectNextOccurrence`](https://codemirror.net/6/docs/ref/#search.selectNextOccurrence)
|
1038
|
+
*/
|
1039
|
+
const searchKeymap = [
|
1040
|
+
{ key: "Mod-f", run: openSearchPanel, scope: "editor search-panel" },
|
1041
|
+
{ key: "F3", run: findNext, shift: findPrevious, scope: "editor search-panel", preventDefault: true },
|
1042
|
+
{ key: "Mod-g", run: findNext, shift: findPrevious, scope: "editor search-panel", preventDefault: true },
|
1043
|
+
{ key: "Escape", run: closeSearchPanel, scope: "editor search-panel" },
|
1044
|
+
{ key: "Mod-Shift-l", run: selectSelectionMatches },
|
1045
|
+
{ key: "Mod-Alt-g", run: gotoLine },
|
1046
|
+
{ key: "Mod-d", run: selectNextOccurrence, preventDefault: true },
|
1047
|
+
];
|
1048
|
+
class SearchPanel {
|
1049
|
+
constructor(view) {
|
1050
|
+
this.view = view;
|
1051
|
+
let query = this.query = view.state.field(searchState).query.spec;
|
1052
|
+
this.commit = this.commit.bind(this);
|
1053
|
+
this.searchField = crelt("input", {
|
1054
|
+
value: query.search,
|
1055
|
+
placeholder: phrase(view, "Find"),
|
1056
|
+
"aria-label": phrase(view, "Find"),
|
1057
|
+
class: "cm-textfield",
|
1058
|
+
name: "search",
|
1059
|
+
form: "",
|
1060
|
+
"main-field": "true",
|
1061
|
+
onchange: this.commit,
|
1062
|
+
onkeyup: this.commit
|
1063
|
+
});
|
1064
|
+
this.replaceField = crelt("input", {
|
1065
|
+
value: query.replace,
|
1066
|
+
placeholder: phrase(view, "Replace"),
|
1067
|
+
"aria-label": phrase(view, "Replace"),
|
1068
|
+
class: "cm-textfield",
|
1069
|
+
name: "replace",
|
1070
|
+
form: "",
|
1071
|
+
onchange: this.commit,
|
1072
|
+
onkeyup: this.commit
|
1073
|
+
});
|
1074
|
+
this.caseField = crelt("input", {
|
1075
|
+
type: "checkbox",
|
1076
|
+
name: "case",
|
1077
|
+
form: "",
|
1078
|
+
checked: query.caseSensitive,
|
1079
|
+
onchange: this.commit
|
1080
|
+
});
|
1081
|
+
this.reField = crelt("input", {
|
1082
|
+
type: "checkbox",
|
1083
|
+
name: "re",
|
1084
|
+
form: "",
|
1085
|
+
checked: query.regexp,
|
1086
|
+
onchange: this.commit
|
1087
|
+
});
|
1088
|
+
this.wordField = crelt("input", {
|
1089
|
+
type: "checkbox",
|
1090
|
+
name: "word",
|
1091
|
+
form: "",
|
1092
|
+
checked: query.wholeWord,
|
1093
|
+
onchange: this.commit
|
1094
|
+
});
|
1095
|
+
function button(name, onclick, content) {
|
1096
|
+
return crelt("button", { class: "cm-button", name, onclick, type: "button" }, content);
|
1097
|
+
}
|
1098
|
+
this.dom = crelt("div", { onkeydown: (e) => this.keydown(e), class: "cm-search" }, [
|
1099
|
+
this.searchField,
|
1100
|
+
button("next", () => findNext(view), [phrase(view, "next")]),
|
1101
|
+
button("prev", () => findPrevious(view), [phrase(view, "previous")]),
|
1102
|
+
button("select", () => selectMatches(view), [phrase(view, "all")]),
|
1103
|
+
crelt("label", null, [this.caseField, phrase(view, "match case")]),
|
1104
|
+
crelt("label", null, [this.reField, phrase(view, "regexp")]),
|
1105
|
+
crelt("label", null, [this.wordField, phrase(view, "by word")]),
|
1106
|
+
...view.state.readOnly ? [] : [
|
1107
|
+
crelt("br"),
|
1108
|
+
this.replaceField,
|
1109
|
+
button("replace", () => replaceNext(view), [phrase(view, "replace")]),
|
1110
|
+
button("replaceAll", () => replaceAll(view), [phrase(view, "replace all")])
|
1111
|
+
],
|
1112
|
+
crelt("button", {
|
1113
|
+
name: "close",
|
1114
|
+
onclick: () => closeSearchPanel(view),
|
1115
|
+
"aria-label": phrase(view, "close"),
|
1116
|
+
type: "button"
|
1117
|
+
}, ["×"])
|
1118
|
+
]);
|
1119
|
+
}
|
1120
|
+
commit() {
|
1121
|
+
let query = new SearchQuery({
|
1122
|
+
search: this.searchField.value,
|
1123
|
+
caseSensitive: this.caseField.checked,
|
1124
|
+
regexp: this.reField.checked,
|
1125
|
+
wholeWord: this.wordField.checked,
|
1126
|
+
replace: this.replaceField.value,
|
1127
|
+
});
|
1128
|
+
if (!query.eq(this.query)) {
|
1129
|
+
this.query = query;
|
1130
|
+
this.view.dispatch({ effects: setSearchQuery.of(query) });
|
1131
|
+
}
|
1132
|
+
}
|
1133
|
+
keydown(e) {
|
1134
|
+
if (runScopeHandlers(this.view, e, "search-panel")) {
|
1135
|
+
e.preventDefault();
|
1136
|
+
}
|
1137
|
+
else if (e.keyCode == 13 && e.target == this.searchField) {
|
1138
|
+
e.preventDefault();
|
1139
|
+
(e.shiftKey ? findPrevious : findNext)(this.view);
|
1140
|
+
}
|
1141
|
+
else if (e.keyCode == 13 && e.target == this.replaceField) {
|
1142
|
+
e.preventDefault();
|
1143
|
+
replaceNext(this.view);
|
1144
|
+
}
|
1145
|
+
}
|
1146
|
+
update(update) {
|
1147
|
+
for (let tr of update.transactions)
|
1148
|
+
for (let effect of tr.effects) {
|
1149
|
+
if (effect.is(setSearchQuery) && !effect.value.eq(this.query))
|
1150
|
+
this.setQuery(effect.value);
|
1151
|
+
}
|
1152
|
+
}
|
1153
|
+
setQuery(query) {
|
1154
|
+
this.query = query;
|
1155
|
+
this.searchField.value = query.search;
|
1156
|
+
this.replaceField.value = query.replace;
|
1157
|
+
this.caseField.checked = query.caseSensitive;
|
1158
|
+
this.reField.checked = query.regexp;
|
1159
|
+
this.wordField.checked = query.wholeWord;
|
1160
|
+
}
|
1161
|
+
mount() {
|
1162
|
+
this.searchField.select();
|
1163
|
+
}
|
1164
|
+
get pos() { return 80; }
|
1165
|
+
get top() { return this.view.state.facet(searchConfigFacet).top; }
|
1166
|
+
}
|
1167
|
+
function phrase(view, phrase) { return view.state.phrase(phrase); }
|
1168
|
+
const AnnounceMargin = 30;
|
1169
|
+
const Break = /[\s\.,:;?!]/;
|
1170
|
+
function announceMatch(view, { from, to }) {
|
1171
|
+
let line = view.state.doc.lineAt(from), lineEnd = view.state.doc.lineAt(to).to;
|
1172
|
+
let start = Math.max(line.from, from - AnnounceMargin), end = Math.min(lineEnd, to + AnnounceMargin);
|
1173
|
+
let text = view.state.sliceDoc(start, end);
|
1174
|
+
if (start != line.from) {
|
1175
|
+
for (let i = 0; i < AnnounceMargin; i++)
|
1176
|
+
if (!Break.test(text[i + 1]) && Break.test(text[i])) {
|
1177
|
+
text = text.slice(i);
|
1178
|
+
break;
|
1179
|
+
}
|
1180
|
+
}
|
1181
|
+
if (end != lineEnd) {
|
1182
|
+
for (let i = text.length - 1; i > text.length - AnnounceMargin; i--)
|
1183
|
+
if (!Break.test(text[i - 1]) && Break.test(text[i])) {
|
1184
|
+
text = text.slice(0, i);
|
1185
|
+
break;
|
1186
|
+
}
|
1187
|
+
}
|
1188
|
+
return EditorView.announce.of(`${view.state.phrase("current match")}. ${text} ${view.state.phrase("on line")} ${line.number}.`);
|
1189
|
+
}
|
1190
|
+
const baseTheme = /*@__PURE__*/EditorView.baseTheme({
|
1191
|
+
".cm-panel.cm-search": {
|
1192
|
+
padding: "2px 6px 4px",
|
1193
|
+
position: "relative",
|
1194
|
+
"& [name=close]": {
|
1195
|
+
position: "absolute",
|
1196
|
+
top: "0",
|
1197
|
+
right: "4px",
|
1198
|
+
backgroundColor: "inherit",
|
1199
|
+
border: "none",
|
1200
|
+
font: "inherit",
|
1201
|
+
padding: 0,
|
1202
|
+
margin: 0
|
1203
|
+
},
|
1204
|
+
"& input, & button, & label": {
|
1205
|
+
margin: ".2em .6em .2em 0"
|
1206
|
+
},
|
1207
|
+
"& input[type=checkbox]": {
|
1208
|
+
marginRight: ".2em"
|
1209
|
+
},
|
1210
|
+
"& label": {
|
1211
|
+
fontSize: "80%",
|
1212
|
+
whiteSpace: "pre"
|
1213
|
+
}
|
1214
|
+
},
|
1215
|
+
"&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
|
1216
|
+
"&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
|
1217
|
+
"&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
|
1218
|
+
"&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
|
1219
|
+
});
|
1220
|
+
const searchExtensions = [
|
1221
|
+
searchState,
|
1222
|
+
/*@__PURE__*/Prec.low(searchHighlighter),
|
1223
|
+
baseTheme
|
1224
|
+
];
|
1225
|
+
|
1226
|
+
export { RegExpCursor, SearchCursor, SearchQuery, closeSearchPanel, findNext, findPrevious, gotoLine, highlightSelectionMatches, openSearchPanel, replaceAll, replaceNext, searchKeymap, selectMatches, selectNextOccurrence, selectSelectionMatches, setSearchQuery };
|
1227
|
+
//# sourceMappingURL=index.js.map
|