reactive-md 0.9.3 → 0.10.0

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 (299) hide show
  1. package/CHANGELOG-ch.md +34 -0
  2. package/CHANGELOG.md +34 -0
  3. package/README-ch.md +7 -7
  4. package/README-en.md +7 -7
  5. package/README.md +7 -7
  6. package/THIRD_PARTY_NOTICES.md +0 -57
  7. package/cli/help.mjs +6 -4
  8. package/cli/init.mjs +1 -1
  9. package/cli/migrate.mjs +1 -1
  10. package/dist-library/{LocalDocumentView-D6zQkTkt.js → LocalDocumentView-CP2QG86k.js} +46 -44
  11. package/dist-library/{LocalDocumentViewCore-CmJhemcA.js → LocalDocumentViewCore-Cd6yMEkg.js} +284 -265
  12. package/dist-library/{LocalReactiveDocumentCore-lAKOGAZ7.js → LocalReactiveDocumentCore-VuYpZqdn.js} +7 -7
  13. package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
  14. package/dist-library/authoring-Bwu_zCWs.js +768 -0
  15. package/dist-library/choice-values-BItGjPD2.js +58 -0
  16. package/dist-library/compile-B35rfzKr.js +1742 -0
  17. package/dist-library/{compile-cache-key-6GgpETz_.js → compile-cache-key-D21X2Obx.js} +5 -5
  18. package/dist-library/{compiler-DLkKUK4t.js → compiler-DBwLawMZ.js} +4 -4
  19. package/dist-library/{compiler-core-Niqhp9wV.js → compiler-core-kkDiQ1RK.js} +3146 -2055
  20. package/dist-library/{component-kernel-IG4wOO0i.js → component-kernel-CsJSabHX.js} +42 -26
  21. package/dist-library/{component-state-Ht-hOK0W.js → component-state-Da0G8Ajc.js} +1 -1
  22. package/dist-library/{component-utils-eSj5IdG4.js → component-utils-ZM3jUJNy.js} +80 -79
  23. package/dist-library/conditional-branches-CIhJXasR.js +17 -0
  24. package/dist-library/{config-validation-Cpol91_M.js → config-validation-DbmsWAEV.js} +165 -152
  25. package/dist-library/{controls-B-CLSK8Q.js → controls-DRy5rzzN.js} +271 -228
  26. package/dist-library/{coordinate-PyLPMIQK.js → coordinate-c54pHfgf.js} +29 -29
  27. package/dist-library/data-table-CSAkm1eU.js +290 -0
  28. package/dist-library/data-table-model-DruztQFt.js +391 -0
  29. package/dist-library/{data-visuals-_Z7QqYTk.js → data-visuals-rZQUeQM0.js} +14 -14
  30. package/dist-library/{default-components-jugH7Ubr.js → default-components-B-39etG9.js} +233 -71
  31. package/dist-library/{default-config-DIrRpuQz.js → default-config-CCa8rm2k.js} +236 -216
  32. package/dist-library/default-options-By16CVw1.js +131 -0
  33. package/dist-library/{default-registry-BlloaZi7.js → default-registry-DXJy66xj.js} +3 -3
  34. package/dist-library/{default-schema-Ch-Vznpm.js → default-schema-CeYiEW1K.js} +3 -3
  35. package/dist-library/display-Bb6hAG5T.js +2065 -0
  36. package/dist-library/{document-theme-DBAfnk7y.js → document-theme-CJvN-nC1.js} +190 -3
  37. package/dist-library/{export-heVBqgxA.js → export-BSV4E0jv.js} +105 -106
  38. package/dist-library/font-aliases-CKYjwn4o.js +4 -0
  39. package/dist-library/{gallery-Q6VPS2ep.js → gallery-DM2yTVZJ.js} +1 -1
  40. package/dist-library/{html-CCnvzan1.js → html-CY9mC3Sr.js} +5 -5
  41. package/dist-library/{incremental-Bzvh8_lB.js → incremental-B-wW4H3F.js} +251 -245
  42. package/dist-library/{display-y4v9v0Qd.js → katex-4ukd4ZxT.js} +1555 -3618
  43. package/dist-library/layout-CPQggKxk.js +592 -0
  44. package/dist-library/{layout-BnfDeUNy.js → layout-CaDWsDof.js} +1 -1
  45. package/dist-library/{math-view-B0jthpRw.js → math-view-CyGTS6kv.js} +1 -1
  46. package/dist-library/{mount-preset-C_i37FvY.js → mount-preset-DtrCX4G8.js} +4 -4
  47. package/dist-library/{numeric-sliders-CkWS0-ja.js → numeric-sliders-BmJ1LCLx.js} +190 -190
  48. package/dist-library/{observability-CYLuvFfL.js → observability-BVQ16ByQ.js} +5 -4
  49. package/dist-library/{package-core-9UK5ZdqB.js → package-core-Cu_r_qs7.js} +7 -6
  50. package/dist-library/{parser-9yNJxGip.js → parser-BHl9Lxbw.js} +2 -2
  51. package/dist-library/{parser-standard-BPIy4HOu.js → parser-standard-DDAKv_DZ.js} +247 -247
  52. package/dist-library/{plugin-packs-CZb46nuv.js → plugin-packs-CkI0floL.js} +3 -3
  53. package/dist-library/{preset-core-BW3NWZJ9.js → preset-core-BKPbH_Nv.js} +377 -306
  54. package/dist-library/{props-pJRrfDc6.js → props-0iDqxlTk.js} +56 -61
  55. package/dist-library/{react-BSo0o998.js → react-74jdGBmu.js} +2 -2
  56. package/dist-library/reactive-md-authoring.js +277 -269
  57. package/dist-library/reactive-md-build.js +327 -33
  58. package/dist-library/reactive-md-compiler-session.js +3 -3
  59. package/dist-library/reactive-md-compiler-standard.js +10 -10
  60. package/dist-library/reactive-md-compiler.js +3 -3
  61. package/dist-library/reactive-md-contracts.js +4 -4
  62. package/dist-library/reactive-md-default-packs.js +4 -3
  63. package/dist-library/reactive-md-default-preset.js +3 -3
  64. package/dist-library/reactive-md-export.js +6 -6
  65. package/dist-library/reactive-md-minimal-preset.js +3 -2
  66. package/dist-library/reactive-md-minimal-react-preset.js +18 -17
  67. package/dist-library/reactive-md-minimal.css +1 -1
  68. package/dist-library/reactive-md-observability.js +2 -2
  69. package/dist-library/reactive-md-pack-style-manifest.js +8 -0
  70. package/dist-library/reactive-md-plugin-chart.js +13 -9
  71. package/dist-library/reactive-md-plugin-data.js +4 -4
  72. package/dist-library/reactive-md-plugin-diagram.js +3 -3
  73. package/dist-library/reactive-md-plugin-forms.js +5 -5
  74. package/dist-library/reactive-md-plugin-gallery.js +3 -3
  75. package/dist-library/reactive-md-plugin-navigation.js +10 -10
  76. package/dist-library/reactive-md-plugin-network.js +5 -5
  77. package/dist-library/reactive-md-plugin-plot.js +4 -4
  78. package/dist-library/reactive-md-react-component-accordion.js +3 -3
  79. package/dist-library/reactive-md-react-component-alert.js +3 -3
  80. package/dist-library/reactive-md-react-component-anchor.js +3 -3
  81. package/dist-library/reactive-md-react-component-badge.js +3 -3
  82. package/dist-library/reactive-md-react-component-card.js +3 -3
  83. package/dist-library/reactive-md-react-component-chart.js +2 -2
  84. package/dist-library/reactive-md-react-component-checkbox.js +2 -2
  85. package/dist-library/reactive-md-react-component-checklist.js +2 -2
  86. package/dist-library/reactive-md-react-component-choices.js +2 -2
  87. package/dist-library/reactive-md-react-component-column.js +1 -1
  88. package/dist-library/reactive-md-react-component-coordinate.js +2 -2
  89. package/dist-library/reactive-md-react-component-counter.js +2 -2
  90. package/dist-library/reactive-md-react-component-data-table.js +2 -2
  91. package/dist-library/reactive-md-react-component-date.js +2 -2
  92. package/dist-library/reactive-md-react-component-diagram.js +2 -2
  93. package/dist-library/reactive-md-react-component-disclosure.js +3 -3
  94. package/dist-library/reactive-md-react-component-edge.js +1 -1
  95. package/dist-library/reactive-md-react-component-else.js +10 -0
  96. package/dist-library/reactive-md-react-component-gallery-item.js +2 -2
  97. package/dist-library/reactive-md-react-component-gallery.js +2 -2
  98. package/dist-library/reactive-md-react-component-grid.js +3 -3
  99. package/dist-library/reactive-md-react-component-if.js +3 -3
  100. package/dist-library/reactive-md-react-component-input.js +2 -2
  101. package/dist-library/reactive-md-react-component-jump.js +3 -3
  102. package/dist-library/reactive-md-react-component-multi-select.js +2 -2
  103. package/dist-library/reactive-md-react-component-node.js +2 -2
  104. package/dist-library/reactive-md-react-component-number.js +2 -2
  105. package/dist-library/reactive-md-react-component-option.js +1 -1
  106. package/dist-library/reactive-md-react-component-panel.js +3 -3
  107. package/dist-library/reactive-md-react-component-plot.js +2 -2
  108. package/dist-library/reactive-md-react-component-progress.js +2 -2
  109. package/dist-library/reactive-md-react-component-quiz.js +2 -2
  110. package/dist-library/reactive-md-react-component-radio-group.js +2 -2
  111. package/dist-library/reactive-md-react-component-range-slider.js +2 -2
  112. package/dist-library/reactive-md-react-component-section.js +3 -3
  113. package/dist-library/reactive-md-react-component-select.js +2 -2
  114. package/dist-library/reactive-md-react-component-slider.js +2 -2
  115. package/dist-library/reactive-md-react-component-step.js +3 -3
  116. package/dist-library/reactive-md-react-component-steps.js +3 -3
  117. package/dist-library/reactive-md-react-component-tab.js +3 -3
  118. package/dist-library/reactive-md-react-component-table.js +2 -2
  119. package/dist-library/reactive-md-react-component-tabs.js +3 -3
  120. package/dist-library/reactive-md-react-component-text.js +3 -3
  121. package/dist-library/reactive-md-react-component-textarea.js +2 -2
  122. package/dist-library/reactive-md-react-component-timeline.js +2 -2
  123. package/dist-library/reactive-md-react-component-timer.js +2 -2
  124. package/dist-library/reactive-md-react-component-toggle.js +2 -2
  125. package/dist-library/reactive-md-react-component-tooltip.js +3 -3
  126. package/dist-library/reactive-md-react-component-validation.js +3 -3
  127. package/dist-library/reactive-md-react-minimal.js +4 -4
  128. package/dist-library/reactive-md-react-pack-controls.js +4 -4
  129. package/dist-library/reactive-md-react-pack-data.js +3 -3
  130. package/dist-library/reactive-md-react-pack-layout.js +25 -24
  131. package/dist-library/reactive-md-react-pack-visuals.js +2 -2
  132. package/dist-library/reactive-md-react-packed.js +6 -6
  133. package/dist-library/reactive-md-react-server.js +37 -36
  134. package/dist-library/reactive-md-react-static-server.js +2 -2
  135. package/dist-library/reactive-md-react-static.js +1 -1
  136. package/dist-library/reactive-md-react-unstyled.js +12 -12
  137. package/dist-library/reactive-md-react.js +12 -12
  138. package/dist-library/reactive-md-scan.js +1 -1
  139. package/dist-library/reactive-md-sdk.js +23 -9
  140. package/dist-library/reactive-md-standalone-configured.js +2 -2
  141. package/dist-library/reactive-md-standalone-host.js +2 -2
  142. package/dist-library/reactive-md-testing-browser.js +2 -2
  143. package/dist-library/reactive-md-testing-react.js +6 -6
  144. package/dist-library/reactive-md-testing.js +6 -6
  145. package/dist-library/reactive-md-vite.js +25 -9
  146. package/dist-library/reactive-md-worker-pool.js +3 -3
  147. package/dist-library/reactive-md.css +1 -1
  148. package/dist-library/reactive-md.js +52 -43
  149. package/dist-library/{registry-core-CziAIP5P.js → registry-core-DxEaxhJ6.js} +3 -2
  150. package/dist-library/{render-nodes-DKjg_TR1.js → render-nodes-B6j6Ip5I.js} +766 -731
  151. package/dist-library/{requirements-DhIkxAbl.js → requirements-C56sFIEs.js} +2 -2
  152. package/dist-library/{resources-B_nbROgj.js → resources-6VaNgk-h.js} +2 -2
  153. package/dist-library/rmd-pack-layout.css +9 -0
  154. package/dist-library/rmd-pack-resource-layout.css +9 -0
  155. package/dist-library/runtime-BHeuLOv_.js +1369 -0
  156. package/dist-library/{runtime-requirement-C4-vNcf5.js → runtime-requirement-DzPO8raU.js} +166 -163
  157. package/dist-library/{schema-core-4sd1Vu7V.js → schema-core-CDXfxdID.js} +24 -1
  158. package/dist-library/{sdk-core-BLsW9cCy.js → sdk-core-CnE-n0Z7.js} +469 -314
  159. package/dist-library/{session-core-DLBRPV7f.js → session-core-C071yQwV.js} +140 -127
  160. package/dist-library/{validation-XXlb-spV.js → sha256-utf16-Bmandi_H.js} +392 -315
  161. package/dist-library/shareable-CHCDnl6j.js +844 -0
  162. package/dist-library/types/authoring/catalog.d.ts +3 -1
  163. package/dist-library/types/authoring/index.d.ts +1 -1
  164. package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
  165. package/dist-library/types/components/chart/default-chart.d.ts +7 -0
  166. package/dist-library/types/components/entries/else.d.ts +3 -0
  167. package/dist-library/types/components/layout/layout.d.ts +5 -0
  168. package/dist-library/types/components/shared/visuals.d.ts +1 -1
  169. package/dist-library/types/components/table/data-table-model.d.ts +95 -2
  170. package/dist-library/types/components/table/data-table.d.ts +2 -2
  171. package/dist-library/types/contracts/component-kernel.d.ts +5 -0
  172. package/dist-library/types/contracts/font-aliases.d.ts +18 -0
  173. package/dist-library/types/contracts/number-literal.d.ts +2 -0
  174. package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
  175. package/dist-library/types/export/index.d.ts +4 -1
  176. package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
  177. package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
  178. package/dist-library/types/local/compilation/compiler-expressions.d.ts +12 -1
  179. package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
  180. package/dist-library/types/local/compilation/compiler-structure.d.ts +8 -2
  181. package/dist-library/types/local/compilation/compiler-tables.d.ts +1 -0
  182. package/dist-library/types/local/compilation/compiler-validation.d.ts +11 -0
  183. package/dist-library/types/local/compilation/compiler-values.d.ts +1 -2
  184. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +173 -2
  185. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
  186. package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
  187. package/dist-library/types/local/evaluation/computations.d.ts +13 -5
  188. package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
  189. package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
  190. package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
  191. package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
  192. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
  193. package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
  194. package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
  195. package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
  196. package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
  197. package/dist-library/types/local/evaluation/validation.d.ts +8 -6
  198. package/dist-library/types/local/index.d.ts +4 -3
  199. package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
  200. package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
  201. package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
  202. package/dist-library/types/local/runtime/runtime.d.ts +3 -1
  203. package/dist-library/types/local/runtime/state.d.ts +30 -15
  204. package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
  205. package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
  206. package/dist-library/types/local/source/authoring.d.ts +10 -0
  207. package/dist-library/types/local/source/source-migration.d.ts +1 -0
  208. package/dist-library/types/local/types.d.ts +33 -2
  209. package/dist-library/types/react/component-api.d.ts +21 -2
  210. package/dist-library/types/react/component-utils.d.ts +11 -0
  211. package/dist-library/types/react/font-aliases.d.ts +2 -0
  212. package/dist-library/types/react/package-core.d.ts +3 -0
  213. package/dist-library/types/react/rendering/document/validation-state.d.ts +1 -1
  214. package/dist-library/types/react/rendering/document/view-revision.d.ts +3 -12
  215. package/dist-library/types/react/rendering/table/data-table.d.ts +1 -1
  216. package/dist-library/types/react/sdk-core.d.ts +3 -1
  217. package/dist-library/types/sdk/assembly.d.ts +3 -0
  218. package/dist-library/types/sdk/font.d.ts +13 -0
  219. package/dist-library/types/sdk/index.d.ts +1 -0
  220. package/dist-library/types/sdk/theme.d.ts +5 -0
  221. package/dist-library/types/sdk/types.d.ts +6 -0
  222. package/dist-library/types/sdk/version.d.ts +1 -1
  223. package/dist-library/types/shareable.d.ts +15 -3
  224. package/dist-library/types/standalone/prepare.d.ts +4 -2
  225. package/dist-library/types/standalone/session-core.d.ts +4 -1
  226. package/dist-library/types/vite/index.d.ts +3 -0
  227. package/dist-library/types/vite/registration.d.ts +1 -0
  228. package/dist-library/{types-Bza88SGK.js → types-B4qG8J4S.js} +1 -1
  229. package/dist-library/types-FYhRWRn9.js +3 -0
  230. package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
  231. package/dist-library/validation-DRuW0Wl9.js +433 -0
  232. package/dist-library/{version-B0G1699c.js → version-4wzhbvDG.js} +1 -1
  233. package/dist-library/{visual-helpers-CRmaqCHX.js → visual-helpers-UU6xiL8g.js} +3 -3
  234. package/dist-library/visuals-7xzoL9ql.js +49340 -0
  235. package/dist-library/{worker-D6WMV8xJ.js → worker-3ldRjOEG.js} +9 -9
  236. package/dist-standalone/reactive-md-standalone.css +1 -1
  237. package/dist-standalone/reactive-md-standalone.js +128 -368
  238. package/docs/README-ch.md +3 -1
  239. package/docs/README.md +3 -1
  240. package/docs/compatibility/api-stability-ch.md +1 -1
  241. package/docs/compatibility/api-stability-en.md +1 -1
  242. package/docs/compatibility/compatibility-ch.md +15 -15
  243. package/docs/compatibility/compatibility-en.md +15 -15
  244. package/docs/compatibility/compatibility-manifest.schema.json +3 -2
  245. package/docs/compatibility/deprecation-ch.md +2 -2
  246. package/docs/compatibility/deprecation-en.md +2 -2
  247. package/docs/compatibility/source-versioning-ch.md +22 -14
  248. package/docs/compatibility/source-versioning-en.md +22 -13
  249. package/docs/compatibility/support-matrix-ch.md +4 -3
  250. package/docs/compatibility/support-matrix-en.md +4 -3
  251. package/docs/development/component-development-ch.md +2 -2
  252. package/docs/development/component-development-en.md +2 -2
  253. package/docs/development/component-protocol-ch.md +18 -18
  254. package/docs/development/component-protocol-en.md +14 -14
  255. package/docs/guides/local-guide-ch.md +109 -20
  256. package/docs/guides/local-guide-en.md +109 -20
  257. package/docs/integration/author-tools-ch.md +1 -1
  258. package/docs/integration/author-tools-en.md +1 -1
  259. package/docs/integration/editor-ch.md +3 -3
  260. package/docs/integration/editor-en.md +3 -3
  261. package/docs/integration/extension-sdk-ch.md +29 -3
  262. package/docs/integration/extension-sdk-en.md +29 -3
  263. package/docs/integration/local-integration-ch.md +3 -3
  264. package/docs/integration/local-integration-en.md +3 -3
  265. package/docs/integration/pdf-export-ch.md +42 -0
  266. package/docs/integration/pdf-export-en.md +42 -0
  267. package/docs/integration/shareable-export-ch.md +11 -19
  268. package/docs/integration/shareable-export-en.md +11 -19
  269. package/docs/reference/diagnostics-counting-ch.md +24 -1
  270. package/docs/reference/diagnostics-counting-en.md +24 -1
  271. package/docs/reference/local-interaction-syntax-ch.md +222 -33
  272. package/docs/reference/local-interaction-syntax-en.md +220 -31
  273. package/docs/reference/public-api-ch.md +24 -18
  274. package/docs/reference/public-api-en.md +24 -18
  275. package/docs/reference/theme-protocol-ch.md +1 -1
  276. package/docs/reference/theme-protocol-en.md +1 -1
  277. package/docs/releases/release-0.10.0-ch.md +45 -0
  278. package/docs/releases/release-0.10.0-en.md +45 -0
  279. package/examples/conformance/README-ch.md +3 -3
  280. package/examples/conformance/README.md +3 -3
  281. package/examples/conformance/local-draft-4.json +441 -0
  282. package/examples/integration/README-ch.md +3 -3
  283. package/examples/integration/README.md +3 -3
  284. package/examples/integration/chat-session/package.json +1 -1
  285. package/examples/local/README-ch.md +1 -1
  286. package/examples/local/README.md +1 -1
  287. package/package.json +6 -1
  288. package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +0 -143
  289. package/dist-library/authoring-B14SsOXZ.js +0 -893
  290. package/dist-library/compile-D50B5_Ww.js +0 -1249
  291. package/dist-library/computations-CffoW7Ff.js +0 -340
  292. package/dist-library/data-table-Kv_ZA2Z2.js +0 -297
  293. package/dist-library/default-options-DU5dxuU6.js +0 -125
  294. package/dist-library/layout-BfUzzO2b.js +0 -553
  295. package/dist-library/runtime-CuJndKqK.js +0 -1289
  296. package/dist-library/shareable-C6mUerpQ.js +0 -817
  297. package/dist-library/types-daDo2c_w.js +0 -3
  298. package/dist-library/use-hydrated-W-laKPhY.js +0 -22975
  299. package/dist-library/visuals-CoVSjVD8.js +0 -49159
