@a2ui-sdk/types 0.2.0 → 0.2.2
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/README.md +20 -0
- package/dist/0.8/index.d.ts +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -122,6 +122,9 @@ import type {
|
|
|
122
122
|
// Layout types
|
|
123
123
|
Distribution,
|
|
124
124
|
Alignment,
|
|
125
|
+
|
|
126
|
+
// State types
|
|
127
|
+
ScopeValue,
|
|
125
128
|
} from '@a2ui-sdk/types/0.8'
|
|
126
129
|
```
|
|
127
130
|
|
|
@@ -190,6 +193,23 @@ interface ActionPayload {
|
|
|
190
193
|
}
|
|
191
194
|
```
|
|
192
195
|
|
|
196
|
+
### ScopeValue (v0.8+)
|
|
197
|
+
|
|
198
|
+
Scope context for collection item rendering:
|
|
199
|
+
|
|
200
|
+
```tsx
|
|
201
|
+
interface ScopeValue {
|
|
202
|
+
/**
|
|
203
|
+
* Base path for relative path resolution.
|
|
204
|
+
* null = root scope (no scoping)
|
|
205
|
+
* string = scoped to a specific data path (e.g., "/items/0")
|
|
206
|
+
*/
|
|
207
|
+
basePath: string | null
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Used internally to support relative paths in template-rendered children (List, Row, Column with template binding).
|
|
212
|
+
|
|
193
213
|
## License
|
|
194
214
|
|
|
195
215
|
Apache-2.0
|
package/dist/0.8/index.d.ts
CHANGED
|
@@ -39,6 +39,21 @@ export interface DataEntry {
|
|
|
39
39
|
valueBoolean?: boolean;
|
|
40
40
|
valueMap?: DataEntry[];
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Scope value for collection scopes.
|
|
44
|
+
* Tracks the current data path when rendering template-bound children.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* // Root scope
|
|
48
|
+
* { basePath: null }
|
|
49
|
+
*
|
|
50
|
+
* // Item scope in a list
|
|
51
|
+
* { basePath: "/items/0" }
|
|
52
|
+
*/
|
|
53
|
+
export interface ScopeValue {
|
|
54
|
+
/** null = root scope, otherwise the base path for relative path resolution */
|
|
55
|
+
basePath: string | null;
|
|
56
|
+
}
|
|
42
57
|
/**
|
|
43
58
|
* Surface styles configuration.
|
|
44
59
|
*/
|