@openpresentation/opf 0.34.0 → 0.34.2

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.
Files changed (83) hide show
  1. package/dist/browser.js +18 -18
  2. package/dist/{catalog-refs-CoIrOdAw.d.ts → catalog-refs-wtuudZTe.d.ts} +12 -3
  3. package/dist/{catalog-schemas-FjLRPtjB.d.ts → catalog-schemas-CSxuFtsu.d.ts} +1 -1
  4. package/dist/{chunk-HHVQ2SDT.js → chunk-6MSH3KCZ.js} +1 -1
  5. package/dist/{chunk-QGJVOPLG.js → chunk-AQ3WR3H7.js} +2 -2
  6. package/dist/{chunk-2HX4BGAS.js → chunk-EQCZ2SFD.js} +6 -6
  7. package/dist/chunk-HSXWDXKM.js +1 -0
  8. package/dist/{chunk-RUV7CCE6.js → chunk-HX4HEJB4.js} +201 -21
  9. package/dist/{chunk-QGTJF7HV.js → chunk-IDYYLJCQ.js} +6 -6
  10. package/dist/{chunk-CJVKOJ6B.js → chunk-IGT4523S.js} +406 -58
  11. package/dist/{chunk-U7TYSPYM.js → chunk-KJFCHCWV.js} +2 -2
  12. package/dist/{chunk-WMFT5R7I.js → chunk-MDAXXFAY.js} +2 -2
  13. package/dist/{chunk-HUGVYHZ2.js → chunk-NMZCPZ3R.js} +3 -3
  14. package/dist/{chunk-F6BXO4AI.js → chunk-P2X4BBW2.js} +1 -1
  15. package/dist/{chunk-3THGTDL2.js → chunk-PHOSM2RA.js} +1 -1
  16. package/dist/{chunk-FIQMAIZV.js → chunk-RM4Z7ZSW.js} +4 -4
  17. package/dist/{chunk-244OPLAV.js → chunk-UKI43JE6.js} +1 -1
  18. package/dist/{chunk-DQ7QYOUV.js → chunk-V4G3BYPY.js} +2 -2
  19. package/dist/{chunk-LCT5ZV3Q.js → chunk-VI7VWDTN.js} +17 -1
  20. package/dist/{chunk-36DLVJGW.js → chunk-VVPPMHP6.js} +5 -5
  21. package/dist/{chunk-FAXO3SUE.js → chunk-WBPXRUZT.js} +463 -271
  22. package/dist/{chunk-42JBXJKW.js → chunk-XLXCXEVF.js} +2 -2
  23. package/dist/{composition-CvtvgBDE.d.ts → composition-DF07Ha4R.d.ts} +154 -135
  24. package/dist/composition.d.ts +2 -2
  25. package/dist/composition.js +1 -1
  26. package/dist/{conversion-B_5AKTYQ.d.ts → conversion-52ki0lfZ.d.ts} +9 -7
  27. package/dist/conversion-F3HSCFOV.js +25 -0
  28. package/dist/convert.d.ts +2 -2
  29. package/dist/convert.js +7 -7
  30. package/dist/data.d.ts +1 -1
  31. package/dist/data.js +2 -2
  32. package/dist/{deck-report-BVlQZ42f.d.ts → deck-report-C3EsoHC3.d.ts} +3 -3
  33. package/dist/deck.d.ts +5 -5
  34. package/dist/deck.js +11 -11
  35. package/dist/diff.js +4 -4
  36. package/dist/docs.js +18 -18
  37. package/dist/example-files/technical/assets/alice.png +0 -0
  38. package/dist/example-files/technical/assets/context-photo.png +0 -0
  39. package/dist/example-files/technical/assets/cover-image.png +0 -0
  40. package/dist/example-files/technical/assets/cover.png +0 -0
  41. package/dist/example-files/technical/assets/diagram.svg +1 -0
  42. package/dist/example-files/technical/assets/icon.svg +1 -0
  43. package/dist/example-files/technical/assets/logo-dark.svg +1 -0
  44. package/dist/example-files/technical/assets/logo-light.svg +1 -0
  45. package/dist/example-files/technical/assets/logo.svg +1 -0
  46. package/dist/example-files/technical/assets/primary-logo.svg +1 -0
  47. package/dist/example-files/technical/assets/product-shot.png +0 -0
  48. package/dist/example-files/technical/assets/watermark.png +0 -0
  49. package/dist/example-files/technical/assets/wordmark.svg +1 -0
  50. package/dist/examples.js +49 -1
  51. package/dist/format.js +2 -2
  52. package/dist/ids.js +4 -4
  53. package/dist/index.d.ts +12 -12
  54. package/dist/index.js +21 -21
  55. package/dist/markdown.d.ts +1 -1
  56. package/dist/markdown.js +8 -8
  57. package/dist/node-engine.d.ts +21 -7
  58. package/dist/node-engine.js +37 -21
  59. package/dist/{pagination-CZQQYk7L.d.ts → pagination-Do7vNgU-.d.ts} +2 -2
  60. package/dist/pagination.d.ts +3 -3
  61. package/dist/pagination.js +4 -4
  62. package/dist/patch.js +3 -3
  63. package/dist/precompiled.js +2 -2
  64. package/dist/{presentation-s9262acV.d.ts → presentation-ANs2WkaS.d.ts} +8 -0
  65. package/dist/schema-engine-ajv.js +1 -1
  66. package/dist/schema-engine-precompiled.js +2 -2
  67. package/dist/schema.d.ts +2 -2
  68. package/dist/schema.js +3 -3
  69. package/dist/schemas.js +1 -1
  70. package/dist/source.d.ts +5 -0
  71. package/dist/source.js +10 -10
  72. package/dist/spec/schemas/icon-set.schema.json +5 -0
  73. package/dist/spec/schemas/opf.schema.json +9 -1
  74. package/dist/symbol-font-encodings.js +12695 -12736
  75. package/dist/types.d.ts +2 -2
  76. package/dist/{validation-types-CYbsUuZ9.d.ts → validation-types-BNS41nzb.d.ts} +2 -2
  77. package/dist/validator.d.ts +4 -4
  78. package/dist/validator.js +3 -3
  79. package/dist/yaml.d.ts +1 -1
  80. package/dist/yaml.js +7 -7
  81. package/package.json +7 -7
  82. package/dist/chunk-UJZN2ZH6.js +0 -1
  83. package/dist/conversion-CMBGOTAC.js +0 -25
