reactive-md 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/CHANGELOG-ch.md +34 -0
  2. package/CHANGELOG.md +34 -0
  3. package/README-ch.md +7 -7
  4. package/README-en.md +7 -7
  5. package/README.md +7 -7
  6. package/THIRD_PARTY_NOTICES.md +0 -57
  7. package/cli/help.mjs +6 -4
  8. package/cli/init.mjs +1 -1
  9. package/cli/migrate.mjs +1 -1
  10. package/dist-library/{LocalDocumentView-D6zQkTkt.js → LocalDocumentView-CP2QG86k.js} +46 -44
  11. package/dist-library/{LocalDocumentViewCore-CmJhemcA.js → LocalDocumentViewCore-Cd6yMEkg.js} +284 -265
  12. package/dist-library/{LocalReactiveDocumentCore-lAKOGAZ7.js → LocalReactiveDocumentCore-VuYpZqdn.js} +7 -7
  13. package/dist-library/LocalStaticDocumentView-DfX6bemE.js +147 -0
  14. package/dist-library/authoring-Bwu_zCWs.js +768 -0
  15. package/dist-library/choice-values-BItGjPD2.js +58 -0
  16. package/dist-library/compile-B35rfzKr.js +1742 -0
  17. package/dist-library/{compile-cache-key-6GgpETz_.js → compile-cache-key-D21X2Obx.js} +5 -5
  18. package/dist-library/{compiler-DLkKUK4t.js → compiler-DBwLawMZ.js} +4 -4
  19. package/dist-library/{compiler-core-Niqhp9wV.js → compiler-core-kkDiQ1RK.js} +3146 -2055
  20. package/dist-library/{component-kernel-IG4wOO0i.js → component-kernel-CsJSabHX.js} +42 -26
  21. package/dist-library/{component-state-Ht-hOK0W.js → component-state-Da0G8Ajc.js} +1 -1
  22. package/dist-library/{component-utils-eSj5IdG4.js → component-utils-ZM3jUJNy.js} +80 -79
  23. package/dist-library/conditional-branches-CIhJXasR.js +17 -0
  24. package/dist-library/{config-validation-Cpol91_M.js → config-validation-DbmsWAEV.js} +165 -152
  25. package/dist-library/{controls-B-CLSK8Q.js → controls-DRy5rzzN.js} +271 -228
  26. package/dist-library/{coordinate-PyLPMIQK.js → coordinate-c54pHfgf.js} +29 -29
  27. package/dist-library/data-table-CSAkm1eU.js +290 -0
  28. package/dist-library/data-table-model-DruztQFt.js +391 -0
  29. package/dist-library/{data-visuals-_Z7QqYTk.js → data-visuals-rZQUeQM0.js} +14 -14
  30. package/dist-library/{default-components-jugH7Ubr.js → default-components-B-39etG9.js} +233 -71
  31. package/dist-library/{default-config-DIrRpuQz.js → default-config-CCa8rm2k.js} +236 -216
  32. package/dist-library/default-options-By16CVw1.js +131 -0
  33. package/dist-library/{default-registry-BlloaZi7.js → default-registry-DXJy66xj.js} +3 -3
  34. package/dist-library/{default-schema-Ch-Vznpm.js → default-schema-CeYiEW1K.js} +3 -3
  35. package/dist-library/display-Bb6hAG5T.js +2065 -0
  36. package/dist-library/{document-theme-DBAfnk7y.js → document-theme-CJvN-nC1.js} +190 -3
  37. package/dist-library/{export-heVBqgxA.js → export-BSV4E0jv.js} +105 -106
  38. package/dist-library/font-aliases-CKYjwn4o.js +4 -0
  39. package/dist-library/{gallery-Q6VPS2ep.js → gallery-DM2yTVZJ.js} +1 -1
  40. package/dist-library/{html-CCnvzan1.js → html-CY9mC3Sr.js} +5 -5
  41. package/dist-library/{incremental-Bzvh8_lB.js → incremental-B-wW4H3F.js} +251 -245
  42. package/dist-library/{display-y4v9v0Qd.js → katex-4ukd4ZxT.js} +1555 -3618
  43. package/dist-library/layout-CPQggKxk.js +592 -0
  44. package/dist-library/{layout-BnfDeUNy.js → layout-CaDWsDof.js} +1 -1
  45. package/dist-library/{math-view-B0jthpRw.js → math-view-CyGTS6kv.js} +1 -1
  46. package/dist-library/{mount-preset-C_i37FvY.js → mount-preset-DtrCX4G8.js} +4 -4
  47. package/dist-library/{numeric-sliders-CkWS0-ja.js → numeric-sliders-BmJ1LCLx.js} +190 -190
  48. package/dist-library/{observability-CYLuvFfL.js → observability-BVQ16ByQ.js} +5 -4
  49. package/dist-library/{package-core-9UK5ZdqB.js → package-core-Cu_r_qs7.js} +7 -6
  50. package/dist-library/{parser-9yNJxGip.js → parser-BHl9Lxbw.js} +2 -2
  51. package/dist-library/{parser-standard-BPIy4HOu.js → parser-standard-DDAKv_DZ.js} +247 -247
  52. package/dist-library/{plugin-packs-CZb46nuv.js → plugin-packs-CkI0floL.js} +3 -3
  53. package/dist-library/{preset-core-BW3NWZJ9.js → preset-core-BKPbH_Nv.js} +377 -306
  54. package/dist-library/{props-pJRrfDc6.js → props-0iDqxlTk.js} +56 -61
  55. package/dist-library/{react-BSo0o998.js → react-74jdGBmu.js} +2 -2
  56. package/dist-library/reactive-md-authoring.js +277 -269
  57. package/dist-library/reactive-md-build.js +327 -33
  58. package/dist-library/reactive-md-compiler-session.js +3 -3
  59. package/dist-library/reactive-md-compiler-standard.js +10 -10
  60. package/dist-library/reactive-md-compiler.js +3 -3
  61. package/dist-library/reactive-md-contracts.js +4 -4
  62. package/dist-library/reactive-md-default-packs.js +4 -3
  63. package/dist-library/reactive-md-default-preset.js +3 -3
  64. package/dist-library/reactive-md-export.js +6 -6
  65. package/dist-library/reactive-md-minimal-preset.js +3 -2
  66. package/dist-library/reactive-md-minimal-react-preset.js +18 -17
  67. package/dist-library/reactive-md-minimal.css +1 -1
  68. package/dist-library/reactive-md-observability.js +2 -2
  69. package/dist-library/reactive-md-pack-style-manifest.js +8 -0
  70. package/dist-library/reactive-md-plugin-chart.js +13 -9
  71. package/dist-library/reactive-md-plugin-data.js +4 -4
  72. package/dist-library/reactive-md-plugin-diagram.js +3 -3
  73. package/dist-library/reactive-md-plugin-forms.js +5 -5
  74. package/dist-library/reactive-md-plugin-gallery.js +3 -3
  75. package/dist-library/reactive-md-plugin-navigation.js +10 -10
  76. package/dist-library/reactive-md-plugin-network.js +5 -5
  77. package/dist-library/reactive-md-plugin-plot.js +4 -4
  78. package/dist-library/reactive-md-react-component-accordion.js +3 -3
  79. package/dist-library/reactive-md-react-component-alert.js +3 -3
  80. package/dist-library/reactive-md-react-component-anchor.js +3 -3
  81. package/dist-library/reactive-md-react-component-badge.js +3 -3
  82. package/dist-library/reactive-md-react-component-card.js +3 -3
  83. package/dist-library/reactive-md-react-component-chart.js +2 -2
  84. package/dist-library/reactive-md-react-component-checkbox.js +2 -2
  85. package/dist-library/reactive-md-react-component-checklist.js +2 -2
  86. package/dist-library/reactive-md-react-component-choices.js +2 -2
  87. package/dist-library/reactive-md-react-component-column.js +1 -1
  88. package/dist-library/reactive-md-react-component-coordinate.js +2 -2
  89. package/dist-library/reactive-md-react-component-counter.js +2 -2
  90. package/dist-library/reactive-md-react-component-data-table.js +2 -2
  91. package/dist-library/reactive-md-react-component-date.js +2 -2
  92. package/dist-library/reactive-md-react-component-diagram.js +2 -2
  93. package/dist-library/reactive-md-react-component-disclosure.js +3 -3
  94. package/dist-library/reactive-md-react-component-edge.js +1 -1
  95. package/dist-library/reactive-md-react-component-else.js +10 -0
  96. package/dist-library/reactive-md-react-component-gallery-item.js +2 -2
  97. package/dist-library/reactive-md-react-component-gallery.js +2 -2
  98. package/dist-library/reactive-md-react-component-grid.js +3 -3
  99. package/dist-library/reactive-md-react-component-if.js +3 -3
  100. package/dist-library/reactive-md-react-component-input.js +2 -2
  101. package/dist-library/reactive-md-react-component-jump.js +3 -3
  102. package/dist-library/reactive-md-react-component-multi-select.js +2 -2
  103. package/dist-library/reactive-md-react-component-node.js +2 -2
  104. package/dist-library/reactive-md-react-component-number.js +2 -2
  105. package/dist-library/reactive-md-react-component-option.js +1 -1
  106. package/dist-library/reactive-md-react-component-panel.js +3 -3
  107. package/dist-library/reactive-md-react-component-plot.js +2 -2
  108. package/dist-library/reactive-md-react-component-progress.js +2 -2
  109. package/dist-library/reactive-md-react-component-quiz.js +2 -2
  110. package/dist-library/reactive-md-react-component-radio-group.js +2 -2
  111. package/dist-library/reactive-md-react-component-range-slider.js +2 -2
  112. package/dist-library/reactive-md-react-component-section.js +3 -3
  113. package/dist-library/reactive-md-react-component-select.js +2 -2
  114. package/dist-library/reactive-md-react-component-slider.js +2 -2
  115. package/dist-library/reactive-md-react-component-step.js +3 -3
  116. package/dist-library/reactive-md-react-component-steps.js +3 -3
  117. package/dist-library/reactive-md-react-component-tab.js +3 -3
  118. package/dist-library/reactive-md-react-component-table.js +2 -2
  119. package/dist-library/reactive-md-react-component-tabs.js +3 -3
  120. package/dist-library/reactive-md-react-component-text.js +3 -3
  121. package/dist-library/reactive-md-react-component-textarea.js +2 -2
  122. package/dist-library/reactive-md-react-component-timeline.js +2 -2
  123. package/dist-library/reactive-md-react-component-timer.js +2 -2
  124. package/dist-library/reactive-md-react-component-toggle.js +2 -2
  125. package/dist-library/reactive-md-react-component-tooltip.js +3 -3
  126. package/dist-library/reactive-md-react-component-validation.js +3 -3
  127. package/dist-library/reactive-md-react-minimal.js +4 -4
  128. package/dist-library/reactive-md-react-pack-controls.js +4 -4
  129. package/dist-library/reactive-md-react-pack-data.js +3 -3
  130. package/dist-library/reactive-md-react-pack-layout.js +25 -24
  131. package/dist-library/reactive-md-react-pack-visuals.js +2 -2
  132. package/dist-library/reactive-md-react-packed.js +6 -6
  133. package/dist-library/reactive-md-react-server.js +37 -36
  134. package/dist-library/reactive-md-react-static-server.js +2 -2
  135. package/dist-library/reactive-md-react-static.js +1 -1
  136. package/dist-library/reactive-md-react-unstyled.js +12 -12
  137. package/dist-library/reactive-md-react.js +12 -12
  138. package/dist-library/reactive-md-scan.js +1 -1
  139. package/dist-library/reactive-md-sdk.js +23 -9
  140. package/dist-library/reactive-md-standalone-configured.js +2 -2
  141. package/dist-library/reactive-md-standalone-host.js +2 -2
  142. package/dist-library/reactive-md-testing-browser.js +2 -2
  143. package/dist-library/reactive-md-testing-react.js +6 -6
  144. package/dist-library/reactive-md-testing.js +6 -6
  145. package/dist-library/reactive-md-vite.js +25 -9
  146. package/dist-library/reactive-md-worker-pool.js +3 -3
  147. package/dist-library/reactive-md.css +1 -1
  148. package/dist-library/reactive-md.js +52 -43
  149. package/dist-library/{registry-core-CziAIP5P.js → registry-core-DxEaxhJ6.js} +3 -2
  150. package/dist-library/{render-nodes-DKjg_TR1.js → render-nodes-B6j6Ip5I.js} +766 -731
  151. package/dist-library/{requirements-DhIkxAbl.js → requirements-C56sFIEs.js} +2 -2
  152. package/dist-library/{resources-B_nbROgj.js → resources-6VaNgk-h.js} +2 -2
  153. package/dist-library/rmd-pack-layout.css +9 -0
  154. package/dist-library/rmd-pack-resource-layout.css +9 -0
  155. package/dist-library/runtime-BHeuLOv_.js +1369 -0
  156. package/dist-library/{runtime-requirement-C4-vNcf5.js → runtime-requirement-DzPO8raU.js} +166 -163
  157. package/dist-library/{schema-core-4sd1Vu7V.js → schema-core-CDXfxdID.js} +24 -1
  158. package/dist-library/{sdk-core-BLsW9cCy.js → sdk-core-CnE-n0Z7.js} +469 -314
  159. package/dist-library/{session-core-DLBRPV7f.js → session-core-C071yQwV.js} +140 -127
  160. package/dist-library/{validation-XXlb-spV.js → sha256-utf16-Bmandi_H.js} +392 -315
  161. package/dist-library/shareable-CHCDnl6j.js +844 -0
  162. package/dist-library/types/authoring/catalog.d.ts +3 -1
  163. package/dist-library/types/authoring/index.d.ts +1 -1
  164. package/dist-library/types/components/chart/default-chart-types.d.ts +3 -0
  165. package/dist-library/types/components/chart/default-chart.d.ts +7 -0
  166. package/dist-library/types/components/entries/else.d.ts +3 -0
  167. package/dist-library/types/components/layout/layout.d.ts +5 -0
  168. package/dist-library/types/components/shared/visuals.d.ts +1 -1
  169. package/dist-library/types/components/table/data-table-model.d.ts +95 -2
  170. package/dist-library/types/components/table/data-table.d.ts +2 -2
  171. package/dist-library/types/contracts/component-kernel.d.ts +5 -0
  172. package/dist-library/types/contracts/font-aliases.d.ts +18 -0
  173. package/dist-library/types/contracts/number-literal.d.ts +2 -0
  174. package/dist-library/types/contracts/sha256-utf16.d.ts +2 -0
  175. package/dist-library/types/export/index.d.ts +4 -1
  176. package/dist-library/types/local/compilation/compiler-choices.d.ts +4 -0
  177. package/dist-library/types/local/compilation/compiler-declarations.d.ts +2 -1
  178. package/dist-library/types/local/compilation/compiler-expressions.d.ts +12 -1
  179. package/dist-library/types/local/compilation/compiler-macros.d.ts +18 -0
  180. package/dist-library/types/local/compilation/compiler-structure.d.ts +8 -2
  181. package/dist-library/types/local/compilation/compiler-tables.d.ts +1 -0
  182. package/dist-library/types/local/compilation/compiler-validation.d.ts +11 -0
  183. package/dist-library/types/local/compilation/compiler-values.d.ts +1 -2
  184. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +173 -2
  185. package/dist-library/types/local/configuration/diagnostic-runtime-messages.d.ts +40 -0
  186. package/dist-library/types/local/evaluation/choice-values.d.ts +22 -0
  187. package/dist-library/types/local/evaluation/computations.d.ts +13 -5
  188. package/dist-library/types/local/evaluation/dataset.d.ts +4 -0
  189. package/dist-library/types/local/evaluation/expression/collection-functions.d.ts +13 -0
  190. package/dist-library/types/local/evaluation/expression/compile.d.ts +11 -4
  191. package/dist-library/types/local/evaluation/expression/data-functions.d.ts +23 -0
  192. package/dist-library/types/local/evaluation/expression/evaluation.d.ts +3 -1
  193. package/dist-library/types/local/evaluation/expression/internal-names.d.ts +8 -0
  194. package/dist-library/types/local/evaluation/expression/syntax.d.ts +19 -2
  195. package/dist-library/types/local/evaluation/expression/transform-budget.d.ts +13 -0
  196. package/dist-library/types/local/evaluation/expression/values.d.ts +9 -1
  197. package/dist-library/types/local/evaluation/validation.d.ts +8 -6
  198. package/dist-library/types/local/index.d.ts +4 -3
  199. package/dist-library/types/local/parsing/conditional-branches.d.ts +4 -0
  200. package/dist-library/types/local/parsing/source-revision.d.ts +3 -0
  201. package/dist-library/types/local/runtime/runtime-choices.d.ts +11 -0
  202. package/dist-library/types/local/runtime/runtime.d.ts +3 -1
  203. package/dist-library/types/local/runtime/state.d.ts +30 -15
  204. package/dist-library/types/local/source/authoring-requirements.d.ts +3 -0
  205. package/dist-library/types/local/source/authoring-syntax.d.ts +3 -2
  206. package/dist-library/types/local/source/authoring.d.ts +10 -0
  207. package/dist-library/types/local/source/source-migration.d.ts +1 -0
  208. package/dist-library/types/local/types.d.ts +33 -2
  209. package/dist-library/types/react/component-api.d.ts +21 -2
  210. package/dist-library/types/react/component-utils.d.ts +11 -0
  211. package/dist-library/types/react/font-aliases.d.ts +2 -0
  212. package/dist-library/types/react/package-core.d.ts +3 -0
  213. package/dist-library/types/react/rendering/document/validation-state.d.ts +1 -1
  214. package/dist-library/types/react/rendering/document/view-revision.d.ts +3 -12
  215. package/dist-library/types/react/rendering/table/data-table.d.ts +1 -1
  216. package/dist-library/types/react/sdk-core.d.ts +3 -1
  217. package/dist-library/types/sdk/assembly.d.ts +3 -0
  218. package/dist-library/types/sdk/font.d.ts +13 -0
  219. package/dist-library/types/sdk/index.d.ts +1 -0
  220. package/dist-library/types/sdk/theme.d.ts +5 -0
  221. package/dist-library/types/sdk/types.d.ts +6 -0
  222. package/dist-library/types/sdk/version.d.ts +1 -1
  223. package/dist-library/types/shareable.d.ts +15 -3
  224. package/dist-library/types/standalone/prepare.d.ts +4 -2
  225. package/dist-library/types/standalone/session-core.d.ts +4 -1
  226. package/dist-library/types/vite/index.d.ts +3 -0
  227. package/dist-library/types/vite/registration.d.ts +1 -0
  228. package/dist-library/{types-Bza88SGK.js → types-B4qG8J4S.js} +1 -1
  229. package/dist-library/types-FYhRWRn9.js +3 -0
  230. package/dist-library/use-hydrated-D1gFY2Dq.js +2655 -0
  231. package/dist-library/validation-DRuW0Wl9.js +433 -0
  232. package/dist-library/{version-B0G1699c.js → version-4wzhbvDG.js} +1 -1
  233. package/dist-library/{visual-helpers-CRmaqCHX.js → visual-helpers-UU6xiL8g.js} +3 -3
  234. package/dist-library/visuals-7xzoL9ql.js +49340 -0
  235. package/dist-library/{worker-D6WMV8xJ.js → worker-3ldRjOEG.js} +9 -9
  236. package/dist-standalone/reactive-md-standalone.css +1 -1
  237. package/dist-standalone/reactive-md-standalone.js +128 -368
  238. package/docs/README-ch.md +3 -1
  239. package/docs/README.md +3 -1
  240. package/docs/compatibility/api-stability-ch.md +1 -1
  241. package/docs/compatibility/api-stability-en.md +1 -1
  242. package/docs/compatibility/compatibility-ch.md +15 -15
  243. package/docs/compatibility/compatibility-en.md +15 -15
  244. package/docs/compatibility/compatibility-manifest.schema.json +3 -2
  245. package/docs/compatibility/deprecation-ch.md +2 -2
  246. package/docs/compatibility/deprecation-en.md +2 -2
  247. package/docs/compatibility/source-versioning-ch.md +22 -14
  248. package/docs/compatibility/source-versioning-en.md +22 -13
  249. package/docs/compatibility/support-matrix-ch.md +4 -3
  250. package/docs/compatibility/support-matrix-en.md +4 -3
  251. package/docs/development/component-development-ch.md +2 -2
  252. package/docs/development/component-development-en.md +2 -2
  253. package/docs/development/component-protocol-ch.md +18 -18
  254. package/docs/development/component-protocol-en.md +14 -14
  255. package/docs/guides/local-guide-ch.md +109 -20
  256. package/docs/guides/local-guide-en.md +109 -20
  257. package/docs/integration/author-tools-ch.md +1 -1
  258. package/docs/integration/author-tools-en.md +1 -1
  259. package/docs/integration/editor-ch.md +3 -3
  260. package/docs/integration/editor-en.md +3 -3
  261. package/docs/integration/extension-sdk-ch.md +29 -3
  262. package/docs/integration/extension-sdk-en.md +29 -3
  263. package/docs/integration/local-integration-ch.md +3 -3
  264. package/docs/integration/local-integration-en.md +3 -3
  265. package/docs/integration/pdf-export-ch.md +42 -0
  266. package/docs/integration/pdf-export-en.md +42 -0
  267. package/docs/integration/shareable-export-ch.md +11 -19
  268. package/docs/integration/shareable-export-en.md +11 -19
  269. package/docs/reference/diagnostics-counting-ch.md +24 -1
  270. package/docs/reference/diagnostics-counting-en.md +24 -1
  271. package/docs/reference/local-interaction-syntax-ch.md +222 -33
  272. package/docs/reference/local-interaction-syntax-en.md +220 -31
  273. package/docs/reference/public-api-ch.md +24 -18
  274. package/docs/reference/public-api-en.md +24 -18
  275. package/docs/reference/theme-protocol-ch.md +1 -1
  276. package/docs/reference/theme-protocol-en.md +1 -1
  277. package/docs/releases/release-0.10.0-ch.md +45 -0
  278. package/docs/releases/release-0.10.0-en.md +45 -0
  279. package/examples/conformance/README-ch.md +3 -3
  280. package/examples/conformance/README.md +3 -3
  281. package/examples/conformance/local-draft-4.json +441 -0
  282. package/examples/integration/README-ch.md +3 -3
  283. package/examples/integration/README.md +3 -3
  284. package/examples/integration/chat-session/package.json +1 -1
  285. package/examples/local/README-ch.md +1 -1
  286. package/examples/local/README.md +1 -1
  287. package/package.json +6 -1
  288. package/dist-library/LocalStaticDocumentView-2J7w0sKm.js +0 -143
  289. package/dist-library/authoring-B14SsOXZ.js +0 -893
  290. package/dist-library/compile-D50B5_Ww.js +0 -1249
  291. package/dist-library/computations-CffoW7Ff.js +0 -340
  292. package/dist-library/data-table-Kv_ZA2Z2.js +0 -297
  293. package/dist-library/default-options-DU5dxuU6.js +0 -125
  294. package/dist-library/layout-BfUzzO2b.js +0 -553
  295. package/dist-library/runtime-CuJndKqK.js +0 -1289
  296. package/dist-library/shareable-C6mUerpQ.js +0 -817
  297. package/dist-library/types-daDo2c_w.js +0 -3
  298. package/dist-library/use-hydrated-W-laKPhY.js +0 -22975
  299. package/dist-library/visuals-CoVSjVD8.js +0 -49159
