@g9tm/lynxcontrols-foundation 2.5.9 → 2.5.10

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.
@@ -11,5 +11,13 @@ import { type G9ShapeSet } from './shape.js';
11
11
  export declare function toRootCssVariables(theme: {
12
12
  readonly palette: G9PaletteValues;
13
13
  readonly scheme: 'light' | 'dark';
14
+ readonly appTokens?: Readonly<Record<string, string>>;
14
15
  }, shape?: G9ShapeSet, direction?: 'ltr' | 'rtl'): G9CssVariables;
16
+ /**
17
+ * A theme's app tokens as CSS variables (2.5.10): `--g9-<name>` for each (a token theme's bubbles, glass, wallpaper,
18
+ * depth, radii, motion), written after the palette so a theme that names a token the library also writes wins.
19
+ */
20
+ export declare function toAppTokenCssVariables(theme: {
21
+ readonly appTokens?: Readonly<Record<string, string>>;
22
+ }): G9CssVariables;
15
23
  //# sourceMappingURL=root.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../src/tokens/root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA8D,MAAM,YAAY,CAAC;AAE7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,SAAS,CAAC;AAE/E;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE;IAAE,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAA;CAAE,EAC/E,KAAK,GAAE,UAA2B,EAClC,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,GACxB,cAAc,CAQhB"}
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../src/tokens/root.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA8D,MAAM,YAAY,CAAC;AAE7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,KAAK,UAAU,EAAuC,MAAM,SAAS,CAAC;AAE/E;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE;IACL,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACvD,EACD,KAAK,GAAE,UAA2B,EAClC,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,GACxB,cAAc,CAShB;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACvD,GAAG,cAAc,CAIjB"}
@@ -7,9 +7,16 @@ function toRootCssVariables(theme, shape = g9DefaultShape, direction) {
7
7
  ...toLayoutCssVariables(),
8
8
  ...toShapeCssVariables(shape, direction),
9
9
  ...toCssVariables(theme),
10
- ...toDerivedCssVariables(theme)
10
+ ...toDerivedCssVariables(theme),
11
+ ...toAppTokenCssVariables(theme)
11
12
  };
12
13
  }
13
- export { toRootCssVariables };
14
+ function toAppTokenCssVariables(theme) {
15
+ var _theme_appTokens;
16
+ const out = {};
17
+ for (const [name, value] of Object.entries(null != (_theme_appTokens = theme.appTokens) ? _theme_appTokens : {}))if (value) out[`--g9-${name}`] = value;
18
+ return out;
19
+ }
20
+ export { toAppTokenCssVariables, toRootCssVariables };
14
21
 
15
22
  //# sourceMappingURL=root.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokens/root.js","sources":["../../src/tokens/root.ts"],"sourcesContent":["import { type G9CssVariables, toCssVariables, toLayoutCssVariables, toMetricCssVariables } from './css-vars';\nimport { toDerivedCssVariables } from './derived';\nimport type { G9PaletteValues } from './generated/palettes';\nimport { type G9ShapeSet, g9DefaultShape, toShapeCssVariables } from './shape';\n\n/**\n * Every CSS variable a `G9Provider` root carries for a theme, a shape and a direction: the metrics\n * (`--g9-metric-*`), the layout metrics (`--g9-layout-*`), the shape (`--g9-radius-*`, `--g9-type-*`,\n * `--g9-height-*`, `--g9-touch-target`, the fonts), the colour tokens and the derived colours. What the provider writes\n * at mount (less a theme's token aliases), so a page outside Lynx — the static-render contract of\n * `@g9tm/lynxcontrols-web/static` — reads the same values the app does.\n */\nexport function toRootCssVariables(\n theme: { readonly palette: G9PaletteValues; readonly scheme: 'light' | 'dark' },\n shape: G9ShapeSet = g9DefaultShape,\n direction?: 'ltr' | 'rtl',\n): G9CssVariables {\n return {\n ...toMetricCssVariables(),\n ...toLayoutCssVariables(),\n ...toShapeCssVariables(shape, direction),\n ...toCssVariables(theme),\n ...toDerivedCssVariables(theme),\n };\n}\n"],"names":["toRootCssVariables","theme","shape","g9DefaultShape","direction","toMetricCssVariables","toLayoutCssVariables","toShapeCssVariables","toCssVariables","toDerivedCssVariables"],"mappings":";;;AAYO,SAASA,mBACdC,KAA+E,EAC/EC,QAAoBC,cAAc,EAClCC,SAAyB;IAEzB,OAAO;QACL,GAAGC,sBAAsB;QACzB,GAAGC,sBAAsB;QACzB,GAAGC,oBAAoBL,OAAOE,UAAU;QACxC,GAAGI,eAAeP,MAAM;QACxB,GAAGQ,sBAAsBR,MAAM;IACjC;AACF"}
