@neocompose/cli 0.54.1 → 0.56.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.54.1",
3
+ "version": "0.56.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.54.1 -->
12
+ <!-- reviewed-through-cli: 0.56.0 -->
13
13
 
14
14
  # Neo Compose CLI
15
15
 
@@ -97,7 +97,7 @@ wrappers.
97
97
  The marker near the top of `SKILL.md` must exactly match the package version:
98
98
 
99
99
  ```html
100
- <!-- reviewed-through-cli: 0.54.1 -->
100
+ <!-- reviewed-through-cli: 0.56.0 -->
101
101
  ```
102
102
 
103
103
  The quoted version above is checked too, so this instruction cannot go stale
@@ -85,6 +85,10 @@ Use context-aware typed annotations:
85
85
  - `@visibility(.Hidden)` only on a class; absence means visible.
86
86
  - Stateful settings use contextual enum cases, such as
87
87
  `@settings(format: .Plain)` and `@settings(selection: .Multi)`.
88
+ - `@settings(...)` before a `List` element or `Dictionary` value type
89
+ configures the collection's entries: `List<@settings(format: .Plain) string>`,
90
+ `Dictionary<string, @settings(min: 0) int>`. Only the member that declares
91
+ the collection spells them; overrides share its entries.
88
92
  - `@relations(...)` only on the source class of a specialized direct relation.
89
93
  - `@distribution(kind: .Sparse | .Packed)` only on a value-owning member
90
94
  declaration or override. It chooses whether the member's value keeps its
@@ -99,6 +103,39 @@ Use context-aware typed annotations:
99
103
  Use numeric literals for numeric limits. Keep annotations separate instead of
100
104
  inventing a generic metadata bag.
101
105
 
106
+ ### Storage
107
+
108
+ A member's `@storage(allowed: ...)` is `.Immutable`, `.Save`, `.Session`, or
109
+ `.Writable`. Omit it to inherit the placement parent's storage. `.Writable` is
110
+ always writable at runtime and resolves from where the value is placed: Save
111
+ under a Save parent, Session under a Session or Immutable parent. Use it for a
112
+ member that NeoScript or an animation clip writes and whose value should persist
113
+ exactly when its owner persists. Animation clips can target `.Writable` members.
114
+
115
+ ```neo
116
+ class AnimationSpriteObject(SpriteInfo sprite) : NeoSpriteObject {
117
+ @id("69905c25-8c05-4d18-90fd-069f1526a38a")
118
+ @storage(allowed: .Writable)
119
+ public override Vector3 Size = new(1, 1, 0);
120
+ }
121
+
122
+ abstract class BodyLayerSprite(CharacterCosmeticConfig config, SpriteInfo sprite, int nearOrder, int farOrder) : AnimationSpriteObject(sprite: sprite) {
123
+ @id("e81dcef4-9ea8-4bbc-a83b-565b7cf3feff")
124
+ @storage(allowed: .Session)
125
+ public override Vector3 Size = new(2, 2, 0);
126
+ }
127
+ ```
128
+
129
+ An override below a `.Writable` member, directly or through other overrides,
130
+ may declare `.Writable`, `.Save`, or `.Session`, or omit `@storage`. It may not
131
+ declare `.Immutable` or `.Inherit`, and it may not be `readonly`. Static
132
+ members, `readonly` members, and project roots cannot declare `.Writable`.
133
+ Lowering reports each violation at the member's position.
134
+
135
+ On a class, `@storage(allowed: .Writable)` means every placement must resolve
136
+ to Save or Session. A subclass may narrow it to `.Save` or `.Session`. An
137
+ undeclared static member of such a class is Session.
138
+
102
139
  `@index(member: Field, kind: .Unique)` and
103
140
  `@column(member: Field, width: ..., visibility: ..., pin: ..., overflow: ...)`
104
141
  are repeatable List annotations. `member:` is a bare field name on the entry