reactive-md 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/CHANGELOG-ch.md +34 -0
  2. package/CHANGELOG.md +34 -0
  3. package/README-ch.md +7 -7
  4. package/README-en.md +7 -7
  5. package/README.md +7 -7
  6. package/THIRD_PARTY_NOTICES.md +0 -57
  7. package/cli/help.mjs +6 -4
  8. package/cli/init.mjs +1 -1
  9. package/cli/migrate.mjs +1 -1
  10. package/dist-library/{LocalDocumentView-D6zQkTkt.js → LocalDocumentView-CP2QG86k.js} +46 -44
  11. package/dist-library/{LocalDocumentViewCore-CmJhemcA.js → LocalDocumentViewCore-Cd6yMEkg.js} +284 -265
  12. package/dist-library/{LocalReactiveDocumentCore-lAKOGAZ7.js → LocalReactiveDocumentCore-VuYpZqdn.js} +7 -7
  13. package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
  14. package/dist-library/authoring-Bwu_zCWs.js +768 -0
  15. package/dist-library/choice-values-BItGjPD2.js +58 -0
  16. package/dist-library/compile-B35rfzKr.js +1742 -0
  17. package/dist-library/{compile-cache-key-6GgpETz_.js → compile-cache-key-D21X2Obx.js} +5 -5
  18. package/dist-library/{compiler-DLkKUK4t.js → compiler-DBwLawMZ.js} +4 -4
  19. package/dist-library/{compiler-core-Niqhp9wV.js → compiler-core-kkDiQ1RK.js} +3146 -2055
  20. package/dist-library/{component-kernel-IG4wOO0i.js → component-kernel-CsJSabHX.js} +42 -26
  21. package/dist-library/{component-state-Ht-hOK0W.js → component-state-Da0G8Ajc.js} +1 -1
  22. package/dist-library/{component-utils-eSj5IdG4.js → component-utils-ZM3jUJNy.js} +80 -79
  23. package/dist-library/conditional-branches-CIhJXasR.js +17 -0
  24. package/dist-library/{config-validation-Cpol91_M.js → config-validation-DbmsWAEV.js} +165 -152
  25. package/dist-library/{controls-B-CLSK8Q.js → controls-DRy5rzzN.js} +271 -228
  26. package/dist-library/{coordinate-PyLPMIQK.js → coordinate-c54pHfgf.js} +29 -29
  27. package/dist-library/data-table-CSAkm1eU.js +290 -0
  28. package/dist-library/data-table-model-DruztQFt.js +391 -0
  29. package/dist-library/{data-visuals-_Z7QqYTk.js → data-visuals-rZQUeQM0.js} +14 -14
  30. package/dist-library/{default-components-jugH7Ubr.js → default-components-B-39etG9.js} +233 -71
  31. package/dist-library/{default-config-DIrRpuQz.js → default-config-CCa8rm2k.js} +236 -216
  32. package/dist-library/default-options-By16CVw1.js +131 -0
  33. package/dist-library/{default-registry-BlloaZi7.js → default-registry-DXJy66xj.js} +3 -3
  34. package/dist-library/{default-schema-Ch-Vznpm.js → default-schema-CeYiEW1K.js} +3 -3
  35. package/dist-library/display-Bb6hAG5T.js +2065 -0
  36. package/dist-library/{document-theme-DBAfnk7y.js → document-theme-CJvN-nC1.js} +190 -3
  37. package/dist-library/{export-heVBqgxA.js → export-BSV4E0jv.js} +105 -106
  38. package/dist-library/font-aliases-CKYjwn4o.js +4 -0
  39. package/dist-library/{gallery-Q6VPS2ep.js → gallery-DM2yTVZJ.js} +1 -1
  40. package/dist-library/{html-CCnvzan1.js → html-CY9mC3Sr.js} +5 -5
  41. package/dist-library/{incremental-Bzvh8_lB.js → incremental-B-wW4H3F.js} +251 -245
  42. package/dist-library/{display-y4v9v0Qd.js → katex-4ukd4ZxT.js} +1555 -3618
  43. package/dist-library/layout-CPQggKxk.js +592 -0
  44. package/dist-library/{layout-BnfDeUNy.js → layout-CaDWsDof.js} +1 -1
  45. package/dist-library/{math-view-B0jthpRw.js → math-view-CyGTS6kv.js} +1 -1
  46. package/dist-library/{mount-preset-C_i37FvY.js → mount-preset-DtrCX4G8.js} +4 -4
  47. package/dist-library/{numeric-sliders-CkWS0-ja.js → numeric-sliders-BmJ1LCLx.js} +190 -190
  48. package/dist-library/{observability-CYLuvFfL.js → observability-BVQ16ByQ.js} +5 -4
  49. package/dist-library/{package-core-9UK5ZdqB.js → package-core-Cu_r_qs7.js} +7 -6
  50. package/dist-library/{parser-9yNJxGip.js → parser-BHl9Lxbw.js} +2 -2
  51. package/dist-library/{parser-standard-BPIy4HOu.js → parser-standard-DDAKv_DZ.js} +247 -247
  52. package/dist-library/{plugin-packs-CZb46nuv.js → plugin-packs-CkI0floL.js} +3 -3
  53. package/dist-library/{preset-core-BW3NWZJ9.js → preset-core-BKPbH_Nv.js} +377 -306
  54. package/dist-library/{props-pJRrfDc6.js → props-0iDqxlTk.js} +56 -61
  55. package/dist-library/{react-BSo0o998.js → react-74jdGBmu.js} +2 -2
  56. package/dist-library/reactive-md-authoring.js +277 -269
  57. package/dist-library/reactive-md-build.js +327 -33
  58. package/dist-library/reactive-md-compiler-session.js +3 -3
  59. package/dist-library/reactive-md-compiler-standard.js +10 -10
  60. package/dist-library/reactive-md-compiler.js +3 -3
  61. package/dist-library/reactive-md-contracts.js +4 -4
  62. package/dist-library/reactive-md-default-packs.js +4 -3
  63. package/dist-library/reactive-md-default-preset.js +3 -3
  64. package/dist-library/reactive-md-export.js +6 -6
  65. package/dist-library/reactive-md-minimal-preset.js +3 -2
  66. package/dist-library/reactive-md-minimal-react-preset.js +18 -17
  67. package/dist-library/reactive-md-minimal.css +1 -1
  68. package/dist-library/reactive-md-observability.js +2 -2
  69. package/dist-library/reactive-md-pack-style-manifest.js +8 -0
  70. package/dist-library/reactive-md-plugin-chart.js +13 -9
  71. package/dist-library/reactive-md-plugin-data.js +4 -4
  72. package/dist-library/reactive-md-plugin-diagram.js +3 -3
  73. package/dist-library/reactive-md-plugin-forms.js +5 -5
  74. package/dist-library/reactive-md-plugin-gallery.js +3 -3
  75. package/dist-library/reactive-md-plugin-navigation.js +10 -10
  76. package/dist-library/reactive-md-plugin-network.js +5 -5
  77. package/dist-library/reactive-md-plugin-plot.js +4 -4
  78. package/dist-library/reactive-md-react-component-accordion.js +3 -3
  79. package/dist-library/reactive-md-react-component-alert.js +3 -3
  80. package/dist-library/reactive-md-react-component-anchor.js +3 -3
  81. package/dist-library/reactive-md-react-component-badge.js +3 -3
  82. package/dist-library/reactive-md-react-component-card.js +3 -3
  83. package/dist-library/reactive-md-react-component-chart.js +2 -2
  84. package/dist-library/reactive-md-react-component-checkbox.js +2 -2
  85. package/dist-library/reactive-md-react-component-checklist.js +2 -2
  86. package/dist-library/reactive-md-react-component-choices.js +2 -2
  87. package/dist-library/reactive-md-react-component-column.js +1 -1
  88. package/dist-library/reactive-md-react-component-coordinate.js +2 -2
  89. package/dist-library/reactive-md-react-component-counter.js +2 -2
  90. package/dist-library/reactive-md-react-component-data-table.js +2 -2
  91. package/dist-library/reactive-md-react-component-date.js +2 -2
  92. package/dist-library/reactive-md-react-component-diagram.js +2 -2
  93. package/dist-library/reactive-md-react-component-disclosure.js +3 -3
  94. package/dist-library/reactive-md-react-component-edge.js +1 -1
  95. package/dist-library/reactive-md-react-component-else.js +10 -0
  96. package/dist-library/reactive-md-react-component-gallery-item.js +2 -2
  97. package/dist-library/reactive-md-react-component-gallery.js +2 -2
  98. package/dist-library/reactive-md-react-component-grid.js +3 -3
  99. package/dist-library/reactive-md-react-component-if.js +3 -3
  100. package/dist-library/reactive-md-react-component-input.js +2 -2
  101. package/dist-library/reactive-md-react-component-jump.js +3 -3
  102. package/dist-library/reactive-md-react-component-multi-select.js +2 -2
  103. package/dist-library/reactive-md-react-component-node.js +2 -2
  104. package/dist-library/reactive-md-react-component-number.js +2 -2
  105. package/dist-library/reactive-md-react-component-option.js +1 -1
  106. package/dist-library/reactive-md-react-component-panel.js +3 -3
  107. package/dist-library/reactive-md-react-component-plot.js +2 -2
  108. package/dist-library/reactive-md-react-component-progress.js +2 -2
  109. package/dist-library/reactive-md-react-component-quiz.js +2 -2
  110. package/dist-library/reactive-md-react-component-radio-group.js +2 -2
  111. package/dist-library/reactive-md-react-component-range-slider.js +2 -2
  112. package/dist-library/reactive-md-react-component-section.js +3 -3
  113. package/dist-library/reactive-md-react-component-select.js +2 -2
  114. package/dist-library/reactive-md-react-component-slider.js +2 -2
  115. package/dist-library/reactive-md-react-component-step.js +3 -3
  116. package/dist-library/reactive-md-react-component-steps.js +3 -3
  117. package/dist-library/reactive-md-react-component-tab.js +3 -3
  118. package/dist-library/reactive-md-react-component-table.js +2 -2
  119. package/dist-library/reactive-md-react-component-tabs.js +3 -3
  120. package/dist-library/reactive-md-react-component-text.js +3 -3
  121. package/dist-library/reactive-md-react-component-textarea.js +2 -2
  122. package/dist-library/reactive-md-react-component-timeline.js +2 -2
  123. package/dist-library/reactive-md-react-component-timer.js +2 -2
  124. package/dist-library/reactive-md-react-component-toggle.js +2 -2
  125. package/dist-library/reactive-md-react-component-tooltip.js +3 -3
  126. package/dist-library/reactive-md-react-component-validation.js +3 -3
  127. package/dist-library/reactive-md-react-minimal.js +4 -4
  128. package/dist-library/reactive-md-react-pack-controls.js +4 -4
  129. package/dist-library/reactive-md-react-pack-data.js +3 -3
  130. package/dist-library/reactive-md-react-pack-layout.js +25 -24
  131. package/dist-library/reactive-md-react-pack-visuals.js +2 -2
  132. package/dist-library/reactive-md-react-packed.js +6 -6
  133. package/dist-library/reactive-md-react-server.js +37 -36
  134. package/dist-library/reactive-md-react-static-server.js +2 -2
  135. package/dist-library/reactive-md-react-static.js +1 -1
  136. package/dist-library/reactive-md-react-unstyled.js +12 -12
  137. package/dist-library/reactive-md-react.js +12 -12
  138. package/dist-library/reactive-md-scan.js +1 -1
  139. package/dist-library/reactive-md-sdk.js +23 -9
  140. package/dist-library/reactive-md-standalone-configured.js +2 -2
  141. package/dist-library/reactive-md-standalone-host.js +2 -2
  142. package/dist-library/reactive-md-testing-browser.js +2 -2
  143. package/dist-library/reactive-md-testing-react.js +6 -6
  144. package/dist-library/reactive-md-testing.js +6 -6
  145. package/dist-library/reactive-md-vite.js +25 -9
  146. package/dist-library/reactive-md-worker-pool.js +3 -3
  147. package/dist-library/reactive-md.css +1 -1
  148. package/dist-library/reactive-md.js +52 -43
  149. package/dist-library/{registry-core-CziAIP5P.js → registry-core-DxEaxhJ6.js} +3 -2
  150. package/dist-library/{render-nodes-DKjg_TR1.js → render-nodes-B6j6Ip5I.js} +766 -731
  151. package/dist-library/{requirements-DhIkxAbl.js → requirements-C56sFIEs.js} +2 -2
  152. package/dist-library/{resources-B_nbROgj.js → resources-6VaNgk-h.js} +2 -2
  153. package/dist-library/rmd-pack-layout.css +9 -0
  154. package/dist-library/rmd-pack-resource-layout.css +9 -0
  155. package/dist-library/runtime-BHeuLOv_.js +1369 -0
  156. package/dist-library/{runtime-requirement-C4-vNcf5.js → runtime-requirement-DzPO8raU.js} +166 -163
  157. package/dist-library/{schema-core-4sd1Vu7V.js → schema-core-CDXfxdID.js} +24 -1
  158. package/dist-library/{sdk-core-BLsW9cCy.js → sdk-core-CnE-n0Z7.js} +469 -314
  159. package/dist-library/{session-core-DLBRPV7f.js → session-core-C071yQwV.js} +140 -127
  160. package/dist-library/{validation-XXlb-spV.js → sha256-utf16-Bmandi_H.js} +392 -315
  161. package/dist-library/shareable-CHCDnl6j.js +844 -0
  162. package/dist-library/types/authoring/catalog.d.ts +3 -1
  163. package/dist-library/types/authoring/index.d.ts +1 -1
  164. package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
  165. package/dist-library/types/components/chart/default-chart.d.ts +7 -0
  166. package/dist-library/types/components/entries/else.d.ts +3 -0
  167. package/dist-library/types/components/layout/layout.d.ts +5 -0
  168. package/dist-library/types/components/shared/visuals.d.ts +1 -1
  169. package/dist-library/types/components/table/data-table-model.d.ts +95 -2
  170. package/dist-library/types/components/table/data-table.d.ts +2 -2
  171. package/dist-library/types/contracts/component-kernel.d.ts +5 -0
  172. package/dist-library/types/contracts/font-aliases.d.ts +18 -0
  173. package/dist-library/types/contracts/number-literal.d.ts +2 -0
  174. package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
  175. package/dist-library/types/export/index.d.ts +4 -1
  176. package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
  177. package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
  178. package/dist-library/types/local/compilation/compiler-expressions.d.ts +12 -1
  179. package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
  180. package/dist-library/types/local/compilation/compiler-structure.d.ts +8 -2
  181. package/dist-library/types/local/compilation/compiler-tables.d.ts +1 -0
  182. package/dist-library/types/local/compilation/compiler-validation.d.ts +11 -0
  183. package/dist-library/types/local/compilation/compiler-values.d.ts +1 -2
  184. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +173 -2
  185. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
  186. package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
  187. package/dist-library/types/local/evaluation/computations.d.ts +13 -5
  188. package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
  189. package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
  190. package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
  191. package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
  192. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
  193. package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
  194. package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
  195. package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
  196. package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
  197. package/dist-library/types/local/evaluation/validation.d.ts +8 -6
  198. package/dist-library/types/local/index.d.ts +4 -3
  199. package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
  200. package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
  201. package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
  202. package/dist-library/types/local/runtime/runtime.d.ts +3 -1
  203. package/dist-library/types/local/runtime/state.d.ts +30 -15
  204. package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
  205. package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
  206. package/dist-library/types/local/source/authoring.d.ts +10 -0
  207. package/dist-library/types/local/source/source-migration.d.ts +1 -0
  208. package/dist-library/types/local/types.d.ts +33 -2
  209. package/dist-library/types/react/component-api.d.ts +21 -2
  210. package/dist-library/types/react/component-utils.d.ts +11 -0
  211. package/dist-library/types/react/font-aliases.d.ts +2 -0
  212. package/dist-library/types/react/package-core.d.ts +3 -0
  213. package/dist-library/types/react/rendering/document/validation-state.d.ts +1 -1
  214. package/dist-library/types/react/rendering/document/view-revision.d.ts +3 -12
  215. package/dist-library/types/react/rendering/table/data-table.d.ts +1 -1
  216. package/dist-library/types/react/sdk-core.d.ts +3 -1
  217. package/dist-library/types/sdk/assembly.d.ts +3 -0
  218. package/dist-library/types/sdk/font.d.ts +13 -0
  219. package/dist-library/types/sdk/index.d.ts +1 -0
  220. package/dist-library/types/sdk/theme.d.ts +5 -0
  221. package/dist-library/types/sdk/types.d.ts +6 -0
  222. package/dist-library/types/sdk/version.d.ts +1 -1
  223. package/dist-library/types/shareable.d.ts +15 -3
  224. package/dist-library/types/standalone/prepare.d.ts +4 -2
  225. package/dist-library/types/standalone/session-core.d.ts +4 -1
  226. package/dist-library/types/vite/index.d.ts +3 -0
  227. package/dist-library/types/vite/registration.d.ts +1 -0
  228. package/dist-library/{types-Bza88SGK.js → types-B4qG8J4S.js} +1 -1
  229. package/dist-library/types-FYhRWRn9.js +3 -0
  230. package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
  231. package/dist-library/validation-DRuW0Wl9.js +433 -0
  232. package/dist-library/{version-B0G1699c.js → version-4wzhbvDG.js} +1 -1
  233. package/dist-library/{visual-helpers-CRmaqCHX.js → visual-helpers-UU6xiL8g.js} +3 -3
  234. package/dist-library/visuals-7xzoL9ql.js +49340 -0
  235. package/dist-library/{worker-D6WMV8xJ.js → worker-3ldRjOEG.js} +9 -9
  236. package/dist-standalone/reactive-md-standalone.css +1 -1
  237. package/dist-standalone/reactive-md-standalone.js +128 -368
  238. package/docs/README-ch.md +3 -1
  239. package/docs/README.md +3 -1
  240. package/docs/compatibility/api-stability-ch.md +1 -1
  241. package/docs/compatibility/api-stability-en.md +1 -1
  242. package/docs/compatibility/compatibility-ch.md +15 -15
  243. package/docs/compatibility/compatibility-en.md +15 -15
  244. package/docs/compatibility/compatibility-manifest.schema.json +3 -2
  245. package/docs/compatibility/deprecation-ch.md +2 -2
  246. package/docs/compatibility/deprecation-en.md +2 -2
  247. package/docs/compatibility/source-versioning-ch.md +22 -14
  248. package/docs/compatibility/source-versioning-en.md +22 -13
  249. package/docs/compatibility/support-matrix-ch.md +4 -3
  250. package/docs/compatibility/support-matrix-en.md +4 -3
  251. package/docs/development/component-development-ch.md +2 -2
  252. package/docs/development/component-development-en.md +2 -2
  253. package/docs/development/component-protocol-ch.md +18 -18
  254. package/docs/development/component-protocol-en.md +14 -14
  255. package/docs/guides/local-guide-ch.md +109 -20
  256. package/docs/guides/local-guide-en.md +109 -20
  257. package/docs/integration/author-tools-ch.md +1 -1
  258. package/docs/integration/author-tools-en.md +1 -1
  259. package/docs/integration/editor-ch.md +3 -3
  260. package/docs/integration/editor-en.md +3 -3
  261. package/docs/integration/extension-sdk-ch.md +29 -3
  262. package/docs/integration/extension-sdk-en.md +29 -3
  263. package/docs/integration/local-integration-ch.md +3 -3
  264. package/docs/integration/local-integration-en.md +3 -3
  265. package/docs/integration/pdf-export-ch.md +42 -0
  266. package/docs/integration/pdf-export-en.md +42 -0
  267. package/docs/integration/shareable-export-ch.md +11 -19
  268. package/docs/integration/shareable-export-en.md +11 -19
  269. package/docs/reference/diagnostics-counting-ch.md +24 -1
  270. package/docs/reference/diagnostics-counting-en.md +24 -1
  271. package/docs/reference/local-interaction-syntax-ch.md +222 -33
  272. package/docs/reference/local-interaction-syntax-en.md +220 -31
  273. package/docs/reference/public-api-ch.md +24 -18
  274. package/docs/reference/public-api-en.md +24 -18
  275. package/docs/reference/theme-protocol-ch.md +1 -1
  276. package/docs/reference/theme-protocol-en.md +1 -1
  277. package/docs/releases/release-0.10.0-ch.md +45 -0
  278. package/docs/releases/release-0.10.0-en.md +45 -0
  279. package/examples/conformance/README-ch.md +3 -3
  280. package/examples/conformance/README.md +3 -3
  281. package/examples/conformance/local-draft-4.json +441 -0
  282. package/examples/integration/README-ch.md +3 -3
  283. package/examples/integration/README.md +3 -3
  284. package/examples/integration/chat-session/package.json +1 -1
  285. package/examples/local/README-ch.md +1 -1
  286. package/examples/local/README.md +1 -1
  287. package/package.json +6 -1
  288. package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +0 -143
  289. package/dist-library/authoring-B14SsOXZ.js +0 -893
  290. package/dist-library/compile-D50B5_Ww.js +0 -1249
  291. package/dist-library/computations-CffoW7Ff.js +0 -340
  292. package/dist-library/data-table-Kv_ZA2Z2.js +0 -297
  293. package/dist-library/default-options-DU5dxuU6.js +0 -125
  294. package/dist-library/layout-BfUzzO2b.js +0 -553
  295. package/dist-library/runtime-CuJndKqK.js +0 -1289
  296. package/dist-library/shareable-C6mUerpQ.js +0 -817
  297. package/dist-library/types-daDo2c_w.js +0 -3
  298. package/dist-library/use-hydrated-W-laKPhY.js +0 -22975
  299. package/dist-library/visuals-CoVSjVD8.js +0 -49159
