@tenerife.music/ui 4.0.0 → 5.0.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/preset.d.cts DELETED
@@ -1,21 +0,0 @@
1
- import { Config } from 'tailwindcss';
2
-
3
- /**
4
- * Tailwind CSS preset for Tenerife.Music UI
5
- *
6
- * This preset can be imported and used in your application's tailwind.config.ts:
7
- *
8
- * @example
9
- * import type { Config } from "tailwindcss";
10
- * import preset from "@tenerife.music/ui/preset";
11
- *
12
- * const config: Config = {
13
- * content: ["./src/**\/*.{js,ts,jsx,tsx}"],
14
- * presets: [preset],
15
- * };
16
- *
17
- * export default config;
18
- */
19
- declare const preset: Partial<Config>;
20
-
21
- export { preset as default };
@@ -1,32 +0,0 @@
1
- type AriaDataAttributes = {
2
- [K in `aria-${string}`]?: string | number | boolean | undefined;
3
- } & {
4
- [K in `data-${string}`]?: string | number | boolean | undefined;
5
- };
6
- type ForbiddenNative = {
7
- className?: never;
8
- style?: never;
9
- };
10
- /**
11
- * SafeNativeProps — strict structural DOM gate for AI-native COMPOSITION.
12
- *
13
- * Allowed keys:
14
- * - id
15
- * - role
16
- * - tabIndex
17
- * - aria-*
18
- * - data-*
19
- *
20
- * Forbidden:
21
- * - className
22
- * - style
23
- * - any event handlers
24
- * - any non-structural DOM attributes
25
- */
26
- type SafeNativeProps = {
27
- id?: string;
28
- role?: string;
29
- tabIndex?: number;
30
- } & AriaDataAttributes & ForbiddenNative;
31
-
32
- export type { SafeNativeProps as S };
@@ -1,32 +0,0 @@
1
- type AriaDataAttributes = {
2
- [K in `aria-${string}`]?: string | number | boolean | undefined;
3
- } & {
4
- [K in `data-${string}`]?: string | number | boolean | undefined;
5
- };
6
- type ForbiddenNative = {
7
- className?: never;
8
- style?: never;
9
- };
10
- /**
11
- * SafeNativeProps — strict structural DOM gate for AI-native COMPOSITION.
12
- *
13
- * Allowed keys:
14
- * - id
15
- * - role
16
- * - tabIndex
17
- * - aria-*
18
- * - data-*
19
- *
20
- * Forbidden:
21
- * - className
22
- * - style
23
- * - any event handlers
24
- * - any non-structural DOM attributes
25
- */
26
- type SafeNativeProps = {
27
- id?: string;
28
- role?: string;
29
- tabIndex?: number;
30
- } & AriaDataAttributes & ForbiddenNative;
31
-
32
- export type { SafeNativeProps as S };
package/dist/styles.cjs DELETED
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-
package/dist/styles.d.cts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }
package/dist/styles.d.ts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }
package/dist/styles.mjs DELETED
@@ -1 +0,0 @@
1
-
@@ -1,368 +0,0 @@
1
- import { M as Mode, C as ColorScale, B as BaseColorTokens, S as SurfaceColors, a as SemanticColors, T as TextColors } from '../colors-BRUYtnG-.cjs';
2
- export { b as ChartColors, c as ColorTokens, d as cssVariableColorTokens, t as tailwindThemeColors } from '../colors-BRUYtnG-.cjs';
3
- import { c as semanticSpacing, d as fontSize } from '../typography-BsoBDDcG.cjs';
4
- export { b as borderRadius, j as fontFamilies, h as fontWeights, k as letterSpacings, i as lineHeights, e as shadows } from '../typography-BsoBDDcG.cjs';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
- import React__default from 'react';
7
- import { T as ThemeName } from '../types-CeNHa-BU.cjs';
8
-
9
- /**
10
- * Get initial mode from various sources
11
- * Checks in order: DOM attribute, localStorage, system preference, default
12
- */
13
- declare function getInitialMode(defaultMode?: Mode, storageKey?: string, enableSystem?: boolean): Mode;
14
- /**
15
- * Get initial theme from various sources
16
- */
17
- declare function getInitialTheme(defaultTheme?: "default" | "dark" | "brand", storageKey?: string): "default" | "dark" | "brand";
18
- /**
19
- * Persist mode to localStorage
20
- */
21
- declare function persistMode(mode: Mode, storageKey?: string): void;
22
- /**
23
- * Persist theme to localStorage
24
- */
25
- declare function persistTheme(theme: "default" | "dark" | "brand", storageKey?: string): void;
26
- /**
27
- * Get initial brand from various sources
28
- */
29
- declare function getInitialBrand(defaultBrand?: string | null, storageKey?: string): string | null;
30
- /**
31
- * Persist brand to localStorage
32
- */
33
- declare function persistBrand(brandId: string | null, storageKey?: string): void;
34
-
35
- /**
36
- * Theme Schema
37
- *
38
- * Strict TypeScript schema for theme objects with validation.
39
- * Ensures all themes conform to the token system and are type-safe.
40
- */
41
-
42
- /**
43
- * Theme metadata
44
- */
45
- interface ThemeMetadata {
46
- /**
47
- * Unique theme identifier (kebab-case)
48
- * Example: "ocean-blue", "sunset-orange"
49
- */
50
- id: string;
51
- /**
52
- * Human-readable theme name
53
- * Example: "Ocean Blue", "Sunset Orange"
54
- */
55
- name: string;
56
- /**
57
- * Theme description
58
- */
59
- description?: string;
60
- /**
61
- * Theme category
62
- * - "default": Standard themes
63
- * - "brand": Brand-specific themes
64
- * - "seasonal": Seasonal/holiday themes
65
- * - "custom": User-created themes
66
- */
67
- category?: "default" | "brand" | "seasonal" | "custom";
68
- /**
69
- * Theme author (optional)
70
- */
71
- author?: string;
72
- /**
73
- * Theme version (semver)
74
- */
75
- version?: string;
76
- /**
77
- * Preview image URL (optional)
78
- */
79
- previewImage?: string;
80
- }
81
- /**
82
- * Complete theme schema
83
- * Extends ThemeOverride with metadata and validation
84
- */
85
- interface ThemeSchema extends ThemeMetadata {
86
- /**
87
- * Override primary color scale
88
- * Partial override - only specified values override base tokens
89
- */
90
- primaryColors?: Partial<ColorScale>;
91
- /**
92
- * Override accent color scale
93
- */
94
- accentColors?: Partial<ColorScale>;
95
- /**
96
- * Override secondary color scale
97
- */
98
- secondaryColors?: Partial<ColorScale>;
99
- /**
100
- * Override base colors (for day mode)
101
- */
102
- baseColorsDay?: Partial<BaseColorTokens>;
103
- /**
104
- * Override base colors (for night mode)
105
- */
106
- baseColorsNight?: Partial<BaseColorTokens>;
107
- /**
108
- * Override surface colors (for day mode)
109
- */
110
- surfaceColorsDay?: Partial<SurfaceColors>;
111
- /**
112
- * Override surface colors (for night mode)
113
- */
114
- surfaceColorsNight?: Partial<SurfaceColors>;
115
- /**
116
- * Override semantic colors (for day mode)
117
- */
118
- semanticColorsDay?: Partial<SemanticColors>;
119
- /**
120
- * Override semantic colors (for night mode)
121
- */
122
- semanticColorsNight?: Partial<SemanticColors>;
123
- /**
124
- * Override text colors (for day mode)
125
- */
126
- textColorsDay?: Partial<TextColors>;
127
- /**
128
- * Override text colors (for night mode)
129
- */
130
- textColorsNight?: Partial<TextColors>;
131
- }
132
- /**
133
- * Theme validation result
134
- */
135
- interface ThemeValidationResult {
136
- /**
137
- * Whether theme is valid
138
- */
139
- valid: boolean;
140
- /**
141
- * Validation errors
142
- */
143
- errors: string[];
144
- /**
145
- * Validation warnings
146
- */
147
- warnings: string[];
148
- }
149
- /**
150
- * Validate theme schema
151
- *
152
- * @param theme - Theme to validate
153
- * @returns Validation result
154
- */
155
- declare function validateThemeSchema(theme: unknown): ThemeValidationResult;
156
- /**
157
- * Type guard to check if object is ThemeSchema
158
- */
159
- declare function isThemeSchema(obj: unknown): obj is ThemeSchema;
160
- /**
161
- * Create a minimal valid theme schema
162
- * Useful for CLI scaffolding
163
- */
164
- declare function createMinimalThemeSchema(id: string, name: string): ThemeSchema;
165
-
166
- /**
167
- * Theme Loader
168
- *
169
- * Loads themes from registry with error handling and fallback logic.
170
- * Provides async loading support for dynamic themes.
171
- */
172
-
173
- /**
174
- * Theme loader options
175
- */
176
- interface ThemeLoaderOptions {
177
- /**
178
- * Fallback theme ID if loading fails
179
- */
180
- fallbackThemeId?: string;
181
- /**
182
- * Whether to validate theme schema
183
- */
184
- validate?: boolean;
185
- /**
186
- * Whether to throw errors or return fallback
187
- */
188
- throwOnError?: boolean;
189
- }
190
- /**
191
- * Theme loader result
192
- */
193
- interface ThemeLoaderResult {
194
- /**
195
- * Loaded theme
196
- */
197
- theme: ThemeSchema;
198
- /**
199
- * Whether fallback was used
200
- */
201
- usedFallback: boolean;
202
- /**
203
- * Validation warnings (if validation enabled)
204
- */
205
- warnings: string[];
206
- }
207
- /**
208
- * Load theme with error handling
209
- *
210
- * @param themeId - Theme ID to load
211
- * @param options - Loader options
212
- * @returns Theme loader result
213
- */
214
- declare function loadThemeSafe(themeId: string, options?: ThemeLoaderOptions): Promise<ThemeLoaderResult>;
215
- /**
216
- * Preload multiple themes
217
- * Useful for prefetching themes that might be needed
218
- *
219
- * @param themeIds - Array of theme IDs to preload
220
- */
221
- declare function preloadThemes(themeIds: string[]): Promise<void>;
222
- /**
223
- * Get all available theme IDs
224
- *
225
- * @returns Array of theme IDs
226
- */
227
- declare function getAvailableThemeIds(): string[];
228
- /**
229
- * Check if theme can be loaded
230
- *
231
- * @param themeId - Theme ID to check
232
- * @returns Whether theme can be loaded
233
- */
234
- declare function canLoadTheme(themeId: string): Promise<boolean>;
235
-
236
- /**
237
- * Theme Registry
238
- *
239
- * Central registry for all available themes.
240
- * Provides metadata, dynamic imports, and theme discovery.
241
- */
242
-
243
- /**
244
- * Theme registry entry
245
- */
246
- interface ThemeRegistryEntry {
247
- /**
248
- * Theme metadata
249
- */
250
- metadata: ThemeMetadata;
251
- /**
252
- * Dynamic import function for theme
253
- */
254
- loader: () => Promise<{
255
- default: ThemeSchema;
256
- }>;
257
- /**
258
- * Whether theme is enabled
259
- */
260
- enabled?: boolean;
261
- }
262
- /**
263
- * Theme registry
264
- * Maps theme IDs to their registry entries
265
- */
266
- declare const themeRegistry: Map<string, ThemeRegistryEntry>;
267
- /**
268
- * Register a theme in the registry
269
- *
270
- * @param entry - Theme registry entry
271
- */
272
- declare function registerTheme(entry: ThemeRegistryEntry): void;
273
- /**
274
- * Get theme metadata by ID
275
- *
276
- * @param id - Theme ID
277
- * @returns Theme metadata or undefined
278
- */
279
- declare function getThemeMetadata(id: string): ThemeMetadata | undefined;
280
- /**
281
- * Get all registered themes
282
- *
283
- * @returns Array of theme metadata
284
- */
285
- declare function getAllThemes(): ThemeMetadata[];
286
- /**
287
- * Get themes by category
288
- *
289
- * @param category - Theme category
290
- * @returns Array of theme metadata
291
- */
292
- declare function getThemesByCategory(category: "default" | "brand" | "seasonal" | "custom"): ThemeMetadata[];
293
- /**
294
- * Check if theme exists
295
- *
296
- * @param id - Theme ID
297
- * @returns Whether theme exists
298
- */
299
- declare function themeExists(id: string): boolean;
300
- /**
301
- * Load theme by ID
302
- *
303
- * @param id - Theme ID
304
- * @returns Theme schema
305
- */
306
- declare function loadTheme(id: string): Promise<ThemeSchema>;
307
- /**
308
- * Initialize default themes
309
- * Registers built-in themes (default, dark, brand)
310
- */
311
- declare function initializeDefaultThemes(): void;
312
-
313
- type SpacingScale = typeof semanticSpacing;
314
-
315
- /**
316
- * Theme Context
317
- */
318
- interface ThemeContextValue {
319
- mode: Mode;
320
- theme: ThemeName;
321
- brand: string | null;
322
- reduceMotion: boolean;
323
- enableAnimations: boolean;
324
- setMode: (mode: Mode) => void;
325
- setTheme: (theme: ThemeName) => Promise<void>;
326
- setBrand: (brandId: string | null) => Promise<void>;
327
- toggleMode: () => void;
328
- setReduceMotion: (reduce: boolean) => void;
329
- setEnableAnimations: (enable: boolean) => void;
330
- }
331
- /**
332
- * Theme Provider Props
333
- */
334
- interface ThemeProviderProps {
335
- children: React__default.ReactNode;
336
- defaultMode?: Mode;
337
- defaultTheme?: ThemeName;
338
- defaultBrand?: string | null;
339
- storageKey?: string;
340
- themeStorageKey?: string;
341
- brandStorageKey?: string;
342
- attribute?: string;
343
- enableSystem?: boolean;
344
- /**
345
- * Override reduced motion preference
346
- */
347
- reduceMotion?: boolean;
348
- /**
349
- * Global animation toggle
350
- */
351
- enableAnimations?: boolean;
352
- }
353
- declare function ThemeProvider({ children, defaultMode, defaultTheme, defaultBrand, storageKey, themeStorageKey, brandStorageKey, attribute, enableSystem, reduceMotion: reduceMotionOverride, enableAnimations: enableAnimationsOverride, }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
354
- /**
355
- * useTheme Hook
356
- *
357
- * Provides access to theme context and theme control functions.
358
- *
359
- * @example
360
- * ```tsx
361
- * const { mode, theme, brand, setMode, setTheme, setBrand, toggleMode } = useTheme();
362
- * ```
363
- */
364
- declare function useTheme(): ThemeContextValue;
365
-
366
- type FontScale = typeof fontSize;
367
-
368
- export { type FontScale, Mode, type SpacingScale, type ThemeLoaderOptions, type ThemeLoaderResult, type ThemeMetadata, ThemeProvider, type ThemeProviderProps, type ThemeRegistryEntry, type ThemeSchema, type ThemeValidationResult, canLoadTheme, createMinimalThemeSchema, fontSize as fontSizes, getAllThemes, getAvailableThemeIds, getInitialBrand, getInitialMode, getInitialTheme, getThemeMetadata, getThemesByCategory, initializeDefaultThemes, isThemeSchema, loadTheme, loadThemeSafe, persistBrand, persistMode, persistTheme, preloadThemes, registerTheme, semanticSpacing as spacing, themeExists, themeRegistry, useTheme, validateThemeSchema };
@@ -1,4 +0,0 @@
1
- export { B as BaseColorTokens, b as ChartColors, C as ColorScale, c as ColorTokens, M as Mode, a as SemanticColors, S as SurfaceColors, T as TextColors, e as accentColors, f as baseColors, g as chartColors, h as colorCSSVariables, d as cssVariableColorTokens, p as primaryColors, s as secondaryColors, i as semanticColors, j as surfaceColors, t as tailwindThemeColors, k as textColors } from '../colors-BRUYtnG-.cjs';
2
- export { A as ALERT_TOKENS, b1 as ARTIST_TOKENS, b7 as ArtistCardFooterBorder, b8 as ArtistCardImageContainer, b9 as ArtistCardImagePlaceholder, ba as ArtistCardImageSizing, B as BUTTON_TOKENS, aU as BorderWidthToken, aV as BorderWidthValue, b as ButtonFontSize, c as ButtonHeight, d as ButtonPaddingHorizontal, e as ButtonPaddingVertical, f as ButtonShadow, C as CARD_TOKENS, l as CHECKBOX_TOKENS, g as CardPadding, h as CardRadius, i as CardShadow, j as CardSize, k as CardSpacingVertical, m as CheckboxSize, n as CheckboxState, o as CheckboxVariant, bk as ComponentMotionDuration, bl as ComponentMotionEasing, bm as ComponentMotionTransition, b2 as DATA_LIST_TOKENS, D as DATA_TOKENS, b3 as DOMAIN_TOKENS, p as DataListLabelWidth, q as DataListRowPadding, bb as DomainCardBadge, bc as DomainCardImage, bd as DomainCardLayout, be as DomainCardMetadata, bf as DomainCardMotion, bg as DomainCardPriceCapacity, bh as DomainCardSkeleton, bi as DomainCardSkeletonContentWidth, bj as DomainCardSurface, E as EmptyStateIconSize, aO as ICON_TOKENS, r as INPUT_TOKENS, I as IconColor, aP as IconSize, a as IconStroke, s as InputFontSize, t as InputHeight, u as InputPaddingHorizontal, v as InputPaddingVertical, w as InputRadius, x as InputSize, M as MENU_TOKENS, S as MOTION_TOKENS, y as MenuContentMinWidth, z as MenuContentPadding, F as MenuContentRadius, G as MenuContentShadow, H as MenuIndicatorOffset, J as MenuIndicatorSize, K as MenuItemGap, L as MenuItemHeight, N as MenuItemPadding, O as MenuItemRadius, Q as MenuLabelPadding, R as MenuSeparatorMargin, T as MotionAnimation, U as MotionTransitionPreset, V as NAVIGATION_TOKENS, a0 as NOTIFICATION_TOKENS, W as NavigationItemPadding, X as NavigationListGap, Y as NavigationRadius, Z as NavigationShadow, _ as NavigationSize, $ as NavigationState, a1 as NotificationPanelWidth, a2 as NotificationVariant, a3 as OVERLAY_TOKENS, a4 as OverlayBackdropVariant, a5 as OverlayModalSize, a6 as PANEL_TOKENS, aa as POPOVER_TOKENS, a7 as PanelPadding, a8 as PanelRadius, a9 as PanelShadow, P as PanelTone, ab as PopoverArrowOffset, ac as PopoverArrowSize, ad as PopoverContentPadding, ae as PopoverContentRadius, af as PopoverContentShadow, ag as PopoverContentWidth, ah as RADIO_TOKENS, ai as RadioSize, aj as RadioState, ak as RadioVariant, al as SECTION_TOKENS, b5 as SIMPLETABLE_TOKENS, aq as SURFACE_TOKENS, av as SWITCH_TOKENS, am as SectionGap, an as SectionPadding, ao as SkeletonAnimation, ap as SkeletonBackground, bn as SkeletonVariant, ar as SurfacePadding, as as SurfaceRadius, at as SurfaceShadow, au as SurfaceVariant, aw as SwitchSize, ax as SwitchState, ay as SwitchVariant, aE as TEXT_TOKENS, aJ as TOAST_TOKENS, aL as TOOLTIP_TOKENS, az as TableCellPadding, aA as TableGap, aB as TableHeaderPadding, aC as TableRowHeight, aD as TableShadow, aF as TextFontSize, aG as TextFontWeight, aH as TextLetterSpacing, aI as TextLineHeight, aK as ToastVariant, aM as TooltipContentRadius, aN as TooltipContentShadow, b0 as UI_COLORS, aY as ZIndexLayer, aZ as ZIndexValue, aQ as allCSSVariables, aR as allCSSVariablesCSS, aW as borderWidth, aX as borderWidthCSSVariables, aS as generateCSSVariablesCSS, aT as tokenSystemSummary, a_ as zIndex, a$ as zIndexCSSVariables } from '../index-B9bPI2VR.cjs';
3
- export { ab as AlignOffsetToken, ac as AnimationPresetToken, ad as AspectRatioToken, f as ColorToken, C as ContainerMaxWidthToken, ae as ContainerPaddingToken, af as DelayToken, ag as FlexBasisToken, ah as LayoutSpaceToken, M as ModalFooterAlignToken, ai as ModalHeightToken, aj as ModalSizeToken, ak as ModalWidthToken, D as MotionCombinedType, y as MotionDuration, u as MotionDurationToken, z as MotionEasing, al as MotionEasingToken, E as MotionSlideDirection, am as MotionToken, A as MotionTransition, an as MotionTransitionToken, a as RadiusToken, j as ResponsiveAlignOffset, ao as ResponsiveAnimationPreset, U as ResponsiveAspectRatio, c as ResponsiveColor, o as ResponsiveContainerMaxWidth, ap as ResponsiveContainerPadding, t as ResponsiveDelay, p as ResponsiveFlexBasis, m as ResponsiveModalHeight, k as ResponsiveModalSize, l as ResponsiveModalWidth, aq as ResponsiveMotion, d as ResponsiveRadius, ar as ResponsiveSelectSize, as as ResponsiveSelectWidth, at as ResponsiveShadow, i as ResponsiveSideOffset, e as ResponsiveSpace, au as ResponsiveSurface, av as ResponsiveTextLineHeight, aw as ResponsiveTextSize, ax as ResponsiveTextWeight, W as SELECT_TOKENS, X as SelectContentPadding, Y as SelectContentRadius, Z as SelectItemFontSize, _ as SelectItemPaddingHorizontal, $ as SelectItemPaddingVertical, a0 as SelectItemRadius, a1 as SelectLabelFontSize, a2 as SelectLabelPaddingHorizontal, a3 as SelectLabelPaddingVertical, a4 as SelectSeparatorMarginHorizontal, a5 as SelectSeparatorMarginVertical, ay as SelectSizeToken, az as SelectStateToken, a6 as SelectTriggerFontSize, a7 as SelectTriggerHeight, a8 as SelectTriggerPaddingHorizontal, a9 as SelectTriggerPaddingVertical, aa as SelectTriggerRadius, aA as SelectVariantToken, aB as SelectWidthToken, S as ShadowToken, aC as SideOffsetToken, aD as SpaceToken, b as SpacingToken, n as SurfaceToken, aE as TextLetterSpacingToken, h as TextLineHeightToken, T as TextSizeToken, g as TextWeightToken, G as motionCSSVariables, F as motionCombined, H as motionDurations, I as motionEasings, J as motionFade, K as motionReducedMotion, L as motionScale, N as motionSlide, O as motionTailwindConfig, P as motionTransitionProperty, Q as motionTransitions } from '../index-4rLh47Jk.cjs';
4
- export { B as BorderRadius, L as CanonicalFontSize, M as CanonicalFontWeight, N as CanonicalLetterSpacing, O as CanonicalLineHeight, P as CanonicalTextColor, n as ColoredShadow, C as ComponentRadius, x as ComponentSpacing, y as ContainerSpacing, E as ElevationShadow, F as FocusRing, Q as FontFamily, R as FontSize, U as FontWeight, G as GlowEffect, z as GridSpacing, V as LetterSpacing, W as LineHeight, S as SectionSpacing, D as SemanticSpacing, H as Spacing, I as StackSpacing, X as TextStyle, a as accentColoredShadows, b as borderRadius, m as componentRadius, o as componentShadowMapping, e as elevationShadows, f as focusRings, j as fontFamily, d as fontSize, Y as fontSizeWithMd, h as fontWeight, g as glowEffects, l as layoutSpacing, k as letterSpacing, i as lineHeight, p as primaryColoredShadows, r as radiusCSSVariables, c as semanticSpacing, q as shadowBase, u as shadowCSSVariables, v as shadowOpacity, s as spacing, J as spacingCSSVariables, t as tailwindRadiusConfig, w as tailwindShadowConfig, K as tailwindSpacingConfig, Z as tailwindTypographyConfig, _ as textStyles, $ as typographyCSSVariables } from '../typography-BsoBDDcG.cjs';