@openpresentation/opf 0.15.1 → 0.16.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 +4 -0
- package/dist/{catalog-refs-BSfGELpt.d.ts → catalog-refs-_anZs-Qz.d.ts} +1 -1
- package/dist/{catalog-schemas-CinPh5WA.d.ts → catalog-schemas-BZCjgAxu.d.ts} +1 -1
- package/dist/catalog.d.ts +2 -2
- package/dist/catalog.js +609 -121
- package/dist/{chunk-5FTUIDUH.js → chunk-3XDRQYWZ.js} +1 -1
- package/dist/{chunk-O744SXXA.js → chunk-5PDN7BN6.js} +202 -95
- package/dist/{chunk-VGAOJEY7.js → chunk-5TO6I3GB.js} +1 -1
- package/dist/{chunk-3RKB4RDJ.js → chunk-5UEUAW57.js} +4 -2
- package/dist/{chunk-ZPU46TFA.js → chunk-6OR326EA.js} +1 -1
- package/dist/{chunk-UBFJ2QHH.js → chunk-BSYQDWT4.js} +12 -2
- package/dist/{chunk-3JG4YXWF.js → chunk-FQSIIADJ.js} +12 -5
- package/dist/chunk-K4DQQIT4.js +319 -0
- package/dist/chunk-KINQFU6X.js +51 -0
- package/dist/{chunk-374R35TJ.js → chunk-NAWQR7MN.js} +1 -1
- package/dist/{chunk-QDI75P2M.js → chunk-PX5AWL7Y.js} +141 -13
- package/dist/{chunk-U4J75TRG.js → chunk-SMLMI6IZ.js} +5 -2
- package/dist/{chunk-TWQJLI6E.js → chunk-UM24JFUE.js} +2 -2
- package/dist/{chunk-2CJPC4HI.js → chunk-WEDGVC5W.js} +185 -11
- package/dist/{composition-D2tghM82.d.ts → composition-D4ADF5c-.d.ts} +88 -9
- package/dist/composition.d.ts +2 -2
- package/dist/composition.js +1 -1
- package/dist/convert.d.ts +3 -3
- package/dist/convert.js +7 -7
- package/dist/data.d.ts +27 -10
- package/dist/data.js +2 -2
- package/dist/deck.d.ts +77 -0
- package/dist/deck.js +12 -0
- package/dist/diff.js +5 -5
- package/dist/docs.js +24 -24
- package/dist/examples.d.ts +1 -1
- package/dist/examples.js +2992 -748
- package/dist/format.js +2 -2
- package/dist/index.d.ts +9 -8
- package/dist/index.js +15 -13
- package/dist/markdown.d.ts +6 -7
- package/dist/markdown.js +7 -7
- package/dist/{pagination-wedbe7eq.d.ts → pagination-DzZPFheM.d.ts} +2 -2
- package/dist/pagination.d.ts +3 -3
- package/dist/pagination.js +4 -4
- package/dist/patch.js +4 -4
- package/dist/{presentation-CDKQVkyI.d.ts → presentation-COrFuj2g.d.ts} +16 -8
- package/dist/repo-readme.js +1 -1
- package/dist/schemas.d.ts +14 -0
- package/dist/schemas.js +1 -1
- package/dist/spec/catalogs/layouts/business-model-canvas.json +66 -1
- package/dist/spec/catalogs/layouts/capability-map.json +53 -3
- package/dist/spec/catalogs/layouts/chart-2x.json +32 -8
- package/dist/spec/catalogs/layouts/chart-3x-bottom-vertical-title-left.json +16 -10
- package/dist/spec/catalogs/layouts/chart-3x-left-title-center.json +16 -10
- package/dist/spec/catalogs/layouts/chart-3x-left.json +16 -10
- package/dist/spec/catalogs/layouts/chart-3x-right-title-center.json +16 -10
- package/dist/spec/catalogs/layouts/chart-3x-right.json +16 -10
- package/dist/spec/catalogs/layouts/chart-3x-top-vertical-title-left.json +16 -10
- package/dist/spec/catalogs/layouts/chart-3x.json +48 -12
- package/dist/spec/catalogs/layouts/dashboard.json +37 -5
- package/dist/spec/catalogs/layouts/image-2x.json +32 -8
- package/dist/spec/catalogs/layouts/image-3x.json +48 -12
- package/dist/spec/catalogs/layouts/index.json +1 -1
- package/dist/spec/catalogs/layouts/kpi-scorecard.json +48 -3
- package/dist/spec/catalogs/layouts/logic-tree.json +69 -0
- package/dist/spec/catalogs/layouts/market-size.json +26 -2
- package/dist/spec/catalogs/layouts/org-chart.json +53 -6
- package/dist/spec/catalogs/manifest.json +3 -3
- package/dist/spec/schemas/layout.schema.json +172 -5
- package/dist/spec/schemas/opf.schema.json +11 -6
- package/dist/types.d.ts +9 -31
- package/dist/{validation-types-BOcY9GTs.d.ts → validation-types-HxIgJfKx.d.ts} +2 -2
- package/dist/validator.d.ts +6 -6
- package/dist/validator.js +3 -3
- package/dist/yaml.d.ts +4 -4
- package/dist/yaml.js +8 -321
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -75,6 +75,10 @@ The layout engine's names are not on the root. `composeSlide`, `fitText`, `layou
|
|
|
75
75
|
|
|
76
76
|
`@openpresentation/opf/markdown` reads and writes a deck as Markdown in a small documented dialect (YAML front matter, `---` between slides, `#` title, `##` subtitle, lists, quotes, tables, images, `chart`, `metric` and `timeline` fences, `Note:` speaker notes). `fromMarkdown(markdown, { split, defaults, validate })` returns `{ presentation, valid, findings, counts }` with findings (the shared `Finding` format) that carry the line and column of the Markdown; `toMarkdown(presentation, { unsupported })` writes any valid deck, embedding what the dialect has no syntax for as YAML (or dropping it into `report.loss`), and the Markdown it writes converts back to the same deck. Deterministic and offline. Reads front matter with the `yaml` package. See the [Markdown guide](../../docs/markdown.md). Not in releases before the one that lists it in the changelog.
|
|
77
77
|
|
|
78
|
+
### Reading and writing a deck in any form
|
|
79
|
+
|
|
80
|
+
`readDeck(text, { format, filename, catalogs, validate })` and `writeDeck(presentation, { format | filename })` (the root and `@openpresentation/opf/deck`) read and write a deck as JSON (canonical), YAML or Markdown. The format is the `format` option, else the file name (`.opf.md` is Markdown, `.yaml` and `.yml` are YAML, anything else JSON; a plain `.md` is not a deck), and never the content. `readDeck` returns `{ presentation, format, valid, findings, counts, schemaValid, checks }`: the `validate` report of the deck, with every finding located in the text that was read (`opf/json-syntax`, `yaml/<rule>` or `markdown/<rule>` for syntax errors) and no exception for malformed content. It runs in a browser.
|
|
81
|
+
|
|
78
82
|
### OPF as YAML
|
|
79
83
|
|
|
80
84
|
`@openpresentation/opf/yaml` reads and writes a deck as YAML, the authoring form of the same data (JSON stays canonical). `fromYaml(text, { aliases, validate })` reads strict JSON-compatible YAML 1.2 (one document, a mapping at the root, no custom tags, duplicate keys or non-finite numbers; anchors, aliases and merge keys only with `aliases: true`) and returns `{ presentation, valid, findings, counts, schemaValid, checks }`: the `validate` report of the deck, with every finding (the shared `Finding` format, YAML syntax errors as `yaml/<rule>` findings) located at the line and column of the YAML. `toYaml(presentation, { schemaComment })` writes canonical YAML (schema key order, block style, ambiguous strings quoted) that reads back to the same deck, and throws `OPFYamlError` for an invalid one. `parseYamlData` and `scanYamlComments` are the helpers. See [the YAML guide](../../docs/yaml.md).
|
|
@@ -125,4 +125,4 @@ declare function catalogReferenceSites(document: unknown, options?: {
|
|
|
125
125
|
/** Records a picker can offer for `kind`: the document's embedded records, then those of the registered catalogs its groups name, with the reference to write for each. */
|
|
126
126
|
declare function catalogRecords(document: unknown, kind: CatalogKind, options?: CatalogOptions): ResolvedReference[];
|
|
127
127
|
|
|
128
|
-
export { type
|
|
128
|
+
export { type Catalog as C, OPFCatalogsOptionError as O, type RecordProvenance as R, type UnresolvedReferenceDiagnostic as U, type CatalogKind as a, type CatalogOptions as b, CATALOG_GROUP_PATTERN as c, CATALOG_REFERENCE_PATTERN as d, type CatalogRecordMap as e, type CatalogRecords as f, type CatalogReferenceSite as g, OPFUnresolvedReferenceError as h, type ResolvedReference as i, catalogGroupSource as j, catalogKinds as k, catalogRecords as l, catalogReferenceSites as m, parseReference as p, resolveReference as r, unresolvedReference as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as CatalogKind } from './catalog-refs-_anZs-Qz.js';
|
|
2
2
|
import { SchemaName } from './schemas.js';
|
|
3
3
|
|
|
4
4
|
/** Kinds of catalog display metadata: published by catalogs for pickers, never referenced by documents. */
|
package/dist/catalog.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as CatalogDisplayKind } from './catalog-schemas-
|
|
1
|
+
import { C as Catalog } from './catalog-refs-_anZs-Qz.js';
|
|
2
|
+
import { C as CatalogDisplayKind } from './catalog-schemas-BZCjgAxu.js';
|
|
3
3
|
import './schemas.js';
|
|
4
4
|
import './json-BFSdESOE.js';
|
|
5
5
|
|