@openpresentation/opf 0.2.2 → 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 (90) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +74 -3
  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.d.ts +17 -0
  19. package/dist/docs.js +120 -0
  20. package/dist/examples.d.ts +43 -0
  21. package/dist/examples.js +44828 -0
  22. package/dist/index.d.ts +7 -4
  23. package/dist/index.js +8 -29015
  24. package/dist/pagination.d.ts +52 -0
  25. package/dist/pagination.js +5 -0
  26. package/dist/{validator-MwlR2F56.d.ts → presentation-BjP4yTQ1.d.ts} +87 -40
  27. package/dist/previews.js +1 -447
  28. package/dist/repo-readme.d.ts +4 -0
  29. package/dist/repo-readme.js +7 -0
  30. package/dist/schemas-C1DxapX2.d.ts +206 -0
  31. package/dist/schemas.d.ts +1 -12373
  32. package/dist/schemas.js +1 -6275
  33. package/dist/spec/README.md +57 -0
  34. package/dist/spec/catalogs/audiences/engineering-team.json +1 -1
  35. package/dist/spec/catalogs/audiences/index.json +1 -1
  36. package/dist/spec/catalogs/chart-types/index.json +1 -1
  37. package/dist/spec/catalogs/color-schemes/index.json +1 -1
  38. package/dist/spec/catalogs/font-schemes/index.json +1 -1
  39. package/dist/spec/catalogs/languages/index.json +1 -1
  40. package/dist/spec/catalogs/layouts/chart-1x.json +4 -1
  41. package/dist/spec/catalogs/layouts/chart-2x.json +5 -1
  42. package/dist/spec/catalogs/layouts/chart-3x.json +5 -1
  43. package/dist/spec/catalogs/layouts/code-1x.json +4 -1
  44. package/dist/spec/catalogs/layouts/extract/canonical.json +94 -21
  45. package/dist/spec/catalogs/layouts/image-1x.json +4 -1
  46. package/dist/spec/catalogs/layouts/image-2x.json +5 -1
  47. package/dist/spec/catalogs/layouts/image-3x.json +5 -1
  48. package/dist/spec/catalogs/layouts/index.json +1 -1
  49. package/dist/spec/catalogs/layouts/list-2x.json +4 -1
  50. package/dist/spec/catalogs/layouts/list-3x.json +4 -1
  51. package/dist/spec/catalogs/layouts/list-4x.json +5 -1
  52. package/dist/spec/catalogs/layouts/list-5x.json +5 -1
  53. package/dist/spec/catalogs/layouts/list-6x.json +5 -1
  54. package/dist/spec/catalogs/layouts/media-1x.json +4 -1
  55. package/dist/spec/catalogs/layouts/number-2x.json +4 -1
  56. package/dist/spec/catalogs/layouts/number-3x.json +4 -1
  57. package/dist/spec/catalogs/layouts/number-4x.json +5 -1
  58. package/dist/spec/catalogs/layouts/number-5x.json +5 -1
  59. package/dist/spec/catalogs/layouts/number-6x.json +5 -1
  60. package/dist/spec/catalogs/layouts/table-1x.json +4 -1
  61. package/dist/spec/catalogs/layouts/text-2x.json +4 -1
  62. package/dist/spec/catalogs/layouts/text-3x.json +4 -1
  63. package/dist/spec/catalogs/narratives/index.json +2 -2
  64. package/dist/spec/catalogs/purposes/index.json +1 -1
  65. package/dist/spec/catalogs/social-platforms/index.json +1 -1
  66. package/dist/spec/catalogs/themes/index.json +1 -1
  67. package/dist/spec/catalogs/tones/casual.json +1 -1
  68. package/dist/spec/catalogs/tones/conversational.json +1 -1
  69. package/dist/spec/catalogs/tones/index.json +1 -1
  70. package/dist/spec/catalogs/tones/technical.json +1 -1
  71. package/dist/spec/openapi.yaml +66 -26
  72. package/dist/spec/previews/layouts/index.json +71 -71
  73. package/dist/spec/schemas/catalog-index.schema.json +53 -0
  74. package/dist/spec/schemas/layout-preview-index.schema.json +54 -0
  75. package/dist/spec/schemas/layout.schema.json +63 -0
  76. package/dist/spec/schemas/opf.schema.json +182 -3
  77. package/dist/spec-files.d.ts +14 -2386
  78. package/dist/spec-files.js +1 -3349
  79. package/dist/types.d.ts +4 -1102
  80. package/dist/types.js +0 -2
  81. package/dist/validator.d.ts +33 -3
  82. package/dist/validator.js +4 -6712
  83. package/package.json +29 -4
  84. package/dist/catalogs.js.map +0 -1
  85. package/dist/index.js.map +0 -1
  86. package/dist/previews.js.map +0 -1
  87. package/dist/schemas.js.map +0 -1
  88. package/dist/spec-files.js.map +0 -1
  89. package/dist/types.js.map +0 -1
  90. package/dist/validator.js.map +0 -1
@@ -0,0 +1,43 @@
1
+ import { P as Presentation } from './presentation-BjP4yTQ1.js';
2
+
3
+ interface ExampleRecord {
4
+ /** Filename slug, without the `.opf.json` suffix. */
5
+ readonly slug: string;
6
+ /** Path relative to the repo root, with forward slashes. */
7
+ readonly file: string;
8
+ /** Top-level examples/<category> bucket (`gallery`, `technical`, …). */
9
+ readonly category: string;
10
+ /** Gallery slug when the example lives under `examples/gallery/<slug>/`; otherwise `null`. */
11
+ readonly gallery: string | null;
12
+ /** Parsed OPF document. Validated against `presentation.schema.json` at build time. */
13
+ readonly deck: Presentation;
14
+ }
15
+ interface GalleryRecord {
16
+ /** Gallery slug (folder name under `examples/gallery/`). */
17
+ readonly slug: string;
18
+ /** Directory path relative to the repo root. */
19
+ readonly dir: string;
20
+ /** Lightweight summary of every example deck inside the gallery. */
21
+ readonly examples: readonly {
22
+ readonly slug: string;
23
+ readonly file: string;
24
+ readonly name: string | null;
25
+ }[];
26
+ }
27
+
28
+ /** Every example deck shipped with this release, sorted by file path. */
29
+ declare const examples: readonly ExampleRecord[];
30
+ /** Examples grouped by `examples/gallery/<slug>/` folder. */
31
+ declare const galleries: readonly GalleryRecord[];
32
+ /** Top-level `examples/<category>` buckets present in this release. */
33
+ declare const exampleCategories: readonly string[];
34
+ /** Look up an example deck by slug (the filename without `.opf.json`). */
35
+ declare function getExample(slug: string): ExampleRecord | undefined;
36
+ /** Look up a gallery by slug. */
37
+ declare function getGallery(slug: string): GalleryRecord | undefined;
38
+ /** All examples that belong to a given gallery slug. */
39
+ declare function getExamplesByGallery(slug: string): readonly ExampleRecord[];
40
+ /** All examples that belong to a given top-level category (`gallery`, `technical`, …). */
41
+ declare function getExamplesByCategory(category: string): readonly ExampleRecord[];
42
+
43
+ export { type ExampleRecord, type GalleryRecord, exampleCategories, examples, galleries, getExample, getExamplesByCategory, getExamplesByGallery, getGallery };