@openpresentation/opf 0.10.1 → 0.11.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/{catalogs-DoVmvDr7.d.ts → catalogs-atkOF4Vy.d.ts} +2 -2
- package/dist/catalogs.d.ts +2 -2
- package/dist/catalogs.js +1 -1
- package/dist/{chunk-TU7I3KSB.js → chunk-6FU2KICU.js} +306 -306
- package/dist/{chunk-ZIL7MGZU.js → chunk-CHKJ4QHQ.js} +223 -73
- package/dist/{chunk-EWJNRHXA.js → chunk-EQHZ3ZO4.js} +3 -3
- package/dist/{chunk-PQJRDNA6.js → chunk-FTWNWFIV.js} +72 -1
- package/dist/{chunk-FHGJX5QK.js → chunk-FWA5XB45.js} +33 -12
- package/dist/{chunk-D3GQIREP.js → chunk-GN52EE3P.js} +133 -12
- package/dist/composition-Tv9Wm3Oh.d.ts +691 -0
- package/dist/composition.d.ts +1 -676
- package/dist/composition.js +1 -1
- package/dist/docs.js +38 -8
- package/dist/examples.d.ts +1 -1
- package/dist/index.d.ts +65 -4
- package/dist/index.js +204 -6
- package/dist/lint.d.ts +3 -3
- package/dist/lint.js +5 -5
- package/dist/pagination.d.ts +2 -2
- package/dist/pagination.js +5 -5
- package/dist/{presentation-BMTdX6O1.d.ts → presentation-Ct42Mitb.d.ts} +51 -8
- package/dist/repo-readme.js +1 -1
- package/dist/{schemas-BYe5y8-i.d.ts → schemas-CiVmUT2p.d.ts} +6 -0
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +1 -1
- package/dist/spec/catalogs/narratives/board-meeting.json +21 -21
- package/dist/spec/catalogs/narratives/business-narrative.json +8 -8
- package/dist/spec/catalogs/narratives/business-review.json +12 -12
- package/dist/spec/catalogs/narratives/capacity-planning.json +8 -8
- package/dist/spec/catalogs/narratives/challenge-resolution.json +7 -7
- package/dist/spec/catalogs/narratives/classic-story.json +7 -7
- package/dist/spec/catalogs/narratives/company-intro.json +9 -9
- package/dist/spec/catalogs/narratives/conference-talk.json +1 -1
- package/dist/spec/catalogs/narratives/early-startup-pitch.json +12 -12
- package/dist/spec/catalogs/narratives/educate.json +9 -9
- package/dist/spec/catalogs/narratives/employee-review.json +8 -8
- package/dist/spec/catalogs/narratives/failure-analysis.json +10 -10
- package/dist/spec/catalogs/narratives/focus.json +12 -12
- package/dist/spec/catalogs/narratives/golden-circle.json +1 -1
- package/dist/spec/catalogs/narratives/innovation.json +9 -9
- package/dist/spec/catalogs/narratives/justice.json +11 -11
- package/dist/spec/catalogs/narratives/marketing-strategy.json +11 -11
- package/dist/spec/catalogs/narratives/performance-improvement-plan.json +8 -8
- package/dist/spec/catalogs/narratives/performance-review.json +11 -11
- package/dist/spec/catalogs/narratives/persuade.json +7 -7
- package/dist/spec/catalogs/narratives/persuasive-sales.json +8 -8
- package/dist/spec/catalogs/narratives/pitch-deck.json +3 -3
- package/dist/spec/catalogs/narratives/problem-solution.json +2 -2
- package/dist/spec/catalogs/narratives/product-launch.json +10 -10
- package/dist/spec/catalogs/narratives/project-proposal.json +10 -10
- package/dist/spec/catalogs/narratives/qbr.json +3 -3
- package/dist/spec/catalogs/narratives/rags-to-riches.json +7 -7
- package/dist/spec/catalogs/narratives/reveal.json +8 -8
- package/dist/spec/catalogs/narratives/scqa.json +1 -1
- package/dist/spec/catalogs/narratives/status-update.json +6 -6
- package/dist/spec/catalogs/narratives/strategic-advisory.json +7 -7
- package/dist/spec/catalogs/narratives/strategic-narrative.json +1 -1
- package/dist/spec/catalogs/narratives/survey-analysis.json +10 -10
- package/dist/spec/catalogs/narratives/survival-story.json +10 -10
- package/dist/spec/catalogs/narratives/transformation-arc.json +1 -1
- package/dist/spec/catalogs/narratives/trend-analysis.json +7 -7
- package/dist/spec/catalogs/narratives/underdog-victory.json +8 -8
- package/dist/spec/catalogs/narratives/venture-pitch.json +12 -12
- package/dist/spec/catalogs/narratives/weekly-progress.json +10 -10
- package/dist/spec/openapi.yaml +5 -0
- package/dist/spec/schemas/opf.schema.json +83 -12
- package/dist/types.d.ts +3 -3
- package/dist/validator.d.ts +7 -4
- package/dist/validator.js +4 -4
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var presentation = {
|
|
|
3
3
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
4
|
"$id": "https://openpresentation.org/schema/opf/v1",
|
|
5
5
|
"title": "Presentation",
|
|
6
|
-
"description": "Open-source JSON format for describing PowerPoint presentations. Agents describe narratives, content, audience, reusable assets, and design \u2014 the engine handles OOXML complexity.\n\nFields that reference catalog records (narrative, language, tone, audience, purpose, design.theme / design.theme.id, design.colorScheme / design.colorScheme.id, design.fontScheme / design.fontScheme.id, Slide.layout, Chart.type, Organization.socials / Speaker.socials) resolve through the catalog system: inline 'catalogs.<kind>.records[]' on the document \u2192 'catalogs.<kind>.source' on the document \u2192 engine defaults \u2192 the default catalog at https://www.pptx.gallery/<kind>. Every reference resolves to the catalog record's 'id' field. When an OPF document omits a reference entirely, the engine falls back to engine defaults (see /spec/reference/engine-defaults.json for a reference example). The defaults file is engine configuration; it is not part of the OPF document contract and has no JSON Schema.\n\nMost catalog references accept the bare 'id' as a string for the common case (e.g. narrative = 'classic-story', design.colorScheme = 'cool-horizon'). Audience, purpose, tone, design, and language object forms use 'id' as a base catalog reference plus inline overrides. Asset references use 'asset:<id>' strings that point into the top-level assets registry.",
|
|
6
|
+
"description": "Open-source JSON format for describing PowerPoint presentations. Agents describe narratives, content, audience, reusable assets, and design \u2014 the engine handles OOXML complexity.\n\nFields that reference catalog records (narrative, language, tone, audience, purpose, design.theme / design.theme.id, design.colorScheme / design.colorScheme.id, design.fontScheme / design.fontScheme.id, Slide.layout, Chart.type, Organization.socials / Speaker.socials) resolve through the catalog system: inline 'catalogs.<kind>.records[]' on the document \u2192 'catalogs.<kind>.source' on the document \u2192 engine defaults \u2192 the default catalog at https://www.pptx.gallery/<kind>. Every reference resolves to the catalog record's 'id' field. When an OPF document omits a reference entirely, the engine falls back to engine defaults (see /spec/reference/engine-defaults.json for a reference example). The defaults file is engine configuration; it is not part of the OPF document contract and has no JSON Schema.\n\nMost catalog references accept the bare 'id' as a string for the common case (e.g. narrative = 'classic-story', design.colorScheme = 'cool-horizon'). Audience, purpose, tone, design, and language object forms use 'id' as a base catalog reference plus inline overrides. Asset references use 'asset:<id>' strings that point into the top-level assets registry, and content color fields (rich-text runs, styled table cells) accept hex values, color-scheme slot/role names, or 'var:<id>' references into the top-level variables map.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"required": [
|
|
9
9
|
"slides"
|
|
@@ -284,6 +284,10 @@ var presentation = {
|
|
|
284
284
|
"$ref": "#/$defs/Design",
|
|
285
285
|
"description": "Optional design system covering theme, color scheme, font scheme, dimensions, background, logo, watermark, header, and footer applied to the deck. When omitted, engines use their default design configuration."
|
|
286
286
|
},
|
|
287
|
+
"variables": {
|
|
288
|
+
"$ref": "#/$defs/Variables",
|
|
289
|
+
"description": "Optional named color variables for values the deck uses in more than one place or wants to name for intent (e.g. a risk red, a brand highlight). Content color fields reference entries as 'var:<id>' strings. Variables complement the color scheme: scheme slots and roles stay the primary vocabulary; variables cover deck-specific named colors that have no scheme slot."
|
|
290
|
+
},
|
|
287
291
|
"narrative": {
|
|
288
292
|
"oneOf": [
|
|
289
293
|
{
|
|
@@ -1982,6 +1986,109 @@ Resolution order: inline catalogs.fontSchemes.records[] -> catalogs.fontSchemes.
|
|
|
1982
1986
|
"#0F172AFF"
|
|
1983
1987
|
]
|
|
1984
1988
|
},
|
|
1989
|
+
"ColorRef": {
|
|
1990
|
+
"anyOf": [
|
|
1991
|
+
{
|
|
1992
|
+
"$ref": "#/$defs/HexColor"
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
"type": "string",
|
|
1996
|
+
"enum": [
|
|
1997
|
+
"accent1",
|
|
1998
|
+
"accent2",
|
|
1999
|
+
"accent3",
|
|
2000
|
+
"accent4",
|
|
2001
|
+
"accent5",
|
|
2002
|
+
"accent6",
|
|
2003
|
+
"dark1",
|
|
2004
|
+
"dark2",
|
|
2005
|
+
"light1",
|
|
2006
|
+
"light2",
|
|
2007
|
+
"hyperlink",
|
|
2008
|
+
"followedHyperlink",
|
|
2009
|
+
"primary",
|
|
2010
|
+
"secondary",
|
|
2011
|
+
"accent",
|
|
2012
|
+
"background",
|
|
2013
|
+
"surface",
|
|
2014
|
+
"text",
|
|
2015
|
+
"textSecondary"
|
|
2016
|
+
]
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
"type": "string",
|
|
2020
|
+
"pattern": "^var:[a-z][a-z0-9-]*$"
|
|
2021
|
+
}
|
|
2022
|
+
],
|
|
2023
|
+
"description": "A color value or reference, enforced on styled table cell fill and text colors and on cell border colors. Three forms:\n- Literal hex: '#RGB', '#RRGGBB', or '#RRGGBBAA'.\n- Color-scheme name, resolved through the effective color scheme after design resolution: an OOXML slot ('accent1'-'accent6', 'dark1', 'dark2', 'light1', 'light2', 'hyperlink', 'followedHyperlink') or an abstract role ('primary', 'secondary', 'accent', 'background', 'surface', 'text', 'textSecondary'). Roles resolve through the same role-to-slot mapping engines already apply to color schemes.\n- Variable reference: 'var:<id>' into the top-level variables map.\n\nNames keep content theme-portable: re-theming the deck updates every named reference, where a literal hex stays frozen. Unknown 'var:' ids produce a validation warning, never an error, and engines fall back to their default text color. TextRun.color documents the same three forms but remains an open string so imported decks with unrecognized run colors stay valid; validators warn there instead of erroring.",
|
|
2024
|
+
"examples": [
|
|
2025
|
+
"#0F4C81",
|
|
2026
|
+
"accent2",
|
|
2027
|
+
"text",
|
|
2028
|
+
"var:risk"
|
|
2029
|
+
]
|
|
2030
|
+
},
|
|
2031
|
+
"Variables": {
|
|
2032
|
+
"type": "object",
|
|
2033
|
+
"propertyNames": {
|
|
2034
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
2035
|
+
},
|
|
2036
|
+
"additionalProperties": {
|
|
2037
|
+
"$ref": "#/$defs/Variable"
|
|
2038
|
+
},
|
|
2039
|
+
"description": "Named color variables, keyed by stable kebab-case id. Content color fields reference entries as 'var:<id>' strings. Each value is a hex string shorthand or a Variable object.",
|
|
2040
|
+
"examples": [
|
|
2041
|
+
{
|
|
2042
|
+
"risk": "#B42318",
|
|
2043
|
+
"highlight": {
|
|
2044
|
+
"type": "color",
|
|
2045
|
+
"value": "#0F4C81",
|
|
2046
|
+
"description": "Brand highlight for emphasized runs."
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
]
|
|
2050
|
+
},
|
|
2051
|
+
"Variable": {
|
|
2052
|
+
"oneOf": [
|
|
2053
|
+
{
|
|
2054
|
+
"$ref": "#/$defs/HexColor"
|
|
2055
|
+
},
|
|
2056
|
+
{
|
|
2057
|
+
"type": "object",
|
|
2058
|
+
"required": [
|
|
2059
|
+
"type",
|
|
2060
|
+
"value"
|
|
2061
|
+
],
|
|
2062
|
+
"additionalProperties": false,
|
|
2063
|
+
"properties": {
|
|
2064
|
+
"type": {
|
|
2065
|
+
"type": "string",
|
|
2066
|
+
"enum": [
|
|
2067
|
+
"color"
|
|
2068
|
+
],
|
|
2069
|
+
"description": "Variable kind. Only 'color' is defined today; other kinds may be added when content surfaces exist to consume them."
|
|
2070
|
+
},
|
|
2071
|
+
"value": {
|
|
2072
|
+
"$ref": "#/$defs/HexColor",
|
|
2073
|
+
"description": "Hex color this variable resolves to."
|
|
2074
|
+
},
|
|
2075
|
+
"description": {
|
|
2076
|
+
"type": "string",
|
|
2077
|
+
"description": "Optional prose describing what the variable is for, surfaced by pickers and agents."
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
],
|
|
2082
|
+
"description": 'A single named variable. A hex string is shorthand for { "type": "color", "value": value }.',
|
|
2083
|
+
"examples": [
|
|
2084
|
+
"#B42318",
|
|
2085
|
+
{
|
|
2086
|
+
"type": "color",
|
|
2087
|
+
"value": "#B42318",
|
|
2088
|
+
"description": "Risk emphasis."
|
|
2089
|
+
}
|
|
2090
|
+
]
|
|
2091
|
+
},
|
|
1985
2092
|
"BackgroundShortcut": {
|
|
1986
2093
|
"oneOf": [
|
|
1987
2094
|
{
|
|
@@ -2713,6 +2820,10 @@ Resolution order: inline catalogs.fontSchemes.records[] -> catalogs.fontSchemes.
|
|
|
2713
2820
|
},
|
|
2714
2821
|
"composition": {
|
|
2715
2822
|
"$ref": "#/$defs/Composition"
|
|
2823
|
+
},
|
|
2824
|
+
"extensions": {
|
|
2825
|
+
"type": "object",
|
|
2826
|
+
"description": 'Custom data passthrough for agent workflows at slide scope; ignored by the engine but preserved across read/write round-trips. Use for review state, generation provenance, or authoring conventions such as { "authoring": { "locked": true } }.'
|
|
2716
2827
|
}
|
|
2717
2828
|
}
|
|
2718
2829
|
},
|
|
@@ -2721,6 +2832,18 @@ Resolution order: inline catalogs.fontSchemes.records[] -> catalogs.fontSchemes.
|
|
|
2721
2832
|
"description": "A content leaf or recursively composed group. A group contains blocks and optional composition; it cannot mix blocks with leaf payload fields. Groups may nest up to 32 levels.",
|
|
2722
2833
|
"additionalProperties": false,
|
|
2723
2834
|
"properties": {
|
|
2835
|
+
"id": {
|
|
2836
|
+
"type": "string",
|
|
2837
|
+
"description": "Optional stable identifier for this payload, unique among slide and payload ids in the document. Use when another system needs to address the payload across edits \u2014 patch-style agent edits, comments, review state, or generation provenance. Identity survives reordering where array indexes do not.",
|
|
2838
|
+
"examples": [
|
|
2839
|
+
"kpi-adoption",
|
|
2840
|
+
"churn-quote"
|
|
2841
|
+
]
|
|
2842
|
+
},
|
|
2843
|
+
"extensions": {
|
|
2844
|
+
"type": "object",
|
|
2845
|
+
"description": "Custom data passthrough for agent workflows at payload scope; ignored by the engine but preserved across read/write round-trips."
|
|
2846
|
+
},
|
|
2724
2847
|
"type": {
|
|
2725
2848
|
"type": "string",
|
|
2726
2849
|
"enum": [
|
|
@@ -3587,10 +3710,11 @@ Resolution order: inline catalogs.fontSchemes.records[] -> catalogs.fontSchemes.
|
|
|
3587
3710
|
},
|
|
3588
3711
|
"color": {
|
|
3589
3712
|
"type": "string",
|
|
3590
|
-
"description": "Run text color
|
|
3713
|
+
"description": "Run text color. Documented forms: a hex string ('#RGB', '#RRGGBB', '#RRGGBBAA'), a color-scheme slot or role name resolved through the effective color scheme ('accent2', 'text'), or a 'var:<id>' reference into the top-level variables map. Prefer names over hex so runs survive re-theming. Any other string stays schema-valid so imported decks keep validating: validators warn and renderers fall back to the theme text color.",
|
|
3591
3714
|
"examples": [
|
|
3592
3715
|
"#0F172A",
|
|
3593
|
-
"
|
|
3716
|
+
"accent2",
|
|
3717
|
+
"var:risk"
|
|
3594
3718
|
]
|
|
3595
3719
|
},
|
|
3596
3720
|
"fontSize": {
|
|
@@ -3933,14 +4057,12 @@ Resolution order: inline catalogs.fontSchemes.records[] -> catalogs.fontSchemes.
|
|
|
3933
4057
|
"additionalProperties": false,
|
|
3934
4058
|
"properties": {
|
|
3935
4059
|
"fill": {
|
|
3936
|
-
"
|
|
3937
|
-
"
|
|
3938
|
-
"description": "Explicit RGB or RGBA color. Eight-digit colors include alpha; #00000000 is transparent."
|
|
4060
|
+
"$ref": "#/$defs/ColorRef",
|
|
4061
|
+
"description": "Cell background: a hex color, a color-scheme slot or role name, or a 'var:<id>' variable reference. Eight-digit hex colors include alpha; #00000000 is transparent."
|
|
3939
4062
|
},
|
|
3940
4063
|
"color": {
|
|
3941
|
-
"
|
|
3942
|
-
"
|
|
3943
|
-
"description": "Default text color, overridden by individual rich run colors."
|
|
4064
|
+
"$ref": "#/$defs/ColorRef",
|
|
4065
|
+
"description": "Default text color, overridden by individual rich run colors. Accepts a hex color, a color-scheme slot or role name, or a 'var:<id>' variable reference."
|
|
3944
4066
|
},
|
|
3945
4067
|
"align": {
|
|
3946
4068
|
"type": "string",
|
|
@@ -4021,9 +4143,8 @@ Resolution order: inline catalogs.fontSchemes.records[] -> catalogs.fontSchemes.
|
|
|
4021
4143
|
],
|
|
4022
4144
|
"properties": {
|
|
4023
4145
|
"color": {
|
|
4024
|
-
"
|
|
4025
|
-
"
|
|
4026
|
-
"description": "Explicit RGB or RGBA color. Eight-digit colors include alpha; #00000000 is transparent."
|
|
4146
|
+
"$ref": "#/$defs/ColorRef",
|
|
4147
|
+
"description": "Border color: a hex color, a color-scheme slot or role name, or a 'var:<id>' variable reference. Eight-digit hex colors include alpha; #00000000 is transparent."
|
|
4027
4148
|
},
|
|
4028
4149
|
"width": {
|
|
4029
4150
|
"type": "number",
|