app-studio 0.7.2 → 0.7.5

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/docs/Theming.md CHANGED
@@ -7,14 +7,14 @@ Theming is an essential part of any application. It allows you to maintain a con
7
7
  App-Studio provides an extensive color system with three types of colors:
8
8
 
9
9
  ### 1. Singleton Colors (Basic Colors)
10
- These are simple named colors accessible via `color.{name}`:
10
+ These are simple named colors accessible via `color-{name}`:
11
11
 
12
12
  - **Basic Colors**: `white`, `black`, `red`, `green`, `blue`, `yellow`, `cyan`, `magenta`, `grey`, `orange`, `brown`, `purple`, `pink`, `lime`, `teal`, `navy`, `olive`, `maroon`, `gold`, `silver`, `indigo`, `violet`, `beige`, `turquoise`, `coral`, `chocolate`, `skyBlue`, `plum`, `darkGreen`, `salmon`
13
13
 
14
- **Usage**: `color.white`, `color.gold`, `color.turquoise`
14
+ **Usage**: `color-white`, `color-gold`, `color-turquoise`
15
15
 
16
16
  ### 2. Color Palettes (Shaded Colors)
17
- Each palette has 9 shades (50, 100, 200, 300, 400, 500, 600, 700, 800, 900) accessible via `color.{palette}.{shade}`:
17
+ Each palette has 9 shades (50, 100, 200, 300, 400, 500, 600, 700, 800, 900) accessible via `color-{palette}-{shade}`:
18
18
 
19
19
  **Available Palettes**:
20
20
  - **Alpha Channels**: `whiteAlpha`, `blackAlpha` - RGBA colors with varying opacity
@@ -25,56 +25,84 @@ Each palette has 9 shades (50, 100, 200, 300, 400, 500, 600, 700, 800, 900) acce
25
25
  - **Greens**: `teal`, `emerald`, `green`, `lime`
26
26
  - **Yellows & Oranges**: `yellow`, `amber`, `orange`
27
27
 
28
- **Usage**: `color.blue.500`, `color.rose.200`, `color.gray.800`
28
+ **Usage**: `color-blue-500`, `color-rose-200`, `color-gray-800`
29
29
 
30
30
  ### 3. Theme Colors
31
- Custom theme colors defined in your theme configuration, accessible via `theme.{path}`:
31
+ Custom theme colors defined in your theme configuration, accessible via `theme-{path}`:
32
32
 
33
33
  **Default Theme Colors**:
34
- - `theme.primary` - Main brand color (default: black)
35
- - `theme.secondary` - Secondary brand color (default: blue)
36
- - `theme.success` - Success state color (default: green.500)
37
- - `theme.error` - Error state color (default: red.500)
38
- - `theme.warning` - Warning state color (default: orange.500)
39
- - `theme.disabled` - Disabled state color (default: gray.500)
40
- - `theme.loading` - Loading state color (default: dark.500)
34
+ - `theme-primary` - Main brand color (default: black)
35
+ - `theme-secondary` - Secondary brand color (default: blue)
36
+ - `theme-success` - Success state color (default: green.500)
37
+ - `theme-error` - Error state color (default: red.500)
38
+ - `theme-warning` - Warning state color (default: orange.500)
39
+ - `theme-disabled` - Disabled state color (default: gray.500)
40
+ - `theme-loading` - Loading state color (default: dark-500)
41
41
 
42
- You can extend these with custom theme paths like `theme.button.background` or `theme.header.text`.
42
+ You can extend these with custom theme paths like `theme-button-background` or `theme-header-text`.
43
43
 
44
- ### 4. Mode-Specific Colors
45
- Access light or dark mode colors directly, regardless of current theme:
44
+ **Theme Colors with Alpha Transparency**:
46
45
 
47
- - **Light Mode**: `light.{colorName}` or `light.{palette}.{shade}`
48
- - **Dark Mode**: `dark.{colorName}` or `dark.{palette}.{shade}`
46
+ You can add alpha transparency to any theme color by appending a numeric value (0-1000):
49
47
 
50
- **Usage**: `light.white`, `dark.blue.500`, `light.gray.100`
48
+ **Syntax**: `theme-{key}-{alpha}`
51
49
 
