@openpresentation/opf 0.22.2 → 0.23.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 (58) hide show
  1. package/dist/browser.js +16 -16
  2. package/dist/{chunk-MAJHCGOW.js → chunk-3FWUA763.js} +4 -4
  3. package/dist/{chunk-SPCONMIY.js → chunk-4I3XPRAO.js} +1 -1
  4. package/dist/{chunk-7XNAMCGT.js → chunk-B2XALDGS.js} +6 -6
  5. package/dist/{chunk-AHKRJSCF.js → chunk-BOWBPSFF.js} +6 -6
  6. package/dist/{chunk-YUIEWE5B.js → chunk-CNOLYQ4C.js} +2 -2
  7. package/dist/{chunk-2SENTA2R.js → chunk-F55S5HDP.js} +1 -1
  8. package/dist/{chunk-23MOKE4B.js → chunk-L67MPTPZ.js} +43 -9
  9. package/dist/{chunk-VKNFZEMG.js → chunk-N3ZPLGK5.js} +137 -16
  10. package/dist/{chunk-KUNXFN7B.js → chunk-NIA2WEXN.js} +1 -1
  11. package/dist/{chunk-MG34DCDB.js → chunk-PLV7P236.js} +2 -2
  12. package/dist/{chunk-3T7MNRBY.js → chunk-TILQBXPZ.js} +1 -1
  13. package/dist/{chunk-BULGAKBY.js → chunk-TMOQ532D.js} +2 -2
  14. package/dist/{chunk-MLMTXXM4.js → chunk-VHNG75IH.js} +5 -5
  15. package/dist/{chunk-YSJRBRHB.js → chunk-VIOSRKMA.js} +1 -1
  16. package/dist/{chunk-SBWIZSPB.js → chunk-XKUEEDDN.js} +5 -5
  17. package/dist/{chunk-X3PQMMAY.js → chunk-YMBA3V2O.js} +1 -1
  18. package/dist/{chunk-3UAVON3O.js → chunk-ZIRSAFRC.js} +99 -0
  19. package/dist/{composition-CkHn6JrM.d.ts → composition-qX-igJe5.d.ts} +147 -15
  20. package/dist/composition.d.ts +1 -1
  21. package/dist/composition.js +1 -1
  22. package/dist/conversion-CY34E5WI.js +19 -0
  23. package/dist/{conversion-C_MOkYGH.d.ts → conversion-t-YYHWL-.d.ts} +5 -5
  24. package/dist/convert.d.ts +2 -2
  25. package/dist/convert.js +7 -7
  26. package/dist/data.d.ts +1 -1
  27. package/dist/data.js +2 -2
  28. package/dist/{deck-report-vnWmXBjq.d.ts → deck-report-CJ6gd_6-.d.ts} +2 -2
  29. package/dist/deck.d.ts +5 -5
  30. package/dist/deck.js +10 -10
  31. package/dist/diff.js +5 -5
  32. package/dist/docs.js +5 -5
  33. package/dist/examples.d.ts +1 -1
  34. package/dist/examples.js +213 -0
  35. package/dist/format.js +2 -2
  36. package/dist/index.d.ts +11 -11
  37. package/dist/index.js +20 -20
  38. package/dist/markdown.d.ts +3 -3
  39. package/dist/markdown.js +7 -7
  40. package/dist/node-engine.d.ts +7 -7
  41. package/dist/node-engine.js +20 -20
  42. package/dist/{pagination-C4jzAtFy.d.ts → pagination-LiWxhbsz.d.ts} +3 -1
  43. package/dist/pagination.d.ts +2 -2
  44. package/dist/pagination.js +4 -4
  45. package/dist/patch.js +4 -4
  46. package/dist/{presentation-fN6tORPZ.d.ts → presentation-Dn-fm0iY.d.ts} +35 -0
  47. package/dist/schemas.d.ts +2 -0
  48. package/dist/schemas.js +1 -1
  49. package/dist/spec/schemas/opf.schema.json +40 -0
  50. package/dist/types.d.ts +1 -1
  51. package/dist/{validation-types-B21fZfb2.d.ts → validation-types-CzPKoKWo.d.ts} +1 -1
  52. package/dist/{validator-Cflv4F9e.d.ts → validator-BuAV_HUo.d.ts} +2 -2
  53. package/dist/validator.d.ts +4 -4
  54. package/dist/validator.js +3 -3
  55. package/dist/yaml.d.ts +3 -3
  56. package/dist/yaml.js +7 -7
  57. package/package.json +3 -3
  58. package/dist/conversion-LBQMY7LX.js +0 -19
