@openpresentation/opf 0.31.0 → 0.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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-HRKV43GC.js → chunk-BBVW5ZC2.js} +3 -3
  6. package/dist/{chunk-7UO6H32I.js → chunk-CLRYHWQN.js} +162 -22
  7. package/dist/chunk-DGS47ONG.js +1 -0
  8. package/dist/{chunk-F5QC7E2O.js → chunk-F7DN33UL.js} +28 -8
  9. package/dist/{chunk-KELC4K62.js → chunk-HKUV7NEN.js} +1 -1
  10. package/dist/{chunk-XG4JKFZ6.js → chunk-IT7FQKED.js} +6 -6
  11. package/dist/{chunk-SYCHWS7C.js → chunk-J63CIRIV.js} +4 -4
  12. package/dist/{chunk-5Q4IYLMW.js → chunk-LEF4X4KI.js} +274 -33
  13. package/dist/{chunk-5OMZW44K.js → chunk-NEJ32O7X.js} +1 -1
  14. package/dist/chunk-NVAJASOD.js +14764 -0
  15. package/dist/{chunk-XSCZZWYI.js → chunk-ONVFUVQ5.js} +99 -15
  16. package/dist/{chunk-M7YZU3DX.js → chunk-OXLA4HXQ.js} +615 -58
  17. package/dist/{chunk-P5E3FNYO.js → chunk-PB7ME64J.js} +1 -1
  18. package/dist/{chunk-ARFAQNOH.js → chunk-SW676APJ.js} +2 -2
  19. package/dist/{chunk-I6G32TB5.js → chunk-SZFO3MAJ.js} +5 -5
  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-Ds6WHyO7.d.ts +5620 -0
  24. package/dist/composition.d.ts +2 -2
  25. package/dist/composition.js +1 -1
  26. package/dist/conversion-5FUDQPED.js +24 -0
  27. package/dist/{conversion-Bh-skyMc.d.ts → conversion-CdzrTxib.d.ts} +56 -9
  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-CKDNQ2t4.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-DRZ_JNFY.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-DxyYPebs.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
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { P as Presentation } from './presentation-8jLSTFqL.js';
1
+ export { P as Presentation } from './presentation-DnD7mfmf.js';
2
2
  export { a as CatalogKind } from './catalog-refs-kAefsZWT.js';
3
3
  export { SchemaName } from './schemas.js';
4
4
  export { a as Finding, d as FindingCategory, e as FindingFix, f as FindingFocus, b as FindingLocation, F as FindingReport, c as FindingSeverity, g as FindingSuggestion, J as JsonPatchOperation, V as ValidationIssue } from './finding-l9dlQ2NF.js';
@@ -286,11 +286,15 @@ interface Theme {
286
286
  /**
287
287
  * As design.imageFit of a deck.
288
288
  */
289
- imageFit?: ("cover" | "contain" | "stretch");
289
+ imageFit?: ("cover" | "contain" | "stretch" | "auto");
290
290
  /**
291
291
  * As design.listBullet of a deck.
292
292
  */
293
293
  listBullet?: ("character" | "image" | "none");
294
+ /**
295
+ * As design.listStyle of a deck.
296
+ */
297
+ listStyle?: ("stack" | "rows");
294
298
  };
295
299
  /**
296
300
  * Free-form labels for filtering and search.
@@ -346,18 +350,18 @@ interface ThemeVariant {
346
350
  */
347
351
  name: string;
348
352
  /**
349
- * The value design.variant takes when the variant is chosen: a background slot ('light1', 'light2', 'dark1', 'dark2'; the same as { background: slot }) or the ColorVariant object of opf.schema.json, which adds an accent order.
353
+ * The value design.variant takes when the variant is chosen: a background slot ('light1', 'light2', 'dark1', 'dark2', or an accent 'accent1' to 'accent6'; the same as { background: slot }) or the ColorVariant object of opf.schema.json, which adds an accent order.
350
354
  */
