@openpresentation/gallery 4.0.0 → 5.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 CHANGED
@@ -1,6 +1,12 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 5.0.0 (2026-10-21)
4
+
5
+ - **Breaking: layout records are one ordered list of regions; `areas`, `columns`, `rows` and the `regions` map are removed (FA-33).** A record is now `direction` (`"row"` or `"column"`, default `"column"`) and an ordered `regions` array of regions and splits. A region is `{ "name", "size"?, ...rules }` with the rules unchanged (`accepts`, `role`, `flow`, `max`, `bleed`, `listColumns`, `anchor`, `empty`); a split is `{ "direction", "regions", "size"?, "anchor"? }` and nests up to three levels. `size` is a weight (default 1) or `"auto"` (the height the content needs, in a column only), `title` and `subtitle` stay heading regions that take only `size`, `accepts` may be left out for every content kind, and an `anchor` on the record or a split applies to every region under it. All 28 layouts are converted, and each compiles to exactly the grid it had in 4.0.0 (areas, column and row weights, `auto` rows and every region rule, proven in `test/layout-equivalence.test.mjs` against a fixture of the 4.0.0 records), so no layout draws differently and the previews are unchanged. `quote` and `statement` write their `anchor: "middle"` once on the record. There is no old-format alias and no migration API: a custom layout in a deck must be rewritten. `CATALOG_SCHEMA` and `opf.catalogSchema` advance to `4`; the per-kind layout schema version stays `2` (`opf-layout/v2`). Records are validated by a core that reads this form, so this release needs the core release that accepts it.
6
+
7
+ - Build tooling: the one-release merged-engine bootstrap (`.github/bootstrap-engines.json`, `scripts/bootstrap-engines.mjs`) is generalized from "3.0.0" to the release the file names, with its catalog schema, and is set to 5.0.0 over the merged core (OpenPresentation/opf#756, `d223fc00`) and opf-render (opf-render#278, `e5838837`) commits, because core 0.25.0 cannot publish before it depends on gallery 5. The ancestry, digest and unchanged-manifest checks are as before. The layout-equivalence test compiles with core's own `layoutTemplate` (`@openpresentation/opf/composition`) instead of a test-local copy. The published package is unchanged by this tooling and stays dependency-free.
8
+
9
+ ## 4.0.0 (2026-10-19)
4
10
 
5
11
  - **Breaking: the `dark` theme is removed; dark is a variant of every theme.** Core 0.23.0 adds `design.variant`, a map over a deck's one color scheme (light1, light2, dark1, dark2, with an optional accent order). The `minimal`, `classic` and `bold` themes gain `variants` (`light`, `light-alt`, `dark`, `dark-alt`, each the value of `design.variant`), and the separate `dark` theme (the `boost` colors with the `seaford` fonts on `dark1`) is gone: a document that names `design.theme: "dark"` is an unknown theme (`opf/unresolved-reference`). Replace it with a theme and its dark variant, plus `colorScheme: "boost"` and `fontScheme: "seaford"` if the boost look is wanted. A removed id is a major release, so this is 4.0.0. No other record or drawing changes; `CATALOG_SCHEMA` stays 3.
6
12
  - Development and CI use the published engines: `@openpresentation/opf` and `@openpresentation/opf-render` 0.23.0 replace the 0.19 pins and the one-release 3.0.0 bootstrap, which does nothing for any other gallery version. Core 0.23.0 derives borders, gridlines, axis lines, chart text and code colors from the color scheme, so seven layout previews are redrawn with `npm run previews` (this major release is where a redraw is allowed): chart, chart-beside, code, dashboard, table, table-beside and timeline. `previews/layouts/index.json` records their new sizes. No other record's drawing changes.
package/README.md CHANGED
@@ -9,13 +9,13 @@ It holds every layout, theme, colour scheme, font scheme, narrative, audience, p
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).
12
+ **2.x is the catalog of OPF 0.19.** Its layouts are the 28 OPF 0.19 layouts named by intent, written as templates
13
+ (`opf-layout/v2`). 1.x holds the 278 OPF 0.18 layouts. 2.0.0 changed the layouts with no migration path: see
14
+ [Layouts](#layouts) and the [changelog](CHANGELOG.md).
15
15
 
16
- Gallery 3.x advances the overall catalog compatibility contract to `3` and requires the 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
16
+ Gallery 5.x advances the overall catalog compatibility contract to `4`: a layout record is `direction` and one ordered
17
+ list of `regions`, nested for two dimensions, and `areas`, `columns`, `rows` and the `regions` map are gone (FA-33, no
18
+ migration path). The engine packages follow their separate release process. The per-kind layout schema version remains
19
19
  `2` and its URI remains `opf-layout/v2`; those identifiers are distinct from the overall catalog contract.
20
20
 
21
21
  ## Use
@@ -42,7 +42,7 @@ registers later.
42
42
  | --- | --- |
43
43
  | `gallery` | The content records by kind and then by id, without `$schema`, `id` or `x-*` members, with `source: "https://www.pptx.gallery"` |
44
44
  | `GALLERY_SOURCE` | `https://www.pptx.gallery`, the `source` of a document's `catalogs.default` |
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` |
45
+ | `CATALOG_SCHEMA` | The overall catalog compatibility contract (also `opf.catalogSchema` in `package.json`): `4` requires layouts written as `direction` and an ordered `regions` list; layouts retain per-kind schema version `2` and `opf-layout/v2` |
46
46
  | `catalogDisplay` | Display metadata for pickers: `chartTypes`, `languages` and `socialPlatforms` by id |
47
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
48
  | `catalogManifest` | The pptx.gallery commit the 1.x records were taken from, and a content hash per kind |
@@ -102,6 +102,39 @@ The 1.x ids `agenda`, `comparison`, `dashboard`, `faq`, `timeline` and `two-colu
102
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
103
  slides compose automatically, unless the deck embeds the old record.
104
104
 
105
+ ### The record
106
+
107
+ A layout record lays its content out with `direction` and an ordered `regions` list. `direction` (`"row"` or `"column"`,
108
+ default `"column"`) says whether the list runs side by side or top to bottom. Each entry is a **region** (`name`, an
109
+ optional `size`, and the rules `accepts`, `role`, `flow`, `max`, `bleed`, `listColumns`, `anchor`, `empty`) or a **split**
110
+ (`direction`, `regions`, an optional `size`) that nests another list, up to three levels. `size` is a weight (default 1):
111
+ siblings share their parent's length in proportion; `"auto"` is the height the content needs and is allowed only in a
112
+ column. `title` and `subtitle` are the heading regions and take only `size`. An `anchor` on the record or on a split
113
+ applies to every region under it unless the region sets its own, and an omitted `accepts` means every content kind.
114
+
115
+ ```json
116
+ {
117
+ "$schema": "https://openpresentation.org/schema/opf-layout/v2",
118
+ "id": "hero",
119
+ "name": "Hero",
120
+ "direction": "column",
121
+ "regions": [
122
+ { "name": "title" },
123
+ {
124
+ "direction": "row",
125
+ "size": 2,
126
+ "regions": [
127
+ { "name": "lead", "accepts": ["text", "quote", "metric"], "role": "primary", "flow": "none" },
128
+ { "name": "media", "accepts": ["image", "video"], "role": "media", "flow": "none" }
129
+ ]
130
+ },
131
+ { "name": "support", "size": 1, "accepts": ["text", "list", "metric", "group"], "role": "supporting", "flow": "grid" }
132
+ ]
133
+ }
134
+ ```
135
+
136
+ Core compiles the list to the grid its engine uses, so the same layout draws the same way it did as a grid.
137
+
105
138
  ## Versions
106
139
 
107
140
  The gallery has its own version line, independent of the OPF engine packages. Releases are tagged `vX.Y.Z`.
@@ -124,7 +157,7 @@ patch is held to the 2.x release below it.
124
157
 
125
158
  ## Where the records come from
126
159
 
127
- - **Layouts** are written here, in `catalog/layouts/`: one short `opf-layout/v2` record per layout, reviewed as code.
160
+ - **Layouts** are written here, in `catalog/layouts/`: one short `opf-layout/v2` record per layout (`direction` and an ordered `regions` list), reviewed as code.
128
161
  - **Themes** carry `variants` from 4.0.0 (below), written here with the theme records.
129
162
  - **The other kinds** (colour and font schemes, narratives, audiences, purposes, tones and the display kinds) are
130
163
  unchanged from 1.x: the pinned snapshot of the catalog pptx.gallery published at
@@ -146,7 +179,7 @@ value to `design.variant`. There is no separate dark theme: the `dark` theme of
146
179
  ## Contributing a layout
147
180
 
148
181
  1. Write the record in `catalog/layouts/<id>.json` (`$schema` `https://openpresentation.org/schema/opf-layout/v2`,
149
- `id`, `name`, `summary`, `tags` with its group, `areas`, `columns`, `rows`, `regions` and any `design`) and add its
182
+ `id`, `name`, `summary`, `tags` with its group, `direction`, `regions` and any `design`; see [The record](#the-record)) and add its
150
183
  entry (`id`, `name`, `summary`, `group`, `file`) to `catalog/layouts/index.json` in picker order. A new layout gets a
151
184
  new id; an existing id never changes meaning.
152
185
  2. `npm run rehash` (the index and manifest hashes), then `npm run previews` (its SVG preview).
package/dist/index.d.ts CHANGED
@@ -11,10 +11,11 @@
11
11
  export declare const GALLERY_SOURCE: "https://www.pptx.gallery";
12
12
 
13
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.
14
+ * The version of core's catalog record compatibility contract these records target (package.json `opf.catalogSchema`). 4 requires
15
+ * layout records written as `direction` and one ordered `regions` list (FA-33); `areas`, `columns`, `rows` and the `regions` map
16
+ * are gone. Per-kind layout schemaVersion 2 and `opf-layout/v2` are unchanged.
16
17
  */
17
- export declare const CATALOG_SCHEMA: 3;
18
+ export declare const CATALOG_SCHEMA: 4;
18
19
 
19
20
  /** Records of one kind, keyed by id (core's `CatalogRecordMap`). */
20
21
  export type GalleryRecords = Readonly<Record<string, Readonly<Record<string, unknown>>>>;