@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,322 @@
1
+ import structuredClone from '../../@ungap/structured-clone/esm/index.js';
2
+ import { handlers } from './handlers/index.js';
3
+ import { visit } from '../../unist-util-visit/lib/index.js';
4
+ import { position } from '../../unist-util-position/lib/index.js';
5
+
6
+ /**
7
+ * @typedef {import('hast').Element} HastElement
8
+ * @typedef {import('hast').ElementContent} HastElementContent
9
+ * @typedef {import('hast').Nodes} HastNodes
10
+ * @typedef {import('hast').Properties} HastProperties
11
+ * @typedef {import('hast').RootContent} HastRootContent
12
+ * @typedef {import('hast').Text} HastText
13
+ *
14
+ * @typedef {import('mdast').Definition} MdastDefinition
15
+ * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition
16
+ * @typedef {import('mdast').Nodes} MdastNodes
17
+ * @typedef {import('mdast').Parents} MdastParents
18
+ *
19
+ * @typedef {import('vfile').VFile} VFile
20
+ *
21
+ * @typedef {import('./footer.js').FootnoteBackContentTemplate} FootnoteBackContentTemplate
22
+ * @typedef {import('./footer.js').FootnoteBackLabelTemplate} FootnoteBackLabelTemplate
23
+ */
24
+
25
+
26
+ const own = {}.hasOwnProperty;
27
+
28
+ /** @type {Options} */
29
+ const emptyOptions = {};
30
+
31
+ /**
32
+ * Create `state` from an mdast tree.
33
+ *
34
+ * @param {MdastNodes} tree
35
+ * mdast node to transform.
36
+ * @param {Options | null | undefined} [options]
37
+ * Configuration (optional).
38
+ * @returns {State}
39
+ * `state` function.
40
+ */
41
+ function createState(tree, options) {
42
+ const settings = options || emptyOptions;
43
+ /** @type {Map<string, MdastDefinition>} */
44
+ const definitionById = new Map();
45
+ /** @type {Map<string, MdastFootnoteDefinition>} */
46
+ const footnoteById = new Map();
47
+ /** @type {Map<string, number>} */
48
+ const footnoteCounts = new Map();
49
+ /** @type {Handlers} */
50
+ // @ts-expect-error: the root handler returns a root.
51
+ // Hard to type.
52
+ const handlers$1 = {...handlers, ...settings.handlers};
53
+
54
+ /** @type {State} */
55
+ const state = {
56
+ all,
57
+ applyData,
58
+ definitionById,
59
+ footnoteById,
60
+ footnoteCounts,
61
+ footnoteOrder: [],
62
+ handlers: handlers$1,
63
+ one,
64
+ options: settings,
65
+ patch,
66
+ wrap
67
+ };
68
+
69
+ visit(tree, function (node) {
70
+ if (node.type === 'definition' || node.type === 'footnoteDefinition') {
71
+ const map = node.type === 'definition' ? definitionById : footnoteById;
72
+ const id = String(node.identifier).toUpperCase();
73
+
74
+ // Mimick CM behavior of link definitions.
75
+ // See: <https://github.com/syntax-tree/mdast-util-definitions/blob/9032189/lib/index.js#L20-L21>.
76
+ if (!map.has(id)) {
77
+ // @ts-expect-error: node type matches map.
78
+ map.set(id, node);
79
+ }
80
+ }
81
+ });
82
+
83
+ return state
84
+
85
+ /**
86
+ * Transform an mdast node into a hast node.
87
+ *
88
+ * @param {MdastNodes} node
89
+ * mdast node.
90
+ * @param {MdastParents | undefined} [parent]
91
+ * Parent of `node`.
92
+ * @returns {Array<HastElementContent> | HastElementContent | undefined}
93
+ * Resulting hast node.
94
+ */
95
+ function one(node, parent) {
96
+ const type = node.type;
97
+ const handle = state.handlers[type];
98
+
99
+ if (own.call(state.handlers, type) && handle) {
100
+ return handle(state, node, parent)
101
+ }
102
+
103
+ if (state.options.passThrough && state.options.passThrough.includes(type)) {
104
+ if ('children' in node) {
105
+ const {children, ...shallow} = node;
106
+ const result = structuredClone(shallow);
107
+ // @ts-expect-error: TS doesn’t understand…
108
+ result.children = state.all(node);
109
+ // @ts-expect-error: TS doesn’t understand…
110
+ return result
111
+ }
112
+
113
+ // @ts-expect-error: it’s custom.
114
+ return structuredClone(node)
115
+ }
116
+
117
+ const unknown = state.options.unknownHandler || defaultUnknownHandler;
118
+
119
+ return unknown(state, node, parent)
120
+ }
121
+
122
+ /**
123
+ * Transform the children of an mdast node into hast nodes.
124
+ *
125
+ * @param {MdastNodes} parent
126
+ * mdast node to compile
127
+ * @returns {Array<HastElementContent>}
128
+ * Resulting hast nodes.
129
+ */
130
+ function all(parent) {
131
+ /** @type {Array<HastElementContent>} */
132
+ const values = [];
133
+
134
+ if ('children' in parent) {
135
+ const nodes = parent.children;
136
+ let index = -1;
137
+ while (++index < nodes.length) {
138
+ const result = state.one(nodes[index], parent);
139
+
140
+ // To do: see if we van clean this? Can we merge texts?
141
+ if (result) {
142
+ if (index && nodes[index - 1].type === 'break') {
143
+ if (!Array.isArray(result) && result.type === 'text') {
144
+ result.value = trimMarkdownSpaceStart(result.value);
145
+ }
146
+
147
+ if (!Array.isArray(result) && result.type === 'element') {
148
+ const head = result.children[0];
149
+
150
+ if (head && head.type === 'text') {
151
+ head.value = trimMarkdownSpaceStart(head.value);
152
+ }
153
+ }
154
+ }
155
+
156
+ if (Array.isArray(result)) {
157
+ values.push(...result);
158
+ } else {
159
+ values.push(result);
160
+ }
161
+ }
162
+ }
163
+ }
164
+
165
+ return values
166
+ }
167
+ }
168
+
169
+ /**
170
+ * Copy a node’s positional info.
171
+ *
172
+ * @param {MdastNodes} from
173
+ * mdast node to copy from.
174
+ * @param {HastNodes} to
175
+ * hast node to copy into.
176
+ * @returns {undefined}
177
+ * Nothing.
178
+ */
179
+ function patch(from, to) {
180
+ if (from.position) to.position = position(from);
181
+ }
182
+
183
+ /**
184
+ * Honor the `data` of `from` and maybe generate an element instead of `to`.
185
+ *
186
+ * @template {HastNodes} Type
187
+ * Node type.
188
+ * @param {MdastNodes} from
189
+ * mdast node to use data from.
190
+ * @param {Type} to
191
+ * hast node to change.
192
+ * @returns {HastElement | Type}
193
+ * Nothing.
194
+ */
195
+ function applyData(from, to) {
196
+ /** @type {HastElement | Type} */
197
+ let result = to;
198
+
199
+ // Handle `data.hName`, `data.hProperties, `data.hChildren`.
200
+ if (from && from.data) {
201
+ const hName = from.data.hName;
202
+ const hChildren = from.data.hChildren;
203
+ const hProperties = from.data.hProperties;
204
+
205
+ if (typeof hName === 'string') {
206
+ // Transforming the node resulted in an element with a different name
207
+ // than wanted:
208
+ if (result.type === 'element') {
209
+ result.tagName = hName;
210
+ }
211
+ // Transforming the node resulted in a non-element, which happens for
212
+ // raw, text, and root nodes (unless custom handlers are passed).
213
+ // The intent of `hName` is to create an element, but likely also to keep
214
+ // the content around (otherwise: pass `hChildren`).
215
+ else {
216
+ /** @type {Array<HastElementContent>} */
217
+ // @ts-expect-error: assume no doctypes in `root`.
218
+ const children = 'children' in result ? result.children : [result];
219
+ result = {type: 'element', tagName: hName, properties: {}, children};
220
+ }
221
+ }
222
+
223
+ if (result.type === 'element' && hProperties) {
224
+ Object.assign(result.properties, structuredClone(hProperties));
225
+ }
226
+
227
+ if (
228
+ 'children' in result &&
229
+ result.children &&
230
+ hChildren !== null &&
231
+ hChildren !== undefined
232
+ ) {
233
+ result.children = hChildren;
234
+ }
235
+ }
236
+
237
+ return result
238
+ }
239
+
240
+ /**
241
+ * Transform an unknown node.
242
+ *
243
+ * @param {State} state
244
+ * Info passed around.
245
+ * @param {MdastNodes} node
246
+ * Unknown mdast node.
247
+ * @returns {HastElement | HastText}
248
+ * Resulting hast node.
249
+ */
250
+ function defaultUnknownHandler(state, node) {
251
+ const data = node.data || {};
252
+ /** @type {HastElement | HastText} */
253
+ const result =
254
+ 'value' in node &&
255
+ !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))
256
+ ? {type: 'text', value: node.value}
257
+ : {
258
+ type: 'element',
259
+ tagName: 'div',
260
+ properties: {},
261
+ children: state.all(node)
262
+ };
263
+
264
+ state.patch(node, result);
265
+ return state.applyData(node, result)
266
+ }
267
+
268
+ /**
269
+ * Wrap `nodes` with line endings between each node.
270
+ *
271
+ * @template {HastRootContent} Type
272
+ * Node type.
273
+ * @param {Array<Type>} nodes
274
+ * List of nodes to wrap.
275
+ * @param {boolean | undefined} [loose=false]
276
+ * Whether to add line endings at start and end (default: `false`).
277
+ * @returns {Array<HastText | Type>}
278
+ * Wrapped nodes.
279
+ */
280
+ function wrap(nodes, loose) {
281
+ /** @type {Array<HastText | Type>} */
282
+ const result = [];
283
+ let index = -1;
284
+
285
+ if (loose) {
286
+ result.push({type: 'text', value: '\n'});
287
+ }
288
+
289
+ while (++index < nodes.length) {
290
+ if (index) result.push({type: 'text', value: '\n'});
291
+ result.push(nodes[index]);
292
+ }
293
+
294
+ if (loose && nodes.length > 0) {
295
+ result.push({type: 'text', value: '\n'});
296
+ }
297
+
298
+ return result
299
+ }
300
+
301
+ /**
302
+ * Trim spaces and tabs at the start of `value`.
303
+ *
304
+ * @param {string} value
305
+ * Value to trim.
306
+ * @returns {string}
307
+ * Result.
308
+ */
309
+ function trimMarkdownSpaceStart(value) {
310
+ let index = 0;
311
+ let code = value.charCodeAt(index);
312
+
313
+ while (code === 9 || code === 32) {
314
+ index++;
315
+ code = value.charCodeAt(index);
316
+ }
317
+
318
+ return value.slice(index)
319
+ }
320
+
321
+ export { createState, wrap };
322
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sources":["../../../../../node_modules/mdast-util-to-hast/lib/state.js"],"sourcesContent":["/**\n * @typedef {import('hast').Element} HastElement\n * @typedef {import('hast').ElementContent} HastElementContent\n * @typedef {import('hast').Nodes} HastNodes\n * @typedef {import('hast').Properties} HastProperties\n * @typedef {import('hast').RootContent} HastRootContent\n * @typedef {import('hast').Text} HastText\n *\n * @typedef {import('mdast').Definition} MdastDefinition\n * @typedef {import('mdast').FootnoteDefinition} MdastFootnoteDefinition\n * @typedef {import('mdast').Nodes} MdastNodes\n * @typedef {import('mdast').Parents} MdastParents\n *\n * @typedef {import('vfile').VFile} VFile\n *\n * @typedef {import('./footer.js').FootnoteBackContentTemplate} FootnoteBackContentTemplate\n * @typedef {import('./footer.js').FootnoteBackLabelTemplate} FootnoteBackLabelTemplate\n */\n\n/**\n * @callback Handler\n * Handle a node.\n * @param {State} state\n * Info passed around.\n * @param {any} node\n * mdast node to handle.\n * @param {MdastParents | undefined} parent\n * Parent of `node`.\n * @returns {Array<HastElementContent> | HastElementContent | undefined}\n * hast node.\n *\n * @typedef {Partial<Record<MdastNodes['type'], Handler>>} Handlers\n * Handle nodes.\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [allowDangerousHtml=false]\n * Whether to persist raw HTML in markdown in the hast tree (default:\n * `false`).\n * @property {string | null | undefined} [clobberPrefix='user-content-']\n * Prefix to use before the `id` property on footnotes to prevent them from\n * *clobbering* (default: `'user-content-'`).\n *\n * Pass `''` for trusted markdown and when you are careful with\n * polyfilling.\n * You could pass a different prefix.\n *\n * DOM clobbering is this:\n *\n * ```html\n * <p id=\"x\"></p>\n * <script>alert(x) // `x` now refers to the `p#x` DOM element</script>\n * ```\n *\n * The above example shows that elements are made available by browsers, by\n * their ID, on the `window` object.\n * This is a security risk because you might be expecting some other variable\n * at that place.\n * It can also break polyfills.\n * Using a prefix solves these problems.\n * @property {VFile | null | undefined} [file]\n * Corresponding virtual file representing the input document (optional).\n * @property {FootnoteBackContentTemplate | string | null | undefined} [footnoteBackContent]\n * Content of the backreference back to references (default: `defaultFootnoteBackContent`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackContent(_, rereferenceIndex) {\n * const result = [{type: 'text', value: '↩'}]\n *\n * if (rereferenceIndex > 1) {\n * result.push({\n * type: 'element',\n * tagName: 'sup',\n * properties: {},\n * children: [{type: 'text', value: String(rereferenceIndex)}]\n * })\n * }\n *\n * return result\n * }\n * ```\n *\n * This content is used in the `a` element of each backreference (the `↩`\n * links).\n * @property {FootnoteBackLabelTemplate | string | null | undefined} [footnoteBackLabel]\n * Label to describe the backreference back to references (default:\n * `defaultFootnoteBackLabel`).\n *\n * The default value is:\n *\n * ```js\n * function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {\n * return (\n * 'Back to reference ' +\n * (referenceIndex + 1) +\n * (rereferenceIndex > 1 ? '-' + rereferenceIndex : '')\n * )\n * }\n * ```\n *\n * Change it when the markdown is not in English.\n *\n * This label is used in the `ariaLabel` property on each backreference\n * (the `↩` links).\n * It affects users of assistive technology.\n * @property {string | null | undefined} [footnoteLabel='Footnotes']\n * Textual label to use for the footnotes section (default: `'Footnotes'`).\n *\n * Change it when the markdown is not in English.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {HastProperties | null | undefined} [footnoteLabelProperties={className: ['sr-only']}]\n * Properties to use on the footnote label (default: `{className:\n * ['sr-only']}`).\n *\n * Change it to show the label and add other properties.\n *\n * This label is typically hidden visually (assuming an `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass an empty string.\n * You can also add different properties.\n *\n * > **Note**: `id: 'footnote-label'` is always added, because footnote\n * > calls use it with `aria-describedby` to provide an accessible label.\n * @property {string | null | undefined} [footnoteLabelTagName='h2']\n * HTML tag name to use for the footnote label element (default: `'h2'`).\n *\n * Change it to match your document structure.\n *\n * This label is typically hidden visually (assuming a `sr-only` CSS class\n * is defined that does that) and so affects screen readers only.\n * If you do have such a class, but want to show this section to everyone,\n * pass different properties with the `footnoteLabelProperties` option.\n * @property {Handlers | null | undefined} [handlers]\n * Extra handlers for nodes (optional).\n * @property {Array<MdastNodes['type']> | null | undefined} [passThrough]\n * List of custom mdast node types to pass through (keep) in hast (note that\n * the node itself is passed, but eventual children are transformed)\n * (optional).\n * @property {Handler | null | undefined} [unknownHandler]\n * Handler for all unknown nodes (optional).\n *\n * @typedef State\n * Info passed around.\n * @property {(node: MdastNodes) => Array<HastElementContent>} all\n * Transform the children of an mdast parent to hast.\n * @property {<Type extends HastNodes>(from: MdastNodes, to: Type) => HastElement | Type} applyData\n * Honor the `data` of `from`, and generate an element instead of `node`.\n * @property {Map<string, MdastDefinition>} definitionById\n * Definitions by their identifier.\n * @property {Map<string, MdastFootnoteDefinition>} footnoteById\n * Footnote definitions by their identifier.\n * @property {Map<string, number>} footnoteCounts\n * Counts for how often the same footnote was called.\n * @property {Array<string>} footnoteOrder\n * Identifiers of order when footnote calls first appear in tree order.\n * @property {Handlers} handlers\n * Applied handlers.\n * @property {(node: MdastNodes, parent: MdastParents | undefined) => Array<HastElementContent> | HastElementContent | undefined} one\n * Transform an mdast node to hast.\n * @property {Options} options\n * Configuration.\n * @property {(from: MdastNodes, node: HastNodes) => undefined} patch\n * Copy a node’s positional info.\n * @property {<Type extends HastRootContent>(nodes: Array<Type>, loose?: boolean | undefined) => Array<HastText | Type>} wrap\n * Wrap `nodes` with line endings between each node, adds initial/final line endings when `loose`.\n */\n\nimport structuredClone from '@ungap/structured-clone'\nimport {visit} from 'unist-util-visit'\nimport {position} from 'unist-util-position'\nimport {handlers as defaultHandlers} from './handlers/index.js'\n\nconst own = {}.hasOwnProperty\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Create `state` from an mdast tree.\n *\n * @param {MdastNodes} tree\n * mdast node to transform.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {State}\n * `state` function.\n */\nexport function createState(tree, options) {\n const settings = options || emptyOptions\n /** @type {Map<string, MdastDefinition>} */\n const definitionById = new Map()\n /** @type {Map<string, MdastFootnoteDefinition>} */\n const footnoteById = new Map()\n /** @type {Map<string, number>} */\n const footnoteCounts = new Map()\n /** @type {Handlers} */\n // @ts-expect-error: the root handler returns a root.\n // Hard to type.\n const handlers = {...defaultHandlers, ...settings.handlers}\n\n /** @type {State} */\n const state = {\n all,\n applyData,\n definitionById,\n footnoteById,\n footnoteCounts,\n footnoteOrder: [],\n handlers,\n one,\n options: settings,\n patch,\n wrap\n }\n\n visit(tree, function (node) {\n if (node.type === 'definition' || node.type === 'footnoteDefinition') {\n const map = node.type === 'definition' ? definitionById : footnoteById\n const id = String(node.identifier).toUpperCase()\n\n // Mimick CM behavior of link definitions.\n // See: <https://github.com/syntax-tree/mdast-util-definitions/blob/9032189/lib/index.js#L20-L21>.\n if (!map.has(id)) {\n // @ts-expect-error: node type matches map.\n map.set(id, node)\n }\n }\n })\n\n return state\n\n /**\n * Transform an mdast node into a hast node.\n *\n * @param {MdastNodes} node\n * mdast node.\n * @param {MdastParents | undefined} [parent]\n * Parent of `node`.\n * @returns {Array<HastElementContent> | HastElementContent | undefined}\n * Resulting hast node.\n */\n function one(node, parent) {\n const type = node.type\n const handle = state.handlers[type]\n\n if (own.call(state.handlers, type) && handle) {\n return handle(state, node, parent)\n }\n\n if (state.options.passThrough && state.options.passThrough.includes(type)) {\n if ('children' in node) {\n const {children, ...shallow} = node\n const result = structuredClone(shallow)\n // @ts-expect-error: TS doesn’t understand…\n result.children = state.all(node)\n // @ts-expect-error: TS doesn’t understand…\n return result\n }\n\n // @ts-expect-error: it’s custom.\n return structuredClone(node)\n }\n\n const unknown = state.options.unknownHandler || defaultUnknownHandler\n\n return unknown(state, node, parent)\n }\n\n /**\n * Transform the children of an mdast node into hast nodes.\n *\n * @param {MdastNodes} parent\n * mdast node to compile\n * @returns {Array<HastElementContent>}\n * Resulting hast nodes.\n */\n function all(parent) {\n /** @type {Array<HastElementContent>} */\n const values = []\n\n if ('children' in parent) {\n const nodes = parent.children\n let index = -1\n while (++index < nodes.length) {\n const result = state.one(nodes[index], parent)\n\n // To do: see if we van clean this? Can we merge texts?\n if (result) {\n if (index && nodes[index - 1].type === 'break') {\n if (!Array.isArray(result) && result.type === 'text') {\n result.value = trimMarkdownSpaceStart(result.value)\n }\n\n if (!Array.isArray(result) && result.type === 'element') {\n const head = result.children[0]\n\n if (head && head.type === 'text') {\n head.value = trimMarkdownSpaceStart(head.value)\n }\n }\n }\n\n if (Array.isArray(result)) {\n values.push(...result)\n } else {\n values.push(result)\n }\n }\n }\n }\n\n return values\n }\n}\n\n/**\n * Copy a node’s positional info.\n *\n * @param {MdastNodes} from\n * mdast node to copy from.\n * @param {HastNodes} to\n * hast node to copy into.\n * @returns {undefined}\n * Nothing.\n */\nfunction patch(from, to) {\n if (from.position) to.position = position(from)\n}\n\n/**\n * Honor the `data` of `from` and maybe generate an element instead of `to`.\n *\n * @template {HastNodes} Type\n * Node type.\n * @param {MdastNodes} from\n * mdast node to use data from.\n * @param {Type} to\n * hast node to change.\n * @returns {HastElement | Type}\n * Nothing.\n */\nfunction applyData(from, to) {\n /** @type {HastElement | Type} */\n let result = to\n\n // Handle `data.hName`, `data.hProperties, `data.hChildren`.\n if (from && from.data) {\n const hName = from.data.hName\n const hChildren = from.data.hChildren\n const hProperties = from.data.hProperties\n\n if (typeof hName === 'string') {\n // Transforming the node resulted in an element with a different name\n // than wanted:\n if (result.type === 'element') {\n result.tagName = hName\n }\n // Transforming the node resulted in a non-element, which happens for\n // raw, text, and root nodes (unless custom handlers are passed).\n // The intent of `hName` is to create an element, but likely also to keep\n // the content around (otherwise: pass `hChildren`).\n else {\n /** @type {Array<HastElementContent>} */\n // @ts-expect-error: assume no doctypes in `root`.\n const children = 'children' in result ? result.children : [result]\n result = {type: 'element', tagName: hName, properties: {}, children}\n }\n }\n\n if (result.type === 'element' && hProperties) {\n Object.assign(result.properties, structuredClone(hProperties))\n }\n\n if (\n 'children' in result &&\n result.children &&\n hChildren !== null &&\n hChildren !== undefined\n ) {\n result.children = hChildren\n }\n }\n\n return result\n}\n\n/**\n * Transform an unknown node.\n *\n * @param {State} state\n * Info passed around.\n * @param {MdastNodes} node\n * Unknown mdast node.\n * @returns {HastElement | HastText}\n * Resulting hast node.\n */\nfunction defaultUnknownHandler(state, node) {\n const data = node.data || {}\n /** @type {HastElement | HastText} */\n const result =\n 'value' in node &&\n !(own.call(data, 'hProperties') || own.call(data, 'hChildren'))\n ? {type: 'text', value: node.value}\n : {\n type: 'element',\n tagName: 'div',\n properties: {},\n children: state.all(node)\n }\n\n state.patch(node, result)\n return state.applyData(node, result)\n}\n\n/**\n * Wrap `nodes` with line endings between each node.\n *\n * @template {HastRootContent} Type\n * Node type.\n * @param {Array<Type>} nodes\n * List of nodes to wrap.\n * @param {boolean | undefined} [loose=false]\n * Whether to add line endings at start and end (default: `false`).\n * @returns {Array<HastText | Type>}\n * Wrapped nodes.\n */\nexport function wrap(nodes, loose) {\n /** @type {Array<HastText | Type>} */\n const result = []\n let index = -1\n\n if (loose) {\n result.push({type: 'text', value: '\\n'})\n }\n\n while (++index < nodes.length) {\n if (index) result.push({type: 'text', value: '\\n'})\n result.push(nodes[index])\n }\n\n if (loose && nodes.length > 0) {\n result.push({type: 'text', value: '\\n'})\n }\n\n return result\n}\n\n/**\n * Trim spaces and tabs at the start of `value`.\n *\n * @param {string} value\n * Value to trim.\n * @returns {string}\n * Result.\n */\nfunction trimMarkdownSpaceStart(value) {\n let index = 0\n let code = value.charCodeAt(index)\n\n while (code === 9 || code === 32) {\n index++\n code = value.charCodeAt(index)\n }\n\n return value.slice(index)\n}\n"],"names":["handlers","defaultHandlers"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAkKA,MAAM,GAAG,GAAG,EAAE,CAAC;;AAEf;AACA,MAAM,YAAY,GAAG;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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KAAK,CAAC,UAAU,CAAC,KAAK;;AAEnC,EAAE,OAAO,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,EAAE,EAAE;AACpC,IAAI,KAAK;AACT,IAAI,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK;AACjC;;AAEA,EAAE,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK;AAC1B;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,111 @@
1
+ /**
2
+ * @typedef {import('mdast').Nodes} Nodes
3
+ *
4
+ * @typedef Options
5
+ * Configuration (optional).
6
+ * @property {boolean | null | undefined} [includeImageAlt=true]
7
+ * Whether to use `alt` for `image`s (default: `true`).
8
+ * @property {boolean | null | undefined} [includeHtml=true]
9
+ * Whether to use `value` of HTML (default: `true`).
10
+ */
11
+
12
+ /** @type {Options} */
13
+ const emptyOptions = {};
14
+
15
+ /**
16
+ * Get the text content of a node or list of nodes.
17
+ *
18
+ * Prefers the node’s plain-text fields, otherwise serializes its children,
19
+ * and if the given value is an array, serialize the nodes in it.
20
+ *
21
+ * @param {unknown} [value]
22
+ * Thing to serialize, typically `Node`.
23
+ * @param {Options | null | undefined} [options]
24
+ * Configuration (optional).
25
+ * @returns {string}
26
+ * Serialized `value`.
27
+ */
28
+ function toString(value, options) {
29
+ const settings = emptyOptions;
30
+ const includeImageAlt =
31
+ typeof settings.includeImageAlt === 'boolean'
32
+ ? settings.includeImageAlt
33
+ : true;
34
+ const includeHtml =
35
+ typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true;
36
+
37
+ return one(value, includeImageAlt, includeHtml)
38
+ }
39
+
40
+ /**
41
+ * One node or several nodes.
42
+ *
43
+ * @param {unknown} value
44
+ * Thing to serialize.
45
+ * @param {boolean} includeImageAlt
46
+ * Include image `alt`s.
47
+ * @param {boolean} includeHtml
48
+ * Include HTML.
49
+ * @returns {string}
50
+ * Serialized node.
51
+ */
52
+ function one(value, includeImageAlt, includeHtml) {
53
+ if (node(value)) {
54
+ if ('value' in value) {
55
+ return value.type === 'html' && !includeHtml ? '' : value.value
56
+ }
57
+
58
+ if (includeImageAlt && 'alt' in value && value.alt) {
59
+ return value.alt
60
+ }
61
+
62
+ if ('children' in value) {
63
+ return all(value.children, includeImageAlt, includeHtml)
64
+ }
65
+ }
66
+
67
+ if (Array.isArray(value)) {
68
+ return all(value, includeImageAlt, includeHtml)
69
+ }
70
+
71
+ return ''
72
+ }
73
+
74
+ /**
75
+ * Serialize a list of nodes.
76
+ *
77
+ * @param {Array<unknown>} values
78
+ * Thing to serialize.
79
+ * @param {boolean} includeImageAlt
80
+ * Include image `alt`s.
81
+ * @param {boolean} includeHtml
82
+ * Include HTML.
83
+ * @returns {string}
84
+ * Serialized nodes.
85
+ */
86
+ function all(values, includeImageAlt, includeHtml) {
87
+ /** @type {Array<string>} */
88
+ const result = [];
89
+ let index = -1;
90
+
91
+ while (++index < values.length) {
92
+ result[index] = one(values[index], includeImageAlt, includeHtml);
93
+ }
94
+
95
+ return result.join('')
96
+ }
97
+
98
+ /**
99
+ * Check if `value` looks like a node.
100
+ *
101
+ * @param {unknown} value
102
+ * Thing.
103
+ * @returns {value is Nodes}
104
+ * Whether `value` is a node.
105
+ */
106
+ function node(value) {
107
+ return Boolean(value && typeof value === 'object')
108
+ }
109
+
110
+ export { toString };
111
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../node_modules/mdast-util-to-string/lib/index.js"],"sourcesContent":["/**\n * @typedef {import('mdast').Nodes} Nodes\n *\n * @typedef Options\n * Configuration (optional).\n * @property {boolean | null | undefined} [includeImageAlt=true]\n * Whether to use `alt` for `image`s (default: `true`).\n * @property {boolean | null | undefined} [includeHtml=true]\n * Whether to use `value` of HTML (default: `true`).\n */\n\n/** @type {Options} */\nconst emptyOptions = {}\n\n/**\n * Get the text content of a node or list of nodes.\n *\n * Prefers the node’s plain-text fields, otherwise serializes its children,\n * and if the given value is an array, serialize the nodes in it.\n *\n * @param {unknown} [value]\n * Thing to serialize, typically `Node`.\n * @param {Options | null | undefined} [options]\n * Configuration (optional).\n * @returns {string}\n * Serialized `value`.\n */\nexport function toString(value, options) {\n const settings = options || emptyOptions\n const includeImageAlt =\n typeof settings.includeImageAlt === 'boolean'\n ? settings.includeImageAlt\n : true\n const includeHtml =\n typeof settings.includeHtml === 'boolean' ? settings.includeHtml : true\n\n return one(value, includeImageAlt, includeHtml)\n}\n\n/**\n * One node or several nodes.\n *\n * @param {unknown} value\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized node.\n */\nfunction one(value, includeImageAlt, includeHtml) {\n if (node(value)) {\n if ('value' in value) {\n return value.type === 'html' && !includeHtml ? '' : value.value\n }\n\n if (includeImageAlt && 'alt' in value && value.alt) {\n return value.alt\n }\n\n if ('children' in value) {\n return all(value.children, includeImageAlt, includeHtml)\n }\n }\n\n if (Array.isArray(value)) {\n return all(value, includeImageAlt, includeHtml)\n }\n\n return ''\n}\n\n/**\n * Serialize a list of nodes.\n *\n * @param {Array<unknown>} values\n * Thing to serialize.\n * @param {boolean} includeImageAlt\n * Include image `alt`s.\n * @param {boolean} includeHtml\n * Include HTML.\n * @returns {string}\n * Serialized nodes.\n */\nfunction all(values, includeImageAlt, includeHtml) {\n /** @type {Array<string>} */\n const result = []\n let index = -1\n\n while (++index < values.length) {\n result[index] = one(values[index], includeImageAlt, includeHtml)\n }\n\n return result.join('')\n}\n\n/**\n * Check if `value` looks like a node.\n *\n * @param {unknown} value\n * Thing.\n * @returns {value is Nodes}\n * Whether `value` is a node.\n */\nfunction node(value) {\n return Boolean(value && typeof value === 'object')\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM,YAAY,GAAG;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,QA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AK,GAAG;;AAEd,EAAE,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE;AAClC,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,eAAe,EAAE,WAAW;AACnE;;AAEA,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE;AACvB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,IAAI,CAAC,KAAK,EAAE;AACrB,EAAE,OAAO,OAAO,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;AACnD;;;;","x_google_ignoreList":[0]}
@@ -0,0 +1,108 @@
1
+ import { resolver } from './initialize/text.js';
2
+ import { blockQuote } from '../../micromark-core-commonmark/lib/block-quote.js';
3
+ import { list } from '../../micromark-core-commonmark/lib/list.js';
4
+ import { definition } from '../../micromark-core-commonmark/lib/definition.js';
5
+ import { codeIndented } from '../../micromark-core-commonmark/lib/code-indented.js';
6
+ import { codeFenced } from '../../micromark-core-commonmark/lib/code-fenced.js';
7
+ import { thematicBreak } from '../../micromark-core-commonmark/lib/thematic-break.js';
8
+ import { setextUnderline } from '../../micromark-core-commonmark/lib/setext-underline.js';
9
+ import { htmlFlow } from '../../micromark-core-commonmark/lib/html-flow.js';
10
+ import { headingAtx } from '../../micromark-core-commonmark/lib/heading-atx.js';
11
+ import { characterEscape } from '../../micromark-core-commonmark/lib/character-escape.js';
12
+ import { characterReference } from '../../micromark-core-commonmark/lib/character-reference.js';
13
+ import { codeText } from '../../micromark-core-commonmark/lib/code-text.js';
14
+ import { attention } from '../../micromark-core-commonmark/lib/attention.js';
15
+ import { labelEnd } from '../../micromark-core-commonmark/lib/label-end.js';
16
+ import { hardBreakEscape } from '../../micromark-core-commonmark/lib/hard-break-escape.js';
17
+ import { labelStartLink } from '../../micromark-core-commonmark/lib/label-start-link.js';
18
+ import { autolink } from '../../micromark-core-commonmark/lib/autolink.js';
19
+ import { htmlText } from '../../micromark-core-commonmark/lib/html-text.js';
20
+ import { labelStartImage } from '../../micromark-core-commonmark/lib/label-start-image.js';
21
+ import { lineEnding } from '../../micromark-core-commonmark/lib/line-ending.js';
22
+
23
+ /**
24
+ * @import {Extension} from 'micromark-util-types'
25
+ */
26
+
27
+
28
+ /** @satisfies {Extension['document']} */
29
+ const document = {
30
+ [42]: list,
31
+ [43]: list,
32
+ [45]: list,
33
+ [48]: list,
34
+ [49]: list,
35
+ [50]: list,
36
+ [51]: list,
37
+ [52]: list,
38
+ [53]: list,
39
+ [54]: list,
40
+ [55]: list,
41
+ [56]: list,
42
+ [57]: list,
43
+ [62]: blockQuote
44
+ };
45
+
46
+ /** @satisfies {Extension['contentInitial']} */
47
+ const contentInitial = {
48
+ [91]: definition
49
+ };
50
+
51
+ /** @satisfies {Extension['flowInitial']} */
52
+ const flowInitial = {
53
+ [-2]: codeIndented,
54
+ [-1]: codeIndented,
55
+ [32]: codeIndented
56
+ };
57
+
58
+ /** @satisfies {Extension['flow']} */
59
+ const flow = {
60
+ [35]: headingAtx,
61
+ [42]: thematicBreak,
62
+ [45]: [setextUnderline, thematicBreak],
63
+ [60]: htmlFlow,
64
+ [61]: setextUnderline,
65
+ [95]: thematicBreak,
66
+ [96]: codeFenced,
67
+ [126]: codeFenced
68
+ };
69
+
70
+ /** @satisfies {Extension['string']} */
71
+ const string = {
72
+ [38]: characterReference,
73
+ [92]: characterEscape
74
+ };
75
+
76
+ /** @satisfies {Extension['text']} */
77
+ const text = {
78
+ [-5]: lineEnding,
79
+ [-4]: lineEnding,
80
+ [-3]: lineEnding,
81
+ [33]: labelStartImage,
82
+ [38]: characterReference,
83
+ [42]: attention,
84
+ [60]: [autolink, htmlText],
85
+ [91]: labelStartLink,
86
+ [92]: [hardBreakEscape, characterEscape],
87
+ [93]: labelEnd,
88
+ [95]: attention,
89
+ [96]: codeText
90
+ };
91
+
92
+ /** @satisfies {Extension['insideSpan']} */
93
+ const insideSpan = {
94
+ null: [attention, resolver]
95
+ };
96
+
97
+ /** @satisfies {Extension['attentionMarkers']} */
98
+ const attentionMarkers = {
99
+ null: [42, 95]
100
+ };
101
+
102
+ /** @satisfies {Extension['disable']} */
103
+ const disable = {
104
+ null: []
105
+ };
106
+
107
+ export { attentionMarkers, contentInitial, disable, document, flow, flowInitial, insideSpan, string, text };
108
+ //# sourceMappingURL=constructs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constructs.js","sources":["../../../../../node_modules/micromark/lib/constructs.js"],"sourcesContent":["/**\n * @import {Extension} from 'micromark-util-types'\n */\n\nimport { attention, autolink, blockQuote, characterEscape, characterReference, codeFenced, codeIndented, codeText, definition, hardBreakEscape, headingAtx, htmlFlow, htmlText, labelEnd, labelStartImage, labelStartLink, lineEnding, list, setextUnderline, thematicBreak } from 'micromark-core-commonmark';\nimport { resolver as resolveText } from './initialize/text.js';\n\n/** @satisfies {Extension['document']} */\nexport const document = {\n [42]: list,\n [43]: list,\n [45]: list,\n [48]: list,\n [49]: list,\n [50]: list,\n [51]: list,\n [52]: list,\n [53]: list,\n [54]: list,\n [55]: list,\n [56]: list,\n [57]: list,\n [62]: blockQuote\n};\n\n/** @satisfies {Extension['contentInitial']} */\nexport const contentInitial = {\n [91]: definition\n};\n\n/** @satisfies {Extension['flowInitial']} */\nexport const flowInitial = {\n [-2]: codeIndented,\n [-1]: codeIndented,\n [32]: codeIndented\n};\n\n/** @satisfies {Extension['flow']} */\nexport const flow = {\n [35]: headingAtx,\n [42]: thematicBreak,\n [45]: [setextUnderline, thematicBreak],\n [60]: htmlFlow,\n [61]: setextUnderline,\n [95]: thematicBreak,\n [96]: codeFenced,\n [126]: codeFenced\n};\n\n/** @satisfies {Extension['string']} */\nexport const string = {\n [38]: characterReference,\n [92]: characterEscape\n};\n\n/** @satisfies {Extension['text']} */\nexport const text = {\n [-5]: lineEnding,\n [-4]: lineEnding,\n [-3]: lineEnding,\n [33]: labelStartImage,\n [38]: characterReference,\n [42]: attention,\n [60]: [autolink, htmlText],\n [91]: labelStartLink,\n [92]: [hardBreakEscape, characterEscape],\n [93]: labelEnd,\n [95]: attention,\n [96]: codeText\n};\n\n/** @satisfies {Extension['insideSpan']} */\nexport const insideSpan = {\n null: [attention, resolveText]\n};\n\n/** @satisfies {Extension['attentionMarkers']} */\nexport const attentionMarkers = {\n null: [42, 95]\n};\n\n/** @satisfies {Extension['disable']} */\nexport const disable = {\n null: []\n};"],"names":["resolveText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;;;AAKA;AACY,MAAC,QAAQ,GAAG;AACxB,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG,IAAI;AACZ,EAAE,CAAC,EAAE,GAAG;AACR;;AAEA;AACY,MAAC,cAAc,GAAG;AAC9B,EAAE,CAAC,EAAE,GAAG;AACR;;AAEA;AACY,MAAC,WAAW,GAAG;AAC3B,EAAE,CAAC,EAAE,GAAG,YAAY;AACpB,EAAE,CAAC,EAAE,GAAG,YAAY;AACpB,EAAE,CAAC,EAAE,GAAG;AACR;;AAEA;AACY,MAAC,IAAI,GAAG;AACpB,EAAE,CAAC,EAAE,GAAG,UAAU;AAClB,EAAE,CAAC,EAAE,GAAG,aAAa;AACrB,EAAE,CAAC,EAAE,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC;AACxC,EAA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