reactive-md 0.9.0 → 0.9.2

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 (338) hide show
  1. package/CHANGELOG-ch.md +333 -306
  2. package/CHANGELOG.md +334 -307
  3. package/CONTRIBUTING-ch.md +22 -22
  4. package/CONTRIBUTING.md +22 -22
  5. package/README-ch.md +431 -431
  6. package/README-en.md +431 -431
  7. package/README.md +429 -429
  8. package/SECURITY-ch.md +83 -83
  9. package/SECURITY.md +83 -83
  10. package/THIRD_PARTY_NOTICES.md +111 -1
  11. package/bin/reactive-md.mjs +39 -39
  12. package/cli/args.mjs +263 -263
  13. package/cli/assets.mjs +395 -395
  14. package/cli/build.mjs +445 -444
  15. package/cli/check.mjs +444 -444
  16. package/cli/document.mjs +130 -130
  17. package/cli/errors.mjs +61 -61
  18. package/cli/fs-utils.mjs +133 -133
  19. package/cli/glob.mjs +203 -203
  20. package/cli/help.mjs +323 -323
  21. package/cli/init.mjs +1577 -1577
  22. package/cli/lint.mjs +177 -177
  23. package/cli/main.mjs +65 -65
  24. package/cli/migrate.mjs +368 -368
  25. package/cli/package-loader.mjs +41 -41
  26. package/cli/package.mjs +211 -211
  27. package/dist-library/{LocalDocumentView-K7Y-2bRJ.js → LocalDocumentView-BuqgJZEY.js} +11 -11
  28. package/dist-library/LocalDocumentViewCore-DXE0I0Qc.js +9830 -0
  29. package/dist-library/LocalReactiveDocumentCore-CWBe4Mm5.js +275 -0
  30. package/dist-library/{authoring-Co_TiE-P.js → authoring-Ci_KzJ0q.js} +87 -67
  31. package/dist-library/{compile-LhpTKqCR.js → compile-Dx6Uw3D9.js} +11 -11
  32. package/dist-library/{compiler-core-DTxY-qYz.js → compiler-core-DDDdvuLy.js} +2618 -1846
  33. package/dist-library/compiler-dxLPB9Ym.js +86 -0
  34. package/dist-library/{component-state-BBJ08vML.js → component-state-BRwvTV0d.js} +15 -14
  35. package/dist-library/component-state-CwKX_SN5.js +763 -0
  36. package/dist-library/{config-BUo-8O5C.js → config-DXLvctiZ.js} +68 -66
  37. package/dist-library/config-validation-D3D7Dy2J.js +586 -0
  38. package/dist-library/{controls-BWiLLtBO.js → controls-DoZyLCrV.js} +2434 -2410
  39. package/dist-library/{coordinate-BSl6enWV.js → coordinate-B1VFK9fd.js} +108 -107
  40. package/dist-library/{data-table-DfvytZKQ.js → data-table-8-3F15Jf.js} +69 -66
  41. package/dist-library/{default-components-BwQf0oP-.js → default-components-s21NevON.js} +29 -28
  42. package/dist-library/{display-lw3BT1TA.js → display-B_uutKkN.js} +1 -1
  43. package/dist-library/{config-validation-C5kJYk-J.js → document-theme-C8J6UyNO.js} +241 -731
  44. package/dist-library/export-CIAIPBov.js +370 -0
  45. package/dist-library/{gallery-B8kSt1oI.js → gallery-Dv1rOvL0.js} +151 -147
  46. package/dist-library/html-Cr4CBwAH.js +758 -0
  47. package/dist-library/identity-BUx0Q_-d.js +40 -0
  48. package/dist-library/{incremental-D_6vwAAE.js → incremental-9nx92u9c.js} +407 -143
  49. package/dist-library/layout-BBB2VF0S.js +562 -0
  50. package/dist-library/{mount-preset-C5s9ebEH.js → mount-preset-DMZ5wd3t.js} +3 -3
  51. package/dist-library/observability-4KqXhIEU.js +421 -0
  52. package/dist-library/observability-core-Bcu7vpnl.js +24 -0
  53. package/dist-library/options-BBp9IcHm.js +121 -0
  54. package/dist-library/{package-core-D0POW4Gd.js → package-core-K5xesGqy.js} +30 -29
  55. package/dist-library/{parser-standard-OToYcOBL.js → parser-standard-CBA1-hdG.js} +3332 -3840
  56. package/dist-library/{plugin-packs-B1XPWcFs.js → plugin-packs-Bh1HhLym.js} +3 -2
  57. package/dist-library/preset-core-DeZPA8IE.js +1298 -0
  58. package/dist-library/react-0DCh-Mar.js +7 -0
  59. package/dist-library/reactive-md-authoring.js +28 -30
  60. package/dist-library/reactive-md-build.js +99 -61
  61. package/dist-library/reactive-md-compiler-standard.js +10 -9
  62. package/dist-library/reactive-md-compiler.js +3 -3
  63. package/dist-library/reactive-md-default-packs.js +3 -2
  64. package/dist-library/reactive-md-default-preset.js +3 -2
  65. package/dist-library/reactive-md-export.js +4 -4
  66. package/dist-library/reactive-md-minimal-preset.js +2 -2
  67. package/dist-library/reactive-md-minimal-react-preset.js +3 -3
  68. package/dist-library/reactive-md-observability.js +4 -0
  69. package/dist-library/reactive-md-pdf.js +127 -3
  70. package/dist-library/reactive-md-plugin-chart.js +3 -3
  71. package/dist-library/reactive-md-plugin-data.js +5 -5
  72. package/dist-library/reactive-md-plugin-diagram.js +4 -4
  73. package/dist-library/reactive-md-plugin-forms.js +4 -4
  74. package/dist-library/reactive-md-plugin-gallery.js +3 -3
  75. package/dist-library/reactive-md-plugin-navigation.js +3 -3
  76. package/dist-library/reactive-md-plugin-network.js +119 -116
  77. package/dist-library/reactive-md-plugin-plot.js +4 -4
  78. package/dist-library/reactive-md-print.css +304 -304
  79. package/dist-library/reactive-md-react-minimal.js +4 -4
  80. package/dist-library/reactive-md-react-server.js +6 -6
  81. package/dist-library/reactive-md-react-unstyled.js +11 -12
  82. package/dist-library/reactive-md-react.js +11 -12
  83. package/dist-library/reactive-md-runtime-browser.js +2 -1
  84. package/dist-library/reactive-md-runtime.js +4 -3
  85. package/dist-library/reactive-md-sdk.js +8 -7
  86. package/dist-library/reactive-md-standalone-configured.js +2 -2
  87. package/dist-library/reactive-md-standalone-host.js +2 -2
  88. package/dist-library/reactive-md-testing-browser.js +2 -2
  89. package/dist-library/reactive-md-testing-react.js +6 -6
  90. package/dist-library/reactive-md-testing.js +5 -5
  91. package/dist-library/reactive-md.js +649 -373
  92. package/dist-library/{registry-05JiqmEp.js → registry-D6OGkOcX.js} +3 -3
  93. package/dist-library/{registry-core-Bbad9Bm2.js → registry-core-C9xOunaw.js} +1 -1
  94. package/dist-library/{resources-IeJomeUT.js → resources-B0x_w3s9.js} +71 -46
  95. package/dist-library/{runtime-B2fxeveq.js → runtime-BDnnimPA.js} +17 -16
  96. package/dist-library/{runtime-CuOyRe9f.js → runtime-BpQdZmFI.js} +269 -263
  97. package/dist-library/{schema-C-AeByPp.js → schema-BryM_VRW.js} +14 -14
  98. package/dist-library/{sdk-core-BJLJaVR5.js → sdk-core-ChslheKs.js} +499 -158
  99. package/dist-library/{session-core-BGka5D1J.js → session-core-dxQCJBNa.js} +171 -156
  100. package/dist-library/{shareable-jkGi2g6y.js → shareable-B8xMoGEa.js} +265 -297
  101. package/dist-library/types/authoring/catalog.d.ts +1 -2
  102. package/dist-library/types/build/diagnostics.d.ts +1 -1
  103. package/dist-library/types/components/shared/visual-frame.d.ts +6 -2
  104. package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
  105. package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
  106. package/dist-library/types/local/compilation/compiler-services.d.ts +8 -4
  107. package/dist-library/types/local/compilation/compiler.d.ts +3 -3
  108. package/dist-library/types/local/compilation/session/incremental.d.ts +20 -5
  109. package/dist-library/types/local/compilation/streaming.d.ts +27 -0
  110. package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
  111. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +48 -0
  112. package/dist-library/types/local/configuration/options-core.d.ts +1 -2
  113. package/dist-library/types/local/configuration/options.d.ts +1 -0
  114. package/dist-library/types/local/css/author-css.d.ts +66 -0
  115. package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
  116. package/dist-library/types/local/html/html.d.ts +39 -3
  117. package/dist-library/types/local/index.d.ts +7 -1
  118. package/dist-library/types/local/observability-codes.d.ts +2 -0
  119. package/dist-library/types/local/observability-core.d.ts +25 -0
  120. package/dist-library/types/local/observability-messages.d.ts +6 -0
  121. package/dist-library/types/local/observability.d.ts +43 -0
  122. package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
  123. package/dist-library/types/local/parsing/parse-session.d.ts +2 -2
  124. package/dist-library/types/local/parsing/parser-convert.d.ts +2 -1
  125. package/dist-library/types/local/parsing/parser-core.d.ts +8 -1
  126. package/dist-library/types/local/parsing/parser-internals.d.ts +2 -1
  127. package/dist-library/types/local/parsing/parser.d.ts +2 -2
  128. package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
  129. package/dist-library/types/local/rendering/document/LocalDocumentViewCore.d.ts +25 -1
  130. package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +1 -1
  131. package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
  132. package/dist-library/types/local/rendering/document/view-render-context.d.ts +11 -1
  133. package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
  134. package/dist-library/types/local/transport/worker.d.ts +79 -5
  135. package/dist-library/types/local/types.d.ts +60 -16
  136. package/dist-library/types/observability.d.ts +7 -0
  137. package/dist-library/types/react/component-api.d.ts +10 -1
  138. package/dist-library/types/react/component-utils.d.ts +9 -1
  139. package/dist-library/types/react/sdk-core.d.ts +4 -1
  140. package/dist-library/types/shareable.d.ts +5 -4
  141. package/dist-library/types/standalone/prepare.d.ts +1 -1
  142. package/dist-library/types/standalone/session-core.d.ts +3 -2
  143. package/dist-library/{types-BFC5rzC4.js → types-Ib5kSScP.js} +1 -1
  144. package/dist-library/types-daDo2c_w.js +3 -0
  145. package/dist-library/{validation-BlDL2uD9.js → validation-B3RI0xOk.js} +218 -200
  146. package/dist-library/version-DAxuGOG2.js +147 -0
  147. package/dist-library/{visual-frame-G8PHoj1e.js → visual-frame-_rcd5HUv.js} +6 -5
  148. package/dist-library/{visuals-BkYRmYGO.js → visuals-DkDhNdEZ.js} +24191 -24190
  149. package/dist-standalone/reactive-md-standalone.js +124 -117
  150. package/docs/README-ch.md +101 -94
  151. package/docs/README.md +101 -94
  152. package/docs/compatibility/api-stability-ch.md +25 -0
  153. package/docs/compatibility/api-stability-en.md +25 -0
  154. package/docs/compatibility/compatibility-ch.md +146 -129
  155. package/docs/compatibility/compatibility-en.md +146 -129
  156. package/docs/compatibility/compatibility-manifest.schema.json +161 -0
  157. package/docs/compatibility/deprecation-ch.md +21 -0
  158. package/docs/compatibility/deprecation-en.md +21 -0
  159. package/docs/compatibility/source-versioning-ch.md +162 -162
  160. package/docs/compatibility/source-versioning-en.md +162 -162
  161. package/docs/compatibility/support-matrix-ch.md +108 -0
  162. package/docs/compatibility/support-matrix-en.md +108 -0
  163. package/docs/development/component-development-ch.md +66 -66
  164. package/docs/development/component-development-en.md +66 -66
  165. package/docs/development/component-development-reference-ch.md +253 -253
  166. package/docs/development/component-development-reference-en.md +238 -238
  167. package/docs/development/component-protocol-ch.md +748 -748
  168. package/docs/development/component-protocol-en.md +750 -750
  169. package/docs/development/extension-tutorial-ch.md +308 -308
  170. package/docs/development/extension-tutorial-en.md +308 -308
  171. package/docs/development/performance-overview-ch.md +422 -422
  172. package/docs/development/performance-overview-en.md +422 -422
  173. package/docs/guides/local-guide-ch.md +532 -532
  174. package/docs/guides/local-guide-en.md +532 -532
  175. package/docs/integration/author-tools-ch.md +64 -64
  176. package/docs/integration/author-tools-en.md +64 -64
  177. package/docs/integration/compiler-ch.md +49 -47
  178. package/docs/integration/compiler-en.md +36 -34
  179. package/docs/integration/directory-discovery-en.md +1 -1
  180. package/docs/integration/editor-ch.md +295 -295
  181. package/docs/integration/editor-en.md +303 -303
  182. package/docs/integration/extension-sdk-ch.md +394 -394
  183. package/docs/integration/extension-sdk-en.md +379 -379
  184. package/docs/integration/local-integration-ch.md +646 -524
  185. package/docs/integration/local-integration-en.md +662 -540
  186. package/docs/integration/shareable-export-ch.md +307 -305
  187. package/docs/integration/shareable-export-en.md +309 -307
  188. package/docs/reference/diagnostics-counting-ch.md +104 -104
  189. package/docs/reference/diagnostics-counting-en.md +104 -104
  190. package/docs/reference/html-compatibility-ch.md +93 -140
  191. package/docs/reference/html-compatibility-en.md +95 -140
  192. package/docs/reference/local-interaction-syntax-ch.md +724 -724
  193. package/docs/reference/local-interaction-syntax-en.md +722 -722
  194. package/docs/reference/public-api-ch.md +39 -7
  195. package/docs/reference/public-api-en.md +39 -7
  196. package/docs/reference/theme-protocol-ch.md +198 -198
  197. package/docs/reference/theme-protocol-en.md +217 -217
  198. package/docs/releases/release-0.4.0-ch.md +91 -91
  199. package/docs/releases/release-0.4.0-en.md +91 -91
  200. package/docs/releases/release-0.4.1-ch.md +25 -25
  201. package/docs/releases/release-0.4.1-en.md +25 -25
  202. package/docs/releases/release-0.5.0-ch.md +43 -43
  203. package/docs/releases/release-0.5.0-en.md +43 -43
  204. package/docs/releases/release-0.5.1-ch.md +41 -41
  205. package/docs/releases/release-0.5.1-en.md +41 -41
  206. package/docs/releases/release-0.5.2-ch.md +37 -37
  207. package/docs/releases/release-0.5.2-en.md +37 -37
  208. package/docs/releases/release-0.5.3-ch.md +26 -26
  209. package/docs/releases/release-0.5.3-en.md +26 -26
  210. package/docs/releases/release-0.6.0-ch.md +59 -59
  211. package/docs/releases/release-0.6.0-en.md +59 -59
  212. package/docs/releases/release-0.6.1-ch.md +29 -29
  213. package/docs/releases/release-0.6.1-en.md +29 -29
  214. package/docs/releases/release-0.7.0-ch.md +86 -86
  215. package/docs/releases/release-0.7.0-en.md +86 -86
  216. package/docs/releases/release-0.9.1-ch.md +29 -0
  217. package/docs/releases/release-0.9.1-en.md +29 -0
  218. package/docs/releases/release-0.9.2-ch.md +33 -0
  219. package/docs/releases/release-0.9.2-en.md +33 -0
  220. package/examples/component-package/README-ch.md +101 -101
  221. package/examples/component-package/README.md +133 -133
  222. package/examples/conformance/README-ch.md +55 -55
  223. package/examples/conformance/README.md +55 -55
  224. package/examples/conformance/component-protocol-1.json +482 -482
  225. package/examples/conformance/component-protocol-1.schema.json +76 -76
  226. package/examples/conformance/local-draft-1.json +50 -50
  227. package/examples/conformance/local-draft-2.json +212 -212
  228. package/examples/game-2048-package/LICENSE +21 -21
  229. package/examples/game-2048-package/NOTICES.md +11 -11
  230. package/examples/game-2048-package/README-ch.md +91 -91
  231. package/examples/game-2048-package/README.md +98 -98
  232. package/examples/game-2048-package/package.json +35 -35
  233. package/examples/game-2048-package/sample/document.reactive.md +17 -17
  234. package/examples/game-2048-package/scripts/build-export.mjs +44 -44
  235. package/examples/game-2048-package/scripts/build.mjs +130 -130
  236. package/examples/game-2048-package/scripts/verify.mjs +180 -180
  237. package/examples/game-2048-package/src/component.css +161 -161
  238. package/examples/game-2048-package/src/components.tsx +326 -326
  239. package/examples/game-2048-package/src/game-engine.ts +228 -228
  240. package/examples/game-2048-package/src/harness.tsx +34 -34
  241. package/examples/game-2048-package/src/manifest.ts +85 -85
  242. package/examples/game-2048-package/src/node-entry.ts +30 -30
  243. package/examples/game-2048-package/src/sample.ts +4 -4
  244. package/examples/game-2048-package/tsconfig.json +15 -15
  245. package/examples/integration/README-ch.md +82 -63
  246. package/examples/integration/README.md +82 -63
  247. package/examples/integration/core/index.mjs +32 -32
  248. package/examples/integration/extension-sdk/README-ch.md +24 -24
  249. package/examples/integration/extension-sdk/README.md +24 -24
  250. package/examples/integration/streaming/index.html +48 -0
  251. package/examples/integration/streaming/main.js +175 -0
  252. package/examples/integration/streaming/package.json +13 -0
  253. package/examples/integration/streaming/worker.js +3 -0
  254. package/examples/integration/worker/index.html +19 -19
  255. package/examples/integration/worker/main.js +61 -61
  256. package/examples/integration/worker/package.json +13 -13
  257. package/examples/integration/worker/worker.js +3 -3
  258. package/examples/local/README-ch.md +76 -76
  259. package/examples/local/README.md +76 -76
  260. package/examples/local/charts.reactive.md +73 -73
  261. package/examples/local/recipes/invoice-zh.reactive.md +36 -36
  262. package/examples/local/recipes/invoice.reactive.md +36 -36
  263. package/examples/local/recipes/workshop-zh.reactive.md +33 -33
  264. package/examples/local/recipes/workshop.reactive.md +33 -33
  265. package/examples/local/showcase/README-ch.md +22 -22
  266. package/examples/local/showcase/README.md +31 -31
  267. package/examples/local/showcase/explore.reactive.md +102 -102
  268. package/examples/local/showcase/flow.reactive.md +86 -86
  269. package/examples/local/showcase/forms.reactive.md +126 -126
  270. package/examples/local/showcase/functions.reactive.md +119 -119
  271. package/examples/local/showcase/layout.reactive.md +100 -100
  272. package/examples/local/showcase/statistics.reactive.md +108 -108
  273. package/examples/local/showcase/tasks.reactive.md +89 -89
  274. package/examples/local/showcase/zh/explore.reactive.md +102 -102
  275. package/examples/local/showcase/zh/flow.reactive.md +86 -86
  276. package/examples/local/showcase/zh/forms.reactive.md +126 -126
  277. package/examples/local/showcase/zh/functions.reactive.md +119 -119
  278. package/examples/local/showcase/zh/layout.reactive.md +100 -100
  279. package/examples/local/showcase/zh/statistics.reactive.md +108 -108
  280. package/examples/local/showcase/zh/tasks.reactive.md +89 -89
  281. package/examples/minimal-extension/README-ch.md +78 -78
  282. package/examples/minimal-extension/README.md +78 -78
  283. package/examples/minimal-extension/index.html +15 -15
  284. package/examples/minimal-extension/package.json +26 -26
  285. package/examples/minimal-extension/sample/document.reactive.md +10 -10
  286. package/examples/minimal-extension/scripts/build.mjs +32 -32
  287. package/examples/minimal-extension/scripts/export.mjs +72 -72
  288. package/examples/minimal-extension/scripts/test-node.mjs +75 -75
  289. package/examples/minimal-extension/src/extension.tsx +90 -90
  290. package/examples/minimal-extension/src/preview.tsx +12 -12
  291. package/examples/minimal-extension/src/source.ts +4 -4
  292. package/examples/minimal-extension/tsconfig.json +14 -14
  293. package/examples/sci-fi-theme/README-ch.md +133 -133
  294. package/examples/sci-fi-theme/README.md +148 -148
  295. package/examples/sci-fi-theme/demo/acceptance.reactive.md +454 -454
  296. package/examples/sci-fi-theme/demo/demo.css +638 -638
  297. package/examples/sci-fi-theme/demo/document.reactive.md +206 -206
  298. package/examples/sci-fi-theme/demo/index.html +13 -13
  299. package/examples/sci-fi-theme/demo/main.tsx +215 -215
  300. package/examples/sci-fi-theme/docs/design-system-ch.md +245 -245
  301. package/examples/sci-fi-theme/docs/design-system.md +474 -474
  302. package/examples/sci-fi-theme/package.json +28 -28
  303. package/examples/sci-fi-theme/scripts/screenshot.mjs +98 -98
  304. package/examples/sci-fi-theme/src/components.css +2370 -2370
  305. package/examples/sci-fi-theme/src/index.ts +6 -6
  306. package/examples/sci-fi-theme/src/notch.css +142 -142
  307. package/examples/sci-fi-theme/src/sci-fi.css +7 -7
  308. package/examples/sci-fi-theme/src/theme.ts +39 -39
  309. package/examples/sci-fi-theme/tsconfig.json +20 -20
  310. package/examples/sci-fi-theme/vite.config.ts +24 -24
  311. package/examples/tetris-package/LICENSE +21 -21
  312. package/examples/tetris-package/NOTICES.md +11 -11
  313. package/examples/tetris-package/README-ch.md +91 -91
  314. package/examples/tetris-package/README.md +95 -95
  315. package/examples/tetris-package/package.json +35 -35
  316. package/examples/tetris-package/sample/document.reactive.md +16 -16
  317. package/examples/tetris-package/scripts/build-export.mjs +44 -44
  318. package/examples/tetris-package/scripts/build.mjs +130 -130
  319. package/examples/tetris-package/scripts/verify.mjs +173 -173
  320. package/examples/tetris-package/src/component.css +145 -145
  321. package/examples/tetris-package/src/components.tsx +334 -334
  322. package/examples/tetris-package/src/harness.tsx +34 -34
  323. package/examples/tetris-package/src/manifests.ts +93 -93
  324. package/examples/tetris-package/src/node-entry.ts +16 -16
  325. package/examples/tetris-package/src/sample.ts +4 -4
  326. package/examples/tetris-package/src/tetris-engine.ts +325 -325
  327. package/examples/tetris-package/tsconfig.json +15 -15
  328. package/package.json +12 -1
  329. package/dist-library/LocalDocumentViewCore-BLG4hMuO.js +0 -9535
  330. package/dist-library/LocalReactiveDocumentCore-DVQ6WA9G.js +0 -259
  331. package/dist-library/compiler-DfGbQhyD.js +0 -62
  332. package/dist-library/component-state-BoLCGee4.js +0 -801
  333. package/dist-library/component-utils-BvHL8VGt.js +0 -298
  334. package/dist-library/export-C7IDW9ul.js +0 -311
  335. package/dist-library/layout-C22VjZh0.js +0 -542
  336. package/dist-library/options-CdSKOi7p.js +0 -116
  337. package/dist-library/preset-core-CKc5YXSM.js +0 -1443
  338. package/dist-library/react-LY5qsVeP.js +0 -7
