@haiyue/animation-spec 0.2.0 → 0.3.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/package.json CHANGED
@@ -1,89 +1,93 @@
1
- {
2
- "name": "@haiyue/animation-spec",
3
- "version": "0.2.0",
4
- "private": false,
5
- "description": "Source-neutral HYA animation schemas, validation, binary codecs, and conversion adapters.",
6
- "license": "MIT",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/HaiyueStudio/Engine.git",
10
- "directory": "animation-spec"
11
- },
12
- "type": "module",
13
- "main": "dist/index.js",
14
- "module": "dist/index.js",
15
- "types": "dist/index.d.ts",
16
- "sideEffects": false,
17
- "engines": {
18
- "node": ">=22"
19
- },
20
- "publishConfig": {
21
- "access": "public",
22
- "tag": "latest"
23
- },
24
- "files": [
25
- "dist",
26
- "bin",
27
- "schema",
28
- "LICENSE",
29
- "README.md",
30
- "SPECIFICATION.md"
31
- ],
32
- "bin": {
33
- "hya-convert": "./bin/hya-lottie-convert.mjs",
34
- "hya-lottie-convert": "./bin/hya-lottie-convert.mjs",
35
- "hya-live2d-convert": "./bin/hya-live2d-convert.mjs",
36
- "hya-cubism-convert": "./bin/hya-live2d-convert.mjs"
37
- },
38
- "exports": {
39
- ".": {
40
- "types": "./dist/index.d.ts",
41
- "import": "./dist/index.js"
42
- },
43
- "./lottie": {
44
- "types": "./dist/lottie.d.ts",
45
- "import": "./dist/lottie.js"
46
- },
47
- "./native3d": {
48
- "types": "./dist/native3d.d.ts",
49
- "import": "./dist/native3d.js"
50
- },
51
- "./deformable2d": {
52
- "types": "./dist/deformable2d.d.ts",
53
- "import": "./dist/deformable2d.js"
54
- },
55
- "./cubism": {
56
- "types": "./dist/cubism.d.ts",
57
- "import": "./dist/cubism.js"
58
- },
59
- "./live2d": {
60
- "types": "./dist/live2d.d.ts",
61
- "import": "./dist/live2d.js"
62
- },
63
- "./conversion": {
64
- "types": "./dist/conversion.d.ts",
65
- "import": "./dist/conversion.js"
66
- },
67
- "./live2d/clip-baked": {
68
- "types": "./dist/live2d/clip-baked.d.ts",
69
- "import": "./dist/live2d/clip-baked.js"
70
- }
71
- },
72
- "scripts": {
73
- "build": "node ../scripts/build-rollup-once.mjs && rollup -c rollup.dts.config.js && node ../scripts/install-bundled-declarations.mjs animation-spec dist-declarations",
74
- "test": "npm run build && npm run build:conversion-tests && node --test --test-concurrency=1 \"test/**/*.test.mjs\"",
75
- "build:conversion-tests": "node -e \"require('node:fs').rmSync('dist-test', { recursive: true, force: true })\" && tsc -p tsconfig.conversion-tests.json",
76
- "typecheck": "tsc -p tsconfig.json --noEmit",
77
- "samples:generate": "node ../scripts/build-rollup-once.mjs && node scripts/generate-samples.mjs",
78
- "corpus:sync": "node ../scripts/hya-corpus/sync.mjs"
79
- },
80
- "devDependencies": {
81
- "@rollup/plugin-node-resolve": "^15.3.1",
82
- "rollup": "^4.0.0",
83
- "tslib": "^2.6.0",
84
- "typescript": "^5.2.0"
85
- },
86
- "dependencies": {
87
- "polygon-clipping": "^0.15.7"
88
- }
89
- }
1
+ {
2
+ "name": "@haiyue/animation-spec",
3
+ "version": "0.3.0",
4
+ "private": false,
5
+ "description": "Source-neutral HYA animation schemas, validation, binary codecs, and conversion adapters.",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/HaiyueStudio/Engine.git",
10
+ "directory": "animation-spec"
11
+ },
12
+ "type": "module",
13
+ "main": "dist/index.js",
14
+ "module": "dist/index.js",
15
+ "types": "dist/index.d.ts",
16
+ "sideEffects": false,
17
+ "engines": {
18
+ "node": ">=22"
19
+ },
20
+ "publishConfig": {
21
+ "access": "public",
22
+ "tag": "latest"
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "bin",
27
+ "schema",
28
+ "LICENSE",
29
+ "README.md",
30
+ "SPECIFICATION.md"
31
+ ],
32
+ "bin": {
33
+ "hya-convert": "./bin/hya-lottie-convert.mjs",
34
+ "hya-lottie-convert": "./bin/hya-lottie-convert.mjs",
35
+ "hya-live2d-convert": "./bin/hya-live2d-convert.mjs",
36
+ "hya-cubism-convert": "./bin/hya-live2d-convert.mjs"
37
+ },
38
+ "exports": {
39
+ ".": {
40
+ "types": "./dist/index.d.ts",
41
+ "import": "./dist/index.js"
42
+ },
43
+ "./lottie": {
44
+ "types": "./dist/lottie.d.ts",
45
+ "import": "./dist/lottie.js"
46
+ },
47
+ "./native3d": {
48
+ "types": "./dist/native3d.d.ts",
49
+ "import": "./dist/native3d.js"
50
+ },
51
+ "./deformable2d": {
52
+ "types": "./dist/deformable2d.d.ts",
53
+ "import": "./dist/deformable2d.js"
54
+ },
55
+ "./cubism": {
56
+ "types": "./dist/cubism.d.ts",
57
+ "import": "./dist/cubism.js"
58
+ },
59
+ "./live2d": {
60
+ "types": "./dist/live2d.d.ts",
61
+ "import": "./dist/live2d.js"
62
+ },
63
+ "./conversion": {
64
+ "types": "./dist/conversion.d.ts",
65
+ "import": "./dist/conversion.js"
66
+ },
67
+ "./live2d/clip-baked": {
68
+ "types": "./dist/live2d/clip-baked.d.ts",
69
+ "import": "./dist/live2d/clip-baked.js"
70
+ },
71
+ "./hya-production": {
72
+ "types": "./dist/hya-production.d.ts",
73
+ "import": "./dist/hya-production.js"
74
+ }
75
+ },
76
+ "scripts": {
77
+ "build": "node ../scripts/build-rollup-once.mjs && rollup -c rollup.dts.config.js && node ../scripts/install-bundled-declarations.mjs animation-spec dist-declarations",
78
+ "test": "npm run build && npm run build:conversion-tests && node --test --test-concurrency=1 \"test/**/*.test.mjs\"",
79
+ "build:conversion-tests": "node -e \"require('node:fs').rmSync('dist-test', { recursive: true, force: true })\" && tsc -p tsconfig.conversion-tests.json",
80
+ "typecheck": "tsc -p tsconfig.json --noEmit",
81
+ "samples:generate": "node ../scripts/build-rollup-once.mjs && node scripts/generate-samples.mjs",
82
+ "corpus:sync": "node ../scripts/hya-corpus/sync.mjs"
83
+ },
84
+ "devDependencies": {
85
+ "@rollup/plugin-node-resolve": "^15.3.1",
86
+ "rollup": "^4.0.0",
87
+ "tslib": "^2.6.0",
88
+ "typescript": "^5.2.0"
89
+ },
90
+ "dependencies": {
91
+ "polygon-clipping": "^0.15.7"
92
+ }
93
+ }
@@ -8,8 +8,10 @@
8
8
  "required": true,
