@barefootjs/cli 0.2.0 → 0.3.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,173 @@
1
+ /* CSS Cascade Layer ordering for UnoCSS + component class overrides.
2
+ * Priority (lowest → highest): preflights < base < shortcuts < components < default
3
+ * Base resets go into @layer base (above preflights, below component classes).
4
+ * Component base classes go into @layer components (via layer-components: prefix).
5
+ * User override classes stay in @layer default, so they always win. */
6
+ @layer preflights, base, shortcuts, components, default;
7
+
8
+ /* Theme transition - applied temporarily during theme switch */
9
+ html.theme-transition,
10
+ html.theme-transition *,
11
+ html.theme-transition *::before,
12
+ html.theme-transition *::after {
13
+ transition: background-color var(--duration-fast) var(--ease-default),
14
+ color var(--duration-fast) var(--ease-default),
15
+ border-color var(--duration-fast) var(--ease-default),
16
+ fill var(--duration-fast) var(--ease-default),
17
+ stroke var(--duration-fast) var(--ease-default) !important;
18
+ }
19
+
20
+ /* Reduced motion support */
21
+ @media (prefers-reduced-motion: reduce) {
22
+ *,
23
+ *::before,
24
+ *::after {
25
+ animation-duration: 0.01ms !important;
26
+ animation-iteration-count: 1 !important;
27
+ transition-duration: 0.01ms !important;
28
+ scroll-behavior: auto !important;
29
+ }
30
+ }
31
+
32
+ /* Base styles (Tailwind preflight compatible) — in @layer base
33
+ * so component classes (@layer components) can override these resets. */
34
+ @layer base {
35
+ *,
36
+ ::before,
37
+ ::after {
38
+ box-sizing: border-box;
39
+ border-width: 0;
40
+ border-style: solid;
41
+ /* border-color: var(--border) is set via UnoCSS custom preflight
42
+ * (uno.config.ts) to ensure it runs after preset-wind4's reset. */
43
+ }
44
+
45
+ body {
46
+ font-family: var(--font-sans);
47
+ background-color: var(--background);
48
+ color: var(--foreground);
49
+ line-height: 1.6;
50
+ -webkit-font-smoothing: antialiased;
51
+ -moz-osx-font-smoothing: grayscale;
52
+ }
53
+
54
+ /* Reset heading/block element browser margins (Tailwind preflight equivalent) */
55
+ h1, h2, h3, h4, h5, h6,
56
+ blockquote, dl, dd, figure, p, pre, hr {
57
+ margin: 0;
58
+ }
59
+
60
+ /* Reset anchor browser defaults */
61
+ a {
62
+ color: inherit;
63
+ text-decoration: inherit;
64
+ }
65
+
66
+ /* Reset list browser defaults */
67
+ ol,
68
+ ul {
69
+ list-style: none;
70
+ margin: 0;
71
+ padding: 0;
72
+ }
73
+
74
+ /* Reset button browser defaults */
75
+ button {
76
+ border-width: 0;
77
+ border-style: solid;
78
+ background-color: transparent;
79
+ color: inherit;
80
+ font: inherit;
81
+ }
82
+
83
+ /* Reset form element browser defaults */
84
+ input,
85
+ select,
86
+ textarea {
87
+ color: inherit;
88
+ font: inherit;
89
+ }
90
+
91
+ /* Monospace code elements */
92
+ code, kbd, samp, pre {
93
+ font-family: var(--font-mono);
94
+ }
95
+
96
+ /* Smooth scroll for anchor links */
97
+ html {
98
+ scroll-behavior: smooth;
99
+ }
100
+
101
+ @keyframes caret-blink {
102
+ 0%, 70%, 100% { opacity: 1; }
103
+ 20%, 50% { opacity: 0; }
104
+ }
105
+ }
106
+
107
+ /* Shiki syntax highlighting - dual theme support */
108
+ /* Light mode: use --shiki-light color */
109
+ :root span[style*="--shiki-light"] {
110
+ color: var(--shiki-light);
111
+ }
112
+
113
+ /* Dark mode: use --shiki-dark color */
114
+ .dark span[style*="--shiki-dark"] {
115
+ color: var(--shiki-dark);
116
+ }
117
+
118
+ /* Dialog z-index - higher than fixed header (z-50) */
119
+ .z-dialog {
120
+ z-index: 9999;
121
+ }
122
+
123
+ /* Tooltip visibility - controlled by data attribute */
124
+ [data-tooltip-content] {
125
+ display: none;
126
+ }
127
+ [data-tooltip-content][data-tooltip-open="true"] {
128
+ display: block;
129
+ }
130
+
131
+
132
+ /* Ensure hidden attribute works with flexbox items */
133
+ [hidden] {
134
+ display: none !important;
135
+ }
136
+
137
+ /* Gradient text */
138
+ .gradient-text {
139
+ background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
140
+ -webkit-background-clip: text;
141
+ -webkit-text-fill-color: transparent;
142
+ background-clip: text;
143
+ }
144
+
145
+ /* Card hover action - show action button only on card hover */
146
+ [data-slot="card"] [data-card-hover-action] {
147
+ opacity: 0;
148
+ transition: opacity 150ms ease;
149
+ }
150
+ [data-slot="card"]:hover [data-card-hover-action] {
151
+ opacity: 1;
152
+ }
153
+
154
+ /* Async validation status text — color is driven by the `--err` CSS
155
+ variable set inline from `errorLevel()` in the validation demo. The
156
+ variable holds the hue (0..360); the rest is fixed. */
157
+ .async-validation-msg {
158
+ color: hsl(var(--err, 210) 70% 45%);
159
+ transition: color 150ms ease;
160
+ }
161
+
162
+ /* Per-source stat card accent — color is driven by the `--stat-c` CSS
163
+ variable set inline from `sourceColors[source]` in the admin
164
+ analytics demo. Replaces the previous class swap variant so the
165
+ visual treatment is data-driven (one inline style attribute per
166
+ card) instead of branching on a static utility-class lookup. */
167
+ .source-stat-card {
168
+ border-left: 3px solid var(--stat-c, var(--border));
169
+ }
170
+ .source-stat-card [data-source-share] {
171
+ color: var(--stat-c, var(--muted-foreground));
172
+ font-weight: 600;
173
+ }
@@ -0,0 +1,134 @@
1
+ import { defineConfig, presetWind4 } from 'unocss'
2
+
3
+ export default defineConfig({
4
+ presets: [presetWind4()],
5
+ // Custom preflight: re-apply border-color after preset-wind4's reset preflight.
6
+ // preset-wind4 uses `border: 0 solid` which implicitly sets border-color to
7
+ // currentColor. This preflight runs after the reset (same @layer base, later
8
+ // source order) so var(--border) wins.
9
+ preflights: [{
10
+ getCSS: () => '*, ::before, ::after { border-color: var(--border); }',
11
+ layer: 'base',
12
+ }],
13
+ // Wrap UnoCSS output in CSS @layer blocks for cascade ordering.
14
+ // Order: preflights < base < shortcuts < components < default
15
+ // Base resets (globals.css) go into @layer base.
16
+ // Component base classes (layer-components:) override base resets,
17
+ // and user override classes (default) beat component classes.
18
+ outputToCssLayers: true,
19
+ layers: {
20
+ preflights: -2,
21
+ components: -1,
22
+ default: 0,
23
+ },
24
+ // Safelist responsive classes used in dynamic contexts
25
+ safelist: [
26
+ 'hidden', 'sm:block', 'sm:hidden', 'lg:block', 'sm:pl-56',
27
+ 'border-input',
28
+ 'border-destructive', 'ring-destructive/20',
29
+ 'group/card', 'group-hover/card:opacity-100',
30
+ ],
31
+ // Theme configuration with CSS variable references (OKLCH colors)
32
+ theme: {
33
+ colors: {
34
+ background: 'var(--background)',
35
+ foreground: 'var(--foreground)',
36
+ card: {
37
+ DEFAULT: 'var(--card)',
38
+ foreground: 'var(--card-foreground)',
39
+ },
40
+ popover: {
41
+ DEFAULT: 'var(--popover)',
42
+ foreground: 'var(--popover-foreground)',
43
+ },
44
+ primary: {
45
+ DEFAULT: 'var(--primary)',
46
+ foreground: 'var(--primary-foreground)',
47
+ },
48
+ secondary: {
49
+ DEFAULT: 'var(--secondary)',
50
+ foreground: 'var(--secondary-foreground)',
51
+ },
52
+ muted: {
53
+ DEFAULT: 'var(--muted)',
54
+ foreground: 'var(--muted-foreground)',
55
+ },
56
+ accent: {
57
+ DEFAULT: 'var(--accent)',
58
+ foreground: 'var(--accent-foreground)',
59
+ },
60
+ destructive: {
61
+ DEFAULT: 'var(--destructive)',
62
+ foreground: 'var(--destructive-foreground)',
63
+ },
64
+ success: {
65
+ DEFAULT: 'var(--success)',
66
+ foreground: 'var(--success-foreground)',
67
+ },
68
+ warning: {
69
+ DEFAULT: 'var(--warning)',
70
+ foreground: 'var(--warning-foreground)',
71
+ },
72
+ info: {
73
+ DEFAULT: 'var(--info)',
74
+ foreground: 'var(--info-foreground)',
75
+ },
76
+ border: 'var(--border)',
77
+ input: 'var(--input)',
78
+ ring: 'var(--ring)',
79
+ },
80
+ radius: {
81
+ lg: 'var(--radius)',
82
+ md: 'calc(var(--radius) - 2px)',
83
+ sm: 'calc(var(--radius) - 4px)',
84
+ },
85
+ // Shadow scale - Use 'shadow-*' utilities
86
+ shadow: {
87
+ sm: 'var(--shadow-sm)',
88
+ DEFAULT: 'var(--shadow)',
89
+ md: 'var(--shadow-md)',
90
+ lg: 'var(--shadow-lg)',
91
+ xl: 'var(--shadow-xl)',
92
+ inner: 'var(--shadow-inner)',
93
+ none: 'none',
94
+ },
95
+ // Typography - Use 'font-*' utilities
96
+ font: {
97
+ sans: 'var(--font-sans)',
98
+ mono: 'var(--font-mono)',
99
+ },
100
+ // Letter spacing - Use 'tracking-*' utilities
101
+ tracking: {
102
+ tighter: 'var(--tracking-tighter)',
103
+ tight: 'var(--tracking-tight)',
104
+ normal: 'var(--tracking-normal)',
105
+ wide: 'var(--tracking-wide)',
106
+ wider: 'var(--tracking-wider)',
107
+ },
108
+ // Animation tokens - Use 'duration' for duration-* utilities
109
+ duration: {
110
+ fast: 'var(--duration-fast)',
111
+ normal: 'var(--duration-normal)',
112
+ slow: 'var(--duration-slow)',
113
+ },
114
+ // Use 'ease' for ease-* utilities
115
+ ease: {
116
+ DEFAULT: 'var(--ease-default)',
117
+ in: 'var(--ease-in)',
118
+ out: 'var(--ease-out)',
119
+ 'in-out': 'var(--ease-in-out)',
120
+ },
121
+ },
122
+ // Scan component files for class names
123
+ content: {
124
+ filesystem: [
125
+ './*.tsx',
126
+ './**/index.tsx',
127
+ './pages/**/*.tsx',
128
+ '../../ui/components/**/*.tsx',
129
+ '../shared/components/**/*.tsx',
130
+ './components/**/*.tsx',
131
+ './dist/**/*.tsx',
132
+ ],
133
+ },
134
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barefootjs/cli",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "CLI for agent-driven UI component discovery and scaffolding",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,7 +31,7 @@
31
31
  "typescript": "^5.0.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@barefootjs/jsx": "0.2.0",
34
+ "@barefootjs/jsx": "0.3.0",
35
35
  "@types/node": "^22.0.0"
36
36
  }
37
37
  }