@colixsystems/widget-sdk 0.25.0 → 0.26.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,11 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
46
46
 
47
47
  ## Status
48
48
 
49
- `v0.25.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.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**.
50
+
51
+ ### What's new in 0.26.0
52
+
53
+ **New `pageRef` propertySchema type (REQ-WDG-PAGEREF).** A page picker: the Studio Properties Panel renders a dropdown of the app's pages and stores the chosen page's bare UUID. A widget reads the prop and navigates with `useNavigation().goTo(pageId, params)` — the cross-platform replacement for the old per-widget "navigate on press" event wiring. tenant-copy remaps the stored page id to the copied page. Additive: no existing export or type changed signature.
50
54
 
51
55
  ### What's new in 0.25.0
52
56
 
package/dist/index.d.ts CHANGED
@@ -36,6 +36,9 @@ export type WidgetPropertyType =
36
36
  // REQ-USERMGMT M4 / §4.8: Group picker that emits a bare
37
37
  // AppUserGroup UUID into the page JSON.
38
38
  | "groupRef"
39
+ // REQ-WDG-PAGEREF: page picker that emits a bare AppPage UUID; a widget
40
+ // reads it and navigates via useNavigation().goTo(pageId, params).
41
+ | "pageRef"
39
42
  | "expression"
40
43
  | "eventBinding"
41
44
  | "object"
@@ -20,6 +20,12 @@ const VALID_TYPES = new Set([
20
20
  // value is the raw uuid string so the tenant-copy walker can remap it
21
21
  // through `_remapJson` without per-prop hooks.
22
22
  "groupRef",
23
+ // REQ-WDG-PAGEREF: `pageRef` is a page picker that emits a bare AppPage
24
+ // UUID into the page JSON. Renders a page `<select>` in the Studio
25
+ // Properties Panel; a widget reads it and navigates via
26
+ // `useNavigation().goTo(pageId, params)`. Bare uuid string — tenant-copy
27
+ // remaps it through the layout walk's pageId map (see tenant-copy.service.js).
28
+ "pageRef",
23
29
  "expression", "eventBinding",
24
30
  "object", "array",
25
31
  ]);
@@ -102,6 +108,7 @@ function coerceLeaf(def, value, path, errors) {
102
108
  case "columnRef":
103
109
  case "recordBinding":
104
110
  case "groupRef":
111
+ case "pageRef":
105
112
  case "expression":
106
113
  case "eventBinding":
107
114
  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.25.0",
3
+ "version": "0.26.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",