9
9
  "carrierFormat": "haiyue-animation",
10
10
  "carrierVersion": "1.0",
11
- "binaryWriteVersion": 2,
12
- "binaryReadVersions": [1, 2],
11
+ "binaryWriteVersion": 3,
12
+ "binaryReadVersions": [
13
+ 3
14
+ ],
13
15
  "coreNodesPolicy": "must-be-empty",
14
16
  "coreTracksPolicy": "must-be-empty"
15
17
  },
@@ -52,7 +54,11 @@
52
54
  "engineRootExportChange": false
53
55
  },
54
56
  "bindings": {
55
- "targets": ["node-id", "node-path", "slot"],
57
+ "targets": [
58
+ "node-id",
59
+ "node-path",
60
+ "slot"
61
+ ],
56
62
  "paths": [
57
63
  "transform.translation",
58
64
  "transform.rotation",
@@ -60,28 +66,70 @@
60
66
  "morph.weights",
61
67
  "property"
62
68
  ],
63
- "interpolations": ["step", "linear", "cubic-spline"],
69
+ "interpolations": [
70
+ "step",
71
+ "linear",
72
+ "cubic-spline"
73
+ ],
64
74
  "materialComponent": "material3d",
65
75
  "materialProperties": {
66
- "baseColorFactor": { "valueType": "vec4", "valueSize": 4 },
67
- "metallicFactor": { "valueType": "scalar", "valueSize": 1 },
68
- "roughnessFactor": { "valueType": "scalar", "valueSize": 1 },
69
- "emissiveFactor": { "valueType": "vec3", "valueSize": 3 },
70
- "alphaCutoff": { "valueType": "scalar", "valueSize": 1 }
76
+ "baseColorFactor": {
77
+ "valueType": "vec4",
78
+ "valueSize": 4
79
+ },
80
+ "metallicFactor": {
81
+ "valueType": "scalar",
82
+ "valueSize": 1
83
+ },
84
+ "roughnessFactor": {
85
+ "valueType": "scalar",
86
+ "valueSize": 1
87
+ },
88
+ "emissiveFactor": {
89
+ "valueType": "vec3",
90
+ "valueSize": 3
91
+ },
92
+ "alphaCutoff": {
93
+ "valueType": "scalar",
94
+ "valueSize": 1
95
+ }
71
96
  },
72
97
  "cameraComponent": "camera3d",
73
98
  "cameraProperties": {
74
- "fovYRadians": { "valueType": "scalar", "valueSize": 1 },
75
- "near": { "valueType": "scalar", "valueSize": 1 },
76
- "far": { "valueType": "scalar", "valueSize": 1 },
77
- "orthoHeight": { "valueType": "scalar", "valueSize": 1 }
99
+ "fovYRadians": {
100
+ "valueType": "scalar",
101
+ "valueSize": 1
102
+ },
103
+ "near": {
104
+ "valueType": "scalar",
105
+ "valueSize": 1
106
+ },
107
+ "far": {
108
+ "valueType": "scalar",
109
+ "valueSize": 1
110
+ },
111
+ "orthoHeight": {
112
+ "valueType": "scalar",
113
+ "valueSize": 1
114
+ }
78
115
  }
79
116
  },