52
- ### Color System Hierarchy
50
+ **Examples**:
51
+ - `theme-primary-100` → Primary color with 10% opacity
52
+ - `theme-primary-500` → Primary color with 50% opacity
53
+ - `theme-secondary-200` → Secondary color with 20% opacity
54
+ - `theme-error-300` → Error color with 30% opacity
55
+
56
+ This is especially useful for creating subtle backgrounds, overlays, or hover states using your theme colors:
57
+
58
+ ```javascript
59
+ <View backgroundColor="theme-primary-100" padding={20}>
60
+ <Text color="theme-primary">Subtle primary background</Text>
61
+ </View>
62
+
63
+ <Button
64
+ backgroundColor="theme-secondary"
65
+ >
66
+ Hover me
67
+ </Button>
53
68
  ```
54
- color.* → Direct color access (current theme mode)
55
- ├─ color.white → Singleton colors
56
- └─ color.blue.500 → Palette colors with shades
57
69
 
58
- theme.* → Custom theme configuration
59
- ├─ theme.primary
60
- └─ theme.button.background
70
+ ### 4. Mode-Specific Colors
71
+ Access light or dark mode colors directly, regardless of current theme:
72
+
73
+ - **Light Mode**: `light-{colorName}` or `light-{palette}-{shade}`
74
+ - **Dark Mode**: `dark-{colorName}` or `dark-{palette}-{shade}`
61
75
 
62
- light.* → Always use light mode colors
63
- ├─ light.white
64
- └─ light.blue.500
76
+ **Usage**: `light-white`, `dark-blue-500`, `light-gray-100`
65
77
 
66
- dark.* → Always use dark mode colors
67
- ├─ dark.white
68
- └─ dark.red.200
78
+ ### Color System Hierarchy
79
+ ```
80
+ color-* → Direct color access (current theme mode)
81
+ ├─ color-white → Singleton colors
82
+ ├─ color-blue-500 → Palette colors with shades
83
+ └─ color-blue-500-200 → Palette colors with alpha (20% opacity)
84
+
85
+ theme-* → Custom theme configuration
86
+ ├─ theme-primary → Theme color
87
+ ├─ theme-primary-100 → Theme color with alpha (10% opacity)
88
+ └─ theme-button-background → Nested theme path
89
+
90
+ light-* → Always use light mode colors
91
+ ├─ light-white
92
+ └─ light-blue-500
93
+
94
+ dark-* → Always use dark mode colors
95
+ ├─ dark-white
96
+ └─ dark-red-200
69
97
  ```
70
98
 
71
99
  ### 5. Alpha Transparency (4th Parameter)
72
100
 
73
101
  Add dynamic transparency to any palette color using a 4th parameter. The alpha value ranges from 0-1000, which maps to CSS opacity percentages (0%-100%).
74
102
 
75
- **Syntax**: `color.{palette}.{shade}.{alpha}`
103
+ **Syntax**: `color-{palette}-{shade}-{alpha}`
76
104
 
77
- **Alpha Value Range**:
105
+ **Alpha Value Range**:
78
106
  - `0` = fully transparent (0% opacity)
79
107
  - `500` = semi-transparent (50% opacity)
80
108
  - `1000` = fully opaque (100% opacity)
@@ -86,9 +114,9 @@ Instead of computing RGBA values in JavaScript, App-Studio uses the modern CSS `
86
114
  - **Standards-based**: Uses native CSS color functions
87
115
 
88
116
  **Examples**:
89
- - `color.black.900.200` → `color-mix(in srgb, var(--color-black-900) 20%, transparent)` - Black with 20% opacity
90
- - `color.blue.500.500` → `color-mix(in srgb, var(--color-blue-500) 50%, transparent)` - Blue.500 with 50% opacity
91
- - `color.red.600.800` → `color-mix(in srgb, var(--color-red-600) 80%, transparent)` - Red.600 with 80% opacity
117
+ - `color-black-900-200` → `color-mix(in srgb, var(--color-black-900) 20%, transparent)` - Black with 20% opacity
118
+ - `color-blue-500-500` → `color-mix(in srgb, var(--color-blue-500) 50%, transparent)` - Blue-500 with 50% opacity
119
+ - `color-red-600-800` → `color-mix(in srgb, var(--color-red-600) 80%, transparent)` - Red-600 with 80% opacity
92
120
 
93
121
  **Use Cases**:
94
122
  - Create semi-transparent overlays without defining new alpha color palettes
@@ -98,13 +126,13 @@ Instead of computing RGBA values in JavaScript, App-Studio uses the modern CSS `
98
126
 