package/dist/browser.js CHANGED
@@ -1,25 +1,25 @@
1
- import { OPFApiError } from './chunk-HUGVYHZ2.js';
2
- export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, stats, updateFromCatalog } from './chunk-HUGVYHZ2.js';
1
+ import { OPFApiError } from './chunk-NMZCPZ3R.js';
2
+ export { OPFApiError, OPFExportError, OPFImportError, OPFMoveToCustomError, copySlides, edit, embed, fill, fillRecords, localAssetSources, moveToCustom, parseSlideSelection, sameRecord, stats, updateFromCatalog } from './chunk-NMZCPZ3R.js';
3
3
  export { specFileEntries, specFileKinds, specFilePaths } from './chunk-W4DYDRV2.js';
4
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-42JBXJKW.js';
7
- export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-FIQMAIZV.js';
8
- export { fromMarkdown, toMarkdown } from './chunk-QGTJF7HV.js';
9
- import './chunk-2HX4BGAS.js';
10
- export { OPFFormatError, format } from './chunk-HHVQ2SDT.js';
5
+ export { OPFDataImportError, ingest, parseTabularData } from './chunk-UKI43JE6.js';
6
+ export { OPFPaginationError, blockUnits, continuationPages, continueOverfull, paginate, paginateSlide } from './chunk-XLXCXEVF.js';
7
+ export { DECK_FORMATS, deckFormatOf, parse, stringify } from './chunk-RM4Z7ZSW.js';
8
+ export { fromMarkdown, toMarkdown } from './chunk-IDYYLJCQ.js';
9
+ import './chunk-EQCZ2SFD.js';
10
+ export { OPFFormatError, format } from './chunk-6MSH3KCZ.js';
11
11
  import './chunk-RYZPBJLB.js';
12
- export { explain } from './chunk-DQ7QYOUV.js';
13
- import './chunk-36DLVJGW.js';
14
- import './chunk-F6BXO4AI.js';
15
- export { OPFMarkdownError } from './chunk-WMFT5R7I.js';
16
- import './chunk-3THGTDL2.js';
17
- export { OPFIdError, assignIds, touches } from './chunk-U7TYSPYM.js';
18
- export { diff, merge } from './chunk-QGJVOPLG.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-FAXO3SUE.js';
12
+ export { explain } from './chunk-V4G3BYPY.js';
13
+ import './chunk-VVPPMHP6.js';
14
+ import './chunk-P2X4BBW2.js';
15
+ export { OPFMarkdownError } from './chunk-MDAXXFAY.js';
16
+ import './chunk-PHOSM2RA.js';
17
+ export { OPFIdError, assignIds, touches } from './chunk-KJFCHCWV.js';
18
+ export { diff, merge } from './chunk-AQ3WR3H7.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-WBPXRUZT.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-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';
21
+ export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-VI7VWDTN.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-IGT4523S.js';
23
23
  import './chunk-BLCDUM7B.js';