@@ -1,17 +1,11 @@
1
- import { t as e } from "./color-values-r8Wf7ALn.js";
1
+ import { N as e, P as t } from "./preset-core-BKPbH_Nv.js";
2
+ import { t as n } from "./color-values-r8Wf7ALn.js";
2
3
  // src/sdk/props.ts
3
- var t = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/;
4
- function n(e) {
4
+ function r(e) {
5
5
  let t = /* @__PURE__ */ new Set();
6
6
  for (let n of Object.values(e.bindings ?? {})) t.add(n.bind), t.add(n.initial);
7
7
  return t;
8
8
  }
9
- function r(e) {
10
- let n = e.trim();
11
- if (!t.test(n)) return null;
12
- let r = Number(n);
13
- return Number.isFinite(r) ? r : null;
14
- }
15
9
  function i(e) {
16
10
  for (let t = 0; t < e.length - 1; t += 1) if (e[t] === "\\") t += 1;
17
11
  else if (e[t] === "{" && e[t + 1] === "{") return !0;
@@ -54,96 +48,97 @@ function l(e, t, n, r) {
54
48
  if (!i) throw o(e, t, `must match pattern ${n.pattern}.`);
55
49
  return r;
56
50
  }
57
- function u(e, t, n, r) {
58
- let i = n.enum ?? [];
59
- if (!i.includes(r)) throw o(e, t, `must be one of ${i.join(" / ")}, got "${r}".`);
60
- return r;
51
+ function u(e, n, r, i) {
52
+ let a = r.enum ?? [];
53
+ if (a.includes(i) || r.allowPositiveNumber && t(i) !== void 0) return i;
54
+ let s = r.allowPositiveNumber ? " or a positive number" : "";
55
+ throw o(e, n, `must be one of ${a.join(" / ")}${s}, got "${i}".`);
61
56
  }
62
- function d(t, n, r, i) {
63
- if (r.color === !0 && i !== "" && !e(i)) throw o(t, n, `must be a standard CSS named color or #RGB/#RRGGBB, got "${i}".`);
57
+ function d(e, t, r, i) {
58
+ if (r.color === !0 && i !== "" && !n(i)) throw o(e, t, `must be a standard CSS named color or #RGB/#RRGGBB, got "${i}".`);
64
59
  return i;
65
60
  }
66
61
  function f(e, t, n, r) {
67
62
  return n.kind === "enum" ? d(e, t, n, u(e, t, n, r)) : d(e, t, n, l(e, t, n, r));
68
63
  }
69
- function p(e, t, n, l, u) {
64
+ function p(t, n, r, l, u) {
70
65
  if (l === void 0) {
71
- if (n.required === !0 && n.default === void 0) throw o(e, t, "is required but was not provided.");
72
- if (n.default !== void 0) {
73
- if (n.default === null) return null;
74
- if (n.kind === "number") return c(e, t, n, n.default);
75
- if (n.kind === "boolean") return n.default;
76
- let r = n.default;
77
- return f(e, t, n, r);
66
+ if (r.required === !0 && r.default === void 0) throw o(t, n, "is required but was not provided.");
67
+ if (r.default !== void 0) {
68
+ if (r.default === null) return null;
69
+ if (r.kind === "number") return c(t, n, r, r.default);
70
+ if (r.kind === "boolean") return r.default;
71
+ let e = r.default;
72
+ return f(t, n, r, e);
78
73
  }
79
74
  return null;
80
75
  }
81
76
  let d = i(l);
82
77
  if (d) {
83
- if (n.static === !0) throw o(e, t, "is static and cannot contain interpolations.");
84
- if (n.dynamic === !1) throw o(e, t, "does not accept interpolations.");
78
+ if (r.static === !0) throw o(t, n, "is static and cannot contain interpolations.");
79
+ if (r.dynamic === !1) throw o(t, n, "does not accept interpolations.");
85
80
  }
86
81
  let p = a(l);
87
- if (n.kind === "string" || n.kind === "enum") {
88
- let r;
82
+ if (r.kind === "string" || r.kind === "enum") {
83
+ let e;
89
84
  if (p !== null) {
90
- let i = s(e, t, p, u);
91
- if (n.coerce === "text" && n.kind === "string") {
92
- if (i === null) r = "";
93
- else if (typeof i == "string") r = i;
94
- else if (typeof i == "number" || typeof i == "boolean") r = String(i);
95
- else throw o(e, t, `expected a scalar, got ${typeof i}.`);
85
+ let i = s(t, n, p, u);
86
+ if (r.coerce === "text" && r.kind === "string") {
87
+ if (i === null) e = "";
88
+ else if (typeof i == "string") e = i;
89
+ else if (typeof i == "number" || typeof i == "boolean") e = String(i);
90
+ else throw o(t, n, `expected a scalar, got ${typeof i}.`);
96
91
  } else {
97
- if (typeof i != "string") throw o(e, t, `expected a string, got ${typeof i}.`);
98
- r = i;
92
+ if (typeof i != "string") throw o(t, n, `expected a string, got ${typeof i}.`);
93
+ e = i;
99
94
  }
100
- return f(e, t, n, r);
95
+ return f(t, n, r, e);
101
96
  }
102
- return d ? (r = u.text(l), f(e, t, n, r)) : f(e, t, n, l);
97
+ return d ? (e = u.text(l), f(t, n, r, e)) : f(t, n, r, l);
103
98
  }
104
- if (n.kind === "number") {
99
+ if (r.kind === "number") {
105
100
  if (p !== null) {
106
- let r = s(e, t, p, u);
107
- if (typeof r != "number" || !Number.isFinite(r)) throw o(e, t, "expected a finite number.");
108
- return c(e, t, n, r);
101
+ let e = s(t, n, p, u);
102
+ if (typeof e != "number" || !Number.isFinite(e)) throw o(t, n, "expected a finite number.");
103
+ return c(t, n, r, e);
109
104
  }
110
- if (d) throw o(e, t, "requires a number literal or one full numeric interpolation.");
111
- let i = r(l);
112
- if (i === null) throw o(e, t, `requires a number, got "${l}".`);
113
- return c(e, t, n, i);
105
+ if (d) throw o(t, n, "requires a number literal or one full numeric interpolation.");
106
+ let i = e(l);
107
+ if (i === null) throw o(t, n, `requires a number, got "${l}".`);
108
+ return c(t, n, r, i);
114
109
  }
115
110
  if (p !== null) {
116
- let n = s(e, t, p, u);
117
- if (typeof n != "boolean") throw o(e, t, "expected a boolean.");
118
- return n;
111
+ let e = s(t, n, p, u);
112
+ if (typeof e != "boolean") throw o(t, n, "expected a boolean.");
113
+ return e;
119
114
  }
120
- if (d) throw o(e, t, "requires true, false, or one full boolean interpolation.");
115
+ if (d) throw o(t, n, "requires true, false, or one full boolean interpolation.");
121
116
  let m = l.trim();
122
117
  if (m === "true") return !0;
123
118
  if (m === "false") return !1;
124
- throw o(e, t, `requires true or false, got "${l}".`);
119
+ throw o(t, n, `requires true or false, got "${l}".`);
125
120
  }
126
- function m(e, t, r) {
121
+ function m(e, t, n) {
127
122
  if (!e || typeof e != "object") throw TypeError("resolveLocalComponentProps requires a component definition.");
128
123
  if (!t || typeof t != "object" || Array.isArray(t)) throw TypeError(`Local component <${e.name}> attributes must be an object.`);
129
- let i = n(e);
124
+ let i = r(e);
130
125
  for (let n of Object.keys(t)) if (!i.has(n) && !Object.hasOwn(e.props, n)) throw Error(`Local component <${e.name}> does not declare attribute "${n}".`);
131
126
  let a = {};
132
- for (let n of Object.keys(e.props)) a[n] = h(e, n, Object.hasOwn(t, n) && typeof t[n] == "string" ? t[n] : void 0, r);
127
+ for (let r of Object.keys(e.props)) a[r] = h(e, r, Object.hasOwn(t, r) && typeof t[r] == "string" ? t[r] : void 0, n);
133
128
  return Object.freeze(a);
134
129
  }
135
130
  function h(e, t, n, r, i = !1) {
136
131
  let a = e.props[t];
137
132
  if (!a) throw o(e, t, "is not declared.");
138
- return i && n !== void 0 && a.kind === "string" ? f(e, t, a, n) : e.rules?.some((e) => e.kind === "scoped-expressions" && e.attributes.includes(t) || e.kind === "row-values" && (e.rows === t || e.key === t)) && n !== void 0 && a.kind === "string" ? n : p(e, t, a, n, r);
133
+ return i && n !== void 0 && a.kind === "string" ? f(e, t, a, n) : e.rules?.some((e) => e.kind === "scoped-expressions" && e.attributes.includes(t) || e.kind === "row-values" && (e.rows === t || e.key === t)) && n !== void 0 && (a.kind === "string" || a.kind === "enum") ? n : p(e, t, a, n, r);
139
134
  }
140
- function g(e, t, n) {
141
- if (n === void 0) return;
142
- if ("literal" in n) return n.literal;
143
- let a = e.props[n.prop];
135
+ function g(t, n, r) {
136
+ if (r === void 0) return;
137
+ if ("literal" in r) return r.literal;
138
+ let a = t.props[r.prop];
144
139
  if (a === void 0 || a.kind !== "number") return;
145
- let o = Object.hasOwn(t, n.prop) ? t[n.prop] : void 0;
146
- return typeof o == "string" ? i(o) ? void 0 : r(o) ?? void 0 : typeof a.default == "number" ? a.default : void 0;
140
+ let o = Object.hasOwn(n, r.prop) ? n[r.prop] : void 0;
141
+ return typeof o == "string" ? i(o) ? void 0 : e(o) ?? void 0 : typeof a.default == "number" ? a.default : void 0;
147
142
  }
148
143
  function _(e, t) {
149
144
  let n = e.bindings?.value;
@@ -176,4 +171,4 @@ function v(e) {
176
171
  ...t.kind === "number" ? { step: s ?? 1 } : {}
177
172
  };
178
173
  }
179
- export { m as a, h as i, v as n, _ as r, n as t };
174
+ export { m as a, h as i, v as n, _ as r, r as t };
@@ -1,5 +1,5 @@
1
- import { n as e, r as t } from "./sdk-core-BLsW9cCy.js";
2
- import { a as n, t as r } from "./LocalDocumentView-D6zQkTkt.js";
1
+ import { n as e, r as t } from "./sdk-core-CnE-n0Z7.js";
2
+ import { a as n, t as r } from "./LocalDocumentView-CP2QG86k.js";
3
3
  import { useEffect as i, useState as a } from "react";
4
4
  import { jsx as o } from "react/jsx-runtime";
5
5
  // src/react/rendering/document/LocalPooledDocumentView.tsx