@tenerife.music/ui 1.0.12 → 1.0.13
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/README.md +12 -8
- package/dist/{colors-DPNI96bB.d.cts → colors-CVA7_16U.d.cts} +1 -1
- package/dist/{colors-DPNI96bB.d.ts → colors-CVA7_16U.d.ts} +1 -1
- package/dist/index-BgXvioll.d.cts +6845 -0
- package/dist/index-Bv4wWj9I.d.ts +6845 -0
- package/dist/index.cjs +4920 -4140
- package/dist/index.d.cts +755 -461
- package/dist/index.d.ts +755 -461
- package/dist/index.mjs +4884 -4123
- package/dist/theme/index.cjs +0 -13
- package/dist/theme/index.d.cts +3 -78
- package/dist/theme/index.d.ts +3 -78
- package/dist/theme/index.mjs +1 -11
- package/dist/tokens/index.cjs +526 -1
- package/dist/tokens/index.d.cts +2 -5488
- package/dist/tokens/index.d.ts +2 -5488
- package/dist/tokens/index.mjs +526 -2
- package/package.json +8 -7
package/dist/theme/index.cjs
CHANGED
|
@@ -1927,16 +1927,6 @@ async function applyDocumentTheme(mode, themeName = "default", brandId = null) {
|
|
|
1927
1927
|
body.style.color = `hsl(${foreground})`;
|
|
1928
1928
|
}
|
|
1929
1929
|
}
|
|
1930
|
-
async function applyDocumentMode(mode) {
|
|
1931
|
-
if (typeof document !== "undefined") {
|
|
1932
|
-
const root = document.documentElement;
|
|
1933
|
-
const currentTheme = root.getAttribute(THEME_ATTRIBUTE) || "default";
|
|
1934
|
-
const currentBrand = root.getAttribute("data-brand") || null;
|
|
1935
|
-
await applyDocumentTheme(mode, currentTheme, currentBrand);
|
|
1936
|
-
} else {
|
|
1937
|
-
await applyDocumentTheme(mode, "default", null);
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
1930
|
function getInitialTheme(defaultTheme2 = "default", storageKey = "tm_theme") {
|
|
1941
1931
|
if (typeof window === "undefined") return defaultTheme2;
|
|
1942
1932
|
const root = document.documentElement;
|
|
@@ -2610,8 +2600,6 @@ var letterSpacings = {
|
|
|
2610
2600
|
};
|
|
2611
2601
|
|
|
2612
2602
|
exports.ThemeProvider = ThemeProvider;
|
|
2613
|
-
exports.applyDocumentMode = applyDocumentMode;
|
|
2614
|
-
exports.applyDocumentTheme = applyDocumentTheme;
|
|
2615
2603
|
exports.borderRadius = borderRadius;
|
|
2616
2604
|
exports.canLoadTheme = canLoadTheme;
|
|
2617
2605
|
exports.createMinimalThemeSchema = createMinimalThemeSchema;
|
|
@@ -2631,7 +2619,6 @@ exports.isThemeSchema = isThemeSchema;
|
|
|
2631
2619
|
exports.letterSpacings = letterSpacings;
|
|
2632
2620
|
exports.lineHeights = lineHeights;
|
|
2633
2621
|
exports.loadTheme = loadTheme;
|
|
2634
|
-
exports.loadThemeOverride = loadThemeOverride;
|
|
2635
2622
|
exports.loadThemeSafe = loadThemeSafe;
|
|
2636
2623
|
exports.persistBrand = persistBrand;
|
|
2637
2624
|
exports.persistMode = persistMode;
|
package/dist/theme/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ColorScale,
|
|
2
|
-
export {
|
|
1
|
+
import { M as Mode, C as ColorScale, B as BaseColorTokens, S as SurfaceColors, a as SemanticColors, T as TextColors } from '../colors-CVA7_16U.cjs';
|
|
2
|
+
export { b as ChartColors, c as ColorTokens, d as cssVariableColorTokens, t as tailwindThemeColors } from '../colors-CVA7_16U.cjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
|
|
@@ -9,66 +9,6 @@ import React__default from 'react';
|
|
|
9
9
|
* Defines types for theme overrides that can be applied to the token system.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* Theme override configuration
|
|
14
|
-
* Allows partial overrides of token subsets
|
|
15
|
-
*/
|
|
16
|
-
interface ThemeOverride {
|
|
17
|
-
/**
|
|
18
|
-
* Theme name
|
|
19
|
-
*/
|
|
20
|
-
name: string;
|
|
21
|
-
/**
|
|
22
|
-
* Theme description
|
|
23
|
-
*/
|
|
24
|
-
description?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Override primary color scale
|
|
27
|
-
*/
|
|
28
|
-
primaryColors?: Partial<ColorScale>;
|
|
29
|
-
/**
|
|
30
|
-
* Override accent color scale
|
|
31
|
-
*/
|
|
32
|
-
accentColors?: Partial<ColorScale>;
|
|
33
|
-
/**
|
|
34
|
-
* Override secondary color scale
|
|
35
|
-
*/
|
|
36
|
-
secondaryColors?: Partial<ColorScale>;
|
|
37
|
-
/**
|
|
38
|
-
* Override base and related color tokens (for day mode)
|
|
39
|
-
* Uses ColorTokens to allow primary/accent overrides in addition to base colors.
|
|
40
|
-
*/
|
|
41
|
-
baseColorsDay?: Partial<ColorTokens>;
|
|
42
|
-
/**
|
|
43
|
-
* Override base and related color tokens (for night mode)
|
|
44
|
-
* Uses ColorTokens to allow primary/accent overrides in addition to base colors.
|
|
45
|
-
*/
|
|
46
|
-
baseColorsNight?: Partial<ColorTokens>;
|
|
47
|
-
/**
|
|
48
|
-
* Override surface colors (for day mode)
|
|
49
|
-
*/
|
|
50
|
-
surfaceColorsDay?: Partial<SurfaceColors>;
|
|
51
|
-
/**
|
|
52
|
-
* Override surface colors (for night mode)
|
|
53
|
-
*/
|
|
54
|
-
surfaceColorsNight?: Partial<SurfaceColors>;
|
|
55
|
-
/**
|
|
56
|
-
* Override semantic colors (for day mode)
|
|
57
|
-
*/
|
|
58
|
-
semanticColorsDay?: Partial<SemanticColors>;
|
|
59
|
-
/**
|
|
60
|
-
* Override semantic colors (for night mode)
|
|
61
|
-
*/
|
|
62
|
-
semanticColorsNight?: Partial<SemanticColors>;
|
|
63
|
-
/**
|
|
64
|
-
* Override text colors (for day mode)
|
|
65
|
-
*/
|
|
66
|
-
textColorsDay?: Partial<TextColors>;
|
|
67
|
-
/**
|
|
68
|
-
* Override text colors (for night mode)
|
|
69
|
-
*/
|
|
70
|
-
textColorsNight?: Partial<TextColors>;
|
|
71
|
-
}
|
|
72
12
|
/**
|
|
73
13
|
* Theme name type
|
|
74
14
|
*/
|
|
@@ -79,21 +19,6 @@ type ThemeName = "default" | "dark" | "brand";
|
|
|
79
19
|
* Checks in order: DOM attribute, localStorage, system preference, default
|
|
80
20
|
*/
|
|
81
21
|
declare function getInitialMode(defaultMode?: Mode, storageKey?: string, enableSystem?: boolean): Mode;
|
|
82
|
-
/**
|
|
83
|
-
* Load and cache theme override
|
|
84
|
-
*/
|
|
85
|
-
declare function loadThemeOverride(themeName: "default" | "dark" | "brand"): Promise<ThemeOverride | null>;
|
|
86
|
-
/**
|
|
87
|
-
* Apply theme and mode to document
|
|
88
|
-
* Updates DOM attributes, classes, and CSS variables from tokens with theme overrides
|
|
89
|
-
* Also applies brand overrides if a brand is specified
|
|
90
|
-
*/
|
|
91
|
-
declare function applyDocumentTheme(mode: Mode, themeName?: "default" | "dark" | "brand", brandId?: string | null): Promise<void>;
|
|
92
|
-
/**
|
|
93
|
-
* Apply mode to document (backward compatible)
|
|
94
|
-
* Updates DOM attributes, classes, and CSS variables from tokens
|
|
95
|
-
*/
|
|
96
|
-
declare function applyDocumentMode(mode: Mode): Promise<void>;
|
|
97
22
|
/**
|
|
98
23
|
* Get initial theme from various sources
|
|
99
24
|
*/
|
|
@@ -525,4 +450,4 @@ declare const letterSpacings: {
|
|
|
525
450
|
widest: string;
|
|
526
451
|
};
|
|
527
452
|
|
|
528
|
-
export {
|
|
453
|
+
export { type FontScale, Mode, type SpacingScale, type ThemeLoaderOptions, type ThemeLoaderResult, type ThemeMetadata, ThemeProvider, type ThemeProviderProps, type ThemeRegistryEntry, type ThemeSchema, type ThemeValidationResult, borderRadius, canLoadTheme, createMinimalThemeSchema, fontFamilies, fontSizes, fontWeights, getAllThemes, getAvailableThemeIds, getInitialBrand, getInitialMode, getInitialTheme, getThemeMetadata, getThemesByCategory, initializeDefaultThemes, isThemeSchema, letterSpacings, lineHeights, loadTheme, loadThemeSafe, persistBrand, persistMode, persistTheme, preloadThemes, registerTheme, shadows, spacing, themeExists, themeRegistry, useTheme, validateThemeSchema };
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ColorScale,
|
|
2
|
-
export {
|
|
1
|
+
import { M as Mode, C as ColorScale, B as BaseColorTokens, S as SurfaceColors, a as SemanticColors, T as TextColors } from '../colors-CVA7_16U.js';
|
|
2
|
+
export { b as ChartColors, c as ColorTokens, d as cssVariableColorTokens, t as tailwindThemeColors } from '../colors-CVA7_16U.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
|
|
@@ -9,66 +9,6 @@ import React__default from 'react';
|
|
|
9
9
|
* Defines types for theme overrides that can be applied to the token system.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
/**
|
|
13
|
-
* Theme override configuration
|
|
14
|
-
* Allows partial overrides of token subsets
|
|
15
|
-
*/
|
|
16
|
-
interface ThemeOverride {
|
|
17
|
-
/**
|
|
18
|
-
* Theme name
|
|
19
|
-
*/
|
|
20
|
-
name: string;
|
|
21
|
-
/**
|
|
22
|
-
* Theme description
|
|
23
|
-
*/
|
|
24
|
-
description?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Override primary color scale
|
|
27
|
-
*/
|
|
28
|
-
primaryColors?: Partial<ColorScale>;
|
|
29
|
-
/**
|
|
30
|
-
* Override accent color scale
|
|
31
|
-
*/
|
|
32
|
-
accentColors?: Partial<ColorScale>;
|
|
33
|
-
/**
|
|
34
|
-
* Override secondary color scale
|
|
35
|
-
*/
|
|
36
|
-
secondaryColors?: Partial<ColorScale>;
|
|
37
|
-
/**
|
|
38
|
-
* Override base and related color tokens (for day mode)
|
|
39
|
-
* Uses ColorTokens to allow primary/accent overrides in addition to base colors.
|
|
40
|
-
*/
|
|
41
|
-
baseColorsDay?: Partial<ColorTokens>;
|
|
42
|
-
/**
|
|
43
|
-
* Override base and related color tokens (for night mode)
|
|
44
|
-
* Uses ColorTokens to allow primary/accent overrides in addition to base colors.
|
|
45
|
-
*/
|
|
46
|
-
baseColorsNight?: Partial<ColorTokens>;
|
|
47
|
-
/**
|
|
48
|
-
* Override surface colors (for day mode)
|
|
49
|
-
*/
|
|
50
|
-
surfaceColorsDay?: Partial<SurfaceColors>;
|
|
51
|
-
/**
|
|
52
|
-
* Override surface colors (for night mode)
|
|
53
|
-
*/
|
|
54
|
-
surfaceColorsNight?: Partial<SurfaceColors>;
|
|
55
|
-
/**
|
|
56
|
-
* Override semantic colors (for day mode)
|
|
57
|
-
*/
|
|
58
|
-
semanticColorsDay?: Partial<SemanticColors>;
|
|
59
|
-
/**
|
|
60
|
-
* Override semantic colors (for night mode)
|
|
61
|
-
*/
|
|
62
|
-
semanticColorsNight?: Partial<SemanticColors>;
|
|
63
|
-
/**
|
|
64
|
-
* Override text colors (for day mode)
|
|
65
|
-
*/
|
|
66
|
-
textColorsDay?: Partial<TextColors>;
|
|
67
|
-
/**
|
|
68
|
-
* Override text colors (for night mode)
|
|
69
|
-
*/
|
|
70
|
-
textColorsNight?: Partial<TextColors>;
|
|
71
|
-
}
|
|
72
12
|
/**
|
|
73
13
|
* Theme name type
|
|
74
14
|
*/
|
|
@@ -79,21 +19,6 @@ type ThemeName = "default" | "dark" | "brand";
|
|
|
79
19
|
* Checks in order: DOM attribute, localStorage, system preference, default
|
|
80
20
|
*/
|
|
81
21
|
declare function getInitialMode(defaultMode?: Mode, storageKey?: string, enableSystem?: boolean): Mode;
|
|
82
|
-
/**
|
|
83
|
-
* Load and cache theme override
|
|
84
|
-
*/
|
|
85
|
-
declare function loadThemeOverride(themeName: "default" | "dark" | "brand"): Promise<ThemeOverride | null>;
|
|
86
|
-
/**
|
|
87
|
-
* Apply theme and mode to document
|
|
88
|
-
* Updates DOM attributes, classes, and CSS variables from tokens with theme overrides
|
|
89
|
-
* Also applies brand overrides if a brand is specified
|
|
90
|
-
*/
|
|
91
|
-
declare function applyDocumentTheme(mode: Mode, themeName?: "default" | "dark" | "brand", brandId?: string | null): Promise<void>;
|
|
92
|
-
/**
|
|
93
|
-
* Apply mode to document (backward compatible)
|
|
94
|
-
* Updates DOM attributes, classes, and CSS variables from tokens
|
|
95
|
-
*/
|
|
96
|
-
declare function applyDocumentMode(mode: Mode): Promise<void>;
|
|
97
22
|
/**
|
|
98
23
|
* Get initial theme from various sources
|
|
99
24
|
*/
|
|
@@ -525,4 +450,4 @@ declare const letterSpacings: {
|
|
|
525
450
|
widest: string;
|
|
526
451
|
};
|
|
527
452
|
|
|
528
|
-
export {
|
|
453
|
+
export { type FontScale, Mode, type SpacingScale, type ThemeLoaderOptions, type ThemeLoaderResult, type ThemeMetadata, ThemeProvider, type ThemeProviderProps, type ThemeRegistryEntry, type ThemeSchema, type ThemeValidationResult, borderRadius, canLoadTheme, createMinimalThemeSchema, fontFamilies, fontSizes, fontWeights, getAllThemes, getAvailableThemeIds, getInitialBrand, getInitialMode, getInitialTheme, getThemeMetadata, getThemesByCategory, initializeDefaultThemes, isThemeSchema, letterSpacings, lineHeights, loadTheme, loadThemeSafe, persistBrand, persistMode, persistTheme, preloadThemes, registerTheme, shadows, spacing, themeExists, themeRegistry, useTheme, validateThemeSchema };
|
package/dist/theme/index.mjs
CHANGED
|
@@ -1921,16 +1921,6 @@ async function applyDocumentTheme(mode, themeName = "default", brandId = null) {
|
|
|
1921
1921
|
body.style.color = `hsl(${foreground})`;
|
|
1922
1922
|
}
|
|
1923
1923
|
}
|
|
1924
|
-
async function applyDocumentMode(mode) {
|
|
1925
|
-
if (typeof document !== "undefined") {
|
|
1926
|
-
const root = document.documentElement;
|
|
1927
|
-
const currentTheme = root.getAttribute(THEME_ATTRIBUTE) || "default";
|
|
1928
|
-
const currentBrand = root.getAttribute("data-brand") || null;
|
|
1929
|
-
await applyDocumentTheme(mode, currentTheme, currentBrand);
|
|
1930
|
-
} else {
|
|
1931
|
-
await applyDocumentTheme(mode, "default", null);
|
|
1932
|
-
}
|
|
1933
|
-
}
|
|
1934
1924
|
function getInitialTheme(defaultTheme2 = "default", storageKey = "tm_theme") {
|
|
1935
1925
|
if (typeof window === "undefined") return defaultTheme2;
|
|
1936
1926
|
const root = document.documentElement;
|
|
@@ -2603,4 +2593,4 @@ var letterSpacings = {
|
|
|
2603
2593
|
widest: "0.1em"
|
|
2604
2594
|
};
|
|
2605
2595
|
|
|
2606
|
-
export { ThemeProvider,
|
|
2596
|
+
export { ThemeProvider, borderRadius, canLoadTheme, createMinimalThemeSchema, cssVariableColorTokens, fontFamilies, fontSizes, fontWeights, getAllThemes, getAvailableThemeIds, getInitialBrand, getInitialMode, getInitialTheme, getThemeMetadata, getThemesByCategory, initializeDefaultThemes, isThemeSchema, letterSpacings, lineHeights, loadTheme, loadThemeSafe, persistBrand, persistMode, persistTheme, preloadThemes, registerTheme, shadows, spacing, tailwindThemeColors, themeExists, themeRegistry, useTheme, validateThemeSchema };
|