@neocompose/cli 0.82.4 → 0.83.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@neocompose/cli",
3
- "version": "0.82.4",
3
+ "version": "0.83.0",
4
4
  "description": "Neo Compose native project-source CLI with bidirectional sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -9,7 +9,7 @@ description: >-
9
9
  `@neocompose/cli` or `node cli/bin/neo.mjs` in the neo-compose repository.
10
10
  ---
11
11
 
12
- <!-- reviewed-through-cli: 0.82.4 -->
12
+ <!-- reviewed-through-cli: 0.83.0 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -129,7 +129,7 @@ wrappers.
129
129
  The marker near the top of `SKILL.md` must exactly match the package version:
130
130
 
131
131
  ```html
132
- <!-- reviewed-through-cli: 0.82.4 -->
132
+ <!-- reviewed-through-cli: 0.83.0 -->
133
133
  ```
134
134
 
135
135
  The quoted version above is checked too, so this instruction cannot go stale
@@ -331,6 +331,10 @@ to earlier content reuses that result after verifying output bytes; changed or
331
331
  missing outputs are regenerated. Edited content is validated
332
332
  even when C# generation is skipped. After a CLI code-generation fix, run
333
333
  `neo export` again; generator revision changes invalidate cached C# output.
334
+ Generated animation clip targets and reference lookup factories retain constructed
335
+ generic arguments, including supported forwarded bindings. Clip getters use the
336
+ declared target type when the owner is a derived class. Export reports an error
337
+ when a clip target does not match the owner or one of its constructed base types.
334
338
  New instances that reuse existing member-localized text retain its shared ID
335
339
  and translations in the export.
336
340
 
@@ -58,7 +58,9 @@ abstract class Item<TContext extends SomeClass> : INamed {
58
58
  Use ordinary `public`, `protected`, `private`, `static`, `virtual`, `abstract`,
59
59
  `sealed`, and `override` semantics. A sealed class is an instantiable leaf:
60
60
  it may extend another class but cannot be extended, cannot also be abstract,
61
- and can only be sealed while it has no subclasses. Interfaces are non-generic.
61
+ and can only be sealed while it has no subclasses. Interfaces can declare type
62
+ parameters and pass arguments to the interfaces they extend; see Interface
63
+ members.
62
64
  A read-only override may narrow a class or interface contract to an assignable
63
65
  class or derived interface, including a non-null value for a nullable contract.
64
66
  Generated Unity C# keeps the inherited property type for Mono compatibility;
@@ -298,6 +300,56 @@ A `Reference<T>` member satisfies an interface `T Foo { get; }` or
298
300
 
299
301
  Constructor and function parameters use `Set<T>` for several selections.
300
302
 
303
+ ### Interface members
304
+
305
+ An interface types a member anywhere a class does: a field, a nullable,
306
+ `readonly`, or `static` field, a `List`, `Set`, or `Dictionary` entry, a
307
+ generic argument, a parameter, and `Reference<I>`. Each row holds its own
308
+ class, which must implement the interface.
309
+
310
+ ```neo
311
+ interface IContainer<T extends Item> {
312
+ List<T> Contents { get; }
313
+ }
314
+
315
+ class Crate<T extends Item> : IContainer<T> {
316
+ public List<T> Contents = [];
317
+ }
318
+
319
+ class Player {
320
+ public IContainer<Seed>? Pouch = new Crate<Seed>();
321
+ public List<IContainer<Seed>> Racks = [];
322
+ }
323
+ ```
324
+
325
+ - Construct a class, never the interface: `new IContainer<Seed>()` is an error.
326
+ Defaults and constructor arguments name the concrete class.
327
+ - An open class can sit in an interface slot only when the interface fills
328
+ every class parameter, as `Crate<T> : IContainer<T>` does. Otherwise store a
329
+ closed subclass.
330
+ - A class implements a given interface once, counting its `extends` chain.
331
+ `IContainer<Seed>` and `IContainer<Tool>` on one class is an error.
332
+ - An interface argument is a type parameter in scope or a type with none
333
+ inside it. `IContainer<List<T>>` is an error.
334
+ - `x is IContainer<Seed>` compares the arguments the row implements the
335
+ interface with. A generic interface needs its arguments in `is`.
336
+ - `NeoVariant<I>` is an error, since variants belong to a class. `@index` on a
337
+ collection of interface entries is an error; `@column` can name an interface
338
+ property.
339
+ - Interfaces carry no storage. A row fits a slot only when its class allows
340
+ the storage the row lives in. The compiler refuses an assignment that can't
341
+ fit, and push and commit refuse an authored row that doesn't fit.
342
+ - A variant or animation override that puts a different class in an
343
+ interface slot replaces the slot's row.
344
+ - A generic parameter can be constrained by an interface,
345
+ `T extends IContainer<Seed>`, and an interface can be a generic argument
346
+ where the parameter's constraint admits it.
347
+
348
+ Generated C# types the slot by the generated interface, so a class that
349
+ doesn't implement it doesn't compile. Writing a C# class that implements the
350
+ interface but isn't a Neo class throws, naming the slot. So does writing a row
351
+ the interface doesn't determine.
352
+
301
353
  ### Set members
302
354
 
303
355
  `Set<T>` is an insertion-ordered collection that can't hold duplicates. The
@@ -314,9 +366,9 @@ identities; added entries receive stable identities under the instance.
314
366
 
315
367
  An owned Set holds `bool`, `int`, `float`, `decimal`,
316
368
  `@settings(format: .Plain) string`, vectors, `Color`, sprites, audio clips,
317
- or a class. Elements can't be nullable, collections, variants, delegates,
318
- actions, or interfaces. A class entry is unique by row, a value entry by its
319
- value. `@index` and `@column` work as on a List; `kind:` is an error, since a
369
+ a class, or an interface. Elements can't be nullable, collections, variants,
370
+ delegates, or actions. A class or interface entry is unique by row, a value
371
+ entry by its value. `@index` and `@column` work as on a List; `kind:` is an error, since a
320
372
  Set is always insertion-ordered.
321
373
 
322
374
  ```neo