80
117
  "resources": {
81
118
  "modelCoreType": "binary",
82
- "modelMimeTypes": ["model/gltf-binary", "model/gltf+json"],
83
- "deliveryUriSchemes": ["package-relative", "https", "data"],
84
- "forbiddenDeliveryUriSchemes": ["blob", "file", "javascript"],
119
+ "modelMimeTypes": [
120
+ "model/gltf-binary",
121
+ "model/gltf+json"
122
+ ],
123
+ "deliveryUriSchemes": [
124
+ "package-relative",
125
+ "https",
126
+ "data"
127
+ ],
128
+ "forbiddenDeliveryUriSchemes": [
129
+ "blob",
130
+ "file",
131
+ "javascript"
132
+ ],
85
133
  "packageAssetPath": "assets/<sha256>.<ext>",
86
134
  "packageManifest": "manifest.json",
87
135
  "packageDeterministic": true,
@@ -114,17 +162,65 @@
114
162
  }
115
163
  ],
116
164
  "diagnostics": [
117
- { "code": "E_ANIMATION_INVALID_BINARY", "path": "$", "meaning": "unknown-or-invalid-container-version" },
118
- { "code": "E_ANIMATION_UNSUPPORTED_VERSION", "path": "$.version", "meaning": "unsupported-core-document-version" },
119
- { "code": "E_ANIMATION_MISSING_EXTENSION", "path": "$.extensionsRequired", "meaning": "missing-or-unknown-required-extension-major" },
120
- { "code": "E_ANIMATION_3D_INVALID_PAYLOAD", "path": "$.extensions.org.haiyue.animation-3d@1", "meaning": "invalid-3d-extension-payload" },
121
- { "code": "E_ANIMATION_3D_MIXED_DIMENSIONS", "path": "$.nodes", "meaning": "2d-core-content-present-in-3d-carrier" },
122
- { "code": "E_ANIMATION_3D_UNSUPPORTED_FEATURE", "path": "$.extensions.org.haiyue.animation-3d@1", "meaning": "recognized-but-unsupported-3d-feature" },
123
- { "code": "E_ANIMATION_3D_UNKNOWN_RESOURCE", "path": "$.extensions.org.haiyue.animation-3d@1.nodes", "meaning": "missing-model-material-or-texture-reference" },
124
- { "code": "E_ANIMATION_3D_BINDING_MISMATCH", "path": "$.extensions.org.haiyue.animation-3d@1.clips", "meaning": "binding-value-width-or-target-mismatch" },
125
- { "code": "E_ANIMATION_3D_LIMIT_EXCEEDED", "path": "$.extensions.org.haiyue.animation-3d@1", "meaning": "3d-allocation-budget-exceeded" },
126
- { "code": "E_PROJECT_INVALID_FORMAT", "path": "$.format", "meaning": "unknown-project-family" },
127
- { "code": "E_PROJECT_UNSUPPORTED_VERSION", "path": "$.schemaVersion", "meaning": "unsupported-project-schema-version" },
128
- { "code": "E_PROJECT_MIXED_DIMENSIONS", "path": "$.mode", "meaning": "mixed-project-mode-is-not-supported" }
165
+ {
166
+ "code": "E_ANIMATION_INVALID_BINARY",
167
+ "path": "$",
168
+ "meaning": "unknown-or-invalid-container-version"
169
+ },
170
+ {
171
+ "code": "E_ANIMATION_UNSUPPORTED_VERSION",
172
+ "path": "$.version",
173
+ "meaning": "unsupported-core-document-version"
174
+ },
175
+ {
176
+ "code": "E_ANIMATION_MISSING_EXTENSION",
177
+ "path": "$.extensionsRequired",
178
+ "meaning": "missing-or-unknown-required-extension-major"
179
+ },
180
+ {
181
+ "code": "E_ANIMATION_3D_INVALID_PAYLOAD",
182
+ "path": "$.extensions.org.haiyue.animation-3d@1",
183
+ "meaning": "invalid-3d-extension-payload"
184
+ },
185
+ {
186
+ "code": "E_ANIMATION_3D_MIXED_DIMENSIONS",
187
+ "path": "$.nodes",
188
+ "meaning": "2d-core-content-present-in-3d-carrier"
189
+ },
190
+ {
191
+ "code": "E_ANIMATION_3D_UNSUPPORTED_FEATURE",
192
+ "path": "$.extensions.org.haiyue.animation-3d@1",
193
+ "meaning": "recognized-but-unsupported-3d-feature"
194
+ },
195
+ {
196
+ "code": "E_ANIMATION_3D_UNKNOWN_RESOURCE",
197
+ "path": "$.extensions.org.haiyue.animation-3d@1.nodes",
198
+ "meaning": "missing-model-material-or-texture-reference"
199
+ },
200
+ {
201
+ "code": "E_ANIMATION_3D_BINDING_MISMATCH",
202
+ "path": "$.extensions.org.haiyue.animation-3d@1.clips",
203
+ "meaning": "binding-value-width-or-target-mismatch"
204
+ },
205
+ {
206
+ "code": "E_ANIMATION_3D_LIMIT_EXCEEDED",
207
+ "path": "$.extensions.org.haiyue.animation-3d@1",
208
+ "meaning": "3d-allocation-budget-exceeded"
209
+ },
210
+ {
211
+ "code": "E_PROJECT_INVALID_FORMAT",
212
+ "path": "$.format",
213
+ "meaning": "unknown-project-family"
214
+ },
215
+ {
216
+ "code": "E_PROJECT_UNSUPPORTED_VERSION",
217
+ "path": "$.schemaVersion",
218
+ "meaning": "unsupported-project-schema-version"
219
+ },
220
+ {
221
+ "code": "E_PROJECT_MIXED_DIMENSIONS",
222
+ "path": "$.mode",
223
+ "meaning": "mixed-project-mode-is-not-supported"
224
+ }
129
225
  ]
