@colixsystems/widget-sdk 0.130.0 → 0.131.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 +11 -2
- package/dist/contract.cjs +16 -6
- package/dist/contract.js +16 -6
- package/dist/index.d.ts +5 -5
- package/dist/style-group.js +9 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -70,11 +70,20 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
|
|
|
70
70
|
|
|
71
71
|
## Status
|
|
72
72
|
|
|
73
|
-
`v0.
|
|
73
|
+
`v0.131.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**.
|
|
74
|
+
|
|
75
|
+
### What's new in 0.131.0 (contract 1.102.0)
|
|
76
|
+
|
|
77
|
+
**`styleGroup(name)` is deprecated and now inert (sc-7344).** The Widget Builder preview's click-to-select mode — the primitive's only reader — has been removed, so nothing maps a clicked element back to its style group any more. Style fields are edited through the whole-widget style editor the gear button opens.
|
|
78
|
+
|
|
79
|
+
- **No migration needed.** `styleGroup()` is still exported and still returns the same props, so existing `<View {...styleGroup("Card")}>` spreads keep building and rendering exactly as before — they are simply no-ops now. It was always a marker that changed nothing about how a widget renders.
|
|
80
|
+
- **Don't add it to new widgets.** The AI widget agent no longer emits it.
|
|
74
81
|
|
|
75
82
|
### What's new in 0.130.0 (contract 1.101.0)
|
|
76
83
|
|
|
77
|
-
|
|
84
|
+
**~~New primitive `styleGroup(name)`~~ — superseded by 0.131.0, see above (sc-7282).** A widget's `styleSchema` already names the element each field belongs to via `ui.group` ("Card", "Title", "Value"), and the Studio renders those as labelled fieldsets. But a group name says which *fieldset* a control sits in, not which *element on screen* it moves — so clicking a button in the Widget Builder preview could only ever open the whole schema.
|
|
85
|
+
|
|
86
|
+
*(Historical — the guidance below no longer applies; see 0.131.0 above.)*
|
|
78
87
|
|
|
79
88
|
- **Spread it on the element each non-Basics group paints:** `<View {...styleGroup("Card")}>`. Pass the EXACT `ui.group` string; a mismatch marks an element no group owns. Mark each group ONCE, on the outermost element an author would point at — never the `"Basics"` group (it paints the whole widget) and never a child of an already-marked element. On a list that repeats a marked element per row, mark every row.
|
|
80
89
|
- **One module, both hosts.** It rides the existing `dataSet` prop: `react-native-web` maps it to a `data-*` attribute, and real react-native drops it, so the marker is inert on the device rather than a second implementation. It is a marker, not a style — it changes nothing about how a widget renders.
|
package/dist/contract.cjs
CHANGED
|
@@ -1878,14 +1878,14 @@ const PRIMITIVES = [
|
|
|
1878
1878
|
rnComponent: null,
|
|
1879
1879
|
docsUrl: null,
|
|
1880
1880
|
},
|
|
1881
|
-
// sc-7282 — the element marker.
|
|
1882
|
-
//
|
|
1883
|
-
// hosts.
|
|
1884
|
-
//
|
|
1881
|
+
// sc-7282 — the element marker. sc-7344 removed its only reader (the Widget
|
|
1882
|
+
// Builder preview's click-to-select), so it is now DEPRECATED and inert on
|
|
1883
|
+
// both hosts. Kept exported because it is published API: dropping it would
|
|
1884
|
+
// break widgets already spreading it, and it is a no-op marker either way.
|
|
1885
1885
|
{
|
|
1886
1886
|
name: "styleGroup",
|
|
1887
1887
|
description:
|
|
1888
|
-
"
|
|
1888
|
+
"DEPRECATED (sc-7344) — do not add it to new widgets. It marked which rendered element a styleSchema `ui.group` painted, for a Widget Builder preview click-to-select that no longer exists. Nothing reads the marker now, so it has no effect on either host. It remains exported and safe: widgets that already spread it keep working — the call is a no-op now — so no migration is needed. Style fields are edited through the whole-widget style editor.",
|
|
1889
1889
|
rnComponent: null,
|
|
1890
1890
|
docsUrl: null,
|
|
1891
1891
|
},
|
|
@@ -3841,7 +3841,17 @@ const CONTRACT = deepFreeze({
|
|
|
3841
3841
|
// device — no §8 native-only case and no paired implementation. Purely a
|
|
3842
3842
|
// marker: it changes nothing about how a widget renders. Minor bump on the
|
|
3843
3843
|
// pre-1.0 channel.
|
|
3844
|
-
|
|
3844
|
+
// 1.102.0: deprecation (sc-7344) — `styleGroup(name)` is now inert. Its only
|
|
3845
|
+
// reader, the Widget Builder preview's click-to-select mode (sc-7209) and
|
|
3846
|
+
// the per-element style narrowing it fed (sc-7282), is removed: two
|
|
3847
|
+
// controls opened one drawer, and arming the overlay stopped the author
|
|
3848
|
+
// exercising the widget they were previewing. The primitive stays
|
|
3849
|
+
// EXPORTED and unchanged — it is published API and a pure no-op marker, so
|
|
3850
|
+
// widgets already spreading it keep building with no migration (CLAUDE.md
|
|
3851
|
+
// §7: a breaking change to a shipped package needs a reason, and there is
|
|
3852
|
+
// none here). Only the MANDATE to emit it is gone, from the AI widget
|
|
3853
|
+
// agent prompt and the designer skill. Minor bump: nothing removed.
|
|
3854
|
+
version: "1.102.0",
|
|
3845
3855
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
3846
3856
|
hooks: HOOKS,
|
|
3847
3857
|
primitives: PRIMITIVES,
|
package/dist/contract.js
CHANGED
|
@@ -1878,14 +1878,14 @@ const PRIMITIVES = [
|
|
|
1878
1878
|
rnComponent: null,
|
|
1879
1879
|
docsUrl: null,
|
|
1880
1880
|
},
|
|
1881
|
-
// sc-7282 — the element marker.
|
|
1882
|
-
//
|
|
1883
|
-
// hosts.
|
|
1884
|
-
//
|
|
1881
|
+
// sc-7282 — the element marker. sc-7344 removed its only reader (the Widget
|
|
1882
|
+
// Builder preview's click-to-select), so it is now DEPRECATED and inert on
|
|
1883
|
+
// both hosts. Kept exported because it is published API: dropping it would
|
|
1884
|
+
// break widgets already spreading it, and it is a no-op marker either way.
|
|
1885
1885
|
{
|
|
1886
1886
|
name: "styleGroup",
|
|
1887
1887
|
description:
|
|
1888
|
-
"
|
|
1888
|
+
"DEPRECATED (sc-7344) — do not add it to new widgets. It marked which rendered element a styleSchema `ui.group` painted, for a Widget Builder preview click-to-select that no longer exists. Nothing reads the marker now, so it has no effect on either host. It remains exported and safe: widgets that already spread it keep working — the call is a no-op now — so no migration is needed. Style fields are edited through the whole-widget style editor.",
|
|
1889
1889
|
rnComponent: null,
|
|
1890
1890
|
docsUrl: null,
|
|
1891
1891
|
},
|
|
@@ -3841,7 +3841,17 @@ const CONTRACT = deepFreeze({
|
|
|
3841
3841
|
// device — no §8 native-only case and no paired implementation. Purely a
|
|
3842
3842
|
// marker: it changes nothing about how a widget renders. Minor bump on the
|
|
3843
3843
|
// pre-1.0 channel.
|
|
3844
|
-
|
|
3844
|
+
// 1.102.0: deprecation (sc-7344) — `styleGroup(name)` is now inert. Its only
|
|
3845
|
+
// reader, the Widget Builder preview's click-to-select mode (sc-7209) and
|
|
3846
|
+
// the per-element style narrowing it fed (sc-7282), is removed: two
|
|
3847
|
+
// controls opened one drawer, and arming the overlay stopped the author
|
|
3848
|
+
// exercising the widget they were previewing. The primitive stays
|
|
3849
|
+
// EXPORTED and unchanged — it is published API and a pure no-op marker, so
|
|
3850
|
+
// widgets already spreading it keep building with no migration (CLAUDE.md
|
|
3851
|
+
// §7: a breaking change to a shipped package needs a reason, and there is
|
|
3852
|
+
// none here). Only the MANDATE to emit it is gone, from the AI widget
|
|
3853
|
+
// agent prompt and the designer skill. Minor bump: nothing removed.
|
|
3854
|
+
version: "1.102.0",
|
|
3845
3855
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
3846
3856
|
hooks: HOOKS,
|
|
3847
3857
|
primitives: PRIMITIVES,
|
package/dist/index.d.ts
CHANGED
|
@@ -2681,12 +2681,12 @@ export function pressableLift(state?: {
|
|
|
2681
2681
|
}): Array<Record<string, unknown> | null>;
|
|
2682
2682
|
|
|
2683
2683
|
/**
|
|
2684
|
-
* sc-
|
|
2685
|
-
*
|
|
2686
|
-
*
|
|
2684
|
+
* @deprecated (sc-7344) — inert; nothing reads the marker. It marked which
|
|
2685
|
+
* rendered element a styleSchema `ui.group` painted, for a Widget Builder
|
|
2686
|
+
* preview click-to-select that no longer exists. Still exported and safe:
|
|
2687
|
+
* existing spreads keep working as no-ops, so no migration is needed.
|
|
2687
2688
|
*
|
|
2688
|
-
*
|
|
2689
|
-
* `undefined`, so spreading the result is always safe.
|
|
2689
|
+
* A missing or blank name returns `undefined`, so spreading is always safe.
|
|
2690
2690
|
*/
|
|
2691
2691
|
export function styleGroup(
|
|
2692
2692
|
name: string,
|
package/dist/style-group.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
// sc-7282 —
|
|
2
|
-
//
|
|
3
|
-
// only
|
|
1
|
+
// sc-7282 — marked WHICH rendered element a styleSchema `ui.group` paints.
|
|
2
|
+
//
|
|
3
|
+
// DEPRECATED (sc-7344): its only reader, the Widget Builder preview's
|
|
4
|
+
// click-to-select, is gone, so the marker is now inert. Kept exported because
|
|
5
|
+
// it is published API and a no-op — widgets already spreading it need no
|
|
6
|
+
// migration (CLAUDE.md §7). Do not add it to new widgets.
|
|
4
7
|
//
|
|
5
8
|
// ONE file, no `.native.js` twin: `react-native-web` maps `dataSet` to `data-*`
|
|
6
9
|
// attributes while real react-native drops the prop, so the marker is inert on
|
|
@@ -16,11 +19,10 @@
|
|
|
16
19
|
export const STYLE_GROUP_DATA_KEY = "styleGroup";
|
|
17
20
|
|
|
18
21
|
/**
|
|
19
|
-
*
|
|
20
|
-
* `<View {...styleGroup("Card")}>`.
|
|
22
|
+
* @deprecated (sc-7344) — inert; nothing reads the marker.
|
|
21
23
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
+
* Props marking the element a style group paints. Still returns the same shape,
|
|
25
|
+
* so existing spreads keep working as no-ops.
|
|
24
26
|
*
|
|
25
27
|
* Returns `undefined` for a missing or blank name so `{...styleGroup(x)}` stays
|
|
26
28
|
* safe when `x` is absent: spreading `undefined` is a no-op in JSX.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colixsystems/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.131.0",
|
|
4
4
|
"description": "Common widget interface for AppStudio. Implements WidgetManifest, WidgetContext, property schema, and helper hooks.",
|
|
5
5
|
"homepage": "https://github.com/Colix-AB/AppStudio",
|
|
6
6
|
"type": "module",
|