@openpresentation/opf 0.15.1 → 0.17.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 +19 -1
- package/dist/{catalog-refs-BSfGELpt.d.ts → catalog-refs-C4K4y-vh.d.ts} +1 -1
- package/dist/{catalog-schemas-CinPh5WA.d.ts → catalog-schemas-g7RFQBdc.d.ts} +1 -1
- package/dist/catalog.d.ts +2 -2
- package/dist/catalog.js +3 -23224
- package/dist/{chart-data-BnNqgnC-.d.ts → chart-data-DTxdRRT1.d.ts} +1 -1
- package/dist/{chunk-3JG4YXWF.js → chunk-BIC3SWPK.js} +12 -5
- package/dist/{chunk-O744SXXA.js → chunk-CW7GEAV3.js} +350 -141
- package/dist/{chunk-374R35TJ.js → chunk-ESRYBYLY.js} +1 -1
- package/dist/chunk-IPW5BS3X.js +973 -0
- package/dist/{chunk-3RKB4RDJ.js → chunk-IS5H5JKH.js} +4 -2
- package/dist/{chunk-TWQJLI6E.js → chunk-M4UR3NPN.js} +2 -2
- package/dist/chunk-N4EVOFEA.js +58 -0
- package/dist/{chunk-QDI75P2M.js → chunk-NLNYNBTS.js} +217 -20
- package/dist/{chunk-U4J75TRG.js → chunk-O263APNI.js} +5 -2
- package/dist/{chunk-UBFJ2QHH.js → chunk-O2CX5NEH.js} +36 -14
- package/dist/{chunk-5FTUIDUH.js → chunk-O3CVNJTL.js} +1 -1
- package/dist/{chunk-VGAOJEY7.js → chunk-PPROJP2E.js} +1 -1
- package/dist/{chunk-2CJPC4HI.js → chunk-RA64UQKI.js} +203 -53
- package/dist/chunk-TCD2FB2K.js +319 -0
- package/dist/chunk-WCG3THTD.js +23712 -0
- package/dist/chunk-WWYWFVOI.js +793 -0
- package/dist/{chunk-ZPU46TFA.js → chunk-YT7FMQER.js} +1 -1
- package/dist/{composition-D2tghM82.d.ts → composition-BbZ_9C-c.d.ts} +238 -139
- package/dist/composition.d.ts +3 -3
- package/dist/composition.js +1 -1
- package/dist/conversion-SBpTOwdg.d.ts +444 -0
- package/dist/convert.d.ts +4 -4
- package/dist/convert.js +7 -7
- package/dist/data.d.ts +28 -11
- package/dist/data.js +2 -2
- package/dist/deck-report-Bx3naFlF.d.ts +40 -0
- package/dist/deck.d.ts +47 -0
- package/dist/deck.js +12 -0
- package/dist/diff.d.ts +1 -1
- package/dist/diff.js +5 -5
- package/dist/docs.js +33 -27
- package/dist/examples.d.ts +1 -1
- package/dist/examples.js +3229 -985
- package/dist/{finding-CT_f_vbD.d.ts → finding-CDQ_wH8j.d.ts} +1 -1
- package/dist/format.js +2 -2
- package/dist/index.d.ts +43 -12
- package/dist/index.js +15 -805
- package/dist/markdown.d.ts +7 -8
- package/dist/markdown.js +7 -7
- package/dist/node-engine.d.ts +94 -0
- package/dist/node-engine.js +21 -0
- package/dist/node.d.ts +60 -0
- package/dist/node.js +54 -0
- package/dist/{pagination-wedbe7eq.d.ts → pagination-BhX4M48Y.d.ts} +21 -7
- package/dist/pagination.d.ts +4 -4
- package/dist/pagination.js +4 -4
- package/dist/patch.d.ts +1 -1
- package/dist/patch.js +4 -4
- package/dist/{presentation-CDKQVkyI.d.ts → presentation-fb8CZmRq.d.ts} +28 -83
- 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 +27 -43
- package/dist/types.d.ts +10 -32
- package/dist/{validation-types-BOcY9GTs.d.ts → validation-types-iZbXfES6.d.ts} +19 -8
- package/dist/validator.d.ts +8 -8
- package/dist/validator.js +3 -3
- package/dist/yaml.d.ts +6 -6
- package/dist/yaml.js +8 -321
- package/package.json +38 -1
|
@@ -185,4 +185,4 @@ declare function resolveTableData(table: unknown, document?: unknown, options?:
|
|
|
185
185
|
/** Display value of a table cell: a number with a format (cell, else column) becomes formatted text; anything else is returned unchanged. */
|
|
186
186
|
declare function tableCellDisplayValue(cell: DataTableCell, columnFormat?: string): DataTableCell;
|
|
187
187
|
|
|
188
|
-
export {
|
|
188
|
+
export { numberFormatError as A, resolveChartData as B, type ChartComboSeries as C, type DataCellValue as D, resolveTableData as E, suggestChartNumberFix as F, tableCellDisplayValue as G, toExcelNumberFormat as H, unusedDatasets as I, type ResolvedChartData as R, type ChartMapping as a, type ChartNumberFix as b, type ChartNumberFixOperation as c, type ChartNumberFixOptions as d, type DataColumn as e, type DataDiagnostic as f, type DataDiagnosticCode as g, type DataResolveOptions as h, type DataSourceRef as i, type DataStyledCell as j, type DataTableCell as k, type DataTableHeader as l, type DataTableValue as m, type DataTextRun as n, type Dataset as o, type DatasetRef as p, type ResolvedTableData as q, chartNumber as r, datasetDiagnostics as s, formatDataNumber as t, fromExcelNumberFormat as u, inlineChartData as v, inlineDatasets as w, inlineTableData as x, isDatasetRef as y, isXYChartType as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ctx, splitLines, lineRange, readYamlMapping, OPFMarkdownError, writeYaml, readCsv, DECIMAL, csvField, scalarText } from './chunk-
|
|
2
|
-
import { parseQuoteLines, levelsFromIndents, parseCodeFence, splitWhen, fenceCode } from './chunk-
|
|
3
|
-
import { same, isRecord, runText, isPlainRun, FORMATTING } from './chunk-
|
|
4
|
-
import { validate } from './chunk-
|
|
1
|
+
import { Ctx, splitLines, lineRange, readYamlMapping, NOT_CHECKED, OPFMarkdownError, writeYaml, readCsv, DECIMAL, csvField, scalarText } from './chunk-IS5H5JKH.js';
|
|
2
|
+
import { parseQuoteLines, levelsFromIndents, parseCodeFence, splitWhen, fenceCode } from './chunk-ESRYBYLY.js';
|
|
3
|
+
import { same, isRecord, runText, isPlainRun, FORMATTING } from './chunk-PPROJP2E.js';
|
|
4
|
+
import { validate } from './chunk-NLNYNBTS.js';
|
|
5
5
|
import { checkCatalogsOption } from './chunk-SPFV27O5.js';
|
|
6
6
|
|
|
7
7
|
// src/markdown/canon.ts
|
|
@@ -1757,6 +1757,7 @@ function fromMarkdown(markdown, options = {}) {
|
|
|
1757
1757
|
let lines = splitLines(source);
|
|
1758
1758
|
if (lines[0]?.text.startsWith("\uFEFF")) lines = [{ ...lines[0], text: lines[0].text.slice(1), start: lines[0].start + 1 }, ...lines.slice(1)];
|
|
1759
1759
|
const front = {};
|
|
1760
|
+
let report = { schemaValid: null, checks: NOT_CHECKED };
|
|
1760
1761
|
let body = lines;
|
|
1761
1762
|
const matter = frontMatter(lines);
|
|
1762
1763
|
if (matter === "unterminated") {
|
|
@@ -1792,6 +1793,12 @@ function fromMarkdown(markdown, options = {}) {
|
|
|
1792
1793
|
if (!slides.length) ctx.error("no-slides", "The Markdown has no slides.", "Write at least one slide: a # title or any content, with --- between slides.", { start: 0, end: Math.min(1, source.length) }, "/slides");
|
|
1793
1794
|
else if (options.validate !== false) {
|
|
1794
1795
|
const checked = validate(document, options.validate === true || options.validate === void 0 ? { only: ["format", "references"], ...options.catalogs ? { catalogs: options.catalogs } : {} } : options.validate);
|
|
1796
|
+
report = {
|
|
1797
|
+
schemaValid: checked.schemaValid,
|
|
1798
|
+
checks: { ...checked.checks, syntax: "checked" },
|
|
1799
|
+
...checked.template === void 0 ? {} : { template: checked.template },
|
|
1800
|
+
...checked.unfilledVariables === void 0 ? {} : { unfilledVariables: checked.unfilledVariables }
|
|
1801
|
+
};
|
|
1795
1802
|
for (const found of checked.findings) {
|
|
1796
1803
|
const range = ctx.rangeOf(found.path) ?? ctx.rangeOf("") ?? { start: 0, end: 0 };
|
|
1797
1804
|
ctx.findings.push({ ...found, location: ctx.location(range) });
|
|
@@ -1800,7 +1807,7 @@ function fromMarkdown(markdown, options = {}) {
|
|
|
1800
1807
|
const findings = [...ctx.findings].sort((a, b) => a.location.offset - b.location.offset);
|
|
1801
1808
|
const counts = { error: 0, warning: 0, info: 0 };
|
|
1802
1809
|
for (const entry of findings) counts[entry.severity]++;
|
|
1803
|
-
return { presentation: document, valid: counts.error === 0, findings, counts };
|
|
1810
|
+
return { presentation: document, valid: counts.error === 0, findings, counts, ...report };
|
|
1804
1811
|
}
|
|
1805
1812
|
function toMarkdown(document, options = {}) {
|
|
1806
1813
|
const checked = validate(document, { only: ["format"] });
|