351
- variant: (ThemeBackgroundSlot | ColorVariant);
355
+ variant: (("light1" | "light2" | "dark1" | "dark2" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6") | ColorVariant$1);
352
356
  }
353
357
  /**
354
- * 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.
358
+ * 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.
355
359
  */
356
- interface ColorVariant {
360
+ interface ColorVariant$1 {
357
361
  /**
358
- * The scheme slot that is the background (bg1) of the variant.
362
+ * 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.
359
363
  */
360
- background: ("light1" | "light2" | "dark1" | "dark2");
364
+ background: ("light1" | "light2" | "dark1" | "dark2" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6");
361
365
  /**
362
366
  * 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.
363
367
  *
@@ -367,6 +371,13 @@ interface ColorVariant {
367
371
  accents?: [("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"), ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"), ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"), ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"), ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"), ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6")];
368
372
  }
369
373
 
374
+ /**
375
+ * A layout variant relative to the deck's own variant (LH-01). 'surface' is the deck's secondary surface on its own side: light2 on a light deck and dark2 on a dark one (light1 or dark1 where the deck is already on light2 or dark2), so a statement stands off the deck without changing its tone. 'brand' is the scheme's brand dark, dark2 (dark1 where the deck is already on dark2), with light text: a closing slide's strong surface on a light or a dark deck.
376
+ *
377
+ * This interface was referenced by `Layout`'s JSON-Schema
378
+ * via the `definition` "LayoutVariantRole".
379
+ */
380
+ type LayoutVariantRole = ("surface" | "brand");
370
381
  /**
371
382
  * One entry of a regions list: a heading region, a body region or a split.
372
383
  *
@@ -413,11 +424,11 @@ interface Layout {
413
424
  */
414
425
  direction?: ("row" | "column");
415
426
  /**
416
- * Vertical position of the content of every body region when it is shorter than the region. A split's 'anchor' replaces it for the regions under that split, and a region's own 'anchor' replaces both. Only 'anchor' is inherited, and only by body regions: the heading regions 'title' and 'subtitle' never take it, and the other region rules stay per region. One exception places the whole slide: when the record is a column and every entry of its 'regions' list is sized 'auto' (heading regions included), the record has no numeric row to hold the leftover height, so its 'anchor' places the whole stack, title and subtitle included, in the content box's leftover height: 'middle' centres it, 'bottom' sits it at the foot, 'top' (default) starts it at the top as before. A record with any numeric entry, a row record and an anchor on a split keep the rule above. Default 'top'.
427
+ * Vertical position of the content of every body region when it is shorter than the region. A split's 'anchor' replaces it for the regions under that split, and a region's own 'anchor' replaces both. Only 'anchor' is inherited, and only by body regions: the heading regions 'title' and 'subtitle' never take it (they set their own, HeadingRegion.anchor), and the other region rules stay per region. One exception places the whole slide: when the record is a column and every entry of its 'regions' list is sized 'auto' (heading regions included), the record has no numeric row to hold the leftover height, so its 'anchor' places the whole stack, title and subtitle included, in the content box's leftover height: 'middle' centres it, 'bottom' sits it at the foot, 'top' (default) starts it at the top as before. A record with any numeric entry, a row record and an anchor on a split keep the rule above. Default 'top'.
417
428
  */
418
429
  anchor?: ("top" | "middle" | "bottom");
419
430
  /**
420
- * The record's regions in reading order: 1 to 12 entries, each a region ({ name, size?, ...rules }) or a split ({ direction, regions, size?, anchor? }). Every region is declared once, here, with its content rules; a block can target a body region with 'region': '<name>'. Names are unique across the whole record. 'size' is a number above 0 and up to 100 (default 1) that siblings share in proportion, separated by the gap; 'auto' is the height the content needs, allowed only in a column. 'title' and 'subtitle' are heading regions that take only a size (default auto in a column, 1 in a row): 'title' holds the slide's heading group (tag, title and subtitle, stacked) and a 'subtitle' region takes the subtitle out of it, and a 'subtitle' needs a 'title'. A record with no 'title' region gets an implicit auto row on top for a slide that has headings. Splits nest at most three levels (the record's own list is level 1). Rules the schema cannot express (a reserved or repeated name, a 'subtitle' without a 'title', 'auto' outside a column, nesting too deep, more than 12 rows or columns once compiled) are the validate findings opf/layout-template and opf/layout-region.
431
+ * The record's regions in reading order: 1 to 12 entries, each a region ({ name, size?, ...rules }) or a split ({ direction, regions, size?, anchor? }). Every region is declared once, here, with its content rules; a block can target a body region with 'region': '<name>'. Names are unique across the whole record. 'size' is a number above 0 and up to 100 (default 1) that siblings share in proportion, separated by the gap; 'auto' is the height the content needs, allowed only in a column. 'title' and 'subtitle' are heading regions that take only a size (default auto in a column, 1 in a row), an anchor and (the 'title') a rule: 'title' holds the slide's heading group (tag, title and subtitle, stacked) and a 'subtitle' region takes the subtitle out of it, and a 'subtitle' needs a 'title'. A record with no 'title' region gets an implicit auto row on top for a slide that has headings. Splits nest at most three levels (the record's own list is level 1). Rules the schema cannot express (a reserved or repeated name, a 'subtitle' without a 'title', 'auto' outside a column, nesting too deep, more than 12 rows or columns once compiled) are the validate findings opf/layout-template and opf/layout-region.
421
432
  *
422
433
  * @minItems 1
423
434
  * @maxItems 12
@@ -457,7 +468,7 @@ interface Layout {
457
468
  [k: string]: unknown;
458
469
  }
459
470
  /**
460
- * The layout's design defaults, with the same keys and values as the deck's design and a slide's design (a slide overrides exactly what its layout sets, by the same name). An absent key means the layout has no opinion. Per key the slide's design wins, then the deck's design, then the resolved theme's design, then this record's design, then the engine default. Composition, the renderer and the PPTX exporter all read the one result.
471
+ * The layout's design defaults, with the same keys and values as the deck's design and a slide's design (a slide overrides exactly what its layout sets, by the same name). An absent key means the layout has no opinion. Per key the slide's design wins, then the deck's design, then the resolved theme's design, then this record's design, then the engine default; 'variant' alone ranks this record above the deck and the theme (see DesignHints.variant). Composition, the renderer and the PPTX exporter all read the one result.
461
472
  */
462
473
  interface DesignHints {
463
474
  /**
@@ -481,20 +492,44 @@ interface DesignHints {
481
492
  */
482
493
  chartPrimary?: ("none" | "top" | "bottom" | "left" | "right");
483
494
  /**
484
- * Default fit of the slide's image blocks: 'cover' fills the frame and crops around focus, 'contain' shows the whole picture, 'stretch' scales it to the frame.
495
+ * Default fit of the slide's image blocks: 'cover' fills the frame and crops around focus, 'contain' shows the whole picture, 'stretch' scales it to the frame, 'auto' covers when the crop keeps at least 85% of the picture and contains otherwise.
485
496
  */
486
- imageFit?: ("cover" | "contain" | "stretch");
497
+ imageFit?: ("cover" | "contain" | "stretch" | "auto");
487
498
  /**
488
499
  * Marker style of lists: 'character' draws the glyph, 'image' draws the deck's icon logo as a picture bullet, 'none' draws no marker and no hanging indent (label-and-description lists).
489
500
  */
490
501
  listBullet?: ("character" | "image" | "none");
502
+ /**
503
+ * As design.listStyle of a deck: 'stack' or 'rows' (ruled rows) for the lists of slides using this layout.
504
+ */
505
+ listStyle?: ("stack" | "rows");
491
506
  /**
492
507
  * Draw the layout mirrored: 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.
493
508
  */
494
509
  mirror?: boolean;
510
+ /**
511
+ * The color variant slides on this layout draw on (LH-01): a background slot ('accent1', 'dark1', ...) or the ColorVariant object, as design.variant, or a value relative to the deck's own variant (LayoutVariantRole: 'surface', 'brand'), so the layout keeps the deck's tone. Unlike the other keys it outranks the deck's design and the theme: the slide's own design.variant or design.background wins, then this, then the deck's variant or background, then the theme's. It hides a background of the deck or theme (the slide is the variant's bg1), and without an accent order of its own it keeps the deck's.
512
+ */
513
+ variant?: (("light1" | "light2" | "dark1" | "dark2" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6") | ColorVariant | LayoutVariantRole);
495
514
  }
496
515
  /**
497
- * A reserved heading region: 'title' holds the slide's heading group (tag, title and subtitle, stacked) and 'subtitle' takes the subtitle out of it. A heading region takes only a size. At most one of each; a 'subtitle' needs a 'title'.
516
+ * 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.
517
+ */
518
+ interface ColorVariant {
519
+ /**
520
+ * 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.
521
+ */
522
+ background: ("light1" | "light2" | "dark1" | "dark2" | "accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6");
523
+ /**
524
+ * 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.
525
+ *
526
+ * @minItems 6
527
+ * @maxItems 6
528
+ */
529
+ accents?: [("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"), ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"), ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"), ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"), ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6"), ("accent1" | "accent2" | "accent3" | "accent4" | "accent5" | "accent6")];
530
+ }
531
+ /**
532
+ * A reserved heading region: 'title' holds the slide's heading group (tag, title and subtitle, stacked) and 'subtitle' takes the subtitle out of it. A heading region takes a size and an anchor, and the 'title' a rule; the content rules belong on body regions. At most one of each; a 'subtitle' needs a 'title'.
498
533
  *
499
534
  * This interface was referenced by `Layout`'s JSON-Schema
500
535
  * via the `definition` "HeadingRegion".
@@ -505,6 +540,14 @@ interface HeadingRegion {
505
540
  */
506
541
  name: ("title" | "subtitle");
507
542
  size?: RegionSize;
543
+ /**
544
+ * Vertical position of the heading group in its area when the area is sized (a number): 'middle' (default) centers it, 'bottom' sets it at the foot of the area, as a cover or section sets its display title low (LH-130), 'top' at the top. An 'auto' area is as tall as the group, so the anchor changes nothing there. A heading region never inherits the 'anchor' of the record or a split.
545
+ */
546
+ anchor?: ("top" | "middle" | "bottom");
547
+ /**
548
+ * 'title' only: draw a short accent rule (80 by 5 px at a 720 px short edge) half a gap above the title, at the title's start edge, on a slide with a title and no tag; a tag is the group's eyebrow and takes the rule's place (LH-130). Engines draw it in the tag's color, the primary or the text color where the primary is under 4.5:1 on the slide. Default false.
549
+ */
550
+ rule?: boolean;
508
551
  }
509
552
  /**
510
553
  * One body region of a layout: its name, its share of the space and the rules for which content it takes and how several blocks share it.
@@ -523,13 +566,13 @@ interface Region {
523
566
  *
524
567
  * @minItems 1
525
568
  */
526
- accepts?: [("text" | "list" | "image" | "video" | "chart" | "table" | "code" | "metric" | "quote" | "timeline" | "group"), ...(("text" | "list" | "image" | "video" | "chart" | "table" | "code" | "metric" | "quote" | "timeline" | "group"))[]];
569
+ accepts?: [("text" | "list" | "image" | "video" | "chart" | "table" | "code" | "metric" | "quote" | "timeline" | "diagram" | "group"), ...(("text" | "list" | "image" | "video" | "chart" | "table" | "code" | "metric" | "quote" | "timeline" | "diagram" | "group"))[]];
527
570
  /**
528
571
  * Which content the region wants first. Binding gives a picture (image, video) to a media region first, then primary, secondary, supporting; every other kind to a primary region first, then secondary, supporting, media; of two equal regions the first in reading order fills first. A supporting region receives content only when no primary or secondary region that accepts it has room, or by a pin. Default 'primary'.
529
572
  */
530
573
  role?: ("primary" | "secondary" | "media" | "supporting");
531
574
  /**
532
- * How several blocks share the region: 'none' one block fills it; 'grid' by count (1 fills, 2 side by side, 3 in a row, 4 as 2 x 2, 5 as 3 + 2, 6 as 3 x 2, 7 to 12 in four columns; rows and columns swap in a portrait region; a short last row is centred); 'column' stacked at the heights the blocks need, one gap apart, and placed by the region's anchor (charts, pictures, tables, timelines and videos take what the measured blocks leave; blocks that do not fit share the region, each giving up the same fraction of what it can give up above its height at the minimum font size); 'auto' a grid when every block is short and a column when any block is long (more than 6 estimated lines in its grid cell at the starting size). design.contentDirection turns every flowing region into one row or one column. Default 'auto'.
575
+ * How several blocks share the region: 'none' one block fills it (blocks no region had room for join it, up to 6, and it flows as 'auto'); 'grid' by count (1 fills, 2 side by side, 3 in a row, 4 as 2 x 2, 5 as 3 + 2, 6 as 3 x 2, 7 to 12 in balanced rows of at most four, 9 as 3 x 3; rows and columns swap in a portrait region; the cells of a short row stretch to the full width, or keep one size and are centred in a grid of pictures); 'column' stacked at the heights the blocks need, one gap apart, and placed by the region's anchor (charts, pictures, tables, timelines and videos take what the measured blocks leave; blocks that do not fit share the region, each giving up the same fraction of what it can give up above its height at the minimum font size); 'auto' a grid when every block is short and a column when any block is long (more than 6 estimated lines in its grid cell at the starting size). design.contentDirection turns every flowing region into one row or one column. Default 'auto'.
533
576
  */
534
577
  flow?: ("none" | "grid" | "column" | "auto");
535
578
  /**
@@ -541,9 +584,17 @@ interface Region {
541
584
  */
542
585
  bleed?: boolean;
543
586
  /**
544
- * 'auto': a list in the region that does not fit its cell at the starting size (a lone list, or one of several blocks) flows into up to three columns before it shrinks, as a list payload's columns: 'auto'. Default 1.
587
+ * 'auto': a list in the region that does not fit its cell at the starting size (a lone list, or one of several blocks) flows into up to three columns before it shrinks, as a list payload's columns: 'auto'; a list of 6 or fewer entries is never split. 2 or more lists alone in a region are one list per cell in a grid instead. Default 1.
545
588
  */
546
589
  listColumns?: ("auto" | 1);
590
+ /**
591
+ * How a metric block in the region is laid out. 'stack' (default): value, unit, label and the rest as one block at the region's anchor and content alignment. 'tile': the metric fills its cell (its card when the layout draws cards) from the start: the label first as an eyebrow, the value under it asking for a quarter of the cell's height (between its 76 px role size and twice it, fitted down as usual), and the description, delta and trend at the foot of the cell.
592
+ */
593
+ metrics?: ("stack" | "tile");
594
+ /**
595
+ * The region lists the steps of a sequence (LH-07). 'steps': two or more text or list blocks are the steps, each under a numbered badge (an accent circle with its numeral; a one-entry numbered list gives the badge its number and draws as a heading over its description) on one connector line through the badge centers; a lone list's entries are the steps, each beside its badge on a connector down the badge column; a lone list of 3 to 6 entries of one or two words is a flow of chips joined by arrows. 'numbered' (an agenda, ordered by nature): every list of two or more entries of one level draws its entries beside badges, numbered or not; an unnumbered list is counted in arabic, continuing from the region's previous unnumbered list, as drawing only (the document keeps no numbering). Steps keep the text size they have without the badges: a slide whose blocks would get smaller draws them as before. Absent: the region's content draws as any other.
596
+ */
597
+ sequence?: ("steps" | "numbered");
547
598
  /**
548
599
  * Vertical position of the region's content when it is shorter than the region. Replaces the 'anchor' of the record and of the splits around it. Default: the nearest of those that sets one, else 'top'. A picture shown whole (fit 'contain') and a video, whose 16:9 frame is the largest that fits the cell, sit at the anchor inside the cell.
549
600
  */
@@ -891,7 +942,7 @@ interface Beat {
891
942
  /**
892
943
  * Default content kind for the beat's slide: the same values as Slide.type. Helps engines and planners choose a layout when only the beat is known.
893
944
  */
894
- type?: ("text" | "list" | "image" | "video" | "chart" | "table" | "code" | "metric" | "quote" | "timeline");
945
+ type?: ("text" | "list" | "image" | "video" | "chart" | "table" | "code" | "metric" | "quote" | "timeline" | "diagram");
895
946
  /**
896
947
  * Suggested layout id for the beat's slide, e.g. 'section-divider', 'title-slide', 'text-left'. Resolves the same way as Slide.layout — against catalogs.layouts and the default catalog at https://www.pptx.gallery/layouts.
897
948
  */
@@ -1,5 +1,5 @@
1
1
  import { C as Catalog } from './catalog-refs-kAefsZWT.js';
2
- import { T as TextMeasurement } from './composition-C-hd_Ci3.js';
2
+ import { T as TextMeasurement } from './composition-Ds6WHyO7.js';
3
3
  import { c as FindingSeverity, F as FindingReport } from './finding-l9dlQ2NF.js';
4
4
  import { J as JsonPrimitive } from './json-BFSdESOE.js';
5
5
 
@@ -1,13 +1,13 @@
1
1
  import { CatalogRecordKind } from './index.js';
2
2
  import { Finding } from './index.js';
3
3
  import { Presentation } from './index.js';
4
- import { b as ValidationThresholds, c as ValidationRuleInfo, V as ValidationReport, a as ValidateOptions } from './validation-types-mNmfcY9A.js';
5
- export { C as Contract, d as ValidateFonts, e as ValidationCategory, f as ValidationChecks, g as ValidationRuleCost, v as validationCategories } from './validation-types-mNmfcY9A.js';
4
+ import { b as ValidationThresholds, c as ValidationRuleInfo, V as ValidationReport, a as ValidateOptions } from './validation-types-DxyYPebs.js';
5
+ export { C as Contract, d as ValidateFonts, e as ValidationCategory, f as ValidationChecks, g as ValidationRuleCost, v as validationCategories } from './validation-types-DxyYPebs.js';
6
6
  import './catalog-refs-kAefsZWT.js';
7
7
  import './schemas.js';
8
8
  import './json-BFSdESOE.js';
9
- import './composition-C-hd_Ci3.js';
10
- import './chart-data-Ci9s_NDN.js';
9
+ import './composition-Ds6WHyO7.js';
10
+ import './chart-data-oIZQlFGi.js';
11
11
 
12
12
  /**
13
13
  * The rule metadata: every rule `validate` can report, with its category, default severity, cost, rationale and the
package/dist/validator.js CHANGED
@@ -1,5 +1,5 @@
1
- export { DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-M7YZU3DX.js';
1
+ export { DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-OXLA4HXQ.js';
2
2
  import './chunk-JBARNYFR.js';
3
- import './chunk-5Q4IYLMW.js';
4
- export { promotedRegionKeys } from './chunk-W3SEWSO5.js';
3
+ import './chunk-LEF4X4KI.js';
4
+ export { promotedRegionKeys } from './chunk-NVAJASOD.js';
5
5
  import './chunk-GM7WFPGG.js';
package/dist/yaml.d.ts CHANGED
@@ -2,8 +2,8 @@ import { Catalog } from './composition.js';
2
2
  import { Presentation } from './index.js';
3
3
  import { ValidateOptions, ValidationReport } from './index.js';
4
4
  import { Finding, FindingLocation } from './index.js';
5
- import './composition-C-hd_Ci3.js';
6
- import './chart-data-Ci9s_NDN.js';
5
+ import './composition-Ds6WHyO7.js';
6
+ import './chart-data-oIZQlFGi.js';
7
7
  import './json-BFSdESOE.js';
8
8
 
9
9
  /** A finding located in the YAML source: `yaml/<rule>` syntax and dialect errors (category `format`) and the OPF findings of the parsed deck. */
package/dist/yaml.js CHANGED
@@ -1,10 +1,10 @@
1
- export { OPFYamlError, YAML_SCHEMA_URL, fromYaml, parseYamlData, scanYamlComments, toYaml } from './chunk-XG4JKFZ6.js';
2
- import './chunk-KELC4K62.js';
1
+ export { OPFYamlError, YAML_SCHEMA_URL, fromYaml, parseYamlData, scanYamlComments, toYaml } from './chunk-IT7FQKED.js';
2
+ import './chunk-HKUV7NEN.js';
3
3
  import './chunk-RYZPBJLB.js';
4
- import './chunk-HRKV43GC.js';
5
- import './chunk-KOCXV7H3.js';
6
- import './chunk-M7YZU3DX.js';
4
+ import './chunk-BBVW5ZC2.js';
5
+ import './chunk-XQO2CT6Q.js';
6
+ import './chunk-OXLA4HXQ.js';
7
7
  import './chunk-JBARNYFR.js';
8
- import './chunk-5Q4IYLMW.js';
9
- import './chunk-W3SEWSO5.js';
8
+ import './chunk-LEF4X4KI.js';
9
+ import './chunk-NVAJASOD.js';
10
10
  import './chunk-GM7WFPGG.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpresentation/opf",
3
- "version": "0.31.0",
3
+ "version": "0.32.1",
4
4
  "description": "Canonical Open Presentation Format schemas, TypeScript types, local validation and composition; in Node, the file API and the CLI defaults register the pptx.gallery catalog of @openpresentation/gallery.",
5
5
  "license": "MIT",
6
6
  "author": "Open Presentation",
@@ -148,6 +148,14 @@
148
148
  "worker": "./dist/schema-engine-precompiled.js",
149
149
  "edge-light": "./dist/schema-engine-precompiled.js",
150
150
  "default": "./dist/schema-engine-ajv.js"
151
+ },
152
+ "#diagram-engine": {
153
+ "types": "./src/diagram-engine-eager.ts",
154
+ "workerd": "./dist/diagram-engine-lazy.js",
155
+ "worker": "./dist/diagram-engine-lazy.js",
156
+ "edge-light": "./dist/diagram-engine-lazy.js",
157
+ "browser": "./dist/diagram-engine-lazy.js",
158
+ "default": "./dist/diagram-engine-eager.js"
151
159
  }
152
160
  },
153
161
  "files": [
@@ -163,8 +171,9 @@
163
171
  "ajv": "^8.17.1",
164
172
  "ajv-formats": "^3.0.1",
165
173
  "jsonc-parser": "3.3.1",
174
+ "pele": "1.13.0",
166
175
  "yaml": "^2.9.1",
167
- "@openpresentation/gallery": "^0.31.0"
176
+ "@openpresentation/gallery": "^0.32.1"
168
177
  },
169
178
  "devDependencies": {
170
179
  "@expo-google-fonts/arimo": "0.4.3",
@@ -182,11 +191,11 @@
182
191
  "sharp": "0.35.5",
183
192
  "tsup": "^9.0.0",
184
193
  "typescript": "~5.9.3",
185
- "workerd": "1.20261023.1"
194
+ "workerd": "1.20261030.1"
186
195
  },
187
196
  "peerDependencies": {
188
- "@openpresentation/opf-pptx": "^0.31.0",
189
- "@openpresentation/opf-render": "^0.31.0"
197
+ "@openpresentation/opf-pptx": "^0.32.1",
198
+ "@openpresentation/opf-render": "^0.32.1"
190
199
  },
191
200
  "peerDependenciesMeta": {
192
201
  "@openpresentation/opf-pptx": {
@@ -207,5 +216,5 @@
207
216
  "test:packed": "node test/packed-install-smoke.mjs",
208
217
  "pack:dry-run": "pnpm run build:deps && pnpm run build && npm pack --dry-run --cache /tmp/opf-npm-cache"
209
218
  },
210
- "gitHead": "d68561fad7b2b319cd7cdb8d7e75fefdd1dffa4c"
219
+ "gitHead": "9d5510c31efff5f0d3a5a2406ae3488f34b2b6c4"
211
220
  }