24
24
  import './chunk-PRXZD2II.js';
25
25
 
@@ -639,6 +639,8 @@ interface IconSetRecord {
639
639
  package?: string;
640
640
  homepage?: string;
641
641
  licenseText?: string;
642
+ /** The set's former icon names by current name (`{ "triangle-alert": "triangle-exclamation-point" }`), read for the finding of an old name; an old name never resolves. */
643
+ renamed?: Readonly<Record<string, string>>;
642
644
  }
643
645
  /**
644
646
  * A registered catalog's set: its record, or a function that loads it (a module whose default export is the record also does).
@@ -689,7 +691,8 @@ type IconResolution = {
689
691
  ok: false;
690
692
  code: 'icon-unknown' | 'icon-invalid' | 'icon-unloaded';
691
693
  message: string;
692
- suggestions?: string[];
694
+ suggestions?: string[]; /** `<set>:<name>` when the icon was renamed upstream: the one name to write. */
695
+ renamed?: string;
693
696
  };
694
697
  /**
695
698
  * SVG path data as absolute M, L, C and Z commands (H and V become lines, S, Q and T cubic curves, arcs cubic curves of at most a
@@ -725,8 +728,14 @@ declare function documentIcons(input: unknown): {
725
728
  path: string;
726
729
  value: unknown;
727
730
  }[];
728
- /** Up to `limit` names nearest to `name`: names that contain it or that it contains first, then the fewest edits. */
729
- declare function nearIconNames(name: string, names: Iterable<string>, limit?: number): string[];
731
+ /**
732
+ * Up to `limit` names nearest to `name`, best first. A name is read word by word ("triangle-alert" is "triangle" and "alert"), so the
733
+ * candidates are, in order: names that contain what was written (or whose words and tags cover every word written), names that share
734
+ * some of its words, then names a few edits away (a typo). `tags` (the set's keywords by name, when it is loaded with them) let a renamed
735
+ * icon find its new name by meaning: "triangle-alert" finds the triangle whose keywords say "alert". A name inside a longer word
736
+ * is not a match ("angle" is not near "triangle").
737
+ */
738
+ declare function nearIconNames(name: string, names: Iterable<string>, limit?: number, tags?: Readonly<Record<string, readonly string[]>>): string[];
730
739
  interface IconOptions {
731
740
  /** The catalogs the host registered: their `iconSets` (records or loaders) are where `<set>:<name>` resolves after the document's own. */
732
741
  catalogs?: readonly unknown[];
@@ -1,4 +1,4 @@
1
- import { a as CatalogKind } from './catalog-refs-CoIrOdAw.js';
1
+ import { a as CatalogKind } from './catalog-refs-wtuudZTe.js';
2
2
  import { SchemaName } from './schemas.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { presentation } from './chunk-LCT5ZV3Q.js';
1
+ import { presentation } from './chunk-VI7VWDTN.js';
2
2
 
3
3
  // src/format.ts
4
4
  var OPFFormatError = class extends Error {
@@ -1,5 +1,5 @@
1
- import { jsonEqual, formatPointer } from './chunk-FAXO3SUE.js';
2
- import { annotationText } from './chunk-CJVKOJ6B.js';
1
+ import { jsonEqual, formatPointer } from './chunk-WBPXRUZT.js';
2
+ import { annotationText } from './chunk-IGT4523S.js';
3
3
 
4
4
  // src/diff-match.ts
5
5
  var DEFAULT_MATCH_THRESHOLD = 0.5;
@@ -1,10 +1,10 @@
1
- import { sortPresentationKeys } from './chunk-HHVQ2SDT.js';
1
+ import { sortPresentationKeys } from './chunk-6MSH3KCZ.js';
2
2
  import { NOT_CHECKED } from './chunk-RYZPBJLB.js';
3
- import { Ctx, describeYamlErrors } from './chunk-WMFT5R7I.js';
4
- import { same } from './chunk-3THGTDL2.js';
5
- import { validate } from './chunk-FAXO3SUE.js';
6
- import { presentation } from './chunk-LCT5ZV3Q.js';
7
- import { checkCatalogsOption } from './chunk-CJVKOJ6B.js';
3
+ import { Ctx, describeYamlErrors } from './chunk-MDAXXFAY.js';
4
+ import { same } from './chunk-PHOSM2RA.js';
5
+ import { validate } from './chunk-WBPXRUZT.js';
6
+ import { presentation } from './chunk-VI7VWDTN.js';
7
+ import { checkCatalogsOption } from './chunk-IGT4523S.js';
8
8
  import { Parser, parseDocument, isMap, isSeq, Document, visit, isScalar, isAlias } from 'yaml';
9
9
 
10
10
  var MAX_ALIAS_COUNT = 100;