130
226
  }
@@ -222,8 +222,8 @@
222
222
  "easing": { "type": "array", "items": { "type": "number", "minimum": 0, "maximum": 1 }, "minItems": 4, "maxItems": 4 },
223
223
  "smoothness": { "type": "number", "minimum": 0, "maximum": 1 },
224
224
  "randomSeed": { "type": "integer", "minimum": 0, "maximum": 4294967295 },
225
- "startTrack": { "$ref": "#/$defs/vectorTrack" }, "endTrack": { "$ref": "#/$defs/vectorTrack" },
226
- "offsetTrack": { "$ref": "#/$defs/vectorTrack" }, "amountTrack": { "$ref": "#/$defs/vectorTrack" }
225
+ "startTrack": { "$ref": "#/$defs/vectorValueTrack" }, "endTrack": { "$ref": "#/$defs/vectorValueTrack" },
226
+ "offsetTrack": { "$ref": "#/$defs/vectorValueTrack" }, "amountTrack": { "$ref": "#/$defs/vectorValueTrack" }
227
227
  }, "additionalProperties": false
228
228
  },
229
229
  "textAnimator": {
@@ -232,9 +232,9 @@
232
232
  "selector": { "$ref": "#/$defs/textSelector" }, "position": { "$ref": "#/$defs/vec2" }, "scale": { "$ref": "#/$defs/vec2" },
233
233
  "rotation": { "type": "number" }, "opacity": { "type": "number", "minimum": 0, "maximum": 1 },
234
234
  "fillColor": { "$ref": "#/$defs/color" }, "tracking": { "type": "number" },
235
- "positionTrack": { "$ref": "#/$defs/vectorTrack" }, "scaleTrack": { "$ref": "#/$defs/vectorTrack" },
236
- "rotationTrack": { "$ref": "#/$defs/vectorTrack" }, "opacityTrack": { "$ref": "#/$defs/vectorTrack" },
237
- "fillColorTrack": { "$ref": "#/$defs/vectorTrack" }, "trackingTrack": { "$ref": "#/$defs/vectorTrack" }
235
+ "positionTrack": { "$ref": "#/$defs/vectorValueTrack" }, "scaleTrack": { "$ref": "#/$defs/vectorValueTrack" },
236
+ "rotationTrack": { "$ref": "#/$defs/vectorValueTrack" }, "opacityTrack": { "$ref": "#/$defs/vectorValueTrack" },
237
+ "fillColorTrack": { "$ref": "#/$defs/vectorValueTrack" }, "trackingTrack": { "$ref": "#/$defs/vectorValueTrack" }
238
238
  }, "additionalProperties": false
