@oim-media/spec 1.29.0 → 1.29.1
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 +4 -4
- package/package.json +2 -1
- package/schema/oim.schema.json +2 -2
- package/schema/ovm.schema.json +2 -2
- package/tools/parity.mjs +7 -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.29.
|
|
3
|
+
**Contract version:** 1.29.1
|
|
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
|
|
@@ -96,7 +96,7 @@ interface OimSlot {
|
|
|
96
96
|
- `maxWidth`: Container percentage string (e.g. `"80cqw"`, `"none"`) or numeric value.
|
|
97
97
|
- `fontSizes`: Map of size specific to each language `{ "es": "3.0cqw", "ja": "2.5cqw" }`.
|
|
98
98
|
- `maxWidths`: Map of maximum width specific to each language `{ "en": "60cqw" }`.
|
|
99
|
-
- `textRole`:
|
|
99
|
+
- `textRole`: **retired** (2.0 upgrade). Editor-only hierarchy hint; no renderer reads it. Readers ignore it; new writers omit it.
|
|
100
100
|
- **Text marks (1.11.0, `text_marks` capability):** `content` can wrap phrases in `{name}…{/name}`; literal braces are doubled (`{{`, `}}`). `style.marks` defines each mark with a closed set (`color`/`colorRole`, `bold`, `italic`, `underline`, `highlight{style, color, colorRole, paddingX, paddingY, borderRadius}`). Names `^[a-z][a-z0-9-]{0,23}$`, maximum 8 per layer, not nested. A single interpretation: `parseMarks`, `markStyle` (`@oim-media/core`). The backend does not sign malformed tags (`OIM_E_TEXT_MARKS_INVALID`).
|
|
101
101
|
- `dropCap`: `{ enabled, lines: 2|3, fontFamily?, color?, marginRight? }`. Size is set with `dropCapStyle`; the rest of the text keeps its marks (`splitDropCap`).
|
|
102
102
|
- `textHighlight`: **retired** (1.12.0). Kept read-only for published files; new writers use `marks`.
|
|
@@ -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.29.
|
|
336
|
+
| `oim` | `string` | Format version of the document (e.g. `"1.29.1"`), 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. |
|
|
@@ -362,7 +362,7 @@ Top-level structure carried in the `OIM_Data` payload:
|
|
|
362
362
|
## 8. Retired Keys (Read-Only for Backward Compatibility)
|
|
363
363
|
|
|
364
364
|
These keys remain declared with `deprecated: true` in `oim.schema.json` so already-published files continue to validate, but **no new writer may emit them**:
|
|
365
|
-
- **In `style`:** `textTransform`, `verticalAlign`, `shader_fx`, `blendMode` (closed to 9 values), `grain`/`grainIntensity`/`grainSize`/`grainBlend` (replaced by `style.effects` texture), `textHighlight` (replaced by `style.marks`), `animation.custom_loop_css`/`custom_keyframes`/`custom_hover_css` (retired in 1.9.0).
|
|
365
|
+
- **In `style`:** `textTransform`, `verticalAlign`, `shader_fx`, `blendMode` (closed to 9 values), `grain`/`grainIntensity`/`grainSize`/`grainBlend` (replaced by `style.effects` texture), `textHighlight` (replaced by `style.marks`), `textRole` (editor-only hint, retired), `animation.custom_loop_css`/`custom_keyframes`/`custom_hover_css` (retired in 1.9.0).
|
|
366
366
|
- **At the root:** `reedicion` (renamed to `reedit` in 1.23.0; mapped by `normalizeLegacyKeys`), `grain` and `effects` (background grain is baked into the base image, 1.12.0), `elements` and `layers` (`slots` is the single canonical name, 1.12.0), `allowed_domains` (retired in 1.7.0), `redirect_membership_verified` and `terms_accepted` (retired in 1.1.0).
|
|
367
367
|
- **In the slot:** `p`, `s`, `st`, `c`, `t` (short aliases retired in 1.12.0).
|
|
368
368
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oim-media/spec",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.1",
|
|
4
4
|
"description": "OIM format contract: JSON Schema, normative specification and conformance vectors that every OIM player must pass.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oim",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"scripts": {
|
|
47
47
|
"parity": "node tools/parity.mjs",
|
|
48
48
|
"parity:v2": "OIM_VECTORS=vectors-2 node tools/render-web-goldens.mjs .out/web2 --suffix '' && node tools/parity.mjs .out/web2 --renderer web",
|
|
49
|
+
"parity:scene": "OIM_VECTORS=vectors-2 node tools/render-web-goldens.mjs .out/scene --renderer scene --suffix '' && node tools/parity.mjs .out/scene --renderer scene --out .out/scene-diff",
|
|
49
50
|
"goldens": "node tools/render-web-goldens.mjs vectors/golden"
|
|
50
51
|
}
|
|
51
52
|
}
|
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.29.
|
|
3
|
+
"$id": "https://oim.media/spec/1.29.1/oim.schema.json",
|
|
4
4
|
"title": "OIM document metadata",
|
|
5
|
-
"specVersion": "1.29.
|
|
5
|
+
"specVersion": "1.29.1",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"description": {
|
package/schema/ovm.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.29.
|
|
3
|
+
"$id": "https://oim.media/spec/1.29.1/ovm.schema.json",
|
|
4
4
|
"title": "OVM document metadata",
|
|
5
|
-
"specVersion": "1.29.
|
|
5
|
+
"specVersion": "1.29.1",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"properties": {
|
|
8
8
|
"ovm_version": {
|
package/tools/parity.mjs
CHANGED
|
@@ -43,6 +43,13 @@ export const runParity = ({
|
|
|
43
43
|
|
|
44
44
|
for (const name of goldens.filter((g) => vectors.includes(g))) {
|
|
45
45
|
const renderPath = path.join(rendersDir, `${name}.png`);
|
|
46
|
+
// A renderer that does not paint everything a vector uses writes `<name>.skipped` (JSON: the blocks it left out).
|
|
47
|
+
// Skipped is neither a pass nor a failure: it is listed, so the coverage of each renderer stays visible.
|
|
48
|
+
const skipPath = path.join(rendersDir, `${name}.skipped`);
|
|
49
|
+
if (fs.existsSync(skipPath)) {
|
|
50
|
+
lines.push(`${name.padEnd(32)} ${'SKIPPED'.padEnd(8)} ${JSON.parse(fs.readFileSync(skipPath, 'utf8')).join(', ')}`);
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
46
53
|
const excepted = name in exceptions;
|
|
47
54
|
// `broken`: no comparison happened (missing, unreadable or wrong-size render). An exception never covers it.
|
|
48
55
|
let verdict, detail = '', broken = false;
|