reactive-md 0.9.2 → 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 (638) hide show
  1. package/CHANGELOG-ch.md +397 -333
  2. package/CHANGELOG.md +398 -334
  3. package/CONTRIBUTING-ch.md +22 -22
  4. package/CONTRIBUTING.md +22 -22
  5. package/README-ch.md +431 -431
  6. package/README-en.md +431 -431
  7. package/README.md +429 -429
  8. package/SECURITY-ch.md +83 -83
  9. package/SECURITY.md +83 -83
  10. package/THIRD_PARTY_NOTICES.md +0 -57
  11. package/bin/reactive-md.mjs +39 -39
  12. package/cli/args.mjs +263 -263
  13. package/cli/assets.mjs +395 -395
  14. package/cli/build.mjs +445 -445
  15. package/cli/check.mjs +444 -444
  16. package/cli/document.mjs +130 -130
  17. package/cli/errors.mjs +61 -61
  18. package/cli/fs-utils.mjs +133 -133
  19. package/cli/glob.mjs +203 -203
  20. package/cli/help.mjs +325 -323
  21. package/cli/init.mjs +1577 -1577
  22. package/cli/lint.mjs +177 -177
  23. package/cli/main.mjs +65 -65
  24. package/cli/migrate.mjs +368 -368
  25. package/cli/package-loader.mjs +41 -41
  26. package/cli/package.mjs +211 -211
  27. package/dist-library/LocalDocumentView-CP2QG86k.js +114 -0
  28. package/dist-library/{LocalDocumentViewCore-DXE0I0Qc.js → LocalDocumentViewCore-Cd6yMEkg.js} +379 -9445
  29. package/dist-library/LocalReactiveDocumentCore-VuYpZqdn.js +283 -0
  30. package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
  31. package/dist-library/authoring-Bwu_zCWs.js +768 -0
  32. package/dist-library/chart-B1TUtzm-.js +3 -0
  33. package/dist-library/choice-values-BItGjPD2.js +58 -0
  34. package/dist-library/color-values-r8Wf7ALn.js +6 -0
  35. package/dist-library/compile-B35rfzKr.js +1742 -0
  36. package/dist-library/compile-cache-key-D21X2Obx.js +28 -0
  37. package/dist-library/compiler-DBwLawMZ.js +98 -0
  38. package/dist-library/{compiler-core-DDDdvuLy.js → compiler-core-kkDiQ1RK.js} +4202 -3496
  39. package/dist-library/component-kernel-CsJSabHX.js +372 -0
  40. package/dist-library/{component-state-BRwvTV0d.js → component-state-Da0G8Ajc.js} +1 -1
  41. package/dist-library/component-utils-ZM3jUJNy.js +339 -0
  42. package/dist-library/conditional-branches-CIhJXasR.js +17 -0
  43. package/dist-library/config-validation-DbmsWAEV.js +469 -0
  44. package/dist-library/controls-DRy5rzzN.js +5970 -0
  45. package/dist-library/controls-DWlx-AQl.js +3 -0
  46. package/dist-library/{coordinate-B1VFK9fd.js → coordinate-c54pHfgf.js} +89 -89
  47. package/dist-library/data-BtFlkJzp.js +3 -0
  48. package/dist-library/data-table-CSAkm1eU.js +290 -0
  49. package/dist-library/data-table-model-DruztQFt.js +391 -0
  50. package/dist-library/data-visuals-rZQUeQM0.js +384 -0
  51. package/dist-library/{default-components-s21NevON.js → default-components-B-39etG9.js} +518 -355
  52. package/dist-library/{config-DXLvctiZ.js → default-config-CCa8rm2k.js} +265 -230
  53. package/dist-library/default-options-By16CVw1.js +131 -0
  54. package/dist-library/{registry-D6OGkOcX.js → default-registry-DXJy66xj.js} +4 -4
  55. package/dist-library/default-schema-CeYiEW1K.js +33 -0
  56. package/dist-library/diagram-BLepzI8l.js +3 -0
  57. package/dist-library/display-Bb6hAG5T.js +2065 -0
  58. package/dist-library/dist-Cueh1Psp.js +4761 -0
  59. package/dist-library/{document-theme-C8J6UyNO.js → document-theme-CJvN-nC1.js} +246 -4
  60. package/dist-library/{export-CIAIPBov.js → export-BSV4E0jv.js} +135 -135
  61. package/dist-library/font-aliases-CKYjwn4o.js +4 -0
  62. package/dist-library/gallery-BC6FYTqw.js +3 -0
  63. package/dist-library/{gallery-Dv1rOvL0.js → gallery-DM2yTVZJ.js} +1 -1
  64. package/dist-library/{html-Cr4CBwAH.js → html-CY9mC3Sr.js} +49 -48
  65. package/dist-library/{incremental-9nx92u9c.js → incremental-B-wW4H3F.js} +537 -384
  66. package/dist-library/{display-B_uutKkN.js → katex-4ukd4ZxT.js} +1555 -3618
  67. package/dist-library/layout-CPQggKxk.js +592 -0
  68. package/dist-library/layout-CaDWsDof.js +3 -0
  69. package/dist-library/limits-CFERRrlC.js +10 -0
  70. package/dist-library/localization-COdJ6lw2.js +6 -0
  71. package/dist-library/mafs-CnzDC5CR.js +3 -0
  72. package/dist-library/math-view-CyGTS6kv.js +20 -0
  73. package/dist-library/motion-tokens-Czk0RDmS.js +283 -0
  74. package/dist-library/mount-preset-DtrCX4G8.js +24 -0
  75. package/dist-library/numeric-sliders-BmJ1LCLx.js +542 -0
  76. package/dist-library/{observability-4KqXhIEU.js → observability-BVQ16ByQ.js} +125 -43
  77. package/dist-library/package-core-Cu_r_qs7.js +128 -0
  78. package/dist-library/parser-BHl9Lxbw.js +8 -0
  79. package/dist-library/parser-standard-DDAKv_DZ.js +4872 -0
  80. package/dist-library/plugin-packs-CkI0floL.js +19 -0
  81. package/dist-library/preset-core-BKPbH_Nv.js +1371 -0
  82. package/dist-library/props-0iDqxlTk.js +174 -0
  83. package/dist-library/react-74jdGBmu.js +32 -0
  84. package/dist-library/reactive-md-authoring.js +315 -296
  85. package/dist-library/reactive-md-build.js +334 -43
  86. package/dist-library/reactive-md-compiler-session.js +4 -0
  87. package/dist-library/reactive-md-compiler-standard.js +10 -10
  88. package/dist-library/reactive-md-compiler.js +3 -3
  89. package/dist-library/reactive-md-contracts.js +6 -0
  90. package/dist-library/reactive-md-default-packs.js +32 -15
  91. package/dist-library/reactive-md-default-preset.js +7 -7
  92. package/dist-library/reactive-md-export.js +6 -5
  93. package/dist-library/reactive-md-minimal-preset.js +3 -2
  94. package/dist-library/reactive-md-minimal-react-preset.js +26 -23
  95. package/dist-library/reactive-md-minimal.css +1 -1
  96. package/dist-library/reactive-md-observability.js +125 -3
  97. package/dist-library/reactive-md-pack-style-manifest.js +805 -0
  98. package/dist-library/reactive-md-plugin-chart.js +14 -9
  99. package/dist-library/reactive-md-plugin-data.js +8 -8
  100. package/dist-library/reactive-md-plugin-diagram.js +7 -6
  101. package/dist-library/reactive-md-plugin-forms.js +14 -13
  102. package/dist-library/reactive-md-plugin-gallery.js +6 -5
  103. package/dist-library/reactive-md-plugin-navigation.js +8 -8
  104. package/dist-library/reactive-md-plugin-network.js +13 -13
  105. package/dist-library/reactive-md-plugin-plot.js +7 -6
  106. package/dist-library/reactive-md-print.css +304 -304
  107. package/dist-library/reactive-md-react-component-accordion.js +10 -0
  108. package/dist-library/reactive-md-react-component-alert.js +10 -0
  109. package/dist-library/reactive-md-react-component-anchor.js +10 -0
  110. package/dist-library/reactive-md-react-component-badge.js +10 -0
  111. package/dist-library/reactive-md-react-component-card.js +10 -0
  112. package/dist-library/reactive-md-react-component-chart.js +22 -0
  113. package/dist-library/reactive-md-react-component-checkbox.js +10 -0
  114. package/dist-library/reactive-md-react-component-checklist.js +10 -0
  115. package/dist-library/reactive-md-react-component-choices.js +10 -0
  116. package/dist-library/reactive-md-react-component-column.js +6 -0
  117. package/dist-library/reactive-md-react-component-coordinate.js +21 -0
  118. package/dist-library/reactive-md-react-component-counter.js +10 -0
  119. package/dist-library/reactive-md-react-component-data-table.js +14 -0
  120. package/dist-library/reactive-md-react-component-date.js +10 -0
  121. package/dist-library/reactive-md-react-component-diagram.js +22 -0
  122. package/dist-library/reactive-md-react-component-disclosure.js +10 -0
  123. package/dist-library/reactive-md-react-component-edge.js +22 -0
  124. package/dist-library/reactive-md-react-component-else.js +10 -0
  125. package/dist-library/reactive-md-react-component-gallery-item.js +10 -0
  126. package/dist-library/reactive-md-react-component-gallery.js +10 -0
  127. package/dist-library/reactive-md-react-component-grid.js +10 -0
  128. package/dist-library/reactive-md-react-component-if.js +10 -0
  129. package/dist-library/reactive-md-react-component-input.js +10 -0
  130. package/dist-library/reactive-md-react-component-jump.js +10 -0
  131. package/dist-library/reactive-md-react-component-multi-select.js +10 -0
  132. package/dist-library/reactive-md-react-component-node.js +22 -0
  133. package/dist-library/reactive-md-react-component-number.js +10 -0
  134. package/dist-library/reactive-md-react-component-option.js +10 -0
  135. package/dist-library/reactive-md-react-component-panel.js +10 -0
  136. package/dist-library/reactive-md-react-component-plot.js +26 -0
  137. package/dist-library/reactive-md-react-component-progress.js +10 -0
  138. package/dist-library/reactive-md-react-component-quiz.js +10 -0
  139. package/dist-library/reactive-md-react-component-radio-group.js +10 -0
  140. package/dist-library/reactive-md-react-component-range-slider.js +10 -0
  141. package/dist-library/reactive-md-react-component-section.js +10 -0
  142. package/dist-library/reactive-md-react-component-select.js +10 -0
  143. package/dist-library/reactive-md-react-component-slider.js +10 -0
  144. package/dist-library/reactive-md-react-component-step.js +10 -0
  145. package/dist-library/reactive-md-react-component-steps.js +10 -0
  146. package/dist-library/reactive-md-react-component-tab.js +10 -0
  147. package/dist-library/reactive-md-react-component-table.js +14 -0
  148. package/dist-library/reactive-md-react-component-tabs.js +10 -0
  149. package/dist-library/reactive-md-react-component-text.js +10 -0
  150. package/dist-library/reactive-md-react-component-textarea.js +10 -0
  151. package/dist-library/reactive-md-react-component-timeline.js +14 -0
  152. package/dist-library/reactive-md-react-component-timer.js +10 -0
  153. package/dist-library/reactive-md-react-component-toggle.js +10 -0
  154. package/dist-library/reactive-md-react-component-tooltip.js +10 -0
  155. package/dist-library/reactive-md-react-component-validation.js +10 -0
  156. package/dist-library/reactive-md-react-minimal.js +4 -4
  157. package/dist-library/reactive-md-react-pack-controls.js +44 -0
  158. package/dist-library/reactive-md-react-pack-data.js +21 -0
  159. package/dist-library/reactive-md-react-pack-layout.js +37 -0
  160. package/dist-library/reactive-md-react-pack-visuals.js +43 -0
  161. package/dist-library/reactive-md-react-packed.js +50 -0
  162. package/dist-library/reactive-md-react-server.js +29 -27
  163. package/dist-library/reactive-md-react-static-server.js +24 -0
  164. package/dist-library/reactive-md-react-static.js +1 -0
  165. package/dist-library/reactive-md-react-unstyled.js +15 -12
  166. package/dist-library/reactive-md-react.js +15 -12
  167. package/dist-library/reactive-md-scan.js +1 -0
  168. package/dist-library/reactive-md-sdk.js +23 -9
  169. package/dist-library/reactive-md-standalone-configured.js +2 -2
  170. package/dist-library/reactive-md-standalone-host.js +2 -2
  171. package/dist-library/reactive-md-testing-browser.js +2 -2
  172. package/dist-library/reactive-md-testing-react.js +32 -32
  173. package/dist-library/reactive-md-testing.js +12 -12
  174. package/dist-library/reactive-md-vite.js +25 -9
  175. package/dist-library/reactive-md-worker-pool.js +401 -0
  176. package/dist-library/reactive-md.css +1 -1
  177. package/dist-library/reactive-md.js +97 -1554
  178. package/dist-library/registry-core-DxEaxhJ6.js +126 -0
  179. package/dist-library/render-nodes-B6j6Ip5I.js +9404 -0
  180. package/dist-library/requirements-C56sFIEs.js +157 -0
  181. package/dist-library/resources-6VaNgk-h.js +74 -0
  182. package/dist-library/rmd-pack-controls.css +1032 -0
  183. package/dist-library/rmd-pack-data.css +724 -0
  184. package/dist-library/rmd-pack-layout.css +1834 -0
  185. package/dist-library/rmd-pack-resource-chart.css +300 -0
  186. package/dist-library/rmd-pack-resource-controls.css +781 -0
  187. package/dist-library/rmd-pack-resource-data-visuals.css +501 -0
  188. package/dist-library/rmd-pack-resource-diagram.css +106 -0
  189. package/dist-library/rmd-pack-resource-gallery.css +346 -0
  190. package/dist-library/rmd-pack-resource-graphics.css +516 -0
  191. package/dist-library/rmd-pack-resource-layout.css +1489 -0
  192. package/dist-library/rmd-pack-resource-mafs-core.css +124 -0
  193. package/dist-library/rmd-pack-resource-mafs.css +129 -0
  194. package/dist-library/rmd-pack-resource-visual-base.css +224 -0
  195. package/dist-library/rmd-pack-visuals.css +1394 -0
  196. package/dist-library/runtime-BHeuLOv_.js +1369 -0
  197. package/dist-library/runtime-requirement-DzPO8raU.js +772 -0
  198. package/dist-library/schema-core-CDXfxdID.js +155 -0
  199. package/dist-library/sdk-core-CnE-n0Z7.js +1295 -0
  200. package/dist-library/{session-core-dxQCJBNa.js → session-core-C071yQwV.js} +147 -133
  201. package/dist-library/sha256-utf16-Bmandi_H.js +937 -0
  202. package/dist-library/shareable-CHCDnl6j.js +844 -0
  203. package/dist-library/shared-bTzN-F4g.js +3 -0
  204. package/dist-library/structural-views-30-YD_TJ.js +11 -0
  205. package/dist-library/table-surface-CfZn_tk-.js +13 -0
  206. package/dist-library/types/assemblies/compile-cache-key.d.ts +11 -0
  207. package/dist-library/types/assemblies/default-config.d.ts +35 -0
  208. package/dist-library/types/{local/configuration/options.d.ts → assemblies/default-options.d.ts} +4 -4
  209. package/dist-library/types/assemblies/default-registry.d.ts +18 -0
  210. package/dist-library/types/{local/configuration/schema.d.ts → assemblies/default-schema.d.ts} +4 -4
  211. package/dist-library/types/authoring/catalog.d.ts +14 -2
  212. package/dist-library/types/authoring/extensions.d.ts +1 -1
  213. package/dist-library/types/authoring/index.d.ts +4 -4
  214. package/dist-library/types/authoring/templates.d.ts +1 -1
  215. package/dist-library/types/compiler/index.d.ts +1 -0
  216. package/dist-library/types/compiler/session.d.ts +19 -0
  217. package/dist-library/types/compiler/standard.d.ts +1 -0
  218. package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
  219. package/dist-library/types/components/chart/default-chart.d.ts +7 -0
  220. package/dist-library/types/components/entries/accordion.d.ts +3 -0
  221. package/dist-library/types/components/entries/alert.d.ts +3 -0
  222. package/dist-library/types/components/entries/anchor.d.ts +3 -0
  223. package/dist-library/types/components/entries/badge.d.ts +3 -0
  224. package/dist-library/types/components/entries/card.d.ts +3 -0
  225. package/dist-library/types/components/entries/chart.d.ts +3 -0
  226. package/dist-library/types/components/entries/checkbox.d.ts +3 -0
  227. package/dist-library/types/components/entries/checklist.d.ts +3 -0
  228. package/dist-library/types/components/entries/choices.d.ts +3 -0
  229. package/dist-library/types/components/entries/column.d.ts +3 -0
  230. package/dist-library/types/components/entries/coordinate.d.ts +3 -0
  231. package/dist-library/types/components/entries/counter.d.ts +3 -0
  232. package/dist-library/types/components/entries/data-table.d.ts +3 -0
  233. package/dist-library/types/components/entries/date.d.ts +3 -0
  234. package/dist-library/types/components/entries/diagram.d.ts +3 -0
  235. package/dist-library/types/components/entries/disclosure.d.ts +3 -0
  236. package/dist-library/types/components/entries/edge.d.ts +3 -0
  237. package/dist-library/types/components/entries/else.d.ts +3 -0
  238. package/dist-library/types/components/entries/gallery-item.d.ts +3 -0
  239. package/dist-library/types/components/entries/gallery.d.ts +3 -0
  240. package/dist-library/types/components/entries/grid.d.ts +3 -0
  241. package/dist-library/types/components/entries/if.d.ts +3 -0
  242. package/dist-library/types/components/entries/input.d.ts +3 -0
  243. package/dist-library/types/components/entries/jump.d.ts +3 -0
  244. package/dist-library/types/components/entries/multi-select.d.ts +3 -0
  245. package/dist-library/types/components/entries/node.d.ts +3 -0
  246. package/dist-library/types/components/entries/number.d.ts +3 -0
  247. package/dist-library/types/components/entries/option.d.ts +3 -0
  248. package/dist-library/types/components/entries/panel.d.ts +3 -0
  249. package/dist-library/types/components/entries/plot.d.ts +3 -0
  250. package/dist-library/types/components/entries/progress.d.ts +3 -0
  251. package/dist-library/types/components/entries/quiz.d.ts +3 -0
  252. package/dist-library/types/components/entries/radio-group.d.ts +3 -0
  253. package/dist-library/types/components/entries/range-slider.d.ts +3 -0
  254. package/dist-library/types/components/entries/section.d.ts +3 -0
  255. package/dist-library/types/components/entries/select.d.ts +3 -0
  256. package/dist-library/types/components/entries/slider.d.ts +3 -0
  257. package/dist-library/types/components/entries/step.d.ts +3 -0
  258. package/dist-library/types/components/entries/steps.d.ts +3 -0
  259. package/dist-library/types/components/entries/tab.d.ts +3 -0
  260. package/dist-library/types/components/entries/table.d.ts +3 -0
  261. package/dist-library/types/components/entries/tabs.d.ts +3 -0
  262. package/dist-library/types/components/entries/text.d.ts +3 -0
  263. package/dist-library/types/components/entries/textarea.d.ts +3 -0
  264. package/dist-library/types/components/entries/timeline.d.ts +3 -0
  265. package/dist-library/types/components/entries/timer.d.ts +3 -0
  266. package/dist-library/types/components/entries/toggle.d.ts +3 -0
  267. package/dist-library/types/components/entries/tooltip.d.ts +3 -0
  268. package/dist-library/types/components/entries/validation.d.ts +3 -0
  269. package/dist-library/types/components/layout/layout.d.ts +6 -3
  270. package/dist-library/types/components/layout/structural-views.d.ts +3 -0
  271. package/dist-library/types/components/mount-preset.d.ts +2 -0
  272. package/dist-library/types/components/packs/controls.d.ts +2 -0
  273. package/dist-library/types/components/packs/data.d.ts +2 -0
  274. package/dist-library/types/components/packs/layout.d.ts +2 -0
  275. package/dist-library/types/components/packs/visuals.d.ts +2 -0
  276. package/dist-library/types/components/shared/data-visuals.d.ts +3 -0
  277. package/dist-library/types/components/shared/table-surface.d.ts +10 -0
  278. package/dist-library/types/components/shared/visual-helpers.d.ts +24 -0
  279. package/dist-library/types/components/shared/visuals.d.ts +1 -3
  280. package/dist-library/types/components/table/data-table-model.d.ts +141 -0
  281. package/dist-library/types/components/table/data-table.d.ts +3 -50
  282. package/dist-library/types/{local/configuration → contracts}/component-kernel.d.ts +9 -2
  283. package/dist-library/types/contracts/font-aliases.d.ts +18 -0
  284. package/dist-library/types/contracts/index.d.ts +8 -0
  285. package/dist-library/types/{local/configuration → contracts}/limits.d.ts +9 -1
  286. package/dist-library/types/contracts/localization.d.ts +6 -0
  287. package/dist-library/types/contracts/number-literal.d.ts +2 -0
  288. package/dist-library/types/contracts/runtime-types.d.ts +19 -0
  289. package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
  290. package/dist-library/types/export/index.d.ts +4 -1
  291. package/dist-library/types/local/compilation/cache-version.d.ts +1 -0
  292. package/dist-library/types/local/compilation/compile-status.d.ts +2 -0
  293. package/dist-library/types/local/compilation/compiler-bindings.d.ts +1 -1
  294. package/dist-library/types/local/compilation/compiler-capabilities.d.ts +4 -1
  295. package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
  296. package/dist-library/types/local/compilation/compiler-core.d.ts +1 -1
  297. package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
  298. package/dist-library/types/local/compilation/compiler-embedding.d.ts +20 -0
  299. package/dist-library/types/local/compilation/compiler-expressions.d.ts +17 -5
  300. package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
  301. package/dist-library/types/local/compilation/compiler-structure.d.ts +9 -3
  302. package/dist-library/types/local/compilation/compiler-tables.d.ts +4 -2
  303. package/dist-library/types/local/compilation/compiler-validation.d.ts +14 -7
  304. package/dist-library/types/local/compilation/compiler-values.d.ts +2 -3
  305. package/dist-library/types/local/compilation/compiler.d.ts +1 -1
  306. package/dist-library/types/local/compilation/component-usage.d.ts +2 -0
  307. package/dist-library/types/local/compilation/runtime-requirement.d.ts +3 -0
  308. package/dist-library/types/local/compilation/session/incremental.d.ts +5 -1
  309. package/dist-library/types/local/compilation/streaming.d.ts +1 -1
  310. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +228 -2
  311. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
  312. package/dist-library/types/local/configuration/embedding.d.ts +4 -0
  313. package/dist-library/types/local/configuration/kernel-value-rules.d.ts +1 -1
  314. package/dist-library/types/local/configuration/options-core.d.ts +8 -2
  315. package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
  316. package/dist-library/types/local/evaluation/computations.d.ts +13 -5
  317. package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
  318. package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
  319. package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
  320. package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
  321. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
  322. package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
  323. package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
  324. package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
  325. package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
  326. package/dist-library/types/local/evaluation/validation.d.ts +8 -6
  327. package/dist-library/types/local/index.d.ts +10 -4
  328. package/dist-library/types/local/observability-core.d.ts +20 -1
  329. package/dist-library/types/local/observability.d.ts +2 -0
  330. package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
  331. package/dist-library/types/local/parsing/parse-budget.d.ts +18 -2
  332. package/dist-library/types/local/parsing/parser-region.d.ts +13 -2
  333. package/dist-library/types/local/parsing/parser-tags.d.ts +6 -1
  334. package/dist-library/types/local/parsing/rmd-recovery.d.ts +8 -0
  335. package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
  336. package/dist-library/types/local/performance-report.d.ts +70 -0
  337. package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
  338. package/dist-library/types/local/runtime/runtime-pool.d.ts +14 -0
  339. package/dist-library/types/local/runtime/runtime.d.ts +3 -1
  340. package/dist-library/types/local/runtime/state.d.ts +30 -15
  341. package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
  342. package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
  343. package/dist-library/types/local/source/authoring.d.ts +10 -0
  344. package/dist-library/types/local/source/source-migration.d.ts +1 -0
  345. package/dist-library/types/local/transport/worker-handler.d.ts +3 -0
  346. package/dist-library/types/local/transport/worker-job.d.ts +12 -2
  347. package/dist-library/types/local/transport/worker-pool.d.ts +68 -0
  348. package/dist-library/types/local/transport/worker.d.ts +14 -0
  349. package/dist-library/types/local/types.d.ts +70 -27
  350. package/dist-library/types/observability.d.ts +1 -0
  351. package/dist-library/types/presets/default-semantics.d.ts +1 -1
  352. package/dist-library/types/presets/identity.d.ts +1 -8
  353. package/dist-library/types/presets/pack-style-entry.d.ts +3 -0
  354. package/dist-library/types/presets/pack-style-manifest.d.ts +11 -0
  355. package/dist-library/types/react/component-api.d.ts +24 -4
  356. package/dist-library/types/react/component-loader.d.ts +61 -0
  357. package/dist-library/types/react/component-primitives.d.ts +5 -5
  358. package/dist-library/types/react/component-utils.d.ts +11 -0
  359. package/dist-library/types/react/font-aliases.d.ts +2 -0
  360. package/dist-library/types/react/index.d.ts +9 -5
  361. package/dist-library/types/react/localization.d.ts +5 -6
  362. package/dist-library/types/react/minimal.d.ts +2 -2
  363. package/dist-library/types/react/package-core.d.ts +6 -0
  364. package/dist-library/types/react/packed.d.ts +17 -0
  365. package/dist-library/types/react/render-lifecycle.d.ts +9 -0
  366. package/dist-library/types/{local → react}/rendering/document/ExtendedHtmlFragment.d.ts +1 -1
  367. package/dist-library/types/{local → react}/rendering/document/LocalDocumentViewCore.d.ts +11 -4
  368. package/dist-library/types/react/rendering/document/LocalPooledDocumentView.d.ts +8 -0
  369. package/dist-library/types/react/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
  370. package/dist-library/types/react/rendering/document/LocalStaticDocumentView.d.ts +18 -0
  371. package/dist-library/types/react/rendering/document/StaticExternalSlot.d.ts +25 -0
  372. package/dist-library/types/react/rendering/document/StaticHostData.d.ts +14 -0
  373. package/dist-library/types/{local → react}/rendering/document/render-nodes.d.ts +8 -8
  374. package/dist-library/types/react/rendering/document/static-runtime.d.ts +11 -0
  375. package/dist-library/types/{local → react}/rendering/document/use-author-script.d.ts +2 -2
  376. package/dist-library/types/{local → react}/rendering/document/validation-state.d.ts +3 -3
  377. package/dist-library/types/{local → react}/rendering/document/view-render-context.d.ts +40 -8
  378. package/dist-library/types/{local → react}/rendering/document/view-revision.d.ts +5 -14
  379. package/dist-library/types/{local → react}/rendering/render-types.d.ts +5 -5
  380. package/dist-library/types/react/rendering/table/data-table.d.ts +5 -0
  381. package/dist-library/types/{local → react}/rendering/table/table-numeric-columns.d.ts +3 -3
  382. package/dist-library/types/react/sdk-core.d.ts +15 -4
  383. package/dist-library/types/react/sdk.d.ts +2 -1
  384. package/dist-library/types/react/server.d.ts +3 -10
  385. package/dist-library/types/react/static-server.d.ts +12 -0
  386. package/dist-library/types/scan/index.d.ts +15 -0
  387. package/dist-library/types/sdk/assembly.d.ts +3 -0
  388. package/dist-library/types/sdk/config.d.ts +2 -35
  389. package/dist-library/types/sdk/default-identity.d.ts +3 -0
  390. package/dist-library/types/sdk/font.d.ts +13 -0
  391. package/dist-library/types/sdk/index.d.ts +2 -1
  392. package/dist-library/types/sdk/preset.d.ts +9 -0
  393. package/dist-library/types/sdk/props.d.ts +8 -3
  394. package/dist-library/types/sdk/registry-core.d.ts +2 -2
  395. package/dist-library/types/sdk/registry.d.ts +2 -18
  396. package/dist-library/types/sdk/theme.d.ts +5 -0
  397. package/dist-library/types/sdk/types.d.ts +8 -2
  398. package/dist-library/types/sdk/version.d.ts +2 -0
  399. package/dist-library/types/shareable.d.ts +15 -3
  400. package/dist-library/types/standalone/prepare.d.ts +4 -2
  401. package/dist-library/types/standalone/session-core.d.ts +5 -2
  402. package/dist-library/types/vite/index.d.ts +3 -0
  403. package/dist-library/types/vite/registration.d.ts +1 -0
  404. package/dist-library/{types-Ib5kSScP.js → types-B4qG8J4S.js} +1 -1
  405. package/dist-library/types-FYhRWRn9.js +3 -0
  406. package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
  407. package/dist-library/validation-DRuW0Wl9.js +433 -0
  408. package/dist-library/{version-DAxuGOG2.js → version-4wzhbvDG.js} +24 -33
  409. package/dist-library/visual-frame-y5RFhJ0_.js +19 -0
  410. package/dist-library/visual-helpers-UU6xiL8g.js +75 -0
  411. package/dist-library/visuals-7xzoL9ql.js +49340 -0
  412. package/dist-library/visuals-CdHezgh5.js +3 -0
  413. package/dist-library/worker-3ldRjOEG.js +1632 -0
  414. package/dist-standalone/reactive-md-standalone.css +1 -1
  415. package/dist-standalone/reactive-md-standalone.js +127 -366
  416. package/docs/README-ch.md +104 -101
  417. package/docs/README.md +104 -101
  418. package/docs/compatibility/api-stability-ch.md +1 -1
  419. package/docs/compatibility/api-stability-en.md +1 -1
  420. package/docs/compatibility/compatibility-ch.md +146 -146
  421. package/docs/compatibility/compatibility-en.md +146 -146
  422. package/docs/compatibility/compatibility-manifest.schema.json +3 -2
  423. package/docs/compatibility/deprecation-ch.md +2 -2
  424. package/docs/compatibility/deprecation-en.md +2 -2
  425. package/docs/compatibility/source-versioning-ch.md +170 -162
  426. package/docs/compatibility/source-versioning-en.md +171 -162
  427. package/docs/compatibility/support-matrix-ch.md +4 -3
  428. package/docs/compatibility/support-matrix-en.md +4 -3
  429. package/docs/development/component-development-ch.md +66 -66
  430. package/docs/development/component-development-en.md +66 -66
  431. package/docs/development/component-development-reference-ch.md +269 -253
  432. package/docs/development/component-development-reference-en.md +254 -238
  433. package/docs/development/component-protocol-ch.md +768 -748
  434. package/docs/development/component-protocol-en.md +770 -750
  435. package/docs/development/extension-tutorial-ch.md +308 -308
  436. package/docs/development/extension-tutorial-en.md +308 -308
  437. package/docs/development/performance-overview-ch.md +422 -422
  438. package/docs/development/performance-overview-en.md +422 -422
  439. package/docs/guides/local-guide-ch.md +621 -532
  440. package/docs/guides/local-guide-en.md +621 -532
  441. package/docs/integration/author-tools-ch.md +66 -64
  442. package/docs/integration/author-tools-en.md +66 -64
  443. package/docs/integration/compiler-ch.md +90 -49
  444. package/docs/integration/compiler-en.md +77 -36
  445. package/docs/integration/directory-discovery-en.md +1 -1
  446. package/docs/integration/editor-ch.md +295 -295
  447. package/docs/integration/editor-en.md +303 -303
  448. package/docs/integration/extension-sdk-ch.md +424 -394
  449. package/docs/integration/extension-sdk-en.md +409 -379
  450. package/docs/integration/local-integration-ch.md +648 -646
  451. package/docs/integration/local-integration-en.md +664 -662
  452. package/docs/integration/pdf-export-ch.md +42 -0
  453. package/docs/integration/pdf-export-en.md +42 -0
  454. package/docs/integration/shareable-export-ch.md +299 -307
  455. package/docs/integration/shareable-export-en.md +301 -309
  456. package/docs/reference/diagnostics-counting-ch.md +127 -104
  457. package/docs/reference/diagnostics-counting-en.md +127 -104
  458. package/docs/reference/html-compatibility-ch.md +93 -93
  459. package/docs/reference/html-compatibility-en.md +95 -95
  460. package/docs/reference/local-interaction-syntax-ch.md +913 -724
  461. package/docs/reference/local-interaction-syntax-en.md +911 -722
  462. package/docs/reference/public-api-ch.md +134 -21
  463. package/docs/reference/public-api-en.md +134 -21
  464. package/docs/reference/theme-protocol-ch.md +198 -198
  465. package/docs/reference/theme-protocol-en.md +217 -217
  466. package/docs/releases/release-0.10.0-ch.md +45 -0
  467. package/docs/releases/release-0.10.0-en.md +45 -0
  468. package/docs/releases/release-0.4.0-ch.md +91 -91
  469. package/docs/releases/release-0.4.0-en.md +91 -91
  470. package/docs/releases/release-0.4.1-ch.md +25 -25
  471. package/docs/releases/release-0.4.1-en.md +25 -25
  472. package/docs/releases/release-0.5.0-ch.md +43 -43
  473. package/docs/releases/release-0.5.0-en.md +43 -43
  474. package/docs/releases/release-0.5.1-ch.md +41 -41
  475. package/docs/releases/release-0.5.1-en.md +41 -41
  476. package/docs/releases/release-0.5.2-ch.md +37 -37
  477. package/docs/releases/release-0.5.2-en.md +37 -37
  478. package/docs/releases/release-0.5.3-ch.md +26 -26
  479. package/docs/releases/release-0.5.3-en.md +26 -26
  480. package/docs/releases/release-0.6.0-ch.md +59 -59
  481. package/docs/releases/release-0.6.0-en.md +59 -59
  482. package/docs/releases/release-0.6.1-ch.md +29 -29
  483. package/docs/releases/release-0.6.1-en.md +29 -29
  484. package/docs/releases/release-0.7.0-ch.md +86 -86
  485. package/docs/releases/release-0.7.0-en.md +86 -86
  486. package/docs/releases/release-0.9.3-ch.md +45 -0
  487. package/docs/releases/release-0.9.3-en.md +45 -0
  488. package/examples/component-package/README-ch.md +101 -101
  489. package/examples/component-package/README.md +133 -133
  490. package/examples/conformance/README-ch.md +55 -55
  491. package/examples/conformance/README.md +55 -55
  492. package/examples/conformance/component-protocol-1.json +482 -482
  493. package/examples/conformance/component-protocol-1.schema.json +76 -76
  494. package/examples/conformance/local-draft-1.json +50 -50
  495. package/examples/conformance/local-draft-2.json +212 -212
  496. package/examples/conformance/local-draft-4.json +441 -0
  497. package/examples/game-2048-package/LICENSE +21 -21
  498. package/examples/game-2048-package/NOTICES.md +11 -11
  499. package/examples/game-2048-package/README-ch.md +91 -91
  500. package/examples/game-2048-package/README.md +98 -98
  501. package/examples/game-2048-package/package.json +35 -35
  502. package/examples/game-2048-package/sample/document.reactive.md +17 -17
  503. package/examples/game-2048-package/scripts/build-export.mjs +44 -44
  504. package/examples/game-2048-package/scripts/build.mjs +130 -130
  505. package/examples/game-2048-package/scripts/verify.mjs +180 -180
  506. package/examples/game-2048-package/src/component.css +161 -161
  507. package/examples/game-2048-package/src/components.tsx +326 -326
  508. package/examples/game-2048-package/src/game-engine.ts +228 -228
  509. package/examples/game-2048-package/src/harness.tsx +34 -34
  510. package/examples/game-2048-package/src/manifest.ts +85 -85
  511. package/examples/game-2048-package/src/node-entry.ts +30 -30
  512. package/examples/game-2048-package/src/sample.ts +4 -4
  513. package/examples/game-2048-package/tsconfig.json +15 -15
  514. package/examples/integration/README-ch.md +114 -82
  515. package/examples/integration/README.md +114 -82
  516. package/examples/integration/chat-session/index.mjs +91 -0
  517. package/examples/integration/chat-session/package.json +10 -0
  518. package/examples/integration/core/index.mjs +32 -32
  519. package/examples/integration/extension-sdk/README-ch.md +24 -24
  520. package/examples/integration/extension-sdk/README.md +24 -24
  521. package/examples/integration/static-embed/embed.mjs +44 -0
  522. package/examples/integration/static-embed/index.html +12 -0
  523. package/examples/integration/static-embed/main.mjs +24 -0
  524. package/examples/integration/static-embed/references.mjs +5 -0
  525. package/examples/integration/static-embed/render.mjs +10 -0
  526. package/examples/integration/worker/index.html +19 -19
  527. package/examples/integration/worker/main.js +61 -61
  528. package/examples/integration/worker/package.json +13 -13
  529. package/examples/integration/worker/worker.js +3 -3
  530. package/examples/local/README-ch.md +76 -76
  531. package/examples/local/README.md +76 -76
  532. package/examples/local/charts.reactive.md +73 -73
  533. package/examples/local/recipes/invoice-zh.reactive.md +36 -36
  534. package/examples/local/recipes/invoice.reactive.md +36 -36
  535. package/examples/local/recipes/workshop-zh.reactive.md +33 -33
  536. package/examples/local/recipes/workshop.reactive.md +33 -33
  537. package/examples/local/showcase/README-ch.md +22 -22
  538. package/examples/local/showcase/README.md +31 -31
  539. package/examples/local/showcase/explore.reactive.md +102 -102
  540. package/examples/local/showcase/flow.reactive.md +86 -86
  541. package/examples/local/showcase/forms.reactive.md +126 -126
  542. package/examples/local/showcase/functions.reactive.md +119 -119
  543. package/examples/local/showcase/layout.reactive.md +100 -100
  544. package/examples/local/showcase/statistics.reactive.md +108 -108
  545. package/examples/local/showcase/tasks.reactive.md +89 -89
  546. package/examples/local/showcase/zh/explore.reactive.md +102 -102
  547. package/examples/local/showcase/zh/flow.reactive.md +86 -86
  548. package/examples/local/showcase/zh/forms.reactive.md +126 -126
  549. package/examples/local/showcase/zh/functions.reactive.md +119 -119
  550. package/examples/local/showcase/zh/layout.reactive.md +100 -100
  551. package/examples/local/showcase/zh/statistics.reactive.md +108 -108
  552. package/examples/local/showcase/zh/tasks.reactive.md +89 -89
  553. package/examples/minimal-extension/README-ch.md +78 -78
  554. package/examples/minimal-extension/README.md +78 -78
  555. package/examples/minimal-extension/index.html +15 -15
  556. package/examples/minimal-extension/package.json +26 -26
  557. package/examples/minimal-extension/sample/document.reactive.md +10 -10
  558. package/examples/minimal-extension/scripts/build.mjs +32 -32
  559. package/examples/minimal-extension/scripts/export.mjs +72 -72
  560. package/examples/minimal-extension/scripts/test-node.mjs +75 -75
  561. package/examples/minimal-extension/src/extension.tsx +90 -90
  562. package/examples/minimal-extension/src/preview.tsx +12 -12
  563. package/examples/minimal-extension/src/source.ts +4 -4
  564. package/examples/minimal-extension/tsconfig.json +14 -14
  565. package/examples/sci-fi-theme/README-ch.md +133 -133
  566. package/examples/sci-fi-theme/README.md +148 -148
  567. package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -454
  568. package/examples/sci-fi-theme/demo/demo.css +638 -638
  569. package/examples/sci-fi-theme/demo/document.reactive.md +206 -206
  570. package/examples/sci-fi-theme/demo/index.html +13 -13
  571. package/examples/sci-fi-theme/demo/main.tsx +215 -215
  572. package/examples/sci-fi-theme/docs/design-system-ch.md +245 -245
  573. package/examples/sci-fi-theme/docs/design-system.md +474 -474
  574. package/examples/sci-fi-theme/package.json +28 -28
  575. package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -98
  576. package/examples/sci-fi-theme/src/components.css +2370 -2370
  577. package/examples/sci-fi-theme/src/index.ts +6 -6
  578. package/examples/sci-fi-theme/src/notch.css +142 -142
  579. package/examples/sci-fi-theme/src/sci-fi.css +7 -7
  580. package/examples/sci-fi-theme/src/theme.ts +39 -39
  581. package/examples/sci-fi-theme/tsconfig.json +20 -20
  582. package/examples/sci-fi-theme/vite.config.ts +24 -24
  583. package/examples/tetris-package/LICENSE +21 -21
  584. package/examples/tetris-package/NOTICES.md +11 -11
  585. package/examples/tetris-package/README-ch.md +91 -91
  586. package/examples/tetris-package/README.md +95 -95
  587. package/examples/tetris-package/package.json +35 -35
  588. package/examples/tetris-package/sample/document.reactive.md +16 -16
  589. package/examples/tetris-package/scripts/build-export.mjs +44 -44
  590. package/examples/tetris-package/scripts/build.mjs +130 -130
  591. package/examples/tetris-package/scripts/verify.mjs +173 -173
  592. package/examples/tetris-package/src/component.css +145 -145
  593. package/examples/tetris-package/src/components.tsx +334 -334
  594. package/examples/tetris-package/src/harness.tsx +34 -34
  595. package/examples/tetris-package/src/manifests.ts +93 -93
  596. package/examples/tetris-package/src/node-entry.ts +16 -16
  597. package/examples/tetris-package/src/sample.ts +4 -4
  598. package/examples/tetris-package/src/tetris-engine.ts +325 -325
  599. package/examples/tetris-package/tsconfig.json +15 -15
  600. package/package.json +66 -2
  601. package/dist-library/LocalDocumentView-BuqgJZEY.js +0 -109
  602. package/dist-library/LocalReactiveDocumentCore-CWBe4Mm5.js +0 -275
  603. package/dist-library/authoring-Ci_KzJ0q.js +0 -892
  604. package/dist-library/compile-Dx6Uw3D9.js +0 -1249
  605. package/dist-library/compiler-dxLPB9Ym.js +0 -86
  606. package/dist-library/config-validation-D3D7Dy2J.js +0 -586
  607. package/dist-library/controls-DoZyLCrV.js +0 -6740
  608. package/dist-library/data-table-8-3F15Jf.js +0 -296
  609. package/dist-library/layout-BBB2VF0S.js +0 -562
  610. package/dist-library/mount-preset-DMZ5wd3t.js +0 -13
  611. package/dist-library/options-BBp9IcHm.js +0 -121
  612. package/dist-library/package-core-K5xesGqy.js +0 -117
  613. package/dist-library/parser-standard-CBA1-hdG.js +0 -9630
  614. package/dist-library/plugin-packs-Bh1HhLym.js +0 -19
  615. package/dist-library/preset-core-DeZPA8IE.js +0 -1298
  616. package/dist-library/props-sJ8vk0cr.js +0 -183
  617. package/dist-library/react-0DCh-Mar.js +0 -7
  618. package/dist-library/registry-core-C9xOunaw.js +0 -479
  619. package/dist-library/resources-B0x_w3s9.js +0 -229
  620. package/dist-library/runtime-BpQdZmFI.js +0 -1288
  621. package/dist-library/schema-BryM_VRW.js +0 -40
  622. package/dist-library/sdk-core-ChslheKs.js +0 -1167
  623. package/dist-library/shareable-B8xMoGEa.js +0 -814
  624. package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +0 -6
  625. package/dist-library/types/local/rendering/table/data-table.d.ts +0 -13
  626. package/dist-library/types-daDo2c_w.js +0 -3
  627. package/dist-library/validation-B3RI0xOk.js +0 -1123
  628. package/dist-library/visual-frame-_rcd5HUv.js +0 -48
  629. package/dist-library/visuals-DkDhNdEZ.js +0 -72572
  630. /package/dist-library/types/{local/configuration → contracts}/color-values.d.ts +0 -0
  631. /package/dist-library/types/{local/html → contracts}/html-names.d.ts +0 -0
  632. /package/dist-library/types/{local/configuration → contracts}/schema-core.d.ts +0 -0
  633. /package/dist-library/types/{local → react}/rendering/code/code-block.d.ts +0 -0
  634. /package/dist-library/types/{local → react}/rendering/code/code-languages.d.ts +0 -0
  635. /package/dist-library/types/{local → react}/rendering/document/LocalDocumentView.d.ts +0 -0
  636. /package/dist-library/types/{local → react}/rendering/document/use-color-scheme.d.ts +0 -0
  637. /package/dist-library/types/{local → react}/rendering/image/image-view.d.ts +0 -0
  638. /package/dist-library/types/{local → react}/rendering/math-view.d.ts +0 -0
