@colixsystems/widget-sdk 0.28.0 → 0.30.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 CHANGED
@@ -46,7 +46,15 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
46
46
 
47
47
  ## Status
48
48
 
49
- `v0.28.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**.
49
+ `v0.30.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.30.0
52
+
53
+ **New `folderRef` propertySchema type (REQ-WDG-FOLDERREF).** A Filestore folder picker that stores a bare folder UUID (or `null` = space root) and renders the Asset/Filestore `FolderSelector` in the Studio Properties Panel, scoped by a sibling space field named via `ui.spaceTypeField` (its value `"project"` / `"personal"` selects the PROJECT / PERSONAL space). Changing the space drops a now-out-of-scope selection. Filestore spaces are per-tenant end-user data and are not copied, so tenant-copy leaves the id as-is. Additive — no existing export or type changed.
54
+
55
+ ### What's new in 0.29.0
56
+
57
+ **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
58
 
51
59
  ### What's new in 0.28.0
52
60
 
package/dist/index.d.ts CHANGED
@@ -43,6 +43,10 @@ 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"
48
+ // REQ-WDG-FOLDERREF: Filestore folder picker → folder UUID (or null = root).
49
+ | "folderRef"
46
50
  | "expression"
47
51
  | "eventBinding"
48
52
  | "object"
@@ -35,6 +35,18 @@ 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",
43
+ // REQ-WDG-FOLDERREF: `folderRef` is a Filestore folder picker. Stores a bare
44
+ // folder UUID (or null = space root); renders `FolderSelector` in the Studio
45
+ // Properties Panel, scoped by a sibling space field named via
46
+ // `ui.spaceTypeField`. Filestore spaces are per-tenant end-user data and are
47
+ // NOT copied, so tenant-copy leaves the id as-is (it resolves to the space
48
+ // root if absent in the target).
49
+ "folderRef",
38
50
  "expression", "eventBinding",
39
51
  "object", "array",
40
52
  ]);
@@ -120,6 +132,7 @@ function coerceLeaf(def, value, path, errors) {
120
132
  case "pageRef":
121
133
  case "richText":
122
134
  case "asset":
135
+ case "folderRef":
123
136
  case "expression":
124
137
  case "eventBinding":
125
138
  if (typeof value !== "string") errors.push(`${path}: expected string`);
@@ -144,6 +157,15 @@ function coerceLeaf(def, value, path, errors) {
144
157
  errors.push(`${path}: value not in enum`);
145
158
  }
146
159
  return value;
160
+ case "assetList":
161
+ if (!Array.isArray(value)) {
162
+ errors.push(`${path}: expected array`);
163
+ } else {
164
+ value.forEach((v, i) => {
165
+ if (typeof v !== "string") errors.push(`${path}[${i}]: expected string`);
166
+ });
167
+ }
168
+ return value;
147
169
  case "multiselect":
148
170
  if (!Array.isArray(value)) {
149
171
  errors.push(`${path}: expected array`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colixsystems/widget-sdk",
3
- "version": "0.28.0",
3
+ "version": "0.30.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",