1
+ {"version":3,"file":"tokens/root.js","sources":["../../src/tokens/root.ts"],"sourcesContent":["import { type G9CssVariables, toCssVariables, toLayoutCssVariables, toMetricCssVariables } from './css-vars';\nimport { toDerivedCssVariables } from './derived';\nimport type { G9PaletteValues } from './generated/palettes';\nimport { type G9ShapeSet, g9DefaultShape, toShapeCssVariables } from './shape';\n\n/**\n * Every CSS variable a `G9Provider` root carries for a theme, a shape and a direction: the metrics\n * (`--g9-metric-*`), the layout metrics (`--g9-layout-*`), the shape (`--g9-radius-*`, `--g9-type-*`,\n * `--g9-height-*`, `--g9-touch-target`, the fonts), the colour tokens and the derived colours. What the provider writes\n * at mount (less a theme's token aliases), so a page outside Lynx — the static-render contract of\n * `@g9tm/lynxcontrols-web/static` — reads the same values the app does.\n */\nexport function toRootCssVariables(\n theme: {\n readonly palette: G9PaletteValues;\n readonly scheme: 'light' | 'dark';\n readonly appTokens?: Readonly<Record<string, string>>;\n },\n shape: G9ShapeSet = g9DefaultShape,\n direction?: 'ltr' | 'rtl',\n): G9CssVariables {\n return {\n ...toMetricCssVariables(),\n ...toLayoutCssVariables(),\n ...toShapeCssVariables(shape, direction),\n ...toCssVariables(theme),\n ...toDerivedCssVariables(theme),\n ...toAppTokenCssVariables(theme),\n };\n}\n\n/**\n * A theme's app tokens as CSS variables (2.5.10): `--g9-<name>` for each (a token theme's bubbles, glass, wallpaper,\n * depth, radii, motion), written after the palette so a theme that names a token the library also writes wins.\n */\nexport function toAppTokenCssVariables(theme: {\n readonly appTokens?: Readonly<Record<string, string>>;\n}): G9CssVariables {\n const out: Record<string, string> = {};\n for (const [name, value] of Object.entries(theme.appTokens ?? {})) if (value) out[`--g9-${name}`] = value;\n return out as G9CssVariables;\n}\n"],"names":["toRootCssVariables","theme","shape","g9DefaultShape","direction","toMetricCssVariables","toLayoutCssVariables","toShapeCssVariables","toCssVariables","toDerivedCssVariables","toAppTokenCssVariables","_theme_appTokens","out","name","value","Object"],"mappings":";;;AAYO,SAASA,mBACdC,KAIC,EACDC,QAAoBC,cAAc,EAClCC,SAAyB;IAEzB,OAAO;QACL,GAAGC,sBAAsB;QACzB,GAAGC,sBAAsB;QACzB,GAAGC,oBAAoBL,OAAOE,UAAU;QACxC,GAAGI,eAAeP,MAAM;QACxB,GAAGQ,sBAAsBR,MAAM;QAC/B,GAAGS,uBAAuBT,MAAM;IAClC;AACF;AAMO,SAASS,uBAAuBT,KAEtC;QAE4CU;IAD3C,MAAMC,MAA8B,CAAC;IACrC,KAAK,MAAM,CAACC,MAAMC,MAAM,IAAIC,OAAO,OAAO,CAAC,QAAAJ,CAAAA,mBAAAA,MAAM,SAAS,AAAD,IAAdA,mBAAmB,CAAC,GAAI,IAAIG,OAAOF,GAAG,CAAC,CAAC,KAAK,EAAEC,MAAM,CAAC,GAAGC;IACpG,OAAOF;AACT"}
package/docs/api.md CHANGED
@@ -19,6 +19,7 @@ folder) explain how the pieces fit; the migration tables map every MAUI member.
19
19
  | `resolveLayoutMetrics` | function | Resolves the layout metrics: the MAUI fallbacks, then `overrides` (the counterpart of defining the keys in the app's `LayoutMetrics.xaml`), then the derived members. An unknown key or a wrongly shaped value throws a `G9Error` (`layout-metric-unknown` / `layout-metric-invalid`) instead of being ignored. |
20
20
  | `resolveShape` | function | A shape with some parts replaced (deep for radii, type roles, heights and fonts). A `density` moves the base's three heights together by the step's difference from the base's own step (explicit `heights` still win, part by part); `touchTarget` never goes under `g9MinTouchTarget`. |
21
21
  | `resolveThemeColor` | function | A colour value with a `var(--g9-<token>)` reference resolved against `palette` (`'var(--g9-surface)'` → the palette's `Surface`); any other value, or a variable the palette does not have, is returned unchanged. For places that need a literal, such as the value of another custom property (a `var()` there is not resolved on every engine). |
22
+ | `toAppTokenCssVariables` | function | A theme's app tokens as CSS variables (2.5.10): `--g9-<name>` for each (a token theme's bubbles, glass, wallpaper, depth, radii, motion), written after the palette so a theme that names a token the library also writes wins. |
22
23
  | `toCssVariables` | function | One `--g9-<token>` variable per colour of `palette`, in token order. |
23
24
  | `toDerivedCssVariables` | function | The derived variables' values for a resolved theme (the provider writes them with the token variables). |
24
25
  | `toKebabCase` | function | `OnPrimaryContainer` → `on-primary-container`, `SpacingXSmall` → `spacing-x-small`, `G9BottomSheet…` → `g9-bottom-sheet…`. |
@@ -108,18 +109,29 @@ folder) explain how the pieces fit; the migration tables map every MAUI member.
108
109
  | `fixedNeutralScale` | function | Neutrals of a fixed hue and chroma, whatever the brand (warm paper, cool steel), on the sine curve's lightness steps (ShopManager's `fixedNeutralScale`). |
