@openpresentation/opf 0.31.0 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/README.md +1 -1
  2. package/dist/browser.js +18 -18
  3. package/dist/{chart-data-Ci9s_NDN.d.ts → chart-data-oIZQlFGi.d.ts} +4 -2
  4. package/dist/{chunk-UKWNHK62.js → chunk-2E6CDYL2.js} +23 -6
  5. package/dist/{chunk-I6G32TB5.js → chunk-56J345KE.js} +5 -5
  6. package/dist/{chunk-XSCZZWYI.js → chunk-7U3TJBXE.js} +99 -15
  7. package/dist/{chunk-HRKV43GC.js → chunk-BBVW5ZC2.js} +3 -3
  8. package/dist/{chunk-7UO6H32I.js → chunk-CLRYHWQN.js} +162 -22
  9. package/dist/chunk-DGS47ONG.js +1 -0
  10. package/dist/{chunk-F5QC7E2O.js → chunk-F7DN33UL.js} +28 -8
  11. package/dist/{chunk-KELC4K62.js → chunk-HKUV7NEN.js} +1 -1
  12. package/dist/{chunk-XG4JKFZ6.js → chunk-IT7FQKED.js} +6 -6
  13. package/dist/{chunk-SYCHWS7C.js → chunk-J63CIRIV.js} +4 -4
  14. package/dist/{chunk-5Q4IYLMW.js → chunk-LEF4X4KI.js} +274 -33
  15. package/dist/{chunk-5OMZW44K.js → chunk-NEJ32O7X.js} +1 -1
  16. package/dist/chunk-NVAJASOD.js +14764 -0
  17. package/dist/{chunk-M7YZU3DX.js → chunk-OXLA4HXQ.js} +615 -58
  18. package/dist/{chunk-P5E3FNYO.js → chunk-PB7ME64J.js} +1 -1
  19. package/dist/{chunk-ARFAQNOH.js → chunk-SW676APJ.js} +2 -2
  20. package/dist/{chunk-W7KPMUJF.js → chunk-XFHXQCXL.js} +58 -5
  21. package/dist/{chunk-KOCXV7H3.js → chunk-XQO2CT6Q.js} +2 -2
  22. package/dist/{chunk-WHDOOLIO.js → chunk-YFJIIIOL.js} +3 -3
  23. package/dist/composition-DRqNGHJV.d.ts +5620 -0
  24. package/dist/composition.d.ts +2 -2
  25. package/dist/composition.js +1 -1
  26. package/dist/{conversion-Bh-skyMc.d.ts → conversion-Cadul8Mu.d.ts} +56 -9
  27. package/dist/conversion-J3YPDS7C.js +24 -0
  28. package/dist/convert.d.ts +2 -2
  29. package/dist/convert.js +7 -7
  30. package/dist/data.d.ts +2 -2
  31. package/dist/data.js +2 -2
  32. package/dist/{deck-report-DQMsvyBI.d.ts → deck-report-BA3IPJAV.d.ts} +2 -2
  33. package/dist/deck.d.ts +5 -5
  34. package/dist/deck.js +11 -11
  35. package/dist/diagram-engine-eager.js +6 -0
  36. package/dist/diagram-engine-lazy.js +2 -0
  37. package/dist/diff.js +4 -4
  38. package/dist/docs.js +25 -19
  39. package/dist/examples.js +4759 -995
  40. package/dist/format.js +2 -2
  41. package/dist/ids.js +4 -4
  42. package/dist/index.d.ts +15 -12
  43. package/dist/index.js +23 -22
  44. package/dist/markdown.d.ts +2 -2
  45. package/dist/markdown.js +8 -8
  46. package/dist/node-engine.d.ts +6 -6
  47. package/dist/node-engine.js +20 -20
  48. package/dist/{pagination-DyAKYpXu.d.ts → pagination-DwEkdJ6s.d.ts} +74 -4
  49. package/dist/pagination.d.ts +3 -3
  50. package/dist/pagination.js +4 -4
  51. package/dist/patch.js +3 -3
  52. package/dist/precompiled.js +2 -2
  53. package/dist/{presentation-8jLSTFqL.d.ts → presentation-DnD7mfmf.d.ts} +106 -27
  54. package/dist/repo-readme.js +1 -1
  55. package/dist/schema-engine-ajv.js +1 -1
  56. package/dist/schema-engine-precompiled.js +2 -2
  57. package/dist/schema.js +3 -3
  58. package/dist/schemas.d.ts +6 -0
  59. package/dist/schemas.js +1 -1
  60. package/dist/source.d.ts +4 -3
  61. package/dist/source.js +10 -10
  62. package/dist/spec/schemas/layout.schema.json +58 -8
  63. package/dist/spec/schemas/narrative.schema.json +2 -1
  64. package/dist/spec/schemas/opf.schema.json +122 -23
  65. package/dist/spec/schemas/theme.schema.json +9 -3
  66. package/dist/types.d.ts +69 -18
  67. package/dist/{validation-types-mNmfcY9A.d.ts → validation-types-vVah_PEv.d.ts} +1 -1
  68. package/dist/validator.d.ts +4 -4
  69. package/dist/validator.js +3 -3
  70. package/dist/yaml.d.ts +2 -2
  71. package/dist/yaml.js +7 -7
  72. package/package.json +15 -6
  73. package/dist/chunk-W3SEWSO5.js +0 -8043
  74. package/dist/chunk-ZROVYWGU.js +0 -1
  75. package/dist/composition-C-hd_Ci3.d.ts +0 -3207
  76. package/dist/conversion-7OPM5MMJ.js +0 -24
@@ -234,6 +234,13 @@ type ImageSource = string;
234
234
  * via the `definition` "Background".
235
235
  */
236
236
  type Background = (ThemeBackground | SolidBackground | GradientBackground | ImageBackground | PatternBackground);