@@ -693,6 +693,14 @@
693
693
  "description": "Default slide background applied across the deck unless overridden on a slide (slides.N.design.background); the resolved theme's background is the fallback. A background is the only canvas fill and never moves content. String shorthand accepts theme slots ('light1', 'light2', 'dark1', 'dark2'), hex colors, or an image source starting with 'asset:', 'https://', 'data:', './' or '../' (a cover image); object forms support theme, solid, gradient, image, or pattern fills.",
694
694
  "examples": ["dark1", "#ffff00", { "type": "theme", "slot": "light1" }]
695
695
  },
696
+ "variant": {
697
+ "oneOf": [
698
+ { "$ref": "#/$defs/ThemeBackgroundSlot" },
699
+ { "$ref": "#/$defs/ColorVariant" }
700
+ ],
701
+ "description": "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.",
702
+ "examples": ["dark1", { "background": "light1", "accents": ["accent2", "accent1", "accent3", "accent4", "accent5", "accent6"] }]
703
+ },
696
704
  "logo": {
697
705
  "oneOf": [
698
706
  {
@@ -1435,6 +1443,28 @@
1435
1443
  "description": "An image source in a string shorthand: an 'asset:<id>' reference, an HTTPS URL, a data URI, or a relative path starting with './' or '../' (resolved against the OPF file location).",
1436
1444
  "examples": ["asset:cover-photo", "https://cdn.acme.com/backgrounds/cover.jpg", "./images/harbour.jpg"]
1437
1445
  },
1446
+ "ColorVariant": {
1447
+ "type": "object",
1448
+ "additionalProperties": false,
1449
+ "required": ["background"],
1450
+ "description": "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.",
1451
+ "properties": {
1452
+ "background": {
1453
+ "$ref": "#/$defs/ThemeBackgroundSlot",
1454
+ "description": "The scheme slot that is the background (bg1) of the variant."
1455
+ },
1456
+ "accents": {
1457
+ "type": "array",
1458
+ "minItems": 6,
1459
+ "maxItems": 6,
1460
+ "uniqueItems": true,
1461
+ "items": { "type": "string", "enum": ["accent1", "accent2", "accent3", "accent4", "accent5", "accent6"] },
1462
+ "description": "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.",
1463
+ "examples": [["accent2", "accent1", "accent3", "accent4", "accent5", "accent6"]]
1464
+ }
1465
+ },
1466
+ "examples": [{ "background": "dark1" }, { "background": "light2", "accents": ["accent2", "accent1", "accent3", "accent4", "accent5", "accent6"] }]
1467
+ },
1438
1468
  "Background": {
1439
1469
  "description": "Background fill applied to slides. Theme backgrounds preserve PowerPoint's color-scheme background choice; other variants represent fixed background fills.",
1440
1470
  "oneOf": [
@@ -1488,6 +1518,11 @@
1488
1518
  "description": "Fixed gradient slide background fill.",
1489
1519
  "required": ["type", "gradient"],
1490
1520
  "properties": {
1521
+ "tone": {
1522
+ "type": "string",
1523
+ "enum": ["dark", "light"],
1524
+ "description": "Whether the background is dark or light, which picks the color map (dark1 or light1) so text, lines and neutrals read on it. Without a tone a picture or gradient takes the deck's variant, else counts as light."
1525
+ },
1491
1526
  "type": {
1492
1527
  "type": "string",
1493
1528
  "const": "gradient",
@@ -1540,6 +1575,11 @@
1540
1575
  "description": "Picture background: the image fills the whole canvas behind everything and never moves content (to push content aside, use an image block with placement). The string shorthand 'asset:x' (or any image source) is { type: 'image', src: 'asset:x' }, a cover image. Paint order: the colour scheme's default slide background, the picture, then the overlay, then furniture and content.",
1541
1576
  "required": ["type", "src"],
1542
1577
  "properties": {
1578
+ "tone": {
1579
+ "type": "string",
1580
+ "enum": ["dark", "light"],
1581
+ "description": "Whether the background is dark or light, which picks the color map (dark1 or light1) so text, lines and neutrals read on it. Without a tone a picture or gradient takes the deck's variant, else counts as light."
1582
+ },
1543
1583
  "type": {
1544
1584
  "type": "string",
1545
1585
  "const": "image",
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { P as Presentation } from './presentation-fN6tORPZ.js';
1
+ export { P as Presentation } from './presentation-Dn-fm0iY.js';
2
2
  export { b as CatalogKind } from './catalog-refs-CSHevLn1.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';
@@ -1,5 +1,5 @@
1
1
  import { C as Catalog } from './catalog-refs-CSHevLn1.js';
2
- import { T as TextMeasurement } from './composition-CkHn6JrM.js';
2
+ import { T as TextMeasurement } from './composition-qX-igJe5.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,8 +1,8 @@
1
1
  import { b as CatalogKind } from './catalog-refs-CSHevLn1.js';
2
2
  import { SchemaName } from './schemas.js';
3
3
  import { a as Finding } from './finding-l9dlQ2NF.js';
4
- import { P as Presentation } from './presentation-fN6tORPZ.js';
5
- import { b as ValidationThresholds, c as ValidationRuleInfo, V as ValidationReport, a as ValidateOptions } from './validation-types-B21fZfb2.js';
4
+ import { P as Presentation } from './presentation-Dn-fm0iY.js';
5
+ import { b as ValidationThresholds, c as ValidationRuleInfo, V as ValidationReport, a as ValidateOptions } from './validation-types-CzPKoKWo.js';
6
6
 
7
7
  /**
8
8
  * RR-78: the version of the catalog record schemas (spec/schemas/<kind>.schema.json) this core reads. A catalog package
@@ -1,9 +1,9 @@
1
- export { D as DEFAULT_VALIDATION_THRESHOLDS, O as OPFValidationError, c as assertValid, d as assertValidCatalogRecord, g as findValidationRule, p as promotedRegionKeys, v as validate, h as validateCatalogRecord, i as validationRules } from './validator-Cflv4F9e.js';
1
+ export { D as DEFAULT_VALIDATION_THRESHOLDS, O as OPFValidationError, c as assertValid, d as assertValidCatalogRecord, g as findValidationRule, p as promotedRegionKeys, v as validate, h as validateCatalogRecord, i as validationRules } from './validator-BuAV_HUo.js';
2
2
  import './finding-l9dlQ2NF.js';
3
- import './presentation-fN6tORPZ.js';
4
- export { C as Contract, d as ValidateFonts, a as ValidateOptions, e as ValidationCategory, f as ValidationChecks, V as ValidationReport, g as ValidationRuleCost, c as ValidationRuleInfo, b as ValidationThresholds, v as validationCategories } from './validation-types-B21fZfb2.js';
3
+ import './presentation-Dn-fm0iY.js';
4
+ export { C as Contract, d as ValidateFonts, a as ValidateOptions, e as ValidationCategory, f as ValidationChecks, V as ValidationReport, g as ValidationRuleCost, c as ValidationRuleInfo, b as ValidationThresholds, v as validationCategories } from './validation-types-CzPKoKWo.js';
5
5
  import './catalog-refs-CSHevLn1.js';
6
6
  import './schemas.js';
7
7
  import './json-BFSdESOE.js';
8
- import './composition-CkHn6JrM.js';
8
+ import './composition-qX-igJe5.js';
9
9
  import './chart-data-BnNqgnC-.js';
package/dist/validator.js CHANGED
@@ -1,3 +1,3 @@
1
- export { DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-23MOKE4B.js';
2
- export { promotedRegionKeys } from './chunk-VKNFZEMG.js';
3
- import './chunk-3UAVON3O.js';
1
+ export { DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-L67MPTPZ.js';
2
+ export { promotedRegionKeys } from './chunk-N3ZPLGK5.js';
3
+ import './chunk-ZIRSAFRC.js';
package/dist/yaml.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { C as Catalog } from './catalog-refs-CSHevLn1.js';
2
- import { P as Presentation } from './presentation-fN6tORPZ.js';
3
- import { a as ValidateOptions, V as ValidationReport } from './validation-types-B21fZfb2.js';
2
+ import { P as Presentation } from './presentation-Dn-fm0iY.js';
3
+ import { a as ValidateOptions, V as ValidationReport } from './validation-types-CzPKoKWo.js';
4
4
  import { a as Finding, b as FindingLocation } from './finding-l9dlQ2NF.js';
5
- import './composition-CkHn6JrM.js';
5
+ import './composition-qX-igJe5.js';
6
6
  import './chart-data-BnNqgnC-.js';
7
7
  import './json-BFSdESOE.js';
8
8
 
package/dist/yaml.js CHANGED
@@ -1,7 +1,7 @@
1
- export { OPFYamlError, YAML_SCHEMA_URL, fromYaml, parseYamlData, scanYamlComments, toYaml } from './chunk-7XNAMCGT.js';
2
- import './chunk-3T7MNRBY.js';
3
- import './chunk-X3PQMMAY.js';
4
- import './chunk-2SENTA2R.js';
5
- import './chunk-23MOKE4B.js';
6
- import './chunk-VKNFZEMG.js';
7
- import './chunk-3UAVON3O.js';
1
+ export { OPFYamlError, YAML_SCHEMA_URL, fromYaml, parseYamlData, scanYamlComments, toYaml } from './chunk-B2XALDGS.js';
2
+ import './chunk-TILQBXPZ.js';
3
+ import './chunk-YMBA3V2O.js';
4
+ import './chunk-F55S5HDP.js';
5
+ import './chunk-L67MPTPZ.js';
6
+ import './chunk-N3ZPLGK5.js';
7
+ import './chunk-ZIRSAFRC.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpresentation/opf",
3
- "version": "0.22.2",
3
+ "version": "0.23.0",
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",
@@ -168,8 +168,8 @@
168
168
  "typescript": "~5.9.3"
169
169
  },
170
170
  "peerDependencies": {
171
- "@openpresentation/opf-pptx": "^0.22.0",
172
- "@openpresentation/opf-render": "^0.22.0"
171
+ "@openpresentation/opf-pptx": "^0.23.0",
172
+ "@openpresentation/opf-render": "^0.23.0"
173
173
  },
174
174
  "peerDependenciesMeta": {
175
175
  "@openpresentation/opf-pptx": {
@@ -1,19 +0,0 @@
1
- export { convertFiles, deckFileFormat, exportFormatOf, openDeck, planConversion, readInput, saveDeck, writePlanned } from './chunk-AHKRJSCF.js';
2
- import './chunk-MG34DCDB.js';
3
- import './chunk-MAJHCGOW.js';
4
- import './chunk-UJSAR6GF.js';
5
- import './chunk-SPCONMIY.js';
6
- import './chunk-MLMTXXM4.js';
7
- import './chunk-SBWIZSPB.js';
8
- import './chunk-7XNAMCGT.js';
9
- import './chunk-3T7MNRBY.js';
10
- import './chunk-BULGAKBY.js';
11
- import './chunk-YSJRBRHB.js';
12
- import './chunk-X3PQMMAY.js';
13
- import './chunk-YUIEWE5B.js';
14
- import './chunk-KUNXFN7B.js';
15
- import './chunk-2SENTA2R.js';
16
- import './chunk-23MOKE4B.js';
17
- import './chunk-VKNFZEMG.js';
18
- import './chunk-3UAVON3O.js';
19
- import './chunk-F7PLNWHQ.js';