@acronis-platform/shadcn-uikit 0.6.0 → 0.7.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.
@@ -0,0 +1 @@
1
+ :root{--color-brand-primary: 213 65% 46%;--color-brand-secondary: 211 100% 45%;--color-brand-lightest: 213 65% 97%;--color-brand-light: 213 65% 96%;--color-text-inverse: 0 0% 100%;--color-text-primary: 215 26% 20%;--color-text-secondary: 215 26% 46%;--color-text-tertiary: 215 14% 39%;--color-surface-primary: 0 0% 100%;--color-surface-secondary: 210 100% 15%;--color-surface-overlay: 215 26% 20%;--color-surface-elevated: 0 0% 100%;--color-status-success: 73 68% 45%;--color-status-success-light: 84 67% 93%;--color-status-success-dark: 84 98% 21%;--color-status-info: 211 82% 60%;--color-status-info-light: 214 78% 95%;--color-status-info-dark: 214 68% 38%;--color-status-warning: 45 100% 52%;--color-status-warning-light: 45 100% 95%;--color-status-warning-dark: 30 50% 37%;--color-status-danger: 0 77% 57%;--color-status-danger-light: 0 100% 96%;--color-status-danger-dark: 0 72% 45%;--color-status-critical: 25 100% 52%;--color-status-critical-light: 27 95% 92%;--color-status-critical-dark: 11 73% 41%;--color-neutral: 220 11% 62%;--color-neutral-light: 220 11% 92%;--color-neutral-dark: 215 14% 39%;--color-ai: 263deg 77% 57%;--color-ai-light: 273deg 85% 97%;--color-ai-dark: 263deg 77% 57%;--opacity-10: .1;--opacity-20: .2;--opacity-30: .3;--opacity-40: .4;--opacity-50: .5;--opacity-70: .7;--opacity-90: .9}.theme-cyber-chat{--color-brand-primary: 210 100% 50%;--color-brand-secondary: 210 100% 15%;--color-brand-tertiary: 210 100% 65%;--color-surface-primary: 0 0% 100%;--color-surface-secondary: 210 50% 98%;--color-surface-tertiary: 210 40% 96%;--color-surface-quaternary: 210 30% 94%;--color-text-primary: 0 0% 4%;--color-text-secondary: 0 0% 45%;--color-text-tertiary: 0 0% 64%;--color-text-inverse: 0 0% 100%;--color-border-primary: 210 20% 86%;--color-border-secondary: 210 40% 93%;--color-border-accent: 210 100% 50%;--color-status-success: 142 76% 36%;--color-status-warning: 38 92% 50%;--color-status-danger: 0 84% 60%;--color-status-info: 210 100% 50%;--color-chat-message-user: 210 100% 50%;--color-chat-message-bot: 210 40% 96%;--color-chat-online: 142 76% 36%;--color-chat-typing: 210 100% 65%;--av-background: var(--color-surface-primary);--av-foreground: var(--color-text-primary);--av-card: var(--color-surface-secondary);--av-card-foreground: var(--color-text-primary);--av-card-border: var(--color-border-secondary);--av-popover: var(--color-surface-primary);--av-popover-foreground: var(--color-text-primary);--av-primary: var(--color-brand-primary);--av-primary-foreground: var(--color-text-inverse);--av-secondary: var(--color-surface-quaternary);--av-secondary-foreground: var(--color-text-primary);--av-muted: var(--color-surface-tertiary);--av-muted-foreground: var(--color-text-secondary);--av-accent: var(--color-surface-tertiary);--av-accent-foreground: var(--color-text-primary);--av-destructive: var(--color-status-danger);--av-destructive-foreground: var(--color-text-inverse);--av-success: var(--color-status-success);--av-success-foreground: var(--color-text-inverse);--av-warning: var(--color-status-warning);--av-warning-foreground: var(--color-text-inverse);--av-danger: var(--color-status-danger);--av-danger-foreground: var(--color-text-inverse);--av-info: var(--color-status-info);--av-info-foreground: var(--color-text-inverse);--av-border: var(--color-border-primary);--av-border-accent: var(--color-border-accent);--av-input: var(--color-border-primary);--av-input-foreground: var(--color-text-primary);--av-ring: var(--color-brand-primary);--av-sidebar-background: var(--color-surface-primary);--av-sidebar-foreground: var(--color-text-primary);--av-sidebar-primary: var(--color-brand-primary);--av-sidebar-primary-foreground: var(--color-text-inverse);--av-sidebar-accent: var(--color-surface-tertiary);--av-sidebar-accent-foreground: var(--color-text-primary);--av-sidebar-border: var(--color-border-secondary);--av-sidebar-ring: var(--color-brand-primary);--av-chart-1: 210 100% 50%;--av-chart-2: 142 76% 36%;--av-chart-3: 38 92% 50%;--av-chart-4: 280 100% 50%;--av-chart-5: 0 84% 60%}.theme-cyber-chat.dark{--av-background: 210 100% 8%;--av-foreground: 0 0% 98%;--av-card: 210 60% 12%;--av-card-foreground: 0 0% 98%;--av-card-border: 210 40% 20%;--av-popover: 210 60% 12%;--av-popover-foreground: 0 0% 98%;--av-primary: var(--color-brand-primary);--av-primary-foreground: var(--color-text-inverse);--av-secondary: 210 40% 18%;--av-secondary-foreground: 0 0% 98%;--av-muted: 210 40% 16%;--av-muted-foreground: 0 0% 64%;--av-accent: 210 60% 20%;--av-accent-foreground: 0 0% 98%;--av-destructive: 0 84% 60%;--av-destructive-foreground: 0 0% 98%;--av-success: 142 76% 36%;--av-success-foreground: 0 0% 98%;--av-warning: 38 92% 50%;--av-warning-foreground: 0 0% 4%;--av-danger: 0 84% 60%;--av-danger-foreground: 0 0% 98%;--av-info: 210 100% 50%;--av-info-foreground: 0 0% 98%;--av-border: 210 40% 24%;--av-border-accent: var(--color-brand-primary);--av-input: 210 40% 24%;--av-input-foreground: 0 0% 98%;--av-ring: var(--color-brand-primary);--av-sidebar-background: 210 70% 10%;--av-sidebar-foreground: 0 0% 98%;--av-sidebar-primary: var(--color-brand-primary);--av-sidebar-primary-foreground: 0 0% 98%;--av-sidebar-accent: 210 60% 18%;--av-sidebar-accent-foreground: 0 0% 98%;--av-sidebar-border: 210 40% 20%;--av-sidebar-ring: var(--color-brand-primary)}
@@ -0,0 +1 @@
1
+ export {}
@@ -5,7 +5,7 @@
5
5
  * Supports both theme switching (e.g., acronis-default, acronis-ocean) and