109
110
  | `formatColor` | function | Formats a colour as CSS: `#RRGGBB` when opaque, otherwise `rgba(R, G, B, A)`. Channels are rounded to the nearest byte; the alpha is printed with the fewest digits that parse back to the same float32 value, so `parseColor(formatColor(c))` reproduces the alpha exactly. |
110
111
  | `fromOklch` | function | OKLCH → sRGB (`G9Rgba`, channels 0..1). Out-of-gamut colours keep L and H and lose chroma until they fit (binary search, 18 steps ≈ 1e-6 chroma), so a vivid brand never shifts hue when it is darkened or lightened. |
112
+ | `g9AccentTokens` | function | Every token a single accent colour sets, for a scheme (G9Hub `accentTokens`): `color-mix()` values, resolved when the theme is read. `{}` for something that is not a colour. |
111
113
  | `g9ActiveThemeId` | function | The theme id in force: the chosen one, or the light / dark one for the device's scheme when following it. |
114
+ | `g9AppearanceClasses` | function | The classes an app's root takes for the appearance in force (2.5.10, G9Hub's root classes): `g9-scheme-dark`, `g9-density-compact`, `g9-effects-off`, `g9-effects-off--low-end` / `--reduced-motion`, `g9-text-large`. |
112
115
  | `g9AppTokens` | function | The app tokens for a palette and scheme: plain colours (and one gradient), never variables. |
113
116
  | `g9AppTokenVariables` | function | The app tokens as CSS variables (`--g9-hover`…; `prefix` default `g9-`), for G9Provider's `themeExtras`. |
