reactive-md 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/CHANGELOG-ch.md +13 -0
  2. package/CHANGELOG.md +13 -0
  3. package/README-ch.md +6 -6
  4. package/README-en.md +6 -6
  5. package/README.md +6 -6
  6. package/SECURITY-ch.md +3 -3
  7. package/SECURITY.md +3 -3
  8. package/THIRD_PARTY_NOTICES.md +111 -1
  9. package/cli/build.mjs +1 -0
  10. package/cli/init.mjs +1 -1
  11. package/dist-library/{LocalDocumentView-K7Y-2bRJ.js → LocalDocumentView-sthUP0ct.js} +10 -10
  12. package/dist-library/LocalDocumentViewCore-GiWV3bey.js +9829 -0
  13. package/dist-library/LocalReactiveDocumentCore-ZjQSGyHE.js +275 -0
  14. package/dist-library/{authoring-Co_TiE-P.js → authoring-Dsune4Hy.js} +40 -20
  15. package/dist-library/{compile-LhpTKqCR.js → compile-wUv8KEge.js} +1 -1
  16. package/dist-library/{compiler-core-DTxY-qYz.js → compiler-core-As_m-MNm.js} +2449 -1742
  17. package/dist-library/{compiler-DfGbQhyD.js → compiler-eOfcinZs.js} +19 -19
  18. package/dist-library/{component-state-BBJ08vML.js → component-state-C52ZFJGl.js} +1 -1
  19. package/dist-library/{config-BUo-8O5C.js → config-BadfhjdP.js} +1 -1
  20. package/dist-library/{config-validation-C5kJYk-J.js → config-validation-F47AcE6o.js} +49 -1
  21. package/dist-library/{controls-BWiLLtBO.js → controls-CcT6n7k_.js} +2433 -2409
  22. package/dist-library/{coordinate-BSl6enWV.js → coordinate-CWS9p5q_.js} +108 -107
  23. package/dist-library/{data-table-DfvytZKQ.js → data-table-Bgccxd7h.js} +68 -65
  24. package/dist-library/{display-lw3BT1TA.js → display-B-VhqVND.js} +1 -1
  25. package/dist-library/{export-C7IDW9ul.js → export-BqVmTXm8.js} +145 -87
  26. package/dist-library/{gallery-B8kSt1oI.js → gallery-CY6mTx8i.js} +151 -147
  27. package/dist-library/html-CNT4KD-2.js +757 -0
  28. package/dist-library/{incremental-D_6vwAAE.js → incremental-Dv0FSp_U.js} +404 -142
  29. package/dist-library/layout-C0YlEPGr.js +562 -0
  30. package/dist-library/{mount-preset-C5s9ebEH.js → mount-preset-KxvtKgJb.js} +2 -2
  31. package/dist-library/options-1aDLK7JY.js +121 -0
  32. package/dist-library/{package-core-D0POW4Gd.js → package-core-WFK1RhAZ.js} +3 -3
  33. package/dist-library/{parser-standard-OToYcOBL.js → parser-standard-Yuf3A_VI.js} +3270 -3778
  34. package/dist-library/react-D5iGiUdL.js +7 -0
  35. package/dist-library/reactive-md-authoring.js +16 -18
  36. package/dist-library/reactive-md-build.js +51 -51
  37. package/dist-library/reactive-md-compiler-standard.js +10 -9
  38. package/dist-library/reactive-md-compiler.js +3 -3
  39. package/dist-library/reactive-md-export.js +4 -4
  40. package/dist-library/reactive-md-minimal-react-preset.js +3 -3
  41. package/dist-library/reactive-md-pdf.js +127 -3
  42. package/dist-library/reactive-md-plugin-chart.js +2 -2
  43. package/dist-library/reactive-md-plugin-data.js +4 -4
  44. package/dist-library/reactive-md-plugin-diagram.js +3 -3
  45. package/dist-library/reactive-md-plugin-forms.js +2 -2
  46. package/dist-library/reactive-md-plugin-gallery.js +2 -2
  47. package/dist-library/reactive-md-plugin-navigation.js +2 -2
  48. package/dist-library/reactive-md-plugin-network.js +117 -115
  49. package/dist-library/reactive-md-plugin-plot.js +3 -3
  50. package/dist-library/reactive-md-react-minimal.js +4 -4
  51. package/dist-library/reactive-md-react-server.js +6 -6
  52. package/dist-library/reactive-md-react-unstyled.js +10 -11
  53. package/dist-library/reactive-md-react.js +10 -11
  54. package/dist-library/reactive-md-sdk.js +3 -3
  55. package/dist-library/reactive-md-standalone-configured.js +2 -2
  56. package/dist-library/reactive-md-standalone-host.js +2 -2
  57. package/dist-library/reactive-md-testing-browser.js +2 -2
  58. package/dist-library/reactive-md-testing-react.js +6 -6
  59. package/dist-library/reactive-md-testing.js +4 -4
  60. package/dist-library/reactive-md.js +280 -193
  61. package/dist-library/{registry-05JiqmEp.js → registry-B9NGct4d.js} +1 -1
  62. package/dist-library/{resources-IeJomeUT.js → resources-D2GDQS0p.js} +1 -1
  63. package/dist-library/{runtime-CuOyRe9f.js → runtime-kcA7bG7G.js} +341 -341
  64. package/dist-library/{schema-C-AeByPp.js → schema-BufhKUSM.js} +5 -5
  65. package/dist-library/{sdk-core-BJLJaVR5.js → sdk-core-BoJT1SIt.js} +490 -150
  66. package/dist-library/{session-core-BGka5D1J.js → session-core-nmJHuR9c.js} +170 -156
  67. package/dist-library/{shareable-jkGi2g6y.js → shareable-DpbE-59H.js} +207 -242
  68. package/dist-library/types/authoring/catalog.d.ts +1 -2
  69. package/dist-library/types/components/shared/visual-frame.d.ts +6 -2
  70. package/dist-library/types/local/compilation/compiler-capabilities.d.ts +3 -0
  71. package/dist-library/types/local/compilation/compiler-core.d.ts +11 -3
  72. package/dist-library/types/local/compilation/compiler-services.d.ts +8 -4
  73. package/dist-library/types/local/compilation/compiler.d.ts +3 -3
  74. package/dist-library/types/local/compilation/session/incremental.d.ts +20 -5
  75. package/dist-library/types/local/compilation/streaming.d.ts +27 -0
  76. package/dist-library/types/local/configuration/capability-policy.d.ts +3 -0
  77. package/dist-library/types/local/configuration/diagnostic-messages.d.ts +48 -0
  78. package/dist-library/types/local/configuration/options-core.d.ts +1 -2
  79. package/dist-library/types/local/configuration/options.d.ts +1 -0
  80. package/dist-library/types/local/css/author-css.d.ts +66 -0
  81. package/dist-library/types/local/html/extended-fragment.d.ts +41 -0
  82. package/dist-library/types/local/html/html.d.ts +39 -3
  83. package/dist-library/types/local/index.d.ts +1 -1
  84. package/dist-library/types/local/parsing/author-markdown.d.ts +11 -0
  85. package/dist-library/types/local/parsing/parse-session.d.ts +2 -2
  86. package/dist-library/types/local/parsing/parser-convert.d.ts +2 -1
  87. package/dist-library/types/local/parsing/parser-core.d.ts +8 -1
  88. package/dist-library/types/local/parsing/parser.d.ts +2 -2
  89. package/dist-library/types/local/rendering/document/ExtendedHtmlFragment.d.ts +14 -0
  90. package/dist-library/types/local/rendering/document/LocalDocumentViewCore.d.ts +25 -1
  91. package/dist-library/types/local/rendering/document/LocalReactiveDocumentCore.d.ts +1 -1
  92. package/dist-library/types/local/rendering/document/use-author-script.d.ts +3 -0
  93. package/dist-library/types/local/rendering/document/view-render-context.d.ts +11 -1
  94. package/dist-library/types/local/runtime/author-script-protocol.d.ts +59 -0
  95. package/dist-library/types/local/transport/worker.d.ts +27 -4
  96. package/dist-library/types/local/types.d.ts +52 -16
  97. package/dist-library/types/react/component-api.d.ts +10 -1
  98. package/dist-library/types/react/component-utils.d.ts +9 -1
  99. package/dist-library/types/react/sdk-core.d.ts +4 -1
  100. package/dist-library/types/shareable.d.ts +5 -4
  101. package/dist-library/types/standalone/prepare.d.ts +1 -1
  102. package/dist-library/types/standalone/session-core.d.ts +3 -2
  103. package/dist-library/{types-BFC5rzC4.js → types-BeNtPqdY.js} +1 -1
  104. package/dist-library/{validation-BlDL2uD9.js → validation-BEBA_HvS.js} +88 -72
  105. package/dist-library/{visual-frame-G8PHoj1e.js → visual-frame-CyV1FXzs.js} +6 -5
  106. package/dist-library/{visuals-BkYRmYGO.js → visuals-BZbZYA7w.js} +24181 -24180
  107. package/dist-standalone/reactive-md-standalone.js +124 -117
  108. package/docs/README-ch.md +2 -1
  109. package/docs/README.md +2 -1
  110. package/docs/compatibility/compatibility-ch.md +6 -6
  111. package/docs/compatibility/compatibility-en.md +6 -6
  112. package/docs/compatibility/source-versioning-ch.md +1 -1
  113. package/docs/compatibility/source-versioning-en.md +1 -1
  114. package/docs/development/component-development-ch.md +2 -2
  115. package/docs/development/component-development-en.md +2 -2
  116. package/docs/development/component-development-reference-ch.md +2 -2
  117. package/docs/development/component-development-reference-en.md +2 -2
  118. package/docs/development/component-protocol-ch.md +2 -2
  119. package/docs/development/component-protocol-en.md +2 -2
  120. package/docs/development/extension-tutorial-ch.md +3 -3
  121. package/docs/development/extension-tutorial-en.md +3 -3
  122. package/docs/integration/author-tools-ch.md +1 -1
  123. package/docs/integration/author-tools-en.md +1 -1
  124. package/docs/integration/compiler-ch.md +3 -1
  125. package/docs/integration/compiler-en.md +3 -1
  126. package/docs/integration/editor-ch.md +3 -3
  127. package/docs/integration/editor-en.md +3 -3
  128. package/docs/integration/extension-sdk-ch.md +2 -2
  129. package/docs/integration/extension-sdk-en.md +2 -2
  130. package/docs/integration/local-integration-ch.md +130 -8
  131. package/docs/integration/local-integration-en.md +130 -8
  132. package/docs/integration/shareable-export-ch.md +4 -2
  133. package/docs/integration/shareable-export-en.md +4 -2
  134. package/docs/reference/html-compatibility-ch.md +20 -67
  135. package/docs/reference/html-compatibility-en.md +19 -64
  136. package/docs/reference/public-api-ch.md +10 -7
  137. package/docs/reference/public-api-en.md +10 -7
  138. package/docs/releases/release-0.9.1-ch.md +29 -0
  139. package/docs/releases/release-0.9.1-en.md +29 -0
  140. package/examples/component-package/README-ch.md +1 -1
  141. package/examples/component-package/README.md +1 -1
  142. package/examples/game-2048-package/README-ch.md +1 -1
  143. package/examples/game-2048-package/README.md +1 -1
  144. package/examples/integration/README-ch.md +21 -2
  145. package/examples/integration/README.md +21 -2
  146. package/examples/integration/extension-sdk/README-ch.md +1 -1
  147. package/examples/integration/extension-sdk/README.md +1 -1
  148. package/examples/integration/streaming/index.html +48 -0
  149. package/examples/integration/streaming/main.js +175 -0
  150. package/examples/integration/streaming/package.json +13 -0
  151. package/examples/integration/streaming/worker.js +3 -0
  152. package/examples/minimal-extension/README-ch.md +3 -3
  153. package/examples/minimal-extension/README.md +3 -3
  154. package/examples/tetris-package/README-ch.md +1 -1
  155. package/examples/tetris-package/README.md +1 -1
  156. package/package.json +6 -1
  157. package/dist-library/LocalDocumentViewCore-BLG4hMuO.js +0 -9535
  158. package/dist-library/LocalReactiveDocumentCore-DVQ6WA9G.js +0 -259
  159. package/dist-library/component-utils-BvHL8VGt.js +0 -298
  160. package/dist-library/layout-C22VjZh0.js +0 -542
  161. package/dist-library/options-CdSKOi7p.js +0 -116
  162. package/dist-library/react-LY5qsVeP.js +0 -7
