@neocompose/cli 0.89.9 → 0.89.11
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/CHANGELOG.md +21 -0
- package/dist/neo-runtime.mjs +4008 -2430
- package/dist/test-worker.mjs +4291 -4103
- package/package.json +1 -1
- package/skills/neocompose-cli/SKILL.md +1 -1
- package/skills/neocompose-cli/references/cli-development.md +1 -1
- package/skills/neocompose-cli/references/declarations/constructors.md +18 -0
- package/skills/neocompose-cli/references/neoscript/types-and-narrowing.md +5 -0
- package/skills/neocompose-cli/references/sync/conflicts-and-recovery.md +5 -0
- package/skills/neocompose-cli/references/world/variants.md +23 -0
package/package.json
CHANGED
|
@@ -143,7 +143,7 @@ The marker near the top of `SKILL.md` must exactly match the package version,
|
|
|
143
143
|
and this quoted copy is checked too:
|
|
144
144
|
|
|
145
145
|
```html
|
|
146
|
-
<!-- reviewed-through-cli: 0.89.
|
|
146
|
+
<!-- reviewed-through-cli: 0.89.11 -->
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
Keep this skill on current behavior. Upgrade steps, rollout prerequisites,
|
|
@@ -31,6 +31,13 @@ Foo value = new(bar: "BAR", isFun: true) { IsFun = false };
|
|
|
31
31
|
- A header constructor disables implicit parameterless `new` and forbids
|
|
32
32
|
other constructor overloads. Its derived identity takes no `@id`.
|
|
33
33
|
|
|
34
|
+
## Editor support
|
|
35
|
+
|
|
36
|
+
Constructor completion, hover, and signature help use the concrete type arguments:
|
|
37
|
+
`Box<string>` offers a `string` argument for a parameter declared as `T`.
|
|
38
|
+
Target-typed constructions inside callbacks use the callback's return type for
|
|
39
|
+
parameter hints. Duplicate named arguments are diagnosed in local initializers.
|
|
40
|
+
|
|
34
41
|
## Variant parameters
|
|
35
42
|
|
|
36
43
|
Constructors accept `NeoVariant<T>` and `NeoLookupVariant<T, TValue>` selections,
|
|
@@ -188,3 +195,14 @@ AudioSettings AUDIO_SETTINGS = new() {
|
|
|
188
195
|
Main = new AudioMixerGroupSettingsFolder("Main", "Master", "MasterVolume", []),
|
|
189
196
|
};
|
|
190
197
|
```
|
|
198
|
+
|
|
199
|
+
## Reconciliation during push and export
|
|
200
|
+
|
|
201
|
+
Constructor comparisons wait for newly authored values they read, including
|
|
202
|
+
unordered collection entries and variant factories. Equal constructor arguments
|
|
203
|
+
retain the existing instance, its stored random values, and authored field edits.
|
|
204
|
+
Changed arguments rebuild the instance after its dependencies settle. A pending
|
|
205
|
+
dependency alone does not trigger reconstruction.
|
|
206
|
+
|
|
207
|
+
A concrete generic instance keeps its type arguments when stored through a base
|
|
208
|
+
class slot, for example `Rule value = new TypedRule<int>(1);`.
|
|
@@ -86,6 +86,11 @@ public static T? FirstOf<T extends Item = Item>(List<T> items) => items.FirstOrD
|
|
|
86
86
|
types. Nullable elements matched against `T?` contribute their non-null
|
|
87
87
|
type. Null literals, target-typed `new()`, and empty collections supply no
|
|
88
88
|
evidence, but do not discard evidence from sibling tuple elements.
|
|
89
|
+
- Generic functions can construct `Box<T>` using their own type parameters,
|
|
90
|
+
including static functions without a class receiver. Explicit and inferred
|
|
91
|
+
call arguments close the construction in both the CLI and SDK.
|
|
92
|
+
- Go to Definition on a type parameter in a local type annotation opens its
|
|
93
|
+
class or function declaration.
|
|
89
94
|
- Function type parameters take no `@id`. Overrides declare the same count,
|
|
90
95
|
constraints, and defaults but may rename them.
|
|
91
96
|
|
|
@@ -20,6 +20,11 @@ compilation on purpose.
|
|
|
20
20
|
display text. Empty and comment-only files stay files.
|
|
21
21
|
- Against a server-side deletion, keeping the record restores it as a create
|
|
22
22
|
guarded by an absent-record check; removing it accepts the deletion.
|
|
23
|
+
- If a server deletion leaves an edited declaration without an owner, pull
|
|
24
|
+
uses its authored file for the local conflict side. This preserves its values
|
|
25
|
+
and IDs, including after a local file move. Shared members retain every
|
|
26
|
+
authored class declaration, including several classes in one file. Review
|
|
27
|
+
the marked hunks before choosing a whole side.
|
|
23
28
|
- Pull warns when a conflicted record's local base strands newly downloaded
|
|
24
29
|
descendant rows. Resolve it with `--mine` or `--theirs` before pushing.
|
|
25
30
|
- Compiled initializer IR and other server-derived metadata never cause a
|
|
@@ -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
|