117
+ | `g9BackgroundStyle` | function | A CSS `background` (a token theme's `wallpaper`, a `G9CssWallpaper`) as a Lynx view's style (2.5.10): the tokens substituted, colour functions computed, the last plain layer as the colour, every image layer's position, size and repeat split out. |
114
118
  | `g9BuildPersonalTheme` | function | The theme a draft describes: the base's recipe with the draft's accent, its surfaces tinted (cool, warm, or by the accent) through overrides measured on `palettes` (the base's palettes for the accent: `recipePalettes(...)`). |
119
+ | `g9BuildTokenPersonalTheme` | function | The token theme a stored personal draft describes (G9Hub `buildTheme`, the same tokens): the base's tokens with the draft's accent, the surfaces tinted (cool, warm, or by the accent) and the wallpaper's CSS. `wallpapers` are the app's (default the library's, see `G9CssWallpaper`). |
115
120
  | `g9EffectsEnabled` | function | Whether effects (blur, glow, motion flourishes) are on. |
121
+ | `g9EffectsState` | function | Whether effects are on and, when they are off, why (2.5.10): the person turned them off (`setting`), or `auto` on a low-end device (`lowEnd`) or a system that asks for less motion (`reducedMotion`). |
122
+ | `g9IsTokenTheme` | function | Whether a value read from outside is a token theme (`scheme` and a `tokens` map) rather than a G9ThemeDefinition. |
116
123
  | `g9NewPersonalThemeId` | function | A fresh personal id (`me:…`). |
117
124
  | `g9NormalizeAppearance` | function | Stored settings read back loosely: every unknown or broken field takes its default. |
118
125
  | `g9PersonalDraft` | function | A draft starting from `base`. |
119
- | `g9SanitizeTokens` | function | Only well-formed tokens of `allowed` names (a leading `--g9-` is dropped first), from a theme that came from outside (the server, a file): values that cannot break out of a declaration, and pictures only as inline `data:` images. |
126
+ | `g9ResolveThemeTokens` | function | Every token of a token theme, merged over its scheme's defaults and the base, each value made paintable (`resolveColorMix`), unknown names and unsafe values dropped. |
127
+ | `g9SanitizeTokens` | function | Only well-formed tokens of `allowed` names (a leading `--g9-` is dropped first; without `allowed`, any lower-case token name), from a theme that came from outside (the server, a file): values that cannot break out of a declaration, and pictures only as inline `data:` images. |
120
128
  | `g9ScaledType` | function | The type scale at a text size (sizes and line heights rounded), for G9Provider's `shape.type`. |
129
+ | `g9SubstituteTokens` | function | `var(--<token>)` (and `var(--<token>, fallback)`) replaced by the token's value, nested ones too. |
121
130
  | `g9ThemeFileName` | function | A file name for a theme export (letters, digits, dashes; any script). |
122
- | `g9ThemeFromInput` | function | A theme from the server or a file, read loosely (a newer server never breaks the client); null when broken. |
131
+ | `g9ThemeFromInput` | function | A theme from the server or a file, read loosely (a newer server never breaks the client); null when broken. A token theme (`{ id, name, scheme, tokens }`, G9Hub's format; 2.5.10) is read with `g9ThemeFromTokens`. |
132
+ | `g9ThemeFromTokens` | function | A token theme as a G9ThemeDefinition (2.5.10): its colours as the palette of its scheme (overrides over a recipe branded with its accent), every token as an app token of that scheme (`--g9-<name>` through G9Provider), and its scheme as the forced mode. Organisation themes that list only some tokens take the rest from `options.defaults`. |
133
+ | `g9TokenForPalette` | function | The design token a palette token takes its colour from in a token theme (a contrast fix sets that token), or null. |
134
+ | `g9TokenValueValid` | function | Whether a token value is acceptable (what an editor marks invalid otherwise; G9Hub `tokenValueValid`). |
123
135
  | `g9Wallpaper` | function | A wallpaper by id (from `list`, default `g9Wallpapers`), or null. |
124
136
  | `getContrastingTextColor` | function | Black on light backgrounds (luminance above 0.5), white otherwise. MAUI `GetContrastingTextColor`. |
125
137
  | `getContrastRatio` | function | WCAG contrast ratio, `1` to `21`. |
@@ -151,6 +163,7 @@ folder) explain how the pieces fit; the migration tables map every MAUI member.
151
163
  | `resolveButtonVariant` | function | Resolves a button variant against a palette (MAUI `G9Visuals.ResolveButtonVariant`, which read `G9Palette.Current`; pass the active theme's palette). An unrecognised variant resolves like `'primary'`, as the MAUI switch's default arm did. |
152
164
  | `resolveButtonVariantVars` | function | `resolveButtonVariant` as `var(--g9-…)` references (no palette read; cached per variant). |
153
165
  | `resolveColorFunctions` | function | Every colour function inside a CSS value replaced by a paintable colour (`'1px solid color-mix(in oklch, #f00 30%, white)'` → `'1px solid #FFB3A7'`), for shorthands and gradients. |
166
+ | `resolveColorMix` | function | One token value as the Lynx engines paint it (2.5.10): `color-mix()` / `oklch()` / `oklab()` / `hsl()` computed, `rgb(r g b / a)` written as `rgba()`, a `linear()` easing as its nearest cubic-bezier, `rem` as px (16 per rem). Anything else passes through. |
154
167
  | `resolveColorScheme` | function | `'light'`/`'dark'` pick that scheme; `'system'` follows `systemScheme` (MAUI `G9Theme.ApplyCurrent`); `'scheduled'` is dark during the schedule's span at `hour`. |
155
168
  | `resolveCssColor` | function | A colour Lynx can paint (`#RRGGBB` or `rgba(…)`), or the input unchanged when it is not a colour (a `var(--x)`). |
156
169
  | `resolveEasing` | function | A named easing as Lynx-readable CSS, or the input when it already is one. |
@@ -175,6 +188,7 @@ folder) explain how the pieces fit; the migration tables map every MAUI member.
175
188
  | `G9ThemeMode` | enum | Which theme the user chose (MAUI `AppTheme`: `Unspecified` is `system`, follow the platform). |
176
189
  | `g9AccentPresets` | constant | Accent colours offered by "pick a colour" UIs (G9Hub ACCENT_PRESETS, SAC brand picker). Tested for contrast. |
177
190
  | `g9AliasPresets` | constant | Ready-made alias maps for the four G9 apps' existing names (the migration guides start from these). |
191
+ | `g9AllAppTokenNames` | constant | Every app token name the library knows: its own and a token theme's (2.5.10), for a sanitizer or an editor. |
178
192
  | `g9AppTokenNames` | constant | The tokens an app (a messenger) adds to the library palette. |
179
193
  | `g9BuiltInThemes` | constant | The built-in themes over the built-in recipes, one per accent preset family. |
180
194
  | `G9Colors` | constant | Alpha recipes the G9 controls paint with (MAUI `G9Colors` constants). |
@@ -183,14 +197,19 @@ folder) explain how the pieces fit; the migration tables map every MAUI member.
183
197
  | `g9DefaultThemeSchedule` | constant | The default dark span of the scheduled mode: from 18:00 to 07:00. |
184
198
  | `g9Easings` | constant | Named easings as cubic-bezier (Lynx reads cubic-bezier, linear, ease, ease-in, ease-out, ease-in-out). |
185
199
  | `g9FontScaleFactors` | constant | Text size factors. |
200
+ | `g9ThemeBaseTokens` | constant | Shape and motion every token theme shares unless it sets its own (G9Hub BASE_TOKENS). |
201
+ | `g9ThemeTokenGroups` | constant | The token groups an editor shows (G9Hub TOKEN_GROUPS). |
202
+ | `g9ThemeTokenNames` | constant | Every design token a token theme may set (G9Hub TOKEN_NAMES), grouped as `g9ThemeTokenGroups`. |
186
203
  | `g9TonalSteps` | constant | Steps of a tonal scale (Tailwind-like names: 50 lightest … 950 darkest). |
187
204
  | `g9Wallpapers` | constant | Wallpapers drawn with gradients only (no pictures, no network). |
188
205
  | `G9ColorFormatError` | class | Thrown when a string is not a colour this library can read. |
189
206
  | `G9AppearanceSettings` | interface | What a person chose on Settings → Appearance (kept per device by the app). |
190
207
  | `G9AppTokenOptions` | interface | Options of `g9AppTokens`. |
208
+ | `G9BackgroundStyle` | interface | The style a CSS background takes on a Lynx view (each property a comma list, one entry per image layer). |
191
209
  | `G9BrandColors` | interface | The colours a brand gives. Only `primary` is required; the rest are derived when missing. |
192
210
  | `G9BrandPaletteOptions` | interface | How `createBrandPalette` builds a palette from a brand colour: grey tint, contrast target and whether the brand colour is kept as is. |
193
211
  | `G9ContrastResult` | interface | One rule's outcome. |
212
+ | `G9CssWallpaper` | interface | A chat wallpaper written as a CSS `background` per scheme (G9Hub WALLPAPERS: layers built from `var(--g9-…)`). |
194
213
  | `G9CustomPalettes` | interface | App palettes replacing (all or some of) the stock light and dark palettes. |
195
214
  | `G9DesignRegistry` | interface | Pilot's `DesignRegistry`. |
196
215
  | `G9DesignRegistryOptions` | interface | What `createDesignRegistry` edits live: the theme store and, when the app allows it, the shape. |
@@ -202,6 +221,7 @@ folder) explain how the pieces fit; the migration tables map every MAUI member.
202
221
  | `G9ResolvedTheme` | interface | A resolved theme: what is painted and why. Frozen. |
203
222
  | `G9Rgba` | interface | A colour as four channels in `0..1`, stored at float32 precision exactly like MAUI `Color`. Colour arithmetic (darken, mix, contrast) runs on this shape so its results match the original helpers bit for bit; format with `formatColor` to get a CSS string back. |
204
223
  | `G9ScaleOptions` | interface | Options of `tonalScale` and `neutralScale`. |
224
+ | `G9SchemeAppTokens` | interface | App tokens per scheme (2.5.10; `G9ResolvedTheme.appTokens`). |
205
225
  | `G9ThemeDefinition` | interface | One selectable theme. |
206
226
  | `G9ThemeOptions` | interface | Inputs of theme resolution. |
207
227
  | `G9ThemeRecipe` | interface | A named recipe. |
@@ -210,6 +230,9 @@ folder) explain how the pieces fit; the migration tables map every MAUI member.
210
230
  | `G9ThemeRegistrySnapshot` | interface | The themes a person can pick, by source. |
