reactive-md 0.8.0 → 0.9.1

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 (441) hide show
  1. package/CHANGELOG-ch.md +54 -4
  2. package/CHANGELOG.md +55 -4
  3. package/CONTRIBUTING-ch.md +13 -2
  4. package/CONTRIBUTING.md +13 -2
  5. package/README-ch.md +132 -23
  6. package/README-en.md +130 -21
  7. package/README.md +128 -21
  8. package/SECURITY-ch.md +3 -3
  9. package/SECURITY.md +3 -3
  10. package/THIRD_PARTY_NOTICES.md +111 -1
  11. package/cli/args.mjs +51 -1
  12. package/cli/assets.mjs +6 -1
  13. package/cli/build.mjs +125 -9
  14. package/cli/fs-utils.mjs +3 -3
  15. package/cli/help.mjs +12 -5
  16. package/cli/init.mjs +1 -1
  17. package/cli/package.mjs +1 -0
  18. package/dist-library/LocalDocumentView-sthUP0ct.js +109 -0
  19. package/dist-library/LocalDocumentViewCore-GiWV3bey.js +9829 -0
  20. package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +275 -0
  21. package/dist-library/{authoring-BsfSwQRm.js → authoring-Dsune4Hy.js} +240 -218
  22. package/dist-library/compile-wUv8KEge.js +1249 -0
  23. package/dist-library/{compiler-core-kPiH-gOV.js → compiler-core-As_m-MNm.js} +5372 -5559
  24. package/dist-library/compiler-eOfcinZs.js +62 -0
  25. package/dist-library/component-state-BoLCGee4.js +801 -0
  26. package/dist-library/{component-state-D_cw_EHe.js → component-state-C52ZFJGl.js} +2 -2
  27. package/dist-library/{registry-B9Jc3FVe.js → config-BadfhjdP.js} +374 -457
  28. package/dist-library/{config-validation-DXTynAw7.js → config-validation-F47AcE6o.js} +549 -751
  29. package/dist-library/controls-CcT6n7k_.js +6740 -0
  30. package/dist-library/coordinate-CWS9p5q_.js +293 -0
  31. package/dist-library/data-table-Bgccxd7h.js +296 -0
  32. package/dist-library/{default-components-Z_YMio5P.js → default-components-BwQf0oP-.js} +344 -334
  33. package/dist-library/{math-display-BJz4gbFc.js → display-B-VhqVND.js} +1299 -1299
  34. package/dist-library/export-BqVmTXm8.js +369 -0
  35. package/dist-library/gallery-CY6mTx8i.js +360 -0
  36. package/dist-library/html-CNT4KD-2.js +757 -0
  37. package/dist-library/{math-sample-BGEW49zY.js → incremental-Dv0FSp_U.js} +476 -394
  38. package/dist-library/latex-1w7aQgD5.js +928 -0
  39. package/dist-library/layout-C0YlEPGr.js +562 -0
  40. package/dist-library/mount-preset-KxvtKgJb.js +13 -0
  41. package/dist-library/options-1aDLK7JY.js +121 -0
  42. package/dist-library/{react-ByOHunUW.js → package-core-WFK1RhAZ.js} +49 -55
  43. package/dist-library/{parser-standard-DlCk7sLo.js → parser-standard-Yuf3A_VI.js} +6605 -7097
  44. package/dist-library/plugin-packs-B1XPWcFs.js +18 -0
  45. package/dist-library/{identity-MYJXKSkB.js → preset-core-CKc5YXSM.js} +31 -31
  46. package/dist-library/{props-DGlBk0e5.js → props-sJ8vk0cr.js} +1 -1
  47. package/dist-library/react-BbyAgeXc.js +6070 -0
  48. package/dist-library/react-D5iGiUdL.js +7 -0
  49. package/dist-library/reactive-md-authoring.js +222 -223
  50. package/dist-library/reactive-md-build.js +126 -72
  51. package/dist-library/reactive-md-compiler-standard.js +12 -10
  52. package/dist-library/reactive-md-compiler.js +3 -3
  53. package/dist-library/reactive-md-default-packs.js +2 -2
  54. package/dist-library/reactive-md-default-preset.js +4 -4
  55. package/dist-library/reactive-md-export-assets.js +57 -0
  56. package/dist-library/reactive-md-export.js +5 -111
  57. package/dist-library/reactive-md-minimal-preset.js +24 -0
  58. package/dist-library/reactive-md-minimal-react-preset.js +26 -0
  59. package/dist-library/reactive-md-minimal-styles.js +80 -0
  60. package/dist-library/reactive-md-minimal.css +2 -0
  61. package/dist-library/reactive-md-pdf.js +7582 -0
  62. package/dist-library/reactive-md-plugin-chart.js +13 -0
  63. package/dist-library/reactive-md-plugin-data.js +17 -0
  64. package/dist-library/reactive-md-plugin-diagram.js +18 -0
  65. package/dist-library/reactive-md-plugin-forms.js +18 -0
  66. package/dist-library/reactive-md-plugin-gallery.js +12 -0
  67. package/dist-library/reactive-md-plugin-navigation.js +15 -0
  68. package/dist-library/reactive-md-plugin-network.js +222 -0
  69. package/dist-library/reactive-md-plugin-plot.js +24 -0
  70. package/dist-library/reactive-md-print.css +5 -0
  71. package/dist-library/reactive-md-react-minimal.js +28 -0
  72. package/dist-library/reactive-md-react-server.js +34 -32
  73. package/dist-library/reactive-md-react-unstyled.js +14 -9
  74. package/dist-library/reactive-md-react.js +14 -9
  75. package/dist-library/reactive-md-runtime-browser.js +847 -15
  76. package/dist-library/reactive-md-runtime.js +3 -3
  77. package/dist-library/reactive-md-sdk.js +8 -6
  78. package/dist-library/reactive-md-standalone-configured.js +16 -0
  79. package/dist-library/reactive-md-standalone-host.js +9 -438
  80. package/dist-library/reactive-md-testing-browser.js +5 -4
  81. package/dist-library/reactive-md-testing-react.js +46 -44
  82. package/dist-library/reactive-md-testing.js +45 -44
  83. package/dist-library/reactive-md-vite.js +135 -37
  84. package/dist-library/reactive-md.css +1 -1
  85. package/dist-library/reactive-md.js +590 -498
  86. package/dist-library/registry-B9NGct4d.js +20 -0
  87. package/dist-library/registry-core-Bbad9Bm2.js +479 -0
  88. package/dist-library/{resources-BGt8mpDA.js → resources-D2GDQS0p.js} +45 -45
  89. package/dist-library/{runtime-Dkq7ldyg.js → runtime-B2fxeveq.js} +1 -1
  90. package/dist-library/runtime-kcA7bG7G.js +1282 -0
  91. package/dist-library/sample-bP4zHB3L.js +289 -0
  92. package/dist-library/{schema-ZFufO8V0.js → schema-BufhKUSM.js} +12 -11
  93. package/dist-library/sdk-core-BoJT1SIt.js +1166 -0
  94. package/dist-library/session-core-nmJHuR9c.js +452 -0
  95. package/dist-library/{shareable-DDVL4Fi9.js → shareable-DpbE-59H.js} +250 -283
  96. package/dist-library/tooltip-layer-HDLrSWs0.js +28 -0
  97. package/dist-library/types/authoring/catalog.d.ts +2 -3
  98. package/dist-library/types/authoring/editor-i18n.d.ts +1 -1
  99. package/dist-library/types/authoring/index.d.ts +1 -1
  100. package/dist-library/types/authoring/insert.d.ts +1 -1
  101. package/dist-library/types/authoring/templates.d.ts +2 -2
  102. package/dist-library/types/build/diagnostics.d.ts +1 -1
  103. package/dist-library/types/build/host.d.ts +1 -1
  104. package/dist-library/types/build/index.d.ts +1 -1
  105. package/dist-library/types/build/notices.d.ts +1 -1
  106. package/dist-library/types/build/resources.d.ts +1 -1
  107. package/dist-library/types/build/vite.d.ts +1 -1
  108. package/dist-library/types/compiler/index.d.ts +2 -2
  109. package/dist-library/types/compiler/result.d.ts +1 -1
  110. package/dist-library/types/compiler/standard.d.ts +2 -2
  111. package/dist-library/types/compiler/types.d.ts +1 -1
  112. package/dist-library/types/components/{controls.d.ts → controls/controls.d.ts} +2 -3
  113. package/dist-library/types/components/{numeric-sliders.d.ts → controls/numeric-sliders.d.ts} +1 -1
  114. package/dist-library/types/components/{gallery.d.ts → gallery/gallery.d.ts} +1 -1
  115. package/dist-library/types/components/{layout.d.ts → layout/layout.d.ts} +1 -1
  116. package/dist-library/types/components/minimal-preset.d.ts +2 -0
  117. package/dist-library/types/components/mount-preset.d.ts +4 -0
  118. package/dist-library/types/components/network/submit-button.d.ts +10 -0
  119. package/dist-library/types/components/plot/coordinate.d.ts +2 -0
  120. package/dist-library/types/components/plugins/chart.d.ts +2 -0
  121. package/dist-library/types/components/plugins/data.d.ts +2 -0
  122. package/dist-library/types/components/plugins/diagram.d.ts +2 -0
  123. package/dist-library/types/components/plugins/forms.d.ts +2 -0
  124. package/dist-library/types/components/plugins/gallery.d.ts +2 -0
  125. package/dist-library/types/components/plugins/navigation.d.ts +2 -0
  126. package/dist-library/types/components/plugins/network.d.ts +2 -0
  127. package/dist-library/types/components/plugins/plot.d.ts +2 -0
  128. package/dist-library/types/components/shared/visual-frame.d.ts +12 -0
  129. package/dist-library/types/components/{visuals.d.ts → shared/visuals.d.ts} +1 -7
  130. package/dist-library/types/components/{data-table.d.ts → table/data-table.d.ts} +2 -2
  131. package/dist-library/types/export/component-state.d.ts +1 -1
  132. package/dist-library/types/export/index.d.ts +2 -1
  133. package/dist-library/types/export/print-document.d.ts +18 -0
  134. package/dist-library/types/export/render-markup.d.ts +23 -0
  135. package/dist-library/types/export/requirements.d.ts +1 -1
  136. package/dist-library/types/export/resources.d.ts +1 -1
  137. package/dist-library/types/export/restoration.d.ts +1 -1
  138. package/dist-library/types/export-assets/index.d.ts +25 -0
  139. package/dist-library/types/local/compilation/compiler-attributes.d.ts +8 -0
  140. package/dist-library/types/local/compilation/compiler-bindings.d.ts +19 -0
  141. package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
  142. package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
  143. package/dist-library/types/local/compilation/compiler-declarations.d.ts +32 -0
  144. package/dist-library/types/local/compilation/compiler-expressions.d.ts +32 -0
  145. package/dist-library/types/local/compilation/compiler-services.d.ts +62 -16
  146. package/dist-library/types/local/compilation/compiler-structure.d.ts +38 -3
  147. package/dist-library/types/local/compilation/compiler-tables.d.ts +30 -0
  148. package/dist-library/types/local/compilation/compiler-validation.d.ts +15 -0
  149. package/dist-library/types/local/compilation/compiler-values.d.ts +39 -1
  150. package/dist-library/types/local/compilation/compiler.d.ts +7 -14
  151. package/dist-library/types/local/compilation/dependencies.d.ts +1 -1
  152. package/dist-library/types/local/compilation/session/incremental.d.ts +75 -0
  153. package/dist-library/types/local/{session → compilation/session}/row-reuse.d.ts +1 -1
  154. package/dist-library/types/local/{session/compiler-cache.d.ts → compilation/session/semantic-cache.d.ts} +5 -19
  155. package/dist-library/types/local/compilation/streaming.d.ts +27 -0
  156. package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
  157. package/dist-library/types/local/{compilation → configuration}/component-kernel.d.ts +3 -79
  158. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +1104 -1056
  159. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +731 -0
  160. package/dist-library/types/local/configuration/diagnostics.d.ts +1 -1
  161. package/dist-library/types/local/configuration/kernel-value-rules.d.ts +66 -0
  162. package/dist-library/types/local/configuration/official-leaf-syntax.d.ts +24 -0
  163. package/dist-library/types/local/configuration/options-core.d.ts +5 -4
  164. package/dist-library/types/local/configuration/options.d.ts +2 -1
  165. package/dist-library/types/local/configuration/portable-options.d.ts +1 -1
  166. package/dist-library/types/local/configuration/schema-core.d.ts +1 -1
  167. package/dist-library/types/local/configuration/schema.d.ts +1 -1
  168. package/dist-library/types/local/css/author-css.d.ts +66 -0
  169. package/dist-library/types/local/evaluation/computations.d.ts +2 -2
  170. package/dist-library/types/local/evaluation/expression/compile.d.ts +30 -0
  171. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -0
  172. package/dist-library/types/local/evaluation/expression/inference.d.ts +4 -0
  173. package/dist-library/types/local/evaluation/expression/syntax.d.ts +72 -0
  174. package/dist-library/types/local/evaluation/expression/values.d.ts +56 -0
  175. package/dist-library/types/local/evaluation/{math-display.d.ts → math/display.d.ts} +2 -2
  176. package/dist-library/types/local/evaluation/math/evaluation.d.ts +10 -0
  177. package/dist-library/types/local/evaluation/{math.d.ts → math/latex.d.ts} +58 -17
  178. package/dist-library/types/local/evaluation/{math-sample.d.ts → math/sample.d.ts} +4 -2
  179. package/dist-library/types/local/evaluation/math/syntax.d.ts +72 -0
  180. package/dist-library/types/local/evaluation/validation.d.ts +1 -1
  181. package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
  182. package/dist-library/types/local/html/html-details.d.ts +1 -1
  183. package/dist-library/types/local/html/html-entities.d.ts +11 -2
  184. package/dist-library/types/local/html/html-recovery.d.ts +1 -1
  185. package/dist-library/types/local/html/html-table.d.ts +1 -1
  186. package/dist-library/types/local/html/html.d.ts +40 -4
  187. package/dist-library/types/local/index.d.ts +14 -13
  188. package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
  189. package/dist-library/types/local/{markdown → parsing}/fast-markdown.d.ts +1 -1
  190. package/dist-library/types/local/{markdown → parsing}/footnotes.d.ts +1 -1
  191. package/dist-library/types/local/{markdown → parsing}/heading-anchors.d.ts +1 -1
  192. package/dist-library/types/local/parsing/html-attributes.d.ts +14 -0
  193. package/dist-library/types/local/parsing/parse-budget.d.ts +1 -1
  194. package/dist-library/types/local/{session → parsing}/parse-session.d.ts +5 -5
  195. package/dist-library/types/local/parsing/parser-capabilities.d.ts +7 -2
  196. package/dist-library/types/local/parsing/parser-convert.d.ts +26 -0
  197. package/dist-library/types/local/parsing/parser-core.d.ts +10 -4
  198. package/dist-library/types/local/parsing/parser-internals.d.ts +54 -0
  199. package/dist-library/types/local/parsing/parser-region.d.ts +46 -0
  200. package/dist-library/types/local/parsing/parser-standard.d.ts +3 -0
  201. package/dist-library/types/local/parsing/parser-tags.d.ts +108 -0
  202. package/dist-library/types/local/parsing/parser.d.ts +3 -3
  203. package/dist-library/types/local/{markdown → parsing}/plain-paragraphs.d.ts +1 -1
  204. package/dist-library/types/local/parsing/rmd-recovery.d.ts +1 -1
  205. package/dist-library/types/local/parsing/theme-declaration.d.ts +22 -0
  206. package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
  207. package/dist-library/types/local/rendering/document/LocalDocumentView.d.ts +5 -0
  208. package/dist-library/types/local/rendering/{LocalDocumentView.d.ts → document/LocalDocumentViewCore.d.ts} +48 -9
  209. package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +6 -0
  210. package/dist-library/types/local/rendering/document/render-nodes.d.ts +24 -0
  211. package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
  212. package/dist-library/types/local/rendering/document/use-color-scheme.d.ts +10 -0
  213. package/dist-library/types/local/rendering/document/validation-state.d.ts +31 -0
  214. package/dist-library/types/local/rendering/document/view-render-context.d.ts +146 -0
  215. package/dist-library/types/local/rendering/{view-revision.d.ts → document/view-revision.d.ts} +31 -4
  216. package/dist-library/types/local/rendering/render-types.d.ts +1 -1
  217. package/dist-library/types/local/{widgets/table-surface.d.ts → rendering/table/data-table.d.ts} +3 -0
  218. package/dist-library/types/local/rendering/table/table-numeric-columns.d.ts +7 -0
  219. package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
  220. package/dist-library/types/local/runtime/retention.d.ts +1 -1
  221. package/dist-library/types/local/runtime/runtime-document.d.ts +71 -0
  222. package/dist-library/types/local/runtime/runtime-migration.d.ts +19 -0
  223. package/dist-library/types/local/runtime/runtime-values.d.ts +39 -0
  224. package/dist-library/types/local/runtime/runtime.d.ts +4 -2
  225. package/dist-library/types/local/runtime/state.d.ts +1 -1
  226. package/dist-library/types/local/source/authoring-syntax.d.ts +48 -0
  227. package/dist-library/types/local/source/authoring.d.ts +1 -1
  228. package/dist-library/types/local/source/source-context.d.ts +23 -0
  229. package/dist-library/types/local/source/source-migration.d.ts +2 -2
  230. package/dist-library/types/local/transport/compile-patch.d.ts +1 -1
  231. package/dist-library/types/local/transport/flat-compiled-data.d.ts +1 -1
  232. package/dist-library/types/local/transport/shared-data.d.ts +1 -1
  233. package/dist-library/types/local/transport/worker-handler.d.ts +30 -0
  234. package/dist-library/types/local/transport/worker-job.d.ts +28 -0
  235. package/dist-library/types/local/transport/worker.d.ts +32 -46
  236. package/dist-library/types/local/{contracts/types.d.ts → types.d.ts} +78 -21
  237. package/dist-library/types/pdf.d.ts +22 -0
  238. package/dist-library/types/presets/identity.d.ts +1 -0
  239. package/dist-library/types/presets/minimal.d.ts +2 -0
  240. package/dist-library/types/presets/plugin-packs.d.ts +1 -0
  241. package/dist-library/types/react/component-api.d.ts +20 -4
  242. package/dist-library/types/react/component-primitives.d.ts +10 -10
  243. package/dist-library/types/react/component-utils.d.ts +9 -1
  244. package/dist-library/types/react/index.d.ts +6 -5
  245. package/dist-library/types/{local/theme/i18n.d.ts → react/localization.d.ts} +2 -2
  246. package/dist-library/types/react/minimal.d.ts +13 -0
  247. package/dist-library/types/react/package-core.d.ts +67 -0
  248. package/dist-library/types/react/package.d.ts +3 -67
  249. package/dist-library/types/react/runtime/common.d.ts +1 -1
  250. package/dist-library/types/react/sdk-core.d.ts +115 -0
  251. package/dist-library/types/react/sdk.d.ts +4 -110
  252. package/dist-library/types/react/server.d.ts +2 -2
  253. package/dist-library/types/react/use-draft-field.d.ts +5 -1
  254. package/dist-library/types/runtime-services/browser/duplex.d.ts +163 -0
  255. package/dist-library/types/runtime-services/browser/http-sse.d.ts +117 -0
  256. package/dist-library/types/runtime-services/browser/index.d.ts +2 -1
  257. package/dist-library/types/runtime-services/component-state.d.ts +1 -1
  258. package/dist-library/types/runtime-services/index.d.ts +2 -0
  259. package/dist-library/types/runtime-services/network.d.ts +86 -0
  260. package/dist-library/types/runtime-services/runtime.d.ts +1 -1
  261. package/dist-library/types/sdk/config.d.ts +1 -1
  262. package/dist-library/types/sdk/index.d.ts +1 -0
  263. package/dist-library/types/sdk/props.d.ts +1 -1
  264. package/dist-library/types/sdk/registry-core.d.ts +1 -1
  265. package/dist-library/types/sdk/theme.d.ts +5 -4
  266. package/dist-library/types/sdk/types.d.ts +2 -2
  267. package/dist-library/types/shareable.d.ts +6 -5
  268. package/dist-library/types/standalone/diagnostics.d.ts +1 -1
  269. package/dist-library/types/standalone/host.d.ts +5 -0
  270. package/dist-library/types/standalone/payload.d.ts +1 -1
  271. package/dist-library/types/standalone/prepare.d.ts +2 -2
  272. package/dist-library/types/standalone/session-core.d.ts +68 -0
  273. package/dist-library/types/standalone/session.d.ts +6 -68
  274. package/dist-library/types/themes/contract.d.ts +7 -0
  275. package/dist-library/types/{local/theme/theme.d.ts → themes/document-theme.d.ts} +4 -3
  276. package/dist-library/types/vite/client.d.ts +19 -0
  277. package/dist-library/types/vite/index.d.ts +18 -3
  278. package/dist-library/types/vite/registration.d.ts +2 -2
  279. package/dist-library/{types-BFCrMrg0.js → types-BeNtPqdY.js} +1 -1
  280. package/dist-library/validation-BEBA_HvS.js +1121 -0
  281. package/dist-library/visual-frame-CyV1FXzs.js +48 -0
  282. package/dist-library/visuals-B5KSafVk.js +3 -0
  283. package/dist-library/visuals-BZbZYA7w.js +72572 -0
  284. package/dist-standalone/reactive-md-standalone.css +1 -1
  285. package/dist-standalone/reactive-md-standalone.js +146 -137
  286. package/docs/README-ch.md +16 -11
  287. package/docs/README.md +16 -11
  288. package/docs/compatibility/compatibility-ch.md +8 -8
  289. package/docs/compatibility/compatibility-en.md +8 -8
  290. package/docs/compatibility/source-versioning-ch.md +1 -1
  291. package/docs/compatibility/source-versioning-en.md +1 -1
  292. package/docs/development/component-development-ch.md +2 -2
  293. package/docs/development/component-development-en.md +2 -2
  294. package/docs/development/component-development-reference-ch.md +4 -4
  295. package/docs/development/component-development-reference-en.md +4 -4
  296. package/docs/development/component-protocol-ch.md +14 -14
  297. package/docs/development/component-protocol-en.md +14 -14
  298. package/docs/development/extension-tutorial-ch.md +308 -0
  299. package/docs/development/extension-tutorial-en.md +308 -0
  300. package/docs/development/local-module-layout-ch.md +10 -50
  301. package/docs/development/local-module-layout-en.md +9 -49
  302. package/docs/development/performance-overview-ch.md +174 -154
  303. package/docs/development/performance-overview-en.md +174 -154
  304. package/docs/guides/local-guide-ch.md +2 -2
  305. package/docs/guides/local-guide-en.md +2 -2
  306. package/docs/integration/author-tools-ch.md +2 -2
  307. package/docs/integration/author-tools-en.md +2 -2
  308. package/docs/integration/compiler-ch.md +4 -2
  309. package/docs/integration/compiler-en.md +4 -2
  310. package/docs/integration/directory-discovery-ch.md +5 -1
  311. package/docs/integration/directory-discovery-en.md +5 -1
  312. package/docs/integration/editor-ch.md +35 -5
  313. package/docs/integration/editor-en.md +42 -4
  314. package/docs/integration/extension-sdk-ch.md +6 -4
  315. package/docs/integration/extension-sdk-en.md +6 -4
  316. package/docs/integration/local-integration-ch.md +201 -19
  317. package/docs/integration/local-integration-en.md +194 -18
  318. package/docs/integration/network-host-ch.md +75 -0
  319. package/docs/integration/network-host-en.md +75 -0
  320. package/docs/integration/shareable-export-ch.md +58 -16
  321. package/docs/integration/shareable-export-en.md +57 -15
  322. package/docs/reference/html-compatibility-ch.md +20 -67
  323. package/docs/reference/html-compatibility-en.md +19 -64
  324. package/docs/reference/local-interaction-syntax-ch.md +199 -26
  325. package/docs/reference/local-interaction-syntax-en.md +194 -27
  326. package/docs/reference/public-api-ch.md +416 -0
  327. package/docs/reference/public-api-en.md +416 -0
  328. package/docs/reference/theme-protocol-ch.md +27 -8
  329. package/docs/reference/theme-protocol-en.md +46 -8
  330. package/docs/releases/release-0.4.0-ch.md +2 -2
  331. package/docs/releases/release-0.4.0-en.md +2 -2
  332. package/docs/releases/release-0.8.0-ch.md +19 -3
  333. package/docs/releases/release-0.8.0-en.md +19 -3
  334. package/docs/releases/release-0.9.0-ch.md +44 -0
  335. package/docs/releases/release-0.9.0-en.md +44 -0
  336. package/docs/releases/release-0.9.1-ch.md +29 -0
  337. package/docs/releases/release-0.9.1-en.md +29 -0
  338. package/examples/component-package/README-ch.md +1 -1
  339. package/examples/component-package/README.md +1 -1
  340. package/examples/conformance/README-ch.md +3 -3
  341. package/examples/conformance/README.md +3 -3
  342. package/examples/game-2048-package/README-ch.md +3 -9
  343. package/examples/game-2048-package/README.md +8 -12
  344. package/examples/integration/README-ch.md +21 -2
  345. package/examples/integration/README.md +21 -2
  346. package/examples/integration/extension-sdk/README-ch.md +1 -1
  347. package/examples/integration/extension-sdk/README.md +1 -1
  348. package/examples/integration/streaming/index.html +48 -0
  349. package/examples/integration/streaming/main.js +175 -0
  350. package/examples/integration/streaming/package.json +13 -0
  351. package/examples/integration/streaming/worker.js +3 -0
  352. package/examples/local/README-ch.md +3 -3
  353. package/examples/local/README.md +2 -2
  354. package/examples/local/minimal-budget.reactive.md +48 -0
  355. package/examples/minimal-extension/README-ch.md +78 -0
  356. package/examples/minimal-extension/README.md +78 -0
  357. package/examples/minimal-extension/index.html +15 -0
  358. package/examples/minimal-extension/package.json +26 -0
  359. package/examples/minimal-extension/sample/document.reactive.md +10 -0
  360. package/examples/minimal-extension/scripts/build.mjs +32 -0
  361. package/examples/minimal-extension/scripts/export.mjs +72 -0
  362. package/examples/minimal-extension/scripts/test-node.mjs +75 -0
  363. package/examples/minimal-extension/src/extension.tsx +90 -0
  364. package/examples/minimal-extension/src/preview.tsx +12 -0
  365. package/examples/minimal-extension/src/source.ts +4 -0
  366. package/examples/minimal-extension/tsconfig.json +14 -0
  367. package/examples/network-survey/README.md +200 -0
  368. package/examples/network-survey/index.html +49 -0
  369. package/examples/network-survey/package.json +26 -0
  370. package/examples/network-survey/sample/document.reactive.md +51 -0
  371. package/examples/network-survey/src/components.tsx +325 -0
  372. package/examples/network-survey/src/host.ts +316 -0
  373. package/examples/network-survey/src/main.tsx +91 -0
  374. package/examples/network-survey/src/source.ts +1 -0
  375. package/examples/network-survey/tsconfig.json +26 -0
  376. package/examples/network-survey/vite.config.ts +227 -0
  377. package/examples/sci-fi-theme/README-ch.md +4 -2
  378. package/examples/sci-fi-theme/README.md +4 -2
  379. package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -0
  380. package/examples/sci-fi-theme/demo/demo.css +129 -23
  381. package/examples/sci-fi-theme/demo/document.reactive.md +27 -6
  382. package/examples/sci-fi-theme/demo/main.tsx +45 -10
  383. package/examples/sci-fi-theme/docs/design-system-ch.md +6 -6
  384. package/examples/sci-fi-theme/package.json +2 -1
  385. package/examples/sci-fi-theme/src/components.css +1064 -154
  386. package/examples/sci-fi-theme/src/notch.css +142 -0
  387. package/examples/sci-fi-theme/src/sci-fi.css +3 -1
  388. package/examples/sci-fi-theme/src/theme.ts +2 -0
  389. package/examples/sci-fi-theme/src/tokens.css +512 -408
  390. package/examples/tetris-package/README-ch.md +4 -4
  391. package/examples/tetris-package/README.md +4 -4
  392. package/package.json +70 -3
  393. package/dist-library/LocalDocumentView-6trX7xJc.js +0 -97920
  394. package/dist-library/compiler--ea2CKQF.js +0 -61
  395. package/dist-library/component-state-Cq2K5gkS.js +0 -490
  396. package/dist-library/options-CX5m5n-J.js +0 -115
  397. package/dist-library/runtime-C-sbfpOX.js +0 -1157
  398. package/dist-library/types/local/contracts/locale.d.ts +0 -1
  399. package/dist-library/types/local/contracts/version.d.ts +0 -2
  400. package/dist-library/types/local/evaluation/dates.d.ts +0 -2
  401. package/dist-library/types/local/evaluation/expression.d.ts +0 -47
  402. package/dist-library/types/local/markdown/markdown-structure.d.ts +0 -3
  403. package/dist-library/types/local/rendering/legacy-component-adapter.d.ts +0 -36
  404. package/dist-library/types/local/session/incremental.d.ts +0 -48
  405. package/dist-library/types/local/source/node-walk.d.ts +0 -3
  406. package/dist-library/types/local/source/text-length.d.ts +0 -13
  407. package/dist-library/types/local/theme/theme-name.d.ts +0 -3
  408. package/dist-library/types/local/widgets/visuals.d.ts +0 -25
  409. package/dist-library/types/react/default-theme.d.ts +0 -6
  410. package/dist-library/validation-W-bmny-x.js +0 -2253
  411. package/docs/development/releasing-ch.md +0 -12
  412. package/docs/development/releasing-en.md +0 -12
  413. package/docs/integration/codemirror-ch.md +0 -52
  414. package/docs/integration/codemirror-en.md +0 -29
  415. package/docs/integration/repository-split-ch.md +0 -40
  416. package/docs/integration/repository-split-en.md +0 -23
  417. package/docs/reference/computations-formatting-ch.md +0 -89
  418. package/docs/reference/computations-formatting-en.md +0 -89
  419. package/docs/reference/constraints-collections-ch.md +0 -104
  420. package/docs/reference/constraints-collections-en.md +0 -104
  421. package/docs/reference/local-components-v2-ch.md +0 -140
  422. package/docs/reference/local-components-v2-en.md +0 -106
  423. package/docs/reference/tolerance-ch.md +0 -64
  424. package/docs/reference/tolerance-en.md +0 -57
  425. /package/dist-library/types/components/{chart-motion.d.ts → chart/chart-motion.d.ts} +0 -0
  426. /package/dist-library/types/components/{default-chart-types.d.ts → chart/default-chart-types.d.ts} +0 -0
  427. /package/dist-library/types/components/{default-chart.d.ts → chart/default-chart.d.ts} +0 -0
  428. /package/dist-library/types/components/{diagram-inspector.d.ts → diagram/diagram-inspector.d.ts} +0 -0
  429. /package/dist-library/types/{local/widgets/diagram-layout.d.ts → components/diagram/layout.d.ts} +0 -0
  430. /package/dist-library/types/components/{mafs-plot-grid.d.ts → plot/mafs-plot-grid.d.ts} +0 -0
  431. /package/dist-library/types/components/{mafs-visuals.d.ts → plot/mafs-visuals.d.ts} +0 -0
  432. /package/dist-library/types/components/{use-hydrated.d.ts → shared/use-hydrated.d.ts} +0 -0
  433. /package/dist-library/types/local/{theme/colors.d.ts → configuration/color-values.d.ts} +0 -0
  434. /package/dist-library/types/local/evaluation/{collection-functions.d.ts → expression/collection-functions.d.ts} +0 -0
  435. /package/dist-library/types/local/evaluation/{data-functions.d.ts → expression/data-functions.d.ts} +0 -0
  436. /package/dist-library/types/local/evaluation/{formatting.d.ts → expression/formatting.d.ts} +0 -0
  437. /package/dist-library/types/local/{markdown → parsing}/markdown-blocks.d.ts +0 -0
  438. /package/dist-library/types/local/{widgets → rendering/code}/code-block.d.ts +0 -0
  439. /package/dist-library/types/local/{widgets → rendering/code}/code-languages.d.ts +0 -0
  440. /package/dist-library/types/local/{widgets → rendering/image}/image-view.d.ts +0 -0
  441. /package/dist-library/types/local/{widgets → rendering}/math-view.d.ts +0 -0
