@openpresentation/opf 0.2.1 → 0.3.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/README.md +72 -3
- package/dist/catalogs.d.ts +12 -12
- package/dist/catalogs.js +4 -4
- package/dist/catalogs.js.map +1 -1
- package/dist/docs.d.ts +17 -0
- package/dist/docs.js +56 -0
- package/dist/docs.js.map +1 -0
- package/dist/examples.d.ts +43 -0
- package/dist/examples.js +44718 -0
- package/dist/examples.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +577 -19
- package/dist/index.js.map +1 -1
- package/dist/{validator-D7WwzKyx.d.ts → presentation-C8BOK0-5.d.ts} +7 -45
- package/dist/repo-readme.d.ts +4 -0
- package/dist/repo-readme.js +9 -0
- package/dist/repo-readme.js.map +1 -0
- package/dist/schemas.d.ts +51 -39
- package/dist/schemas.js +23 -14
- package/dist/schemas.js.map +1 -1
- package/dist/spec/README.md +42 -0
- package/dist/spec/catalogs/audiences/engineering-team.json +1 -1
- package/dist/spec/catalogs/tones/casual.json +1 -1
- package/dist/spec/catalogs/tones/conversational.json +1 -1
- package/dist/spec/catalogs/tones/technical.json +1 -1
- package/dist/spec/openapi.yaml +13 -13
- package/dist/spec/schemas/opf.schema.json +18 -11
- package/dist/spec-files.d.ts +7 -2
- package/dist/spec-files.js +8 -1
- package/dist/spec-files.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/validator.d.ts +40 -3
- package/dist/validator.js +563 -14
- package/dist/validator.js.map +1 -1
- package/package.json +14 -2
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Canonical Open Presentation Format package for JavaScript and TypeScript.
|
|
4
4
|
|
|
5
|
-
Publishes the OPF schemas, catalog presets, raw spec files, generated TypeScript types, and local validation helpers. The schema is pre-stable (0.x — expect breaking changes between minor versions until 1.0). This package does not render PowerPoint files, parse `.pptx`, fetch remote catalogs, or use AI.
|
|
5
|
+
Publishes the OPF schemas, catalog presets, raw spec files, generated TypeScript types, examples, docs, and local validation helpers. The schema is pre-stable (0.x — expect breaking changes between minor versions until 1.0). This package does not render PowerPoint files, parse `.pptx`, fetch remote catalogs, call hosted APIs, provide telemetry, or use AI.
|
|
6
6
|
|
|
7
|
-
The canonical npm package remains `@openpresentation/opf`; a separate `@openpresentation/opf-spec` package is not used for v0.2.0 so existing downstream imports stay stable. The packed npm artifact includes package-addressable OPF schemas, catalogs, reference files, and `openapi.yaml` under `spec/`.
|
|
7
|
+
The canonical npm package remains `@openpresentation/opf`; a separate `@openpresentation/opf-spec` package is not used for v0.2.0 so existing downstream imports stay stable. The packed npm artifact includes package-addressable OPF schemas, catalogs, reference files, and an optional downstream-service reference `openapi.yaml` under `spec/`.
|
|
8
8
|
|
|
9
9
|
Repository: https://github.com/OpenPresentation/opf
|
|
10
10
|
|
|
@@ -93,6 +93,75 @@ export function LayoutThumbnail({ slug }: { slug: string }) {
|
|
|
93
93
|
Raw HTML source-of-truth lives under `spec/previews/layouts/<slug>.html` and is
|
|
94
94
|
also addressable via `@openpresentation/opf/spec/previews/layouts/<slug>.html`.
|
|
95
95
|
|
|
96
|
+
### Example decks
|
|
97
|
+
|
|
98
|
+
`@openpresentation/opf/examples` ships every `.opf.json` file from `examples/`
|
|
99
|
+
in the upstream repo, already parsed and validated against the presentation
|
|
100
|
+
schema at build time.
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
import {
|
|
104
|
+
examples,
|
|
105
|
+
galleries,
|
|
106
|
+
getExample,
|
|
107
|
+
getExamplesByGallery,
|
|
108
|
+
} from "@openpresentation/opf/examples";
|
|
109
|
+
|
|
110
|
+
const compliance = getExample("compliance-readiness-review");
|
|
111
|
+
const businessDecks = getExamplesByGallery("business-functions");
|
|
112
|
+
|
|
113
|
+
console.log(`${examples.length} example decks across ${galleries.length} galleries`);
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Each `ExampleRecord` includes the parsed `Presentation` object plus its
|
|
117
|
+
repo-relative path, top-level category (`gallery`, `technical`, …), and
|
|
118
|
+
gallery slug when applicable.
|
|
119
|
+
|
|
120
|
+
### Documentation pages
|
|
121
|
+
|
|
122
|
+
`@openpresentation/opf/docs` ships the top-level `docs/*.md` reference pages
|
|
123
|
+
(`schema-reference`, `catalog-schema-reference`, `content-payloads`,
|
|
124
|
+
`content-item-design-overrides`, `examples`). Subdirectories like
|
|
125
|
+
`docs/migrations` and `docs/plans` are intentionally excluded — those move too
|
|
126
|
+
quickly to ship inside a pinned npm release.
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
import { docs, getDoc } from "@openpresentation/opf/docs";
|
|
130
|
+
|
|
131
|
+
for (const doc of docs) {
|
|
132
|
+
console.log(`${doc.title} — ${doc.file}`);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const schemaRef = getDoc("schema-reference");
|
|
136
|
+
console.log(schemaRef?.markdown.slice(0, 200));
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Upstream README
|
|
140
|
+
|
|
141
|
+
`@openpresentation/opf/repo-readme` exposes the raw markdown of the upstream
|
|
142
|
+
`OpenPresentation/opf` README.md at the version pinned by this release. Use it
|
|
143
|
+
when you want to mirror the canonical README inside another site or app
|
|
144
|
+
without doing a network fetch.
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
import { repoReadme } from "@openpresentation/opf/repo-readme";
|
|
148
|
+
|
|
149
|
+
console.log(repoReadme.split("\n").slice(0, 3).join("\n"));
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Validation results carry `errors` (structural problems that make `valid`
|
|
153
|
+
false) and `warnings` (advisory issues such as unknown catalog ids in
|
|
154
|
+
`narrative`, `design`, or chart `type` references — these never affect
|
|
155
|
+
`valid`). Documents that declare matching inline `catalogs.<kind>.records[]`
|
|
156
|
+
or a custom `catalogs.<kind>.source` are exempt from unknown-id warnings for
|
|
157
|
+
that kind.
|
|
158
|
+
|
|
159
|
+
```ts
|
|
160
|
+
const result = validatePresentation(deck);
|
|
161
|
+
if (!result.valid) console.error(result.errors);
|
|
162
|
+
for (const warning of result.warnings) console.warn(warning.path, warning.message);
|
|
163
|
+
```
|
|
164
|
+
|
|
96
165
|
Validate catalog records locally:
|
|
97
166
|
|
|
98
167
|
```ts
|
|
@@ -114,7 +183,7 @@ import presentationSchema from "@openpresentation/opf/spec/schemas/opf.schema.js
|
|
|
114
183
|
};
|
|
115
184
|
```
|
|
116
185
|
|
|
117
|
-
The raw spec manifest exposes typed package paths for files that should be resolved from npm instead of GitHub
|
|
186
|
+
The raw spec manifest exposes typed package paths for files that should be resolved from npm instead of GitHub. `openapi.yaml` is a reference contract for downstream services that choose to expose OPF over HTTP; OpenPresentation does not host that API.
|
|
118
187
|
|
|
119
188
|
```ts
|
|
120
189
|
import { specFileEntries } from "@openpresentation/opf/spec-files";
|
package/dist/catalogs.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ declare const audiences: readonly [{
|
|
|
34
34
|
readonly technicalFluency: "high";
|
|
35
35
|
readonly decisionPower: "advisory";
|
|
36
36
|
readonly attentionBudgetMinutes: 45;
|
|
37
|
-
readonly recommendedNarratives: readonly ["
|
|
37
|
+
readonly recommendedNarratives: readonly ["status-update", "challenge-resolution", "innovation", "weekly-progress"];
|
|
38
38
|
readonly recommendedTones: readonly ["technical", "casual", "conversational"];
|
|
39
39
|
readonly tags: readonly ["internal", "engineering", "practitioner"];
|
|
40
40
|
}, {
|
|
@@ -249,7 +249,7 @@ declare const tones: readonly [{
|
|
|
249
249
|
readonly voiceCues: readonly ["Use first and second person.", "Use contractions ('we're', 'it's', 'don't').", "Favor short sentences and active voice.", "Frame metrics with a human-scale anchor when possible."];
|
|
250
250
|
readonly avoid: readonly ["Stiff corporate jargon.", "Long compound sentences.", "Overuse of superlatives.", "Bureaucratic passive voice."];
|
|
251
251
|
readonly samplePhrases: readonly ["We shipped the new dashboard last week, and customers are already moving over.", "Here's where we ended up on hiring this quarter.", "It's been a busy month — here's the recap."];
|
|
252
|
-
readonly recommendedNarratives: readonly ["weekly-progress", "status-update", "company-intro", "
|
|
252
|
+
readonly recommendedNarratives: readonly ["weekly-progress", "status-update", "company-intro", "focus"];
|
|
253
253
|
readonly tags: readonly ["internal", "warm", "conversational"];
|
|
254
254
|
}, {
|
|
255
255
|
readonly $schema: "https://openpresentation.org/schema/opf-tone/v1";
|
|
@@ -271,7 +271,7 @@ declare const tones: readonly [{
|
|
|
271
271
|
readonly voiceCues: readonly ["State the claim, then the mechanism, then the evidence.", "Use exact terminology — don't soften technical terms for general readability.", "Quote benchmarks with conditions (cold/warm, p50/p95/p99, dataset, hardware).", "Prefer diagrams and tables over prose paragraphs for structural information."];
|
|
272
272
|
readonly avoid: readonly ["Vague claims ('much faster', 'better', 'easier').", "Marketing framing without supporting data.", "Glossing over caveats and tradeoffs.", "Casual register that obscures precision."];
|
|
273
273
|
readonly samplePhrases: readonly ["p95 inference latency is 38ms on a single A100, down from 312ms on the prior runtime.", "We replaced the streaming serializer with a batched protobuf path; throughput rose 4.2× under load.", "The result holds for context windows up to 32k tokens; beyond that, see appendix B."];
|
|
274
|
-
readonly recommendedNarratives: readonly ["challenge-resolution", "innovation", "conference-talk", "
|
|
274
|
+
readonly recommendedNarratives: readonly ["challenge-resolution", "innovation", "conference-talk", "status-update"];
|
|
275
275
|
readonly tags: readonly ["technical", "engineering", "research"];
|
|
276
276
|
}, {
|
|
277
277
|
readonly $schema: "https://openpresentation.org/schema/opf-tone/v1";
|
|
@@ -304,7 +304,7 @@ declare const tones: readonly [{
|
|
|
304
304
|
readonly voiceCues: readonly ["Ask a question on the slide, then answer it on the next.", "Use second person — speak to the room, not at it.", "Lean on stories and concrete examples over abstract framing.", "Keep each idea to one short paragraph; let the dialog do the rest."];
|
|
305
305
|
readonly avoid: readonly ["Lecture-style monologue across many bullets.", "Hedge-laden academic phrasing.", "Stuffing slides — leave room for the discussion.", "Inside-baseball references the room may not share."];
|
|
306
306
|
readonly samplePhrases: readonly ["Why now? Two things changed in the last six months.", "Here's the part that surprised us — and what we did about it.", "If you take one thing from this section, take this."];
|
|
307
|
-
readonly recommendedNarratives: readonly ["
|
|
307
|
+
readonly recommendedNarratives: readonly ["focus", "company-intro", "weekly-progress", "performance-review"];
|
|
308
308
|
readonly tags: readonly ["dialog", "podcast", "discussion"];
|
|
309
309
|
}];
|
|
310
310
|
declare const themes: readonly [{
|
|
@@ -9387,7 +9387,7 @@ declare const catalogs: {
|
|
|
9387
9387
|
readonly technicalFluency: "high";
|
|
9388
9388
|
readonly decisionPower: "advisory";
|
|
9389
9389
|
readonly attentionBudgetMinutes: 45;
|
|
9390
|
-
readonly recommendedNarratives: readonly ["
|
|
9390
|
+
readonly recommendedNarratives: readonly ["status-update", "challenge-resolution", "innovation", "weekly-progress"];
|
|
9391
9391
|
readonly recommendedTones: readonly ["technical", "casual", "conversational"];
|
|
9392
9392
|
readonly tags: readonly ["internal", "engineering", "practitioner"];
|
|
9393
9393
|
}, {
|
|
@@ -9602,7 +9602,7 @@ declare const catalogs: {
|
|
|
9602
9602
|
readonly voiceCues: readonly ["Use first and second person.", "Use contractions ('we're', 'it's', 'don't').", "Favor short sentences and active voice.", "Frame metrics with a human-scale anchor when possible."];
|
|
9603
9603
|
readonly avoid: readonly ["Stiff corporate jargon.", "Long compound sentences.", "Overuse of superlatives.", "Bureaucratic passive voice."];
|
|
9604
9604
|
readonly samplePhrases: readonly ["We shipped the new dashboard last week, and customers are already moving over.", "Here's where we ended up on hiring this quarter.", "It's been a busy month — here's the recap."];
|
|
9605
|
-
readonly recommendedNarratives: readonly ["weekly-progress", "status-update", "company-intro", "
|
|
9605
|
+
readonly recommendedNarratives: readonly ["weekly-progress", "status-update", "company-intro", "focus"];
|
|
9606
9606
|
readonly tags: readonly ["internal", "warm", "conversational"];
|
|
9607
9607
|
}, {
|
|
9608
9608
|
readonly $schema: "https://openpresentation.org/schema/opf-tone/v1";
|
|
@@ -9624,7 +9624,7 @@ declare const catalogs: {
|
|
|
9624
9624
|
readonly voiceCues: readonly ["State the claim, then the mechanism, then the evidence.", "Use exact terminology — don't soften technical terms for general readability.", "Quote benchmarks with conditions (cold/warm, p50/p95/p99, dataset, hardware).", "Prefer diagrams and tables over prose paragraphs for structural information."];
|
|
9625
9625
|
readonly avoid: readonly ["Vague claims ('much faster', 'better', 'easier').", "Marketing framing without supporting data.", "Glossing over caveats and tradeoffs.", "Casual register that obscures precision."];
|
|
9626
9626
|
readonly samplePhrases: readonly ["p95 inference latency is 38ms on a single A100, down from 312ms on the prior runtime.", "We replaced the streaming serializer with a batched protobuf path; throughput rose 4.2× under load.", "The result holds for context windows up to 32k tokens; beyond that, see appendix B."];
|
|
9627
|
-
readonly recommendedNarratives: readonly ["challenge-resolution", "innovation", "conference-talk", "
|
|
9627
|
+
readonly recommendedNarratives: readonly ["challenge-resolution", "innovation", "conference-talk", "status-update"];
|
|
9628
9628
|
readonly tags: readonly ["technical", "engineering", "research"];
|
|
9629
9629
|
}, {
|
|
9630
9630
|
readonly $schema: "https://openpresentation.org/schema/opf-tone/v1";
|
|
@@ -9657,7 +9657,7 @@ declare const catalogs: {
|
|
|
9657
9657
|
readonly voiceCues: readonly ["Ask a question on the slide, then answer it on the next.", "Use second person — speak to the room, not at it.", "Lean on stories and concrete examples over abstract framing.", "Keep each idea to one short paragraph; let the dialog do the rest."];
|
|
9658
9658
|
readonly avoid: readonly ["Lecture-style monologue across many bullets.", "Hedge-laden academic phrasing.", "Stuffing slides — leave room for the discussion.", "Inside-baseball references the room may not share."];
|
|
9659
9659
|
readonly samplePhrases: readonly ["Why now? Two things changed in the last six months.", "Here's the part that surprised us — and what we did about it.", "If you take one thing from this section, take this."];
|
|
9660
|
-
readonly recommendedNarratives: readonly ["
|
|
9660
|
+
readonly recommendedNarratives: readonly ["focus", "company-intro", "weekly-progress", "performance-review"];
|
|
9661
9661
|
readonly tags: readonly ["dialog", "podcast", "discussion"];
|
|
9662
9662
|
}];
|
|
9663
9663
|
readonly themes: readonly [{
|
|
@@ -20901,7 +20901,7 @@ declare const catalogEntries: readonly [{
|
|
|
20901
20901
|
readonly technicalFluency: "high";
|
|
20902
20902
|
readonly decisionPower: "advisory";
|
|
20903
20903
|
readonly attentionBudgetMinutes: 45;
|
|
20904
|
-
readonly recommendedNarratives: readonly ["
|
|
20904
|
+
readonly recommendedNarratives: readonly ["status-update", "challenge-resolution", "innovation", "weekly-progress"];
|
|
20905
20905
|
readonly recommendedTones: readonly ["technical", "casual", "conversational"];
|
|
20906
20906
|
readonly tags: readonly ["internal", "engineering", "practitioner"];
|
|
20907
20907
|
}, {
|
|
@@ -21233,7 +21233,7 @@ declare const catalogEntries: readonly [{
|
|
|
21233
21233
|
readonly voiceCues: readonly ["Use first and second person.", "Use contractions ('we're', 'it's', 'don't').", "Favor short sentences and active voice.", "Frame metrics with a human-scale anchor when possible."];
|
|
21234
21234
|
readonly avoid: readonly ["Stiff corporate jargon.", "Long compound sentences.", "Overuse of superlatives.", "Bureaucratic passive voice."];
|
|
21235
21235
|
readonly samplePhrases: readonly ["We shipped the new dashboard last week, and customers are already moving over.", "Here's where we ended up on hiring this quarter.", "It's been a busy month — here's the recap."];
|
|
21236
|
-
readonly recommendedNarratives: readonly ["weekly-progress", "status-update", "company-intro", "
|
|
21236
|
+
readonly recommendedNarratives: readonly ["weekly-progress", "status-update", "company-intro", "focus"];
|
|
21237
21237
|
readonly tags: readonly ["internal", "warm", "conversational"];
|
|
21238
21238
|
}, {
|
|
21239
21239
|
readonly $schema: "https://openpresentation.org/schema/opf-tone/v1";
|
|
@@ -21255,7 +21255,7 @@ declare const catalogEntries: readonly [{
|
|
|
21255
21255
|
readonly voiceCues: readonly ["State the claim, then the mechanism, then the evidence.", "Use exact terminology — don't soften technical terms for general readability.", "Quote benchmarks with conditions (cold/warm, p50/p95/p99, dataset, hardware).", "Prefer diagrams and tables over prose paragraphs for structural information."];
|
|
21256
21256
|
readonly avoid: readonly ["Vague claims ('much faster', 'better', 'easier').", "Marketing framing without supporting data.", "Glossing over caveats and tradeoffs.", "Casual register that obscures precision."];
|
|
21257
21257
|
readonly samplePhrases: readonly ["p95 inference latency is 38ms on a single A100, down from 312ms on the prior runtime.", "We replaced the streaming serializer with a batched protobuf path; throughput rose 4.2× under load.", "The result holds for context windows up to 32k tokens; beyond that, see appendix B."];
|
|
21258
|
-
readonly recommendedNarratives: readonly ["challenge-resolution", "innovation", "conference-talk", "
|
|
21258
|
+
readonly recommendedNarratives: readonly ["challenge-resolution", "innovation", "conference-talk", "status-update"];
|
|
21259
21259
|
readonly tags: readonly ["technical", "engineering", "research"];
|
|
21260
21260
|
}, {
|
|
21261
21261
|
readonly $schema: "https://openpresentation.org/schema/opf-tone/v1";
|
|
@@ -21288,7 +21288,7 @@ declare const catalogEntries: readonly [{
|
|
|
21288
21288
|
readonly voiceCues: readonly ["Ask a question on the slide, then answer it on the next.", "Use second person — speak to the room, not at it.", "Lean on stories and concrete examples over abstract framing.", "Keep each idea to one short paragraph; let the dialog do the rest."];
|
|
21289
21289
|
readonly avoid: readonly ["Lecture-style monologue across many bullets.", "Hedge-laden academic phrasing.", "Stuffing slides — leave room for the discussion.", "Inside-baseball references the room may not share."];
|
|
21290
21290
|
readonly samplePhrases: readonly ["Why now? Two things changed in the last six months.", "Here's the part that surprised us — and what we did about it.", "If you take one thing from this section, take this."];
|
|
21291
|
-
readonly recommendedNarratives: readonly ["
|
|
21291
|
+
readonly recommendedNarratives: readonly ["focus", "company-intro", "weekly-progress", "performance-review"];
|
|
21292
21292
|
readonly tags: readonly ["dialog", "podcast", "discussion"];
|
|
21293
21293
|
}];
|
|
21294
21294
|
readonly index: {
|
package/dist/catalogs.js
CHANGED
|
@@ -63,7 +63,7 @@ var audiences = [
|
|
|
63
63
|
"decisionPower": "advisory",
|
|
64
64
|
"attentionBudgetMinutes": 45,
|
|
65
65
|
"recommendedNarratives": [
|
|
66
|
-
"
|
|
66
|
+
"status-update",
|
|
67
67
|
"challenge-resolution",
|
|
68
68
|
"innovation",
|
|
69
69
|
"weekly-progress"
|
|
@@ -579,7 +579,7 @@ var tones = [
|
|
|
579
579
|
"weekly-progress",
|
|
580
580
|
"status-update",
|
|
581
581
|
"company-intro",
|
|
582
|
-
"
|
|
582
|
+
"focus"
|
|
583
583
|
],
|
|
584
584
|
"tags": [
|
|
585
585
|
"internal",
|
|
@@ -649,7 +649,7 @@ var tones = [
|
|
|
649
649
|
"challenge-resolution",
|
|
650
650
|
"innovation",
|
|
651
651
|
"conference-talk",
|
|
652
|
-
"
|
|
652
|
+
"status-update"
|
|
653
653
|
],
|
|
654
654
|
"tags": [
|
|
655
655
|
"technical",
|
|
@@ -752,7 +752,7 @@ var tones = [
|
|
|
752
752
|
"If you take one thing from this section, take this."
|
|
753
753
|
],
|
|
754
754
|
"recommendedNarratives": [
|
|
755
|
-
"
|
|
755
|
+
"focus",
|
|
756
756
|
"company-intro",
|
|
757
757
|
"weekly-progress",
|
|
758
758
|
"performance-review"
|