@spear-ai/spectral 1.4.33 → 1.4.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -31,11 +31,11 @@ Import Spectral's design tokens and component styles in your CSS:
31
31
  /* Your Tailwind imports */
32
32
  @import "tailwindcss";
33
33
 
34
- /* Spectral's design tokens and component styles */
35
- @import "@spear-ai/spectral/styles.css";
34
+ /* Import Spectral's theme - this MUST be processed by Tailwind */
35
+ @import "@spear-ai/spectral/theme.css";
36
36
  ```
37
37
 
38
- **Important:** Spectral's CSS should be imported AFTER your Tailwind imports so that the design tokens are available.
38
+ **Important:** The `@spear-ai/spectral/theme.css` import contains `@theme` blocks that define custom Tailwind utilities (like `bg-button-ghost-bg--hover`). Your bundler must process this file through Tailwind for the component styles to work correctly.
39
39
 
40
40
  ### Using Components
41
41
 
@@ -1,10 +1,7 @@
1
1
  @import './base-colors.css';
2
2
 
3
- /* Semantic color tokens - these reference the base colors from base-colors.css
4
- * Using :root instead of @theme so these work without Tailwind processing */
5
-
6
3
  /* dark default */
7
- :root {
4
+ @theme {
8
5
  --color-background: var(--horizon-color-neutral-950);
9
6
 
10
7
  --color-text-primary: var(--horizon-color-neutral-50);
@@ -1,7 +1,4 @@
1
- /* Theme variables and animations
2
- * Using :root instead of @theme so these work without Tailwind processing */
3
-
4
- :root {
1
+ @theme {
5
2
  --font-sans: 'Work Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji';
6
3
  --font-serif: 'Bitter', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
7
4
  --font-mono: 'Source Code Pro', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Courier New', monospace;
@@ -22,121 +19,121 @@
22
19
  --animate-fade-in-tabs-indicator: fade-in-tabs-indicator 0.3s ease-out;
23
20
  --animate-caret-blink: caret-blink 1.2s ease-out infinite;
24
21
  --animate-spin-around: spin-around 0.8s linear infinite;
25
- }
26
22
 
27
- @keyframes animate-in {
28
- from {
29
- opacity: 0;
30
- transform: scale(0.95);
31
- }
32
- to {
33
- opacity: 1;
34
- transform: scale(1);
23
+ @keyframes animate-in {
24
+ from {
25
+ opacity: 0;
26
+ transform: scale(0.95);
27
+ }
28
+ to {
29
+ opacity: 1;
30
+ transform: scale(1);
31
+ }
35
32
  }
36
- }
37
33
 
38
- @keyframes animate-out {
39
- from {
40
- opacity: 1;
41
- transform: scale(1);
42
- }
43
- to {
44
- opacity: 0;
45
- transform: scale(0.95);
34
+ @keyframes animate-out {
35
+ from {
36
+ opacity: 1;
37
+ transform: scale(1);
38
+ }
39
+ to {
40
+ opacity: 0;
41
+ transform: scale(0.95);
42
+ }
46
43
  }
47
- }
48
44
 
49
- @keyframes caret-blink {
50
- 0%, 70%, 100% {
51
- opacity: 1;
45
+ @keyframes caret-blink {
46
+ 0%, 70%, 100% {
47
+ opacity: 1;
48
+ }
49
+ 20%, 50% {
50
+ opacity: 0;
51
+ }
52
52
  }
53
- 20%, 50% {
54
- opacity: 0;
55
- }
56
- }
57
53
 
58
- @keyframes fade-in-0 {
59
- from {
60
- opacity: 0;
61
- }
62
- to {
63
- opacity: 1;
54
+ @keyframes fade-in-0 {
55
+ from {
56
+ opacity: 0;
57
+ }
58
+ to {
59
+ opacity: 1;
60
+ }
64
61
  }
65
- }
66
62
 
67
- @keyframes fade-out-0 {
68
- from {
69
- opacity: 1;
70
- }
71
- to {
72
- opacity: 0;
63
+ @keyframes fade-out-0 {
64
+ from {
65
+ opacity: 1;
66
+ }
67
+ to {
68
+ opacity: 0;
69
+ }
73
70
  }
74
- }
75
71
 
76
- @keyframes fade-in-tabs-indicator {
77
- from {
78
- opacity: 0;
79
- transform: translateY(-2rem);
72
+ @keyframes fade-in-tabs-indicator {
73
+ from {
74
+ opacity: 0;
75
+ transform: translateY(-2rem);
76
+ }
77
+ to {
78
+ opacity: 1;
79
+ transform: translateY(0);
80
+ }
80
81
  }
81
- to {
82
- opacity: 1;
83
- transform: translateY(0);
84
- }
85
- }
86
82
 
87
- @keyframes slide-down-from-top {
88
- from {
89
- transform: translateY(-100%);
90
- opacity: 0;
91
- scale: 0.95;
92
- }
93
- to {
94
- transform: translateY(0);
95
- opacity: 1;
96
- scale: 1;
83
+ @keyframes slide-down-from-top {
84
+ from {
85
+ transform: translateY(-100%);
86
+ opacity: 0;
87
+ scale: 0.95;
88
+ }
89
+ to {
90
+ transform: translateY(0);
91
+ opacity: 1;
92
+ scale: 1;
93
+ }
97
94
  }
98
- }
99
95
 
100
- @keyframes slide-up-to-top {
101
- from {
102
- transform: translateY(0);
103
- opacity: 1;
104
- scale: 1;
105
- }
106
- to {
107
- transform: translateY(-100%);
108
- opacity: 0;
109
- scale: 0.95;
96
+ @keyframes slide-up-to-top {
97
+ from {
98
+ transform: translateY(0);
99
+ opacity: 1;
100
+ scale: 1;
101
+ }
102
+ to {
103
+ transform: translateY(-100%);
104
+ opacity: 0;
105
+ scale: 0.95;
106
+ }
110
107
  }
111
- }
112
108
 
113
- @keyframes spin-around {
114
- 0% {
115
- transform: rotate(-90deg);
109
+ @keyframes spin-around {
110
+ 0% {
111
+ transform: rotate(-90deg);
112
+ }
113
+ 100% {
114
+ transform: rotate(270deg);
115
+ }
116
116
  }
117
- 100% {
118
- transform: rotate(270deg);
119
- }
120
- }
121
117
 
122
- @keyframes zoom-in-95 {
123
- from {
124
- opacity: 0;
125
- transform: translateX(-50%) translateY(-50%) scale(0.95);
126
- }
127
- to {
128
- opacity: 1;
129
- transform: translateX(-50%) translateY(-50%) scale(1);
118
+ @keyframes zoom-in-95 {
119
+ from {
120
+ opacity: 0;
121
+ transform: translateX(-50%) translateY(-50%) scale(0.95);
122
+ }
123
+ to {
124
+ opacity: 1;
125
+ transform: translateX(-50%) translateY(-50%) scale(1);
126
+ }
130
127
  }
131
- }
132
128
 
133
- @keyframes zoom-out-95 {
134
- from {
135
- opacity: 1;
136
- transform: translateX(-50%) translateY(-50%) scale(1);
137
- }
138
- to {
139
- opacity: 0;
140
- transform: translateX(-50%) translateY(-50%) scale(0.95);
129
+ @keyframes zoom-out-95 {
130
+ from {
131
+ opacity: 1;
132
+ transform: translateX(-50%) translateY(-50%) scale(1);
133
+ }
134
+ to {
135
+ opacity: 0;
136
+ transform: translateX(-50%) translateY(-50%) scale(0.95);
137
+ }
141
138
  }
142
139
  }
@@ -0,0 +1,24 @@
1
+ /* Spectral Theme - Import this file in your Tailwind CSS
2
+ *
3
+ * This file contains @theme blocks that Tailwind v4 needs to process
4
+ * to generate the utility classes used by Spectral components.
5
+ *
6
+ * Usage in Horizon globals.css:
7
+ * @import "tailwindcss";
8
+ * @import "@spear-ai/spectral/theme.css";
9
+ */
10
+
11
+ /* Base color primitives - these use :root and work as standard CSS */
12
+ @import './horizon/base-colors.css';
13
+
14
+ /* Semantic color tokens - these use @theme for Tailwind utility generation */
15
+ @import './horizon/colors.css';
16
+
17
+ /* Theme variables (fonts, animations) */
18
+ @import './horizon/theme.css';
19
+
20
+ /* Component base styles */
21
+ @import './horizon/base.css';
22
+
23
+ /* Custom utilities */
24
+ @import './horizon/utilities.css';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spear-ai/spectral",
3
- "version": "1.4.33",
3
+ "version": "1.4.35",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "repository": {