@neocompose/cli 0.89.8 → 0.89.10

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.
@@ -70,7 +70,6 @@ stored instance rather than building a copy. Its owning placement keeps it,
70
70
  so a constructor that stores it needs a `Reference` field:
71
71
 
72
72
  ```neo
73
- @id("86ac7c7d-8d3b-4642-9def-cdf32643bdc5")
74
73
  DeliveryQuest HARD_AS_STONE = new();
75
74
  // The core quest list owns HARD_AS_STONE.
76
75
  WorkflowStep UNLOCK = new QuestUnlockStep(HARD_AS_STONE);
@@ -82,13 +81,15 @@ class QuestUnlockStep(DeliveryQuest quest) : WorkflowStep {
82
81
 
83
82
  - The local needs exactly one owning placement. Unowned locals, ambiguous
84
83
  placements, and cycles are source errors.
85
- - A nested target needs its existing `@id`. A structurally owned list entry
86
- may use an unused UUID-v4 in the same push.
87
- - A local nested inside an evaluated constructor stays idless on first push;
88
- push assigns its identity before it can be referenced. Don't give it a fresh
89
- UUID.
90
- - A direct static owner supplies a pending identity for an idless local, and
91
- aliases of that static local work too.
84
+ - New nested locals can be referenced before their first push or export, including
85
+ inside lists, dictionaries, and constructor-backed owners. Preparation resolves
86
+ each reference to the row its unique owner creates. Aliases share that identity.
87
+ Sibling constructor arguments and explicit `Reference(LOCAL)` calls reuse the
88
+ child within the same owning tree. A parent constructor may borrow a child
89
+ that one of its field overrides owns; pull preserves both uses.
90
+ Direct `Reference(LOCAL)` fields resolve after the owning constructor runs.
91
+ - Push writes assigned IDs back to source. Dry-run and export prepare the same
92
+ references without requiring hand-written IDs or an earlier push.
92
93
  - A member default is a construction template, so its local is not a single
93
94
  stored instance.
94
95
  - Owned locals inside evaluated initializers need directly addressable fields,
@@ -25,6 +25,29 @@ NeoVariant<ExampleObject> Down = new(
25
25
  written `new { ... }` or `new Partial<T> { ... }`. They never pass
26
26
  constructor arguments, even when `T` has a required constructor.
27
27
 
28
+ A child override's explicit `NeoAnimationChildOverride<TChild>` argument
29
+ selects the child type and its `Partial<TChild>` payload. The child type may
30
+ extend `NeoObjectBase`; it does not have to equal the list's base type.
31
+ Returning a local variable from the selector preserves that explicit type.
32
+ The selector takes no parameters. Its `this` is the variant target instance,
33
+ so `() => this.SelectFirstSprite()` and `this.SelectFirstSprite` both work
34
+ when that method takes no arguments and returns `TChild`. A search through
35
+ `Children` returns an optional `NeoObjectBase`; narrow it to `TChild` and
36
+ handle the missing-child case before returning it.
37
+
38
+ ```neo
39
+ new NeoAnimationChildOverride<AnimationSpriteObject>(() => {
40
+ if (this.Children.FirstOrDefault((child) => child.Name == "Sprite")
41
+ is not AnimationSpriteObject sprite) {
42
+ throw new NeoError("Expected a sprite child");
43
+ }
44
+ return sprite;
45
+ }, new Partial<AnimationSpriteObject> { Sprite = Images.OreVeins.Slice(1) })
46
+ ```
47
+
48
+ VSCode and `neo status` validate selector bodies and constructor delegate
49
+ arguments, including names, parameter counts, return paths, and return types.
50
+
28
51
  A nested class partial changes only named members. A list override replaces
29
52
  the whole list; it does not patch entries by index. In particular, overriding
30
53
  a clip's `Frames` requires the complete desired list, not just the changed
@@ -44,6 +67,8 @@ frame. For editing an existing clip, see [frame overrides](animation.md).
44
67
  - Selections compare equal when class, variant, and bound lookup row match.
45
68
  An unset optional selection differs from `Base`.
46
69
 
70
+ Variant selections can also be [constructor parameters](../declarations/constructors.md#variant-parameters). A constructor can retain a named, base, or bound lookup selection in a member initializer.
71
+
47
72
  ## Folders
48
73
 
49
74
  ```neo
@@ -112,8 +137,9 @@ NeoLookupVariant<ExampleObject, NeoSortingLayer> Layered = new(
112
137
  ## Type restrictions
113
138
 
114
139
  `NeoVariantFolder` and `NeoLookupVariantFolder` are top-level records, never
115
- member or parameter types. Variant handles are valid as Variant members only,
116
- not as collection entries, lookup targets, parameters, or generic bindings.
140
+ member or parameter types. Variant handles are valid as Variant members and
141
+ constructor parameters, not as collection entries, lookup targets, ordinary
142
+ function parameters, or generic bindings.
117
143
 
118
144
  ## Stored overrides
119
145