@@ -1,14 +1,16 @@
1
- import { o as e } from "./compile-Dx6Uw3D9.js";
2
- import { b as t } from "./config-validation-D3D7Dy2J.js";
3
- import { t as n } from "./registry-core-C9xOunaw.js";
4
- import { a as r, c as i, d as a, i as o, l as s, o as c, s as l, u } from "./default-components-s21NevON.js";
5
- import { s as d } from "./config-DXLvctiZ.js";
6
- import { r as f, t as p } from "./options-BBp9IcHm.js";
7
- import { t as m } from "./compiler-dxLPB9Ym.js";
8
- import { i as h, n as ee, r as g, t as _ } from "./authoring-Ci_KzJ0q.js";
9
- import { a as v, c as te, i as y, n as ne, o as re, r as ie, s as ae, t as oe } from "./schema-BryM_VRW.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";
10
12
  // src/authoring/editor-i18n.ts
11
- var b = {
13
+ var le = {
12
14
  en: {
13
15
  boldPlaceholder: "bold text",
14
16
  italicPlaceholder: "italic text",
@@ -57,11 +59,11 @@ var b = {
57
59
  }
58
60
  };
59
61
  // src/authoring/editor-commands.ts
60
- function x(e, t) {
62
+ function ue(e, t) {
61
63
  return typeof e != "number" || Number.isNaN(e) ? 0 : Math.min(Math.max(Math.trunc(e), 0), t);
62
64
  }
63
- function S(e, t) {
64
- let n = x(t.start, e.length), r = x(t.end, e.length);
65
+ function x(e, t) {
66
+ let n = ue(t.start, e.length), r = ue(t.end, e.length);
65
67
  return n <= r ? {
66
68
  start: n,
67
69
  end: r
@@ -70,14 +72,14 @@ function S(e, t) {
70
72
  end: n
71
73
  };
72
74
  }
73
- function C(e) {
74
- return b[e] ?? b.en;
75
+ function S(e) {
76
+ return le[e] ?? le.en;
75
77
  }
76
- function w(e, t) {
78
+ function C(e, t) {
77
79
  return t <= 0 ? 0 : e.lastIndexOf("\n", t - 1) + 1;
78
80
  }
79
- function T(e, t) {
80
- let n = w(e, t.start), r = t.end > t.start && e[t.end - 1] === "\n" ? t.end - 1 : t.end, i = e.indexOf("\n", r), a = i === -1 ? e.length : i, o = [], s = n;
81
+ function w(e, t) {
82
+ let n = C(e, t.start), r = t.end > t.start && e[t.end - 1] === "\n" ? t.end - 1 : t.end, i = e.indexOf("\n", r), a = i === -1 ? e.length : i, o = [], s = n;
81
83
  for (;;) {
82
84
  let t = e.indexOf("\n", s), n = t === -1 || t > a ? a : t;
83
85
  if (o.push({
@@ -89,7 +91,7 @@ function T(e, t) {
89
91
  }
90
92
  return o;
91
93
  }
92
- function E(e, t, n) {
94
+ function T(e, t, n) {
93
95
  if (n.length === 0) return {
94
96
  value: e,
95
97
  selection: t
@@ -123,7 +125,7 @@ function E(e, t, n) {
123
125
  }
124
126
  };
125
127
  }
126
- function D(e, t, n, r) {
128
+ function E(e, t, n, r) {
127
129
  return t === e.text ? null : {
128
130
  start: e.start,
129
131
  end: e.end,
@@ -132,13 +134,13 @@ function D(e, t, n, r) {
132
134
  newPrefixLength: r
133
135
  };
134
136
  }
135
- function se(e, t, n, r) {
137
+ function D(e, t, n, r) {
136
138
  return n === "*" ? r ? e[t.start - 1] !== "*" && e[t.end] !== "*" : e[t.start - n.length - 1] !== "*" && e[t.end + n.length] !== "*" : !0;
137
139
  }
138
140
  function O(e, t, n, r) {
139
- let i = S(e, t), a = n.length, { start: o, end: s } = i, c = e.slice(o, s);
141
+ let i = x(e, t), a = n.length, { start: o, end: s } = i, c = e.slice(o, s);
140
142
  if (o !== s) {
141
- if (c.length >= a * 2 && c.startsWith(n) && c.endsWith(n) && (n !== "*" || !c.startsWith("**") && !c.endsWith("**")) && se(e, i, n, !0)) {
143
+ if (c.length >= a * 2 && c.startsWith(n) && c.endsWith(n) && (n !== "*" || !c.startsWith("**") && !c.endsWith("**")) && D(e, i, n, !0)) {
142
144
  let t = c.slice(a, c.length - a);
143
145
  return {
144
146
  value: e.slice(0, o) + t + e.slice(s),
@@ -149,7 +151,7 @@ function O(e, t, n, r) {
149
151
  };
150
152
  }
151
153
  let t = o - a, r = s + a;
152
- return t >= 0 && r <= e.length && e.slice(t, o) === n && e.slice(s, r) === n && se(e, i, n, !1) ? {
154
+ return t >= 0 && r <= e.length && e.slice(t, o) === n && e.slice(s, r) === n && D(e, i, n, !1) ? {
153
155
  value: e.slice(0, t) + c + e.slice(r),
154
156
  selection: {
155
157
  start: t,
@@ -172,14 +174,14 @@ function O(e, t, n, r) {
172
174
  }
173
175
  };
174
176
  }
175
- function ce(e, t, n = "en") {
176
- return O(e, t, "**", C(n).boldPlaceholder);
177
+ function de(e, t, n = "en") {
178
+ return O(e, t, "**", S(n).boldPlaceholder);
177
179
  }
178
- function le(e, t, n = "en") {
179
- return O(e, t, "*", C(n).italicPlaceholder);
180
+ function fe(e, t, n = "en") {
181
+ return O(e, t, "*", S(n).italicPlaceholder);
180
182
  }
181
- function ue(e, t, n = "en") {
182
- return O(e, t, "~~", C(n).strikePlaceholder);
183
+ function pe(e, t, n = "en") {
184
+ return O(e, t, "~~", S(n).strikePlaceholder);
183
185
  }
184
186
  function k(e) {
185
187
  let t = 0;
@@ -191,7 +193,7 @@ function A(e, t, n) {
191
193
  for (; e[t] === "`";) r += 1, t += n;
192
194
  return r;
193
195
  }
194
- function de(e, t) {
196
+ function me(e, t) {
195
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 ? {
196
198
  run: a,
197
199
  padding: 0
@@ -201,10 +203,10 @@ function de(e, t) {
201
203
  } : null, d = s ?? u;
202
204
  return !d || k(i) >= d.run ? null : d;
203
205
  }
204
- function fe(e, t, n = "en") {
205
- let r = S(e, t), { start: i, end: a } = r, o = e.slice(i, a);
206
+ function he(e, t, n = "en") {
207
+ let r = x(e, t), { start: i, end: a } = r, o = e.slice(i, a);
206
208
  if (i === a) {
207
- let t = C(n).inlineCodePlaceholder, r = `\`${t}\``;
209
+ let t = S(n).inlineCodePlaceholder, r = `\`${t}\``;
208
210
  return {
209
211
  value: e.slice(0, i) + r + e.slice(a),
210
212
  selection: {
@@ -224,7 +226,7 @@ function fe(e, t, n = "en") {
224
226
  }
225
227
  };
226
228
  }
227
- let l = de(e, r);
229
+ let l = me(e, r);
228
230
  if (l) {
229
231
  let t = l.run + l.padding;
230
232
  return {
@@ -244,16 +246,16 @@ function fe(e, t, n = "en") {
244
246
  }
245
247
  };
246
248
  }
247
- var pe = /^(#{1,6})[ \t]+/;
248
- function me(e, t, n) {
249
- let r = S(e, t), i = [];
250
- for (let t of T(e, r)) {
251
- let e = pe.exec(t.text), r = e ? e[0].length : 0;
249
+ var ge = /^(#{1,6})[ \t]+/;
250
+ function _e(e, t, n) {
251
+ let r = x(e, t), i = [];
252
+ for (let t of w(e, r)) {
253
+ let e = ge.exec(t.text), r = e ? e[0].length : 0;
252
254
  if (n === 0 && !e) continue;
253
- let a = t.text.slice(r), o = n === 0 ? "" : `${"#".repeat(n)} `, s = D(t, o + a, r, o.length);
255
+ let a = t.text.slice(r), o = n === 0 ? "" : `${"#".repeat(n)} `, s = E(t, o + a, r, o.length);
254
256
  s && i.push(s);
255
257
  }
256
- return E(e, r, i);
258
+ return T(e, r, i);
257
259
  }
258
260
  var j = /^([ \t]*)([-*+] )/, M = /^([ \t]*)(\d+[.)] )/, N = /^([ \t]*)([-*+] \[[ xX]\] )/, P = /^([ \t]*)(> ?)/;
259
261
  function F(e, t) {
@@ -266,12 +268,12 @@ function F(e, t) {
266
268
  prefixLength: r.length + i.length
267
269
  };
268
270
  }
269
- function he(e) {
271
+ function ve(e) {
270
272
  let t = /^[ \t]*/.exec(e);
271
273
  return t ? t[0] : "";
272
274
  }
273
275
  function I(e, t, n, r) {
274
- let i = S(e, t), a = T(e, i), o = a.map((e) => n(e.text)), s = 0, c = !0;
276
+ let i = x(e, t), a = w(e, i), o = a.map((e) => n(e.text)), s = 0, c = !0;
275
277
  for (let e = 0; e < a.length; e += 1) {
276
278
  let t = a[e];
277
279
  (o[e] || t.text.trim().length > 0) && (s += 1, o[e] || (c = !1));
@@ -281,30 +283,30 @@ function I(e, t, n, r) {
281
283
  let t = a[e], n = o[e] ?? null;
282
284
  if (l) {
283
285
  if (!n) continue;
284
- let e = D(t, n.indent + t.text.slice(n.prefixLength), n.prefixLength, n.indent.length);
286
+ let e = E(t, n.indent + t.text.slice(n.prefixLength), n.prefixLength, n.indent.length);
285
287
  e && u.push(e);
286
288
  continue;
287
289
  }
288
- let i = n ? n.indent : he(t.text), s = t.text.slice(n ? n.prefixLength : i.length), c = r(i, e + 1), d = D(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);
289
291
  d && u.push(d);
290
292
  }
291
- return E(e, i, u);
293
+ return T(e, i, u);
292
294
  }
293
- function ge(e, t) {
295
+ function ye(e, t) {
294
296
  return I(e, t, (e) => F(e, j), () => "- ");
295
297
  }
296
- function _e(e, t) {
298
+ function be(e, t) {
297
299
  return I(e, t, (e) => F(e, M), (e, t) => `${t}. `);
298
300
  }
299
- function ve(e, t) {
301
+ function xe(e, t) {
300
302
  return I(e, t, (e) => F(e, N), () => "- [ ] ");
301
303
  }
302
- function ye(e, t) {
304
+ function Se(e, t) {
303
305
  return I(e, t, (e) => F(e, P), () => "> ");
304
306
  }
305
- function be(e, t) {
306
- let n = S(e, t);
307
- return E(e, n, T(e, n).map((e) => ({
307
+ function Ce(e, t) {
308
+ let n = x(e, t);
309
+ return T(e, n, w(e, n).map((e) => ({
308
310
  start: e.start,
309
311
  end: e.end,
310
312
  text: ` ${e.text}`,
@@ -312,7 +314,7 @@ function be(e, t) {
312
314
  newPrefixLength: 2
313
315
  })));
314
316
  }
315
- function xe(e) {
317
+ function we(e) {
316
318
  if (e.startsWith(" ")) return {
317
319
  text: e.slice(1),
318
320
  removed: 1
@@ -324,18 +326,18 @@ function xe(e) {
324
326
  removed: t
325
327
  };
326
328
  }
327
- function Se(e, t) {
328
- let n = S(e, t), r = [];
329
- for (let t of T(e, n)) {
330
- let e = xe(t.text);
329
+ function Te(e, t) {
330
+ let n = x(e, t), r = [];
331
+ for (let t of w(e, n)) {
332
+ let e = we(t.text);
331
333
  if (e.removed === 0) continue;
332
- let n = D(t, e.text, e.removed, 0);
334
+ let n = E(t, e.text, e.removed, 0);
333
335
  n && r.push(n);
334
336
  }
335
- return E(e, n, r);
337
+ return T(e, n, r);
336
338
  }
337
- function Ce(e, t, n = "en") {
338
- let { start: r, end: i } = S(e, t), a = e.slice(r, i), o = "https://example.com";
339
+ function Ee(e, t, n = "en") {
340
+ let { start: r, end: i } = x(e, t), a = e.slice(r, i), o = "https://example.com";
339
341
  if (a.length > 0) {
340
342
  let t = `[${a}](${o})`, n = r + 1 + a.length + 2;
341
343
  return {
@@ -346,7 +348,7 @@ function Ce(e, t, n = "en") {
346
348
  }
347
349
  };
348
350
  }
349
- let s = C(n).linkText, c = `[${s}](${o})`;
351
+ let s = S(n).linkText, c = `[${s}](${o})`;
350
352
  return {
351
353
  value: e.slice(0, r) + c + e.slice(i),
352
354
  selection: {
@@ -355,8 +357,8 @@ function Ce(e, t, n = "en") {
355
357
  }
356
358
  };
357
359
  }
358
- function we(e, t, n = "en") {
359
- let { start: r, end: i } = S(e, t), a = e.slice(r, i), o = "images/example.png";
360
+ function De(e, t, n = "en") {
361
+ let { start: r, end: i } = x(e, t), a = e.slice(r, i), o = "images/example.png";
360
362
  if (a.length > 0) {
361
363
  let t = `![${a}](${o})`, n = r + 2 + a.length + 2;
362
364
  return {
@@ -367,7 +369,7 @@ function we(e, t, n = "en") {
367
369
  }
368
370
  };
369
371
  }
370
- let s = C(n).imageAlt, c = `![${s}](${o})`;
372
+ let s = S(n).imageAlt, c = `![${s}](${o})`;
371
373
  return {
372
374
  value: e.slice(0, r) + c + e.slice(i),
373
375
  selection: {
@@ -376,14 +378,14 @@ function we(e, t, n = "en") {
376
378
  }
377
379
  };
378
380
  }
379
- function Te(e, t, n = "en") {
380
- let r = S(e, t), i = e.slice(r.start, r.end), a = i.length > 0 ? i : C(n).codeBlockPlaceholder, o = "`".repeat(Math.max(3, k(a) + 1)), s = `${o}text\n`;
381
+ function Oe(e, t, n = "en") {
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`;
381
383
  return R(e, r, `${s}${a}\n${o}`, {
382
384
  start: s.length,
383
385
  end: s.length + a.length
384
386
  });
385
387
  }
386
- function Ee(e) {
388
+ function ke(e) {
387
389
  return [
388
390
  `| ${e.tableHeaders.join(" | ")} |`,
389
391
  `| ${e.tableHeaders.map(() => "---").join(" | ")} |`,
@@ -391,10 +393,10 @@ function Ee(e) {
391
393
  ].join("\n");
392
394
  }
393
395
  function L(e, t) {
394
- let n = w(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
+ 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 = "";
395
397
  if (/\S/.test(r)) s = "\n\n";
396
398
  else if (n > 0) {
397
- let t = w(e, n - 1);
399
+ let t = C(e, n - 1);
398
400
  /\S/.test(e.slice(t, n - 1)) && (s = "\n");
399
401
  }
400
402
  return {
@@ -412,21 +414,21 @@ function R(e, t, n, r) {
412
414
  }
413
415
  };
414
416
  }
415
- function De(e, t, n = "en") {
416
- let r = S(e, t), i = C(n), a = Ee(i), o = i.tableRows[0][0], s = a.indexOf(o);
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);
417
419
  return R(e, r, a, {
418
420
  start: s,
419
421
  end: s + o.length
420
422
  });
421
423
  }
422
- function Oe(e, t) {
423
- return R(e, S(e, t), "---", {
424
+ function je(e, t) {
425
+ return R(e, x(e, t), "---", {
424
426
  start: 3,
425
427
  end: 3
426
428
  });
427
429
  }
428
- function ke(e, t, n) {
429
- let r = S(e, t), i = r.start + n.length;
430
+ function Me(e, t, n) {
431
+ let r = x(e, t), i = r.start + n.length;
430
432
  return {
431
433
  value: e.slice(0, r.start) + n + e.slice(r.end),
432
434
  selection: {
@@ -436,7 +438,7 @@ function ke(e, t, n) {
436
438
  };
437
439
  }
438
440
  var z = /\{\{(selection(?::[^{}]*)?|caret|select:[^{}]*)\}\}/g;
439
- function Ae(e, t) {
441
+ function Ne(e, t) {
440
442
  let n = "", r = 0, i = null, a = null, o = null;
441
443
  z.lastIndex = 0;
442
444
  for (let s = z.exec(e); s; s = z.exec(e)) {
@@ -471,7 +473,7 @@ function Ae(e, t) {
471
473
  };
472
474
  }
473
475
  function B(e, t, n, r = {}) {
474
- let i = S(e, t), a = Ae(n, e.slice(i.start, i.end)), o = r.block === !0 && a.text.length > 0 ? L(e, i) : {
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) : {
475
477
  prefix: "",
476
478
  suffix: ""
477
479
  }, s = i.start + o.prefix.length, c;
@@ -492,7 +494,7 @@ function B(e, t, n, r = {}) {
492
494
  selection: c
493
495
  };
494
496
  }
495
- function je(e, t) {
497
+ function V(e, t) {
496
498
  let n = [], r = 0;
497
499
  for (; r < e.length;) {
498
500
  if (e[r] !== t) {
@@ -509,18 +511,18 @@ function je(e, t) {
509
511
  }
510
512
  return n;
511
513
  }
512
- function Me(e, t) {
513
- if (t === "inlineCode") return je(e, "`");
514
- let n = je(e, t === "strike" ? "~" : "*");
514
+ function H(e, t) {
515
+ if (t === "inlineCode") return V(e, "`");
516
+ let n = V(e, t === "strike" ? "~" : "*");
515
517
  return t === "italic" ? n.filter((e) => e.length % 2 == 1) : n.filter((e) => e.length >= 2);
516
518
  }
517
- function Ne(e, t, n) {
519
+ function Pe(e, t, n) {
518
520
  return e >= t ? !1 : n.some((r) => r.start === e && n.some((e) => e.end === t && e.length === r.length && e.start >= r.end));
519
521
  }
520
- function Pe(e, t, n) {
522
+ function Fe(e, t, n) {
521
523
  return e >= t ? !1 : n.some((r) => r.end === e && n.some((e) => e.start === t && e.length === r.length && e.start >= r.end));
522
524
  }
523
- function Fe(e, t) {
525
+ function Ie(e, t) {
524
526
  let n = 0;
525
527
  for (; n < t.length;) {
526
528
  let r = t[n], i = n + 1;
@@ -534,14 +536,14 @@ function Fe(e, t) {
534
536
  }
535
537
  return !1;
536
538
  }
537
- function V(e, t, n, r) {
539
+ function U(e, t, n, r) {
538
540
  if (t.start !== t.end) {
539
- let n = Me(e, r);
540
- return Ne(t.start, t.end, n) || Pe(t.start, t.end, n);
541
+ let n = H(e, r);
542
+ return Pe(t.start, t.end, n) || Fe(t.start, t.end, n);
541
543
  }
542
- return Fe(Math.min(Math.max(t.start - n.start, 0), n.text.length), Me(n.text, r).filter((e) => e.start >= Ie(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)));
543
545
  }
544
- function Ie(e) {
546
+ function Le(e) {
545
547
  let t = 0;
546
548
  for (;;) {
547
549
  let n = e.slice(t), r = F(n, N) ?? F(n, j) ?? F(n, M) ?? F(n, P);
@@ -549,83 +551,83 @@ function Ie(e) {
549
551
  t += r.prefixLength;
550
552
  }
551
553
  }
552
- function Le(e) {
554
+ function Re(e) {
553
555
  return F(e, N) ? "task" : F(e, j) ? "bullet" : F(e, M) ? "ordered" : null;
554
556
  }
555
- function Re(e, t) {
556
- let n = S(e, t), r = T(e, {
557
+ function ze(e, t) {
558
+ let n = x(e, t), r = w(e, {
557
559
  start: n.start,
558
560
  end: n.start
559
- })[0], i = r.text, a = pe.exec(i);
561
+ })[0], i = r.text, a = ge.exec(i);
560
562
  return {
561
563
  headingLevel: a ? a[1].length : 0,
562
- bold: V(e, n, r, "bold"),
563
- italic: V(e, n, r, "italic"),
564
- strike: V(e, n, r, "strike"),
565
- inlineCode: V(e, n, r, "inlineCode"),
566
- list: Le(i),
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"),
568
+ list: Re(i),
567
569
  quote: F(i, P) !== null
568
570
  };
569
571
  }
570
572
  // src/authoring/native-components.ts
571
- var ze = Object.freeze(o.map((e) => ({
573
+ var Be = Object.freeze(l.map((e) => ({
572
574
  id: e.id,
573
- label: a(e.title, "en", e.id)
575
+ label: c(e.title, "en", e.id)
574
576
  })));
575
- function Be(e, t) {
576
- let n = c[e];
577
+ function Ve(e, t) {
578
+ let n = d[e];
577
579
  return {
578
580
  id: e,
579
- label: a(n.title, t, e),
580
- description: a(n.description, t, e),
581
+ label: c(n.title, t, e),
582
+ description: c(n.description, t, e),
581
583
  group: n.category,
582
- keywords: [...i(e) ?? []],
584
+ keywords: [...s(e) ?? []],
583
585
  ...n.inline === !0 ? { inline: !0 } : {},
584
- template: a(n.insertText, t, n.insertText.en ?? "")
586
+ template: c(n.insertText, t, n.insertText.en ?? "")
585
587
  };
586
588
  }
587
- var H = r.map((e) => Be(e, "en")), U = Object.freeze(o.map((e) => ({
589
+ var W = o.map((e) => Ve(e, "en")), He = Object.freeze(l.map((e) => ({
588
590
  id: e.id,
589
- label: a(e.title, "zh", e.id)
590
- }))), W = r.map((e) => Be(e, "zh")), Ve = H.filter((e) => c[e.id]?.extended === !0), He = Object.freeze(Object.fromEntries(W.filter((e) => c[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({
591
593
  label: e.label,
592
594
  description: e.description,
593
595
  keywords: Object.freeze([...e.keywords]),
594
596
  template: e.template
595
597
  })])));
596
- function Ue(e = "en") {
598
+ function Ge(e = "en") {
597
599
  return e === "zh" ? {
598
- groups: U,
599
- components: W
600
+ groups: He,
601
+ components: G
600
602
  } : {
601
- groups: ze,
602
- components: H
603
+ groups: Be,
604
+ components: W
603
605
  };
604
606
  }
605
- function We(e) {
607
+ function Ke(e) {
606
608
  return new Set(e.match(/[A-Za-z_][A-Za-z0-9_]*/g) ?? []);
607
609
  }
608
- function Ge(e) {
610
+ function qe(e) {
609
611
  let t = e.trim().replace(/[^A-Za-z0-9_]/g, "_");
610
612
  return t ? /^[0-9]/.test(t) ? `_${t}` : t : "value";
611
613
  }
612
- function Ke(e, t) {
614
+ function Je(e, t) {
613
615
  if (!t.has(e)) return e;
614
616
  let n = 2;
615
617
  for (; t.has(`${e}${n}`);) n += 1;
616
618
  return `${e}${n}`;
617
619
  }
618
- function G(e, t, n) {
619
- let r = We(t), i = /* @__PURE__ */ new Map();
620
+ function K(e, t, n) {
621
+ let r = Ke(t), i = /* @__PURE__ */ new Map();
620
622
  return e.template.replace(/\{\{bind:([^{}]+)\}\}/g, (e, t) => {
621
623
  let n = t.trim(), a = i.get(n);
622
624
  if (a) return a;
623
- let o = Ke(Ge(n), r);
625
+ let o = Je(qe(n), r);
624
626
  return r.add(o), i.set(n, o), o;
625
627
  });
626
628
  }
627
629
  // src/authoring/templates.ts
628
- function K(e) {
630
+ function Ye(e) {
629
631
  let t = {};
630
632
  for (let [n, r] of Object.entries(e.props)) t[n] = {
631
633
  kind: r.kind,
@@ -640,22 +642,22 @@ function K(e) {
640
642
  };
641
643
  return t;
642
644
  }
643
- function qe(e) {
645
+ function Xe(e) {
644
646
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
645
647
  }
646
- function Je(e) {
647
- return e === null ? "" : qe(String(e));
648
+ function Ze(e) {
649
+ return e === null ? "" : Xe(String(e));
648
650
  }
649
- function Ye(t) {
651
+ function Qe(t) {
650
652
  let n = t.replace(/[^A-Za-z0-9_]/g, "_"), r = /^[0-9]/.test(n) ? `_${n}` : n;
651
653
  return e.has(r) ? `${r}_value` : r;
652
654
  }
653
- function Xe(e, t) {
654
- if (e.defaultValue !== void 0 && e.defaultValue !== null) return Je(e.defaultValue);
655
+ function $e(e, t) {
656
+ if (e.defaultValue !== void 0 && e.defaultValue !== null) return Ze(e.defaultValue);
655
657
  switch (e.kind) {
656
658
  case "boolean": return "false";
657
659
  case "enum":
658
- if (e.values?.length) return Je(e.values[0]);
660
+ if (e.values?.length) return Ze(e.values[0]);
659
661
  throw Error(`${t} is a required enum without values; provide an authoring.insertText.`);
660
662
  case "number": {
661
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;
@@ -671,22 +673,24 @@ function Xe(e, t) {
671
673
  default: throw Error(`${t} has an unsupported property kind; provide an authoring.insertText.`);
672
674
  }
673
675
  }
674
- function Ze(e) {
676
+ function et(e) {
675
677
  if (e.structure && e.structure.rule !== "none" && e.structure.rule !== "any" && e.structure.rule !== "inline") return !0;
676
678
  let t = e.children;
677
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;
678
680
  }
679
- function Qe(e, t) {
681
+ function tt(e, t) {
680
682
  let n = e.name, r = e.form;
681
683
  if (r !== "leaf" && r !== "inline" && r !== "container") throw Error(`component "${n}" has an unsupported form; provide an authoring.insertText.`);
682
- if (Ze(e)) throw Error(`component "${n}" requires children; provide an authoring.insertText.`);
683
- let i = Object.entries(e.bindings ?? {}), a = new Set(i.flatMap(([, e]) => [e.bind, e.initial])), o = [];
684
- for (let [e, t] of i) o.push(`${t.bind}="${Ye(e === "value" ? n : `${n}_${e}`)}"`);
685
- for (let [e, r] of Object.entries(t)) r.required && (a.has(e) || o.push(`${e}="${Xe(r, `component "${n}" property "${e}"`)}"`));
686
- let s = `<${n}${o.length > 0 ? ` ${o.join(" ")}` : ""}`;
687
- return r === "leaf" ? `${s}>` : r === "inline" ? `${s}></${n}>` : `${s}>\n\n</${n}>`;
688
- }
689
- var $e = {
684
+ let i = e.structure?.rule === "raw-body";
685
+ if (i && r !== "container") throw Error(`component "${n}" declares a raw body on a non-container form; provide an authoring.insertText.`);
686
+ if (!i && et(e)) throw Error(`component "${n}" requires children; provide an authoring.insertText.`);
687
+ let a = Object.entries(e.bindings ?? {}), o = new Set(a.flatMap(([, e]) => [e.bind, e.initial])), s = [];
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}"`)}"`));
690
+ let c = `<${n}${s.length > 0 ? ` ${s.join(" ")}` : ""}`;
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}>`;
692
+ }
693
+ var nt = {
690
694
  id: "authoring-template",
691
695
  label: "",
692
696
  description: "",
@@ -695,8 +699,8 @@ var $e = {
695
699
  template: ""
696
700
  };
697
701
  function q(e, t = "") {
698
- let n = G({
699
- ...$e,
702
+ let n = K({
703
+ ...nt,
700
704
  template: e
701
705
  }, t);
702
706
  return B(t, {
@@ -704,72 +708,75 @@ function q(e, t = "") {
704
708
  end: t.length
705
709
  }, n).value.slice(t.length);
706
710
  }
707
- function et(e) {
711
+ function rt(e) {
708
712
  return e.diagnostics.map((e) => `${e.code}: ${e.message}`).join("; ");
709
713
  }
710
- function tt(e, t) {
714
+ function it(e, t) {
711
715
  let n = q(t), r = `</${e}>`, i = n.lastIndexOf(r);
712
716
  if (!(i < 0)) return {
713
717
  before: `${n.slice(0, i)}\n`,
714
718
  after: `\n${n.slice(i)}`
715
719
  };
716
720
  }
717
- function nt(e, t, n, r) {
718
- let i = r === void 0 ? q(e) : q(e, r.before), a = r === void 0 ? i : `${r.before}${i}${r.after}`, o;
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;
719
723
  try {
720
- o = m(a, t ?? {});
724
+ s = a(o, t ?? {});
721
725
  } catch (e) {
722
726
  throw Error(`${n} authoring.insertText could not be compiled: ${e instanceof Error ? e.message : String(e)}.`);
723
727
  }
724
- if (o.ok) return;
725
- let s = et(o);
726
- throw Error(`${n} authoring.insertText does not compile with this configuration${s ? ` (${s})` : ""}.`);
728
+ if (s.ok) return;
729
+ let c = rt(s);
730
+ throw Error(`${n} authoring.insertText does not compile with this configuration${c ? ` (${c})` : ""}.`);
727
731
  }
728
- function rt(e, t, n, r) {
729
- let i = r === void 0 ? e : `${r.before}${e}${r.after}`, a;
732
+ function ot(e, t, n, r) {
733
+ let i = r === void 0 ? e : `${r.before}${e}${r.after}`, o;
730
734
  try {
731
- a = m(i, t ?? {});
735
+ o = a(i, t ?? {});
732
736
  } catch (e) {
733
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.`);
734
738
  }
735
- if (a.ok) return;
736
- let o = a.diagnostics.map((e) => `${e.code}: ${e.message}`).join("; ");
737
- throw Error(`${n} has no authoring.insertText and its synthesized template does not compile with this configuration${o ? ` (${o})` : ""}. Provide authoring.insertText.`);
739
+ if (o.ok) return;
740
+ let s = o.diagnostics.map((e) => `${e.code}: ${e.message}`).join("; ");
741
+ throw Error(`${n} has no authoring.insertText and its synthesized template does not compile with this configuration${s ? ` (${s})` : ""}. Provide authoring.insertText.`);
738
742
  }
739
743
  // src/authoring/catalog.ts
740
744
  function J(e) {
741
745
  return /* @__PURE__ */ Error(`Invalid local component catalog: ${e}`);
742
746
  }
743
747
  function Y(e, t, n) {
744
- return a(e, t, n);
748
+ return c(e, t, n);
745
749
  }
746
- function it(e, t) {
750
+ function st(e, t) {
747
751
  let n = Y(e, t, "");
748
752
  return n === "" ? void 0 : n;
749
753
  }
750
- function at(e) {
754
+ function ct(e) {
751
755
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") return e;
752
756
  if (e === null) return null;
753
757
  }
754
- function ot(e, t) {
758
+ function X(e) {
759
+ return e?.rule === "raw-body" ? "raw" : "markdown";
760
+ }
761
+ function lt(e, t, n) {
755
762
  return Object.freeze({
756
- name: e,
757
- kind: t.kind,
758
- required: t.required === !0,
759
- static: t.static === !0,
760
- dynamic: t.dynamic === !0,
761
- ...t.values ? { values: Object.freeze([...t.values]) } : {},
762
- ...at(t.default) === void 0 ? {} : { defaultValue: at(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) }
763
770
  });
764
771
  }
765
- function st(e, t) {
766
- let n = {};
767
- for (let [t, r] of Object.entries(e)) n[t] = ot(t, r);
768
- 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;
769
776
  }
770
- function ct(e, t, n) {
777
+ function dt(e, t, n) {
771
778
  for (let [r, i] of Object.entries(e.props)) {
772
- let e = it(i.description, n);
779
+ let e = st(i.description, n);
773
780
  if (e === void 0) continue;
774
781
  let a = t[r];
775
782
  t[r] = Object.freeze({
@@ -785,7 +792,7 @@ function ct(e, t, n) {
785
792
  }
786
793
  return t;
787
794
  }
788
- function lt(e) {
795
+ function ft(e) {
789
796
  return Object.freeze({
790
797
  id: e.id,
791
798
  name: e.name,
@@ -795,6 +802,7 @@ function lt(e) {
795
802
  categoryLabel: e.categoryLabel,
796
803
  insertText: e.insertText,
797
804
  form: e.form,
805
+ bodyKind: e.bodyKind,
798
806
  paired: e.form !== "leaf",
799
807
  inline: e.inline ?? e.form === "inline",
800
808
  ...e.parents === void 0 ? {} : { parents: Object.freeze([...e.parents]) },
@@ -805,28 +813,28 @@ function lt(e) {
805
813
  ...e.requires === void 0 ? {} : { requires: Object.freeze({ ...e.requires }) }
806
814
  });
807
815
  }
808
- function ut(e) {
816
+ function pt(e) {
809
817
  let t = e.structure;
810
818
  return {
811
819
  ...t?.parents?.length ? { parents: t.parents } : {},
812
820
  ...t?.children?.length ? { allowedChildren: t.children } : {}
813
821
  };
814
822
  }
815
- function dt(e, t) {
823
+ function mt(e, t) {
816
824
  if (e === t) return !0;
817
825
  if (e === void 0 || t === void 0) return !1;
818
826
  let n = Object.keys(e).sort(), r = Object.keys(t).sort();
819
827
  return n.length === r.length && n.every((n, i) => n === r[i] && e[n] === t[n]);
820
828
  }
821
- function X(e) {
829
+ function Z(e) {
822
830
  let t = e.authoring;
823
831
  if (t === void 0) return;
824
- if (s(e.name) === void 0) return t;
825
- let n = u(e.name), r = {};
826
- return t.title !== void 0 && !dt(t.title, n?.title) && (r.title = t.title), t.description !== void 0 && !dt(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);
827
835
  }
828
- function Z(e, t) {
829
- let n = s(e.name), r = X(e);
836
+ function Q(e, t) {
837
+ let n = u(e.name), r = Z(e);
830
838
  if (n) {
831
839
  let e = r?.insertText;
832
840
  if (e !== void 0) return e.trim() === "" ? void 0 : e;
@@ -836,59 +844,59 @@ function Z(e, t) {
836
844
  let i = r?.insertText;
837
845
  return i !== void 0 && i.trim() !== "" ? i : void 0;
838
846
  }
839
- function ft(e, t) {
840
- let n = Z(e, t);
841
- return n === void 0 ? Qe(e, K(e)) : n;
847
+ function ht(e, t) {
848
+ let n = Q(e, t);
849
+ return n === void 0 ? tt(e, Ye(e)) : n;
842
850
  }
843
- function pt(e, t, r) {
844
- let i = n(e).structure?.parents;
845
- if (i !== void 0 && i.length !== 0) for (let e of i) {
846
- let n = t.get(e);
847
- 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;
848
856
  let i;
849
857
  try {
850
- i = ft(n, r);
858
+ i = ht(r, n);
851
859
  } catch {
852
860
  continue;
853
861
  }
854
- let a = tt(e, i);
862
+ let a = it(e, i);
855
863
  if (a !== void 0) return a;
856
864
  }
857
865
  }
858
- function mt(e, t) {
866
+ function _t(e, t) {
859
867
  if (e.parents !== void 0 && e.parents.length !== 0) for (let n of e.parents) {
860
868
  let e = t.find((e) => e.name === n);
861
869
  if (e === void 0 || e.form !== "container") continue;
862
- let r = tt(n, e.insertText);
870
+ let r = it(n, e.insertText);
863
871
  if (r !== void 0) return r;
864
872
  }
865
873
  }
866
- function Q(e, t, r, a, o) {
867
- let c = n(e), u = s(e.name), d = e.authoring, f = X(e), p = Y(u ? f?.title ?? u.title : d?.title, t, e.name), m = Y(u ? f?.description ?? u.description : d?.description, t, p), h = u ? f?.category ?? u.category : d?.category !== void 0 && d.category.trim() !== "" ? d.category : "extension", ee = l(h, t), g = Z(e, t), _ = ut(c), v;
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;
868
876
  if (g !== void 0) {
869
- if (v = g, o) {
870
- let n = pt(e, a, t);
877
+ if (v = g, a) {
878
+ let i = gt(e, r, t);
871
879
  try {
872
- nt(v, r, `component "${e.name}"`, n);
880
+ at(v, n, `component "${e.name}"`, i);
873
881
  } catch (e) {
874
882
  throw J(e instanceof Error ? e.message : String(e));
875
883
  }
876
884
  }
877
885
  } else {
878
886
  try {
879
- v = Qe(e, K(e));
887
+ v = tt(e, Ye(e));
880
888
  } catch (e) {
881
889
  throw J(e instanceof Error ? e.message : String(e));
882
890
  }
883
- if (o) try {
884
- rt(v, r, `component "${e.name}"`, pt(e, a, t));
891
+ if (a) try {
892
+ ot(v, n, `component "${e.name}"`, gt(e, r, t));
885
893
  } catch (e) {
886
894
  throw J(e instanceof Error ? e.message : String(e));
887
895
  }
888
896
  }
889
- let te = ct(e, st(c.props, t), t), y = i(e.name);
890
- return lt({
891
- id: u ? 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,
892
900
  name: e.name,
893
901
  title: p,
894
902
  description: m,
@@ -896,70 +904,72 @@ function Q(e, t, r, a, o) {
896
904
  categoryLabel: ee,
897
905
  insertText: v,
898
906
  form: e.form,
899
- inline: u ? u.inline === !0 : e.form === "inline",
907
+ bodyKind: X(o.structure),
908
+ inline: c ? c.inline === !0 : e.form === "inline",
900
909
  ..._,
901
- ...y === void 0 ? {} : { keywords: y },
902
- props: te,
910
+ ...b === void 0 ? {} : { keywords: b },
911
+ props: y,
903
912
  ...e.styles === void 0 ? {} : { styles: e.styles },
904
913
  ...e.requires === void 0 ? {} : { requires: e.requires }
905
914
  });
906
915
  }
907
- function ht(e, t, n, i, a) {
908
- let o = new Map(e.map((e) => [e.name, e])), s = [], c = /* @__PURE__ */ new Set();
909
- for (let e of r) {
910
- let t = o.get(e);
911
- t && t.authoring !== void 0 && (s.push(Q(t, n, i, 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));
912
921
  }
913
- for (let r of e) c.has(r.name) || (r.authoring !== void 0 || t.has(r.name)) && (s.push(Q(r, n, i, o, a && t.has(r.name))), c.add(r.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));
914
923
  return s;
915
924
  }
916
- function gt(e, t) {
917
- let r = s(e.name), a = e.authoring, o = X(e), c = {};
918
- for (let [t, n] of Object.entries(e.props)) c[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;
919
928
  return JSON.stringify({
920
929
  name: e.name,
921
930
  id: e.id,
922
931
  form: e.form,
923
- title: Y(r ? o?.title ?? r.title : a?.title, t, e.name),
924
- description: Y(r ? o?.description ?? r.description : a?.description, t, ""),
925
- category: r ? o?.category ?? r.category : a?.category ?? "",
926
- categoryLabel: l(r ? o?.category ?? r.category : a?.category ?? "extension", t),
927
- insertText: Z(e, t) ?? null,
928
- inline: r ? r.inline === !0 : e.form === "inline",
929
- keywords: i(e.name) ?? null,
930
- manifest: a ?? null,
931
- preset: r ?? null,
932
- propDescriptions: c,
933
- 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,
934
944
  styles: e.styles ?? null,
935
945
  requires: e.requires ?? null
936
946
  });
937
947
  }
938
- function _t(e, t = "en") {
939
- let n = f(e);
948
+ function xt(e, t = "en") {
949
+ let n = h(e);
940
950
  if (!n.ok) return `invalid|${t}`;
941
- let r = n.registry.map((e) => gt(e, t));
942
- return `${p(e)}|${t}|${r.join("\0")}`;
951
+ let r = n.registry.map((e) => bt(e, t));
952
+ return `${ee(e)}|${t}|${r.join("\0")}`;
943
953
  }
944
954
  function $(e, t, n, r) {
945
- return Object.freeze(ht(e.registry, e.externalComponentNames, t, n, r));
955
+ return Object.freeze(yt(e.registry, e.externalComponentNames, t, n, r));
946
956
  }
947
- function vt(e, t = "en") {
948
- let n = d(e), r = f({ config: n });
957
+ function St(e, t = "en") {
958
+ let n = m(e), r = h({ config: n });
949
959
  if (!r.ok) throw J(r.message);
950
960
  return $(r, t, { config: n }, !0);
951
961
  }
952
- function yt(e, t = "en") {
953
- let n = d(e), r = f({ config: n });
962
+ function Ct(e, t = "en") {
963
+ let n = m(e), r = h({ config: n });
954
964
  if (!r.ok) throw J(r.message);
955
965
  return $(r, t, { config: n }, !1);
956
966
  }
957
- function bt(e, t = "en") {
958
- let n = f(e);
967
+ function wt(e, t = "en") {
968
+ let n = h(e);
959
969
  return n.ok ? $(n, t, e, !0) : Object.freeze([]);
960
970
  }
961
- function xt(e) {
962
- let t = new Map(o.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();
963
973
  for (let t of e) {
964
974
  let e = n.get(t.category);
965
975
  e ? e.entries.push(t) : n.set(t.category, {
@@ -978,7 +988,7 @@ function xt(e) {
978
988
  entries: Object.freeze([...e.entries])
979
989
  })));
980
990
  }
981
- function St(e, t = {}) {
991
+ function Et(e, t = {}) {
982
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 === "" || [
983
993
  e.name,
984
994
  e.title,
@@ -988,14 +998,14 @@ function St(e, t = {}) {
988
998
  ].some((e) => e.toLowerCase().includes(a)));
989
999
  return Object.freeze(o);
990
1000
  }
991
- function Ct(e) {
1001
+ function Dt(e) {
992
1002
  let t = [];
993
1003
  e.description !== "" && t.push(e.description);
994
1004
  for (let n of Object.values(e.props)) n.description !== void 0 && t.push(`${n.name}: ${n.description}`);
995
1005
  return t.join("\n");
996
1006
  }
997
- function wt(e, t, n) {
998
- if (typeof e != "string" || !Number.isFinite(t) || !f(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([]);
999
1009
  let r = Math.max(0, Math.min(e.length, Math.floor(t))), i = Object.freeze([]), a;
1000
1010
  try {
1001
1011
  a = te(e, n);
@@ -1010,13 +1020,13 @@ function wt(e, t, n) {
1010
1020
  };
1011
1021
  return o(a.nodes, Object.freeze([])), i;
1012
1022
  }
1013
- function Tt(e) {
1023
+ function kt(e) {
1014
1024
  let t = {};
1015
1025
  if (!e) return t;
1016
1026
  for (let [n, r] of Object.entries(e.props)) t[n] = Object.freeze({
1017
1027
  name: n,
1018
1028
  kind: r.kind,
1019
- required: r.required === !0,
1029
+ required: g(e, n, r),
1020
1030
  static: r.static === !0,
1021
1031
  dynamic: r.dynamic === !0,
1022
1032
  ...r.values ? { values: Object.freeze([...r.values]) } : {},
@@ -1024,10 +1034,11 @@ function Tt(e) {
1024
1034
  });
1025
1035
  return t;
1026
1036
  }
1027
- function Et(e) {
1037
+ function At(e) {
1028
1038
  return Object.freeze({
1029
1039
  name: e.name,
1030
1040
  form: e.form,
1041
+ bodyKind: e.bodyKind,
1031
1042
  paired: e.form !== "leaf",
1032
1043
  title: e.title,
1033
1044
  description: e.description,
@@ -1042,7 +1053,7 @@ function Et(e) {
1042
1053
  ...e.requires === void 0 ? {} : { requires: Object.freeze({ ...e.requires }) }
1043
1054
  });
1044
1055
  }
1045
- function Dt(e) {
1056
+ function jt(e) {
1046
1057
  let t = new Map(e.map((e) => [e.name, e])), n = Object.freeze([...e]);
1047
1058
  return Object.freeze({
1048
1059
  tags: n,
@@ -1054,52 +1065,60 @@ function Dt(e) {
1054
1065
  }
1055
1066
  });
1056
1067
  }
1057
- function Ot(e, t = "en") {
1058
- let n = f(e);
1059
- if (!n.ok) return Dt([]);
1060
- let r = [];
1068
+ function Mt(e, r = "en", i) {
1069
+ let a = h(e);
1070
+ if (!a.ok) return jt([]);
1071
+ let o = [];
1061
1072
  try {
1062
- r = $(n, t, e, !1);
1073
+ o = $(a, r, e, !1);
1063
1074
  } catch {
1064
- r = Object.freeze([]);
1075
+ o = Object.freeze([]);
1065
1076
  }
1066
- let i = new Map(r.map((e) => [e.name, e])), a = [];
1067
- for (let [e, t] of n.schemaByName) {
1068
- let n = i.get(e), r = Tt(t);
1069
- for (let [e, t] of Object.entries(n?.props ?? {})) r[e] = Object.freeze({
1070
- ...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],
1071
1082
  ...t
1072
1083
  });
1073
- a.push(Et({
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({
1074
1092
  name: e,
1075
- form: t.form,
1076
- title: n?.title ?? e,
1077
- description: n?.description ?? "",
1078
- category: n?.category ?? "component",
1079
- categoryLabel: n?.categoryLabel ?? "component",
1080
- insertText: n?.insertText ?? "",
1081
- props: r,
1082
- ...n?.parents === void 0 ? {} : { parents: n.parents },
1083
- ...n?.allowedChildren === void 0 ? {} : { allowedChildren: n.allowedChildren },
1084
- ...n?.keywords === void 0 ? {} : { keywords: n.keywords },
1085
- ...n?.styles === void 0 ? {} : { styles: n.styles },
1086
- ...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 }
1087
1106
  }));
1088
1107
  }
1089
- return Dt(a);
1108
+ return jt(c);
1090
1109
  }
1091
1110
  // src/authoring/insert.ts
1092
- var kt = /[A-Za-z_][A-Za-z0-9_]*/g;
1093
- function At(t, n, r) {
1094
- let i = new Set(r.match(kt) ?? []), a = _(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;
1095
1114
  for (let t of a) {
1096
1115
  let r = t, a = 2;
1097
1116
  for (; i.has(r) || e.has(r) || r !== t && o.has(r);) r = `${t}${a}`, a += 1;
1098
- i.add(r), r !== t && (s = h(s, t, r, n).source);
1117
+ i.add(r), r !== t && (s = _(s, t, r, n).source);
1099
1118
  }
1100
1119
  return s;
1101
1120
  }
1102
- function jt(e) {
1121
+ function Ft(e) {
1103
1122
  return {
1104
1123
  id: e.id,
1105
1124
  label: e.title,
@@ -1109,35 +1128,35 @@ function jt(e) {
1109
1128
  template: e.insertText
1110
1129
  };
1111
1130
  }
1112
- function Mt(e, t, n, r) {
1113
- return B(n, r, At(G(jt(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 });
1114
1133
  }
1115
- function Nt(e, t, n, r, i = "en") {
1134
+ function Lt(e, t, n, r, i = "en") {
1116
1135
  if (typeof n != "string") throw TypeError("insertLocalComponent requires source text.");
1117
1136
  if (typeof t != "string" || t.length === 0) throw TypeError("insertLocalComponent requires a component id.");
1118
- let a = f(e);
1137
+ let a = h(e);
1119
1138
  if (!a.ok) throw Error(`Invalid compile options: ${a.message}`);
1120
- let o = bt(e, i).find((e) => e.id === t || e.name === t);
1139
+ let o = wt(e, i).find((e) => e.id === t || e.name === t);
1121
1140
  if (!o) throw Error(`Unknown local component "${t}".`);
1122
- return Mt(o, e, n, r);
1141
+ return It(o, e, n, r);
1123
1142
  }
1124
- function Pt(e, t, n, r, i = "en") {
1125
- return Nt({ config: d(e) }, t, n, r, i);
1143
+ function Rt(e, t, n, r, i = "en") {
1144
+ return Lt({ config: m(e) }, t, n, r, i);
1126
1145
  }
1127
1146
  // src/authoring/conformance.ts
1128
- function Ft(e, t = "en") {
1129
- let n = d(e), r = new Set(n.components.map((e) => e.name)), i = [], a = { config: n }, o = yt(n, t);
1130
- for (let e of o) {
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);
1149
+ for (let e of s) {
1131
1150
  if (!r.has(e.name)) continue;
1132
- let t = Mt(e, a, "", {
1151
+ let t = It(e, o, "", {
1133
1152
  start: 0,
1134
1153
  end: 0
1135
- }).value, n = mt(e, o), s = n === void 0 ? t : `${n.before}${t}${n.after}`, c = m(s, a);
1136
- c.ok || i.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({
1137
1156
  id: e.id,
1138
1157
  name: e.name,
1139
1158
  message: `Insert template for <${e.name}> does not compile with this configuration.`,
1140
- diagnostics: Object.freeze(c.diagnostics.map((e) => Object.freeze({
1159
+ diagnostics: Object.freeze(l.diagnostics.map((e) => Object.freeze({
1141
1160
  code: e.code,
1142
1161
  message: e.message
1143
1162
  })))
@@ -1145,4 +1164,4 @@ function Ft(e, t = "en") {
1145
1164
  }
1146
1165
  return Object.freeze(i);
1147
1166
  }
1148
- export { Ve as EXTENDED_NATIVE_COMPONENTS, He as EXTENDED_NATIVE_COMPONENT_COPY_ZH, oe as LOCAL_COMPONENTS, ne as LOCAL_COMPONENT_NAMES, H as NATIVE_COMPONENTS, W as NATIVE_COMPONENTS_ZH, ze as NATIVE_COMPONENT_GROUPS, U as NATIVE_COMPONENT_GROUPS_ZH, _ as analyzeLocalSource, t as closestName, ee as completeLocalSource, Ot as createLocalAuthoringLookup, vt as createLocalComponentCatalog, bt as createLocalComponentCatalogForOptions, St as filterLocalComponentCatalog, ce as formatBold, ge as formatBulletList, me as formatHeading, fe as formatInlineCode, le as formatItalic, g as formatLocalSource, _e as formatOrderedList, ye as formatQuote, ue as formatStrike, ve as formatTaskList, ie as getLocalComponent, Ue as getNativeComponentCatalog, y as getPropDefault, be as indentSelection, Te as insertCodeBlock, Oe as insertDivider, we as insertImage, Ce as insertLink, Pt as insertLocalComponent, Nt as insertLocalComponentFromOptions, De as insertTable, B as insertTemplate, ke as insertText, wt as localCatalogAncestors, xt as localComponentCatalogGroups, _t as localComponentCatalogKey, Ct as localComponentHelp, v as localComponentNames, Se as outdentSelection, Re as readFormatState, h as renameLocalBinding, G as renderNativeSnippet, re as suggestAttribute, ae as suggestComponent, Ft 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 };