@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.
Files changed (392) hide show
  1. package/library/axiom-ui-forms.d.ts +36 -4
  2. package/library/esm/_virtual/index10.js +2 -2
  3. package/library/esm/_virtual/index11.js +2 -2
  4. package/library/esm/_virtual/index12.js +6 -2
  5. package/library/esm/_virtual/index12.js.map +1 -1
  6. package/library/esm/_virtual/index13.js +6 -2
  7. package/library/esm/_virtual/index13.js.map +1 -1
  8. package/library/esm/_virtual/index14.js +2 -2
  9. package/library/esm/_virtual/index15.js +4 -0
  10. package/library/esm/_virtual/index15.js.map +1 -0
  11. package/library/esm/_virtual/index16.js +4 -0
  12. package/library/esm/_virtual/index16.js.map +1 -0
  13. package/library/esm/_virtual/index17.js +4 -0
  14. package/library/esm/_virtual/index17.js.map +1 -0
  15. package/library/esm/_virtual/index6.js +2 -2
  16. package/library/esm/_virtual/index6.js.map +1 -1
  17. package/library/esm/_virtual/index7.js +2 -2
  18. package/library/esm/_virtual/index7.js.map +1 -1
  19. package/library/esm/_virtual/index8.js +2 -2
  20. package/library/esm/_virtual/index9.js +2 -2
  21. package/library/esm/_virtual/utilities.js +4 -0
  22. package/library/esm/_virtual/utilities.js.map +1 -0
  23. package/library/esm/node_modules/@axdspub/axiom-ui-utilities/library/index.js +241 -9
  24. package/library/esm/node_modules/@axdspub/axiom-ui-utilities/library/index.js.map +1 -1
  25. package/library/esm/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
  26. package/library/esm/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
  27. package/library/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
  28. package/library/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
  29. package/library/esm/node_modules/@codemirror/autocomplete/dist/index.js +1652 -0
  30. package/library/esm/node_modules/@codemirror/autocomplete/dist/index.js.map +1 -0
  31. package/library/esm/node_modules/@codemirror/commands/dist/index.js +1444 -0
  32. package/library/esm/node_modules/@codemirror/commands/dist/index.js.map +1 -0
  33. package/library/esm/node_modules/@codemirror/lang-json/dist/index.js +33 -0
  34. package/library/esm/node_modules/@codemirror/lang-json/dist/index.js.map +1 -0
  35. package/library/esm/node_modules/@codemirror/lang-yaml/dist/index.js +59 -0
  36. package/library/esm/node_modules/@codemirror/lang-yaml/dist/index.js.map +1 -0
  37. package/library/esm/node_modules/@codemirror/language/dist/index.js +1821 -0
  38. package/library/esm/node_modules/@codemirror/language/dist/index.js.map +1 -0
  39. package/library/esm/node_modules/@codemirror/lint/dist/index.js +589 -0
  40. package/library/esm/node_modules/@codemirror/lint/dist/index.js.map +1 -0
  41. package/library/esm/node_modules/@codemirror/search/dist/index.js +1227 -0
  42. package/library/esm/node_modules/@codemirror/search/dist/index.js.map +1 -0
  43. package/library/esm/node_modules/@codemirror/state/dist/index.js +3882 -0
  44. package/library/esm/node_modules/@codemirror/state/dist/index.js.map +1 -0
  45. package/library/esm/node_modules/@codemirror/theme-one-dark/dist/index.js +114 -0
  46. package/library/esm/node_modules/@codemirror/theme-one-dark/dist/index.js.map +1 -0
  47. package/library/esm/node_modules/@codemirror/view/dist/index.js +11052 -0
  48. package/library/esm/node_modules/@codemirror/view/dist/index.js.map +1 -0
  49. package/library/esm/node_modules/@lezer/common/dist/index.js +1704 -0
  50. package/library/esm/node_modules/@lezer/common/dist/index.js.map +1 -0
  51. package/library/esm/node_modules/@lezer/highlight/dist/index.js +876 -0
  52. package/library/esm/node_modules/@lezer/highlight/dist/index.js.map +1 -0
  53. package/library/esm/node_modules/@lezer/json/dist/index.js +38 -0
  54. package/library/esm/node_modules/@lezer/json/dist/index.js.map +1 -0
  55. package/library/esm/node_modules/@lezer/lr/dist/index.js +1855 -0
  56. package/library/esm/node_modules/@lezer/lr/dist/index.js.map +1 -0
  57. package/library/esm/node_modules/@lezer/yaml/dist/index.js +392 -0
  58. package/library/esm/node_modules/@lezer/yaml/dist/index.js.map +1 -0
  59. package/library/esm/node_modules/@marijn/find-cluster-break/src/index.js +83 -0
  60. package/library/esm/node_modules/@marijn/find-cluster-break/src/index.js.map +1 -0
  61. package/library/esm/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js +67 -1
  62. package/library/esm/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js.map +1 -1
  63. package/library/esm/node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.js +100 -0
  64. package/library/esm/node_modules/@uiw/codemirror-extensions-basic-setup/esm/index.js.map +1 -0
  65. package/library/esm/node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.js +58 -0
  66. package/library/esm/node_modules/@uiw/react-codemirror/esm/getDefaultExtensions.js.map +1 -0
  67. package/library/esm/node_modules/@uiw/react-codemirror/esm/index.js +89 -0
  68. package/library/esm/node_modules/@uiw/react-codemirror/esm/index.js.map +1 -0
  69. package/library/esm/node_modules/@uiw/react-codemirror/esm/theme/light.js +12 -0
  70. package/library/esm/node_modules/@uiw/react-codemirror/esm/theme/light.js.map +1 -0
  71. package/library/esm/node_modules/@uiw/react-codemirror/esm/useCodeMirror.js +151 -0
  72. package/library/esm/node_modules/@uiw/react-codemirror/esm/useCodeMirror.js.map +1 -0
  73. package/library/esm/node_modules/@uiw/react-codemirror/esm/utils.js +19 -0
  74. package/library/esm/node_modules/@uiw/react-codemirror/esm/utils.js.map +1 -0
  75. package/library/esm/node_modules/@ungap/structured-clone/esm/deserialize.js +77 -0
  76. package/library/esm/node_modules/@ungap/structured-clone/esm/deserialize.js.map +1 -0
  77. package/library/esm/node_modules/@ungap/structured-clone/esm/index.js +25 -0
  78. package/library/esm/node_modules/@ungap/structured-clone/esm/index.js.map +1 -0
  79. package/library/esm/node_modules/@ungap/structured-clone/esm/serialize.js +159 -0
  80. package/library/esm/node_modules/@ungap/structured-clone/esm/serialize.js.map +1 -0
  81. package/library/esm/node_modules/@ungap/structured-clone/esm/types.js +14 -0
  82. package/library/esm/node_modules/@ungap/structured-clone/esm/types.js.map +1 -0
  83. package/library/esm/node_modules/ajv/dist/compile/index.js +1 -1
  84. package/library/esm/node_modules/ajv/dist/vocabularies/applicator/index.js +1 -1
  85. package/library/esm/node_modules/ajv/dist/vocabularies/core/index.js +1 -1
  86. package/library/esm/node_modules/ajv/dist/vocabularies/format/index.js +1 -1
  87. package/library/esm/node_modules/ajv/dist/vocabularies/validation/index.js +1 -1
  88. package/library/esm/node_modules/bail/index.js +15 -0
  89. package/library/esm/node_modules/bail/index.js.map +1 -0
  90. package/library/esm/node_modules/comma-separated-tokens/index.js +37 -0
  91. package/library/esm/node_modules/comma-separated-tokens/index.js.map +1 -0
  92. package/library/esm/node_modules/crelt/index.js +30 -0
  93. package/library/esm/node_modules/crelt/index.js.map +1 -0
  94. package/library/esm/node_modules/decode-named-character-reference/index.dom.js +39 -0
  95. package/library/esm/node_modules/decode-named-character-reference/index.dom.js.map +1 -0
  96. package/library/esm/node_modules/devlop/lib/default.js +6 -0
  97. package/library/esm/node_modules/devlop/lib/default.js.map +1 -0
  98. package/library/esm/node_modules/estree-util-is-identifier-name/lib/index.js +31 -0
  99. package/library/esm/node_modules/estree-util-is-identifier-name/lib/index.js.map +1 -0
  100. package/library/esm/node_modules/extend/index.js +127 -0
  101. package/library/esm/node_modules/extend/index.js.map +1 -0
  102. package/library/esm/node_modules/fast-uri/index.js +1 -1
  103. package/library/esm/node_modules/hast-util-to-jsx-runtime/lib/index.js +791 -0
  104. package/library/esm/node_modules/hast-util-to-jsx-runtime/lib/index.js.map +1 -0
  105. package/library/esm/node_modules/hast-util-whitespace/lib/index.js +37 -0
  106. package/library/esm/node_modules/hast-util-whitespace/lib/index.js.map +1 -0
  107. package/library/esm/node_modules/html-url-attributes/lib/index.js +34 -0
  108. package/library/esm/node_modules/html-url-attributes/lib/index.js.map +1 -0
  109. package/library/esm/node_modules/inline-style-parser/index.js +268 -0
  110. package/library/esm/node_modules/inline-style-parser/index.js.map +1 -0
  111. package/library/esm/node_modules/js-yaml/dist/js-yaml.js +3850 -0
  112. package/library/esm/node_modules/js-yaml/dist/js-yaml.js.map +1 -0
  113. package/library/esm/node_modules/json-schema-traverse/index.js +1 -1
  114. package/library/esm/node_modules/mdast-util-from-markdown/lib/index.js +1181 -0
  115. package/library/esm/node_modules/mdast-util-from-markdown/lib/index.js.map +1 -0
  116. package/library/esm/node_modules/mdast-util-to-hast/lib/footer.js +197 -0
  117. package/library/esm/node_modules/mdast-util-to-hast/lib/footer.js.map +1 -0
  118. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js +31 -0
  119. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js.map +1 -0
  120. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/break.js +27 -0
  121. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/break.js.map +1 -0
  122. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/code.js +51 -0
  123. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/code.js.map +1 -0
  124. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/delete.js +31 -0
  125. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/delete.js.map +1 -0
  126. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js +31 -0
  127. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js.map +1 -0
  128. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js +74 -0
  129. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js.map +1 -0
  130. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/heading.js +31 -0
  131. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/heading.js.map +1 -0
  132. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/html.js +32 -0
  133. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/html.js.map +1 -0
  134. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js +45 -0
  135. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js.map +1 -0
  136. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/image.js +40 -0
  137. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/image.js.map +1 -0
  138. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/index.js +67 -0
  139. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/index.js.map +1 -0
  140. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js +36 -0
  141. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js.map +1 -0
  142. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js +50 -0
  143. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js.map +1 -0
  144. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/link.js +41 -0
  145. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/link.js.map +1 -0
  146. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/list-item.js +126 -0
  147. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/list-item.js.map +1 -0
  148. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/list.js +57 -0
  149. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/list.js.map +1 -0
  150. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js +31 -0
  151. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js.map +1 -0
  152. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/root.js +27 -0
  153. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/root.js.map +1 -0
  154. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/strong.js +31 -0
  155. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/strong.js.map +1 -0
  156. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js +33 -0
  157. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js.map +1 -0
  158. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table-row.js +70 -0
  159. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table-row.js.map +1 -0
  160. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table.js +65 -0
  161. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/table.js.map +1 -0
  162. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/text.js +29 -0
  163. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/text.js.map +1 -0
  164. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js +31 -0
  165. package/library/esm/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js.map +1 -0
  166. package/library/esm/node_modules/mdast-util-to-hast/lib/index.js +105 -0
  167. package/library/esm/node_modules/mdast-util-to-hast/lib/index.js.map +1 -0
  168. package/library/esm/node_modules/mdast-util-to-hast/lib/revert.js +56 -0
  169. package/library/esm/node_modules/mdast-util-to-hast/lib/revert.js.map +1 -0
  170. package/library/esm/node_modules/mdast-util-to-hast/lib/state.js +322 -0
  171. package/library/esm/node_modules/mdast-util-to-hast/lib/state.js.map +1 -0
  172. package/library/esm/node_modules/mdast-util-to-string/lib/index.js +111 -0
  173. package/library/esm/node_modules/mdast-util-to-string/lib/index.js.map +1 -0
  174. package/library/esm/node_modules/micromark/lib/constructs.js +108 -0
  175. package/library/esm/node_modules/micromark/lib/constructs.js.map +1 -0
  176. package/library/esm/node_modules/micromark/lib/create-tokenizer.js +576 -0
  177. package/library/esm/node_modules/micromark/lib/create-tokenizer.js.map +1 -0
  178. package/library/esm/node_modules/micromark/lib/initialize/content.js +83 -0
  179. package/library/esm/node_modules/micromark/lib/initialize/content.js.map +1 -0
  180. package/library/esm/node_modules/micromark/lib/initialize/document.js +361 -0
  181. package/library/esm/node_modules/micromark/lib/initialize/document.js.map +1 -0
  182. package/library/esm/node_modules/micromark/lib/initialize/flow.js +62 -0
  183. package/library/esm/node_modules/micromark/lib/initialize/flow.js.map +1 -0
  184. package/library/esm/node_modules/micromark/lib/initialize/text.js +213 -0
  185. package/library/esm/node_modules/micromark/lib/initialize/text.js.map +1 -0
  186. package/library/esm/node_modules/micromark/lib/parse.js +60 -0
  187. package/library/esm/node_modules/micromark/lib/parse.js.map +1 -0
  188. package/library/esm/node_modules/micromark/lib/postprocess.js +22 -0
  189. package/library/esm/node_modules/micromark/lib/postprocess.js.map +1 -0
  190. package/library/esm/node_modules/micromark/lib/preprocess.js +118 -0
  191. package/library/esm/node_modules/micromark/lib/preprocess.js.map +1 -0
  192. package/library/esm/node_modules/micromark-core-commonmark/lib/attention.js +245 -0
  193. package/library/esm/node_modules/micromark-core-commonmark/lib/attention.js.map +1 -0
  194. package/library/esm/node_modules/micromark-core-commonmark/lib/autolink.js +237 -0
  195. package/library/esm/node_modules/micromark-core-commonmark/lib/autolink.js.map +1 -0
  196. package/library/esm/node_modules/micromark-core-commonmark/lib/blank-line.js +65 -0
  197. package/library/esm/node_modules/micromark-core-commonmark/lib/blank-line.js.map +1 -0
  198. package/library/esm/node_modules/micromark-core-commonmark/lib/block-quote.js +147 -0
  199. package/library/esm/node_modules/micromark-core-commonmark/lib/block-quote.js.map +1 -0
  200. package/library/esm/node_modules/micromark-core-commonmark/lib/character-escape.js +68 -0
  201. package/library/esm/node_modules/micromark-core-commonmark/lib/character-escape.js.map +1 -0
  202. package/library/esm/node_modules/micromark-core-commonmark/lib/character-reference.js +153 -0
  203. package/library/esm/node_modules/micromark-core-commonmark/lib/character-reference.js.map +1 -0
  204. package/library/esm/node_modules/micromark-core-commonmark/lib/code-fenced.js +464 -0
  205. package/library/esm/node_modules/micromark-core-commonmark/lib/code-fenced.js.map +1 -0
  206. package/library/esm/node_modules/micromark-core-commonmark/lib/code-indented.js +181 -0
  207. package/library/esm/node_modules/micromark-core-commonmark/lib/code-indented.js.map +1 -0
  208. package/library/esm/node_modules/micromark-core-commonmark/lib/code-text.js +228 -0
  209. package/library/esm/node_modules/micromark-core-commonmark/lib/code-text.js.map +1 -0
  210. package/library/esm/node_modules/micromark-core-commonmark/lib/content.js +167 -0
  211. package/library/esm/node_modules/micromark-core-commonmark/lib/content.js.map +1 -0
  212. package/library/esm/node_modules/micromark-core-commonmark/lib/definition.js +258 -0
  213. package/library/esm/node_modules/micromark-core-commonmark/lib/definition.js.map +1 -0
  214. package/library/esm/node_modules/micromark-core-commonmark/lib/hard-break-escape.js +64 -0
  215. package/library/esm/node_modules/micromark-core-commonmark/lib/hard-break-escape.js.map +1 -0
  216. package/library/esm/node_modules/micromark-core-commonmark/lib/heading-atx.js +199 -0
  217. package/library/esm/node_modules/micromark-core-commonmark/lib/heading-atx.js.map +1 -0
  218. package/library/esm/node_modules/micromark-core-commonmark/lib/html-flow.js +880 -0
  219. package/library/esm/node_modules/micromark-core-commonmark/lib/html-flow.js.map +1 -0
  220. package/library/esm/node_modules/micromark-core-commonmark/lib/html-text.js +682 -0
  221. package/library/esm/node_modules/micromark-core-commonmark/lib/html-text.js.map +1 -0
  222. package/library/esm/node_modules/micromark-core-commonmark/lib/label-end.js +564 -0
  223. package/library/esm/node_modules/micromark-core-commonmark/lib/label-end.js.map +1 -0
  224. package/library/esm/node_modules/micromark-core-commonmark/lib/label-start-image.js +106 -0
  225. package/library/esm/node_modules/micromark-core-commonmark/lib/label-start-image.js.map +1 -0
  226. package/library/esm/node_modules/micromark-core-commonmark/lib/label-start-link.js +59 -0
  227. package/library/esm/node_modules/micromark-core-commonmark/lib/label-start-link.js.map +1 -0
  228. package/library/esm/node_modules/micromark-core-commonmark/lib/line-ending.js +36 -0
  229. package/library/esm/node_modules/micromark-core-commonmark/lib/line-ending.js.map +1 -0
  230. package/library/esm/node_modules/micromark-core-commonmark/lib/list.js +217 -0
  231. package/library/esm/node_modules/micromark-core-commonmark/lib/list.js.map +1 -0
  232. package/library/esm/node_modules/micromark-core-commonmark/lib/setext-underline.js +189 -0
  233. package/library/esm/node_modules/micromark-core-commonmark/lib/setext-underline.js.map +1 -0
  234. package/library/esm/node_modules/micromark-core-commonmark/lib/thematic-break.js +106 -0
  235. package/library/esm/node_modules/micromark-core-commonmark/lib/thematic-break.js.map +1 -0
  236. package/library/esm/node_modules/micromark-factory-destination/index.js +210 -0
  237. package/library/esm/node_modules/micromark-factory-destination/index.js.map +1 -0
  238. package/library/esm/node_modules/micromark-factory-label/index.js +152 -0
  239. package/library/esm/node_modules/micromark-factory-label/index.js.map +1 -0
  240. package/library/esm/node_modules/micromark-factory-space/index.js +68 -0
  241. package/library/esm/node_modules/micromark-factory-space/index.js.map +1 -0
  242. package/library/esm/node_modules/micromark-factory-title/index.js +162 -0
  243. package/library/esm/node_modules/micromark-factory-title/index.js.map +1 -0
  244. package/library/esm/node_modules/micromark-factory-whitespace/index.js +48 -0
  245. package/library/esm/node_modules/micromark-factory-whitespace/index.js.map +1 -0
  246. package/library/esm/node_modules/micromark-util-character/index.js +249 -0
  247. package/library/esm/node_modules/micromark-util-character/index.js.map +1 -0
  248. package/library/esm/node_modules/micromark-util-chunked/index.js +84 -0
  249. package/library/esm/node_modules/micromark-util-chunked/index.js.map +1 -0
  250. package/library/esm/node_modules/micromark-util-classify-character/index.js +31 -0
  251. package/library/esm/node_modules/micromark-util-classify-character/index.js.map +1 -0
  252. package/library/esm/node_modules/micromark-util-combine-extensions/index.js +96 -0
  253. package/library/esm/node_modules/micromark-util-combine-extensions/index.js.map +1 -0
  254. package/library/esm/node_modules/micromark-util-decode-numeric-character-reference/index.js +35 -0
  255. package/library/esm/node_modules/micromark-util-decode-numeric-character-reference/index.js.map +1 -0
  256. package/library/esm/node_modules/micromark-util-decode-string/index.js +49 -0
  257. package/library/esm/node_modules/micromark-util-decode-string/index.js.map +1 -0
  258. package/library/esm/node_modules/micromark-util-html-tag-name/index.js +96 -0
  259. package/library/esm/node_modules/micromark-util-html-tag-name/index.js.map +1 -0
  260. package/library/esm/node_modules/micromark-util-normalize-identifier/index.js +36 -0
  261. package/library/esm/node_modules/micromark-util-normalize-identifier/index.js.map +1 -0
  262. package/library/esm/node_modules/micromark-util-resolve-all/index.js +35 -0
  263. package/library/esm/node_modules/micromark-util-resolve-all/index.js.map +1 -0
  264. package/library/esm/node_modules/micromark-util-sanitize-uri/index.js +67 -0
  265. package/library/esm/node_modules/micromark-util-sanitize-uri/index.js.map +1 -0
  266. package/library/esm/node_modules/micromark-util-subtokenize/index.js +227 -0
  267. package/library/esm/node_modules/micromark-util-subtokenize/index.js.map +1 -0
  268. package/library/esm/node_modules/micromark-util-subtokenize/lib/splice-buffer.js +254 -0
  269. package/library/esm/node_modules/micromark-util-subtokenize/lib/splice-buffer.js.map +1 -0
  270. package/library/esm/node_modules/property-information/index.js +16 -0
  271. package/library/esm/node_modules/property-information/index.js.map +1 -0
  272. package/library/esm/node_modules/property-information/lib/aria.js +64 -0
  273. package/library/esm/node_modules/property-information/lib/aria.js.map +1 -0
  274. package/library/esm/node_modules/property-information/lib/find.js +101 -0
  275. package/library/esm/node_modules/property-information/lib/find.js.map +1 -0
  276. package/library/esm/node_modules/property-information/lib/hast-to-react.js +33 -0
  277. package/library/esm/node_modules/property-information/lib/hast-to-react.js.map +1 -0
  278. package/library/esm/node_modules/property-information/lib/html.js +318 -0
  279. package/library/esm/node_modules/property-information/lib/html.js.map +1 -0
  280. package/library/esm/node_modules/property-information/lib/normalize.js +15 -0
  281. package/library/esm/node_modules/property-information/lib/normalize.js.map +1 -0
  282. package/library/esm/node_modules/property-information/lib/svg.js +564 -0
  283. package/library/esm/node_modules/property-information/lib/svg.js.map +1 -0
  284. package/library/esm/node_modules/property-information/lib/util/case-insensitive-transform.js +16 -0
  285. package/library/esm/node_modules/property-information/lib/util/case-insensitive-transform.js.map +1 -0
  286. package/library/esm/node_modules/property-information/lib/util/case-sensitive-transform.js +14 -0
  287. package/library/esm/node_modules/property-information/lib/util/case-sensitive-transform.js.map +1 -0
  288. package/library/esm/node_modules/property-information/lib/util/create.js +47 -0
  289. package/library/esm/node_modules/property-information/lib/util/create.js.map +1 -0
  290. package/library/esm/node_modules/property-information/lib/util/defined-info.js +64 -0
  291. package/library/esm/node_modules/property-information/lib/util/defined-info.js.map +1 -0
  292. package/library/esm/node_modules/property-information/lib/util/info.js +35 -0
  293. package/library/esm/node_modules/property-information/lib/util/info.js.map +1 -0
  294. package/library/esm/node_modules/property-information/lib/util/merge.js +31 -0
  295. package/library/esm/node_modules/property-information/lib/util/merge.js.map +1 -0
  296. package/library/esm/node_modules/property-information/lib/util/schema.js +32 -0
  297. package/library/esm/node_modules/property-information/lib/util/schema.js.map +1 -0
  298. package/library/esm/node_modules/property-information/lib/util/types.js +16 -0
  299. package/library/esm/node_modules/property-information/lib/util/types.js.map +1 -0
  300. package/library/esm/node_modules/property-information/lib/xlink.js +20 -0
  301. package/library/esm/node_modules/property-information/lib/xlink.js.map +1 -0
  302. package/library/esm/node_modules/property-information/lib/xml.js +12 -0
  303. package/library/esm/node_modules/property-information/lib/xml.js.map +1 -0
  304. package/library/esm/node_modules/property-information/lib/xmlns.js +12 -0
  305. package/library/esm/node_modules/property-information/lib/xmlns.js.map +1 -0
  306. package/library/esm/node_modules/react-markdown/lib/index.js +267 -0
  307. package/library/esm/node_modules/react-markdown/lib/index.js.map +1 -0
  308. package/library/esm/node_modules/react-router/dist/development/chunk-HA7DTUK3.js +1 -1
  309. package/library/esm/node_modules/react-router/node_modules/cookie/dist/index.js +1 -1
  310. package/library/esm/node_modules/remark-parse/lib/index.js +43 -0
  311. package/library/esm/node_modules/remark-parse/lib/index.js.map +1 -0
  312. package/library/esm/node_modules/remark-rehype/lib/index.js +132 -0
  313. package/library/esm/node_modules/remark-rehype/lib/index.js.map +1 -0
  314. package/library/esm/node_modules/space-separated-tokens/index.js +23 -0
  315. package/library/esm/node_modules/space-separated-tokens/index.js.map +1 -0
  316. package/library/esm/node_modules/style-mod/src/style-mod.js +175 -0
  317. package/library/esm/node_modules/style-mod/src/style-mod.js.map +1 -0
  318. package/library/esm/node_modules/style-to-js/cjs/index.js +38 -0
  319. package/library/esm/node_modules/style-to-js/cjs/index.js.map +1 -0
  320. package/library/esm/node_modules/style-to-js/cjs/utilities.js +58 -0
  321. package/library/esm/node_modules/style-to-js/cjs/utilities.js.map +1 -0
  322. package/library/esm/node_modules/style-to-object/cjs/index.js +56 -0
  323. package/library/esm/node_modules/style-to-object/cjs/index.js.map +1 -0
  324. package/library/esm/node_modules/trim-lines/index.js +72 -0
  325. package/library/esm/node_modules/trim-lines/index.js.map +1 -0
  326. package/library/esm/node_modules/trough/lib/index.js +209 -0
  327. package/library/esm/node_modules/trough/lib/index.js.map +1 -0
  328. package/library/esm/node_modules/unified/lib/callable-instance.js +47 -0
  329. package/library/esm/node_modules/unified/lib/callable-instance.js.map +1 -0
  330. package/library/esm/node_modules/unified/lib/index.js +979 -0
  331. package/library/esm/node_modules/unified/lib/index.js.map +1 -0
  332. package/library/esm/node_modules/unified/node_modules/is-plain-obj/index.js +11 -0
  333. package/library/esm/node_modules/unified/node_modules/is-plain-obj/index.js.map +1 -0
  334. package/library/esm/node_modules/unist-util-is/lib/index.js +179 -0
  335. package/library/esm/node_modules/unist-util-is/lib/index.js.map +1 -0
  336. package/library/esm/node_modules/unist-util-position/lib/index.js +98 -0
  337. package/library/esm/node_modules/unist-util-position/lib/index.js.map +1 -0
  338. package/library/esm/node_modules/unist-util-stringify-position/lib/index.js +87 -0
  339. package/library/esm/node_modules/unist-util-stringify-position/lib/index.js.map +1 -0
  340. package/library/esm/node_modules/unist-util-visit/lib/index.js +95 -0
  341. package/library/esm/node_modules/unist-util-visit/lib/index.js.map +1 -0
  342. package/library/esm/node_modules/unist-util-visit-parents/lib/color.js +10 -0
  343. package/library/esm/node_modules/unist-util-visit-parents/lib/color.js.map +1 -0
  344. package/library/esm/node_modules/unist-util-visit-parents/lib/index.js +188 -0
  345. package/library/esm/node_modules/unist-util-visit-parents/lib/index.js.map +1 -0
  346. package/library/esm/node_modules/vfile/lib/index.js +644 -0
  347. package/library/esm/node_modules/vfile/lib/index.js.map +1 -0
  348. package/library/esm/node_modules/vfile/lib/minpath.browser.js +427 -0
  349. package/library/esm/node_modules/vfile/lib/minpath.browser.js.map +1 -0
  350. package/library/esm/node_modules/vfile/lib/minproc.browser.js +11 -0
  351. package/library/esm/node_modules/vfile/lib/minproc.browser.js.map +1 -0
  352. package/library/esm/node_modules/vfile/lib/minurl.browser.js +77 -0
  353. package/library/esm/node_modules/vfile/lib/minurl.browser.js.map +1 -0
  354. package/library/esm/node_modules/vfile/lib/minurl.shared.js +34 -0
  355. package/library/esm/node_modules/vfile/lib/minurl.shared.js.map +1 -0
  356. package/library/esm/node_modules/vfile-message/lib/index.js +305 -0
  357. package/library/esm/node_modules/vfile-message/lib/index.js.map +1 -0
  358. package/library/esm/node_modules/w3c-keyname/index.js +122 -0
  359. package/library/esm/node_modules/w3c-keyname/index.js.map +1 -0
  360. package/library/esm/src/Form/Components/FieldLabel.js +13 -3
  361. package/library/esm/src/Form/Components/FieldLabel.js.map +1 -1
  362. package/library/esm/src/Form/Components/InlineMarkdown.js +15 -0
  363. package/library/esm/src/Form/Components/InlineMarkdown.js.map +1 -0
  364. package/library/esm/src/Form/Components/Inputs/Boolean.js +5 -2
  365. package/library/esm/src/Form/Components/Inputs/Boolean.js.map +1 -1
  366. package/library/esm/src/Form/Components/Inputs/GeoJSONInputLoader.js +1 -1
  367. package/library/esm/src/Form/Components/Inputs/Geometry.js +290 -329
  368. package/library/esm/src/Form/Components/Inputs/Geometry.js.map +1 -1
  369. package/library/esm/src/Form/Components/Inputs/JSON.js +132 -0
  370. package/library/esm/src/Form/Components/Inputs/JSON.js.map +1 -0
  371. package/library/esm/src/Form/Components/Inputs/JSONInputLoader.js +19 -0
  372. package/library/esm/src/Form/Components/Inputs/JSONInputLoader.js.map +1 -0
  373. package/library/esm/src/Form/Components/Inputs/Number.js +78 -8
  374. package/library/esm/src/Form/Components/Inputs/Number.js.map +1 -1
  375. package/library/esm/src/Form/Components/Inputs/inputMap.js +2 -2
  376. package/library/esm/src/Form/Components/Inputs/inputMap.js.map +1 -1
  377. package/library/esm/src/Form/Creator/FormCreator.js +6 -2
  378. package/library/esm/src/Form/Creator/FormCreator.js.map +1 -1
  379. package/library/esm/src/Form/Creator/FormHeader.js +7 -5
  380. package/library/esm/src/Form/Creator/FormHeader.js.map +1 -1
  381. package/library/esm/src/Form/Creator/Page.js +4 -3
  382. package/library/esm/src/Form/Creator/Page.js.map +1 -1
  383. package/library/esm/src/Form/Manage/CopyableJSONOutput.js +41 -0
  384. package/library/esm/src/Form/Manage/CopyableJSONOutput.js.map +1 -0
  385. package/library/esm/src/Form/helpers.js +1 -1
  386. package/library/esm/src/Form/helpers.js.map +1 -1
  387. package/library/esm/src/Form/schemaToFormHelpers.js +87 -1
  388. package/library/esm/src/Form/schemaToFormHelpers.js.map +1 -1
  389. package/library/esm/src/library.js +1 -1
  390. package/package.json +7 -1
  391. package/library/esm/src/Form/Components/Inputs/JSONString.js +0 -34
  392. 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