react-native-terra-ui 0.7.2 → 0.8.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 +28 -0
- package/README.md +1 -1
- package/lib/module/components/avatar/Avatar.js +20 -20
- package/lib/module/components/avatar/Avatar.js.map +1 -1
- package/lib/module/components/button/Button.js +11 -11
- package/lib/module/components/button/Button.js.map +1 -1
- package/lib/module/components/chip/Chip.js +32 -32
- package/lib/module/components/chip/Chip.js.map +1 -1
- package/lib/module/components/empty-state/EmptyState.js +3 -3
- package/lib/module/components/empty-state/EmptyState.js.map +1 -1
- package/lib/module/components/header/variants/LargeTitleHeader/index.js +30 -32
- package/lib/module/components/header/variants/LargeTitleHeader/index.js.map +1 -1
- package/lib/module/components/header/variants/TitleHeader/index.js +26 -18
- package/lib/module/components/header/variants/TitleHeader/index.js.map +1 -1
- package/lib/module/components/icon/Icon.js +3 -3
- package/lib/module/components/page-indicator/hooks/use-page-indicator-colors.js +2 -2
- package/lib/module/components/screen/Screen.js +63 -34
- package/lib/module/components/screen/Screen.js.map +1 -1
- package/lib/module/components/screen/ScreenContext.js +28 -9
- package/lib/module/components/screen/ScreenContext.js.map +1 -1
- package/lib/module/components/screen/ScreenFlatList.js +4 -162
- package/lib/module/components/screen/ScreenFlatList.js.map +1 -1
- package/lib/module/components/screen/ScreenList.js +81 -97
- package/lib/module/components/screen/ScreenList.js.map +1 -1
- package/lib/module/components/screen/ScreenScrollView.js +64 -115
- package/lib/module/components/screen/ScreenScrollView.js.map +1 -1
- package/lib/module/components/screen/hooks/use-screen-ref.js +18 -0
- package/lib/module/components/screen/hooks/use-screen-ref.js.map +1 -0
- package/lib/module/components/screen/hooks/use-screen-scroll-handler.js +19 -0
- package/lib/module/components/screen/hooks/use-screen-scroll-handler.js.map +1 -0
- package/lib/module/components/screen/index.js.map +1 -1
- package/lib/module/components/screen/parts/ScreenFrame.js +47 -0
- package/lib/module/components/screen/parts/ScreenFrame.js.map +1 -0
- package/lib/module/components/screen/parts/ScreenHeaderAppearance.js +43 -0
- package/lib/module/components/screen/parts/ScreenHeaderAppearance.js.map +1 -0
- package/lib/module/components/screen/parts/ScreenPlaceholder.js +11 -13
- package/lib/module/components/screen/parts/ScreenPlaceholder.js.map +1 -1
- package/lib/module/components/screen/parts/ScreenSafeArea.android.js +27 -0
- package/lib/module/components/screen/parts/ScreenSafeArea.android.js.map +1 -0
- package/lib/module/components/screen/parts/ScreenSafeArea.js +26 -0
- package/lib/module/components/screen/parts/ScreenSafeArea.js.map +1 -0
- package/lib/module/components/screen/utils.js +18 -9
- package/lib/module/components/screen/utils.js.map +1 -1
- package/lib/module/components/spinner/Spinner.js +2 -2
- package/lib/module/components/text/Text.js +1 -1
- package/lib/module/components/toast/Toast.js +13 -13
- package/lib/module/components/toast/Toast.js.map +1 -1
- package/lib/module/components/toolbar/Toolbar.js +2 -2
- package/lib/module/context/ThemeProvider.js +22 -39
- package/lib/module/context/ThemeProvider.js.map +1 -1
- package/lib/module/context/index.js +1 -1
- package/lib/module/context/index.js.map +1 -1
- package/lib/module/theme/breakpoints.js +1 -1
- package/lib/module/theme/define-config.js +21 -0
- package/lib/module/theme/define-config.js.map +1 -0
- package/lib/module/theme/diagnostics.js +13 -0
- package/lib/module/theme/diagnostics.js.map +1 -0
- package/lib/module/theme/errors.js +15 -0
- package/lib/module/theme/errors.js.map +1 -0
- package/lib/module/theme/index.js +7 -1
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/legacy-tokens.js +119 -0
- package/lib/module/theme/legacy-tokens.js.map +1 -0
- package/lib/module/theme/registry.js +122 -130
- package/lib/module/theme/registry.js.map +1 -1
- package/lib/module/theme/resolve-config.js +346 -0
- package/lib/module/theme/resolve-config.js.map +1 -0
- package/lib/module/theme/runtime.js +57 -12
- package/lib/module/theme/runtime.js.map +1 -1
- package/lib/module/theme/screen-margin.js +6 -14
- package/lib/module/theme/screen-margin.js.map +1 -1
- package/lib/module/theme/screen-padding.js +17 -0
- package/lib/module/theme/screen-padding.js.map +1 -0
- package/lib/module/theme/selection-store.js +75 -0
- package/lib/module/theme/selection-store.js.map +1 -0
- package/lib/module/theme/theme.js +81 -36
- package/lib/module/theme/theme.js.map +1 -1
- package/lib/module/theme/tokens/canonical-color-keys.js +102 -0
- package/lib/module/theme/tokens/canonical-color-keys.js.map +1 -0
- package/lib/module/theme/tokens/dark.js +72 -88
- package/lib/module/theme/tokens/dark.js.map +1 -1
- package/lib/module/theme/tokens/light.js +69 -83
- package/lib/module/theme/tokens/light.js.map +1 -1
- package/lib/module/theme/tokens/primitives.js +14 -14
- package/lib/module/theme/tokens/primitives.js.map +1 -1
- package/lib/module/theme/tokens/validate.js +238 -0
- package/lib/module/theme/tokens/validate.js.map +1 -0
- package/lib/module/theme/unistyles-adapter.js +77 -0
- package/lib/module/theme/unistyles-adapter.js.map +1 -0
- package/lib/module/utils/accent-generator.js +476 -0
- package/lib/module/utils/accent-generator.js.map +1 -0
- package/lib/module/utils/accent-utils.js +52 -35
- package/lib/module/utils/accent-utils.js.map +1 -1
- package/lib/module/utils/color-utils.js +224 -7
- package/lib/module/utils/color-utils.js.map +1 -1
- package/lib/module/utils/deep-merge.js +1 -1
- package/lib/module/utils/deep-merge.js.map +1 -1
- package/lib/module/utils/resolve-theme-color.js +2 -2
- package/lib/typescript/src/components/chip/types.d.ts +1 -1
- package/lib/typescript/src/components/empty-state/EmptyState.d.ts +1 -1
- package/lib/typescript/src/components/empty-state/EmptyState.d.ts.map +1 -1
- package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts +6 -5
- package/lib/typescript/src/components/header/variants/LargeTitleHeader/index.d.ts.map +1 -1
- package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts +11 -5
- package/lib/typescript/src/components/header/variants/TitleHeader/index.d.ts.map +1 -1
- package/lib/typescript/src/components/icon/Icon.d.ts +2 -2
- package/lib/typescript/src/components/screen/Screen.d.ts +45 -16
- package/lib/typescript/src/components/screen/Screen.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenContext.d.ts +42 -26
- package/lib/typescript/src/components/screen/ScreenContext.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenFlatList.d.ts +5 -46
- package/lib/typescript/src/components/screen/ScreenFlatList.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenList.d.ts +62 -50
- package/lib/typescript/src/components/screen/ScreenList.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/ScreenScrollView.d.ts +18 -58
- package/lib/typescript/src/components/screen/ScreenScrollView.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/hooks/use-screen-ref.d.ts +5 -0
- package/lib/typescript/src/components/screen/hooks/use-screen-ref.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/hooks/use-screen-scroll-handler.d.ts +53 -0
- package/lib/typescript/src/components/screen/hooks/use-screen-scroll-handler.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/index.d.ts +2 -2
- package/lib/typescript/src/components/screen/index.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/parts/ScreenFrame.d.ts +6 -0
- package/lib/typescript/src/components/screen/parts/ScreenFrame.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/parts/ScreenHeaderAppearance.d.ts +21 -0
- package/lib/typescript/src/components/screen/parts/ScreenHeaderAppearance.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/parts/ScreenPlaceholder.d.ts +6 -8
- package/lib/typescript/src/components/screen/parts/ScreenPlaceholder.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/parts/ScreenSafeArea.android.d.ts +7 -0
- package/lib/typescript/src/components/screen/parts/ScreenSafeArea.android.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/parts/ScreenSafeArea.d.ts +6 -0
- package/lib/typescript/src/components/screen/parts/ScreenSafeArea.d.ts.map +1 -0
- package/lib/typescript/src/components/screen/types.d.ts +27 -32
- package/lib/typescript/src/components/screen/types.d.ts.map +1 -1
- package/lib/typescript/src/components/screen/utils.d.ts +9 -8
- package/lib/typescript/src/components/screen/utils.d.ts.map +1 -1
- package/lib/typescript/src/components/text/Text.d.ts +1 -1
- package/lib/typescript/src/components/text/Text.d.ts.map +1 -1
- package/lib/typescript/src/components/toolbar/Toolbar.d.ts +2 -2
- package/lib/typescript/src/context/ThemeProvider.d.ts +29 -12
- package/lib/typescript/src/context/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/context/index.d.ts +1 -1
- package/lib/typescript/src/context/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/breakpoints.d.ts +1 -1
- package/lib/typescript/src/theme/define-config.d.ts +23 -0
- package/lib/typescript/src/theme/define-config.d.ts.map +1 -0
- package/lib/typescript/src/theme/diagnostics.d.ts +4 -0
- package/lib/typescript/src/theme/diagnostics.d.ts.map +1 -0
- package/lib/typescript/src/theme/errors.d.ts +10 -0
- package/lib/typescript/src/theme/errors.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +10 -2
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/legacy-tokens.d.ts +187 -0
- package/lib/typescript/src/theme/legacy-tokens.d.ts.map +1 -0
- package/lib/typescript/src/theme/registry.d.ts +12 -17
- package/lib/typescript/src/theme/registry.d.ts.map +1 -1
- package/lib/typescript/src/theme/resolve-config.d.ts +99 -0
- package/lib/typescript/src/theme/resolve-config.d.ts.map +1 -0
- package/lib/typescript/src/theme/runtime.d.ts +25 -4
- package/lib/typescript/src/theme/runtime.d.ts.map +1 -1
- package/lib/typescript/src/theme/screen-margin.d.ts +6 -14
- package/lib/typescript/src/theme/screen-margin.d.ts.map +1 -1
- package/lib/typescript/src/theme/screen-padding.d.ts +15 -0
- package/lib/typescript/src/theme/screen-padding.d.ts.map +1 -0
- package/lib/typescript/src/theme/selection-store.d.ts +41 -0
- package/lib/typescript/src/theme/selection-store.d.ts.map +1 -0
- package/lib/typescript/src/theme/theme.d.ts +54 -1
- package/lib/typescript/src/theme/theme.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/canonical-color-keys.d.ts +95 -0
- package/lib/typescript/src/theme/tokens/canonical-color-keys.d.ts.map +1 -0
- package/lib/typescript/src/theme/tokens/dark.d.ts +56 -63
- package/lib/typescript/src/theme/tokens/dark.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/light.d.ts +56 -71
- package/lib/typescript/src/theme/tokens/light.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/primitives.d.ts +11 -10
- package/lib/typescript/src/theme/tokens/primitives.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens/validate.d.ts +34 -0
- package/lib/typescript/src/theme/tokens/validate.d.ts.map +1 -0
- package/lib/typescript/src/theme/types.d.ts +166 -86
- package/lib/typescript/src/theme/types.d.ts.map +1 -1
- package/lib/typescript/src/theme/unistyles-adapter.d.ts +33 -0
- package/lib/typescript/src/theme/unistyles-adapter.d.ts.map +1 -0
- package/lib/typescript/src/utils/accent-generator.d.ts +103 -0
- package/lib/typescript/src/utils/accent-generator.d.ts.map +1 -0
- package/lib/typescript/src/utils/accent-utils.d.ts +15 -2
- package/lib/typescript/src/utils/accent-utils.d.ts.map +1 -1
- package/lib/typescript/src/utils/color-utils.d.ts +59 -2
- package/lib/typescript/src/utils/color-utils.d.ts.map +1 -1
- package/lib/typescript/src/utils/deep-merge.d.ts +1 -0
- package/lib/typescript/src/utils/deep-merge.d.ts.map +1 -1
- package/lib/typescript/src/utils/resolve-theme-color.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/avatar/Avatar.tsx +20 -20
- package/src/components/button/Button.tsx +11 -11
- package/src/components/chip/Chip.tsx +32 -32
- package/src/components/chip/types.ts +1 -1
- package/src/components/empty-state/EmptyState.tsx +4 -4
- package/src/components/header/variants/LargeTitleHeader/index.tsx +31 -30
- package/src/components/header/variants/TitleHeader/index.tsx +33 -22
- package/src/components/icon/Icon.tsx +4 -4
- package/src/components/page-indicator/hooks/use-page-indicator-colors.ts +2 -2
- package/src/components/screen/Screen.tsx +89 -43
- package/src/components/screen/ScreenContext.tsx +48 -28
- package/src/components/screen/ScreenFlatList.tsx +5 -191
- package/src/components/screen/ScreenList.tsx +197 -175
- package/src/components/screen/ScreenScrollView.tsx +92 -167
- package/src/components/screen/hooks/use-screen-ref.ts +24 -0
- package/src/components/screen/hooks/use-screen-scroll-handler.ts +31 -0
- package/src/components/screen/index.ts +8 -2
- package/src/components/screen/parts/ScreenFrame.tsx +49 -0
- package/src/components/screen/parts/ScreenHeaderAppearance.tsx +52 -0
- package/src/components/screen/parts/ScreenPlaceholder.tsx +16 -16
- package/src/components/screen/parts/ScreenSafeArea.android.tsx +22 -0
- package/src/components/screen/parts/ScreenSafeArea.tsx +20 -0
- package/src/components/screen/types.ts +29 -32
- package/src/components/screen/utils.ts +24 -11
- package/src/components/spinner/Spinner.tsx +2 -2
- package/src/components/text/Text.tsx +2 -2
- package/src/components/toast/Toast.tsx +13 -13
- package/src/components/toolbar/Toolbar.tsx +4 -4
- package/src/context/ThemeProvider.tsx +47 -51
- package/src/context/index.ts +1 -1
- package/src/theme/breakpoints.ts +1 -1
- package/src/theme/define-config.ts +27 -0
- package/src/theme/diagnostics.ts +11 -0
- package/src/theme/errors.ts +14 -0
- package/src/theme/index.ts +40 -1
- package/src/theme/legacy-tokens.ts +227 -0
- package/src/theme/registry.ts +119 -137
- package/src/theme/resolve-config.ts +406 -0
- package/src/theme/runtime.ts +52 -14
- package/src/theme/screen-margin.ts +6 -25
- package/src/theme/screen-padding.ts +26 -0
- package/src/theme/selection-store.ts +76 -0
- package/src/theme/theme.ts +104 -39
- package/src/theme/tokens/canonical-color-keys.ts +107 -0
- package/src/theme/tokens/dark.ts +91 -98
- package/src/theme/tokens/light.ts +88 -93
- package/src/theme/tokens/primitives.ts +14 -14
- package/src/theme/tokens/validate.ts +271 -0
- package/src/theme/types.ts +184 -95
- package/src/theme/unistyles-adapter.ts +75 -0
- package/src/utils/accent-generator.ts +530 -0
- package/src/utils/accent-utils.ts +66 -39
- package/src/utils/color-utils.ts +225 -8
- package/src/utils/deep-merge.ts +1 -1
- package/src/utils/resolve-theme-color.ts +2 -2
- package/lib/module/components/screen/parts/BottomSafeArea.js +0 -62
- package/lib/module/components/screen/parts/BottomSafeArea.js.map +0 -1
- package/lib/typescript/src/components/screen/parts/BottomSafeArea.d.ts +0 -30
- package/lib/typescript/src/components/screen/parts/BottomSafeArea.d.ts.map +0 -1
- package/src/components/screen/parts/BottomSafeArea.tsx +0 -59
|
@@ -1,85 +1,70 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Light
|
|
3
|
-
*
|
|
4
|
-
* Convention: [category].[context].[property?].[variant].[state]
|
|
5
|
-
* - property is omitted when the context implies it (surface → bg, text → fg, border → border-color)
|
|
6
|
-
* - property is required when a context carries multiple attributes (action, status)
|
|
7
|
-
*
|
|
8
|
-
* Values use {palette.key} reference notation, resolved against primitives at
|
|
9
|
-
* build time via resolveRefs() in theme.ts. {palette.key}/NN resolves the
|
|
10
|
-
* referenced #rrggbb hex with an NN% opacity byte appended (e.g.
|
|
11
|
-
* {palette.amber.500}/15 -> '#fe9a0026'). Raw hex is used only where no
|
|
12
|
-
* palette step matches exactly.
|
|
13
|
-
*
|
|
14
|
-
* GENERATED-STYLE SOURCE: intended to be replaced by the Figma / design-sync export.
|
|
2
|
+
* Light semantic colors. See docs/design-tokens.md for naming and references.
|
|
3
|
+
* Generated-style source; naming and contrast updates await the next design-sync export.
|
|
15
4
|
*/
|
|
16
5
|
export declare const light: {
|
|
17
|
-
"color.
|
|
18
|
-
"color.shadow": string;
|
|
6
|
+
"color.surface.canvas": string;
|
|
19
7
|
"color.surface.default": string;
|
|
20
8
|
"color.surface.raised": string;
|
|
21
9
|
"color.surface.sunken": string;
|
|
22
|
-
"color.
|
|
23
|
-
"color.
|
|
24
|
-
"color.
|
|
25
|
-
"color.text.default": string;
|
|
26
|
-
"color.text.muted": string;
|
|
27
|
-
"color.text.subtle": string;
|
|
10
|
+
"color.text.primary": string;
|
|
11
|
+
"color.text.secondary": string;
|
|
12
|
+
"color.text.tertiary": string;
|
|
28
13
|
"color.text.disabled": string;
|
|
29
14
|
"color.text.inverse": string;
|
|
30
15
|
"color.text.link": string;
|
|
31
|
-
"color.text.accent": string;
|
|
32
|
-
"color.text.on-accent": string;
|
|
33
|
-
"color.text.on-accent-subtle": string;
|
|
34
16
|
"color.border.subtle": string;
|
|
35
17
|
"color.border.default": string;
|
|
36
18
|
"color.border.strong": string;
|
|
37
|
-
"color.
|
|
38
|
-
"color.
|
|
39
|
-
"color.
|
|
40
|
-
"color.
|
|
41
|
-
"color.
|
|
42
|
-
"color.
|
|
43
|
-
"color.
|
|
44
|
-
"color.
|
|
45
|
-
"color.
|
|
46
|
-
"color.
|
|
47
|
-
"color.
|
|
48
|
-
"color.
|
|
49
|
-
"color.
|
|
50
|
-
"color.
|
|
51
|
-
"color.
|
|
52
|
-
"color.
|
|
53
|
-
"color.
|
|
54
|
-
"color.
|
|
55
|
-
"color.
|
|
56
|
-
"color.
|
|
57
|
-
"color.
|
|
58
|
-
"color.
|
|
59
|
-
"color.
|
|
60
|
-
"color.
|
|
61
|
-
"color.
|
|
62
|
-
"color.
|
|
63
|
-
"color.
|
|
64
|
-
"color.
|
|
65
|
-
"color.
|
|
66
|
-
"color.
|
|
67
|
-
"color.
|
|
68
|
-
"color.
|
|
69
|
-
"color.
|
|
70
|
-
"color.
|
|
71
|
-
"color.
|
|
72
|
-
"color.
|
|
73
|
-
"color.
|
|
74
|
-
"color.
|
|
75
|
-
"color.
|
|
76
|
-
"color.
|
|
77
|
-
"color.
|
|
78
|
-
"color.
|
|
79
|
-
"color.
|
|
80
|
-
"color.
|
|
81
|
-
"color.
|
|
82
|
-
"color.
|
|
83
|
-
"color.
|
|
19
|
+
"color.focus.ring": string;
|
|
20
|
+
"color.backdrop": string;
|
|
21
|
+
"color.shadow": string;
|
|
22
|
+
"color.accent.text": string;
|
|
23
|
+
"color.accent.border": string;
|
|
24
|
+
"color.accent.solid.bg": string;
|
|
25
|
+
"color.accent.solid.bg.hover": string;
|
|
26
|
+
"color.accent.solid.bg.pressed": string;
|
|
27
|
+
"color.accent.solid.bg.disabled": string;
|
|
28
|
+
"color.accent.solid.fg": string;
|
|
29
|
+
"color.accent.soft.bg": string;
|
|
30
|
+
"color.accent.soft.bg.hover": string;
|
|
31
|
+
"color.accent.soft.bg.pressed": string;
|
|
32
|
+
"color.accent.soft.bg.disabled": string;
|
|
33
|
+
"color.accent.soft.fg": string;
|
|
34
|
+
"color.neutral.solid.bg": string;
|
|
35
|
+
"color.neutral.solid.fg": string;
|
|
36
|
+
"color.neutral.soft.bg": string;
|
|
37
|
+
"color.neutral.soft.bg.hover": string;
|
|
38
|
+
"color.neutral.soft.bg.pressed": string;
|
|
39
|
+
"color.neutral.soft.bg.disabled": string;
|
|
40
|
+
"color.neutral.soft.fg": string;
|
|
41
|
+
"color.success.text": string;
|
|
42
|
+
"color.success.solid.bg": string;
|
|
43
|
+
"color.success.solid.fg": string;
|
|
44
|
+
"color.success.solid.border": string;
|
|
45
|
+
"color.success.soft.bg": string;
|
|
46
|
+
"color.success.soft.fg": string;
|
|
47
|
+
"color.success.soft.border": string;
|
|
48
|
+
"color.warning.text": string;
|
|
49
|
+
"color.warning.solid.bg": string;
|
|
50
|
+
"color.warning.solid.fg": string;
|
|
51
|
+
"color.warning.solid.border": string;
|
|
52
|
+
"color.warning.soft.bg": string;
|
|
53
|
+
"color.warning.soft.fg": string;
|
|
54
|
+
"color.warning.soft.border": string;
|
|
55
|
+
"color.danger.text": string;
|
|
56
|
+
"color.danger.solid.bg": string;
|
|
57
|
+
"color.danger.solid.fg": string;
|
|
58
|
+
"color.danger.solid.border": string;
|
|
59
|
+
"color.danger.soft.bg": string;
|
|
60
|
+
"color.danger.soft.fg": string;
|
|
61
|
+
"color.danger.soft.border": string;
|
|
62
|
+
"color.info.text": string;
|
|
63
|
+
"color.info.solid.bg": string;
|
|
64
|
+
"color.info.solid.fg": string;
|
|
65
|
+
"color.info.solid.border": string;
|
|
66
|
+
"color.info.soft.bg": string;
|
|
67
|
+
"color.info.soft.fg": string;
|
|
68
|
+
"color.info.soft.border": string;
|
|
84
69
|
};
|
|
85
70
|
//# sourceMappingURL=light.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../../../../src/theme/tokens/light.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"light.d.ts","sourceRoot":"","sources":["../../../../../src/theme/tokens/light.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FjB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Scheme-agnostic primitive tokens — flat, dotted-key data.
|
|
3
3
|
*
|
|
4
|
+
* Naming migration: screen padding keys updated ahead of the next design-sync export.
|
|
4
5
|
* GENERATED-STYLE SOURCE: this file is plain data (no imports, no types).
|
|
5
6
|
* It is intended to be replaced by the Figma design-system export. Keys use a
|
|
6
7
|
* fully-flat `a.b.c` path; the runtime theme is rebuilt from these via
|
|
@@ -421,16 +422,16 @@ export declare const primitives: {
|
|
|
421
422
|
"typography.variants.caption.maxFontSizeMultiplier": number;
|
|
422
423
|
"opacity.disabled": number;
|
|
423
424
|
"opacity.pressed": number;
|
|
424
|
-
"layout.screen.
|
|
425
|
-
"layout.screen.
|
|
426
|
-
"layout.screen.
|
|
427
|
-
"layout.screen.
|
|
428
|
-
"layout.screen.
|
|
429
|
-
"layout.screen.
|
|
430
|
-
"layout.screen.
|
|
431
|
-
"layout.screen.
|
|
432
|
-
"layout.screen.
|
|
433
|
-
"layout.screen.
|
|
425
|
+
"layout.screen.padding.x.xs": number;
|
|
426
|
+
"layout.screen.padding.x.sm": number;
|
|
427
|
+
"layout.screen.padding.x.md": number;
|
|
428
|
+
"layout.screen.padding.x.lg": number;
|
|
429
|
+
"layout.screen.padding.x.xl": number;
|
|
430
|
+
"layout.screen.padding.y.xs": number;
|
|
431
|
+
"layout.screen.padding.y.sm": number;
|
|
432
|
+
"layout.screen.padding.y.md": number;
|
|
433
|
+
"layout.screen.padding.y.lg": number;
|
|
434
|
+
"layout.screen.padding.y.xl": number;
|
|
434
435
|
"layout.header.height": number;
|
|
435
436
|
};
|
|
436
437
|
//# sourceMappingURL=primitives.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../src/theme/tokens/primitives.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"primitives.d.ts","sourceRoot":"","sources":["../../../../../src/theme/tokens/primitives.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0ctB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Scheme } from "../../theme/types";
|
|
2
|
+
/** Where an issue was found: one of the scheme files, or the shared primitives. */
|
|
3
|
+
export type SchemeTokenSource = Scheme | "primitives";
|
|
4
|
+
export interface SchemeTokenIssue {
|
|
5
|
+
source: SchemeTokenSource;
|
|
6
|
+
/** The authored key (e.g. `color.text.primary`), as written in the file. */
|
|
7
|
+
key: string;
|
|
8
|
+
/** The authored value, verbatim. */
|
|
9
|
+
value: unknown;
|
|
10
|
+
message: string;
|
|
11
|
+
}
|
|
12
|
+
/** The three raw token maps. Defaults to the real data; tests pass fixtures. */
|
|
13
|
+
export interface SchemeTokenData {
|
|
14
|
+
light: Record<string, unknown>;
|
|
15
|
+
dark: Record<string, unknown>;
|
|
16
|
+
primitives: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export declare class SchemeTokenValidationError extends Error {
|
|
19
|
+
readonly issues: readonly SchemeTokenIssue[];
|
|
20
|
+
constructor(issues: readonly SchemeTokenIssue[]);
|
|
21
|
+
}
|
|
22
|
+
export declare function formatIssue(issue: SchemeTokenIssue): string;
|
|
23
|
+
/**
|
|
24
|
+
* Collects every problem in the raw scheme data. Returns `[]` for valid data.
|
|
25
|
+
* Pass a partial {@link SchemeTokenData} to validate fixtures; omitted maps
|
|
26
|
+
* default to the real token files.
|
|
27
|
+
*/
|
|
28
|
+
export declare function collectSchemeTokenIssues(data?: Partial<SchemeTokenData>): SchemeTokenIssue[];
|
|
29
|
+
/**
|
|
30
|
+
* Throws a {@link SchemeTokenValidationError} listing every issue (source,
|
|
31
|
+
* key, value, message) when the raw scheme data is invalid.
|
|
32
|
+
*/
|
|
33
|
+
export declare function validateSchemeTokens(data?: Partial<SchemeTokenData>): void;
|
|
34
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../../../src/theme/tokens/validate.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAM3C,mFAAmF;AACnF,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,YAAY,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,iBAAiB,CAAC;IAC1B,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,oCAAoC;IACpC,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,gFAAgF;AAChF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,qBAAa,0BAA2B,SAAQ,KAAK;IACnD,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAC;gBAEjC,MAAM,EAAE,SAAS,gBAAgB,EAAE;CAShD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAE3D;AA0LD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,GAAE,OAAO,CAAC,eAAe,CAAM,GAAG,gBAAgB,EAAE,CAiBhG;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,OAAO,CAAC,eAAe,CAAM,GAAG,IAAI,CAG9E"}
|
|
@@ -8,6 +8,7 @@ import type { ComponentType } from "react";
|
|
|
8
8
|
import type { ImageStyle, StyleProp } from "react-native";
|
|
9
9
|
import type { DeepPartial } from "../utils/deep-merge";
|
|
10
10
|
import type { BreakpointName } from "./breakpoints.js";
|
|
11
|
+
import type { LegacyThemeColor } from "./legacy-tokens.js";
|
|
11
12
|
/** Spacing scale keys (dp, 4dp base unit). Read as `gap={3}` → string '3'. */
|
|
12
13
|
export type SpacingKey = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "12" | "14" | "16" | "20" | "24" | "32";
|
|
13
14
|
/** Border-radius scale keys. */
|
|
@@ -67,95 +68,128 @@ export interface Typography {
|
|
|
67
68
|
}
|
|
68
69
|
/**
|
|
69
70
|
* Flat color token map — keys are dotted paths matching the token schema
|
|
70
|
-
* (category prefix `color.` stripped). Accessed as `theme.color['text.
|
|
71
|
+
* (category prefix `color.` stripped). Accessed as `theme.color['text.primary']`.
|
|
71
72
|
*/
|
|
72
|
-
export interface
|
|
73
|
-
|
|
73
|
+
export interface CanonicalThemeColor {
|
|
74
|
+
"surface.canvas": string;
|
|
74
75
|
shadow: string;
|
|
75
76
|
"surface.default": string;
|
|
76
77
|
"surface.raised": string;
|
|
77
78
|
"surface.sunken": string;
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
"
|
|
81
|
-
"text.
|
|
82
|
-
"text.muted": string;
|
|
83
|
-
"text.subtle": string;
|
|
79
|
+
backdrop: string;
|
|
80
|
+
"text.primary": string;
|
|
81
|
+
"text.secondary": string;
|
|
82
|
+
"text.tertiary": string;
|
|
84
83
|
"text.disabled": string;
|
|
85
84
|
"text.inverse": string;
|
|
86
85
|
"text.link": string;
|
|
87
|
-
"text
|
|
88
|
-
"text.on-accent": string;
|
|
89
|
-
"text.on-accent-subtle": string;
|
|
86
|
+
"accent.text": string;
|
|
90
87
|
"border.subtle": string;
|
|
91
88
|
"border.default": string;
|
|
92
89
|
"border.strong": string;
|
|
93
|
-
"
|
|
94
|
-
"border
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
90
|
+
"focus.ring": string;
|
|
91
|
+
"accent.border": string;
|
|
92
|
+
"accent.solid.bg": string;
|
|
93
|
+
"accent.solid.bg.hover": string;
|
|
94
|
+
"accent.solid.bg.pressed": string;
|
|
95
|
+
"accent.solid.bg.disabled": string;
|
|
96
|
+
"accent.solid.fg": string;
|
|
97
|
+
"accent.soft.bg": string;
|
|
98
|
+
"accent.soft.bg.hover": string;
|
|
99
|
+
"accent.soft.bg.pressed": string;
|
|
100
|
+
"accent.soft.bg.disabled": string;
|
|
101
|
+
"accent.soft.fg": string;
|
|
102
|
+
"neutral.solid.bg": string;
|
|
103
|
+
"neutral.solid.fg": string;
|
|
104
|
+
"neutral.soft.bg": string;
|
|
105
|
+
"neutral.soft.bg.hover": string;
|
|
106
|
+
"neutral.soft.bg.pressed": string;
|
|
107
|
+
"neutral.soft.bg.disabled": string;
|
|
108
|
+
"neutral.soft.fg": string;
|
|
109
|
+
"success.text": string;
|
|
110
|
+
"success.solid.bg": string;
|
|
111
|
+
"success.soft.bg": string;
|
|
112
|
+
"success.solid.border": string;
|
|
113
|
+
"success.soft.border": string;
|
|
114
|
+
"success.solid.fg": string;
|
|
115
|
+
"success.soft.fg": string;
|
|
116
|
+
"warning.text": string;
|
|
117
|
+
"warning.solid.bg": string;
|
|
118
|
+
"warning.soft.bg": string;
|
|
119
|
+
"warning.solid.border": string;
|
|
120
|
+
"warning.soft.border": string;
|
|
121
|
+
"warning.solid.fg": string;
|
|
122
|
+
"warning.soft.fg": string;
|
|
123
|
+
"danger.text": string;
|
|
124
|
+
"danger.solid.bg": string;
|
|
125
|
+
"danger.soft.bg": string;
|
|
126
|
+
"danger.solid.border": string;
|
|
127
|
+
"danger.soft.border": string;
|
|
128
|
+
"danger.solid.fg": string;
|
|
129
|
+
"danger.soft.fg": string;
|
|
130
|
+
"info.text": string;
|
|
131
|
+
"info.solid.bg": string;
|
|
132
|
+
"info.soft.bg": string;
|
|
133
|
+
"info.solid.border": string;
|
|
134
|
+
"info.soft.border": string;
|
|
135
|
+
"info.solid.fg": string;
|
|
136
|
+
"info.soft.fg": string;
|
|
140
137
|
}
|
|
141
|
-
|
|
138
|
+
declare global {
|
|
139
|
+
namespace TerraUI {
|
|
140
|
+
/**
|
|
141
|
+
* Augment to declare app-specific semantic color keys. Declared keys become
|
|
142
|
+
* valid in `shared` / `schemes` / accent overrides, `theme.color`, and
|
|
143
|
+
* component color props. Keys must not collide with built-in canonical or
|
|
144
|
+
* deprecated names. Type augmentation alone cannot prove a value exists at
|
|
145
|
+
* runtime — provide every declared color through `shared` or both `schemes`.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* declare global {
|
|
149
|
+
* namespace TerraUI {
|
|
150
|
+
* interface ColorRegistry {
|
|
151
|
+
* "brand.highlight": string;
|
|
152
|
+
* }
|
|
153
|
+
* }
|
|
154
|
+
* }
|
|
155
|
+
*/
|
|
156
|
+
interface ColorRegistry {
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
export interface TerraColorRegistry extends TerraUI.ColorRegistry {
|
|
161
|
+
}
|
|
162
|
+
/** App-declared custom color names (see {@link TerraUI.ColorRegistry}). */
|
|
163
|
+
export type TerraCustomColorName = keyof TerraColorRegistry & string;
|
|
164
|
+
/**
|
|
165
|
+
* Custom color keys that collide with a built-in canonical or deprecated name.
|
|
166
|
+
* Resolves to `never` for a valid registry; apps can assert
|
|
167
|
+
* `const ok: TerraColorRegistryCollision extends never ? true : never = true`.
|
|
168
|
+
*/
|
|
169
|
+
export type TerraColorRegistryCollision = Extract<keyof TerraUI.ColorRegistry, keyof CanonicalThemeColor | keyof LegacyThemeColor>;
|
|
170
|
+
export interface ThemeColor extends CanonicalThemeColor, LegacyThemeColor, TerraColorRegistry {
|
|
171
|
+
}
|
|
172
|
+
/** Component opacity multipliers for disabled / pressed feedback. */
|
|
142
173
|
export interface OpacityTokens {
|
|
143
174
|
disabled: number;
|
|
144
175
|
pressed: number;
|
|
145
176
|
}
|
|
177
|
+
export interface ScreenPaddingTokens {
|
|
178
|
+
x: Record<BreakpointName, number>;
|
|
179
|
+
y: Record<BreakpointName, number>;
|
|
180
|
+
}
|
|
146
181
|
/** Screen-level layout tokens. */
|
|
147
182
|
export interface LayoutTokens {
|
|
148
183
|
screen: {
|
|
149
184
|
/**
|
|
150
|
-
*
|
|
151
|
-
*
|
|
152
|
-
* `resolveBreakpointValue(theme.layout.screen.
|
|
185
|
+
* Internal space between content and the screen edge. Both axes scale with
|
|
186
|
+
* the viewport breakpoint — resolve with
|
|
187
|
+
* `resolveBreakpointValue(theme.layout.screen.padding.x, rt.breakpoint)`
|
|
153
188
|
* (same for `y`).
|
|
154
189
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
};
|
|
190
|
+
padding: ScreenPaddingTokens;
|
|
191
|
+
/** @deprecated Use `padding`. */
|
|
192
|
+
margin: ScreenPaddingTokens;
|
|
159
193
|
};
|
|
160
194
|
header: {
|
|
161
195
|
/** Height of the header bar (compact nav bar / collapsed large-title bar), dp. */
|
|
@@ -172,34 +206,64 @@ export interface TerraTheme {
|
|
|
172
206
|
opacity: OpacityTokens;
|
|
173
207
|
layout: LayoutTokens;
|
|
174
208
|
}
|
|
175
|
-
export type BackgroundColorToken = "background";
|
|
209
|
+
export type BackgroundColorToken = "surface.canvas" | "background";
|
|
176
210
|
export type SurfaceColorToken = Extract<keyof ThemeColor, `surface.${string}`>;
|
|
177
211
|
export type TextColorToken = Extract<keyof ThemeColor, `text.${string}`>;
|
|
178
212
|
export type BorderColorToken = Extract<keyof ThemeColor, `border.${string}`>;
|
|
179
|
-
export type
|
|
180
|
-
export type
|
|
213
|
+
export type AccentColorToken = Extract<keyof CanonicalThemeColor, `accent.${string}`>;
|
|
214
|
+
export type NeutralColorToken = Extract<keyof CanonicalThemeColor, `neutral.${string}`>;
|
|
215
|
+
/** @deprecated Prefer AccentColorToken or NeutralColorToken. */
|
|
216
|
+
export type ActionColorToken = AccentColorToken | NeutralColorToken | Extract<keyof ThemeColor, `action.${string}`>;
|
|
217
|
+
export type StatusColorToken = Extract<keyof ThemeColor, `${"success" | "warning" | "danger" | "info"}.${string}` | `status.${string}`>;
|
|
181
218
|
/** @deprecated Use {@link TextColorToken} — renamed to reflect the `text.*` token namespace. */
|
|
182
219
|
export type ContentColorToken = TextColorToken;
|
|
183
220
|
/**
|
|
184
221
|
* Any color value a component accepts:
|
|
185
|
-
* semantic token (`text.
|
|
222
|
+
* semantic token (`text.primary`, `surface.raised`, `accent.solid.bg`),
|
|
186
223
|
* or a raw CSS color literal (`#fff`, `rgb(...)`, `transparent`).
|
|
187
224
|
*/
|
|
188
|
-
export type ColorToken =
|
|
225
|
+
export type ColorToken = keyof ThemeColor | (string & {});
|
|
189
226
|
export type Scheme = "light" | "dark";
|
|
190
|
-
/**
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
227
|
+
/**
|
|
228
|
+
* How the active scheme is chosen. `system` follows the OS appearance;
|
|
229
|
+
* `light` / `dark` pin a scheme and stop following the system.
|
|
230
|
+
*/
|
|
231
|
+
export type ThemeMode = "system" | "light" | "dark";
|
|
232
|
+
/**
|
|
233
|
+
* A seed-generated accent with local exceptions. The seed is a starting color
|
|
234
|
+
* for the accent family, not a promise that `accent.solid.bg` equals it — pin
|
|
235
|
+
* `accent.solid.bg` in `overrides` when an exact fill is required.
|
|
236
|
+
*/
|
|
237
|
+
export interface AccentSeed {
|
|
238
|
+
/** Opaque six-digit sRGB hex (`#rrggbb`). Other formats are rejected at configure time. */
|
|
239
|
+
seed: string;
|
|
240
|
+
/**
|
|
241
|
+
* Flat semantic color patch applied after generation. Within the patch a
|
|
242
|
+
* canonical name beats its deprecated alias; across layers an explicit
|
|
243
|
+
* override beats every generated value.
|
|
244
|
+
*/
|
|
245
|
+
overrides?: Partial<ThemeColor>;
|
|
199
246
|
}
|
|
200
|
-
/**
|
|
201
|
-
|
|
202
|
-
|
|
247
|
+
/**
|
|
248
|
+
* One scheme's accent input:
|
|
249
|
+
* - a color string — equivalent to `{ seed: value }`;
|
|
250
|
+
* - `{ seed, overrides }` — generation with explicit exceptions;
|
|
251
|
+
* - a full {@link TerraThemeOverride} — skips generation (expert path).
|
|
252
|
+
*/
|
|
253
|
+
export type AccentSchemeInput = string | AccentSeed | TerraThemeOverride;
|
|
254
|
+
/**
|
|
255
|
+
* A named, runtime-switchable overlay on each scheme. A missing scheme leaves
|
|
256
|
+
* that scheme unmodified; the other scheme's seed is never copied implicitly.
|
|
257
|
+
*/
|
|
258
|
+
export type Accent = Partial<Record<Scheme, AccentSchemeInput>>;
|
|
259
|
+
/** @deprecated Use {@link Accent} — a color string per scheme. */
|
|
260
|
+
export type AccentShorthand = Record<Scheme, string>;
|
|
261
|
+
/** @deprecated Use {@link Accent} — a {@link TerraThemeOverride} per scheme. */
|
|
262
|
+
export type AccentOverride = Partial<Record<Scheme, TerraThemeOverride>>;
|
|
263
|
+
/**
|
|
264
|
+
* The compatibility output of `normalizeAccent`: per-scheme partial-theme
|
|
265
|
+
* overrides generated against the default themes.
|
|
266
|
+
*/
|
|
203
267
|
export interface NormalizedAccent {
|
|
204
268
|
light: DeepPartial<TerraTheme>;
|
|
205
269
|
dark: DeepPartial<TerraTheme>;
|
|
@@ -316,9 +380,25 @@ export interface TerraConfig {
|
|
|
316
380
|
defaultAccent?: string;
|
|
317
381
|
/** Per-component default props (e.g. `{ button: { radius: 'full' } }`). */
|
|
318
382
|
components?: ComponentDefaults;
|
|
319
|
-
/**
|
|
383
|
+
/**
|
|
384
|
+
* Initial theme mode. `system` follows the OS appearance; `light` / `dark`
|
|
385
|
+
* pin a scheme. Wins over the deprecated `initialScheme` / `adaptiveThemes`
|
|
386
|
+
* when supplied. Defaults to `system`.
|
|
387
|
+
*/
|
|
388
|
+
mode?: ThemeMode;
|
|
389
|
+
/** @deprecated Use `mode`. Follow the system color scheme. Default `true`. */
|
|
320
390
|
adaptiveThemes?: boolean;
|
|
321
|
-
/** Force a starting scheme (disables adaptive theming). */
|
|
391
|
+
/** @deprecated Use `mode`. Force a starting scheme (disables adaptive theming). */
|
|
322
392
|
initialScheme?: Scheme;
|
|
323
393
|
}
|
|
394
|
+
/** The subset of {@link TerraConfig} that affects resolved theme tokens. */
|
|
395
|
+
export type TerraThemeInput = Pick<TerraConfig, "shared" | "schemes" | "accents" | "defaultAccent">;
|
|
396
|
+
/** Options for pure theme creation. */
|
|
397
|
+
export interface CreateTerraThemesOptions {
|
|
398
|
+
/**
|
|
399
|
+
* Accent to overlay. Omitted → `defaultAccent`; `null` → the base themes
|
|
400
|
+
* with no accent. An unknown name throws.
|
|
401
|
+
*/
|
|
402
|
+
accent?: string | null;
|
|
403
|
+
}
|
|
324
404
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/theme/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,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EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAC3D;;;;OAIG;IACH,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,8EAA8E;IAC9E,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mFAAmF;IACnF,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,eAAe,CAAC,CAAC;AAEpG,uCAAuC;AACvC,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Scheme, TerraTheme, ThemeMode } from "./types.js";
|
|
2
|
+
/** Whether `StyleSheet.configure` has run in this app. Exposed for tests. */
|
|
3
|
+
export declare const hasConfiguredUnistyles: () => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Registers themes, settings and breakpoints with Unistyles. This is a one-time
|
|
6
|
+
* startup call per app: calling `StyleSheet.configure` again leaves the themes
|
|
7
|
+
* it already registered in place, so a second call here is a programming error.
|
|
8
|
+
* Once configured, replace themes with {@link updateThemes} and change the mode
|
|
9
|
+
* with {@link applyMode} instead.
|
|
10
|
+
*/
|
|
11
|
+
export declare function configureUnistyles({ themes, mode, }: {
|
|
12
|
+
themes: Record<Scheme, TerraTheme>;
|
|
13
|
+
mode: ThemeMode;
|
|
14
|
+
}): void;
|
|
15
|
+
/**
|
|
16
|
+
* Replaces both registered themes.
|
|
17
|
+
*
|
|
18
|
+
* NOT an atomic transaction: Unistyles exposes one `updateTheme` per scheme, so
|
|
19
|
+
* `light` is replaced first, then `dark`. If the second call throws, the native
|
|
20
|
+
* runtime holds the new `light` theme and the previous `dark` theme. Callers
|
|
21
|
+
* publish registry/selection state only after this returns, so on a throw Terra
|
|
22
|
+
* still reports the previous selection; calling the same command again with the
|
|
23
|
+
* previous selection (e.g. `applyAccent(getCurrentAccent() ?? null)`) rewrites
|
|
24
|
+
* both themes and restores consistency. No automatic rollback is attempted.
|
|
25
|
+
*/
|
|
26
|
+
export declare function updateThemes(themes: Record<Scheme, TerraTheme>): void;
|
|
27
|
+
/**
|
|
28
|
+
* Applies a theme mode to the live runtime: `system` re-enables adaptive
|
|
29
|
+
* theming; a scheme disables it (so the next OS appearance change does not
|
|
30
|
+
* override the choice) and then selects that scheme.
|
|
31
|
+
*/
|
|
32
|
+
export declare function applyMode(mode: ThemeMode): void;
|
|
33
|
+
//# sourceMappingURL=unistyles-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unistyles-adapter.d.ts","sourceRoot":"","sources":["../../../../src/theme/unistyles-adapter.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAS,CAAC;AAI7D,6EAA6E;AAC7E,eAAO,MAAM,sBAAsB,QAAO,OAAqB,CAAC;AAShE;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,MAAM,EACN,IAAI,GACL,EAAE;IACD,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,IAAI,EAAE,SAAS,CAAC;CACjB,GAAG,IAAI,CAQP;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,IAAI,CAGrE;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAO/C"}
|