@colixsystems/widget-sdk 0.235.0 → 0.236.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
@@ -84,7 +84,11 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
84
84
 
85
85
  ## Status
86
86
 
87
- `v0.235.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**.
87
+ `v0.236.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**.
88
+
89
+ ### What's new in 0.236.0 (contract 1.190.0)
90
+
91
+ **Host sign-in screen: the heading and subheading can be hidden.** `resolveLoginTextVisibility(login)` answers whether the built-in sign-in card shows its heading and its subheading: each is `false` only when the author set `login.hideHeading` / `login.hideSubheading` to `true`, so a theme saved before this keeps both. A hidden subheading hides only the sign-in line; the "Create your account" and "Reset your password" step lines still show. It is kept apart from `normaliseLoginDesign` because hidden text is not an authored backdrop. Widgets are unaffected: this is the host surface (`@colixsystems/widget-sdk/host`), and the widget contract version does not change.
88
92
 
89
93
  ### What's new in 0.235.0 (contract 1.190.0)
90
94
 
package/dist/host.d.ts CHANGED
@@ -578,6 +578,12 @@ export function resolveLoginLogoUrl(
578
578
  appLogoUrl: string | null | undefined,
579
579
  ): string | null;
580
580
 
581
+ /** sc-11754 — whether the sign-in card shows its heading and subheading. */
582
+ export function resolveLoginTextVisibility(login: unknown): {
583
+ heading: boolean;
584
+ subheading: boolean;
585
+ };
586
+
581
587
  /** sc-7800 — true when a stored value is a `theme:<path>` colour binding. */
582
588
  export function isThemeTokenRef(value: unknown): boolean;
583
589
 
package/dist/host.js CHANGED
@@ -145,6 +145,7 @@ export {
145
145
  normaliseThemeGradient,
146
146
  normaliseLoginDesign,
147
147
  resolveLoginLogoUrl,
148
+ resolveLoginTextVisibility,
148
149
  } from "./theme-background.js";
149
150
 
150
151
  // sc-8448: one DATETIME local-clock conversion for the picker and the Studio.
@@ -153,9 +153,27 @@ function resolveLoginLogoUrl(login, appLogoUrl) {
153
153
  return own || normaliseImageUrl(appLogoUrl);
154
154
  }
155
155
 
156
+ /**
157
+ * sc-11754 — which of the card's two text lines the author left showing.
158
+ * Only a literal `true` hides, so every app saved before this keeps both.
159
+ * Not in `normaliseLoginDesign`: hidden text is not a backdrop, so it must
160
+ * not lift the card or drop the shell background.
161
+ *
162
+ * @param {object|null|undefined} login - `themeConfig.login`.
163
+ * @returns {{ heading: boolean, subheading: boolean }}
164
+ */
165
+ function resolveLoginTextVisibility(login) {
166
+ const own = login && typeof login === "object" ? login : {};
167
+ return {
168
+ heading: own.hideHeading !== true,
169
+ subheading: own.hideSubheading !== true,
170
+ };
171
+ }
172
+
156
173
  module.exports = {
157
174
  LOGIN_TEXT_MAX_LENGTH,
158
175
  normaliseThemeGradient,
159
176
  normaliseLoginDesign,
160
177
  resolveLoginLogoUrl,
178
+ resolveLoginTextVisibility,
161
179
  };
@@ -144,3 +144,20 @@ export function resolveLoginLogoUrl(login, appLogoUrl) {
144
144
  : null;
145
145
  return own || normaliseImageUrl(appLogoUrl);
146
146
  }
147
+
148
+ /**
149
+ * sc-11754 — which of the card's two text lines the author left showing.
150
+ * Only a literal `true` hides, so every app saved before this keeps both.
151
+ * Not in `normaliseLoginDesign`: hidden text is not a backdrop, so it must
152
+ * not lift the card or drop the shell background.
153
+ *
154
+ * @param {object|null|undefined} login - `themeConfig.login`.
155
+ * @returns {{ heading: boolean, subheading: boolean }}
156
+ */
157
+ export function resolveLoginTextVisibility(login) {
158
+ const own = login && typeof login === "object" ? login : {};
159
+ return {
160
+ heading: own.hideHeading !== true,
161
+ subheading: own.hideSubheading !== true,
162
+ };
163
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colixsystems/widget-sdk",
3
- "version": "0.235.0",
3
+ "version": "0.236.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",