@colixsystems/widget-sdk 0.300.0 → 0.301.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
@@ -90,7 +90,11 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
90
90
 
91
91
  ## Status
92
92
 
93
- `v0.300.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**.
93
+ `v0.301.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**.
94
+
95
+ ### What's new in 0.301.0 (contract 1.247.0)
96
+
97
+ **Status colours are fixed again.** A badge, banner, progress bar, stat delta or toast wears the contract's four status colours on every palette: `success` `#059669`, `danger` `#dc2626`, `warning` `#d97706`, `info` `#0284c7`. Since 0.290.0 the hosts derived them from the app's accent, and a muted accent left a "done" chip grey and an "in progress" one beige, so the state no longer read at a glance. The Alerts section's per-tone colours still win. `deriveStatusColors` stays exported; the hosts no longer call it.
94
98
 
95
99
  ### What's new in 0.300.0 (contract 1.246.0)
96
100
 
package/dist/contract.cjs CHANGED
@@ -90,13 +90,11 @@ const DEFAULT_THEME_TOKENS = Object.freeze({
90
90
  // background — so a dark theme gets a visible spinner with no new maths.
91
91
  loader: "#475569",
92
92
  border: "#e2e8f0",
93
- // The four status tones are re-derived per tenant by `deriveStatusColors`
94
- // (their hue families on the accent's saturation and lightness); these
95
- // literals are that derivation applied to the default palette.
96
- danger: "#e90b0b",
97
- success: "#067e56",
98
- warning: "#9b6507",
99
- info: "#0877af",
93
+ // Fixed for every palette: hosts do not derive them (see 1.247.0).
94
+ danger: "#dc2626",
95
+ success: "#059669",
96
+ warning: "#d97706",
97
+ info: "#0284c7",
100
98
  }),
101
99
  elevation: ELEVATION,
102
100
  interaction: INTERACTION,
@@ -6914,7 +6912,10 @@ const CONTRACT = deepFreeze({
6914
6912
  // 1.246.0: additive (sc-15876) — `useAction()` gains `enqueue(input)`, which
6915
6913
  // queues the run and resolves at once; the script runs with the Action's
6916
6914
  // normal limits and returns nothing to the widget.
6917
- version: "1.246.0",
6915
+ // 1.247.0: the four status tokens are fixed again (danger #dc2626, success
6916
+ // #059669, warning #d97706, info #0284c7); hosts no longer derive them from
6917
+ // the palette. `deriveStatusColors` stays exported, unused by the hosts.
6918
+ version: "1.247.0",
6918
6919
  sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
6919
6920
  hooks: HOOKS,
6920
6921
  primitives: PRIMITIVES,
package/dist/contract.js CHANGED
@@ -85,13 +85,11 @@ const DEFAULT_THEME_TOKENS = Object.freeze({
85
85
  // background — so a dark theme gets a visible spinner with no new maths.
86
86
  loader: "#475569",
87
87
  border: "#e2e8f0",
88
- // The four status tones are re-derived per tenant by `deriveStatusColors`
89
- // (their hue families on the accent's saturation and lightness); these
90
- // literals are that derivation applied to the default palette.
91
- danger: "#e90b0b",
92
- success: "#067e56",
93
- warning: "#9b6507",
94
- info: "#0877af",
88
+ // Fixed for every palette: hosts do not derive them (see 1.247.0).
89
+ danger: "#dc2626",
90
+ success: "#059669",
91
+ warning: "#d97706",
92
+ info: "#0284c7",
95
93
  }),
96
94
  elevation: ELEVATION,
97
95
  interaction: INTERACTION,
@@ -6909,7 +6907,10 @@ const CONTRACT = deepFreeze({
6909
6907
  // 1.246.0: additive (sc-15876) — `useAction()` gains `enqueue(input)`, which
6910
6908
  // queues the run and resolves at once; the script runs with the Action's
6911
6909
  // normal limits and returns nothing to the widget.
6912
- version: "1.246.0",
6910
+ // 1.247.0: the four status tokens are fixed again (danger #dc2626, success
6911
+ // #059669, warning #d97706, info #0284c7); hosts no longer derive them from
6912
+ // the palette. `deriveStatusColors` stays exported, unused by the hosts.
6913
+ version: "1.247.0",
6913
6914
  sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
6914
6915
  hooks: HOOKS,
6915
6916
  primitives: PRIMITIVES,
package/dist/index.d.ts CHANGED
@@ -6162,7 +6162,8 @@ export function deriveAccentTints(
6162
6162
  * Derive the four status colours from a resolved palette: each keeps its hue
6163
6163
  * family and takes the accent's saturation and lightness, stepped toward
6164
6164
  * `onSurface` until it clears WCAG AA against the surface. `null` when the
6165
- * inputs aren't hex.
6165
+ * inputs aren't hex. The hosts do not apply it: a theme's status tones are the
6166
+ * contract's fixed four.
6166
6167
  */
6167
6168
  export function deriveStatusColors(
6168
6169
  primary: string,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colixsystems/widget-sdk",
3
- "version": "0.300.0",
3
+ "version": "0.301.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",
package/src/contract.js CHANGED
@@ -85,13 +85,11 @@ const DEFAULT_THEME_TOKENS = Object.freeze({
85
85
  // background — so a dark theme gets a visible spinner with no new maths.
86
86
  loader: "#475569",
87
87
  border: "#e2e8f0",
88
- // The four status tones are re-derived per tenant by `deriveStatusColors`
89
- // (their hue families on the accent's saturation and lightness); these
90
- // literals are that derivation applied to the default palette.
91
- danger: "#e90b0b",
92
- success: "#067e56",
93
- warning: "#9b6507",
94
- info: "#0877af",
88
+ // Fixed for every palette: hosts do not derive them (see 1.247.0).
89
+ danger: "#dc2626",
90
+ success: "#059669",
91
+ warning: "#d97706",
92
+ info: "#0284c7",
95
93
  }),
96
94
  elevation: ELEVATION,
97
95
  interaction: INTERACTION,
@@ -6909,7 +6907,10 @@ const CONTRACT = deepFreeze({
6909
6907
  // 1.246.0: additive (sc-15876) — `useAction()` gains `enqueue(input)`, which
6910
6908
  // queues the run and resolves at once; the script runs with the Action's
6911
6909
  // normal limits and returns nothing to the widget.
6912
- version: "1.246.0",
6910
+ // 1.247.0: the four status tokens are fixed again (danger #dc2626, success
6911
+ // #059669, warning #d97706, info #0284c7); hosts no longer derive them from
6912
+ // the palette. `deriveStatusColors` stays exported, unused by the hosts.
6913
+ version: "1.247.0",
6913
6914
  sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
6914
6915
  hooks: HOOKS,
6915
6916
  primitives: PRIMITIVES,