@oim-media/spec 1.27.9 → 1.27.11
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/CANONICAL_SPEC.md +3 -3
- package/README.md +14 -2
- package/package.json +1 -1
- package/schema/oim.schema.json +2 -2
- package/schema/oim2.schema.json +2763 -0
- package/schema/ovm.schema.json +2 -2
- package/vectors/README.md +4 -2
- package/vectors/golden/mask-window.web.png +0 -0
- package/vectors/golden/zone-group.web.png +0 -0
- package/vectors/mask-window.expected.json +45 -0
- package/vectors/mask-window.oim.png +0 -0
- package/vectors/zone-group.expected.json +46 -0
- package/vectors/zone-group.oim.png +0 -0
package/CANONICAL_SPEC.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OIM (Object Interactive Media) Canonical Metadata Specification
|
|
2
2
|
|
|
3
|
-
**Contract version:** 1.27.
|
|
3
|
+
**Contract version:** 1.27.11
|
|
4
4
|
**Date:** 2026-11-02 (reviewed against `packages/core/src/schema.ts`; the source of truth is the schema, this document summarises it)
|
|
5
5
|
**Status:** Normative / In force
|
|
6
6
|
**License:** Apache-2.0
|
|
@@ -333,7 +333,7 @@ Top-level structure carried in the `OIM_Data` payload:
|
|
|
333
333
|
|
|
334
334
|
| Key | Type | Description |
|
|
335
335
|
|---|---|---|
|
|
336
|
-
| `oim` | `string` | Format version of the document (e.g. `"1.27.
|
|
336
|
+
| `oim` | `string` | Format version of the document (e.g. `"1.27.11"`), the contract version the backend signs against. |
|
|
337
337
|
| `min_player` | `string` | Minimum player version required to rebuild the document (`minVersionFor`). |
|
|
338
338
|
| `oim_id` | `string` | Unique document identifier for re-editing and registry checks (max 128 chars). |
|
|
339
339
|
| `media_type` | `"image" \| "video"` | Media type of the OIM document. |
|
|
@@ -346,7 +346,7 @@ Top-level structure carried in the `OIM_Data` payload:
|
|
|
346
346
|
| `palettes` | `Record<string, Partial<Record<DynamicColorRole, string>>>` | Up to 6 named colour palettes mapping semantic roles to CSS colours (1.20.0). |
|
|
347
347
|
| `defaultPalette` | `string` | Name of the active palette in `palettes` (1.20.0). |
|
|
348
348
|
| `slots` | `OimSlot[]` | Array of interactive layers (maximum `MAX_SLOTS` = 150). |
|
|
349
|
-
| `zones` | `OimZone[]` | Optional catalogue of named bounding box zones. |
|
|
349
|
+
| `zones` | `OimZone[]` | Optional catalogue of named bounding box zones. A zone paints its background, corners and backdrop blur; its layers keep their own position. Flow properties in its style (`display`, `flexDirection`, `justifyContent`, `alignItems`, `gap`, `padding`) are not applied. |
|
|
350
350
|
| `capabilities` | `("vector_parallax" \| "infinite_parallax" \| "text_marks" \| "image_fill" \| "media_filters" \| "frame_shapes")[]` | Capabilities used by the document. |
|
|
351
351
|
| `capabilities_required` | same as `capabilities` | Capabilities the reader **must** implement to paint with fidelity (glTF pattern). |
|
|
352
352
|
| `fonts` | `EmbeddedFont[]` | Font variants embedded in base64 for offline rendering (1.3.0): subset, static (no `fvar`, `gvar`, `avar`, `HVAR`, `MVAR`; `STAT` may stay) WOFF, `format: "woff"`, written since 1.27.0; WOFF2 (`format: "woff2"`) is read forever. The content starts with the magic of its format (`wOFF` / `wOF2`). |
|
package/README.md
CHANGED
|
@@ -11,7 +11,8 @@ schema/ oim.schema.json and ovm.schema.json: JSON Schema, generated
|
|
|
11
11
|
keys.json Public keys every player embeds (kid, jwk and key dates). Public parts only.
|
|
12
12
|
marks-cases.json Known-answer cases for text marks, shared with the backend's validator tests.
|
|
13
13
|
canonical-cases.json Known-answer case for the canonical form, checked by the TypeScript, Rust and Dart implementations.
|
|
14
|
-
|
|
14
|
+
schema/oim2.schema.json Draft of the 2.0 document, generated from @oim-media/core/v2. Not the published format.
|
|
15
|
+
vectors/ 39 signed .oim files, each with <name>.expected.json.
|
|
15
16
|
tools/ Read-only checks: contract-summary.mjs, canonical-check.mjs, style-usage.mjs.
|
|
16
17
|
```
|
|
17
18
|
|
|
@@ -268,9 +269,20 @@ overrides all of them.
|
|
|
268
269
|
A 1.20.0 file read by an earlier player is shown with each layer's fixed
|
|
269
270
|
colours. Nothing breaks.
|
|
270
271
|
|
|
272
|
+
## The 2.0 draft
|
|
273
|
+
|
|
274
|
+
`schema/oim2.schema.json` is the next version of the document, still a draft: no player reads it and
|
|
275
|
+
it can change. `@oim-media/core/v2` exports `upgrade`, which reads any 1.x document as 2.0, and the
|
|
276
|
+
conformance gate checks that every vector upgrades to a valid 2.0 document with no key left behind.
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
node tools/upgrade-report.mjs --vectors # the same check, as a report
|
|
280
|
+
node tools/upgrade-report.mjs <folder> # over any other folder of .oim files
|
|
281
|
+
```
|
|
282
|
+
|
|
271
283
|
## Conformance vectors
|
|
272
284
|
|
|
273
|
-
`vectors/` holds
|
|
285
|
+
`vectors/` holds 39 signed `.oim` files and their expected reads. They are
|
|
274
286
|
generated by Xue Studios' signing service through the production pipeline and
|
|
275
287
|
committed to this repository; the generator itself is not part of it. See
|
|
276
288
|
[`vectors/README.md`](vectors/README.md).
|
package/package.json
CHANGED
package/schema/oim.schema.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://oim.media/spec/1.27.
|
|
3
|
+
"$id": "https://oim.media/spec/1.27.11/oim.schema.json",
|
|
4
4
|
"title": "OIM document metadata",
|
|
5
|
-
"specVersion": "1.27.
|
|
5
|
+
"specVersion": "1.27.11",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"description": {
|