@colixsystems/widget-sdk 0.28.0 → 0.29.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/README.md +5 -1
- package/dist/index.d.ts +2 -0
- package/dist/property-schema.js +14 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,11 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
|
|
|
46
46
|
|
|
47
47
|
## Status
|
|
48
48
|
|
|
49
|
-
`v0.
|
|
49
|
+
`v0.29.0` — pre-publish. The package surface (types, function names, export paths) is the v1 contract; runtime behaviour for some hooks is stubbed (each hook documents what's wired and what isn't). It is **not yet published to npm**.
|
|
50
|
+
|
|
51
|
+
### What's new in 0.29.0
|
|
52
|
+
|
|
53
|
+
**New `assetList` propertySchema type + `ui.showWhen` `neq`/`in` + `ui.step` (REQ-WDG-ASSET).** `assetList` is the multi-pick form of `asset` — an ordered array of bare File UUIDs rendered with the Asset Manager `MultiFileSelector` (selection order preserved; narrow with `ui.mimeFilter`). tenant-copy remaps each id. `ui.showWhen` now accepts `{ neq }` and `{ in: [...] }` alongside `{ eq }`; `ui.step` sets the numeric input/slider step. Additive — no existing export or type changed.
|
|
50
54
|
|
|
51
55
|
### What's new in 0.28.0
|
|
52
56
|
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ export type WidgetPropertyType =
|
|
|
43
43
|
| "richText"
|
|
44
44
|
// REQ-WDG-ASSET: file/asset picker → bare File UUID (Asset Manager picker).
|
|
45
45
|
| "asset"
|
|
46
|
+
// REQ-WDG-ASSET: ordered multi-file picker → Array<File UUID>.
|
|
47
|
+
| "assetList"
|
|
46
48
|
| "expression"
|
|
47
49
|
| "eventBinding"
|
|
48
50
|
| "object"
|
package/dist/property-schema.js
CHANGED
|
@@ -35,6 +35,11 @@ const VALID_TYPES = new Set([
|
|
|
35
35
|
// (an `ui.mimeFilter` narrows it, e.g. "image"). tenant-copy remaps the id
|
|
36
36
|
// through the layout walk's fileId map.
|
|
37
37
|
"asset",
|
|
38
|
+
// REQ-WDG-ASSET: `assetList` is the multi-pick form of `asset` — an ordered
|
|
39
|
+
// array of bare File UUIDs (the Asset Manager multi-picker preserves
|
|
40
|
+
// selection order). Renders `MultiFileSelector` in the Studio Properties
|
|
41
|
+
// Panel; tenant-copy remaps each id through the layout walk's fileId map.
|
|
42
|
+
"assetList",
|
|
38
43
|
"expression", "eventBinding",
|
|
39
44
|
"object", "array",
|
|
40
45
|
]);
|
|
@@ -144,6 +149,15 @@ function coerceLeaf(def, value, path, errors) {
|
|
|
144
149
|
errors.push(`${path}: value not in enum`);
|
|
145
150
|
}
|
|
146
151
|
return value;
|
|
152
|
+
case "assetList":
|
|
153
|
+
if (!Array.isArray(value)) {
|
|
154
|
+
errors.push(`${path}: expected array`);
|
|
155
|
+
} else {
|
|
156
|
+
value.forEach((v, i) => {
|
|
157
|
+
if (typeof v !== "string") errors.push(`${path}[${i}]: expected string`);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return value;
|
|
147
161
|
case "multiselect":
|
|
148
162
|
if (!Array.isArray(value)) {
|
|
149
163
|
errors.push(`${path}: expected array`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colixsystems/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "Common widget interface for AppStudio. Implements WidgetManifest, WidgetContext, property schema, and helper hooks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|