@@ -1,15 +1,16 @@
1
- import { o as e } from "./compile-D50B5_Ww.js";
2
- import { n as t } from "./schema-core-4sd1Vu7V.js";
3
- import { t as n } from "./registry-core-CziAIP5P.js";
4
- import { t as r } from "./compiler-DLkKUK4t.js";
5
- import { a as i, c as a, d as o, i as s, l as c, o as l, s as u, u as d } from "./default-components-jugH7Ubr.js";
6
- import { s as f } from "./default-config-DIrRpuQz.js";
7
- import { r as p, t as m } from "./default-options-DU5dxuU6.js";
8
- import { i as h, n as g, r as _, t as v } from "./authoring-B14SsOXZ.js";
9
- import { t as y } from "./parser-9yNJxGip.js";
10
- import { a as ee, i as b, n as te, o as ne, r as re, s as ie, t as ae } from "./default-schema-Ch-Vznpm.js";
1
+ import { y as e } from "./compile-B35rfzKr.js";
2
+ import { V as t, z as n } from "./preset-core-BKPbH_Nv.js";
3
+ import { n as r } from "./schema-core-CDXfxdID.js";
4
+ import { t as i } from "./registry-core-DxEaxhJ6.js";
5
+ import { t as a } from "./compiler-DBwLawMZ.js";
6
+ import { a as o, c as s, d as c, i as l, l as u, o as d, s as f, u as p } from "./default-components-B-39etG9.js";
7
+ import { s as m } from "./default-config-CCa8rm2k.js";
8
+ import { r as h, t as ee } from "./default-options-By16CVw1.js";
9
+ import { a as g, i as _, n as v, r as y, t as b } from "./authoring-Bwu_zCWs.js";
10
+ import { t as te } from "./parser-BHl9Lxbw.js";
11
+ import { a as ne, i as re, n as ie, o as ae, r as oe, s as se, t as ce } from "./default-schema-CeYiEW1K.js";
11
12
  // src/authoring/editor-i18n.ts