239
239
  },
240
240
  "particle2d": {
@@ -274,7 +274,8 @@
274
274
  "volume": { "type": "number", "minimum": 0, "maximum": 1 },
275
275
  "loop": { "type": "boolean" },
276
276
  "startOffset": { "type": "number", "minimum": 0 },
277
- "playbackRate": { "type": "number", "exclusiveMinimum": 0 }
277
+ "playbackRate": { "type": "number", "exclusiveMinimum": 0 },
278
+ "playbackProfile": { "enum": ["buffer", "stream"], "default": "buffer" }
278
279
  },
279
280
  "additionalProperties": false
280
281
  },
@@ -488,31 +489,31 @@
488
489
  "black": { "type": "array", "minItems": 3, "maxItems": 3, "items": { "type": "number", "minimum": 0, "maximum": 1 } },
489
490
  "white": { "type": "array", "minItems": 3, "maxItems": 3, "items": { "type": "number", "minimum": 0, "maximum": 1 } },
490
491
  "amount": { "type": "number", "minimum": 0, "maximum": 1 },
491
- "blackTrack": { "$ref": "#/$defs/vectorTrack" }, "whiteTrack": { "$ref": "#/$defs/vectorTrack" }, "amountTrack": { "$ref": "#/$defs/vectorTrack" }
492
+ "blackTrack": { "$ref": "#/$defs/vectorValueTrack" }, "whiteTrack": { "$ref": "#/$defs/vectorValueTrack" }, "amountTrack": { "$ref": "#/$defs/vectorValueTrack" }
492
493
  }, "additionalProperties": false
