@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,589 @@
|
|
1
|
+
import { getPanel, showPanel, EditorView, Decoration, hoverTooltip, WidgetType } from '../../view/dist/index.js';
|
2
|
+
import { StateField, StateEffect, Facet, combineConfig, RangeSetBuilder } from '../../state/dist/index.js';
|
3
|
+
import crelt from '../../../crelt/index.js';
|
4
|
+
|
5
|
+
class SelectedDiagnostic {
|
6
|
+
constructor(from, to, diagnostic) {
|
7
|
+
this.from = from;
|
8
|
+
this.to = to;
|
9
|
+
this.diagnostic = diagnostic;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
class LintState {
|
13
|
+
constructor(diagnostics, panel, selected) {
|
14
|
+
this.diagnostics = diagnostics;
|
15
|
+
this.panel = panel;
|
16
|
+
this.selected = selected;
|
17
|
+
}
|
18
|
+
static init(diagnostics, panel, state) {
|
19
|
+
// Filter the list of diagnostics for which to create markers
|
20
|
+
let diagnosticFilter = state.facet(lintConfig).markerFilter;
|
21
|
+
if (diagnosticFilter)
|
22
|
+
diagnostics = diagnosticFilter(diagnostics, state);
|
23
|
+
let sorted = diagnostics.slice().sort((a, b) => a.from - b.from || a.to - b.to);
|
24
|
+
let deco = new RangeSetBuilder(), active = [], pos = 0;
|
25
|
+
for (let i = 0;;) {
|
26
|
+
let next = i == sorted.length ? null : sorted[i];
|
27
|
+
if (!next && !active.length)
|
28
|
+
break;
|
29
|
+
let from, to;
|
30
|
+
if (active.length) {
|
31
|
+
from = pos;
|
32
|
+
to = active.reduce((p, d) => Math.min(p, d.to), next && next.from > from ? next.from : 1e8);
|
33
|
+
}
|
34
|
+
else {
|
35
|
+
from = next.from;
|
36
|
+
to = next.to;
|
37
|
+
active.push(next);
|
38
|
+
i++;
|
39
|
+
}
|
40
|
+
while (i < sorted.length) {
|
41
|
+
let next = sorted[i];
|
42
|
+
if (next.from == from && (next.to > next.from || next.to == from)) {
|
43
|
+
active.push(next);
|
44
|
+
i++;
|
45
|
+
to = Math.min(next.to, to);
|
46
|
+
}
|
47
|
+
else {
|
48
|
+
to = Math.min(next.from, to);
|
49
|
+
break;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
let sev = maxSeverity(active);
|
53
|
+
if (active.some(d => d.from == d.to || (d.from == d.to - 1 && state.doc.lineAt(d.from).to == d.from))) {
|
54
|
+
deco.add(from, from, Decoration.widget({
|
55
|
+
widget: new DiagnosticWidget(sev),
|
56
|
+
diagnostics: active.slice()
|
57
|
+
}));
|
58
|
+
}
|
59
|
+
else {
|
60
|
+
let markClass = active.reduce((c, d) => d.markClass ? c + " " + d.markClass : c, "");
|
61
|
+
deco.add(from, to, Decoration.mark({
|
62
|
+
class: "cm-lintRange cm-lintRange-" + sev + markClass,
|
63
|
+
diagnostics: active.slice(),
|
64
|
+
inclusiveEnd: active.some(a => a.to > to)
|
65
|
+
}));
|
66
|
+
}
|
67
|
+
pos = to;
|
68
|
+
for (let i = 0; i < active.length; i++)
|
69
|
+
if (active[i].to <= pos)
|
70
|
+
active.splice(i--, 1);
|
71
|
+
}
|
72
|
+
let set = deco.finish();
|
73
|
+
return new LintState(set, panel, findDiagnostic(set));
|
74
|
+
}
|
75
|
+
}
|
76
|
+
function findDiagnostic(diagnostics, diagnostic = null, after = 0) {
|
77
|
+
let found = null;
|
78
|
+
diagnostics.between(after, 1e9, (from, to, { spec }) => {
|
79
|
+
if (diagnostic && spec.diagnostics.indexOf(diagnostic) < 0)
|
80
|
+
return;
|
81
|
+
if (!found)
|
82
|
+
found = new SelectedDiagnostic(from, to, diagnostic || spec.diagnostics[0]);
|
83
|
+
else if (spec.diagnostics.indexOf(found.diagnostic) < 0)
|
84
|
+
return false;
|
85
|
+
else
|
86
|
+
found = new SelectedDiagnostic(found.from, to, found.diagnostic);
|
87
|
+
});
|
88
|
+
return found;
|
89
|
+
}
|
90
|
+
function hideTooltip(tr, tooltip) {
|
91
|
+
let from = tooltip.pos, to = tooltip.end || from;
|
92
|
+
let result = tr.state.facet(lintConfig).hideOn(tr, from, to);
|
93
|
+
if (result != null)
|
94
|
+
return result;
|
95
|
+
let line = tr.startState.doc.lineAt(tooltip.pos);
|
96
|
+
return !!(tr.effects.some(e => e.is(setDiagnosticsEffect)) || tr.changes.touchesRange(line.from, Math.max(line.to, to)));
|
97
|
+
}
|
98
|
+
function maybeEnableLint(state, effects) {
|
99
|
+
return state.field(lintState, false) ? effects : effects.concat(StateEffect.appendConfig.of(lintExtensions));
|
100
|
+
}
|
101
|
+
/**
|
102
|
+
The state effect that updates the set of active diagnostics. Can
|
103
|
+
be useful when writing an extension that needs to track these.
|
104
|
+
*/
|
105
|
+
const setDiagnosticsEffect = /*@__PURE__*/StateEffect.define();
|
106
|
+
const togglePanel = /*@__PURE__*/StateEffect.define();
|
107
|
+
const movePanelSelection = /*@__PURE__*/StateEffect.define();
|
108
|
+
const lintState = /*@__PURE__*/StateField.define({
|
109
|
+
create() {
|
110
|
+
return new LintState(Decoration.none, null, null);
|
111
|
+
},
|
112
|
+
update(value, tr) {
|
113
|
+
if (tr.docChanged && value.diagnostics.size) {
|
114
|
+
let mapped = value.diagnostics.map(tr.changes), selected = null, panel = value.panel;
|
115
|
+
if (value.selected) {
|
116
|
+
let selPos = tr.changes.mapPos(value.selected.from, 1);
|
117
|
+
selected = findDiagnostic(mapped, value.selected.diagnostic, selPos) || findDiagnostic(mapped, null, selPos);
|
118
|
+
}
|
119
|
+
if (!mapped.size && panel && tr.state.facet(lintConfig).autoPanel)
|
120
|
+
panel = null;
|
121
|
+
value = new LintState(mapped, panel, selected);
|
122
|
+
}
|
123
|
+
for (let effect of tr.effects) {
|
124
|
+
if (effect.is(setDiagnosticsEffect)) {
|
125
|
+
let panel = !tr.state.facet(lintConfig).autoPanel ? value.panel : effect.value.length ? LintPanel.open : null;
|
126
|
+
value = LintState.init(effect.value, panel, tr.state);
|
127
|
+
}
|
128
|
+
else if (effect.is(togglePanel)) {
|
129
|
+
value = new LintState(value.diagnostics, effect.value ? LintPanel.open : null, value.selected);
|
130
|
+
}
|
131
|
+
else if (effect.is(movePanelSelection)) {
|
132
|
+
value = new LintState(value.diagnostics, value.panel, effect.value);
|
133
|
+
}
|
134
|
+
}
|
135
|
+
return value;
|
136
|
+
},
|
137
|
+
provide: f => [showPanel.from(f, val => val.panel),
|
138
|
+
EditorView.decorations.from(f, s => s.diagnostics)]
|
139
|
+
});
|
140
|
+
const activeMark = /*@__PURE__*/Decoration.mark({ class: "cm-lintRange cm-lintRange-active" });
|
141
|
+
function lintTooltip(view, pos, side) {
|
142
|
+
let { diagnostics } = view.state.field(lintState);
|
143
|
+
let found, start = -1, end = -1;
|
144
|
+
diagnostics.between(pos - (side < 0 ? 1 : 0), pos + (side > 0 ? 1 : 0), (from, to, { spec }) => {
|
145
|
+
if (pos >= from && pos <= to &&
|
146
|
+
(from == to || ((pos > from || side > 0) && (pos < to || side < 0)))) {
|
147
|
+
found = spec.diagnostics;
|
148
|
+
start = from;
|
149
|
+
end = to;
|
150
|
+
return false;
|
151
|
+
}
|
152
|
+
});
|
153
|
+
let diagnosticFilter = view.state.facet(lintConfig).tooltipFilter;
|
154
|
+
if (found && diagnosticFilter)
|
155
|
+
found = diagnosticFilter(found, view.state);
|
156
|
+
if (!found)
|
157
|
+
return null;
|
158
|
+
return {
|
159
|
+
pos: start,
|
160
|
+
end: end,
|
161
|
+
above: view.state.doc.lineAt(start).to < end,
|
162
|
+
create() {
|
163
|
+
return { dom: diagnosticsTooltip(view, found) };
|
164
|
+
}
|
165
|
+
};
|
166
|
+
}
|
167
|
+
function diagnosticsTooltip(view, diagnostics) {
|
168
|
+
return crelt("ul", { class: "cm-tooltip-lint" }, diagnostics.map(d => renderDiagnostic(view, d, false)));
|
169
|
+
}
|
170
|
+
/**
|
171
|
+
Command to open and focus the lint panel.
|
172
|
+
*/
|
173
|
+
const openLintPanel = (view) => {
|
174
|
+
let field = view.state.field(lintState, false);
|
175
|
+
if (!field || !field.panel)
|
176
|
+
view.dispatch({ effects: maybeEnableLint(view.state, [togglePanel.of(true)]) });
|
177
|
+
let panel = getPanel(view, LintPanel.open);
|
178
|
+
if (panel)
|
179
|
+
panel.dom.querySelector(".cm-panel-lint ul").focus();
|
180
|
+
return true;
|
181
|
+
};
|
182
|
+
/**
|
183
|
+
Command to close the lint panel, when open.
|
184
|
+
*/
|
185
|
+
const closeLintPanel = (view) => {
|
186
|
+
let field = view.state.field(lintState, false);
|
187
|
+
if (!field || !field.panel)
|
188
|
+
return false;
|
189
|
+
view.dispatch({ effects: togglePanel.of(false) });
|
190
|
+
return true;
|
191
|
+
};
|
192
|
+
/**
|
193
|
+
Move the selection to the next diagnostic.
|
194
|
+
*/
|
195
|
+
const nextDiagnostic = (view) => {
|
196
|
+
let field = view.state.field(lintState, false);
|
197
|
+
if (!field)
|
198
|
+
return false;
|
199
|
+
let sel = view.state.selection.main, next = field.diagnostics.iter(sel.to + 1);
|
200
|
+
if (!next.value) {
|
201
|
+
next = field.diagnostics.iter(0);
|
202
|
+
if (!next.value || next.from == sel.from && next.to == sel.to)
|
203
|
+
return false;
|
204
|
+
}
|
205
|
+
view.dispatch({ selection: { anchor: next.from, head: next.to }, scrollIntoView: true });
|
206
|
+
return true;
|
207
|
+
};
|
208
|
+
/**
|
209
|
+
A set of default key bindings for the lint functionality.
|
210
|
+
|
211
|
+
- Ctrl-Shift-m (Cmd-Shift-m on macOS): [`openLintPanel`](https://codemirror.net/6/docs/ref/#lint.openLintPanel)
|
212
|
+
- F8: [`nextDiagnostic`](https://codemirror.net/6/docs/ref/#lint.nextDiagnostic)
|
213
|
+
*/
|
214
|
+
const lintKeymap = [
|
215
|
+
{ key: "Mod-Shift-m", run: openLintPanel, preventDefault: true },
|
216
|
+
{ key: "F8", run: nextDiagnostic }
|
217
|
+
];
|
218
|
+
const lintConfig = /*@__PURE__*/Facet.define({
|
219
|
+
combine(input) {
|
220
|
+
return Object.assign({ sources: input.map(i => i.source).filter(x => x != null) }, combineConfig(input.map(i => i.config), {
|
221
|
+
delay: 750,
|
222
|
+
markerFilter: null,
|
223
|
+
tooltipFilter: null,
|
224
|
+
needsRefresh: null,
|
225
|
+
hideOn: () => null,
|
226
|
+
}, {
|
227
|
+
needsRefresh: (a, b) => !a ? b : !b ? a : u => a(u) || b(u)
|
228
|
+
}));
|
229
|
+
}
|
230
|
+
});
|
231
|
+
function assignKeys(actions) {
|
232
|
+
let assigned = [];
|
233
|
+
if (actions)
|
234
|
+
actions: for (let { name } of actions) {
|
235
|
+
for (let i = 0; i < name.length; i++) {
|
236
|
+
let ch = name[i];
|
237
|
+
if (/[a-zA-Z]/.test(ch) && !assigned.some(c => c.toLowerCase() == ch.toLowerCase())) {
|
238
|
+
assigned.push(ch);
|
239
|
+
continue actions;
|
240
|
+
}
|
241
|
+
}
|
242
|
+
assigned.push("");
|
243
|
+
}
|
244
|
+
return assigned;
|
245
|
+
}
|
246
|
+
function renderDiagnostic(view, diagnostic, inPanel) {
|
247
|
+
var _a;
|
248
|
+
let keys = inPanel ? assignKeys(diagnostic.actions) : [];
|
249
|
+
return crelt("li", { class: "cm-diagnostic cm-diagnostic-" + diagnostic.severity }, crelt("span", { class: "cm-diagnosticText" }, diagnostic.renderMessage ? diagnostic.renderMessage(view) : diagnostic.message), (_a = diagnostic.actions) === null || _a === void 0 ? void 0 : _a.map((action, i) => {
|
250
|
+
let fired = false, click = (e) => {
|
251
|
+
e.preventDefault();
|
252
|
+
if (fired)
|
253
|
+
return;
|
254
|
+
fired = true;
|
255
|
+
let found = findDiagnostic(view.state.field(lintState).diagnostics, diagnostic);
|
256
|
+
if (found)
|
257
|
+
action.apply(view, found.from, found.to);
|
258
|
+
};
|
259
|
+
let { name } = action, keyIndex = keys[i] ? name.indexOf(keys[i]) : -1;
|
260
|
+
let nameElt = keyIndex < 0 ? name : [name.slice(0, keyIndex),
|
261
|
+
crelt("u", name.slice(keyIndex, keyIndex + 1)),
|
262
|
+
name.slice(keyIndex + 1)];
|
263
|
+
return crelt("button", {
|
264
|
+
type: "button",
|
265
|
+
class: "cm-diagnosticAction",
|
266
|
+
onclick: click,
|
267
|
+
onmousedown: click,
|
268
|
+
"aria-label": ` Action: ${name}${keyIndex < 0 ? "" : ` (access key "${keys[i]})"`}.`
|
269
|
+
}, nameElt);
|
270
|
+
}), diagnostic.source && crelt("div", { class: "cm-diagnosticSource" }, diagnostic.source));
|
271
|
+
}
|
272
|
+
class DiagnosticWidget extends WidgetType {
|
273
|
+
constructor(sev) {
|
274
|
+
super();
|
275
|
+
this.sev = sev;
|
276
|
+
}
|
277
|
+
eq(other) { return other.sev == this.sev; }
|
278
|
+
toDOM() {
|
279
|
+
return crelt("span", { class: "cm-lintPoint cm-lintPoint-" + this.sev });
|
280
|
+
}
|
281
|
+
}
|
282
|
+
class PanelItem {
|
283
|
+
constructor(view, diagnostic) {
|
284
|
+
this.diagnostic = diagnostic;
|
285
|
+
this.id = "item_" + Math.floor(Math.random() * 0xffffffff).toString(16);
|
286
|
+
this.dom = renderDiagnostic(view, diagnostic, true);
|
287
|
+
this.dom.id = this.id;
|
288
|
+
this.dom.setAttribute("role", "option");
|
289
|
+
}
|
290
|
+
}
|
291
|
+
class LintPanel {
|
292
|
+
constructor(view) {
|
293
|
+
this.view = view;
|
294
|
+
this.items = [];
|
295
|
+
let onkeydown = (event) => {
|
296
|
+
if (event.keyCode == 27) { // Escape
|
297
|
+
closeLintPanel(this.view);
|
298
|
+
this.view.focus();
|
299
|
+
}
|
300
|
+
else if (event.keyCode == 38 || event.keyCode == 33) { // ArrowUp, PageUp
|
301
|
+
this.moveSelection((this.selectedIndex - 1 + this.items.length) % this.items.length);
|
302
|
+
}
|
303
|
+
else if (event.keyCode == 40 || event.keyCode == 34) { // ArrowDown, PageDown
|
304
|
+
this.moveSelection((this.selectedIndex + 1) % this.items.length);
|
305
|
+
}
|
306
|
+
else if (event.keyCode == 36) { // Home
|
307
|
+
this.moveSelection(0);
|
308
|
+
}
|
309
|
+
else if (event.keyCode == 35) { // End
|
310
|
+
this.moveSelection(this.items.length - 1);
|
311
|
+
}
|
312
|
+
else if (event.keyCode == 13) { // Enter
|
313
|
+
this.view.focus();
|
314
|
+
}
|
315
|
+
else if (event.keyCode >= 65 && event.keyCode <= 90 && this.selectedIndex >= 0) { // A-Z
|
316
|
+
let { diagnostic } = this.items[this.selectedIndex], keys = assignKeys(diagnostic.actions);
|
317
|
+
for (let i = 0; i < keys.length; i++)
|
318
|
+
if (keys[i].toUpperCase().charCodeAt(0) == event.keyCode) {
|
319
|
+
let found = findDiagnostic(this.view.state.field(lintState).diagnostics, diagnostic);
|
320
|
+
if (found)
|
321
|
+
diagnostic.actions[i].apply(view, found.from, found.to);
|
322
|
+
}
|
323
|
+
}
|
324
|
+
else {
|
325
|
+
return;
|
326
|
+
}
|
327
|
+
event.preventDefault();
|
328
|
+
};
|
329
|
+
let onclick = (event) => {
|
330
|
+
for (let i = 0; i < this.items.length; i++) {
|
331
|
+
if (this.items[i].dom.contains(event.target))
|
332
|
+
this.moveSelection(i);
|
333
|
+
}
|
334
|
+
};
|
335
|
+
this.list = crelt("ul", {
|
336
|
+
tabIndex: 0,
|
337
|
+
role: "listbox",
|
338
|
+
"aria-label": this.view.state.phrase("Diagnostics"),
|
339
|
+
onkeydown,
|
340
|
+
onclick
|
341
|
+
});
|
342
|
+
this.dom = crelt("div", { class: "cm-panel-lint" }, this.list, crelt("button", {
|
343
|
+
type: "button",
|
344
|
+
name: "close",
|
345
|
+
"aria-label": this.view.state.phrase("close"),
|
346
|
+
onclick: () => closeLintPanel(this.view)
|
347
|
+
}, "×"));
|
348
|
+
this.update();
|
349
|
+
}
|
350
|
+
get selectedIndex() {
|
351
|
+
let selected = this.view.state.field(lintState).selected;
|
352
|
+
if (!selected)
|
353
|
+
return -1;
|
354
|
+
for (let i = 0; i < this.items.length; i++)
|
355
|
+
if (this.items[i].diagnostic == selected.diagnostic)
|
356
|
+
return i;
|
357
|
+
return -1;
|
358
|
+
}
|
359
|
+
update() {
|
360
|
+
let { diagnostics, selected } = this.view.state.field(lintState);
|
361
|
+
let i = 0, needsSync = false, newSelectedItem = null;
|
362
|
+
let seen = new Set();
|
363
|
+
diagnostics.between(0, this.view.state.doc.length, (_start, _end, { spec }) => {
|
364
|
+
for (let diagnostic of spec.diagnostics) {
|
365
|
+
if (seen.has(diagnostic))
|
366
|
+
continue;
|
367
|
+
seen.add(diagnostic);
|
368
|
+
let found = -1, item;
|
369
|
+
for (let j = i; j < this.items.length; j++)
|
370
|
+
if (this.items[j].diagnostic == diagnostic) {
|
371
|
+
found = j;
|
372
|
+
break;
|
373
|
+
}
|
374
|
+
if (found < 0) {
|
375
|
+
item = new PanelItem(this.view, diagnostic);
|
376
|
+
this.items.splice(i, 0, item);
|
377
|
+
needsSync = true;
|
378
|
+
}
|
379
|
+
else {
|
380
|
+
item = this.items[found];
|
381
|
+
if (found > i) {
|
382
|
+
this.items.splice(i, found - i);
|
383
|
+
needsSync = true;
|
384
|
+
}
|
385
|
+
}
|
386
|
+
if (selected && item.diagnostic == selected.diagnostic) {
|
387
|
+
if (!item.dom.hasAttribute("aria-selected")) {
|
388
|
+
item.dom.setAttribute("aria-selected", "true");
|
389
|
+
newSelectedItem = item;
|
390
|
+
}
|
391
|
+
}
|
392
|
+
else if (item.dom.hasAttribute("aria-selected")) {
|
393
|
+
item.dom.removeAttribute("aria-selected");
|
394
|
+
}
|
395
|
+
i++;
|
396
|
+
}
|
397
|
+
});
|
398
|
+
while (i < this.items.length && !(this.items.length == 1 && this.items[0].diagnostic.from < 0)) {
|
399
|
+
needsSync = true;
|
400
|
+
this.items.pop();
|
401
|
+
}
|
402
|
+
if (this.items.length == 0) {
|
403
|
+
this.items.push(new PanelItem(this.view, {
|
404
|
+
from: -1, to: -1,
|
405
|
+
severity: "info",
|
406
|
+
message: this.view.state.phrase("No diagnostics")
|
407
|
+
}));
|
408
|
+
needsSync = true;
|
409
|
+
}
|
410
|
+
if (newSelectedItem) {
|
411
|
+
this.list.setAttribute("aria-activedescendant", newSelectedItem.id);
|
412
|
+
this.view.requestMeasure({
|
413
|
+
key: this,
|
414
|
+
read: () => ({ sel: newSelectedItem.dom.getBoundingClientRect(), panel: this.list.getBoundingClientRect() }),
|
415
|
+
write: ({ sel, panel }) => {
|
416
|
+
let scaleY = panel.height / this.list.offsetHeight;
|
417
|
+
if (sel.top < panel.top)
|
418
|
+
this.list.scrollTop -= (panel.top - sel.top) / scaleY;
|
419
|
+
else if (sel.bottom > panel.bottom)
|
420
|
+
this.list.scrollTop += (sel.bottom - panel.bottom) / scaleY;
|
421
|
+
}
|
422
|
+
});
|
423
|
+
}
|
424
|
+
else if (this.selectedIndex < 0) {
|
425
|
+
this.list.removeAttribute("aria-activedescendant");
|
426
|
+
}
|
427
|
+
if (needsSync)
|
428
|
+
this.sync();
|
429
|
+
}
|
430
|
+
sync() {
|
431
|
+
let domPos = this.list.firstChild;
|
432
|
+
function rm() {
|
433
|
+
let prev = domPos;
|
434
|
+
domPos = prev.nextSibling;
|
435
|
+
prev.remove();
|
436
|
+
}
|
437
|
+
for (let item of this.items) {
|
438
|
+
if (item.dom.parentNode == this.list) {
|
439
|
+
while (domPos != item.dom)
|
440
|
+
rm();
|
441
|
+
domPos = item.dom.nextSibling;
|
442
|
+
}
|
443
|
+
else {
|
444
|
+
this.list.insertBefore(item.dom, domPos);
|
445
|
+
}
|
446
|
+
}
|
447
|
+
while (domPos)
|
448
|
+
rm();
|
449
|
+
}
|
450
|
+
moveSelection(selectedIndex) {
|
451
|
+
if (this.selectedIndex < 0)
|
452
|
+
return;
|
453
|
+
let field = this.view.state.field(lintState);
|
454
|
+
let selection = findDiagnostic(field.diagnostics, this.items[selectedIndex].diagnostic);
|
455
|
+
if (!selection)
|
456
|
+
return;
|
457
|
+
this.view.dispatch({
|
458
|
+
selection: { anchor: selection.from, head: selection.to },
|
459
|
+
scrollIntoView: true,
|
460
|
+
effects: movePanelSelection.of(selection)
|
461
|
+
});
|
462
|
+
}
|
463
|
+
static open(view) { return new LintPanel(view); }
|
464
|
+
}
|
465
|
+
function svg(content, attrs = `viewBox="0 0 40 40"`) {
|
466
|
+
return `url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${attrs}>${encodeURIComponent(content)}</svg>')`;
|
467
|
+
}
|
468
|
+
function underline(color) {
|
469
|
+
return svg(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${color}" fill="none" stroke-width=".7"/>`, `width="6" height="3"`);
|
470
|
+
}
|
471
|
+
const baseTheme = /*@__PURE__*/EditorView.baseTheme({
|
472
|
+
".cm-diagnostic": {
|
473
|
+
padding: "3px 6px 3px 8px",
|
474
|
+
marginLeft: "-1px",
|
475
|
+
display: "block",
|
476
|
+
whiteSpace: "pre-wrap"
|
477
|
+
},
|
478
|
+
".cm-diagnostic-error": { borderLeft: "5px solid #d11" },
|
479
|
+
".cm-diagnostic-warning": { borderLeft: "5px solid orange" },
|
480
|
+
".cm-diagnostic-info": { borderLeft: "5px solid #999" },
|
481
|
+
".cm-diagnostic-hint": { borderLeft: "5px solid #66d" },
|
482
|
+
".cm-diagnosticAction": {
|
483
|
+
font: "inherit",
|
484
|
+
border: "none",
|
485
|
+
padding: "2px 4px",
|
486
|
+
backgroundColor: "#444",
|
487
|
+
color: "white",
|
488
|
+
borderRadius: "3px",
|
489
|
+
marginLeft: "8px",
|
490
|
+
cursor: "pointer"
|
491
|
+
},
|
492
|
+
".cm-diagnosticSource": {
|
493
|
+
fontSize: "70%",
|
494
|
+
opacity: .7
|
495
|
+
},
|
496
|
+
".cm-lintRange": {
|
497
|
+
backgroundPosition: "left bottom",
|
498
|
+
backgroundRepeat: "repeat-x",
|
499
|
+
paddingBottom: "0.7px",
|
500
|
+
},
|
501
|
+
".cm-lintRange-error": { backgroundImage: /*@__PURE__*/underline("#d11") },
|
502
|
+
".cm-lintRange-warning": { backgroundImage: /*@__PURE__*/underline("orange") },
|
503
|
+
".cm-lintRange-info": { backgroundImage: /*@__PURE__*/underline("#999") },
|
504
|
+
".cm-lintRange-hint": { backgroundImage: /*@__PURE__*/underline("#66d") },
|
505
|
+
".cm-lintRange-active": { backgroundColor: "#ffdd9980" },
|
506
|
+
".cm-tooltip-lint": {
|
507
|
+
padding: 0,
|
508
|
+
margin: 0
|
509
|
+
},
|
510
|
+
".cm-lintPoint": {
|
511
|
+
position: "relative",
|
512
|
+
"&:after": {
|
513
|
+
content: '""',
|
514
|
+
position: "absolute",
|
515
|
+
bottom: 0,
|
516
|
+
left: "-2px",
|
517
|
+
borderLeft: "3px solid transparent",
|
518
|
+
borderRight: "3px solid transparent",
|
519
|
+
borderBottom: "4px solid #d11"
|
520
|
+
}
|
521
|
+
},
|
522
|
+
".cm-lintPoint-warning": {
|
523
|
+
"&:after": { borderBottomColor: "orange" }
|
524
|
+
},
|
525
|
+
".cm-lintPoint-info": {
|
526
|
+
"&:after": { borderBottomColor: "#999" }
|
527
|
+
},
|
528
|
+
".cm-lintPoint-hint": {
|
529
|
+
"&:after": { borderBottomColor: "#66d" }
|
530
|
+
},
|
531
|
+
".cm-panel.cm-panel-lint": {
|
532
|
+
position: "relative",
|
533
|
+
"& ul": {
|
534
|
+
maxHeight: "100px",
|
535
|
+
overflowY: "auto",
|
536
|
+
"& [aria-selected]": {
|
537
|
+
backgroundColor: "#ddd",
|
538
|
+
"& u": { textDecoration: "underline" }
|
539
|
+
},
|
540
|
+
"&:focus [aria-selected]": {
|
541
|
+
background_fallback: "#bdf",
|
542
|
+
backgroundColor: "Highlight",
|
543
|
+
color_fallback: "white",
|
544
|
+
color: "HighlightText"
|
545
|
+
},
|
546
|
+
"& u": { textDecoration: "none" },
|
547
|
+
padding: 0,
|
548
|
+
margin: 0
|
549
|
+
},
|
550
|
+
"& [name=close]": {
|
551
|
+
position: "absolute",
|
552
|
+
top: "0",
|
553
|
+
right: "2px",
|
554
|
+
background: "inherit",
|
555
|
+
border: "none",
|
556
|
+
font: "inherit",
|
557
|
+
padding: 0,
|
558
|
+
margin: 0
|
559
|
+
}
|
560
|
+
}
|
561
|
+
});
|
562
|
+
function severityWeight(sev) {
|
563
|
+
return sev == "error" ? 4 : sev == "warning" ? 3 : sev == "info" ? 2 : 1;
|
564
|
+
}
|
565
|
+
function maxSeverity(diagnostics) {
|
566
|
+
let sev = "hint", weight = 1;
|
567
|
+
for (let d of diagnostics) {
|
568
|
+
let w = severityWeight(d.severity);
|
569
|
+
if (w > weight) {
|
570
|
+
weight = w;
|
571
|
+
sev = d.severity;
|
572
|
+
}
|
573
|
+
}
|
574
|
+
return sev;
|
575
|
+
}
|
576
|
+
const lintExtensions = [
|
577
|
+
lintState,
|
578
|
+
/*@__PURE__*/EditorView.decorations.compute([lintState], state => {
|
579
|
+
let { selected, panel } = state.field(lintState);
|
580
|
+
return !selected || !panel || selected.from == selected.to ? Decoration.none : Decoration.set([
|
581
|
+
activeMark.range(selected.from, selected.to)
|
582
|
+
]);
|
583
|
+
}),
|
584
|
+
/*@__PURE__*/hoverTooltip(lintTooltip, { hideOn: hideTooltip }),
|
585
|
+
baseTheme
|
586
|
+
];
|
587
|
+
|
588
|
+
export { closeLintPanel, lintKeymap, nextDiagnostic, openLintPanel, setDiagnosticsEffect };
|
589
|
+
//# sourceMappingURL=index.js.map
|