@neocompose/cli 0.51.2 → 0.52.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.51.2",
3
+ "version": "0.52.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.51.2 -->
12
+ <!-- reviewed-through-cli: 0.52.0 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -58,26 +58,43 @@ or `.Center`. To retain Line's old default, pass
58
58
 
59
59
  ## Tile placements
60
60
 
61
- Use `@tile(VoidTile)` on a `NeoTileInstance` construction to select its tile
62
- class. The named spelling `@tile(asset: VoidTile)` is equivalent; the asset is
63
- required and only the argument label is optional.
61
+ A placement is an ordinary concrete `NeoTile` value with a `Cell`:
64
62
 
65
63
  ```neo
66
- @tile(VoidTile)
67
- new NeoTileInstance() {
68
- Cell = new(9, -4)
69
- }
64
+ new GlassFloorTile { Cell = new(9, -4) }
70
65
  ```
71
66
 
72
- Pull emits the positional spelling. The annotation writes the placement's
73
- `assetClassId` metadata and does not construct a tile value or add a generic
74
- argument. The asset must be a concrete, non-generic descendant of `NeoTile`.
75
- Use the annotation on persisted literal constructions; executable NeoScript
76
- and evaluated placement constructors reject it.
77
- The grid's imports and the tile's compatible-layer relations still constrain
78
- where the placement can be used. Existing placement overrides remain attached
79
- when the selected asset is unchanged; recreate a placement to change its asset
80
- when it has overrides or a variant.
67
+ Layer-link `Tiles` lists contain these values directly. `NeoTileInstance` and
68
+ `@tile(...)` are removed. A tile's `Name`, `Sprite`, and `SmartTile` are
69
+ `readonly` declaration members. Override them on a subclass; a placement
70
+ initializer cannot assign them. `Cell` is the placement's writable field.
71
+
72
+ Object `PlacementTiles` is a `List<NeoPlacementTile>`. Each entry marks a
73
+ footprint cell with its own `Cell` member. It is independent of `NeoTile`. Rendered
74
+ tile classes do not belong in this list.
75
+
76
+ Convert a writable placement without changing its row identity or cell:
77
+
78
+ ```neo
79
+ tile.TryConvert<GlassFloorTile>();
80
+ tile.TryConvert(nextTile);
81
+ ```
82
+
83
+ The second form uses the target value's runtime class. It does not copy the
84
+ target's fields. Both forms return `false` when placement validation rejects
85
+ the new class. The grid's imports and compatible-layer relations still apply.
86
+
87
+ `Tiles.Add` and `Tiles.Remove` change placement data directly. The SDK validates
88
+ placement writes and updates live rendering from the resulting data changes,
89
+ including script writes and remote batches. For flattened SDK layers,
90
+ `TrySetTile<T>(cell)` remains available. Spawn objects with
91
+ `TrySpawn(cell, constructedObject)`; successful adoption preserves the object's
92
+ identity. Clone an existing owned object explicitly before placing another copy.
93
+
94
+ Use an object's real `ToVariant` API to apply a variant of its class. The
95
+ object inspector lists variants and their folders. Painting a different object
96
+ class replaces the placement with a new row; it does not change the old object's
97
+ class in place. The old `TrySwapVariant` class-swap APIs are removed.
81
98
 
82
99
  ## Object variants
83
100
 
@@ -275,10 +292,10 @@ opt-in and defaults to `false`; without it the ID is matched exactly. Missing
275
292
  optional child slots are skipped with diagnostics when the authored slot is
276
293
  absent, while stale pre-provenance placements may still fail closed.
277
294
 
278
- A placement row carries its `assetClassId` binding and optional `assetValueId`
279
- override beside its schema keys. They are row provenance, not declared schema:
280
- never declare them as members on a project class, and never strip them from a
281
- row you rewrite.
295
+ Authored object placements can carry variant and source metadata beside their
296
+ schema keys. Preserve that metadata when editing the row; do not declare it as
297
+ project schema fields. Raw tile placements use their row class and `Cell`, with
298
+ no `assetClassId` or `assetValueId` sidecars.
282
299
 
283
300
  ## Segments and tracks
284
301
 
@@ -90,7 +90,7 @@ wrappers.
90
90
  The marker near the top of `SKILL.md` must exactly match the package version:
91
91
 
92
92
  ```html
93
- <!-- reviewed-through-cli: 0.51.2 -->
93
+ <!-- reviewed-through-cli: 0.52.0 -->
94
94
  ```
95
95
 
96
96
  The quoted version above is checked too, so this instruction cannot go stale