@openpresentation/opf 0.3.0 → 0.4.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.
Files changed (87) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -0
  3. package/dist/catalogs-x1oFFQnd.d.ts +1198 -0
  4. package/dist/catalogs.d.ts +2 -32413
  5. package/dist/catalogs.js +1 -18505
  6. package/dist/chunk-75N5I6M4.js +229 -0
  7. package/dist/chunk-EMTMQRX4.js +1007 -0
  8. package/dist/chunk-GCXOU5MZ.js +6515 -0
  9. package/dist/chunk-HJNJHB5H.js +454 -0
  10. package/dist/chunk-OZULJBSG.js +3368 -0
  11. package/dist/chunk-PIQXLBBJ.js +445 -0
  12. package/dist/chunk-SOSOBKQ2.js +145 -0
  13. package/dist/chunk-TWMRZ43O.js +18576 -0
  14. package/dist/composition.d.ts +190 -0
  15. package/dist/composition.js +1 -0
  16. package/dist/data.d.ts +32 -0
  17. package/dist/data.js +1 -0
  18. package/dist/docs.js +69 -5
  19. package/dist/examples.d.ts +1 -1
  20. package/dist/examples.js +112 -2
  21. package/dist/index.d.ts +6 -4
  22. package/dist/index.js +8 -29555
  23. package/dist/pagination.d.ts +52 -0
  24. package/dist/pagination.js +5 -0
  25. package/dist/{presentation-C8BOK0-5.d.ts → presentation-BjP4yTQ1.d.ts} +86 -3
  26. package/dist/previews.js +1 -447
  27. package/dist/repo-readme.js +1 -3
  28. package/dist/schemas-C1DxapX2.d.ts +206 -0
  29. package/dist/schemas.d.ts +1 -12373
  30. package/dist/schemas.js +1 -6275
  31. package/dist/spec/README.md +18 -3
  32. package/dist/spec/catalogs/audiences/index.json +1 -1
  33. package/dist/spec/catalogs/chart-types/index.json +1 -1
  34. package/dist/spec/catalogs/color-schemes/index.json +1 -1
  35. package/dist/spec/catalogs/font-schemes/index.json +1 -1
  36. package/dist/spec/catalogs/languages/index.json +1 -1
  37. package/dist/spec/catalogs/layouts/chart-1x.json +4 -1
  38. package/dist/spec/catalogs/layouts/chart-2x.json +5 -1
  39. package/dist/spec/catalogs/layouts/chart-3x.json +5 -1
  40. package/dist/spec/catalogs/layouts/code-1x.json +4 -1
  41. package/dist/spec/catalogs/layouts/extract/canonical.json +94 -21
  42. package/dist/spec/catalogs/layouts/image-1x.json +4 -1
  43. package/dist/spec/catalogs/layouts/image-2x.json +5 -1
  44. package/dist/spec/catalogs/layouts/image-3x.json +5 -1
  45. package/dist/spec/catalogs/layouts/index.json +1 -1
  46. package/dist/spec/catalogs/layouts/list-2x.json +4 -1
  47. package/dist/spec/catalogs/layouts/list-3x.json +4 -1
  48. package/dist/spec/catalogs/layouts/list-4x.json +5 -1
  49. package/dist/spec/catalogs/layouts/list-5x.json +5 -1
  50. package/dist/spec/catalogs/layouts/list-6x.json +5 -1
  51. package/dist/spec/catalogs/layouts/media-1x.json +4 -1
  52. package/dist/spec/catalogs/layouts/number-2x.json +4 -1
  53. package/dist/spec/catalogs/layouts/number-3x.json +4 -1
  54. package/dist/spec/catalogs/layouts/number-4x.json +5 -1
  55. package/dist/spec/catalogs/layouts/number-5x.json +5 -1
  56. package/dist/spec/catalogs/layouts/number-6x.json +5 -1
  57. package/dist/spec/catalogs/layouts/table-1x.json +4 -1
  58. package/dist/spec/catalogs/layouts/text-2x.json +4 -1
  59. package/dist/spec/catalogs/layouts/text-3x.json +4 -1
  60. package/dist/spec/catalogs/narratives/index.json +2 -2
  61. package/dist/spec/catalogs/purposes/index.json +1 -1
  62. package/dist/spec/catalogs/social-platforms/index.json +1 -1
  63. package/dist/spec/catalogs/themes/index.json +1 -1
  64. package/dist/spec/catalogs/tones/index.json +1 -1
  65. package/dist/spec/openapi.yaml +54 -14
  66. package/dist/spec/previews/layouts/index.json +71 -71
  67. package/dist/spec/schemas/catalog-index.schema.json +53 -0
  68. package/dist/spec/schemas/layout-preview-index.schema.json +54 -0
  69. package/dist/spec/schemas/layout.schema.json +63 -0
  70. package/dist/spec/schemas/opf.schema.json +182 -3
  71. package/dist/spec-files.d.ts +14 -2391
  72. package/dist/spec-files.js +1 -3356
  73. package/dist/types.d.ts +3 -1102
  74. package/dist/types.js +0 -2
  75. package/dist/validator.d.ts +3 -10
  76. package/dist/validator.js +4 -7243
  77. package/package.json +16 -3
  78. package/dist/catalogs.js.map +0 -1
  79. package/dist/docs.js.map +0 -1
  80. package/dist/examples.js.map +0 -1
  81. package/dist/index.js.map +0 -1
  82. package/dist/previews.js.map +0 -1
  83. package/dist/repo-readme.js.map +0 -1
  84. package/dist/schemas.js.map +0 -1
  85. package/dist/spec-files.js.map +0 -1
  86. package/dist/types.js.map +0 -1
  87. package/dist/validator.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { P as Presentation } from './presentation-C8BOK0-5.js';
