@pixi-ui-editor/schema 0.1.1 → 0.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAgB,MAAM,mBAAmB,CAAC;AAKpE,eAAO,MAAM,sBAAsB,EAAG,CAAU,CAAC;AAGjD,eAAO,MAAM,qBAAqB,uIAAgE,CAAC;AACnG,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAKnE,QAAA,MAAM,SAAS,sgBAAuR,CAAC;AACvS,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,SAAS,CAAC,CAAC;AACvD,QAAA,MAAM,OAAO;;;;;EAAgK,CAAC;AAC9K,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,OAAO,CAAC,CAAC;AACnD,QAAA,MAAM,UAAU;;;;;EAAuU,CAAC;AACxV,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAC7D,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;EAA+Q,CAAC;AAC1S,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACvE,QAAA,MAAM,kBAAkB;;;;;;;;;;;;;;;;EAA2oB,CAAC;AACpqB,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAUnE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;EAAivB,CAAC;AACxxB,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAI3E,kGAAkG;AAClG,eAAO,MAAM,iBAAiB,qDAAsD,CAAC;AACrF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iB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,CAAC;AAC7E,qBAAa,6BAA8B,SAAQ,KAAK;IAAG,QAAQ,CAAC,IAAI,gCAAgC;gBAAa,OAAO,EAAE,MAAM;CAAoE;AAQxM,wBAAgB,cAAc,IAAI,MAAM,CAAgC;AAkBxE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAAqE;AA0G9I,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAAub;AAChgB,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,eAAe,CAAwL;AAmQ/Q,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAK+B;AAMtG,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,CAA+F;AAE1K,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -1,13 +1,20 @@
1
1
  import { Type } from "@sinclair/typebox";
2
2
  import Ajv from "ajv";
3
3
  import addFormats from "ajv-formats";
4
- export const CURRENT_SCHEMA_VERSION = 7;
4
+ import { applyPrefabNodePatch, materializePrefabInstance, PREFAB_NODE_PATH_SEPARATOR, resolvePrefabInstanceBaseNodes } from "./prefabs.js";
5
+ export const CURRENT_SCHEMA_VERSION = 17;
5
6
  const Id = Type.String({ format: "uuid" });
6
7
  const Name = Type.String({ minLength: 1 });
8
+ /**
9
+ * Ссылка на узел внутри инстанса пресета: собственный id узла либо путь по вложенным пресетам
10
+ * (`idA::prefab-node::idB`). Обычная нода сцены всегда использует первую форму; вторая появляется
11
+ * только у `parentId` локально добавленного узла и у `nodeId` property override. Разрешимость
12
+ * адреса проверяет семантическая валидация, структурная — только его форму.
13
+ */
14
+ const NodeAddress = Type.Union([Id, Type.String({ pattern: `^.+${PREFAB_NODE_PATH_SEPARATOR}.+$` })]);
7
15
  export const LayoutProfileIdSchema = Type.Union([Type.Literal("desktop"), Type.Literal("mobile")]);
8
- // width/height допускают любые значения: на растянутой оси (anchorMin < anchorMax) они хранят
9
- // дельту к якорному прямоугольнику родителя и могут быть нулевыми или отрицательными.
10
- // Для нерастянутой оси положительность размера проверяет semantic-валидация (NON_POSITIVE_SIZE).
16
+ // Unity RectTransform semantics in logical Canvas units: x/y are anchoredPosition and width/height
17
+ // are sizeDelta. A point axis needs a positive sizeDelta; a stretched axis may use negative insets.
11
18
  const Transform = Type.Object({ x: Type.Number(), y: Type.Number(), width: Type.Number(), height: Type.Number(), scaleX: Type.Number(), scaleY: Type.Number(), rotation: Type.Number(), pivotX: Type.Optional(Type.Number({ minimum: 0, maximum: 1 })), pivotY: Type.Optional(Type.Number({ minimum: 0, maximum: 1 })), anchorMinX: Type.Optional(Type.Number({ minimum: 0, maximum: 1 })), anchorMinY: Type.Optional(Type.Number({ minimum: 0, maximum: 1 })), anchorMaxX: Type.Optional(Type.Number({ minimum: 0, maximum: 1 })), anchorMaxY: Type.Optional(Type.Number({ minimum: 0, maximum: 1 })) });
12
19
  const Alignment = Type.Union([Type.Literal("upper-left"), Type.Literal("upper-center"), Type.Literal("upper-right"), Type.Literal("middle-left"), Type.Literal("middle-center"), Type.Literal("middle-right"), Type.Literal("lower-left"), Type.Literal("lower-center"), Type.Literal("lower-right")]);
13
20
  const Padding = Type.Object({ left: Type.Number({ minimum: 0 }), right: Type.Number({ minimum: 0 }), top: Type.Number({ minimum: 0 }), bottom: Type.Number({ minimum: 0 }) });
