@colixsystems/widget-sdk 0.26.0 → 0.28.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.26.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.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**.
50
+
51
+ ### What's new in 0.28.0
52
+
53
+ **New `asset` propertySchema type + `ui.showWhen` (REQ-WDG-ASSET).** `asset` is a file/asset picker that stores a bare File UUID and renders the Asset Manager `FileSelector` in the Studio Properties Panel (narrow it with `ui.mimeFilter`, e.g. `"image"`). `ui.showWhen: { field, eq }` conditionally hides a field unless a sibling field equals a value (e.g. show the asset picker only when `imageSource === "asset"`). tenant-copy remaps an `asset` File UUID to the copied file. Additive — no existing export or type changed.
54
+
55
+ ### What's new in 0.27.0
56
+
57
+ **New `richText` propertySchema type (REQ-WDG-RICHTEXT).** A rich-text (HTML) string edited via a Tiptap editor in the Studio Properties Panel; the widget renders the sanitised HTML. Stored as a plain string (no tenant-copy remap). Additive — no existing export or type changed.
50
58
 
51
59
  ### What's new in 0.26.0
52
60
 
package/dist/index.d.ts CHANGED
@@ -39,6 +39,10 @@ export type WidgetPropertyType =
39
39
  // REQ-WDG-PAGEREF: page picker that emits a bare AppPage UUID; a widget
40
40
  // reads it and navigates via useNavigation().goTo(pageId, params).
41
41
  | "pageRef"
42
+ // REQ-WDG-RICHTEXT: rich-text (HTML string) edited via a Tiptap editor.
43
+ | "richText"
44
+ // REQ-WDG-ASSET: file/asset picker → bare File UUID (Asset Manager picker).
45
+ | "asset"
42
46
  | "expression"
43
47
  | "eventBinding"
44
48
  | "object"
@@ -26,6 +26,15 @@ const VALID_TYPES = new Set([
26
26
  // `useNavigation().goTo(pageId, params)`. Bare uuid string — tenant-copy
27
27
  // remaps it through the layout walk's pageId map (see tenant-copy.service.js).
28
28
  "pageRef",
29
+ // REQ-WDG-RICHTEXT: `richText` is a rich-text (HTML) string. Renders a
30
+ // Tiptap editor in the Studio Properties Panel; the widget renders the
31
+ // sanitised HTML. Stored as a string, so no tenant-copy remap is needed.
32
+ "richText",
33
+ // REQ-WDG-ASSET: `asset` is a file/asset picker. Stores a bare File UUID;
34
+ // renders the Asset Manager FileSelector in the Studio Properties Panel
35
+ // (an `ui.mimeFilter` narrows it, e.g. "image"). tenant-copy remaps the id
36
+ // through the layout walk's fileId map.
37
+ "asset",
29
38
  "expression", "eventBinding",
30
39
  "object", "array",
31
40
  ]);
@@ -109,6 +118,8 @@ function coerceLeaf(def, value, path, errors) {
109
118
  case "recordBinding":
110
119
  case "groupRef":
111
120
  case "pageRef":
121
+ case "richText":
122
+ case "asset":
112
123
  case "expression":
113
124
  case "eventBinding":
114
125
  if (typeof value !== "string") errors.push(`${path}: expected string`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colixsystems/widget-sdk",
3
- "version": "0.26.0",
3
+ "version": "0.28.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",