@colixsystems/widget-sdk 0.255.0 → 0.256.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 +5 -1
- package/dist/contract.cjs +3 -1
- package/dist/contract.js +3 -1
- package/dist/host.d.ts +1 -1
- package/dist/navigation.cjs +3 -6
- package/dist/navigation.js +3 -6
- package/package.json +1 -1
- package/src/contract.js +3 -1
package/README.md
CHANGED
|
@@ -85,7 +85,11 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
|
|
|
85
85
|
|
|
86
86
|
## Status
|
|
87
87
|
|
|
88
|
-
`v0.
|
|
88
|
+
`v0.256.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**.
|
|
89
|
+
|
|
90
|
+
### What's new in 0.256.0 (contract 1.207.0)
|
|
91
|
+
|
|
92
|
+
**A page's top navigation bar can centre its tabs again.** `resolveTopBarTokens().tabAlignment` is `"left"` | `"center"` | `"right"`. A `theme_config.topBar.tabAlignment` of `"center"` places the tabs between two flexible spacers, never by centring the row, so a row with more tabs than fit still scrolls from its first tab. Unset or unknown still resolves to `"left"`, so an app that never chose is unchanged. Host-integration surface only — no author-facing hook, prop, primitive, or manifest field changed.
|
|
89
93
|
|
|
90
94
|
### What's new in 0.255.0
|
|
91
95
|
|
package/dist/contract.cjs
CHANGED
|
@@ -6372,7 +6372,9 @@ const CONTRACT = deepFreeze({
|
|
|
6372
6372
|
// showing, the app's appearance preference, `canSwitch` and
|
|
6373
6373
|
// `setPreference`, backed by the optional `appearance` host slice. Hosts
|
|
6374
6374
|
// without it read light / false.
|
|
6375
|
-
|
|
6375
|
+
// 1.207.0: additive (sc-12198) — `resolveTopBarTokens().tabAlignment` is
|
|
6376
|
+
// "left" | "center" | "right" again; "center" centres the tabs.
|
|
6377
|
+
version: "1.207.0",
|
|
6376
6378
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
6377
6379
|
hooks: HOOKS,
|
|
6378
6380
|
primitives: PRIMITIVES,
|
package/dist/contract.js
CHANGED
|
@@ -6368,7 +6368,9 @@ const CONTRACT = deepFreeze({
|
|
|
6368
6368
|
// showing, the app's appearance preference, `canSwitch` and
|
|
6369
6369
|
// `setPreference`, backed by the optional `appearance` host slice. Hosts
|
|
6370
6370
|
// without it read light / false.
|
|
6371
|
-
|
|
6371
|
+
// 1.207.0: additive (sc-12198) — `resolveTopBarTokens().tabAlignment` is
|
|
6372
|
+
// "left" | "center" | "right" again; "center" centres the tabs.
|
|
6373
|
+
version: "1.207.0",
|
|
6372
6374
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
6373
6375
|
hooks: HOOKS,
|
|
6374
6376
|
primitives: PRIMITIVES,
|
package/dist/host.d.ts
CHANGED
|
@@ -409,7 +409,7 @@ export interface TopBarTokens {
|
|
|
409
409
|
* current tab so the page shows through it. */
|
|
410
410
|
tabStyle: "underline" | "attached";
|
|
411
411
|
/** Where the row's tabs sit across its width; `left` unless authored. */
|
|
412
|
-
tabAlignment: "left" | "right";
|
|
412
|
+
tabAlignment: "left" | "center" | "right";
|
|
413
413
|
/** The column the tabs sit in: the whole bar, or the page content's. The
|
|
414
414
|
* bar's surface spans the full width either way. */
|
|
415
415
|
tabRowWidth: "full" | "content";
|
package/dist/navigation.cjs
CHANGED
|
@@ -566,11 +566,8 @@ function resolveTopStripeLayout(theme) {
|
|
|
566
566
|
// reading the bar; so does the SITE header, which is shown instead of this
|
|
567
567
|
// row rather than beside it.
|
|
568
568
|
//
|
|
569
|
-
// The notification bell is the
|
|
570
|
-
//
|
|
571
|
-
// `topBar.textColor` and the export tints it not at all — and moving it
|
|
572
|
-
// here would widen that difference rather than close it. Whoever closes it
|
|
573
|
-
// should move both hosts at once.
|
|
569
|
+
// The notification bell is one of the row's icons and takes this tint on
|
|
570
|
+
// both hosts; the bells outside the row keep the bar's.
|
|
574
571
|
tintColor: hexOr(stripe.textColor, barTokens.tintColor),
|
|
575
572
|
titleColor: hexOr(stripe.textColor, barTokens.titleColor),
|
|
576
573
|
order,
|
|
@@ -617,7 +614,7 @@ function resolveAppLogo(logo, darkSurfaceLogo, onDark) {
|
|
|
617
614
|
return onDark && darkSurfaceLogo ? darkSurfaceLogo : logo;
|
|
618
615
|
}
|
|
619
616
|
|
|
620
|
-
const TAB_ALIGNMENTS = ["left", "right"];
|
|
617
|
+
const TAB_ALIGNMENTS = ["left", "center", "right"];
|
|
621
618
|
const TAB_ROW_WIDTHS = ["full", "content"];
|
|
622
619
|
|
|
623
620
|
function resolveTopBarTokens(theme) {
|
package/dist/navigation.js
CHANGED
|
@@ -557,11 +557,8 @@ export function resolveTopStripeLayout(theme) {
|
|
|
557
557
|
// reading the bar; so does the SITE header, which is shown instead of this
|
|
558
558
|
// row rather than beside it.
|
|
559
559
|
//
|
|
560
|
-
// The notification bell is the
|
|
561
|
-
//
|
|
562
|
-
// `topBar.textColor` and the export tints it not at all — and moving it
|
|
563
|
-
// here would widen that difference rather than close it. Whoever closes it
|
|
564
|
-
// should move both hosts at once.
|
|
560
|
+
// The notification bell is one of the row's icons and takes this tint on
|
|
561
|
+
// both hosts; the bells outside the row keep the bar's.
|
|
565
562
|
tintColor: hexOr(stripe.textColor, barTokens.tintColor),
|
|
566
563
|
titleColor: hexOr(stripe.textColor, barTokens.titleColor),
|
|
567
564
|
order,
|
|
@@ -608,7 +605,7 @@ export function resolveAppLogo(logo, darkSurfaceLogo, onDark) {
|
|
|
608
605
|
return onDark && darkSurfaceLogo ? darkSurfaceLogo : logo;
|
|
609
606
|
}
|
|
610
607
|
|
|
611
|
-
const TAB_ALIGNMENTS = ["left", "right"];
|
|
608
|
+
const TAB_ALIGNMENTS = ["left", "center", "right"];
|
|
612
609
|
const TAB_ROW_WIDTHS = ["full", "content"];
|
|
613
610
|
|
|
614
611
|
export function resolveTopBarTokens(theme) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colixsystems/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.256.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
|
@@ -6368,7 +6368,9 @@ const CONTRACT = deepFreeze({
|
|
|
6368
6368
|
// showing, the app's appearance preference, `canSwitch` and
|
|
6369
6369
|
// `setPreference`, backed by the optional `appearance` host slice. Hosts
|
|
6370
6370
|
// without it read light / false.
|
|
6371
|
-
|
|
6371
|
+
// 1.207.0: additive (sc-12198) — `resolveTopBarTokens().tabAlignment` is
|
|
6372
|
+
// "left" | "center" | "right" again; "center" centres the tabs.
|
|
6373
|
+
version: "1.207.0",
|
|
6372
6374
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
6373
6375
|
hooks: HOOKS,
|
|
6374
6376
|
primitives: PRIMITIVES,
|