@openpresentation/opf 0.33.0 → 0.34.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/browser.js +20 -19
- package/dist/catalog-refs-CoIrOdAw.d.ts +937 -0
- package/dist/{catalog-schemas-CQTM-G8p.d.ts → catalog-schemas-FjLRPtjB.d.ts} +1 -1
- package/dist/{chart-data-oIZQlFGi.d.ts → chart-data-B_k-WTex.d.ts} +7 -4
- package/dist/{chunk-XIOC6N5P.js → chunk-244OPLAV.js} +1 -1
- package/dist/{chunk-KVHNDHVS.js → chunk-2B6GLT2O.js} +1 -1
- package/dist/{chunk-VMBLNCX2.js → chunk-6PMXVP5G.js} +117 -30
- package/dist/{chunk-BI4ERFAA.js → chunk-AAWHOCXS.js} +48 -13
- package/dist/{chunk-QD6DPS7X.js → chunk-ABA2D6X5.js} +2 -2
- package/dist/{chunk-UK3J6FSU.js → chunk-AEHDXNZX.js} +862 -269
- package/dist/{chunk-DAS75LGR.js → chunk-AGYPRTEC.js} +4 -4
- package/dist/chunk-BLCDUM7B.js +7 -0
- package/dist/{chunk-OPVJLL7H.js → chunk-CJVKOJ6B.js} +11841 -8687
- package/dist/{chunk-Y557TYML.js → chunk-CQXBGZQP.js} +19 -16
- package/dist/{chunk-VKEYV3ZK.js → chunk-FCSYIBVR.js} +2 -2
- package/dist/{chunk-PJSPHHRK.js → chunk-FK5XG742.js} +3 -16
- package/dist/{chunk-R6C6BQOG.js → chunk-HHVQ2SDT.js} +1 -1
- package/dist/{chunk-ABWEUXLV.js → chunk-L3MCLD3X.js} +117 -21
- package/dist/{chunk-QF5RSRXU.js → chunk-LCT5ZV3Q.js} +750 -199
- package/dist/{chunk-E7WQHMCL.js → chunk-MAFJ5O2D.js} +16 -14
- package/dist/{chunk-XANW7MB7.js → chunk-MUILZGRY.js} +4 -4
- package/dist/chunk-NLJFNCZ4.js +1560 -0
- package/dist/{chunk-VSBZC2PR.js → chunk-SR6T4LKI.js} +3 -3
- package/dist/chunk-UJZN2ZH6.js +1 -0
- package/dist/{chunk-IJXKVM4W.js → chunk-VDZXNNZF.js} +1 -1
- package/dist/{chunk-YYT6N7AI.js → chunk-WCPDN7AY.js} +1 -1
- package/dist/{chunk-S5QRGMUQ.js → chunk-X72WPTST.js} +6 -6
- package/dist/{chunk-INIMUBSE.js → chunk-XJUMFH33.js} +1 -1
- package/dist/{chunk-YS333HLA.js → chunk-XLSWZSQS.js} +2 -2
- package/dist/{composition-zMiIgzip.d.ts → composition-CvtvgBDE.d.ts} +1360 -1531
- package/dist/composition.d.ts +3 -3
- package/dist/composition.js +2 -1
- package/dist/conversion-CSQ5EHD2.js +25 -0
- package/dist/{conversion-mNth9XKm.d.ts → conversion-CyNRlWGw.d.ts} +25 -7
- package/dist/convert.d.ts +4 -4
- package/dist/convert.js +15 -11
- package/dist/data.d.ts +2 -2
- package/dist/data.js +3 -2
- package/dist/{deck-report-BSlRiR0_.d.ts → deck-report-BVlQZ42f.d.ts} +3 -3
- package/dist/deck.d.ts +6 -6
- package/dist/deck.js +12 -11
- package/dist/diagram-engine-eager.js +5 -1
- package/dist/diagram-engine-lazy.js +13 -0
- package/dist/diagram-plantuml-XRZ6VAOL.js +3 -0
- package/dist/diff.js +5 -4
- package/dist/docs.js +65 -53
- package/dist/examples.js +4070 -1083
- package/dist/font-policy.js +1 -1
- package/dist/format.js +2 -2
- package/dist/ids.js +5 -4
- package/dist/index.d.ts +18 -16
- package/dist/index.js +35 -24
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +9 -8
- package/dist/node-engine.d.ts +43 -11
- package/dist/node-engine.js +45 -26
- package/dist/{pagination-CYzNMazO.d.ts → pagination-CZQQYk7L.d.ts} +4 -3
- package/dist/pagination.d.ts +4 -4
- package/dist/pagination.js +5 -4
- package/dist/patch.js +4 -3
- package/dist/precompiled.js +2 -2
- package/dist/{presentation-CXhfpB_z.d.ts → presentation-s9262acV.d.ts} +357 -230
- 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 +3 -3
- package/dist/schema.js +4 -3
- package/dist/schemas.d.ts +16 -0
- package/dist/schemas.js +1 -1
- package/dist/shape-engine-eager.js +2 -2
- package/dist/shape-engine-lazy.js +1 -1
- package/dist/{shape-engine-module-BK7JNEUV.js → shape-engine-module-N74FCHGY.js} +2 -2
- package/dist/shape-geometry.js +1 -1
- package/dist/source.d.ts +10 -5
- package/dist/source.js +11 -10
- package/dist/spec/reference/engine-vocabularies.json +135 -0
- package/dist/spec/reference/font-policy.json +3 -16
- package/dist/spec/reference/preset-geometry.json +3 -3
- package/dist/spec/schemas/icon-set.schema.json +1 -1
- package/dist/spec/schemas/layout.schema.json +71 -25
- package/dist/spec/schemas/opf.schema.json +540 -168
- package/dist/spec/schemas/theme.schema.json +11 -5
- package/dist/types.d.ts +81 -73
- package/dist/{validation-types-COwTel3H.d.ts → validation-types-CYbsUuZ9.d.ts} +8 -5
- package/dist/validator.d.ts +34 -7
- package/dist/validator.js +4 -3
- package/dist/yaml.d.ts +2 -2
- package/dist/yaml.js +8 -7
- package/package.json +6 -6
- package/dist/catalog-refs-B_0_vZg0.d.ts +0 -134
- package/dist/chunk-ZXOIGUHX.js +0 -1
- package/dist/conversion-POHRAMSN.js +0 -24
package/README.md
CHANGED
|
@@ -117,14 +117,14 @@ Added in 0.12.0 (not in 0.11.4 or earlier): `@openpresentation/opf/patch` is the
|
|
|
117
117
|
|
|
118
118
|
`@openpresentation/opf/ids` (all of it also on the package root, the pointer and hash parts also on `/patch`) makes edits addressable and checkable. `assignIds(document, { generate? })` fills the missing `id` of slides and content payloads deterministically (`{ document, patch, assigned }`; existing ids are never changed). In an array, the pointer token `@intro` names the element whose `id` is `intro`, so `/slides/@intro/blocks/@kpi/text` survives reordering: `applyPatch` and `readPointer` resolve it, `resolveIdPointer` and `toIdPointer` convert a pointer, `resolveIdPatch` and `toIdPatch` a whole patch. `documentHash(document)` is `sha256:` and a SHA-256 of the key-sorted JSON (pure JavaScript, the same in Node, browsers and edge runtimes); `applyPatch(document, patch, { expectHash })` and `edit(deck, patch, { expectHash })` apply only to the document that hash was taken from, else throw `OPFPatchHashError` and change nothing. `touches(patch, document?)` returns the pointers (index and id form), ids, slide ids and kinds a patch reads and writes, for conflict detection and permission checks. See [the guide](../../docs/patch-diff-merge-format.md#ids-id-addressed-paths-hashes-and-patch-scope).
|
|
119
119
|
|
|
120
|
-
### Shapes, icons, SmartArt layouts and diagrams
|
|
120
|
+
### Shapes, icons, SmartArt layouts and diagrams
|
|
121
121
|
|
|
122
122
|
A slide can draw more than text, pictures and charts, with no extra package:
|
|
123
123
|
|
|
124
124
|
- **Shapes.** A `shape` block takes one of PowerPoint's 187 presets (`{ "shape": "chevron", "text": "Plan" }`) or a custom `path`, with fills, strokes and six effects; a slide's `shapes` list adds overlays and connectors between blocks. The preset table is `PRESET_SHAPES` of `@openpresentation/opf/shape-geometry`. See [shapes](https://github.com/OpenPresentation/opf/blob/main/docs/shapes.md) and [shape effects](https://github.com/OpenPresentation/opf/blob/main/docs/shape-effects.md).
|
|
125
|
-
- **Icons.** `icon` on a list entry, a metric or a group (`"lucide:truck"`, `"tabler:rocket"`) draws a chip, and a list of short icon entries draws icon cards. The sets live in `@openpresentation/gallery/icon-sets
|
|
125
|
+
- **Icons.** `icon` on a list entry, a metric or a group (`"lucide:truck"`, `"tabler:rocket"`) draws a chip, and a list of short icon entries draws icon cards. The sets live in `@openpresentation/gallery/icon-sets` as static files read one icon at a time: register `galleryIconSets()` beside `gallery` (in a browser, `galleryIconSets(fetchIcons("/opf-icons/"))` over the files you serve; in a Worker, an absolute URL and `env.ASSETS`) and await `ensureIcons(deck, { catalogs })` before synchronous drawing (`@openpresentation/opf/composition`). The Node build's defaults (`convert`, `open`, the CLI) register them with no setup, also in a bundled server deployed with its `node_modules`, and no bundle carries the icon data. An icon that cannot be loaded is an `opf/icon-unknown` finding; it never blocks drawing. See [icons](https://github.com/OpenPresentation/opf/blob/main/docs/icons.md).
|
|
126
126
|
- **SmartArt layouts.** The `pyramid`, `matrix`, `cycle`, `chevrons`, `flow` and `vertical-flow` layouts draw one diagram from a list; PowerPoint export writes live SmartArt where it holds the text, and native shapes elsewhere. See [SmartArt layouts](https://github.com/OpenPresentation/opf/blob/main/docs/smartart.md).
|
|
127
|
-
- **Diagrams.** A
|
|
127
|
+
- **Diagrams.** A `diagram` payload accepts Mermaid (the string shorthand), Graphviz DOT (`syntax: "dot"`) or PlantUML (`syntax: "plantuml"`), is drawn in the deck's design and exports as native PowerPoint shapes by default (`--diagrams picture` for a picture). See [diagrams](https://github.com/OpenPresentation/opf/blob/main/docs/diagrams.md).
|
|
128
128
|
|
|
129
129
|
### Layout previews
|
|
130
130
|
|
package/dist/browser.js
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { OPFApiError } from './chunk-
|
|
2
|
-
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, stats, updateFromCatalog } from './chunk-
|
|
1
|
+
import { OPFApiError } from './chunk-AGYPRTEC.js';
|
|
2
|
+
export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, stats, updateFromCatalog } from './chunk-AGYPRTEC.js';
|
|
3
3
|
export { specFileEntries, specFileKinds, specFilePaths } from './chunk-W4DYDRV2.js';
|
|
4
|
-
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-
|
|
5
|
-
export { OPFDataImportError, ingest, parseTabularData } from './chunk-
|
|
6
|
-
export { OPFPaginationError, blockUnits, continuationPages, continueOverfull, paginate, paginateSlide } from './chunk-
|
|
7
|
-
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-
|
|
8
|
-
export { fromMarkdown, toMarkdown } from './chunk-
|
|
9
|
-
import './chunk-
|
|
10
|
-
export { OPFFormatError, format } from './chunk-
|
|
4
|
+
export { FONT_POLICY, applyFontPolicyDecisions, fontAvailabilityDiagnostics, fontPolicyFor } from './chunk-FK5XG742.js';
|
|
5
|
+
export { OPFDataImportError, ingest, parseTabularData } from './chunk-244OPLAV.js';
|
|
6
|
+
export { OPFPaginationError, blockUnits, continuationPages, continueOverfull, paginate, paginateSlide } from './chunk-L3MCLD3X.js';
|
|
7
|
+
export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-MUILZGRY.js';
|
|
8
|
+
export { fromMarkdown, toMarkdown } from './chunk-MAFJ5O2D.js';
|
|
9
|
+
import './chunk-X72WPTST.js';
|
|
10
|
+
export { OPFFormatError, format } from './chunk-HHVQ2SDT.js';
|
|
11
11
|
import './chunk-RYZPBJLB.js';
|
|
12
|
-
export { explain } from './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
export { OPFMarkdownError } from './chunk-
|
|
16
|
-
import './chunk-
|
|
17
|
-
export { OPFIdError, assignIds, touches } from './chunk-
|
|
18
|
-
export { diff, merge } from './chunk-
|
|
19
|
-
export { CATALOG_SCHEMA, DEFAULT_VALIDATION_THRESHOLDS, OPFPatchError, OPFPatchHashError, OPFPatchValidationError, OPFValidationError, applyPatch, assertValid, assertValidCatalogRecord, catalogDisplayKinds, catalogIconKinds, catalogSchemaNames, documentHash, findValidationRule, idToken, isIdToken, resolveDrawnFontFamilies, resolveIdPatch, resolveIdPointer, resolveSlideContext, toIdPatch, toIdPointer, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-
|
|
12
|
+
export { explain } from './chunk-AAWHOCXS.js';
|
|
13
|
+
import './chunk-CQXBGZQP.js';
|
|
14
|
+
import './chunk-2B6GLT2O.js';
|
|
15
|
+
export { OPFMarkdownError } from './chunk-ABA2D6X5.js';
|
|
16
|
+
import './chunk-FCSYIBVR.js';
|
|
17
|
+
export { OPFIdError, assignIds, touches } from './chunk-XLSWZSQS.js';
|
|
18
|
+
export { diff, merge } from './chunk-SR6T4LKI.js';
|
|
19
|
+
export { CATALOG_SCHEMA, DEFAULT_VALIDATION_THRESHOLDS, OPFPatchError, OPFPatchHashError, OPFPatchValidationError, OPFValidationError, applyPatch, assertValid, assertValidCatalogRecord, catalogDisplayKinds, catalogIconKinds, catalogSchemaNames, createValidator, documentHash, findValidationRule, idToken, isIdToken, resolveDrawnFontFamilies, resolveIdPatch, resolveIdPointer, resolveSlideContext, toIdPatch, toIdPointer, validate, validateCatalogRecord, validationCategories, validationRules } from './chunk-AEHDXNZX.js';
|
|
20
20
|
import './chunk-JBARNYFR.js';
|
|
21
|
-
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-
|
|
22
|
-
export { CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, CHART_TYPES, DEFAULT_VARIABLE_DATE_FORMAT, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, LANGUAGES, LOGO_SHAPES, OPFCatalogsOptionError, OPFUnresolvedReferenceError, OPFVariableError, SLIDE_SCOPED_BUILTINS, SOCIAL_PLATFORMS, VARIABLE_KINDS, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, chartDrawDiagnostics, chartDrawPlan, chartNumber, coerceVariableValue, datasetDiagnostics, diagramsPending, embedIcons, ensureDiagrams, ensureIcons, ensureShapes, formatDataNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, iconsPending, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isPlaceLabel, isTemplate, isXYChartType, listBuiltinVariables, listVariables, markLabelColor, nearIconNames, normalizeLanguageFamily, numberFormatError, parseIconReference, parseReference, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveIcon, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, shapesPending, suggestChartNumberFix, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './chunk-
|
|
21
|
+
export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-LCT5ZV3Q.js';
|
|
22
|
+
export { CATALOG_GROUP_PATTERN, CATALOG_REFERENCE_PATTERN, CHART_TYPES, DEFAULT_VARIABLE_DATE_FORMAT, ENGINE_DEFAULT_CHART_TYPES, ENGINE_DEFAULT_COLOR_SCHEME, ENGINE_DEFAULT_FONT_SCHEME, ENGINE_DEFAULT_THEME, LANGUAGES, LOGO_SHAPES, OPFCatalogsOptionError, OPFUnresolvedReferenceError, OPFVariableError, SLIDE_SCOPED_BUILTINS, SOCIAL_PLATFORMS, VARIABLE_KINDS, asciiDigits, catalogGroupSource, catalogKinds, catalogRecords, catalogReferenceSites, chartDrawDiagnostics, chartDrawPlan, chartNumber, coerceVariableValue, datasetDiagnostics, diagramsPending, embedIcons, ensureDiagrams, ensureIcons, ensureShapes, formatDataNumber, formatNumber, formatPercentNumber, formatVariableNumber, fromExcelNumberFormat, hasContentVariables, iconsPending, inlineChartData, inlineDatasets, inlineTableData, isDatasetRef, isPlaceLabel, isSupportedNumberingSystem, isTemplate, isXYChartType, languageInEffect, listBuiltinVariables, listVariables, localizeDigits, markLabelColor, nearIconNames, normalizeLanguageFamily, numberFormatError, numberLocale, numberingSystemExtension, numberingSystemOf, numeralScripts, parseIconReference, parseReference, plainLanguageTag, resolveChartData, resolveDesignRecords, resolveFontScheme, resolveIcon, resolveReference, resolveSlideVariables, resolveTableData, resolveVariables, shapesPending, suggestChartNumberFix, supportedNumberingSystems, tableCellDisplayValue, toExcelNumberFormat, unresolvedReference, unusedDatasets, variableDeclarations } from './chunk-CJVKOJ6B.js';
|
|
23
|
+
import './chunk-BLCDUM7B.js';
|
|
23
24
|
import './chunk-PRXZD2II.js';
|
|
24
25
|
|
|
25
26
|
// src/browser.ts
|