@openpresentation/opf 0.34.2 → 0.35.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 +6 -6
- package/dist/browser.js +19 -19
- package/dist/{catalog-refs-wtuudZTe.d.ts → catalog-refs-BgotJhR5.d.ts} +105 -95
- package/dist/{catalog-schemas-CSxuFtsu.d.ts → catalog-schemas-BX-VEc5Q.d.ts} +1 -1
- package/dist/{chunk-RM4Z7ZSW.js → chunk-2GCTKQDD.js} +4 -4
- package/dist/{chunk-VI7VWDTN.js → chunk-3KPTVK77.js} +75 -283
- package/dist/{chunk-AQ3WR3H7.js → chunk-3ZTKRX7F.js} +4 -6
- package/dist/{chunk-IDYYLJCQ.js → chunk-4UMZDDJG.js} +11 -29
- package/dist/{chunk-NLJFNCZ4.js → chunk-6JHV2K67.js} +6 -6
- package/dist/{chunk-FK5XG742.js → chunk-6VGLE7C5.js} +114 -2
- package/dist/{chunk-V4G3BYPY.js → chunk-7KUUIL7W.js} +7 -7
- package/dist/{chunk-PHOSM2RA.js → chunk-ARPMSD7V.js} +1 -1
- package/dist/{chunk-UKI43JE6.js → chunk-GGN3NQDK.js} +1 -1
- package/dist/{chunk-XLXCXEVF.js → chunk-GKUAVSXU.js} +3 -10
- package/dist/{chunk-HX4HEJB4.js → chunk-HORPH6O7.js} +7 -6
- package/dist/{chunk-KJFCHCWV.js → chunk-JQNT37IO.js} +4 -13
- package/dist/{chunk-WBPXRUZT.js → chunk-KNMMEE67.js} +795 -467
- package/dist/{chunk-IGT4523S.js → chunk-LDLLZQPP.js} +706 -432
- package/dist/{chunk-6MSH3KCZ.js → chunk-MS2LPR7F.js} +1 -5
- package/dist/{chunk-NMZCPZ3R.js → chunk-MVPQEMCP.js} +97 -15
- package/dist/{chunk-P2X4BBW2.js → chunk-NPRNWPP4.js} +1 -1
- package/dist/{chunk-EQCZ2SFD.js → chunk-P2ACZJUL.js} +6 -6
- package/dist/chunk-SEC4IOOS.js +1 -0
- package/dist/{chunk-VVPPMHP6.js → chunk-VMPOCXTE.js} +5 -17
- package/dist/{chunk-MDAXXFAY.js → chunk-ZZWX4W2G.js} +2 -2
- package/dist/{composition-DF07Ha4R.d.ts → composition-BmJfljJl.d.ts} +198 -114
- package/dist/composition.d.ts +2 -2
- package/dist/composition.js +1 -1
- package/dist/{conversion-52ki0lfZ.d.ts → conversion-BbXhlurO.d.ts} +7 -7
- package/dist/conversion-VWCH3NKR.js +25 -0
- package/dist/convert.d.ts +11 -11
- package/dist/convert.js +61 -86
- package/dist/data.d.ts +1 -1
- package/dist/data.js +2 -2
- package/dist/{deck-report-C3EsoHC3.d.ts → deck-report-BYkbL7uT.d.ts} +3 -3
- package/dist/deck.d.ts +6 -6
- package/dist/deck.js +11 -11
- package/dist/diagram-engine-eager.js +1 -1
- package/dist/diagram-engine-lazy.js +1 -1
- package/dist/{diagram-plantuml-XRZ6VAOL.js → diagram-plantuml-GWXGKY7R.js} +1 -1
- package/dist/diff.d.ts +2 -2
- package/dist/diff.js +4 -4
- package/dist/docs.js +39 -39
- package/dist/examples.js +6336 -8170
- package/dist/{finding-l9dlQ2NF.d.ts → finding-mcHslZLA.d.ts} +6 -2
- package/dist/font-policy.d.ts +16 -2
- package/dist/font-policy.js +1 -1
- package/dist/format.js +2 -2
- package/dist/ids.d.ts +2 -2
- package/dist/ids.js +4 -4
- package/dist/index.d.ts +125 -27
- package/dist/index.js +24 -23
- package/dist/markdown.d.ts +1 -1
- package/dist/markdown.js +8 -8
- package/dist/node-engine.d.ts +6 -6
- package/dist/node-engine.js +21 -21
- package/dist/{pagination-Do7vNgU-.d.ts → pagination-C0FPjO29.d.ts} +4 -4
- package/dist/pagination.d.ts +3 -3
- package/dist/pagination.js +4 -4
- package/dist/patch.d.ts +4 -4
- package/dist/patch.js +3 -3
- package/dist/precompiled.js +2 -2
- package/dist/{presentation-ANs2WkaS.d.ts → presentation-Dx-kZC8Y.d.ts} +25 -81
- 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 +5 -7
- package/dist/schema.js +3 -3
- package/dist/schemas.js +1 -1
- package/dist/source.js +10 -10
- package/dist/spec/reference/engine-defaults.json +1 -1
- package/dist/spec/reference/engine-vocabularies.json +43 -43
- package/dist/spec/reference/font-policy.json +114 -2
- package/dist/spec/reference/font-policy.schema.json +45 -1
- package/dist/spec/schemas/color-scheme.schema.json +2 -2
- package/dist/spec/schemas/finding.schema.json +2 -1
- package/dist/spec/schemas/layout.schema.json +27 -85
- package/dist/spec/schemas/opf.schema.json +26 -175
- package/dist/spec/schemas/theme.schema.json +10 -10
- package/dist/symbol-font-encodings.d.ts +2 -2
- package/dist/types.d.ts +74 -86
- package/dist/{validation-types-BNS41nzb.d.ts → validation-types-DKIe1RQW.d.ts} +5 -5
- package/dist/validator.d.ts +5 -7
- package/dist/validator.js +3 -3
- package/dist/yaml.d.ts +1 -1
- package/dist/yaml.js +7 -7
- package/package.json +5 -5
- package/dist/chunk-HSXWDXKM.js +0 -1
- package/dist/conversion-F3HSCFOV.js +0 -25
package/dist/patch.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as JsonPatchOperation } from './finding-
|
|
1
|
+
import { J as JsonPatchOperation } from './finding-mcHslZLA.js';
|
|
2
2
|
import { FindingReport, Finding } from './index.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -66,7 +66,7 @@ interface PatchResult {
|
|
|
66
66
|
presentation: unknown;
|
|
67
67
|
/** The patch that restores the input from `presentation`. Applying it to `presentation` yields the input. */
|
|
68
68
|
inverse: JsonPatchOperation[];
|
|
69
|
-
/** The
|
|
69
|
+
/** The normalized operations that were applied (values cloned, unknown members dropped). */
|
|
70
70
|
patch: JsonPatchOperation[];
|
|
71
71
|
validation?: PatchValidationResult;
|
|
72
72
|
}
|
|
@@ -79,7 +79,7 @@ declare function parsePointer(pointer: unknown): string[];
|
|
|
79
79
|
/** Join tokens into a JSON Pointer, escaping `~` and `/`. */
|
|
80
80
|
declare function formatPointer(tokens: readonly (string | number)[]): JsonPointer;
|
|
81
81
|
/**
|
|
82
|
-
* Stable path
|
|
82
|
+
* Stable path normalization. Accepts a JSON Pointer (`/slides/0/title`), an
|
|
83
83
|
* OPF dotted path (`slides.0.title`) or a segment array, and returns a JSON
|
|
84
84
|
* Pointer. Use pointers or segment arrays for keys that contain dots.
|
|
85
85
|
*/
|
|
@@ -117,7 +117,7 @@ declare function readPointer(document: unknown, pointer: JsonPointer | readonly
|
|
|
117
117
|
/** Read a value or throw `patch-path-missing`. */
|
|
118
118
|
declare function getAtPointer(document: unknown, pointer: JsonPointer | readonly string[]): unknown;
|
|
119
119
|
declare const hasPointer: (document: unknown, pointer: JsonPointer | readonly string[]) => boolean;
|
|
120
|
-
/**
|
|
120
|
+
/** Normalize and structurally validate a patch (shape only; no document needed). Values are cloned. */
|
|
121
121
|
declare function normalizePatch(patch: unknown): JsonPatchOperation[];
|
|
122
122
|
/** One applied operation, as `walkPatch` reports it. */
|
|
123
123
|
interface PatchStep {
|
package/dist/patch.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { OPFPatchError, OPFPatchHashError, OPFPatchValidationError, applyPatch, applyPatchWithInverse, documentHash, escapePointerToken, formatPointer, getAtPointer, hasPointer, idToken, invertPatch, isIdToken, jsonEqual, normalizePatch, parsePointer, pointerFromPath, readPointer, resolveIdPatch, resolveIdPointer, splitPointer, toIdPatch, toIdPointer, unescapePointerToken, walkPatch } from './chunk-
|
|
1
|
+
export { OPFPatchError, OPFPatchHashError, OPFPatchValidationError, applyPatch, applyPatchWithInverse, documentHash, escapePointerToken, formatPointer, getAtPointer, hasPointer, idToken, invertPatch, isIdToken, jsonEqual, normalizePatch, parsePointer, pointerFromPath, readPointer, resolveIdPatch, resolveIdPointer, splitPointer, toIdPatch, toIdPointer, unescapePointerToken, walkPatch } from './chunk-KNMMEE67.js';
|
|
2
2
|
import './chunk-JBARNYFR.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-3KPTVK77.js';
|
|
4
|
+
import './chunk-LDLLZQPP.js';
|
|
5
5
|
import './chunk-BLCDUM7B.js';
|
|
6
6
|
import './chunk-PRXZD2II.js';
|
package/dist/precompiled.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { installSchemaEngine } from './chunk-43JWUIGF.js';
|
|
2
|
-
import { schemaEngine } from './chunk-
|
|
3
|
-
import './chunk-
|
|
2
|
+
import { schemaEngine } from './chunk-SEC4IOOS.js';
|
|
3
|
+
import './chunk-3KPTVK77.js';
|
|
4
4
|
import './chunk-PRXZD2II.js';
|
|
5
5
|
|
|
6
6
|
// src/precompiled.ts
|
|
@@ -486,7 +486,7 @@ type ContentPayload = {
|
|
|
486
486
|
[k: string]: unknown;
|
|
487
487
|
};
|
|
488
488
|
/**
|
|
489
|
-
*
|
|
489
|
+
* Where a root block (slides.N.blocks.I) goes. On a slide with a layout: a region of that layout, by name. The block goes to that region when the region exists, accepts the block's kind and has room; otherwise the pin is ignored with a warning (opf/region-unknown, opf/region-kind or opf/region-full) and the block is placed by its kind. Blocks without a pin are bound by reading order, role and kind. On a slide without a layout: a cell of the slide's 3 x 3 grid below the headings, a column band ('start', 'center', 'end', 'start+center', 'center+end', 'start+center+end'), a row band ('top', 'middle', 'bottom', 'top+middle', 'middle+bottom', 'top+middle+bottom') or rows, a colon, then columns ('top:start', 'middle+bottom:center+end'); each half lists adjacent names in reading order. The columns are logical ('start' is the right column in a right-to-left deck). A slide places every block in a cell or none: when one block names a cell, every block of the slide's blocks names one (opf/schema otherwise). Blocks that name the same cell stack in it in source order, as a group's blocks would; two different cells may not overlap. A cell word on a slide with a layout names no region of it (opf/region-unknown), and a layout region's name is never a cell word. A pin on a nested block has no effect.
|
|
490
490
|
*/
|
|
491
491
|
region?: string;
|
|
492
492
|
/**
|
|
@@ -510,7 +510,7 @@ type ContentPayload = {
|
|
|
510
510
|
*/
|
|
511
511
|
numbering?: (NumberingStyle | Numbering | [(NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)] | [(NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering), (NumberingStyle | Numbering)]);
|
|
512
512
|
/**
|
|
513
|
-
* Lay the payload's `items` or `bullets` out in columns. 'auto' tries 1, 2 then 3 equal columns at the starting text size and uses the first count at which the list fits, as long as a column stays at least a quarter of the slide wide; when none fits, 'auto' takes the count (1, 2 or 3) whose fitted size is largest, preferring fewer columns on a tie, and sets the list in one column only when its lines stay within the prose measure (or it is a type-scale step larger). A list of 6 or fewer entries is never split by 'auto'; it shrinks in one column. 1, 2 or 3 fixes the count. Column breaks fall between items (a nested item stays with its parent) and keep the columns as even as possible; numbering continues and reading order runs column by column.
|
|
513
|
+
* Lay the payload's `items` or `bullets` out in columns. 'auto' tries 1, 2 then 3 equal columns at the starting text size and uses the first count at which the list fits, as long as a column stays at least a quarter of the slide wide; when none fits, 'auto' takes the count (1, 2 or 3) whose fitted size is largest, preferring fewer columns on a tie, and sets the list in one column only when its lines stay within the prose measure (or it is a type-scale step larger). A list of 6 or fewer entries is never split by 'auto'; it shrinks in one column. 1, 2 or 3 fixes the count. Column breaks fall between items (a nested item stays with its parent) and keep the columns as even as possible; numbering continues and reading order runs column by column. Without it, a list of more than 6 entries in a layout region without an arrangement (or with the numbered one) flows into columns as 'auto' does, kept only when they set it at least as large as one column.
|
|
514
514
|
*/
|
|
515
515
|
columns?: ("auto" | number);
|
|
516
516
|
/**
|
|
@@ -892,7 +892,7 @@ type CatalogSource = string;
|
|
|
892
892
|
*
|
|
893
893
|
* Content references (Slide.layout, design.theme, design.colorScheme / design.colorScheme.id, design.fontScheme / design.fontScheme.id, narrative, audience, purpose and tone, and the colorScheme / fontScheme a theme record names) point at catalog records. Each is a bare 'id' or a 'name:id' whose prefix names a group in 'catalogs'. A bare id resolves in catalogs.custom, then in the records embedded under catalogs.default, then in the catalog the host registered for catalogs.default.source (or the host's default catalog when 'default' is omitted); 'name:id' resolves in catalogs.<name>, then in the catalog the host registered for its source. A reference that resolves nowhere is the warning opf/unresolved-reference, and the slide uses automatic composition or the engine default. Engines never fetch a catalog: a saved document embeds every record it uses, and hosts register any other catalog by its source string. See docs/default-catalog.md.
|
|
894
894
|
*
|
|
895
|
-
* chart.type, the language tag and the keys of Organization.socials / Speaker.socials are engine vocabularies, validated directly with no catalog lookup. When a document names no theme,
|
|
895
|
+
* chart.type, the language tag and the keys of Organization.socials / Speaker.socials are engine vocabularies, validated directly with no catalog lookup. When a document names no theme, color scheme or font scheme, every engine uses the same small engine defaults (spec/reference/engine-defaults.json). 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.
|
|
896
896
|
*/
|
|
897
897
|
interface Presentation {
|
|
898
898
|
/**
|
|
@@ -1376,7 +1376,7 @@ interface Language {
|
|
|
1376
1376
|
*/
|
|
1377
1377
|
code?: string;
|
|
1378
1378
|
/**
|
|
1379
|
-
* Base text direction for the language. When omitted, engines derive it from the script: Arabic (Arab), Hebrew (Hebr), Syriac (Syrc), Thaana (Thaa), N'Ko (Nkoo), Adlam (Adlm), Samaritan (Samr), Mandaic (Mand) and Hanifi Rohingya (Rohg) are right-to-left; every other script is left-to-right. The engine language vocabulary (spec/reference/engine-vocabularies.json) states it for the tags it knows. A right-to-left deck mirrors its layout, and one rule says what follows it. Layout words and layout coordinates are logical: 'start' and 'end' in alignments, header and footer zones,
|
|
1379
|
+
* Base text direction for the language. When omitted, engines derive it from the script: Arabic (Arab), Hebrew (Hebr), Syriac (Syrc), Thaana (Thaa), N'Ko (Nkoo), Adlam (Adlm), Samaritan (Samr), Mandaic (Mand) and Hanifi Rohingya (Rohg) are right-to-left; every other script is left-to-right. The engine language vocabulary (spec/reference/engine-vocabularies.json) states it for the tags it knows. A right-to-left deck mirrors its layout, and one rule says what follows it. Layout words and layout coordinates are logical: 'start' and 'end' in alignments, header and footer zones, the cells blocks name with 'region', image placement, overlay bands and shape anchors, the order of side-by-side blocks and columns, and an overlay shape's 'x' all run from the edge the deck starts on. Coordinates and sides that name pixels of a picture or parts of a plot are physical in every language: ImageFocus, ImageCallout 'x', a chart's 'legend' and data label 'position', and the 'left' and 'right' of table cell borders and paddings and of a shape's padding.
|
|
1380
1380
|
*/
|
|
1381
1381
|
direction?: ("ltr" | "rtl");
|
|
1382
1382
|
/**
|
|
@@ -1415,9 +1415,9 @@ interface Design {
|
|
|
1415
1415
|
/**
|
|
1416
1416
|
* Color scheme for the presentation. Accepts two forms:
|
|
1417
1417
|
* - A colorSchemes reference: a bare id ('cool-horizon') or 'name:id' ('acme:ocean').
|
|
1418
|
-
* - Object form: a ColorScheme with an optional 'id' reference as the base plus slot/role overrides. Without 'id', the overrides apply on top of the engine default
|
|
1418
|
+
* - Object form: a ColorScheme with an optional 'id' reference as the base plus slot/role overrides. Without 'id', the overrides apply on top of the engine default color scheme.
|
|
1419
1419
|
*
|
|
1420
|
-
* Without either, the theme's colorScheme applies, then the engine default
|
|
1420
|
+
* Without either, the theme's colorScheme applies, then the engine default color scheme.
|
|
1421
1421
|
*/
|
|
1422
1422
|
colorScheme?: (string | ColorScheme);
|
|
1423
1423
|
/**
|
|
@@ -1460,6 +1460,10 @@ interface Design {
|
|
|
1460
1460
|
* Default horizontal alignment for the title heading area (the title and the tag) in resolved layouts. Effective value: the slide's design, then the deck's design, then the theme's design.titleAlignment, then the layout record's design.titleAlignment, then the engine default. Logical: 'start' is the edge a paragraph starts on (the left for left-to-right text, the right for right-to-left text) and 'end' is the opposite edge.
|
|
1461
1461
|
*/
|
|
1462
1462
|
titleAlignment?: ("start" | "center" | "end");
|
|
1463
|
+
/**
|
|
1464
|
+
* Where the heading group (tag, title and subtitle) sits on a slide with body content. 'top' (the default) stacks it above the body. 'start' sets it beside the body, in a column of two fifths of the content width (the body takes the other three fifths, a gap apart) on the reading side: the left in a left-to-right deck, the right in a right-to-left deck; design.mirror swaps the side. The group is centered down the column at its role size, aligned by titleAlignment. On a layout, the rows that hold only headings give way and the title column runs down beside the layout's body regions, which keep their own arrangement; a 'subtitle' region joins the title's group, and a layout without a title region gets the column for the slide's title. Content no region takes sits below them, across the slide. A layout whose title already shares a row with a body region keeps its own placement. On a slide without a layout the automatic composition fills the free area beside the column. A slide without body content (a cover), a slide whose blocks name cells of its grid ('region': start, center, end, top, middle, bottom: they name its columns themselves) and a portrait canvas (taller than wide) keep the title on top. Header and footer zones, placed pictures and footnotes keep their places: the column lies between them. A slide that gives up its layout for the automatic grid to set its text larger (the layout's recomposition) puts its title on top, taking the column's width for its body. Effective value: the slide's design, then the deck's design, then the theme's design.titlePosition, then the layout record's design.titlePosition, then 'top'. PPTX export: a layout record that sets 'start' (and every layout of a deck or theme that sets it) gets a slide layout with its title placeholder beside the body; a slide that sets it on another layout keeps its title's own position on that slide.
|
|
1465
|
+
*/
|
|
1466
|
+
titlePosition?: ("top" | "start");
|
|
1463
1467
|
/**
|
|
1464
1468
|
* Default horizontal alignment for body/content regions in resolved layouts. Effective value: the slide's design, then the deck's design, then the theme's design.contentAlignment, then the layout record's design.contentAlignment, then the engine default. The tag follows titleAlignment (and so does a subtitle in the title area, as on a cover) unless the slide's own design sets contentAlignment. Logical: 'start' is the edge a paragraph starts on (the left for left-to-right text, the right for right-to-left text) and 'end' is the opposite edge.
|
|
1465
1469
|
*/
|
|
@@ -1468,14 +1472,6 @@ interface Design {
|
|
|
1468
1472
|
* Whether body/content regions are rendered inside a visible card or surface. Effective value: the slide's design, then the deck's design, then the theme's design.contentBox, then the layout record's design.contentBox, then the engine default.
|
|
1469
1473
|
*/
|
|
1470
1474
|
contentBox?: boolean;
|
|
1471
|
-
/**
|
|
1472
|
-
* Axis along which parallel body content is arranged: 'vertical' is a column, 'horizontal' a row. Effective value: the slide's design, then the deck's design, then the theme's design.contentDirection, then the layout record's design.contentDirection. On a slide with a template layout it turns every flowing region of the slide into one row or one column, below the slide's own composition.mode, columns and weights, which arrange its first primary flowing region. On an automatic slide (and a 0.18 record) it sets the root arrangement mode when no composition.mode is set on the slide or on its layout record. Promoted regions (start, top:start, ...) keep their explicit geometry and nested groups keep their own composition.
|
|
1473
|
-
*/
|
|
1474
|
-
contentDirection?: ("horizontal" | "vertical");
|
|
1475
|
-
/**
|
|
1476
|
-
* Where the primary chart sits relative to supporting content. Effective value: slide design, then deck design, then the layout record's design.chartPrimary. It applies to automatic slides only; a template layout says the same with its regions (chart-beside). When the slide has no promoted regions and no composition.mode of its own, and its root nodes mix at least one chart with other content, the first chart becomes a primary track and the other nodes form one synthetic sub-grid: 'start'/'end' is a two-track row with the chart on that side (logical: 'start' is the left in a left-to-right deck and the right in a right-to-left one) and 'top'/'bottom' a two-track column, weighted 3:2 in favor of the chart; explicit root columns and weights are ignored while it applies. 'none' (the default) keeps the ordinary automatic grid with equal weight. Automatic composition builds direct content groups; template regions remain authoritative.
|
|
1477
|
-
*/
|
|
1478
|
-
chartPrimary?: ("none" | "top" | "bottom" | "start" | "end");
|
|
1479
1475
|
/**
|
|
1480
1476
|
* Default fit of image blocks (and Slide.image) that set no fit of their own: 'cover' fills the frame and crops what overflows around the block's focus, 'contain' shows the whole picture in a frame of its own proportions, centered across and placed down the cell by the region's anchor (top by default), 'stretch' scales it to the frame exactly, 'auto' covers when the crop keeps at least 85% of the picture's width or height (its proportions read from the file, EXIF orientation applied) and contains otherwise; an SVG, or a picture whose size cannot be read from the document, is contained. Effective value: the slide's design, then the deck's design, then the theme's design.imageFit, then the layout record's design.imageFit, then 'cover'; a slide composed with no layout shows its pictures whole ('contain') instead. Backgrounds set their own fit.
|
|
1481
1477
|
*/
|
|
@@ -1489,7 +1485,7 @@ interface Design {
|
|
|
1489
1485
|
*/
|
|
1490
1486
|
listStyle?: ("stack" | "rows");
|
|
1491
1487
|
/**
|
|
1492
|
-
* Draw the slide's template 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. Effective value: the slide's design, then the deck's design, then the layout record's design.mirror, then false. Slides without a template layout ignore it.
|
|
1488
|
+
* Draw the slide's template 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. Effective value: the slide's design, then the deck's design, then the layout record's design.mirror, then false. Slides without a template layout ignore it, except that it moves a title beside the body (titlePosition 'start') to the end side.
|
|
1493
1489
|
*/
|
|
1494
1490
|
mirror?: boolean;
|
|
1495
1491
|
}
|
|
@@ -1794,7 +1790,7 @@ interface GradientBackground {
|
|
|
1794
1790
|
opacity?: number;
|
|
1795
1791
|
}
|
|
1796
1792
|
/**
|
|
1797
|
-
* 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
|
|
1793
|
+
* 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 color scheme's default slide background, the picture, then the overlay, then furniture and content.
|
|
1798
1794
|
*
|
|
1799
1795
|
* This interface was referenced by `Presentation`'s JSON-Schema
|
|
1800
1796
|
* via the `definition` "ImageBackground".
|
|
@@ -1817,7 +1813,7 @@ interface ImageBackground {
|
|
|
1817
1813
|
*/
|
|
1818
1814
|
alt?: string;
|
|
1819
1815
|
/**
|
|
1820
|
-
* How the picture fills the canvas: 'cover' fills it and crops what overflows around focus; 'contain' shows the whole picture centered over the
|
|
1816
|
+
* How the picture fills the canvas: 'cover' fills it and crops what overflows around focus; 'contain' shows the whole picture centered over the color scheme's default background; 'stretch' scales it to the canvas exactly; 'tile' repeats it at its own size from the top-left corner. Default 'cover'.
|
|
1821
1817
|
*/
|
|
1822
1818
|
fit?: ("cover" | "contain" | "stretch" | "tile");
|
|
1823
1819
|
focus?: ImageFocus;
|
|
@@ -2366,7 +2362,7 @@ interface ListVariable {
|
|
|
2366
2362
|
example?: string[];
|
|
2367
2363
|
}
|
|
2368
2364
|
/**
|
|
2369
|
-
* A single slide. Content
|
|
2365
|
+
* A single slide. Content is a full-slide root payload or a list of blocks. On a slide without a layout, blocks may name cells of a 3 x 3 grid with their 'region' ('start', 'center+end', 'top:start'): see ContentPayload.region. The columns of that grid are logical: 'start' is the left column in a left-to-right deck and the right column in a right-to-left one. A key on the slide that names a cell is not OPF: validate reports it (opf/schema) with the safe fix that moves its content into a block with 'region'.
|
|
2370
2366
|
*
|
|
2371
2367
|
* This interface was referenced by `Presentation`'s JSON-Schema
|
|
2372
2368
|
* via the `definition` "Slide".
|
|
@@ -2540,54 +2536,6 @@ interface Slide {
|
|
|
2540
2536
|
* Slide-level design applied on top of the deck-wide design.
|
|
2541
2537
|
*/
|
|
2542
2538
|
design?: Design1;
|
|
2543
|
-
start?: ContentPayload;
|
|
2544
|
-
center?: ContentPayload;
|
|
2545
|
-
end?: ContentPayload;
|
|
2546
|
-
"start+center"?: ContentPayload;
|
|
2547
|
-
"center+end"?: ContentPayload;
|
|
2548
|
-
"start+center+end"?: ContentPayload;
|
|
2549
|
-
top?: ContentPayload;
|
|
2550
|
-
middle?: ContentPayload;
|
|
2551
|
-
bottom?: ContentPayload;
|
|
2552
|
-
"top+middle"?: ContentPayload;
|
|
2553
|
-
"middle+bottom"?: ContentPayload;
|
|
2554
|
-
"top+middle+bottom"?: ContentPayload;
|
|
2555
|
-
"top:start"?: ContentPayload;
|
|
2556
|
-
"top:center"?: ContentPayload;
|
|
2557
|
-
"top:end"?: ContentPayload;
|
|
2558
|
-
"top:start+center"?: ContentPayload;
|
|
2559
|
-
"top:center+end"?: ContentPayload;
|
|
2560
|
-
"top:start+center+end"?: ContentPayload;
|
|
2561
|
-
"middle:start"?: ContentPayload;
|
|
2562
|
-
"middle:center"?: ContentPayload;
|
|
2563
|
-
"middle:end"?: ContentPayload;
|
|
2564
|
-
"middle:start+center"?: ContentPayload;
|
|
2565
|
-
"middle:center+end"?: ContentPayload;
|
|
2566
|
-
"middle:start+center+end"?: ContentPayload;
|
|
2567
|
-
"bottom:start"?: ContentPayload;
|
|
2568
|
-
"bottom:center"?: ContentPayload;
|
|
2569
|
-
"bottom:end"?: ContentPayload;
|
|
2570
|
-
"bottom:start+center"?: ContentPayload;
|
|
2571
|
-
"bottom:center+end"?: ContentPayload;
|
|
2572
|
-
"bottom:start+center+end"?: ContentPayload;
|
|
2573
|
-
"top+middle:start"?: ContentPayload;
|
|
2574
|
-
"top+middle:center"?: ContentPayload;
|
|
2575
|
-
"top+middle:end"?: ContentPayload;
|
|
2576
|
-
"top+middle:start+center"?: ContentPayload;
|
|
2577
|
-
"top+middle:center+end"?: ContentPayload;
|
|
2578
|
-
"top+middle:start+center+end"?: ContentPayload;
|
|
2579
|
-
"middle+bottom:start"?: ContentPayload;
|
|
2580
|
-
"middle+bottom:center"?: ContentPayload;
|
|
2581
|
-
"middle+bottom:end"?: ContentPayload;
|
|
2582
|
-
"middle+bottom:start+center"?: ContentPayload;
|
|
2583
|
-
"middle+bottom:center+end"?: ContentPayload;
|
|
2584
|
-
"middle+bottom:start+center+end"?: ContentPayload;
|
|
2585
|
-
"top+middle+bottom:start"?: ContentPayload;
|
|
2586
|
-
"top+middle+bottom:center"?: ContentPayload;
|
|
2587
|
-
"top+middle+bottom:end"?: ContentPayload;
|
|
2588
|
-
"top+middle+bottom:start+center"?: ContentPayload;
|
|
2589
|
-
"top+middle+bottom:center+end"?: ContentPayload;
|
|
2590
|
-
"top+middle+bottom:start+center+end"?: ContentPayload;
|
|
2591
2539
|
/**
|
|
2592
2540
|
* Speaker notes shown in presenter view.
|
|
2593
2541
|
*/
|
|
@@ -2886,7 +2834,7 @@ interface ChartDataLabels {
|
|
|
2886
2834
|
separator?: string;
|
|
2887
2835
|
}
|
|
2888
2836
|
/**
|
|
2889
|
-
* Optional emphasis: the series and/or categories that carry the message. The engines draw the highlighted marks in the deck's primary (accent) color and every other mark in a muted neutral derived from the theme (a light
|
|
2837
|
+
* Optional emphasis: the series and/or categories that carry the message. The engines draw the highlighted marks in the deck's primary (accent) color and every other mark in a muted neutral derived from the theme (a light gray on a light chart panel, a dim gray on a dark one); there is no color field. A mark is highlighted when its series OR its category is named. Absent keeps today's colors exactly. Supported on column, bar and line charts (series and categories; on a line a category highlight marks that category's points), pie and doughnut charts (categories, one per slice), and area, scatter and radar charts (series); the histogram, pareto, waterfall, funnel, treemap, box-and-whisker, world and combo constructs drop the option with a 'chart-option-adapted' diagnostic, as does a part the type cannot highlight. A name that matches no column or row label is a 'chart-highlight-unknown-name' error.
|
|
2890
2838
|
*/
|
|
2891
2839
|
interface ChartHighlight {
|
|
2892
2840
|
/**
|
|
@@ -3138,7 +3086,7 @@ interface Metric {
|
|
|
3138
3086
|
*/
|
|
3139
3087
|
trend?: ("up" | "down" | "flat");
|
|
3140
3088
|
/**
|
|
3141
|
-
* Whether the change is good news. Positive draws the trend arrow and the trend and delta text in green, negative in red and neutral in the neutral text
|
|
3089
|
+
* Whether the change is good news. Positive draws the trend arrow and the trend and delta text in green, negative in red and neutral in the neutral text color, each kept at 4.5:1 contrast or more against the slide background. When absent the color follows the trend: up is positive, down is negative and flat is neutral. Set it when the direction is not the verdict, for example positive on a falling churn, cost or latency trend. The arrow always keeps the direction of `trend`. Only the trend arrow and the trend and delta text take the color, so sentiment has no visible effect on a metric without a trend.
|
|
3142
3090
|
*/
|
|
3143
3091
|
sentiment?: ("positive" | "negative" | "neutral");
|
|
3144
3092
|
/**
|
|
@@ -4029,9 +3977,9 @@ interface Design1 {
|
|
|
4029
3977
|
/**
|
|
4030
3978
|
* Color scheme for the presentation. Accepts two forms:
|
|
4031
3979
|
* - A colorSchemes reference: a bare id ('cool-horizon') or 'name:id' ('acme:ocean').
|
|
4032
|
-
* - Object form: a ColorScheme with an optional 'id' reference as the base plus slot/role overrides. Without 'id', the overrides apply on top of the engine default
|
|
3980
|
+
* - Object form: a ColorScheme with an optional 'id' reference as the base plus slot/role overrides. Without 'id', the overrides apply on top of the engine default color scheme.
|
|
4033
3981
|
*
|
|
4034
|
-
* Without either, the theme's colorScheme applies, then the engine default
|
|
3982
|
+
* Without either, the theme's colorScheme applies, then the engine default color scheme.
|
|
4035
3983
|
*/
|
|
4036
3984
|
colorScheme?: (string | ColorScheme);
|
|
4037
3985
|
/**
|
|
@@ -4074,6 +4022,10 @@ interface Design1 {
|
|
|
4074
4022
|
* Default horizontal alignment for the title heading area (the title and the tag) in resolved layouts. Effective value: the slide's design, then the deck's design, then the theme's design.titleAlignment, then the layout record's design.titleAlignment, then the engine default. Logical: 'start' is the edge a paragraph starts on (the left for left-to-right text, the right for right-to-left text) and 'end' is the opposite edge.
|
|
4075
4023
|
*/
|
|
4076
4024
|
titleAlignment?: ("start" | "center" | "end");
|
|
4025
|
+
/**
|
|
4026
|
+
* Where the heading group (tag, title and subtitle) sits on a slide with body content. 'top' (the default) stacks it above the body. 'start' sets it beside the body, in a column of two fifths of the content width (the body takes the other three fifths, a gap apart) on the reading side: the left in a left-to-right deck, the right in a right-to-left deck; design.mirror swaps the side. The group is centered down the column at its role size, aligned by titleAlignment. On a layout, the rows that hold only headings give way and the title column runs down beside the layout's body regions, which keep their own arrangement; a 'subtitle' region joins the title's group, and a layout without a title region gets the column for the slide's title. Content no region takes sits below them, across the slide. A layout whose title already shares a row with a body region keeps its own placement. On a slide without a layout the automatic composition fills the free area beside the column. A slide without body content (a cover), a slide whose blocks name cells of its grid ('region': start, center, end, top, middle, bottom: they name its columns themselves) and a portrait canvas (taller than wide) keep the title on top. Header and footer zones, placed pictures and footnotes keep their places: the column lies between them. A slide that gives up its layout for the automatic grid to set its text larger (the layout's recomposition) puts its title on top, taking the column's width for its body. Effective value: the slide's design, then the deck's design, then the theme's design.titlePosition, then the layout record's design.titlePosition, then 'top'. PPTX export: a layout record that sets 'start' (and every layout of a deck or theme that sets it) gets a slide layout with its title placeholder beside the body; a slide that sets it on another layout keeps its title's own position on that slide.
|
|
4027
|
+
*/
|
|
4028
|
+
titlePosition?: ("top" | "start");
|
|
4077
4029
|
/**
|
|
4078
4030
|
* Default horizontal alignment for body/content regions in resolved layouts. Effective value: the slide's design, then the deck's design, then the theme's design.contentAlignment, then the layout record's design.contentAlignment, then the engine default. The tag follows titleAlignment (and so does a subtitle in the title area, as on a cover) unless the slide's own design sets contentAlignment. Logical: 'start' is the edge a paragraph starts on (the left for left-to-right text, the right for right-to-left text) and 'end' is the opposite edge.
|
|
4079
4031
|
*/
|
|
@@ -4082,14 +4034,6 @@ interface Design1 {
|
|
|
4082
4034
|
* Whether body/content regions are rendered inside a visible card or surface. Effective value: the slide's design, then the deck's design, then the theme's design.contentBox, then the layout record's design.contentBox, then the engine default.
|
|
4083
4035
|
*/
|
|
4084
4036
|
contentBox?: boolean;
|
|
4085
|
-
/**
|
|
4086
|
-
* Axis along which parallel body content is arranged: 'vertical' is a column, 'horizontal' a row. Effective value: the slide's design, then the deck's design, then the theme's design.contentDirection, then the layout record's design.contentDirection. On a slide with a template layout it turns every flowing region of the slide into one row or one column, below the slide's own composition.mode, columns and weights, which arrange its first primary flowing region. On an automatic slide (and a 0.18 record) it sets the root arrangement mode when no composition.mode is set on the slide or on its layout record. Promoted regions (start, top:start, ...) keep their explicit geometry and nested groups keep their own composition.
|
|
4087
|
-
*/
|
|
4088
|
-
contentDirection?: ("horizontal" | "vertical");
|
|
4089
|
-
/**
|
|
4090
|
-
* Where the primary chart sits relative to supporting content. Effective value: slide design, then deck design, then the layout record's design.chartPrimary. It applies to automatic slides only; a template layout says the same with its regions (chart-beside). When the slide has no promoted regions and no composition.mode of its own, and its root nodes mix at least one chart with other content, the first chart becomes a primary track and the other nodes form one synthetic sub-grid: 'start'/'end' is a two-track row with the chart on that side (logical: 'start' is the left in a left-to-right deck and the right in a right-to-left one) and 'top'/'bottom' a two-track column, weighted 3:2 in favor of the chart; explicit root columns and weights are ignored while it applies. 'none' (the default) keeps the ordinary automatic grid with equal weight. Automatic composition builds direct content groups; template regions remain authoritative.
|
|
4091
|
-
*/
|
|
4092
|
-
chartPrimary?: ("none" | "top" | "bottom" | "start" | "end");
|
|
4093
4037
|
/**
|
|
4094
4038
|
* Default fit of image blocks (and Slide.image) that set no fit of their own: 'cover' fills the frame and crops what overflows around the block's focus, 'contain' shows the whole picture in a frame of its own proportions, centered across and placed down the cell by the region's anchor (top by default), 'stretch' scales it to the frame exactly, 'auto' covers when the crop keeps at least 85% of the picture's width or height (its proportions read from the file, EXIF orientation applied) and contains otherwise; an SVG, or a picture whose size cannot be read from the document, is contained. Effective value: the slide's design, then the deck's design, then the theme's design.imageFit, then the layout record's design.imageFit, then 'cover'; a slide composed with no layout shows its pictures whole ('contain') instead. Backgrounds set their own fit.
|
|
4095
4039
|
*/
|
|
@@ -4103,12 +4047,12 @@ interface Design1 {
|
|
|
4103
4047
|
*/
|
|
4104
4048
|
listStyle?: ("stack" | "rows");
|
|
4105
4049
|
/**
|
|
4106
|
-
* Draw the slide's template 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. Effective value: the slide's design, then the deck's design, then the layout record's design.mirror, then false. Slides without a template layout ignore it.
|
|
4050
|
+
* Draw the slide's template 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. Effective value: the slide's design, then the deck's design, then the layout record's design.mirror, then false. Slides without a template layout ignore it, except that it moves a title beside the body (titlePosition 'start') to the end side.
|
|
4107
4051
|
*/
|
|
4108
4052
|
mirror?: boolean;
|
|
4109
4053
|
}
|
|
4110
4054
|
/**
|
|
4111
|
-
* Automatic slide and content-group arrangement. Nested content groups arrange their children independently, inheriting only minFontSize, maxFontSize and overflow.
|
|
4055
|
+
* Automatic slide and content-group arrangement. Nested content groups arrange their children independently, inheriting only minFontSize, maxFontSize and overflow. Blocks placed in cells (ContentPayload.region on a slide without a layout) retain their positions. A layout defines its grid as one ordered list of regions; its composition supports gap, padding, minFontSize, maxFontSize and overflow rather than mode, columns or weights.
|
|
4112
4056
|
*
|
|
4113
4057
|
* This interface was referenced by `Presentation`'s JSON-Schema
|
|
4114
4058
|
* via the `definition` "Composition".
|
|
@@ -4306,7 +4250,7 @@ interface CatalogRecords1 {
|
|
|
4306
4250
|
};
|
|
4307
4251
|
}
|
|
4308
4252
|
/**
|
|
4309
|
-
*
|
|
4253
|
+
* Color-scheme records keyed by id, each with the fields of https://openpresentation.org/schema/opf-color-scheme/v1. Referenced from design.colorScheme and a theme's colorScheme.
|
|
4310
4254
|
*/
|
|
4311
4255
|
interface CatalogRecords2 {
|
|
4312
4256
|
/**
|
package/dist/repo-readme.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './chunk-PRXZD2II.js';
|
|
2
2
|
|
|
3
3
|
// src/generated/repo-readme.ts
|
|
4
|
-
var repoReadmeRaw = '<p align="center">\n <picture>\n <source media="(prefers-color-scheme: dark)" srcset="docs/brand/opf-logo-dark.svg">\n <img src="docs/brand/opf-logo.svg" alt="Open Presentation Format" width="64" height="64">\n </picture>\n</p>\n\n# Open Presentation Format (OPF)\n\n[](https://www.npmjs.com/package/@openpresentation/opf)\n[](https://www.npmjs.com/package/@openpresentation/opf)\n[](./LICENSE)\n[](https://github.com/OpenPresentation/opf/actions/workflows/ci.yml)\n[](https://github.com/OpenPresentation/opf/actions/workflows/nightly.yml)\n\nPublic npm package: [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf) (`npm install @openpresentation/opf`).\n\nOpen Presentation Format is the portable, human-readable JSON document format for slide decks.\n\nThis repository is the canonical home for the OPF **spec**, **JSON Schemas**, **catalog presets**, examples, generated developer types, local validation tooling, and integration docs for the render/edit/convert toolkit. OpenPresentation publishes open-source code and documentation. The engine runs in the caller\u2019s environment; hosts choose their own rendering, storage and application infrastructure. The [MCP server](docs/mcp.md) has local stdio and hosted transport options, with viewer availability determined separately by the client and deployment.\n\nFor AI agents, use the [OPF skill set](docs/agent-skills.md) for authoring, layout, presets, editing, export, and schema inspection.\n\nThe published CLI installs all six skills into your project with `npx @openpresentation/cli skills install`. It uses local copies, preserves existing instructions and refuses to overwrite customized skills. See the [installation and update guide](docs/agent-skills.md) for personal or agent-specific targets and source development.\n\nFor a fresh Node 24 project that installs **published** packages (not this\ncheckout), follow the [developer quickstart](docs/quickstart.md) and the\n[compatibility matrix](docs/compatibility-matrix.md).\n\nFor LLM authoring, start with [the authoring guide](docs/llm-authoring.md), [dynamic composition](docs/dynamic-composition.md), and [local ecosystem verification](docs/ecosystem-development.md).\n\n## File naming\n\nOpen Presentation Format documents are JSON files. Use `*.opf.json` for complete OPF presentation documents, for example `board-review.opf.json` or `deck.opf.json`.\n\nAvoid using bare `*.opf` for OPF JSON. The `.opf` extension is already used by other document and project formats, while `.opf.json` keeps the OPF identity and still makes the underlying JSON format clear to editors, validators, agents, and version-control tooling.\n\n## Naming and reuse\n\nThe format name is **Open Presentation Format**. The schemas, catalogs, packages, and local tooling in this repository are free and open source under the MIT license, so third-party tools may read, write, validate, render, convert, and describe support for Open Presentation Format without adopting any product-specific branding.\n\n## Why OPF\n\n`.pptx` is a zipped bundle of XML. Humans can\'t diff it, LLMs can\'t read or write it reliably, and git can\'t track it meaningfully. Every change looks like a binary blob.\n\nOPF is plain JSON. A human can open it in an editor. A model can read and write it without guessing at schema-by-example. Decks live in git like the rest of your work.\n\nThat\'s the shift that lets LLMs actually *author* decks. When the format stops fighting them, models can do the work that matters \u2014 narrative structure, persuasive framing, data analysis, chart recommendations, ruthless revision passes \u2014 instead of wrestling with `<p:sp>` tags.\n\nAnd they don\'t start from a blank canvas. [pptx.gallery](https://pptx.gallery) is the human-browsable reference for OPF catalog presets: layouts, themes, color schemes, font schemes, chart types, narratives, audiences, purposes, tones, languages, and social platforms.\n\n## Start in three steps\n\n1. **Install the coordinated published packages** on Node 24. See [the developer quickstart](docs/quickstart.md) for the registry-derived pin set: core, renderer, PPTX, editor, CLI and Gallery use one completed shared release, retained with `--save-exact` and the lockfile. The optional seventh package, `@openpresentation/mcp`, supplies the [MCP server and viewer](docs/mcp.md). The default catalog is supplied by the matching `@openpresentation/gallery` release; see the [compatibility matrix](docs/compatibility-matrix.md) for feature and native limits.\n2. **Author, validate, paginate, preview and export.** New to OPF? Run the [first deck](docs/first-deck/README.md) end to end first. Copy [`docs/quickstart/developer-quickstart.opf.json`](./docs/quickstart/developer-quickstart.opf.json) and run the commands in that guide. From code, `convert("deck.opf.md", "deck.pdf")` of `@openpresentation/opf` is the simple path to a PDF, PNG, SVG or PPTX file. `validate` / `opf validate` is one local checker for format, references, accessibility, layout and content ([guide](docs/validate.md)), not visual verification.\n3. **Know the limits.** PPTX export writes one text box per wrapped line, so text edited in PowerPoint or Keynote does not reflow (see [rich text](docs/rich-text.md)) unless you opt in to `--body-text native` (opf-pptx and CLI 0.22.0 or later), and fonts are named, not embedded. The [compatibility matrix](docs/compatibility-matrix.md) lists shipped APIs versus renderer issue 24, native PowerPoint issue 87, and other deferred work. Browse presets at [pptx.gallery](https://pptx.gallery).\n\nYour deck can live in git from the first commit. After installing dependencies and supplying referenced assets, these commands run locally without a model provider, account or hosted OPF API.\n\n## JavaScript and TypeScript\n\nThe canonical JavaScript/TypeScript package is published at [`packages/javascript`](./packages/javascript) as [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf). The schema is pre-stable (0.x \u2014 expect breaking changes between minor versions until 1.0). Its responsibility is local and format-level only:\n\n- export the canonical schemas from [`spec/`](./spec)\n- register the pptx.gallery catalog of [`@openpresentation/gallery`](./packages/gallery) (a dependency, released with core at the same version) as the Node defaults, as the CLI does; a browser host registers it itself\n- export a typed raw spec file manifest for package-addressable `spec/` content\n- generate TypeScript types, with `Presentation` as the top-level type\n- validate OPF JSON and catalog records locally\n\nIn Node (and Bun and Deno) its root also reads and writes files (`convert`, `open`, `save`) and draws them through the optional engines below; in a browser or a worker the same import is a browser-safe build with the same names, where those three reject with `node-only`. Every other entry runs in a browser. It does not generate content with AI, fetch remote catalogs, call hosted APIs, or provide managed services. Render/edit/convert packages live in this repository as separate MIT packages that depend on `@openpresentation/opf`. The format package also exposes pure composition geometry so those packages share layout behavior.\n\n## Toolkit libraries\n\nOPF is seven packages. **Core** (`@openpresentation/opf`) is the format and its API: it reads and writes the text formats (JSON, YAML, Markdown) and validates, and in Node reads and writes files, through the same import. **The gallery** (`@openpresentation/gallery`) is the pptx.gallery catalog of layouts, themes, color and font schemes and the other records, released with the other packages; core depends on it and registers it in Node. **The CLI** (`@openpresentation/cli`) is the `opf` command. **The MCP server** (`@openpresentation/mcp`, `npx -y @openpresentation/mcp`) lets an MCP-native agent learn OPF (docs, schemas, catalog, examples and skills as resources) and validate and convert decks. **Render** (`opf-render`), **PPTX** (`opf-pptx`) and **the editor** (`opf-editor`) are the engines: drawing, PowerPoint and editing, installed as needed. All seven live in this repository (`packages/`) and are released together at one version. See [ecosystem development](docs/ecosystem-development.md) for local builds and verification, and [dynamic composition](docs/dynamic-composition.md) for portable layout rules.\n\n| Package | Role | Boundary |\n|---|---|---|\n| [`packages/javascript`](./packages/javascript) (`@openpresentation/opf`) | Core: format, schemas, validation, composition | The format and its API; reads and writes files in Node and draws through the optional engines |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The pptx.gallery catalog | Catalog records only, no runtime dependency; records are authored by pull request here, and a changed drawing or a removed record needs a minor release |\n| [`packages/cli`](./packages/cli) (`@openpresentation/cli`) | `opf` command | Runs core\'s Node engine: reads and writes files and calls the engines below as optional peers |\n| [`packages/mcp`](./packages/mcp) (`@openpresentation/mcp`) | MCP server and viewer | Docs, schemas, catalog lookup, validation, conversion and `show_deck` for MCP clients |\n| [`packages/render`](./packages/render) (`@openpresentation/opf-render`) | OPF to SVG/PNG/PDF | Local and embeddable rendering library |\n| [`packages/editor`](./packages/editor) (`@openpresentation/opf-editor`) | WYSIWYG bindings/components | Headless editor primitives plus optional UI components |\n| [`packages/pptx`](./packages/pptx) (`@openpresentation/opf-pptx`) | OPF to PPTX and PPTX to OPF | Pure local import/export library for browser and server use where supported |\n\nThese packages provide OSS primitives only. Downstream applications own hosting, auth, storage, collaboration, queues, previews, analytics, support, and workflow UX.\n\n## Usage\n\nInstall from npm:\n\n```sh\npnpm add @openpresentation/opf\n# or: npm install @openpresentation/opf\n```\n\nTo work on the packages, clone this repo and build the workspace (all seven packages are in `packages/`; see [CONTRIBUTING](./CONTRIBUTING.md)):\n\n```sh\npnpm install\npnpm build\n```\n\nUse the format package from JavaScript or TypeScript:\n\n```ts\nimport { presentation, validate } from "@openpresentation/opf";\nimport { gallery } from "@openpresentation/gallery";\n\nimport type { Presentation } from "@openpresentation/opf";\n\nconst deck: Presentation = {\n name: "Quarterly Review",\n slides: [{ title: "Quarterly Review", items: ["Revenue", "Product", "Hiring"] }],\n};\n\nconst report = validate(deck);\nconsole.log(report.valid); // no finding has severity "error"\nconsole.log(report.findings); // every finding: rule id, severity, category, JSON Pointer path, message, fixes\n// Core ships no catalog records; in Node, validate registers the gallery when a call names no catalogs, and a host may name its own.\nconsole.log(validate({ ...deck, design: { theme: "classic" } }, { catalogs: [gallery] }).valid);\nconsole.log(Object.keys(gallery.audiences).length);\n```\n\nConvert, open and save files in Node with `@openpresentation/opf`, the same import a browser uses (the engines `@openpresentation/opf-render` and `@openpresentation/opf-pptx` are optional peers, installed as needed; see [OPF files in Node](docs/node.md)):\n\n```ts\nimport * as opf from "@openpresentation/opf";\n\nawait opf.convert("deck.opf.md", "deck.pdf");\nconst deck = await opf.open("deck.opf.md");\ndeck.slides.push({ title: "Q4" });\nawait opf.save(deck, "deck.opf.md");\nconst { files } = await opf.convert(deck, { format: "pptx" }); // bytes, nothing written\n```\n\nUse focused imports when you only need one surface:\n\n```ts\nimport { presentation } from "@openpresentation/opf/schemas";\nimport { specFileEntries } from "@openpresentation/opf/spec-files";\nimport { validate } from "@openpresentation/opf/validator";\nimport type { Presentation } from "@openpresentation/opf/types";\n```\n\nUse raw JSON when an engine or resolver needs package-addressable files:\n\n```ts\nimport presentationSchema from "@openpresentation/opf/spec/schemas/opf.schema.json" with {\n type: "json",\n};\n```\n\nUse the [installable OPF CLI](./packages/cli/README.md) to create, validate, and edit files locally:\n\n```sh\npnpm --filter @openpresentation/cli build\nnode packages/cli/dist/index.js create deck.opf.json --title "Decision brief"\nnode packages/cli/dist/index.js validate deck.opf.json\nnode packages/cli/dist/index.js edit deck.opf.json --patch changes.json --in-place\n```\n\nSee [CSV and JSON data import](./docs/data-import.md) for editable tables and charts in the editor, CLI, and package API, and [content conversions](./docs/conversions.md) for the pure converters (`@openpresentation/opf/convert`) that change a block\'s kind, nest list items, restructure a slide and split or merge slides, and [Markdown and outlines](./docs/markdown.md) for the deterministic Markdown dialect (`@openpresentation/opf/markdown`, `opf convert deck.md deck.opf.json`) that reads and writes a whole deck as text.\n\n[OPF as YAML](./docs/yaml.md) describes the strict YAML form of a deck (`@openpresentation/opf/yaml`, `opf convert deck.opf.json deck.opf.yaml`, `.opf.yaml` files in every command, editor autocomplete); JSON stays the canonical form. A deck can equally be a Markdown file, `deck.opf.md`: every command reads and writes it (see [Markdown decks in every command](./docs/markdown.md#markdown-decks-in-every-command)), and `parse` / `stringify` read and write a deck in JSON, YAML or Markdown with one call.\n\nSee [Templates and variables](./docs/templates-and-variables.md) for fillable OPF templates: typed variables, `{{id}}` tokens, `opf fill` and `resolveVariables`.\n\n## Layout\n\n| Path | Contents |\n|---|---|\n| [`spec/schemas/opf.schema.json`](./spec/schemas/opf.schema.json) | Canonical JSON Schema for top-level OPF `Presentation` documents. |\n| [`docs/how-opf-works.md`](./docs/how-opf-works.md) | Conceptual introduction: the document model, content shapes, catalog resolution, and the validation philosophy. Start here. |\n| [`docs/slide-design-principles.md`](./docs/slide-design-principles.md) | Timeless principles for slide layout, typography, spacing, visual balance, and reviewing layout defaults. |\n| [`docs/design-resolution.md`](./docs/design-resolution.md) | The design precedence algorithm (slide design \u2192 deck design \u2192 resolved theme \u2192 engine defaults) with worked examples. |\n| [`docs/schema-reference.md`](./docs/schema-reference.md) | Author-facing reference for top-level OPF fields and every presentation schema `$defs` object/type. |\n| [`docs/slide-sizes.md`](./docs/slide-sizes.md) | OPF\'s slide-size presets in inches, points and EMU, how they compare with PowerPoint\'s presets, and what PPTX export and import do with them. |\n| [`docs/catalog-schema-reference.md`](./docs/catalog-schema-reference.md) | Author-facing reference for every companion catalog schema. |\n| [`docs/content-payloads.md`](./docs/content-payloads.md) | Author-facing notes for slide and region content payloads, including chart and table object shapes. |\n| [`docs/diagrams.md`](./docs/diagrams.md) | Mermaid, Graphviz DOT and PlantUML diagrams as a content kind: when to use one, the supported families, how the deck styles and sizes them, accessibility, export (native PowerPoint shapes by default) and limits. |\n| [`docs/shapes.md`](./docs/shapes.md) | Shapes: the 187 DrawingML presets as blocks, custom outlines, slide overlays and connectors, and how PowerPoint export and import carry them. |\n| [`docs/shape-effects.md`](./docs/shape-effects.md) | The six shape effects (shadow, glow, reflection, soft edge, blur, 3-D) and how each engine draws them. |\n| [`docs/smartart.md`](./docs/smartart.md) | The pyramid, matrix, cycle, chevrons, flow and vertical-flow layouts: live SmartArt in PowerPoint where it holds the text, native shapes elsewhere. |\n| [`docs/icons.md`](./docs/icons.md) | Icons on list entries, metrics and groups, icon cards, and the Lucide and Tabler icon sets in `@openpresentation/gallery/icon-sets`. |\n| [`docs/mcp.md`](./docs/mcp.md) | The MCP server (`npx -y @openpresentation/mcp`): tools, resources, and `show_deck`, which opens the OPF viewer in clients such as Claude. |\n| [`docs/footnotes-citations-captions.md`](./docs/footnotes-citations-captions.md) | Citations (`cite`), inline footnotes, the deck `references` list, captions on images, charts, tables and videos, and how every engine draws them. |\n| [`docs/examples.md`](./docs/examples.md) | Guide to the expanded scenario-oriented examples under `examples/gallery/`. |\n| [`docs/live-editor.md`](./docs/live-editor.md) | Browser canvas, live OPF editing, font loading, published packages, and current fidelity limits. |\n| [`docs/release-process.md`](./docs/release-process.md) | Maintainer runbook for the one-click release: gate, tag, trusted npm publishing of all seven packages, verification, GitHub release notes, and the site bumps. |\n| [`spec/schemas/*.schema.json`](./spec/schemas) | Companion schemas for catalog records and sub-objects. |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The default catalog and layout previews, released with the other packages. |\n| [`spec/openapi.yaml`](./spec/openapi.yaml) | Optional reference OpenAPI contract for downstream services that choose to expose OPF over HTTP. OpenPresentation does not host this API. |\n| [`examples/technical/`](./examples/technical) | Focused OPF fixtures for validator, renderer, catalog-resolution, design, content-payload, and region behavior. |\n| [`examples/gallery/`](./examples/gallery) | Broader OPF example decks organized by industry, function, education, government, presentation type, international, and design/media scenarios. |\n| [`packages/javascript/`](./packages/javascript) | Public pre-stable source for `@openpresentation/opf`. |\n| [`packages/cli/`](./packages/cli) | Installable local CLI for creating, validating, editing, and inspecting OPF. |\n| [`legacy/`](./legacy) | Tombstone for service-specific clients, CLIs, tool integrations, and workflows removed from the OpenPresentation OSS repo. |\n\n## OpenPresentation Boundary\n\nOpenPresentation defines the format, bundled presets, local validation, examples, docs, and planned local render/edit/convert libraries. It does not provide hosted functions or managed product surfaces.\n\nFuture non-JavaScript OPF packages should follow the same local-first boundary: Python and Go packages should expose schemas, types/models, catalogs, validation, and package-addressable assets. Future toolkit packages should expose embeddable library APIs with no required network calls, hosted callbacks, hidden telemetry, or managed infrastructure assumptions.\n\nThe published JavaScript package copies package-addressable OPF schemas, catalogs, reference assets, and the optional reference `spec/openapi.yaml` from `spec/`. It intentionally remains `@openpresentation/opf` instead of introducing a separate `@openpresentation/opf-spec` package so downstream imports can advance by semver-pinning one canonical package.\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n';
|
|
4
|
+
var repoReadmeRaw = '<p align="center">\n <picture>\n <source media="(prefers-color-scheme: dark)" srcset="docs/brand/opf-logo-dark.svg">\n <img src="docs/brand/opf-logo.svg" alt="Open Presentation Format" width="64" height="64">\n </picture>\n</p>\n\n# Open Presentation Format (OPF)\n\n[](https://www.npmjs.com/package/@openpresentation/opf)\n[](https://www.npmjs.com/package/@openpresentation/opf)\n[](./LICENSE)\n[](https://github.com/OpenPresentation/opf/actions/workflows/ci.yml)\n[](https://github.com/OpenPresentation/opf/actions/workflows/nightly.yml)\n\nPublic npm package: [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf) (`npm install @openpresentation/opf`).\n\nOpen Presentation Format is the portable, human-readable JSON document format for slide decks.\n\nThis repository is the canonical home for the OPF **spec**, **JSON Schemas**, **catalog presets**, examples, generated developer types, local validation tooling, and integration docs for the render/edit/convert toolkit. OpenPresentation publishes open-source code and documentation. The engine runs in the caller\u2019s environment; hosts choose their own rendering, storage and application infrastructure. The [MCP server](docs/mcp.md) has local stdio and hosted transport options, with viewer availability determined separately by the client and deployment.\n\nFor AI agents, use the [OPF skill set](docs/agent-skills.md) for authoring, layout, presets, editing, export, and schema inspection.\n\nThe published CLI installs all six skills into your project with `npx @openpresentation/cli skills install`. It uses local copies, preserves existing instructions and refuses to overwrite customized skills. See the [installation and update guide](docs/agent-skills.md) for personal or agent-specific targets and source development.\n\nFor a fresh Node 24 project that installs **published** packages (not this\ncheckout), follow the [developer quickstart](docs/quickstart.md) and the\n[compatibility matrix](docs/compatibility-matrix.md).\n\nFor LLM authoring, start with [the authoring guide](docs/llm-authoring.md), [dynamic composition](docs/dynamic-composition.md), and [local ecosystem verification](docs/ecosystem-development.md).\n\n## File naming\n\nOpen Presentation Format documents are JSON files. Use `*.opf.json` for complete OPF presentation documents, for example `board-review.opf.json` or `deck.opf.json`.\n\nAvoid using bare `*.opf` for OPF JSON. The `.opf` extension is already used by other document and project formats, while `.opf.json` keeps the OPF identity and still makes the underlying JSON format clear to editors, validators, agents, and version-control tooling.\n\n## Naming and reuse\n\nThe format name is **Open Presentation Format**. The schemas, catalogs, packages, and local tooling in this repository are free and open source under the MIT license, so third-party tools may read, write, validate, render, convert, and describe support for Open Presentation Format without adopting any product-specific branding.\n\n## Why OPF\n\n`.pptx` is a zipped bundle of XML. Humans can\'t diff it, LLMs can\'t read or write it reliably, and git can\'t track it meaningfully. Every change looks like a binary blob.\n\nOPF is plain JSON. A human can open it in an editor. A model can read and write it without guessing at schema-by-example. Decks live in git like the rest of your work.\n\nThat\'s the shift that lets LLMs actually *author* decks. When the format stops fighting them, models can do the work that matters \u2014 narrative structure, persuasive framing, data analysis, chart recommendations, ruthless revision passes \u2014 instead of wrestling with `<p:sp>` tags.\n\nAnd they don\'t start from a blank canvas. [pptx.gallery](https://pptx.gallery) is the human-browsable reference for OPF catalog presets: layouts, themes, color schemes, font schemes, chart types, narratives, audiences, purposes, tones, languages, and social platforms.\n\n## Start in three steps\n\n1. **Install the coordinated published packages** on Node 24. See [the developer quickstart](docs/quickstart.md) for the registry-derived pin set: core, renderer, PPTX, editor, CLI and Gallery use one completed shared release, retained with `--save-exact` and the lockfile. The optional seventh package, `@openpresentation/mcp`, supplies the [MCP server and viewer](docs/mcp.md). The default catalog is supplied by the matching `@openpresentation/gallery` release; see the [compatibility matrix](docs/compatibility-matrix.md) for feature and native limits.\n2. **Author, validate, paginate, preview and export.** New to OPF? Run the [first deck](docs/first-deck/README.md) end to end first. Copy [`docs/quickstart/developer-quickstart.opf.json`](./docs/quickstart/developer-quickstart.opf.json) and run the commands in that guide. From code, `convert("deck.opf.md", "deck.pdf")` of `@openpresentation/opf` is the simple path to a PDF, PNG, SVG or PPTX file. `validate` / `opf validate` is one local checker for format, references, accessibility, layout and content ([guide](docs/validate.md)), not visual verification.\n3. **Know the limits.** PPTX export writes one text box per wrapped line, so text edited in PowerPoint or Keynote does not reflow (see [rich text](docs/rich-text.md)) unless you opt in to `--body-text native` (opf-pptx and CLI 0.22.0 or later), and fonts are named, not embedded. The [compatibility matrix](docs/compatibility-matrix.md) lists shipped APIs versus renderer issue 24, native PowerPoint issue 87, and other deferred work. Browse presets at [pptx.gallery](https://pptx.gallery).\n\nYour deck can live in git from the first commit. After installing dependencies and supplying referenced assets, these commands run locally without a model provider, account or hosted OPF API.\n\n## JavaScript and TypeScript\n\nThe canonical JavaScript/TypeScript package is published at [`packages/javascript`](./packages/javascript) as [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf). The schema is pre-stable (0.x \u2014 expect breaking changes between minor versions until 1.0). Its responsibility is local and format-level only:\n\n- export the canonical schemas from [`spec/`](./spec)\n- register the pptx.gallery catalog of [`@openpresentation/gallery`](./packages/gallery) (a dependency, released with core at the same version) as the Node defaults, as the CLI does; a browser host registers it itself\n- export a typed raw spec file manifest for package-addressable `spec/` content\n- generate TypeScript types, with `Presentation` as the top-level type\n- validate OPF JSON and catalog records locally\n\nIn Node (and Bun and Deno) its root also reads and writes files (`convert`, `open`, `save`) and draws them through the optional engines below; in a browser or a worker the same import is a browser-safe build with the same names, where those three reject with `node-only`. Every other entry runs in a browser. It does not generate content with AI, fetch remote catalogs, call hosted APIs, or provide managed services. Render/edit/convert packages live in this repository as separate MIT packages that depend on `@openpresentation/opf`. The format package also exposes pure composition geometry so those packages share layout behavior.\n\n## Toolkit libraries\n\nOPF is seven packages. **Core** (`@openpresentation/opf`) is the format and its API: it reads and writes the text formats (JSON, YAML, Markdown) and validates, and in Node reads and writes files, through the same import. **The gallery** (`@openpresentation/gallery`) is the pptx.gallery catalog of layouts, themes, color and font schemes and the other records, released with the other packages; core depends on it and registers it in Node. **The CLI** (`@openpresentation/cli`) is the `opf` command. **The MCP server** (`@openpresentation/mcp`, `npx -y @openpresentation/mcp`) lets an MCP-native agent learn OPF (docs, schemas, catalog, examples and skills as resources) and validate and convert decks. **Render** (`opf-render`), **PPTX** (`opf-pptx`) and **the editor** (`opf-editor`) are the engines: drawing, PowerPoint and editing, installed as needed. All seven live in this repository (`packages/`) and are released together at one version. See [ecosystem development](docs/ecosystem-development.md) for local builds and verification, and [dynamic composition](docs/dynamic-composition.md) for portable layout rules.\n\n| Package | Role | Boundary |\n|---|---|---|\n| [`packages/javascript`](./packages/javascript) (`@openpresentation/opf`) | Core: format, schemas, validation, composition | The format and its API; reads and writes files in Node and draws through the optional engines |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The pptx.gallery catalog | Catalog records only, no runtime dependency; records are authored by pull request here, and a changed drawing or a removed record needs a minor release |\n| [`packages/cli`](./packages/cli) (`@openpresentation/cli`) | `opf` command | Runs core\'s Node engine: reads and writes files and calls the engines below as optional peers |\n| [`packages/mcp`](./packages/mcp) (`@openpresentation/mcp`) | MCP server and viewer | Docs, schemas, catalog lookup, validation, conversion and `show_deck` for MCP clients |\n| [`packages/render`](./packages/render) (`@openpresentation/opf-render`) | OPF to SVG/PNG/PDF | Local and embeddable rendering library |\n| [`packages/editor`](./packages/editor) (`@openpresentation/opf-editor`) | WYSIWYG bindings/components | Headless editor primitives plus optional UI components |\n| [`packages/pptx`](./packages/pptx) (`@openpresentation/opf-pptx`) | OPF to PPTX and PPTX to OPF | Pure local import/export library for browser and server use where supported |\n\nThese packages provide OSS primitives only. Downstream applications own hosting, auth, storage, collaboration, queues, previews, analytics, support, and workflow UX.\n\n## Usage\n\nInstall from npm:\n\n```sh\npnpm add @openpresentation/opf\n# or: npm install @openpresentation/opf\n```\n\nTo work on the packages, clone this repo and build the workspace (all seven packages are in `packages/`; see [CONTRIBUTING](./CONTRIBUTING.md)):\n\n```sh\npnpm install\npnpm build\n```\n\nUse the format package from JavaScript or TypeScript:\n\n```ts\nimport { presentation, validate } from "@openpresentation/opf";\nimport { gallery } from "@openpresentation/gallery";\n\nimport type { Presentation } from "@openpresentation/opf";\n\nconst deck: Presentation = {\n name: "Quarterly Review",\n slides: [{ title: "Quarterly Review", items: ["Revenue", "Product", "Hiring"] }],\n};\n\nconst report = validate(deck);\nconsole.log(report.valid); // no finding has severity "error"\nconsole.log(report.findings); // every finding: rule id, severity, category, JSON Pointer path, message, fixes\n// Core ships no catalog records; in Node, validate registers the gallery when a call names no catalogs, and a host may name its own.\nconsole.log(validate({ ...deck, design: { theme: "classic" } }, { catalogs: [gallery] }).valid);\nconsole.log(Object.keys(gallery.audiences).length);\n```\n\nConvert, open and save files in Node with `@openpresentation/opf`, the same import a browser uses (the engines `@openpresentation/opf-render` and `@openpresentation/opf-pptx` are optional peers, installed as needed; see [OPF files in Node](docs/node.md)):\n\n```ts\nimport * as opf from "@openpresentation/opf";\n\nawait opf.convert("deck.opf.md", "deck.pdf");\nconst deck = await opf.open("deck.opf.md");\ndeck.slides.push({ title: "Q4" });\nawait opf.save(deck, "deck.opf.md");\nconst { files } = await opf.convert(deck, { format: "pptx" }); // bytes, nothing written\n```\n\nUse focused imports when you only need one surface:\n\n```ts\nimport { presentation } from "@openpresentation/opf/schemas";\nimport { specFileEntries } from "@openpresentation/opf/spec-files";\nimport { validate } from "@openpresentation/opf/validator";\nimport type { Presentation } from "@openpresentation/opf/types";\n```\n\nUse raw JSON when an engine or resolver needs package-addressable files:\n\n```ts\nimport presentationSchema from "@openpresentation/opf/spec/schemas/opf.schema.json" with {\n type: "json",\n};\n```\n\nUse the [installable OPF CLI](./packages/cli/README.md) to create, validate, and edit files locally:\n\n```sh\npnpm --filter @openpresentation/cli build\nnode packages/cli/dist/index.js create deck.opf.json --title "Decision brief"\nnode packages/cli/dist/index.js validate deck.opf.json\nnode packages/cli/dist/index.js edit deck.opf.json --patch changes.json --in-place\n```\n\nSee [CSV and JSON data import](./docs/data-import.md) for editable tables and charts in the editor, CLI, and package API, and [content conversions](./docs/conversions.md) for the pure converters (`@openpresentation/opf/convert`) that change a block\'s kind, nest list items, restructure a slide and split or merge slides, and [Markdown and outlines](./docs/markdown.md) for the deterministic Markdown dialect (`@openpresentation/opf/markdown`, `opf convert deck.md deck.opf.json`) that reads and writes a whole deck as text.\n\n[OPF as YAML](./docs/yaml.md) describes the strict YAML form of a deck (`@openpresentation/opf/yaml`, `opf convert deck.opf.json deck.opf.yaml`, `.opf.yaml` files in every command, editor autocomplete); JSON stays the canonical form. A deck can equally be a Markdown file, `deck.opf.md`: every command reads and writes it (see [Markdown decks in every command](./docs/markdown.md#markdown-decks-in-every-command)), and `parse` / `stringify` read and write a deck in JSON, YAML or Markdown with one call.\n\nSee [Templates and variables](./docs/templates-and-variables.md) for fillable OPF templates: typed variables, `{{id}}` tokens, `opf fill` and `resolveVariables`.\n\n## Layout\n\n| Path | Contents |\n|---|---|\n| [`spec/schemas/opf.schema.json`](./spec/schemas/opf.schema.json) | Canonical JSON Schema for top-level OPF `Presentation` documents. |\n| [`docs/how-opf-works.md`](./docs/how-opf-works.md) | Conceptual introduction: the document model, content shapes, catalog resolution, and the validation philosophy. Start here. |\n| [`docs/slide-design-principles.md`](./docs/slide-design-principles.md) | Timeless principles for slide layout, typography, spacing, visual balance, and reviewing layout defaults. |\n| [`docs/design-resolution.md`](./docs/design-resolution.md) | The design precedence algorithm (slide design \u2192 deck design \u2192 resolved theme \u2192 engine defaults) with worked examples. |\n| [`docs/schema-reference.md`](./docs/schema-reference.md) | Author-facing reference for top-level OPF fields and every presentation schema `$defs` object/type. |\n| [`docs/slide-sizes.md`](./docs/slide-sizes.md) | OPF\'s slide-size presets in inches, points and EMU, how they compare with PowerPoint\'s presets, and what PPTX export and import do with them. |\n| [`docs/catalog-schema-reference.md`](./docs/catalog-schema-reference.md) | Author-facing reference for every companion catalog schema. |\n| [`docs/content-payloads.md`](./docs/content-payloads.md) | Author-facing notes for slide and region content payloads, including chart and table object shapes. |\n| [`docs/diagrams.md`](./docs/diagrams.md) | Mermaid, Graphviz DOT and PlantUML diagrams as a content kind: when to use one, the supported families, how the deck styles and sizes them, accessibility, export (native PowerPoint shapes by default) and limits. |\n| [`docs/shapes.md`](./docs/shapes.md) | Shapes: the 187 DrawingML presets as blocks, custom outlines, slide overlays and connectors, and how PowerPoint export and import carry them. |\n| [`docs/shape-effects.md`](./docs/shape-effects.md) | The six shape effects (shadow, glow, reflection, soft edge, blur, 3-D) and how each engine draws them. |\n| [`docs/smartart.md`](./docs/smartart.md) | The pyramid, matrix, cycle, chevrons, process and vertical-process layouts: live SmartArt in PowerPoint where it holds the text, native shapes elsewhere. |\n| [`docs/icons.md`](./docs/icons.md) | Icons on list entries, metrics and groups, icon cards, and the Lucide and Tabler icon sets in `@openpresentation/gallery/icon-sets`. |\n| [`docs/mcp.md`](./docs/mcp.md) | The MCP server (`npx -y @openpresentation/mcp`): tools, resources, and `show_deck`, which opens the OPF viewer in clients such as Claude. |\n| [`docs/footnotes-citations-captions.md`](./docs/footnotes-citations-captions.md) | Citations (`cite`), inline footnotes, the deck `references` list, captions on images, charts, tables and videos, and how every engine draws them. |\n| [`docs/examples.md`](./docs/examples.md) | Guide to the expanded scenario-oriented examples under `examples/gallery/`. |\n| [`docs/live-editor.md`](./docs/live-editor.md) | Browser canvas, live OPF editing, font loading, published packages, and current fidelity limits. |\n| [`docs/release-process.md`](./docs/release-process.md) | Maintainer runbook for the one-click release: gate, tag, trusted npm publishing of all seven packages, verification, GitHub release notes, and the site bumps. |\n| [`spec/schemas/*.schema.json`](./spec/schemas) | Companion schemas for catalog records and sub-objects. |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The default catalog and layout previews, released with the other packages. |\n| [`spec/openapi.yaml`](./spec/openapi.yaml) | Optional reference OpenAPI contract for downstream services that choose to expose OPF over HTTP. OpenPresentation does not host this API. |\n| [`examples/technical/`](./examples/technical) | Focused OPF fixtures for validator, renderer, catalog-resolution, design, content-payload, and region behavior. |\n| [`examples/gallery/`](./examples/gallery) | Broader OPF example decks organized by industry, function, education, government, presentation type, international, and design/media scenarios. |\n| [`packages/javascript/`](./packages/javascript) | Public pre-stable source for `@openpresentation/opf`. |\n| [`packages/cli/`](./packages/cli) | Installable local CLI for creating, validating, editing, and inspecting OPF. |\n| [`legacy/`](./legacy) | Tombstone for service-specific clients, CLIs, tool integrations, and workflows removed from the OpenPresentation OSS repo. |\n\n## OpenPresentation Boundary\n\nOpenPresentation defines the format, bundled presets, local validation, examples, docs, and planned local render/edit/convert libraries. It does not provide hosted functions or managed product surfaces.\n\nFuture non-JavaScript OPF packages should follow the same local-first boundary: Python and Go packages should expose schemas, types/models, catalogs, validation, and package-addressable assets. Future toolkit packages should expose embeddable library APIs with no required network calls, hosted callbacks, hidden telemetry, or managed infrastructure assumptions.\n\nThe published JavaScript package copies package-addressable OPF schemas, catalogs, reference assets, and the optional reference `spec/openapi.yaml` from `spec/`. It intentionally remains `@openpresentation/opf` instead of introducing a separate `@openpresentation/opf-spec` package so downstream imports can advance by semver-pinning one canonical package.\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n';
|
|
5
5
|
|
|
6
6
|
// src/repo-readme.ts
|
|
7
7
|
var repoReadme = repoReadmeRaw;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { installedSchemaEngine } from './chunk-43JWUIGF.js';
|
|
2
2
|
import { qualifyBranch } from './chunk-JBARNYFR.js';
|
|
3
|
-
import { schemas } from './chunk-
|
|
3
|
+
import { schemas } from './chunk-3KPTVK77.js';
|
|
4
4
|
import './chunk-PRXZD2II.js';
|
|
5
5
|
import Ajv2020 from 'ajv/dist/2020.js';
|
|
6
6
|
import addFormats from 'ajv-formats';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { precompiledMarker, schemaEngine } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { precompiledMarker, schemaEngine } from './chunk-SEC4IOOS.js';
|
|
2
|
+
import './chunk-3KPTVK77.js';
|
|
3
3
|
import './chunk-PRXZD2II.js';
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as CatalogRecordKind } from './catalog-schemas-
|
|
1
|
+
import { C as CatalogRecordKind } from './catalog-schemas-BX-VEc5Q.js';
|
|
2
2
|
import { SchemaName } from './schemas.js';
|
|
3
|
-
import './catalog-refs-
|
|
3
|
+
import './catalog-refs-BgotJhR5.js';
|
|
4
4
|
import './json-BFSdESOE.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -41,7 +41,7 @@ declare function splitOpfPath(path: OpfPath): string[];
|
|
|
41
41
|
declare function resolveSchema(schema: JsonSchema | undefined, root?: SchemaRoot, seen?: Set<string>): JsonSchema;
|
|
42
42
|
/**
|
|
43
43
|
* The concrete forms of a schema: `oneOf` / `anyOf` branches and `type` arrays expanded, each branch merged over the shared
|
|
44
|
-
* base (properties and required lists are combined; a branch that only names required fields is
|
|
44
|
+
* base (properties and required lists are combined; a branch that only names required fields is labeled by them).
|
|
45
45
|
*/
|
|
46
46
|
declare function schemaVariants(schema: JsonSchema | undefined, root?: SchemaRoot): JsonSchema[];
|
|
47
47
|
/** The JSON type of a schema, inferred from its members when `type` is absent (and from `value` for an open schema). */
|
|
@@ -79,8 +79,6 @@ declare const COMMON_KEYS: Readonly<{
|
|
|
79
79
|
}>;
|
|
80
80
|
/** The sort position of a key that is in no `COMMON_KEYS` list. */
|
|
81
81
|
declare const UNRANKED_PRIORITY = 1000000;
|
|
82
|
-
/** Whether a slide key is a promoted region (`start`, `top+middle`, `top+middle:start+center`, ...): 48 keys of the slide schema, all `advanced`. */
|
|
83
|
-
declare function isPromotedRegionKey(key: string): boolean;
|
|
84
82
|
|
|
85
83
|
interface EnumValue {
|
|
86
84
|
value: string | number | boolean | null;
|
|
@@ -106,7 +104,7 @@ interface FieldChild {
|
|
|
106
104
|
/** `string`, `number`, `enum`, `Design` (a single `$defs` object), `array of Slide`, `array of string`, `choice` (several forms), ... */
|
|
107
105
|
typeLabel: string;
|
|
108
106
|
required: boolean;
|
|
109
|
-
/** Hidden until the typed prefix matches:
|
|
107
|
+
/** Hidden until the typed prefix matches: `extensions`, `$schema`. */
|
|
110
108
|
advanced: boolean;
|
|
111
109
|
/** Lower sorts first: the index in `COMMON_KEYS` for the object, `UNRANKED_PRIORITY` (1e6) otherwise. */
|
|
112
110
|
priority: number;
|
|
@@ -162,5 +160,5 @@ declare function describeField(path: OpfPath, document?: unknown): FieldInfo;
|
|
|
162
160
|
*/
|
|
163
161
|
declare function catalogKindAt(path: OpfPath, document?: unknown): CatalogRecordKind | undefined;
|
|
164
162
|
|
|
165
|
-
export { COMMON_KEYS, CatalogRecordKind, UNRANKED_PRIORITY, activeSchema, catalogKindAt, createSchemaValue, describeField,
|
|
163
|
+
export { COMMON_KEYS, CatalogRecordKind, UNRANKED_PRIORITY, activeSchema, catalogKindAt, createSchemaValue, describeField, listSchemaFields, resolveSchema, schemaAtPath, schemaCatalogKinds, schemaLabel, schemaType, schemaVariants, splitOpfPath };
|
|
166
164
|
export type { EnumValue, FieldChild, FieldInfo, JsonSchema, OpfPath, SchemaField, SchemaNodeKey, SchemaRoot, VariantInfo };
|
package/dist/schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { COMMON_KEYS, UNRANKED_PRIORITY, activeSchema, catalogKindAt, createSchemaValue, describeField,
|
|
1
|
+
export { COMMON_KEYS, UNRANKED_PRIORITY, activeSchema, catalogKindAt, createSchemaValue, describeField, listSchemaFields, resolveSchema, schemaAtPath, schemaCatalogKinds, schemaLabel, schemaType, schemaVariants, splitOpfPath } from './chunk-KNMMEE67.js';
|
|
2
2
|
import './chunk-JBARNYFR.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-3KPTVK77.js';
|
|
4
|
+
import './chunk-LDLLZQPP.js';
|
|
5
5
|
import './chunk-BLCDUM7B.js';
|
|
6
6
|
import './chunk-PRXZD2II.js';
|
package/dist/schemas.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { audience, chartType, colorScheme, fontScheme, iconSet, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-
|
|
1
|
+
export { audience, chartType, colorScheme, fontScheme, iconSet, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-3KPTVK77.js';
|
|
2
2
|
import './chunk-PRXZD2II.js';
|
package/dist/source.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { explain } from './chunk-
|
|
2
|
-
import { readMarkdown, frontMatter, splitSegments, isOutline, NOTES, fenceStart, fenceClose, COMMENT } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import { splitLines } from './chunk-
|
|
5
|
-
export { analyzeYamlSyntax } from './chunk-
|
|
6
|
-
import './chunk-
|
|
7
|
-
import { rememberByText, SLIDE_OPTION_KEYS, FENCE_KINDS, createLocator, parsePointer } from './chunk-
|
|
8
|
-
export { BLOCK_AS_VALUES, BLOCK_OPTION_KEYS, FENCE_ATTRIBUTES, FENCE_KINDS, LINE_KEYWORDS, METRIC_KEYS, PATTERN_PHRASES, SLIDE_OPTION_KEYS, SPAN_FLAGS, SPAN_VALUES, analyzeJsonSyntax, applyTextEdits, describeFinding, distance, nearest, segmentsOf as pointerSegments, starterValue } from './chunk-
|
|
1
|
+
export { explain } from './chunk-7KUUIL7W.js';
|
|
2
|
+
import { readMarkdown, frontMatter, splitSegments, isOutline, NOTES, fenceStart, fenceClose, COMMENT } from './chunk-VMPOCXTE.js';
|
|
3
|
+
import './chunk-NPRNWPP4.js';
|
|
4
|
+
import { splitLines } from './chunk-ZZWX4W2G.js';
|
|
5
|
+
export { analyzeYamlSyntax } from './chunk-ZZWX4W2G.js';
|
|
6
|
+
import './chunk-ARPMSD7V.js';
|
|
7
|
+
import { rememberByText, SLIDE_OPTION_KEYS, FENCE_KINDS, createLocator, parsePointer } from './chunk-KNMMEE67.js';
|
|
8
|
+
export { BLOCK_AS_VALUES, BLOCK_OPTION_KEYS, FENCE_ATTRIBUTES, FENCE_KINDS, LINE_KEYWORDS, METRIC_KEYS, PATTERN_PHRASES, SLIDE_OPTION_KEYS, SPAN_FLAGS, SPAN_VALUES, analyzeJsonSyntax, applyTextEdits, describeFinding, distance, nearest, segmentsOf as pointerSegments, starterValue } from './chunk-KNMMEE67.js';
|
|
9
9
|
import './chunk-JBARNYFR.js';
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
10
|
+
import './chunk-3KPTVK77.js';
|
|
11
|
+
import './chunk-LDLLZQPP.js';
|
|
12
12
|
import './chunk-BLCDUM7B.js';
|
|
13
13
|
import './chunk-PRXZD2II.js';
|
|
14
14
|
import { findNodeAtOffset, getNodePath, parseTree } from 'jsonc-parser';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"description": "The engine defaults every OPF engine shares (OPF 0.15). Not part of the document contract and not a catalog: these are the values an engine draws with when a document names no theme,
|
|
2
|
+
"description": "The engine defaults every OPF engine shares (OPF 0.15). Not part of the document contract and not a catalog: these are the values an engine draws with when a document names no theme, color scheme or font scheme, or when a reference resolves nowhere (opf/unresolved-reference). They are the drawing fields of the gallery's minimal theme, cool-horizon color scheme and aptos font scheme, compiled into core (ENGINE_DEFAULT_THEME, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME) so preview, pagination, editor and PPTX export use the same fallback without loading any catalog. 'chartTypes' is the order in which an engine offers chart types when it must pick one (chartTypes[0] first).",
|
|
3
3
|
"theme": {
|
|
4
4
|
"background": { "type": "theme", "slot": "dark2" },
|
|
5
5
|
"dimensions": "widescreen"
|