@@ -0,0 +1,7 @@
1
+ import { n as e } from "./sdk-core-ChslheKs.js";
2
+ import { a as t } from "./LocalDocumentView-BuqgJZEY.js";
3
+ // src/react/sdk.tsx
4
+ function n(n, r) {
5
+ return e(n, r, t().components);
6
+ }
7
+ export { n as t };
@@ -1,12 +1,12 @@
1
- import { b as e } from "./config-validation-C5kJYk-J.js";
2
- import { o as t } from "./compile-LhpTKqCR.js";
3
- import { t as n } from "./registry-core-Bbad9Bm2.js";
4
- import { a as r, c as i, d as a, i as o, l as s, o as c, s as l, u } from "./default-components-BwQf0oP-.js";
5
- import { s as d } from "./config-BUo-8O5C.js";
6
- import { n as f, t as p } from "./options-CdSKOi7p.js";
7
- import { t as m } from "./compiler-DfGbQhyD.js";
8
- import { i as h, n as ee, r as g, t as _ } from "./authoring-Co_TiE-P.js";
9
- import { a as v, c as te, i as y, n as ne, o as re, r as ie, s as ae, t as oe } from "./schema-C-AeByPp.js";
1
+ import { o as e } from "./compile-Dx6Uw3D9.js";
2
+ import { b as t } from "./config-validation-D3D7Dy2J.js";
3
+ import { t as n } from "./registry-core-C9xOunaw.js";
4
+ import { a as r, c as i, d as a, i as o, l as s, o as c, s as l, u } from "./default-components-s21NevON.js";
5
+ import { s as d } from "./config-DXLvctiZ.js";
6
+ import { r as f, t as p } from "./options-BBp9IcHm.js";
7
+ import { t as m } from "./compiler-dxLPB9Ym.js";
8
+ import { i as h, n as ee, r as g, t as _ } from "./authoring-Ci_KzJ0q.js";
9
+ import { a as v, c as te, i as y, n as ne, o as re, r as ie, s as ae, t as oe } from "./schema-BryM_VRW.js";
10
10
  // src/authoring/editor-i18n.ts
