@openpresentation/gallery 1.0.0 → 3.0.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/CHANGELOG.md +21 -0
- package/README.md +94 -32
- package/dist/index.d.ts +5 -2
- package/dist/index.js +2 -2
- package/dist/previews.d.ts +13 -12
- package/dist/previews.js +5 -5
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,4 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 3.0.0 (2026-10-13)
|
|
6
|
+
|
|
7
|
+
- Canonicalize the bootstrap temporary root on macOS before strict artifact checks, so the system `/var` alias does not reject valid merged-source builds. Source-child symlinks remain rejected; release metadata and runtime bytes are unchanged.
|
|
8
|
+
|
|
9
|
+
- **Breaking catalog contract:** layout `areas` now use arrays of cells instead of whitespace-delimited row strings. `CATALOG_SCHEMA` and `opf.catalogSchema` advance to `3`; consumers must support array-row areas. Layout IDs, per-layout schema version `2` and `opf-layout/v2` remain unchanged.
|
|
10
|
+
- Gallery 3 build tooling requires exact core and renderer commits that are ancestors of their actual remote default branches. The one-release bootstrap stages development tarballs, verifies shared core/catalog resolution and unchanged release manifests, and retains artifact identities; its commands also run portably on Windows. Qualification uses the actual merged core and renderer commits. This tooling does not qualify published engine metadata or establish native acceptance.
|
|
11
|
+
- **Breaking visual defaults:** center compact quote and headline-metric regions and image-side explanations; keep dense text, lists, charts and tables top-aligned. FAQ, process, dashboard, pillars, comparison and scorecard layouts no longer add decorative content boxes by default. Existing layout IDs are preserved. These appearance changes require gallery 3 under the pixel-stability policy; record schema remains v2.
|
|
12
|
+
- Picker previews now use authored, explicitly illustrative examples with distinct measures and units, number formats, actual questions and answers, ordered process steps and named responsibilities. Exhaustive stability fixtures remain separate and unchanged.
|
|
13
|
+
|
|
14
|
+
## 2.0.0 (2026-10-11)
|
|
15
|
+
|
|
16
|
+
- **Breaking: replace the 278 placeholder layouts of 1.x with 28 OPF 0.19 intent layouts.** Records now use `opf-layout/v2` grid templates with `areas`, `columns`, `rows` and typed content regions; `CATALOG_SCHEMA` and `opf.catalogSchema` are `2`. Consumers require `@openpresentation/opf` 0.19 or later. There are no v1 aliases or migration APIs. Six old ids remain with new template semantics: `agenda`, `comparison`, `dashboard`, `faq`, `timeline` and `two-column`. Other old ids no longer resolve in this catalog. Boxed treatment, direction, alignment, image fit and item images are design settings rather than layout variants.
|
|
17
|
+
- The six intent groups are openers and closers (`cover`, `section`, `agenda`, `statement`, `closing`); text (`text`, `list`, `quote`, `two-column`); groups of items (`pillars`, `comparison`, `process`, `timeline`, `faq`); numbers (`metrics`, `scorecard`); visuals (`image`, `image-beside`, `gallery`, `chart`, `chart-beside`, `table`, `table-beside`, `code`); mixed (`hero`, `dashboard`, `team`, `logos`). Gallery owns these layout records directly. Each has an authored usage description and SVG preview link; layout index entries include `summary` and `group`. The `image` and `image-beside` templates preserve whole-picture `imageFit: contain`.
|
|
18
|
+
- **Breaking preview contract:** `@openpresentation/gallery/previews` provides one SVG per layout id instead of the 70 HTML slide-archetype thumbnails. `npm run previews` generates them and `npm run check:previews` checks them. Schema 2 establishes a new major-version pixel-stability baseline, with filled and empty region cases retained.
|
|
19
|
+
- Narrative beats now name existing v2 intent layouts, preserving narrative prose and the other beat fields. Themes, colour schemes, font schemes, audiences, purposes and tones remain unchanged. The published package remains dependency-free and registers through `catalogs: [gallery]`; OPF 0.19 obtains the default catalog from this package instead of a core-owned snapshot.
|
|
20
|
+
- Build tooling for this first schema-2 release can validate and draw the catalog using exact merged core/renderer sources before their registry releases. It stages development tarballs with original versions and unchanged runtime bytes, records original/staged manifests and integrity, and verifies a shared core/gallery installation. Bootstrap leaves the release package metadata and built catalog bytes intact; merged-source, preview, stability and trusted-publication gates still apply. This bootstrap is build tooling, not native acceptance or publication of the engine packages.
|
|
21
|
+
|
|
22
|
+
## 1.0.0 (2026-10-10)
|
|
23
|
+
|
|
24
|
+
Released from `3458f50`; the original tagged changelog kept this entry under Unreleased.
|
|
25
|
+
|
|
5
26
|
- First release of `@openpresentation/gallery` from OpenPresentation/gallery: the pptx.gallery catalog on its own version line. `import { gallery } from "@openpresentation/gallery"` and register it with `catalogs: [gallery]`. It holds the records that `@openpresentation/opf/catalog`'s `defaultCatalog` held up to OPF 0.18: 278 layouts, 4 themes, 14 colour schemes, 89 font schemes, 48 narratives, 16 audiences, 9 purposes and 7 tones. The package also exports `GALLERY_SOURCE`, `CATALOG_SCHEMA` (`1`, also `opf.catalogSchema` in `package.json`), `catalogDisplay`, `catalogIndexes` and `catalogManifest`; `@openpresentation/gallery/previews` exports the layout previews. It has no dependency, not even for its types: `GalleryCatalog` has the shape of core's `Catalog`. New records are a minor release; a removed or renamed id or a changed drawing is a major release, which CI enforces by drawing every existing layout, theme, colour scheme and font scheme against the previous published release. Replaces the 0.0.1 placeholder.
|
package/README.md
CHANGED
|
@@ -5,10 +5,19 @@ The default catalog for Open Presentation: layouts, themes, colour schemes and f
|
|
|
5
5
|
[pptx.gallery](https://www.pptx.gallery).
|
|
6
6
|
|
|
7
7
|
It holds every layout, theme, colour scheme, font scheme, narrative, audience, purpose and tone that
|
|
8
|
-
[OPF](https://openpresentation.org) decks name by id (`layout: "
|
|
8
|
+
[OPF](https://openpresentation.org) decks name by id (`layout: "pillars"`, `design: { theme: "minimal" }`). Engines
|
|
9
9
|
never fetch records: a host registers the catalogs it trusts, and this package is the catalog every OPF host registers by
|
|
10
10
|
default.
|
|
11
11
|
|
|
12
|
+
**2.x is the catalog of OPF 0.19.** Its layouts are the 28 OPF 0.19 layouts named by intent, written as grid
|
|
13
|
+
templates (`opf-layout/v2`); their compatibility contract targets `@openpresentation/opf` 0.19. 1.x holds the 278 OPF 0.18 layouts. 2.0.0
|
|
14
|
+
changed the layouts with no migration path: see [Layouts](#layouts) and the [changelog](CHANGELOG.md).
|
|
15
|
+
|
|
16
|
+
Gallery 3.x advances the overall catalog compatibility contract to `3` and requires the upcoming OPF 0.20
|
|
17
|
+
engine contract. The engine packages follow their separate release process. Layout grid
|
|
18
|
+
`areas` use arrays of cells instead of whitespace-delimited strings. The per-kind layout schema version remains
|
|
19
|
+
`2` and its URI remains `opf-layout/v2`; those identifiers are distinct from the overall catalog contract.
|
|
20
|
+
|
|
12
21
|
## Use
|
|
13
22
|
|
|
14
23
|
```sh
|
|
@@ -33,14 +42,65 @@ registers later.
|
|
|
33
42
|
| --- | --- |
|
|
34
43
|
| `gallery` | The content records by kind and then by id, without `$schema`, `id` or `x-*` members, with `source: "https://www.pptx.gallery"` |
|
|
35
44
|
| `GALLERY_SOURCE` | `https://www.pptx.gallery`, the `source` of a document's `catalogs.default` |
|
|
36
|
-
| `CATALOG_SCHEMA` | The
|
|
45
|
+
| `CATALOG_SCHEMA` | The overall catalog compatibility contract (also `opf.catalogSchema` in `package.json`): `3` requires array-row areas; layouts retain per-kind schema version `2` and `opf-layout/v2` |
|
|
37
46
|
| `catalogDisplay` | Display metadata for pickers: `chartTypes`, `languages` and `socialPlatforms` by id |
|
|
38
|
-
| `catalogIndexes` | Each kind's `index.json`: the record summaries and their content hash |
|
|
39
|
-
| `catalogManifest` | The pptx.gallery commit the records were taken from, and a content hash per kind |
|
|
47
|
+
| `catalogIndexes` | Each kind's `index.json`: the record summaries and their content hash (a layout's entry also has its `summary` and `group`) |
|
|
48
|
+
| `catalogManifest` | The pptx.gallery commit the 1.x records were taken from, and a content hash per kind |
|
|
49
|
+
|
|
50
|
+
`@openpresentation/gallery/previews` exports one SVG preview per layout, keyed by the layout id (`layoutPreviews`,
|
|
51
|
+
`layoutPreviewIndex`, `layoutPreviewSlugs`, `getLayoutPreview`, `hasLayoutPreview`): the layout drawn with sample
|
|
52
|
+
content in every region by the pinned `@openpresentation/opf-render`, a self-contained `<svg>` with a 16:9 viewBox. The
|
|
53
|
+
package has no dependency, not even for its types: `GalleryCatalog` has the shape of core's `Catalog`, so `gallery` is
|
|
54
|
+
assignable to it.
|
|
40
55
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
56
|
+
## Layouts
|
|
57
|
+
|
|
58
|
+
A slide names a layout by intent; its content flows into the layout's regions, so no layout fixes a block count.
|
|
59
|
+
Variants are design settings on the slide or the deck, not layout ids: cards (`design.contentBox`), one row or one
|
|
60
|
+
column (`contentDirection`), title and content alignment (`titleAlignment`, `contentAlignment`), picture fit
|
|
61
|
+
(`imageFit`) and image bullets (`listBullet`), which a theme can also set, and a mirrored side (`mirror`). A slide with no layout composes
|
|
62
|
+
automatically. A deck's own layouts are records of the same schema under `catalogs.custom.layouts`.
|
|
63
|
+
|
|
64
|
+
| Layout | When to use it |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| **Openers and closers** | |
|
|
67
|
+
| `cover` | The opening slide: title, subtitle and an optional picture. |
|
|
68
|
+
| `section` | A divider between parts: the section title and an optional subtitle. |
|
|
69
|
+
| `agenda` | What the talk covers: the parts, as one list that flows into columns when long. |
|
|
70
|
+
| `statement` | One message, large and alone. |
|
|
71
|
+
| `closing` | The last slide: thanks, the call to action and contact details. |
|
|
72
|
+
| **Text** | |
|
|
73
|
+
| `text` | Prose. Several blocks sit side by side when short and stack when long. |
|
|
74
|
+
| `list` | Bulleted or numbered points; one long list flows into columns. |
|
|
75
|
+
| `quote` | One or more quotations with attribution and photo. |
|
|
76
|
+
| `two-column` | Two independent columns of any content. |
|
|
77
|
+
| **Groups of items** | |
|
|
78
|
+
| `pillars` | Two to six ideas of equal weight, as cards. |
|
|
79
|
+
| `comparison` | Two options side by side (before and after, pros and cons, us and them), with an optional verdict. |
|
|
80
|
+
| `process` | Steps in order, in one row. |
|
|
81
|
+
| `timeline` | Dated events or a roadmap along one axis, with optional notes. |
|
|
82
|
+
| `faq` | Questions with their answers. |
|
|
83
|
+
| **Numbers** | |
|
|
84
|
+
| `metrics` | One to six headline numbers, with an optional note. |
|
|
85
|
+
| `scorecard` | Metrics with commentary or status, as cards. |
|
|
86
|
+
| **Visuals** | |
|
|
87
|
+
| `image` | One picture edge to edge under an optional title. |
|
|
88
|
+
| `image-beside` | A picture or video beside text. |
|
|
89
|
+
| `gallery` | One to six framed pictures: a screenshot, a diagram, a photo set. |
|
|
90
|
+
| `chart` | One to six charts, with an optional note. |
|
|
91
|
+
| `chart-beside` | A chart with the takeaway beside it. |
|
|
92
|
+
| `table` | A table across the slide, with an optional note. |
|
|
93
|
+
| `table-beside` | A table with commentary beside it. |
|
|
94
|
+
| `code` | Source code with the explanation beside it. |
|
|
95
|
+
| **Mixed** | |
|
|
96
|
+
| `hero` | A lead message with a picture and supporting points. |
|
|
97
|
+
| `dashboard` | Headline numbers over charts. |
|
|
98
|
+
| `team` | People: photo, name and role cards. |
|
|
99
|
+
| `logos` | Customer, partner or sponsor logos in a grid of up to 12. |
|
|
100
|
+
|
|
101
|
+
The 1.x ids `agenda`, `comparison`, `dashboard`, `faq`, `timeline` and `two-column` are 2.x layouts of the same id. Every
|
|
102
|
+
other 1.x layout id is gone, with no alias: a deck that names one finds no layout (`opf/unresolved-reference`) and its
|
|
103
|
+
slides compose automatically, unless the deck embeds the old record.
|
|
44
104
|
|
|
45
105
|
## Versions
|
|
46
106
|
|
|
@@ -55,40 +115,42 @@ The gallery has its own version line, independent of the OPF engine packages. Re
|
|
|
55
115
|
The pixel-stability check enforces the rule (`npm run check:stability`, `scripts/stability.mjs`). It runs on every pull
|
|
56
116
|
request and before every publish. It takes the highest published version at or below the candidate's, and for every
|
|
57
117
|
layout, theme, colour scheme and font scheme both releases have, it draws a fixture deck with the pinned published
|
|
58
|
-
`@openpresentation/opf` and `@openpresentation/opf-render`, once per release: a slide with sample content
|
|
59
|
-
region
|
|
60
|
-
|
|
118
|
+
`@openpresentation/opf` and `@openpresentation/opf-render`, once per release: for a layout, a slide with sample content
|
|
119
|
+
in every region (three blocks in a flowing region, one in a `none` region) and a slide with every region empty, which
|
|
120
|
+
exercises collapse; for a design record, a six-slide sample deck. SVG bytes are compared first; a mismatch is rasterized
|
|
121
|
+
to count the pixels that differ. A changed drawing, a removed id or a new `CATALOG_SCHEMA` fails unless the major version
|
|
122
|
+
goes up. New ids pass. 2.0.0 is a new baseline: it is compared with 1.x for the record only, and every 2.x minor and
|
|
123
|
+
patch is held to the 2.x release below it.
|
|
61
124
|
|
|
62
125
|
## Where the records come from
|
|
63
126
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
entry. A person reviews and merges it, then tags the release. See CONTRIBUTING.md, "Records from pptx.gallery".
|
|
72
|
-
- The records are taken by this repository's `scripts/sync-gallery-catalog.mjs --gallery <pptx-gallery checkout>`
|
|
73
|
-
(`npm run sync` with the checkout at `../pptx-gallery`). The sync validates every published index and record
|
|
74
|
-
against the published `@openpresentation/opf`, checks the published content hashes, drops `x-*` members, refuses a
|
|
75
|
-
publisher that stopped serving an id the snapshot holds (unless `--allow-removed <kind>:<id>` names it), and pins the
|
|
76
|
-
gallery commit.
|
|
77
|
-
|
|
78
|
-
The planned 2.0.0 release, with the OPF 0.19 layout redesign, makes this repository the place records are written, and
|
|
79
|
-
pptx.gallery then reads them from the package.
|
|
127
|
+
- **Layouts** are written here, in `catalog/layouts/`: one short `opf-layout/v2` record per layout, reviewed as code.
|
|
128
|
+
- **The other kinds** (themes, colour and font schemes, narratives, audiences, purposes, tones and the display kinds) are
|
|
129
|
+
unchanged from 1.x: the pinned snapshot of the catalog pptx.gallery published at
|
|
130
|
+
`https://www.pptx.gallery/<kind>/index.json`, with the pptx.gallery commit in `catalog/manifest.json`.
|
|
131
|
+
- `scripts/sync-gallery-catalog.mjs` took the 1.x records from a pptx.gallery checkout (`npm run sync`). pptx.gallery
|
|
132
|
+
publishes the 1.x layouts, so a sync now refuses to run: it would remove the 28 layouts. pptx.gallery reads its records
|
|
133
|
+
from this package from 2.0.0, and the sync is retired with that change.
|
|
80
134
|
|
|
81
135
|
## Contributing a layout
|
|
82
136
|
|
|
83
|
-
1.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
3.
|
|
137
|
+
1. Write the record in `catalog/layouts/<id>.json` (`$schema` `https://openpresentation.org/schema/opf-layout/v2`,
|
|
138
|
+
`id`, `name`, `summary`, `tags` with its group, `areas`, `columns`, `rows`, `regions` and any `design`) and add its
|
|
139
|
+
entry (`id`, `name`, `summary`, `group`, `file`) to `catalog/layouts/index.json` in picker order. A new layout gets a
|
|
140
|
+
new id; an existing id never changes meaning.
|
|
141
|
+
2. `npm run rehash` (the index and manifest hashes), then `npm run previews` (its SVG preview).
|
|
142
|
+
3. Run `npm test` and `npm run check:stability`. A new layout is a minor release; if the check reports a changed record,
|
|
143
|
+
restore it or make the release a major one.
|
|
144
|
+
4. Open a pull request here with a `CHANGELOG.md` entry under `## Unreleased`.
|
|
89
145
|
|
|
90
146
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for the checks, releases and the license.
|
|
91
147
|
|
|
92
148
|
## License
|
|
93
149
|
|
|
94
150
|
[MIT](LICENSE). The records, the previews and the code are all under it; `npm run check:license` checks it.
|
|
151
|
+
|
|
152
|
+
### Editorial layout defaults
|
|
153
|
+
|
|
154
|
+
Compact quote, headline-metric and image-side explanation regions opt into `anchor: "middle"`. Long text, lists and analytical views retain top alignment. A pin still selects a named region; its anchor governs content placement within that region. Centering needs a core engine that measures the content kind; older engines may keep unsupported kinds at the top. Explicit deck and slide design continues to override catalog defaults.
|
|
155
|
+
|
|
156
|
+
Picker examples in `scripts/editorial-previews.mjs` use fictional content and are separate from the unchanged filled/empty stability fixtures. Numeric examples supply units and explicit precision; FAQ previews pair questions with answers, and process previews show ordered actions.
|
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,11 @@
|
|
|
10
10
|
/** The source the gallery is registered under, and the `source` of a document's `catalogs.default`. */
|
|
11
11
|
export declare const GALLERY_SOURCE: "https://www.pptx.gallery";
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/**
|
|
14
|
+
* The version of core's catalog record compatibility contract these records target (package.json `opf.catalogSchema`). 3 requires
|
|
15
|
+
* array rows in layout grid areas. Per-kind layout schemaVersion 2 and `opf-layout/v2` remain unchanged.
|
|
16
|
+
*/
|
|
17
|
+
export declare const CATALOG_SCHEMA: 3;
|
|
15
18
|
|
|
16
19
|
/** Records of one kind, keyed by id (core's `CatalogRecordMap`). */
|
|
17
20
|
export type GalleryRecords = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
|