1
+ import { P as Presentation } from './presentation-BjP4yTQ1.js';
2
2
 
3
3
  interface ExampleRecord {
4
4
  /** Filename slug, without the `.opf.json` suffix. */
package/dist/examples.js CHANGED
@@ -42828,6 +42828,118 @@ var examplesData = Object.freeze([
42828
42828
  }
42829
42829
  }
42830
42830
  },
42831
+ {
42832
+ "slug": "dynamic-composition",
42833
+ "file": "examples/technical/dynamic-composition.opf.json",
42834
+ "category": "technical",
42835
+ "gallery": null,
42836
+ "deck": {
42837
+ "$schema": "https://openpresentation.org/schema/opf/v1",
42838
+ "name": "Dynamic composition",
42839
+ "slides": [
42840
+ {
42841
+ "title": "Give the main idea more room",
42842
+ "subtitle": "Weighted tracks preserve intent as the content changes.",
42843
+ "composition": {
42844
+ "mode": "row",
42845
+ "weights": [
42846
+ 2,
42847
+ 1
42848
+ ],
42849
+ "overflow": "error"
42850
+ },
42851
+ "blocks": [
42852
+ {
42853
+ "text": "A shared layout contract gives the editor, preview, and PowerPoint export the same content geometry. The narrative stays in JSON and remains easy to revise."
42854
+ },
42855
+ {
42856
+ "text": "Change the words. Keep the structure. Review the result."
42857
+ }
42858
+ ]
42859
+ },
42860
+ {
42861
+ "title": "Let a growing set of ideas reflow",
42862
+ "composition": {
42863
+ "mode": "auto",
42864
+ "columns": 3
42865
+ },
42866
+ "blocks": [
42867
+ {
42868
+ "text": "Describe the decision."
42869
+ },
42870
+ {
42871
+ "text": "Support it with evidence and context that the audience can understand."
42872
+ },
42873
+ {
42874
+ "text": "Explain the tradeoffs."
42875
+ },
42876
+ {
42877
+ "text": "Name the next step and the person responsible for it."
42878
+ },
42879
+ {
42880
+ "text": "Measure the result."
42881
+ }
42882
+ ]
42883
+ },
42884
+ {
42885
+ "title": "Promoted rows have distinct positions",
42886
+ "top": {
42887
+ "text": "First: state the situation."
42888
+ },
42889
+ "middle": {
42890
+ "text": "Then: explain the change."
42891
+ },
42892
+ "bottom": {
42893
+ "text": "Finally: make the recommendation."
42894
+ }
42895
+ },
42896
+ {
42897
+ "title": "Arrange each idea and its supporting details",
42898
+ "composition": {
42899
+ "mode": "row",
42900
+ "weights": [
42901
+ 2,
42902
+ 1
42903
+ ],
42904
+ "overflow": "error"
42905
+ },
42906
+ "blocks": [
42907
+ {
42908
+ "composition": {
42909
+ "mode": "column",
42910
+ "weights": [
42911
+ 1,
42912
+ 2
42913
+ ],
42914
+ "padding": 0.02
42915
+ },
42916
+ "blocks": [
42917
+ {
42918
+ "text": "Keep the recommendation and its evidence together."
42919
+ },
42920
+ {
42921
+ "composition": {
42922
+ "mode": "row"
42923
+ },
42924
+ "blocks": [
42925
+ {
42926
+ "text": "Evidence: share the same geometry across previews and exports."
42927
+ },
42928
+ {
42929
+ "text": "Action: revise one group without rearranging the whole slide."
42930
+ }
42931
+ ]
42932
+ }
42933
+ ]
42934
+ },
42935
+ {
42936
+ "text": "A separate column holds the supporting context."
42937
+ }
42938
+ ]
42939
+ }
42940
+ ]
42941
+ }
42942
+ },
42831
42943
  {
42832
42944
  "slug": "full-feature-tour",
42833
42945
  "file": "examples/technical/full-feature-tour.opf.json",
@@ -44714,5 +44826,3 @@ function getExamplesByCategory(category) {
44714
44826
  }
44715
44827
 
44716
44828
  export { exampleCategories, examples, galleries, getExample, getExamplesByCategory, getExamplesByGallery, getGallery };
44717
- //# sourceMappingURL=examples.js.map
44718
- //# sourceMappingURL=examples.js.map
package/dist/index.d.ts CHANGED
@@ -1,7 +1,9 @@
1
- export { SchemaName, audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './schemas.js';
2
- export { CatalogKind, audiences, catalogEntries, catalogIndexes, catalogKinds, catalogSchemaNames, catalogs, chartTypes, colorSchemes, fontSchemes, languages, layouts, narratives, purposes, socialPlatforms, themes, tones } from './catalogs.js';
1
+ export { S as SchemaEntry, a as SchemaName, b as audience, c as chartType, d as colorScheme, f as fontScheme, l as language, e as layout, n as narrative, p as presentation, g as purpose, s as schemaEntries, h as schemaNames, i as schemas, j as socialPlatform, t as theme, k as tone } from './schemas-C1DxapX2.js';
2
+ export { A as Audience, C as CatalogEntry, a as CatalogIndex, b as CatalogIndexRecord, c as CatalogKind, d as CatalogRecord, e as ChartType, f as ColorScheme, F as FontScheme, L as Language, g as Layout, N as Narrative, P as Purpose, S as SocialPlatform, T as Theme, h as Tone, i as audiences, j as catalogEntries, k as catalogIndexes, l as catalogKinds, m as catalogSchemaNames, n as catalogs, o as chartTypes, p as colorSchemes, q as fontSchemes, r as languages, s as layouts, t as narratives, u as purposes, v as socialPlatforms, w as themes, x as tones } from './catalogs-x1oFFQnd.js';
3
3
  export { OPFValidationError, ValidationIssue, ValidationResult, assertValid, assertValidCatalogRecord, assertValidPresentation, validate, validateCatalogRecord, validatePresentation } from './validator.js';
4
4
  export { SpecFileEntry, SpecFileKind, SpecFilePath, specFileEntries, specFileKinds, specFilePaths } from './spec-files.js';
5
5
  export { LayoutPreviewIndex, LayoutPreviewRecord, getLayoutPreview, hasLayoutPreview, layoutPreviewIndex, layoutPreviewSlugs, layoutPreviews } from './previews.js';
6
- export { P as Presentation } from './presentation-C8BOK0-5.js';
7
- export { Audience, ChartType, ColorScheme, FontScheme, Language, Layout, Narrative, Purpose, SocialPlatform, Theme, Tone } from './types.js';
6
+ export { P as Presentation } from './presentation-BjP4yTQ1.js';
7
+ export { ComposeSlideOptions, ComposedFlow, ComposedGroup, ComposedItem, Composition, CompositionTrack, FontFamilies, LayoutBox, LayoutDiagnostic, ListEntryLayout, ListFit, ListText, ListValue, MAX_COMPOSITION_DEPTH, MeasureTextWidth, OPFCompositionError, RichTextFit, RichTextFragment, RichTextLine, RichTextOptions, RichTextRun, SlideComposition, TextFit, TextMeasurement, TextStyle, composeSlide, fitList, fitRichText, fitText, measureText, resolveCanvasDimensions, resolveFontFamilies, resolveTextStyle, textWidthMeasurer, wrapText } from './composition.js';
8
+ export { OPFPaginationError, PaginatedPage, PaginationMapping, PaginationOptions, PaginationResult, PresentationPaginationOptions, PresentationPaginationResult, paginatePresentation, paginateSlide } from './pagination.js';
9
+ export { DataCell, DataContentOptions, DataImportOptions, OPFDataImportError, TabularData, createDataContent, parseTabularData } from './data.js';