99
127
  ```javascript
100
128
  // Semi-transparent overlay
101
- <View backgroundColor="color.black.900.300" padding={20}>
102
- <Text color="color.white">30% opacity black overlay</Text>
129
+ <View backgroundColor="color-black-900-300" padding={20}>
130
+ <Text color="color-white">30% opacity black overlay</Text>
103
131
  </View>
104
132
 
105
133
  // Glassmorphism card
106
- <View
107
- backgroundColor="color.gray.100.200"
134
+ <View
135
+ backgroundColor="color-gray-100-200"
108
136
  backdropFilter="blur(10px)"
109
137
  padding={20}
110
138
  >
@@ -112,8 +140,8 @@ Instead of computing RGBA values in JavaScript, App-Studio uses the modern CSS `
112
140
  </View>
113
141
 
114
142
  // Gradient with alpha colors (CSS variables!)
115
- <View
116
- background="linear-gradient(135deg, color.red.500.200 0%, color.blue.500.1000 100%)"
143
+ <View
144
+ background="linear-gradient(135deg, color-red-500-200 0%, color-blue-500-1000 100%)"
117
145
  padding={20}
118
146
  >
119
147
  <Text>Gradient with variable-based alpha colors</Text>
@@ -238,10 +266,10 @@ Now that the theme is available, you can use it in your components. All color re
238
266
  App-Studio supports multiple ways to reference colors:
239
267
 
240
268
  1. **Direct Color Values**: `"#fff"`, `"rgb(255,0,0)"`, `"transparent"`
241
- 2. **Singleton Colors**: `"color.white"`, `"color.gold"`, `"color.turquoise"`
242
- 3. **Palette Colors**: `"color.blue.500"`, `"color.rose.200"`, `"color.gray.800"`
243
- 4. **Theme Colors**: `"theme.primary"`, `"theme.button.background"`
244
- 5. **Mode-Specific Colors**: `"light.white"`, `"dark.blue.500"`
269
+ 2. **Singleton Colors**: `"color-white"`, `"color-gold"`, `"color-turquoise"`
270
+ 3. **Palette Colors**: `"color-blue-500"`, `"color-rose-200"`, `"color-gray-800"`
271
+ 4. **Theme Colors**: `"theme-primary"`, `"theme-button-background"`
272
+ 5. **Mode-Specific Colors**: `"light-white"`, `"dark-blue-500"`
245
273
 
246
274
  ### Examples
247
275
 
@@ -251,23 +279,23 @@ import { Button } from '@app-studio/web';
251
279
 
