@ikas/bp-storefront 1.4.0-beta.121 → 1.4.0-beta.122
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.
|
@@ -121,28 +121,25 @@ export type ThemeGlobals = {
|
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
123
123
|
* Stamps a theme-token type as its RUNTIME view returned by the `@ikas/bp-storefront` getters
|
|
124
|
-
* (`getThemeColors` / `getThemeTypography` / ...). `name` is
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
124
|
+
* (`getThemeColors` / `getThemeTypography` / ...). `name` is REMOVED entirely (hard `Omit`), so
|
|
125
|
+
* ANY attempt to read `.name` off a getter result is a compile error ("Property 'name' does not
|
|
126
|
+
* exist"). A re-added `@deprecated never` was tried first but only produces a soft strikethrough —
|
|
127
|
+
* a name-match like `getThemeTypography().find(t => t.name === "…")` still compiles — which agents
|
|
128
|
+
* ignored; a hard removal is the only thing that actually stops it. The matching runtime data is
|
|
129
|
+
* also stripped ({@link toRuntimeThemeGlobals}) so even a cast-around lookup fails at runtime.
|
|
130
|
+
*
|
|
131
|
+
* Identify a token by its STABLE `id` instead — color → `cssVar` (`var(--<id>)`), typography &
|
|
132
|
+
* keyframe → `className` / `ref` (`_<id>`), color-scheme slot → a `colorsByScheme` key. Token
|
|
133
|
+
* names are non-unique (two design assets can ship the same name) and renaming one must not break
|
|
134
|
+
* references, so matching by name is unsafe. Need a human-readable label? Read it from
|
|
135
|
+
* `list_theme_globals` (MCP/CLI) or the editor's Styles panel — not the runtime getters.
|
|
129
136
|
*
|
|
130
137
|
* The full types above (with a real `name: string`) are still produced in the serialized
|
|
131
138
|
* {@link ThemeGlobals} payload and surfaced by the CLI/MCP `list-theme-globals` AUTHORING read, so
|
|
132
139
|
* the agent/editor can still discover and reuse existing tokens by name. `name` is hidden ONLY at
|
|
133
140
|
* the runtime getter return types (the getters cast the live payload to these views).
|
|
134
141
|
*/
|
|
135
|
-
type RuntimeView<T> = Omit<T, "name"
|
|
136
|
-
/**
|
|
137
|
-
* @deprecated `name` is authoring-only and is NOT exposed at runtime. Identify this token by its
|
|
138
|
-
* STABLE `id` instead — color → `cssVar` (`var(--<id>)`), typography & keyframe → `className` /
|
|
139
|
-
* `ref` (`_<id>`), color-scheme slot → a `colorsByScheme` key. Token names are non-unique (two
|
|
140
|
-
* design assets can ship the same name) and renaming one must not break references, so matching
|
|
141
|
-
* by name is unsafe. Need a human-readable label? Read it from `list_theme_globals` (MCP/CLI) or
|
|
142
|
-
* the editor's Styles panel — not from the runtime getters.
|
|
143
|
-
*/
|
|
144
|
-
name?: never;
|
|
145
|
-
};
|
|
142
|
+
type RuntimeView<T> = Omit<T, "name">;
|
|
146
143
|
export type RuntimeDesignToken = RuntimeView<DesignToken>;
|
|
147
144
|
export type RuntimeTypographyToken = RuntimeView<TypographyToken>;
|
|
148
145
|
export type RuntimeBreakpointToken = RuntimeView<BreakpointToken>;
|