@dloizides/design-tokens 1.10.0 → 1.11.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/CHANGELOG.md +21 -0
- package/dist/index.d.mts +54 -19
- package/dist/index.d.ts +54 -19
- package/dist/index.js +45 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -18
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
|
|
5
|
+
**Optional mode extras, increased-contrast overrides, motion springs, and the D1 "Living Room" `nextgame` preset.**
|
|
6
|
+
|
|
7
|
+
Additive types: no existing field changes and no emitter reads the new ones, so other presets
|
|
8
|
+
and consumers are byte-identical.
|
|
9
|
+
|
|
10
|
+
- `ModeColors` gains optional `textTertiary`, `focusRing`, `brandFill`, `onBrandFill`,
|
|
11
|
+
`successText`, `dangerText`, `dangerFill`.
|
|
12
|
+
- `DesignTokens.contrastMore?: ContrastMoreOverrides` — per-mode `Partial<ModeColors>` plus
|
|
13
|
+
`focusRingWidth`, applied under `prefers-contrast: more`.
|
|
14
|
+
- `Motion.springs?: MotionSprings` (`focus` / `settle` / `press`, each `{ stiffness, damping }`).
|
|
15
|
+
`DEFAULT_MOTION` is unchanged.
|
|
16
|
+
- New exported types: `MotionSpring`, `MotionSprings`, `ContrastMoreOverrides`.
|
|
17
|
+
- `NEXTGAME_TOKENS` rebuilt for the dark console dashboard (sole consumer: nextgame-web):
|
|
18
|
+
graphite dark grounds (`#0A0D12` / `#121720` / `#1A212C`), amber `#FFD37A` brand fill with
|
|
19
|
+
`#1A1204` ink, white focus ring, dark-tuned success and danger text, contrast-more tiers,
|
|
20
|
+
Barlow type, spec §6 durations (160/240/320ms) and easings, springs. The light-surface
|
|
21
|
+
amber/teal/magenta triad is kept for OG images and email. `monoFamily` is dropped and
|
|
22
|
+
`headingScale` is now 1.
|
|
23
|
+
|
|
3
24
|
## 1.10.0
|
|
4
25
|
|
|
5
26
|
**New `nextgame` preset — the NextGame game-recommendation app.**
|
package/dist/index.d.mts
CHANGED
|
@@ -41,6 +41,20 @@ interface ModeColors {
|
|
|
41
41
|
* lifts. Optional; consumers fall back to `surface` when a preset omits it.
|
|
42
42
|
*/
|
|
43
43
|
surfaceMuted?: string;
|
|
44
|
+
/** Third text tier — unavailable/"same" labels. Consumers fall back to `textSecondary`. */
|
|
45
|
+
textTertiary?: string;
|
|
46
|
+
/** Keyboard/gamepad focus ring colour. Consumers fall back to `text`. */
|
|
47
|
+
focusRing?: string;
|
|
48
|
+
/** Mode-specific brand FILL (CTA, selected item) when the top-level `primary` does not suit this mode's ground. */
|
|
49
|
+
brandFill?: string;
|
|
50
|
+
/** Text on `brandFill`. Required whenever `brandFill` is set; only the nextgame preset test measures the pair. */
|
|
51
|
+
onBrandFill?: string;
|
|
52
|
+
/** Success colour tuned for TEXT on this mode's grounds (semantic.success is tuned for light). */
|
|
53
|
+
successText?: string;
|
|
54
|
+
/** Error colour tuned for TEXT on this mode's grounds. */
|
|
55
|
+
dangerText?: string;
|
|
56
|
+
/** Fill behind `dangerText` (icon well, destructive button). */
|
|
57
|
+
dangerFill?: string;
|
|
44
58
|
}
|
|
45
59
|
/**
|
|
46
60
|
* Semantic/status colours. The four base fields match `TenantThemeConfig`'s
|
|
@@ -132,6 +146,17 @@ interface MotionEasings {
|
|
|
132
146
|
decelerate: MotionEasing;
|
|
133
147
|
accelerate: MotionEasing;
|
|
134
148
|
}
|
|
149
|
+
/** Spring parameters (mass 1) for RN `Animated.spring`. */
|
|
150
|
+
interface MotionSpring {
|
|
151
|
+
stiffness: number;
|
|
152
|
+
damping: number;
|
|
153
|
+
}
|
|
154
|
+
/** Named springs: `focus` for a focus move, `settle` for layout settling, `press` for confirm feedback. */
|
|
155
|
+
interface MotionSprings {
|
|
156
|
+
focus: MotionSpring;
|
|
157
|
+
settle: MotionSpring;
|
|
158
|
+
press: MotionSpring;
|
|
159
|
+
}
|
|
135
160
|
/**
|
|
136
161
|
* Motion token group — durations + easings. Framework-agnostic values only; the
|
|
137
162
|
* RN `Animated`/`Easing` wiring lives in `@dloizides/ui-motion`, which reads these.
|
|
@@ -143,6 +168,8 @@ interface MotionEasings {
|
|
|
143
168
|
interface Motion {
|
|
144
169
|
durations: MotionDurations;
|
|
145
170
|
easings: MotionEasings;
|
|
171
|
+
/** Optional named springs. Absent from {@link DEFAULT_MOTION}; presets that animate with springs set them. */
|
|
172
|
+
springs?: MotionSprings;
|
|
146
173
|
}
|
|
147
174
|
/** Branding asset references (ContentService GUIDs). Matches `TenantThemeConfig`'s `BrandingConfig`. */
|
|
148
175
|
interface Branding {
|
|
@@ -218,6 +245,16 @@ interface TokenExtensions {
|
|
|
218
245
|
workspace?: WorkspaceExtras;
|
|
219
246
|
verdict?: VerdictColors;
|
|
220
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Overrides applied when the user asks for more contrast (`prefers-contrast: more`).
|
|
250
|
+
* Partial per mode: only the fields that change. Optional; presets without it get none.
|
|
251
|
+
*/
|
|
252
|
+
interface ContrastMoreOverrides {
|
|
253
|
+
light?: Partial<ModeColors>;
|
|
254
|
+
dark?: Partial<ModeColors>;
|
|
255
|
+
/** Focus ring width in px under increased contrast. */
|
|
256
|
+
focusRingWidth?: number;
|
|
257
|
+
}
|
|
221
258
|
/**
|
|
222
259
|
* One app's complete token set. The single source the three emitters read.
|
|
223
260
|
* Core fields align with `TenantThemeConfig`; optional groups are supersets.
|
|
@@ -265,6 +302,8 @@ interface DesignTokens {
|
|
|
265
302
|
* changes nothing for existing presets or emitters.
|
|
266
303
|
*/
|
|
267
304
|
motion?: Motion;
|
|
305
|
+
/** Optional increased-contrast overrides (`prefers-contrast: more`). */
|
|
306
|
+
contrastMore?: ContrastMoreOverrides;
|
|
268
307
|
/** Branding asset references */
|
|
269
308
|
branding: Branding;
|
|
270
309
|
/** Optional stack-specific token supersets */
|
|
@@ -733,28 +772,24 @@ declare const KATALOGOS_TOKENS: DesignTokens;
|
|
|
733
772
|
* endorsement of any of them. That rules out blue, green and red as the brand
|
|
734
773
|
* primary — the three colours a games product reaches for first.
|
|
735
774
|
*
|
|
736
|
-
*
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
*
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
* is the cheapest single decision that stops a consumer product reading as an
|
|
747
|
-
* internal tool.
|
|
775
|
+
* D1 "LIVING ROOM". The app is a dark console dashboard read from a couch, so
|
|
776
|
+
* the dark mode is the product and its grounds are GRAPHITE (#0A0D12 canvas,
|
|
777
|
+
* #121720 cards, #1A212C raised): neutral enough that box art and platform
|
|
778
|
+
* badges carry the colour. On those grounds the pick/selected colour is a warm
|
|
779
|
+
* AMBER fill (`dark.brandFill` #FFD37A with `onBrandFill` #1A1204), lighter than
|
|
780
|
+
* the top-level signal amber so a dark label clears AA on it. The top-level
|
|
781
|
+
* amber/teal/magenta triad is retained for LIGHT surfaces only (OG images,
|
|
782
|
+
* email); teal and magenta are not UI chrome in the dark app. Focus is a white
|
|
783
|
+
* ring, and `contrastMore` lifts the secondary text tiers and hairlines for
|
|
784
|
+
* `prefers-contrast: more`.
|
|
748
785
|
*
|
|
749
786
|
* Explicitly NOT used: the violet/indigo ramp, which is both the estate's banned
|
|
750
787
|
* AI default and, on a store page, indistinguishable from a dozen launcher UIs.
|
|
751
788
|
*
|
|
752
|
-
* ACCESSIBILITY. Both borders are authored to clear WCAG 1.4.11 (3:1)
|
|
753
|
-
*
|
|
754
|
-
*
|
|
755
|
-
*
|
|
756
|
-
* cannot serve error-as-text in both modes, and that is a token split, not a
|
|
757
|
-
* colour nudge.
|
|
789
|
+
* ACCESSIBILITY. Both borders are authored to clear WCAG 1.4.11 (3:1).
|
|
790
|
+
* `semantic.error` is tuned for the LIGHT surfaces and registers the usual
|
|
791
|
+
* dark-mode gap; the dark app reads error text from `dark.dangerText` on
|
|
792
|
+
* `dark.dangerFill` instead — one hex cannot serve error-as-text in both modes.
|
|
758
793
|
*/
|
|
759
794
|
declare const NEXTGAME_TOKENS: DesignTokens;
|
|
760
795
|
|
|
@@ -913,4 +948,4 @@ declare function onBrandRatio(background: string, explicit?: string): number | n
|
|
|
913
948
|
*/
|
|
914
949
|
declare function canCarryAccessibleInk(background: string): boolean;
|
|
915
950
|
|
|
916
|
-
export { AA_LARGE_TEXT_RATIO, AA_NON_TEXT_RATIO, AA_NORMAL_TEXT_RATIO, AML_CSS_VAR_NAMES, AML_TOKENS, type BrandExtras, type Branding, type CssVarNames, DEFAULT_CSS_VAR_NAMES, DEFAULT_MOTION, DIGITALKIN_TOKENS, type DesignTokens, EREVNA_TOKENS, FINREG_MODULE_COLORS, FINREG_SURFACE_COLORS, type FinregModuleColor, type FinregModuleColors, type FinregSurfaceColors, type InkScale, KATALOGOS_TOKENS, type ModeColors, type Motion, type MotionDurations, type MotionEasing, type MotionEasings, NEXTGAME_TOKENS, ON_BRAND_DARK_INK, ON_BRAND_LIGHT_INK, PRESETS, type Radii, type RnThemeConfig, type SemanticColors, type Shadows, type ShellColors, type TailwindColors, type TailwindPreset, type ToCssVarsOptions, type TokenExtensions, type Typography, UI_DEEP_STEP, UI_MAIN_STEP, UI_TINT_STEP, type UiColorScale, type UiThemeColors, type UiThemeConfig, type UiThemeMode, type UiThemePalette, type UiThemeSemantic, type VerdictColors, type WorkspaceExtras, canCarryAccessibleInk, contrastRatio, isHexColor, meetsContrast, onBrandRatio, relativeLuminance, resolveOnBrand, toCssVars, toRnTheme, toTailwindPreset, toUiTheme };
|
|
951
|
+
export { AA_LARGE_TEXT_RATIO, AA_NON_TEXT_RATIO, AA_NORMAL_TEXT_RATIO, AML_CSS_VAR_NAMES, AML_TOKENS, type BrandExtras, type Branding, type ContrastMoreOverrides, type CssVarNames, DEFAULT_CSS_VAR_NAMES, DEFAULT_MOTION, DIGITALKIN_TOKENS, type DesignTokens, EREVNA_TOKENS, FINREG_MODULE_COLORS, FINREG_SURFACE_COLORS, type FinregModuleColor, type FinregModuleColors, type FinregSurfaceColors, type InkScale, KATALOGOS_TOKENS, type ModeColors, type Motion, type MotionDurations, type MotionEasing, type MotionEasings, type MotionSpring, type MotionSprings, NEXTGAME_TOKENS, ON_BRAND_DARK_INK, ON_BRAND_LIGHT_INK, PRESETS, type Radii, type RnThemeConfig, type SemanticColors, type Shadows, type ShellColors, type TailwindColors, type TailwindPreset, type ToCssVarsOptions, type TokenExtensions, type Typography, UI_DEEP_STEP, UI_MAIN_STEP, UI_TINT_STEP, type UiColorScale, type UiThemeColors, type UiThemeConfig, type UiThemeMode, type UiThemePalette, type UiThemeSemantic, type VerdictColors, type WorkspaceExtras, canCarryAccessibleInk, contrastRatio, isHexColor, meetsContrast, onBrandRatio, relativeLuminance, resolveOnBrand, toCssVars, toRnTheme, toTailwindPreset, toUiTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -41,6 +41,20 @@ interface ModeColors {
|
|
|
41
41
|
* lifts. Optional; consumers fall back to `surface` when a preset omits it.
|
|
42
42
|
*/
|
|
43
43
|
surfaceMuted?: string;
|
|
44
|
+
/** Third text tier — unavailable/"same" labels. Consumers fall back to `textSecondary`. */
|
|
45
|
+
textTertiary?: string;
|
|
46
|
+
/** Keyboard/gamepad focus ring colour. Consumers fall back to `text`. */
|
|
47
|
+
focusRing?: string;
|
|
48
|
+
/** Mode-specific brand FILL (CTA, selected item) when the top-level `primary` does not suit this mode's ground. */
|
|
49
|
+
brandFill?: string;
|
|
50
|
+
/** Text on `brandFill`. Required whenever `brandFill` is set; only the nextgame preset test measures the pair. */
|
|
51
|
+
onBrandFill?: string;
|
|
52
|
+
/** Success colour tuned for TEXT on this mode's grounds (semantic.success is tuned for light). */
|
|
53
|
+
successText?: string;
|
|
54
|
+
/** Error colour tuned for TEXT on this mode's grounds. */
|
|
55
|
+
dangerText?: string;
|
|
56
|
+
/** Fill behind `dangerText` (icon well, destructive button). */
|
|
57
|
+
dangerFill?: string;
|
|
44
58
|
}
|
|
45
59
|
/**
|
|
46
60
|
* Semantic/status colours. The four base fields match `TenantThemeConfig`'s
|
|
@@ -132,6 +146,17 @@ interface MotionEasings {
|
|
|
132
146
|
decelerate: MotionEasing;
|
|
133
147
|
accelerate: MotionEasing;
|
|
134
148
|
}
|
|
149
|
+
/** Spring parameters (mass 1) for RN `Animated.spring`. */
|
|
150
|
+
interface MotionSpring {
|
|
151
|
+
stiffness: number;
|
|
152
|
+
damping: number;
|
|
153
|
+
}
|
|
154
|
+
/** Named springs: `focus` for a focus move, `settle` for layout settling, `press` for confirm feedback. */
|
|
155
|
+
interface MotionSprings {
|
|
156
|
+
focus: MotionSpring;
|
|
157
|
+
settle: MotionSpring;
|
|
158
|
+
press: MotionSpring;
|
|
159
|
+
}
|
|
135
160
|
/**
|
|
136
161
|
* Motion token group — durations + easings. Framework-agnostic values only; the
|
|
137
162
|
* RN `Animated`/`Easing` wiring lives in `@dloizides/ui-motion`, which reads these.
|
|
@@ -143,6 +168,8 @@ interface MotionEasings {
|
|
|
143
168
|
interface Motion {
|
|
144
169
|
durations: MotionDurations;
|
|
145
170
|
easings: MotionEasings;
|
|
171
|
+
/** Optional named springs. Absent from {@link DEFAULT_MOTION}; presets that animate with springs set them. */
|
|
172
|
+
springs?: MotionSprings;
|
|
146
173
|
}
|
|
147
174
|
/** Branding asset references (ContentService GUIDs). Matches `TenantThemeConfig`'s `BrandingConfig`. */
|
|
148
175
|
interface Branding {
|
|
@@ -218,6 +245,16 @@ interface TokenExtensions {
|
|
|
218
245
|
workspace?: WorkspaceExtras;
|
|
219
246
|
verdict?: VerdictColors;
|
|
220
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* Overrides applied when the user asks for more contrast (`prefers-contrast: more`).
|
|
250
|
+
* Partial per mode: only the fields that change. Optional; presets without it get none.
|
|
251
|
+
*/
|
|
252
|
+
interface ContrastMoreOverrides {
|
|
253
|
+
light?: Partial<ModeColors>;
|
|
254
|
+
dark?: Partial<ModeColors>;
|
|
255
|
+
/** Focus ring width in px under increased contrast. */
|
|
256
|
+
focusRingWidth?: number;
|
|
257
|
+
}
|
|
221
258
|
/**
|
|
222
259
|
* One app's complete token set. The single source the three emitters read.
|
|
223
260
|
* Core fields align with `TenantThemeConfig`; optional groups are supersets.
|
|
@@ -265,6 +302,8 @@ interface DesignTokens {
|
|
|
265
302
|
* changes nothing for existing presets or emitters.
|
|
266
303
|
*/
|
|
267
304
|
motion?: Motion;
|
|
305
|
+
/** Optional increased-contrast overrides (`prefers-contrast: more`). */
|
|
306
|
+
contrastMore?: ContrastMoreOverrides;
|
|
268
307
|
/** Branding asset references */
|
|
269
308
|
branding: Branding;
|
|
270
309
|
/** Optional stack-specific token supersets */
|
|
@@ -733,28 +772,24 @@ declare const KATALOGOS_TOKENS: DesignTokens;
|
|
|
733
772
|
* endorsement of any of them. That rules out blue, green and red as the brand
|
|
734
773
|
* primary — the three colours a games product reaches for first.
|
|
735
774
|
*
|
|
736
|
-
*
|
|
737
|
-
*
|
|
738
|
-
*
|
|
739
|
-
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
*
|
|
744
|
-
*
|
|
745
|
-
*
|
|
746
|
-
* is the cheapest single decision that stops a consumer product reading as an
|
|
747
|
-
* internal tool.
|
|
775
|
+
* D1 "LIVING ROOM". The app is a dark console dashboard read from a couch, so
|
|
776
|
+
* the dark mode is the product and its grounds are GRAPHITE (#0A0D12 canvas,
|
|
777
|
+
* #121720 cards, #1A212C raised): neutral enough that box art and platform
|
|
778
|
+
* badges carry the colour. On those grounds the pick/selected colour is a warm
|
|
779
|
+
* AMBER fill (`dark.brandFill` #FFD37A with `onBrandFill` #1A1204), lighter than
|
|
780
|
+
* the top-level signal amber so a dark label clears AA on it. The top-level
|
|
781
|
+
* amber/teal/magenta triad is retained for LIGHT surfaces only (OG images,
|
|
782
|
+
* email); teal and magenta are not UI chrome in the dark app. Focus is a white
|
|
783
|
+
* ring, and `contrastMore` lifts the secondary text tiers and hairlines for
|
|
784
|
+
* `prefers-contrast: more`.
|
|
748
785
|
*
|
|
749
786
|
* Explicitly NOT used: the violet/indigo ramp, which is both the estate's banned
|
|
750
787
|
* AI default and, on a store page, indistinguishable from a dozen launcher UIs.
|
|
751
788
|
*
|
|
752
|
-
* ACCESSIBILITY. Both borders are authored to clear WCAG 1.4.11 (3:1)
|
|
753
|
-
*
|
|
754
|
-
*
|
|
755
|
-
*
|
|
756
|
-
* cannot serve error-as-text in both modes, and that is a token split, not a
|
|
757
|
-
* colour nudge.
|
|
789
|
+
* ACCESSIBILITY. Both borders are authored to clear WCAG 1.4.11 (3:1).
|
|
790
|
+
* `semantic.error` is tuned for the LIGHT surfaces and registers the usual
|
|
791
|
+
* dark-mode gap; the dark app reads error text from `dark.dangerText` on
|
|
792
|
+
* `dark.dangerFill` instead — one hex cannot serve error-as-text in both modes.
|
|
758
793
|
*/
|
|
759
794
|
declare const NEXTGAME_TOKENS: DesignTokens;
|
|
760
795
|
|
|
@@ -913,4 +948,4 @@ declare function onBrandRatio(background: string, explicit?: string): number | n
|
|
|
913
948
|
*/
|
|
914
949
|
declare function canCarryAccessibleInk(background: string): boolean;
|
|
915
950
|
|
|
916
|
-
export { AA_LARGE_TEXT_RATIO, AA_NON_TEXT_RATIO, AA_NORMAL_TEXT_RATIO, AML_CSS_VAR_NAMES, AML_TOKENS, type BrandExtras, type Branding, type CssVarNames, DEFAULT_CSS_VAR_NAMES, DEFAULT_MOTION, DIGITALKIN_TOKENS, type DesignTokens, EREVNA_TOKENS, FINREG_MODULE_COLORS, FINREG_SURFACE_COLORS, type FinregModuleColor, type FinregModuleColors, type FinregSurfaceColors, type InkScale, KATALOGOS_TOKENS, type ModeColors, type Motion, type MotionDurations, type MotionEasing, type MotionEasings, NEXTGAME_TOKENS, ON_BRAND_DARK_INK, ON_BRAND_LIGHT_INK, PRESETS, type Radii, type RnThemeConfig, type SemanticColors, type Shadows, type ShellColors, type TailwindColors, type TailwindPreset, type ToCssVarsOptions, type TokenExtensions, type Typography, UI_DEEP_STEP, UI_MAIN_STEP, UI_TINT_STEP, type UiColorScale, type UiThemeColors, type UiThemeConfig, type UiThemeMode, type UiThemePalette, type UiThemeSemantic, type VerdictColors, type WorkspaceExtras, canCarryAccessibleInk, contrastRatio, isHexColor, meetsContrast, onBrandRatio, relativeLuminance, resolveOnBrand, toCssVars, toRnTheme, toTailwindPreset, toUiTheme };
|
|
951
|
+
export { AA_LARGE_TEXT_RATIO, AA_NON_TEXT_RATIO, AA_NORMAL_TEXT_RATIO, AML_CSS_VAR_NAMES, AML_TOKENS, type BrandExtras, type Branding, type ContrastMoreOverrides, type CssVarNames, DEFAULT_CSS_VAR_NAMES, DEFAULT_MOTION, DIGITALKIN_TOKENS, type DesignTokens, EREVNA_TOKENS, FINREG_MODULE_COLORS, FINREG_SURFACE_COLORS, type FinregModuleColor, type FinregModuleColors, type FinregSurfaceColors, type InkScale, KATALOGOS_TOKENS, type ModeColors, type Motion, type MotionDurations, type MotionEasing, type MotionEasings, type MotionSpring, type MotionSprings, NEXTGAME_TOKENS, ON_BRAND_DARK_INK, ON_BRAND_LIGHT_INK, PRESETS, type Radii, type RnThemeConfig, type SemanticColors, type Shadows, type ShellColors, type TailwindColors, type TailwindPreset, type ToCssVarsOptions, type TokenExtensions, type Typography, UI_DEEP_STEP, UI_MAIN_STEP, UI_TINT_STEP, type UiColorScale, type UiThemeColors, type UiThemeConfig, type UiThemeMode, type UiThemePalette, type UiThemeSemantic, type VerdictColors, type WorkspaceExtras, canCarryAccessibleInk, contrastRatio, isHexColor, meetsContrast, onBrandRatio, relativeLuminance, resolveOnBrand, toCssVars, toRnTheme, toTailwindPreset, toUiTheme };
|
package/dist/index.js
CHANGED
|
@@ -668,12 +668,14 @@ var KATALOGOS_TOKENS = {
|
|
|
668
668
|
};
|
|
669
669
|
|
|
670
670
|
// src/presets/nextgame.ts
|
|
671
|
+
var EASE_OUT = { css: "cubic-bezier(0.2,0.8,0.2,1)", bezier: [0.2, 0.8, 0.2, 1] };
|
|
672
|
+
var EASE_IN = { css: "cubic-bezier(0.4,0,1,1)", bezier: [0.4, 0, 1, 1] };
|
|
671
673
|
var NEXTGAME_TOKENS = {
|
|
672
|
-
/** Signal amber — the recommendation/buy colour. */
|
|
674
|
+
/** Signal amber — the recommendation/buy colour on light surfaces. */
|
|
673
675
|
primary: "#FF8C1A",
|
|
674
|
-
/** Deep teal — structure
|
|
676
|
+
/** Deep teal — light-surface structure and links. */
|
|
675
677
|
secondary: "#0E7C86",
|
|
676
|
-
/** Arcade magenta —
|
|
678
|
+
/** Arcade magenta — light-surface call-out only. */
|
|
677
679
|
accent: "#F5008B",
|
|
678
680
|
semantic: {
|
|
679
681
|
success: "#0E9E6E",
|
|
@@ -696,31 +698,56 @@ var NEXTGAME_TOKENS = {
|
|
|
696
698
|
divider: "#E3D9CB"
|
|
697
699
|
},
|
|
698
700
|
dark: {
|
|
699
|
-
background: "#
|
|
700
|
-
surface: "#
|
|
701
|
-
surfaceElevated: "#
|
|
702
|
-
surfaceMuted: "#
|
|
703
|
-
text: "#
|
|
704
|
-
textSecondary: "#
|
|
705
|
-
|
|
706
|
-
|
|
701
|
+
background: "#0A0D12",
|
|
702
|
+
surface: "#121720",
|
|
703
|
+
surfaceElevated: "#1A212C",
|
|
704
|
+
surfaceMuted: "#070A0E",
|
|
705
|
+
text: "#F2F4F7",
|
|
706
|
+
textSecondary: "#A9B3C1",
|
|
707
|
+
textTertiary: "#8C97A7",
|
|
708
|
+
border: "#6B778A",
|
|
709
|
+
divider: "#242C38",
|
|
710
|
+
focusRing: "#FFFFFF",
|
|
711
|
+
brandFill: "#FFD37A",
|
|
712
|
+
onBrandFill: "#1A1204",
|
|
713
|
+
successText: "#7FD6A4",
|
|
714
|
+
dangerText: "#FF9E8F",
|
|
715
|
+
dangerFill: "#3A1D1A"
|
|
716
|
+
},
|
|
717
|
+
contrastMore: {
|
|
718
|
+
dark: { textSecondary: "#D5DBE3", textTertiary: "#C0C8D3", border: "#9AA5B4", divider: "#3A4452" },
|
|
719
|
+
focusRingWidth: 4
|
|
707
720
|
},
|
|
708
721
|
typography: {
|
|
709
|
-
fontFamily: '"
|
|
710
|
-
|
|
711
|
-
headingScale: 1.1
|
|
722
|
+
fontFamily: '"Barlow", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif',
|
|
723
|
+
headingScale: 1
|
|
712
724
|
},
|
|
713
725
|
radii: {
|
|
714
726
|
xs: "6px",
|
|
715
|
-
sm: "
|
|
727
|
+
sm: "12px",
|
|
716
728
|
md: "14px",
|
|
717
729
|
lg: "22px",
|
|
718
730
|
pill: "999px"
|
|
719
731
|
},
|
|
720
732
|
shadows: {
|
|
721
|
-
sm: "0 1px 2px rgba(
|
|
722
|
-
md: "0
|
|
723
|
-
pop: "0
|
|
733
|
+
sm: "0 1px 2px rgba(0, 0, 0, .6)",
|
|
734
|
+
md: "0 14px 30px -18px rgba(0, 0, 0, .8)",
|
|
735
|
+
pop: "0 34px 60px -22px rgba(0, 0, 0, .9)"
|
|
736
|
+
},
|
|
737
|
+
/**
|
|
738
|
+
* Spec §6 mapped onto the shared 4-slot shape, NOT `DEFAULT_MOTION`: D1 moves
|
|
739
|
+
* are slower and softer than the portal defaults. The 90ms confirm and the
|
|
740
|
+
* 400ms import-bar durations are product-event timings owned by the app
|
|
741
|
+
* (nextgame-web `src/theme/d1.ts`), not tokens.
|
|
742
|
+
*/
|
|
743
|
+
motion: {
|
|
744
|
+
durations: { instant: 0, fast: 160, base: 240, slow: 320 },
|
|
745
|
+
easings: { standard: EASE_OUT, decelerate: EASE_OUT, accelerate: EASE_IN },
|
|
746
|
+
springs: {
|
|
747
|
+
focus: { stiffness: 420, damping: 34 },
|
|
748
|
+
settle: { stiffness: 260, damping: 30 },
|
|
749
|
+
press: { stiffness: 500, damping: 28 }
|
|
750
|
+
}
|
|
724
751
|
},
|
|
725
752
|
branding: {
|
|
726
753
|
logoContentId: null,
|