@neocompose/cli 0.31.1 → 0.31.3

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.31.1",
3
+ "version": "0.31.3",
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.31.1 -->
12
+ <!-- reviewed-through-cli: 0.31.3 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -8,7 +8,7 @@ NeoFlow dialogue graphs.
8
8
  - World object contracts
9
9
  - Sorting and optional children
10
10
  - Structured leaves
11
- - Object variants
11
+ - Object variants and lookup folders
12
12
  - Animation overrides
13
13
  - Segments and tracks
14
14
  - NeoFlow dialogues
@@ -81,9 +81,41 @@ Push is folder-agnostic as it is for every other record family: a variant
81
81
  declared in any `.neo` file anywhere pushes identically. `Variants/<Class>.neo`
82
82
  and `Variants/<Class>/<Folder path>.neo` are the canonical layout `neo pull`
83
83
  materializes, one file per (class, folder), folder record first and variants
84
- ordered by name. `NeoVariant` and `NeoVariantFolder` are reference-only: they
85
- declare variants as top-level globals and are never a member, entry, lookup
86
- target, parameter, or generic-binding type.
84
+ ordered by name.
85
+
86
+ A lookup folder binds one concrete list value and enumerates the same authored
87
+ variants for every row in that list. Its second type argument is the list entry
88
+ class. An empty path binds the class root; ordinary folders still require a
89
+ non-empty path.
90
+
91
+ ```neo
92
+ // Variants/ExampleObject.neo
93
+ @id("18b93b80-5733-4747-bf5f-3609336e4f17")
94
+ NeoLookupVariantFolder<ExampleObject, NeoSortingLayer> Root = new(
95
+ path: "",
96
+ collection: Assets.SortingLayers,
97
+ collectionValue: Reference(root.Assets.SortingLayers),
98
+ );
99
+
100
+ @id("736dddf8-2881-47e1-a1d3-55fb65ea9f2a")
101
+ @settings(folder: Root)
102
+ NeoLookupVariant<ExampleObject, NeoSortingLayer> Layered = new(
103
+ initialize: (value) => { return new ExampleObject(); },
104
+ );
105
+ ```
106
+
107
+ - `collection` names the eligible list member; `collectionValue` names the
108
+ concrete stored list whose rows the folder enumerates. Prefer the canonical
109
+ `Reference(root...)` path emitted by pull; an explicit ID remains valid.
110
+ - Lookup `initialize` receives the selected row and returns the target class.
111
+ Lookup `apply` receives the target object followed by the selected row.
112
+ - `NeoLookupVariant<TObject, TValue>` members retain an unbound lookup handle.
113
+ A plain `NeoVariant<TObject>` member may select one concrete row with
114
+ `.Bind(Reference(...))`; do not bind a row to the lookup-handle member type.
115
+ - `NeoVariantFolder` and `NeoLookupVariantFolder` are top-level authoring
116
+ records, never member or parameter types. Variant handle types are supported
117
+ as the dedicated Variant member kind, but remain invalid as collection entry,
118
+ lookup target, parameter, or generic-binding types.
87
119
 
88
120
  ## Sorting and optional children
89
121
 
@@ -83,7 +83,7 @@ wrappers.
83
83
  The marker near the top of `SKILL.md` must exactly match the package version:
84
84
 
85
85
  ```html
86
- <!-- reviewed-through-cli: 0.31.1 -->
86
+ <!-- reviewed-through-cli: 0.31.3 -->
87
87
  ```
88
88
 
89
89
  The quoted version above is checked too, so this instruction cannot go stale