@bendyline/squisq 2.6.0 → 2.7.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.
@@ -9171,7 +9171,8 @@ function expandDocBlocks(blocks, options = {}) {
9171
9171
  customTemplates,
9172
9172
  failureMode = "fallback",
9173
9173
  onDiagnostic,
9174
- splitLongBlocks = true
9174
+ splitLongBlocks = true,
9175
+ mergeShortBlocks = true
9175
9176
  } = opts;
9176
9177
  const totalBlocks = blocks.length;
9177
9178
  const registry = customTemplates && customTemplates.length > 0 ? buildRegistry(customTemplates) : templateRegistry;
@@ -9325,7 +9326,7 @@ function expandDocBlocks(blocks, options = {}) {
9325
9326
  while (segmentExpandedBlocks.length > 1) {
9326
9327
  const lastBlock = segmentExpandedBlocks[segmentExpandedBlocks.length - 1];
9327
9328
  const timeFromLastToEnd = segmentEnd - lastBlock.startTime;
9328
- if (timeFromLastToEnd < MIN_TRANSITION_GAP && lastBlock.template !== "sectionHeader") {
9329
+ if (mergeShortBlocks && timeFromLastToEnd < MIN_TRANSITION_GAP && lastBlock.template !== "sectionHeader") {
9329
9330
  const prevBlock = segmentExpandedBlocks[segmentExpandedBlocks.length - 2];
9330
9331
  prevBlock.duration = segmentEnd - prevBlock.startTime;
9331
9332
  lastBlock.duration = 0;
@@ -9344,7 +9345,7 @@ function expandDocBlocks(blocks, options = {}) {
9344
9345
  onlyBlock.duration = segmentEnd - onlyBlock.startTime;
9345
9346
  }
9346
9347
  }
9347
- let changed = true;
9348
+ let changed = mergeShortBlocks;
9348
9349
  while (changed) {
9349
9350
  changed = false;
9350
9351
  for (let i = segmentExpandedBlocks.length - 1; i >= 1; i--) {
@@ -9390,7 +9391,7 @@ function expandDocBlocks(blocks, options = {}) {
9390
9391
  }
9391
9392
  }
9392
9393
  }
9393
- return expandedBlocks.filter((block) => block && block.duration > 0);
9394
+ return mergeShortBlocks ? expandedBlocks.filter((block) => block && block.duration > 0) : expandedBlocks.filter(Boolean);
9394
9395
  }
9395
9396
  function getAvailableTemplates() {
9396
9397
  return Object.keys(templateRegistry);
@@ -10,6 +10,7 @@ import {
10
10
  flattenRenderableBlocks,
11
11
  getBlockBodyText,
12
12
  getPinnedBlockMeta,
13
+ hasTemplate,
13
14
  isDataFence,
14
15
  isShapeName,
15
16
  lintTemplateParams,
@@ -23,7 +24,10 @@ import {
23
24
  templateRegistry,
24
25
  writeCustomTemplatesToFrontmatter,
25
26
  writeCustomThemesToFrontmatter
26
- } from "./chunk-GSJEGMKF.js";
27
+ } from "./chunk-ENNNQIYV.js";
28
+ import {
29
+ iconMarker
30
+ } from "./chunk-7ZAAICW4.js";
27
31
  import {
28
32
  ASCII_TREE_VOCAB,
29
33
  ASCII_VOCAB,
@@ -662,6 +666,332 @@ function removeTransitionParams(attrs) {
662
666
  };
663
667
  }
664
668
 
669
+ // src/doc/buildPreviewDoc.ts
670
+ function extractRichText(node) {
671
+ if (node.type === "inlineIcon") {
672
+ const icon = node;
673
+ return iconMarker(icon.family, icon.name);
674
+ }
675
+ if ("value" in node && typeof node.value === "string") {
676
+ return node.value;
677
+ }
678
+ const children = getChildren(node);
679
+ const separator = node.type === "list" || node.type === "listItem" ? "\n" : "";
680
+ return children.map(extractRichText).join(separator);
681
+ }
682
+ function extractBodyText(contents) {
683
+ if (!contents || contents.length === 0) return "";
684
+ const parts = [];
685
+ for (const node of contents) {
686
+ if (node.type === "code" && node.lang?.trim().toLowerCase() === "mermaid") continue;
687
+ parts.push(extractRichText(node));
688
+ }
689
+ return parts.join("\n").trim();
690
+ }
691
+ function parseDim(raw) {
692
+ if (raw === void 0) return void 0;
693
+ const n = parseFloat(raw);
694
+ return Number.isFinite(n) && n > 0 ? n : void 0;
695
+ }
696
+ function extractBlockImages(contents) {
697
+ if (!contents || contents.length === 0) return [];
698
+ const images = [];
699
+ function walkHtml(node) {
700
+ if (!node || typeof node !== "object") return;
701
+ const n = node;
702
+ if (n.type === "htmlElement" && n.tagName.toLowerCase() === "img") {
703
+ const attrs = n.attributes;
704
+ const src = attrs?.src;
705
+ if (typeof src === "string" && src) {
706
+ images.push({
707
+ src,
708
+ alt: typeof attrs?.alt === "string" ? attrs.alt : "",
709
+ width: parseDim(attrs?.width),
710
+ height: parseDim(attrs?.height)
711
+ });
712
+ }
713
+ }
714
+ if (Array.isArray(n.children)) {
715
+ for (const child of n.children) walkHtml(child);
716
+ }
717
+ }
718
+ function walk(node) {
719
+ if ("type" in node && node.type === "image" && "url" in node) {
720
+ const img = node;
721
+ if (img.url) {
722
+ images.push({ src: img.url, alt: img.alt ?? "" });
723
+ }
724
+ }
725
+ if ("type" in node && (node.type === "htmlBlock" || node.type === "htmlInline")) {
726
+ const html = node;
727
+ for (const child of html.htmlChildren ?? []) walkHtml(child);
728
+ }
729
+ for (const child of getChildren(node)) {
730
+ walk(child);
731
+ }
732
+ }
733
+ for (const node of contents) {
734
+ walk(node);
735
+ }
736
+ return images;
737
+ }
738
+ function collectAllDocImages(blocks) {
739
+ const seen = /* @__PURE__ */ new Set();
740
+ const images = [];
741
+ function walkBlocks(blockList) {
742
+ for (const block of blockList) {
743
+ for (const img of extractBlockImages(block.contents)) {
744
+ if (!seen.has(img.src)) {
745
+ seen.add(img.src);
746
+ images.push(img);
747
+ }
748
+ }
749
+ if (block.children) {
750
+ walkBlocks(block.children);
751
+ }
752
+ }
753
+ }
754
+ walkBlocks(blocks);
755
+ return images;
756
+ }
757
+ function extractListItems(contents) {
758
+ if (!contents) return [];
759
+ const items = [];
760
+ for (const node of contents) {
761
+ if (node.type === "list") {
762
+ for (const item of node.children) {
763
+ const text = extractPlainText(item).trim();
764
+ if (text) items.push(text);
765
+ }
766
+ }
767
+ }
768
+ return items;
769
+ }
770
+ function getTemplateDefaults(templateName, headingText, block) {
771
+ const body = extractBodyText(block.contents);
772
+ switch (templateName) {
773
+ case "statHighlight":
774
+ return deriveTemplateInputs(templateName, headingText, block.contents) ?? {
775
+ stat: headingText,
776
+ description: body || headingText
777
+ };
778
+ case "quote":
779
+ return { quote: body || headingText };
780
+ case "fullBleedQuote":
781
+ case "pullQuote":
782
+ return deriveTemplateInputs(templateName, headingText, block.contents) ?? {
783
+ text: body || headingText
784
+ };
785
+ case "factCard":
786
+ return { fact: headingText, explanation: body || headingText };
787
+ case "comparisonBar":
788
+ return { leftLabel: "A", leftValue: 60, rightLabel: "B", rightValue: 40 };
789
+ case "list": {
790
+ const items = extractListItems(block.contents);
791
+ return { items: items.length > 0 ? items : ["Item 1", "Item 2", "Item 3"] };
792
+ }
793
+ case "definitionCard":
794
+ return { term: headingText, definition: body || headingText };
795
+ case "dateEvent":
796
+ return { date: headingText, description: body || headingText };
797
+ case "leftFeature":
798
+ case "rightFeature": {
799
+ const images = extractBlockImages(block.contents);
800
+ const img = images[0];
801
+ return {
802
+ imageSrc: img?.src ?? "",
803
+ imageAlt: img?.alt || headingText,
804
+ imageWidth: img?.width,
805
+ imageHeight: img?.height,
806
+ title: headingText,
807
+ body: body || headingText
808
+ };
809
+ }
810
+ default:
811
+ return {};
812
+ }
813
+ }
814
+ function blockToSlide(block, index, knownTemplates, documentTitle) {
815
+ const headingText = block.sourceHeading ? extractPlainText(block.sourceHeading) : block.title || documentTitle || "";
816
+ const implicitSectionHeader = block.template === "sectionHeader" && block.autoTemplate !== true && !!block.sourceHeading && !block.sourceHeading.templateAnnotation?.template;
817
+ const requestedTemplate = implicitSectionHeader ? "content" : block.template ?? "content";
818
+ const isCustomTemplate = knownTemplates?.has(requestedTemplate) ?? false;
819
+ const recognized = hasTemplate(requestedTemplate) || isCustomTemplate;
820
+ const template = recognized ? requestedTemplate : "sectionHeader";
821
+ const defaults = getTemplateDefaults(template, headingText, block);
822
+ const templateOverrides = omitStringBlockMeta(block.templateOverrides);
823
+ const coercedTemplateOverrides = templateOverrides ? coerceTemplateParams(template, templateOverrides).input : void 0;
824
+ const {
825
+ id: _id,
826
+ startTime: _st,
827
+ duration: _d,
828
+ audioSegment: _as,
829
+ layers: _l,
830
+ transition: _tr,
831
+ template: _t,
832
+ title: _ti,
833
+ children: _c,
834
+ contents: _co,
835
+ sourceHeading: _sh,
836
+ templateOverrides: _to,
837
+ templateData: _td,
838
+ ...extraFields
839
+ } = block;
840
+ return {
841
+ id: block.id,
842
+ template,
843
+ duration: block.duration,
844
+ audioSegment: 0,
845
+ // Respect the block's authored transition (set via the toolbar / on-canvas
846
+ // properties palette → `{…}` block attrs). Only fall back to a default fade
847
+ // for blocks past the first when the author hasn't chosen one; the first
848
+ // block has no previous slide to transition in from.
849
+ transition: block.transition ?? (index > 0 ? { type: "fade", duration: 0.5 } : void 0),
850
+ title: headingText,
851
+ // Preserve body nodes on every slide. Built-in templates ignore this
852
+ // structural field, while the canonical materializer uses it to retain
853
+ // authored rich elements (Mermaid fences today; other media can follow)
854
+ // independently of the selected visual template.
855
+ ...block.contents ? { contents: block.contents } : {},
856
+ // Custom templates additionally consume child blocks through tokens.
857
+ ...isCustomTemplate && block.children ? { children: block.children } : {},
858
+ ...defaults,
859
+ ...extraFields,
860
+ // Structured body data (```json data fences, GFM tables for dataTable)
861
+ // carries typed values; `{[…]}` string overrides win last so an explicit
862
+ // annotation param can still pin any field.
863
+ //
864
+ // Block-meta keys (transition, startTime, duration, …) are the exception:
865
+ // they were already coerced to typed block fields above (e.g.
866
+ // `block.transition` → `{ type, duration, direction }`). Their raw string
867
+ // form also rides along in `templateData`/`templateOverrides` because the
868
+ // author wrote them inside `{[…]}`; left un-stripped, that string would
869
+ // spread back over the typed value here and clobber it — turning
870
+ // `transition=vortex` into the string `"vortex"`, which the player can't
871
+ // animate. Omit them from the content spreads so the typed fields win.
872
+ ...omitBlockMeta(block.templateData),
873
+ ...coercedTemplateOverrides
874
+ };
875
+ }
876
+ var BLOCK_META_KEYS = new Set(Object.keys(KNOWN_BLOCK_META_KEYS));
877
+ function omitBlockMeta(data) {
878
+ if (!data) return data;
879
+ let hit = false;
880
+ const out = {};
881
+ for (const key of Object.keys(data)) {
882
+ if (BLOCK_META_KEYS.has(key)) {
883
+ hit = true;
884
+ continue;
885
+ }
886
+ out[key] = data[key];
887
+ }
888
+ return hit ? out : data;
889
+ }
890
+ function omitStringBlockMeta(data) {
891
+ if (!data) return data;
892
+ let hit = false;
893
+ const out = {};
894
+ for (const key of Object.keys(data)) {
895
+ if (BLOCK_META_KEYS.has(key)) {
896
+ hit = true;
897
+ continue;
898
+ }
899
+ out[key] = data[key];
900
+ }
901
+ return hit ? out : data;
902
+ }
903
+ var IMAGE_MOTIONS = [
904
+ "zoomIn",
905
+ "zoomOut",
906
+ "panLeft",
907
+ "panRight"
908
+ ];
909
+ function documentTitleFromFileName(fileName) {
910
+ if (!fileName) return "";
911
+ const base = fileName.split(/[\\/]/).pop() ?? "";
912
+ return base.replace(/\.[^.]+$/, "").trim();
913
+ }
914
+ function resolveDocumentTitle(doc, provided) {
915
+ const frontmatterTitle = doc.frontmatter?.title;
916
+ if (typeof frontmatterTitle === "string" && frontmatterTitle.trim()) {
917
+ return frontmatterTitle.trim();
918
+ }
919
+ return provided?.trim() ?? "";
920
+ }
921
+ function buildPreviewDoc(doc, options) {
922
+ const flat = flattenRenderableBlocks(doc.blocks);
923
+ const allImages = collectAllDocImages(doc.blocks);
924
+ const usedImageSrcs = /* @__PURE__ */ new Set();
925
+ const knownTemplates = doc.customTemplates ? new Set(doc.customTemplates.map((d) => d.name)) : void 0;
926
+ const documentTitle = resolveDocumentTitle(doc, options?.documentTitle);
927
+ const slides = [];
928
+ let motionIndex = 0;
929
+ for (let i = 0; i < flat.length; i++) {
930
+ const block = flat[i];
931
+ const blockImages = extractBlockImages(block.contents);
932
+ const slide = blockToSlide(block, i, knownTemplates, documentTitle);
933
+ if (blockImages.length > 0 && slide.template === "sectionHeader") {
934
+ const img = blockImages[0];
935
+ usedImageSrcs.add(img.src);
936
+ slide.template = "imageWithCaption";
937
+ slide.imageSrc = img.src;
938
+ slide.imageAlt = img.alt;
939
+ slide.caption = slide.title;
940
+ slide.captionPosition = "bottom";
941
+ slide.ambientMotion = IMAGE_MOTIONS[motionIndex++ % IMAGE_MOTIONS.length];
942
+ } else if (blockImages.length > 0) {
943
+ const img = blockImages[0];
944
+ usedImageSrcs.add(img.src);
945
+ if (!slide.accentImage) {
946
+ slide.accentImage = {
947
+ src: img.src,
948
+ alt: img.alt,
949
+ position: "left-strip",
950
+ ambientMotion: IMAGE_MOTIONS[motionIndex++ % IMAGE_MOTIONS.length]
951
+ };
952
+ }
953
+ }
954
+ slides.push(slide);
955
+ }
956
+ const unusedImages = allImages.filter((img) => !usedImageSrcs.has(img.src));
957
+ if (unusedImages.length > 0 && slides.length > 0) {
958
+ const interval = Math.max(2, Math.floor(slides.length / (unusedImages.length + 1)));
959
+ let insertOffset = 0;
960
+ for (let imgIdx = 0; imgIdx < unusedImages.length; imgIdx++) {
961
+ const insertAt = Math.min((imgIdx + 1) * interval + insertOffset, slides.length);
962
+ const img = unusedImages[imgIdx];
963
+ slides.splice(insertAt, 0, {
964
+ id: `img-interleave-${imgIdx}`,
965
+ template: "imageWithCaption",
966
+ duration: 5,
967
+ audioSegment: 0,
968
+ imageSrc: img.src,
969
+ imageAlt: img.alt,
970
+ ambientMotion: IMAGE_MOTIONS[motionIndex++ % IMAGE_MOTIONS.length],
971
+ transition: { type: "fade", duration: 0.5 }
972
+ });
973
+ insertOffset++;
974
+ }
975
+ }
976
+ let t = 0;
977
+ for (const slide of slides) {
978
+ slide.startTime = t;
979
+ t += slide.duration;
980
+ }
981
+ const audio = doc.audio?.segments?.length > 0 ? doc.audio : {
982
+ segments: t > 0 ? [{ src: "", name: "preview", duration: t, startTime: 0 }] : []
983
+ };
984
+ return {
985
+ // Preserve document-wide capabilities (custom themes, persistent layers,
986
+ // scheduled media, frontmatter, captions, and future schema fields).
987
+ // Preview preparation should replace only the slide/timing projection.
988
+ ...doc,
989
+ duration: t,
990
+ blocks: slides,
991
+ audio
992
+ };
993
+ }
994
+
665
995
  // src/doc/resolveDocTheme.ts
666
996
  function resolveThemeForDoc(doc, explicitId, registry) {
667
997
  const id = explicitId ?? doc?.themeId ?? readFrontmatterThemeId(doc?.frontmatter);
@@ -1149,6 +1479,13 @@ var PANEL_KINDS = /* @__PURE__ */ new Set([
1149
1479
  function isMermaidFence(node) {
1150
1480
  return node.type === "code" && node.lang?.trim().toLowerCase() === "mermaid";
1151
1481
  }
1482
+ function isWidgetFence(node, widgetFenceLangs) {
1483
+ if (isMermaidFence(node)) return true;
1484
+ if (!widgetFenceLangs || widgetFenceLangs.length === 0) return false;
1485
+ if (node.type !== "code") return false;
1486
+ const lang = node.lang?.trim().toLowerCase();
1487
+ return !!lang && widgetFenceLangs.includes(lang);
1488
+ }
1152
1489
  function htmlTreeContainsMedia(nodes) {
1153
1490
  for (const value of nodes) {
1154
1491
  if (!value || typeof value !== "object") continue;
@@ -1169,11 +1506,11 @@ function markdownNodeContainsMedia(value) {
1169
1506
  }
1170
1507
  return Array.isArray(node.children) && node.children.some(markdownNodeContainsMedia);
1171
1508
  }
1172
- function unconsumedRichContent(block, draft) {
1509
+ function unconsumedRichContent(block, draft, widgetFenceLangs) {
1173
1510
  if (!block.contents || block.contents.length === 0) return void 0;
1174
1511
  const templateHasMedia = Boolean(draft.slots.media) || Boolean(draft.slots.items?.some((item) => item.media !== void 0));
1175
1512
  const markdown = block.contents.filter(
1176
- (node) => isMermaidFence(node) || !templateHasMedia && markdownNodeContainsMedia(node)
1513
+ (node) => isWidgetFence(node, widgetFenceLangs) || !templateHasMedia && markdownNodeContainsMedia(node)
1177
1514
  );
1178
1515
  if (markdown.length === 0) return void 0;
1179
1516
  return {
@@ -1181,18 +1518,22 @@ function unconsumedRichContent(block, draft) {
1181
1518
  markdown
1182
1519
  };
1183
1520
  }
1184
- function preserveRichContent(block, draft) {
1185
- const richContent = unconsumedRichContent(block, draft);
1521
+ function preserveRichContent(block, draft, widgetFenceLangs) {
1522
+ const richContent = unconsumedRichContent(block, draft, widgetFenceLangs);
1186
1523
  return richContent ? { ...draft, slots: { ...draft.slots, richContent } } : draft;
1187
1524
  }
1188
- function draftForBlock(block, viewport, customTemplates) {
1525
+ function draftForBlock(block, viewport, customTemplates, widgetFenceLangs) {
1189
1526
  if (isTemplatedPageBlock(block)) {
1190
1527
  const resolved = resolvePageBlock(block);
1191
1528
  const templateName = resolved.templateName;
1192
1529
  const extractor = sectionExtractors[templateName];
1193
1530
  if (extractor) {
1194
1531
  return {
1195
- draft: preserveRichContent(block, extractor(resolved.templateBlock, { block, viewport })),
1532
+ draft: preserveRichContent(
1533
+ block,
1534
+ extractor(resolved.templateBlock, { block, viewport }),
1535
+ widgetFenceLangs
1536
+ ),
1196
1537
  source: "template",
1197
1538
  templateName
1198
1539
  };
@@ -1215,7 +1556,7 @@ function draftForBlock(block, viewport, customTemplates) {
1215
1556
  }
1216
1557
  };
1217
1558
  return {
1218
- draft: preserveRichContent(block, draft2),
1559
+ draft: preserveRichContent(block, draft2, widgetFenceLangs),
1219
1560
  source: "custom-template",
1220
1561
  templateName
1221
1562
  };
@@ -1237,7 +1578,7 @@ function draftForBlock(block, viewport, customTemplates) {
1237
1578
  emphasis: "quiet"
1238
1579
  };
1239
1580
  return {
1240
- draft: preserveRichContent(block, draft),
1581
+ draft: preserveRichContent(block, draft, widgetFenceLangs),
1241
1582
  source: "fallback",
1242
1583
  templateName,
1243
1584
  diagnostic
@@ -1257,7 +1598,7 @@ function draftForBlock(block, viewport, customTemplates) {
1257
1598
  }
1258
1599
  };
1259
1600
  return {
1260
- draft: preserveRichContent(block, draft),
1601
+ draft: preserveRichContent(block, draft, widgetFenceLangs),
1261
1602
  source: "authored"
1262
1603
  };
1263
1604
  }
@@ -1319,7 +1660,7 @@ function materializePageSection(block, options = {}) {
1319
1660
  const theme = options.theme ?? DEFAULT_THEME;
1320
1661
  const viewport = options.viewport ?? VIEWPORT_PRESETS.landscape;
1321
1662
  const pageStyle = resolvePageStyle(theme);
1322
- const result = draftForBlock(block, viewport, options.customTemplates);
1663
+ const result = draftForBlock(block, viewport, options.customTemplates, options.widgetFenceLangs);
1323
1664
  const override = overrideFor(pageStyle, result.draft.kind, result.templateName);
1324
1665
  const background = override?.background ?? (result.draft.mediaBackground ? "media" : "base");
1325
1666
  const emphasis = override?.emphasis ?? result.draft.emphasis ?? "standard";
@@ -1375,7 +1716,7 @@ function materializePageSections(doc, options = {}) {
1375
1716
  }
1376
1717
  const walk = (blocks, depth) => {
1377
1718
  for (const block of blocks) {
1378
- const result = draftForBlock(block, viewport, customTemplates);
1719
+ const result = draftForBlock(block, viewport, customTemplates, options.widgetFenceLangs);
1379
1720
  seeds.push({ ...result, block, depth });
1380
1721
  const consumed = result.draft.kind === "canvas-embed" && isContainerTemplate(result.templateName);
1381
1722
  if (!consumed && block.children && block.children.length > 0) {
@@ -1903,21 +2244,29 @@ var PAGE_BASE_CSS = `
1903
2244
  .squisq-page-items { list-style: none; margin: 0; padding: 0; counter-reset: squisq-item; max-width: 40em; }
1904
2245
  .squisq-page-items li {
1905
2246
  counter-increment: squisq-item;
1906
- position: relative;
1907
- padding: 0.9em 0 0.9em 3.4em;
2247
+ /* Grid + baseline alignment keeps the marker locked to the first text line
2248
+ regardless of marker size, body font, or line-height \u2014 an absolutely
2249
+ positioned marker with a fixed top offset drifts as soon as either
2250
+ changes. */
2251
+ display: grid;
2252
+ grid-template-columns: 3.4em 1fr;
2253
+ align-items: baseline;
2254
+ padding: 0.9em 0;
1908
2255
  font-size: 1.1rem;
1909
2256
  }
1910
2257
  .squisq-page-items li + li { border-top: 1px solid var(--squisq-page-divider-color); }
1911
2258
  .squisq-page-items li::before {
1912
2259
  content: counter(squisq-item, decimal-leading-zero);
1913
- position: absolute;
1914
- left: 0;
1915
- top: 0.85em;
1916
2260
  font-family: var(--squisq-page-title-font);
1917
2261
  font-weight: 700;
1918
2262
  color: var(--squisq-page-accent);
1919
2263
  font-size: 1.15em;
1920
2264
  }
2265
+ /* Item bodies are rendered markdown: neutralize UA paragraph margins (which
2266
+ would otherwise push the first line below the marker) and space blocks. */
2267
+ .squisq-page-item-body { min-width: 0; }
2268
+ .squisq-page-item-body > * { margin: 0; }
2269
+ .squisq-page-item-body > * + * { margin-top: 0.6em; }
1921
2270
  .squisq-page[data-numerals='mono'] .squisq-page-items li::before { font-family: var(--squisq-page-mono-font); }
1922
2271
  .squisq-page-items-title { font-size: 1.9rem; }
1923
2272
 
@@ -4017,6 +4366,8 @@ export {
4017
4366
  MAX_COVER_SLIDE_DURATION_SECONDS,
4018
4367
  resolveCoverSlideSettings,
4019
4368
  docToMarkdown,
4369
+ documentTitleFromFileName,
4370
+ buildPreviewDoc,
4020
4371
  resolveThemeForDoc,
4021
4372
  isTemplatedPageBlock,
4022
4373
  resolvePageBlock,
@@ -0,0 +1,8 @@
1
+ // src/fence/index.ts
2
+ function fenceRendererLangs(renderers) {
3
+ return renderers ? Object.keys(renderers).map((lang) => lang.trim().toLowerCase()) : [];
4
+ }
5
+
6
+ export {
7
+ fenceRendererLangs
8
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  expectedSyllablesAt,
3
3
  wordPosAtExpectedSyllables
4
- } from "./chunk-GSJEGMKF.js";
4
+ } from "./chunk-ENNNQIYV.js";
5
5
 
6
6
  // src/narration/types.ts
7
7
  var DEFAULT_FEATURE_CONFIG = Object.freeze({
@@ -2,8 +2,8 @@ import { bb as TemplateBlock, bc as TemplateContext, a3 as Layer, w as CustomTem
2
2
  export { T as FRONTMATTER_CUSTOM_TEMPLATES_KEY, U as FRONTMATTER_CUSTOM_THEMES_KEY, a5 as LayoutHints, aY as RenderStyle, bi as ThemeColorPalette, bo as ThemeStyle, bp as ThemeTypography, bC as VIEWPORT_PRESETS, bN as ViewportPreset, bS as createTemplateContext, bZ as getLayoutHints, c0 as getTwoColumnPositions, c1 as getViewport, c2 as getViewportOrientation, c5 as isTemplateBlock, c8 as scaledFontSize } from '../Doc-DBadkoP4.js';
3
3
  import { L as MarkdownNode, a3 as TransitionType, a2 as TransitionDirection, M as MarkdownBlockNode, r as MarkdownHeading, n as MarkdownDocument, T as MarkdownTable, i as MarkdownCodeBlock, G as MarkdownList } from '../types-CcrDFdWH.js';
4
4
  import { C as CoercedBlockMeta } from '../annotationCoercion-CPHEggo3.js';
5
- import { c as PageSection } from '../materializePageSection-DgOFYge7.js';
6
- export { M as MaterializePageSectionOptions, a as MaterializePageSectionsOptions, P as PageMedia, b as PageRichText, d as PageSectionDiagnostic, e as PageSectionItem, f as PageSectionMaterialization, g as PageSectionSource, h as PageSpatialKind, i as PageTransformHints, m as materializePageSection, j as materializePageSections, r as resolvePageStyle } from '../materializePageSection-DgOFYge7.js';
5
+ import { c as PageSection } from '../materializePageSection-Rss5thAj.js';
6
+ export { M as MaterializePageSectionOptions, a as MaterializePageSectionsOptions, P as PageMedia, b as PageRichText, d as PageSectionDiagnostic, e as PageSectionItem, f as PageSectionMaterialization, g as PageSectionSource, h as PageSpatialKind, i as PageTransformHints, m as materializePageSection, j as materializePageSections, r as resolvePageStyle } from '../materializePageSection-Rss5thAj.js';
7
7
  import { C as ContentContainer } from '../ContentContainer-B2w9sUoL.js';
8
8
  export { D as DEFAULT_THEME, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from '../themeLibrary-8BQMY2HV.js';
9
9
 
@@ -1589,6 +1589,16 @@ interface ExpandDocBlocksOptions {
1589
1589
  * defaults to `true` to preserve video/narration pacing.
1590
1590
  */
1591
1591
  splitLongBlocks?: boolean;
1592
+ /**
1593
+ * Merge blocks whose *scheduled* duration falls under the ~5s minimum
1594
+ * transition gap into their predecessor, and drop trailing blocks that would
1595
+ * start just before a segment boundary. That pacing rule keeps timed playback
1596
+ * from flashing slides, but it REMOVES authored blocks from the sequence.
1597
+ * Discrete-slide consumers (the PPTX exporter) pass `false` so every authored
1598
+ * slide survives into the deck. Only affects the audio-timed path; defaults to
1599
+ * `true` to preserve video/narration pacing.
1600
+ */
1601
+ mergeShortBlocks?: boolean;
1592
1602
  /**
1593
1603
  * User-defined custom templates to merge onto the built-in registry
1594
1604
  * before expanding blocks. Typically passed straight from
@@ -2093,6 +2103,50 @@ interface DocToMarkdownOptions {
2093
2103
  */
2094
2104
  declare function docToMarkdown(doc: Doc, options?: DocToMarkdownOptions): MarkdownDocument;
2095
2105
 
2106
+ /**
2107
+ * buildPreviewDoc — Converts a markdown-derived Doc into a player-ready Doc
2108
+ * with TemplateBlock slides and interleaved images.
2109
+ *
2110
+ * This is THE canonical slideshow projection: the editor's live preview, the
2111
+ * HTML slideshow export, and the PPTX exporter all run a doc through here so
2112
+ * the slide sequence cannot drift by consumer. It is the slide-mode sibling of
2113
+ * `materializePageSections` (page mode) and lives in core for the same reason —
2114
+ * exporters must be able to reach it without depending on a React package.
2115
+ *
2116
+ * Pipeline:
2117
+ * 1. Flatten hierarchical blocks into a linear slide sequence
2118
+ * 2. Convert each block into a TemplateBlock-compatible object
2119
+ * 3. Interleave images as standalone imageWithCaption slides
2120
+ * 4. Synthesize a dummy audio segment for timer-based playback
2121
+ */
2122
+
2123
+ /**
2124
+ * Build a player-ready Doc from a markdown-derived Doc.
2125
+ *
2126
+ * Flattens hierarchical blocks, converts each to a TemplateBlock-compatible
2127
+ * slide, interleaves images, recalculates timing, and adds a synthetic
2128
+ * audio segment.
2129
+ */
2130
+ interface BuildPreviewDocOptions {
2131
+ /**
2132
+ * Human-facing title to use as the header of the leading heading-less
2133
+ * "preamble" block when the document has no frontmatter `title:`. Hosts
2134
+ * typically pass the file name (extension stripped) via
2135
+ * {@link documentTitleFromFileName}. When neither this nor a frontmatter
2136
+ * title is present, the preamble simply renders with no header rather than
2137
+ * the placeholder block id.
2138
+ */
2139
+ documentTitle?: string;
2140
+ }
2141
+ /**
2142
+ * Derive a display title from a file name: strip any directory prefix and the
2143
+ * trailing extension (`docs/Longview Plan.md` → `Longview Plan`). Returns an
2144
+ * empty string for an absent/blank name so callers can pass the result through
2145
+ * without extra guards.
2146
+ */
2147
+ declare function documentTitleFromFileName(fileName?: string): string;
2148
+ declare function buildPreviewDoc(doc: Doc, options?: BuildPreviewDocOptions): Doc;
2149
+
2096
2150
  /**
2097
2151
  * Frontmatter serialization for user-defined custom templates (layouts).
2098
2152
  *
@@ -2355,7 +2409,7 @@ declare function pageStyleDataAttributes(pageStyle: ThemePageStyle): Record<stri
2355
2409
  * Structural, theme-independent stylesheet for the page rendition.
2356
2410
  * Everything is scoped under `.squisq-page`.
2357
2411
  */
2358
- declare const PAGE_BASE_CSS = "\n/* \u2500\u2500 Base \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page {\n background: var(--squisq-page-bg);\n color: var(--squisq-page-text);\n font-family: var(--squisq-page-body-font);\n line-height: var(--squisq-page-line-height);\n --squisq-page-divider-color: color-mix(in srgb, var(--squisq-page-text) 16%, transparent);\n --squisq-page-section-pad: 3.5rem;\n --squisq-page-shadow: none;\n}\n.squisq-page *, .squisq-page *::before, .squisq-page *::after { box-sizing: border-box; }\n.squisq-page img { max-width: 100%; height: auto; }\n.squisq-page a {\n color: var(--squisq-page-primary);\n text-decoration-color: color-mix(in srgb, var(--squisq-page-primary) 40%, transparent);\n}\n\n/* Page pattern washes (very low intensity) */\n.squisq-page[data-pattern='dots'] {\n background-image: radial-gradient(color-mix(in srgb, var(--squisq-page-text) 7%, transparent) 1px, transparent 1px);\n background-size: 22px 22px;\n}\n.squisq-page[data-pattern='grid'] {\n background-image:\n linear-gradient(color-mix(in srgb, var(--squisq-page-primary) 7%, transparent) 1px, transparent 1px),\n linear-gradient(90deg, color-mix(in srgb, var(--squisq-page-primary) 7%, transparent) 1px, transparent 1px);\n background-size: 44px 44px;\n}\n.squisq-page[data-pattern='diagonal'] {\n background-image: repeating-linear-gradient(\n -45deg,\n color-mix(in srgb, var(--squisq-page-text) 4%, transparent) 0 1px,\n transparent 1px 14px\n );\n}\n.squisq-page[data-pattern='noise'] { background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E\"); }\n\n/* Spacing scale */\n.squisq-page[data-spacing='compact'] { --squisq-page-section-pad: 2.25rem; }\n.squisq-page[data-spacing='comfortable'] { --squisq-page-section-pad: 3.5rem; }\n.squisq-page[data-spacing='generous'] { --squisq-page-section-pad: 5.25rem; }\n\n/* Shadow language */\n.squisq-page[data-shadow='soft'] { --squisq-page-shadow: 0 14px 36px color-mix(in srgb, var(--squisq-page-text) 14%, transparent); }\n.squisq-page[data-shadow='crisp'] { --squisq-page-shadow: 0 2px 10px color-mix(in srgb, var(--squisq-page-text) 26%, transparent); }\n.squisq-page[data-shadow='heavy'] { --squisq-page-shadow: 10px 10px 0 color-mix(in srgb, var(--squisq-page-text) 82%, transparent); }\n\n/* \u2500\u2500 Sections \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section { position: relative; padding-block: var(--squisq-page-section-pad); }\n.squisq-page-section-inner {\n max-width: var(--squisq-page-content-max);\n margin-inline: auto;\n padding-inline: 24px;\n}\n/* Backdrops anchor to the section; these content roots stack above them. */\n.squisq-page-hero-body,\n.squisq-page-banner-body,\n.squisq-page-quote-figure { position: relative; }\n.squisq-page-section--feature-split .squisq-page-section-inner,\n.squisq-page-section--gallery .squisq-page-section-inner,\n.squisq-page-section--table-section .squisq-page-section-inner,\n.squisq-page-section--canvas-embed .squisq-page-section-inner,\n.squisq-page-section--stat-band .squisq-page-section-inner,\n.squisq-page-section--card-grid .squisq-page-section-inner,\n.squisq-page-section--media-figure .squisq-page-section-inner,\n.squisq-page-section--hero .squisq-page-section-inner {\n max-width: var(--squisq-page-wide-max);\n}\n\n/* Background rhythm */\n.squisq-page-section--bg-alternate { background: var(--squisq-page-bg-alt); }\n.squisq-page-section--bg-accent {\n background: var(--squisq-page-accent-bg);\n color: var(--squisq-page-accent-text);\n}\n.squisq-page-section--bg-media { color: #ffffff; }\n\n/* Dividers between adjacent sections */\n.squisq-page[data-divider='hairline'] .squisq-page-section + .squisq-page-section { border-top: 1px solid var(--squisq-page-divider-color); }\n.squisq-page[data-divider='thick-rule'] .squisq-page-section + .squisq-page-section { border-top: 3px solid var(--squisq-page-primary); }\n.squisq-page[data-divider='double-rule'] .squisq-page-section + .squisq-page-section { border-top: 4px double var(--squisq-page-divider-color); }\n.squisq-page[data-divider='dotted'] .squisq-page-section + .squisq-page-section { border-top: 2px dotted var(--squisq-page-divider-color); }\n/* Banded sections carry their own edges; media sections never need rules. */\n.squisq-page .squisq-page-section--bg-media,\n.squisq-page .squisq-page-section--bg-media + .squisq-page-section,\n.squisq-page .squisq-page-section--timeline-rail + .squisq-page-section--timeline-rail { border-top: none; }\n\n/* \u2500\u2500 Headings, eyebrows \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section-title {\n font-family: var(--squisq-page-title-font);\n font-weight: var(--squisq-page-title-weight);\n line-height: 1.15;\n margin: 0 0 0.5em;\n}\n.squisq-page[data-heading-case='uppercase'] .squisq-page-section-title { text-transform: uppercase; letter-spacing: 0.03em; }\n.squisq-page[data-underline='accent-bar'] .squisq-page-section-title::after {\n content: '';\n display: block;\n width: 56px;\n height: 4px;\n margin-top: 0.4em;\n border-radius: 2px;\n background: var(--squisq-page-accent);\n}\n.squisq-page[data-underline='full-rule'] .squisq-page-section-title {\n border-bottom: 1px solid var(--squisq-page-divider-color);\n padding-bottom: 0.35em;\n}\n\n.squisq-page-eyebrow {\n display: block;\n font-size: 0.8125rem;\n font-weight: 600;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n color: var(--squisq-page-accent);\n margin: 0 0 0.9em;\n}\n.squisq-page[data-eyebrow='numbered'] .squisq-page-eyebrow::after { content: ' \u2014'; color: var(--squisq-page-text-muted); }\n.squisq-page[data-eyebrow='mono-tag'] .squisq-page-eyebrow {\n display: inline-block;\n font-family: var(--squisq-page-mono-font);\n text-transform: none;\n letter-spacing: 0.06em;\n border: 1px solid color-mix(in srgb, var(--squisq-page-accent) 55%, transparent);\n border-radius: var(--squisq-page-radius);\n padding: 0.15em 0.6em;\n background: color-mix(in srgb, var(--squisq-page-accent) 10%, transparent);\n}\n.squisq-page[data-eyebrow='mono-tag'] .squisq-page-eyebrow::before { content: '['; opacity: 0.6; }\n.squisq-page[data-eyebrow='mono-tag'] .squisq-page-eyebrow::after { content: ']'; opacity: 0.6; }\n\n/* \u2500\u2500 Hero \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section--hero { padding-block: calc(var(--squisq-page-section-pad) * 1.5); }\n.squisq-page-hero-title {\n font-family: var(--squisq-page-title-font);\n font-weight: var(--squisq-page-title-weight);\n line-height: 1.08;\n margin: 0;\n font-size: 2.75rem;\n}\n.squisq-page[data-heading-scale='display'] .squisq-page-hero-title { font-size: 3.4rem; }\n.squisq-page[data-heading-scale='oversized'] .squisq-page-hero-title { font-size: 4rem; font-size: clamp(3rem, 9cqw, 6rem); line-height: 1.02; }\n.squisq-page[data-heading-case='uppercase'] .squisq-page-hero-title { text-transform: uppercase; letter-spacing: 0.02em; }\n.squisq-page-hero-subtitle {\n margin: 1.1em 0 0;\n font-size: 1.25rem;\n color: var(--squisq-page-text-muted);\n max-width: 42em;\n white-space: pre-line;\n}\n.squisq-page-section--bg-media .squisq-page-hero-subtitle { color: rgba(255, 255, 255, 0.88); }\n\n/* Stacked (default): centered column */\n.squisq-page[data-hero-style='stacked'] .squisq-page-hero-body { text-align: center; }\n.squisq-page[data-hero-style='stacked'] .squisq-page-hero-subtitle { margin-inline: auto; }\n\n/* Oversized type: hard left, no decoration */\n.squisq-page[data-hero-style='oversized-type'] .squisq-page-hero-title { font-size: 4.25rem; font-size: clamp(3.25rem, 10cqw, 6.5rem); line-height: 0.98; }\n\n/* Split: text and media side by side */\n.squisq-page-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }\n.squisq-page-hero-grid .squisq-page-hero-media img { width: 100%; object-fit: cover; }\n\n/* Full-bleed & letterbox: media behind text */\n.squisq-page-section--hero-media {\n padding-block: 0;\n min-height: min(72svh, 620px);\n display: flex;\n align-items: flex-end;\n}\n.squisq-page[data-hero-style='letterbox'] .squisq-page-section--hero-media { min-height: min(52svh, 460px); }\n.squisq-page-hero-backdrop { position: absolute; inset: 0; overflow: hidden; }\n.squisq-page-hero-backdrop img { width: 100%; height: 100%; object-fit: cover; }\n.squisq-page-hero-backdrop::after {\n content: '';\n position: absolute;\n inset: 0;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0.68) 100%);\n}\n.squisq-page[data-hero-style='letterbox'] .squisq-page-hero-backdrop img { filter: saturate(0.9); }\n.squisq-page-section--hero-media .squisq-page-section-inner { padding-block: 3rem; width: 100%; }\n\n/* \u2500\u2500 Banner (sectionHeader) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-banner-title { font-size: 2rem; }\n.squisq-page[data-heading-scale='display'] .squisq-page-banner-title { font-size: 2.5rem; }\n.squisq-page[data-heading-scale='oversized'] .squisq-page-banner-title { font-size: 3rem; font-size: clamp(2.25rem, 6cqw, 3.75rem); }\n.squisq-page-section--banner.squisq-page-section--bg-media { padding-block: 0; min-height: 280px; display: flex; align-items: flex-end; }\n.squisq-page-section--banner.squisq-page-section--bg-media .squisq-page-section-inner { padding-block: 2rem; width: 100%; }\n.squisq-page-section--banner .squisq-page-section-title { margin-bottom: 0; }\n\n/* \u2500\u2500 Stat band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-stats { display: flex; gap: 3rem; justify-content: center; text-align: center; flex-wrap: wrap; }\n.squisq-page-stat { flex: 1 1 220px; max-width: 420px; }\n.squisq-page-stat-value {\n display: block;\n font-family: var(--squisq-page-title-font);\n font-weight: 700;\n font-size: 3.25rem;\n line-height: 1;\n color: var(--squisq-page-accent);\n}\n.squisq-page[data-numerals='oversized'] .squisq-page-stat-value { font-size: 4.5rem; font-size: clamp(3.5rem, 8cqw, 5.5rem); }\n.squisq-page[data-numerals='mono'] .squisq-page-stat-value { font-family: var(--squisq-page-mono-font); letter-spacing: -0.02em; }\n.squisq-page[data-numerals='boxed'] .squisq-page-stat-value {\n display: inline-block;\n border: 2px solid var(--squisq-page-accent);\n border-radius: var(--squisq-page-radius);\n padding: 0.18em 0.4em;\n}\n.squisq-page-stat-title { display: block; margin-top: 0.9em; font-size: 1.125rem; font-weight: 600; }\n.squisq-page-stat-body { display: block; margin-top: 0.45em; color: var(--squisq-page-text-muted); font-size: 0.95rem; }\n.squisq-page-stat-meta { text-align: center; margin-top: 1.5rem; color: var(--squisq-page-text-muted); font-size: 0.85rem; }\n.squisq-page-stat-bar { height: 10px; border-radius: 999px; background: var(--squisq-page-accent); margin-top: 0.8em; }\n.squisq-page-stat--bars { text-align: left; }\n\n/* \u2500\u2500 Quote band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-quote {\n margin: 0;\n font-family: var(--squisq-page-title-font);\n font-size: 1.6rem;\n line-height: 1.35;\n white-space: pre-line;\n}\n.squisq-page-section--em-strong .squisq-page-quote { font-size: 2.1rem; }\n.squisq-page-section--em-quiet .squisq-page-quote { font-size: 1.25rem; color: var(--squisq-page-text-muted); }\n.squisq-page-quote-attribution { margin-top: 1.1em; font-family: var(--squisq-page-body-font); font-size: 0.95rem; color: var(--squisq-page-text-muted); }\n.squisq-page-quote-attribution::before { content: '\u2014 '; }\n.squisq-page[data-quote-mark='accent-bar'] .squisq-page-quote-figure { border-left: 4px solid var(--squisq-page-accent); padding-left: 1.5rem; }\n.squisq-page[data-quote-mark='oversized-glyph'] .squisq-page-quote-figure { position: relative; padding-top: 1.25rem; }\n.squisq-page[data-quote-mark='oversized-glyph'] .squisq-page-quote-figure::before {\n content: '\\201C';\n position: absolute;\n top: -0.12em;\n left: -0.05em;\n font-family: var(--squisq-page-title-font);\n font-size: 5.5rem;\n line-height: 1;\n color: color-mix(in srgb, var(--squisq-page-accent) 42%, transparent);\n pointer-events: none;\n}\n.squisq-page-section--v-display .squisq-page-quote-figure { text-align: center; border-left: none; }\n.squisq-page-section--v-display .squisq-page-quote { font-size: 2.4rem; font-size: clamp(1.9rem, 5cqw, 3rem); }\n.squisq-page-section--v-editorial .squisq-page-quote-figure {\n border-block: 3px solid var(--squisq-page-primary);\n border-left: none;\n padding: 2rem 0.5rem;\n}\n/* Full-bleed quote over media */\n.squisq-page-section--quote-band.squisq-page-section--bg-media { padding-block: 0; min-height: 380px; display: flex; align-items: center; }\n.squisq-page-section--quote-band.squisq-page-section--bg-media .squisq-page-section-inner { padding-block: 3.5rem; }\n.squisq-page-quote-backdrop { position: absolute; inset: 0; overflow: hidden; }\n.squisq-page-quote-backdrop img, .squisq-page-quote-backdrop video { width: 100%; height: 100%; object-fit: cover; }\n.squisq-page-quote-backdrop::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }\n.squisq-page-section--quote-band[data-hint-vignette] .squisq-page-quote-backdrop::after {\n background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.75) 100%);\n}\n.squisq-page-section--quote-band.squisq-page-section--bg-media .squisq-page-quote-figure { border: none; text-align: center; }\n\n/* \u2500\u2500 Feature split \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }\n.squisq-page-feature--media-right .squisq-page-feature-media { order: 2; }\n.squisq-page-feature-media img { width: 100%; object-fit: cover; }\n.squisq-page-feature-title { font-size: 1.75rem; }\n.squisq-page-feature-body { color: var(--squisq-page-text-muted); font-size: 1.05rem; white-space: pre-line; margin: 0; }\n\n/* \u2500\u2500 Media figure \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-figure { margin: 0; }\n.squisq-page-figure img, .squisq-page-figure video { width: 100%; display: block; }\n.squisq-page-figure figcaption { margin-top: 0.9em; font-size: 0.9rem; color: var(--squisq-page-text-muted); text-align: center; }\n.squisq-page-media-credit { font-size: 0.78rem; opacity: 0.75; }\n\n/* Media frame treatment (figures, features, gallery tiles, cards) */\n.squisq-page-media-frame { overflow: hidden; }\n.squisq-page[data-framing='rounded'] .squisq-page-media-frame { border-radius: var(--squisq-page-radius); }\n.squisq-page[data-framing='bordered'] .squisq-page-media-frame { border: 3px solid var(--squisq-page-text); }\n.squisq-page[data-framing='polaroid'] .squisq-page-media-frame {\n background: #ffffff;\n padding: 10px 10px 16px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n border-radius: 2px;\n}\n.squisq-page[data-framing='letterboxed'] .squisq-page-media-frame img { aspect-ratio: 21 / 9; object-fit: cover; }\n.squisq-page[data-framing='circle-accent'] .squisq-page-media-frame { border-radius: calc(var(--squisq-page-radius) * 2); }\n.squisq-page .squisq-page-media-frame { box-shadow: var(--squisq-page-shadow); }\n\n/* Rich body nodes that the selected template did not consume. This universal\n * supplement keeps diagrams/media visible without making every template\n * duplicate the same preservation logic. */\n.squisq-page-rich-content {\n margin-top: clamp(1.5rem, 4vw, 3rem);\n padding-top: clamp(1.25rem, 3vw, 2rem);\n border-top: 1px solid var(--squisq-page-divider-color);\n}\n.squisq-page-rich-content :is(img, video) { display: block; max-width: 100%; height: auto; margin-inline: auto; }\n.squisq-page-rich-content .squisq-md-mermaid { min-height: min(520px, 62vh); margin-block: 0; }\n\n/* \u2500\u2500 Gallery \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }\n.squisq-page-gallery .squisq-page-media-frame img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }\n.squisq-page-gallery-caption { margin-top: 1.1rem; text-align: center; font-size: 0.9rem; color: var(--squisq-page-text-muted); }\n\n/* \u2500\u2500 Callout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-callout {\n border-radius: var(--squisq-page-radius);\n border: 1px solid color-mix(in srgb, var(--squisq-page-accent) 32%, transparent);\n border-left: 5px solid var(--squisq-page-accent);\n background: color-mix(in srgb, var(--squisq-page-accent) 7%, var(--squisq-page-bg));\n padding: 1.75rem 2rem;\n box-shadow: var(--squisq-page-shadow);\n display: flex;\n gap: 1.75rem;\n align-items: flex-start;\n}\n.squisq-page-callout-title { font-family: var(--squisq-page-title-font); font-size: 1.35rem; font-weight: 700; margin: 0 0 0.5em; }\n.squisq-page-callout-body { margin: 0; white-space: pre-line; }\n.squisq-page-callout-meta { margin-top: 0.9em; font-size: 0.82rem; color: var(--squisq-page-text-muted); }\n.squisq-page-callout .squisq-page-media-frame { flex: 0 0 132px; }\n.squisq-page-callout .squisq-page-media-frame img { width: 132px; height: 132px; object-fit: cover; }\n.squisq-page-callout[data-hint-framing='circle-accent'] .squisq-page-media-frame,\n.squisq-page-callout[data-hint-framing='circle-accent'] .squisq-page-media-frame img { border-radius: 50%; }\n.squisq-page-section--v-definition .squisq-page-callout-title { font-style: italic; }\n.squisq-page-section--v-diagnostic .squisq-page-callout { border-left-color: var(--squisq-page-highlight); }\n\n/* \u2500\u2500 Card grid \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }\n.squisq-page-card {\n border-radius: var(--squisq-page-radius);\n background: var(--squisq-page-bg-alt);\n border-top: 4px solid var(--squisq-page-card-accent, var(--squisq-page-accent));\n padding: 1.75rem 1.75rem 1.9rem;\n box-shadow: var(--squisq-page-shadow);\n}\n.squisq-page-card-title { font-family: var(--squisq-page-title-font); font-size: 1.3rem; margin: 0 0 0.4em; }\n.squisq-page-card-body { margin: 0; color: var(--squisq-page-text-muted); white-space: pre-line; }\n.squisq-page-cards-title { text-align: center; font-size: 1.9rem; margin-bottom: 1.75rem; }\n\n/* \u2500\u2500 Item list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-items { list-style: none; margin: 0; padding: 0; counter-reset: squisq-item; max-width: 40em; }\n.squisq-page-items li {\n counter-increment: squisq-item;\n position: relative;\n padding: 0.9em 0 0.9em 3.4em;\n font-size: 1.1rem;\n}\n.squisq-page-items li + li { border-top: 1px solid var(--squisq-page-divider-color); }\n.squisq-page-items li::before {\n content: counter(squisq-item, decimal-leading-zero);\n position: absolute;\n left: 0;\n top: 0.85em;\n font-family: var(--squisq-page-title-font);\n font-weight: 700;\n color: var(--squisq-page-accent);\n font-size: 1.15em;\n}\n.squisq-page[data-numerals='mono'] .squisq-page-items li::before { font-family: var(--squisq-page-mono-font); }\n.squisq-page-items-title { font-size: 1.9rem; }\n\n/* \u2500\u2500 Timeline rail (dateEvent) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section--timeline-rail { padding-block: 1.4rem; }\n.squisq-page-section--timeline-rail:first-child { padding-top: var(--squisq-page-section-pad); }\n.squisq-page-milestone { display: grid; grid-template-columns: 150px 1fr; gap: 2rem; align-items: baseline; position: relative; }\n.squisq-page-milestone-date {\n font-family: var(--squisq-page-title-font);\n font-weight: 700;\n color: var(--squisq-page-accent);\n font-size: 1.05rem;\n text-align: right;\n}\n.squisq-page-milestone-rail {\n position: absolute;\n left: 166px;\n top: -1.4rem;\n bottom: -1.4rem;\n width: 2px;\n background: color-mix(in srgb, var(--squisq-page-accent) 35%, transparent);\n}\n.squisq-page-milestone-rail::after {\n content: '';\n position: absolute;\n left: 50%;\n top: 0.55em;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n transform: translateX(-50%);\n background: var(--squisq-page-accent);\n border: 2px solid var(--squisq-page-bg);\n}\n.squisq-page-milestone-body { padding-left: 2.25rem; white-space: pre-line; }\n.squisq-page-milestone-footer { margin-top: 0.5em; font-size: 0.85rem; color: var(--squisq-page-text-muted); }\n\n/* \u2500\u2500 Table section \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-table-title { font-size: 1.9rem; }\n.squisq-page-table-scroll { overflow-x: auto; border-radius: var(--squisq-page-radius); box-shadow: var(--squisq-page-shadow); }\n.squisq-page-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }\n.squisq-page-table th {\n background: var(--squisq-page-accent-bg);\n color: var(--squisq-page-accent-text);\n font-family: var(--squisq-page-title-font);\n text-align: left;\n padding: 0.8em 1em;\n}\n.squisq-page-table td { padding: 0.7em 1em; border-top: 1px solid var(--squisq-page-divider-color); }\n.squisq-page-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--squisq-page-text) 3.5%, transparent); }\n\n/* \u2500\u2500 Canvas embed (spatial SVG) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-canvas {\n width: 100%;\n margin-inline: auto;\n overflow: hidden;\n border-radius: var(--squisq-page-radius);\n}\n.squisq-page-canvas svg { display: block; width: 100%; height: 100%; }\n.squisq-page-canvas--framed { border: 1px solid var(--squisq-page-divider-color); box-shadow: var(--squisq-page-shadow); }\n.squisq-page-canvas--terminal { border: 1px solid color-mix(in srgb, var(--squisq-page-accent) 45%, transparent); }\n.squisq-page-canvas--terminal::before {\n content: '\\25CF \\25CF \\25CF';\n display: block;\n font-size: 9px;\n letter-spacing: 4px;\n padding: 6px 12px;\n color: color-mix(in srgb, var(--squisq-page-accent) 70%, transparent);\n background: color-mix(in srgb, var(--squisq-page-accent) 9%, var(--squisq-page-bg));\n border-bottom: 1px solid color-mix(in srgb, var(--squisq-page-accent) 30%, transparent);\n}\n\n/* \u2500\u2500 Prose \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section--prose { padding-block: calc(var(--squisq-page-section-pad) * 0.45); }\n.squisq-page[data-divider] .squisq-page-section--prose + .squisq-page-section--prose { border-top: none; }\n.squisq-page-prose { font-size: 1.05rem; }\n.squisq-page-prose p { margin: 0; }\n.squisq-page-prose p + p { margin-top: 1.25em; }\n.squisq-page-prose > * + * { margin-top: 1.1em; }\n.squisq-page-prose code { font-family: var(--squisq-page-mono-font); font-size: 0.9em; }\n.squisq-page-prose :not(pre) > code { background: color-mix(in srgb, var(--squisq-page-text) 8%, transparent); border-radius: 4px; padding: 0.12em 0.35em; }\n.squisq-page-prose pre { background: color-mix(in srgb, var(--squisq-page-text) 6%, transparent); border-radius: var(--squisq-page-radius); padding: 1em 1.25em; overflow-x: auto; }\n.squisq-page-prose pre code { background: none; border-radius: 0; padding: 0; }\n.squisq-page .squisq-md-code-frame { position: relative; margin: 1em 0; }\n.squisq-page .squisq-md-code-frame > pre { margin: 0; padding-right: 5rem; }\n.squisq-page .squisq-md-code-copy {\n position: absolute;\n z-index: 1;\n top: 0.55rem;\n right: 0.55rem;\n min-width: 3.7rem;\n padding: 0.28rem 0.5rem;\n border: 1px solid color-mix(in srgb, var(--squisq-page-text) 20%, transparent);\n border-radius: 5px;\n background: color-mix(in srgb, var(--squisq-page-bg) 90%, transparent);\n color: inherit;\n font: 500 0.72rem/1.2 system-ui, sans-serif;\n cursor: pointer;\n opacity: 0.58;\n transition: opacity 120ms ease, background-color 120ms ease;\n}\n.squisq-page .squisq-md-code-frame:hover > .squisq-md-code-copy,\n.squisq-page .squisq-md-code-copy:focus-visible,\n.squisq-page .squisq-md-code-copy[data-copy-state='copied'],\n.squisq-page .squisq-md-code-copy[data-copy-state='failed'] { opacity: 1; }\n.squisq-page .squisq-md-code-copy:hover { background: var(--squisq-page-bg); }\n.squisq-page .squisq-md-code-copy:disabled { cursor: wait; }\n.squisq-page-prose blockquote { margin: 0; border-left: 4px solid var(--squisq-page-accent); padding-left: 1.25em; color: var(--squisq-page-text-muted); }\n.squisq-page-prose ul, .squisq-page-prose ol { padding-left: 1.5em; margin: 0; }\n.squisq-page-prose li + li { margin-top: 0.4em; }\n.squisq-page-prose hr { border: none; border-top: 1px solid var(--squisq-page-divider-color); }\n.squisq-page-prose table { width: 100%; border-collapse: collapse; }\n.squisq-page-prose th { font-family: var(--squisq-page-title-font); text-align: left; padding: 0.6em 0.8em; border-bottom: 2px solid var(--squisq-page-divider-color); }\n.squisq-page-prose td { padding: 0.55em 0.8em; border-bottom: 1px solid var(--squisq-page-divider-color); }\n.squisq-page-prose img { border-radius: var(--squisq-page-radius); }\n.squisq-page-prose h1, .squisq-page-prose h2, .squisq-page-prose h3,\n.squisq-page-prose h4, .squisq-page-prose h5, .squisq-page-prose h6 {\n font-family: var(--squisq-page-title-font);\n font-weight: var(--squisq-page-title-weight);\n line-height: 1.2;\n margin: 0 0 0.45em;\n}\n.squisq-page-prose h1 { font-size: 2.1rem; }\n.squisq-page-prose h2 { font-size: 1.65rem; }\n.squisq-page-prose h3 { font-size: 1.35rem; }\n.squisq-page-prose h4, .squisq-page-prose h5, .squisq-page-prose h6 { font-size: 1.15rem; }\n.squisq-page-section--prose[data-hint-drop-cap] .squisq-page-prose > p:first-child::first-letter {\n font-family: var(--squisq-page-title-font);\n font-size: 3.4em;\n font-weight: 700;\n float: left;\n line-height: 0.85;\n padding-right: 0.12em;\n color: var(--squisq-page-accent);\n}\n\n/* \u2500\u2500 Footer band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section--footer { text-align: center; }\n\n/* \u2500\u2500 Thin-margin embedding (chat bubbles) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page--thin .squisq-page-section-inner { padding-inline: 0; }\n.squisq-page--thin .squisq-page-section { padding-block: 1.5rem; }\n\n/* Thumbnail image mode */\n.squisq-page--thumbnail-images .squisq-page-prose img,\n.squisq-page--thumbnail-images .squisq-page-figure img { max-width: 100px; max-height: 100px; object-fit: cover; }\n\n/* \u2500\u2500 Reveal animation (progressive enhancement) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n@media (prefers-reduced-motion: no-preference) {\n .squisq-page-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }\n .squisq-page-reveal--in { opacity: 1; transform: none; }\n}\n\n/* \u2500\u2500 Responsive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n@container squisq-page (max-width: 720px) {\n\n.squisq-page-hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }\n.squisq-page-feature { grid-template-columns: 1fr; }\n.squisq-page-feature--media-right .squisq-page-feature-media { order: 0; }\n.squisq-page-stats { flex-direction: column; gap: 1.75rem; }\n.squisq-page-cards { grid-template-columns: 1fr; }\n.squisq-page-gallery { grid-template-columns: repeat(2, 1fr); }\n.squisq-page-milestone { grid-template-columns: 1fr; gap: 0.5rem; }\n.squisq-page-milestone-rail { display: none; }\n.squisq-page-section-inner { padding-inline: 18px; }\n\n}\n@supports not (container-type: inline-size) {\n @media (max-width: 720px) {\n\n.squisq-page-hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }\n.squisq-page-feature { grid-template-columns: 1fr; }\n.squisq-page-feature--media-right .squisq-page-feature-media { order: 0; }\n.squisq-page-stats { flex-direction: column; gap: 1.75rem; }\n.squisq-page-cards { grid-template-columns: 1fr; }\n.squisq-page-gallery { grid-template-columns: repeat(2, 1fr); }\n.squisq-page-milestone { grid-template-columns: 1fr; gap: 0.5rem; }\n.squisq-page-milestone-rail { display: none; }\n.squisq-page-section-inner { padding-inline: 18px; }\n\n }\n}\n";
2412
+ declare const PAGE_BASE_CSS = "\n/* \u2500\u2500 Base \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page {\n background: var(--squisq-page-bg);\n color: var(--squisq-page-text);\n font-family: var(--squisq-page-body-font);\n line-height: var(--squisq-page-line-height);\n --squisq-page-divider-color: color-mix(in srgb, var(--squisq-page-text) 16%, transparent);\n --squisq-page-section-pad: 3.5rem;\n --squisq-page-shadow: none;\n}\n.squisq-page *, .squisq-page *::before, .squisq-page *::after { box-sizing: border-box; }\n.squisq-page img { max-width: 100%; height: auto; }\n.squisq-page a {\n color: var(--squisq-page-primary);\n text-decoration-color: color-mix(in srgb, var(--squisq-page-primary) 40%, transparent);\n}\n\n/* Page pattern washes (very low intensity) */\n.squisq-page[data-pattern='dots'] {\n background-image: radial-gradient(color-mix(in srgb, var(--squisq-page-text) 7%, transparent) 1px, transparent 1px);\n background-size: 22px 22px;\n}\n.squisq-page[data-pattern='grid'] {\n background-image:\n linear-gradient(color-mix(in srgb, var(--squisq-page-primary) 7%, transparent) 1px, transparent 1px),\n linear-gradient(90deg, color-mix(in srgb, var(--squisq-page-primary) 7%, transparent) 1px, transparent 1px);\n background-size: 44px 44px;\n}\n.squisq-page[data-pattern='diagonal'] {\n background-image: repeating-linear-gradient(\n -45deg,\n color-mix(in srgb, var(--squisq-page-text) 4%, transparent) 0 1px,\n transparent 1px 14px\n );\n}\n.squisq-page[data-pattern='noise'] { background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E\"); }\n\n/* Spacing scale */\n.squisq-page[data-spacing='compact'] { --squisq-page-section-pad: 2.25rem; }\n.squisq-page[data-spacing='comfortable'] { --squisq-page-section-pad: 3.5rem; }\n.squisq-page[data-spacing='generous'] { --squisq-page-section-pad: 5.25rem; }\n\n/* Shadow language */\n.squisq-page[data-shadow='soft'] { --squisq-page-shadow: 0 14px 36px color-mix(in srgb, var(--squisq-page-text) 14%, transparent); }\n.squisq-page[data-shadow='crisp'] { --squisq-page-shadow: 0 2px 10px color-mix(in srgb, var(--squisq-page-text) 26%, transparent); }\n.squisq-page[data-shadow='heavy'] { --squisq-page-shadow: 10px 10px 0 color-mix(in srgb, var(--squisq-page-text) 82%, transparent); }\n\n/* \u2500\u2500 Sections \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section { position: relative; padding-block: var(--squisq-page-section-pad); }\n.squisq-page-section-inner {\n max-width: var(--squisq-page-content-max);\n margin-inline: auto;\n padding-inline: 24px;\n}\n/* Backdrops anchor to the section; these content roots stack above them. */\n.squisq-page-hero-body,\n.squisq-page-banner-body,\n.squisq-page-quote-figure { position: relative; }\n.squisq-page-section--feature-split .squisq-page-section-inner,\n.squisq-page-section--gallery .squisq-page-section-inner,\n.squisq-page-section--table-section .squisq-page-section-inner,\n.squisq-page-section--canvas-embed .squisq-page-section-inner,\n.squisq-page-section--stat-band .squisq-page-section-inner,\n.squisq-page-section--card-grid .squisq-page-section-inner,\n.squisq-page-section--media-figure .squisq-page-section-inner,\n.squisq-page-section--hero .squisq-page-section-inner {\n max-width: var(--squisq-page-wide-max);\n}\n\n/* Background rhythm */\n.squisq-page-section--bg-alternate { background: var(--squisq-page-bg-alt); }\n.squisq-page-section--bg-accent {\n background: var(--squisq-page-accent-bg);\n color: var(--squisq-page-accent-text);\n}\n.squisq-page-section--bg-media { color: #ffffff; }\n\n/* Dividers between adjacent sections */\n.squisq-page[data-divider='hairline'] .squisq-page-section + .squisq-page-section { border-top: 1px solid var(--squisq-page-divider-color); }\n.squisq-page[data-divider='thick-rule'] .squisq-page-section + .squisq-page-section { border-top: 3px solid var(--squisq-page-primary); }\n.squisq-page[data-divider='double-rule'] .squisq-page-section + .squisq-page-section { border-top: 4px double var(--squisq-page-divider-color); }\n.squisq-page[data-divider='dotted'] .squisq-page-section + .squisq-page-section { border-top: 2px dotted var(--squisq-page-divider-color); }\n/* Banded sections carry their own edges; media sections never need rules. */\n.squisq-page .squisq-page-section--bg-media,\n.squisq-page .squisq-page-section--bg-media + .squisq-page-section,\n.squisq-page .squisq-page-section--timeline-rail + .squisq-page-section--timeline-rail { border-top: none; }\n\n/* \u2500\u2500 Headings, eyebrows \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section-title {\n font-family: var(--squisq-page-title-font);\n font-weight: var(--squisq-page-title-weight);\n line-height: 1.15;\n margin: 0 0 0.5em;\n}\n.squisq-page[data-heading-case='uppercase'] .squisq-page-section-title { text-transform: uppercase; letter-spacing: 0.03em; }\n.squisq-page[data-underline='accent-bar'] .squisq-page-section-title::after {\n content: '';\n display: block;\n width: 56px;\n height: 4px;\n margin-top: 0.4em;\n border-radius: 2px;\n background: var(--squisq-page-accent);\n}\n.squisq-page[data-underline='full-rule'] .squisq-page-section-title {\n border-bottom: 1px solid var(--squisq-page-divider-color);\n padding-bottom: 0.35em;\n}\n\n.squisq-page-eyebrow {\n display: block;\n font-size: 0.8125rem;\n font-weight: 600;\n letter-spacing: 0.14em;\n text-transform: uppercase;\n color: var(--squisq-page-accent);\n margin: 0 0 0.9em;\n}\n.squisq-page[data-eyebrow='numbered'] .squisq-page-eyebrow::after { content: ' \u2014'; color: var(--squisq-page-text-muted); }\n.squisq-page[data-eyebrow='mono-tag'] .squisq-page-eyebrow {\n display: inline-block;\n font-family: var(--squisq-page-mono-font);\n text-transform: none;\n letter-spacing: 0.06em;\n border: 1px solid color-mix(in srgb, var(--squisq-page-accent) 55%, transparent);\n border-radius: var(--squisq-page-radius);\n padding: 0.15em 0.6em;\n background: color-mix(in srgb, var(--squisq-page-accent) 10%, transparent);\n}\n.squisq-page[data-eyebrow='mono-tag'] .squisq-page-eyebrow::before { content: '['; opacity: 0.6; }\n.squisq-page[data-eyebrow='mono-tag'] .squisq-page-eyebrow::after { content: ']'; opacity: 0.6; }\n\n/* \u2500\u2500 Hero \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section--hero { padding-block: calc(var(--squisq-page-section-pad) * 1.5); }\n.squisq-page-hero-title {\n font-family: var(--squisq-page-title-font);\n font-weight: var(--squisq-page-title-weight);\n line-height: 1.08;\n margin: 0;\n font-size: 2.75rem;\n}\n.squisq-page[data-heading-scale='display'] .squisq-page-hero-title { font-size: 3.4rem; }\n.squisq-page[data-heading-scale='oversized'] .squisq-page-hero-title { font-size: 4rem; font-size: clamp(3rem, 9cqw, 6rem); line-height: 1.02; }\n.squisq-page[data-heading-case='uppercase'] .squisq-page-hero-title { text-transform: uppercase; letter-spacing: 0.02em; }\n.squisq-page-hero-subtitle {\n margin: 1.1em 0 0;\n font-size: 1.25rem;\n color: var(--squisq-page-text-muted);\n max-width: 42em;\n white-space: pre-line;\n}\n.squisq-page-section--bg-media .squisq-page-hero-subtitle { color: rgba(255, 255, 255, 0.88); }\n\n/* Stacked (default): centered column */\n.squisq-page[data-hero-style='stacked'] .squisq-page-hero-body { text-align: center; }\n.squisq-page[data-hero-style='stacked'] .squisq-page-hero-subtitle { margin-inline: auto; }\n\n/* Oversized type: hard left, no decoration */\n.squisq-page[data-hero-style='oversized-type'] .squisq-page-hero-title { font-size: 4.25rem; font-size: clamp(3.25rem, 10cqw, 6.5rem); line-height: 0.98; }\n\n/* Split: text and media side by side */\n.squisq-page-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }\n.squisq-page-hero-grid .squisq-page-hero-media img { width: 100%; object-fit: cover; }\n\n/* Full-bleed & letterbox: media behind text */\n.squisq-page-section--hero-media {\n padding-block: 0;\n min-height: min(72svh, 620px);\n display: flex;\n align-items: flex-end;\n}\n.squisq-page[data-hero-style='letterbox'] .squisq-page-section--hero-media { min-height: min(52svh, 460px); }\n.squisq-page-hero-backdrop { position: absolute; inset: 0; overflow: hidden; }\n.squisq-page-hero-backdrop img { width: 100%; height: 100%; object-fit: cover; }\n.squisq-page-hero-backdrop::after {\n content: '';\n position: absolute;\n inset: 0;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 30%, rgba(0, 0, 0, 0.68) 100%);\n}\n.squisq-page[data-hero-style='letterbox'] .squisq-page-hero-backdrop img { filter: saturate(0.9); }\n.squisq-page-section--hero-media .squisq-page-section-inner { padding-block: 3rem; width: 100%; }\n\n/* \u2500\u2500 Banner (sectionHeader) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-banner-title { font-size: 2rem; }\n.squisq-page[data-heading-scale='display'] .squisq-page-banner-title { font-size: 2.5rem; }\n.squisq-page[data-heading-scale='oversized'] .squisq-page-banner-title { font-size: 3rem; font-size: clamp(2.25rem, 6cqw, 3.75rem); }\n.squisq-page-section--banner.squisq-page-section--bg-media { padding-block: 0; min-height: 280px; display: flex; align-items: flex-end; }\n.squisq-page-section--banner.squisq-page-section--bg-media .squisq-page-section-inner { padding-block: 2rem; width: 100%; }\n.squisq-page-section--banner .squisq-page-section-title { margin-bottom: 0; }\n\n/* \u2500\u2500 Stat band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-stats { display: flex; gap: 3rem; justify-content: center; text-align: center; flex-wrap: wrap; }\n.squisq-page-stat { flex: 1 1 220px; max-width: 420px; }\n.squisq-page-stat-value {\n display: block;\n font-family: var(--squisq-page-title-font);\n font-weight: 700;\n font-size: 3.25rem;\n line-height: 1;\n color: var(--squisq-page-accent);\n}\n.squisq-page[data-numerals='oversized'] .squisq-page-stat-value { font-size: 4.5rem; font-size: clamp(3.5rem, 8cqw, 5.5rem); }\n.squisq-page[data-numerals='mono'] .squisq-page-stat-value { font-family: var(--squisq-page-mono-font); letter-spacing: -0.02em; }\n.squisq-page[data-numerals='boxed'] .squisq-page-stat-value {\n display: inline-block;\n border: 2px solid var(--squisq-page-accent);\n border-radius: var(--squisq-page-radius);\n padding: 0.18em 0.4em;\n}\n.squisq-page-stat-title { display: block; margin-top: 0.9em; font-size: 1.125rem; font-weight: 600; }\n.squisq-page-stat-body { display: block; margin-top: 0.45em; color: var(--squisq-page-text-muted); font-size: 0.95rem; }\n.squisq-page-stat-meta { text-align: center; margin-top: 1.5rem; color: var(--squisq-page-text-muted); font-size: 0.85rem; }\n.squisq-page-stat-bar { height: 10px; border-radius: 999px; background: var(--squisq-page-accent); margin-top: 0.8em; }\n.squisq-page-stat--bars { text-align: left; }\n\n/* \u2500\u2500 Quote band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-quote {\n margin: 0;\n font-family: var(--squisq-page-title-font);\n font-size: 1.6rem;\n line-height: 1.35;\n white-space: pre-line;\n}\n.squisq-page-section--em-strong .squisq-page-quote { font-size: 2.1rem; }\n.squisq-page-section--em-quiet .squisq-page-quote { font-size: 1.25rem; color: var(--squisq-page-text-muted); }\n.squisq-page-quote-attribution { margin-top: 1.1em; font-family: var(--squisq-page-body-font); font-size: 0.95rem; color: var(--squisq-page-text-muted); }\n.squisq-page-quote-attribution::before { content: '\u2014 '; }\n.squisq-page[data-quote-mark='accent-bar'] .squisq-page-quote-figure { border-left: 4px solid var(--squisq-page-accent); padding-left: 1.5rem; }\n.squisq-page[data-quote-mark='oversized-glyph'] .squisq-page-quote-figure { position: relative; padding-top: 1.25rem; }\n.squisq-page[data-quote-mark='oversized-glyph'] .squisq-page-quote-figure::before {\n content: '\\201C';\n position: absolute;\n top: -0.12em;\n left: -0.05em;\n font-family: var(--squisq-page-title-font);\n font-size: 5.5rem;\n line-height: 1;\n color: color-mix(in srgb, var(--squisq-page-accent) 42%, transparent);\n pointer-events: none;\n}\n.squisq-page-section--v-display .squisq-page-quote-figure { text-align: center; border-left: none; }\n.squisq-page-section--v-display .squisq-page-quote { font-size: 2.4rem; font-size: clamp(1.9rem, 5cqw, 3rem); }\n.squisq-page-section--v-editorial .squisq-page-quote-figure {\n border-block: 3px solid var(--squisq-page-primary);\n border-left: none;\n padding: 2rem 0.5rem;\n}\n/* Full-bleed quote over media */\n.squisq-page-section--quote-band.squisq-page-section--bg-media { padding-block: 0; min-height: 380px; display: flex; align-items: center; }\n.squisq-page-section--quote-band.squisq-page-section--bg-media .squisq-page-section-inner { padding-block: 3.5rem; }\n.squisq-page-quote-backdrop { position: absolute; inset: 0; overflow: hidden; }\n.squisq-page-quote-backdrop img, .squisq-page-quote-backdrop video { width: 100%; height: 100%; object-fit: cover; }\n.squisq-page-quote-backdrop::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }\n.squisq-page-section--quote-band[data-hint-vignette] .squisq-page-quote-backdrop::after {\n background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.75) 100%);\n}\n.squisq-page-section--quote-band.squisq-page-section--bg-media .squisq-page-quote-figure { border: none; text-align: center; }\n\n/* \u2500\u2500 Feature split \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }\n.squisq-page-feature--media-right .squisq-page-feature-media { order: 2; }\n.squisq-page-feature-media img { width: 100%; object-fit: cover; }\n.squisq-page-feature-title { font-size: 1.75rem; }\n.squisq-page-feature-body { color: var(--squisq-page-text-muted); font-size: 1.05rem; white-space: pre-line; margin: 0; }\n\n/* \u2500\u2500 Media figure \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-figure { margin: 0; }\n.squisq-page-figure img, .squisq-page-figure video { width: 100%; display: block; }\n.squisq-page-figure figcaption { margin-top: 0.9em; font-size: 0.9rem; color: var(--squisq-page-text-muted); text-align: center; }\n.squisq-page-media-credit { font-size: 0.78rem; opacity: 0.75; }\n\n/* Media frame treatment (figures, features, gallery tiles, cards) */\n.squisq-page-media-frame { overflow: hidden; }\n.squisq-page[data-framing='rounded'] .squisq-page-media-frame { border-radius: var(--squisq-page-radius); }\n.squisq-page[data-framing='bordered'] .squisq-page-media-frame { border: 3px solid var(--squisq-page-text); }\n.squisq-page[data-framing='polaroid'] .squisq-page-media-frame {\n background: #ffffff;\n padding: 10px 10px 16px;\n border: 1px solid rgba(0, 0, 0, 0.12);\n border-radius: 2px;\n}\n.squisq-page[data-framing='letterboxed'] .squisq-page-media-frame img { aspect-ratio: 21 / 9; object-fit: cover; }\n.squisq-page[data-framing='circle-accent'] .squisq-page-media-frame { border-radius: calc(var(--squisq-page-radius) * 2); }\n.squisq-page .squisq-page-media-frame { box-shadow: var(--squisq-page-shadow); }\n\n/* Rich body nodes that the selected template did not consume. This universal\n * supplement keeps diagrams/media visible without making every template\n * duplicate the same preservation logic. */\n.squisq-page-rich-content {\n margin-top: clamp(1.5rem, 4vw, 3rem);\n padding-top: clamp(1.25rem, 3vw, 2rem);\n border-top: 1px solid var(--squisq-page-divider-color);\n}\n.squisq-page-rich-content :is(img, video) { display: block; max-width: 100%; height: auto; margin-inline: auto; }\n.squisq-page-rich-content .squisq-md-mermaid { min-height: min(520px, 62vh); margin-block: 0; }\n\n/* \u2500\u2500 Gallery \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }\n.squisq-page-gallery .squisq-page-media-frame img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }\n.squisq-page-gallery-caption { margin-top: 1.1rem; text-align: center; font-size: 0.9rem; color: var(--squisq-page-text-muted); }\n\n/* \u2500\u2500 Callout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-callout {\n border-radius: var(--squisq-page-radius);\n border: 1px solid color-mix(in srgb, var(--squisq-page-accent) 32%, transparent);\n border-left: 5px solid var(--squisq-page-accent);\n background: color-mix(in srgb, var(--squisq-page-accent) 7%, var(--squisq-page-bg));\n padding: 1.75rem 2rem;\n box-shadow: var(--squisq-page-shadow);\n display: flex;\n gap: 1.75rem;\n align-items: flex-start;\n}\n.squisq-page-callout-title { font-family: var(--squisq-page-title-font); font-size: 1.35rem; font-weight: 700; margin: 0 0 0.5em; }\n.squisq-page-callout-body { margin: 0; white-space: pre-line; }\n.squisq-page-callout-meta { margin-top: 0.9em; font-size: 0.82rem; color: var(--squisq-page-text-muted); }\n.squisq-page-callout .squisq-page-media-frame { flex: 0 0 132px; }\n.squisq-page-callout .squisq-page-media-frame img { width: 132px; height: 132px; object-fit: cover; }\n.squisq-page-callout[data-hint-framing='circle-accent'] .squisq-page-media-frame,\n.squisq-page-callout[data-hint-framing='circle-accent'] .squisq-page-media-frame img { border-radius: 50%; }\n.squisq-page-section--v-definition .squisq-page-callout-title { font-style: italic; }\n.squisq-page-section--v-diagnostic .squisq-page-callout { border-left-color: var(--squisq-page-highlight); }\n\n/* \u2500\u2500 Card grid \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }\n.squisq-page-card {\n border-radius: var(--squisq-page-radius);\n background: var(--squisq-page-bg-alt);\n border-top: 4px solid var(--squisq-page-card-accent, var(--squisq-page-accent));\n padding: 1.75rem 1.75rem 1.9rem;\n box-shadow: var(--squisq-page-shadow);\n}\n.squisq-page-card-title { font-family: var(--squisq-page-title-font); font-size: 1.3rem; margin: 0 0 0.4em; }\n.squisq-page-card-body { margin: 0; color: var(--squisq-page-text-muted); white-space: pre-line; }\n.squisq-page-cards-title { text-align: center; font-size: 1.9rem; margin-bottom: 1.75rem; }\n\n/* \u2500\u2500 Item list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-items { list-style: none; margin: 0; padding: 0; counter-reset: squisq-item; max-width: 40em; }\n.squisq-page-items li {\n counter-increment: squisq-item;\n /* Grid + baseline alignment keeps the marker locked to the first text line\n regardless of marker size, body font, or line-height \u2014 an absolutely\n positioned marker with a fixed top offset drifts as soon as either\n changes. */\n display: grid;\n grid-template-columns: 3.4em 1fr;\n align-items: baseline;\n padding: 0.9em 0;\n font-size: 1.1rem;\n}\n.squisq-page-items li + li { border-top: 1px solid var(--squisq-page-divider-color); }\n.squisq-page-items li::before {\n content: counter(squisq-item, decimal-leading-zero);\n font-family: var(--squisq-page-title-font);\n font-weight: 700;\n color: var(--squisq-page-accent);\n font-size: 1.15em;\n}\n/* Item bodies are rendered markdown: neutralize UA paragraph margins (which\n would otherwise push the first line below the marker) and space blocks. */\n.squisq-page-item-body { min-width: 0; }\n.squisq-page-item-body > * { margin: 0; }\n.squisq-page-item-body > * + * { margin-top: 0.6em; }\n.squisq-page[data-numerals='mono'] .squisq-page-items li::before { font-family: var(--squisq-page-mono-font); }\n.squisq-page-items-title { font-size: 1.9rem; }\n\n/* \u2500\u2500 Timeline rail (dateEvent) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section--timeline-rail { padding-block: 1.4rem; }\n.squisq-page-section--timeline-rail:first-child { padding-top: var(--squisq-page-section-pad); }\n.squisq-page-milestone { display: grid; grid-template-columns: 150px 1fr; gap: 2rem; align-items: baseline; position: relative; }\n.squisq-page-milestone-date {\n font-family: var(--squisq-page-title-font);\n font-weight: 700;\n color: var(--squisq-page-accent);\n font-size: 1.05rem;\n text-align: right;\n}\n.squisq-page-milestone-rail {\n position: absolute;\n left: 166px;\n top: -1.4rem;\n bottom: -1.4rem;\n width: 2px;\n background: color-mix(in srgb, var(--squisq-page-accent) 35%, transparent);\n}\n.squisq-page-milestone-rail::after {\n content: '';\n position: absolute;\n left: 50%;\n top: 0.55em;\n width: 12px;\n height: 12px;\n border-radius: 50%;\n transform: translateX(-50%);\n background: var(--squisq-page-accent);\n border: 2px solid var(--squisq-page-bg);\n}\n.squisq-page-milestone-body { padding-left: 2.25rem; white-space: pre-line; }\n.squisq-page-milestone-footer { margin-top: 0.5em; font-size: 0.85rem; color: var(--squisq-page-text-muted); }\n\n/* \u2500\u2500 Table section \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-table-title { font-size: 1.9rem; }\n.squisq-page-table-scroll { overflow-x: auto; border-radius: var(--squisq-page-radius); box-shadow: var(--squisq-page-shadow); }\n.squisq-page-table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }\n.squisq-page-table th {\n background: var(--squisq-page-accent-bg);\n color: var(--squisq-page-accent-text);\n font-family: var(--squisq-page-title-font);\n text-align: left;\n padding: 0.8em 1em;\n}\n.squisq-page-table td { padding: 0.7em 1em; border-top: 1px solid var(--squisq-page-divider-color); }\n.squisq-page-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--squisq-page-text) 3.5%, transparent); }\n\n/* \u2500\u2500 Canvas embed (spatial SVG) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-canvas {\n width: 100%;\n margin-inline: auto;\n overflow: hidden;\n border-radius: var(--squisq-page-radius);\n}\n.squisq-page-canvas svg { display: block; width: 100%; height: 100%; }\n.squisq-page-canvas--framed { border: 1px solid var(--squisq-page-divider-color); box-shadow: var(--squisq-page-shadow); }\n.squisq-page-canvas--terminal { border: 1px solid color-mix(in srgb, var(--squisq-page-accent) 45%, transparent); }\n.squisq-page-canvas--terminal::before {\n content: '\\25CF \\25CF \\25CF';\n display: block;\n font-size: 9px;\n letter-spacing: 4px;\n padding: 6px 12px;\n color: color-mix(in srgb, var(--squisq-page-accent) 70%, transparent);\n background: color-mix(in srgb, var(--squisq-page-accent) 9%, var(--squisq-page-bg));\n border-bottom: 1px solid color-mix(in srgb, var(--squisq-page-accent) 30%, transparent);\n}\n\n/* \u2500\u2500 Prose \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section--prose { padding-block: calc(var(--squisq-page-section-pad) * 0.45); }\n.squisq-page[data-divider] .squisq-page-section--prose + .squisq-page-section--prose { border-top: none; }\n.squisq-page-prose { font-size: 1.05rem; }\n.squisq-page-prose p { margin: 0; }\n.squisq-page-prose p + p { margin-top: 1.25em; }\n.squisq-page-prose > * + * { margin-top: 1.1em; }\n.squisq-page-prose code { font-family: var(--squisq-page-mono-font); font-size: 0.9em; }\n.squisq-page-prose :not(pre) > code { background: color-mix(in srgb, var(--squisq-page-text) 8%, transparent); border-radius: 4px; padding: 0.12em 0.35em; }\n.squisq-page-prose pre { background: color-mix(in srgb, var(--squisq-page-text) 6%, transparent); border-radius: var(--squisq-page-radius); padding: 1em 1.25em; overflow-x: auto; }\n.squisq-page-prose pre code { background: none; border-radius: 0; padding: 0; }\n.squisq-page .squisq-md-code-frame { position: relative; margin: 1em 0; }\n.squisq-page .squisq-md-code-frame > pre { margin: 0; padding-right: 5rem; }\n.squisq-page .squisq-md-code-copy {\n position: absolute;\n z-index: 1;\n top: 0.55rem;\n right: 0.55rem;\n min-width: 3.7rem;\n padding: 0.28rem 0.5rem;\n border: 1px solid color-mix(in srgb, var(--squisq-page-text) 20%, transparent);\n border-radius: 5px;\n background: color-mix(in srgb, var(--squisq-page-bg) 90%, transparent);\n color: inherit;\n font: 500 0.72rem/1.2 system-ui, sans-serif;\n cursor: pointer;\n opacity: 0.58;\n transition: opacity 120ms ease, background-color 120ms ease;\n}\n.squisq-page .squisq-md-code-frame:hover > .squisq-md-code-copy,\n.squisq-page .squisq-md-code-copy:focus-visible,\n.squisq-page .squisq-md-code-copy[data-copy-state='copied'],\n.squisq-page .squisq-md-code-copy[data-copy-state='failed'] { opacity: 1; }\n.squisq-page .squisq-md-code-copy:hover { background: var(--squisq-page-bg); }\n.squisq-page .squisq-md-code-copy:disabled { cursor: wait; }\n.squisq-page-prose blockquote { margin: 0; border-left: 4px solid var(--squisq-page-accent); padding-left: 1.25em; color: var(--squisq-page-text-muted); }\n.squisq-page-prose ul, .squisq-page-prose ol { padding-left: 1.5em; margin: 0; }\n.squisq-page-prose li + li { margin-top: 0.4em; }\n.squisq-page-prose hr { border: none; border-top: 1px solid var(--squisq-page-divider-color); }\n.squisq-page-prose table { width: 100%; border-collapse: collapse; }\n.squisq-page-prose th { font-family: var(--squisq-page-title-font); text-align: left; padding: 0.6em 0.8em; border-bottom: 2px solid var(--squisq-page-divider-color); }\n.squisq-page-prose td { padding: 0.55em 0.8em; border-bottom: 1px solid var(--squisq-page-divider-color); }\n.squisq-page-prose img { border-radius: var(--squisq-page-radius); }\n.squisq-page-prose h1, .squisq-page-prose h2, .squisq-page-prose h3,\n.squisq-page-prose h4, .squisq-page-prose h5, .squisq-page-prose h6 {\n font-family: var(--squisq-page-title-font);\n font-weight: var(--squisq-page-title-weight);\n line-height: 1.2;\n margin: 0 0 0.45em;\n}\n.squisq-page-prose h1 { font-size: 2.1rem; }\n.squisq-page-prose h2 { font-size: 1.65rem; }\n.squisq-page-prose h3 { font-size: 1.35rem; }\n.squisq-page-prose h4, .squisq-page-prose h5, .squisq-page-prose h6 { font-size: 1.15rem; }\n.squisq-page-section--prose[data-hint-drop-cap] .squisq-page-prose > p:first-child::first-letter {\n font-family: var(--squisq-page-title-font);\n font-size: 3.4em;\n font-weight: 700;\n float: left;\n line-height: 0.85;\n padding-right: 0.12em;\n color: var(--squisq-page-accent);\n}\n\n/* \u2500\u2500 Footer band \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page-section--footer { text-align: center; }\n\n/* \u2500\u2500 Thin-margin embedding (chat bubbles) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n.squisq-page--thin .squisq-page-section-inner { padding-inline: 0; }\n.squisq-page--thin .squisq-page-section { padding-block: 1.5rem; }\n\n/* Thumbnail image mode */\n.squisq-page--thumbnail-images .squisq-page-prose img,\n.squisq-page--thumbnail-images .squisq-page-figure img { max-width: 100px; max-height: 100px; object-fit: cover; }\n\n/* \u2500\u2500 Reveal animation (progressive enhancement) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n@media (prefers-reduced-motion: no-preference) {\n .squisq-page-reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }\n .squisq-page-reveal--in { opacity: 1; transform: none; }\n}\n\n/* \u2500\u2500 Responsive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n@container squisq-page (max-width: 720px) {\n\n.squisq-page-hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }\n.squisq-page-feature { grid-template-columns: 1fr; }\n.squisq-page-feature--media-right .squisq-page-feature-media { order: 0; }\n.squisq-page-stats { flex-direction: column; gap: 1.75rem; }\n.squisq-page-cards { grid-template-columns: 1fr; }\n.squisq-page-gallery { grid-template-columns: repeat(2, 1fr); }\n.squisq-page-milestone { grid-template-columns: 1fr; gap: 0.5rem; }\n.squisq-page-milestone-rail { display: none; }\n.squisq-page-section-inner { padding-inline: 18px; }\n\n}\n@supports not (container-type: inline-size) {\n @media (max-width: 720px) {\n\n.squisq-page-hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }\n.squisq-page-feature { grid-template-columns: 1fr; }\n.squisq-page-feature--media-right .squisq-page-feature-media { order: 0; }\n.squisq-page-stats { flex-direction: column; gap: 1.75rem; }\n.squisq-page-cards { grid-template-columns: 1fr; }\n.squisq-page-gallery { grid-template-columns: repeat(2, 1fr); }\n.squisq-page-milestone { grid-template-columns: 1fr; gap: 0.5rem; }\n.squisq-page-milestone-rail { display: none; }\n.squisq-page-section-inner { padding-inline: 18px; }\n\n }\n}\n";
2359
2413
  /**
2360
2414
  * Complete stylesheet for a themed page: a `.squisq-page { … }` variable
2361
2415
  * block followed by the structural CSS. For string-HTML consumers; the
@@ -3185,4 +3239,4 @@ declare function treeFromMarkdownList(list: MarkdownList): Tree;
3185
3239
  /** Find the first top-level markdown list in a block's body, if any. */
3186
3240
  declare function findFirstList(contents: MarkdownBlockNode[] | undefined): MarkdownList | undefined;
3187
3241
 
3188
- export { ASCII_CHAR_H, ASCII_CHAR_W, ASCII_DIAGRAM_FENCE_LANGS, ASCII_TIMELINE_FENCE_LANGS, type AccentLayout, type AsciiDiagram, type AsciiDiagramDetection, type AsciiDiagramEdge, type AsciiDiagramNode, type AsciiTimeline, type AsciiTimelineDetection, type AsciiTimelineEvent, type AsciiTimelineLink, type AsciiTimelineMarker, type AsciiTimelineSide, type AsciiTimelineStats, type AsciiTimelineStyle, type AsciiTimelineTrack, type AudioSegmentTiming, BASE_INPUT_DESCRIPTORS, BLOCK_MEDIA_LAYOUT_POLICIES, type BlockLayerMaterialization, type BlockMediaLayoutPolicy, type BuiltInTemplateName, CONTAINER_TEMPLATES, COVER_SLIDE_FRONTMATTER_KEYS, COVER_SLIDE_TEMPLATE_OPTIONS, type ClipBox, type ConnectorAnchor, type ConnectorPort, type ConnectorRouting, type ConnectorSnapPoint, type CoverBlockInput, type CoverSlidePlayback, type CoverSlideSettings, type CoverSlideTemplate, type CoverSlideTemplateOption, DEFAULT_COVER_SLIDE_SETTINGS, DEFAULT_LAYOUT, DIAGRAM_LABEL_HORIZONTAL_PADDING, DIAGRAM_LABEL_LINE_HEIGHT, DIAGRAM_LABEL_MIN_FONT_SIZE, DIAGRAM_LABEL_VERTICAL_PADDING, type DataFenceParseResult, type DeriveTemplateInputsOptions, type DetectAsciiTimelineOptions, type DiagramEdge, type DiagramLabelFit, type DiagramLayout, type DiagramLayoutOptions, type DiagramNodePosition, DocBlock, type DrawingConnector, type DrawingLayout, type DrawingLayoutOptions, type DrawingShape, type DrawingShapeKind, type EmbeddedVideo, type ExpandDocBlocksOptions, type ExtractedTableData, type FirstImage, type InputCoercion, type LayerMaterializationDiagnostic, type LayerMaterializationFailureMode, type LayerMaterializationSource, type LayoutLayerDefaults, type LayoutLayersResult, MAX_COVER_SLIDE_DURATION_SECONDS, type MarkdownToDocOptions, type MarkdownValidationResult, type MaterializeBlockLayersOptions, type NarrationResolution, type NativeMediaLayout, type NoMediaLayout, PAGE_BASE_CSS, PATH_SHAPE_KINDS, PageSection, type PageSectionContext, type PageSectionDraft, PersistentLayerConfig, type RenderAsciiDiagramOptions, type RenderAsciiTimelineOptions, type RenderTreeOptions, type RepairResult, type ResolvedPageBlock, type RichListItem, type RuntimeTemplateRegistry, SHAPE_NAMES, type SectionExtractor, type SupplementalMediaLayoutVariant, type SupplementalMediaShape, type SupplementalMediaVariantMatrix, TABLE_FED_TEMPLATES, TEMPLATE_AUTHORING_METADATA, TEMPLATE_INPUT_DESCRIPTORS, TEMPLATE_METADATA, TREE_FENCE_LANGS, type TemplateAuthoringMetadata, type TemplateAuthoringRole, TemplateBlock, type TemplateBodyPolicy, TemplateContext, type TemplateInputDescriptor, type TemplateMediaOwnership, type TemplateMetadata, type TemplateParamFinding, Theme, ThemeColorScheme, type Tree, type TreeDetection, type TreeItem, type TreeNode, type UnconsumedMediaBehavior, type ValidateOptions, ViewportConfig, ViewportOrientation, adjustY, anchorPoint, applyNarrationTiming, applyRenderStyleToLayers, asciiCellToCanvas, asciiDiagramFromBlocks, asciiDiagramFromTemplateData, asciiDiagramToTemplateData, asciiTimelineToTemplateData, autoTemplatePreservesContent, bigText, buildPageCss, buildPageCssVars, buildRegistry, canvasToAsciiCell, clipEndpoints, clipPoint, coerceTemplateParams, comparisonBar, computeDiagramLayout, computeDrawingLayout, computeLayoutLayers, connectorPath, contentBlock, countBlocks, coverBlock, createAccentLayers, cssFilterForTreatment, dataTable, dateEvent, definitionCard, deriveTemplateInputs, detectAsciiDiagram, detectAsciiTimeline, detectTree, diagramBlock, docToMarkdown, drawingBlock, expandCoverBlock, expandDocBlocks, expandPersistentLayers, extractBlockquoteText, extractBodyPlainText, extractEmbeddedVideos, extractFirstEmbeddedVideo, extractFirstImage, extractImages, extractListItems, extractRichListItems, extractTableData, extractTableFromContents, factCard, fallbackBlockLayers, findFirstList, findFirstTable, fitBigTextSize, fitDiagramLabel, flattenBlocks, flattenRenderableBlocks, fullBleedQuote, getAccentLayout, getAnimationProgress, getAnimationStyle, getAvailableTemplates, getBlockBodyText, getBlockDepth, getBlockMediaLayoutPolicy, getDefaultAnimation, getDefaultAnimationDuration, getOverlayOpacity, getPersistentLayersFromTheme, getPinnedBlockMeta, getTemplateHint, getThemeFont, getTransitionClass, hasTemplate, imageWithCaption, isAsciiDiagramFence, isAsciiTimelineFence, isContainerTemplate, isDataFence, isEligibleAsciiFenceLang, isEligibleAsciiTimelineFenceLang, isEligibleTreeFenceLang, isExplicitDiagramLang, isExplicitTimelineLang, isExplicitTreeLang, isRepairableDiagram, isShapeName, isTemplatedPageBlock, isTreeFence, isWrappedFlowTimelineSource, layoutBlock, leftFeature, lineStyleDasharray, lintTemplateParams, listBlock, mapBlock, markdownToDoc, markerPath, materializeBlockLayers, nearestSnapPoint, normalizeShapeKind, pageStyleDataAttributes, parseAsciiDiagram, parseAsciiTimeline, parseAsciiTimelineWithStats, parseDataFence, parseTree, parseWrappedFlowTimeline, parseYamlSubset, photoGrid, pullQuote, quoteBlock, readCustomTemplatesFromFrontmatter, readCustomThemesFromFrontmatter, renderAsciiDiagram, renderAsciiTimeline, renderTree, repairAsciiDiagram, replaceDataFence, resolveAudioMapping, resolveColorScheme, resolveCoverSlideSettings, resolvePageBlock, resolvePersistentLayers, resolveTemplateName, resolveThemeForDoc, rightFeature, scaleAnimationDuration, scoreTextSimilarity, sectionExtractors, sectionHeader, shapePath, shouldUseShadow, snapEndpoints, snapPoints, statHighlight, templateRegistry, themeWantsAmbientMotion, themedEntrance, themedFontSize, themedImageTreatment, themedScrim, themedSurfaceGradient, timelineBlock, titleBlock, treeBlock, treeFromMarkdownList, treeFromTemplateData, treeToTemplateData, twoColumn, validateMarkdownDoc, validateMarkdownSource, videoPullQuote, videoWithCaption, wrapWithPersistentLayers, writeCustomTemplatesToFrontmatter, writeCustomThemesToFrontmatter };
3242
+ export { ASCII_CHAR_H, ASCII_CHAR_W, ASCII_DIAGRAM_FENCE_LANGS, ASCII_TIMELINE_FENCE_LANGS, type AccentLayout, type AsciiDiagram, type AsciiDiagramDetection, type AsciiDiagramEdge, type AsciiDiagramNode, type AsciiTimeline, type AsciiTimelineDetection, type AsciiTimelineEvent, type AsciiTimelineLink, type AsciiTimelineMarker, type AsciiTimelineSide, type AsciiTimelineStats, type AsciiTimelineStyle, type AsciiTimelineTrack, type AudioSegmentTiming, BASE_INPUT_DESCRIPTORS, BLOCK_MEDIA_LAYOUT_POLICIES, type BlockLayerMaterialization, type BlockMediaLayoutPolicy, type BuildPreviewDocOptions, type BuiltInTemplateName, CONTAINER_TEMPLATES, COVER_SLIDE_FRONTMATTER_KEYS, COVER_SLIDE_TEMPLATE_OPTIONS, type ClipBox, type ConnectorAnchor, type ConnectorPort, type ConnectorRouting, type ConnectorSnapPoint, type CoverBlockInput, type CoverSlidePlayback, type CoverSlideSettings, type CoverSlideTemplate, type CoverSlideTemplateOption, DEFAULT_COVER_SLIDE_SETTINGS, DEFAULT_LAYOUT, DIAGRAM_LABEL_HORIZONTAL_PADDING, DIAGRAM_LABEL_LINE_HEIGHT, DIAGRAM_LABEL_MIN_FONT_SIZE, DIAGRAM_LABEL_VERTICAL_PADDING, type DataFenceParseResult, type DeriveTemplateInputsOptions, type DetectAsciiTimelineOptions, type DiagramEdge, type DiagramLabelFit, type DiagramLayout, type DiagramLayoutOptions, type DiagramNodePosition, DocBlock, type DrawingConnector, type DrawingLayout, type DrawingLayoutOptions, type DrawingShape, type DrawingShapeKind, type EmbeddedVideo, type ExpandDocBlocksOptions, type ExtractedTableData, type FirstImage, type InputCoercion, type LayerMaterializationDiagnostic, type LayerMaterializationFailureMode, type LayerMaterializationSource, type LayoutLayerDefaults, type LayoutLayersResult, MAX_COVER_SLIDE_DURATION_SECONDS, type MarkdownToDocOptions, type MarkdownValidationResult, type MaterializeBlockLayersOptions, type NarrationResolution, type NativeMediaLayout, type NoMediaLayout, PAGE_BASE_CSS, PATH_SHAPE_KINDS, PageSection, type PageSectionContext, type PageSectionDraft, PersistentLayerConfig, type RenderAsciiDiagramOptions, type RenderAsciiTimelineOptions, type RenderTreeOptions, type RepairResult, type ResolvedPageBlock, type RichListItem, type RuntimeTemplateRegistry, SHAPE_NAMES, type SectionExtractor, type SupplementalMediaLayoutVariant, type SupplementalMediaShape, type SupplementalMediaVariantMatrix, TABLE_FED_TEMPLATES, TEMPLATE_AUTHORING_METADATA, TEMPLATE_INPUT_DESCRIPTORS, TEMPLATE_METADATA, TREE_FENCE_LANGS, type TemplateAuthoringMetadata, type TemplateAuthoringRole, TemplateBlock, type TemplateBodyPolicy, TemplateContext, type TemplateInputDescriptor, type TemplateMediaOwnership, type TemplateMetadata, type TemplateParamFinding, Theme, ThemeColorScheme, type Tree, type TreeDetection, type TreeItem, type TreeNode, type UnconsumedMediaBehavior, type ValidateOptions, ViewportConfig, ViewportOrientation, adjustY, anchorPoint, applyNarrationTiming, applyRenderStyleToLayers, asciiCellToCanvas, asciiDiagramFromBlocks, asciiDiagramFromTemplateData, asciiDiagramToTemplateData, asciiTimelineToTemplateData, autoTemplatePreservesContent, bigText, buildPageCss, buildPageCssVars, buildPreviewDoc, buildRegistry, canvasToAsciiCell, clipEndpoints, clipPoint, coerceTemplateParams, comparisonBar, computeDiagramLayout, computeDrawingLayout, computeLayoutLayers, connectorPath, contentBlock, countBlocks, coverBlock, createAccentLayers, cssFilterForTreatment, dataTable, dateEvent, definitionCard, deriveTemplateInputs, detectAsciiDiagram, detectAsciiTimeline, detectTree, diagramBlock, docToMarkdown, documentTitleFromFileName, drawingBlock, expandCoverBlock, expandDocBlocks, expandPersistentLayers, extractBlockquoteText, extractBodyPlainText, extractEmbeddedVideos, extractFirstEmbeddedVideo, extractFirstImage, extractImages, extractListItems, extractRichListItems, extractTableData, extractTableFromContents, factCard, fallbackBlockLayers, findFirstList, findFirstTable, fitBigTextSize, fitDiagramLabel, flattenBlocks, flattenRenderableBlocks, fullBleedQuote, getAccentLayout, getAnimationProgress, getAnimationStyle, getAvailableTemplates, getBlockBodyText, getBlockDepth, getBlockMediaLayoutPolicy, getDefaultAnimation, getDefaultAnimationDuration, getOverlayOpacity, getPersistentLayersFromTheme, getPinnedBlockMeta, getTemplateHint, getThemeFont, getTransitionClass, hasTemplate, imageWithCaption, isAsciiDiagramFence, isAsciiTimelineFence, isContainerTemplate, isDataFence, isEligibleAsciiFenceLang, isEligibleAsciiTimelineFenceLang, isEligibleTreeFenceLang, isExplicitDiagramLang, isExplicitTimelineLang, isExplicitTreeLang, isRepairableDiagram, isShapeName, isTemplatedPageBlock, isTreeFence, isWrappedFlowTimelineSource, layoutBlock, leftFeature, lineStyleDasharray, lintTemplateParams, listBlock, mapBlock, markdownToDoc, markerPath, materializeBlockLayers, nearestSnapPoint, normalizeShapeKind, pageStyleDataAttributes, parseAsciiDiagram, parseAsciiTimeline, parseAsciiTimelineWithStats, parseDataFence, parseTree, parseWrappedFlowTimeline, parseYamlSubset, photoGrid, pullQuote, quoteBlock, readCustomTemplatesFromFrontmatter, readCustomThemesFromFrontmatter, renderAsciiDiagram, renderAsciiTimeline, renderTree, repairAsciiDiagram, replaceDataFence, resolveAudioMapping, resolveColorScheme, resolveCoverSlideSettings, resolvePageBlock, resolvePersistentLayers, resolveTemplateName, resolveThemeForDoc, rightFeature, scaleAnimationDuration, scoreTextSimilarity, sectionExtractors, sectionHeader, shapePath, shouldUseShadow, snapEndpoints, snapPoints, statHighlight, templateRegistry, themeWantsAmbientMotion, themedEntrance, themedFontSize, themedImageTreatment, themedScrim, themedSurfaceGradient, timelineBlock, titleBlock, treeBlock, treeFromMarkdownList, treeFromTemplateData, treeToTemplateData, twoColumn, validateMarkdownDoc, validateMarkdownSource, videoPullQuote, videoWithCaption, wrapWithPersistentLayers, writeCustomTemplatesToFrontmatter, writeCustomThemesToFrontmatter };
package/dist/doc/index.js CHANGED
@@ -7,8 +7,10 @@ import {
7
7
  applyNarrationTiming,
8
8
  buildPageCss,
9
9
  buildPageCssVars,
10
+ buildPreviewDoc,
10
11
  cssFilterForTreatment,
11
12
  docToMarkdown,
13
+ documentTitleFromFileName,
12
14
  getAnimationProgress,
13
15
  getAnimationStyle,
14
16
  getDefaultAnimationDuration,
@@ -31,7 +33,7 @@ import {
31
33
  sectionExtractors,
32
34
  validateMarkdownDoc,
33
35
  validateMarkdownSource
34
- } from "../chunk-KY6SDMQZ.js";
36
+ } from "../chunk-FPAS63KT.js";
35
37
  import {
36
38
  ASCII_CHAR_H,
37
39
  ASCII_CHAR_W,
@@ -151,7 +153,7 @@ import {
151
153
  wrapWithPersistentLayers,
152
154
  writeCustomTemplatesToFrontmatter,
153
155
  writeCustomThemesToFrontmatter
154
- } from "../chunk-GSJEGMKF.js";
156
+ } from "../chunk-ENNNQIYV.js";
155
157
  import {
156
158
  PATH_SHAPE_KINDS,
157
159
  anchorPoint,
@@ -165,6 +167,7 @@ import {
165
167
  snapEndpoints,
166
168
  snapPoints
167
169
  } from "../chunk-PUS54YU6.js";
170
+ import "../chunk-7ZAAICW4.js";
168
171
  import {
169
172
  ASCII_DIAGRAM_FENCE_LANGS,
170
173
  ASCII_TIMELINE_FENCE_LANGS,
@@ -262,6 +265,7 @@ export {
262
265
  bigText,
263
266
  buildPageCss,
264
267
  buildPageCssVars,
268
+ buildPreviewDoc,
265
269
  buildRegistry,
266
270
  canvasToAsciiCell,
267
271
  clipEndpoints,
@@ -287,6 +291,7 @@ export {
287
291
  detectTree,
288
292
  diagramBlock,
289
293
  docToMarkdown,
294
+ documentTitleFromFileName,
290
295
  drawingBlock,
291
296
  expandCoverBlock,
292
297
  expandDocBlocks,
@@ -0,0 +1,74 @@
1
+ import { bh as Theme } from '../Doc-DBadkoP4.js';
2
+ import '../types-CcrDFdWH.js';
3
+
4
+ /**
5
+ * Host-pluggable fence renderers — the contract shared by the read path
6
+ * (`@bendyline/squisq-react`'s `MarkdownRenderer` / `LinearDocView`) and
7
+ * the edit path (`@bendyline/squisq-editor-react`'s `HostFenceExtension`).
8
+ *
9
+ * A host registers a renderer per fence *language* (the token after the
10
+ * opening backticks). Wherever squisq renders markdown, a fenced code
11
+ * block whose language is claimed renders through the host's component
12
+ * instead of the default code block; unclaimed fences are untouched.
13
+ *
14
+ * Design constraints the contract encodes:
15
+ *
16
+ * - **All payload lives in the fence body.** The info string's *meta*
17
+ * segment does not survive the WYSIWYG round-trip (ProseMirror keeps
18
+ * only the `language-*` class token), so `meta` is populated on the
19
+ * read path only and renderers must not depend on it.
20
+ * - **Core stays React-free.** `FenceRenderer` returns `unknown`; the
21
+ * react packages narrow it to `ReactNode` at their boundaries.
22
+ * - Failures fall back: the react integrations wrap renderers in an
23
+ * error boundary that degrades to the plain code block, so a broken
24
+ * host widget never takes a document down with it.
25
+ */
26
+
27
+ /** Everything a fence renderer receives for one claimed fence. */
28
+ interface FenceRenderContext {
29
+ /** Normalized (trimmed, lowercased) fence language token. */
30
+ lang: string;
31
+ /**
32
+ * The info-string remainder after the language. READ PATH ONLY — absent
33
+ * in edit mode (it does not survive the ProseMirror round-trip). Do not
34
+ * store payload here; use the body.
35
+ */
36
+ meta?: string;
37
+ /** Fence body, verbatim. */
38
+ value: string;
39
+ /**
40
+ * Parsed body when it was valid JSON or the documented YAML subset
41
+ * (see `parseDataFence` in `@bendyline/squisq/doc`); undefined when
42
+ * parsing failed or was not attempted. Renderers needing guaranteed
43
+ * structure should parse `value` themselves.
44
+ */
45
+ data?: unknown;
46
+ /** Surface-applied theme — read colors/typography directly from it. */
47
+ theme?: Theme;
48
+ /** Which pipeline is rendering: static read view or the live editor. */
49
+ mode: 'read' | 'edit';
50
+ /**
51
+ * Edit mode only: replace the fence body with `next` in one undoable
52
+ * editor transaction. Absent on the read path.
53
+ */
54
+ replaceValue?: (next: string) => void;
55
+ }
56
+ /**
57
+ * A host renderer for one fence language. Returns the host UI for the
58
+ * fence — `ReactNode` in the react integrations; typed `unknown` here so
59
+ * core carries no React dependency.
60
+ */
61
+ type FenceRenderer = (ctx: FenceRenderContext) => unknown;
62
+ /**
63
+ * Registry: normalized fence language → renderer. Keys are matched
64
+ * against `lang.trim().toLowerCase()`; register lowercase keys.
65
+ */
66
+ type FenceRendererMap = Record<string, FenceRenderer>;
67
+ /**
68
+ * The registry's claimed languages, for plumbing that needs the *set*
69
+ * without the functions (e.g. the page materializer's
70
+ * `widgetFenceLangs`, or `CodeSnippetExtension.reservedLanguages`).
71
+ */
72
+ declare function fenceRendererLangs(renderers: FenceRendererMap | undefined): readonly string[];
73
+
74
+ export { type FenceRenderContext, type FenceRenderer, type FenceRendererMap, fenceRendererLangs };
@@ -0,0 +1,6 @@
1
+ import {
2
+ fenceRendererLangs
3
+ } from "../chunk-PGI7HSWE.js";
4
+ export {
5
+ fenceRendererLangs
6
+ };
package/dist/index.d.ts CHANGED
@@ -5,8 +5,8 @@ export { D as DEFAULT_MARKDOWN_SAFETY_LIMITS, a as DEFAULT_TRANSITION_DURATION_S
5
5
  export { D as DEFAULT_THEME, a as DEFAULT_THEME_ID, T as THEMES, g as getAvailableThemes, b as getThemeSummaries, r as resolveTheme } from './themeLibrary-8BQMY2HV.js';
6
6
  export { M as MediaEntry, a as MediaProvider } from './MediaProvider-wpSe21B3.js';
7
7
  export { E as EditorLayerMeta, I as ImageEditCanvas, a as ImageEditDoc, b as ImageEditLayer, c as ImageEditLayerKind, d as ImageEditMeta } from './ImageEditDoc-Cq2a3c30.js';
8
- export { ASCII_CHAR_H, ASCII_CHAR_W, ASCII_DIAGRAM_FENCE_LANGS, ASCII_TIMELINE_FENCE_LANGS, AccentLayout, AsciiDiagram, AsciiDiagramDetection, AsciiDiagramEdge, AsciiDiagramNode, AsciiTimeline, AsciiTimelineDetection, AsciiTimelineEvent, AsciiTimelineLink, AsciiTimelineMarker, AsciiTimelineSide, AsciiTimelineStats, AsciiTimelineStyle, AsciiTimelineTrack, AudioSegmentTiming, BASE_INPUT_DESCRIPTORS, BLOCK_MEDIA_LAYOUT_POLICIES, BlockLayerMaterialization, BlockMediaLayoutPolicy, BuiltInTemplateName, CONTAINER_TEMPLATES, COVER_SLIDE_FRONTMATTER_KEYS, COVER_SLIDE_TEMPLATE_OPTIONS, ClipBox, ConnectorAnchor, ConnectorPort, ConnectorRouting, ConnectorSnapPoint, CoverBlockInput, CoverSlidePlayback, CoverSlideSettings, CoverSlideTemplate, CoverSlideTemplateOption, DEFAULT_COVER_SLIDE_SETTINGS, DEFAULT_LAYOUT, DIAGRAM_LABEL_HORIZONTAL_PADDING, DIAGRAM_LABEL_LINE_HEIGHT, DIAGRAM_LABEL_MIN_FONT_SIZE, DIAGRAM_LABEL_VERTICAL_PADDING, DataFenceParseResult, DeriveTemplateInputsOptions, DetectAsciiTimelineOptions, DiagramEdge, DiagramLabelFit, DiagramLayout, DiagramLayoutOptions, DiagramNodePosition, DrawingConnector, DrawingLayout, DrawingLayoutOptions, DrawingShape, DrawingShapeKind, EmbeddedVideo, ExpandDocBlocksOptions, ExtractedTableData, FirstImage, InputCoercion, LayerMaterializationDiagnostic, LayerMaterializationFailureMode, LayerMaterializationSource, LayoutLayerDefaults, LayoutLayersResult, MAX_COVER_SLIDE_DURATION_SECONDS, MarkdownToDocOptions, MarkdownValidationResult, MaterializeBlockLayersOptions, NarrationResolution, NativeMediaLayout, NoMediaLayout, PAGE_BASE_CSS, PATH_SHAPE_KINDS, PageSectionContext, PageSectionDraft, RenderAsciiDiagramOptions, RenderAsciiTimelineOptions, RenderTreeOptions, RepairResult, ResolvedPageBlock, RichListItem, RuntimeTemplateRegistry, SHAPE_NAMES, SectionExtractor, SupplementalMediaLayoutVariant, SupplementalMediaShape, SupplementalMediaVariantMatrix, TABLE_FED_TEMPLATES, TEMPLATE_AUTHORING_METADATA, TEMPLATE_INPUT_DESCRIPTORS, TEMPLATE_METADATA, TREE_FENCE_LANGS, TemplateAuthoringMetadata, TemplateAuthoringRole, TemplateBodyPolicy, TemplateInputDescriptor, TemplateMediaOwnership, TemplateMetadata, TemplateParamFinding, Tree, TreeDetection, TreeItem, TreeNode, UnconsumedMediaBehavior, ValidateOptions, adjustY, anchorPoint, applyNarrationTiming, applyRenderStyleToLayers, asciiCellToCanvas, asciiDiagramFromBlocks, asciiDiagramFromTemplateData, asciiDiagramToTemplateData, asciiTimelineToTemplateData, autoTemplatePreservesContent, bigText, buildPageCss, buildPageCssVars, buildRegistry, canvasToAsciiCell, clipEndpoints, clipPoint, coerceTemplateParams, comparisonBar, computeDiagramLayout, computeDrawingLayout, computeLayoutLayers, connectorPath, contentBlock, countBlocks, coverBlock, createAccentLayers, cssFilterForTreatment, dataTable, dateEvent, definitionCard, deriveTemplateInputs, detectAsciiDiagram, detectAsciiTimeline, detectTree, diagramBlock, docToMarkdown, drawingBlock, expandCoverBlock, expandDocBlocks, expandPersistentLayers, extractBlockquoteText, extractBodyPlainText, extractEmbeddedVideos, extractFirstEmbeddedVideo, extractFirstImage, extractImages, extractListItems, extractRichListItems, extractTableData, extractTableFromContents, factCard, fallbackBlockLayers, findFirstList, findFirstTable, fitBigTextSize, fitDiagramLabel, flattenBlocks, flattenRenderableBlocks, fullBleedQuote, getAccentLayout, getAnimationProgress, getAnimationStyle, getAvailableTemplates, getBlockBodyText, getBlockDepth, getBlockMediaLayoutPolicy, getDefaultAnimation, getDefaultAnimationDuration, getOverlayOpacity, getPersistentLayersFromTheme, getPinnedBlockMeta, getTemplateHint, getThemeFont, getTransitionClass, hasTemplate, imageWithCaption, isAsciiDiagramFence, isAsciiTimelineFence, isContainerTemplate, isDataFence, isEligibleAsciiFenceLang, isEligibleAsciiTimelineFenceLang, isEligibleTreeFenceLang, isExplicitDiagramLang, isExplicitTimelineLang, isExplicitTreeLang, isRepairableDiagram, isShapeName, isTemplatedPageBlock, isTreeFence, isWrappedFlowTimelineSource, layoutBlock, leftFeature, lineStyleDasharray, lintTemplateParams, listBlock, mapBlock, markdownToDoc, markerPath, materializeBlockLayers, nearestSnapPoint, normalizeShapeKind, pageStyleDataAttributes, parseAsciiDiagram, parseAsciiTimeline, parseAsciiTimelineWithStats, parseDataFence, parseTree, parseWrappedFlowTimeline, parseYamlSubset, photoGrid, pullQuote, quoteBlock, readCustomTemplatesFromFrontmatter, readCustomThemesFromFrontmatter, renderAsciiDiagram, renderAsciiTimeline, renderTree, repairAsciiDiagram, replaceDataFence, resolveAudioMapping, resolveColorScheme, resolveCoverSlideSettings, resolvePageBlock, resolvePersistentLayers, resolveTemplateName, resolveThemeForDoc, rightFeature, scaleAnimationDuration, scoreTextSimilarity, sectionExtractors, sectionHeader, shapePath, shouldUseShadow, snapEndpoints, snapPoints, statHighlight, templateRegistry, themeWantsAmbientMotion, themedEntrance, themedFontSize, themedImageTreatment, themedScrim, themedSurfaceGradient, timelineBlock, titleBlock, treeBlock, treeFromMarkdownList, treeFromTemplateData, treeToTemplateData, twoColumn, validateMarkdownDoc, validateMarkdownSource, videoPullQuote, videoWithCaption, wrapWithPersistentLayers, writeCustomTemplatesToFrontmatter, writeCustomThemesToFrontmatter } from './doc/index.js';
9
- export { M as MaterializePageSectionOptions, a as MaterializePageSectionsOptions, P as PageMedia, b as PageRichText, c as PageSection, d as PageSectionDiagnostic, e as PageSectionItem, f as PageSectionMaterialization, g as PageSectionSource, h as PageSpatialKind, i as PageTransformHints, m as materializePageSection, j as materializePageSections, r as resolvePageStyle } from './materializePageSection-DgOFYge7.js';
8
+ export { ASCII_CHAR_H, ASCII_CHAR_W, ASCII_DIAGRAM_FENCE_LANGS, ASCII_TIMELINE_FENCE_LANGS, AccentLayout, AsciiDiagram, AsciiDiagramDetection, AsciiDiagramEdge, AsciiDiagramNode, AsciiTimeline, AsciiTimelineDetection, AsciiTimelineEvent, AsciiTimelineLink, AsciiTimelineMarker, AsciiTimelineSide, AsciiTimelineStats, AsciiTimelineStyle, AsciiTimelineTrack, AudioSegmentTiming, BASE_INPUT_DESCRIPTORS, BLOCK_MEDIA_LAYOUT_POLICIES, BlockLayerMaterialization, BlockMediaLayoutPolicy, BuildPreviewDocOptions, BuiltInTemplateName, CONTAINER_TEMPLATES, COVER_SLIDE_FRONTMATTER_KEYS, COVER_SLIDE_TEMPLATE_OPTIONS, ClipBox, ConnectorAnchor, ConnectorPort, ConnectorRouting, ConnectorSnapPoint, CoverBlockInput, CoverSlidePlayback, CoverSlideSettings, CoverSlideTemplate, CoverSlideTemplateOption, DEFAULT_COVER_SLIDE_SETTINGS, DEFAULT_LAYOUT, DIAGRAM_LABEL_HORIZONTAL_PADDING, DIAGRAM_LABEL_LINE_HEIGHT, DIAGRAM_LABEL_MIN_FONT_SIZE, DIAGRAM_LABEL_VERTICAL_PADDING, DataFenceParseResult, DeriveTemplateInputsOptions, DetectAsciiTimelineOptions, DiagramEdge, DiagramLabelFit, DiagramLayout, DiagramLayoutOptions, DiagramNodePosition, DrawingConnector, DrawingLayout, DrawingLayoutOptions, DrawingShape, DrawingShapeKind, EmbeddedVideo, ExpandDocBlocksOptions, ExtractedTableData, FirstImage, InputCoercion, LayerMaterializationDiagnostic, LayerMaterializationFailureMode, LayerMaterializationSource, LayoutLayerDefaults, LayoutLayersResult, MAX_COVER_SLIDE_DURATION_SECONDS, MarkdownToDocOptions, MarkdownValidationResult, MaterializeBlockLayersOptions, NarrationResolution, NativeMediaLayout, NoMediaLayout, PAGE_BASE_CSS, PATH_SHAPE_KINDS, PageSectionContext, PageSectionDraft, RenderAsciiDiagramOptions, RenderAsciiTimelineOptions, RenderTreeOptions, RepairResult, ResolvedPageBlock, RichListItem, RuntimeTemplateRegistry, SHAPE_NAMES, SectionExtractor, SupplementalMediaLayoutVariant, SupplementalMediaShape, SupplementalMediaVariantMatrix, TABLE_FED_TEMPLATES, TEMPLATE_AUTHORING_METADATA, TEMPLATE_INPUT_DESCRIPTORS, TEMPLATE_METADATA, TREE_FENCE_LANGS, TemplateAuthoringMetadata, TemplateAuthoringRole, TemplateBodyPolicy, TemplateInputDescriptor, TemplateMediaOwnership, TemplateMetadata, TemplateParamFinding, Tree, TreeDetection, TreeItem, TreeNode, UnconsumedMediaBehavior, ValidateOptions, adjustY, anchorPoint, applyNarrationTiming, applyRenderStyleToLayers, asciiCellToCanvas, asciiDiagramFromBlocks, asciiDiagramFromTemplateData, asciiDiagramToTemplateData, asciiTimelineToTemplateData, autoTemplatePreservesContent, bigText, buildPageCss, buildPageCssVars, buildPreviewDoc, buildRegistry, canvasToAsciiCell, clipEndpoints, clipPoint, coerceTemplateParams, comparisonBar, computeDiagramLayout, computeDrawingLayout, computeLayoutLayers, connectorPath, contentBlock, countBlocks, coverBlock, createAccentLayers, cssFilterForTreatment, dataTable, dateEvent, definitionCard, deriveTemplateInputs, detectAsciiDiagram, detectAsciiTimeline, detectTree, diagramBlock, docToMarkdown, documentTitleFromFileName, drawingBlock, expandCoverBlock, expandDocBlocks, expandPersistentLayers, extractBlockquoteText, extractBodyPlainText, extractEmbeddedVideos, extractFirstEmbeddedVideo, extractFirstImage, extractImages, extractListItems, extractRichListItems, extractTableData, extractTableFromContents, factCard, fallbackBlockLayers, findFirstList, findFirstTable, fitBigTextSize, fitDiagramLabel, flattenBlocks, flattenRenderableBlocks, fullBleedQuote, getAccentLayout, getAnimationProgress, getAnimationStyle, getAvailableTemplates, getBlockBodyText, getBlockDepth, getBlockMediaLayoutPolicy, getDefaultAnimation, getDefaultAnimationDuration, getOverlayOpacity, getPersistentLayersFromTheme, getPinnedBlockMeta, getTemplateHint, getThemeFont, getTransitionClass, hasTemplate, imageWithCaption, isAsciiDiagramFence, isAsciiTimelineFence, isContainerTemplate, isDataFence, isEligibleAsciiFenceLang, isEligibleAsciiTimelineFenceLang, isEligibleTreeFenceLang, isExplicitDiagramLang, isExplicitTimelineLang, isExplicitTreeLang, isRepairableDiagram, isShapeName, isTemplatedPageBlock, isTreeFence, isWrappedFlowTimelineSource, layoutBlock, leftFeature, lineStyleDasharray, lintTemplateParams, listBlock, mapBlock, markdownToDoc, markerPath, materializeBlockLayers, nearestSnapPoint, normalizeShapeKind, pageStyleDataAttributes, parseAsciiDiagram, parseAsciiTimeline, parseAsciiTimelineWithStats, parseDataFence, parseTree, parseWrappedFlowTimeline, parseYamlSubset, photoGrid, pullQuote, quoteBlock, readCustomTemplatesFromFrontmatter, readCustomThemesFromFrontmatter, renderAsciiDiagram, renderAsciiTimeline, renderTree, repairAsciiDiagram, replaceDataFence, resolveAudioMapping, resolveColorScheme, resolveCoverSlideSettings, resolvePageBlock, resolvePersistentLayers, resolveTemplateName, resolveThemeForDoc, rightFeature, scaleAnimationDuration, scoreTextSimilarity, sectionExtractors, sectionHeader, shapePath, shouldUseShadow, snapEndpoints, snapPoints, statHighlight, templateRegistry, themeWantsAmbientMotion, themedEntrance, themedFontSize, themedImageTreatment, themedScrim, themedSurfaceGradient, timelineBlock, titleBlock, treeBlock, treeFromMarkdownList, treeFromTemplateData, treeToTemplateData, twoColumn, validateMarkdownDoc, validateMarkdownSource, videoPullQuote, videoWithCaption, wrapWithPersistentLayers, writeCustomTemplatesToFrontmatter, writeCustomThemesToFrontmatter } from './doc/index.js';
9
+ export { M as MaterializePageSectionOptions, a as MaterializePageSectionsOptions, P as PageMedia, b as PageRichText, c as PageSection, d as PageSectionDiagnostic, e as PageSectionItem, f as PageSectionMaterialization, g as PageSectionSource, h as PageSpatialKind, i as PageTransformHints, m as materializePageSection, j as materializePageSections, r as resolvePageStyle } from './materializePageSection-Rss5thAj.js';
10
10
  export { calculateBearing, decodeGeohash, encodeGeohash, geohashOverlapsBounds, geohashToHierarchicalPath, getGeohash4Neighbors, getGeohashPath, getGeohashPrefix, getNeighbors, haversineDistance } from './spatial/index.js';
11
11
  export { LocalForageAdapter, LocalForageAdapterOptions, LocalStorageAdapter, MemoryStorageAdapter, ScopedContentContainer, StorageAdapter, createMediaProviderFromContainer, scopeContainer } from './storage/index.js';
12
12
  export { C as ContentContainer, a as ContentEntry, M as MemoryContentContainer, f as findDocumentPath } from './ContentContainer-B2w9sUoL.js';
@@ -25,3 +25,4 @@ export { I as ICONS, a as IconEntry, b as IconFamily, c as IconTextRun, h as has
25
25
  export { IconSuggestion, canonicalIconToken, iconGlyph, looksLikeIconToken, resolveIcon, suggestIcons } from './icons/index.js';
26
26
  export { BlockContentProfile, RecommendationResult, profileBlockContents, recommendTemplatesForBlock } from './recommend/index.js';
27
27
  export { AlignConfig, AlignInput, BandpassState, BuildNarrationTimingOptions, BuildScriptOptions, DEFAULT_ALIGN_CONFIG, DEFAULT_FEATURE_CONFIG, DEFAULT_NUCLEI_CONFIG, DEFAULT_PACING_CONFIG, DEFAULT_VAD_CONFIG, FeatureConfig, FeatureState, FrameFeatures, NarrationAlignment, NarrationBlockRange, NarrationScript, NarrationSessionConfig, NarrationSessionState, NarrationTimingBlock, NarrationTimingJsonV3, NarrationTrace, NucleiConfig, NucleiState, PacingConfig, PacingState, PacingTick, ScriptBlockRange, ScriptToken, TraceSample, VadConfig, VadState, WordTiming, alignNarration, bandpassRun, buildNarrationScript, buildNarrationTimingJson, createBandpass, createFeatureState, createNarrationSession, createNucleiState, createPacingState, createVadState, detectSyllableOnsets, downsampleTrace, estimateSyllables, expectedSyllablesAt, extractFrameFeatures, featureStep, narrationSessionStep, nucleiStep, pacingStep, parseNarrationTimingJson, reanchorPacing, reanchorSession, traceWordPosAt, vadStep, wordIndexAtChar, wordIndexAtTime, wordPosAtExpectedSyllables } from './narration/index.js';
28
+ export { FenceRenderContext, FenceRenderer, FenceRendererMap, fenceRendererLangs } from './fence/index.js';
package/dist/index.js CHANGED
@@ -23,7 +23,10 @@ import {
23
23
  reanchorSession,
24
24
  traceWordPosAt,
25
25
  vadStep
26
- } from "./chunk-7Z5T3CUI.js";
26
+ } from "./chunk-WN27GHA3.js";
27
+ import {
28
+ fenceRendererLangs
29
+ } from "./chunk-PGI7HSWE.js";
27
30
  import {
28
31
  DEFAULT_TRANSFORM_STYLE_ID,
29
32
  analyzeBlocks,
@@ -102,13 +105,6 @@ import {
102
105
  formatVersionTimestamp,
103
106
  parseVersionTimestamp
104
107
  } from "./chunk-OPO5K4DZ.js";
105
- import {
106
- hasIconMarker,
107
- iconClass,
108
- iconMarker,
109
- splitIconMarkers,
110
- stripIconMarkers
111
- } from "./chunk-7ZAAICW4.js";
112
108
  import {
113
109
  STARTER_THEME,
114
110
  accentToColorScheme,
@@ -146,8 +142,10 @@ import {
146
142
  applyNarrationTiming,
147
143
  buildPageCss,
148
144
  buildPageCssVars,
145
+ buildPreviewDoc,
149
146
  cssFilterForTreatment,
150
147
  docToMarkdown,
148
+ documentTitleFromFileName,
151
149
  getAnimationProgress,
152
150
  getAnimationStyle,
153
151
  getDefaultAnimationDuration,
@@ -170,7 +168,7 @@ import {
170
168
  sectionExtractors,
171
169
  validateMarkdownDoc,
172
170
  validateMarkdownSource
173
- } from "./chunk-KY6SDMQZ.js";
171
+ } from "./chunk-FPAS63KT.js";
174
172
  import {
175
173
  ASCII_CHAR_H,
176
174
  ASCII_CHAR_W,
@@ -298,7 +296,7 @@ import {
298
296
  wrapWithPersistentLayers,
299
297
  writeCustomTemplatesToFrontmatter,
300
298
  writeCustomThemesToFrontmatter
301
- } from "./chunk-GSJEGMKF.js";
299
+ } from "./chunk-ENNNQIYV.js";
302
300
  import {
303
301
  PATH_SHAPE_KINDS,
304
302
  anchorPoint,
@@ -312,6 +310,13 @@ import {
312
310
  snapEndpoints,
313
311
  snapPoints
314
312
  } from "./chunk-PUS54YU6.js";
313
+ import {
314
+ hasIconMarker,
315
+ iconClass,
316
+ iconMarker,
317
+ splitIconMarkers,
318
+ stripIconMarkers
319
+ } from "./chunk-7ZAAICW4.js";
315
320
  import {
316
321
  ASCII_DIAGRAM_FENCE_LANGS,
317
322
  ASCII_TIMELINE_FENCE_LANGS,
@@ -651,6 +656,7 @@ export {
651
656
  buildNarrationTimingJson,
652
657
  buildPageCss,
653
658
  buildPageCssVars,
659
+ buildPreviewDoc,
654
660
  buildRegistry,
655
661
  buildSvgString,
656
662
  buildVersionPath,
@@ -709,6 +715,7 @@ export {
709
715
  detectTree,
710
716
  diagramBlock,
711
717
  docToMarkdown,
718
+ documentTitleFromFileName,
712
719
  downsampleTrace,
713
720
  drawingBlock,
714
721
  encodeGeohash,
@@ -742,6 +749,7 @@ export {
742
749
  factCard,
743
750
  fallbackBlockLayers,
744
751
  featureStep,
752
+ fenceRendererLangs,
745
753
  fetchResourceBytes,
746
754
  findDocumentPath,
747
755
  findFirstList,
@@ -191,6 +191,16 @@ interface MaterializePageSectionOptions {
191
191
  totalBlocks?: number;
192
192
  /** Document-scoped custom templates (render as canvas embeds). */
193
193
  customTemplates?: readonly CustomTemplateDefinition[];
194
+ /**
195
+ * Fence languages a host renderer claims as widgets (see
196
+ * `@bendyline/squisq/fence`). Typed-template sections keep only the rich
197
+ * content they haven't already consumed — historically just mermaid
198
+ * fences and media. A claimed fence must survive that filter too, or a
199
+ * host widget inside a callout/card block is dropped before it ever
200
+ * reaches the renderer. Lowercased language tokens; mermaid is always
201
+ * kept regardless.
202
+ */
203
+ widgetFenceLangs?: readonly string[];
194
204
  }
195
205
  /** Doc-level options. */
196
206
  interface MaterializePageSectionsOptions extends MaterializePageSectionOptions {
@@ -23,7 +23,7 @@ import {
23
23
  reanchorSession,
24
24
  traceWordPosAt,
25
25
  vadStep
26
- } from "../chunk-7Z5T3CUI.js";
26
+ } from "../chunk-WN27GHA3.js";
27
27
  import {
28
28
  buildNarrationScript,
29
29
  buildNarrationTimingJson,
@@ -33,7 +33,7 @@ import {
33
33
  wordIndexAtChar,
34
34
  wordIndexAtTime,
35
35
  wordPosAtExpectedSyllables
36
- } from "../chunk-GSJEGMKF.js";
36
+ } from "../chunk-ENNNQIYV.js";
37
37
  import "../chunk-PUS54YU6.js";
38
38
  import "../chunk-CUYHFOFL.js";
39
39
  import "../chunk-SBAX4ZPO.js";
@@ -1,5 +1,5 @@
1
1
  import { r as ColorScheme, O as Doc, k as Block } from '../Doc-DBadkoP4.js';
2
- import { i as PageTransformHints } from '../materializePageSection-DgOFYge7.js';
2
+ import { i as PageTransformHints } from '../materializePageSection-Rss5thAj.js';
3
3
  import { d as ExtractionType, E as ExtractedElement, b as ExtractionOptions } from '../contentExtractor-BNfVJV2U.js';
4
4
  import '../types-CcrDFdWH.js';
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bendyline/squisq",
3
- "version": "2.6.0",
3
+ "version": "2.7.1",
4
4
  "description": "Headless utilities for doc/block rendering, spatial math, Markdown, and storage",
5
5
  "license": "MIT",
6
6
  "author": "Bendyline",
@@ -121,6 +121,11 @@
121
121
  "types": "./dist/narration/index.d.ts",
122
122
  "import": "./dist/narration/index.js",
123
123
  "default": "./dist/narration/index.js"
124
+ },
125
+ "./fence": {
126
+ "types": "./dist/fence/index.d.ts",
127
+ "import": "./dist/fence/index.js",
128
+ "default": "./dist/fence/index.js"
124
129
  }
125
130
  },
126
131
  "scripts": {