@@ -1,83 +1,29 @@
1
- import { v as e } from "./compiler-core-kPiH-gOV.js";
2
- import { D as t } from "./config-validation-DXTynAw7.js";
3
- import { $ as n, S as r } from "./validation-W-bmny-x.js";
4
- import { n as i } from "./options-CX5m5n-J.js";
5
- import { t as a } from "./compiler--ea2CKQF.js";
6
- import { c as o } from "./schema-ZFufO8V0.js";
7
- // src/local/source/authoring.ts
8
- var s = /^[A-Za-z_][A-Za-z0-9_]*$/, c = 128, l = /* @__PURE__ */ new Set([
9
- "code",
10
- "inlineCode",
11
- "math",
12
- "inlineMath",
13
- "fallback",
14
- "comment",
15
- "footnoteDefinition"
16
- ]), u = /* @__PURE__ */ new Set([
17
- "local.version.unsupported",
18
- "local.version.malformed",
19
- "local.version.duplicate",
20
- "local.version.placement",
21
- "local.parse",
22
- "local.interpolation",
23
- "local.tag.unclosed",
24
- "local.tag.mismatch",
25
- "local.tag.closing",
26
- "local.tag.shape",
27
- "local.attribute",
28
- "local.budget"
29
- ]);
30
- function d(e) {
31
- return e !== void 0 && /[A-Za-z_]/.test(e);
32
- }
33
- function f(e) {
34
- return e !== void 0 && /[A-Za-z0-9_]/.test(e);
35
- }
36
- function p(e) {
37
- return e !== void 0 && /\s/.test(e);
38
- }
39
- function m(e) {
40
- return e.length > 0 && e.length <= c && s.test(e) && !n.has(e);
41
- }
42
- function h(e) {
43
- return {
44
- start: e.start,
45
- end: e.end
46
- };
47
- }
48
- function g(e, t) {
49
- try {
50
- return a(e, t).diagnostics;
51
- } catch {
52
- return [];
53
- }
54
- }
55
- function _(e) {
56
- let t = i(e);
57
- return t.ok ? t.htmlActive ? "html" : "markdown" : "invalid";
58
- }
59
- function v(e) {
60
- let t = i(e);
61
- return t.ok ? [...t.schemaByName.values()] : [];
62
- }
63
- var y = /^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/;
64
- function b(e, t) {
1
+ import { o as e } from "./latex-1w7aQgD5.js";
2
+ import { D as t } from "./config-validation-F47AcE6o.js";
3
+ import { o as n } from "./compile-wUv8KEge.js";
4
+ import { N as r } from "./validation-BEBA_HvS.js";
5
+ import { r as i } from "./options-1aDLK7JY.js";
6
+ import { t as a } from "./compiler-eOfcinZs.js";
7
+ import { c as o } from "./schema-BufhKUSM.js";
8
+ // src/local/source/authoring-syntax.ts
9
+ var s = /^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/;
10
+ function c(e, t) {
65
11
  if (e[t] !== "<") return null;
66
- let n = y.exec(e.slice(t));
12
+ let n = s.exec(e.slice(t));
67
13
  if (!n) return null;
68
- let r = !!n[1], i = n[2], a = t + (r ? 2 : 1), o = "", s = t + n[0].length;
69
- for (; s < e.length; s += 1) {
70
- let t = e[s];
14
+ let r = !!n[1], i = n[2], a = t + (r ? 2 : 1), o = "", c = t + n[0].length;
15
+ for (; c < e.length; c += 1) {
16
+ let t = e[c];
71
17
  if (o) t === o && (o = "");
72
18
  else if (t === "\"" || t === "'") o = t;
73
19
  else if (t === ">") break;
74
20
  }
75
- if (s >= e.length) return null;
76
- let c = s, l = s + 1;
21
+ if (c >= e.length) return null;
22
+ let l = c, u = c + 1;
77
23
  if (r) return {
78
24
  start: t,
79
- end: l,
80
- contentEnd: c,
25
+ end: u,
26
+ contentEnd: l,
81
27
  name: i,
82
28
  nameRange: {
83
29
  start: a,
@@ -87,39 +33,39 @@ function b(e, t) {
87
33
  selfClosing: !1,
88
34
  attrs: []
89
35
  };
90
- let u = [], d = a + i.length;
91
- for (; d < c;) {
92
- for (; d < c && p(e[d]);) d += 1;
93
- if (d >= c) break;
94
- if (e[d] === "/") {
95
- d += 1;
36
+ let d = [], f = a + i.length;
37
+ for (; f < l;) {
38
+ for (; f < l && h(e[f]);) f += 1;
39
+ if (f >= l) break;
40
+ if (e[f] === "/") {
41
+ f += 1;
96
42
  continue;
97
43
  }
98
- let t = /^[A-Za-z][A-Za-z0-9_-]*/.exec(e.slice(d, c));
44
+ let t = /^[A-Za-z][A-Za-z0-9_-]*/.exec(e.slice(f, l));
99
45
  if (!t) {
100
- d += 1;
46
+ f += 1;
101
47
  continue;
102
48
  }
103
- let n = d, r = t[0];
104
- d += r.length;
105
- let i = d, a = d;
106
- for (; a < c && p(e[a]);) a += 1;
49
+ let n = f, r = t[0];
50
+ f += r.length;
51
+ let i = f, a = f;
52
+ for (; a < l && h(e[a]);) a += 1;
107
53
  if (e[a] !== "=") {
108
- u.push({
54
+ d.push({
109
55
  name: r,
110
56
  nameRange: {
111
57
  start: n,
112
58
  end: n + r.length
113
59
  }
114
- }), d = i;
60
+ }), f = i;
115
61
  continue;
116
62
  }
117
- for (d = a + 1; d < c && p(e[d]);) d += 1;
118
- let o = e[d];
63
+ for (f = a + 1; f < l && h(e[f]);) f += 1;
64
+ let o = e[f];
119
65
  if (o === "\"" || o === "'") {
120
- let t = d, i = d + 1, a = e.indexOf(o, i);
121
- if (a < 0 || a > c) {
122
- u.push({
66
+ let t = f, i = f + 1, a = e.indexOf(o, i);
67
+ if (a < 0 || a > l) {
68
+ d.push({
123
69
  name: r,
124
70
  nameRange: {
125
71
  start: n,
@@ -127,14 +73,14 @@ function b(e, t) {
127
73
  },
128
74
  valueRange: {
129
75
  start: i,
130
- end: c
76
+ end: l
131
77
  },
132
78
  quoteStart: t,
133
- quoteEnd: c
134
- }), d = c;
79
+ quoteEnd: l
80
+ }), f = l;
135
81
  continue;
136
82
  }
137
- u.push({
83
+ d.push({
138
84
  name: r,
139
85
  nameRange: {
140
86
  start: n,
@@ -146,12 +92,12 @@ function b(e, t) {
146
92
  },
147
93
  quoteStart: t,
148
94
  quoteEnd: a
149
- }), d = a + 1;
95
+ }), f = a + 1;
150
96
  continue;
151
97
  }
152
- let s = d;
153
- for (; d < c && !p(e[d]);) d += 1;
154
- u.push({
98
+ let s = f;
99
+ for (; f < l && !h(e[f]);) f += 1;
100
+ d.push({
155
101
  name: r,
156
102
  nameRange: {
157
103
  start: n,
@@ -159,33 +105,33 @@ function b(e, t) {
159
105
  },
160
106
  valueRange: {
161
107
  start: s,
162
- end: d
108
+ end: f
163
109
  },
164
110
  unquoted: !0
165
111
  });
166
112
  }
167
113
  return {
168
114
  start: t,
169
- end: l,
170
- contentEnd: c,
115
+ end: u,
116
+ contentEnd: l,
171
117
  name: i,
172
118
  nameRange: {
173
119
  start: a,
174
120
  end: a + i.length
175
121
  },
176
122
  closing: !1,
177
- selfClosing: /\/\s*$/.test(e.slice(a + i.length, c)),
178
- attrs: u
123
+ selfClosing: /\/\s*$/.test(e.slice(a + i.length, l)),
124
+ attrs: d
179
125
  };
180
126
  }
181
- function x(e, n, i) {
127
+ function l(e, n, i) {
182
128
  if (n.range.end <= i) return null;
183
129
  let a = e.lastIndexOf("</", n.range.end - 1);
184
130
  if (a < i) return null;
185
- let o = b(e, a);
131
+ let o = c(e, a);
186
132
  return !o || !o.closing || o.end > n.range.end || o.name !== n.name && (!t.has(o.name.toLowerCase()) && !r.has(o.name.toLowerCase()) || o.name.toLowerCase() !== n.name?.toLowerCase()) ? null : o;
187
133
  }
188
- function S(e, t, n) {
134
+ function u(e, t, n) {
189
135
  let r = [];
190
136
  for (let i = t; i < n;) {
191
137
  if (e[i] === "\\" && e.startsWith("{{", i + 1)) {
@@ -213,7 +159,7 @@ function S(e, t, n) {
213
159
  }
214
160
  return r;
215
161
  }
216
- function C(e, t) {
162
+ function d(e, t) {
217
163
  let n = {
218
164
  quot: "\"",
219
165
  apos: "'",
@@ -230,7 +176,7 @@ function C(e, t) {
230
176
  offsets: r
231
177
  };
232
178
  }
233
- function w(e, t, r) {
179
+ function f(e, t, r) {
234
180
  let i = [];
235
181
  for (let a = t; a < r;) {
236
182
  let t = e[a];
@@ -252,11 +198,11 @@ function w(e, t, r) {
252
198
  continue;
253
199
  }
254
200
  }
255
- if (d(t)) {
201
+ if (p(t)) {
256
202
  let t = a;
257
- for (a += 1; a < r && f(e[a]);) a += 1;
203
+ for (a += 1; a < r && m(e[a]);) a += 1;
258
204
  let o = e.slice(t, a), s = a;
259
- for (; s < r && p(e[s]);) s += 1;
205
+ for (; s < r && h(e[s]);) s += 1;
260
206
  if (e[s] === "(" || o === "true" || o === "false" || o === "null" || o === "pi" || o === "e" || n.has(o)) continue;
261
207
  i.push({
262
208
  name: o,
@@ -270,18 +216,76 @@ function w(e, t, r) {
270
216
  }
271
217
  return i;
272
218
  }
219
+ function p(e) {
220
+ return e !== void 0 && /[A-Za-z_]/.test(e);
221
+ }
222
+ function m(e) {
223
+ return e !== void 0 && /[A-Za-z0-9_]/.test(e);
224
+ }
225
+ function h(e) {
226
+ return e !== void 0 && /\s/.test(e);
227
+ }
228
+ // src/local/source/authoring.ts
229
+ var g = /^[A-Za-z_][A-Za-z0-9_]*$/, _ = 128, v = /* @__PURE__ */ new Set([
230
+ "code",
231
+ "inlineCode",
232
+ "math",
233
+ "inlineMath",
234
+ "fallback",
235
+ "comment",
236
+ "footnoteDefinition",
237
+ "authorCss",
238
+ "authorJavaScript",
239
+ "extendedHtmlRaw"
240
+ ]), y = /* @__PURE__ */ new Set([
241
+ "local.version.unsupported",
242
+ "local.version.malformed",
243
+ "local.version.duplicate",
244
+ "local.version.placement",
245
+ "local.parse",
246
+ "local.interpolation",
247
+ "local.tag.unclosed",
248
+ "local.tag.mismatch",
249
+ "local.tag.closing",
250
+ "local.tag.shape",
251
+ "local.attribute",
252
+ "local.budget"
253
+ ]);
254
+ function b(e) {
255
+ return e.length > 0 && e.length <= _ && g.test(e) && !n.has(e);
256
+ }
257
+ function x(e) {
258
+ return {
259
+ start: e.start,
260
+ end: e.end
261
+ };
262
+ }
263
+ function S(e, t) {
264
+ try {
265
+ return a(e, t).diagnostics;
266
+ } catch {
267
+ return [];
268
+ }
269
+ }
270
+ function C(e) {
271
+ return i(e).ok;
272
+ }
273
+ function w(e) {
274
+ let t = i(e);
275
+ return t.ok ? [...t.schemaByName.values()] : [];
276
+ }
273
277
  function T(e, t) {
274
278
  return Object.values(e.bindings ?? {}).some((e) => e.bind === t);
275
279
  }
276
280
  function E(e, t = []) {
277
- for (let n of e) l.has(n.type) && t.push(h(n.range)), n.type !== "fallback" && n.children && E(n.children, t);
281
+ for (let n of e) v.has(n.type) && t.push(x(n.range)), n.type !== "fallback" && n.children && E(n.children, t);
278
282
  return t;
279
283
  }
280
284
  function D(e, t) {
281
285
  let n = E(t), r = (t) => {
282
286
  for (let i of t) {
283
287
  if (i.type === "component" || i.type === "hostComponent") {
284
- let t = b(e, i.range.start);
288
+ let t = c(e, i.range.start);
285
289
  t && n.push({
286
290
  start: t.start,
287
291
  end: t.end
@@ -326,100 +330,100 @@ function k(n, i, a, o) {
326
330
  id: e.nodeId,
327
331
  range: e.range
328
332
  });
329
- let c = s.length ? i.concat(s) : i, u = /* @__PURE__ */ new Set(), d = [], f = /* @__PURE__ */ new Map(), p = [], g = [], _ = (e, t) => {
330
- for (let r of w(n, e, t)) p.push(r);
331
- }, v = (e, t) => {
332
- let n = f.get(e);
333
- n ? n.push(h(t)) : f.set(e, [h(t)]);
334
- }, y = (e, t) => {
335
- if (u.has(e.range.start)) return;
336
- let r = b(n, e.range.start);
333
+ let p = s.length ? i.concat(s) : i, m = /* @__PURE__ */ new Set(), h = [], g = /* @__PURE__ */ new Map(), _ = [], y = [], S = (e, t) => {
334
+ for (let r of f(n, e, t)) _.push(r);
335
+ }, C = (e, t) => {
336
+ let n = g.get(e);
337
+ n ? n.push(x(t)) : g.set(e, [x(t)]);
338
+ }, w = (e, t) => {
339
+ if (m.has(e.range.start)) return;
340
+ let r = c(n, e.range.start);
337
341
  if (!r || r.closing) return;
338
- u.add(e.range.start), d.push({
342
+ m.add(e.range.start), h.push({
339
343
  kind: "tag",
340
- range: h(r.nameRange)
344
+ range: x(r.nameRange)
341
345
  });
342
346
  let i = a.find((t) => t.name === e.name);
343
347
  for (let t of r.attrs) {
344
- if (d.push({
348
+ if (h.push({
345
349
  kind: "attribute",
346
- range: h(t.nameRange)
350
+ range: x(t.nameRange)
347
351
  }), !t.valueRange) continue;
348
- let o = O(e.name ?? "", a)?.[t.name], s = i !== void 0 && T(i, t.name) && Object.values(i.bindings ?? {}).some((e) => e.bind === t.name && (e.requiresAttributes ?? []).every((e) => r.attrs.some((t) => t.name === e))), c = (e.name === "computed" || e.name === "const" || e.name === "external") && t.name === "name", l = n.slice(t.valueRange.start, t.valueRange.end), u = C(n, t.valueRange);
352
+ let o = O(e.name ?? "", a)?.[t.name], s = i !== void 0 && T(i, t.name) && Object.values(i.bindings ?? {}).some((e) => e.bind === t.name && (e.requiresAttributes ?? []).every((e) => r.attrs.some((t) => t.name === e))), c = (e.name === "computed" || e.name === "const" || e.name === "external") && t.name === "name", l = n.slice(t.valueRange.start, t.valueRange.end), p = d(n, t.valueRange);
349
353
  if (i?.rules?.some((e) => e.kind === "validation-rule" && e.fields === t.name)) {
350
- for (let e of u.text.matchAll(/\S+/g)) {
351
- if (!m(e[0])) continue;
354
+ for (let e of p.text.matchAll(/\S+/g)) {
355
+ if (!b(e[0])) continue;
352
356
  let t = {
353
- start: u.offsets[e.index],
354
- end: u.offsets[e.index + e[0].length]
357
+ start: p.offsets[e.index],
358
+ end: p.offsets[e.index + e[0].length]
355
359
  };
356
- p.push({
360
+ _.push({
357
361
  name: e[0],
358
362
  range: t
359
- }), d.push({
363
+ }), h.push({
360
364
  kind: "binding",
361
365
  range: t
362
366
  });
363
367
  }
364
368
  continue;
365
369
  }
366
- let f = o && !o.static ? S(u.text, 0, u.text.length) : [];
367
- if (f.length > 0) {
370
+ let m = o && !o.static ? u(p.text, 0, p.text.length) : [];
371
+ if (m.length > 0) {
368
372
  let e = 0;
369
- for (let n of f) {
370
- n.start > e && d.push({
373
+ for (let n of m) {
374
+ n.start > e && h.push({
371
375
  kind: "string",
372
376
  range: {
373
- start: u.offsets[e],
374
- end: u.offsets[n.start]
377
+ start: p.offsets[e],
378
+ end: p.offsets[n.start]
375
379
  }
376
- }), d.push({
380
+ }), h.push({
377
381
  kind: "expression",
378
382
  range: {
379
- start: u.offsets[n.start],
380
- end: u.offsets[n.end]
383
+ start: p.offsets[n.start],
384
+ end: p.offsets[n.end]
381
385
  }
382
386
  });
383
- for (let e of w(u.text, n.innerStart, n.innerEnd)) (!i?.rules?.some((e) => e.kind === "scoped-expressions" && e.scope === "row" && e.attributes.includes(t.name) || e.kind === "row-values" && e.key === t.name) || e.name !== "item" && e.name !== "index") && p.push({
387
+ for (let e of f(p.text, n.innerStart, n.innerEnd)) (!i?.rules?.some((e) => e.kind === "scoped-expressions" && e.scope === "row" && e.attributes.includes(t.name) || e.kind === "row-values" && e.key === t.name) || e.name !== "item" && e.name !== "index") && _.push({
384
388
  name: e.name,
385
389
  range: {
386
- start: u.offsets[e.range.start],
387
- end: u.offsets[e.range.end]
390
+ start: p.offsets[e.range.start],
391
+ end: p.offsets[e.range.end]
388
392
  }
389
393
  });
390
394
  e = n.end;
391
395
  }
392
- e < u.text.length && d.push({
396
+ e < p.text.length && h.push({
393
397
  kind: "string",
394
398
  range: {
395
- start: u.offsets[e],
399
+ start: p.offsets[e],
396
400
  end: t.valueRange.end
397
401
  }
398
402
  });
399
- } else (s || c) && m(l) ? (d.push({
403
+ } else (s || c) && b(l) ? (h.push({
400
404
  kind: "binding",
401
- range: h(t.valueRange)
402
- }), v(l, t.valueRange)) : t.valueRange.end > t.valueRange.start && d.push({
405
+ range: x(t.valueRange)
406
+ }), C(l, t.valueRange)) : t.valueRange.end > t.valueRange.start && h.push({
403
407
  kind: "string",
404
- range: h(t.valueRange)
408
+ range: x(t.valueRange)
405
409
  });
406
410
  }
407
- let o = x(n, e, r.end);
408
- o && d.push({
411
+ let o = l(n, e, r.end);
412
+ o && h.push({
409
413
  kind: "tag",
410
- range: h(o.nameRange)
414
+ range: x(o.nameRange)
411
415
  });
412
416
  }, E = (i, o) => {
413
417
  for (let s of i) {
414
- if ((s.type === "component" || s.type === "hostComponent") && s.name) y(s, o);
415
- else if (s.type === "interpolation") d.push({
418
+ if ((s.type === "component" || s.type === "hostComponent") && s.name) w(s, o);
419
+ else if (s.type === "interpolation") h.push({
416
420
  kind: "expression",
417
- range: h(s.range)
418
- }), _(s.range.start + 2, Math.max(s.range.start + 2, s.range.end - 2));
421
+ range: x(s.range)
422
+ }), S(s.range.start + 2, Math.max(s.range.start + 2, s.range.end - 2));
419
423
  else if (s.type === "math" || s.type === "inlineMath") {
420
- if (d.push({
424
+ if (h.push({
421
425
  kind: "math",
422
- range: h(s.range)
426
+ range: x(s.range)
423
427
  }), a.find((e) => e.name === o)?.rules?.some((e) => e.kind === "inline-math-reads") && s.type === "math") {
424
428
  let t = s.range.start + 2;
425
429
  try {
@@ -431,20 +435,20 @@ function k(n, i, a, o) {
431
435
  end: t + r.range.end
432
436
  }
433
437
  };
434
- p.push(e), g.push(e);
438
+ _.push(e), y.push(e);
435
439
  }
436
440
  } catch {}
437
441
  }
438
- } else s.type === "code" || s.type === "inlineCode" ? d.push({
442
+ } else s.type === "code" || s.type === "inlineCode" ? h.push({
439
443
  kind: "code",
440
- range: h(s.range)
441
- }) : s.type === "comment" && d.push({
444
+ range: x(s.range)
445
+ }) : s.type === "comment" && h.push({
442
446
  kind: "comment",
443
- range: h(s.range)
447
+ range: x(s.range)
444
448
  });
445
- if (!l.has(s.type) && n[s.range.start] === "<" && !u.has(s.range.start)) {
446
- let e = b(n, s.range.start);
447
- e && !e.closing && (t.has(e.name.toLowerCase()) || r.has(e.name.toLowerCase())) && y({
449
+ if (!v.has(s.type) && n[s.range.start] === "<" && !m.has(s.range.start)) {
450
+ let e = c(n, s.range.start);
451
+ e && !e.closing && (t.has(e.name.toLowerCase()) || r.has(e.name.toLowerCase())) && w({
448
452
  ...s,
449
453
  name: e.name
450
454
  }, o);
@@ -452,25 +456,25 @@ function k(n, i, a, o) {
452
456
  s.type !== "fallback" && s.children && E(s.children, s.name);
453
457
  }
454
458
  };
455
- E(c);
456
- for (let e of D(n, c)) d.push({
459
+ E(p);
460
+ for (let e of D(n, p)) h.push({
457
461
  kind: "comment",
458
462
  range: e
459
463
  });
460
- d.sort((e, t) => e.range.start - t.range.start || e.range.end - t.range.end);
464
+ h.sort((e, t) => e.range.start - t.range.start || e.range.end - t.range.end);
461
465
  let k = [];
462
- for (let e of d) {
466
+ for (let e of h) {
463
467
  if (e.range.end <= e.range.start) continue;
464
468
  let t = k[k.length - 1];
465
469
  t && e.range.start < t.range.end || k.push(e);
466
470
  }
467
471
  let A = [];
468
- for (let [e, t] of f) {
472
+ for (let [e, t] of g) {
469
473
  let n = [], r = /* @__PURE__ */ new Set();
470
- for (let t of p) {
474
+ for (let t of _) {
471
475
  if (t.name !== e) continue;
472
476
  let i = `${t.range.start}:${t.range.end}`;
473
- r.has(i) || (r.add(i), n.push(h(t.range)));
477
+ r.has(i) || (r.add(i), n.push(x(t.range)));
474
478
  }
475
479
  n.sort((e, t) => e.start - t.start || e.end - t.end), t.sort((e, t) => e.start - t.start || e.end - t.end), A.push({
476
480
  name: e,
@@ -481,7 +485,7 @@ function k(n, i, a, o) {
481
485
  return A.sort((e, t) => e.declarations[0].start - t.declarations[0].start || e.name.localeCompare(t.name)), {
482
486
  tokens: k,
483
487
  bindings: A,
484
- mathReferences: g
488
+ mathReferences: y
485
489
  };
486
490
  }
487
491
  function A(e, t, n = {}) {
@@ -490,16 +494,16 @@ function A(e, t, n = {}) {
490
494
  bindings: [],
491
495
  diagnostics: []
492
496
  };
493
- if (_(t) !== "markdown") return {
497
+ if (!C(t)) return {
494
498
  tokens: [],
495
499
  bindings: [],
496
- diagnostics: n.diagnostics === !1 ? [] : g(e, t)
500
+ diagnostics: n.diagnostics === !1 ? [] : S(e, t)
497
501
  };
498
- let r = n.document?.source === e ? n.document : o(e, t), i = k(e, r.nodes, v(t), r);
502
+ let r = n.document?.source === e ? n.document : o(e, t), i = k(e, r.nodes, w(t), r);
499
503
  return {
500
504
  tokens: i.tokens,
501
505
  bindings: i.bindings,
502
- diagnostics: n.diagnostics === !1 ? [] : g(e, t)
506
+ diagnostics: n.diagnostics === !1 ? [] : S(e, t)
503
507
  };
504
508
  }
505
509
  function j(e, t, n) {
@@ -509,7 +513,7 @@ function j(e, t, n) {
509
513
  if (!i) {
510
514
  let t = o;
511
515
  for (; t < n;) {
512
- for (; t < n && p(e[t]);) t += 1;
516
+ for (; t < n && h(e[t]);) t += 1;
513
517
  if (t >= n) break;
514
518
  if (e[t] === "/") {
515
519
  u = !0, t += 1;
@@ -523,7 +527,7 @@ function j(e, t, n) {
523
527
  let i = r[0], a = t;
524
528
  t += i.length;
525
529
  let o = t, d = t;
526
- for (; d < n && p(e[d]);) d += 1;
530
+ for (; d < n && h(e[d]);) d += 1;
527
531
  if (e[d] !== "=") {
528
532
  s.push({
529
533
  name: i,
@@ -536,7 +540,7 @@ function j(e, t, n) {
536
540
  }), t = o;
537
541
  continue;
538
542
  }
539
- for (t = d + 1; t < n && p(e[t]);) t += 1;
543
+ for (t = d + 1; t < n && h(e[t]);) t += 1;
540
544
  let f = e[t];
541
545
  if (f === "\"" || f === "'") {
542
546
  let r = t, u = t + 1, d = e.indexOf(f, u);
@@ -576,8 +580,8 @@ function j(e, t, n) {
576
580
  }), t = d + 1;
577
581
  continue;
578
582
  }
579
- let m = t;
580
- for (; t < n && !p(e[t]);) t += 1;
583
+ let p = t;
584
+ for (; t < n && !h(e[t]);) t += 1;
581
585
  s.push({
582
586
  name: i,
583
587
  nameStart: a,
@@ -587,7 +591,7 @@ function j(e, t, n) {
587
591
  end: o
588
592
  },
589
593
  valueRange: {
590
- start: m,
594
+ start: p,
591
595
  end: t
592
596
  },
593
597
  unquoted: !0
@@ -598,7 +602,7 @@ function j(e, t, n) {
598
602
  if (!c) {
599
603
  let t = n;
600
604
  for (; t > o && /[A-Za-z0-9_-]/.test(e[t - 1]);) --t;
601
- t > o && p(e[t - 1]) && (d = t);
605
+ t > o && h(e[t - 1]) && (d = t);
602
606
  }
603
607
  return {
604
608
  name: a,
@@ -618,7 +622,7 @@ function M(e, t, n) {
618
622
  for (let n = r.length - 1; n >= 0; --n) {
619
623
  let i = r[n];
620
624
  if (i >= t) continue;
621
- let a = b(e, i);
625
+ let a = c(e, i);
622
626
  if (a && t <= a.end) return i;
623
627
  if (a && a.end < t) break;
624
628
  }
@@ -631,7 +635,7 @@ function M(e, t, n) {
631
635
  continue;
632
636
  }
633
637
  let r = e[n + 1];
634
- if (r !== "/" && !d(r)) a = n;
638
+ if (r !== "/" && !p(r)) a = n;
635
639
  else if (N(e, n, t)) a = n;
636
640
  else return n;
637
641
  }
@@ -704,10 +708,10 @@ function L(e, t, n, r) {
704
708
  function R(e, t, n, r) {
705
709
  if (F(e, n.innerStart, t)) return [];
706
710
  let i = t;
707
- for (; i > n.innerStart && f(e[i - 1]);) --i;
711
+ for (; i > n.innerStart && m(e[i - 1]);) --i;
708
712
  if (e[i - 1] === ".") return [];
709
713
  let a = e.slice(i, t);
710
- return a && !d(a[0]) ? [] : r.filter((e) => e.name.startsWith(a)).map((n) => ({
714
+ return a && !p(a[0]) ? [] : r.filter((e) => e.name.startsWith(a)).map((n) => ({
711
715
  label: n.name,
712
716
  insertText: n.name,
713
717
  range: L(e, i, t, n.name),
@@ -735,8 +739,23 @@ function B(e, t, n, r) {
735
739
  if (!i) return [];
736
740
  let a = e.slice(n.partialStart, t);
737
741
  if (a && !/^[A-Za-z0-9_-]*$/.test(a)) return [];
738
- let o = new Set(n.attrs.filter((e) => e.nameEnd < n.partialStart).map((e) => e.name));
739
- return Object.entries(i).filter(([e]) => !o.has(e) && e.startsWith(a)).map(([r, i]) => ({
742
+ let o = new Set(n.attrs.filter((e) => e.nameEnd < n.partialStart).map((e) => e.name)), s = { ...i };
743
+ return ![
744
+ "computed",
745
+ "const",
746
+ "external",
747
+ "validation",
748
+ "option",
749
+ "column",
750
+ "edge",
751
+ "step"
752
+ ].includes(n.name) && !Object.hasOwn(i, "css") && (s.css = {
753
+ kind: "string",
754
+ static: !0
755
+ }), n.name === "counter" && !Object.hasOwn(i, "action-id") && (s["action-id"] = {
756
+ kind: "string",
757
+ static: !0
758
+ }), Object.entries(s).filter(([e]) => !o.has(e) && e.startsWith(a)).map(([r, i]) => ({
740
759
  label: r,
741
760
  insertText: r,
742
761
  range: L(e, n.partialStart, t, r),
@@ -751,25 +770,28 @@ function V(e, t, n) {
751
770
  if (e[o] !== "<" || e[o - 1] === "\\") return [];
752
771
  let s = e[o + 1] === "/", c = o + (s ? 2 : 1);
753
772
  if (c > t) return [];
754
- let l = a[1] ?? "";
755
- return (s ? n.filter((e) => e.form !== "leaf").map((e) => e.name) : n.map((e) => e.name)).filter((e) => e.startsWith(l)).map((n) => ({
773
+ let l = a[1] ?? "", u = s ? n.filter((e) => e.form !== "leaf").map((e) => e.name) : n.map((e) => e.name), d = ["css", "javascript"].filter((e) => !n.some((t) => t.name === e));
774
+ return [...u, ...d].filter((e) => e.startsWith(l)).map((n) => ({
756
775
  label: n,
757
- insertText: n,
776
+ insertText: !s && d.includes(n) && e[L(e, c, t, n).end] !== ">" ? `${n}>\n\n</${n}>` : n,
758
777
  range: L(e, c, t, n),
759
778
  kind: "tag",
760
- detail: s ? "closing tag" : "component"
779
+ detail: s ? "closing tag" : d.includes(n) ? "document declaration" : "component"
761
780
  }));
762
781
  }
763
782
  function H(e, t, n) {
764
- if (typeof e != "string" || !Number.isFinite(t) || _(n) !== "markdown") return [];
765
- let r = Math.max(0, Math.min(e.length, Math.floor(t))), i = v(n), a = o(e, n), s = [...E(a.nodes), ...D(e, a.nodes)].sort((e, t) => e.start - t.start);
783
+ if (typeof e != "string" || !Number.isFinite(t) || !C(n)) return [];
784
+ let r = Math.max(0, Math.min(e.length, Math.floor(t))), i = w(n), a = o(e, n), s = [...E(a.nodes), ...D(e, a.nodes)].sort((e, t) => e.start - t.start);
766
785
  if (I(s, r) || r === e.length && s.some((e) => e.end === r && e.start < r)) return [];
767
786
  let c = k(e, a.nodes, i), l = P(e, r);
768
787
  if (l) {
769
788
  let t = M(e, r, a.nodes);
770
789
  if (t >= 0) {
771
790
  let n = j(e, t, r);
772
- if (n?.inValue && n.currentAttribute && O(n.name, i)?.[n.currentAttribute.name]?.static) return [];
791
+ if (n?.inValue && n.currentAttribute) {
792
+ let e = O(n.name, i)?.[n.currentAttribute.name];
793
+ if (e?.static || !e && ["css", "action-id"].includes(n.currentAttribute.name)) return [];
794
+ }
773
795
  }
774
796
  return R(e, r, l, c.bindings);
775
797
  }
@@ -793,30 +815,30 @@ function U(e, t) {
793
815
  }
794
816
  function W(e, t, n, r) {
795
817
  if (typeof e != "string" || typeof t != "string" || typeof n != "string") throw Error("Rename requires string arguments.");
796
- if (_(r) === "html") throw Error("Bindings cannot be renamed in HTML mode.");
797
- if (!m(n)) throw Error(`"${n}" is not a valid binding name. Use [A-Za-z_][A-Za-z0-9_]* and avoid reserved names.`);
798
- let i = k(e, o(e, r).nodes, v(r)), s = i.bindings.find((e) => e.name === t);
818
+ if (!C(r)) throw Error("Bindings cannot be renamed with invalid compile options.");
819
+ if (!b(n)) throw Error(`"${n}" is not a valid binding name. Use [A-Za-z_][A-Za-z0-9_]* and avoid reserved names.`);
820
+ let i = k(e, o(e, r).nodes, w(r)), s = i.bindings.find((e) => e.name === t);
799
821
  if (!s || s.declarations.length === 0) throw Error(`Binding "${t}" is not declared in this document.`);
800
822
  if (t === n) return {
801
823
  source: e,
802
824
  edits: []
803
825
  };
804
826
  if (i.bindings.some((e) => e.name === n)) throw Error(`Binding "${n}" already exists.`);
805
- if (g(e, r).some((e) => e.severity === "error" && u.has(e.code))) throw Error("The document cannot be renamed safely while parse errors remain.");
827
+ if (S(e, r).some((e) => e.severity === "error" && y.has(e.code))) throw Error("The document cannot be renamed safely while parse errors remain.");
806
828
  let c = /* @__PURE__ */ new Set(), l = [];
807
829
  for (let e of [...s.declarations, ...s.references]) {
808
830
  let t = `${e.start}:${e.end}`;
809
- c.has(t) || (c.add(t), l.push(h(e)));
831
+ c.has(t) || (c.add(t), l.push(x(e)));
810
832
  }
811
833
  l.sort((e, t) => e.start - t.start || e.end - t.end);
812
- let d = new Set(i.mathReferences.filter((e) => e.name === t).map((e) => `${e.range.start}:${e.range.end}`)), f = l.map((e) => ({
813
- range: h(e),
814
- text: d.has(`${e.start}:${e.end}`) ? `\\mathrm{${n}}` : n
815
- })), p = U(e, f);
816
- if (a(e, r).ok && !a(p, r).ok) throw Error("Rename could not preserve all binding references; the source was left unchanged.");
834
+ let u = new Set(i.mathReferences.filter((e) => e.name === t).map((e) => `${e.range.start}:${e.range.end}`)), d = l.map((e) => ({
835
+ range: x(e),
836
+ text: u.has(`${e.start}:${e.end}`) ? `\\mathrm{${n}}` : n
837
+ })), f = U(e, d);
838
+ if (a(e, r).ok && !a(f, r).ok) throw Error("Rename could not preserve all binding references; the source was left unchanged.");
817
839
  return {
818
- source: p,
819
- edits: f
840
+ source: f,
841
+ edits: d
820
842
  };
821
843
  }
822
844
  function G(e, t) {
@@ -827,7 +849,7 @@ function G(e, t) {
827
849
  return t.selfClosing ? `${i} />` : `${i}>`;
828
850
  }
829
851
  function K(e, t) {
830
- if (typeof e != "string" || _(t) !== "markdown") return e;
852
+ if (typeof e != "string" || !C(t)) return e;
831
853
  let n;
832
854
  try {
833
855
  n = a(e, t);
@@ -838,7 +860,7 @@ function K(e, t) {
838
860
  let r = o(e, t), i = [], s = (t) => {
839
861
  for (let n of t) {
840
862
  if ((n.type === "component" || n.type === "hostComponent") && n.name) {
841
- let t = b(e, n.range.start);
863
+ let t = c(e, n.range.start);
842
864
  if (t && !t.closing && !/[\r\n]/.test(e.slice(t.start, t.end))) {
843
865
  let n = G(e, t);
844
866
  n !== e.slice(t.start, t.end) && i.push({
@@ -848,7 +870,7 @@ function K(e, t) {
848
870
  });
849
871
  }
850
872
  if (t) {
851
- let r = x(e, n, t.end);
873
+ let r = l(e, n, t.end);
852
874
  if (r && !/[\r\n]/.test(e.slice(r.start, r.end))) {
853
875
  let t = `</${e.slice(r.nameRange.start, r.nameRange.end)}>`;
854
876
  t !== e.slice(r.start, r.end) && i.push({
@@ -863,8 +885,8 @@ function K(e, t) {
863
885
  }
864
886
  };
865
887
  s(r.nodes), i.sort((e, t) => e.start - t.start || e.end - t.end);
866
- let c = "", l = 0;
867
- for (let t of i) t.start < l || (c += e.slice(l, t.start) + t.text, l = t.end);
868
- return c + e.slice(l);
888
+ let u = "", d = 0;
889
+ for (let t of i) t.start < d || (u += e.slice(d, t.start) + t.text, d = t.end);
890
+ return u + e.slice(d);
869
891
  }
870
892
  export { W as i, H as n, K as r, A as t };