493
494
  },
494
495
  {
495
496
  "type": "object", "required": ["kind", "color"],
496
497
  "properties": {
497
498
  "kind": { "const": "fill" }, "color": { "$ref": "#/$defs/color" }, "opacity": { "type": "number", "minimum": 0, "maximum": 1 },
498
- "colorTrack": { "$ref": "#/$defs/vectorTrack" }, "opacityTrack": { "$ref": "#/$defs/vectorTrack" }
499
+ "colorTrack": { "$ref": "#/$defs/vectorValueTrack" }, "opacityTrack": { "$ref": "#/$defs/vectorValueTrack" }
499
500
  }, "additionalProperties": false
500
501
  },
501
502
  {
502
503
  "type": "object", "required": ["kind", "opacity"],
503
- "properties": { "kind": { "const": "opacity" }, "opacity": { "type": "number", "minimum": 0, "maximum": 1 }, "opacityTrack": { "$ref": "#/$defs/vectorTrack" } },
504
+ "properties": { "kind": { "const": "opacity" }, "opacity": { "type": "number", "minimum": 0, "maximum": 1 }, "opacityTrack": { "$ref": "#/$defs/vectorValueTrack" } },
504
505
  "additionalProperties": false
505
506
  },
506
507
  {
507
508
  "type": "object", "required": ["kind", "matrix"],
508
509
  "properties": {
509
510
  "kind": { "const": "color-matrix" }, "matrix": { "type": "array", "minItems": 20, "maxItems": 20, "items": { "type": "number" } },
510
- "matrixTrack": { "$ref": "#/$defs/vectorTrack" }
511
+ "matrixTrack": { "$ref": "#/$defs/vectorValueTrack" }
511
512
  }, "additionalProperties": false
512
513
  },
513
514
  {
514
515
  "type": "object", "required": ["kind", "radius"],
515
- "properties": { "kind": { "const": "blur" }, "radius": { "$ref": "#/$defs/nonNegativeVec2" }, "radiusTrack": { "$ref": "#/$defs/vectorTrack" } },
516
+ "properties": { "kind": { "const": "blur" }, "radius": { "$ref": "#/$defs/nonNegativeVec2" }, "radiusTrack": { "$ref": "#/$defs/vectorValueTrack" } },
516
517
  "additionalProperties": false
517
518
  },
518
519
  {
@@ -520,8 +521,8 @@
520
521
  "properties": {
521
522
  "kind": { "const": "drop-shadow" }, "color": { "$ref": "#/$defs/color" }, "opacity": { "type": "number", "minimum": 0, "maximum": 1 },
522
523
  "offset": { "$ref": "#/$defs/vec2" }, "blur": { "type": "number", "minimum": 0 },
523
- "colorTrack": { "$ref": "#/$defs/vectorTrack" }, "opacityTrack": { "$ref": "#/$defs/vectorTrack" },
524
- "offsetTrack": { "$ref": "#/$defs/vectorTrack" }, "blurTrack": { "$ref": "#/$defs/vectorTrack" }
524
+ "colorTrack": { "$ref": "#/$defs/vectorValueTrack" }, "opacityTrack": { "$ref": "#/$defs/vectorValueTrack" },
525
+ "offsetTrack": { "$ref": "#/$defs/vectorValueTrack" }, "blurTrack": { "$ref": "#/$defs/vectorValueTrack" }
525
526
  }, "additionalProperties": false
526
527
  }