@@ -1,6 +1,6 @@
1
1
  import { $ as e, A as t, F as n, I as r, N as i, Q as a, R as o, X as s, Z as c, a as l, i as u, it as d, q as f, st as p, t as m } from "./preset-core-CKc5YXSM.js";
2
- import { D as h, E as g, O as _, T as v, V as y, _ as b, a as x, c as S, d as C, h as w, i as T, m as ee, n as E, o as te, p as ne, r as D, s as re, t as ie, v as ae, y as O } from "./config-validation-C5kJYk-J.js";
3
- import { a as k, n as oe, s as se, t as ce } from "./compile-LhpTKqCR.js";
2
+ import { D as h, E as g, O as _, T as v, V as y, _ as b, a as x, c as S, d as C, h as w, i as T, m as ee, n as E, o as te, p as ne, r as D, s as re, t as ie, v as ae, y as O } from "./config-validation-F47AcE6o.js";
3
+ import { a as k, n as oe, s as se, t as ce } from "./compile-wUv8KEge.js";
4
4
  import { n as le } from "./props-sJ8vk0cr.js";
5
5
  import { p as ue, r as de, x as fe } from "./registry-core-Bbad9Bm2.js";
6
6
  // node_modules/devlop/lib/default.js
@@ -308,14 +308,14 @@ function G(e, t = H) {
308
308
  });
