@openpresentation/opf 0.11.4 → 0.12.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.
- package/README.md +16 -0
- package/dist/audit.d.ts +156 -0
- package/dist/audit.js +7 -0
- package/dist/{catalogs-CUClB3nl.d.ts → catalogs-BnI7JKcn.d.ts} +3 -3
- package/dist/catalogs.d.ts +2 -2
- package/dist/catalogs.js +2 -1
- package/dist/{chunk-KJKASEPE.js → chunk-4LAM3N6S.js} +753 -42
- package/dist/chunk-6LZK2IZB.js +1690 -0
- package/dist/{chunk-NSVVQ52O.js → chunk-AUM5MXBR.js} +8 -6
- package/dist/{chunk-AEUSVEUY.js → chunk-E34DJ5LL.js} +50 -14
- package/dist/chunk-FYLJVF7X.js +18448 -0
- package/dist/{chunk-HJL64ETN.js → chunk-GJKJL4YY.js} +14 -0
- package/dist/{chunk-3H2U7FDR.js → chunk-HOBSL7AJ.js} +1867 -247
- package/dist/chunk-JKVKYVWL.js +1332 -0
- package/dist/{chunk-3OJN7QAW.js → chunk-MWPMJE6P.js} +18 -4
- package/dist/chunk-RUC7L5DJ.js +261 -0
- package/dist/chunk-S5W34SIJ.js +1 -0
- package/dist/chunk-V2537ENL.js +198 -0
- package/dist/{chunk-RXNFDGPC.js → chunk-WXSPETQ6.js} +311 -40
- package/dist/{composition-Dl-d9FRj.d.ts → composition-DWbCiMwF.d.ts} +559 -10
- package/dist/composition.d.ts +1 -1
- package/dist/composition.js +2 -1
- package/dist/convert.d.ts +261 -0
- package/dist/convert.js +1107 -0
- package/dist/diff.d.ts +145 -0
- package/dist/diff.js +604 -0
- package/dist/docs.js +72 -18
- package/dist/examples.d.ts +1 -1
- package/dist/examples.js +112 -112
- package/dist/font-policy.d.ts +15 -0
- package/dist/font-policy.js +1 -1
- package/dist/format.d.ts +20 -0
- package/dist/format.js +83 -0
- package/dist/index.d.ts +173 -24
- package/dist/index.js +926 -262
- package/dist/lint.d.ts +4 -4
- package/dist/lint.js +6 -5
- package/dist/markdown.d.ts +74 -0
- package/dist/markdown.js +1941 -0
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +6 -5
- package/dist/patch.d.ts +99 -0
- package/dist/patch.js +6 -0
- package/dist/{presentation-j5PVrqfV.d.ts → presentation-DcF-MZcz.d.ts} +452 -17
- package/dist/repo-readme.js +1 -1
- package/dist/{schemas-X_NniU4A.d.ts → schemas-BSjlG8-R.d.ts} +28 -0
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +1 -1
- package/dist/spec/catalogs/audiences/customers.json +5 -1
- package/dist/spec/catalogs/audiences/executives.json +5 -1
- package/dist/spec/catalogs/audiences/index.json +20 -8
- package/dist/spec/catalogs/audiences/investors.json +5 -1
- package/dist/spec/catalogs/audiences/marketing-team.json +5 -1
- package/dist/spec/catalogs/audiences/regulators.json +5 -1
- package/dist/spec/catalogs/audiences/sales-team.json +5 -1
- package/dist/spec/catalogs/manifest.json +2 -2
- package/dist/spec/reference/engine-defaults.json +1 -1
- package/dist/spec/reference/font-policy.json +311 -40
- package/dist/spec/reference/font-policy.schema.json +40 -0
- package/dist/spec/reference/symbol-font-encodings.json +18354 -0
- package/dist/spec/reference/symbol-font-encodings.schema.json +156 -0
- package/dist/spec/schemas/audience.schema.json +7 -7
- package/dist/spec/schemas/narrative.schema.json +1 -1
- package/dist/spec/schemas/opf.schema.json +597 -28
- package/dist/spec-files.d.ts +1 -1
- package/dist/spec-files.js +1 -1
- package/dist/symbol-font-encodings.d.ts +128 -0
- package/dist/symbol-font-encodings.js +1 -0
- package/dist/types.d.ts +4 -4
- package/dist/validator-DfG9yxba.d.ts +172 -0
- package/dist/validator.d.ts +4 -36
- package/dist/validator.js +5 -4
- package/package.json +32 -3
- package/dist/chunk-FDCWQHWO.js +0 -1366
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { assertValidPresentation
|
|
2
|
-
import { DEFAULT_FONT_SCHEME, resolveFontSchemeReference, resolveFontFamilies, resolveCanvasDimensions, composeSlide, tableRowBoundaries } from './chunk-
|
|
3
|
-
import { catalogs } from './chunk-
|
|
1
|
+
import { assertValidPresentation } from './chunk-JKVKYVWL.js';
|
|
2
|
+
import { DEFAULT_FONT_SCHEME, resolveFontSchemeReference, resolveFontFamilies, resolveCanvasDimensions, composeSlide, tableRowBoundaries, visitContentPayloads, sliceNumberedItems } from './chunk-HOBSL7AJ.js';
|
|
3
|
+
import { catalogs } from './chunk-E34DJ5LL.js';
|
|
4
4
|
|
|
5
5
|
// src/pagination.ts
|
|
6
6
|
var OPFPaginationError = class extends Error {
|
|
@@ -66,7 +66,8 @@ function leafFor(path, field, value) {
|
|
|
66
66
|
return leaf;
|
|
67
67
|
}
|
|
68
68
|
function paginateSlide(input, options = {}) {
|
|
69
|
-
|
|
69
|
+
const deckReferences = options.presentation?.references;
|
|
70
|
+
assertValidPresentation({ ...Array.isArray(deckReferences) ? { references: deckReferences } : {}, slides: [input] });
|
|
70
71
|
let source = clone(input);
|
|
71
72
|
const maxSlides = options.maxSlides ?? 100;
|
|
72
73
|
if (!Number.isInteger(maxSlides) || maxSlides < 1 || maxSlides > 1e4) throw new RangeError("maxSlides must be an integer between 1 and 10000.");
|
|
@@ -143,7 +144,7 @@ function paginateSlide(input, options = {}) {
|
|
|
143
144
|
if (leafPaths.has(childPath)) {
|
|
144
145
|
const portion = portions.get(childPath);
|
|
145
146
|
if (portion) {
|
|
146
|
-
result[key] = clone(portion.value);
|
|
147
|
+
result[key] = clone(portion.leaf.unit === "items" && portion.start > 0 && (key === "items" || key === "bullets") && node.numbering !== void 0 ? sliceNumberedItems(portion.leaf.value, node.numbering, portion.start, portion.end) : portion.value);
|
|
147
148
|
hasContent = true;
|
|
148
149
|
mappings.push({ sourcePath: childPath, outputPath, ...portion.leaf.unit ? { range: { unit: portion.leaf.unit, start: portion.start, end: portion.end } } : {} });
|
|
149
150
|
}
|
|
@@ -179,7 +180,8 @@ function paginateSlide(input, options = {}) {
|
|
|
179
180
|
const issues = fit(geometry(slide, slides.length).diagnostics);
|
|
180
181
|
if (issues.length) throw new OPFPaginationError("A continuation page does not fit at its final page number. No partial result was returned.", issues);
|
|
181
182
|
assignPageIds(slide, slides.length);
|
|
182
|
-
|
|
183
|
+
const references = options.presentation?.references;
|
|
184
|
+
assertValidPresentation({ ...Array.isArray(references) ? { references } : {}, slides: [slide] });
|
|
183
185
|
slides.push(slide);
|
|
184
186
|
pages.push({ slideIndex: sourceIndex + slides.length - 1, mappings, ...initial.furniture ? { repeatedMappings: repeatedMappings(slides.length - 1) } : {} });
|
|
185
187
|
selected = /* @__PURE__ */ new Map();
|
|
@@ -24,7 +24,11 @@ var audiences = [
|
|
|
24
24
|
"tags": [
|
|
25
25
|
"leadership",
|
|
26
26
|
"decision-making"
|
|
27
|
-
]
|
|
27
|
+
],
|
|
28
|
+
"deprecation": {
|
|
29
|
+
"replacedBy": "executive",
|
|
30
|
+
"reason": "Duplicate of 'executive', the id pptx.gallery publishes. Kept so existing documents keep validating and rendering unchanged; use 'executive' in new documents."
|
|
31
|
+
}
|
|
28
32
|
},
|
|
29
33
|
{
|
|
30
34
|
"$schema": "https://openpresentation.org/schema/opf-audience/v1",
|
|
@@ -106,7 +110,11 @@ var audiences = [
|
|
|
106
110
|
"external",
|
|
107
111
|
"capital",
|
|
108
112
|
"fundraising"
|
|
109
|
-
]
|
|
113
|
+
],
|
|
114
|
+
"deprecation": {
|
|
115
|
+
"replacedBy": "investor",
|
|
116
|
+
"reason": "Duplicate of 'investor', the id pptx.gallery publishes. Kept so existing documents keep validating and rendering unchanged; use 'investor' in new documents."
|
|
117
|
+
}
|
|
110
118
|
},
|
|
111
119
|
{
|
|
112
120
|
"$schema": "https://openpresentation.org/schema/opf-audience/v1",
|
|
@@ -133,7 +141,11 @@ var audiences = [
|
|
|
133
141
|
"external",
|
|
134
142
|
"customer",
|
|
135
143
|
"sales"
|
|
136
|
-
]
|
|
144
|
+
],
|
|
145
|
+
"deprecation": {
|
|
146
|
+
"replacedBy": "customer",
|
|
147
|
+
"reason": "Duplicate of 'customer', the id pptx.gallery publishes. Kept so existing documents keep validating and rendering unchanged; use 'customer' in new documents."
|
|
148
|
+
}
|
|
137
149
|
},
|
|
138
150
|
{
|
|
139
151
|
"$schema": "https://openpresentation.org/schema/opf-audience/v1",
|
|
@@ -160,7 +172,11 @@ var audiences = [
|
|
|
160
172
|
"internal",
|
|
161
173
|
"go-to-market",
|
|
162
174
|
"enablement"
|
|
163
|
-
]
|
|
175
|
+
],
|
|
176
|
+
"deprecation": {
|
|
177
|
+
"replacedBy": "sales",
|
|
178
|
+
"reason": "Duplicate of 'sales', the id pptx.gallery publishes. Kept so existing documents keep validating and rendering unchanged; use 'sales' in new documents."
|
|
179
|
+
}
|
|
164
180
|
},
|
|
165
181
|
{
|
|
166
182
|
"$schema": "https://openpresentation.org/schema/opf-audience/v1",
|
|
@@ -187,7 +203,11 @@ var audiences = [
|
|
|
187
203
|
"internal",
|
|
188
204
|
"go-to-market",
|
|
189
205
|
"brand"
|
|
190
|
-
]
|
|
206
|
+
],
|
|
207
|
+
"deprecation": {
|
|
208
|
+
"replacedBy": "marketing",
|
|
209
|
+
"reason": "Duplicate of 'marketing', the id pptx.gallery publishes. Kept so existing documents keep validating and rendering unchanged; use 'marketing' in new documents."
|
|
210
|
+
}
|
|
191
211
|
},
|
|
192
212
|
{
|
|
193
213
|
"$schema": "https://openpresentation.org/schema/opf-audience/v1",
|
|
@@ -269,7 +289,11 @@ var audiences = [
|
|
|
269
289
|
"external",
|
|
270
290
|
"compliance",
|
|
271
291
|
"policy"
|
|
272
|
-
]
|
|
292
|
+
],
|
|
293
|
+
"deprecation": {
|
|
294
|
+
"replacedBy": "regulatory",
|
|
295
|
+
"reason": "Duplicate of 'regulatory', the id pptx.gallery publishes. Kept so existing documents keep validating and rendering unchanged; use 'regulatory' in new documents."
|
|
296
|
+
}
|
|
273
297
|
},
|
|
274
298
|
{
|
|
275
299
|
"$schema": "https://openpresentation.org/schema/opf-audience/v1",
|
|
@@ -19696,14 +19720,16 @@ var catalogIndexes = {
|
|
|
19696
19720
|
"$schema": "https://openpresentation.org/schema/opf-catalog-index/v1",
|
|
19697
19721
|
"kind": "audiences",
|
|
19698
19722
|
"version": "1",
|
|
19699
|
-
"description": "Catalog of presentation audiences available in the openpresentation.org catalog. Each entry is a lightweight summary; full audience records (seniority, technical fluency, decision power, attention budget, recommended narratives and tones) live in the per-id JSON files alongside this index. Audiences are referenced from OPF documents via audience. The singular ids from executive onward match the audience pages on pptx.gallery and carry its recommendations
|
|
19700
|
-
"contentSha256": "
|
|
19723
|
+
"description": "Catalog of presentation audiences available in the openpresentation.org catalog. Each entry is a lightweight summary; full audience records (seniority, technical fluency, decision power, attention budget, recommended narratives and tones) live in the per-id JSON files alongside this index. Audiences are referenced from OPF documents via audience. The singular ids from executive onward match the audience pages on pptx.gallery and carry its recommendations. The older plural ids (executives, investors, customers, sales-team, marketing-team, regulators) are deprecated aliases: they stay resolvable for existing documents, point at their singular replacement through replacedBy, and are excluded from default listings.",
|
|
19724
|
+
"contentSha256": "bfb44226b533a2da04c92077eb39c689dde43181e0b9979fb15c247dfaba1f98",
|
|
19701
19725
|
"records": [
|
|
19702
19726
|
{
|
|
19703
19727
|
"id": "executives",
|
|
19704
19728
|
"name": "Executives",
|
|
19705
19729
|
"summary": "Senior leaders who need the recommendation up front, the evidence behind it, and the ask.",
|
|
19706
|
-
"file": "executives.json"
|
|
19730
|
+
"file": "executives.json",
|
|
19731
|
+
"deprecated": true,
|
|
19732
|
+
"replacedBy": "executive"
|
|
19707
19733
|
},
|
|
19708
19734
|
{
|
|
19709
19735
|
"id": "board",
|
|
@@ -19721,25 +19747,33 @@ var catalogIndexes = {
|
|
|
19721
19747
|
"id": "investors",
|
|
19722
19748
|
"name": "Investors",
|
|
19723
19749
|
"summary": "Capital allocators evaluating fit, traction, and risk-adjusted return.",
|
|
19724
|
-
"file": "investors.json"
|
|
19750
|
+
"file": "investors.json",
|
|
19751
|
+
"deprecated": true,
|
|
19752
|
+
"replacedBy": "investor"
|
|
19725
19753
|
},
|
|
19726
19754
|
{
|
|
19727
19755
|
"id": "customers",
|
|
19728
19756
|
"name": "Customers",
|
|
19729
19757
|
"summary": "Buyers and users \u2014 outcome-focused, allergic to jargon, sensitive to time.",
|
|
19730
|
-
"file": "customers.json"
|
|
19758
|
+
"file": "customers.json",
|
|
19759
|
+
"deprecated": true,
|
|
19760
|
+
"replacedBy": "customer"
|
|
19731
19761
|
},
|
|
19732
19762
|
{
|
|
19733
19763
|
"id": "sales-team",
|
|
19734
19764
|
"name": "Sales Team",
|
|
19735
19765
|
"summary": "Quota-carrying reps who want talk tracks, objection handling, and crisp proof.",
|
|
19736
|
-
"file": "sales-team.json"
|
|
19766
|
+
"file": "sales-team.json",
|
|
19767
|
+
"deprecated": true,
|
|
19768
|
+
"replacedBy": "sales"
|
|
19737
19769
|
},
|
|
19738
19770
|
{
|
|
19739
19771
|
"id": "marketing-team",
|
|
19740
19772
|
"name": "Marketing Team",
|
|
19741
19773
|
"summary": "Brand and demand-gen practitioners aligning on positioning, messaging, and campaigns.",
|
|
19742
|
-
"file": "marketing-team.json"
|
|
19774
|
+
"file": "marketing-team.json",
|
|
19775
|
+
"deprecated": true,
|
|
19776
|
+
"replacedBy": "marketing"
|
|
19743
19777
|
},
|
|
19744
19778
|
{
|
|
19745
19779
|
"id": "all-hands",
|
|
@@ -19757,7 +19791,9 @@ var catalogIndexes = {
|
|
|
19757
19791
|
"id": "regulators",
|
|
19758
19792
|
"name": "Regulators",
|
|
19759
19793
|
"summary": "Government, agency, and policy reviewers evaluating compliance, risk, and impact.",
|
|
19760
|
-
"file": "regulators.json"
|
|
19794
|
+
"file": "regulators.json",
|
|
19795
|
+
"deprecated": true,
|
|
19796
|
+
"replacedBy": "regulatory"
|
|
19761
19797
|
},
|
|
19762
19798
|
{
|
|
19763
19799
|
"id": "executive",
|