211
231
  | `G9ThemeSchedule` | interface | When `'scheduled'` paints dark: from `darkFrom` (hour, 0–23) to `darkTo` (exclusive), across midnight when `darkFrom > darkTo`. Default 18 → 7 (Riskara's evening theme). |
212
232
  | `G9ThemeStore` | interface | The live theme (MAUI `G9Palette.Current` + `G9Theme`): one snapshot, replaced on every change, and listeners told once per change. Works with `useSyncExternalStore` (`subscribe` / `getSnapshot`). |
233
+ | `G9TokenPersonalDraft` | interface | A personal theme as G9Hub stores it on the device (Plan-V3 §11.5): a built-in base by id, an accent, surfaces, wallpaper. |
234
+ | `G9TokenTheme` | interface | A theme as one scheme's token map: G9Hub's built-in and organisation themes (the server's `G9DtTheme`). |
235
+ | `G9TokenThemeOptions` | interface | Options of `g9ThemeFromTokens`. |
213
236
  | `G9VariantColors` | interface | The colours a variant resolves to: fill, foreground, stroke, and whether the fill is a gradient (MAUI `G9VariantColors`). Colours are CSS strings. |
214
237
  | `G9VariantVars` | interface | A variant painted with CSS variables: the same colours as `resolveButtonVariant`, following the theme with no script (the provider writes the variables). `gradient` names the token whose gradient a solid fill uses. |
215
238
  | `G9Wallpaper` | interface | A chat wallpaper: layers drawn behind a thread, from the palette so it follows the theme and accent. |
@@ -219,12 +242,15 @@ folder) explain how the pieces fit; the migration tables map every MAUI member.
219
242
  | `G9ColorInput` | type | Anything the colour helpers accept: a CSS colour string or channels. |
220
243
  | `G9ContrastRule` | type | `[foreground, background, minimum]`. 4.5 = body text (WCAG AA), 3 = large text, icons and borders that carry meaning. |
221
244
  | `G9EffectsMode` | type | Whether effects are on, off, or decided by the device. |
245
+ | `G9EffectsReason` | type | Why the effects are off when they are (2.5.10): the person chose it, a low-end device, or the system asks for less motion. |
222
246
  | `G9Fill` | type | A fill: a solid colour, or a top-to-bottom linear gradient. |
223
247
  | `G9FontScale` | type | A text size step. |
224
248
  | `G9PaletteOverrides` | type | Some tokens replaced by CSS colours. |
225
249
  | `G9SurfaceTone` | type | How a personal theme's surfaces are tinted. |
226
250
  | `G9ThemeListener` | type | Listener of `G9ThemeStore`; receives the snapshot taken at notify time. |
227
251
  | `G9ThemeSource` | type | Where a theme definition comes from: built in, the organisation's, or the person's own. |
252
+ | `G9ThemeTokenName` | type | A design token's name (`bg`, `bubble-mine`, `radius-lg`…). |
253
+ | `G9ThemeTokens` | type | A token map (a theme lists only what it changes). |
228
254
  | `G9TokenAliasMap` | type | App name → library token (`'TextPrimary'`) or a literal colour (`'#1B1512'`). |
229
255
  | `G9TonalScale` | type | A colour's tonal scale: one hex colour per step (50 lightest … 950 darkest). |
230
256
  | `G9TonalStep` | type | A step of a tonal scale: 50, 100, 200 … 900, 950. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@g9tm/lynxcontrols-foundation",
3
- "version": "2.5.9",
3
+ "version": "2.5.10",
4
4
  "description": "Pure TypeScript core: design tokens, theme model, culture (strings, digits, calendars, relative time, durations), icon model, safe execution, diagnostics, preference and capability contracts. No React, no UI.",
5
5
  "license": "MIT",
6
6
  "type": "module",