309
309
  return n && U.set(e, r), r;
310
310
  }
311
- function K(e, t, n, r, i = "reactive-md-config/v1") {
311
+ function $e(e, t, n, r, i = "reactive-md-config/v1") {
312
312
  let a = w(e, { legacyProfiles: t.length > 0 ? n : [] }), o = [...a.legacyKeys, ...r !== void 0 && !a.legacyKeys.some((e) => e.key === r) ? [Object.freeze({
313
313
  profile: i,
314
314
  key: r
315
315
  })] : []];
316
316
  return C(e, a, o);
317
317
  }
318
- function $e(e) {
318
+ function et(e) {
319
319
  return x(e) || T("assembly", "must be an object."), D(e, /* @__PURE__ */ new Set([
320
320
  "protocol",
321
321
  "presets",
@@ -324,10 +324,10 @@ function $e(e) {
324
324
  "themes"
325
325
  ]), "assembly"), e.protocol !== "reactive-md-assembly/v1" && T("assembly.protocol", `must be "${i}".`), ee(e);
326
326
  }
327
- function et(e, a = [], o = []) {
327
+ function tt(e, a = [], o = []) {
328
328
  let s = ae(o);
329
329
  if (x(e) || T("config", "must be an object."), D(e, ie, "config"), e.protocol === "reactive-md-config/v2") {
330
- let n = $e(e.assembly), r = K(n, a, s);
330
+ let n = et(e.assembly), r = $e(n, a, s);
331
331
  return t(n) > 16777216 && T("config", `serialized size exceeds the ${E}-byte budget.`), r;
332
332
  }
333
333
  e.protocol !== "reactive-md-config/v1" && T("config.protocol", `must be "${r}" (or legacy "${n}").`);
@@ -343,10 +343,10 @@ function et(e, a = [], o = []) {
343
343
  components: d,
344
344
  replacementPolicy: "forbid",
345
345
  themes: Object.freeze([])
346
- }), m = K(p, a, s, a.length > 0 ? ne(l.preset, d) : void 0, u.profile);
346
+ }), m = $e(p, a, s, a.length > 0 ? ne(l.preset, d) : void 0, u.profile);
347
347
  return t(p) > 16777216 && T("config", `serialized size exceeds the ${E}-byte budget.`), m;
348
348
  }
349
- function tt(e) {
349
+ function nt(e) {
350
350
  let t = W.get(e);
351
351
  if (t !== void 0) return t;
352
352
  let n = G(e), r = Object.freeze({
@@ -358,33 +358,46 @@ function tt(e) {
358
358
  }), a = w(r).key;
359
359
  return W.set(e, a), a;
360
360
  }
361
+ // src/local/configuration/capability-policy.ts
362
+ var K = Object.freeze({
363
+ enableCss: !0,
364
+ enableJavaScript: !1,
365
+ enableExtendedHtml: !1
366
+ });
367
+ function rt(e, t) {
368
+ return {
369
+ enableCss: e?.enableCss === !0 && (t?.enableCss ?? K.enableCss) === !0,
370
+ enableJavaScript: e?.enableJavaScript === !0 && t?.enableJavaScript === !0,
371
+ enableExtendedHtml: e?.enableExtendedHtml === !0 && t?.enableExtendedHtml === !0
372
+ };
373
+ }
361
374
  // src/local/configuration/options-core.ts
362
- var nt = [
375
+ var it = [
363
376
  "enableCss",
364
377
  "enableJavaScript",
365
378
  "enableExtendedHtml"
366
- ], rt = H;
379
+ ], at = H;
367
380
  function q(e) {
368
381
  return typeof e == "object" && !!e && !Array.isArray(e);
369
382
  }
370
- var it = "local.options.invalid.host-components", at = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, ot = /* @__PURE__ */ new Set([
383
+ var ot = "local.options.invalid.host-components", st = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/, ct = /* @__PURE__ */ new Set([
371
384
  "string",
372
385
  "number",
373
386
  "boolean",
374
387
  "enum"
375
- ]), st = /* @__PURE__ */ new Set([
388
+ ]), lt = /* @__PURE__ */ new Set([
376
389
  "leaf",
377
390
  "inline",
378
391
  "container"
379
- ]), ct = /* @__PURE__ */ new Set([
392
+ ]), ut = /* @__PURE__ */ new Set([
380
393
  "string",
381
394
  "number",
382
395
  "boolean"
383
- ]), lt = /* @__PURE__ */ new Set([
396
+ ]), dt = /* @__PURE__ */ new Set([
384
397
  "bind",
385
398
  "initial",
386
399
  "disabled"
387
- ]), ut = /* @__PURE__ */ new Set([
400
+ ]), ft = /* @__PURE__ */ new Set([
388
401
  "maxSyntaxNodes",
389
402
  "maxParseWork",
390
403
  "maxMarkdownDepth"
@@ -416,11 +429,11 @@ function Y(e) {
416
429
  return {
417
430
  ok: !1,
418
431
  message: `Compile option hostComponents is invalid: ${e}`,
419
- key: it,
432
+ key: ot,
420
433
  detail: e
421
434
  };
422
435
  }
423
- function dt(e, t) {
436
+ function pt(e, t) {
424
437
  if (e === void 0) return {
425
438
  ok: !0,
426
439
  binding: void 0
@@ -436,7 +449,7 @@ function dt(e, t) {
436
449
  "exclusive"
437
450
  ].includes(n)) return Y(`${t} "binding" has unknown field "${n}".`);
438
451
  let n = e.kind;
439
- if (typeof n != "string" || !ct.has(n)) return Y(`${t} "binding.kind" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
452
+ if (typeof n != "string" || !ut.has(n)) return Y(`${t} "binding.kind" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
440
453
  let r = { kind: n };
441
454
  if (Object.hasOwn(e, "exclusive") && e.exclusive !== void 0) {
442
455
  if (typeof e.exclusive != "boolean") return Y(`${t} "binding.exclusive" must be a boolean.`);
@@ -499,7 +512,7 @@ function dt(e, t) {
499
512
  binding: r
500
513
  };
501
514
  }
502
- function ft(e, t) {
515
+ function mt(e, t) {
503
516
  let n = [], r = /* @__PURE__ */ new Map();
504
517
  if (e === void 0) return {
505
518
  ok: !0,
@@ -519,22 +532,22 @@ function ft(e, t) {
519
532
  let s = a.name;
520
533
  if (typeof s != "string") return Y(`${o} "name" must be a string.`);
521
534
  if (s.length > 128) return Y(`${o} "name" exceeds the 128-character limit.`);
522
- if (!at.test(s)) return Y(`${o} "name" ${s} must use lowercase kebab-case.`);
535
+ if (!st.test(s)) return Y(`${o} "name" ${s} must use lowercase kebab-case.`);
523
536
  if (i.has(s.toLowerCase())) return Y(`${o} "name" ${s} conflicts with a built-in component, HTML tag or theme.`);
524
537
  if (r.has(s.toLowerCase())) return Y(`${o} "name" ${s} is declared more than once.`);
525
- if (typeof a.form != "string" || !st.has(a.form)) return Y(`${o} "form" must be "leaf", "inline" or "container".`);
526
- let c = a.form, l = dt(a.binding, o);
538
+ if (typeof a.form != "string" || !lt.has(a.form)) return Y(`${o} "form" must be "leaf", "inline" or "container".`);
539
+ let c = a.form, l = pt(a.binding, o);
527
540
  if (!l.ok) return l;
528
541
  let u = l.binding, d = a.props;
529
542
  if (!q(d)) return Y(`${o} "props" must be an object.`);
530
543
  let p = {};
531
544
  for (let e of Object.keys(d)) {
532
- if (!at.test(e)) return Y(`${o} property "${e}" must use lowercase kebab-case.`);
533
- if (u && lt.has(e)) return Y(`${o} property "${e}" is reserved by the host binding.`);
545
+ if (!st.test(e)) return Y(`${o} property "${e}" must use lowercase kebab-case.`);
546
+ if (u && dt.has(e)) return Y(`${o} property "${e}" is reserved by the host binding.`);
534
547
  let t = d[e];
535
548
  if (!q(t)) return Y(`${o} property "${e}" must be an object.`);
536
549
  let n = t.kind;
537
- if (typeof n != "string" || !ot.has(n)) return Y(`property "${e}" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
550
+ if (typeof n != "string" || !ct.has(n)) return Y(`property "${e}" has unsupported kind ${typeof n == "string" ? `"${n}"` : String(n)}.`);
538
551
  let r = { kind: n };
539
552
  for (let n of ["required", "static"]) if (Object.hasOwn(t, n) && t[n] !== void 0) {
540
553
  if (typeof t[n] != "boolean") return Y(`${o} property "${e}" "${n}" must be a boolean.`);
@@ -587,13 +600,13 @@ function ft(e, t) {
587
600
  hostByName: r
588
601
  };
589
602
  }
590
- function pt(e) {
603
+ function ht(e) {
591
604
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
592
605
  }
593
- function mt(e) {
606
+ function gt(e) {
594
607
  let t = e.static === !0 || e.dynamic === !1;
595
608
  if (e.kind === "enum") {
596
- let n = `^(?:${(e.enum ?? []).map(pt).join("|")})$`;
609
+ let n = `^(?:${(e.enum ?? []).map(ht).join("|")})$`;
597
610
  if (n.length <= 512) return {
598
611
  kind: "string",
599
612
  ...e.required === !0 ? { required: !0 } : {},
@@ -604,11 +617,11 @@ function mt(e) {
604
617
  let n = { kind: e.kind };
605
618
  return e.required === !0 && e.default === void 0 && (n.required = !0), t && (n.static = !0), e.enum && (n.enum = [...e.enum]), e.pattern !== void 0 && (n.pattern = e.pattern), n;
606
619
  }
607
- function ht(e) {
620
+ function _t(e) {
608
621
  let t = [], n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
609
622
  for (let i of e.components) {
610
623
  let e = {};
611
- for (let t of Object.keys(i.props)) e[t] = mt(i.props[t]);
624
+ for (let t of Object.keys(i.props)) e[t] = gt(i.props[t]);
612
625
  let a = le(i), o = {
613
626
  name: i.name,
614
627
  form: i.form,
@@ -639,19 +652,15 @@ function Z(e) {
639
652
  for (let n of e) t.set(n.name, de(n));
640
653
  return t;
641
654
  }
642
- function gt(e, t) {
655
+ function vt(e, t) {
643
656
  let n = t.defaults, r = new Set(n.map((e) => e.name));
644
657
  if (e !== void 0 && !q(e)) return {
645
658
  ok: !1,
646
659
  message: "Compile options must be an object.",
647
660
  key: "local.options.invalid.object"
648
661
  };
649
- let i = e ?? {}, o = {
650
- enableCss: !1,
651
- enableJavaScript: !1,
652
- enableExtendedHtml: !1
653
- };
654
- for (let e of nt) {
662
+ let i = e ?? {}, o = { ...K };
663
+ for (let e of it) {
655
664
  if (!Object.hasOwn(i, e)) continue;
656
665
  let t = i[e];
657
666
  if (t !== void 0) {
@@ -687,6 +696,14 @@ function gt(e, t) {
687
696
  u = e;
688
697
  }
689
698
  }
699
+ if (Object.hasOwn(i, "sourcePhase")) {
700
+ let e = i.sourcePhase;
701
+ if (e !== void 0 && e !== "streaming" && e !== "final") return {
702
+ ok: !1,
703
+ message: "Compile option sourcePhase must be \"streaming\" or \"final\".",
704
+ key: "local.options.invalid.source-phase"
705
+ };
706
+ }
690
707
  let d = i.limits, f = a, p = c, m = s;
691
708
  if (d !== void 0) {
692
709
  if (!q(d)) return {
@@ -694,7 +711,7 @@ function gt(e, t) {
694
711
  message: "Compile option limits must be an object.",
695
712
  key: "local.options.invalid.limits"
696
713
  };
697
- for (let e of Object.keys(d)) if (!ut.has(e) && d[e] !== void 0) return {
714
+ for (let e of Object.keys(d)) if (!ft.has(e) && d[e] !== void 0) return {
698
715
  ok: !1,
699
716
  message: `Compile option limits.${e} is not supported.`,
700
717
  key: "local.options.invalid.limits-unknown",
@@ -729,12 +746,12 @@ function gt(e, t) {
729
746
  detail: t
730
747
  };
731
748
  }
732
- let e = ht(_);
749
+ let e = _t(_);
733
750
  v = e.hostComponents, y = e.hostByName, b = e.sdkByName, x = _.registry;
734
751
  let r = X(x, Z(x));
735
752
  S = r.schemaByName, C = r.componentByName, w = new Set(_.components.map((e) => e.name)), T = /* @__PURE__ */ new Set();
736
753
  } else if (g) {
737
- let e = ft(i.hostComponents, n);
754
+ let e = mt(i.hostComponents, n);
738
755
  if (!e.ok) return e;
739
756
  v = e.hostComponents, y = e.hostByName, b = /* @__PURE__ */ new Map(), x = n;
740
757
  let t = Z(n);
@@ -755,7 +772,6 @@ function gt(e, t) {
755
772
  maxParseWork: p,
756
773
  maxMarkdownDepth: m,
757
774
  html: o,
758
- htmlActive: o.enableCss || o.enableJavaScript || o.enableExtendedHtml,
759
775
  markdownBreaks: l,
760
776
  strict: u,
761
777
  hostComponents: v,
@@ -774,18 +790,18 @@ function gt(e, t) {
774
790
  ...t.preset ? { preset: t.preset } : {}
775
791
  };
776
792
  }
777
- function _t(e, t = [], n) {
778
- let r = t.length > 0 ? rt : void 0;
779
- return gt(e, {
793
+ function yt(e, t = [], n) {
794
+ let r = t.length > 0 ? at : void 0;
795
+ return vt(e, {
780
796
  defaults: t,
781
797
  ...r ? { preset: r } : {},
782
- defaultConfigKey: tt(t),
783
- readConfig: et,
798
+ defaultConfigKey: nt(t),
799
+ readConfig: tt,
784
800
  configKey: (e) => e.key,
785
801
  ...n ? { capabilities: n } : {}
786
802
  });
787
803
  }
788
- function vt(e) {
804
+ function bt(e) {
789
805
  return e.componentConfigKey;
790
806
  }
791
807
  // src/local/configuration/kernel-value-rules.ts
@@ -794,7 +810,7 @@ function Q(e) {
794
810
  for (let [n, r] of Object.entries(e)) r !== void 0 && (t[n] = r);
795
811
  return t;
796
812
  }
797
- function yt(e) {
813
+ function xt(e) {
798
814
  let t = [];
799
815
  for (let n of ue(e)) switch (n.kind) {
800
816
  case "value-date":
@@ -830,16 +846,16 @@ function yt(e) {
830
846
  }
831
847
  return t;
832
848
  }
833
- function bt(e) {
849
+ function St(e) {
834
850
  if (!e || typeof e != "object") return;
835
851
  let t = e.kernel;
836
852
  if (t && typeof t == "object") return t;
837
853
  }
838
- var xt = /^[A-Za-z_][A-Za-z0-9_-]*$/;
839
- function St(e) {
840
- return xt.test(e);
854
+ var Ct = /^[A-Za-z_][A-Za-z0-9_-]*$/;
855
+ function wt(e) {
856
+ return Ct.test(e);
841
857
  }
842
- function Ct(e, t, n) {
858
+ function Tt(e, t, n) {
843
859
  let r = [];
844
860
  for (let i of e) {
845
861
  let e = i.target;
@@ -875,13 +891,13 @@ function $(e, t, n) {
875
891
  let r = t ? oe(t, n) : void 0;
876
892
  return e.expressionOffset + (r ?? Math.max(0, e.source.indexOf(n)));
877
893
  }
878
- function wt(e, t, n, r = "local.expression") {
894
+ function Et(e, t, n, r = "local.expression") {
879
895
  t instanceof k ? e(`${r}.${t.code || "invalid"}`, `Expression error: ${t.message}`, n + (Number.isFinite(t.offset) ? t.offset : 0)) : e(`${r}.invalid`, `Expression error: ${t instanceof Error ? t.message : String(t)}`, n);
880
896
  }
881
- function Tt(e) {
897
+ function Dt(e) {
882
898
  return e instanceof k ? e : new k("expression-eval", e instanceof Error ? e.message : String(e), 0);
883
899
  }
884
- function Et(e, t) {
900
+ function Ot(e, t) {
885
901
  let n = new Set(e), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
886
902
  for (let t of e) r.set(t, 0);
887
903
  for (let a of e) for (let e of t(a)) {
@@ -907,14 +923,14 @@ function Et(e, t) {
907
923
  cyclic: e.filter((e) => !s.has(e))
908
924
  };
909
925
  }
910
- function Dt(e) {
926
+ function kt(e) {
911
927
  let t = Object.keys(e), n = new Set(t);
912
- return Et(t, (t) => {
928
+ return Ot(t, (t) => {
913
929
  let r = e[t];
914
930
  return r ? r.dependencies.filter((e) => n.has(e)) : [];
915
931
  });
916
932
  }
917
- function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
933
+ function At(e, t, n, r = /* @__PURE__ */ new Set(), i) {
918
934
  let a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = [], l = /* @__PURE__ */ new Set();
919
935
  for (let t of e) s.has(t.name) || (s.set(t.name, t), c.push(t.name));
920
936
  let u = new Set(c);
@@ -923,7 +939,7 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
923
939
  try {
924
940
  r = i?.expression(t.source) ?? ce(t.source);
925
941
  } catch (r) {
926
- wt(n, r, t.expressionOffset), l.add(e);
942
+ Et(n, r, t.expressionOffset), l.add(e);
927
943
  continue;
928
944
  }
929
945
  a.set(e, r), o.set(e, [...r.dependencies]);
@@ -943,7 +959,7 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
943
959
  Object.hasOwn(t, c) ? (n("local.computation.const", `Constant "${e}" cannot depend on ${r.has(c) ? "external data" : "control parameter"} "${c}".`, $(i, a.get(e), c)), d.add(e)) : o === "computed" && (n("local.computation.const", `Constant "${e}" cannot depend on computed value "${c}".`, $(i, a.get(e), c)), d.add(e));
944
960
  }
945
961
  }
946
- let { order: f, cyclic: p } = Et(c, (e) => o.get(e) ?? []);
962
+ let { order: f, cyclic: p } = Ot(c, (e) => o.get(e) ?? []);
947
963
  if (p.length > 0) {
948
964
  let e = new Set(p), t = [], r = /* @__PURE__ */ new Map(), i = p[0];
949
965
  for (; !r.has(i);) {
@@ -976,7 +992,7 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
976
992
  let t = i ? i.infer(r, h) : r.inferType(h);
977
993
  m[e] = t, h[e] = t;
978
994
  } catch (r) {
979
- wt(n, r, t.expressionOffset), l.add(e);
995
+ Et(n, r, t.expressionOffset), l.add(e);
980
996
  }
981
997
  }
982
998
  let g = {}, _ = {}, v = /* @__PURE__ */ Error("failed constant read"), y = (e) => {
@@ -1003,7 +1019,7 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
1003
1019
  y(e);
1004
1020
  continue;
1005
1021
  }
1006
- let i = Tt(r);
1022
+ let i = Dt(r);
1007
1023
  n("local.computation.expression", `Constant "${e}" cannot be evaluated: ${i.message}`, t.expressionOffset + (Number.isFinite(i.offset) ? i.offset : 0)), y(e);
1008
1024
  }
1009
1025
  }
@@ -1030,7 +1046,7 @@ function Ot(e, t, n, r = /* @__PURE__ */ new Set(), i) {
1030
1046
  constValues: g
1031
1047
  };
1032
1048
  }
1033
- function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1049
+ function jt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1034
1050
  let o = {}, s = /* @__PURE__ */ new Map(), c = {};
1035
1051
  for (let [e, t] of Object.entries(r)) c[e] = t;
1036
1052
  for (let [e, t] of a) Object.defineProperty(c, e, {
@@ -1050,7 +1066,7 @@ function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1050
1066
  if (t) throw new k("expression-budget", t, 0);
1051
1067
  o[r] = e, c[r] = e;
1052
1068
  } catch (e) {
1053
- let t = Tt(e);
1069
+ let t = Dt(e);
1054
1070
  s.set(r, t), Object.defineProperty(c, r, {
1055
1071
  enumerable: !0,
1056
1072
  configurable: !0,
@@ -1066,25 +1082,25 @@ function kt(e, t, n, r, i, a = /* @__PURE__ */ new Map()) {
1066
1082
  };
1067
1083
  }
1068
1084
  // src/local/evaluation/validation.ts
1069
- var At = "local.validation.failed", jt = "local.validation.expression", Mt = "Validation failed.";
1070
- function Nt(e) {
1085
+ var Mt = "local.validation.failed", Nt = "local.validation.expression", Pt = "Validation failed.";
1086
+ function Ft(e) {
1071
1087
  return e.length > 2e3 ? `${y(e, d - 1)}…` : e;
1072
1088
  }
1073
- function Pt(e) {
1089
+ function It(e) {
1074
1090
  let t = e.trim();
1075
1091
  return t ? t.split(/\s+/) : [];
1076
1092
  }
1077
- function Ft(e) {
1093
+ function Lt(e) {
1078
1094
  let t = [0];
1079
1095
  for (let n = 0; n < e.length; n += 1) e[n] === "\n" && t.push(n + 1);
1080
1096
  return t;
1081
1097
  }
1082
- function It(e) {
1098
+ function Rt(e) {
1083
1099
  if (!e || typeof e != "object") return !1;
1084
1100
  let t = e, n = t.range;
1085
1101
  return typeof t.expression == "string" && typeof t.message == "string" && Array.isArray(t.fields) && !!n && Number.isFinite(n.start) && Number.isFinite(n.end);
1086
1102
  }
1087
- function Lt(e, t, n, r, i) {
1103
+ function zt(e, t, n, r, i) {
1088
1104
  let a = e.length, o = Math.max(0, Math.min(a, Math.trunc(n.start))), s = Math.max(o + 1, Math.min(a, Math.trunc(n.end))), c = 0, l = Math.max(0, t.length - 1);
1089
1105
  for (; c < l;) {
1090
1106
  let e = Math.ceil((c + l) / 2);
@@ -1102,4 +1118,4 @@ function Lt(e, t, n, r, i) {
1102
1118
  column: o - t[c] + 1
1103
1119
  };
1104
1120
  }
1105
- export { A as $, z as A, Ee as B, ze as C, He as D, Ue as E, Me as F, M as G, Oe as H, R as I, F as J, N as K, je as L, B as M, Pe as N, Ge as O, Ne as P, ye as Q, we as R, Le as S, qe as T, ke as U, De as V, Ae as W, Ce as X, I as Y, be as Z, vt as _, It as a, Ye as b, Lt as c, Ot as d, he as et, St as f, nt as g, yt as h, Nt as i, Ie as j, Ke as k, kt as l, Ct as m, At as n, Ft as o, bt as p, P as q, Mt as r, Pt as s, jt as t, pe as tt, Dt as u, _t as v, Re as w, Je as x, gt as y, Te as z };
1121
+ export { be as $, Ge as A, we as B, Je as C, qe as D, Re as E, Pe as F, ke as G, Ee as H, Ne as I, N as J, Ae as K, Me as L, z as M, Ie as N, Ue as O, B as P, Ce as Q, R, Ye as S, ze as T, De as U, Te as V, Oe as W, F as X, P as Y, I as Z, bt as _, Rt as a, K as b, zt as c, At as d, ye as et, wt as f, it as g, xt as h, Ft as i, Ke as j, He as k, jt as l, Tt as m, Mt as n, he as nt, Lt as o, St as p, M as q, Pt as r, pe as rt, It as s, Nt as t, A as tt, kt as u, yt as v, Le as w, rt as x, vt as y, je as z };
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "./display-lw3BT1TA.js";
1
+ import { r as e, t } from "./display-B-VhqVND.js";
2
2
  import { createElement as n, useId as r } from "react";
3
3
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
4
  // src/local/rendering/math-view.tsx
@@ -30,14 +30,15 @@ function c({ children: e, className: t = "", scrollClassName: n = "", tableProps
30
30
  });
31
31
  }
32
32
  // src/components/shared/visual-frame.tsx
33
- function l({ className: e, label: t, children: n, component: o }) {
34
- let s = r();
33
+ function l({ className: e, label: t, children: n, component: o, authorRoot: s }) {
34
+ let c = r();
35
35
  return /* @__PURE__ */ a("figure", {
36
+ ...s,
36
37
  className: `local-visual ${e}`,
37
- "aria-labelledby": s,
38
+ "aria-labelledby": c,
38
39
  "data-rmd-component": o,
39
40
  children: [/* @__PURE__ */ i("figcaption", {
40
- id: s,
41
+ id: c,
41
42
  className: "local-visual-title",
42
43
  "data-rmd-part": "title",
43
44
  children: t