@oim-media/spec 1.27.8 → 1.27.9

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 (57) hide show
  1. package/BINARY_SPEC.md +190 -186
  2. package/CANONICAL_SPEC.md +409 -409
  3. package/LICENSE +55 -55
  4. package/NOTICE +6 -6
  5. package/README.md +446 -444
  6. package/action-cases.json +13 -13
  7. package/artistic-text-cases.json +690 -690
  8. package/canonical-cases.json +6 -0
  9. package/keyframe-cases.json +32 -32
  10. package/keys.json +22 -22
  11. package/marks-cases.json +34 -34
  12. package/package.json +2 -1
  13. package/pattern-cases.json +552 -552
  14. package/schema/oim.schema.json +2920 -2920
  15. package/schema/ovm.schema.json +2701 -2701
  16. package/text-effect-cases.json +835 -835
  17. package/tools/parity-core.mjs +122 -122
  18. package/tools/parity.mjs +86 -86
  19. package/vectors/README.md +103 -103
  20. package/vectors/accessibility.expected.json +67 -67
  21. package/vectors/artistic-text.expected.json +84 -84
  22. package/vectors/asymmetric-borders.expected.json +29 -29
  23. package/vectors/background-pattern-order.expected.json +95 -95
  24. package/vectors/basic-text.expected.json +29 -29
  25. package/vectors/color-blending-opacity.expected.json +47 -47
  26. package/vectors/crop.expected.json +32 -32
  27. package/vectors/embedded-font-woff.expected.json +57 -57
  28. package/vectors/extreme-aspect-ratios.expected.json +29 -29
  29. package/vectors/filter-effects.expected.json +33 -33
  30. package/vectors/flip.expected.json +47 -47
  31. package/vectors/frame-shapes.expected.json +73 -73
  32. package/vectors/full-monty-composite.expected.json +96 -96
  33. package/vectors/golden/exceptions.json +3 -3
  34. package/vectors/groups-and-parallax.expected.json +90 -90
  35. package/vectors/image-fill.expected.json +54 -54
  36. package/vectors/interactive-chained-actions.expected.json +77 -77
  37. package/vectors/interactive-hover.expected.json +36 -36
  38. package/vectors/interactive.expected.json +121 -121
  39. package/vectors/layer-blur.expected.json +48 -48
  40. package/vectors/layer-grain.expected.json +52 -52
  41. package/vectors/layer-ordering-zindex.expected.json +62 -62
  42. package/vectors/legacy-text-chunk.expected.json +29 -29
  43. package/vectors/media-filters.expected.json +50 -50
  44. package/vectors/multi-container-layout.expected.json +45 -45
  45. package/vectors/multilang-cjk-rtl.expected.json +30 -30
  46. package/vectors/nested-groups.expected.json +68 -68
  47. package/vectors/palettes.expected.json +57 -57
  48. package/vectors/parallax-infinite.expected.json +39 -39
  49. package/vectors/pattern-color-roles.expected.json +68 -68
  50. package/vectors/reedit-english.expected.json +45 -45
  51. package/vectors/reveal-and-play.expected.json +107 -107
  52. package/vectors/shadow-effects.expected.json +34 -34
  53. package/vectors/shape-shadows.expected.json +62 -62
  54. package/vectors/strokes-and-borders.expected.json +31 -31
  55. package/vectors/text-runs-precalculated.expected.json +46 -46
  56. package/vectors/transparent-background.expected.json +30 -30
  57. package/vectors/typography-styling.expected.json +34 -34
