@ash-cloud/ash-ui 0.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.
@@ -0,0 +1,275 @@
1
+ 'use strict';
2
+
3
+ // src/design-tokens.ts
4
+ var colors = {
5
+ // Primary accent color (lime green)
6
+ accent: {
7
+ DEFAULT: "#ccff00",
8
+ 50: "#f8ffe5",
9
+ 100: "#eeffb8",
10
+ 200: "#e0ff85",
11
+ 300: "#d4ff52",
12
+ 400: "#ccff00",
13
+ 500: "#b8e600",
14
+ 600: "#99cc00",
15
+ 700: "#739900",
16
+ 800: "#4d6600",
17
+ 900: "#263300"
18
+ },
19
+ // Surface colors (dark theme)
20
+ surface: {
21
+ dark: "#0a0a0a",
22
+ darker: "#050505",
23
+ card: "#0c0c0c",
24
+ elevated: "#111111"
25
+ },
26
+ // Text colors
27
+ text: {
28
+ primary: "#ffffff",
29
+ secondary: "rgba(255, 255, 255, 0.7)",
30
+ muted: "rgba(255, 255, 255, 0.5)",
31
+ disabled: "rgba(255, 255, 255, 0.3)"
32
+ },
33
+ // Border colors
34
+ border: {
35
+ DEFAULT: "rgba(255, 255, 255, 0.1)",
36
+ hover: "rgba(255, 255, 255, 0.2)",
37
+ accent: "rgba(204, 255, 0, 0.3)",
38
+ accentHover: "rgba(204, 255, 0, 0.5)"
39
+ },
40
+ // Status colors
41
+ status: {
42
+ success: "#10b981",
43
+ warning: "#eab308",
44
+ error: "#ef4444",
45
+ info: "#3b82f6"
46
+ },
47
+ // User message background
48
+ user: {
49
+ bg: "rgba(204, 255, 0, 0.1)",
50
+ border: "rgba(204, 255, 0, 0.2)"
51
+ },
52
+ // Assistant message background
53
+ assistant: {
54
+ bg: "rgba(255, 255, 255, 0.05)",
55
+ border: "rgba(255, 255, 255, 0.1)"
56
+ }
57
+ };
58
+ var spacing = {
59
+ xs: "4px",
60
+ sm: "8px",
61
+ md: "12px",
62
+ lg: "16px",
63
+ xl: "24px",
64
+ "2xl": "32px",
65
+ "3xl": "48px"
66
+ };
67
+ var borderRadius = {
68
+ sm: "8px",
69
+ md: "12px",
70
+ lg: "16px",
71
+ xl: "20px",
72
+ "2xl": "24px",
73
+ full: "9999px"
74
+ };
75
+ var shadows = {
76
+ sm: "0 1px 2px rgba(0, 0, 0, 0.3)",
77
+ md: "0 4px 6px rgba(0, 0, 0, 0.4)",
78
+ lg: "0 10px 15px rgba(0, 0, 0, 0.5)",
79
+ xl: "0 20px 25px rgba(0, 0, 0, 0.6)",
80
+ glow: {
81
+ sm: "0 0 10px rgba(204, 255, 0, 0.2)",
82
+ md: "0 0 20px rgba(204, 255, 0, 0.3)",
83
+ lg: "0 0 30px rgba(204, 255, 0, 0.5)"
84
+ },
85
+ panel: "0 25px 50px rgba(0, 0, 0, 0.5)"
86
+ };
87
+ var typography = {
88
+ fontFamily: {
89
+ sans: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
90
+ mono: 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace'
91
+ },
92
+ fontSize: {
93
+ xs: "12px",
94
+ sm: "14px",
95
+ base: "16px",
96
+ lg: "18px",
97
+ xl: "20px",
98
+ "2xl": "24px"
99
+ },
100
+ lineHeight: {
101
+ tight: "1.25",
102
+ normal: "1.5",
103
+ relaxed: "1.75"
104
+ }
105
+ };
106
+ var keyframes = {
107
+ slideUp: {
108
+ from: { opacity: "0", transform: "translateY(20px)" },
109
+ to: { opacity: "1", transform: "translateY(0)" }
110
+ },
111
+ fadeIn: {
112
+ from: { opacity: "0", transform: "translateY(10px)" },
113
+ to: { opacity: "1", transform: "translateY(0)" }
114
+ },
115
+ blink: {
116
+ "0%, 50%": { opacity: "1" },
117
+ "51%, 100%": { opacity: "0" }
118
+ },
119
+ bounce: {
120
+ "0%, 80%, 100%": { transform: "scale(0)" },
121
+ "40%": { transform: "scale(1)" }
122
+ },
123
+ pulse: {
124
+ "0%, 100%": { opacity: "1" },
125
+ "50%": { opacity: "0.5" }
126
+ },
127
+ glowPulse: {
128
+ "0%, 100%": { boxShadow: "0 0 20px rgba(204, 255, 0, 0.3)" },
129
+ "50%": { boxShadow: "0 0 40px rgba(204, 255, 0, 0.5)" }
130
+ }
131
+ };
132
+ var keyframesCss = {
133
+ slideUp: `
134
+ @keyframes ash-slide-up {
135
+ from { opacity: 0; transform: translateY(20px); }
136
+ to { opacity: 1; transform: translateY(0); }
137
+ }
138
+ `,
139
+ fadeIn: `
140
+ @keyframes ash-fade-in {
141
+ from { opacity: 0; transform: translateY(10px); }
142
+ to { opacity: 1; transform: translateY(0); }
143
+ }
144
+ `,
145
+ blink: `
146
+ @keyframes ash-blink {
147
+ 0%, 50% { opacity: 1; }
148
+ 51%, 100% { opacity: 0; }
149
+ }
150
+ `,
151
+ bounce: `
152
+ @keyframes ash-bounce {
153
+ 0%, 80%, 100% { transform: scale(0); }
154
+ 40% { transform: scale(1); }
155
+ }
156
+ `,
157
+ pulse: `
158
+ @keyframes ash-pulse {
159
+ 0%, 100% { opacity: 1; }
160
+ 50% { opacity: 0.5; }
161
+ }
162
+ `,
163
+ glowPulse: `
164
+ @keyframes ash-glow-pulse {
165
+ 0%, 100% { box-shadow: 0 0 20px rgba(204, 255, 0, 0.3); }
166
+ 50% { box-shadow: 0 0 40px rgba(204, 255, 0, 0.5); }
167
+ }
168
+ `
169
+ };
170
+ var allKeyframesCss = Object.values(keyframesCss).join("\n");
171
+ var transitions = {
172
+ fast: "150ms ease-out",
173
+ normal: "300ms ease-out",
174
+ slow: "500ms ease-out",
175
+ spring: "400ms cubic-bezier(0.16, 1, 0.3, 1)"
176
+ };
177
+ var zIndex = {
178
+ base: 0,
179
+ dropdown: 100,
180
+ modal: 200,
181
+ tooltip: 300,
182
+ widget: 999999
183
+ };
184
+ var widget = {
185
+ launcher: {
186
+ size: "60px",
187
+ iconSize: "28px"
188
+ },
189
+ panel: {
190
+ width: "400px",
191
+ height: "600px",
192
+ maxHeight: "80vh"
193
+ },
194
+ header: {
195
+ height: "60px"
196
+ },
197
+ input: {
198
+ minHeight: "60px",
199
+ maxHeight: "150px"
200
+ },
201
+ message: {
202
+ maxWidth: "85%",
203
+ avatarSize: "32px"
204
+ },
205
+ gap: "20px"
206
+ // Gap from edge of screen
207
+ };
208
+ function tokensToCssVariables(prefix = "ash") {
209
+ const vars = {};
210
+ vars[`--${prefix}-accent`] = colors.accent.DEFAULT;
211
+ Object.entries(colors.accent).forEach(([key, value]) => {
212
+ if (key !== "DEFAULT") vars[`--${prefix}-accent-${key}`] = value;
213
+ });
214
+ Object.entries(colors.surface).forEach(([key, value]) => {
215
+ vars[`--${prefix}-surface-${key}`] = value;
216
+ });
217
+ Object.entries(colors.text).forEach(([key, value]) => {
218
+ vars[`--${prefix}-text-${key}`] = value;
219
+ });
220
+ Object.entries(colors.border).forEach(([key, value]) => {
221
+ if (key !== "DEFAULT") vars[`--${prefix}-border-${key}`] = value;
222
+ else vars[`--${prefix}-border`] = value;
223
+ });
224
+ return vars;
225
+ }
226
+ var inlineStyles = {
227
+ // Glass panel effect
228
+ glassPanel: {
229
+ backgroundColor: "rgba(255, 255, 255, 0.05)",
230
+ backdropFilter: "blur(24px)",
231
+ WebkitBackdropFilter: "blur(24px)",
232
+ border: `1px solid ${colors.border.DEFAULT}`
233
+ },
234
+ // Accent button
235
+ accentButton: {
236
+ backgroundColor: colors.accent.DEFAULT,
237
+ color: "#000000",
238
+ border: `1px solid ${colors.accent.DEFAULT}`,
239
+ boxShadow: shadows.glow.md
240
+ },
241
+ // Ghost button
242
+ ghostButton: {
243
+ backgroundColor: "transparent",
244
+ color: colors.text.secondary,
245
+ border: "1px solid transparent"
246
+ },
247
+ // User message bubble
248
+ userMessage: {
249
+ backgroundColor: colors.user.bg,
250
+ border: `1px solid ${colors.user.border}`,
251
+ borderRadius: borderRadius.lg
252
+ },
253
+ // Assistant message bubble
254
+ assistantMessage: {
255
+ backgroundColor: colors.assistant.bg,
256
+ border: `1px solid ${colors.assistant.border}`,
257
+ borderRadius: borderRadius.lg
258
+ }
259
+ };
260
+
261
+ exports.allKeyframesCss = allKeyframesCss;
262
+ exports.borderRadius = borderRadius;
263
+ exports.colors = colors;
264
+ exports.inlineStyles = inlineStyles;
265
+ exports.keyframes = keyframes;
266
+ exports.keyframesCss = keyframesCss;
267
+ exports.shadows = shadows;
268
+ exports.spacing = spacing;
269
+ exports.tokensToCssVariables = tokensToCssVariables;
270
+ exports.transitions = transitions;
271
+ exports.typography = typography;
272
+ exports.widget = widget;
273
+ exports.zIndex = zIndex;
274
+ //# sourceMappingURL=design-tokens.cjs.map
275
+ //# sourceMappingURL=design-tokens.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/design-tokens.ts"],"names":[],"mappings":";;;AA4BO,IAAM,MAAA,GAAS;AAAA;AAAA,EAEpB,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS,SAAA;AAAA,IACT,EAAA,EAAI,SAAA;AAAA,IACJ,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK,SAAA;AAAA,IACL,GAAA,EAAK;AAAA,GACP;AAAA;AAAA,EAGA,OAAA,EAAS;AAAA,IACP,IAAA,EAAM,SAAA;AAAA,IACN,MAAA,EAAQ,SAAA;AAAA,IACR,IAAA,EAAM,SAAA;AAAA,IACN,QAAA,EAAU;AAAA,GACZ;AAAA;AAAA,EAGA,IAAA,EAAM;AAAA,IACJ,OAAA,EAAS,SAAA;AAAA,IACT,SAAA,EAAW,0BAAA;AAAA,IACX,KAAA,EAAO,0BAAA;AAAA,IACP,QAAA,EAAU;AAAA,GACZ;AAAA;AAAA,EAGA,MAAA,EAAQ;AAAA,IACN,OAAA,EAAS,0BAAA;AAAA,IACT,KAAA,EAAO,0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design-tokens.cjs","sourcesContent":["/**\n * ASH UI Design Tokens\n *\n * Single source of truth for colors, spacing, animations, and other design values.\n * Used by both ash-ui components (via Tailwind/CSS) and the embed widget (via inline styles).\n *\n * @example\n * ```ts\n * import { colors, animations, shadows } from '@ash-cloud/ash-ui/tokens';\n *\n * // In embed widget (inline styles)\n * const style = { backgroundColor: colors.surface.dark };\n *\n * // In Tailwind config\n * module.exports = {\n * theme: {\n * extend: {\n * colors: colors,\n * }\n * }\n * };\n * ```\n */\n\n// =============================================================================\n// Colors\n// =============================================================================\n\nexport const colors = {\n // Primary accent color (lime green)\n accent: {\n DEFAULT: '#ccff00',\n 50: '#f8ffe5',\n 100: '#eeffb8',\n 200: '#e0ff85',\n 300: '#d4ff52',\n 400: '#ccff00',\n 500: '#b8e600',\n 600: '#99cc00',\n 700: '#739900',\n 800: '#4d6600',\n 900: '#263300',\n },\n\n // Surface colors (dark theme)\n surface: {\n dark: '#0a0a0a',\n darker: '#050505',\n card: '#0c0c0c',\n elevated: '#111111',\n },\n\n // Text colors\n text: {\n primary: '#ffffff',\n secondary: 'rgba(255, 255, 255, 0.7)',\n muted: 'rgba(255, 255, 255, 0.5)',\n disabled: 'rgba(255, 255, 255, 0.3)',\n },\n\n // Border colors\n border: {\n DEFAULT: 'rgba(255, 255, 255, 0.1)',\n hover: 'rgba(255, 255, 255, 0.2)',\n accent: 'rgba(204, 255, 0, 0.3)',\n accentHover: 'rgba(204, 255, 0, 0.5)',\n },\n\n // Status colors\n status: {\n success: '#10b981',\n warning: '#eab308',\n error: '#ef4444',\n info: '#3b82f6',\n },\n\n // User message background\n user: {\n bg: 'rgba(204, 255, 0, 0.1)',\n border: 'rgba(204, 255, 0, 0.2)',\n },\n\n // Assistant message background\n assistant: {\n bg: 'rgba(255, 255, 255, 0.05)',\n border: 'rgba(255, 255, 255, 0.1)',\n },\n} as const;\n\n// =============================================================================\n// Spacing\n// =============================================================================\n\nexport const spacing = {\n xs: '4px',\n sm: '8px',\n md: '12px',\n lg: '16px',\n xl: '24px',\n '2xl': '32px',\n '3xl': '48px',\n} as const;\n\n// =============================================================================\n// Border Radius\n// =============================================================================\n\nexport const borderRadius = {\n sm: '8px',\n md: '12px',\n lg: '16px',\n xl: '20px',\n '2xl': '24px',\n full: '9999px',\n} as const;\n\n// =============================================================================\n// Shadows\n// =============================================================================\n\nexport const shadows = {\n sm: '0 1px 2px rgba(0, 0, 0, 0.3)',\n md: '0 4px 6px rgba(0, 0, 0, 0.4)',\n lg: '0 10px 15px rgba(0, 0, 0, 0.5)',\n xl: '0 20px 25px rgba(0, 0, 0, 0.6)',\n glow: {\n sm: '0 0 10px rgba(204, 255, 0, 0.2)',\n md: '0 0 20px rgba(204, 255, 0, 0.3)',\n lg: '0 0 30px rgba(204, 255, 0, 0.5)',\n },\n panel: '0 25px 50px rgba(0, 0, 0, 0.5)',\n} as const;\n\n// =============================================================================\n// Typography\n// =============================================================================\n\nexport const typography = {\n fontFamily: {\n sans: 'system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n mono: 'ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace',\n },\n fontSize: {\n xs: '12px',\n sm: '14px',\n base: '16px',\n lg: '18px',\n xl: '20px',\n '2xl': '24px',\n },\n lineHeight: {\n tight: '1.25',\n normal: '1.5',\n relaxed: '1.75',\n },\n} as const;\n\n// =============================================================================\n// Animations - Keyframes as objects for inline style injection\n// =============================================================================\n\nexport const keyframes = {\n slideUp: {\n from: { opacity: '0', transform: 'translateY(20px)' },\n to: { opacity: '1', transform: 'translateY(0)' },\n },\n fadeIn: {\n from: { opacity: '0', transform: 'translateY(10px)' },\n to: { opacity: '1', transform: 'translateY(0)' },\n },\n blink: {\n '0%, 50%': { opacity: '1' },\n '51%, 100%': { opacity: '0' },\n },\n bounce: {\n '0%, 80%, 100%': { transform: 'scale(0)' },\n '40%': { transform: 'scale(1)' },\n },\n pulse: {\n '0%, 100%': { opacity: '1' },\n '50%': { opacity: '0.5' },\n },\n glowPulse: {\n '0%, 100%': { boxShadow: '0 0 20px rgba(204, 255, 0, 0.3)' },\n '50%': { boxShadow: '0 0 40px rgba(204, 255, 0, 0.5)' },\n },\n} as const;\n\n// CSS keyframe strings for injection into style tags\nexport const keyframesCss = {\n slideUp: `\n @keyframes ash-slide-up {\n from { opacity: 0; transform: translateY(20px); }\n to { opacity: 1; transform: translateY(0); }\n }\n `,\n fadeIn: `\n @keyframes ash-fade-in {\n from { opacity: 0; transform: translateY(10px); }\n to { opacity: 1; transform: translateY(0); }\n }\n `,\n blink: `\n @keyframes ash-blink {\n 0%, 50% { opacity: 1; }\n 51%, 100% { opacity: 0; }\n }\n `,\n bounce: `\n @keyframes ash-bounce {\n 0%, 80%, 100% { transform: scale(0); }\n 40% { transform: scale(1); }\n }\n `,\n pulse: `\n @keyframes ash-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n `,\n glowPulse: `\n @keyframes ash-glow-pulse {\n 0%, 100% { box-shadow: 0 0 20px rgba(204, 255, 0, 0.3); }\n 50% { box-shadow: 0 0 40px rgba(204, 255, 0, 0.5); }\n }\n `,\n} as const;\n\n// All keyframes combined for easy injection\nexport const allKeyframesCss = Object.values(keyframesCss).join('\\n');\n\n// =============================================================================\n// Transitions\n// =============================================================================\n\nexport const transitions = {\n fast: '150ms ease-out',\n normal: '300ms ease-out',\n slow: '500ms ease-out',\n spring: '400ms cubic-bezier(0.16, 1, 0.3, 1)',\n} as const;\n\n// =============================================================================\n// Z-Index Scale\n// =============================================================================\n\nexport const zIndex = {\n base: 0,\n dropdown: 100,\n modal: 200,\n tooltip: 300,\n widget: 999999,\n} as const;\n\n// =============================================================================\n// Widget-Specific Dimensions\n// =============================================================================\n\nexport const widget = {\n launcher: {\n size: '60px',\n iconSize: '28px',\n },\n panel: {\n width: '400px',\n height: '600px',\n maxHeight: '80vh',\n },\n header: {\n height: '60px',\n },\n input: {\n minHeight: '60px',\n maxHeight: '150px',\n },\n message: {\n maxWidth: '85%',\n avatarSize: '32px',\n },\n gap: '20px', // Gap from edge of screen\n} as const;\n\n// =============================================================================\n// Helper: Convert tokens to CSS variables\n// =============================================================================\n\nexport function tokensToCssVariables(prefix = 'ash'): Record<string, string> {\n const vars: Record<string, string> = {};\n\n // Colors\n vars[`--${prefix}-accent`] = colors.accent.DEFAULT;\n Object.entries(colors.accent).forEach(([key, value]) => {\n if (key !== 'DEFAULT') vars[`--${prefix}-accent-${key}`] = value;\n });\n\n Object.entries(colors.surface).forEach(([key, value]) => {\n vars[`--${prefix}-surface-${key}`] = value;\n });\n\n Object.entries(colors.text).forEach(([key, value]) => {\n vars[`--${prefix}-text-${key}`] = value;\n });\n\n Object.entries(colors.border).forEach(([key, value]) => {\n if (key !== 'DEFAULT') vars[`--${prefix}-border-${key}`] = value;\n else vars[`--${prefix}-border`] = value;\n });\n\n return vars;\n}\n\n// =============================================================================\n// Helper: Generate inline styles from token names\n// =============================================================================\n\nexport const inlineStyles = {\n // Glass panel effect\n glassPanel: {\n backgroundColor: 'rgba(255, 255, 255, 0.05)',\n backdropFilter: 'blur(24px)',\n WebkitBackdropFilter: 'blur(24px)',\n border: `1px solid ${colors.border.DEFAULT}`,\n },\n\n // Accent button\n accentButton: {\n backgroundColor: colors.accent.DEFAULT,\n color: '#000000',\n border: `1px solid ${colors.accent.DEFAULT}`,\n boxShadow: shadows.glow.md,\n },\n\n // Ghost button\n ghostButton: {\n backgroundColor: 'transparent',\n color: colors.text.secondary,\n border: '1px solid transparent',\n },\n\n // User message bubble\n userMessage: {\n backgroundColor: colors.user.bg,\n border: `1px solid ${colors.user.border}`,\n borderRadius: borderRadius.lg,\n },\n\n // Assistant message bubble\n assistantMessage: {\n backgroundColor: colors.assistant.bg,\n border: `1px solid ${colors.assistant.border}`,\n borderRadius: borderRadius.lg,\n },\n} as const;\n\n// =============================================================================\n// Type exports\n// =============================================================================\n\nexport type Colors = typeof colors;\nexport type Spacing = typeof spacing;\nexport type BorderRadius = typeof borderRadius;\nexport type Shadows = typeof shadows;\nexport type Typography = typeof typography;\nexport type Keyframes = typeof keyframes;\nexport type Transitions = typeof transitions;\nexport type ZIndex = typeof zIndex;\nexport type Widget = typeof widget;\n"]}
@@ -0,0 +1,258 @@
1
+ /**
2
+ * ASH UI Design Tokens
3
+ *
4
+ * Single source of truth for colors, spacing, animations, and other design values.
5
+ * Used by both ash-ui components (via Tailwind/CSS) and the embed widget (via inline styles).
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { colors, animations, shadows } from '@ash-cloud/ash-ui/tokens';
10
+ *
11
+ * // In embed widget (inline styles)
12
+ * const style = { backgroundColor: colors.surface.dark };
13
+ *
14
+ * // In Tailwind config
15
+ * module.exports = {
16
+ * theme: {
17
+ * extend: {
18
+ * colors: colors,
19
+ * }
20
+ * }
21
+ * };
22
+ * ```
23
+ */
24
+ declare const colors: {
25
+ readonly accent: {
26
+ readonly DEFAULT: "#ccff00";
27
+ readonly 50: "#f8ffe5";
28
+ readonly 100: "#eeffb8";
29
+ readonly 200: "#e0ff85";
30
+ readonly 300: "#d4ff52";
31
+ readonly 400: "#ccff00";
32
+ readonly 500: "#b8e600";
33
+ readonly 600: "#99cc00";
34
+ readonly 700: "#739900";
35
+ readonly 800: "#4d6600";
36
+ readonly 900: "#263300";
37
+ };
38
+ readonly surface: {
39
+ readonly dark: "#0a0a0a";
40
+ readonly darker: "#050505";
41
+ readonly card: "#0c0c0c";
42
+ readonly elevated: "#111111";
43
+ };
44
+ readonly text: {
45
+ readonly primary: "#ffffff";
46
+ readonly secondary: "rgba(255, 255, 255, 0.7)";
47
+ readonly muted: "rgba(255, 255, 255, 0.5)";
48
+ readonly disabled: "rgba(255, 255, 255, 0.3)";
49
+ };
50
+ readonly border: {
51
+ readonly DEFAULT: "rgba(255, 255, 255, 0.1)";
52
+ readonly hover: "rgba(255, 255, 255, 0.2)";
53
+ readonly accent: "rgba(204, 255, 0, 0.3)";
54
+ readonly accentHover: "rgba(204, 255, 0, 0.5)";
55
+ };
56
+ readonly status: {
57
+ readonly success: "#10b981";
58
+ readonly warning: "#eab308";
59
+ readonly error: "#ef4444";
60
+ readonly info: "#3b82f6";
61
+ };
62
+ readonly user: {
63
+ readonly bg: "rgba(204, 255, 0, 0.1)";
64
+ readonly border: "rgba(204, 255, 0, 0.2)";
65
+ };
66
+ readonly assistant: {
67
+ readonly bg: "rgba(255, 255, 255, 0.05)";
68
+ readonly border: "rgba(255, 255, 255, 0.1)";
69
+ };
70
+ };
71
+ declare const spacing: {
72
+ readonly xs: "4px";
73
+ readonly sm: "8px";
74
+ readonly md: "12px";
75
+ readonly lg: "16px";
76
+ readonly xl: "24px";
77
+ readonly '2xl': "32px";
78
+ readonly '3xl': "48px";
79
+ };
80
+ declare const borderRadius: {
81
+ readonly sm: "8px";
82
+ readonly md: "12px";
83
+ readonly lg: "16px";
84
+ readonly xl: "20px";
85
+ readonly '2xl': "24px";
86
+ readonly full: "9999px";
87
+ };
88
+ declare const shadows: {
89
+ readonly sm: "0 1px 2px rgba(0, 0, 0, 0.3)";
90
+ readonly md: "0 4px 6px rgba(0, 0, 0, 0.4)";
91
+ readonly lg: "0 10px 15px rgba(0, 0, 0, 0.5)";
92
+ readonly xl: "0 20px 25px rgba(0, 0, 0, 0.6)";
93
+ readonly glow: {
94
+ readonly sm: "0 0 10px rgba(204, 255, 0, 0.2)";
95
+ readonly md: "0 0 20px rgba(204, 255, 0, 0.3)";
96
+ readonly lg: "0 0 30px rgba(204, 255, 0, 0.5)";
97
+ };
98
+ readonly panel: "0 25px 50px rgba(0, 0, 0, 0.5)";
99
+ };
100
+ declare const typography: {
101
+ readonly fontFamily: {
102
+ readonly sans: "system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif";
103
+ readonly mono: "ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace";
104
+ };
105
+ readonly fontSize: {
106
+ readonly xs: "12px";
107
+ readonly sm: "14px";
108
+ readonly base: "16px";
109
+ readonly lg: "18px";
110
+ readonly xl: "20px";
111
+ readonly '2xl': "24px";
112
+ };
113
+ readonly lineHeight: {
114
+ readonly tight: "1.25";
115
+ readonly normal: "1.5";
116
+ readonly relaxed: "1.75";
117
+ };
118
+ };
119
+ declare const keyframes: {
120
+ readonly slideUp: {
121
+ readonly from: {
122
+ readonly opacity: "0";
123
+ readonly transform: "translateY(20px)";
124
+ };
125
+ readonly to: {
126
+ readonly opacity: "1";
127
+ readonly transform: "translateY(0)";
128
+ };
129
+ };
130
+ readonly fadeIn: {
131
+ readonly from: {
132
+ readonly opacity: "0";
133
+ readonly transform: "translateY(10px)";
134
+ };
135
+ readonly to: {
136
+ readonly opacity: "1";
137
+ readonly transform: "translateY(0)";
138
+ };
139
+ };
140
+ readonly blink: {
141
+ readonly '0%, 50%': {
142
+ readonly opacity: "1";
143
+ };
144
+ readonly '51%, 100%': {
145
+ readonly opacity: "0";
146
+ };
147
+ };
148
+ readonly bounce: {
149
+ readonly '0%, 80%, 100%': {
150
+ readonly transform: "scale(0)";
151
+ };
152
+ readonly '40%': {
153
+ readonly transform: "scale(1)";
154
+ };
155
+ };
156
+ readonly pulse: {
157
+ readonly '0%, 100%': {
158
+ readonly opacity: "1";
159
+ };
160
+ readonly '50%': {
161
+ readonly opacity: "0.5";
162
+ };
163
+ };
164
+ readonly glowPulse: {
165
+ readonly '0%, 100%': {
166
+ readonly boxShadow: "0 0 20px rgba(204, 255, 0, 0.3)";
167
+ };
168
+ readonly '50%': {
169
+ readonly boxShadow: "0 0 40px rgba(204, 255, 0, 0.5)";
170
+ };
171
+ };
172
+ };
173
+ declare const keyframesCss: {
174
+ readonly slideUp: "\n @keyframes ash-slide-up {\n from { opacity: 0; transform: translateY(20px); }\n to { opacity: 1; transform: translateY(0); }\n }\n ";
175
+ readonly fadeIn: "\n @keyframes ash-fade-in {\n from { opacity: 0; transform: translateY(10px); }\n to { opacity: 1; transform: translateY(0); }\n }\n ";
176
+ readonly blink: "\n @keyframes ash-blink {\n 0%, 50% { opacity: 1; }\n 51%, 100% { opacity: 0; }\n }\n ";
177
+ readonly bounce: "\n @keyframes ash-bounce {\n 0%, 80%, 100% { transform: scale(0); }\n 40% { transform: scale(1); }\n }\n ";
178
+ readonly pulse: "\n @keyframes ash-pulse {\n 0%, 100% { opacity: 1; }\n 50% { opacity: 0.5; }\n }\n ";
179
+ readonly glowPulse: "\n @keyframes ash-glow-pulse {\n 0%, 100% { box-shadow: 0 0 20px rgba(204, 255, 0, 0.3); }\n 50% { box-shadow: 0 0 40px rgba(204, 255, 0, 0.5); }\n }\n ";
180
+ };
181
+ declare const allKeyframesCss: string;
182
+ declare const transitions: {
183
+ readonly fast: "150ms ease-out";
184
+ readonly normal: "300ms ease-out";
185
+ readonly slow: "500ms ease-out";
186
+ readonly spring: "400ms cubic-bezier(0.16, 1, 0.3, 1)";
187
+ };
188
+ declare const zIndex: {
189
+ readonly base: 0;
190
+ readonly dropdown: 100;
191
+ readonly modal: 200;
192
+ readonly tooltip: 300;
193
+ readonly widget: 999999;
194
+ };
195
+ declare const widget: {
196
+ readonly launcher: {
197
+ readonly size: "60px";
198
+ readonly iconSize: "28px";
199
+ };
200
+ readonly panel: {
201
+ readonly width: "400px";
202
+ readonly height: "600px";
203
+ readonly maxHeight: "80vh";
204
+ };
205
+ readonly header: {
206
+ readonly height: "60px";
207
+ };
208
+ readonly input: {
209
+ readonly minHeight: "60px";
210
+ readonly maxHeight: "150px";
211
+ };
212
+ readonly message: {
213
+ readonly maxWidth: "85%";
214
+ readonly avatarSize: "32px";
215
+ };
216
+ readonly gap: "20px";
217
+ };
218
+ declare function tokensToCssVariables(prefix?: string): Record<string, string>;
219
+ declare const inlineStyles: {
220
+ readonly glassPanel: {
221
+ readonly backgroundColor: "rgba(255, 255, 255, 0.05)";
222
+ readonly backdropFilter: "blur(24px)";
223
+ readonly WebkitBackdropFilter: "blur(24px)";
224
+ readonly border: "1px solid rgba(255, 255, 255, 0.1)";
225
+ };
226
+ readonly accentButton: {
227
+ readonly backgroundColor: "#ccff00";
228
+ readonly color: "#000000";
229
+ readonly border: "1px solid #ccff00";
230
+ readonly boxShadow: "0 0 20px rgba(204, 255, 0, 0.3)";
231
+ };
232
+ readonly ghostButton: {
233
+ readonly backgroundColor: "transparent";
234
+ readonly color: "rgba(255, 255, 255, 0.7)";
235
+ readonly border: "1px solid transparent";
236
+ };
237
+ readonly userMessage: {
238
+ readonly backgroundColor: "rgba(204, 255, 0, 0.1)";
239
+ readonly border: "1px solid rgba(204, 255, 0, 0.2)";
240
+ readonly borderRadius: "16px";
241
+ };
242
+ readonly assistantMessage: {
243
+ readonly backgroundColor: "rgba(255, 255, 255, 0.05)";
244
+ readonly border: "1px solid rgba(255, 255, 255, 0.1)";
245
+ readonly borderRadius: "16px";
246
+ };
247
+ };
248
+ type Colors = typeof colors;
249
+ type Spacing = typeof spacing;
250
+ type BorderRadius = typeof borderRadius;
251
+ type Shadows = typeof shadows;
252
+ type Typography = typeof typography;
253
+ type Keyframes = typeof keyframes;
254
+ type Transitions = typeof transitions;
255
+ type ZIndex = typeof zIndex;
256
+ type Widget = typeof widget;
257
+
258
+ export { type BorderRadius, type Colors, type Keyframes, type Shadows, type Spacing, type Transitions, type Typography, type Widget, type ZIndex, allKeyframesCss, borderRadius, colors, inlineStyles, keyframes, keyframesCss, shadows, spacing, tokensToCssVariables, transitions, typography, widget, zIndex };