@ikas/bp-storefront 1.4.0-beta.88 → 1.4.0-beta.89
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.
|
@@ -118,25 +118,35 @@ export type ThemeGlobals = {
|
|
|
118
118
|
};
|
|
119
119
|
};
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
122
|
-
* (`getThemeColors` / `getThemeTypography` / ...).
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* from the return type turns that into a compile error.
|
|
121
|
+
* Stamps a theme-token type as its RUNTIME view returned by the `@ikas/bp-storefront` getters
|
|
122
|
+
* (`getThemeColors` / `getThemeTypography` / ...). `name` is removed, then re-added as a
|
|
123
|
+
* DEPRECATED `never`. Plainly `Omit`-ing it would only ever surface a bare "Property 'name' does
|
|
124
|
+
* not exist on type" — re-adding it as a documented `@deprecated never` instead means a developer
|
|
125
|
+
* who reaches for `.name` at runtime sees the strikethrough + the explanation below on hover, and
|
|
126
|
+
* any actual use of the value is a type error (`never`). The agent is steered the same way.
|
|
128
127
|
*
|
|
129
|
-
* The full types above (with `name`) are still produced in the serialized
|
|
130
|
-
* payload and surfaced by the CLI/MCP `list-theme-globals` AUTHORING read, so
|
|
131
|
-
* can still discover and reuse existing tokens by name. `name` is hidden ONLY
|
|
132
|
-
* getter return types.
|
|
128
|
+
* The full types above (with a real `name: string`) are still produced in the serialized
|
|
129
|
+
* {@link ThemeGlobals} payload and surfaced by the CLI/MCP `list-theme-globals` AUTHORING read, so
|
|
130
|
+
* the agent/editor can still discover and reuse existing tokens by name. `name` is hidden ONLY at
|
|
131
|
+
* the runtime getter return types (the getters cast the live payload to these views).
|
|
133
132
|
*/
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
133
|
+
type RuntimeView<T> = Omit<T, "name"> & {
|
|
134
|
+
/**
|
|
135
|
+
* @deprecated `name` is authoring-only and is NOT exposed at runtime. Identify this token by its
|
|
136
|
+
* STABLE `id` instead — color → `cssVar` (`var(--<id>)`), typography & keyframe → `className` /
|
|
137
|
+
* `ref` (`_<id>`), color-scheme slot → a `colorsByScheme` key. Token names are non-unique (two
|
|
138
|
+
* design assets can ship the same name) and renaming one must not break references, so matching
|
|
139
|
+
* by name is unsafe. Need a human-readable label? Read it from `list_theme_globals` (MCP/CLI) or
|
|
140
|
+
* the editor's Styles panel — not from the runtime getters.
|
|
141
|
+
*/
|
|
142
|
+
name?: never;
|
|
143
|
+
};
|
|
144
|
+
export type RuntimeDesignToken = RuntimeView<DesignToken>;
|
|
145
|
+
export type RuntimeTypographyToken = RuntimeView<TypographyToken>;
|
|
146
|
+
export type RuntimeBreakpointToken = RuntimeView<BreakpointToken>;
|
|
147
|
+
export type RuntimeKeyframeToken = RuntimeView<KeyframeToken>;
|
|
148
|
+
export type RuntimeColorSchemeToken = RuntimeView<ColorSchemeToken>;
|
|
149
|
+
export type RuntimeColorSchemeSlot = RuntimeView<ColorSchemeSlot>;
|
|
140
150
|
/**
|
|
141
151
|
* Runtime view of {@link ThemeGlobals.colorSchemes} (returned by `getThemeColorSchemes`). The
|
|
142
152
|
* slot list carries only `{ id }`: slot display LABELS (the slot `name`) are authoring-only —
|