@openpresentation/opf 0.11.3 → 0.12.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 +16 -0
- package/dist/audit.d.ts +156 -0
- package/dist/audit.js +7 -0
- package/dist/{catalogs-CUClB3nl.d.ts → catalogs-u6TEeMcz.d.ts} +1 -1
- package/dist/catalogs.d.ts +2 -2
- package/dist/catalogs.js +2 -1
- package/dist/{chunk-UDPSGTZI.js → chunk-32DIB5BN.js} +12 -9
- package/dist/chunk-4FWCY4ZV.js +198 -0
- package/dist/chunk-6TSDIPSH.js +3624 -0
- package/dist/chunk-FYLJVF7X.js +18448 -0
- package/dist/{chunk-HJL64ETN.js → chunk-GJKJL4YY.js} +14 -0
- package/dist/chunk-JENJZR3F.js +1690 -0
- package/dist/{chunk-57NWIYX3.js → chunk-JVTN3HPP.js} +18 -4
- package/dist/{chunk-JTXCMVVP.js → chunk-RVN5C2FX.js} +754 -39
- package/dist/chunk-S5W34SIJ.js +1 -0
- package/dist/chunk-S667QI3M.js +261 -0
- package/dist/chunk-UQKJWHSS.js +1332 -0
- package/dist/{chunk-RXNFDGPC.js → chunk-WXSPETQ6.js} +311 -40
- package/dist/composition-DWbCiMwF.d.ts +1523 -0
- package/dist/composition.d.ts +1 -1
- package/dist/composition.js +2 -1
- package/dist/convert.d.ts +261 -0
- package/dist/convert.js +1107 -0
- package/dist/diff.d.ts +145 -0
- package/dist/diff.js +604 -0
- package/dist/docs.js +69 -15
- package/dist/examples.d.ts +1 -1
- package/dist/font-policy.d.ts +15 -0
- package/dist/font-policy.js +1 -1
- package/dist/format.d.ts +20 -0
- package/dist/format.js +83 -0
- package/dist/index.d.ts +173 -24
- package/dist/index.js +926 -262
- package/dist/lint.d.ts +4 -4
- package/dist/lint.js +6 -5
- package/dist/markdown.d.ts +74 -0
- package/dist/markdown.js +1941 -0
- package/dist/pagination.d.ts +1 -1
- package/dist/pagination.js +6 -5
- package/dist/patch.d.ts +99 -0
- package/dist/patch.js +6 -0
- package/dist/{presentation-Cn6vTOCP.d.ts → presentation-DRx4hpNZ.d.ts} +479 -32
- package/dist/repo-readme.js +1 -1
- package/dist/{schemas-X_NniU4A.d.ts → schemas-BSjlG8-R.d.ts} +28 -0
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +1 -1
- package/dist/spec/reference/font-policy.json +311 -40
- package/dist/spec/reference/font-policy.schema.json +40 -0
- package/dist/spec/reference/symbol-font-encodings.json +18354 -0
- package/dist/spec/reference/symbol-font-encodings.schema.json +156 -0
- package/dist/spec/schemas/opf.schema.json +608 -35
- package/dist/spec-files.d.ts +1 -1
- package/dist/spec-files.js +1 -1
- package/dist/symbol-font-encodings.d.ts +128 -0
- package/dist/symbol-font-encodings.js +1 -0
- package/dist/types.d.ts +4 -4
- package/dist/validator-bu396ffT.d.ts +172 -0
- package/dist/validator.d.ts +4 -36
- package/dist/validator.js +5 -4
- package/package.json +31 -2
- package/dist/chunk-BVLWFMDX.js +0 -1812
- package/dist/chunk-JCXHSTSM.js +0 -1366
- package/dist/composition-DzLwY-Mi.d.ts +0 -887
- /package/dist/{chunk-AEUSVEUY.js → chunk-3ZGSWEHK.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { validatePresentation, validationDefinition, validateCatalogRecord } from './chunk-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { validatePresentation, unusedReferenceWarnings, validationDefinition, validateCatalogRecord } from './chunk-UQKJWHSS.js';
|
|
2
|
+
import { catalogKinds, catalogEntries, catalogSchemaNames } from './chunk-3ZGSWEHK.js';
|
|
3
|
+
import { schemas, schemaEntries } from './chunk-RVN5C2FX.js';
|
|
4
4
|
import { parseTree, printParseErrorCode, getNodePath } from 'jsonc-parser';
|
|
5
5
|
|
|
6
6
|
var own = (value, key) => Object.hasOwn(value, key);
|
|
@@ -367,7 +367,9 @@ function distance(a, b) {
|
|
|
367
367
|
}
|
|
368
368
|
function lintPresentation(document, options = {}) {
|
|
369
369
|
optionsChecked(options);
|
|
370
|
-
const validation = validatePresentation(document), diagnostics = validation.errors.map(
|
|
370
|
+
const validation = validatePresentation(document), diagnostics = validation.errors.map(
|
|
371
|
+
(issue) => typeof issue.params.code === "string" && issue.keyword === "opf" ? { ...schemaDiagnostic(issue), ruleId: `opf/${issue.params.code}` } : schemaDiagnostic(issue)
|
|
372
|
+
);
|
|
371
373
|
const catalogs = catalogContext(document, options, diagnostics), seen = /* @__PURE__ */ new Set();
|
|
372
374
|
const assetValues = object(document) && object(document.assets) ? document.assets : {};
|
|
373
375
|
for (const field of fields(document)) {
|
|
@@ -515,6 +517,18 @@ function lintPresentation(document, options = {}) {
|
|
|
515
517
|
}
|
|
516
518
|
}
|
|
517
519
|
}
|
|
520
|
+
for (const issue of unusedReferenceWarnings(document))
|
|
521
|
+
diagnostics.push({
|
|
522
|
+
ruleId: "opf/unused-reference",
|
|
523
|
+
severity: "warning",
|
|
524
|
+
scope: "document",
|
|
525
|
+
path: issue.path,
|
|
526
|
+
message: issue.message,
|
|
527
|
+
help: "Cite the reference from a text, bullet or list item run ({ text, cite: id }) so it is listed in that slide's footnote area, or remove the entry. Nothing is drawn for an uncited reference.",
|
|
528
|
+
definition: schemas.presentation.$id + "#/$defs/Reference",
|
|
529
|
+
lookup: ["opf", "schema", "presentation", "/$defs/Reference"],
|
|
530
|
+
validation: issue
|
|
531
|
+
});
|
|
518
532
|
return report(diagnostics, validation.valid, "not-applicable");
|
|
519
533
|
}
|
|
520
534
|
function lintSource(source, options = {}) {
|