11
11
  var b = {
12
12
  en: {
@@ -646,9 +646,9 @@ function qe(e) {
646
646
  function Je(e) {
647
647
  return e === null ? "" : qe(String(e));
648
648
  }
649
- function Ye(e) {
650
- let n = e.replace(/[^A-Za-z0-9_]/g, "_"), r = /^[0-9]/.test(n) ? `_${n}` : n;
651
- return t.has(r) ? `${r}_value` : r;
649
+ function Ye(t) {
650
+ let n = t.replace(/[^A-Za-z0-9_]/g, "_"), r = /^[0-9]/.test(n) ? `_${n}` : n;
651
+ return e.has(r) ? `${r}_value` : r;
652
652
  }
653
653
  function Xe(e, t) {
654
654
  if (e.defaultValue !== void 0 && e.defaultValue !== null) return Je(e.defaultValue);
@@ -995,22 +995,20 @@ function Ct(e) {
995
995
  return t.join("\n");
996
996
  }
997
997
  function wt(e, t, n) {
998
- if (typeof e != "string" || !Number.isFinite(t)) return Object.freeze([]);
999
- let r = f(n);
1000
- if (!r.ok || r.htmlActive) return Object.freeze([]);
1001
- let i = Math.max(0, Math.min(e.length, Math.floor(t))), a = Object.freeze([]), o;
998
+ if (typeof e != "string" || !Number.isFinite(t) || !f(n).ok) return Object.freeze([]);
999
+ let r = Math.max(0, Math.min(e.length, Math.floor(t))), i = Object.freeze([]), a;
1002
1000
  try {
1003
- o = te(e, n);
1001
+ a = te(e, n);
1004
1002
  } catch {
1005
- return a;
1003
+ return i;
1006
1004
  }
1007
- let s = (e, t) => {
1008
- for (let n of e) if ((n.type === "component" || n.type === "hostComponent") && n.name !== void 0 && n.range.start <= i && i < n.range.end) {
1005
+ let o = (e, t) => {
1006
+ for (let n of e) if ((n.type === "component" || n.type === "hostComponent") && n.name !== void 0 && n.range.start <= r && r < n.range.end) {
1009
1007
  let e = Object.freeze([...t, n.name]);
1010
- a = e, n.children && s(n.children, e);
1011
- } else n.type !== "fallback" && n.children && s(n.children, t);
1008
+ i = e, n.children && o(n.children, e);
1009
+ } else n.type !== "fallback" && n.children && o(n.children, t);
1012
1010
  };
1013
- return s(o.nodes, Object.freeze([])), a;
1011
+ return o(a.nodes, Object.freeze([])), i;
1014
1012
  }
1015
1013
  function Tt(e) {
1016
1014
  let t = {};
@@ -1092,12 +1090,12 @@ function Ot(e, t = "en") {
1092
1090
  }
1093
1091
  // src/authoring/insert.ts
1094
1092
  var kt = /[A-Za-z_][A-Za-z0-9_]*/g;
1095
- function At(e, n, r) {
1096
- let i = new Set(r.match(kt) ?? []), a = _(e, n, { diagnostics: !1 }).bindings.filter((e) => e.declarations.length > 0).map((e) => e.name), o = new Set(a), s = e;
1097
- for (let e of a) {
1098
- let r = e, a = 2;
1099
- for (; i.has(r) || t.has(r) || r !== e && o.has(r);) r = `${e}${a}`, a += 1;
1100
- i.add(r), r !== e && (s = h(s, e, r, n).source);
1093
+ function At(t, n, r) {
1094
+ let i = new Set(r.match(kt) ?? []), a = _(t, n, { diagnostics: !1 }).bindings.filter((e) => e.declarations.length > 0).map((e) => e.name), o = new Set(a), s = t;
1095
+ for (let t of a) {
1096
+ let r = t, a = 2;
1097
+ for (; i.has(r) || e.has(r) || r !== t && o.has(r);) r = `${t}${a}`, a += 1;
1098
+ i.add(r), r !== t && (s = h(s, t, r, n).source);
1101
1099
  }
1102
1100
  return s;
1103
1101
  }
@@ -1147,4 +1145,4 @@ function Ft(e, t = "en") {
1147
1145
  }
1148
1146
  return Object.freeze(i);
1149
1147
  }
1150
- export { Ve as EXTENDED_NATIVE_COMPONENTS, He as EXTENDED_NATIVE_COMPONENT_COPY_ZH, oe as LOCAL_COMPONENTS, ne as LOCAL_COMPONENT_NAMES, H as NATIVE_COMPONENTS, W as NATIVE_COMPONENTS_ZH, ze as NATIVE_COMPONENT_GROUPS, U as NATIVE_COMPONENT_GROUPS_ZH, _ as analyzeLocalSource, e as closestName, ee as completeLocalSource, Ot as createLocalAuthoringLookup, vt as createLocalComponentCatalog, bt as createLocalComponentCatalogForOptions, St as filterLocalComponentCatalog, ce as formatBold, ge as formatBulletList, me as formatHeading, fe as formatInlineCode, le as formatItalic, g as formatLocalSource, _e as formatOrderedList, ye as formatQuote, ue as formatStrike, ve as formatTaskList, ie as getLocalComponent, Ue as getNativeComponentCatalog, y as getPropDefault, be as indentSelection, Te as insertCodeBlock, Oe as insertDivider, we as insertImage, Ce as insertLink, Pt as insertLocalComponent, Nt as insertLocalComponentFromOptions, De as insertTable, B as insertTemplate, ke as insertText, wt as localCatalogAncestors, xt as localComponentCatalogGroups, _t as localComponentCatalogKey, Ct as localComponentHelp, v as localComponentNames, Se as outdentSelection, Re as readFormatState, h as renameLocalBinding, G as renderNativeSnippet, re as suggestAttribute, ae as suggestComponent, Ft as validateLocalComponentInsertTemplates };
1148
+ export { Ve as EXTENDED_NATIVE_COMPONENTS, He as EXTENDED_NATIVE_COMPONENT_COPY_ZH, oe as LOCAL_COMPONENTS, ne as LOCAL_COMPONENT_NAMES, H as NATIVE_COMPONENTS, W as NATIVE_COMPONENTS_ZH, ze as NATIVE_COMPONENT_GROUPS, U as NATIVE_COMPONENT_GROUPS_ZH, _ as analyzeLocalSource, t as closestName, ee as completeLocalSource, Ot as createLocalAuthoringLookup, vt as createLocalComponentCatalog, bt as createLocalComponentCatalogForOptions, St as filterLocalComponentCatalog, ce as formatBold, ge as formatBulletList, me as formatHeading, fe as formatInlineCode, le as formatItalic, g as formatLocalSource, _e as formatOrderedList, ye as formatQuote, ue as formatStrike, ve as formatTaskList, ie as getLocalComponent, Ue as getNativeComponentCatalog, y as getPropDefault, be as indentSelection, Te as insertCodeBlock, Oe as insertDivider, we as insertImage, Ce as insertLink, Pt as insertLocalComponent, Nt as insertLocalComponentFromOptions, De as insertTable, B as insertTemplate, ke as insertText, wt as localCatalogAncestors, xt as localComponentCatalogGroups, _t as localComponentCatalogKey, Ct as localComponentHelp, v as localComponentNames, Se as outdentSelection, Re as readFormatState, h as renameLocalBinding, G as renderNativeSnippet, re as suggestAttribute, ae as suggestComponent, Ft as validateLocalComponentInsertTemplates };
@@ -10,57 +10,6 @@ var MAX_LOCAL_PLOT_POINTS = 2e4;
10
10
  var MAX_LOCAL_DATA_TABLE_ROWS = 1e3;
11
11
  var MAX_LOCAL_DATA_DOCUMENT_ROWS = 2e3;
12
12
  var MAX_LOCAL_DATA_DOCUMENT_CELLS = 1e4;
13
- // src/local/source/source-context.ts
14
- /**
15
- * Prefix of at most `end` UTF-16 code units that never ends in the middle of a
16
- * surrogate pair. Budgets for diagnostics and display text are counted in
17
- * code units, but the truncated text must remain well-formed Unicode, so a
18
- * trailing high surrogate is dropped instead of being left unpaired.
19
- */
20
- function localCodeUnitPrefix(value, end) {
21
- const prefix = value.slice(0, Math.max(0, end));
22
- const last = prefix.charCodeAt(prefix.length - 1);
23
- return last >= 55296 && last <= 56319 ? prefix.slice(0, -1) : prefix;
24
- }
25
- // src/local/html/html-names.ts
26
- /**
27
- * P0 native HTML tag names. The parser handles these before component tags, and
28
- * host component schemas may not reuse them because document parsing would
29
- * never dispatch such a tag to a host component.
30
- */
31
- var LOCAL_HTML_NAMES = /* @__PURE__ */ new Set([
32
- "b",
33
- "strong",
34
- "i",
35
- "em",
36
- "s",
37
- "del",
38
- "u",
39
- "mark",
40
- "sup",
41
- "sub",
42
- "br",
43
- "hr",
44
- "img",
45
- "p",
46
- "h1",
47
- "h2",
48
- "h3",
49
- "h4",
50
- "h5",
51
- "h6",
52
- "div",
53
- "span",
54
- "details",
55
- "summary",
56
- "blockquote",
57
- "code",
58
- "pre",
59
- "ul",
60
- "ol",
61
- "li",
62
- "a"
63
- ]);
64
13
  var LOCAL_KERNEL_DECLARATIONS = Object.freeze([
65
14
  Object.freeze({
66
15
  name: "computed",
@@ -142,6 +91,45 @@ var LOCAL_KERNEL_DECLARATIONS = Object.freeze([
142
91
  }
143
92
  })
144
93
  ]);
94
+ // src/local/html/html-names.ts
95
+ /**
96
+ * P0 native HTML tag names. The parser handles these before component tags, and
97
+ * host component schemas may not reuse them because document parsing would
98
+ * never dispatch such a tag to a host component.
99
+ */
100
+ var LOCAL_HTML_NAMES = /* @__PURE__ */ new Set([
101
+ "b",
102
+ "strong",
103
+ "i",
104
+ "em",
105
+ "s",
106
+ "del",
107
+ "u",
108
+ "mark",
109
+ "sup",
110
+ "sub",
111
+ "br",
112
+ "hr",
113
+ "img",
114
+ "p",
115
+ "h1",
116
+ "h2",
117
+ "h3",
118
+ "h4",
119
+ "h5",
120
+ "h6",
121
+ "div",
122
+ "span",
123
+ "details",
124
+ "summary",
125
+ "blockquote",
126
+ "code",
127
+ "pre",
128
+ "ul",
129
+ "ol",
130
+ "li",
131
+ "a"
132
+ ]);
145
133
  // src/sdk/hash.ts
146
134
  /**
147
135
  * Deterministic, non-cryptographic digest for SDK semantic identity.
@@ -5129,6 +5117,18 @@ var defaultPreset = defineLocalPreset({
5129
5117
  version: DEFAULT_PRESET_VERSION$1,
5130
5118
  components: Object.freeze(DEFAULT_SEMANTIC_COMPONENTS.map(withAuthoring))
5131
5119
  });
5120
+ // src/local/source/source-context.ts
5121
+ /**
5122
+ * Prefix of at most `end` UTF-16 code units that never ends in the middle of a
5123
+ * surrogate pair. Budgets for diagnostics and display text are counted in
5124
+ * code units, but the truncated text must remain well-formed Unicode, so a
5125
+ * trailing high surrogate is dropped instead of being left unpaired.
5126
+ */
5127
+ function localCodeUnitPrefix(value, end) {
5128
+ const prefix = value.slice(0, Math.max(0, end));
5129
+ const last = prefix.charCodeAt(prefix.length - 1);
5130
+ return last >= 55296 && last <= 56319 ? prefix.slice(0, -1) : prefix;
5131
+ }
5132
5132
  // src/themes/document-theme.ts
5133
5133
  /**
5134
5134
  * Versioned theme contract. A host registers CSS for a theme name and declares
@@ -6611,11 +6611,20 @@ function defineLocalStandaloneBundle(script, config) {
6611
6611
  }
6612
6612
  // src/build/diagnostics.ts
6613
6613
  /** Build-side diagnostics use the same shape as compile and export diagnostics. */
6614
- function buildDiagnostic(code, message) {
6614
+ function buildDiagnostic(code, message, structured) {
6615
6615
  return {
6616
6616
  code,
6617
6617
  message,
6618
6618
  severity: "error",
6619
+ ...structured && Object.hasOwn(structured, "budget") ? {
6620
+ phase: "resource",
6621
+ recoverable: false,
6622
+ messageKey: "local.resource.budget",
6623
+ details: structured
6624
+ } : {
6625
+ phase: "host",
6626
+ recoverable: false
6627
+ },
6619
6628
  range: {
6620
6629
  start: 0,
6621
6630
  end: 0
@@ -6787,15 +6796,26 @@ function canonicalResourceInput(input) {
6787
6796
  base: input.base
6788
6797
  });
6789
6798
  }
6790
- function reportFileBudget(ctx) {
6799
+ function reportFileBudget(ctx, budget, limit, actual, owner) {
6791
6800
  if (ctx.fileBudgetReported) return;
6792
6801
  ctx.fileBudgetReported = true;
6793
- ctx.diagnostics.push(buildDiagnostic("local.build.resource-budget", `Resource collection exceeds ${ctx.budgets.maxFiles} files or a ${ctx.budgets.maxFileBytes}-byte file.`));
6802
+ ctx.diagnostics.push(buildDiagnostic("local.build.resource-budget", `Resource collection exceeds ${ctx.budgets.maxFiles} files or a ${ctx.budgets.maxFileBytes}-byte file.`, {
6803
+ budget,
6804
+ limit,
6805
+ actual,
6806
+ unit: budget === "maxFiles" ? "files" : "bytes",
6807
+ owner
6808
+ }));
6794
6809
  }
6795
- function reportInlineBudget(ctx) {
6810
+ function reportInlineBudget(ctx, actual) {
6796
6811
  if (ctx.inlinedBudgetReported) return;
6797
6812
  ctx.inlinedBudgetReported = true;
6798
- ctx.diagnostics.push(buildDiagnostic("local.build.resource-budget", `Inlined resources exceed the ${ctx.budgets.maxInlinedBytes}-byte budget.`));
6813
+ ctx.diagnostics.push(buildDiagnostic("local.build.resource-budget", `Inlined resources exceed the ${ctx.budgets.maxInlinedBytes}-byte budget.`, {
6814
+ budget: "maxInlinedBytes",
6815
+ limit: ctx.budgets.maxInlinedBytes,
6816
+ actual,
6817
+ unit: "bytes"
6818
+ }));
6799
6819
  }
6800
6820
  function recordAsset(ctx, file, bytes, mime) {
6801
6821
  const path = posixRelative(ctx.root, file);
@@ -6839,7 +6859,8 @@ async function resolveAllowed(candidate, ctx, label) {
6839
6859
  return null;
6840
6860
  }
6841
6861
  if (ctx.files >= ctx.budgets.maxFiles || info.size > ctx.budgets.maxFileBytes) {
6842
- reportFileBudget(ctx);
6862
+ const fileLimitExceeded = ctx.files >= ctx.budgets.maxFiles;
6863
+ reportFileBudget(ctx, fileLimitExceeded ? "maxFiles" : "maxFileBytes", fileLimitExceeded ? ctx.budgets.maxFiles : ctx.budgets.maxFileBytes, fileLimitExceeded ? ctx.files + 1 : info.size, posixRelative(ctx.root, real));
6843
6864
  return null;
6844
6865
  }
6845
6866
  ctx.files += 1;
@@ -7019,7 +7040,13 @@ function validateImageSet(body, diagnostics, label) {
7019
7040
  }
7020
7041
  async function loadCssFile(file, ctx, stack) {
7021
7042
  if (stack.length > ctx.budgets.maxImportDepth) {
7022
- ctx.diagnostics.push(buildDiagnostic("local.build.resource-budget", `CSS imports exceed the ${ctx.budgets.maxImportDepth}-level depth budget.`));
7043
+ ctx.diagnostics.push(buildDiagnostic("local.build.resource-budget", `CSS imports exceed the ${ctx.budgets.maxImportDepth}-level depth budget.`, {
7044
+ budget: "maxImportDepth",
7045
+ limit: ctx.budgets.maxImportDepth,
7046
+ actual: stack.length,
7047
+ unit: "depth",
7048
+ owner: posixRelative(ctx.root, file)
7049
+ }));
7023
7050
  return null;
7024
7051
  }
7025
7052
  let text;
@@ -7041,7 +7068,7 @@ async function readBinaryAsset(file, ctx, label) {
7041
7068
  return null;
7042
7069
  }
7043
7070
  if (ctx.inlinedBytes + bytes.byteLength > ctx.budgets.maxInlinedBytes) {
7044
- reportInlineBudget(ctx);
7071
+ reportInlineBudget(ctx, ctx.inlinedBytes + bytes.byteLength);
7045
7072
  return null;
7046
7073
  }
7047
7074
  ctx.inlinedBytes += bytes.byteLength;
@@ -7275,7 +7302,12 @@ async function collectLocalBuildResources(input) {
7275
7302
  }
7276
7303
  if (order.length > input.budgets.maxResources) {
7277
7304
  ctx.resourceBudgetReported = true;
7278
- diagnostics.push(buildDiagnostic("local.build.resource-budget", `Resource collection exceeds the ${input.budgets.maxResources}-resource budget.`));
7305
+ diagnostics.push(buildDiagnostic("local.build.resource-budget", `Resource collection exceeds the ${input.budgets.maxResources}-resource budget.`, {
7306
+ budget: "maxResources",
7307
+ limit: input.budgets.maxResources,
7308
+ actual: order.length,
7309
+ unit: "files"
7310
+ }));
7279
7311
  }
7280
7312
  const limited = order.slice(0, input.budgets.maxResources);
7281
7313
  const resources = [];
@@ -7293,7 +7325,13 @@ async function collectLocalBuildResources(input) {
7293
7325
  cssBytes += bytes;
7294
7326
  if (cssBytes > input.budgets.maxCssBytes && !ctx.cssBudgetReported) {
7295
7327
  ctx.cssBudgetReported = true;
7296
- diagnostics.push(buildDiagnostic("local.build.resource-budget", `Collected CSS exceeds the ${input.budgets.maxCssBytes}-byte budget.`));
7328
+ diagnostics.push(buildDiagnostic("local.build.resource-budget", `Collected CSS exceeds the ${input.budgets.maxCssBytes}-byte budget.`, {
7329
+ budget: "maxCssBytes",
7330
+ limit: input.budgets.maxCssBytes,
7331
+ actual: cssBytes,
7332
+ unit: "bytes",
7333
+ owner: id
7334
+ }));
7297
7335
  }
7298
7336
  resources.push(Object.freeze({
7299
7337
  id,
@@ -1,13 +1,14 @@
1
1
  import { a as e, i as t, s as n } from "./latex-1w7aQgD5.js";
2
- import { t as r } from "./compiler-core-DTxY-qYz.js";
3
- import { v as i } from "./validation-BlDL2uD9.js";
4
- import { n as a } from "./display-lw3BT1TA.js";
5
- import { o, t as s } from "./parser-standard-OToYcOBL.js";
2
+ import { n as r } from "./compiler-core-DDDdvuLy.js";
3
+ import { v as i } from "./validation-B3RI0xOk.js";
4
+ import { n as a } from "./display-B_uutKkN.js";
5
+ import { t as o } from "./parser-standard-CBA1-hdG.js";
6
+ import { i as s } from "./html-Cr4CBwAH.js";
6
7
  import c from "./reactive-md-default-preset.js";
7
- import { i as l, r as u, t as d } from "./types-BFC5rzC4.js";
8
+ import { i as l, r as u, t as d } from "./types-Ib5kSScP.js";
8
9
  // src/compiler/standard.ts
9
10
  function f(e) {
10
- let t = i(e, c.components, s);
11
+ let t = i(e, c.components, o);
11
12
  if (t.ok) return t;
12
13
  throw new d(t.message, {
13
14
  code: t.key,
@@ -18,9 +19,9 @@ function p(e) {
18
19
  return e === void 0 ? void 0 : Object.freeze({ ...e });
19
20
  }
20
21
  function m(i) {
21
- let s = f(i), c = p(i), d = {
22
+ let o = f(i), c = p(i), d = {
22
23
  display: a,
23
- htmlDocument: o,
24
+ htmlFragment: s,
24
25
  plotMath: {
25
26
  kind: n,
26
27
  gridSize: e,
@@ -28,7 +29,7 @@ function m(i) {
28
29
  }
29
30
  };
30
31
  return { compile(e) {
31
- return l(r(e, c, s, d), u);
32
+ return l(r(e, c, o, d), u);
32
33
  } };
33
34
  }
34
35
  export { d as CompilerConfigurationError, m as createStandardCompiler };
@@ -1,6 +1,6 @@
1
- import { t as e } from "./compiler-core-DTxY-qYz.js";
2
- import { v as t } from "./validation-BlDL2uD9.js";
3
- import { i as n, n as r, t as i } from "./types-BFC5rzC4.js";
1
+ import { n as e } from "./compiler-core-DDDdvuLy.js";
2
+ import { v as t } from "./validation-B3RI0xOk.js";
3
+ import { i as n, n as r, t as i } from "./types-Ib5kSScP.js";
4
4
  // src/compiler/index.ts
5
5
  function a(e) {
6
6
  let n = t(e);
@@ -1,5 +1,6 @@
1
- import { R as e, a as t, t as n } from "./preset-core-CKc5YXSM.js";
2
- import { t as r } from "./default-components-BwQf0oP-.js";
1
+ import { o as e } from "./version-DAxuGOG2.js";
2
+ import { a as t, t as n } from "./preset-core-DeZPA8IE.js";
3
+ import { t as r } from "./default-components-s21NevON.js";
3
4
  // src/presets/packs.ts
4
5
  var i = /* @__PURE__ */ new Set([
5
6
  "input",
@@ -1,5 +1,6 @@
1
- import { R as e, a as t, i as n, t as r } from "./preset-core-CKc5YXSM.js";
2
- import { t as i } from "./default-components-BwQf0oP-.js";
1
+ import { o as e } from "./version-DAxuGOG2.js";
2
+ import { a as t, i as n, t as r } from "./preset-core-DeZPA8IE.js";
3
+ import { t as i } from "./default-components-s21NevON.js";
3
4
  // src/presets/default.ts
4
5
  var a = r({
5
6
  protocol: e,
@@ -1,5 +1,5 @@
1
- import { c as e, l as t, o as n, s as r, u as i } from "./shareable-jkGi2g6y.js";
2
- import { i as a, r as o, t as s } from "./resources-IeJomeUT.js";
3
- import { t as c } from "./component-state-BBJ08vML.js";
4
- import { a as l, i as u, n as d, r as f, t as p } from "./export-C7IDW9ul.js";
1
+ import { c as e, l as t, o as n, s as r, u as i } from "./shareable-B8xMoGEa.js";
2
+ import { i as a, r as o, t as s } from "./resources-B0x_w3s9.js";
3
+ import { t as c } from "./component-state-BRwvTV0d.js";
4
+ import { a as l, i as u, n as d, r as f, t as p } from "./export-CIAIPBov.js";
5
5
  export { n as createLocalBundleManifest, p as createLocalExportPlan, r as createLocalRestorationRequirements, d as createLocalShareableHtml, f as defineLocalStandaloneBundle, e as localExportContentDigest, t as localThemeContractDigest, u as prepareLocalPrintHtml, s as readLocalExportResources, c as resolveLocalComponentStateExport, o as validateLocalComponentContracts, a as validateLocalExtensionRequirements, i as validateLocalRestorationRequirements, l as waitForLocalPrintImages };
@@ -1,5 +1,5 @@
1
- import { o as e } from "./preset-core-CKc5YXSM.js";
2
- import { t } from "./plugin-packs-B1XPWcFs.js";
1
+ import { o as e } from "./preset-core-DeZPA8IE.js";
2
+ import { t } from "./plugin-packs-Bh1HhLym.js";
3
3
  // src/presets/minimal.ts
4
4
  var n = t(e, [
5
5
  "input",
@@ -1,7 +1,7 @@
1
- import { _ as e, a as t, c as n, f as r, h as i, o as a, p as o } from "./controls-BWiLLtBO.js";
2
- import { a as s, d as c, f as l, i as u, l as d, m as f, n as p, p as m, r as h, u as g, y as _ } from "./layout-C22VjZh0.js";
1
+ import { _ as e, a as t, c as n, f as r, h as i, o as a, p as o } from "./controls-DoZyLCrV.js";
2
+ import { a as s, d as c, f as l, i as u, l as d, m as f, n as p, p as m, r as h, u as g, y as _ } from "./layout-BBB2VF0S.js";
3
3
  import v from "./reactive-md-minimal-preset.js";
4
- import { t as y } from "./mount-preset-C5s9ebEH.js";
4
+ import { t as y } from "./mount-preset-DMZ5wd3t.js";
5
5
  // src/components/minimal-preset.ts
6
6
  var b = y(v, {
7
7
  input: a,
@@ -0,0 +1,4 @@
1
+ import { m as e, p as t, s as n } from "./document-theme-C8J6UyNO.js";
2
+ import { n as r, r as i, t as a } from "./observability-core-Bcu7vpnl.js";
3
+ import { n as o, t as s } from "./observability-4KqXhIEU.js";
4
+ export { t as LOCAL_OBSERVABILITY_MESSAGES, s as createDiagnosticReport, o as createLocalObservabilityDiagnostic, a as createLocalTraceId, r as emitLocalDiagnostic, i as emitLocalTrace, n as formatLocalDiagnostic, e as formatObservabilityMessage };
@@ -7187,6 +7187,68 @@ function parse(html, options) {
7187
7187
  var NATIVE_WRAPPER_CLASS = "reactive-md-native-document";
7188
7188
  var NATIVE_FRAME_CLASS = "reactive-md-native-frame";
7189
7189
  var EXPORT_ROOT_CLASS = "reactive-md-export-root";
7190
+ var FRAGMENT_FRAME_CLASS = "local-extended-fragment-frame";
7191
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
7192
+ var PRINT_FRAGMENT_TAGS = /* @__PURE__ */ new Set([
7193
+ "article",
7194
+ "section",
7195
+ "header",
7196
+ "footer",
7197
+ "div",
7198
+ "p",
7199
+ "span",
7200
+ "figure",
7201
+ "figcaption",
7202
+ "h1",
7203
+ "h2",
7204
+ "h3",
7205
+ "h4",
7206
+ "h5",
7207
+ "h6",
7208
+ "blockquote",
7209
+ "pre",
7210
+ "code",
7211
+ "br",
7212
+ "hr",
7213
+ "b",
7214
+ "strong",
7215
+ "i",
7216
+ "em",
7217
+ "u",
7218
+ "s",
7219
+ "del",
7220
+ "mark",
7221
+ "sub",
7222
+ "sup",
7223
+ "img",
7224
+ "dl",
7225
+ "dd",
7226
+ "dt",
7227
+ "ol",
7228
+ "ul",
7229
+ "li",
7230
+ "table",
7231
+ "caption",
7232
+ "colgroup",
7233
+ "col",
7234
+ "thead",
7235
+ "tbody",
7236
+ "tfoot",
7237
+ "tr",
7238
+ "th",
7239
+ "td"
7240
+ ]);
7241
+ var PRINT_FRAGMENT_ATTRIBUTES = /* @__PURE__ */ new Set([
7242
+ "alt",
7243
+ "title",
7244
+ "dir",
7245
+ "lang",
7246
+ "start",
7247
+ "colspan",
7248
+ "rowspan",
7249
+ "scope"
7250
+ ]);
7251
+ var INLINE_IMAGE = /^data:image\/(?:png|jpeg|gif|webp);base64,[a-z0-9+/]+=*$/i;
7190
7252
  /** Only engine-generated envelopes carry this format marker. */
7191
7253
  var ENGINE_FORMAT = /^reactive-md-html\/v[0-9]+$/;
7192
7254
  var ENGINE_DOCTYPE = /^\s*<!doctype html>/i;
@@ -7300,19 +7362,81 @@ function scrub(nodes) {
7300
7362
  }
7301
7363
  return kept;
7302
7364
  }
7365
+ function printableFrame(frame, depth) {
7366
+ const srcdoc = attribute(frame, "srcdoc");
7367
+ const sandbox = attribute(frame, "sandbox");
7368
+ if (srcdoc && sandbox !== void 0 && !/\ballow-(?:same-origin|scripts)\b/i.test(sandbox) && depth < 5) {
7369
+ const root = firstElement(parse(srcdoc, { scriptingEnabled: false }), "html");
7370
+ const head = root && firstElement(root, "head");
7371
+ const body = root && firstElement(root, "body");
7372
+ if (head && body && hasContentSecurityPolicy(head)) return printableFragment(body.childNodes, depth + 1);
7373
+ }
7374
+ const title = attribute(frame, "title");
7375
+ return title ? [{
7376
+ nodeName: "#text",
7377
+ value: title,
7378
+ parentNode: null
7379
+ }] : [];
7380
+ }
7381
+ /** Promote only inert HTML, plain text and inline raster images out of frames. */
7382
+ function printableFragment(nodes, depth) {
7383
+ const result = [];
7384
+ for (const node of nodes) {
7385
+ if (isText(node)) {
7386
+ result.push(node);
7387
+ continue;
7388
+ }
7389
+ if (!isElement(node) || node.namespaceURI !== HTML_NS) continue;
7390
+ if (node.tagName === "iframe") {
7391
+ const block = defaultTreeAdapter.createElement("div", node.namespaceURI, []);
7392
+ for (const child of printableFrame(node, depth)) defaultTreeAdapter.appendChild(block, child);
7393
+ result.push(block);
7394
+ continue;
7395
+ }
7396
+ if (FORBIDDEN_ELEMENTS.has(node.tagName) || node.tagName === "style" || node.tagName === "template") continue;
7397
+ const children = printableFragment(node.childNodes, depth);
7398
+ if (!PRINT_FRAGMENT_TAGS.has(node.tagName)) {
7399
+ result.push(...children);
7400
+ continue;
7401
+ }
7402
+ node.attrs = node.attrs.filter(({ name, value, namespace }) => !namespace && (PRINT_FRAGMENT_ATTRIBUTES.has(name) || node.tagName === "img" && name === "src" && INLINE_IMAGE.test(value)));
7403
+ node.childNodes = children;
7404
+ result.push(node);
7405
+ }
7406
+ return result;
7407
+ }
7408
+ function expandExtendedPrintFrames(root) {
7409
+ let changed = false;
7410
+ for (const child of root.childNodes) {
7411
+ if (!isElement(child)) continue;
7412
+ if (attribute(child, "data-extended-html") !== "sandbox") {
7413
+ if (expandExtendedPrintFrames(child)) changed = true;
7414
+ continue;
7415
+ }
7416
+ const frame = onlyElement(child);
7417
+ if (!frame || frame.tagName !== "iframe" || !hasClass(frame, FRAGMENT_FRAME_CLASS)) continue;
7418
+ child.childNodes = printableFrame(frame, 0);
7419
+ changed = true;
7420
+ }
7421
+ return changed;
7422
+ }
7303
7423
  /**
7304
7424
  * Move a static native document out of its preview frame so Chromium can
7305
7425
  * paginate the body. Keep the author's HTML and body attributes, along with
7306
7426
  * the export's print styles and restrictions on resource loading.
7307
7427
  */
7308
7428
  function prepareLocalPrintHtml(html) {
7309
- if (!html.includes(NATIVE_WRAPPER_CLASS) || !html.includes(NATIVE_FRAME_CLASS)) return html;
7310
- const shell = firstElement(parse(html, { scriptingEnabled: false }), "html");
7429
+ if (!(html.includes(NATIVE_WRAPPER_CLASS) && html.includes(NATIVE_FRAME_CLASS)) && !html.includes(FRAGMENT_FRAME_CLASS)) return html;
7430
+ const parsed = parse(html, { scriptingEnabled: false });
7431
+ const shell = firstElement(parsed, "html");
7311
7432
  const head = shell && firstElement(shell, "head");
7312
7433
  const body = shell && firstElement(shell, "body");
7313
7434
  if (!head || !body || !isStaticEngineShell(head)) return html;
7314
7435
  const markup = nativeFrame(body);
7315
- if (!markup || !ENGINE_DOCTYPE.test(markup)) return html;
7436
+ if (!markup || !ENGINE_DOCTYPE.test(markup)) {
7437
+ const root = body.childNodes.find((node) => isElement(node) && hasClass(node, EXPORT_ROOT_CLASS));
7438
+ return root && isElement(root) && expandExtendedPrintFrames(root) ? serialize(parsed, { scriptingEnabled: false }) : html;
7439
+ }
7316
7440
  const native = parse(markup, { scriptingEnabled: false });
7317
7441
  const root = firstElement(native, "html");
7318
7442
  const nativeHead = root && firstElement(root, "head");
@@ -1,6 +1,6 @@
1
- import { t as e } from "./visuals-BkYRmYGO.js";
2
- import { t } from "./plugin-packs-B1XPWcFs.js";
3
- import { t as n } from "./mount-preset-C5s9ebEH.js";
1
+ import { t as e } from "./visuals-DkDhNdEZ.js";
2
+ import { t } from "./plugin-packs-Bh1HhLym.js";
3
+ import { t as n } from "./mount-preset-DMZ5wd3t.js";
4
4
  import { t as r } from "./visuals-B5KSafVk.js";
5
5
  // src/components/chart/chart.css?inline
6
6
  var i = "@layer rmd.components{.md-document .rmd-chart{box-sizing:border-box;min-inline-size:0;max-inline-size:100%;color:var(--ink);font-family:var(--font-sans);font-size:var(--text-xs)}.md-document .rmd-chart-stage{min-inline-size:0;max-inline-size:100%;position:relative}.md-document .rmd-chart-svg{width:100%;max-width:100%;height:auto;font-family:var(--font-sans);touch-action:pan-y;display:block;overflow:visible}.md-document .rmd-chart-svg:focus-visible{outline:var(--focus-outline);outline-offset:3px;border-radius:var(--radius-control)}.md-document .rmd-chart-tooltip{z-index:3;box-sizing:border-box;border:1px solid var(--line-strong);border-radius:var(--radius-control);background:var(--surface);width:230px;max-width:calc(100% - 16px);color:var(--ink);box-shadow:var(--shadow-md);font-size:var(--text-xs);line-height:var(--leading-snug);white-space:normal;overflow-wrap:anywhere;pointer-events:none;padding:10px 12px;position:absolute}.md-document .rmd-chart-tooltip-title{border-bottom:1px solid var(--line);color:var(--ink-soft);font-weight:var(--weight-medium);margin:0 0 8px;padding:0 0 8px}.md-document .rmd-chart-tooltip-row{justify-content:space-between;align-items:flex-start;gap:12px;margin:6px 0;display:flex}.md-document .rmd-chart-tooltip-label{overflow-wrap:anywhere;align-items:flex-start;gap:8px;min-inline-size:0;display:flex}.md-document .rmd-chart-tooltip-value{font-weight:var(--weight-semibold);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;margin-inline-start:auto}.md-document .rmd-chart-tooltip-dot{border-radius:var(--radius-circle);background:currentColor;flex:none;block-size:8px;inline-size:8px;margin-block-start:.4em;display:inline-block}.md-document .rmd-chart-tooltip-foot{color:var(--ink-muted);font-size:11px;line-height:var(--leading-snug);margin:8px 0 0}.md-document .rmd-chart-legend{flex-wrap:wrap;align-items:center;gap:4px 10px;margin:12px 0 6px;padding:0;list-style:none;display:flex}.md-document .rmd-chart-legend-item{box-sizing:border-box;border-radius:var(--radius-control);min-block-size:32px;min-inline-size:0;max-inline-size:100%;color:var(--ink);font:inherit;font-size:var(--text-xs);line-height:var(--leading-snug);text-align:start;cursor:pointer;transition:background-color var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) var(--ease-standard), color var(--motion-fast) var(--ease-standard), opacity var(--motion-fast) var(--ease-standard);background:0 0;border:1px solid #0000;align-items:center;gap:8px;margin:0;padding:6px 8px;display:inline-flex}@media (hover:hover) and (pointer:fine){.md-document .rmd-chart-legend-item:hover:not(.is-off):not(.is-selected){background:var(--surface-hover)}}.md-document .rmd-chart-legend-item:focus-visible{outline:var(--focus-outline);outline-offset:2px}.md-document .rmd-chart-legend-item:disabled{cursor:default}.md-document .rmd-chart-legend-item.is-off{opacity:.42;color:var(--ink-muted);text-decoration:line-through}.md-document .rmd-chart-legend-item.is-highlighted{background:var(--surface-hover);border-color:var(--line)}.md-document .rmd-chart-legend-item.is-selected{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent-text)}.md-document .rmd-chart-swatch{border-radius:var(--radius-xs);background:currentColor;flex:none;block-size:9px;inline-size:9px}.md-document .rmd-chart-legend-label{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-inline-size:0;max-inline-size:100%;overflow:hidden}.md-document .rmd-chart-legend-share{color:var(--ink-muted);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;margin-inline-start:4px}.md-document .rmd-chart-svg [data-series],.md-document .rmd-chart :is(.local-visual-bar,.local-visual-point,.local-visual-donut-slice){transition:opacity var(--motion-fast) var(--ease-standard)}.md-document .rmd-chart .local-visual-donut-slice{transition:opacity var(--motion-fast) var(--ease-standard), transform .2s var(--ease-standard)}.md-document .rmd-chart-grid{stroke:var(--chart-grid);stroke-width:1px;stroke-dasharray:3 4}.md-document .rmd-chart-axis-label{fill:var(--chart-axis);font-variant-numeric:tabular-nums;font-size:11px}.md-document .rmd-chart-axis-title{fill:var(--ink-soft);font-size:var(--text-xs);font-weight:var(--weight-medium)}.md-document .rmd-chart-guide{stroke:var(--ink-muted);stroke-width:1px;stroke-dasharray:4 4;opacity:.65;pointer-events:none}.md-document .rmd-chart-readout{min-block-size:1.5em;margin:var(--space-2) 0;color:var(--ink-muted);font-size:var(--text-xs);line-height:var(--leading-snug);font-variant-numeric:tabular-nums}.md-document .rmd-chart-empty{box-sizing:border-box;min-block-size:140px;padding:var(--space-5);border:1px dashed var(--line);border-radius:var(--radius-card);background:var(--surface-subtle);color:var(--ink-muted);font-size:var(--text-xs);text-align:center;justify-content:center;align-items:center;margin:0;display:flex}@media print{.md-document .rmd-chart-tooltip,.md-document .rmd-chart-guide,.md-document .rmd-chart-readout{display:none!important}}@media (prefers-reduced-motion:reduce){.md-document .rmd-chart,.md-document .rmd-chart *{transition:none!important;animation:none!important}}}", a = { chart: e }, o = t("reactive-md/chart", Object.keys(a)), s = n(o, a, [{
@@ -1,8 +1,8 @@
1
- import { t as e } from "./data-table-DfvytZKQ.js";
2
- import { a as t, o as n } from "./visuals-BkYRmYGO.js";
3
- import { o as r } from "./layout-C22VjZh0.js";
4
- import { t as i } from "./plugin-packs-B1XPWcFs.js";
5
- import { t as a } from "./mount-preset-C5s9ebEH.js";
1
+ import { t as e } from "./data-table-8-3F15Jf.js";
2
+ import { a as t, o as n } from "./visuals-DkDhNdEZ.js";
3
+ import { o as r } from "./layout-BBB2VF0S.js";
4
+ import { t as i } from "./plugin-packs-Bh1HhLym.js";
5
+ import { t as a } from "./mount-preset-DMZ5wd3t.js";
6
6
  import { t as o } from "./visuals-B5KSafVk.js";
7
7
  // src/components/plugins/data.ts
8
8
  var s = {