527
528
  ]
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://haiyue.dev/schema/hya-composition-v1.json",
4
+ "title": "HYA composition envelope v1",
5
+ "description": "Editor shape aid. The source-neutral parser is normative for JSON safety, aggregate budgets, existing part formats, typed target addresses, dependencies and capability negotiation.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["format", "version", "parts", "targets"],
9
+ "properties": {
10
+ "format": {"const": "haiyue-composition"},
11
+ "version": {"const": 1},
12
+ "parts": {"type": "array", "maxItems": 16, "items": {"$ref": "#/$defs/part"}},
13
+ "targets": {"type": "array", "maxItems": 100000, "items": {"$ref": "#/$defs/target"}}
14
+ },
15
+ "$defs": {
16
+ "id": {"type": "string", "minLength": 1, "maxLength": 256, "pattern": "^[^\\u0000-\\u001f]+$"},
17
+ "extension": {"type": "string", "maxLength": 256, "pattern": "^[a-zA-Z0-9]+(?:[.-][a-zA-Z0-9]+)+@[1-9][0-9]*$"},
18
+ "part": {
19
+ "type": "object", "additionalProperties": false,
20
+ "required": ["id", "extension", "required", "requires", "dependencies", "document"],
21
+ "properties": {
22
+ "id": {"$ref": "#/$defs/id"},
23
+ "extension": {"$ref": "#/$defs/extension"},
24
+ "required": {"type": "boolean"},
25
+ "requires": {"type": "array", "maxItems": 64, "uniqueItems": true, "items": {"$ref": "#/$defs/extension"}},
26
+ "dependencies": {"type": "array", "maxItems": 16, "uniqueItems": true, "items": {"$ref": "#/$defs/id"}},
27
+ "document": {}
28
+ }
29
+ },
30
+ "target": {
31
+ "type": "object", "additionalProperties": false,
32
+ "required": ["id", "part", "kind", "address"],
33
+ "properties": {
34
+ "id": {"$ref": "#/$defs/id"},
35
+ "part": {"$ref": "#/$defs/id"},
36
+ "kind": {"enum": ["animation-node", "layout-node", "text-block", "asset", "state-input", "interaction-target", "semantic-node", "audio-cue"]},
37
+ "address": {"type": "array", "minItems": 1, "maxItems": 2, "items": {"$ref": "#/$defs/id"}}
38
+ }
39
+ }
40
+ }
41
+ }
@@ -11,7 +11,7 @@
11
11
  "extension": { "const": "org.haiyue.layout-2d@1" },
12
12
  "shaping": { "$ref": "#/$defs/shaping" },
13
13
  "assets": { "type": "array", "maxItems": 4096, "items": { "$ref": "#/$defs/asset" } },
14
- "textStyles": { "type": "array", "maxItems": 250000, "items": { "type": "object", "required": ["id", "fontAssets", "fontFamily", "fontWeight", "fontStyle", "fontSize", "lineHeight", "tracking", "alignment", "fills"] },
14
+ "textStyles": { "type": "array", "maxItems": 250000, "items": { "type": "object", "required": ["id", "fontAssets", "fontFamily", "fontWeight", "fontStyle", "fontSize", "lineHeight", "tracking", "alignment", "fills"] } },
15
15
  "textBlocks": { "type": "array", "maxItems": 250000, "items": { "type": "object", "required": ["id", "runs", "width", "height"] } },
16
16
  "artboards": { "type": "array", "maxItems": 8192, "items": { "$ref": "#/$defs/artboard" } },
17
17
  "instances": { "type": "array", "maxItems": 8192, "items": { "$ref": "#/$defs/instance" } }