252
280
  function Example() {
253
281
  return (
254
- <View backgroundColor="color.blue">
282
+ <View backgroundColor="color-blue">
255
283
  {/* Using palette colors with shades */}
256
- <View backgroundColor="color.blueGray.500">
257
- <Text color="theme.primary">Hello</Text>
284
+ <View backgroundColor="color-blueGray-500">
285
+ <Text color="theme-primary">Hello</Text>
258
286
  </View>
259
287
 
260
288
  {/* Using theme colors */}
261
- <Button backgroundColor="theme.button.background">Hello</Button>
289
+ <Button backgroundColor="theme-button-background">Hello</Button>
262
290
 
263
291
  {/* Using singleton colors */}
264
- <View backgroundColor="color.turquoise" padding={10}>
265
- <Text color="color.white">Turquoise Background</Text>
292
+ <View backgroundColor="color-turquoise" padding={10}>
293
+ <Text color="color-white">Turquoise Background</Text>
266
294
  </View>
267
295
 
268
296
  {/* Using alpha colors for transparency */}
269
- <View backgroundColor="color.blackAlpha.500">
270
- <Text color="color.whiteAlpha.900">Semi-transparent</Text>
297
+ <View backgroundColor="color-blackAlpha-500">
298
+ <Text color="color-whiteAlpha-900">Semi-transparent</Text>
271
299
  </View>
272
300
  </View>
273
301
  );
@@ -279,54 +307,54 @@ function Example() {
279
307
  Each palette below has shades: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900
280
308
 
281
309
  **Alpha Transparency**:
282
- - `color.whiteAlpha.{shade}` - White with alpha (rgba)
283
- - `color.blackAlpha.{shade}` - Black with alpha (rgba)
310
+ - `color-whiteAlpha-{shade}` - White with alpha (rgba)
311
+ - `color-blackAlpha-{shade}` - Black with alpha (rgba)
284
312
 
285
313
  **Neutral Colors**:
286
- - `color.white.{shade}` - White to light gray scale
287
- - `color.black.{shade}` - Black to dark gray scale
288
- - `color.gray.{shade}` - True gray scale
289
- - `color.slate.{shade}` - Cool gray with blue undertones
290
- - `color.zinc.{shade}` - Neutral gray scale
291
- - `color.neutral.{shade}` - True neutral gray
292
- - `color.stone.{shade}` - Warm gray with brown undertones
293
- - `color.dark.{shade}` - Dark neutral scale
294
- - `color.light.{shade}` - Light neutral scale
295
- - `color.warmGray.{shade}` - Warm gray tones
296
- - `color.trueGray.{shade}` - True neutral gray (legacy)
297
- - `color.coolGray.{shade}` - Cool gray tones
298
- - `color.blueGray.{shade}` - Blue-tinted gray
314
+ - `color-white-{shade}` - White to light gray scale
315
+ - `color-black-{shade}` - Black to dark gray scale
316
+ - `color-gray-{shade}` - True gray scale
317
+ - `color-slate-{shade}` - Cool gray with blue undertones
318
+ - `color-zinc-{shade}` - Neutral gray scale
319
+ - `color-neutral-{shade}` - True neutral gray
320
+ - `color-stone-{shade}` - Warm gray with brown undertones
321
+ - `color-dark-{shade}` - Dark neutral scale
322
+ - `color-light-{shade}` - Light neutral scale
323
+ - `color-warmGray-{shade}` - Warm gray tones
324
+ - `color-trueGray-{shade}` - True neutral gray (legacy)
325
+ - `color-coolGray-{shade}` - Cool gray tones
326
+ - `color-blueGray-{shade}` - Blue-tinted gray
299
327
 
300
328
  **Red & Pink Family**:
301
- - `color.rose.{shade}` - Rose pink tones
302
- - `color.pink.{shade}` - Pink tones
303
- - `color.red.{shade}` - Red tones
329
+ - `color-rose-{shade}` - Rose pink tones
330
+ - `color-pink-{shade}` - Pink tones
331
+ - `color-red-{shade}` - Red tones
304
332
 
305
333
  **Purple Family**:
306
- - `color.fuchsia.{shade}` - Bright purple-pink
307
- - `color.purple.{shade}` - Purple tones
308
- - `color.violet.{shade}` - Violet tones
334
+ - `color-fuchsia-{shade}` - Bright purple-pink
335
+ - `color-purple-{shade}` - Purple tones
336
+ - `color-violet-{shade}` - Violet tones
309
337
 
310
338
  **Blue Family**:
311
- - `color.indigo.{shade}` - Deep blue-purple
312
- - `color.blue.{shade}` - Blue tones
313
- - `color.lightBlue.{shade}` - Light blue tones
314
- - `color.cyan.{shade}` - Cyan tones
339
+ - `color-indigo-{shade}` - Deep blue-purple
340
+ - `color-blue-{shade}` - Blue tones
341
+ - `color-lightBlue-{shade}` - Light blue tones
342
+ - `color-cyan-{shade}` - Cyan tones
315
343
 
316
344
  **Green Family**:
317
- - `color.teal.{shade}` - Teal (blue-green)
318
- - `color.emerald.{shade}` - Emerald green
319
- - `color.green.{shade}` - Green tones
320
- - `color.lime.{shade}` - Lime green
345
+ - `color-teal-{shade}` - Teal (blue-green)
346
+ - `color-emerald-{shade}` - Emerald green
347
+ - `color-green-{shade}` - Green tones
348
+ - `color-lime-{shade}` - Lime green
321
349
 
322
350
  **Yellow & Orange Family**:
323
- - `color.yellow.{shade}` - Yellow tones
324
- - `color.amber.{shade}` - Amber (orange-yellow)
325
- - `color.orange.{shade}` - Orange tones
351
+ - `color-yellow-{shade}` - Yellow tones
352
+ - `color-amber-{shade}` - Amber (orange-yellow)
353
+ - `color-orange-{shade}` - Orange tones
326
354
 
327
355
  ### Accessing Specific Theme Mode Colors
328
356
 
329
- You can directly access colors from a specific theme mode regardless of the current theme mode using the `light.` or `dark.` prefix:
357
+ You can directly access colors from a specific theme mode regardless of the current theme mode using the `light-` or `dark-` prefix:
330
358
 
331
359
  ```javascript
332
360
  import { View, Text } from 'app-studio';
@@ -335,11 +363,11 @@ function Example() {
335
363
  return (
336
364
  <View>
337
365
  {/* Always use light mode white color regardless of current theme mode */}
338
- <Text color="light.white">Always light mode white</Text>
366
+ <Text color="light-white">Always light mode white</Text>
339
367
 
340
- {/* Always use dark mode red.200 color regardless of current theme mode */}
341
- <View backgroundColor="dark.red.200">
342
- <Text>Always dark mode red.200 background</Text>
368
+ {/* Always use dark mode red-200 color regardless of current theme mode */}
369
+ <View backgroundColor="dark-red-200">
370
+ <Text>Always dark mode red-200 background</Text>
343
371
  </View>
344
372
  </View>
345
373
  );
@@ -350,7 +378,7 @@ This is useful when you need to access a specific theme mode's color regardless
350
378
 
351
379
  ### Direct Theme Color Access
352
380
 
353
- App-Studio allows you to directly call theme colors using a simple dot notation format. This makes your code more readable and maintainable:
381
+ App-Studio allows you to directly call theme colors using dash notation format. This makes your code more readable and maintainable:
354
382
 
355
383
  ```javascript
356
384
  import { View, Text } from 'app-studio';
@@ -359,21 +387,21 @@ function Example() {
359
387
  return (
360
388
  <View>
361
389
  {/* Access light theme colors directly */}
362
- <Text color="light.white">White text in light mode</Text>
363
- <View backgroundColor="light.blue.500">
390
+ <Text color="light-white">White text in light mode</Text>
391
+ <View backgroundColor="light-blue-500">
364
392
  <Text>Light blue background</Text>
365
393
  </View>
366
394
 
367
395
  {/* Access dark theme colors directly */}
368
- <Text color="dark.white">White text in dark mode</Text>
369
- <View backgroundColor="dark.red.200">
396
+ <Text color="dark-white">White text in dark mode</Text>
397
+ <View backgroundColor="dark-red-200">
370
398
  <Text>Dark red background</Text>
371
399
  </View>
372
400
 
373
401
  {/* Mix and match in the same component */}
374
402
  <View
375
- backgroundColor="light.gray.100"
376
- borderColor="dark.gray.800"
403
+ backgroundColor="light-gray-100"
404
+ borderColor="dark-gray-800"
377
405
  borderWidth={1}
378
406
  >
379
407
  <Text>Mixed theme colors</Text>
@@ -383,7 +411,7 @@ function Example() {
383
411
  }
384
412
  ```
385
413
 
386
- This direct access syntax works with all color-related properties and can be used with both singleton colors (like `white`, `black`) and palette colors (like `red.200`, `blue.500`). It provides a convenient way to reference specific theme colors without having to use the `getColor` function from the `useTheme` hook.
414
+ This direct access syntax works with all color-related properties and can be used with both singleton colors (like `white`, `black`) and palette colors (like `red-200`, `blue-500`). It provides a convenient way to reference specific theme colors without having to use the `getColor` function from the `useTheme` hook.
387
415
 
388
416
  ### Smart Text Contrast
389
417
 
@@ -449,19 +477,19 @@ import { ThemeProvider, View, Text, Button } from 'app-studio';
449
477
  // Custom theme configuration
450
478
  const theme = {
451
479
  main: {
452
- primary: 'color.blue.600', // References a palette color
453
- secondary: 'color.purple.500',
454
- accent: 'color.orange.400'
480
+ primary: 'color-blue-600', // References a palette color
481
+ secondary: 'color-purple-500',
482
+ accent: 'color-orange-400'
455
483
  },
456
484
  components: {
457
485
  button: {
458
- background: 'color.emerald.500',
459
- text: 'color.white',
460
- disabled: 'color.gray.400'
486
+ background: 'color-emerald-500',
487
+ text: 'color-white',
488
+ disabled: 'color-gray-400'
461
489
  },
462
490
  card: {
463
- background: 'color.white',
464
- border: 'color.gray.200'
491
+ background: 'color-white',
492
+ border: 'color-gray-200'
465
493
  }
466
494
  }
467
495
  };
@@ -493,40 +521,40 @@ function Example() {
493
521
  return (
494
522
  <ThemeProvider theme={theme} colors={customColors} mode="light">
495
523
  {/* Using theme colors */}
496
- <View backgroundColor="theme.components.card.background" padding={20}>
497
- <Text color="theme.main.primary" fontSize={24}>
524
+ <View backgroundColor="theme-components-card-background" padding={20}>
525
+ <Text color="theme-main-primary" fontSize={24}>
498
526
  Primary Theme Color
499
527
  </Text>
500
528
 
501
529
  {/* Using palette colors directly */}
502
- <View backgroundColor="color.rose.100" padding={10} marginTop={10}>
503
- <Text color="color.rose.900">Rose palette color</Text>
530
+ <View backgroundColor="color-rose-100" padding={10} marginTop={10}>
531
+ <Text color="color-rose-900">Rose palette color</Text>
504
532
  </View>
505
533
 
506
534
  {/* Using singleton colors */}
507
- <View backgroundColor="color.turquoise" padding={10} marginTop={10}>
508
- <Text color="color.white">Turquoise singleton</Text>
535
+ <View backgroundColor="color-turquoise" padding={10} marginTop={10}>
536
+ <Text color="color-white">Turquoise singleton</Text>
509
537
  </View>
510
538
 
511
539
  {/* Using custom colors */}
512
- <View backgroundColor="color.brand" padding={10} marginTop={10}>
513
- <Text color="color.white">Custom brand color</Text>
540
+ <View backgroundColor="color-brand" padding={10} marginTop={10}>
541
+ <Text color="color-white">Custom brand color</Text>
514
542
  </View>
515
543
 
516
544
  {/* Using mode-specific colors */}
517
- <View backgroundColor="light.gray.100" padding={10} marginTop={10}>
518
- <Text color="dark.gray.900">Always light background, dark text</Text>
545
+ <View backgroundColor="light-gray-100" padding={10} marginTop={10}>
546
+ <Text color="dark-gray-900">Always light background, dark text</Text>
519
547
  </View>
520
548
 
521
549
  {/* Using alpha transparency */}
522
- <View backgroundColor="color.blackAlpha.500" padding={10} marginTop={10}>
523
- <Text color="color.whiteAlpha.900">Semi-transparent overlay</Text>
550
+ <View backgroundColor="color-blackAlpha-500" padding={10} marginTop={10}>
551
+ <Text color="color-whiteAlpha-900">Semi-transparent overlay</Text>
524
552
  </View>
525
553
 
526
554
  {/* Button using theme */}
527
555
  <Button
528
- backgroundColor="theme.components.button.background"
529
- color="theme.components.button.text"
556
+ backgroundColor="theme-components-button-background"
557
+ color="theme-components-button-text"
530
558
  >
531
559
  Themed Button
532
560
  </Button>
@@ -542,32 +570,37 @@ When working with colors in App-Studio, use these patterns:
542
570
 
543
571
  ### Color Access Patterns
544
572
  ```javascript
545
- // Pattern: color.{name}
546
- "color.white" // → "#FFFFFF" (in light mode) or "#000000" (in dark mode)
547
- "color.gold" // → "#FFD700"
548
- "color.turquoise" // → "#40E0D0"
549
-
550
- // Pattern: color.{palette}.{shade}
551
- "color.blue.500" // → "#3b82f6" (light) or "#60a5fa" (dark)
552
- "color.rose.200" // → "#fecdd3" (light) or "#6b112f" (dark)
553
- "color.gray.800" // → "#27272a" (light) or "#f4f4f5" (dark)
554
-
555
- // Pattern: color.{palette}.{shade}.{alpha} (CSS color-mix!)
556
- "color.black.900.200" // → "color-mix(in srgb, var(--color-black-900) 20%, transparent)"
557
- "color.blue.500.500" // → "color-mix(in srgb, var(--color-blue-500) 50%, transparent)"
558
- "color.red.600.800" // → "color-mix(in srgb, var(--color-red-600) 80%, transparent)"
559
-
560
- // Pattern: theme.{path}
561
- "theme.primary" // → Resolves to your theme's primary color
562
- "theme.button.background" // → Resolves to nested theme path
563
-
564
- // Pattern: light.{name} or light.{palette}.{shade}
565
- "light.white" // → Always "#FFFFFF" (light mode)
566
- "light.blue.500" // → Always "#3b82f6" (light mode value)
567
-
568
- // Pattern: dark.{name} or dark.{palette}.{shade}
569
- "dark.white" // Always "#000000" (dark mode white)
570
- "dark.red.200" // → Always "#6b112f" (dark mode value)
573
+ // Pattern: color-{name}
574
+ "color-white" // → "#FFFFFF" (in light mode) or "#000000" (in dark mode)
575
+ "color-gold" // → "#FFD700"
576
+ "color-turquoise" // → "#40E0D0"
577
+
578
+ // Pattern: color-{palette}-{shade}
579
+ "color-blue-500" // → "#3b82f6" (light) or "#60a5fa" (dark)
580
+ "color-rose-200" // → "#fecdd3" (light) or "#6b112f" (dark)
581
+ "color-gray-800" // → "#27272a" (light) or "#f4f4f5" (dark)
582
+
583
+ // Pattern: color-{palette}-{shade}-{alpha} (CSS color-mix!)
584
+ "color-black-900-200" // → "color-mix(in srgb, var(--color-black-900) 20%, transparent)"
585
+ "color-blue-500-500" // → "color-mix(in srgb, var(--color-blue-500) 50%, transparent)"
586
+ "color-red-600-800" // → "color-mix(in srgb, var(--color-red-600) 80%, transparent)"
587
+
588
+ // Pattern: theme-{path}
589
+ "theme-primary" // → Resolves to your theme's primary color
590
+ "theme-button-background" // → Resolves to nested theme path
591
+
592
+ // Pattern: theme-{key}-{alpha} (CSS color-mix!)
593
+ "theme-primary-100" // → "color-mix(in srgb, var(--theme-primary) 10%, transparent)"
594
+ "theme-primary-500" // → "color-mix(in srgb, var(--theme-primary) 50%, transparent)"
595
+ "theme-secondary-200" // → "color-mix(in srgb, var(--theme-secondary) 20%, transparent)"
596
+
597
+ // Pattern: light-{name} or light-{palette}-{shade}
598
+ "light-white" // → Always "#FFFFFF" (light mode)
599
+ "light-blue-500" // → Always "#3b82f6" (light mode value)
600
+
601
+ // Pattern: dark-{name} or dark-{palette}-{shade}
602
+ "dark-white" // → Always "#000000" (dark mode white)
603
+ "dark-red-200" // → Always "#6b112f" (dark mode value)
571
604
 
572
605
  // Direct values (unchanged)
573
606
  "#ff0000" // → "#ff0000"
@@ -594,13 +627,13 @@ coolGray, blueGray, slate, zinc, neutral, stone
594
627
  ### Shades Available
595
628
  Each palette has these shades: `50, 100, 200, 300, 400, 500, 600, 700, 800, 900`
596
629
 
597
- **Note**: For a `1000` shade (fully opaque), use the alpha parameter: `color.{palette}.900.1000`
630
+ **Note**: For a `1000` shade (fully opaque), use the alpha parameter: `color-{palette}-900-1000`
598
631
 
599
632
  ### Theme Mode Behavior
600
633
  - **Light Mode**: Uses `defaultLightPalette` and `defaultLightColors`
601
634
  - **Dark Mode**: Uses `defaultDarkPalette` and `defaultDarkColors`
602
- - Colors automatically switch based on `themeMode` unless using `light.*` or `dark.*` prefix
603
- - Color values are inverted for dark mode (e.g., `color.white` becomes black in dark mode)
635
+ - Colors automatically switch based on `themeMode` unless using `light-*` or `dark-*` prefix
636
+ - Color values are inverted for dark mode (e.g., `color-white` becomes black in dark mode)
604
637
 
605
638
  ## Using Colors with Animations
606
639
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.2",
2
+ "version": "0.7.5",
3
3
  "name": "app-studio",
4
4
  "description": "App Studio is a responsive and themeable framework to build cross platform applications",
5
5
  "repository": "git@github.com:rize-network/app-studio.git",