@@ -16,7 +23,9 @@ const LinearLayoutSettings = Type.Object({ padding: Padding, spacing: Type.Numbe
16
23
  const GridLayoutSettings = Type.Object({ padding: Padding, spacingX: Type.Number({ minimum: 0 }), spacingY: Type.Number({ minimum: 0 }), cellWidth: Type.Number({ exclusiveMinimum: 0 }), cellHeight: Type.Number({ exclusiveMinimum: 0 }), startCorner: Type.Union([Type.Literal("upper-left"), Type.Literal("upper-right"), Type.Literal("lower-left"), Type.Literal("lower-right")]), startAxis: Type.Union([Type.Literal("horizontal"), Type.Literal("vertical")]), childAlignment: Alignment, constraint: Type.Union([Type.Literal("flexible"), Type.Literal("fixed-column-count"), Type.Literal("fixed-row-count")]), constraintCount: Type.Optional(Type.Number({ exclusiveMinimum: 0 })) });
17
24
  const ProfiledLayout = (settings) => Type.Object({ base: settings, overrides: Type.Optional(Type.Partial(Type.Object({ desktop: Type.Partial(settings), mobile: Type.Partial(settings) }))) });
18
25
  const Override = Type.Object({ visible: Type.Optional(Type.Boolean()), transform: Type.Optional(Type.Partial(Transform)) });
19
- const NodeBase = Type.Object({ id: Id, name: Name, parentId: Type.Union([Id, Type.Null()]), children: Type.Array(Id), visible: Type.Boolean(), transform: Transform, layoutOverrides: Type.Optional(Type.Partial(Type.Object({ desktop: Override, mobile: Override }))), layoutItem: Type.Optional(LayoutItem), binding: Type.Optional(Type.String()) });
26
+ // `editorOnly` and `locked` are authoring metadata. `locked` protects the node and its descendants
27
+ // from editor mutations but deliberately has no runtime rendering semantics.
28
+ const NodeBase = Type.Object({ id: Id, name: Name, parentId: Type.Union([NodeAddress, Type.Null()]), children: Type.Array(Id), visible: Type.Boolean(), editorOnly: Type.Optional(Type.Boolean()), locked: Type.Optional(Type.Boolean()), transform: Transform, layoutOverrides: Type.Optional(Type.Partial(Type.Object({ desktop: Override, mobile: Override }))), layoutItem: Type.Optional(LayoutItem), binding: Type.Optional(Type.String()) });
20
29
  const Container = Type.Composite([NodeBase, Type.Object({ type: Type.Literal("container") })]);
21
30
  const HorizontalLayout = Type.Composite([NodeBase, Type.Object({ type: Type.Literal("horizontal-layout"), backgroundAssetId: Type.Optional(Id), layoutGroup: ProfiledLayout(LinearLayoutSettings) })]);
22
31
  const VerticalLayout = Type.Composite([NodeBase, Type.Object({ type: Type.Literal("vertical-layout"), backgroundAssetId: Type.Optional(Id), layoutGroup: ProfiledLayout(LinearLayoutSettings) })]);
@@ -25,8 +34,19 @@ const Image = Type.Composite([NodeBase, Type.Object({ type: Type.Literal("image"
25
34
  const TextStroke = Type.Object({ color: Type.String({ pattern: "^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$" }), width: Type.Number({ minimum: 0 }) });
26
35
  export const TextStyleDefinitionSchema = Type.Object({ fontAssetId: Type.Optional(Id), fontFamily: Type.String({ minLength: 1 }), fontSize: Type.Number({ exclusiveMinimum: 0 }), fontWeight: Type.Union([Type.Literal("normal"), Type.Literal("bold")]), fontStyle: Type.Union([Type.Literal("normal"), Type.Literal("italic")]), fill: Type.String({ pattern: "^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$" }), align: Type.Union([Type.Literal("left"), Type.Literal("center"), Type.Literal("right"), Type.Literal("justify")]), verticalAlign: Type.Union([Type.Literal("top"), Type.Literal("middle"), Type.Literal("bottom")]), wordWrap: Type.Boolean(), breakWords: Type.Boolean(), lineHeight: Type.Optional(Type.Number({ exclusiveMinimum: 0 })), letterSpacing: Type.Number(), stroke: Type.Optional(TextStroke) });
27
36
  const Text = Type.Composite([NodeBase, Type.Object({ type: Type.Literal("text"), text: Type.String(), style: Type.Optional(TextStyleDefinitionSchema) })]);
28
- const Spine = Type.Composite([NodeBase, Type.Object({ type: Type.Literal("spine"), assetId: Id, animation: Type.Optional(Type.String({ minLength: 1 })), loop: Type.Optional(Type.Boolean()) })]);
29
- const PrefabInstance = Type.Composite([NodeBase, Type.Object({ type: Type.Literal("prefab-instance"), prefabId: Id })]);
37
+ // Optional preserves existing documents; omitted animationSpeed is interpreted as 1 by every runtime.
38
+ // `autoplay` is the serialized initial playback decision. Older documents are migrated to true,
39
+ // preserving the runtime behavior they had before this field became explicit.
40
+ const Spine = Type.Composite([NodeBase, Type.Object({ type: Type.Literal("spine"), assetId: Id, animation: Type.Optional(Type.String({ minLength: 1 })), autoplay: Type.Optional(Type.Boolean()), loop: Type.Optional(Type.Boolean()), animationSpeed: Type.Optional(Type.Number({ exclusiveMinimum: 0 })) })]);
41
+ export const PrefabNodeOverrideSchema = Type.Object({
42
+ /** Адрес переопределяемого узла внутри инстанса; для вложенных пресетов это путь. */
43
+ nodeId: NodeAddress,
44
+ /**
45
+ * RFC-7396-like merge patch. Semantic validation rejects structural fields and validates the
46
+ * effective node after applying it to the referenced prefab-definition node.
47
+ */
48
+ patch: Type.Record(Type.String(), Type.Unknown()),
49
+ });
30
50
  /** Состояния кнопки. `normal` обязателен; остальные при отсутствии используют его изображение. */
31
51
  export const BUTTON_STATE_KEYS = ["normal", "hover", "pressed", "disabled"];
32
52
  /** Discriminated transition: в v0 поддержан только `instant`, чтобы позже добавить bump/slide/fade без неявных полей. */
@@ -108,7 +128,26 @@ export const EffectDefinitionSchema = Type.Union([Type.Object({
108
128
  })]);
109
129
  export function isParticleEffect(effect) { return effect.type === "particles"; }
110
130
  const ParticleEmitter = Type.Composite([NodeBase, Type.Object({ type: Type.Literal("particle-emitter"), effectId: Id, autoplay: Type.Boolean(), simulationSpace: Type.Union([Type.Literal("local"), Type.Literal("world")]) })]);
111
- export const UINodeSchema = Type.Union([Container, HorizontalLayout, VerticalLayout, GridLayout, Image, Text, Spine, Button, PrefabInstance, ScrollView, Input, Slider, ProgressBar, ParticleEmitter]);
131
+ /**
132
+ * Локальное добавление внутри инстанса — обычный узел любого типа, включая другой инстанс пресета
133
+ * (как added GameObject в Unity). Поэтому схема узла рекурсивна: `prefab-instance` содержит массив
134
+ * таких же узлов.
135
+ */
136
+ const UI_NODE_SCHEMA_ID = "UINode";
137
+ export const UINodeSchema = Type.Recursive((Self) => Type.Union([Container, HorizontalLayout, VerticalLayout, GridLayout, Image, Text, Spine, Button, Type.Composite([NodeBase, Type.Object({
138
+ type: Type.Literal("prefab-instance"),
139
+ prefabId: Id,
140
+ propertyOverrides: Type.Optional(Type.Array(PrefabNodeOverrideSchema)),
141
+ locallyAddedNodes: Type.Optional(Type.Array(Self)),
142
+ })]), ScrollView, Input, Slider, ProgressBar, ParticleEmitter]), { $id: UI_NODE_SCHEMA_ID });
143
+ /**
144
+ * Ссылка на схему узла для владельцев (сцена, пресет). Встроить рекурсивную схему дважды нельзя:
145
+ * её `$id` оказался бы в документе в двух местах, и Ajv не смог бы разрешить внутренние `$ref`.
146
+ * Поэтому схема узла регистрируется в Ajv один раз, а владельцы ссылаются на неё.
147
+ */
148
+ const UINodeRef = Type.Unsafe({ $ref: UI_NODE_SCHEMA_ID });
149
+ /** Исторический псевдоним: локальное добавление больше ничем не ограничено по сравнению с узлом сцены. */
150
+ export const LocallyAddedNodeSchema = UINodeSchema;
112
151
  export function isLayoutGroup(node) { return node.type === "horizontal-layout" || node.type === "vertical-layout" || node.type === "grid-layout"; }
113
152
  export function resolveLayoutGroupSettings(node, profile) {
114
153
  return { ...node.layoutGroup.base, ...node.layoutGroup.overrides?.[profile] };
@@ -119,16 +158,22 @@ export function isPositionManagingContainer(node) { return isLayoutGroup(node) |
119
158
  export function isParticleEmitterNode(node) { return node.type === "particle-emitter"; }
120
159
  const Viewport = Type.Object({ width: Type.Number({ exclusiveMinimum: 0 }), height: Type.Number({ exclusiveMinimum: 0 }) });
121
160
  const SceneAudio = Type.Object({ backgroundMusicAssetId: Type.Optional(Id), volume: Type.Optional(Type.Number({ minimum: 0, maximum: 1 })) });
122
- export const SceneSchema = Type.Object({ id: Id, name: Name, rootNodeIds: Type.Array(Id), nodes: Type.Array(UINodeSchema), layout: Type.Object({ referenceViewports: Type.Object({ desktop: Viewport, mobile: Viewport }) }), audio: Type.Optional(SceneAudio) });
161
+ export const SceneSchema = Type.Object({ id: Id, name: Name, rootNodeIds: Type.Array(Id), nodes: Type.Array(UINodeRef), layout: Type.Object({ referenceViewports: Type.Object({ desktop: Viewport, mobile: Viewport }), preferredViewports: Type.Object({ desktop: Viewport, mobile: Viewport }) }), audio: Type.Optional(SceneAudio) });
123
162
  export const AssetFileSchema = Type.Object({ name: Name, uri: Type.String({ minLength: 1 }), mediaType: Type.String({ minLength: 1 }) });
124
163
  const ImageAsset = Type.Object({ id: Id, name: Name, type: Type.Literal("image"), source: Type.Object({ uri: Type.String({ minLength: 1 }), mediaType: Type.String({ minLength: 1 }), version: Type.Optional(Type.String({ minLength: 1 })) }) });
125
- const SpineAsset = Type.Object({ id: Id, name: Name, type: Type.Literal("spine"), files: Type.Object({ skeleton: AssetFileSchema, atlas: AssetFileSchema, textures: Type.Array(AssetFileSchema, { minItems: 1 }) }) });
164
+ export const SpineReferenceFrameSchema = Type.Object({
165
+ x: Type.Number(),
166
+ y: Type.Number(),
167
+ width: Type.Number({ exclusiveMinimum: 0 }),
168
+ height: Type.Number({ exclusiveMinimum: 0 }),
169
+ });
170
+ const SpineAsset = Type.Object({ id: Id, name: Name, type: Type.Literal("spine"), files: Type.Object({ skeleton: AssetFileSchema, atlas: AssetFileSchema, textures: Type.Array(AssetFileSchema, { minItems: 1 }) }), referenceFrame: Type.Optional(SpineReferenceFrameSchema) });
126
171
  const FontAsset = Type.Object({ id: Id, name: Name, type: Type.Literal("font"), family: Name, weight: Type.Union([Type.Literal("normal"), Type.Literal("bold")]), style: Type.Union([Type.Literal("normal"), Type.Literal("italic")]), source: Type.Object({ uri: Type.String({ minLength: 1 }), mediaType: Type.String({ minLength: 1 }), version: Type.Optional(Type.String({ minLength: 1 })) }) });
127
172
  // Имя фрейма из spritesheet JSON → стабильный id фрейма; nodes ссылаются на этот id как на обычный image assetId.
128
173
  const AtlasAsset = Type.Object({ id: Id, name: Name, type: Type.Literal("atlas"), files: Type.Object({ json: AssetFileSchema, texture: AssetFileSchema }), frames: Type.Record(Type.String({ minLength: 1 }), Id) });
129
174
  const SoundAsset = Type.Object({ id: Id, name: Name, type: Type.Literal("sound"), source: Type.Object({ uri: Type.String({ minLength: 1 }), mediaType: Type.String({ minLength: 1 }), version: Type.Optional(Type.String({ minLength: 1 })) }) });
130
175
  export const AssetSchema = Type.Union([ImageAsset, SpineAsset, FontAsset, AtlasAsset, SoundAsset]);
131
- export const PrefabDefinitionSchema = Type.Object({ id: Id, name: Name, rootNodeIds: Type.Array(Id), nodes: Type.Array(UINodeSchema), exposedProperties: Type.Array(Type.Object({ name: Name, type: Type.Union([Type.Literal("string"), Type.Literal("number"), Type.Literal("boolean"), Type.Literal("asset"), Type.Literal("visibility")]) })) });
176
+ export const PrefabDefinitionSchema = Type.Object({ id: Id, name: Name, rootNodeIds: Type.Array(Id), nodes: Type.Array(UINodeRef), exposedProperties: Type.Array(Type.Object({ name: Name, type: Type.Union([Type.Literal("string"), Type.Literal("number"), Type.Literal("boolean"), Type.Literal("asset"), Type.Literal("visibility")]) })) });
132
177
  export const ProjectDocumentSchema = Type.Object({ schemaVersion: Type.Literal(CURRENT_SCHEMA_VERSION), project: Type.Object({ id: Id, name: Name }), settings: Type.Object({ layoutProfileSelection: Type.Object({ mode: Type.Literal("aspect-ratio"), mobileMaxAspectRatio: Type.Number({ exclusiveMinimum: 0 }) }) }), assets: Type.Array(AssetSchema), effects: Type.Array(EffectDefinitionSchema), prefabs: Type.Array(PrefabDefinitionSchema), scenes: Type.Array(SceneSchema) });
133
178
  export class ProjectDocumentMigrationError extends Error {
134
179
  code = "UNSUPPORTED_SCHEMA_VERSION";
@@ -136,21 +181,27 @@ export class ProjectDocumentMigrationError extends Error {
136
181
  }
137
182
  const AjvConstructor = Ajv;
138
183
  const addAjvFormats = addFormats;
139
- const ajv = new AjvConstructor({ allErrors: true, strict: false });
140
- addAjvFormats(ajv);
141
- const structural = ajv.compile(ProjectDocumentSchema);
184
+ const createAjv = () => { const instance = new AjvConstructor({ allErrors: true, strict: false }); addAjvFormats(instance); return instance; };
185
+ // Рекурсивная схема узла несёт собственный `$id`, поэтому её нельзя компилировать дважды в одном
186
+ // экземпляре Ajv: документ уже зарегистрировал этот `$id` внутри себя.
187
+ const documentAjv = createAjv();
188
+ documentAjv.addSchema(UINodeSchema);
189
+ const structural = documentAjv.compile(ProjectDocumentSchema);
190
+ const structuralNode = createAjv().compile(UINodeSchema);
142
191
  export function createStableId() { return crypto.randomUUID(); }
143
192
  const add = (issues, code, path, message) => issues.push({ code, path, message, severity: "error" });
144
- /** На нерастянутой оси width/height абсолютный размер и обязан быть положительным; на растянутой это дельта к якорному прямоугольнику. */
193
+ /** A point-anchor sizeDelta is the whole rect and must be positive; stretch sizeDelta may be negative. */
145
194
  function checkResolvedSizes(node, nodePath, issues) {
146
195
  for (const profile of ["desktop", "mobile"]) {
147
196
  const merged = { ...node.transform, ...node.layoutOverrides?.[profile]?.transform };
148
- const minX = merged.anchorMinX ?? 0, maxX = merged.anchorMaxX ?? minX;
149
- const minY = merged.anchorMinY ?? 0, maxY = merged.anchorMaxY ?? minY;
150
- if (maxX <= minX && merged.width <= 0)
151
- add(issues, "NON_POSITIVE_SIZE", `${nodePath}/transform/width`, `Width must be positive when the '${profile}' X axis is not stretched.`);
152
- if (maxY <= minY && merged.height <= 0)
153
- add(issues, "NON_POSITIVE_SIZE", `${nodePath}/transform/height`, `Height must be positive when the '${profile}' Y axis is not stretched.`);
197
+ const minX = merged.anchorMinX ?? 0;
198
+ const minY = merged.anchorMinY ?? 0;
199
+ const maxX = merged.anchorMaxX ?? minX;
200
+ const maxY = merged.anchorMaxY ?? minY;
201
+ if (maxX === minX && merged.width <= 0)
202
+ add(issues, "NON_POSITIVE_SIZE", `${nodePath}/transform/width`, `Width must be positive on a non-stretched axis in the '${profile}' profile.`);
203
+ if (maxY === minY && merged.height <= 0)
204
+ add(issues, "NON_POSITIVE_SIZE", `${nodePath}/transform/height`, `Height must be positive on a non-stretched axis in the '${profile}' profile.`);
154
205
  }
155
206
  }
156
207
  function particleAssetIds(effect) { const source = effect.particle.visual.source; return source.type === "single" ? [source.assetId] : source.assetIds; }
@@ -317,8 +368,54 @@ function semantic(document) {
317
368
  add(issues, "INCOMPATIBLE_ASSET_REFERENCE", sourcePath, "Particle visual source requires an image asset or atlas frame."); }); });
318
369
  document.prefabs.forEach((prefab, i) => { register(prefab.id, `/prefabs/${i}/id`); prefabs.add(prefab.id); });
319
370
  document.scenes.forEach((scene, i) => register(scene.id, `/scenes/${i}/id`));
371
+ const prefabById = new Map(document.prefabs.map((prefab) => [prefab.id, prefab]));
372
+ const validateInstance = (instance, path, checkHierarchy = true) => {
373
+ const prefab = prefabById.get(instance.prefabId);
374
+ if (prefab === undefined)
375
+ return;
376
+ // База адресуется путём: у вложенных пресетов переопределяемый узел живёт не в `prefab.nodes`,
377
+ // а глубже, поэтому цель override резолвится через тот же материализатор.
378
+ const definitionNodes = resolvePrefabInstanceBaseNodes(document, instance);
379
+ const overridden = new Set();
380
+ for (const [index, override] of (instance.propertyOverrides ?? []).entries()) {
381
+ const overridePath = `${path}/propertyOverrides/${index}`;
382
+ if (overridden.has(override.nodeId))
383
+ add(issues, "DUPLICATE_PREFAB_NODE_OVERRIDE", `${overridePath}/nodeId`, `Prefab node '${override.nodeId}' has more than one property override.`);
384
+ overridden.add(override.nodeId);
385
+ const definitionNode = definitionNodes.get(override.nodeId);
386
+ if (definitionNode === undefined) {
387
+ add(issues, "MISSING_PREFAB_OVERRIDE_TARGET", `${overridePath}/nodeId`, `Prefab node '${override.nodeId}' does not exist in definition '${prefab.id}'.`);
388
+ continue;
389
+ }
390
+ for (const key of ["id", "type", "parentId", "children", "editorOnly", "locked", "prefabId", "propertyOverrides", "locallyAddedNodes"]) {
391
+ if (Object.hasOwn(override.patch, key))
392
+ add(issues, "STRUCTURAL_PREFAB_OVERRIDE", `${overridePath}/patch/${key}`, `Prefab instances cannot override structural field '${key}'.`);
393
+ }
394
+ // База развёрнута, поэтому несёт instance-scoped id и связи. Патч их менять не может, а
395
+ // структурная схема требует обычных uuid, поэтому идентичность подменяется на нейтральную.
396
+ const effective = applyPrefabNodePatch({ ...definitionNode, id: instance.id, parentId: null, children: [] }, override.patch);
397
+ if (!structuralNode(effective))
398
+ add(issues, "INVALID_PREFAB_NODE_OVERRIDE", `${overridePath}/patch`, "The property override produces an invalid UI node.");
399
+ }
400
+ // Локально добавленный инстанс сам владеет своей конфигурацией, поэтому проверяется рекурсивно.
401
+ // Иерархию при этом сверяет только внешний инстанс: его материализация уже включает вложенные.
402
+ for (const [index, localNode] of (instance.locallyAddedNodes ?? []).entries()) {
403
+ const localPath = `${path}/locallyAddedNodes/${index}`;
404
+ register(localNode.id, `${localPath}/id`);
405
+ if (localNode.type === "prefab-instance")
406
+ validateInstance(localNode, localPath, false);
407
+ }
408
+ if (!checkHierarchy)
409
+ return;
410
+ const materialized = materializePrefabInstance(document, instance);
411
+ if (materialized !== undefined)
412
+ hierarchy(materialized, `${path}/materialized`, assets, prefabs, effects, issues);
413
+ };
320
414
  document.prefabs.forEach((prefab, i) => { prefab.nodes.forEach((node, j) => register(node.id, `/prefabs/${i}/nodes/${j}/id`)); hierarchy(prefab, `/prefabs/${i}`, assets, prefabs, effects, issues); });
321
- document.scenes.forEach((scene, i) => { scene.nodes.forEach((node, j) => register(node.id, `/scenes/${i}/nodes/${j}/id`)); hierarchy(scene, `/scenes/${i}`, assets, prefabs, effects, issues); const musicAssetId = scene.audio?.backgroundMusicAssetId; if (musicAssetId !== undefined) {
415
+ document.prefabs.forEach((prefab, i) => prefab.nodes.forEach((node, j) => { if (node.type === "prefab-instance")
416
+ validateInstance(node, `/prefabs/${i}/nodes/${j}`); }));
417
+ document.scenes.forEach((scene, i) => { scene.nodes.forEach((node, j) => register(node.id, `/scenes/${i}/nodes/${j}/id`)); hierarchy(scene, `/scenes/${i}`, assets, prefabs, effects, issues); scene.nodes.forEach((node, j) => { if (node.type === "prefab-instance")
418
+ validateInstance(node, `/scenes/${i}/nodes/${j}`); }); const musicAssetId = scene.audio?.backgroundMusicAssetId; if (musicAssetId !== undefined) {
322
419
  const asset = assets.get(musicAssetId), musicPath = `/scenes/${i}/audio/backgroundMusicAssetId`;
323
420
  if (!asset)
324
421
  add(issues, "MISSING_ASSET_REFERENCE", musicPath, `Asset '${musicAssetId}' does not exist.`);
@@ -376,11 +473,266 @@ function migrateV1ToV2(document) {
376
473
  }
377
474
  }
378
475
  }
379
- export function migrateProjectDocument(input) { if (typeof input !== "object" || input === null || !Object.hasOwn(input, "schemaVersion"))
380
- throw new ProjectDocumentMigrationError("A schemaVersion is required for migration."); const version = input.schemaVersion; if (typeof version !== "number" || !Number.isInteger(version) || version < 1 || version > CURRENT_SCHEMA_VERSION)
381
- throw new ProjectDocumentMigrationError(`Unsupported schemaVersion '${String(version)}'.`); const migrated = structuredClone(input); if (version <= 1)
382
- migrateV1ToV2(migrated); if (version <= 6)
383
- migrated.effects = []; migrated.schemaVersion = CURRENT_SCHEMA_VERSION; assertProjectDocument(migrated); return migrated; }
476
+ function migrateOwnerToPreferredRects(owner, viewports, source = "legacy") {
477
+ const originalNodes = structuredClone(owner.nodes);
478
+ const nodesById = new Map(originalNodes.map((node) => [node.id, node]));
479
+ const convertedByProfile = new Map();
480
+ for (const profile of ["desktop", "mobile"]) {
481
+ const converted = new Map();
482
+ const visiting = new Set();
483
+ const visit = (nodeId) => {
484
+ const cached = converted.get(nodeId);
485
+ if (cached !== undefined)
486
+ return cached;
487
+ if (visiting.has(nodeId))
488
+ return undefined;
489
+ const node = nodesById.get(nodeId);
490
+ if (node === undefined)
491
+ return undefined;
492
+ visiting.add(nodeId);
493
+ const parent = node.parentId === null ? undefined : nodesById.get(node.parentId);
494
+ const convertedParent = parent === undefined ? undefined : visit(parent.id);
495
+ visiting.delete(nodeId);
496
+ const referenceRoot = viewports?.referenceViewports[profile];
497
+ const preferredRoot = viewports?.preferredViewports[profile];
498
+ const usesSceneBoundary = viewports !== undefined && parent?.parentId === null;
499
+ const currentParent = node.parentId === null || usesSceneBoundary ? referenceRoot : convertedParent?.currentSize;
500
+ const preferredParent = node.parentId === null || usesSceneBoundary ? preferredRoot : convertedParent?.preferredSize;
501
+ const override = node.layoutOverrides?.[profile]?.transform;
502
+ const merged = { ...node.transform, ...override };
503
+ const minX = typeof merged.anchorMinX === "number" ? merged.anchorMinX : 0;
504
+ const maxX = typeof merged.anchorMaxX === "number" ? merged.anchorMaxX : minX;
505
+ const minY = typeof merged.anchorMinY === "number" ? merged.anchorMinY : 0;
506
+ const maxY = typeof merged.anchorMaxY === "number" ? merged.anchorMaxY : minY;
507
+ const stretchX = maxX > minX;
508
+ const stretchY = maxY > minY;
509
+ const legacyResponsive = typeof merged.responsiveSize === "object" && merged.responsiveSize !== null
510
+ ? merged.responsiveSize
511
+ : undefined;
512
+ const fallbackWidth = typeof legacyResponsive?.referenceParentWidth === "number" ? legacyResponsive.referenceParentWidth : 1;
513
+ const fallbackHeight = typeof legacyResponsive?.referenceParentHeight === "number" ? legacyResponsive.referenceParentHeight : 1;
514
+ const current = currentParent ?? { width: fallbackWidth, height: fallbackHeight };
515
+ const preferred = preferredParent ?? current;
516
+ const oldScaleX = source === "v9"
517
+ ? stretchX ? current.width / preferred.width : 1
518
+ : stretchX && typeof legacyResponsive?.referenceParentWidth === "number"
519
+ ? current.width / legacyResponsive.referenceParentWidth
520
+ : 1;
521
+ const oldScaleY = source === "v9"
522
+ ? stretchY ? current.height / preferred.height : 1
523
+ : stretchY && typeof legacyResponsive?.referenceParentHeight === "number"
524
+ ? current.height / legacyResponsive.referenceParentHeight
525
+ : 1;
526
+ const renderedOffsetX = stretchX ? merged.x * oldScaleX : merged.x;
527
+ const renderedOffsetY = stretchY ? merged.y * oldScaleY : merged.y;
528
+ const renderedWidth = stretchX
529
+ ? source === "v9" || legacyResponsive !== undefined
530
+ ? merged.width * oldScaleX
531
+ : merged.width + (maxX - minX) * current.width
532
+ : merged.width;
533
+ const renderedHeight = stretchY
534
+ ? source === "v9" || legacyResponsive !== undefined
535
+ ? merged.height * oldScaleY
536
+ : merged.height + (maxY - minY) * current.height
537
+ : merged.height;
538
+ const currentWidth = current.width > 0 ? current.width : preferred.width;
539
+ const currentHeight = current.height > 0 ? current.height : preferred.height;
540
+ const next = { ...merged };
541
+ delete next.responsiveSize;
542
+ next.x = renderedOffsetX * preferred.width / currentWidth;
543
+ next.y = renderedOffsetY * preferred.height / currentHeight;
544
+ next.width = renderedWidth * preferred.width / currentWidth;
545
+ next.height = renderedHeight * preferred.height / currentHeight;
546
+ const result = {
547
+ transform: next,
548
+ currentSize: {
549
+ width: next.width * currentWidth / preferred.width,
550
+ height: next.height * currentHeight / preferred.height,
551
+ },
552
+ preferredSize: { width: next.width, height: next.height },
553
+ };
554
+ converted.set(nodeId, result);
555
+ return result;
556
+ };
557
+ owner.rootNodeIds.forEach(visit);
558
+ originalNodes.forEach((node) => visit(node.id));
559
+ convertedByProfile.set(profile, converted);
560
+ }
561
+ for (const node of owner.nodes) {
562
+ const desktop = convertedByProfile.get("desktop")?.get(node.id)?.transform;
563
+ const mobile = convertedByProfile.get("mobile")?.get(node.id)?.transform;
564
+ if (desktop !== undefined)
565
+ node.transform = desktop;
566
+ if (mobile !== undefined) {
567
+ const mobilePatch = Object.fromEntries(Object.entries(mobile).filter(([key, value]) => !Object.is(value, desktop?.[key])));
568
+ const existingMobile = node.layoutOverrides?.mobile;
569
+ if (Object.keys(mobilePatch).length > 0 || existingMobile !== undefined) {
570
+ node.layoutOverrides ??= {};
571
+ node.layoutOverrides.mobile ??= {};
572
+ if (Object.keys(mobilePatch).length > 0)
573
+ node.layoutOverrides.mobile.transform = mobilePatch;
574
+ else
575
+ delete node.layoutOverrides.mobile.transform;
576
+ if (Object.keys(node.layoutOverrides.mobile).length === 0)
577
+ delete node.layoutOverrides.mobile;
578
+ if (Object.keys(node.layoutOverrides).length === 0)
579
+ delete node.layoutOverrides;
580
+ }
581
+ }
582
+ const desktopOverride = node.layoutOverrides?.desktop?.transform;
583
+ if (desktopOverride !== undefined)
584
+ delete desktopOverride.responsiveSize;
585
+ }
586
+ }
587
+ function migrateToV10(document, source) {
588
+ for (const scene of document.scenes ?? []) {
589
+ migrateOwnerToPreferredRects(scene, scene.layout, source);
590
+ }
591
+ for (const prefab of document.prefabs ?? []) {
592
+ migrateOwnerToPreferredRects(prefab, undefined, source);
593
+ }
594
+ }
595
+ /** Converts v10 absolute preferred-space rects to anchoredPosition/sizeDelta without a visual jump. */
596
+ function migrateOwnerV10ToV11(owner, preferredViewports) {
597
+ const originalNodes = structuredClone(owner.nodes);
598
+ const nodesById = new Map(originalNodes.map((node) => [node.id, node]));
599
+ const convertedByProfile = new Map();
600
+ for (const profile of ["desktop", "mobile"]) {
601
+ const converted = new Map();
602
+ const visit = (nodeId) => {
603
+ const cached = converted.get(nodeId);
604
+ if (cached !== undefined)
605
+ return cached;
606
+ const node = nodesById.get(nodeId);
607
+ if (node === undefined)
608
+ return undefined;
609
+ const parent = node.parentId === null ? undefined : nodesById.get(node.parentId);
610
+ const convertedParent = parent === undefined ? undefined : visit(parent.id);
611
+ const merged = { ...node.transform, ...node.layoutOverrides?.[profile]?.transform };
612
+ const sceneBoundary = preferredViewports?.[profile];
613
+ const parentSize = sceneBoundary !== undefined && (node.parentId === null || parent?.parentId === null)
614
+ ? sceneBoundary
615
+ : convertedParent === undefined
616
+ ? { width: merged.width, height: merged.height }
617
+ : {
618
+ width: typeof convertedParent.__resolvedWidth === "number" ? convertedParent.__resolvedWidth : convertedParent.width,
619
+ height: typeof convertedParent.__resolvedHeight === "number" ? convertedParent.__resolvedHeight : convertedParent.height,
620
+ };
621
+ const minX = typeof merged.anchorMinX === "number" ? merged.anchorMinX : 0;
622
+ const minY = typeof merged.anchorMinY === "number" ? merged.anchorMinY : 0;
623
+ const maxX = typeof merged.anchorMaxX === "number" ? merged.anchorMaxX : minX;
624
+ const maxY = typeof merged.anchorMaxY === "number" ? merged.anchorMaxY : minY;
625
+ const pivotX = typeof merged.pivotX === "number" ? merged.pivotX : 0;
626
+ const pivotY = typeof merged.pivotY === "number" ? merged.pivotY : 0;
627
+ const resolvedWidth = merged.width;
628
+ const resolvedHeight = merged.height;
629
+ const next = {
630
+ ...merged,
631
+ x: merged.x - (maxX - minX) * pivotX * parentSize.width,
632
+ y: merged.y - (maxY - minY) * pivotY * parentSize.height,
633
+ width: resolvedWidth - (maxX - minX) * parentSize.width,
634
+ height: resolvedHeight - (maxY - minY) * parentSize.height,
635
+ __resolvedWidth: resolvedWidth,
636
+ __resolvedHeight: resolvedHeight,
637
+ };
638
+ converted.set(nodeId, next);
639
+ return next;
640
+ };
641
+ owner.rootNodeIds.forEach(visit);
642
+ originalNodes.forEach((node) => visit(node.id));
643
+ convertedByProfile.set(profile, converted);
644
+ }
645
+ for (const node of owner.nodes) {
646
+ const stripInternal = (transform) => {
647
+ if (transform === undefined)
648
+ return undefined;
649
+ const next = { ...transform };
650
+ delete next.__resolvedWidth;
651
+ delete next.__resolvedHeight;
652
+ return next;
653
+ };
654
+ const desktop = stripInternal(convertedByProfile.get("desktop")?.get(node.id));
655
+ const mobile = stripInternal(convertedByProfile.get("mobile")?.get(node.id));
656
+ if (desktop === undefined || mobile === undefined)
657
+ continue;
658
+ node.transform = desktop;
659
+ const desktopOverride = node.layoutOverrides?.desktop;
660
+ if (desktopOverride !== undefined) {
661
+ delete desktopOverride.transform;
662
+ if (Object.keys(desktopOverride).length === 0 && node.layoutOverrides !== undefined)
663
+ delete node.layoutOverrides.desktop;
664
+ }
665
+ const mobilePatch = Object.fromEntries(Object.entries(mobile).filter(([key, value]) => !Object.is(value, desktop[key])));
666
+ if (Object.keys(mobilePatch).length > 0) {
667
+ node.layoutOverrides ??= {};
668
+ node.layoutOverrides.mobile ??= {};
669
+ node.layoutOverrides.mobile.transform = mobilePatch;
670
+ }
671
+ else if (node.layoutOverrides?.mobile !== undefined) {
672
+ delete node.layoutOverrides.mobile.transform;
673
+ if (Object.keys(node.layoutOverrides.mobile).length === 0)
674
+ delete node.layoutOverrides.mobile;
675
+ }
676
+ if (node.layoutOverrides !== undefined && Object.keys(node.layoutOverrides).length === 0)
677
+ delete node.layoutOverrides;
678
+ }
679
+ }
680
+ function migrateV10ToV11(document) {
681
+ for (const scene of document.scenes ?? []) {
682
+ migrateOwnerV10ToV11(scene, scene.layout.preferredViewports);
683
+ }
684
+ for (const prefab of document.prefabs ?? []) {
685
+ migrateOwnerV10ToV11(prefab);
686
+ }
687
+ }
688
+ /** v15 makes Spine's initial playback explicit; previous runtime behavior always started it. */
689
+ function migrateV14ToV15(document) {
690
+ const visit = (node) => {
691
+ if (node.type === "spine" && typeof node.autoplay !== "boolean")
692
+ node.autoplay = true;
693
+ const localNodes = node.locallyAddedNodes;
694
+ if (Array.isArray(localNodes))
695
+ for (const localNode of localNodes)
696
+ if (typeof localNode === "object" && localNode !== null)
697
+ visit(localNode);
698
+ };
699
+ const owners = [...(document.scenes ?? []), ...(document.prefabs ?? [])];
700
+ for (const owner of owners)
701
+ for (const node of owner.nodes ?? [])
702
+ if (typeof node === "object" && node !== null)
703
+ visit(node);
704
+ }
705
+ export function migrateProjectDocument(input) {
706
+ if (typeof input !== "object" || input === null || !Object.hasOwn(input, "schemaVersion"))
707
+ throw new ProjectDocumentMigrationError("A schemaVersion is required for migration.");
708
+ const version = input.schemaVersion;
709
+ if (typeof version !== "number" || !Number.isInteger(version) || version < 1 || version > CURRENT_SCHEMA_VERSION)
710
+ throw new ProjectDocumentMigrationError(`Unsupported schemaVersion '${String(version)}'.`);
711
+ const migrated = structuredClone(input);
712
+ if (version <= 1)
713
+ migrateV1ToV2(migrated);
714
+ if (version <= 6)
715
+ migrated.effects = [];
716
+ if (version <= 7)
717
+ for (const scene of migrated.scenes ?? []) {
718
+ const layout = scene.layout;
719
+ if (layout?.referenceViewports !== undefined)
720
+ layout.preferredViewports = structuredClone(layout.referenceViewports);
721
+ }
722
+ if (version <= 9)
723
+ migrateToV10(migrated, version === 9 ? "v9" : "legacy");
724
+ if (version <= 10)
725
+ migrateV10ToV11(migrated);
726
+ if (version <= 14)
727
+ migrateV14ToV15(migrated);
728
+ // v15 → v16 (вложенные пресеты) не требует переписывания данных: новый формат — надмножество
729
+ // старого. `propertyOverrides[].nodeId` и `parentId` локального узла стали путями, а путь длиной в
730
+ // один сегмент — это ровно прежний id узла определения; вложенных инстансов в `locallyAddedNodes`
731
+ // v15 хранить не мог, поэтому запрещённых значений в старых документах не бывает.
732
+ migrated.schemaVersion = CURRENT_SCHEMA_VERSION;
733
+ assertProjectDocument(migrated);
734
+ return migrated;
735
+ }
384
736
  function canonicalizeJson(value) {
385
737
  if (Array.isArray(value))
386
738
  return value.map(canonicalizeJson);
@@ -391,4 +743,5 @@ function canonicalizeJson(value) {
391
743
  export function serializeProjectDocument(document) { assertProjectDocument(document); return `${JSON.stringify(canonicalizeJson(document))}\n`; }
392
744
  export * from "./assetPaths.js";
393
745
  export * from "./manifest.js";
746
+ export * from "./prefabs.js";
394
747
  //# sourceMappingURL=index.js.map