@openpresentation/opf 0.27.0 → 0.29.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.
- package/dist/browser.js +18 -18
- package/dist/{catalog-refs-BSfGELpt.d.ts → catalog-refs-kAefsZWT.d.ts} +2 -1
- package/dist/{catalog-schemas-DoxA2BgY.d.ts → catalog-schemas-CC1d_h8s.d.ts} +3 -2
- package/dist/{chart-data-BnNqgnC-.d.ts → chart-data-Ci9s_NDN.d.ts} +2 -1
- package/dist/{chunk-EO3JWEO5.js → chunk-5OMZW44K.js} +1 -1
- package/dist/{chunk-4ZM5G3XX.js → chunk-5Q4IYLMW.js} +30 -14
- package/dist/{chunk-WJ4XTCOD.js → chunk-7UO6H32I.js} +3 -3
- package/dist/{chunk-4ACS57MG.js → chunk-ARFAQNOH.js} +2 -2
- package/dist/{chunk-GNKESMZT.js → chunk-F5QC7E2O.js} +6 -6
- package/dist/{chunk-SYW4BCGZ.js → chunk-HRKV43GC.js} +2 -2
- package/dist/{chunk-TMREBZBQ.js → chunk-I6G32TB5.js} +3 -3
- package/dist/{chunk-O3SA5SJ4.js → chunk-KELC4K62.js} +1 -1
- package/dist/{chunk-ABFDFZIW.js → chunk-KOCXV7H3.js} +1 -1
- package/dist/{chunk-PAGVSTVF.js → chunk-M7YZU3DX.js} +149 -26
- package/dist/{chunk-JSHMFTSY.js → chunk-P5E3FNYO.js} +1 -1
- package/dist/{chunk-ZGTOZA2S.js → chunk-R455YZNO.js} +6 -6
- package/dist/{chunk-OSM3LZ2Y.js → chunk-SYCHWS7C.js} +4 -4
- package/dist/{chunk-353VBJ6K.js → chunk-UKWNHK62.js} +5 -5
- package/dist/{chunk-LRTQXGJO.js → chunk-W3SEWSO5.js} +543 -94
- package/dist/{chunk-CXPBU5W4.js → chunk-W7KPMUJF.js} +1 -1
- package/dist/{chunk-APLNGCEZ.js → chunk-WHDOOLIO.js} +2 -2
- package/dist/{chunk-KZPZRHL6.js → chunk-XG4JKFZ6.js} +6 -6
- package/dist/{chunk-7XUEKIXH.js → chunk-Z7XNHIW7.js} +2 -2
- package/dist/chunk-ZROVYWGU.js +1 -0
- package/dist/{composition-BGmpe5e4.d.ts → composition-C-hd_Ci3.d.ts} +84 -10
- package/dist/composition.d.ts +3 -3
- package/dist/composition.js +1 -1
- package/dist/{conversion-8SQD4dqu.d.ts → conversion-CCAmVKp8.d.ts} +9 -8
- package/dist/conversion-KV2WWCMK.js +24 -0
- package/dist/convert.d.ts +6 -5
- package/dist/convert.js +7 -7
- package/dist/data.d.ts +4 -3
- package/dist/data.js +2 -2
- package/dist/{deck-report-BaKgPh_N.d.ts → deck-report-DQMsvyBI.d.ts} +5 -4
- package/dist/deck.d.ts +10 -9
- package/dist/deck.js +11 -11
- package/dist/diff.d.ts +3 -2
- package/dist/diff.js +4 -4
- package/dist/docs.d.ts +2 -1
- package/dist/docs.js +29 -17
- package/dist/examples.d.ts +3 -2
- package/dist/examples.js +90 -50
- package/dist/{explain-JSuESV-Y.d.ts → explain-iZeNOUc6.d.ts} +2 -1
- package/dist/{finding-Bh56sGtF.d.ts → finding-l9dlQ2NF.d.ts} +1 -1
- package/dist/font-policy.d.ts +2 -1
- package/dist/format.d.ts +2 -1
- package/dist/format.js +2 -2
- package/dist/ids.d.ts +3 -2
- package/dist/ids.js +4 -4
- package/dist/index.d.ts +38 -17
- package/dist/index.js +22 -22
- package/dist/markdown.d.ts +8 -7
- package/dist/markdown.js +8 -8
- package/dist/node-engine.d.ts +34 -11
- package/dist/node-engine.js +35 -29
- package/dist/{pagination-BsUTsQvk.d.ts → pagination-DyAKYpXu.d.ts} +4 -3
- package/dist/pagination.d.ts +4 -4
- package/dist/pagination.js +4 -4
- package/dist/patch.d.ts +4 -2
- package/dist/patch.js +3 -3
- package/dist/precompiled.d.ts +1 -1
- package/dist/precompiled.js +2 -2
- package/dist/{presentation-C-nHZyMw.d.ts → presentation-8jLSTFqL.d.ts} +10 -10
- package/dist/repo-readme.js +1 -1
- package/dist/schema-engine-ajv.js +1 -1
- package/dist/schema-engine-precompiled.js +2 -2
- package/dist/schema.d.ts +4 -3
- package/dist/schema.js +3 -3
- package/dist/schemas.d.ts +2 -1
- package/dist/schemas.js +1 -1
- package/dist/source.d.ts +5 -4
- package/dist/source.js +10 -10
- package/dist/spec/README.md +1 -1
- package/dist/spec/schemas/audience.schema.json +1 -0
- package/dist/spec/schemas/catalog-index.schema.json +1 -0
- package/dist/spec/schemas/catalog-manifest.schema.json +1 -0
- package/dist/spec/schemas/chart-type.schema.json +1 -0
- package/dist/spec/schemas/color-scheme.schema.json +1 -0
- package/dist/spec/schemas/finding.schema.json +1 -0
- package/dist/spec/schemas/font-scheme.schema.json +1 -0
- package/dist/spec/schemas/language.schema.json +1 -0
- package/dist/spec/schemas/layout-preview-index.schema.json +1 -0
- package/dist/spec/schemas/layout.schema.json +8 -6
- package/dist/spec/schemas/narrative.schema.json +1 -0
- package/dist/spec/schemas/opf.schema.json +8 -7
- package/dist/spec/schemas/purpose.schema.json +1 -0
- package/dist/spec/schemas/social-platform.schema.json +1 -0
- package/dist/spec/schemas/theme.schema.json +3 -1
- package/dist/spec/schemas/tone.schema.json +1 -0
- package/dist/spec-files.d.ts +2 -1
- package/dist/symbol-font-encodings.d.ts +2 -1
- package/dist/types.d.ts +10 -10
- package/dist/{validation-types-6_jEaHeE.d.ts → validation-types-mNmfcY9A.d.ts} +5 -4
- package/dist/validator.d.ts +8 -8
- package/dist/validator.js +3 -3
- package/dist/yaml.d.ts +8 -7
- package/dist/yaml.js +7 -7
- package/package.json +7 -7
- package/dist/chunk-GJO5NUVT.js +0 -1
- package/dist/conversion-LN6PFRZL.js +0 -24
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { P as Presentation } from './presentation-
|
|
2
|
-
export {
|
|
1
|
+
export { P as Presentation } from './presentation-8jLSTFqL.js';
|
|
2
|
+
export { a as CatalogKind } from './catalog-refs-kAefsZWT.js';
|
|
3
3
|
export { SchemaName } from './schemas.js';
|
|
4
|
-
export {
|
|
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';
|
|
5
5
|
import './json-BFSdESOE.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -290,7 +290,7 @@ interface Theme {
|
|
|
290
290
|
/**
|
|
291
291
|
* As design.listBullet of a deck.
|
|
292
292
|
*/
|
|
293
|
-
listBullet?: ("character" | "image");
|
|
293
|
+
listBullet?: ("character" | "image" | "none");
|
|
294
294
|
};
|
|
295
295
|
/**
|
|
296
296
|
* Free-form labels for filtering and search.
|
|
@@ -375,7 +375,7 @@ interface ColorVariant {
|
|
|
375
375
|
*/
|
|
376
376
|
type RegionEntry = (HeadingRegion | Region | Split);
|
|
377
377
|
/**
|
|
378
|
-
* The region's or split's share along its parent's direction: a number above 0 and up to 100 that siblings share in proportion (the gap is taken out first), default 1; or 'auto', the length the content needs at the starting text size (
|
|
378
|
+
* The region's or split's share along its parent's direction: a number above 0 and up to 100 that siblings share in proportion (the gap is taken out first), default 1; or 'auto', the length the content needs at the starting text size (up to the space the heading rows and the content of the numeric rows leave; auto rows that do not all fit shrink together, each giving up the same fraction of what it can give up above its content's length at the minimum font size; a split sized auto is as tall as its tallest content, and every row of a column split sized auto is auto too; auto regions with no content take no space). 'auto' is allowed only on an entry of a column; in a row it is the validate finding opf/layout-template. When every entry of a column record is 'auto', the record's 'anchor' places the whole stack. The default for a heading region is 'auto' in a column and 1 in a row.
|
|
379
379
|
*
|
|
380
380
|
* This interface was referenced by `Layout`'s JSON-Schema
|
|
381
381
|
* via the `definition` "RegionSize".
|
|
@@ -413,7 +413,7 @@ interface Layout {
|
|
|
413
413
|
*/
|
|
414
414
|
direction?: ("row" | "column");
|
|
415
415
|
/**
|
|
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. Default 'top'.
|
|
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'.
|
|
417
417
|
*/
|
|
418
418
|
anchor?: ("top" | "middle" | "bottom");
|
|
419
419
|
/**
|
|
@@ -485,9 +485,9 @@ interface DesignHints {
|
|
|
485
485
|
*/
|
|
486
486
|
imageFit?: ("cover" | "contain" | "stretch");
|
|
487
487
|
/**
|
|
488
|
-
* Marker style of lists: 'character' draws the glyph, 'image' draws the deck's icon logo as a picture bullet.
|
|
488
|
+
* 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
489
|
*/
|
|
490
|
-
listBullet?: ("character" | "image");
|
|
490
|
+
listBullet?: ("character" | "image" | "none");
|
|
491
491
|
/**
|
|
492
492
|
* 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
493
|
*/
|
|
@@ -529,7 +529,7 @@ interface Region {
|
|
|
529
529
|
*/
|
|
530
530
|
role?: ("primary" | "secondary" | "media" | "supporting");
|
|
531
531
|
/**
|
|
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
|
|
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'.
|
|
533
533
|
*/
|
|
534
534
|
flow?: ("none" | "grid" | "column" | "auto");
|
|
535
535
|
/**
|
|
@@ -545,7 +545,7 @@ interface Region {
|
|
|
545
545
|
*/
|
|
546
546
|
listColumns?: ("auto" | 1);
|
|
547
547
|
/**
|
|
548
|
-
* 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'.
|
|
548
|
+
* 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
549
|
*/
|
|
550
550
|
anchor?: ("top" | "middle" | "bottom");
|
|
551
551
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { T as TextMeasurement } from './composition-
|
|
3
|
-
import { c as FindingSeverity,
|
|
1
|
+
import { C as Catalog } from './catalog-refs-kAefsZWT.js';
|
|
2
|
+
import { T as TextMeasurement } from './composition-C-hd_Ci3.js';
|
|
3
|
+
import { c as FindingSeverity, F as FindingReport } from './finding-l9dlQ2NF.js';
|
|
4
4
|
import { J as JsonPrimitive } from './json-BFSdESOE.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -289,4 +289,5 @@ interface ValidationReport extends FindingReport {
|
|
|
289
289
|
unfilledVariables?: string[];
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
export { variableDeclarations as A,
|
|
292
|
+
export { variableDeclarations as A, DEFAULT_VARIABLE_DATE_FORMAT as D, OPFVariableError as O, VARIABLE_KINDS as j, coerceVariableValue as s, formatVariableNumber as t, hasContentVariables as u, validationCategories as v, isTemplate as w, listBuiltinVariables as x, listVariables as y, resolveVariables as z };
|
|
293
|
+
export type { BuiltinVariableInfo as B, Contract as C, ResolveVariablesOptions as R, ValidationReport as V, ValidateOptions as a, ValidationThresholds as b, ValidationRuleInfo as c, ValidateFonts as d, ValidationCategory as e, ValidationChecks as f, ValidationRuleCost as g, VariableDiagnostic as h, ResolveVariablesResult as i, VariableDeclaration as k, VariableDiagnosticCode as l, VariableDiagnosticSeverity as m, VariableInfo as n, VariableKind as o, VariableUse as p, VariableUseForm as q, VariableValues as r };
|
package/dist/validator.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { b as ValidationThresholds, c as ValidationRuleInfo, V as ValidationReport, a as ValidateOptions } from './validation-types-
|
|
5
|
-
export { C as Contract, d as ValidateFonts, e as ValidationCategory, f as ValidationChecks, g as ValidationRuleCost, v as validationCategories } from './validation-types-
|
|
6
|
-
import './catalog-refs-
|
|
1
|
+
import { CatalogRecordKind } from './index.js';
|
|
2
|
+
import { Finding } from './index.js';
|
|
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';
|
|
6
|
+
import './catalog-refs-kAefsZWT.js';
|
|
7
7
|
import './schemas.js';
|
|
8
8
|
import './json-BFSdESOE.js';
|
|
9
|
-
import './composition-
|
|
10
|
-
import './chart-data-
|
|
9
|
+
import './composition-C-hd_Ci3.js';
|
|
10
|
+
import './chart-data-Ci9s_NDN.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-
|
|
1
|
+
export { DEFAULT_VALIDATION_THRESHOLDS, OPFValidationError, assertValid, assertValidCatalogRecord, findValidationRule, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-M7YZU3DX.js';
|
|
2
2
|
import './chunk-JBARNYFR.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
export { promotedRegionKeys } from './chunk-
|
|
3
|
+
import './chunk-5Q4IYLMW.js';
|
|
4
|
+
export { promotedRegionKeys } from './chunk-W3SEWSO5.js';
|
|
5
5
|
import './chunk-GM7WFPGG.js';
|
package/dist/yaml.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import './composition-
|
|
6
|
-
import './chart-data-
|
|
1
|
+
import { Catalog } from './composition.js';
|
|
2
|
+
import { Presentation } from './index.js';
|
|
3
|
+
import { ValidateOptions, ValidationReport } from './index.js';
|
|
4
|
+
import { Finding, FindingLocation } from './index.js';
|
|
5
|
+
import './composition-C-hd_Ci3.js';
|
|
6
|
+
import './chart-data-Ci9s_NDN.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. */
|
|
@@ -99,4 +99,5 @@ declare function parseYamlData(yaml: string, options?: {
|
|
|
99
99
|
findings: YamlFinding[];
|
|
100
100
|
};
|
|
101
101
|
|
|
102
|
-
export {
|
|
102
|
+
export { OPFYamlError, YAML_SCHEMA_URL, fromYaml, parseYamlData, scanYamlComments, toYaml };
|
|
103
|
+
export type { FromYamlOptions, FromYamlResult, ToYamlOptions, ToYamlResult, YamlComments, YamlFinding };
|
package/dist/yaml.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { OPFYamlError, YAML_SCHEMA_URL, fromYaml, parseYamlData, scanYamlComments, toYaml } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { OPFYamlError, YAML_SCHEMA_URL, fromYaml, parseYamlData, scanYamlComments, toYaml } from './chunk-XG4JKFZ6.js';
|
|
2
|
+
import './chunk-KELC4K62.js';
|
|
3
3
|
import './chunk-RYZPBJLB.js';
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
6
|
-
import './chunk-
|
|
4
|
+
import './chunk-HRKV43GC.js';
|
|
5
|
+
import './chunk-KOCXV7H3.js';
|
|
6
|
+
import './chunk-M7YZU3DX.js';
|
|
7
7
|
import './chunk-JBARNYFR.js';
|
|
8
|
-
import './chunk-
|
|
9
|
-
import './chunk-
|
|
8
|
+
import './chunk-5Q4IYLMW.js';
|
|
9
|
+
import './chunk-W3SEWSO5.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.
|
|
3
|
+
"version": "0.29.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",
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"ajv-formats": "^3.0.1",
|
|
165
165
|
"jsonc-parser": "3.3.1",
|
|
166
166
|
"yaml": "^2.9.1",
|
|
167
|
-
"@openpresentation/gallery": "^0.
|
|
167
|
+
"@openpresentation/gallery": "^0.29.0"
|
|
168
168
|
},
|
|
169
169
|
"devDependencies": {
|
|
170
170
|
"@expo-google-fonts/arimo": "0.4.3",
|
|
@@ -180,13 +180,13 @@
|
|
|
180
180
|
"json-schema-to-typescript": "^16.0.0",
|
|
181
181
|
"pdf-lib": "1.17.1",
|
|
182
182
|
"sharp": "0.35.5",
|
|
183
|
-
"tsup": "^
|
|
183
|
+
"tsup": "^9.0.0",
|
|
184
184
|
"typescript": "~5.9.3",
|
|
185
|
-
"workerd": "1.
|
|
185
|
+
"workerd": "1.20261023.1"
|
|
186
186
|
},
|
|
187
187
|
"peerDependencies": {
|
|
188
|
-
"@openpresentation/opf-pptx": "^0.
|
|
189
|
-
"@openpresentation/opf-render": "^0.
|
|
188
|
+
"@openpresentation/opf-pptx": "^0.29.0",
|
|
189
|
+
"@openpresentation/opf-render": "^0.29.0"
|
|
190
190
|
},
|
|
191
191
|
"peerDependenciesMeta": {
|
|
192
192
|
"@openpresentation/opf-pptx": {
|
|
@@ -207,5 +207,5 @@
|
|
|
207
207
|
"test:packed": "node test/packed-install-smoke.mjs",
|
|
208
208
|
"pack:dry-run": "pnpm run build:deps && pnpm run build && npm pack --dry-run --cache /tmp/opf-npm-cache"
|
|
209
209
|
},
|
|
210
|
-
"gitHead": "
|
|
210
|
+
"gitHead": "464e10d3c15647b0e43326ac7e6761e34789991a"
|
|
211
211
|
}
|