@dloizides/theme-web 1.0.1 → 1.1.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/dist/index.d.mts +21 -9
- package/dist/index.d.ts +21 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -19,8 +19,20 @@ type ThemeMode = (typeof ThemeMode)[keyof typeof ThemeMode];
|
|
|
19
19
|
* `ResolvedTheme` / `TenantThemeConfig` are structurally identical.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Generated shade scale for a single color (50-900).
|
|
24
|
+
*
|
|
25
|
+
* Declared as a TYPE ALIAS, not an interface, and that is load-bearing.
|
|
26
|
+
*
|
|
27
|
+
* The shared UI kit (`@dloizides/ui-feedback`) types its colour scales with an
|
|
28
|
+
* index signature (`{ '500': string; [step: string]: string }`) so apps may pass
|
|
29
|
+
* partial scales. TypeScript gives object *type aliases* an implicit index
|
|
30
|
+
* signature when checking assignability, but does NOT give one to *interfaces* —
|
|
31
|
+
* so as an interface this failed to satisfy the kit's `UiTheme` and every app had
|
|
32
|
+
* to hand-write an adapter (or cast). As an alias, `ResolvedTheme` is assignable
|
|
33
|
+
* to `UiTheme` directly. Do not convert these back to interfaces.
|
|
34
|
+
*/
|
|
35
|
+
type ColorScale = {
|
|
24
36
|
'50': string;
|
|
25
37
|
'100': string;
|
|
26
38
|
'200': string;
|
|
@@ -31,7 +43,7 @@ interface ColorScale {
|
|
|
31
43
|
'700': string;
|
|
32
44
|
'800': string;
|
|
33
45
|
'900': string;
|
|
34
|
-
}
|
|
46
|
+
};
|
|
35
47
|
/** Mode-specific color tokens shared by both light and dark configurations. */
|
|
36
48
|
interface ThemeModeColors {
|
|
37
49
|
background: string;
|
|
@@ -71,19 +83,19 @@ interface TenantThemeConfig {
|
|
|
71
83
|
typography?: TypographyConfig;
|
|
72
84
|
branding: BrandingConfig;
|
|
73
85
|
}
|
|
74
|
-
/** Full shade palettes for brand colors. */
|
|
75
|
-
|
|
86
|
+
/** Full shade palettes for brand colors. Type alias — see {@link ColorScale}. */
|
|
87
|
+
type ResolvedPalette = {
|
|
76
88
|
primary: ColorScale;
|
|
77
89
|
secondary: ColorScale;
|
|
78
90
|
accent: ColorScale;
|
|
79
|
-
}
|
|
80
|
-
/** Full shade palettes for semantic/status colors. */
|
|
81
|
-
|
|
91
|
+
};
|
|
92
|
+
/** Full shade palettes for semantic/status colors. Type alias — see {@link ColorScale}. */
|
|
93
|
+
type ResolvedSemanticColors = {
|
|
82
94
|
success: ColorScale;
|
|
83
95
|
warning: ColorScale;
|
|
84
96
|
error: ColorScale;
|
|
85
97
|
info: ColorScale;
|
|
86
|
-
}
|
|
98
|
+
};
|
|
87
99
|
/** Resolved typography configuration. */
|
|
88
100
|
interface ResolvedTypography {
|
|
89
101
|
fontFamily: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -19,8 +19,20 @@ type ThemeMode = (typeof ThemeMode)[keyof typeof ThemeMode];
|
|
|
19
19
|
* `ResolvedTheme` / `TenantThemeConfig` are structurally identical.
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Generated shade scale for a single color (50-900).
|
|
24
|
+
*
|
|
25
|
+
* Declared as a TYPE ALIAS, not an interface, and that is load-bearing.
|
|
26
|
+
*
|
|
27
|
+
* The shared UI kit (`@dloizides/ui-feedback`) types its colour scales with an
|
|
28
|
+
* index signature (`{ '500': string; [step: string]: string }`) so apps may pass
|
|
29
|
+
* partial scales. TypeScript gives object *type aliases* an implicit index
|
|
30
|
+
* signature when checking assignability, but does NOT give one to *interfaces* —
|
|
31
|
+
* so as an interface this failed to satisfy the kit's `UiTheme` and every app had
|
|
32
|
+
* to hand-write an adapter (or cast). As an alias, `ResolvedTheme` is assignable
|
|
33
|
+
* to `UiTheme` directly. Do not convert these back to interfaces.
|
|
34
|
+
*/
|
|
35
|
+
type ColorScale = {
|
|
24
36
|
'50': string;
|
|
25
37
|
'100': string;
|
|
26
38
|
'200': string;
|
|
@@ -31,7 +43,7 @@ interface ColorScale {
|
|
|
31
43
|
'700': string;
|
|
32
44
|
'800': string;
|
|
33
45
|
'900': string;
|
|
34
|
-
}
|
|
46
|
+
};
|
|
35
47
|
/** Mode-specific color tokens shared by both light and dark configurations. */
|
|
36
48
|
interface ThemeModeColors {
|
|
37
49
|
background: string;
|
|
@@ -71,19 +83,19 @@ interface TenantThemeConfig {
|
|
|
71
83
|
typography?: TypographyConfig;
|
|
72
84
|
branding: BrandingConfig;
|
|
73
85
|
}
|
|
74
|
-
/** Full shade palettes for brand colors. */
|
|
75
|
-
|
|
86
|
+
/** Full shade palettes for brand colors. Type alias — see {@link ColorScale}. */
|
|
87
|
+
type ResolvedPalette = {
|
|
76
88
|
primary: ColorScale;
|
|
77
89
|
secondary: ColorScale;
|
|
78
90
|
accent: ColorScale;
|
|
79
|
-
}
|
|
80
|
-
/** Full shade palettes for semantic/status colors. */
|
|
81
|
-
|
|
91
|
+
};
|
|
92
|
+
/** Full shade palettes for semantic/status colors. Type alias — see {@link ColorScale}. */
|
|
93
|
+
type ResolvedSemanticColors = {
|
|
82
94
|
success: ColorScale;
|
|
83
95
|
warning: ColorScale;
|
|
84
96
|
error: ColorScale;
|
|
85
97
|
info: ColorScale;
|
|
86
|
-
}
|
|
98
|
+
};
|
|
87
99
|
/** Resolved typography configuration. */
|
|
88
100
|
interface ResolvedTypography {
|
|
89
101
|
fontFamily: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dloizides/theme-web",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Shared, redux-free RN-web theme system — ThemeProvider + useTheme + HSL palette generator + resolveTheme, promoted from the duplicated erevna-web/katalogos-web src/theme. Default palette matches both apps' current look (zero visual change); seed from a single @dloizides/design-tokens preset via fromDesignTokens. Any app (incl. kefi) can mount it and feed the resolved theme into @dloizides/ui-feedback. Part of the dloizides.com shared UI kit.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|