@@ -168,13 +168,29 @@ function g(e, t, n) {
168
168
  ...a ? { params: a } : {}
169
169
  });
170
170
  };
171
- for (let r of o(e)) switch (r.kind) {
171
+ for (let c of o(e)) switch (c.kind) {
172
+ case "required-one-of": {
173
+ if (c.attributes.some((e) => Object.hasOwn(t, e))) break;
174
+ let e = c.attributes.join(", ");
175
+ r.push({
176
+ code: "local.attribute.required",
177
+ key: "attribute.requiredOneOf",
178
+ message: `Component <${a}> requires at least one of: ${e}.`,
179
+ start: n.start,
180
+ end: n.end,
181
+ params: {
182
+ component: a,
183
+ attributes: e
184
+ }
185
+ });
186
+ break;
187
+ }
172
188
  case "numeric-range": {
173
- let o = p(e, t, r.min), c = p(e, t, r.max);
174
- o !== void 0 && c !== void 0 && (r.order === "increasing" ? !(o < c) : o > c) && s("local.constraint", r.order === "increasing" ? `${i} ${r.min ?? "min"} must be less than ${r.max ?? "max"}.` : `Component <${i}> min cannot exceed max.`, h(t, n.start, r.min), r.order === "increasing" ? "local.constraint.plot-range" : "local.constraint.number-min-max", r.order === "increasing" ? void 0 : { component: a });
175
- let l = p(e, t, r.step);
176
- l === void 0 || l > 0 && Number.isFinite(l) || s("local.constraint", `Component <${i}> step must be greater than 0.`, h(t, n.start, r.step), "local.constraint.number-step", { component: a });
177
- let u = r.integer;
189
+ let r = p(e, t, c.min), o = p(e, t, c.max);
190
+ r !== void 0 && o !== void 0 && (c.order === "increasing" ? !(r < o) : r > o) && s("local.constraint", c.order === "increasing" ? `${i} ${c.min ?? "min"} must be less than ${c.max ?? "max"}.` : `Component <${i}> min cannot exceed max.`, h(t, n.start, c.min), c.order === "increasing" ? "local.constraint.plot-range" : "local.constraint.number-min-max", c.order === "increasing" ? void 0 : { component: a });
191
+ let l = p(e, t, c.step);
192
+ l === void 0 || l > 0 && Number.isFinite(l) || s("local.constraint", `Component <${i}> step must be greater than 0.`, h(t, n.start, c.step), "local.constraint.number-step", { component: a });
193
+ let u = c.integer;
178
194
  if (u !== void 0) {
179
195
  let r = p(e, t, u);
180
196
  r !== void 0 && !Number.isInteger(r) && s("local.constraint", `Attribute ${u} must be a whole number.`, h(t, n.start, u), "local.constraint.integer", {
@@ -182,55 +198,55 @@ function g(e, t, n) {
182
198
  component: a
183
199
  });
184
200
  }
185
- if (r.positiveInteger !== void 0) {
186
- let i = p(e, t, r.positiveInteger);
187
- i !== void 0 && (!Number.isInteger(i) || i <= 0) && s("local.constraint", `Attribute ${r.positiveInteger} must be a positive whole number.`, h(t, n.start, r.positiveInteger), "local.constraint.positive-integer", {
188
- name: r.positiveInteger,
201
+ if (c.positiveInteger !== void 0) {
202
+ let r = p(e, t, c.positiveInteger);
203
+ r !== void 0 && (!Number.isInteger(r) || r <= 0) && s("local.constraint", `Attribute ${c.positiveInteger} must be a positive whole number.`, h(t, n.start, c.positiveInteger), "local.constraint.positive-integer", {
204
+ name: c.positiveInteger,
189
205
  component: a
190
206
  });
191
207
  }
192
208
  break;
193
209
  }
194
210
  case "text-length": {
195
- let i = p(e, t, r.min) ?? 0, a = p(e, t, r.max);
196
- a !== void 0 && a < i && s("local.constraint", "max-length cannot be less than min-length.", h(t, n.start, r.max), "local.constraint.length-order");
211
+ let r = p(e, t, c.min) ?? 0, i = p(e, t, c.max);
212
+ i !== void 0 && i < r && s("local.constraint", "max-length cannot be less than min-length.", h(t, n.start, c.max), "local.constraint.length-order");
197
213
  break;
198
214
  }
199
215
  case "date-bounds": {
200
- let i = m(e, t, r.min), a = m(e, t, r.max);
201
- i !== void 0 && !v(i) && s("local.attribute.type", `Date lower bound ${i} is not a valid YYYY-MM-DD.`, h(t, n.start, r.min), "local.attribute.type.date-lower", { value: i }), a !== void 0 && !v(a) && s("local.attribute.type", `Date upper bound ${a} is not a valid YYYY-MM-DD.`, h(t, n.start, r.max), "local.attribute.type.date-upper", { value: a }), i && a && i > a && s("local.constraint", "Date min cannot be later than max.", h(t, n.start, r.min), "local.constraint.date-order");
216
+ let r = m(e, t, c.min), i = m(e, t, c.max);
217
+ r !== void 0 && !v(r) && s("local.attribute.type", `Date lower bound ${r} is not a valid YYYY-MM-DD.`, h(t, n.start, c.min), "local.attribute.type.date-lower", { value: r }), i !== void 0 && !v(i) && s("local.attribute.type", `Date upper bound ${i} is not a valid YYYY-MM-DD.`, h(t, n.start, c.max), "local.attribute.type.date-upper", { value: i }), r && i && r > i && s("local.constraint", "Date min cannot be later than max.", h(t, n.start, c.min), "local.constraint.date-order");
202
218
  break;
203
219
  }
204
220
  case "nonempty": {
205
- let e = t[r.attribute];
221
+ let e = t[c.attribute];
206
222
  if (!e || e.dynamic) break;
207
- (typeof e.value == "string" ? e.value : String(e.raw ?? "")).trim() || s("local.constraint", `Attribute ${r.attribute} of <${i}> cannot be empty.`, e.offset, `local.constraint.${i}-${r.attribute}`, {
208
- name: r.attribute,
223
+ (typeof e.value == "string" ? e.value : String(e.raw ?? "")).trim() || s("local.constraint", `Attribute ${c.attribute} of <${i}> cannot be empty.`, e.offset, `local.constraint.${i}-${c.attribute}`, {
224
+ name: c.attribute,
209
225
  component: a
210
226
  });
211
227
  break;
212
228
  }
213
229
  case "progress-bounds": {
214
- let n = p(e, t, r.max) ?? r.defaultMax, i = t[r.value];
215
- i && !i.dynamic && typeof i.value == "number" && (i.value < 0 || i.value > n) && s("local.constraint", `progress value must be between 0 and ${n}, got ${i.value}.`, i.offset, "local.constraint.progress-range", {
230
+ let n = p(e, t, c.max) ?? c.defaultMax, r = t[c.value];
231
+ r && !r.dynamic && typeof r.value == "number" && (r.value < 0 || r.value > n) && s("local.constraint", `progress value must be between 0 and ${n}, got ${r.value}.`, r.offset, "local.constraint.progress-range", {
216
232
  max: n,
217
- value: i.value
233
+ value: r.value
218
234
  });
219
235
  break;
220
236
  }
221
237
  case "timer-duration": {
222
- let i = p(e, t, r.attribute) ?? r.default;
223
- (!Number.isInteger(i) || i <= 0) && s("local.constraint", "timer duration must be a positive whole number of seconds.", h(t, n.start, r.attribute), "local.constraint.timer-duration");
238
+ let r = p(e, t, c.attribute) ?? c.default;
239
+ (!Number.isInteger(r) || r <= 0) && s("local.constraint", "timer duration must be a positive whole number of seconds.", h(t, n.start, c.attribute), "local.constraint.timer-duration");
224
240
  break;
225
241
  }
226
242
  case "option-count": {
227
- let a = p(e, t, r.max);
228
- a !== void 0 && (!Number.isInteger(a) || a < 0) && s("local.constraint", `${i} ${r.max} must be a nonnegative whole number.`, h(t, n.start, r.max), `local.constraint.${i}`);
243
+ let r = p(e, t, c.max);
244
+ r !== void 0 && (!Number.isInteger(r) || r < 0) && s("local.constraint", `${i} ${c.max} must be a nonnegative whole number.`, h(t, n.start, c.max), `local.constraint.${i}`);
229
245
  break;
230
246
  }
231
247
  case "selection-requires":
232
- if (Object.hasOwn(t, r.key)) break;
233
- for (let e of r.attributes) {
248
+ if (Object.hasOwn(t, c.key)) break;
249
+ for (let e of c.attributes) {
234
250
  let n = t[e];
235
251
  n && s("local.selection.key", `<${i}> ${e} requires a key attribute naming the selection column.`, n.offset, "local.selection.key.required", {
236
252
  component: a,
@@ -1,4 +1,4 @@
1
- import { y as e } from "./document-theme-DBAfnk7y.js";
1
+ import { y as e } from "./document-theme-CJvN-nC1.js";
2
2
  import { t, u as n } from "./component-state-CwKX_SN5.js";
3
3
  import { c as r, i, t as a } from "./identity-BUx0Q_-d.js";
4
4
  // src/export/component-state.ts
@@ -1,10 +1,11 @@
1
- import { s as e } from "./document-theme-DBAfnk7y.js";
1
+ import { s as e } from "./document-theme-CJvN-nC1.js";
2
2
  import { t } from "./color-values-r8Wf7ALn.js";
3
- import { f as n } from "./sdk-core-BLsW9cCy.js";
4
- import { useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
3
+ import { p as n } from "./sdk-core-CnE-n0Z7.js";
4
+ import { createContext as r, useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
5
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
6
  // src/react/component-utils.tsx
7
- function l(e) {
7
+ var u = r(void 0);
8
+ function d(e) {
8
9
  return {
9
10
  context: e,
10
11
  content: e.content,
@@ -28,72 +29,72 @@ function l(e) {
28
29
  renderInline: (t, n) => e.children.renderInlineItems(t ?? e.children.items(), n)
29
30
  };
30
31
  }
31
- function u(t) {
32
- let [n, i] = o(null), { locale: a, report: s, bindings: c } = t, l = r((t) => t.map((t) => e(t, a.locale)).join("; "), [a.locale]);
32
+ function f(t) {
33
+ let [n, r] = s(null), { locale: a, report: o, bindings: c } = t, l = i((t) => t.map((t) => e(t, a.locale)).join("; "), [a.locale]);
33
34
  return {
34
- write: r((e, t = "value") => {
35
+ write: i((e, t = "value") => {
35
36
  let n = c.set(t, e);
36
- return n.ok ? (i(null), !0) : (n.diagnostics.length > 0 ? (i(l(n.diagnostics)), s(n.diagnostics)) : i(a.t("Cannot write this value", "无法写入此值")), !1);
37
+ return n.ok ? (r(null), !0) : (n.diagnostics.length > 0 ? (r(l(n.diagnostics)), o(n.diagnostics)) : r(a.t("Cannot write this value", "无法写入此值")), !1);
37
38
  }, [
38
39
  c,
39
40
  a,
40
41
  l,
41
- s
42
+ o
42
43
  ]),
43
- writeMany: r((e) => {
44
+ writeMany: i((e) => {
44
45
  let t = c.setMany(e);
45
- return t.ok ? (i(null), !0) : (t.diagnostics.length > 0 ? (i(l(t.diagnostics)), s(t.diagnostics)) : i(a.t("Cannot write this value", "无法写入此值")), !1);
46
+ return t.ok ? (r(null), !0) : (t.diagnostics.length > 0 ? (r(l(t.diagnostics)), o(t.diagnostics)) : r(a.t("Cannot write this value", "无法写入此值")), !1);
46
47
  }, [
47
48
  c,
48
49
  a,
49
50
  l,
50
- s
51
+ o
51
52
  ]),
52
53
  error: n,
53
- setError: i
54
+ setError: r
54
55
  };
55
56
  }
56
- function d(e) {
57
+ function p(e) {
57
58
  return {
58
59
  disabled: e.disabled,
59
60
  invalid: e.disabledInvalid
60
61
  };
61
62
  }
62
- function f(e, t) {
63
+ function m(e, t) {
63
64
  return e.validation.fieldFor(t ?? e.content);
64
65
  }
65
- function p(e, t) {
66
+ function h(e, t) {
66
67
  return e.validation.hintFor(t ?? e.content);
67
68
  }
68
- function m(e, t) {
69
+ function g(e, t) {
69
70
  return e.source.attributes(t);
70
71
  }
71
- function h(e, t) {
72
- let n = e.resetToken, r = a(n), o = a(t);
73
- o.current = t, i(() => {
74
- r.current !== n && (r.current = n, o.current());
72
+ function _(e, t) {
73
+ let n = e.resetToken, r = o(n), i = o(t);
74
+ i.current = t, a(() => {
75
+ r.current !== n && (r.current = n, i.current());
75
76
  }, [n]);
76
77
  }
77
- function g(e, t) {
78
+ function v(e, t) {
78
79
  return e.attrs[t];
79
80
  }
80
- function _(e, t, n = "") {
81
+ function y(e, t, n = "") {
81
82
  let r = e.props[t];
82
83
  return typeof r == "string" ? r : typeof r == "number" ? Number.isFinite(r) ? String(r) : n : typeof r == "boolean" ? r ? "true" : "false" : e.content.attrs[t] === void 0 ? n : e.locale.t("Cannot compute", "无法计算");
83
84
  }
84
- function v(e, t, n) {
85
+ function b(e, t, n) {
85
86
  let r = e.props[t];
86
87
  return typeof r == "number" && Number.isFinite(r) ? r : n;
87
88
  }
88
- function y(e, t, n, r = "") {
89
+ function x(e, t, n, r = "") {
89
90
  let i = t.props[n];
90
91
  return typeof i == "string" ? i : typeof i == "number" ? Number.isFinite(i) ? String(i) : r : typeof i == "boolean" ? i ? "true" : "false" : t.attrs[n] === void 0 ? r : e.locale.t("Cannot compute", "无法计算");
91
92
  }
92
- function b(e, t, n, r = !1) {
93
+ function S(e, t, n, r = !1) {
93
94
  let i = t.props[n];
94
95
  return typeof i == "boolean" ? i : r;
95
96
  }
96
- function x(e, t) {
97
+ function C(e, t) {
97
98
  if (e.content.attrs[t] === void 0) return {
98
99
  present: !1,
99
100
  error: !1
@@ -108,7 +109,7 @@ function x(e, t) {
108
109
  error: !0
109
110
  };
110
111
  }
111
- function S(e, t) {
112
+ function w(e, t) {
112
113
  if (e.content.attrs[t] === void 0) return {
113
114
  present: !1,
114
115
  error: !1
@@ -123,7 +124,7 @@ function S(e, t) {
123
124
  error: !0
124
125
  };
125
126
  }
126
- function C(e, t, n) {
127
+ function T(e, t, n) {
127
128
  if (e.content.attrs[t] === void 0) return {
128
129
  ok: !0,
129
130
  value: n
@@ -134,11 +135,11 @@ function C(e, t, n) {
134
135
  value: r
135
136
  } : { ok: !1 };
136
137
  }
137
- function w(e, t, n = !1) {
138
- let r = C(e, t, n);
138
+ function E(e, t, n = !1) {
139
+ let r = T(e, t, n);
139
140
  return r.ok ? r.value : n;
140
141
  }
141
- function T(e, t, n, r) {
142
+ function D(e, t, n, r) {
142
143
  if (e.content.attrs[t] === void 0) return {
143
144
  tone: r,
144
145
  error: !1
@@ -152,33 +153,33 @@ function T(e, t, n, r) {
152
153
  error: /\{\{/.test(e.content.attrs[t] ?? "")
153
154
  };
154
155
  }
155
- function E(e) {
156
+ function O(e) {
156
157
  let n = e.attrs.color;
157
158
  if (n === void 0) return;
158
159
  let r = n.trim();
159
160
  return r !== "" && t(r) ? r : void 0;
160
161
  }
161
- function D(e) {
162
+ function k(e) {
162
163
  if (e) return {
163
164
  "--local-accent": e,
164
165
  "--local-accent-soft": `color-mix(in srgb, ${e} 14%, var(--surface))`,
165
166
  "--local-accent-strong": e
166
167
  };
167
168
  }
168
- function O(e) {
169
+ function A(e) {
169
170
  return e === null ? "" : typeof e == "string" ? e : typeof e == "number" ? Number.isFinite(e) ? String(e) : null : typeof e == "boolean" ? e ? "true" : "false" : null;
170
171
  }
171
- function k(e) {
172
- return O(e) ?? "";
172
+ function j(e) {
173
+ return A(e) ?? "";
173
174
  }
174
- function A(e) {
175
+ function M(e) {
175
176
  try {
176
177
  return e.runtime.get(e.content);
177
178
  } catch {
178
179
  return null;
179
180
  }
180
181
  }
181
- function j(e, t, n) {
182
+ function N(e, t, n) {
182
183
  try {
183
184
  let r = e.runtime.get(e.content, t);
184
185
  return typeof r == "number" && Number.isFinite(r) ? r : n;
@@ -186,32 +187,32 @@ function j(e, t, n) {
186
187
  return n;
187
188
  }
188
189
  }
189
- function M(e, t, n) {
190
+ function P(e, t, n) {
190
191
  return Math.min(n, Math.max(t, e));
191
192
  }
192
- function N(e, t, n, r) {
193
+ function F(e, t, n, r) {
193
194
  let i = Number.isFinite(r) && r > 0 ? r : 1, a = Math.max(0, Math.floor((n - t) / i + 1e-9)), o = t + Math.max(0, Math.min(a, Math.round((e - t) / i))) * i;
194
195
  return Number(o.toPrecision(15));
195
196
  }
196
- function P(e, t, n, r, i, a = 1) {
197
- let o = v(e, t, r), s = v(e, n, i);
197
+ function I(e, t, n, r, i, a = 1) {
198
+ let o = b(e, t, r), s = b(e, n, i);
198
199
  o > s && ([o, s] = [s, o]);
199
- let c = v(e, "step", a);
200
+ let c = b(e, "step", a);
200
201
  return {
201
202
  min: o,
202
203
  max: s,
203
204
  step: Number.isFinite(c) && c > 0 ? c : 1
204
205
  };
205
206
  }
206
- function F(e) {
207
+ function L(e) {
207
208
  return e.trim() === "" ? "—" : e;
208
209
  }
209
- var I = (e) => e.startsWith("--") ? e : e.replace(/^ms-?/, "-ms").replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
210
- function L(e, t, n) {
210
+ var R = (e) => e.startsWith("--") ? e : e.replace(/^ms-?/, "-ms").replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`);
211
+ function z(e, t, n) {
211
212
  let r = e.ownerDocument.createElement("span").style;
212
213
  for (let [e, n] of Object.entries(t ?? {})) {
213
214
  if (n == null) continue;
214
- let t = I(e);
215
+ let t = R(e);
215
216
  r.setProperty(t, String(n)), typeof n == "number" && !t.startsWith("--") && !r.getPropertyValue(t) && r.setProperty(t, `${n}px`);
216
217
  }
217
218
  let i = r.cssText;
@@ -219,10 +220,10 @@ function L(e, t, n) {
219
220
  e.style.cssText = i;
220
221
  };
221
222
  }
222
- function R(e) {
223
- let t = e.authorStyle, n = e.authorStyleText, i = r((e) => {
223
+ function B(e) {
224
+ let t = e.authorStyle, n = e.authorStyleText, r = i((e) => {
224
225
  if (!e || !t) return;
225
- let n = Object.entries(t).map(([e, t]) => `${I(e)}:${t};`).join("");
226
+ let n = Object.entries(t).map(([e, t]) => `${R(e)}:${t};`).join("");
226
227
  e.style.cssText += n;
227
228
  }, [t]);
228
229
  return (e) => {
@@ -231,84 +232,84 @@ function R(e) {
231
232
  ...e,
232
233
  "--rmd-author-inline": `initial;${n}`
233
234
  },
234
- ref: (t) => t ? L(t, e, n) : void 0
235
+ ref: (t) => t ? z(t, e, n) : void 0
235
236
  };
236
237
  if (!t) return {
237
238
  style: e,
238
239
  ref: void 0
239
240
  };
240
- let r = { ...e };
241
- for (let [e, n] of Object.entries(t)) delete r[e], r[e] = n;
241
+ let i = { ...e };
242
+ for (let [e, n] of Object.entries(t)) delete i[e], i[e] = n;
242
243
  return {
243
- style: r,
244
- ref: i
244
+ style: i,
245
+ ref: r
245
246
  };
246
247
  };
247
248
  }
248
- function z({ label: e, value: t, hint: n, className: r = "", multiline: i = !1, authorRoot: a }) {
249
- return /* @__PURE__ */ c("div", {
249
+ function V({ label: e, value: t, hint: n, className: r = "", multiline: i = !1, authorRoot: a }) {
250
+ return /* @__PURE__ */ l("div", {
250
251
  className: `md-control local-static-control ${r}`.trim(),
251
252
  ...a,
252
253
  children: [
253
- /* @__PURE__ */ s("span", {
254
+ /* @__PURE__ */ c("span", {
254
255
  className: "md-label",
255
256
  children: e
256
257
  }),
257
- /* @__PURE__ */ s("span", {
258
+ /* @__PURE__ */ c("span", {
258
259
  className: `local-static-value${i ? " local-static-multiline" : ""}`,
259
260
  "data-local-static-value": "",
260
261
  children: t
261
262
  }),
262
- n ? /* @__PURE__ */ s("span", {
263
+ n ? /* @__PURE__ */ c("span", {
263
264
  className: "md-hint",
264
265
  children: n
265
266
  }) : null
266
267
  ]
267
268
  });
268
269
  }
269
- function B({ value: e, block: t = !1 }) {
270
- return t ? /* @__PURE__ */ s("div", {
270
+ function H({ value: e, block: t = !1 }) {
271
+ return t ? /* @__PURE__ */ c("div", {
271
272
  className: "local-print-value local-print-block",
272
273
  "aria-hidden": "true",
273
274
  "data-local-print-value": "",
274
275
  children: e
275
- }) : /* @__PURE__ */ s("span", {
276
+ }) : /* @__PURE__ */ c("span", {
276
277
  className: "local-print-value",
277
278
  "aria-hidden": "true",
278
279
  "data-local-print-value": "",
279
280
  children: e
280
281
  });
281
282
  }
282
- function V({ message: e, id: t }) {
283
- return e ? /* @__PURE__ */ s("span", {
283
+ function U({ message: e, id: t }) {
284
+ return e ? /* @__PURE__ */ c("span", {
284
285
  id: t,
285
286
  className: "field-error",
286
287
  role: "alert",
287
288
  children: e
288
289
  }) : null;
289
290
  }
290
- function H({ message: e }) {
291
- return /* @__PURE__ */ s("span", {
291
+ function W({ message: e }) {
292
+ return /* @__PURE__ */ c("span", {
292
293
  className: "local-error",
293
294
  role: "alert",
294
295
  children: e ?? "Cannot compute"
295
296
  });
296
297
  }
297
- function U({ message: e }) {
298
- return /* @__PURE__ */ s("span", {
298
+ function G({ message: e }) {
299
+ return /* @__PURE__ */ c("span", {
299
300
  className: "local-error local-tone-error",
300
301
  role: "status",
301
302
  children: e
302
303
  });
303
304
  }
304
- function W(e, t) {
305
+ function K(e, t) {
305
306
  let n = Math.max(0, Math.floor(e)), r = Math.floor(n / 60), i = n % 60;
306
307
  return r === 0 ? t(`${i} seconds`, `${i} 秒`) : `${r}:${String(i).padStart(2, "0")}`;
307
308
  }
308
- function G(e) {
309
+ function q(e) {
309
310
  return n(e);
310
311
  }
311
- function K(e, t, n = 0) {
312
+ function J(e, t, n = 0) {
312
313
  if (!t || n > 64) return "";
313
314
  let r = "";
314
315
  for (let i of t) switch (i.kind) {
@@ -319,7 +320,7 @@ function K(e, t, n = 0) {
319
320
  break;
320
321
  case "interpolation":
321
322
  try {
322
- let t = O(e.runtime.evaluate(i.text));
323
+ let t = A(e.runtime.evaluate(i.text));
323
324
  r += t ?? e.locale.t("Cannot compute", "无法计算");
324
325
  } catch {
325
326
  r += e.locale.t("Cannot compute", "无法计算");
@@ -328,11 +329,11 @@ function K(e, t, n = 0) {
328
329
  case "break":
329
330
  r += " ";
330
331
  break;
331
- default: r += K(e, i.children, n + 1);
332
+ default: r += J(e, i.children, n + 1);
332
333
  }
333
334
  return r;
334
335
  }
335
- function q(e, t) {
336
- return K(e, t.content.children) || t.content.attrs.value || "";
336
+ function Y(e, t) {
337
+ return J(e, t.content.children) || t.content.attrs.value || "";
337
338
  }
338
- export { R as A, C, F as D, N as E, f as F, p as I, u as L, d as M, h as N, _ as O, m as P, g as S, j as T, E as _, U as a, P as b, M as c, k as d, G as f, y as g, b as h, z as i, l as j, T as k, A as l, K as m, H as n, D as o, W as p, B as r, w as s, V as t, S as u, v, O as w, q as x, x as y };
339
+ export { D as A, v as C, F as D, N as E, g as F, m as I, h as L, d as M, p as N, L as O, _ as P, f as R, Y as S, A as T, x as _, V as a, C as b, E as c, w as d, j as f, S as g, J as h, H as i, B as j, y as k, P as l, K as m, u as n, G as o, q as p, W as r, k as s, U as t, M as u, O as v, T as w, I as x, b as y };
@@ -0,0 +1,17 @@
1
+ // src/local/parsing/conditional-branches.ts
2
+ function e(e) {
3
+ return e.type === "comment" ? !0 : e.type === "text" ? /^\s*$/.test(e.value ?? "") : e.type === "paragraph" && (e.children ?? []).every((e) => e.type === "text" && /^\s*$/.test(e.value ?? ""));
4
+ }
5
+ function t(t, n) {
6
+ for (let r = n - 1; r >= 0; --r) if (!e(t[r])) return r;
7
+ return -1;
8
+ }
9
+ function n(t, n) {
10
+ for (let r = n + 1; r < t.length; r += 1) if (!e(t[r])) return r;
11
+ return -1;
12
+ }
13
+ function r(e, n) {
14
+ let r = e[t(e, n)];
15
+ if (r?.type !== "component" || r.name !== "if") return r?.type === "component" && r.name === "else" ? r.attrs?.when === void 0 ? "duplicate" : void 0 : "without-if";
16
+ }
17
+ export { n, t as r, r as t };