@tenerife.music/ui 0.0.7 → 1.0.1
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 +168 -136
- package/dist/ThemeProvider-CaUX_Jam.cjs +2 -0
- package/dist/ThemeProvider-ltuW-773.js +1227 -0
- package/dist/animation/index.d.ts +9 -0
- package/dist/animation/index.d.ts.map +1 -0
- package/dist/animation/presets.d.ts +304 -0
- package/dist/animation/presets.d.ts.map +1 -0
- package/dist/animation/tas.d.ts +80 -0
- package/dist/animation/tas.d.ts.map +1 -0
- package/dist/animation/types.d.ts +106 -0
- package/dist/animation/types.d.ts.map +1 -0
- package/dist/animation/utils.d.ts +7 -0
- package/dist/animation/utils.d.ts.map +1 -0
- package/dist/brand-C5R2semX.js +45 -0
- package/dist/brand-DQb18Frh.cjs +2 -0
- package/dist/components/SectionBuilder.d.ts +37 -0
- package/dist/components/SectionBuilder.d.ts.map +1 -0
- package/dist/components/SectionBuilder.presets.d.ts +229 -0
- package/dist/components/SectionBuilder.presets.d.ts.map +1 -0
- package/dist/components/SectionBuilder.types.d.ts +327 -0
- package/dist/components/SectionBuilder.types.d.ts.map +1 -0
- package/dist/components/admin/Dashboard.d.ts.map +1 -1
- package/dist/components/admin/UserManagement.d.ts.map +1 -1
- package/dist/components/auth/LoginForm.d.ts.map +1 -1
- package/dist/components/auth/ProfileCard.d.ts.map +1 -1
- package/dist/components/auth/RegisterForm.d.ts.map +1 -1
- package/dist/components/cards/EventCard.d.ts +32 -31
- package/dist/components/cards/EventCard.d.ts.map +1 -1
- package/dist/components/cards/VenueCard.d.ts +32 -33
- package/dist/components/cards/VenueCard.d.ts.map +1 -1
- package/dist/components/controls/LanguageSelector.d.ts.map +1 -1
- package/dist/components/data/List.d.ts.map +1 -1
- package/dist/components/data/Table.d.ts +2 -2
- package/dist/components/data/Table.d.ts.map +1 -1
- package/dist/components/data/Timeline.d.ts.map +1 -1
- package/dist/components/feedback/Alert.d.ts +1 -1
- package/dist/components/feedback/Alert.d.ts.map +1 -1
- package/dist/components/feedback/ConsentBanner.d.ts.map +1 -1
- package/dist/components/feedback/Progress.d.ts.map +1 -1
- package/dist/components/feedback/Skeleton.d.ts.map +1 -1
- package/dist/components/filters/DateRangePicker.d.ts.map +1 -1
- package/dist/components/filters/FilterBar.d.ts +14 -1
- package/dist/components/filters/FilterBar.d.ts.map +1 -1
- package/dist/components/filters/FilterSelect.d.ts +2 -2
- package/dist/components/filters/FilterSelect.d.ts.map +1 -1
- package/dist/components/filters/PriceRangeSlider.d.ts.map +1 -1
- package/dist/components/filters/SearchFilters.d.ts.map +1 -1
- package/dist/components/filters/SearchInput.d.ts +1 -1
- package/dist/components/filters/SearchInput.d.ts.map +1 -1
- package/dist/components/filters/types.d.ts +9 -9
- package/dist/components/filters/types.d.ts.map +1 -1
- package/dist/components/forms/FormInput.d.ts +3 -7
- package/dist/components/forms/FormInput.d.ts.map +1 -1
- package/dist/components/forms/FormSelect.d.ts.map +1 -1
- package/dist/components/forms/FormTextarea.d.ts +2 -6
- package/dist/components/forms/FormTextarea.d.ts.map +1 -1
- package/dist/components/icons/TrendingIcon.d.ts.map +1 -1
- package/dist/components/image/Image.d.ts +4 -4
- package/dist/components/image/Image.d.ts.map +1 -1
- package/dist/components/layout/Box.d.ts +90 -0
- package/dist/components/layout/Box.d.ts.map +1 -0
- package/dist/components/layout/Container.d.ts +2 -2
- package/dist/components/layout/Container.d.ts.map +1 -1
- package/dist/components/layout/Flex.d.ts +27 -6
- package/dist/components/layout/Flex.d.ts.map +1 -1
- package/dist/components/layout/Footer.d.ts.map +1 -1
- package/dist/components/layout/Grid.d.ts +43 -4
- package/dist/components/layout/Grid.d.ts.map +1 -1
- package/dist/components/layout/ModeHero.d.ts.map +1 -1
- package/dist/components/layout/Navbar.d.ts +2 -2
- package/dist/components/layout/Navbar.d.ts.map +1 -1
- package/dist/components/layout/Section.d.ts +2 -2
- package/dist/components/layout/Section.d.ts.map +1 -1
- package/dist/components/layout/Stack.d.ts +21 -4
- package/dist/components/layout/Stack.d.ts.map +1 -1
- package/dist/components/layout/index.d.ts +15 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/layout/layout.types.d.ts +92 -0
- package/dist/components/layout/layout.types.d.ts.map +1 -0
- package/dist/components/menus/DropdownMenu.d.ts +2 -2
- package/dist/components/menus/DropdownMenu.d.ts.map +1 -1
- package/dist/components/menus/NavigationMenu.d.ts +2 -2
- package/dist/components/menus/NavigationMenu.d.ts.map +1 -1
- package/dist/components/menus/Tabs.d.ts +2 -2
- package/dist/components/menus/Tabs.d.ts.map +1 -1
- package/dist/components/modals/ConfirmDialog.d.ts +2 -2
- package/dist/components/modals/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/modals/CustomDialog.d.ts +1 -2
- package/dist/components/modals/CustomDialog.d.ts.map +1 -1
- package/dist/components/modals/Modal.d.ts +2 -2
- package/dist/components/modals/Modal.d.ts.map +1 -1
- package/dist/components/modals/ModalProvider.d.ts +2 -2
- package/dist/components/modals/ModalProvider.d.ts.map +1 -1
- package/dist/components/modals/SimpleModal.d.ts +3 -2
- package/dist/components/modals/SimpleModal.d.ts.map +1 -1
- package/dist/components/navigation/Breadcrumbs.d.ts +1 -0
- package/dist/components/navigation/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/navigation/Pagination.d.ts +1 -0
- package/dist/components/navigation/Pagination.d.ts.map +1 -1
- package/dist/components/overlays/OverlayPortal.d.ts +3 -3
- package/dist/components/overlays/OverlayPortal.d.ts.map +1 -1
- package/dist/components/overlays/Popover.d.ts +11 -11
- package/dist/components/overlays/Popover.d.ts.map +1 -1
- package/dist/components/overlays/Tooltip.d.ts +9 -9
- package/dist/components/overlays/Tooltip.d.ts.map +1 -1
- package/dist/components/primitives/Badge.d.ts +1 -1
- package/dist/components/primitives/Badge.d.ts.map +1 -1
- package/dist/components/primitives/Button.d.ts +1 -1
- package/dist/components/primitives/Button.d.ts.map +1 -1
- package/dist/components/primitives/Card.d.ts +1 -1
- package/dist/components/primitives/Card.d.ts.map +1 -1
- package/dist/components/primitives/Divider.d.ts.map +1 -1
- package/dist/components/primitives/Link.d.ts +4 -2
- package/dist/components/primitives/Link.d.ts.map +1 -1
- package/dist/components/primitives/ThemeSwitch.d.ts +2 -2
- package/dist/components/primitives/ThemeSwitch.d.ts.map +1 -1
- package/dist/components/primitives/Typography.d.ts +4 -4
- package/dist/components/primitives/Typography.d.ts.map +1 -1
- package/dist/components/search/SearchBar.d.ts.map +1 -1
- package/dist/components/sections/ArticlesSection.d.ts +14 -4
- package/dist/components/sections/ArticlesSection.d.ts.map +1 -1
- package/dist/components/sections/CTASection.d.ts +38 -0
- package/dist/components/sections/CTASection.d.ts.map +1 -0
- package/dist/components/sections/FeatureSection.d.ts +34 -0
- package/dist/components/sections/FeatureSection.d.ts.map +1 -0
- package/dist/components/sections/HeroSection.d.ts +28 -0
- package/dist/components/sections/HeroSection.d.ts.map +1 -0
- package/dist/components/sections/TrendingSection.d.ts +19 -3
- package/dist/components/sections/TrendingSection.d.ts.map +1 -1
- package/dist/components/skeletons/EventCardSkeleton.d.ts.map +1 -1
- package/dist/components/skeletons/VenueCardSkeleton.d.ts.map +1 -1
- package/dist/components/toasts/Toast.d.ts +2 -2
- package/dist/components/toasts/Toast.d.ts.map +1 -1
- package/dist/components/toasts/ToastProvider.d.ts +3 -3
- package/dist/components/toasts/ToastProvider.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +4 -2
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/card.d.ts +1 -1
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/dialog.d.ts +2 -2
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/toast.d.ts +3 -3
- package/dist/components/ui/toast.d.ts.map +1 -1
- package/dist/components/ui/toaster.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts +2 -2
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/dark-Cvoy1uFT.js +30 -0
- package/dist/dark-OOhiqt1q.cjs +2 -0
- package/dist/default-BKgH1D9-.js +8 -0
- package/dist/default-Ddg7Haf2.cjs +2 -0
- package/dist/hooks/use-toast.d.ts +3 -3
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/useDebounce.d.ts +20 -0
- package/dist/hooks/useDebounce.d.ts.map +1 -0
- package/dist/hooks/useModal.d.ts +5 -5
- package/dist/hooks/useModal.d.ts.map +1 -1
- package/dist/hooks/useToast.d.ts +2 -2
- package/dist/hooks/useToast.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +41 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +4303 -2807
- package/dist/lib/a11y.d.ts +16 -0
- package/dist/lib/a11y.d.ts.map +1 -0
- package/dist/lib/responsive-props.d.ts +64 -0
- package/dist/lib/responsive-props.d.ts.map +1 -0
- package/dist/motion-4SRNkZlz.cjs +2 -0
- package/dist/motion-CuHacXY1.js +722 -0
- package/dist/preset.cjs +1 -1
- package/dist/preset.d.ts.map +1 -1
- package/dist/preset.mjs +1 -1
- package/dist/radius-CAu4qr9R.js +185 -0
- package/dist/radius-Cz6tayZG.cjs +2 -0
- package/dist/test/animation-utils.d.ts +60 -0
- package/dist/test/animation-utils.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +56 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/applyMode.d.ts +41 -1
- package/dist/theme/applyMode.d.ts.map +1 -1
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.d.ts +5 -1
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.mjs +237 -97
- package/dist/theme/loader.d.ts +64 -0
- package/dist/theme/loader.d.ts.map +1 -0
- package/dist/theme/motion.d.ts.map +1 -1
- package/dist/theme/registry.d.ts +71 -0
- package/dist/theme/registry.d.ts.map +1 -0
- package/dist/theme/schema.d.ts +125 -0
- package/dist/theme/schema.d.ts.map +1 -0
- package/dist/theme/typography.d.ts.map +1 -1
- package/dist/themes/brand.d.ts +7 -0
- package/dist/themes/brand.d.ts.map +1 -0
- package/dist/themes/brand_engine.d.ts +102 -0
- package/dist/themes/brand_engine.d.ts.map +1 -0
- package/dist/themes/dark.d.ts +7 -0
- package/dist/themes/dark.d.ts.map +1 -0
- package/dist/themes/default.d.ts +7 -0
- package/dist/themes/default.d.ts.map +1 -0
- package/dist/themes/index.d.ts +25 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/minimal.d.ts +7 -0
- package/dist/themes/minimal.d.ts.map +1 -0
- package/dist/themes/neon.d.ts +7 -0
- package/dist/themes/neon.d.ts.map +1 -0
- package/dist/themes/types.d.ts +279 -0
- package/dist/themes/types.d.ts.map +1 -0
- package/dist/tokens/colors.d.ts +260 -38
- package/dist/tokens/colors.d.ts.map +1 -1
- package/dist/tokens/css-variables.d.ts +271 -0
- package/dist/tokens/css-variables.d.ts.map +1 -0
- package/dist/tokens/index.cjs +4 -1
- package/dist/tokens/index.d.ts +4 -1
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.mjs +770 -168
- package/dist/tokens/motion.d.ts +435 -0
- package/dist/tokens/motion.d.ts.map +1 -0
- package/dist/tokens/radius.d.ts +130 -2
- package/dist/tokens/radius.d.ts.map +1 -1
- package/dist/tokens/shadows.d.ts +172 -0
- package/dist/tokens/shadows.d.ts.map +1 -0
- package/dist/tokens/spacing.d.ts +155 -1
- package/dist/tokens/spacing.d.ts.map +1 -1
- package/dist/tokens/typography.d.ts +285 -21
- package/dist/tokens/typography.d.ts.map +1 -1
- package/package.json +66 -18
- package/dist/radius-CuOZD6Mk.cjs +0 -2
- package/dist/radius-NOytgRst.js +0 -22
package/dist/theme/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
2
|
+
import { T as B, b as N, a as z, e as P, g as H, c as V, l as _, f as q, p as G, d as K, u as Q } from "../ThemeProvider-ltuW-773.js";
|
|
3
|
+
const y = {
|
|
3
4
|
day: {
|
|
4
5
|
background: "hsl(var(--background))",
|
|
5
6
|
foreground: "hsl(var(--foreground))",
|
|
@@ -52,7 +53,7 @@ const e = {
|
|
|
52
53
|
chart4: "hsl(280, 65%, 60%)",
|
|
53
54
|
chart5: "hsl(340, 75%, 55%)"
|
|
54
55
|
}
|
|
55
|
-
},
|
|
56
|
+
}, T = {
|
|
56
57
|
background: "hsl(var(--background))",
|
|
57
58
|
foreground: "hsl(var(--foreground))",
|
|
58
59
|
card: {
|
|
@@ -93,7 +94,196 @@ const e = {
|
|
|
93
94
|
4: "hsl(var(--chart-4))",
|
|
94
95
|
5: "hsl(var(--chart-5))"
|
|
95
96
|
}
|
|
96
|
-
},
|
|
97
|
+
}, i = /* @__PURE__ */ new Map();
|
|
98
|
+
function c(r) {
|
|
99
|
+
i.set(r.metadata.id, r);
|
|
100
|
+
}
|
|
101
|
+
function x(r) {
|
|
102
|
+
var a;
|
|
103
|
+
return (a = i.get(r)) == null ? void 0 : a.metadata;
|
|
104
|
+
}
|
|
105
|
+
function h() {
|
|
106
|
+
return Array.from(i.values()).filter((r) => r.enabled !== !1).map((r) => r.metadata);
|
|
107
|
+
}
|
|
108
|
+
function w(r) {
|
|
109
|
+
return h().filter((a) => a.category === r);
|
|
110
|
+
}
|
|
111
|
+
function s(r) {
|
|
112
|
+
return i.has(r);
|
|
113
|
+
}
|
|
114
|
+
async function g(r) {
|
|
115
|
+
const a = i.get(r);
|
|
116
|
+
if (!a)
|
|
117
|
+
throw new Error(`Theme "${r}" not found in registry`);
|
|
118
|
+
if (a.enabled === !1)
|
|
119
|
+
throw new Error(`Theme "${r}" is disabled`);
|
|
120
|
+
try {
|
|
121
|
+
return (await a.loader()).default;
|
|
122
|
+
} catch (e) {
|
|
123
|
+
throw new Error(
|
|
124
|
+
`Failed to load theme "${r}": ${e instanceof Error ? e.message : String(e)}`
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function v() {
|
|
129
|
+
c({
|
|
130
|
+
metadata: {
|
|
131
|
+
id: "default",
|
|
132
|
+
name: "Default",
|
|
133
|
+
description: "Default Tenerife UI theme with standard color palette",
|
|
134
|
+
category: "default",
|
|
135
|
+
version: "1.0.0"
|
|
136
|
+
},
|
|
137
|
+
loader: async () => ({ default: { ...(await import("../default-BKgH1D9-.js")).defaultTheme, id: "default", name: "Default" } }),
|
|
138
|
+
enabled: !0
|
|
139
|
+
}), c({
|
|
140
|
+
metadata: {
|
|
141
|
+
id: "dark",
|
|
142
|
+
name: "Dark",
|
|
143
|
+
description: "Enhanced dark theme with deeper surfaces and higher contrast",
|
|
144
|
+
category: "default",
|
|
145
|
+
version: "1.0.0"
|
|
146
|
+
},
|
|
147
|
+
loader: async () => ({ default: { ...(await import("../dark-Cvoy1uFT.js")).darkTheme, id: "dark", name: "Dark" } }),
|
|
148
|
+
enabled: !0
|
|
149
|
+
}), c({
|
|
150
|
+
metadata: {
|
|
151
|
+
id: "brand",
|
|
152
|
+
name: "Brand",
|
|
153
|
+
description: "Brand-specific theme with custom color palette",
|
|
154
|
+
category: "brand",
|
|
155
|
+
version: "1.0.0"
|
|
156
|
+
},
|
|
157
|
+
loader: async () => ({ default: { ...(await import("../brand-C5R2semX.js")).brandTheme, id: "brand", name: "Brand" } }),
|
|
158
|
+
enabled: !0
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
v();
|
|
162
|
+
const p = ["id", "name"];
|
|
163
|
+
function f(r) {
|
|
164
|
+
const a = [], e = [];
|
|
165
|
+
if (!r || typeof r != "object")
|
|
166
|
+
return {
|
|
167
|
+
valid: !1,
|
|
168
|
+
errors: ["Theme must be an object"],
|
|
169
|
+
warnings: []
|
|
170
|
+
};
|
|
171
|
+
const o = r;
|
|
172
|
+
for (const t of p)
|
|
173
|
+
(!(t in o) || !o[t]) && a.push(`Missing required field: ${t}`);
|
|
174
|
+
if (o.id && typeof o.id == "string" && (/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(o.id) || a.push(
|
|
175
|
+
`Invalid theme ID format: "${o.id}". Must be kebab-case (e.g., "ocean-blue")`
|
|
176
|
+
)), o.name && typeof o.name != "string" && a.push("Theme name must be a string"), o.category) {
|
|
177
|
+
const t = ["default", "brand", "seasonal", "custom"];
|
|
178
|
+
t.includes(o.category) || a.push(
|
|
179
|
+
`Invalid category: "${o.category}". Must be one of: ${t.join(", ")}`
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
const n = ["primaryColors", "accentColors", "secondaryColors"];
|
|
183
|
+
for (const t of n)
|
|
184
|
+
if (o[t]) {
|
|
185
|
+
const m = o[t], u = [
|
|
186
|
+
"50",
|
|
187
|
+
"100",
|
|
188
|
+
"200",
|
|
189
|
+
"300",
|
|
190
|
+
"400",
|
|
191
|
+
"500",
|
|
192
|
+
"600",
|
|
193
|
+
"700",
|
|
194
|
+
"800",
|
|
195
|
+
"900",
|
|
196
|
+
"950"
|
|
197
|
+
];
|
|
198
|
+
for (const d of Object.keys(m))
|
|
199
|
+
u.includes(d) || e.push(
|
|
200
|
+
`Invalid color scale key in ${t}: ${d}. Valid keys: ${u.join(", ")}`
|
|
201
|
+
), typeof m[d] != "string" && a.push(`Color value in ${t}.${d} must be a string (HSL format)`);
|
|
202
|
+
}
|
|
203
|
+
return o.version && typeof o.version == "string" && (/^\d+\.\d+\.\d+$/.test(o.version) || e.push(
|
|
204
|
+
`Invalid version format: "${o.version}". Should be semver (e.g., "1.0.0")`
|
|
205
|
+
)), {
|
|
206
|
+
valid: a.length === 0,
|
|
207
|
+
errors: a,
|
|
208
|
+
warnings: e
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
function k(r) {
|
|
212
|
+
return f(r).valid;
|
|
213
|
+
}
|
|
214
|
+
function E(r, a) {
|
|
215
|
+
return {
|
|
216
|
+
id: r,
|
|
217
|
+
name: a,
|
|
218
|
+
description: `Custom theme: ${a}`,
|
|
219
|
+
category: "custom",
|
|
220
|
+
version: "1.0.0"
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
const b = {
|
|
224
|
+
fallbackThemeId: "default",
|
|
225
|
+
validate: !0,
|
|
226
|
+
throwOnError: !1
|
|
227
|
+
};
|
|
228
|
+
async function l(r, a = {}) {
|
|
229
|
+
const e = { ...b, ...a }, o = [];
|
|
230
|
+
if (!s(r)) {
|
|
231
|
+
if (e.throwOnError)
|
|
232
|
+
throw new Error(`Theme "${r}" not found`);
|
|
233
|
+
if (e.fallbackThemeId && s(e.fallbackThemeId))
|
|
234
|
+
return o.push(`Theme "${r}" not found, using fallback "${e.fallbackThemeId}"`), l(e.fallbackThemeId, { ...e, throwOnError: !1 });
|
|
235
|
+
throw new Error(`Theme "${r}" not found and no fallback available`);
|
|
236
|
+
}
|
|
237
|
+
try {
|
|
238
|
+
const n = await g(r);
|
|
239
|
+
if (e.validate) {
|
|
240
|
+
const t = f(n);
|
|
241
|
+
if (!t.valid) {
|
|
242
|
+
if (e.throwOnError)
|
|
243
|
+
throw new Error(`Theme "${r}" validation failed: ${t.errors.join(", ")}`);
|
|
244
|
+
if (e.fallbackThemeId && s(e.fallbackThemeId))
|
|
245
|
+
return o.push(
|
|
246
|
+
`Theme "${r}" validation failed: ${t.errors.join(", ")}. Using fallback "${e.fallbackThemeId}"`
|
|
247
|
+
), l(e.fallbackThemeId, { ...e, throwOnError: !1 });
|
|
248
|
+
throw new Error(`Theme "${r}" validation failed: ${t.errors.join(", ")}`);
|
|
249
|
+
}
|
|
250
|
+
o.push(...t.warnings);
|
|
251
|
+
}
|
|
252
|
+
return {
|
|
253
|
+
theme: n,
|
|
254
|
+
usedFallback: !1,
|
|
255
|
+
warnings: o
|
|
256
|
+
};
|
|
257
|
+
} catch (n) {
|
|
258
|
+
if (e.throwOnError)
|
|
259
|
+
throw n;
|
|
260
|
+
if (e.fallbackThemeId && s(e.fallbackThemeId) && e.fallbackThemeId !== r)
|
|
261
|
+
return o.push(
|
|
262
|
+
`Failed to load theme "${r}": ${n instanceof Error ? n.message : String(n)}. Using fallback "${e.fallbackThemeId}"`
|
|
263
|
+
), l(e.fallbackThemeId, { ...e, throwOnError: !1 });
|
|
264
|
+
throw n;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
async function $(r) {
|
|
268
|
+
const a = r.map(
|
|
269
|
+
(e) => l(e, { validate: !1, throwOnError: !1 }).catch(() => {
|
|
270
|
+
})
|
|
271
|
+
);
|
|
272
|
+
await Promise.all(a);
|
|
273
|
+
}
|
|
274
|
+
function F() {
|
|
275
|
+
return h().map((r) => r.id);
|
|
276
|
+
}
|
|
277
|
+
async function I(r) {
|
|
278
|
+
if (!s(r))
|
|
279
|
+
return !1;
|
|
280
|
+
try {
|
|
281
|
+
return await l(r, { validate: !1, throwOnError: !0 }), !0;
|
|
282
|
+
} catch {
|
|
283
|
+
return !1;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
const D = {
|
|
97
287
|
none: "0",
|
|
98
288
|
xs: "0.25rem",
|
|
99
289
|
// 4px
|
|
@@ -113,7 +303,7 @@ const e = {
|
|
|
113
303
|
// 64px
|
|
114
304
|
"5xl": "5rem"
|
|
115
305
|
// 80px
|
|
116
|
-
},
|
|
306
|
+
}, S = {
|
|
117
307
|
none: "0px",
|
|
118
308
|
sm: "0.125rem",
|
|
119
309
|
// 2px
|
|
@@ -130,7 +320,7 @@ const e = {
|
|
|
130
320
|
"3xl": "1.5rem",
|
|
131
321
|
// 24px
|
|
132
322
|
full: "9999px"
|
|
133
|
-
},
|
|
323
|
+
}, U = {
|
|
134
324
|
none: "none",
|
|
135
325
|
sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
|
136
326
|
base: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
|
@@ -139,7 +329,7 @@ const e = {
|
|
|
139
329
|
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
|
|
140
330
|
"2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
|
141
331
|
inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"
|
|
142
|
-
},
|
|
332
|
+
}, j = {
|
|
143
333
|
sans: [
|
|
144
334
|
"ui-sans-serif",
|
|
145
335
|
"system-ui",
|
|
@@ -156,14 +346,7 @@ const e = {
|
|
|
156
346
|
"Segoe UI Symbol",
|
|
157
347
|
"Noto Color Emoji"
|
|
158
348
|
].join(", "),
|
|
159
|
-
serif: [
|
|
160
|
-
"ui-serif",
|
|
161
|
-
"Georgia",
|
|
162
|
-
"Cambria",
|
|
163
|
-
"Times New Roman",
|
|
164
|
-
"Times",
|
|
165
|
-
"serif"
|
|
166
|
-
].join(", "),
|
|
349
|
+
serif: ["ui-serif", "Georgia", "Cambria", "Times New Roman", "Times", "serif"].join(", "),
|
|
167
350
|
mono: [
|
|
168
351
|
"ui-monospace",
|
|
169
352
|
"SFMono-Regular",
|
|
@@ -174,7 +357,7 @@ const e = {
|
|
|
174
357
|
"Courier New",
|
|
175
358
|
"monospace"
|
|
176
359
|
].join(", ")
|
|
177
|
-
},
|
|
360
|
+
}, C = {
|
|
178
361
|
xs: "0.75rem",
|
|
179
362
|
// 12px
|
|
180
363
|
sm: "0.875rem",
|
|
@@ -195,7 +378,7 @@ const e = {
|
|
|
195
378
|
// 48px
|
|
196
379
|
"6xl": "3.75rem"
|
|
197
380
|
// 60px
|
|
198
|
-
},
|
|
381
|
+
}, O = {
|
|
199
382
|
thin: "100",
|
|
200
383
|
extralight: "200",
|
|
201
384
|
light: "300",
|
|
@@ -205,99 +388,56 @@ const e = {
|
|
|
205
388
|
bold: "700",
|
|
206
389
|
extrabold: "800",
|
|
207
390
|
black: "900"
|
|
208
|
-
},
|
|
391
|
+
}, A = {
|
|
209
392
|
none: "1",
|
|
210
393
|
tight: "1.25",
|
|
211
394
|
snug: "1.375",
|
|
212
395
|
normal: "1.5",
|
|
213
396
|
relaxed: "1.625",
|
|
214
397
|
loose: "2"
|
|
215
|
-
},
|
|
398
|
+
}, M = {
|
|
216
399
|
tighter: "-0.05em",
|
|
217
400
|
tight: "-0.025em",
|
|
218
401
|
normal: "0em",
|
|
219
402
|
wide: "0.025em",
|
|
220
403
|
wider: "0.05em",
|
|
221
404
|
widest: "0.1em"
|
|
222
|
-
}, r = {
|
|
223
|
-
instant: "0ms",
|
|
224
|
-
fast: "150ms",
|
|
225
|
-
normal: "300ms",
|
|
226
|
-
slow: "500ms",
|
|
227
|
-
slower: "700ms",
|
|
228
|
-
slowest: "1000ms"
|
|
229
|
-
}, o = {
|
|
230
|
-
linear: "linear",
|
|
231
|
-
in: "cubic-bezier(0.4, 0, 1, 1)",
|
|
232
|
-
out: "cubic-bezier(0, 0, 0.2, 1)",
|
|
233
|
-
inOut: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
234
|
-
bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)",
|
|
235
|
-
elastic: "cubic-bezier(0.175, 0.885, 0.32, 1.275)"
|
|
236
|
-
}, u = {
|
|
237
|
-
fast: `${r.fast} ${o.out}`,
|
|
238
|
-
normal: `${r.normal} ${o.inOut}`,
|
|
239
|
-
slow: `${r.slow} ${o.inOut}`,
|
|
240
|
-
bounce: `${r.normal} ${o.bounce}`,
|
|
241
|
-
elastic: `${r.slow} ${o.elastic}`
|
|
242
|
-
}, p = {
|
|
243
|
-
fadeIn: {
|
|
244
|
-
from: { opacity: 0 },
|
|
245
|
-
to: { opacity: 1 }
|
|
246
|
-
},
|
|
247
|
-
fadeOut: {
|
|
248
|
-
from: { opacity: 1 },
|
|
249
|
-
to: { opacity: 0 }
|
|
250
|
-
},
|
|
251
|
-
slideInUp: {
|
|
252
|
-
from: { transform: "translateY(100%)", opacity: 0 },
|
|
253
|
-
to: { transform: "translateY(0)", opacity: 1 }
|
|
254
|
-
},
|
|
255
|
-
slideInDown: {
|
|
256
|
-
from: { transform: "translateY(-100%)", opacity: 0 },
|
|
257
|
-
to: { transform: "translateY(0)", opacity: 1 }
|
|
258
|
-
},
|
|
259
|
-
slideInLeft: {
|
|
260
|
-
from: { transform: "translateX(-100%)", opacity: 0 },
|
|
261
|
-
to: { transform: "translateX(0)", opacity: 1 }
|
|
262
|
-
},
|
|
263
|
-
slideInRight: {
|
|
264
|
-
from: { transform: "translateX(100%)", opacity: 0 },
|
|
265
|
-
to: { transform: "translateX(0)", opacity: 1 }
|
|
266
|
-
},
|
|
267
|
-
scaleIn: {
|
|
268
|
-
from: { transform: "scale(0.95)", opacity: 0 },
|
|
269
|
-
to: { transform: "scale(1)", opacity: 1 }
|
|
270
|
-
},
|
|
271
|
-
scaleOut: {
|
|
272
|
-
from: { transform: "scale(1)", opacity: 1 },
|
|
273
|
-
to: { transform: "scale(0.95)", opacity: 0 }
|
|
274
|
-
},
|
|
275
|
-
spin: {
|
|
276
|
-
from: { transform: "rotate(0deg)" },
|
|
277
|
-
to: { transform: "rotate(360deg)" }
|
|
278
|
-
},
|
|
279
|
-
pulse: {
|
|
280
|
-
"0%, 100%": { opacity: 1 },
|
|
281
|
-
"50%": { opacity: 0.5 }
|
|
282
|
-
},
|
|
283
|
-
bounce: {
|
|
284
|
-
"0%, 100%": { transform: "translateY(-25%)", animationTimingFunction: "cubic-bezier(0.8, 0, 1, 1)" },
|
|
285
|
-
"50%": { transform: "translateY(0)", animationTimingFunction: "cubic-bezier(0, 0, 0.2, 1)" }
|
|
286
|
-
}
|
|
287
405
|
};
|
|
288
406
|
export {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
407
|
+
B as ThemeProvider,
|
|
408
|
+
N as applyDocumentMode,
|
|
409
|
+
z as applyDocumentTheme,
|
|
410
|
+
S as borderRadius,
|
|
411
|
+
I as canLoadTheme,
|
|
412
|
+
E as createMinimalThemeSchema,
|
|
413
|
+
y as cssVariableColorTokens,
|
|
414
|
+
j as fontFamilies,
|
|
415
|
+
C as fontSizes,
|
|
416
|
+
O as fontWeights,
|
|
417
|
+
h as getAllThemes,
|
|
418
|
+
F as getAvailableThemeIds,
|
|
419
|
+
P as getInitialBrand,
|
|
420
|
+
H as getInitialMode,
|
|
421
|
+
V as getInitialTheme,
|
|
422
|
+
x as getThemeMetadata,
|
|
423
|
+
w as getThemesByCategory,
|
|
424
|
+
v as initializeDefaultThemes,
|
|
425
|
+
k as isThemeSchema,
|
|
426
|
+
M as letterSpacings,
|
|
427
|
+
A as lineHeights,
|
|
428
|
+
g as loadTheme,
|
|
429
|
+
_ as loadThemeOverride,
|
|
430
|
+
l as loadThemeSafe,
|
|
431
|
+
q as persistBrand,
|
|
432
|
+
G as persistMode,
|
|
433
|
+
K as persistTheme,
|
|
434
|
+
$ as preloadThemes,
|
|
435
|
+
c as registerTheme,
|
|
436
|
+
U as shadows,
|
|
437
|
+
D as spacing,
|
|
438
|
+
T as tailwindThemeColors,
|
|
439
|
+
s as themeExists,
|
|
440
|
+
i as themeRegistry,
|
|
441
|
+
Q as useTheme,
|
|
442
|
+
f as validateThemeSchema
|
|
303
443
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ThemeSchema } from './schema';
|
|
2
|
+
/**
|
|
3
|
+
* Theme loader options
|
|
4
|
+
*/
|
|
5
|
+
export interface ThemeLoaderOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Fallback theme ID if loading fails
|
|
8
|
+
*/
|
|
9
|
+
fallbackThemeId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to validate theme schema
|
|
12
|
+
*/
|
|
13
|
+
validate?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Whether to throw errors or return fallback
|
|
16
|
+
*/
|
|
17
|
+
throwOnError?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Theme loader result
|
|
21
|
+
*/
|
|
22
|
+
export interface ThemeLoaderResult {
|
|
23
|
+
/**
|
|
24
|
+
* Loaded theme
|
|
25
|
+
*/
|
|
26
|
+
theme: ThemeSchema;
|
|
27
|
+
/**
|
|
28
|
+
* Whether fallback was used
|
|
29
|
+
*/
|
|
30
|
+
usedFallback: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Validation warnings (if validation enabled)
|
|
33
|
+
*/
|
|
34
|
+
warnings: string[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Load theme with error handling
|
|
38
|
+
*
|
|
39
|
+
* @param themeId - Theme ID to load
|
|
40
|
+
* @param options - Loader options
|
|
41
|
+
* @returns Theme loader result
|
|
42
|
+
*/
|
|
43
|
+
export declare function loadThemeSafe(themeId: string, options?: ThemeLoaderOptions): Promise<ThemeLoaderResult>;
|
|
44
|
+
/**
|
|
45
|
+
* Preload multiple themes
|
|
46
|
+
* Useful for prefetching themes that might be needed
|
|
47
|
+
*
|
|
48
|
+
* @param themeIds - Array of theme IDs to preload
|
|
49
|
+
*/
|
|
50
|
+
export declare function preloadThemes(themeIds: string[]): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Get all available theme IDs
|
|
53
|
+
*
|
|
54
|
+
* @returns Array of theme IDs
|
|
55
|
+
*/
|
|
56
|
+
export declare function getAvailableThemeIds(): string[];
|
|
57
|
+
/**
|
|
58
|
+
* Check if theme can be loaded
|
|
59
|
+
*
|
|
60
|
+
* @param themeId - Theme ID to check
|
|
61
|
+
* @returns Whether theme can be loaded
|
|
62
|
+
*/
|
|
63
|
+
export declare function canLoadTheme(themeId: string): Promise<boolean>;
|
|
64
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/theme/loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,UAAU,CAAC;AAEjE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,WAAW,CAAC;IAEnB;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAWD;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,iBAAiB,CAAC,CAsE5B;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAQrE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAWpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/theme/motion.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;CAOnB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/theme/motion.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;CAOnB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;CAMvB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDtB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ThemeMetadata, ThemeSchema } from './schema';
|
|
2
|
+
/**
|
|
3
|
+
* Theme registry entry
|
|
4
|
+
*/
|
|
5
|
+
export interface ThemeRegistryEntry {
|
|
6
|
+
/**
|
|
7
|
+
* Theme metadata
|
|
8
|
+
*/
|
|
9
|
+
metadata: ThemeMetadata;
|
|
10
|
+
/**
|
|
11
|
+
* Dynamic import function for theme
|
|
12
|
+
*/
|
|
13
|
+
loader: () => Promise<{
|
|
14
|
+
default: ThemeSchema;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Whether theme is enabled
|
|
18
|
+
*/
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Theme registry
|
|
23
|
+
* Maps theme IDs to their registry entries
|
|
24
|
+
*/
|
|
25
|
+
export declare const themeRegistry: Map<string, ThemeRegistryEntry>;
|
|
26
|
+
/**
|
|
27
|
+
* Register a theme in the registry
|
|
28
|
+
*
|
|
29
|
+
* @param entry - Theme registry entry
|
|
30
|
+
*/
|
|
31
|
+
export declare function registerTheme(entry: ThemeRegistryEntry): void;
|
|
32
|
+
/**
|
|
33
|
+
* Get theme metadata by ID
|
|
34
|
+
*
|
|
35
|
+
* @param id - Theme ID
|
|
36
|
+
* @returns Theme metadata or undefined
|
|
37
|
+
*/
|
|
38
|
+
export declare function getThemeMetadata(id: string): ThemeMetadata | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Get all registered themes
|
|
41
|
+
*
|
|
42
|
+
* @returns Array of theme metadata
|
|
43
|
+
*/
|
|
44
|
+
export declare function getAllThemes(): ThemeMetadata[];
|
|
45
|
+
/**
|
|
46
|
+
* Get themes by category
|
|
47
|
+
*
|
|
48
|
+
* @param category - Theme category
|
|
49
|
+
* @returns Array of theme metadata
|
|
50
|
+
*/
|
|
51
|
+
export declare function getThemesByCategory(category: "default" | "brand" | "seasonal" | "custom"): ThemeMetadata[];
|
|
52
|
+
/**
|
|
53
|
+
* Check if theme exists
|
|
54
|
+
*
|
|
55
|
+
* @param id - Theme ID
|
|
56
|
+
* @returns Whether theme exists
|
|
57
|
+
*/
|
|
58
|
+
export declare function themeExists(id: string): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Load theme by ID
|
|
61
|
+
*
|
|
62
|
+
* @param id - Theme ID
|
|
63
|
+
* @returns Theme schema
|
|
64
|
+
*/
|
|
65
|
+
export declare function loadTheme(id: string): Promise<ThemeSchema>;
|
|
66
|
+
/**
|
|
67
|
+
* Initialize default themes
|
|
68
|
+
* Registers built-in themes (default, dark, brand)
|
|
69
|
+
*/
|
|
70
|
+
export declare function initializeDefaultThemes(): void;
|
|
71
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/theme/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC;IAExB;;OAEG;IACH,MAAM,EAAE,MAAM,OAAO,CAAC;QAAE,OAAO,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;IAEhD;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAa,CAAC;AAExE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,CAE7D;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAEtE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,aAAa,EAAE,CAI9C;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GACpD,aAAa,EAAE,CAEjB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAkBhE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAgD9C"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { BaseColorTokens, ColorScale, SemanticColors, SurfaceColors, TextColors } from '../tokens/colors';
|
|
2
|
+
/**
|
|
3
|
+
* Theme metadata
|
|
4
|
+
*/
|
|
5
|
+
export interface ThemeMetadata {
|
|
6
|
+
/**
|
|
7
|
+
* Unique theme identifier (kebab-case)
|
|
8
|
+
* Example: "ocean-blue", "sunset-orange"
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* Human-readable theme name
|
|
13
|
+
* Example: "Ocean Blue", "Sunset Orange"
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* Theme description
|
|
18
|
+
*/
|
|
19
|
+
description?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Theme category
|
|
22
|
+
* - "default": Standard themes
|
|
23
|
+
* - "brand": Brand-specific themes
|
|
24
|
+
* - "seasonal": Seasonal/holiday themes
|
|
25
|
+
* - "custom": User-created themes
|
|
26
|
+
*/
|
|
27
|
+
category?: "default" | "brand" | "seasonal" | "custom";
|
|
28
|
+
/**
|
|
29
|
+
* Theme author (optional)
|
|
30
|
+
*/
|
|
31
|
+
author?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Theme version (semver)
|
|
34
|
+
*/
|
|
35
|
+
version?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Preview image URL (optional)
|
|
38
|
+
*/
|
|
39
|
+
previewImage?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Complete theme schema
|
|
43
|
+
* Extends ThemeOverride with metadata and validation
|
|
44
|
+
*/
|
|
45
|
+
export interface ThemeSchema extends ThemeMetadata {
|
|
46
|
+
/**
|
|
47
|
+
* Override primary color scale
|
|
48
|
+
* Partial override - only specified values override base tokens
|
|
49
|
+
*/
|
|
50
|
+
primaryColors?: Partial<ColorScale>;
|
|
51
|
+
/**
|
|
52
|
+
* Override accent color scale
|
|
53
|
+
*/
|
|
54
|
+
accentColors?: Partial<ColorScale>;
|
|
55
|
+
/**
|
|
56
|
+
* Override secondary color scale
|
|
57
|
+
*/
|
|
58
|
+
secondaryColors?: Partial<ColorScale>;
|
|
59
|
+
/**
|
|
60
|
+
* Override base colors (for day mode)
|
|
61
|
+
*/
|
|
62
|
+
baseColorsDay?: Partial<BaseColorTokens>;
|
|
63
|
+
/**
|
|
64
|
+
* Override base colors (for night mode)
|
|
65
|
+
*/
|
|
66
|
+
baseColorsNight?: Partial<BaseColorTokens>;
|
|
67
|
+
/**
|
|
68
|
+
* Override surface colors (for day mode)
|
|
69
|
+
*/
|
|
70
|
+
surfaceColorsDay?: Partial<SurfaceColors>;
|
|
71
|
+
/**
|
|
72
|
+
* Override surface colors (for night mode)
|
|
73
|
+
*/
|
|
74
|
+
surfaceColorsNight?: Partial<SurfaceColors>;
|
|
75
|
+
/**
|
|
76
|
+
* Override semantic colors (for day mode)
|
|
77
|
+
*/
|
|
78
|
+
semanticColorsDay?: Partial<SemanticColors>;
|
|
79
|
+
/**
|
|
80
|
+
* Override semantic colors (for night mode)
|
|
81
|
+
*/
|
|
82
|
+
semanticColorsNight?: Partial<SemanticColors>;
|
|
83
|
+
/**
|
|
84
|
+
* Override text colors (for day mode)
|
|
85
|
+
*/
|
|
86
|
+
textColorsDay?: Partial<TextColors>;
|
|
87
|
+
/**
|
|
88
|
+
* Override text colors (for night mode)
|
|
89
|
+
*/
|
|
90
|
+
textColorsNight?: Partial<TextColors>;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Theme validation result
|
|
94
|
+
*/
|
|
95
|
+
export interface ThemeValidationResult {
|
|
96
|
+
/**
|
|
97
|
+
* Whether theme is valid
|
|
98
|
+
*/
|
|
99
|
+
valid: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Validation errors
|
|
102
|
+
*/
|
|
103
|
+
errors: string[];
|
|
104
|
+
/**
|
|
105
|
+
* Validation warnings
|
|
106
|
+
*/
|
|
107
|
+
warnings: string[];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Validate theme schema
|
|
111
|
+
*
|
|
112
|
+
* @param theme - Theme to validate
|
|
113
|
+
* @returns Validation result
|
|
114
|
+
*/
|
|
115
|
+
export declare function validateThemeSchema(theme: unknown): ThemeValidationResult;
|
|
116
|
+
/**
|
|
117
|
+
* Type guard to check if object is ThemeSchema
|
|
118
|
+
*/
|
|
119
|
+
export declare function isThemeSchema(obj: unknown): obj is ThemeSchema;
|
|
120
|
+
/**
|
|
121
|
+
* Create a minimal valid theme schema
|
|
122
|
+
* Useful for CLI scaffolding
|
|
123
|
+
*/
|
|
124
|
+
export declare function createMinimalThemeSchema(id: string, name: string): ThemeSchema;
|
|
125
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/theme/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,cAAc,EACd,aAAa,EACb,UAAU,EACX,MAAM,iBAAiB,CAAC;AAEzB;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;IAEvD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAEpC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAEnC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAEtC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAEzC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAE3C;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAE1C;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAE5C;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAE5C;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IAE9C;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IAEpC;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAOD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,qBAAqB,CA6FzE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,WAAW,CAG9D;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAQ9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/theme/typography.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,YAAY;;;;
|
|
1
|
+
{"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../src/theme/typography.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CA4BxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,SAWvB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;CAUvB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;CAO1B,CAAC"}
|