@openpresentation/opf 0.36.0 → 0.37.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/THIRD-PARTY-NOTICES.md +99 -0
- package/dist/browser.js +19 -19
- package/dist/{catalog-refs-BgotJhR5.d.ts → catalog-refs-BeRgtpZS.d.ts} +4 -4
- package/dist/{catalog-schemas-BX-VEc5Q.d.ts → catalog-schemas-CwY-3cCP.d.ts} +1 -1
- package/dist/{chunk-6WVPFWPD.js → chunk-434E2RWO.js} +4 -4
- package/dist/{chunk-OFL3WY6F.js → chunk-63Y75CCK.js} +77 -15
- package/dist/{chunk-O65COLKF.js → chunk-BPILTZUJ.js} +118 -19
- package/dist/{chunk-4FA4AZXY.js → chunk-DDD4WUEH.js} +2375 -825
- package/dist/{chunk-MS2LPR7F.js → chunk-DMV3G65U.js} +1 -1
- package/dist/{chunk-AZELWKG2.js → chunk-EHYAVRL3.js} +5 -4
- package/dist/{chunk-7JE3XTL7.js → chunk-HBO64RWP.js} +4 -4
- package/dist/{chunk-J7FUSZZ5.js → chunk-HOK3DZA6.js} +6 -6
- package/dist/chunk-I4NQP7Z4.js +1 -0
- package/dist/{chunk-2NIID3QD.js → chunk-ITGR2RW2.js} +6 -6
- package/dist/chunk-IW4TXMJY.js +646 -0
- package/dist/{chunk-SER6GJTT.js → chunk-KB7TPZQI.js} +23 -6
- package/dist/{chunk-VDZXNNZF.js → chunk-M4IPCFDV.js} +1 -1
- package/dist/{chunk-F5SY7MSA.js → chunk-MNJ4JV7I.js} +1 -1
- package/dist/{chunk-XRMYP4JD.js → chunk-ORVMHVOS.js} +86 -2
- package/dist/{chunk-BPSZ7OWD.js → chunk-PDBZN7EJ.js} +26 -21
- package/dist/{chunk-3KPTVK77.js → chunk-Q2L5ERNK.js} +1248 -120
- package/dist/{chunk-HHQROUYC.js → chunk-QFT4R2IL.js} +4405 -2808
- package/dist/chunk-QQBOI5XI.js +86 -0
- package/dist/{chunk-TJMESSBQ.js → chunk-SIF5JDZC.js} +109 -9
- package/dist/{chunk-GNKOQ6NA.js → chunk-XY332BQP.js} +4 -4
- package/dist/{chunk-APCNAAA7.js → chunk-ZB427MLO.js} +2 -2
- package/dist/{composition-CSM7YfBl.d.ts → composition-DiKC371V.d.ts} +707 -134
- package/dist/composition.d.ts +3 -3
- package/dist/composition.js +1 -1
- package/dist/{conversion-CL7ipVGO.d.ts → conversion-DBkC9Y2e.d.ts} +6 -6
- package/dist/conversion-P56LOOE2.js +25 -0
- package/dist/convert.d.ts +5 -5
- package/dist/convert.js +63 -23
- package/dist/data.d.ts +41 -3
- package/dist/data.js +2 -2
- package/dist/{deck-report-DhsB0SUz.d.ts → deck-report-BwgsIRAf.d.ts} +3 -3
- package/dist/deck.d.ts +6 -6
- package/dist/deck.js +11 -11
- package/dist/diff.js +4 -4
- package/dist/docs.js +43 -31
- package/dist/examples.js +2338 -392
- package/dist/font-policy.js +1 -1
- package/dist/format.js +2 -2
- package/dist/ids.d.ts +17 -4
- package/dist/ids.js +4 -4
- package/dist/index.d.ts +140 -23
- package/dist/index.js +22 -22
- package/dist/markdown.d.ts +2 -2
- package/dist/markdown.js +8 -8
- package/dist/metric-data-B4Q8RFRR.d.ts +382 -0
- package/dist/node-engine.d.ts +6 -6
- package/dist/node-engine.js +21 -21
- package/dist/{pagination-BSqq32xt.d.ts → pagination-C9qnH_n-.d.ts} +5 -5
- package/dist/pagination.d.ts +4 -4
- package/dist/pagination.js +4 -4
- package/dist/patch.js +3 -3
- package/dist/precompiled.js +2 -2
- package/dist/{presentation-Dx-kZC8Y.d.ts → presentation-DmOhusrX.d.ts} +541 -110
- package/dist/schema-engine-ajv.js +1 -1
- package/dist/schema-engine-precompiled.js +2 -2
- package/dist/schema.d.ts +2 -2
- package/dist/schema.js +3 -3
- package/dist/schemas.d.ts +46 -2
- 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-N74FCHGY.js → shape-engine-module-YU2XGIQN.js} +2 -2
- package/dist/shape-geometry.js +1 -1
- package/dist/source.js +10 -11
- package/dist/spec/reference/engine-defaults.json +1 -1
- package/dist/spec/reference/engine-vocabularies.json +1 -0
- package/dist/spec/schemas/font-scheme.schema.json +9 -7
- package/dist/spec/schemas/layout.schema.json +5 -4
- package/dist/spec/schemas/narrative.schema.json +1 -0
- package/dist/spec/schemas/opf.schema.json +661 -98
- package/dist/types.d.ts +16 -12
- package/dist/{validation-types-bnrso0JL.d.ts → validation-types-CV-ngACL.d.ts} +49 -6
- package/dist/validator.d.ts +5 -5
- package/dist/validator.js +3 -3
- package/dist/yaml.d.ts +2 -2
- package/dist/yaml.js +7 -7
- package/package.json +7 -6
- package/dist/chart-data-B_k-WTex.d.ts +0 -194
- package/dist/chunk-6VGLE7C5.js +0 -3983
- package/dist/chunk-SEC4IOOS.js +0 -1
- package/dist/chunk-WCPDN7AY.js +0 -642
- package/dist/conversion-FTGQLJK7.js +0 -25
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { validate } from './chunk-
|
|
1
|
+
import { validate } from './chunk-DDD4WUEH.js';
|
|
2
2
|
|
|
3
3
|
// src/convert/shared.ts
|
|
4
|
-
var CONTENT_KEYS = ["text", "items", "bullets", "image", "video", "chart", "table", "code", "metric", "quote", "timeline", "diagram"];
|
|
4
|
+
var CONTENT_KEYS = ["text", "items", "bullets", "image", "video", "embed", "chart", "table", "code", "metric", "quote", "timeline", "diagram"];
|
|
5
5
|
var SLIDE_ONLY_KEYS = ["title", "subtitle", "tag", "layout", "design", "notes", "section", "hidden", "beat"];
|
|
6
6
|
var OPFConversionError = class extends Error {
|
|
7
7
|
code;
|
|
@@ -38,9 +38,10 @@ var contentKeysOf = (payload) => CONTENT_KEYS.filter((key) => payload[key] !== v
|
|
|
38
38
|
function assertValidOutput(value, as = "block", context = {}) {
|
|
39
39
|
const slides = as === "slides" ? value : as === "slide" ? [value] : [{ blocks: [value] }];
|
|
40
40
|
const datasets = isRecord(context.datasets) ? context.datasets : void 0;
|
|
41
|
+
const datasources = isRecord(context.datasources) ? context.datasources : void 0;
|
|
41
42
|
const referencesProvided = own(context, "references");
|
|
42
|
-
const report2 = validate({ ...datasets ? { datasets } : {}, ...referencesProvided ? { references: context.references } : {}, slides }, { only: ["format"] });
|
|
43
|
-
const errors = report2.findings.filter((entry) => entry.severity === "error").filter((entry) => (datasets || entry.ruleId !== "opf/dataset-unknown" && entry.ruleId !== "opf/dataset-field-unknown") && (referencesProvided || entry.ruleId !== "opf/cite-unknown-reference"));
|
|
43
|
+
const report2 = validate({ ...datasets ? { datasets } : {}, ...datasources ? { datasources } : {}, ...referencesProvided ? { references: context.references } : {}, slides }, { only: ["format"], slideLinks: false });
|
|
44
|
+
const errors = report2.findings.filter((entry) => entry.severity === "error").filter((entry) => (datasets || entry.ruleId !== "opf/dataset-unknown" && entry.ruleId !== "opf/dataset-field-unknown") && (datasources || entry.ruleId !== "opf/datasource-unknown") && (referencesProvided || entry.ruleId !== "opf/cite-unknown-reference"));
|
|
44
45
|
if (errors.length) {
|
|
45
46
|
const first = errors[0];
|
|
46
47
|
throw new OPFConversionError("invalid-output", `The converted content is not valid OPF: ${first?.message ?? "unknown error"}${first?.path ? ` (${first.path})` : ""}.`, { issues: errors });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { parseQuoteLines, levelsFromIndents, parseCodeFence, splitWhen } from './chunk-
|
|
2
|
-
import { Ctx, splitLines, lineRange, readYamlMapping, readCsv, DECIMAL } from './chunk-
|
|
3
|
-
import { runText, isRecord, FORMATTING } from './chunk-
|
|
4
|
-
import { METRIC_KEYS, nearest, BLOCK_AS_VALUES, SLIDE_OPTION_KEYS, BLOCK_OPTION_KEYS } from './chunk-
|
|
1
|
+
import { parseQuoteLines, levelsFromIndents, parseCodeFence, splitWhen } from './chunk-MNJ4JV7I.js';
|
|
2
|
+
import { Ctx, splitLines, lineRange, readYamlMapping, readCsv, DECIMAL } from './chunk-ZB427MLO.js';
|
|
3
|
+
import { runText, isRecord, FORMATTING } from './chunk-EHYAVRL3.js';
|
|
4
|
+
import { METRIC_KEYS, nearest, BLOCK_AS_VALUES, SLIDE_OPTION_KEYS, BLOCK_OPTION_KEYS } from './chunk-DDD4WUEH.js';
|
|
5
5
|
|
|
6
6
|
// src/markdown/inline.ts
|
|
7
7
|
var PUNCT = /[\p{P}\p{S}]/u;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { sortPresentationKeys } from './chunk-
|
|
1
|
+
import { sortPresentationKeys } from './chunk-DMV3G65U.js';
|
|
2
2
|
import { NOT_CHECKED } from './chunk-RYZPBJLB.js';
|
|
3
|
-
import { Ctx, describeYamlErrors } from './chunk-
|
|
4
|
-
import { same } from './chunk-
|
|
5
|
-
import { validate } from './chunk-
|
|
6
|
-
import { presentation } from './chunk-
|
|
7
|
-
import { checkCatalogsOption } from './chunk-
|
|
3
|
+
import { Ctx, describeYamlErrors } from './chunk-ZB427MLO.js';
|
|
4
|
+
import { same } from './chunk-EHYAVRL3.js';
|
|
5
|
+
import { validate } from './chunk-DDD4WUEH.js';
|
|
6
|
+
import { presentation } from './chunk-Q2L5ERNK.js';
|
|
7
|
+
import { checkCatalogsOption } from './chunk-QFT4R2IL.js';
|
|
8
8
|
import { Parser, parseDocument, isMap, isSeq, Document, visit, isScalar, isAlias } from 'yaml';
|
|
9
9
|
|
|
10
10
|
var MAX_ALIAS_COUNT = 100;
|