6
6
  * color mode switching (light/dark).
7
7
  */
8
- export type ThemeName = 'acronis-default' | 'acronis-ocean' | 'custom';
8
+ export type ThemeName = 'acronis-default' | 'acronis-ocean' | 'cyber-chat' | 'custom';
9
9
  export type ColorMode = 'light' | 'dark' | 'system';
10
10
  /**
11
11
  * Apply a theme to the document root element
@@ -1 +1 @@
1
- {"version":3,"file":"theme-switcher.js","sources":["../../src/utils/theme-switcher.ts"],"sourcesContent":["/**\n * Theme Switcher Utility\n * \n * Provides functions to programmatically switch between themes and color modes.\n * Supports both theme switching (e.g., acronis-default, acronis-ocean) and\n * color mode switching (light/dark).\n */\n\nexport type ThemeName = 'acronis-default' | 'acronis-ocean' | 'custom'\nexport type ColorMode = 'light' | 'dark' | 'system'\n\nconst THEME_CLASS_PREFIX = 'theme-'\nconst DARK_CLASS = 'dark'\nconst THEME_STORAGE_KEY = 'av-theme'\nconst COLOR_MODE_STORAGE_KEY = 'av-color-mode'\n\n/**\n * Apply a theme to the document root element\n * \n * @param theme - The theme name to apply\n * @param persist - Whether to persist the theme choice to localStorage (default: true)\n * \n * @example\n * ```typescript\n * import { applyTheme } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * applyTheme('acronis-ocean')\n * ```\n */\nexport function applyTheme(theme: ThemeName, persist = true): void {\n const root = document.documentElement\n \n root.classList.forEach((className) => {\n if (className.startsWith(THEME_CLASS_PREFIX)) {\n root.classList.remove(className)\n }\n })\n \n const themeClass = `${THEME_CLASS_PREFIX}${theme}`\n root.classList.add(themeClass)\n \n if (persist) {\n try {\n localStorage.setItem(THEME_STORAGE_KEY, theme)\n } catch (error) {\n console.warn('Failed to persist theme to localStorage:', error)\n }\n }\n}\n\n/**\n * Get the currently applied theme\n * \n * @returns The current theme name or null if no theme is explicitly set\n */\nexport function getCurrentTheme(): ThemeName | null {\n const root = document.documentElement\n \n for (const className of root.classList) {\n if (className.startsWith(THEME_CLASS_PREFIX)) {\n return className.replace(THEME_CLASS_PREFIX, '') as ThemeName\n }\n }\n \n return null\n}\n\n/**\n * Load the persisted theme from localStorage and apply it\n * Call this on application startup to restore the user's theme preference\n * \n * @returns The loaded theme name or null if no theme was persisted\n */\nexport function loadPersistedTheme(): ThemeName | null {\n try {\n const persistedTheme = localStorage.getItem(THEME_STORAGE_KEY) as ThemeName | null\n if (persistedTheme) {\n applyTheme(persistedTheme, false)\n return persistedTheme\n }\n } catch (error) {\n console.warn('Failed to load persisted theme from localStorage:', error)\n }\n \n return null\n}\n\n/**\n * Apply a color mode (light/dark/system) to the document root element\n * \n * @param mode - The color mode to apply\n * @param persist - Whether to persist the mode choice to localStorage (default: true)\n * \n * @example\n * ```typescript\n * import { applyColorMode } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * applyColorMode('dark')\n * applyColorMode('system') // Follows system preference\n * ```\n */\nexport function applyColorMode(mode: ColorMode, persist = true): void {\n const root = document.documentElement\n \n if (mode === 'system') {\n const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches\n root.classList.toggle(DARK_CLASS, systemPrefersDark)\n } else {\n root.classList.toggle(DARK_CLASS, mode === 'dark')\n }\n \n if (persist) {\n try {\n localStorage.setItem(COLOR_MODE_STORAGE_KEY, mode)\n } catch (error) {\n console.warn('Failed to persist color mode to localStorage:', error)\n }\n }\n}\n\n/**\n * Get the currently applied color mode\n * \n * @returns 'light' or 'dark' based on the current state\n */\nexport function getCurrentColorMode(): 'light' | 'dark' {\n return document.documentElement.classList.contains(DARK_CLASS) ? 'dark' : 'light'\n}\n\n/**\n * Load the persisted color mode from localStorage and apply it\n * Call this on application startup to restore the user's color mode preference\n * \n * @returns The loaded color mode or null if no mode was persisted\n */\nexport function loadPersistedColorMode(): ColorMode | null {\n try {\n const persistedMode = localStorage.getItem(COLOR_MODE_STORAGE_KEY) as ColorMode | null\n if (persistedMode) {\n applyColorMode(persistedMode, false)\n return persistedMode\n }\n } catch (error) {\n console.warn('Failed to load persisted color mode from localStorage:', error)\n }\n \n return null\n}\n\n/**\n * Toggle between light and dark mode\n * \n * @param persist - Whether to persist the mode choice to localStorage (default: true)\n * @returns The new color mode after toggling\n */\nexport function toggleColorMode(persist = true): 'light' | 'dark' {\n const currentMode = getCurrentColorMode()\n const newMode = currentMode === 'light' ? 'dark' : 'light'\n applyColorMode(newMode, persist)\n return newMode\n}\n\n/**\n * Set up a listener for system color scheme changes\n * Only applies changes if the current mode is set to 'system'\n * \n * @returns A cleanup function to remove the listener\n */\nexport function watchSystemColorScheme(): () => void {\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\n \n const handler = (e: MediaQueryListEvent) => {\n try {\n const persistedMode = localStorage.getItem(COLOR_MODE_STORAGE_KEY)\n if (persistedMode === 'system') {\n document.documentElement.classList.toggle(DARK_CLASS, e.matches)\n }\n } catch (error) {\n console.warn('Failed to check persisted color mode:', error)\n }\n }\n \n mediaQuery.addEventListener('change', handler)\n \n return () => {\n mediaQuery.removeEventListener('change', handler)\n }\n}\n\n/**\n * Initialize the theme system on application startup\n * Loads persisted theme and color mode preferences\n * Sets up system color scheme watcher if mode is 'system'\n * \n * @returns A cleanup function to remove event listeners\n * \n * @example\n * ```typescript\n * import { initializeThemeSystem } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * // In your app initialization\n * const cleanup = initializeThemeSystem()\n * \n * // Call cleanup when unmounting (e.g., in React useEffect)\n * return cleanup\n * ```\n */\nexport function initializeThemeSystem(): () => void {\n loadPersistedTheme()\n loadPersistedColorMode()\n \n const cleanup = watchSystemColorScheme()\n \n return cleanup\n}\n"],"names":["THEME_CLASS_PREFIX","DARK_CLASS","THEME_STORAGE_KEY","COLOR_MODE_STORAGE_KEY","applyTheme","theme","persist","root","className","themeClass","error","getCurrentTheme","loadPersistedTheme","persistedTheme","applyColorMode","mode","systemPrefersDark","getCurrentColorMode","loadPersistedColorMode","persistedMode","toggleColorMode","newMode","watchSystemColorScheme","mediaQuery","handler","e","initializeThemeSystem"],"mappings":"AAWA,MAAMA,IAAqB,UACrBC,IAAa,QACbC,IAAoB,YACpBC,IAAyB;AAexB,SAASC,EAAWC,GAAkBC,IAAU,IAAY;AACjE,QAAMC,IAAO,SAAS;AAEtB,EAAAA,EAAK,UAAU,QAAQ,CAACC,MAAc;AACpC,IAAIA,EAAU,WAAWR,CAAkB,KACzCO,EAAK,UAAU,OAAOC,CAAS;AAAA,EAEnC,CAAC;AAED,QAAMC,IAAa,GAAGT,CAAkB,GAAGK,CAAK;AAGhD,MAFAE,EAAK,UAAU,IAAIE,CAAU,GAEzBH;AACF,QAAI;AACF,mBAAa,QAAQJ,G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AACnD,SAAAH,EAAeO,GAASf,CAAO,GACxBe;AACT;AAQO,SAASC,IAAqC;AACnD,QAAMC,IAAa,OAAO,WAAW,8BAA8B,GAE7DC,IAAU,CAACC,MAA2B;AAC1C,QAAI;AAEF,MADsB,aAAa,QAAQtB,CAAsB,MAC3C,YACpB,SAAS,gBAAgB,UAAU,OAAOF,GAAYwB,EAAE,OAAO;AAAA,IAEnE,SAASf,GAAO;AACd,cAAQ,KAAK,yCAAyCA,CAAK;AAAA,IAC7D;AAAA,EACF;AAEA,SAAAa,EAAW,iBAAiB,UAAUC,CAAO,GAEtC,MAAM;AACX,IAAAD,EAAW,oBAAoB,UAAUC,CAAO;AAAA,EAClD;AACF;AAoBO,SAASE,IAAoC;AAClD,SAAAd,EAAA,GACAM,EAAA,GAEgBI,EAAA;AAGlB;"}
1
+ {"version":3,"file":"theme-switcher.js","sources":["../../src/utils/theme-switcher.ts"],"sourcesContent":["/**\n * Theme Switcher Utility\n * \n * Provides functions to programmatically switch between themes and color modes.\n * Supports both theme switching (e.g., acronis-default, acronis-ocean) and\n * color mode switching (light/dark).\n */\n\nexport type ThemeName = 'acronis-default' | 'acronis-ocean' | 'cyber-chat' | 'custom'\nexport type ColorMode = 'light' | 'dark' | 'system'\n\nconst THEME_CLASS_PREFIX = 'theme-'\nconst DARK_CLASS = 'dark'\nconst THEME_STORAGE_KEY = 'av-theme'\nconst COLOR_MODE_STORAGE_KEY = 'av-color-mode'\n\n/**\n * Apply a theme to the document root element\n * \n * @param theme - The theme name to apply\n * @param persist - Whether to persist the theme choice to localStorage (default: true)\n * \n * @example\n * ```typescript\n * import { applyTheme } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * applyTheme('acronis-ocean')\n * ```\n */\nexport function applyTheme(theme: ThemeName, persist = true): void {\n const root = document.documentElement\n \n root.classList.forEach((className) => {\n if (className.startsWith(THEME_CLASS_PREFIX)) {\n root.classList.remove(className)\n }\n })\n \n const themeClass = `${THEME_CLASS_PREFIX}${theme}`\n root.classList.add(themeClass)\n \n if (persist) {\n try {\n localStorage.setItem(THEME_STORAGE_KEY, theme)\n } catch (error) {\n console.warn('Failed to persist theme to localStorage:', error)\n }\n }\n}\n\n/**\n * Get the currently applied theme\n * \n * @returns The current theme name or null if no theme is explicitly set\n */\nexport function getCurrentTheme(): ThemeName | null {\n const root = document.documentElement\n \n for (const className of root.classList) {\n if (className.startsWith(THEME_CLASS_PREFIX)) {\n return className.replace(THEME_CLASS_PREFIX, '') as ThemeName\n }\n }\n \n return null\n}\n\n/**\n * Load the persisted theme from localStorage and apply it\n * Call this on application startup to restore the user's theme preference\n * \n * @returns The loaded theme name or null if no theme was persisted\n */\nexport function loadPersistedTheme(): ThemeName | null {\n try {\n const persistedTheme = localStorage.getItem(THEME_STORAGE_KEY) as ThemeName | null\n if (persistedTheme) {\n applyTheme(persistedTheme, false)\n return persistedTheme\n }\n } catch (error) {\n console.warn('Failed to load persisted theme from localStorage:', error)\n }\n \n return null\n}\n\n/**\n * Apply a color mode (light/dark/system) to the document root element\n * \n * @param mode - The color mode to apply\n * @param persist - Whether to persist the mode choice to localStorage (default: true)\n * \n * @example\n * ```typescript\n * import { applyColorMode } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * applyColorMode('dark')\n * applyColorMode('system') // Follows system preference\n * ```\n */\nexport function applyColorMode(mode: ColorMode, persist = true): void {\n const root = document.documentElement\n \n if (mode === 'system') {\n const systemPrefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches\n root.classList.toggle(DARK_CLASS, systemPrefersDark)\n } else {\n root.classList.toggle(DARK_CLASS, mode === 'dark')\n }\n \n if (persist) {\n try {\n localStorage.setItem(COLOR_MODE_STORAGE_KEY, mode)\n } catch (error) {\n console.warn('Failed to persist color mode to localStorage:', error)\n }\n }\n}\n\n/**\n * Get the currently applied color mode\n * \n * @returns 'light' or 'dark' based on the current state\n */\nexport function getCurrentColorMode(): 'light' | 'dark' {\n return document.documentElement.classList.contains(DARK_CLASS) ? 'dark' : 'light'\n}\n\n/**\n * Load the persisted color mode from localStorage and apply it\n * Call this on application startup to restore the user's color mode preference\n * \n * @returns The loaded color mode or null if no mode was persisted\n */\nexport function loadPersistedColorMode(): ColorMode | null {\n try {\n const persistedMode = localStorage.getItem(COLOR_MODE_STORAGE_KEY) as ColorMode | null\n if (persistedMode) {\n applyColorMode(persistedMode, false)\n return persistedMode\n }\n } catch (error) {\n console.warn('Failed to load persisted color mode from localStorage:', error)\n }\n \n return null\n}\n\n/**\n * Toggle between light and dark mode\n * \n * @param persist - Whether to persist the mode choice to localStorage (default: true)\n * @returns The new color mode after toggling\n */\nexport function toggleColorMode(persist = true): 'light' | 'dark' {\n const currentMode = getCurrentColorMode()\n const newMode = currentMode === 'light' ? 'dark' : 'light'\n applyColorMode(newMode, persist)\n return newMode\n}\n\n/**\n * Set up a listener for system color scheme changes\n * Only applies changes if the current mode is set to 'system'\n * \n * @returns A cleanup function to remove the listener\n */\nexport function watchSystemColorScheme(): () => void {\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)')\n \n const handler = (e: MediaQueryListEvent) => {\n try {\n const persistedMode = localStorage.getItem(COLOR_MODE_STORAGE_KEY)\n if (persistedMode === 'system') {\n document.documentElement.classList.toggle(DARK_CLASS, e.matches)\n }\n } catch (error) {\n console.warn('Failed to check persisted color mode:', error)\n }\n }\n \n mediaQuery.addEventListener('change', handler)\n \n return () => {\n mediaQuery.removeEventListener('change', handler)\n }\n}\n\n/**\n * Initialize the theme system on application startup\n * Loads persisted theme and color mode preferences\n * Sets up system color scheme watcher if mode is 'system'\n * \n * @returns A cleanup function to remove event listeners\n * \n * @example\n * ```typescript\n * import { initializeThemeSystem } from '@acronis/shadcn-uikit/utils/theme-switcher'\n * \n * // In your app initialization\n * const cleanup = initializeThemeSystem()\n * \n * // Call cleanup when unmounting (e.g., in React useEffect)\n * return cleanup\n * ```\n */\nexport function initializeThemeSystem(): () => void {\n loadPersistedTheme()\n loadPersistedColorMode()\n \n const cleanup = watchSystemColorScheme()\n \n return cleanup\n}\n"],"names":["THEME_CLASS_PREFIX","DARK_CLASS","THEME_STORAGE_KEY","COLOR_MODE_STORAGE_KEY","applyTheme","theme","persist","root","className","themeClass","error","getCurrentTheme","loadPersistedTheme","persistedTheme","applyColorMode","mode","systemPrefersDark","getCurrentColorMode","loadPersistedColorMode","persistedMode","toggleColorMode","newMode","watchSystemColorScheme","mediaQuery","handler","e","initializeThemeSystem"],"mappings":"AAWA,MAAMA,IAAqB,UACrBC,IAAa,QACbC,IAAoB,YACpBC,IAAyB;AAexB,SAASC,EAAWC,GAAkBC,IAAU,IAAY;AACjE,QAAMC,IAAO,SAAS;AAEtB,EAAAA,EAAK,UAAU,QAAQ,CAACC,MAAc;AACpC,IAAIA,EAAU,WAAWR,CAAkB,KACzCO,EAAK,UAAU,OAAOC,CAAS;AAAA,EAEnC,CAAC;AAED,QAAMC,IAAa,GAAGT,CAAkB,GAAGK,CAAK;AAGhD,MAFAE,EAAK,UAAU,IAAIE,CAAU,GAEzBH;AACF,QAAI;AACF,mBAAa,QAAQJ,GAAmBG,CAAK;AAAA,IAC/C,SAASK,GAAO;AACd,cAAQ,KAAK,4CAA4CA,CAAK;AAAA,IAChE;AAEJ;AAOO,SAASC,IAAoC;AAClD,QAAMJ,IAAO,SAAS;AAEtB,aAAWC,KAAaD,EAAK;AAC3B,QAAIC,EAAU,WAAWR,CAAkB;AACzC,aAAOQ,EAAU,QAAQR,GAAoB,EAAE;AAInD,SAAO;AACT;AAQO,SAASY,IAAuC;AACrD,MAAI;AACF,UAAMC,IAAiB,aAAa,QAAQX,CAAiB;AAC7D,QAAIW;AACF,aAAAT,EAAWS,GAAgB,EAAK,GACzBA;AAAA,EAEX,SAASH,GAAO;AACd,YAAQ,KAAK,qDAAqDA,CAAK;AAAA,EACzE;AAEA,SAAO;AACT;AAgBO,SAASI,EAAeC,GAAiBT,IAAU,IAAY;AACpE,QAAMC,IAAO,SAAS;AAEtB,MAAIQ,MAAS,UAAU;AACrB,UAA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adcn-uikit",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Acronis shadcn UI component library built with TypeScript, following shadcn design principles",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -19,6 +19,7 @@
19
19
  "./styles/themes": "./dist/themes/acronis-default.css",
20
20
  "./styles/themes/acronis-default": "./dist/themes/acronis-default.css",
21
21
  "./styles/themes/acronis-ocean": "./dist/themes/acronis-ocean.css",
22
+ "./styles/themes/cyber-chat": "./dist/themes/cyber-chat.css",
22
23
  "./components/*": "./dist/components/*"
23
24
  },
24
25
  "files": [