237
+ /**
238
+ * The scheme slot a color variant puts behind the slide (bg1): a light or dark slot, or an accent. On an accent the text side is the light family (tx1 = light1, tx2 = light2) or the dark family (tx1 = dark1, tx2 = dark2), whichever text slot has the higher contrast on that accent; tx2 falls back to tx1's slot where it is under 4.5:1 on the accent, and bg2 is the accent itself.
239
+ *
240
+ * This interface was referenced by `Presentation`'s JSON-Schema
241
+ * via the `definition` "ColorVariantSlot".
242
+ */
243
+ type ColorVariantSlot = ("light1" | "light2" | "dark1" | "dark2" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6");
237
244
  /**
238
245
  * Decorative watermark: an image ('src') or a text stamp ('text'), exactly one of the two, with its opacity. An image is drawn once per slide, contained and centered in a fixed frame (the middle 40% of the slide width and height, from 30% to 70% on each axis). A text watermark is one line of text in the heading font and the theme text color at the given opacity, centered on the slide and rotated 30 degrees counterclockwise (rising to the right), sized to span at most 70% of the slide width and at most 30% of the shorter slide edge in height; it is drawn behind the slide content and above the background. There is no option to move, scale, rotate or tile either form. PPTX export writes one native picture (image) or one native text box (text) per slide with the opacity as alpha, and import restores the watermark. A string or Asset (no opacity) is the image watermark at opacity 0.08. A watermark object needs opacity and exactly one of src and text; use a plain string or Asset for an image at the default opacity. Use design.watermark = false to disable an inherited watermark.
239
246
  *
@@ -453,7 +460,7 @@ type ContentPayload = {
453
460
  /**
454
461
  * Optional content kind. When omitted, engines infer the kind from the fields present.
455
462
  */
456
- type?: ("text" | "list" | "image" | "chart" | "table" | "video" | "code" | "metric" | "quote" | "timeline" | "group");
463
+ type?: ("text" | "list" | "image" | "chart" | "table" | "video" | "code" | "metric" | "quote" | "timeline" | "diagram" | "group");
457
464
  /**
458
465
  * Text payload. Use a string for plain text or TextRun[] for inline rich text. TextRun items may be plain strings or formatted run objects.
459
466
  */
@@ -471,7 +478,7 @@ type ContentPayload = {
471
478
  */
472
479
  numbering?: (NumberingStyle | Numbering | [(NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)]);
473
480
  /**
474
- * Lay the payload's `items` or `bullets` out in columns (OPF 0.19). 'auto' tries 1, 2 then 3 equal columns at the starting text size and uses the first count at which the list fits, as long as a column stays at least a quarter of the slide wide; when none fits, the largest allowed count shrinks towards minFontSize. 1, 2 or 3 fixes the count. Column breaks fall between items (a nested item stays with its parent) and keep the columns as even as possible; numbering continues and reading order runs column by column. A lone list in a layout region with listColumns: 'auto' behaves as 'auto'.
481
+ * Lay the payload's `items` or `bullets` out in columns (OPF 0.19). 'auto' tries 1, 2 then 3 equal columns at the starting text size and uses the first count at which the list fits, as long as a column stays at least a quarter of the slide wide; when none fits, the largest allowed count shrinks towards minFontSize. A list of 6 or fewer entries is never split by 'auto'; it shrinks in one column. 1, 2 or 3 fixes the count. Column breaks fall between items (a nested item stays with its parent) and keep the columns as even as possible; numbering continues and reading order runs column by column. A lone list in a layout region with listColumns: 'auto' behaves as 'auto'.
475
482
  */
476
483
  columns?: ("auto" | number);
477
484
  /**
@@ -500,9 +507,9 @@ type ContentPayload = {
500
507
  mediaType?: string;
501
508
  });
502
509
  /**
503
- * Image payloads only. How the picture fills its frame: 'cover' fills it and crops what overflows around focus; 'contain' shows the whole picture, in a frame of its own proportions placed at the region's anchor (top by default); 'stretch' scales it to the frame exactly. Default: the effective design.imageFit, else 'cover' in a layout and 'contain' on a slide with no layout.
510
+ * Image payloads only. How the picture fills its frame: 'cover' fills it and crops what overflows around focus; 'contain' shows the whole picture, in a frame of its own proportions placed at the region's anchor (top by default); 'stretch' scales it to the frame exactly; 'auto' covers when the crop keeps at least 85% of the picture's width or height and contains otherwise (an SVG, or a picture whose size cannot be read from the document, is contained), so a photo close to its frame's shape fills it and any other is shown whole. Default: the effective design.imageFit, else 'cover' in a layout and 'contain' on a slide with no layout.
504
511
  */
505
- fit?: ("cover" | "contain" | "stretch");
512
+ fit?: ("cover" | "contain" | "stretch" | "auto");
506
513
  focus?: ImageFocus1;
507
514
  /**
508
515
  * Image payloads only. Width-to-height ratio of the frame: the frame becomes the largest centered box with this ratio inside the block's region, for example 2.39 for a cinematic letterbox or 0.5 for a phone-shaped frame. shape 'circle' always uses 1.
@@ -595,7 +602,11 @@ type ContentPayload = {
595
602
  events: [TimelineEvent, ...(TimelineEvent)[]];
596
603
  });
597
604
  /**
598
- * Caption for an image, chart, table or video payload, composed inside the block's region (below the media by default). Invalid on other payload kinds and on groups.
605
+ * Diagram payload: Mermaid source (flowchart, sequence, state, class, ER, mindmap, timeline, journey, C4, architecture and the other built-in Mermaid families) drawn in the deck's fonts and colors. A string is shorthand for { "source": value }; object form carries the source syntax and a text alternative. Presence of this field infers type 'diagram'.
606
+ */
607
+ diagram?: (string | Diagram);
608
+ /**
609
+ * Caption for an image, chart, table, video or diagram payload, composed inside the block's region (below the media by default). Invalid on other payload kinds and on groups.
599
610
  */
600
611
  caption?: (string | TextRun[] | {
601
612
  /**
@@ -618,6 +629,10 @@ type ContentPayload = {
618
629
  */
619
630
  blocks?: [ContentPayload, ...(ContentPayload)[]];
620
631
  composition?: Composition;
632
+ /**
633
+ * true draws this block or group on the slide's emphasis surface: a contrasting card in its cell (a dark card on a light slide, an accent card on a dark one), from the deck's own scheme slots, with every text color on it at 4.5:1 or more against its fill. A slide has one emphasis surface: the first block or group with emphasis: true in reading order takes it, and any other is drawn without it (composition diagnostic emphasis-ignored). Without any, a slide's short last text block (60 characters or fewer) after longer blocks is drawn as a band at the foot of the body, and one of 30 or fewer after a lone long text as a pill right under that text; neither is drawn where it would cost another block its fitted size. Without any either, the second card of a before-and-after or problem-and-solution pair, or the one tier of a set marked recommended or most popular, takes the surface and the other cards of the pair or set are drawn on plain cards (read from the blocks' labels and short texts, never from ids). false keeps a block out of those automatic rules.
634
+ */
635
+ emphasis?: boolean;
621
636
  };
622
637
  /**
623
638
  * Identity of a catalog: an HTTPS URL ('https://www.pptx.gallery') or a package reference ('pkg:@acme/opf-catalog'). It names the catalog; engines never fetch or install it. A host registers the catalog's records under this exact string, and copying slides between documents matches groups by it.
@@ -1178,9 +1193,9 @@ interface Design {
1178
1193
  */
1179
1194
  background?: (BackgroundShortcut | Background);
1180
1195
  /**
1181
- * Optional color variant, as a background slot ('light1', 'light2', 'dark1', 'dark2'; the same as { background: slot }) or the object form, which is needed only for an accent order: which slot of the color scheme is the slide background (and so which are the text and the alternate surface), and optionally the order of the accents. A variant is a mapping over the same twelve-slot scheme, as PowerPoint's color map is, never a second scheme. Without it the background decides: a theme-slot background ('dark1', { type: 'theme', slot }) is the variant of that slot, a picture or gradient takes its 'tone', and any other background picks light or dark by its luminance. A slide's variant replaces the deck's whole, including its accent order.
1196
+ * Optional color variant, as a background slot ('light1', 'light2', 'dark1', 'dark2', or an accent 'accent1' to 'accent6'; the same as { background: slot }) or the object form, which is needed only for an accent order: which slot of the color scheme is the slide background (and so which are the text and the alternate surface), and optionally the order of the accents. A variant is a mapping over the same twelve-slot scheme, as PowerPoint's color map is, never a second scheme. Without it the background decides: a theme-slot background ('dark1', { type: 'theme', slot }) is the variant of that slot, a picture or gradient takes its 'tone', and any other background picks light or dark by its luminance. A slide's variant replaces the deck's whole, including its accent order. A slide's layout record can name a variant too (layout design.variant): it outranks the deck's and the theme's, and the slide's own variant or background still wins.
1182
1197
  */
1183
- variant?: (ThemeBackgroundSlot | ColorVariant);
1198
+ variant?: (ColorVariantSlot | ColorVariant);
1184
1199
  /**
1185
1200
  * Which logo covers, section dividers and picture bullets draw. Logos live on the organization (Organization.logo); without this field covers and sections draw the primary organization's full logo and picture bullets its icon. A logo reference overrides that: 'var:organization.beta.logo' draws organization beta's logo, and a reference that names a shape ('var:organization.logo.wordmark') draws that shape everywhere this field applies. false draws no logo. A slide's design.logo overrides the deck's; absence inherits. An override naming an organization without a logo draws nothing (validation warns). Placement (reference engines, vetoable): on a cover or section slide (no body payload on a heading-only layout such as title, title-subtitle or section-divider, or no layout) the logo is drawn at the top-left of the free area, inside the slide padding and below any header furniture, in a box 56 reference pixels tall and at most four times as wide; the tag/title/subtitle group then centers in the remaining span. Content slides never get an automatic logo; a header or footer zone places one with image: 'var:organization.logo.icon'. composeSlide returns the cover box as geometry.logo.
1186
1201
  */
@@ -1218,13 +1233,17 @@ interface Design {
1218
1233
  */
1219
1234
  chartPrimary?: ("none" | "top" | "bottom" | "left" | "right");
1220
1235
  /**
1221
- * Default fit of image blocks (and Slide.image) that set no fit of their own: 'cover' fills the frame and crops what overflows around the block's focus, 'contain' shows the whole picture in a frame of its own proportions, centered across and placed down the cell by the region's anchor (top by default), 'stretch' scales it to the frame exactly. Effective value: the slide's design, then the deck's design, then the theme's design.imageFit, then the layout record's design.imageFit, then 'cover'; a slide composed with no layout shows its pictures whole ('contain') instead. Backgrounds set their own fit.
1236
+ * Default fit of image blocks (and Slide.image) that set no fit of their own: 'cover' fills the frame and crops what overflows around the block's focus, 'contain' shows the whole picture in a frame of its own proportions, centered across and placed down the cell by the region's anchor (top by default), 'stretch' scales it to the frame exactly, 'auto' covers when the crop keeps at least 85% of the picture's width or height (its proportions read from the file, EXIF orientation applied) and contains otherwise; an SVG, or a picture whose size cannot be read from the document, is contained. Effective value: the slide's design, then the deck's design, then the theme's design.imageFit, then the layout record's design.imageFit, then 'cover'; a slide composed with no layout shows its pictures whole ('contain') instead. Backgrounds set their own fit.
1222
1237
  */
1223
- imageFit?: ("cover" | "contain" | "stretch");
1238
+ imageFit?: ("cover" | "contain" | "stretch" | "auto");
1224
1239
  /**
1225
1240
  * Marker style for items and bullets lists. Effective value: the slide's design, then the deck's design, then the theme's design.listBullet, then the layout record's design.listBullet, then 'character'. 'character' (the default) draws the glyph marker. 'image' draws the primary organization's icon logo (or the organization and shape design.logo names; the onDark value on dark backgrounds) as a picture bullet: a square with side 0.65 times the marker's font size whose bottom sits on the marker baseline, so list geometry does not change. Without a logo the glyph is drawn and the engine reports unresolved-content at this field. 'none' draws no marker and no hanging indent, so each entry's text (and its description) starts at the left edge of the list: use it for label-and-description lists such as pillars, team members and questions with answers. Nested levels keep their indent. A list that sets numbering still draws its numbers.
1226
1241
  */
1227
1242
  listBullet?: ("character" | "image" | "none");
1243
+ /**
1244
+ * How list entries are arranged (LH-08). 'stack' draws each entry's text with its description under it, the entries close together, as before. 'rows' draws ruled rows: a hairline between two first-level entries (the scheme's border neutral, 1 reference pixel), 0.8 em between rows and no bullet (a numbered list keeps its numbers); when every entry has a description and sits at the first level, the labels are bold and, when the widest fits 40% of the list's width on one line, sit in a column beside their descriptions, first baselines aligned, else each description sits under its label. Both engines draw the rules (PowerPoint: native lines). Effective value: the slide's design, then the deck's design, then the theme's design.listStyle, then the layout record's design.listStyle. Without one, a list of two or more first-level entries that each pair a short label (3 words or fewer, no full stop) with a description is drawn as rows when that sets no block of the slide smaller, and every other list is stacked.
1245
+ */
1246
+ listStyle?: ("stack" | "rows");
1228
1247
  /**
1229
1248
  * Draw the slide's template layout mirrored (OPF 0.19): each row's cells and the column sizes reversed, so a 'beside' layout puts its picture, chart or table at the end. Logical: a right-to-left deck mirrors on top. Binding and reading order do not change. Effective value: the slide's design, then the deck's design, then the layout record's design.mirror, then false. Slides without a template layout ignore it.
1230
1249
  */
@@ -1578,10 +1597,13 @@ interface ImageBackground {
1578
1597
  */
1579
1598
  light: (HexColor | ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6" | "dark1" | "dark2" | "light1" | "light2" | "hyperlink" | "followedHyperlink" | "primary" | "secondary" | "accent" | "background" | "surface" | "surfaceAlt" | "text" | "textSecondary") | string);
1580
1599
  });
1581
- overlay?: Overlay;
1600
+ /**
1601
+ * Scrim over the whole picture or a band along one edge (edge, size), beneath furniture and content, for example to keep a title readable over a busy photo. Without an overlay, core draws an automatic scrim in the slide's background color behind text that sits on the picture, at the lowest opacity that keeps it at 4.5:1 over any picture (a gradient from the edge the text is near, or a band across it). An overlay of the author's replaces the automatic scrim, and false turns it off.
1602
+ */
1603
+ overlay?: (Overlay | false);
1582
1604
  }
1583
1605
  /**
1584
- * Point of the picture to keep in view when 'cover' crops it. Ignored by the other fits.
1606
+ * Point of the picture to keep in view when 'cover' crops it. Ignored by the other fits. Without a focus a portrait picture (taller than wide) cropped into a wider frame keeps y 0.3 so heads stay in frame; every other crop is centered.
1585
1607
  */
1586
1608
  interface ImageFocus {
1587
1609
  /**
@@ -1594,7 +1616,10 @@ interface ImageFocus {
1594
1616
  y: number;
1595
1617
  }
1596
1618
  /**
1597
- * Scrim over the whole picture or a band along one edge (edge, size), beneath furniture and content, for example to keep a title readable over a busy photo.
1619
+ * Solid scrim over a picture: the whole frame in the frame's shape, or a band along one edge. Shared by image backgrounds and image blocks. Drawn directly above its picture and beneath headings and content; PowerPoint export writes one native shape above the picture.
1620
+ *
1621
+ * This interface was referenced by `Presentation`'s JSON-Schema
1622
+ * via the `definition` "Overlay".
1598
1623
  */
1599
1624
  interface Overlay {
1600
1625
  /**
@@ -1650,16 +1675,16 @@ interface PatternBackground {
1650
1675
  [k: string]: unknown;
1651
1676
  }
1652
1677
  /**
1653
- * A variant of the deck's single color scheme, as a mapping over its twelve slots (PowerPoint's clrMap): 'background' is the slot the slide background and the role bg1 take, and with it the other roles: light1 maps bg1 = light1, tx1 = dark1, bg2 = light2, tx2 = dark2; dark1 maps bg1 = dark1, tx1 = light1, bg2 = dark2, tx2 = light2; light2 and dark2 make that slot both the background and the alternate surface (light2: bg1 = bg2 = light2, tx1 = dark1, tx2 = dark2; dark2: bg1 = bg2 = dark2, tx1 = light1, tx2 = light2), which is how a slide with that theme background has always been drawn. Text, secondary text, the card surface and every neutral (borders, gridlines, chart axis, code panel) follow the map. The PowerPoint export writes it as the master's clrMap, or a slide's clrMapOvr.
1678
+ * A variant of the deck's single color scheme, as a mapping over its twelve slots (PowerPoint's clrMap): 'background' is the slot the slide background and the role bg1 take, and with it the other roles: light1 maps bg1 = light1, tx1 = dark1, bg2 = light2, tx2 = dark2; dark1 maps bg1 = dark1, tx1 = light1, bg2 = dark2, tx2 = light2; light2 and dark2 make that slot both the background and the alternate surface (light2: bg1 = bg2 = light2, tx1 = dark1, tx2 = dark2; dark2: bg1 = bg2 = dark2, tx1 = light1, tx2 = light2), which is how a slide with that theme background has always been drawn. An accent background (accent1 to accent6) is both bg1 and bg2, with the text family (light1 and light2, or dark1 and dark2) that reads better on it; see ColorVariantSlot. Text, secondary text, the card surface and every neutral (borders, gridlines, chart axis, code panel) follow the map. The PowerPoint export writes it as the master's clrMap, or a slide's clrMapOvr.
1654
1679
  *
1655
1680
  * This interface was referenced by `Presentation`'s JSON-Schema
1656
1681
  * via the `definition` "ColorVariant".
1657
1682
  */
1658
1683
  interface ColorVariant {
1659
1684
  /**
1660
- * PowerPoint theme-controlled slide background slot from the active color scheme. These are slots, not assumptions about actual colors: light1 is usually white and dark1 is usually black by convention, but the color scheme controls the real values.
1685
+ * The scheme slot a color variant puts behind the slide (bg1): a light or dark slot, or an accent. On an accent the text side is the light family (tx1 = light1, tx2 = light2) or the dark family (tx1 = dark1, tx2 = dark2), whichever text slot has the higher contrast on that accent; tx2 falls back to tx1's slot where it is under 4.5:1 on the accent, and bg2 is the accent itself.
1661
1686
  */
1662
- background: ("light1" | "light2" | "dark1" | "dark2");
1687
+ background: ("light1" | "light2" | "dark1" | "dark2" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6");
1663
1688
  /**
1664
1689
  * Optional accent order: a permutation of accent1 to accent6. Entry i is the scheme slot drawn as accent i + 1, so primary, secondary and accent (the first three) and the chart series colors follow it. Default: the scheme's own order.
1665
1690
  *
@@ -2112,7 +2137,7 @@ interface Slide {
2112
2137
  /**
2113
2138
  * Optional full-slide content kind. When omitted, engines infer the kind from root payload fields.
2114
2139
  */
2115
- type?: ("text" | "list" | "image" | "chart" | "table" | "video" | "code" | "metric" | "quote" | "timeline");
2140
+ type?: ("text" | "list" | "image" | "chart" | "table" | "video" | "code" | "metric" | "quote" | "timeline" | "diagram");
2116
2141
  /**
2117
2142
  * Optional reference to one or more beats of the deck's narrative (each value is the id of a beat in the narrative record that the root 'narrative' resolves to). A single string declares the slide's primary beat; an array declares that one slide covers multiple beats. Declares the slide's role in the story arc; does not constrain ordering or structure. Core validate warns about a beat id the resolved narrative does not define, and reports a beat that no slide references. Slides without a beat are valid; multiple slides may share a beat.
2118
2143
  */
@@ -2130,7 +2155,7 @@ interface Slide {
2130
2155
  */
2131
2156
  subtitle?: (string | TextRun[]);
2132
2157
  /**
2133
- * Small slide-level label or badge. A v2 layout renders this before the title in its title heading group; tag is not a separate layout area. Use a string for plain text or TextRun[] for inline rich text (a colored word, bold, a link, a citation or footnote marker); the heading keeps its size and fitting rules either way, and run colors resolve like body text.
2158
+ * Small slide-level label or badge. A v2 layout renders this before the title in its title heading group; tag is not a separate layout area. Engines draw it as an eyebrow (LH-32): 22 reference pixels, bold, in the primary color (the text color where that is under 4.5:1 on the background) and, where its script has case, in capitals with 0.08 em of letter spacing (PowerPoint: cap=all and spc on the authored text). Use a string for plain text or TextRun[] for inline rich text (a colored word, bold, a link, a citation or footnote marker); the heading keeps its size and fitting rules either way, and run colors resolve like body text.
2134
2159
  */
2135
2160
  tag?: (string | TextRun[]);
2136
2161
  /**
@@ -2233,7 +2258,11 @@ interface Slide {
2233
2258
  events: [TimelineEvent, ...(TimelineEvent)[]];
2234
2259
  });
2235
2260
  /**
2236
- * Caption for the slide's root image, chart, table or video payload. Valid only when the slide root holds exactly one of those payloads.
2261
+ * Full-slide diagram payload: Mermaid source drawn in the deck's fonts and colors. A string is shorthand for { "source": value }; object form carries the source syntax and a text alternative. Presence of this field infers type 'diagram'.
2262
+ */
2263
+ diagram?: (string | Diagram);
2264
+ /**
2265
+ * Caption for the slide's root image, chart, table, video or diagram payload. Valid only when the slide root holds exactly one of those payloads.
2237
2266
  */
2238
2267
  caption?: (string | TextRun[] | {
2239
2268
  /**
@@ -2569,6 +2598,15 @@ interface Table {
2569
2598
  * Text alternative for the table: what it shows (the point and the key numbers), not 'a table'. The preview exposes it as the table's accessible name (role group with aria-label; the cells stay readable) and the PowerPoint export writes it as the table frame's alternative text (descr); import reads it back. An empty string hides a purely decorative table, with the same meaning as an empty Asset alt. The alt is a summary read before the cells, which stay readable, so it is most useful for a large or dense table; validate does not require one and does not report a missing one.
2570
2599
  */
2571
2600
  alt?: string;
2601
+ /**
2602
+ * Optional emphasis: the body rows that carry the message, named by their first-column (key) text exactly as 'chart.highlight' names categories, as text; a key shared by several rows highlights each of them. The engines draw a highlighted row on an accent tint of the table surface (15% of the deck's primary color, mixed less where the cell text would fall under 4.5:1); a cell with its own 'style.fill' keeps it. Absent, the engines highlight the rows the slide's other texts name (its title, a sentence, a list entry, a quote or a chart's alt) when they agree on some rows but not all; an empty 'rows' list turns that off. PPTX export writes the tint as each cell's fill and import restores the list. A name no row has is a 'table-highlight-unknown-name' error.
2603
+ */
2604
+ highlight?: {
2605
+ /**
2606
+ * Key texts (the first cell of each body row, as text) of the rows to highlight.
2607
+ */
2608
+ rows: string[];
2609
+ };
2572
2610
  }
2573
2611
  /**
2574
2612
  * A cell with explicit visual style or merged geometry. Its position remains its array column index; use null placeholders for every covered grid position.
@@ -2734,7 +2772,7 @@ interface Metric {
2734
2772
  */
2735
2773
  delta?: (string | number);
2736
2774
  /**
2737
- * Metric trend direction. The preview and the PowerPoint export draw an arrow beside the trend word that always points the way the trend does (up, down or flat) and colour the arrow, the trend word and the delta text by `sentiment`.
2775
+ * Metric trend direction. The preview and the PowerPoint export draw it as an arrow that always points the way the trend does (up, down or flat), before the delta on its line (or before the label without a delta), and color the arrow and the delta text by `sentiment`. The word itself is not drawn; it is the arrow's text alternative.
2738
2776
  */
2739
2777
  trend?: ("up" | "down" | "flat");
2740
2778
  /**
@@ -2816,7 +2854,27 @@ interface TimelineEvent {
2816
2854
  status?: ("done" | "current" | "planned");
2817
2855
  }
2818
2856
  /**
2819
- * Image payloads only. Point of the picture to keep in view when 'cover' crops it. Ignored by the other fits.
2857
+ * A diagram written as text. Engines parse the source, lay it out with the deck's measured fonts at the largest type size that fits the block, and draw it in the slide's resolved colors (color scheme, variant, color map and background); the PPTX export writes it as a native SVG picture with a PNG fallback. A string value in a diagram field is shorthand for { "source": value }.
2858
+ *
2859
+ * This interface was referenced by `Presentation`'s JSON-Schema
2860
+ * via the `definition` "Diagram".
2861
+ */
2862
+ interface Diagram {
2863
+ /**
2864
+ * The diagram source. With syntax 'mermaid' (the default) it is Mermaid 12.1 text whose first line names the diagram type (flowchart, sequenceDiagram, classDiagram, stateDiagram-v2, erDiagram, gantt, pie, mindmap, timeline, journey, quadrantChart, xychart, sankey, gitGraph, C4Context, block, architecture-beta, kanban, packet, radar-beta, treemap, venn-beta, ishikawa, requirementDiagram and the other built-in families; ZenUML is not supported). Mermaid themes, colors in themeVariables and click callbacks are ignored: the deck's design decides the colors and fonts.
2865
+ */
2866
+ source: string;
2867
+ /**
2868
+ * The language of 'source'. Mermaid is the only syntax today.
2869
+ */
2870
+ syntax?: "mermaid";
2871
+ /**
2872
+ * Text alternative that says what the diagram shows. Exported as the picture's description. Without it, engines derive one from the diagram's labels.
2873
+ */
2874
+ alt?: string;
2875
+ }
2876
+ /**
2877
+ * Image payloads only. Point of the picture to keep in view when 'cover' crops it. Ignored by the other fits. Without a focus a portrait picture (taller than wide) cropped into a wider frame keeps y 0.3 so heads stay in frame; every other crop is centered.
2820
2878
  */
2821
2879
  interface ImageFocus1 {
2822
2880
  /**
@@ -2847,7 +2905,7 @@ interface ImageBorder {
2847
2905
  width: number;
2848
2906
  }
2849
2907
  /**
2850
- * Image payloads only. Scrim over the picture in the frame's shape, or a band along one edge of a rectangle frame.
2908
+ * Solid scrim over a picture: the whole frame in the frame's shape, or a band along one edge. Shared by image backgrounds and image blocks. Drawn directly above its picture and beneath headings and content; PowerPoint export writes one native shape above the picture.
2851
2909
  */
2852
2910
  interface Overlay1 {
2853
2911
  /**
@@ -2952,9 +3010,18 @@ interface Table1 {
2952
3010
  * Text alternative for the table: what it shows (the point and the key numbers), not 'a table'. The preview exposes it as the table's accessible name (role group with aria-label; the cells stay readable) and the PowerPoint export writes it as the table frame's alternative text (descr); import reads it back. An empty string hides a purely decorative table, with the same meaning as an empty Asset alt. The alt is a summary read before the cells, which stay readable, so it is most useful for a large or dense table; validate does not require one and does not report a missing one.
2953
3011
  */
2954
3012
  alt?: string;
3013
+ /**
3014
+ * Optional emphasis: the body rows that carry the message, named by their first-column (key) text exactly as 'chart.highlight' names categories, as text; a key shared by several rows highlights each of them. The engines draw a highlighted row on an accent tint of the table surface (15% of the deck's primary color, mixed less where the cell text would fall under 4.5:1); a cell with its own 'style.fill' keeps it. Absent, the engines highlight the rows the slide's other texts name (its title, a sentence, a list entry, a quote or a chart's alt) when they agree on some rows but not all; an empty 'rows' list turns that off. PPTX export writes the tint as each cell's fill and import restores the list. A name no row has is a 'table-highlight-unknown-name' error.
3015
+ */
3016
+ highlight?: {
3017
+ /**
3018
+ * Key texts (the first cell of each body row, as text) of the rows to highlight.
3019
+ */
3020
+ rows: string[];
3021
+ };
2955
3022
  }
2956
3023
  /**
2957
- * Arrangement within this group. Only minFontSize and overflow inherit from the parent; strict overflow cannot be weakened.
3024
+ * Arrangement within this group. Only minFontSize, maxFontSize and overflow inherit from the parent; strict overflow cannot be weakened.
2958
3025
  */
2959
3026
  interface Composition {
2960
3027
  /**
@@ -2984,6 +3051,10 @@ interface Composition {
2984
3051
  * Minimum readable text size in reference pixels at a 720-pixel canvas short edge. Default 16. Overflow is diagnosed when text cannot fit at this size.
2985
3052
  */
2986
3053
  minFontSize?: number;
3054
+ /**
3055
+ * Largest body text size in reference pixels at a 720-pixel canvas short edge: paragraphs, lists, quotes, metrics and timelines are never set larger, their growth included (headings, tables, code and charts keep their sizes). Never lowers text under minFontSize. paginate writes it on the pages after the first, so the pages of one slide share its type sizes.
3056
+ */
3057
+ maxFontSize?: number;
2987
3058
  /**
2988
3059
  * warn returns diagnostics for content that does not fit; error rejects layout. Content is never silently removed. Default warn.
2989
3060
  */
@@ -3025,9 +3096,9 @@ interface Design1 {
3025
3096
  */
3026
3097
  background?: (BackgroundShortcut | Background);
3027
3098
  /**
3028
- * Optional color variant, as a background slot ('light1', 'light2', 'dark1', 'dark2'; the same as { background: slot }) or the object form, which is needed only for an accent order: which slot of the color scheme is the slide background (and so which are the text and the alternate surface), and optionally the order of the accents. A variant is a mapping over the same twelve-slot scheme, as PowerPoint's color map is, never a second scheme. Without it the background decides: a theme-slot background ('dark1', { type: 'theme', slot }) is the variant of that slot, a picture or gradient takes its 'tone', and any other background picks light or dark by its luminance. A slide's variant replaces the deck's whole, including its accent order.
3099
+ * Optional color variant, as a background slot ('light1', 'light2', 'dark1', 'dark2', or an accent 'accent1' to 'accent6'; the same as { background: slot }) or the object form, which is needed only for an accent order: which slot of the color scheme is the slide background (and so which are the text and the alternate surface), and optionally the order of the accents. A variant is a mapping over the same twelve-slot scheme, as PowerPoint's color map is, never a second scheme. Without it the background decides: a theme-slot background ('dark1', { type: 'theme', slot }) is the variant of that slot, a picture or gradient takes its 'tone', and any other background picks light or dark by its luminance. A slide's variant replaces the deck's whole, including its accent order. A slide's layout record can name a variant too (layout design.variant): it outranks the deck's and the theme's, and the slide's own variant or background still wins.
3029
3100
  */
3030
- variant?: (ThemeBackgroundSlot | ColorVariant);
3101
+ variant?: (ColorVariantSlot | ColorVariant);
3031
3102
  /**
3032
3103
  * Which logo covers, section dividers and picture bullets draw. Logos live on the organization (Organization.logo); without this field covers and sections draw the primary organization's full logo and picture bullets its icon. A logo reference overrides that: 'var:organization.beta.logo' draws organization beta's logo, and a reference that names a shape ('var:organization.logo.wordmark') draws that shape everywhere this field applies. false draws no logo. A slide's design.logo overrides the deck's; absence inherits. An override naming an organization without a logo draws nothing (validation warns). Placement (reference engines, vetoable): on a cover or section slide (no body payload on a heading-only layout such as title, title-subtitle or section-divider, or no layout) the logo is drawn at the top-left of the free area, inside the slide padding and below any header furniture, in a box 56 reference pixels tall and at most four times as wide; the tag/title/subtitle group then centers in the remaining span. Content slides never get an automatic logo; a header or footer zone places one with image: 'var:organization.logo.icon'. composeSlide returns the cover box as geometry.logo.
3033
3104
  */
@@ -3065,13 +3136,17 @@ interface Design1 {
3065
3136
  */
3066
3137
  chartPrimary?: ("none" | "top" | "bottom" | "left" | "right");
3067
3138
  /**
3068
- * Default fit of image blocks (and Slide.image) that set no fit of their own: 'cover' fills the frame and crops what overflows around the block's focus, 'contain' shows the whole picture in a frame of its own proportions, centered across and placed down the cell by the region's anchor (top by default), 'stretch' scales it to the frame exactly. Effective value: the slide's design, then the deck's design, then the theme's design.imageFit, then the layout record's design.imageFit, then 'cover'; a slide composed with no layout shows its pictures whole ('contain') instead. Backgrounds set their own fit.
3139
+ * Default fit of image blocks (and Slide.image) that set no fit of their own: 'cover' fills the frame and crops what overflows around the block's focus, 'contain' shows the whole picture in a frame of its own proportions, centered across and placed down the cell by the region's anchor (top by default), 'stretch' scales it to the frame exactly, 'auto' covers when the crop keeps at least 85% of the picture's width or height (its proportions read from the file, EXIF orientation applied) and contains otherwise; an SVG, or a picture whose size cannot be read from the document, is contained. Effective value: the slide's design, then the deck's design, then the theme's design.imageFit, then the layout record's design.imageFit, then 'cover'; a slide composed with no layout shows its pictures whole ('contain') instead. Backgrounds set their own fit.
3069
3140
  */
3070
- imageFit?: ("cover" | "contain" | "stretch");
3141
+ imageFit?: ("cover" | "contain" | "stretch" | "auto");
3071
3142
  /**
3072
3143
  * Marker style for items and bullets lists. Effective value: the slide's design, then the deck's design, then the theme's design.listBullet, then the layout record's design.listBullet, then 'character'. 'character' (the default) draws the glyph marker. 'image' draws the primary organization's icon logo (or the organization and shape design.logo names; the onDark value on dark backgrounds) as a picture bullet: a square with side 0.65 times the marker's font size whose bottom sits on the marker baseline, so list geometry does not change. Without a logo the glyph is drawn and the engine reports unresolved-content at this field. 'none' draws no marker and no hanging indent, so each entry's text (and its description) starts at the left edge of the list: use it for label-and-description lists such as pillars, team members and questions with answers. Nested levels keep their indent. A list that sets numbering still draws its numbers.
3073
3144
  */
3074
3145
  listBullet?: ("character" | "image" | "none");
3146
+ /**
3147
+ * How list entries are arranged (LH-08). 'stack' draws each entry's text with its description under it, the entries close together, as before. 'rows' draws ruled rows: a hairline between two first-level entries (the scheme's border neutral, 1 reference pixel), 0.8 em between rows and no bullet (a numbered list keeps its numbers); when every entry has a description and sits at the first level, the labels are bold and, when the widest fits 40% of the list's width on one line, sit in a column beside their descriptions, first baselines aligned, else each description sits under its label. Both engines draw the rules (PowerPoint: native lines). Effective value: the slide's design, then the deck's design, then the theme's design.listStyle, then the layout record's design.listStyle. Without one, a list of two or more first-level entries that each pair a short label (3 words or fewer, no full stop) with a description is drawn as rows when that sets no block of the slide smaller, and every other list is stacked.
3148
+ */
3149
+ listStyle?: ("stack" | "rows");
3075
3150
  /**
3076
3151
  * Draw the slide's template layout mirrored (OPF 0.19): each row's cells and the column sizes reversed, so a 'beside' layout puts its picture, chart or table at the end. Logical: a right-to-left deck mirrors on top. Binding and reading order do not change. Effective value: the slide's design, then the deck's design, then the layout record's design.mirror, then false. Slides without a template layout ignore it.
3077
3152
  */
@@ -3079,7 +3154,7 @@ interface Design1 {
3079
3154
  [k: string]: unknown;
3080
3155
  }
3081
3156
  /**
3082
- * Automatic slide and content-group arrangement. Nested content groups arrange their children independently, inheriting only minFontSize and overflow. Explicit promoted regions retain their positions. A layout defines its grid as one ordered list of regions; its composition supports gap, padding, minFontSize and overflow rather than mode, columns or weights.
3157
+ * Automatic slide and content-group arrangement. Nested content groups arrange their children independently, inheriting only minFontSize, maxFontSize and overflow. Explicit promoted regions retain their positions. A layout defines its grid as one ordered list of regions; its composition supports gap, padding, minFontSize, maxFontSize and overflow rather than mode, columns or weights.
3083
3158
  *
3084
3159
  * This interface was referenced by `Presentation`'s JSON-Schema
3085
3160
  * via the `definition` "Composition".
@@ -3112,6 +3187,10 @@ interface Composition1 {
3112
3187
  * Minimum readable text size in reference pixels at a 720-pixel canvas short edge. Default 16. Overflow is diagnosed when text cannot fit at this size.
3113
3188
  */
3114
3189
  minFontSize?: number;
3190
+ /**
3191
+ * Largest body text size in reference pixels at a 720-pixel canvas short edge: paragraphs, lists, quotes, metrics and timelines are never set larger, their growth included (headings, tables, code and charts keep their sizes). Never lowers text under minFontSize. paginate writes it on the pages after the first, so the pages of one slide share its type sizes.
3192
+ */
3193
+ maxFontSize?: number;
3115
3194
  /**
3116
3195
  * warn returns diagnostics for content that does not fit; error rejects layout. Content is never silently removed. Default warn.
3117
3196
  */
@@ -1,7 +1,7 @@
1
1
  import './chunk-GM7WFPGG.js';
2
2
 
3
3
  // src/generated/repo-readme.ts
4
- var repoReadmeRaw = '<p align="center">\n <picture>\n <source media="(prefers-color-scheme: dark)" srcset="docs/brand/opf-logo-dark.svg">\n <img src="docs/brand/opf-logo.svg" alt="Open Presentation Format" width="64" height="64">\n </picture>\n</p>\n\n# Open Presentation Format (OPF)\n\n[![npm version](https://img.shields.io/npm/v/@openpresentation/opf?label=npm)](https://www.npmjs.com/package/@openpresentation/opf)\n[![npm downloads](https://img.shields.io/npm/dw/@openpresentation/opf)](https://www.npmjs.com/package/@openpresentation/opf)\n[![license](https://img.shields.io/npm/l/@openpresentation/opf)](./LICENSE)\n[![CI](https://github.com/OpenPresentation/opf/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/OpenPresentation/opf/actions/workflows/ci.yml)\n[![nightly](https://github.com/OpenPresentation/opf/actions/workflows/nightly.yml/badge.svg?branch=main)](https://github.com/OpenPresentation/opf/actions/workflows/nightly.yml)\n\nPublic npm package: [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf) (`npm install @openpresentation/opf`).\n\nOpen Presentation Format is the portable, human-readable JSON document format for slide decks.\n\nThis repository is the canonical home for the OPF **spec**, **JSON Schemas**, **catalog presets**, examples, generated developer types, local validation tooling, and integration docs for the render/edit/convert toolkit. OpenPresentation publishes open-source code and documentation only; it does not provide hosted APIs, hosted rendering functions, queues, storage, authentication, jobs, previews, SLAs, telemetry, or managed infrastructure.\n\nFor AI agents, use the [OPF skill set](docs/agent-skills.md) for authoring, layout, presets, editing, export, and schema inspection.\n\nPublished CLI 0.18.0 installs all six skills into your project with `npx @openpresentation/cli@0.18.0 skills install`. It uses local copies, preserves existing instructions and refuses to overwrite customized skills. See the [installation and update guide](docs/agent-skills.md) for personal or agent-specific targets and source development.\n\nFor a fresh Node 24 project that installs **published** packages (not this\ncheckout), follow the [developer quickstart](docs/quickstart.md) and the\n[compatibility matrix](docs/compatibility-matrix.md).\n\nFor LLM authoring, start with [the authoring guide](docs/llm-authoring.md), [dynamic composition](docs/dynamic-composition.md), and [local ecosystem verification](docs/ecosystem-development.md).\n\n## File naming\n\nOpen Presentation Format documents are JSON files. Use `*.opf.json` for complete OPF presentation documents, for example `board-review.opf.json` or `deck.opf.json`.\n\nAvoid using bare `*.opf` for OPF JSON. The `.opf` extension is already used by other document and project formats, while `.opf.json` keeps the OPF identity and still makes the underlying JSON format clear to editors, validators, agents, and version-control tooling.\n\n## Naming and reuse\n\nThe format name is **Open Presentation Format**. The schemas, catalogs, packages, and local tooling in this repository are free and open source under the MIT license, so third-party tools may read, write, validate, render, convert, and describe support for Open Presentation Format without adopting any product-specific branding.\n\n## Why OPF\n\n`.pptx` is a zipped bundle of XML. Humans can\'t diff it, LLMs can\'t read or write it reliably, and git can\'t track it meaningfully. Every change looks like a binary blob.\n\nOPF is plain JSON. A human can open it in an editor. A model can read and write it without guessing at schema-by-example. Decks live in git like the rest of your work.\n\nThat\'s the shift that lets LLMs actually *author* decks. When the format stops fighting them, models can do the work that matters \u2014 narrative structure, persuasive framing, data analysis, chart recommendations, ruthless revision passes \u2014 instead of wrestling with `<p:sp>` tags.\n\nAnd they don\'t start from a blank canvas. [pptx.gallery](https://pptx.gallery) is the human-browsable reference for OPF catalog presets: layouts, themes, color schemes, font schemes, chart types, narratives, audiences, purposes, tones, languages, and social platforms.\n\n## Start in three steps\n\n1. **Install the coordinated published packages** on Node 24. See [the developer quickstart](docs/quickstart.md) for the currently recorded registry pin set: core, renderer, PPTX, editor, CLI and Gallery, all at the shared version 0.26.1. The default catalog is supplied by `@openpresentation/gallery@0.26.1`; see the [compatibility matrix](docs/compatibility-matrix.md) for feature and native limits.\n2. **Author, validate, paginate, preview and export.** New to OPF? Run the [first deck](docs/first-deck/README.md) end to end first. Copy [`docs/quickstart/developer-quickstart.opf.json`](./docs/quickstart/developer-quickstart.opf.json) and run the commands in that guide. From code, `convert("deck.opf.md", "deck.pdf")` of `@openpresentation/opf` is the simple path to a PDF, PNG, SVG or PPTX file. `validate` / `opf validate` is one local checker for format, references, accessibility, layout and content ([guide](docs/validate.md)), not visual verification.\n3. **Know the limits.** PPTX export writes one text box per wrapped line, so text edited in PowerPoint or Keynote does not reflow (see [rich text](docs/rich-text.md)) unless you opt in to `--body-text native` (opf-pptx and CLI 0.22.0 or later), and fonts are named, not embedded. The [compatibility matrix](docs/compatibility-matrix.md) lists shipped APIs versus renderer issue 24, native PowerPoint issue 87, and other deferred work. Browse presets at [pptx.gallery](https://pptx.gallery).\n\nYour deck can live in git from the first commit. After installing dependencies and supplying referenced assets, these commands run locally without a model provider, account or hosted OPF API.\n\n## JavaScript and TypeScript\n\nThe canonical JavaScript/TypeScript package is published at [`packages/javascript`](./packages/javascript) as [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf). The schema is pre-stable (0.x \u2014 expect breaking changes between minor versions until 1.0). Its responsibility is local and format-level only:\n\n- export the canonical schemas from [`spec/`](./spec)\n- register the pptx.gallery catalog of [`@openpresentation/gallery`](./packages/gallery) (a dependency, released with core at the same version) as the Node defaults, as the CLI does; a browser host registers it itself\n- export a typed raw spec file manifest for package-addressable `spec/` content\n- generate TypeScript types, with `Presentation` as the top-level type\n- validate OPF JSON and catalog records locally\n\nIn Node (and Bun and Deno) its root also reads and writes files (`convert`, `open`, `save`) and draws them through the optional engines below; in a browser or a worker the same import is a browser-safe build with the same names, where those three reject with `node-only`. Every other entry runs in a browser. It does not generate content with AI, fetch remote catalogs, call hosted APIs, or provide managed services. Render/edit/convert packages live in this repository as separate MIT packages that depend on `@openpresentation/opf`. The format package also exposes pure composition geometry so those packages share layout behavior.\n\n## Toolkit libraries\n\nOPF is seven packages. **Core** (`@openpresentation/opf`) is the format and its API: it reads and writes the text formats (JSON, YAML, Markdown) and validates, and in Node reads and writes files, through the same import. **The gallery** (`@openpresentation/gallery`) is the pptx.gallery catalog of layouts, themes, colour and font schemes and the other records, released with the other packages; core depends on it and registers it in Node. **The CLI** (`@openpresentation/cli`) is the `opf` command. **The MCP server** (`@openpresentation/mcp`, `npx -y @openpresentation/mcp`) lets an MCP-native agent learn OPF (docs, schemas, catalog, examples and skills as resources) and validate and convert decks. **Render** (`opf-render`), **PPTX** (`opf-pptx`) and **the editor** (`opf-editor`) are the engines: drawing, PowerPoint and editing, installed as needed. All seven live in this repository (`packages/`) and are released together at one version. See [ecosystem development](docs/ecosystem-development.md) for local builds and verification, and [dynamic composition](docs/dynamic-composition.md) for portable layout rules.\n\n| Package | Role | Boundary |\n|---|---|---|\n| [`packages/javascript`](./packages/javascript) (`@openpresentation/opf`) | Core: format, schemas, validation, composition | The format and its API; reads and writes files in Node and draws through the optional engines |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The pptx.gallery catalog | Catalog records only, no runtime dependency; records are authored by pull request here, and a changed drawing or a removed record needs a minor release |\n| [`packages/cli`](./packages/cli) (`@openpresentation/cli`) | `opf` command | Runs core\'s Node engine: reads and writes files and calls the engines below as optional peers |\n| [`packages/render`](./packages/render) (`@openpresentation/opf-render`) | OPF to SVG/PNG/PDF | Local and embeddable rendering library |\n| [`packages/editor`](./packages/editor) (`@openpresentation/opf-editor`) | WYSIWYG bindings/components | Headless editor primitives plus optional UI components |\n| [`packages/pptx`](./packages/pptx) (`@openpresentation/opf-pptx`) | OPF to PPTX and PPTX to OPF | Pure local import/export library for browser and server use where supported |\n\nThese packages provide OSS primitives only. Downstream applications own hosting, auth, storage, collaboration, queues, previews, analytics, support, and workflow UX.\n\n## Usage\n\nInstall from npm:\n\n```sh\npnpm add @openpresentation/opf\n# or: npm install @openpresentation/opf\n```\n\nTo work on the packages, clone this repo and build the workspace (all seven packages are in `packages/`; see [CONTRIBUTING](./CONTRIBUTING.md)):\n\n```sh\npnpm install\npnpm build\n```\n\nUse the format package from JavaScript or TypeScript:\n\n```ts\nimport { presentation, validate } from "@openpresentation/opf";\nimport { gallery } from "@openpresentation/gallery";\n\nimport type { Presentation } from "@openpresentation/opf";\n\nconst deck: Presentation = {\n name: "Quarterly Review",\n slides: [{ title: "Quarterly Review", items: ["Revenue", "Product", "Hiring"] }],\n};\n\nconst report = validate(deck);\nconsole.log(report.valid); // no finding has severity "error"\nconsole.log(report.findings); // every finding: rule id, severity, category, JSON Pointer path, message, fixes\n// Core ships no catalog records; in Node, validate registers the gallery when a call names no catalogs, and a host may name its own.\nconsole.log(validate({ ...deck, design: { theme: "classic" } }, { catalogs: [gallery] }).valid);\nconsole.log(Object.keys(gallery.audiences).length);\n```\n\nConvert, open and save files in Node with `@openpresentation/opf`, the same import a browser uses (the engines `@openpresentation/opf-render` and `@openpresentation/opf-pptx` are optional peers, installed as needed; see [OPF files in Node](docs/node.md)):\n\n```ts\nimport * as opf from "@openpresentation/opf";\n\nawait opf.convert("deck.opf.md", "deck.pdf");\nconst deck = await opf.open("deck.opf.md");\ndeck.slides.push({ title: "Q4" });\nawait opf.save(deck, "deck.opf.md");\nconst { files } = await opf.convert(deck, { format: "pptx" }); // bytes, nothing written\n```\n\nUse focused imports when you only need one surface:\n\n```ts\nimport { presentation } from "@openpresentation/opf/schemas";\nimport { specFileEntries } from "@openpresentation/opf/spec-files";\nimport { validate } from "@openpresentation/opf/validator";\nimport type { Presentation } from "@openpresentation/opf/types";\n```\n\nUse raw JSON when an engine or resolver needs package-addressable files:\n\n```ts\nimport presentationSchema from "@openpresentation/opf/spec/schemas/opf.schema.json" with {\n type: "json",\n};\n```\n\nUse the [installable OPF CLI](./packages/cli/README.md) to create, validate, and edit files locally:\n\n```sh\npnpm --filter @openpresentation/cli build\nnode packages/cli/dist/index.js create deck.opf.json --title "Decision brief"\nnode packages/cli/dist/index.js validate deck.opf.json\nnode packages/cli/dist/index.js edit deck.opf.json --patch changes.json --in-place\n```\n\nSee [CSV and JSON data import](./docs/data-import.md) for editable tables and charts in the editor, CLI, and package API, and [content conversions](./docs/conversions.md) for the pure converters (`@openpresentation/opf/convert`) that change a block\'s kind, nest list items, restructure a slide and split or merge slides, and [Markdown and outlines](./docs/markdown.md) for the deterministic Markdown dialect (`@openpresentation/opf/markdown`, `opf convert deck.md deck.opf.json`) that reads and writes a whole deck as text.\n\n[OPF as YAML](./docs/yaml.md) describes the strict YAML form of a deck (`@openpresentation/opf/yaml`, `opf convert deck.opf.json deck.opf.yaml`, `.opf.yaml` files in every command, editor autocomplete); JSON stays the canonical form. A deck can equally be a Markdown file, `deck.opf.md`: every command reads and writes it (see [Markdown decks in every command](./docs/markdown.md#markdown-decks-in-every-command)), and `parse` / `stringify` read and write a deck in JSON, YAML or Markdown with one call.\n\nSee [Templates and variables](./docs/templates-and-variables.md) for fillable OPF templates: typed variables, `{{id}}` tokens, `opf fill` and `resolveVariables`.\n\n## Layout\n\n| Path | Contents |\n|---|---|\n| [`spec/schemas/opf.schema.json`](./spec/schemas/opf.schema.json) | Canonical JSON Schema for top-level OPF `Presentation` documents. |\n| [`docs/how-opf-works.md`](./docs/how-opf-works.md) | Conceptual introduction: the document model, content shapes, catalog resolution, and the validation philosophy. Start here. |\n| [`docs/slide-design-principles.md`](./docs/slide-design-principles.md) | Timeless principles for slide layout, typography, spacing, visual balance, and reviewing layout defaults. |\n| [`docs/design-resolution.md`](./docs/design-resolution.md) | The design precedence algorithm (slide design \u2192 deck design \u2192 resolved theme \u2192 engine defaults) with worked examples. |\n| [`docs/schema-reference.md`](./docs/schema-reference.md) | Author-facing reference for top-level OPF fields and every presentation schema `$defs` object/type. |\n| [`docs/slide-sizes.md`](./docs/slide-sizes.md) | OPF\'s slide-size presets in inches, points and EMU, how they compare with PowerPoint\'s presets, and what PPTX export and import do with them. |\n| [`docs/catalog-schema-reference.md`](./docs/catalog-schema-reference.md) | Author-facing reference for every companion catalog schema. |\n| [`docs/content-payloads.md`](./docs/content-payloads.md) | Author-facing notes for slide and region content payloads, including chart and table object shapes. |\n| [`docs/footnotes-citations-captions.md`](./docs/footnotes-citations-captions.md) | Citations (`cite`), inline footnotes, the deck `references` list, captions on images, charts, tables and videos, and how every engine draws them. |\n| [`docs/examples.md`](./docs/examples.md) | Guide to the expanded scenario-oriented examples under `examples/gallery/`. |\n| [`docs/live-editor.md`](./docs/live-editor.md) | Browser canvas, live OPF editing, font loading, published packages, and current fidelity limits. |\n| [`docs/release-process.md`](./docs/release-process.md) | Maintainer runbook for the one-click release: gate, tag, trusted npm publishing of all seven packages, verification, GitHub release notes, and the site bumps. |\n| [`spec/schemas/*.schema.json`](./spec/schemas) | Companion schemas for catalog records and sub-objects. |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The default catalog and layout previews, released with the other packages. |\n| [`spec/openapi.yaml`](./spec/openapi.yaml) | Optional reference OpenAPI contract for downstream services that choose to expose OPF over HTTP. OpenPresentation does not host this API. |\n| [`examples/technical/`](./examples/technical) | Focused OPF fixtures for validator, renderer, catalog-resolution, design, content-payload, and region behavior. |\n| [`examples/gallery/`](./examples/gallery) | Broader OPF example decks organized by industry, function, education, government, presentation type, international, and design/media scenarios. |\n| [`packages/javascript/`](./packages/javascript) | Public pre-stable source for `@openpresentation/opf`. |\n| [`packages/cli/`](./packages/cli) | Installable local CLI for creating, validating, editing, and inspecting OPF. |\n| [`legacy/`](./legacy) | Tombstone for service-specific clients, CLIs, tool integrations, and workflows removed from the OpenPresentation OSS repo. |\n\n## OpenPresentation Boundary\n\nOpenPresentation defines the format, bundled presets, local validation, examples, docs, and planned local render/edit/convert libraries. It does not provide hosted functions or managed product surfaces.\n\nFuture non-JavaScript OPF packages should follow the same local-first boundary: Python and Go packages should expose schemas, types/models, catalogs, validation, and package-addressable assets. Future toolkit packages should expose embeddable library APIs with no required network calls, hosted callbacks, hidden telemetry, or managed infrastructure assumptions.\n\nThe published JavaScript package copies package-addressable OPF schemas, catalogs, reference assets, and the optional reference `spec/openapi.yaml` from `spec/`. It intentionally remains `@openpresentation/opf` instead of introducing a separate `@openpresentation/opf-spec` package so downstream imports can advance by semver-pinning one canonical package.\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n';
4
+ var repoReadmeRaw = '<p align="center">\n <picture>\n <source media="(prefers-color-scheme: dark)" srcset="docs/brand/opf-logo-dark.svg">\n <img src="docs/brand/opf-logo.svg" alt="Open Presentation Format" width="64" height="64">\n </picture>\n</p>\n\n# Open Presentation Format (OPF)\n\n[![npm version](https://img.shields.io/npm/v/@openpresentation/opf?label=npm)](https://www.npmjs.com/package/@openpresentation/opf)\n[![npm downloads](https://img.shields.io/npm/dw/@openpresentation/opf)](https://www.npmjs.com/package/@openpresentation/opf)\n[![license](https://img.shields.io/npm/l/@openpresentation/opf)](./LICENSE)\n[![CI](https://github.com/OpenPresentation/opf/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/OpenPresentation/opf/actions/workflows/ci.yml)\n[![nightly](https://github.com/OpenPresentation/opf/actions/workflows/nightly.yml/badge.svg?branch=main)](https://github.com/OpenPresentation/opf/actions/workflows/nightly.yml)\n\nPublic npm package: [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf) (`npm install @openpresentation/opf`).\n\nOpen Presentation Format is the portable, human-readable JSON document format for slide decks.\n\nThis repository is the canonical home for the OPF **spec**, **JSON Schemas**, **catalog presets**, examples, generated developer types, local validation tooling, and integration docs for the render/edit/convert toolkit. OpenPresentation publishes open-source code and documentation only; it does not provide hosted APIs, hosted rendering functions, queues, storage, authentication, jobs, previews, SLAs, telemetry, or managed infrastructure.\n\nFor AI agents, use the [OPF skill set](docs/agent-skills.md) for authoring, layout, presets, editing, export, and schema inspection.\n\nPublished CLI 0.18.0 installs all six skills into your project with `npx @openpresentation/cli@0.18.0 skills install`. It uses local copies, preserves existing instructions and refuses to overwrite customized skills. See the [installation and update guide](docs/agent-skills.md) for personal or agent-specific targets and source development.\n\nFor a fresh Node 24 project that installs **published** packages (not this\ncheckout), follow the [developer quickstart](docs/quickstart.md) and the\n[compatibility matrix](docs/compatibility-matrix.md).\n\nFor LLM authoring, start with [the authoring guide](docs/llm-authoring.md), [dynamic composition](docs/dynamic-composition.md), and [local ecosystem verification](docs/ecosystem-development.md).\n\n## File naming\n\nOpen Presentation Format documents are JSON files. Use `*.opf.json` for complete OPF presentation documents, for example `board-review.opf.json` or `deck.opf.json`.\n\nAvoid using bare `*.opf` for OPF JSON. The `.opf` extension is already used by other document and project formats, while `.opf.json` keeps the OPF identity and still makes the underlying JSON format clear to editors, validators, agents, and version-control tooling.\n\n## Naming and reuse\n\nThe format name is **Open Presentation Format**. The schemas, catalogs, packages, and local tooling in this repository are free and open source under the MIT license, so third-party tools may read, write, validate, render, convert, and describe support for Open Presentation Format without adopting any product-specific branding.\n\n## Why OPF\n\n`.pptx` is a zipped bundle of XML. Humans can\'t diff it, LLMs can\'t read or write it reliably, and git can\'t track it meaningfully. Every change looks like a binary blob.\n\nOPF is plain JSON. A human can open it in an editor. A model can read and write it without guessing at schema-by-example. Decks live in git like the rest of your work.\n\nThat\'s the shift that lets LLMs actually *author* decks. When the format stops fighting them, models can do the work that matters \u2014 narrative structure, persuasive framing, data analysis, chart recommendations, ruthless revision passes \u2014 instead of wrestling with `<p:sp>` tags.\n\nAnd they don\'t start from a blank canvas. [pptx.gallery](https://pptx.gallery) is the human-browsable reference for OPF catalog presets: layouts, themes, color schemes, font schemes, chart types, narratives, audiences, purposes, tones, languages, and social platforms.\n\n## Start in three steps\n\n1. **Install the coordinated published packages** on Node 24. See [the developer quickstart](docs/quickstart.md) for the currently recorded registry pin set: core, renderer, PPTX, editor, CLI and Gallery, all at the shared version 0.26.1. The default catalog is supplied by `@openpresentation/gallery@0.26.1`; see the [compatibility matrix](docs/compatibility-matrix.md) for feature and native limits.\n2. **Author, validate, paginate, preview and export.** New to OPF? Run the [first deck](docs/first-deck/README.md) end to end first. Copy [`docs/quickstart/developer-quickstart.opf.json`](./docs/quickstart/developer-quickstart.opf.json) and run the commands in that guide. From code, `convert("deck.opf.md", "deck.pdf")` of `@openpresentation/opf` is the simple path to a PDF, PNG, SVG or PPTX file. `validate` / `opf validate` is one local checker for format, references, accessibility, layout and content ([guide](docs/validate.md)), not visual verification.\n3. **Know the limits.** PPTX export writes one text box per wrapped line, so text edited in PowerPoint or Keynote does not reflow (see [rich text](docs/rich-text.md)) unless you opt in to `--body-text native` (opf-pptx and CLI 0.22.0 or later), and fonts are named, not embedded. The [compatibility matrix](docs/compatibility-matrix.md) lists shipped APIs versus renderer issue 24, native PowerPoint issue 87, and other deferred work. Browse presets at [pptx.gallery](https://pptx.gallery).\n\nYour deck can live in git from the first commit. After installing dependencies and supplying referenced assets, these commands run locally without a model provider, account or hosted OPF API.\n\n## JavaScript and TypeScript\n\nThe canonical JavaScript/TypeScript package is published at [`packages/javascript`](./packages/javascript) as [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf). The schema is pre-stable (0.x \u2014 expect breaking changes between minor versions until 1.0). Its responsibility is local and format-level only:\n\n- export the canonical schemas from [`spec/`](./spec)\n- register the pptx.gallery catalog of [`@openpresentation/gallery`](./packages/gallery) (a dependency, released with core at the same version) as the Node defaults, as the CLI does; a browser host registers it itself\n- export a typed raw spec file manifest for package-addressable `spec/` content\n- generate TypeScript types, with `Presentation` as the top-level type\n- validate OPF JSON and catalog records locally\n\nIn Node (and Bun and Deno) its root also reads and writes files (`convert`, `open`, `save`) and draws them through the optional engines below; in a browser or a worker the same import is a browser-safe build with the same names, where those three reject with `node-only`. Every other entry runs in a browser. It does not generate content with AI, fetch remote catalogs, call hosted APIs, or provide managed services. Render/edit/convert packages live in this repository as separate MIT packages that depend on `@openpresentation/opf`. The format package also exposes pure composition geometry so those packages share layout behavior.\n\n## Toolkit libraries\n\nOPF is seven packages. **Core** (`@openpresentation/opf`) is the format and its API: it reads and writes the text formats (JSON, YAML, Markdown) and validates, and in Node reads and writes files, through the same import. **The gallery** (`@openpresentation/gallery`) is the pptx.gallery catalog of layouts, themes, colour and font schemes and the other records, released with the other packages; core depends on it and registers it in Node. **The CLI** (`@openpresentation/cli`) is the `opf` command. **The MCP server** (`@openpresentation/mcp`, `npx -y @openpresentation/mcp`) lets an MCP-native agent learn OPF (docs, schemas, catalog, examples and skills as resources) and validate and convert decks. **Render** (`opf-render`), **PPTX** (`opf-pptx`) and **the editor** (`opf-editor`) are the engines: drawing, PowerPoint and editing, installed as needed. All seven live in this repository (`packages/`) and are released together at one version. See [ecosystem development](docs/ecosystem-development.md) for local builds and verification, and [dynamic composition](docs/dynamic-composition.md) for portable layout rules.\n\n| Package | Role | Boundary |\n|---|---|---|\n| [`packages/javascript`](./packages/javascript) (`@openpresentation/opf`) | Core: format, schemas, validation, composition | The format and its API; reads and writes files in Node and draws through the optional engines |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The pptx.gallery catalog | Catalog records only, no runtime dependency; records are authored by pull request here, and a changed drawing or a removed record needs a minor release |\n| [`packages/cli`](./packages/cli) (`@openpresentation/cli`) | `opf` command | Runs core\'s Node engine: reads and writes files and calls the engines below as optional peers |\n| [`packages/render`](./packages/render) (`@openpresentation/opf-render`) | OPF to SVG/PNG/PDF | Local and embeddable rendering library |\n| [`packages/editor`](./packages/editor) (`@openpresentation/opf-editor`) | WYSIWYG bindings/components | Headless editor primitives plus optional UI components |\n| [`packages/pptx`](./packages/pptx) (`@openpresentation/opf-pptx`) | OPF to PPTX and PPTX to OPF | Pure local import/export library for browser and server use where supported |\n\nThese packages provide OSS primitives only. Downstream applications own hosting, auth, storage, collaboration, queues, previews, analytics, support, and workflow UX.\n\n## Usage\n\nInstall from npm:\n\n```sh\npnpm add @openpresentation/opf\n# or: npm install @openpresentation/opf\n```\n\nTo work on the packages, clone this repo and build the workspace (all seven packages are in `packages/`; see [CONTRIBUTING](./CONTRIBUTING.md)):\n\n```sh\npnpm install\npnpm build\n```\n\nUse the format package from JavaScript or TypeScript:\n\n```ts\nimport { presentation, validate } from "@openpresentation/opf";\nimport { gallery } from "@openpresentation/gallery";\n\nimport type { Presentation } from "@openpresentation/opf";\n\nconst deck: Presentation = {\n name: "Quarterly Review",\n slides: [{ title: "Quarterly Review", items: ["Revenue", "Product", "Hiring"] }],\n};\n\nconst report = validate(deck);\nconsole.log(report.valid); // no finding has severity "error"\nconsole.log(report.findings); // every finding: rule id, severity, category, JSON Pointer path, message, fixes\n// Core ships no catalog records; in Node, validate registers the gallery when a call names no catalogs, and a host may name its own.\nconsole.log(validate({ ...deck, design: { theme: "classic" } }, { catalogs: [gallery] }).valid);\nconsole.log(Object.keys(gallery.audiences).length);\n```\n\nConvert, open and save files in Node with `@openpresentation/opf`, the same import a browser uses (the engines `@openpresentation/opf-render` and `@openpresentation/opf-pptx` are optional peers, installed as needed; see [OPF files in Node](docs/node.md)):\n\n```ts\nimport * as opf from "@openpresentation/opf";\n\nawait opf.convert("deck.opf.md", "deck.pdf");\nconst deck = await opf.open("deck.opf.md");\ndeck.slides.push({ title: "Q4" });\nawait opf.save(deck, "deck.opf.md");\nconst { files } = await opf.convert(deck, { format: "pptx" }); // bytes, nothing written\n```\n\nUse focused imports when you only need one surface:\n\n```ts\nimport { presentation } from "@openpresentation/opf/schemas";\nimport { specFileEntries } from "@openpresentation/opf/spec-files";\nimport { validate } from "@openpresentation/opf/validator";\nimport type { Presentation } from "@openpresentation/opf/types";\n```\n\nUse raw JSON when an engine or resolver needs package-addressable files:\n\n```ts\nimport presentationSchema from "@openpresentation/opf/spec/schemas/opf.schema.json" with {\n type: "json",\n};\n```\n\nUse the [installable OPF CLI](./packages/cli/README.md) to create, validate, and edit files locally:\n\n```sh\npnpm --filter @openpresentation/cli build\nnode packages/cli/dist/index.js create deck.opf.json --title "Decision brief"\nnode packages/cli/dist/index.js validate deck.opf.json\nnode packages/cli/dist/index.js edit deck.opf.json --patch changes.json --in-place\n```\n\nSee [CSV and JSON data import](./docs/data-import.md) for editable tables and charts in the editor, CLI, and package API, and [content conversions](./docs/conversions.md) for the pure converters (`@openpresentation/opf/convert`) that change a block\'s kind, nest list items, restructure a slide and split or merge slides, and [Markdown and outlines](./docs/markdown.md) for the deterministic Markdown dialect (`@openpresentation/opf/markdown`, `opf convert deck.md deck.opf.json`) that reads and writes a whole deck as text.\n\n[OPF as YAML](./docs/yaml.md) describes the strict YAML form of a deck (`@openpresentation/opf/yaml`, `opf convert deck.opf.json deck.opf.yaml`, `.opf.yaml` files in every command, editor autocomplete); JSON stays the canonical form. A deck can equally be a Markdown file, `deck.opf.md`: every command reads and writes it (see [Markdown decks in every command](./docs/markdown.md#markdown-decks-in-every-command)), and `parse` / `stringify` read and write a deck in JSON, YAML or Markdown with one call.\n\nSee [Templates and variables](./docs/templates-and-variables.md) for fillable OPF templates: typed variables, `{{id}}` tokens, `opf fill` and `resolveVariables`.\n\n## Layout\n\n| Path | Contents |\n|---|---|\n| [`spec/schemas/opf.schema.json`](./spec/schemas/opf.schema.json) | Canonical JSON Schema for top-level OPF `Presentation` documents. |\n| [`docs/how-opf-works.md`](./docs/how-opf-works.md) | Conceptual introduction: the document model, content shapes, catalog resolution, and the validation philosophy. Start here. |\n| [`docs/slide-design-principles.md`](./docs/slide-design-principles.md) | Timeless principles for slide layout, typography, spacing, visual balance, and reviewing layout defaults. |\n| [`docs/design-resolution.md`](./docs/design-resolution.md) | The design precedence algorithm (slide design \u2192 deck design \u2192 resolved theme \u2192 engine defaults) with worked examples. |\n| [`docs/schema-reference.md`](./docs/schema-reference.md) | Author-facing reference for top-level OPF fields and every presentation schema `$defs` object/type. |\n| [`docs/slide-sizes.md`](./docs/slide-sizes.md) | OPF\'s slide-size presets in inches, points and EMU, how they compare with PowerPoint\'s presets, and what PPTX export and import do with them. |\n| [`docs/catalog-schema-reference.md`](./docs/catalog-schema-reference.md) | Author-facing reference for every companion catalog schema. |\n| [`docs/content-payloads.md`](./docs/content-payloads.md) | Author-facing notes for slide and region content payloads, including chart and table object shapes. |\n| [`docs/diagrams.md`](./docs/diagrams.md) | Mermaid diagrams as a content kind: when to use one, the supported families, how the deck styles and sizes them, accessibility, export and limits. |\n| [`docs/footnotes-citations-captions.md`](./docs/footnotes-citations-captions.md) | Citations (`cite`), inline footnotes, the deck `references` list, captions on images, charts, tables and videos, and how every engine draws them. |\n| [`docs/examples.md`](./docs/examples.md) | Guide to the expanded scenario-oriented examples under `examples/gallery/`. |\n| [`docs/live-editor.md`](./docs/live-editor.md) | Browser canvas, live OPF editing, font loading, published packages, and current fidelity limits. |\n| [`docs/release-process.md`](./docs/release-process.md) | Maintainer runbook for the one-click release: gate, tag, trusted npm publishing of all seven packages, verification, GitHub release notes, and the site bumps. |\n| [`spec/schemas/*.schema.json`](./spec/schemas) | Companion schemas for catalog records and sub-objects. |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The default catalog and layout previews, released with the other packages. |\n| [`spec/openapi.yaml`](./spec/openapi.yaml) | Optional reference OpenAPI contract for downstream services that choose to expose OPF over HTTP. OpenPresentation does not host this API. |\n| [`examples/technical/`](./examples/technical) | Focused OPF fixtures for validator, renderer, catalog-resolution, design, content-payload, and region behavior. |\n| [`examples/gallery/`](./examples/gallery) | Broader OPF example decks organized by industry, function, education, government, presentation type, international, and design/media scenarios. |\n| [`packages/javascript/`](./packages/javascript) | Public pre-stable source for `@openpresentation/opf`. |\n| [`packages/cli/`](./packages/cli) | Installable local CLI for creating, validating, editing, and inspecting OPF. |\n| [`legacy/`](./legacy) | Tombstone for service-specific clients, CLIs, tool integrations, and workflows removed from the OpenPresentation OSS repo. |\n\n## OpenPresentation Boundary\n\nOpenPresentation defines the format, bundled presets, local validation, examples, docs, and planned local render/edit/convert libraries. It does not provide hosted functions or managed product surfaces.\n\nFuture non-JavaScript OPF packages should follow the same local-first boundary: Python and Go packages should expose schemas, types/models, catalogs, validation, and package-addressable assets. Future toolkit packages should expose embeddable library APIs with no required network calls, hosted callbacks, hidden telemetry, or managed infrastructure assumptions.\n\nThe published JavaScript package copies package-addressable OPF schemas, catalogs, reference assets, and the optional reference `spec/openapi.yaml` from `spec/`. It intentionally remains `@openpresentation/opf` instead of introducing a separate `@openpresentation/opf-spec` package so downstream imports can advance by semver-pinning one canonical package.\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n';
5
5
 
6
6
  // src/repo-readme.ts
7
7
  var repoReadme = repoReadmeRaw;
@@ -1,6 +1,6 @@
1
1
  import { installedSchemaEngine } from './chunk-43JWUIGF.js';
2
2
  import { qualifyBranch } from './chunk-JBARNYFR.js';
3
- import { schemas } from './chunk-5Q4IYLMW.js';
3
+ import { schemas } from './chunk-LEF4X4KI.js';
4
4
  import './chunk-GM7WFPGG.js';
5
5
  import Ajv2020 from 'ajv/dist/2020.js';
6
6
  import addFormats from 'ajv-formats';
@@ -1,3 +1,3 @@
1
- export { precompiledMarker, schemaEngine } from './chunk-ZROVYWGU.js';
2
- import './chunk-5Q4IYLMW.js';
1
+ export { precompiledMarker, schemaEngine } from './chunk-DGS47ONG.js';
2
+ import './chunk-LEF4X4KI.js';
3
3
  import './chunk-GM7WFPGG.js';
package/dist/schema.js CHANGED
@@ -1,5 +1,5 @@
1
- export { COMMON_KEYS, UNRANKED_PRIORITY, activeSchema, catalogKindAt, createSchemaValue, describeField, isPromotedRegionKey, listSchemaFields, resolveSchema, schemaAtPath, schemaCatalogKinds, schemaLabel, schemaType, schemaVariants, splitOpfPath } from './chunk-M7YZU3DX.js';
1
+ export { COMMON_KEYS, UNRANKED_PRIORITY, activeSchema, catalogKindAt, createSchemaValue, describeField, isPromotedRegionKey, listSchemaFields, resolveSchema, schemaAtPath, schemaCatalogKinds, schemaLabel, schemaType, schemaVariants, splitOpfPath } from './chunk-OXLA4HXQ.js';
2
2
  import './chunk-JBARNYFR.js';
3
- import './chunk-5Q4IYLMW.js';
4
- import './chunk-W3SEWSO5.js';
3
+ import './chunk-LEF4X4KI.js';
4
+ import './chunk-NVAJASOD.js';
5
5
  import './chunk-GM7WFPGG.js';
package/dist/schemas.d.ts CHANGED
@@ -17,6 +17,7 @@ declare const presentation: JsonSchemaDocument & {
17
17
  readonly "SlideDesign": JsonObject;
18
18
  readonly "DimensionPreset": JsonObject;
19
19
  readonly "Dimensions": JsonObject;
20
+ readonly "ColorVariantSlot": JsonObject;
20
21
  readonly "ThemeBackgroundSlot": JsonObject;
21
22
  readonly "HexColor": JsonObject;
22
23
  readonly "ColorRef": JsonObject;
@@ -54,6 +55,7 @@ declare const presentation: JsonSchemaDocument & {
54
55
  readonly "Quote": JsonObject;
55
56
  readonly "Code": JsonObject;
56
57
  readonly "Metric": JsonObject;
58
+ readonly "Diagram": JsonObject;
57
59
  readonly "Timeline": JsonObject;
58
60
  readonly "TimelineEvent": JsonObject;
59
61
  readonly "ListItem": JsonObject;
@@ -112,6 +114,7 @@ declare const layout: JsonSchemaDocument & {
112
114
  readonly "Split": JsonObject;
113
115
  readonly "Region": JsonObject;
114
116
  readonly "DesignHints": JsonObject;
117
+ readonly "LayoutVariantRole": JsonObject;
115
118
  readonly "Composition": JsonObject;
116
119
  };
117
120
  };
@@ -152,6 +155,7 @@ declare const schemas: {
152
155
  readonly "SlideDesign": JsonObject;
153
156
  readonly "DimensionPreset": JsonObject;
154
157
  readonly "Dimensions": JsonObject;
158
+ readonly "ColorVariantSlot": JsonObject;
155
159
  readonly "ThemeBackgroundSlot": JsonObject;
156
160
  readonly "HexColor": JsonObject;
157
161
  readonly "ColorRef": JsonObject;
@@ -189,6 +193,7 @@ declare const schemas: {
189
193
  readonly "Quote": JsonObject;
190
194
  readonly "Code": JsonObject;
191
195
  readonly "Metric": JsonObject;
196
+ readonly "Diagram": JsonObject;
192
197
  readonly "Timeline": JsonObject;
193
198
  readonly "TimelineEvent": JsonObject;
194
199
  readonly "ListItem": JsonObject;
@@ -247,6 +252,7 @@ declare const schemas: {
247
252
  readonly "Split": JsonObject;
248
253
  readonly "Region": JsonObject;
249
254
  readonly "DesignHints": JsonObject;
255
+ readonly "LayoutVariantRole": JsonObject;
250
256
  readonly "Composition": JsonObject;
251
257
  };
252
258
  };
package/dist/schemas.js CHANGED
@@ -1,2 +1,2 @@
1
- export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-5Q4IYLMW.js';
1
+ export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-LEF4X4KI.js';
2
2
  import './chunk-GM7WFPGG.js';
package/dist/source.d.ts CHANGED
@@ -8,13 +8,14 @@ declare const SLIDE_OPTION_KEYS: readonly ["id", "type", "layout", "section", "t
8
8
  declare const BLOCK_OPTION_KEYS: readonly ["id", "type", "as", "region"];
9
9
  /** Values of `as=` in a block options comment. */
10
10
  declare const BLOCK_AS_VALUES: readonly ["bullets", "video"];
11
- /** The first word of a fence info string that is not code: `chart`, `metric`, `timeline` and the two YAML escape hatches. */
12
- declare const FENCE_KINDS: readonly ["chart", "metric", "timeline", "opf-block", "opf-slide"];
11
+ /** The first word of a fence info string that is not code: `chart`, `metric`, `timeline`, `mermaid` (a diagram) and the two YAML escape hatches. */
12
+ declare const FENCE_KINDS: readonly ["chart", "metric", "timeline", "mermaid", "opf-block", "opf-slide"];
13
13
  /** Lines of a ```metric fence: `key: value`. */
14
14
  declare const METRIC_KEYS: readonly ["value", "label", "description", "unit", "delta", "trend", "sentiment"];
15
- /** Attributes after the info word: `chart` takes `alt`, `timeline` `name` and `description`, a code fence `title`. */
15
+ /** Attributes after the info word: `chart` and `mermaid` take `alt`, `timeline` `name` and `description`, a code fence `title`. */
16
16
  declare const FENCE_ATTRIBUTES: {
17
17
  readonly chart: readonly ["alt"];
18
+ readonly mermaid: readonly ["alt"];
18
19
  readonly timeline: readonly ["name", "description"];
19
20
  readonly code: readonly ["title"];
20
21
  };
package/dist/source.js CHANGED
@@ -1,14 +1,14 @@
1
- export { explain } from './chunk-W7KPMUJF.js';
2
- import { readMarkdown, frontMatter, splitSegments, isOutline, NOTES, fenceStart, fenceClose, COMMENT } from './chunk-UKWNHK62.js';
3
- import './chunk-5OMZW44K.js';
4
- import { splitLines } from './chunk-HRKV43GC.js';
5
- export { analyzeYamlSyntax } from './chunk-HRKV43GC.js';
6
- import './chunk-KOCXV7H3.js';
7
- import { rememberByText, SLIDE_OPTION_KEYS, FENCE_KINDS, createLocator, parsePointer } from './chunk-M7YZU3DX.js';
8
- export { BLOCK_AS_VALUES, BLOCK_OPTION_KEYS, FENCE_ATTRIBUTES, FENCE_KINDS, LINE_KEYWORDS, METRIC_KEYS, PATTERN_PHRASES, SLIDE_OPTION_KEYS, SPAN_FLAGS, SPAN_VALUES, analyzeJsonSyntax, applyTextEdits, describeFinding, distance, nearest, segmentsOf as pointerSegments, starterValue } from './chunk-M7YZU3DX.js';
1
+ export { explain } from './chunk-XFHXQCXL.js';
2
+ import { readMarkdown, frontMatter, splitSegments, isOutline, NOTES, fenceStart, fenceClose, COMMENT } from './chunk-2E6CDYL2.js';
3
+ import './chunk-NEJ32O7X.js';
4
+ import { splitLines } from './chunk-BBVW5ZC2.js';
5
+ export { analyzeYamlSyntax } from './chunk-BBVW5ZC2.js';
6
+ import './chunk-XQO2CT6Q.js';
7
+ import { rememberByText, SLIDE_OPTION_KEYS, FENCE_KINDS, createLocator, parsePointer } from './chunk-OXLA4HXQ.js';
8
+ export { BLOCK_AS_VALUES, BLOCK_OPTION_KEYS, FENCE_ATTRIBUTES, FENCE_KINDS, LINE_KEYWORDS, METRIC_KEYS, PATTERN_PHRASES, SLIDE_OPTION_KEYS, SPAN_FLAGS, SPAN_VALUES, analyzeJsonSyntax, applyTextEdits, describeFinding, distance, nearest, segmentsOf as pointerSegments, starterValue } from './chunk-OXLA4HXQ.js';
9
9
  import './chunk-JBARNYFR.js';
10
- import './chunk-5Q4IYLMW.js';
11
- import './chunk-W3SEWSO5.js';
10
+ import './chunk-LEF4X4KI.js';
11
+ import './chunk-NVAJASOD.js';
12
12
  import './chunk-GM7WFPGG.js';
13
13
  import { findNodeAtOffset, getNodePath, parseTree } from 'jsonc-parser';
14
14
  import { parseDocument, isMap, isSeq, isScalar, isAlias } from 'yaml';