@@ -0,0 +1,6 @@
1
+ {
2
+ "description": "Known-answer cases for the canonical form (BINARY_SPEC 5.1). Parse \"input\" with the JSON parser the implementation really uses, serialise it, and compare the UTF-8 bytes with \"expected\". Each entry of \"outOfRange\" is metadata holding a number beyond +/-(2^53 - 1): it has no canonical form and its signature is invalid.",
3
+ "input": {"signature":"dropped","key_version":"dropped","timestamp":5,"creator_user_id":"dropped","nested":{"signature":"kept","timestamp":1},"integralFloat":2.0,"negativeZero":-0.0,"hundred":100.0,"half":0.5,"roundsDown":0.1234564,"decimalTieIsBelowInBinary":0.1234565,"tieAbove":1.0000005,"justBelowTie":1.0000004999999999,"negativeTie":-2.0000005,"binaryNoise":0.30000000000000004,"tinyPositive":1e-7,"tinyNegative":-1e-7,"smallestKept":1e-6,"roundsToSmallest":8.345e-7,"denormal":5e-324,"sixDecimals":123456.7890125,"exactBinaryTie":0.0078125,"short":4.35,"maxSafeInteger":9007199254740991,"minSafeInteger":-9007199254740991,"é":1,"z":1,"😀":1,"\uffff":1,"string":"Zürich \u2028 \u007f \u0001 \"q\" \\ / 😀","array":[1.10,{"b":1,"a":2},null,true,false]},
4
+ "expected": "{\"array\":[1.1,{\"a\":2,\"b\":1},null,true,false],\"binaryNoise\":0.3,\"decimalTieIsBelowInBinary\":0.123456,\"denormal\":0,\"exactBinaryTie\":0.007813,\"half\":0.5,\"hundred\":100,\"integralFloat\":2,\"justBelowTie\":1,\"maxSafeInteger\":9007199254740991,\"minSafeInteger\":-9007199254740991,\"negativeTie\":-2.000001,\"negativeZero\":0,\"nested\":{\"signature\":\"kept\",\"timestamp\":1},\"roundsDown\":0.123456,\"roundsToSmallest\":0.000001,\"short\":4.35,\"sixDecimals\":123456.789012,\"smallestKept\":0.000001,\"string\":\"Zürich \u2028 \u007f \\u0001 \\\"q\\\" \\\\ / 😀\",\"tieAbove\":1.000001,\"tinyNegative\":0,\"tinyPositive\":0,\"z\":1,\"é\":1,\"\uffff\":1,\"😀\":1}",
5
+ "outOfRange": [{"n":9007199254740992},{"n":-9007199254740992},{"n":9007199254740993},{"n":18446744073709551615},{"n":1e21},{"n":-1.5e300},{"slots":[{"style":{"x":1,"deep":[0.5,1e16]}}]}]
6
+ }
@@ -1,32 +1,32 @@
1
- [
2
- { "name": "linear translate", "duration": 2,
3
- "keyframes": [{ "t": 0, "x": 0 }, { "t": 2, "x": 100 }],
4
- "samples": [{ "time": 0, "expect": { "x": 0, "y": 0, "r": 0, "s": 1, "o": 1, "b": 0 } }, { "time": 1, "expect": { "x": 50 } }, { "time": 2, "expect": { "x": 100 } }] },
5
- { "name": "ease-in on the left frame", "duration": 1,
6
- "keyframes": [{ "t": 0, "x": 0, "e": "ease-in" }, { "t": 1, "x": 100 }],
7
- "samples": [{ "time": 0.5, "expect": { "x": 31.5357 } }] },
8
- { "name": "bezier tuple equals ease-in-out", "duration": 1,
9
- "keyframes": [{ "t": 0, "r": 0, "e": [0.42, 0, 0.58, 1] }, { "t": 1, "r": 360 }],
10
- "samples": [{ "time": 0.25, "expect": { "r": 46.4983 } }, { "time": 0.5, "expect": { "r": 180 } }] },
11
- { "name": "steps(1, end) holds the left value", "duration": 1,
12
- "keyframes": [{ "t": 0, "s": 1, "e": "steps(1, end)" }, { "t": 1, "s": 2 }],
13
- "samples": [{ "time": 0.99, "expect": { "s": 1 } }, { "time": 1, "expect": { "s": 2 } }] },
14
- { "name": "first frame after 0 starts from the base", "duration": 4,
15
- "keyframes": [{ "t": 2, "y": 40 }, { "t": 4, "y": 80 }],
16
- "samples": [{ "time": 1, "expect": { "y": 20 } }, { "time": 3, "expect": { "y": 60 } }] },
17
- { "name": "last frame before the end holds to the base", "duration": 4,
18
- "keyframes": [{ "t": 0, "x": 10 }, { "t": 2, "x": 30 }],
19
- "samples": [{ "time": 3, "expect": { "x": 15 } }] },
20
- { "name": "opacity only in some frames", "duration": 2,
21
- "keyframes": [{ "t": 0, "x": 0 }, { "t": 1, "x": 10, "o": 0 }, { "t": 2, "x": 20 }],
22
- "samples": [{ "time": 0.5, "expect": { "o": 0.5, "x": 5 } }, { "time": 1.5, "expect": { "o": 0.5 } }] },
23
- { "name": "opacity above 1 is returned unclamped", "duration": 1,
24
- "keyframes": [{ "t": 0, "o": 1.5 }, { "t": 1, "o": 0.5 }],
25
- "samples": [{ "time": 0, "expect": { "o": 1.5 } }, { "time": 0.5, "expect": { "o": 1 } }] },
26
- { "name": "blur interpolates from none", "duration": 1,
27
- "keyframes": [{ "t": 0 }, { "t": 1, "b": 8 }],
28
- "samples": [{ "time": 0.5, "expect": { "b": 4 } }] },
29
- { "name": "time past the duration clamps", "duration": 1,
30
- "keyframes": [{ "t": 0, "x": 0 }, { "t": 1, "x": 5 }],
31
- "samples": [{ "time": 7, "expect": { "x": 5 } }] }
32
- ]
1
+ [
2
+ { "name": "linear translate", "duration": 2,
3
+ "keyframes": [{ "t": 0, "x": 0 }, { "t": 2, "x": 100 }],
4
+ "samples": [{ "time": 0, "expect": { "x": 0, "y": 0, "r": 0, "s": 1, "o": 1, "b": 0 } }, { "time": 1, "expect": { "x": 50 } }, { "time": 2, "expect": { "x": 100 } }] },
5
+ { "name": "ease-in on the left frame", "duration": 1,
6
+ "keyframes": [{ "t": 0, "x": 0, "e": "ease-in" }, { "t": 1, "x": 100 }],
7
+ "samples": [{ "time": 0.5, "expect": { "x": 31.5357 } }] },
8
+ { "name": "bezier tuple equals ease-in-out", "duration": 1,
9
+ "keyframes": [{ "t": 0, "r": 0, "e": [0.42, 0, 0.58, 1] }, { "t": 1, "r": 360 }],
10
+ "samples": [{ "time": 0.25, "expect": { "r": 46.4983 } }, { "time": 0.5, "expect": { "r": 180 } }] },
11
+ { "name": "steps(1, end) holds the left value", "duration": 1,
12
+ "keyframes": [{ "t": 0, "s": 1, "e": "steps(1, end)" }, { "t": 1, "s": 2 }],
13
+ "samples": [{ "time": 0.99, "expect": { "s": 1 } }, { "time": 1, "expect": { "s": 2 } }] },
14
+ { "name": "first frame after 0 starts from the base", "duration": 4,
15
+ "keyframes": [{ "t": 2, "y": 40 }, { "t": 4, "y": 80 }],
16
+ "samples": [{ "time": 1, "expect": { "y": 20 } }, { "time": 3, "expect": { "y": 60 } }] },
17
+ { "name": "last frame before the end holds to the base", "duration": 4,
18
+ "keyframes": [{ "t": 0, "x": 10 }, { "t": 2, "x": 30 }],
19
+ "samples": [{ "time": 3, "expect": { "x": 15 } }] },
20
+ { "name": "opacity only in some frames", "duration": 2,
21
+ "keyframes": [{ "t": 0, "x": 0 }, { "t": 1, "x": 10, "o": 0 }, { "t": 2, "x": 20 }],
22
+ "samples": [{ "time": 0.5, "expect": { "o": 0.5, "x": 5 } }, { "time": 1.5, "expect": { "o": 0.5 } }] },
23
+ { "name": "opacity above 1 is returned unclamped", "duration": 1,
24
+ "keyframes": [{ "t": 0, "o": 1.5 }, { "t": 1, "o": 0.5 }],
25
+ "samples": [{ "time": 0, "expect": { "o": 1.5 } }, { "time": 0.5, "expect": { "o": 1 } }] },
26
+ { "name": "blur interpolates from none", "duration": 1,
27
+ "keyframes": [{ "t": 0 }, { "t": 1, "b": 8 }],
28
+ "samples": [{ "time": 0.5, "expect": { "b": 4 } }] },
29
+ { "name": "time past the duration clamps", "duration": 1,
30
+ "keyframes": [{ "t": 0, "x": 0 }, { "t": 1, "x": 5 }],
31
+ "samples": [{ "time": 7, "expect": { "x": 5 } }] }
32
+ ]
package/keys.json CHANGED
@@ -1,22 +1,22 @@
1
- {
2
- "keys": [
3
- {
4
- "kid": "v1",
5
- "jwk": {
6
- "kty": "EC",
7
- "crv": "P-256",
8
- "x": "5Qavr4M_npVognquI5k5D9K8wcXBXM9Z0mZHjqyehAs",
9
- "y": "oh7rz5Q7SlZT_ms2buyOw0bPX77QsXimc0X92Ymj2_o"
10
- }
11
- },
12
- {
13
- "kid": "v2",
14
- "jwk": {
15
- "kty": "EC",
16
- "crv": "P-256",
17
- "x": "pRSLtFHe9p8sR8jyqP5eoaBGbHdJgjjrdClda2lNp4A",
18
- "y": "oopYYhgja8m2iAlSMPigeWw-F72KJLNCRFQzlyWdt2I"
19
- }
20
- }
21
- ]
22
- }
1
+ {
2
+ "keys": [
3
+ {
4
+ "kid": "v1",
5
+ "jwk": {
6
+ "kty": "EC",
7
+ "crv": "P-256",
8
+ "x": "5Qavr4M_npVognquI5k5D9K8wcXBXM9Z0mZHjqyehAs",
9
+ "y": "oh7rz5Q7SlZT_ms2buyOw0bPX77QsXimc0X92Ymj2_o"
10
+ }
11
+ },
12
+ {
13
+ "kid": "v2",
14
+ "jwk": {
15
+ "kty": "EC",
16
+ "crv": "P-256",
17
+ "x": "pRSLtFHe9p8sR8jyqP5eoaBGbHdJgjjrdClda2lNp4A",
18
+ "y": "oopYYhgja8m2iAlSMPigeWw-F72KJLNCRFQzlyWdt2I"
19
+ }
20
+ }
21
+ ]
22
+ }
package/marks-cases.json CHANGED
@@ -1,34 +1,34 @@
1
- [
2
- { "name": "two marks", "text": "a {hl}b{/hl} c {u}d{/u}", "known": ["hl", "u"], "valid": true,
3
- "runs": [{ "text": "a " }, { "text": "b", "mark": "hl" }, { "text": " c " }, { "text": "d", "mark": "u" }], "plain": "a b c d" },
4
- { "name": "escaped braces", "text": "x {{hl}} y }}", "known": ["hl"], "valid": true,
5
- "runs": [{ "text": "x {hl} y }" }], "plain": "x {hl} y }" },
6
- { "name": "escaped braces inside a mark", "text": "{hl}a {{b}}{/hl}", "known": ["hl"], "valid": true,
7
- "runs": [{ "text": "a {b}", "mark": "hl" }], "plain": "a {b}" },
8
- { "name": "unknown name is text", "text": "a {xx}b{/xx}", "known": ["hl"], "valid": false,
9
- "runs": [{ "text": "a {xx}b{/xx}" }], "plain": "a {xx}b{/xx}" },
10
- { "name": "unclosed runs to the end", "text": "a {hl}b c", "known": ["hl"], "valid": false,
11
- "runs": [{ "text": "a " }, { "text": "b c", "mark": "hl" }], "plain": "a b c" },
12
- { "name": "nested is not allowed", "text": "{hl}a {u}b{/u}{/hl}", "known": ["hl", "u"], "valid": false,
13
- "runs": [{ "text": "a {u}b{/u}", "mark": "hl" }] },
14
- { "name": "nested, and the inner one is the only one closed", "text": "{hl}a {u}b{/u}", "known": ["hl", "u"], "valid": false },
15
- { "name": "overlapping is not allowed", "text": "{hl}a {u}b{/hl}c{/u}", "known": ["hl", "u"], "valid": false },
16
- { "name": "close without open", "text": "a{/hl}b", "known": ["hl"], "valid": false,
17
- "runs": [{ "text": "a{/hl}b" }], "plain": "a{/hl}b" },
18
- { "name": "lone closing brace", "text": "a } b", "known": [], "valid": false },
19
- { "name": "lone opening brace", "text": "a { b", "known": [], "valid": false },
20
- { "name": "empty", "text": "", "known": ["hl"], "valid": true, "runs": [], "plain": "" },
21
- { "name": "mark spans a line break", "text": "a {hl}b\nc{/hl} d", "known": ["hl"], "valid": true,
22
- "runs": [{ "text": "a " }, { "text": "b\nc", "mark": "hl" }, { "text": " d" }], "plain": "a b\nc d" },
23
- { "name": "es", "text": "Te irás. {hl}No te llevarás nada.{/hl}", "known": ["hl"], "valid": true, "plain": "Te irás. No te llevarás nada." },
24
- { "name": "en", "text": "You will leave. {hl}You will take nothing.{/hl}", "known": ["hl"], "valid": true },
25
- { "name": "pt", "text": "Você partirá. {hl}Não levará nada.{/hl}", "known": ["hl"], "valid": true },
26
- { "name": "fr", "text": "Tu partiras. {hl}Tu n'emporteras rien.{/hl}", "known": ["hl"], "valid": true },
27
- { "name": "de", "text": "Du wirst gehen. {hl}Du nimmst nichts mit.{/hl}", "known": ["hl"], "valid": true },
28
- { "name": "it", "text": "Te ne andrai. {hl}Non porterai nulla.{/hl}", "known": ["hl"], "valid": true },
29
- { "name": "ru", "text": "Ты уйдёшь. {hl}Ты ничего не возьмёшь.{/hl}", "known": ["hl"], "valid": true },
30
- { "name": "ko", "text": "당신은 떠날 것입니다. {hl}아무것도 가져가지 못합니다.{/hl}", "known": ["hl"], "valid": true },
31
- { "name": "ja", "text": "あなたは去る。{hl}何も持っていけない。{/hl}", "known": ["hl"], "valid": true, "plain": "あなたは去る。何も持っていけない。" },
32
- { "name": "ar", "text": "سترحل. {hl}لن تأخذ شيئًا.{/hl}", "known": ["hl"], "valid": true },
33
- { "name": "tr", "text": "Gideceksin. {hl}Hiçbir şey götüremezsin.{/hl}", "known": ["hl"], "valid": true }
34
- ]
1
+ [
2
+ { "name": "two marks", "text": "a {hl}b{/hl} c {u}d{/u}", "known": ["hl", "u"], "valid": true,
3
+ "runs": [{ "text": "a " }, { "text": "b", "mark": "hl" }, { "text": " c " }, { "text": "d", "mark": "u" }], "plain": "a b c d" },
4
+ { "name": "escaped braces", "text": "x {{hl}} y }}", "known": ["hl"], "valid": true,
5
+ "runs": [{ "text": "x {hl} y }" }], "plain": "x {hl} y }" },
6
+ { "name": "escaped braces inside a mark", "text": "{hl}a {{b}}{/hl}", "known": ["hl"], "valid": true,
7
+ "runs": [{ "text": "a {b}", "mark": "hl" }], "plain": "a {b}" },
8
+ { "name": "unknown name is text", "text": "a {xx}b{/xx}", "known": ["hl"], "valid": false,
9
+ "runs": [{ "text": "a {xx}b{/xx}" }], "plain": "a {xx}b{/xx}" },
10
+ { "name": "unclosed runs to the end", "text": "a {hl}b c", "known": ["hl"], "valid": false,
11
+ "runs": [{ "text": "a " }, { "text": "b c", "mark": "hl" }], "plain": "a b c" },
12
+ { "name": "nested is not allowed", "text": "{hl}a {u}b{/u}{/hl}", "known": ["hl", "u"], "valid": false,
13
+ "runs": [{ "text": "a {u}b{/u}", "mark": "hl" }] },
14
+ { "name": "nested, and the inner one is the only one closed", "text": "{hl}a {u}b{/u}", "known": ["hl", "u"], "valid": false },
15
+ { "name": "overlapping is not allowed", "text": "{hl}a {u}b{/hl}c{/u}", "known": ["hl", "u"], "valid": false },
16
+ { "name": "close without open", "text": "a{/hl}b", "known": ["hl"], "valid": false,
17
+ "runs": [{ "text": "a{/hl}b" }], "plain": "a{/hl}b" },
18
+ { "name": "lone closing brace", "text": "a } b", "known": [], "valid": false },
19
+ { "name": "lone opening brace", "text": "a { b", "known": [], "valid": false },
20
+ { "name": "empty", "text": "", "known": ["hl"], "valid": true, "runs": [], "plain": "" },
21
+ { "name": "mark spans a line break", "text": "a {hl}b\nc{/hl} d", "known": ["hl"], "valid": true,
22
+ "runs": [{ "text": "a " }, { "text": "b\nc", "mark": "hl" }, { "text": " d" }], "plain": "a b\nc d" },
23
+ { "name": "es", "text": "Te irás. {hl}No te llevarás nada.{/hl}", "known": ["hl"], "valid": true, "plain": "Te irás. No te llevarás nada." },
24
+ { "name": "en", "text": "You will leave. {hl}You will take nothing.{/hl}", "known": ["hl"], "valid": true },
25
+ { "name": "pt", "text": "Você partirá. {hl}Não levará nada.{/hl}", "known": ["hl"], "valid": true },
26
+ { "name": "fr", "text": "Tu partiras. {hl}Tu n'emporteras rien.{/hl}", "known": ["hl"], "valid": true },
27
+ { "name": "de", "text": "Du wirst gehen. {hl}Du nimmst nichts mit.{/hl}", "known": ["hl"], "valid": true },
28
+ { "name": "it", "text": "Te ne andrai. {hl}Non porterai nulla.{/hl}", "known": ["hl"], "valid": true },
29
+ { "name": "ru", "text": "Ты уйдёшь. {hl}Ты ничего не возьмёшь.{/hl}", "known": ["hl"], "valid": true },
30
+ { "name": "ko", "text": "당신은 떠날 것입니다. {hl}아무것도 가져가지 못합니다.{/hl}", "known": ["hl"], "valid": true },
31
+ { "name": "ja", "text": "あなたは去る。{hl}何も持っていけない。{/hl}", "known": ["hl"], "valid": true, "plain": "あなたは去る。何も持っていけない。" },
32
+ { "name": "ar", "text": "سترحل. {hl}لن تأخذ شيئًا.{/hl}", "known": ["hl"], "valid": true },
33
+ { "name": "tr", "text": "Gideceksin. {hl}Hiçbir şey götüremezsin.{/hl}", "known": ["hl"], "valid": true }
34
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oim-media/spec",
3
- "version": "1.27.8",
3
+ "version": "1.27.9",
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",
@@ -18,6 +18,7 @@
18
18
  "CANONICAL_SPEC.md",
19
19
  "README.md",
20
20
  "marks-cases.json",
21
+ "canonical-cases.json",
21
22
  "keyframe-cases.json",
22
23
  "action-cases.json",
23
24
  "pattern-cases.json",