12
- var oe = {
13
+ var le = {
13
14
  en: {
14
15
  boldPlaceholder: "bold text",
15
16
  italicPlaceholder: "italic text",
@@ -58,11 +59,11 @@ var oe = {
58
59
  }
59
60
  };
60
61
  // src/authoring/editor-commands.ts
61
- function se(e, t) {
62
+ function ue(e, t) {
62
63
  return typeof e != "number" || Number.isNaN(e) ? 0 : Math.min(Math.max(Math.trunc(e), 0), t);
63
64
  }
64
65
  function x(e, t) {
65
- let n = se(t.start, e.length), r = se(t.end, e.length);
66
+ let n = ue(t.start, e.length), r = ue(t.end, e.length);
66
67
  return n <= r ? {
67
68
  start: n,
68
69
  end: r
@@ -72,7 +73,7 @@ function x(e, t) {
72
73
  };
73
74
  }
74
75
  function S(e) {
75
- return oe[e] ?? oe.en;
76
+ return le[e] ?? le.en;
76
77
  }
77
78
  function C(e, t) {
78
79
  return t <= 0 ? 0 : e.lastIndexOf("\n", t - 1) + 1;
@@ -173,13 +174,13 @@ function O(e, t, n, r) {
173
174
  }
174
175
  };
175
176
  }
176
- function ce(e, t, n = "en") {
177
+ function de(e, t, n = "en") {
177
178
  return O(e, t, "**", S(n).boldPlaceholder);
178
179
  }
179
- function le(e, t, n = "en") {
180
+ function fe(e, t, n = "en") {
180
181
  return O(e, t, "*", S(n).italicPlaceholder);
181
182
  }
182
- function ue(e, t, n = "en") {
183
+ function pe(e, t, n = "en") {
183
184
  return O(e, t, "~~", S(n).strikePlaceholder);
184
185
  }
185
186
  function k(e) {
@@ -192,7 +193,7 @@ function A(e, t, n) {
192
193
  for (; e[t] === "`";) r += 1, t += n;
193
194
  return r;
194
195
  }
195
- function de(e, t) {
196
+ function me(e, t) {
196
197
  let { start: n, end: r } = t, i = e.slice(n, r), a = A(e, n - 1, -1), o = A(e, r, 1), s = a > 0 && a === o ? {
197
198
  run: a,
198
199
  padding: 0
@@ -202,7 +203,7 @@ function de(e, t) {
202
203
  } : null, d = s ?? u;
203
204
  return !d || k(i) >= d.run ? null : d;
204
205
  }
205
- function fe(e, t, n = "en") {
206
+ function he(e, t, n = "en") {
206
207
  let r = x(e, t), { start: i, end: a } = r, o = e.slice(i, a);
207
208
  if (i === a) {
208
209
  let t = S(n).inlineCodePlaceholder, r = `\`${t}\``;
@@ -225,7 +226,7 @@ function fe(e, t, n = "en") {
225
226
  }
226
227
  };
227
228
  }
228
- let l = de(e, r);
229
+ let l = me(e, r);
229
230
  if (l) {
230
231
  let t = l.run + l.padding;
231
232
  return {
@@ -245,11 +246,11 @@ function fe(e, t, n = "en") {
245
246
  }
246
247
  };
247
248
  }
248
- var pe = /^(#{1,6})[ \t]+/;
249
- function me(e, t, n) {
249
+ var ge = /^(#{1,6})[ \t]+/;
250
+ function _e(e, t, n) {
250
251
  let r = x(e, t), i = [];
251
252
  for (let t of w(e, r)) {
252
- let e = pe.exec(t.text), r = e ? e[0].length : 0;
253
+ let e = ge.exec(t.text), r = e ? e[0].length : 0;
253
254
  if (n === 0 && !e) continue;
254
255
  let a = t.text.slice(r), o = n === 0 ? "" : `${"#".repeat(n)} `, s = E(t, o + a, r, o.length);
255
256
  s && i.push(s);
@@ -267,7 +268,7 @@ function F(e, t) {
267
268
  prefixLength: r.length + i.length
268
269
  };
269
270
  }
270
- function he(e) {
271
+ function ve(e) {
271
272
  let t = /^[ \t]*/.exec(e);
272
273
  return t ? t[0] : "";
273
274
  }
@@ -286,24 +287,24 @@ function I(e, t, n, r) {
286
287
  e && u.push(e);
287
288
  continue;
288
289
  }
289
- let i = n ? n.indent : he(t.text), s = t.text.slice(n ? n.prefixLength : i.length), c = r(i, e + 1), d = E(t, i + c + s, n ? n.prefixLength : i.length, i.length + c.length);
290
+ let i = n ? n.indent : ve(t.text), s = t.text.slice(n ? n.prefixLength : i.length), c = r(i, e + 1), d = E(t, i + c + s, n ? n.prefixLength : i.length, i.length + c.length);
290
291
  d && u.push(d);
291
292
  }
292
293
  return T(e, i, u);
293
294
  }
294
- function ge(e, t) {
295
+ function ye(e, t) {
295
296
  return I(e, t, (e) => F(e, j), () => "- ");
296
297
  }
297
- function _e(e, t) {
298
+ function be(e, t) {
298
299
  return I(e, t, (e) => F(e, M), (e, t) => `${t}. `);
299
300
  }
300
- function ve(e, t) {
301
+ function xe(e, t) {
301
302
  return I(e, t, (e) => F(e, N), () => "- [ ] ");
302
303
  }
303
- function ye(e, t) {
304
+ function Se(e, t) {
304
305
  return I(e, t, (e) => F(e, P), () => "> ");
305
306
  }
306
- function be(e, t) {
307
+ function Ce(e, t) {
307
308
  let n = x(e, t);
308
309
  return T(e, n, w(e, n).map((e) => ({
309
310
  start: e.start,
@@ -313,7 +314,7 @@ function be(e, t) {
313
314
  newPrefixLength: 2
314
315
  })));
315
316
  }
316
- function xe(e) {
317
+ function we(e) {
317
318
  if (e.startsWith(" ")) return {
318
319
  text: e.slice(1),
319
320
  removed: 1
@@ -325,17 +326,17 @@ function xe(e) {
325
326
  removed: t
326
327
  };
327
328
  }
328
- function Se(e, t) {
329
+ function Te(e, t) {
329
330
  let n = x(e, t), r = [];
330
331
  for (let t of w(e, n)) {
331
- let e = xe(t.text);
332
+ let e = we(t.text);
332
333
  if (e.removed === 0) continue;
333
334
  let n = E(t, e.text, e.removed, 0);
334
335
  n && r.push(n);
335
336
  }
336
337
  return T(e, n, r);
337
338
  }
338
- function Ce(e, t, n = "en") {
339
+ function Ee(e, t, n = "en") {
339
340
  let { start: r, end: i } = x(e, t), a = e.slice(r, i), o = "https://example.com";
340
341
  if (a.length > 0) {
341
342
  let t = `[${a}](${o})`, n = r + 1 + a.length + 2;
@@ -356,7 +357,7 @@ function Ce(e, t, n = "en") {
356
357
  }
357
358
  };
358
359
  }
359
- function we(e, t, n = "en") {
360
+ function De(e, t, n = "en") {
360
361
  let { start: r, end: i } = x(e, t), a = e.slice(r, i), o = "images/example.png";
361
362
  if (a.length > 0) {
362
363
  let t = `![${a}](${o})`, n = r + 2 + a.length + 2;
@@ -377,21 +378,21 @@ function we(e, t, n = "en") {
377
378
  }
378
379
  };
379
380
  }
380
- function Te(e, t, n = "en") {
381
+ function Oe(e, t, n = "en") {
381
382
  let r = x(e, t), i = e.slice(r.start, r.end), a = i.length > 0 ? i : S(n).codeBlockPlaceholder, o = "`".repeat(Math.max(3, k(a) + 1)), s = `${o}text\n`;
382
- return L(e, r, `${s}${a}\n${o}`, {
383
+ return R(e, r, `${s}${a}\n${o}`, {
383
384
  start: s.length,
384
385
  end: s.length + a.length
385
386
  });
386
387
  }
387
- function Ee(e) {
388
+ function ke(e) {
388
389
  return [
389
390
  `| ${e.tableHeaders.join(" | ")} |`,
390
391
  `| ${e.tableHeaders.map(() => "---").join(" | ")} |`,
391
392
  ...e.tableRows.map((e) => `| ${e.join(" | ")} |`)
392
393
  ].join("\n");
393
394
  }
394
- function De(e, t) {
395
+ function L(e, t) {
395
396
  let n = C(e, t.start), r = e.slice(n, t.start), i = e.indexOf("\n", t.end), a = i === -1 ? e.length : i, o = e.slice(t.end, a), s = "";
396
397
  if (/\S/.test(r)) s = "\n\n";
397
398
  else if (n > 0) {
@@ -403,8 +404,8 @@ function De(e, t) {
403
404
  suffix: /\S/.test(o) ? "\n\n" : ""
404
405
  };
405
406
  }
406
- function L(e, t, n, r) {
407
- let { prefix: i, suffix: a } = De(e, t), o = t.start + i.length;
407
+ function R(e, t, n, r) {
408
+ let { prefix: i, suffix: a } = L(e, t), o = t.start + i.length;
408
409
  return {
409
410
  value: e.slice(0, t.start) + i + n + a + e.slice(t.end),
410
411
  selection: {
@@ -413,20 +414,20 @@ function L(e, t, n, r) {
413
414
  }
414
415
  };
415
416
  }
416
- function Oe(e, t, n = "en") {
417
- let r = x(e, t), i = S(n), a = Ee(i), o = i.tableRows[0][0], s = a.indexOf(o);
418
- return L(e, r, a, {
417
+ function Ae(e, t, n = "en") {
418
+ let r = x(e, t), i = S(n), a = ke(i), o = i.tableRows[0][0], s = a.indexOf(o);
419
+ return R(e, r, a, {
419
420
  start: s,
420
421
  end: s + o.length
421
422
  });
422
423
  }
423
- function ke(e, t) {
424
- return L(e, x(e, t), "---", {
424
+ function je(e, t) {
425
+ return R(e, x(e, t), "---", {
425
426
  start: 3,
426
427
  end: 3
427
428
  });
428
429
  }
429
- function Ae(e, t, n) {
430
+ function Me(e, t, n) {
430
431
  let r = x(e, t), i = r.start + n.length;
431
432
  return {
432
433
  value: e.slice(0, r.start) + n + e.slice(r.end),
@@ -436,11 +437,11 @@ function Ae(e, t, n) {
436
437
  }
437
438
  };
438
439
  }
439
- var R = /\{\{(selection(?::[^{}]*)?|caret|select:[^{}]*)\}\}/g;
440
- function je(e, t) {
440
+ var z = /\{\{(selection(?::[^{}]*)?|caret|select:[^{}]*)\}\}/g;
441
+ function Ne(e, t) {
441
442
  let n = "", r = 0, i = null, a = null, o = null;
442
- R.lastIndex = 0;
443
- for (let s = R.exec(e); s; s = R.exec(e)) {
443
+ z.lastIndex = 0;
444
+ for (let s = z.exec(e); s; s = z.exec(e)) {
444
445
  let c = s.index;
445
446
  n += e.slice(r, c), r = c + s[0].length;
446
447
  let l = s[1] ?? "";
@@ -471,8 +472,8 @@ function je(e, t) {
471
472
  caret: o
472
473
  };
473
474
  }
474
- function z(e, t, n, r = {}) {
475
- let i = x(e, t), a = je(n, e.slice(i.start, i.end)), o = r.block === !0 && a.text.length > 0 ? De(e, i) : {
475
+ function B(e, t, n, r = {}) {
476
+ let i = x(e, t), a = Ne(n, e.slice(i.start, i.end)), o = r.block === !0 && a.text.length > 0 ? L(e, i) : {
476
477
  prefix: "",
477
478
  suffix: ""
478
479
  }, s = i.start + o.prefix.length, c;
@@ -493,7 +494,7 @@ function z(e, t, n, r = {}) {
493
494
  selection: c
494
495
  };
495
496
  }
496
- function Me(e, t) {
497
+ function V(e, t) {
497
498
  let n = [], r = 0;
498
499
  for (; r < e.length;) {
499
500
  if (e[r] !== t) {
@@ -510,9 +511,9 @@ function Me(e, t) {
510
511
  }
511
512
  return n;
512
513
  }
513
- function Ne(e, t) {
514
- if (t === "inlineCode") return Me(e, "`");
515
- let n = Me(e, t === "strike" ? "~" : "*");
514
+ function H(e, t) {
515
+ if (t === "inlineCode") return V(e, "`");
516
+ let n = V(e, t === "strike" ? "~" : "*");
516
517
  return t === "italic" ? n.filter((e) => e.length % 2 == 1) : n.filter((e) => e.length >= 2);
517
518
  }
518
519
  function Pe(e, t, n) {
@@ -535,12 +536,12 @@ function Ie(e, t) {
535
536
  }
536
537
  return !1;
537
538
  }
538
- function B(e, t, n, r) {
539
+ function U(e, t, n, r) {
539
540
  if (t.start !== t.end) {
540
- let n = Ne(e, r);
541
+ let n = H(e, r);
541
542
  return Pe(t.start, t.end, n) || Fe(t.start, t.end, n);
542
543
  }
543
- return Ie(Math.min(Math.max(t.start - n.start, 0), n.text.length), Ne(n.text, r).filter((e) => e.start >= Le(n.text)));
544
+ return Ie(Math.min(Math.max(t.start - n.start, 0), n.text.length), H(n.text, r).filter((e) => e.start >= Le(n.text)));
544
545
  }
545
546
  function Le(e) {
546
547
  let t = 0;
@@ -557,76 +558,76 @@ function ze(e, t) {
557
558
  let n = x(e, t), r = w(e, {
558
559
  start: n.start,
559
560
  end: n.start
560
- })[0], i = r.text, a = pe.exec(i);
561
+ })[0], i = r.text, a = ge.exec(i);
561
562
  return {
562
563
  headingLevel: a ? a[1].length : 0,
563
- bold: B(e, n, r, "bold"),
564
- italic: B(e, n, r, "italic"),
565
- strike: B(e, n, r, "strike"),
566
- inlineCode: B(e, n, r, "inlineCode"),
564
+ bold: U(e, n, r, "bold"),
565
+ italic: U(e, n, r, "italic"),
566
+ strike: U(e, n, r, "strike"),
567
+ inlineCode: U(e, n, r, "inlineCode"),
567
568
  list: Re(i),
568
569
  quote: F(i, P) !== null
569
570
  };
570
571
  }
571
572
  // src/authoring/native-components.ts
572
- var Be = Object.freeze(s.map((e) => ({
573
+ var Be = Object.freeze(l.map((e) => ({
573
574
  id: e.id,
574
- label: o(e.title, "en", e.id)
575
+ label: c(e.title, "en", e.id)
575
576
  })));
576
577
  function Ve(e, t) {
577
- let n = l[e];
578
+ let n = d[e];
578
579
  return {
579
580
  id: e,
580
- label: o(n.title, t, e),
581
- description: o(n.description, t, e),
581
+ label: c(n.title, t, e),
582
+ description: c(n.description, t, e),
582
583
  group: n.category,
583
- keywords: [...a(e) ?? []],
584
+ keywords: [...s(e) ?? []],
584
585
  ...n.inline === !0 ? { inline: !0 } : {},
585
- template: o(n.insertText, t, n.insertText.en ?? "")
586
+ template: c(n.insertText, t, n.insertText.en ?? "")
586
587
  };
587
588
  }
588
- var V = i.map((e) => Ve(e, "en")), H = Object.freeze(s.map((e) => ({
589
+ var W = o.map((e) => Ve(e, "en")), He = Object.freeze(l.map((e) => ({
589
590
  id: e.id,
590
- label: o(e.title, "zh", e.id)
591
- }))), U = i.map((e) => Ve(e, "zh")), He = V.filter((e) => l[e.id]?.extended === !0), Ue = Object.freeze(Object.fromEntries(U.filter((e) => l[e.id]?.extended === !0).map((e) => [e.id, Object.freeze({
591
+ label: c(e.title, "zh", e.id)
592
+ }))), G = o.map((e) => Ve(e, "zh")), Ue = W.filter((e) => d[e.id]?.extended === !0), We = Object.freeze(Object.fromEntries(G.filter((e) => d[e.id]?.extended === !0).map((e) => [e.id, Object.freeze({
592
593
  label: e.label,
593
594
  description: e.description,
594
595
  keywords: Object.freeze([...e.keywords]),
595
596
  template: e.template
596
597
  })])));
597
- function We(e = "en") {
598
+ function Ge(e = "en") {
598
599
  return e === "zh" ? {
599
- groups: H,
600
- components: U
600
+ groups: He,
601
+ components: G
601
602
  } : {
602
603
  groups: Be,
603
- components: V
604
+ components: W
604
605
  };
605
606
  }
606
- function Ge(e) {
607
+ function Ke(e) {
607
608
  return new Set(e.match(/[A-Za-z_][A-Za-z0-9_]*/g) ?? []);
608
609
  }
609
- function Ke(e) {
610
+ function qe(e) {
610
611
  let t = e.trim().replace(/[^A-Za-z0-9_]/g, "_");
611
612
  return t ? /^[0-9]/.test(t) ? `_${t}` : t : "value";
612
613
  }
613
- function qe(e, t) {
614
+ function Je(e, t) {
614
615
  if (!t.has(e)) return e;
615
616
  let n = 2;
616
617
  for (; t.has(`${e}${n}`);) n += 1;
617
618
  return `${e}${n}`;
618
619
  }
619
- function W(e, t, n) {
620
- let r = Ge(t), i = /* @__PURE__ */ new Map();
620
+ function K(e, t, n) {
621
+ let r = Ke(t), i = /* @__PURE__ */ new Map();
621
622
  return e.template.replace(/\{\{bind:([^{}]+)\}\}/g, (e, t) => {
622
623
  let n = t.trim(), a = i.get(n);
623
624
  if (a) return a;
624
- let o = qe(Ke(n), r);
625
+ let o = Je(qe(n), r);
625
626
  return r.add(o), i.set(n, o), o;
626
627
  });
627
628
  }
628
629
  // src/authoring/templates.ts
629
- function G(e) {
630
+ function Ye(e) {
630
631
  let t = {};
631
632
  for (let [n, r] of Object.entries(e.props)) t[n] = {
632
633
  kind: r.kind,
@@ -641,22 +642,22 @@ function G(e) {
641
642
  };
642
643
  return t;
643
644
  }
644
- function Je(e) {
645
+ function Xe(e) {
645
646
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
646
647
  }
647
- function Ye(e) {
648
- return e === null ? "" : Je(String(e));
648
+ function Ze(e) {
649
+ return e === null ? "" : Xe(String(e));
649
650
  }
650
- function Xe(t) {
651
+ function Qe(t) {
651
652
  let n = t.replace(/[^A-Za-z0-9_]/g, "_"), r = /^[0-9]/.test(n) ? `_${n}` : n;
652
653
  return e.has(r) ? `${r}_value` : r;
653
654
  }
654
- function Ze(e, t) {
655
- if (e.defaultValue !== void 0 && e.defaultValue !== null) return Ye(e.defaultValue);
655
+ function $e(e, t) {
656
+ if (e.defaultValue !== void 0 && e.defaultValue !== null) return Ze(e.defaultValue);
656
657
  switch (e.kind) {
657
658
  case "boolean": return "false";
658
659
  case "enum":
659
- if (e.values?.length) return Ye(e.values[0]);
660
+ if (e.values?.length) return Ze(e.values[0]);
660
661
  throw Error(`${t} is a required enum without values; provide an authoring.insertText.`);
661
662
  case "number": {
662
663
  let n = e.min === void 0 ? void 0 : e.integer ? Math.ceil(e.min) : e.min, r = e.max === void 0 ? void 0 : e.integer ? Math.floor(e.max) : e.max;
@@ -672,24 +673,24 @@ function Ze(e, t) {
672
673
  default: throw Error(`${t} has an unsupported property kind; provide an authoring.insertText.`);
673
674
  }
674
675
  }
675
- function Qe(e) {
676
+ function et(e) {
676
677
  if (e.structure && e.structure.rule !== "none" && e.structure.rule !== "any" && e.structure.rule !== "inline") return !0;
677
678
  let t = e.children;
678
679
  return Array.isArray(t) ? t.some((e) => typeof e == "object" && !!e && (e.required === !0 || typeof e.min == "number" && e.min > 0)) : typeof t == "object" && t ? t.required === !0 || typeof t.min == "number" && t.min > 0 : !1;
679
680
  }
680
- function $e(e, t) {
681
+ function tt(e, t) {
681
682
  let n = e.name, r = e.form;
682
683
  if (r !== "leaf" && r !== "inline" && r !== "container") throw Error(`component "${n}" has an unsupported form; provide an authoring.insertText.`);
683
684
  let i = e.structure?.rule === "raw-body";
684
685
  if (i && r !== "container") throw Error(`component "${n}" declares a raw body on a non-container form; provide an authoring.insertText.`);
685
- if (!i && Qe(e)) throw Error(`component "${n}" requires children; provide an authoring.insertText.`);
686
+ if (!i && et(e)) throw Error(`component "${n}" requires children; provide an authoring.insertText.`);
686
687
  let a = Object.entries(e.bindings ?? {}), o = new Set(a.flatMap(([, e]) => [e.bind, e.initial])), s = [];
687
- for (let [e, t] of a) s.push(`${t.bind}="${Xe(e === "value" ? n : `${n}_${e}`)}"`);
688
- for (let [e, r] of Object.entries(t)) r.required && (o.has(e) || s.push(`${e}="${Ze(r, `component "${n}" property "${e}"`)}"`));
688
+ for (let [e, t] of a) s.push(`${t.bind}="${Qe(e === "value" ? n : `${n}_${e}`)}"`);
689
+ for (let [e, r] of Object.entries(t)) r.required && (o.has(e) || s.push(`${e}="${$e(r, `component "${n}" property "${e}"`)}"`));
689
690
  let c = `<${n}${s.length > 0 ? ` ${s.join(" ")}` : ""}`;
690
691
  return r === "leaf" ? `${c}>` : r === "inline" ? `${c}></${n}>` : i ? `${c}>${(e.structure?.min ?? 0) > 0 ? "\n…\n" : "\n\n"}</${n}>` : `${c}>\n\n</${n}>`;
691
692
  }
692
- var et = {
693
+ var nt = {
693
694
  id: "authoring-template",
694
695
  label: "",
695
696
  description: "",
@@ -697,41 +698,41 @@ var et = {
697
698
  keywords: [],
698
699
  template: ""
699
700
  };
700
- function K(e, t = "") {
701
- let n = W({
702
- ...et,
701
+ function q(e, t = "") {
702
+ let n = K({
703
+ ...nt,
703
704
  template: e
704
705
  }, t);
705
- return z(t, {
706
+ return B(t, {
706
707
  start: t.length,
707
708
  end: t.length
708
709
  }, n).value.slice(t.length);
709
710
  }
710
- function tt(e) {
711
+ function rt(e) {
711
712
  return e.diagnostics.map((e) => `${e.code}: ${e.message}`).join("; ");
712
713
  }
713
- function nt(e, t) {
714
- let n = K(t), r = `</${e}>`, i = n.lastIndexOf(r);
714
+ function it(e, t) {
715
+ let n = q(t), r = `</${e}>`, i = n.lastIndexOf(r);
715
716
  if (!(i < 0)) return {
716
717
  before: `${n.slice(0, i)}\n`,
717
718
  after: `\n${n.slice(i)}`
718
719
  };
719
720
  }
720
- function rt(e, t, n, i) {
721
- let a = i === void 0 ? K(e) : K(e, i.before), o = i === void 0 ? a : `${i.before}${a}${i.after}`, s;
721
+ function at(e, t, n, r) {
722
+ let i = r === void 0 ? q(e) : q(e, r.before), o = r === void 0 ? i : `${r.before}${i}${r.after}`, s;
722
723
  try {
723
- s = r(o, t ?? {});
724
+ s = a(o, t ?? {});
724
725
  } catch (e) {
725
726
  throw Error(`${n} authoring.insertText could not be compiled: ${e instanceof Error ? e.message : String(e)}.`);
726
727
  }
727
728
  if (s.ok) return;
728
- let c = tt(s);
729
+ let c = rt(s);
729
730
  throw Error(`${n} authoring.insertText does not compile with this configuration${c ? ` (${c})` : ""}.`);
730
731
  }
731
- function it(e, t, n, i) {
732
- let a = i === void 0 ? e : `${i.before}${e}${i.after}`, o;
732
+ function ot(e, t, n, r) {
733
+ let i = r === void 0 ? e : `${r.before}${e}${r.after}`, o;
733
734
  try {
734
- o = r(a, t ?? {});
735
+ o = a(i, t ?? {});
735
736
  } catch (e) {
736
737
  throw Error(`${n} has no authoring.insertText and its synthesized template could not be compiled: ${e instanceof Error ? e.message : String(e)}. Provide authoring.insertText.`);
737
738
  }
@@ -740,42 +741,42 @@ function it(e, t, n, i) {
740
741
  throw Error(`${n} has no authoring.insertText and its synthesized template does not compile with this configuration${s ? ` (${s})` : ""}. Provide authoring.insertText.`);
741
742
  }
742
743
  // src/authoring/catalog.ts
743
- function q(e) {
744
+ function J(e) {
744
745
  return /* @__PURE__ */ Error(`Invalid local component catalog: ${e}`);
745
746
  }
746
- function J(e, t, n) {
747
- return o(e, t, n);
747
+ function Y(e, t, n) {
748
+ return c(e, t, n);
748
749
  }
749
- function at(e, t) {
750
- let n = J(e, t, "");
750
+ function st(e, t) {
751
+ let n = Y(e, t, "");
751
752
  return n === "" ? void 0 : n;
752
753
  }
753
- function ot(e) {
754
+ function ct(e) {
754
755
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") return e;
755
756
  if (e === null) return null;
756
757
  }
757
- function Y(e) {
758
+ function X(e) {
758
759
  return e?.rule === "raw-body" ? "raw" : "markdown";
759
760
  }
760
- function st(e, t) {
761
+ function lt(e, t, n) {
761
762
  return Object.freeze({
762
- name: e,
763
- kind: t.kind,
764
- required: t.required === !0,
765
- static: t.static === !0,
766
- dynamic: t.dynamic === !0,
767
- ...t.values ? { values: Object.freeze([...t.values]) } : {},
768
- ...ot(t.default) === void 0 ? {} : { defaultValue: ot(t.default) }
763
+ name: t,
764
+ kind: n.kind,
765
+ required: g(e, t, n),
766
+ static: n.static === !0,
767
+ dynamic: n.dynamic === !0,
768
+ ...n.values ? { values: Object.freeze([...n.values]) } : {},
769
+ ...ct(n.default) === void 0 ? {} : { defaultValue: ct(n.default) }
769
770
  });
770
771
  }
771
- function ct(e, t) {
772
- let n = {};
773
- for (let [t, r] of Object.entries(e)) n[t] = st(t, r);
774
- return n;
772
+ function ut(e) {
773
+ let t = {};
774
+ for (let [n, r] of Object.entries(e.props)) t[n] = lt(e, n, r);
775
+ return t;
775
776
  }
776
- function lt(e, t, n) {
777
+ function dt(e, t, n) {
777
778
  for (let [r, i] of Object.entries(e.props)) {
778
- let e = at(i.description, n);
779
+ let e = st(i.description, n);
779
780
  if (e === void 0) continue;
780
781
  let a = t[r];
781
782
  t[r] = Object.freeze({
@@ -791,7 +792,7 @@ function lt(e, t, n) {
791
792
  }
792
793
  return t;
793
794
  }
794
- function ut(e) {
795
+ function ft(e) {
795
796
  return Object.freeze({
796
797
  id: e.id,
797
798
  name: e.name,
@@ -812,163 +813,163 @@ function ut(e) {
812
813
  ...e.requires === void 0 ? {} : { requires: Object.freeze({ ...e.requires }) }
813
814
  });
814
815
  }
815
- function dt(e) {
816
+ function pt(e) {
816
817
  let t = e.structure;
817
818
  return {
818
819
  ...t?.parents?.length ? { parents: t.parents } : {},
819
820
  ...t?.children?.length ? { allowedChildren: t.children } : {}
820
821
  };
821
822
  }
822
- function ft(e, t) {
823
+ function mt(e, t) {
823
824
  if (e === t) return !0;
824
825
  if (e === void 0 || t === void 0) return !1;
825
826
  let n = Object.keys(e).sort(), r = Object.keys(t).sort();
826
827
  return n.length === r.length && n.every((n, i) => n === r[i] && e[n] === t[n]);
827
828
  }
828
- function X(e) {
829
+ function Z(e) {
829
830
  let t = e.authoring;
830
831
  if (t === void 0) return;
831
- if (c(e.name) === void 0) return t;
832
- let n = d(e.name), r = {};
833
- return t.title !== void 0 && !ft(t.title, n?.title) && (r.title = t.title), t.description !== void 0 && !ft(t.description, n?.description) && (r.description = t.description), t.category !== void 0 && t.category !== n?.category && (r.category = t.category), t.insertText !== void 0 && t.insertText !== n?.insertText && (r.insertText = t.insertText), Object.keys(r).length === 0 ? void 0 : Object.freeze(r);
832
+ if (u(e.name) === void 0) return t;
833
+ let n = p(e.name), r = {};
834
+ return t.title !== void 0 && !mt(t.title, n?.title) && (r.title = t.title), t.description !== void 0 && !mt(t.description, n?.description) && (r.description = t.description), t.category !== void 0 && t.category !== n?.category && (r.category = t.category), t.insertText !== void 0 && t.insertText !== n?.insertText && (r.insertText = t.insertText), Object.keys(r).length === 0 ? void 0 : Object.freeze(r);
834
835
  }
835
- function Z(e, t) {
836
- let n = c(e.name), r = X(e);
836
+ function Q(e, t) {
837
+ let n = u(e.name), r = Z(e);
837
838
  if (n) {
838
839
  let e = r?.insertText;
839
840
  if (e !== void 0) return e.trim() === "" ? void 0 : e;
840
- let i = J(n.insertText, t, n.insertText.en ?? "");
841
+ let i = Y(n.insertText, t, n.insertText.en ?? "");
841
842
  return i === "" ? void 0 : i;
842
843
  }
843
844
  let i = r?.insertText;
844
845
  return i !== void 0 && i.trim() !== "" ? i : void 0;
845
846
  }
846
- function pt(e, t) {
847
- let n = Z(e, t);
848
- return n === void 0 ? $e(e, G(e)) : n;
847
+ function ht(e, t) {
848
+ let n = Q(e, t);
849
+ return n === void 0 ? tt(e, Ye(e)) : n;
849
850
  }
850
- function Q(e, t, r) {
851
- let i = n(e).structure?.parents;
852
- if (i !== void 0 && i.length !== 0) for (let e of i) {
853
- let n = t.get(e);
854
- if (n === void 0 || n.form !== "container") continue;
851
+ function gt(e, t, n) {
852
+ let r = i(e).structure?.parents;
853
+ if (r !== void 0 && r.length !== 0) for (let e of r) {
854
+ let r = t.get(e);
855
+ if (r === void 0 || r.form !== "container") continue;
855
856
  let i;
856
857
  try {
857
- i = pt(n, r);
858
+ i = ht(r, n);
858
859
  } catch {
859
860
  continue;
860
861
  }
861
- let a = nt(e, i);
862
+ let a = it(e, i);
862
863
  if (a !== void 0) return a;
863
864
  }
864
865
  }
865
- function mt(e, t) {
866
+ function _t(e, t) {
866
867
  if (e.parents !== void 0 && e.parents.length !== 0) for (let n of e.parents) {
867
868
  let e = t.find((e) => e.name === n);
868
869
  if (e === void 0 || e.form !== "container") continue;
869
- let r = nt(n, e.insertText);
870
+ let r = it(n, e.insertText);
870
871
  if (r !== void 0) return r;
871
872
  }
872
873
  }
873
- function ht(e, t, r, i, o) {
874
- let s = n(e), l = c(e.name), d = e.authoring, f = X(e), p = J(l ? f?.title ?? l.title : d?.title, t, e.name), m = J(l ? f?.description ?? l.description : d?.description, t, p), h = l ? f?.category ?? l.category : d?.category !== void 0 && d.category.trim() !== "" ? d.category : "extension", g = u(h, t), _ = Z(e, t), v = dt(s), y;
875
- if (_ !== void 0) {
876
- if (y = _, o) {
877
- let n = Q(e, i, t);
874
+ function vt(e, t, n, r, a) {
875
+ let o = i(e), c = u(e.name), l = e.authoring, d = Z(e), p = Y(c ? d?.title ?? c.title : l?.title, t, e.name), m = Y(c ? d?.description ?? c.description : l?.description, t, p), h = c ? d?.category ?? c.category : l?.category !== void 0 && l.category.trim() !== "" ? l.category : "extension", ee = f(h, t), g = Q(e, t), _ = pt(o), v;
876
+ if (g !== void 0) {
877
+ if (v = g, a) {
878
+ let i = gt(e, r, t);
878
879
  try {
879
- rt(y, r, `component "${e.name}"`, n);
880
+ at(v, n, `component "${e.name}"`, i);
880
881
  } catch (e) {
881
- throw q(e instanceof Error ? e.message : String(e));
882
+ throw J(e instanceof Error ? e.message : String(e));
882
883
  }
883
884
  }
884
885
  } else {
885
886
  try {
886
- y = $e(e, G(e));
887
+ v = tt(e, Ye(e));
887
888
  } catch (e) {
888
- throw q(e instanceof Error ? e.message : String(e));
889
+ throw J(e instanceof Error ? e.message : String(e));
889
890
  }
890
- if (o) try {
891
- it(y, r, `component "${e.name}"`, Q(e, i, t));
891
+ if (a) try {
892
+ ot(v, n, `component "${e.name}"`, gt(e, r, t));
892
893
  } catch (e) {
893
- throw q(e instanceof Error ? e.message : String(e));
894
+ throw J(e instanceof Error ? e.message : String(e));
894
895
  }
895
896
  }
896
- let ee = lt(e, ct(s.props, t), t), b = a(e.name);
897
- return ut({
898
- id: l ? e.name : e.id,
897
+ let y = dt(e, ut(o), t), b = s(e.name);
898
+ return ft({
899
+ id: c ? e.name : e.id,
899
900
  name: e.name,
900
901
  title: p,
901
902
  description: m,
902
903
  category: h,
903
- categoryLabel: g,
904
- insertText: y,
904
+ categoryLabel: ee,
905
+ insertText: v,
905
906
  form: e.form,
906
- bodyKind: Y(s.structure),
907
- inline: l ? l.inline === !0 : e.form === "inline",
908
- ...v,
907
+ bodyKind: X(o.structure),
908
+ inline: c ? c.inline === !0 : e.form === "inline",
909
+ ..._,
909
910
  ...b === void 0 ? {} : { keywords: b },
910
- props: ee,
911
+ props: y,
911
912
  ...e.styles === void 0 ? {} : { styles: e.styles },
912
913
  ...e.requires === void 0 ? {} : { requires: e.requires }
913
914
  });
914
915
  }
915
- function gt(e, t, n, r, a) {
916
- let o = new Map(e.map((e) => [e.name, e])), s = [], c = /* @__PURE__ */ new Set();
917
- for (let e of i) {
918
- let t = o.get(e);
919
- t && t.authoring !== void 0 && (s.push(ht(t, n, r, o, !1)), c.add(e));
916
+ function yt(e, t, n, r, i) {
917
+ let a = new Map(e.map((e) => [e.name, e])), s = [], c = /* @__PURE__ */ new Set();
918
+ for (let e of o) {
919
+ let t = a.get(e);
920
+ t && t.authoring !== void 0 && (s.push(vt(t, n, r, a, !1)), c.add(e));
920
921
  }
921
- for (let i of e) c.has(i.name) || (i.authoring !== void 0 || t.has(i.name)) && (s.push(ht(i, n, r, o, a && t.has(i.name))), c.add(i.name));
922
+ for (let o of e) c.has(o.name) || (o.authoring !== void 0 || t.has(o.name)) && (s.push(vt(o, n, r, a, i && t.has(o.name))), c.add(o.name));
922
923
  return s;
923
924
  }
924
- function _t(e, t) {
925
- let r = c(e.name), i = e.authoring, o = X(e), s = {};
926
- for (let [t, n] of Object.entries(e.props)) s[t] = n.description;
925
+ function bt(e, t) {
926
+ let n = u(e.name), r = e.authoring, a = Z(e), o = {};
927
+ for (let [t, n] of Object.entries(e.props)) o[t] = n.description;
927
928
  return JSON.stringify({
928
929
  name: e.name,
929
930
  id: e.id,
930
931
  form: e.form,
931
- title: J(r ? o?.title ?? r.title : i?.title, t, e.name),
932
- description: J(r ? o?.description ?? r.description : i?.description, t, ""),
933
- category: r ? o?.category ?? r.category : i?.category ?? "",
934
- categoryLabel: u(r ? o?.category ?? r.category : i?.category ?? "extension", t),
935
- insertText: Z(e, t) ?? null,
936
- inline: r ? r.inline === !0 : e.form === "inline",
937
- bodyKind: Y(n(e).structure),
938
- keywords: a(e.name) ?? null,
939
- manifest: i ?? null,
940
- preset: r ?? null,
941
- propDescriptions: s,
942
- structure: n(e).structure ?? null,
932
+ title: Y(n ? a?.title ?? n.title : r?.title, t, e.name),
933
+ description: Y(n ? a?.description ?? n.description : r?.description, t, ""),
934
+ category: n ? a?.category ?? n.category : r?.category ?? "",
935
+ categoryLabel: f(n ? a?.category ?? n.category : r?.category ?? "extension", t),
936
+ insertText: Q(e, t) ?? null,
937
+ inline: n ? n.inline === !0 : e.form === "inline",
938
+ bodyKind: X(i(e).structure),
939
+ keywords: s(e.name) ?? null,
940
+ manifest: r ?? null,
941
+ preset: n ?? null,
942
+ propDescriptions: o,
943
+ structure: i(e).structure ?? null,
943
944
  styles: e.styles ?? null,
944
945
  requires: e.requires ?? null
945
946
  });
946
947
  }
947
- function vt(e, t = "en") {
948
- let n = p(e);
948
+ function xt(e, t = "en") {
949
+ let n = h(e);
949
950
  if (!n.ok) return `invalid|${t}`;
950
- let r = n.registry.map((e) => _t(e, t));
951
- return `${m(e)}|${t}|${r.join("\0")}`;
951
+ let r = n.registry.map((e) => bt(e, t));
952
+ return `${ee(e)}|${t}|${r.join("\0")}`;
952
953
  }
953
954
  function $(e, t, n, r) {
954
- return Object.freeze(gt(e.registry, e.externalComponentNames, t, n, r));
955
+ return Object.freeze(yt(e.registry, e.externalComponentNames, t, n, r));
955
956
  }
956
- function yt(e, t = "en") {
957
- let n = f(e), r = p({ config: n });
958
- if (!r.ok) throw q(r.message);
957
+ function St(e, t = "en") {
958
+ let n = m(e), r = h({ config: n });
959
+ if (!r.ok) throw J(r.message);
959
960
  return $(r, t, { config: n }, !0);
960
961
  }
961
- function bt(e, t = "en") {
962
- let n = f(e), r = p({ config: n });
963
- if (!r.ok) throw q(r.message);
962
+ function Ct(e, t = "en") {
963
+ let n = m(e), r = h({ config: n });
964
+ if (!r.ok) throw J(r.message);
964
965
  return $(r, t, { config: n }, !1);
965
966
  }
966
- function xt(e, t = "en") {
967
- let n = p(e);
967
+ function wt(e, t = "en") {
968
+ let n = h(e);
968
969
  return n.ok ? $(n, t, e, !0) : Object.freeze([]);
969
970
  }
970
- function St(e) {
971
- let t = new Map(s.map((e, t) => [e.id, t])), n = /* @__PURE__ */ new Map();
971
+ function Tt(e) {
972
+ let t = new Map(l.map((e, t) => [e.id, t])), n = /* @__PURE__ */ new Map();
972
973
  for (let t of e) {
973
974
  let e = n.get(t.category);
974
975
  e ? e.entries.push(t) : n.set(t.category, {
@@ -987,7 +988,7 @@ function St(e) {
987
988
  entries: Object.freeze([...e.entries])
988
989
  })));
989
990
  }
990
- function Ct(e, t = {}) {
991
+ function Et(e, t = {}) {
991
992
  let n = t.ancestors ?? [], r = n[n.length - 1], i = (r === void 0 ? void 0 : e.find((e) => e.name === r))?.allowedChildren, a = (t.query ?? "").trim().toLowerCase(), o = e.filter((e) => e.parents !== void 0 && e.parents.length > 0 && !e.parents.some((e) => n.includes(e)) || i !== void 0 && i.length > 0 && !i.includes(e.name) ? !1 : a === "" || [
992
993
  e.name,
993
994
  e.title,
@@ -997,17 +998,17 @@ function Ct(e, t = {}) {
997
998
  ].some((e) => e.toLowerCase().includes(a)));
998
999
  return Object.freeze(o);
999
1000
  }
1000
- function wt(e) {
1001
+ function Dt(e) {
1001
1002
  let t = [];
1002
1003
  e.description !== "" && t.push(e.description);
1003
1004
  for (let n of Object.values(e.props)) n.description !== void 0 && t.push(`${n.name}: ${n.description}`);
1004
1005
  return t.join("\n");
1005
1006
  }
1006
- function Tt(e, t, n) {
1007
- if (typeof e != "string" || !Number.isFinite(t) || !p(n).ok) return Object.freeze([]);
1007
+ function Ot(e, t, n) {
1008
+ if (typeof e != "string" || !Number.isFinite(t) || !h(n).ok) return Object.freeze([]);
1008
1009
  let r = Math.max(0, Math.min(e.length, Math.floor(t))), i = Object.freeze([]), a;
1009
1010
  try {
1010
- a = y(e, n);
1011
+ a = te(e, n);
1011
1012
  } catch {
1012
1013
  return i;
1013
1014
  }
@@ -1019,13 +1020,13 @@ function Tt(e, t, n) {
1019
1020
  };
1020
1021
  return o(a.nodes, Object.freeze([])), i;
1021
1022
  }
1022
- function Et(e) {
1023
+ function kt(e) {
1023
1024
  let t = {};
1024
1025
  if (!e) return t;
1025
1026
  for (let [n, r] of Object.entries(e.props)) t[n] = Object.freeze({
1026
1027
  name: n,
1027
1028
  kind: r.kind,
1028
- required: r.required === !0,
1029
+ required: g(e, n, r),
1029
1030
  static: r.static === !0,
1030
1031
  dynamic: r.dynamic === !0,
1031
1032
  ...r.values ? { values: Object.freeze([...r.values]) } : {},
@@ -1033,7 +1034,7 @@ function Et(e) {
1033
1034
  });
1034
1035
  return t;
1035
1036
  }
1036
- function Dt(e) {
1037
+ function At(e) {
1037
1038
  return Object.freeze({
1038
1039
  name: e.name,
1039
1040
  form: e.form,
@@ -1052,7 +1053,7 @@ function Dt(e) {
1052
1053
  ...e.requires === void 0 ? {} : { requires: Object.freeze({ ...e.requires }) }
1053
1054
  });
1054
1055
  }
1055
- function Ot(e) {
1056
+ function jt(e) {
1056
1057
  let t = new Map(e.map((e) => [e.name, e])), n = Object.freeze([...e]);
1057
1058
  return Object.freeze({
1058
1059
  tags: n,
@@ -1064,53 +1065,60 @@ function Ot(e) {
1064
1065
  }
1065
1066
  });
1066
1067
  }
1067
- function kt(e, t = "en") {
1068
- let n = p(e);
1069
- if (!n.ok) return Ot([]);
1070
- let r = [];
1068
+ function Mt(e, r = "en", i) {
1069
+ let a = h(e);
1070
+ if (!a.ok) return jt([]);
1071
+ let o = [];
1071
1072
  try {
1072
- r = $(n, t, e, !1);
1073
+ o = $(a, r, e, !1);
1073
1074
  } catch {
1074
- r = Object.freeze([]);
1075
+ o = Object.freeze([]);
1075
1076
  }
1076
- let i = new Map(r.map((e) => [e.name, e])), a = [];
1077
- for (let [e, t] of n.schemaByName) {
1078
- let n = i.get(e), r = Et(t);
1079
- for (let [e, t] of Object.entries(n?.props ?? {})) r[e] = Object.freeze({
1080
- ...r[e],
1077
+ let s = new Map(o.map((e) => [e.name, e])), c = [];
1078
+ for (let [e, r] of a.schemaByName) {
1079
+ let o = s.get(e), l = kt(r);
1080
+ for (let [e, t] of Object.entries(o?.props ?? {})) l[e] = Object.freeze({
1081
+ ...l[e],
1081
1082
  ...t
1082
1083
  });
1083
- a.push(Dt({
1084
+ if (e === "text" && a.componentByName.get(e)?.id === "reactive-md/text" && l.font?.kind === "enum") {
1085
+ let e = n(a.config, i);
1086
+ l.font = Object.freeze({
1087
+ ...l.font,
1088
+ values: Object.freeze(t(e, l.font.values))
1089
+ });
1090
+ }
1091
+ c.push(At({
1084
1092
  name: e,
1085
- form: t.form,
1086
- bodyKind: Y(t.structure),
1087
- title: n?.title ?? e,
1088
- description: n?.description ?? "",
1089
- category: n?.category ?? "component",
1090
- categoryLabel: n?.categoryLabel ?? "component",
1091
- insertText: n?.insertText ?? "",
1092
- props: r,
1093
- ...n?.parents === void 0 ? {} : { parents: n.parents },
1094
- ...n?.allowedChildren === void 0 ? {} : { allowedChildren: n.allowedChildren },
1095
- ...n?.keywords === void 0 ? {} : { keywords: n.keywords },
1096
- ...n?.styles === void 0 ? {} : { styles: n.styles },
1097
- ...n?.requires === void 0 ? {} : { requires: n.requires }
1093
+ form: r.form,
1094
+ bodyKind: X(r.structure),
1095
+ title: o?.title ?? e,
1096
+ description: o?.description ?? "",
1097
+ category: o?.category ?? "component",
1098
+ categoryLabel: o?.categoryLabel ?? "component",
1099
+ insertText: o?.insertText ?? "",
1100
+ props: l,
1101
+ ...o?.parents === void 0 ? {} : { parents: o.parents },
1102
+ ...o?.allowedChildren === void 0 ? {} : { allowedChildren: o.allowedChildren },
1103
+ ...o?.keywords === void 0 ? {} : { keywords: o.keywords },
1104
+ ...o?.styles === void 0 ? {} : { styles: o.styles },
1105
+ ...o?.requires === void 0 ? {} : { requires: o.requires }
1098
1106
  }));
1099
1107
  }
1100
- return Ot(a);
1108
+ return jt(c);
1101
1109
  }
1102
1110
  // src/authoring/insert.ts
1103
- var At = /[A-Za-z_][A-Za-z0-9_]*/g;
1104
- function jt(t, n, r) {
1105
- let i = new Set(r.match(At) ?? []), a = v(t, n, { diagnostics: !1 }).bindings.filter((e) => e.declarations.length > 0).map((e) => e.name), o = new Set(a), s = t;
1111
+ var Nt = /[A-Za-z_][A-Za-z0-9_]*/g;
1112
+ function Pt(t, n, r) {
1113
+ let i = new Set(r.match(Nt) ?? []), a = b(t, n, { diagnostics: !1 }).bindings.filter((e) => e.declarations.length > 0).map((e) => e.name), o = new Set(a), s = t;
1106
1114
  for (let t of a) {
1107
1115
  let r = t, a = 2;
1108
1116
  for (; i.has(r) || e.has(r) || r !== t && o.has(r);) r = `${t}${a}`, a += 1;
1109
- i.add(r), r !== t && (s = h(s, t, r, n).source);
1117
+ i.add(r), r !== t && (s = _(s, t, r, n).source);
1110
1118
  }
1111
1119
  return s;
1112
1120
  }
1113
- function Mt(e) {
1121
+ function Ft(e) {
1114
1122
  return {
1115
1123
  id: e.id,
1116
1124
  label: e.title,
@@ -1120,31 +1128,31 @@ function Mt(e) {
1120
1128
  template: e.insertText
1121
1129
  };
1122
1130
  }
1123
- function Nt(e, t, n, r) {
1124
- return z(n, r, jt(W(Mt(e), n), t, n), { block: !e.inline });
1131
+ function It(e, t, n, r) {
1132
+ return B(n, r, Pt(K(Ft(e), n), t, n), { block: !e.inline });
1125
1133
  }
1126
- function Pt(e, t, n, r, i = "en") {
1134
+ function Lt(e, t, n, r, i = "en") {
1127
1135
  if (typeof n != "string") throw TypeError("insertLocalComponent requires source text.");
1128
1136
  if (typeof t != "string" || t.length === 0) throw TypeError("insertLocalComponent requires a component id.");
1129
- let a = p(e);
1137
+ let a = h(e);
1130
1138
  if (!a.ok) throw Error(`Invalid compile options: ${a.message}`);
1131
- let o = xt(e, i).find((e) => e.id === t || e.name === t);
1139
+ let o = wt(e, i).find((e) => e.id === t || e.name === t);
1132
1140
  if (!o) throw Error(`Unknown local component "${t}".`);
1133
- return Nt(o, e, n, r);
1141
+ return It(o, e, n, r);
1134
1142
  }
1135
- function Ft(e, t, n, r, i = "en") {
1136
- return Pt({ config: f(e) }, t, n, r, i);
1143
+ function Rt(e, t, n, r, i = "en") {
1144
+ return Lt({ config: m(e) }, t, n, r, i);
1137
1145
  }
1138
1146
  // src/authoring/conformance.ts
1139
- function It(e, t = "en") {
1140
- let n = f(e), i = new Set(n.components.map((e) => e.name)), a = [], o = { config: n }, s = bt(n, t);
1147
+ function zt(e, t = "en") {
1148
+ let n = m(e), r = new Set(n.components.map((e) => e.name)), i = [], o = { config: n }, s = Ct(n, t);
1141
1149
  for (let e of s) {
1142
- if (!i.has(e.name)) continue;
1143
- let t = Nt(e, o, "", {
1150
+ if (!r.has(e.name)) continue;
1151
+ let t = It(e, o, "", {
1144
1152
  start: 0,
1145
1153
  end: 0
1146
- }).value, n = mt(e, s), c = n === void 0 ? t : `${n.before}${t}${n.after}`, l = r(c, o);
1147
- l.ok || a.push(Object.freeze({
1154
+ }).value, n = _t(e, s), c = n === void 0 ? t : `${n.before}${t}${n.after}`, l = a(c, o);
1155
+ l.ok || i.push(Object.freeze({
1148
1156
  id: e.id,
1149
1157
  name: e.name,
1150
1158
  message: `Insert template for <${e.name}> does not compile with this configuration.`,
@@ -1154,6 +1162,6 @@ function It(e, t = "en") {
1154
1162
  })))
1155
1163
  }));
1156
1164
  }
1157
- return Object.freeze(a);
1165
+ return Object.freeze(i);
1158
1166
  }
1159
- export { He as EXTENDED_NATIVE_COMPONENTS, Ue as EXTENDED_NATIVE_COMPONENT_COPY_ZH, ae as LOCAL_COMPONENTS, te as LOCAL_COMPONENT_NAMES, V as NATIVE_COMPONENTS, U as NATIVE_COMPONENTS_ZH, Be as NATIVE_COMPONENT_GROUPS, H as NATIVE_COMPONENT_GROUPS_ZH, v as analyzeLocalSource, t as closestName, g as completeLocalSource, kt as createLocalAuthoringLookup, yt as createLocalComponentCatalog, xt as createLocalComponentCatalogForOptions, Ct as filterLocalComponentCatalog, ce as formatBold, ge as formatBulletList, me as formatHeading, fe as formatInlineCode, le as formatItalic, _ as formatLocalSource, _e as formatOrderedList, ye as formatQuote, ue as formatStrike, ve as formatTaskList, re as getLocalComponent, We as getNativeComponentCatalog, b as getPropDefault, be as indentSelection, Te as insertCodeBlock, ke as insertDivider, we as insertImage, Ce as insertLink, Ft as insertLocalComponent, Pt as insertLocalComponentFromOptions, Oe as insertTable, z as insertTemplate, Ae as insertText, Tt as localCatalogAncestors, St as localComponentCatalogGroups, vt as localComponentCatalogKey, wt as localComponentHelp, ee as localComponentNames, Se as outdentSelection, ze as readFormatState, h as renameLocalBinding, W as renderNativeSnippet, ne as suggestAttribute, ie as suggestComponent, It as validateLocalComponentInsertTemplates };
1167
+ export { Ue as EXTENDED_NATIVE_COMPONENTS, We as EXTENDED_NATIVE_COMPONENT_COPY_ZH, ce as LOCAL_COMPONENTS, ie as LOCAL_COMPONENT_NAMES, W as NATIVE_COMPONENTS, G as NATIVE_COMPONENTS_ZH, Be as NATIVE_COMPONENT_GROUPS, He as NATIVE_COMPONENT_GROUPS_ZH, b as analyzeLocalSource, r as closestName, v as completeLocalSource, Mt as createLocalAuthoringLookup, St as createLocalComponentCatalog, wt as createLocalComponentCatalogForOptions, Et as filterLocalComponentCatalog, de as formatBold, ye as formatBulletList, _e as formatHeading, he as formatInlineCode, fe as formatItalic, y as formatLocalSource, be as formatOrderedList, Se as formatQuote, pe as formatStrike, xe as formatTaskList, oe as getLocalComponent, Ge as getNativeComponentCatalog, re as getPropDefault, Ce as indentSelection, Oe as insertCodeBlock, je as insertDivider, De as insertImage, Ee as insertLink, Rt as insertLocalComponent, Lt as insertLocalComponentFromOptions, Ae as insertTable, B as insertTemplate, Me as insertText, Ot as localCatalogAncestors, Tt as localComponentCatalogGroups, xt as localComponentCatalogKey, Dt as localComponentHelp, ne as localComponentNames, Te as outdentSelection, ze as readFormatState, _ as renameLocalBinding, K as renderNativeSnippet, ae as suggestAttribute, se as suggestComponent, zt as validateLocalComponentInsertTemplates };