loopwind 0.9.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.
- package/FONTS.md +156 -0
- package/HELPERS_DEMO.md +134 -0
- package/PROJECT_STRUCTURE.md +286 -0
- package/PUBLISHING.md +171 -0
- package/README.md +1020 -0
- package/REGISTRY_SETUP.md +427 -0
- package/SHADCN_INTEGRATION.md +269 -0
- package/TAILWIND.md +228 -0
- package/TEMPLATE_SOURCES.md +363 -0
- package/_dsgn/templates/banner-hero/banner-hero.tsx +57 -0
- package/_dsgn/templates/banner-hero/meta.json +14 -0
- package/_dsgn/templates/composite-card/meta.json +16 -0
- package/_dsgn/templates/composite-card/template.tsx +44 -0
- package/_dsgn/templates/image/meta.json +13 -0
- package/_dsgn/templates/image/template.tsx +28 -0
- package/_dsgn/templates/kitchen-sink/meta.json +13 -0
- package/_dsgn/templates/kitchen-sink/template.tsx +72 -0
- package/_dsgn/templates/qr-card/meta.json +14 -0
- package/_dsgn/templates/qr-card/template.tsx +39 -0
- package/_dsgn/templates/test-parent/child/meta.json +11 -0
- package/_dsgn/templates/test-parent/child/template.tsx +27 -0
- package/_dsgn/templates/test-parent/meta.json +12 -0
- package/_dsgn/templates/test-parent/template.tsx +30 -0
- package/_dsgn/templates/test-sibling/meta.json +11 -0
- package/_dsgn/templates/test-sibling/template.tsx +20 -0
- package/_dsgn/templates/video/.tmp/template-1763421345296.mjs +43 -0
- package/_dsgn/templates/video/.tmp/template-1763421362228.mjs +43 -0
- package/_dsgn/templates/video/.tmp/template-1763421377706.mjs +43 -0
- package/_dsgn/templates/video/meta.json +17 -0
- package/_dsgn/templates/video/template.tsx +48 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +70 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/add.d.ts +6 -0
- package/dist/commands/add.d.ts.map +1 -0
- package/dist/commands/add.js +86 -0
- package/dist/commands/add.js.map +1 -0
- package/dist/commands/default.d.ts +2 -0
- package/dist/commands/default.d.ts.map +1 -0
- package/dist/commands/default.js +69 -0
- package/dist/commands/default.js.map +1 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +75 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +83 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/preview.d.ts +3 -0
- package/dist/commands/preview.d.ts.map +1 -0
- package/dist/commands/preview.js +296 -0
- package/dist/commands/preview.js.map +1 -0
- package/dist/commands/render.d.ts +10 -0
- package/dist/commands/render.d.ts.map +1 -0
- package/dist/commands/render.js +204 -0
- package/dist/commands/render.js.map +1 -0
- package/dist/commands/validate.d.ts +2 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +107 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/default-templates/AGENTS.md +229 -0
- package/dist/default-templates/image/meta.json +13 -0
- package/dist/default-templates/image/template.d.ts +20 -0
- package/dist/default-templates/image/template.d.ts.map +1 -0
- package/dist/default-templates/image/template.js +18 -0
- package/dist/default-templates/image/template.js.map +1 -0
- package/dist/default-templates/image/template.tsx +20 -0
- package/dist/default-templates/image-template/meta.json +13 -0
- package/dist/default-templates/image-template/template.tsx +19 -0
- package/dist/default-templates/kitchen-sink/meta.json +13 -0
- package/dist/default-templates/kitchen-sink/template.tsx +64 -0
- package/dist/default-templates/page/meta.json +17 -0
- package/dist/default-templates/page/template.tsx +37 -0
- package/dist/default-templates/video/meta.json +17 -0
- package/dist/default-templates/video/template.d.ts +26 -0
- package/dist/default-templates/video/template.d.ts.map +1 -0
- package/dist/default-templates/video/template.js +33 -0
- package/dist/default-templates/video/template.js.map +1 -0
- package/dist/default-templates/video/template.tsx +37 -0
- package/dist/default-templates/video-template/meta.json +17 -0
- package/dist/default-templates/video-template/template.tsx +36 -0
- package/dist/default-templates/website/meta.json +16 -0
- package/dist/default-templates/website/pages/home.tsx +17 -0
- package/dist/default-templates/website/parts/footer.tsx +17 -0
- package/dist/default-templates/website/parts/header.tsx +17 -0
- package/dist/default-templates/website/template.tsx +17 -0
- package/dist/default-templates/website-template/meta.json +16 -0
- package/dist/default-templates/website-template/pages/home.tsx +16 -0
- package/dist/default-templates/website-template/parts/footer.tsx +16 -0
- package/dist/default-templates/website-template/parts/header.tsx +16 -0
- package/dist/default-templates/website-template/template.tsx +16 -0
- package/dist/lib/config.d.ts +34 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +248 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/constants.d.ts +7 -0
- package/dist/lib/constants.d.ts.map +1 -0
- package/dist/lib/constants.js +12 -0
- package/dist/lib/constants.js.map +1 -0
- package/dist/lib/helpers.d.ts +29 -0
- package/dist/lib/helpers.d.ts.map +1 -0
- package/dist/lib/helpers.js +159 -0
- package/dist/lib/helpers.js.map +1 -0
- package/dist/lib/installer.d.ts +51 -0
- package/dist/lib/installer.d.ts.map +1 -0
- package/dist/lib/installer.js +215 -0
- package/dist/lib/installer.js.map +1 -0
- package/dist/lib/renderer.d.ts +51 -0
- package/dist/lib/renderer.d.ts.map +1 -0
- package/dist/lib/renderer.js +524 -0
- package/dist/lib/renderer.js.map +1 -0
- package/dist/lib/tailwind-config-loader.d.ts +47 -0
- package/dist/lib/tailwind-config-loader.d.ts.map +1 -0
- package/dist/lib/tailwind-config-loader.js +432 -0
- package/dist/lib/tailwind-config-loader.js.map +1 -0
- package/dist/lib/tailwind-detector.d.ts +36 -0
- package/dist/lib/tailwind-detector.d.ts.map +1 -0
- package/dist/lib/tailwind-detector.js +156 -0
- package/dist/lib/tailwind-detector.js.map +1 -0
- package/dist/lib/tailwind.d.ts +8 -0
- package/dist/lib/tailwind.d.ts.map +1 -0
- package/dist/lib/tailwind.js +994 -0
- package/dist/lib/tailwind.js.map +1 -0
- package/dist/lib/template-validator.d.ts +22 -0
- package/dist/lib/template-validator.d.ts.map +1 -0
- package/dist/lib/template-validator.js +174 -0
- package/dist/lib/template-validator.js.map +1 -0
- package/dist/lib/utils.d.ts +44 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +207 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/version-check.d.ts +16 -0
- package/dist/lib/version-check.d.ts.map +1 -0
- package/dist/lib/version-check.js +88 -0
- package/dist/lib/version-check.js.map +1 -0
- package/dist/lib/video-renderer.d.ts +32 -0
- package/dist/lib/video-renderer.d.ts.map +1 -0
- package/dist/lib/video-renderer.js +226 -0
- package/dist/lib/video-renderer.js.map +1 -0
- package/dist/sdk/index.d.ts +58 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +119 -0
- package/dist/sdk/index.js.map +1 -0
- package/dist/sdk/template.d.ts +40 -0
- package/dist/sdk/template.d.ts.map +1 -0
- package/dist/sdk/template.js +60 -0
- package/dist/sdk/template.js.map +1 -0
- package/dist/types/config.d.ts +62 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +47 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/template.d.ts +79 -0
- package/dist/types/template.d.ts.map +1 -0
- package/dist/types/template.js +2 -0
- package/dist/types/template.js.map +1 -0
- package/examples/nextjs-api/README.md +180 -0
- package/examples/nextjs-api/package.json +21 -0
- package/examples/nextjs-api/pages/api/intro-video.ts +53 -0
- package/examples/nextjs-api/pages/api/og-image.ts +50 -0
- package/netlify.toml +13 -0
- package/package.json +84 -0
- package/patches/satori+0.18.3.patch +13 -0
- package/test-templates/TESTS.md +63 -0
- package/test-templates/_dsgn/templates/absolute-spin/meta.json +7 -0
- package/test-templates/_dsgn/templates/absolute-spin/template.tsx +16 -0
- package/test-templates/_dsgn/templates/animated-intro/.tmp/template-1763468771640.mjs +7 -0
- package/test-templates/_dsgn/templates/animated-intro/meta.json +10 -0
- package/test-templates/_dsgn/templates/animated-intro/template.tsx +23 -0
- package/test-templates/_dsgn/templates/centered-spin/.tmp/template-1763468525386.mjs +7 -0
- package/test-templates/_dsgn/templates/centered-spin/meta.json +7 -0
- package/test-templates/_dsgn/templates/centered-spin/template.tsx +11 -0
- package/test-templates/_dsgn/templates/composite/.tmp/template-1763468815645.mjs +7 -0
- package/test-templates/_dsgn/templates/composite/meta.json +9 -0
- package/test-templates/_dsgn/templates/composite/template.tsx +23 -0
- package/test-templates/_dsgn/templates/easing-test/.tmp/template-1763468824501.mjs +7 -0
- package/test-templates/_dsgn/templates/easing-test/meta.json +7 -0
- package/test-templates/_dsgn/templates/easing-test/template.tsx +47 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466364336.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466584319.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466667797.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466746504.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763466930225.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467004552.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467060334.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467124493.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467174690.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467359134.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467451928.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467758275.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763467985201.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468020563.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468090428.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468211036.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/.tmp/template-1763468394057.mjs +10 -0
- package/test-templates/_dsgn/templates/minimal-spin/meta.json +7 -0
- package/test-templates/_dsgn/templates/minimal-spin/template.tsx +13 -0
- package/test-templates/_dsgn/templates/no-origin-spin/meta.json +7 -0
- package/test-templates/_dsgn/templates/no-origin-spin/template.tsx +10 -0
- package/test-templates/_dsgn/templates/opacity-test/meta.json +7 -0
- package/test-templates/_dsgn/templates/opacity-test/template.tsx +9 -0
- package/test-templates/_dsgn/templates/qr-code/.tmp/template-1763468758954.mjs +17 -0
- package/test-templates/_dsgn/templates/qr-code/.tmp/template-1763468815672.mjs +17 -0
- package/test-templates/_dsgn/templates/qr-code/meta.json +9 -0
- package/test-templates/_dsgn/templates/qr-code/template.tsx +20 -0
- package/test-templates/_dsgn/templates/rotation-abs-test/meta.json +7 -0
- package/test-templates/_dsgn/templates/rotation-abs-test/template.tsx +15 -0
- package/test-templates/_dsgn/templates/rotation-corner/meta.json +7 -0
- package/test-templates/_dsgn/templates/rotation-corner/template.tsx +12 -0
- package/test-templates/_dsgn/templates/rotation-test/meta.json +7 -0
- package/test-templates/_dsgn/templates/rotation-test/template.tsx +12 -0
- package/test-templates/_dsgn/templates/shake-test/meta.json +7 -0
- package/test-templates/_dsgn/templates/shake-test/template.tsx +12 -0
- package/test-templates/_dsgn/templates/static-image/.tmp/template-1763468746271.mjs +7 -0
- package/test-templates/_dsgn/templates/static-image/meta.json +9 -0
- package/test-templates/_dsgn/templates/static-image/template.tsx +19 -0
- package/test-templates/_dsgn/templates/translate-test/meta.json +7 -0
- package/test-templates/_dsgn/templates/translate-test/template.tsx +9 -0
- package/test-templates/_dsgn/templates/video-loops/.tmp/template-1763468793192.mjs +15 -0
- package/test-templates/_dsgn/templates/video-loops/meta.json +9 -0
- package/test-templates/_dsgn/templates/video-loops/template.tsx +39 -0
- package/test-templates/_dsgn/templates/wrapped-spin/meta.json +7 -0
- package/test-templates/_dsgn/templates/wrapped-spin/template.tsx +17 -0
- package/test-templates/compare-svgs.mjs +30 -0
- package/test-templates/convert-frames.mjs +15 -0
- package/test-templates/debug-rotation.mjs +25 -0
- package/test-templates/run-tests.sh +39 -0
- package/test-templates/test-sdk.mjs +115 -0
- package/website/.astro/settings.json +5 -0
- package/website/.astro/types.d.ts +1 -0
- package/website/README.md +112 -0
- package/website/astro.config.mjs +18 -0
- package/website/dist/_astro/fonts.DHdiHGBO.css +1 -0
- package/website/dist/fonts/index.html +193 -0
- package/website/dist/helpers/index.html +166 -0
- package/website/dist/images/index.html +314 -0
- package/website/dist/index.html +219 -0
- package/website/dist/llm.txt +2448 -0
- package/website/dist/styling/index.html +365 -0
- package/website/dist/templates/index.html +124 -0
- package/website/dist/video/index.html +636 -0
- package/website/package-lock.json +7606 -0
- package/website/package.json +23 -0
- package/website/public/robots.txt +5 -0
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { pathToFileURL } from 'url';
|
|
4
|
+
import { CWD } from './constants.js';
|
|
5
|
+
/**
|
|
6
|
+
* Find Tailwind config file in the current project
|
|
7
|
+
*/
|
|
8
|
+
async function findTailwindConfig() {
|
|
9
|
+
const possiblePaths = [
|
|
10
|
+
path.join(CWD, 'tailwind.config.js'),
|
|
11
|
+
path.join(CWD, 'tailwind.config.mjs'),
|
|
12
|
+
path.join(CWD, 'tailwind.config.cjs'),
|
|
13
|
+
path.join(CWD, 'tailwind.config.ts'),
|
|
14
|
+
];
|
|
15
|
+
for (const configPath of possiblePaths) {
|
|
16
|
+
try {
|
|
17
|
+
await fs.access(configPath);
|
|
18
|
+
return configPath;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Load and parse Tailwind config
|
|
28
|
+
*/
|
|
29
|
+
export async function loadTailwindConfig() {
|
|
30
|
+
try {
|
|
31
|
+
const configPath = await findTailwindConfig();
|
|
32
|
+
if (!configPath) {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
// For .ts files, we'd need to transpile first, but for now just handle .js
|
|
36
|
+
if (configPath.endsWith('.ts')) {
|
|
37
|
+
// TODO: Add esbuild transpilation for .ts configs
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
// Dynamic import the config
|
|
41
|
+
const fileUrl = pathToFileURL(configPath).href;
|
|
42
|
+
const configModule = await import(fileUrl + '?t=' + Date.now());
|
|
43
|
+
// Config might be default export or module.exports
|
|
44
|
+
const config = configModule.default || configModule;
|
|
45
|
+
return config;
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
console.error('Failed to load Tailwind config:', error);
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Tailwind's default color palette (v3)
|
|
53
|
+
const DEFAULT_COLORS = {
|
|
54
|
+
inherit: 'inherit',
|
|
55
|
+
current: 'currentColor',
|
|
56
|
+
transparent: 'transparent',
|
|
57
|
+
black: '#000000',
|
|
58
|
+
white: '#ffffff',
|
|
59
|
+
slate: {
|
|
60
|
+
50: '#f8fafc',
|
|
61
|
+
100: '#f1f5f9',
|
|
62
|
+
200: '#e2e8f0',
|
|
63
|
+
300: '#cbd5e1',
|
|
64
|
+
400: '#94a3b8',
|
|
65
|
+
500: '#64748b',
|
|
66
|
+
600: '#475569',
|
|
67
|
+
700: '#334155',
|
|
68
|
+
800: '#1e293b',
|
|
69
|
+
900: '#0f172a',
|
|
70
|
+
950: '#020617',
|
|
71
|
+
},
|
|
72
|
+
gray: {
|
|
73
|
+
50: '#f9fafb',
|
|
74
|
+
100: '#f3f4f6',
|
|
75
|
+
200: '#e5e7eb',
|
|
76
|
+
300: '#d1d5db',
|
|
77
|
+
400: '#9ca3af',
|
|
78
|
+
500: '#6b7280',
|
|
79
|
+
600: '#4b5563',
|
|
80
|
+
700: '#374151',
|
|
81
|
+
800: '#1f2937',
|
|
82
|
+
900: '#111827',
|
|
83
|
+
950: '#030712',
|
|
84
|
+
},
|
|
85
|
+
zinc: {
|
|
86
|
+
50: '#fafafa',
|
|
87
|
+
100: '#f4f4f5',
|
|
88
|
+
200: '#e4e4e7',
|
|
89
|
+
300: '#d4d4d8',
|
|
90
|
+
400: '#a1a1aa',
|
|
91
|
+
500: '#71717a',
|
|
92
|
+
600: '#52525b',
|
|
93
|
+
700: '#3f3f46',
|
|
94
|
+
800: '#27272a',
|
|
95
|
+
900: '#18181b',
|
|
96
|
+
950: '#09090b',
|
|
97
|
+
},
|
|
98
|
+
neutral: {
|
|
99
|
+
50: '#fafafa',
|
|
100
|
+
100: '#f5f5f5',
|
|
101
|
+
200: '#e5e5e5',
|
|
102
|
+
300: '#d4d4d4',
|
|
103
|
+
400: '#a3a3a3',
|
|
104
|
+
500: '#737373',
|
|
105
|
+
600: '#525252',
|
|
106
|
+
700: '#404040',
|
|
107
|
+
800: '#262626',
|
|
108
|
+
900: '#171717',
|
|
109
|
+
950: '#0a0a0a',
|
|
110
|
+
},
|
|
111
|
+
stone: {
|
|
112
|
+
50: '#fafaf9',
|
|
113
|
+
100: '#f5f5f4',
|
|
114
|
+
200: '#e7e5e4',
|
|
115
|
+
300: '#d6d3d1',
|
|
116
|
+
400: '#a8a29e',
|
|
117
|
+
500: '#78716c',
|
|
118
|
+
600: '#57534e',
|
|
119
|
+
700: '#44403c',
|
|
120
|
+
800: '#292524',
|
|
121
|
+
900: '#1c1917',
|
|
122
|
+
950: '#0c0a09',
|
|
123
|
+
},
|
|
124
|
+
red: {
|
|
125
|
+
50: '#fef2f2',
|
|
126
|
+
100: '#fee2e2',
|
|
127
|
+
200: '#fecaca',
|
|
128
|
+
300: '#fca5a5',
|
|
129
|
+
400: '#f87171',
|
|
130
|
+
500: '#ef4444',
|
|
131
|
+
600: '#dc2626',
|
|
132
|
+
700: '#b91c1c',
|
|
133
|
+
800: '#991b1b',
|
|
134
|
+
900: '#7f1d1d',
|
|
135
|
+
950: '#450a0a',
|
|
136
|
+
},
|
|
137
|
+
orange: {
|
|
138
|
+
50: '#fff7ed',
|
|
139
|
+
100: '#ffedd5',
|
|
140
|
+
200: '#fed7aa',
|
|
141
|
+
300: '#fdba74',
|
|
142
|
+
400: '#fb923c',
|
|
143
|
+
500: '#f97316',
|
|
144
|
+
600: '#ea580c',
|
|
145
|
+
700: '#c2410c',
|
|
146
|
+
800: '#9a3412',
|
|
147
|
+
900: '#7c2d12',
|
|
148
|
+
950: '#431407',
|
|
149
|
+
},
|
|
150
|
+
amber: {
|
|
151
|
+
50: '#fffbeb',
|
|
152
|
+
100: '#fef3c7',
|
|
153
|
+
200: '#fde68a',
|
|
154
|
+
300: '#fcd34d',
|
|
155
|
+
400: '#fbbf24',
|
|
156
|
+
500: '#f59e0b',
|
|
157
|
+
600: '#d97706',
|
|
158
|
+
700: '#b45309',
|
|
159
|
+
800: '#92400e',
|
|
160
|
+
900: '#78350f',
|
|
161
|
+
950: '#451a03',
|
|
162
|
+
},
|
|
163
|
+
yellow: {
|
|
164
|
+
50: '#fefce8',
|
|
165
|
+
100: '#fef9c3',
|
|
166
|
+
200: '#fef08a',
|
|
167
|
+
300: '#fde047',
|
|
168
|
+
400: '#facc15',
|
|
169
|
+
500: '#eab308',
|
|
170
|
+
600: '#ca8a04',
|
|
171
|
+
700: '#a16207',
|
|
172
|
+
800: '#854d0e',
|
|
173
|
+
900: '#713f12',
|
|
174
|
+
950: '#422006',
|
|
175
|
+
},
|
|
176
|
+
lime: {
|
|
177
|
+
50: '#f7fee7',
|
|
178
|
+
100: '#ecfccb',
|
|
179
|
+
200: '#d9f99d',
|
|
180
|
+
300: '#bef264',
|
|
181
|
+
400: '#a3e635',
|
|
182
|
+
500: '#84cc16',
|
|
183
|
+
600: '#65a30d',
|
|
184
|
+
700: '#4d7c0f',
|
|
185
|
+
800: '#3f6212',
|
|
186
|
+
900: '#365314',
|
|
187
|
+
950: '#1a2e05',
|
|
188
|
+
},
|
|
189
|
+
green: {
|
|
190
|
+
50: '#f0fdf4',
|
|
191
|
+
100: '#dcfce7',
|
|
192
|
+
200: '#bbf7d0',
|
|
193
|
+
300: '#86efac',
|
|
194
|
+
400: '#4ade80',
|
|
195
|
+
500: '#22c55e',
|
|
196
|
+
600: '#16a34a',
|
|
197
|
+
700: '#15803d',
|
|
198
|
+
800: '#166534',
|
|
199
|
+
900: '#14532d',
|
|
200
|
+
950: '#052e16',
|
|
201
|
+
},
|
|
202
|
+
emerald: {
|
|
203
|
+
50: '#ecfdf5',
|
|
204
|
+
100: '#d1fae5',
|
|
205
|
+
200: '#a7f3d0',
|
|
206
|
+
300: '#6ee7b7',
|
|
207
|
+
400: '#34d399',
|
|
208
|
+
500: '#10b981',
|
|
209
|
+
600: '#059669',
|
|
210
|
+
700: '#047857',
|
|
211
|
+
800: '#065f46',
|
|
212
|
+
900: '#064e3b',
|
|
213
|
+
950: '#022c22',
|
|
214
|
+
},
|
|
215
|
+
teal: {
|
|
216
|
+
50: '#f0fdfa',
|
|
217
|
+
100: '#ccfbf1',
|
|
218
|
+
200: '#99f6e4',
|
|
219
|
+
300: '#5eead4',
|
|
220
|
+
400: '#2dd4bf',
|
|
221
|
+
500: '#14b8a6',
|
|
222
|
+
600: '#0d9488',
|
|
223
|
+
700: '#0f766e',
|
|
224
|
+
800: '#115e59',
|
|
225
|
+
900: '#134e4a',
|
|
226
|
+
950: '#042f2e',
|
|
227
|
+
},
|
|
228
|
+
cyan: {
|
|
229
|
+
50: '#ecfeff',
|
|
230
|
+
100: '#cffafe',
|
|
231
|
+
200: '#a5f3fc',
|
|
232
|
+
300: '#67e8f9',
|
|
233
|
+
400: '#22d3ee',
|
|
234
|
+
500: '#06b6d4',
|
|
235
|
+
600: '#0891b2',
|
|
236
|
+
700: '#0e7490',
|
|
237
|
+
800: '#155e75',
|
|
238
|
+
900: '#164e63',
|
|
239
|
+
950: '#083344',
|
|
240
|
+
},
|
|
241
|
+
sky: {
|
|
242
|
+
50: '#f0f9ff',
|
|
243
|
+
100: '#e0f2fe',
|
|
244
|
+
200: '#bae6fd',
|
|
245
|
+
300: '#7dd3fc',
|
|
246
|
+
400: '#38bdf8',
|
|
247
|
+
500: '#0ea5e9',
|
|
248
|
+
600: '#0284c7',
|
|
249
|
+
700: '#0369a1',
|
|
250
|
+
800: '#075985',
|
|
251
|
+
900: '#0c4a6e',
|
|
252
|
+
950: '#082f49',
|
|
253
|
+
},
|
|
254
|
+
blue: {
|
|
255
|
+
50: '#eff6ff',
|
|
256
|
+
100: '#dbeafe',
|
|
257
|
+
200: '#bfdbfe',
|
|
258
|
+
300: '#93c5fd',
|
|
259
|
+
400: '#60a5fa',
|
|
260
|
+
500: '#3b82f6',
|
|
261
|
+
600: '#2563eb',
|
|
262
|
+
700: '#1d4ed8',
|
|
263
|
+
800: '#1e40af',
|
|
264
|
+
900: '#1e3a8a',
|
|
265
|
+
950: '#172554',
|
|
266
|
+
},
|
|
267
|
+
indigo: {
|
|
268
|
+
50: '#eef2ff',
|
|
269
|
+
100: '#e0e7ff',
|
|
270
|
+
200: '#c7d2fe',
|
|
271
|
+
300: '#a5b4fc',
|
|
272
|
+
400: '#818cf8',
|
|
273
|
+
500: '#6366f1',
|
|
274
|
+
600: '#4f46e5',
|
|
275
|
+
700: '#4338ca',
|
|
276
|
+
800: '#3730a3',
|
|
277
|
+
900: '#312e81',
|
|
278
|
+
950: '#1e1b4b',
|
|
279
|
+
},
|
|
280
|
+
violet: {
|
|
281
|
+
50: '#f5f3ff',
|
|
282
|
+
100: '#ede9fe',
|
|
283
|
+
200: '#ddd6fe',
|
|
284
|
+
300: '#c4b5fd',
|
|
285
|
+
400: '#a78bfa',
|
|
286
|
+
500: '#8b5cf6',
|
|
287
|
+
600: '#7c3aed',
|
|
288
|
+
700: '#6d28d9',
|
|
289
|
+
800: '#5b21b6',
|
|
290
|
+
900: '#4c1d95',
|
|
291
|
+
950: '#2e1065',
|
|
292
|
+
},
|
|
293
|
+
purple: {
|
|
294
|
+
50: '#faf5ff',
|
|
295
|
+
100: '#f3e8ff',
|
|
296
|
+
200: '#e9d5ff',
|
|
297
|
+
300: '#d8b4fe',
|
|
298
|
+
400: '#c084fc',
|
|
299
|
+
500: '#a855f7',
|
|
300
|
+
600: '#9333ea',
|
|
301
|
+
700: '#7e22ce',
|
|
302
|
+
800: '#6b21a8',
|
|
303
|
+
900: '#581c87',
|
|
304
|
+
950: '#3b0764',
|
|
305
|
+
},
|
|
306
|
+
fuchsia: {
|
|
307
|
+
50: '#fdf4ff',
|
|
308
|
+
100: '#fae8ff',
|
|
309
|
+
200: '#f5d0fe',
|
|
310
|
+
300: '#f0abfc',
|
|
311
|
+
400: '#e879f9',
|
|
312
|
+
500: '#d946ef',
|
|
313
|
+
600: '#c026d3',
|
|
314
|
+
700: '#a21caf',
|
|
315
|
+
800: '#86198f',
|
|
316
|
+
900: '#701a75',
|
|
317
|
+
950: '#4a044e',
|
|
318
|
+
},
|
|
319
|
+
pink: {
|
|
320
|
+
50: '#fdf2f8',
|
|
321
|
+
100: '#fce7f3',
|
|
322
|
+
200: '#fbcfe8',
|
|
323
|
+
300: '#f9a8d4',
|
|
324
|
+
400: '#f472b6',
|
|
325
|
+
500: '#ec4899',
|
|
326
|
+
600: '#db2777',
|
|
327
|
+
700: '#be185d',
|
|
328
|
+
800: '#9d174d',
|
|
329
|
+
900: '#831843',
|
|
330
|
+
950: '#500724',
|
|
331
|
+
},
|
|
332
|
+
rose: {
|
|
333
|
+
50: '#fff1f2',
|
|
334
|
+
100: '#ffe4e6',
|
|
335
|
+
200: '#fecdd3',
|
|
336
|
+
300: '#fda4af',
|
|
337
|
+
400: '#fb7185',
|
|
338
|
+
500: '#f43f5e',
|
|
339
|
+
600: '#e11d48',
|
|
340
|
+
700: '#be123c',
|
|
341
|
+
800: '#9f1239',
|
|
342
|
+
900: '#881337',
|
|
343
|
+
950: '#4c0519',
|
|
344
|
+
},
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* Resolve a color from Tailwind config
|
|
348
|
+
* Supports: primary, blue-500, slate-200, etc.
|
|
349
|
+
*/
|
|
350
|
+
export function resolveColor(colorName, tailwindConfig) {
|
|
351
|
+
// Merge Tailwind config colors with defaults
|
|
352
|
+
const colors = {
|
|
353
|
+
...DEFAULT_COLORS,
|
|
354
|
+
...tailwindConfig?.theme?.colors,
|
|
355
|
+
...tailwindConfig?.theme?.extend?.colors,
|
|
356
|
+
};
|
|
357
|
+
// Try direct match first (e.g., "primary")
|
|
358
|
+
if (colors[colorName]) {
|
|
359
|
+
const color = colors[colorName];
|
|
360
|
+
// If it's a string, return it
|
|
361
|
+
if (typeof color === 'string') {
|
|
362
|
+
return color;
|
|
363
|
+
}
|
|
364
|
+
// If it's an object with DEFAULT, use that
|
|
365
|
+
if (typeof color === 'object' && color.DEFAULT) {
|
|
366
|
+
return color.DEFAULT;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
// Try shade match (e.g., "blue-500")
|
|
370
|
+
const shadeMatch = colorName.match(/^(\w+)-(\d+)$/);
|
|
371
|
+
if (shadeMatch) {
|
|
372
|
+
const [, colorKey, shade] = shadeMatch;
|
|
373
|
+
if (colors[colorKey] && typeof colors[colorKey] === 'object') {
|
|
374
|
+
return colors[colorKey][shade] || null;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
return null;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Resolve spacing value from Tailwind config
|
|
381
|
+
*/
|
|
382
|
+
export function resolveSpacing(value, tailwindConfig) {
|
|
383
|
+
if (!tailwindConfig?.theme) {
|
|
384
|
+
return null;
|
|
385
|
+
}
|
|
386
|
+
const spacing = {
|
|
387
|
+
...tailwindConfig.theme.spacing,
|
|
388
|
+
...tailwindConfig.theme.extend?.spacing,
|
|
389
|
+
};
|
|
390
|
+
return spacing[value] || null;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Resolve font size from Tailwind config
|
|
394
|
+
*/
|
|
395
|
+
export function resolveFontSize(size, tailwindConfig) {
|
|
396
|
+
if (!tailwindConfig?.theme) {
|
|
397
|
+
return null;
|
|
398
|
+
}
|
|
399
|
+
const fontSize = {
|
|
400
|
+
...tailwindConfig.theme.fontSize,
|
|
401
|
+
...tailwindConfig.theme.extend?.fontSize,
|
|
402
|
+
};
|
|
403
|
+
const value = fontSize[size];
|
|
404
|
+
if (!value) {
|
|
405
|
+
return null;
|
|
406
|
+
}
|
|
407
|
+
// Font size can be a string or [size, lineHeight]
|
|
408
|
+
if (typeof value === 'string') {
|
|
409
|
+
return { fontSize: value };
|
|
410
|
+
}
|
|
411
|
+
if (Array.isArray(value)) {
|
|
412
|
+
return {
|
|
413
|
+
fontSize: value[0],
|
|
414
|
+
lineHeight: value[1]?.lineHeight || value[1],
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
return null;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Resolve border radius from Tailwind config
|
|
421
|
+
*/
|
|
422
|
+
export function resolveBorderRadius(value, tailwindConfig) {
|
|
423
|
+
if (!tailwindConfig?.theme) {
|
|
424
|
+
return null;
|
|
425
|
+
}
|
|
426
|
+
const borderRadius = {
|
|
427
|
+
...tailwindConfig.theme.borderRadius,
|
|
428
|
+
...tailwindConfig.theme.extend?.borderRadius,
|
|
429
|
+
};
|
|
430
|
+
return borderRadius[value] || null;
|
|
431
|
+
}
|
|
432
|
+
//# sourceMappingURL=tailwind-config-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailwind-config-loader.js","sourceRoot":"","sources":["../../src/lib/tailwind-config-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,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KAAK,CAAC,YAAY;QACpC,GAAG,cAAc,CAAC,KAAK,CAAC,MAAM,EAAE,YAAY;KAC7C,CAAC;IAEF,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
interface DetectedConfig {
|
|
2
|
+
hasShadcn: boolean;
|
|
3
|
+
tailwindConfigPath?: string;
|
|
4
|
+
tailwindCssPath?: string;
|
|
5
|
+
baseColor?: string;
|
|
6
|
+
cssVariables?: boolean;
|
|
7
|
+
style?: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Detect shadcn/ui components.json configuration
|
|
11
|
+
*/
|
|
12
|
+
export declare function detectShadcnConfig(): Promise<DetectedConfig>;
|
|
13
|
+
/**
|
|
14
|
+
* Find Tailwind config file (fallback if not in components.json)
|
|
15
|
+
*/
|
|
16
|
+
export declare function findTailwindConfigAuto(): Promise<string | null>;
|
|
17
|
+
/**
|
|
18
|
+
* Extract colors from Tailwind CSS file (for v4 CSS variables)
|
|
19
|
+
*/
|
|
20
|
+
export declare function extractColorsFromCss(cssPath: string): Promise<Record<string, string> | null>;
|
|
21
|
+
/**
|
|
22
|
+
* Load Tailwind config colors from JS/TS file
|
|
23
|
+
*/
|
|
24
|
+
export declare function loadTailwindConfigColors(configPath: string): Promise<Record<string, any> | null>;
|
|
25
|
+
/**
|
|
26
|
+
* Detect all available configuration sources
|
|
27
|
+
*/
|
|
28
|
+
export declare function detectAllConfigs(): Promise<{
|
|
29
|
+
shadcn: DetectedConfig;
|
|
30
|
+
tailwindConfig: string | null;
|
|
31
|
+
hasTailwindCss: boolean;
|
|
32
|
+
cssColors: Record<string, string> | null;
|
|
33
|
+
jsColors: Record<string, any> | null;
|
|
34
|
+
}>;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=tailwind-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailwind-detector.d.ts","sourceRoot":"","sources":["../../src/lib/tailwind-detector.ts"],"names":[],"mappings":"AAeA,UAAU,cAAc;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,cAAc,CAAC,CA8ClE;AAED;;GAEG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAmBrE;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC,CAgClG;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAatG;AAED;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC;IAChD,MAAM,EAAE,cAAc,CAAC;IACvB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;CACtC,CAAC,CAmCD"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import fs from 'fs/promises';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { CWD } from './constants.js';
|
|
4
|
+
import { pathToFileURL } from 'url';
|
|
5
|
+
/**
|
|
6
|
+
* Detect shadcn/ui components.json configuration
|
|
7
|
+
*/
|
|
8
|
+
export async function detectShadcnConfig() {
|
|
9
|
+
const result = {
|
|
10
|
+
hasShadcn: false,
|
|
11
|
+
};
|
|
12
|
+
try {
|
|
13
|
+
// Check for components.json
|
|
14
|
+
const componentsJsonPath = path.join(CWD, 'components.json');
|
|
15
|
+
const content = await fs.readFile(componentsJsonPath, 'utf-8');
|
|
16
|
+
const config = JSON.parse(content);
|
|
17
|
+
result.hasShadcn = true;
|
|
18
|
+
// Extract Tailwind config path
|
|
19
|
+
if (config.tailwind?.config) {
|
|
20
|
+
const configPath = path.join(CWD, config.tailwind.config);
|
|
21
|
+
try {
|
|
22
|
+
await fs.access(configPath);
|
|
23
|
+
result.tailwindConfigPath = configPath;
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
// Config file specified but doesn't exist
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
// Extract Tailwind CSS path
|
|
30
|
+
if (config.tailwind?.css) {
|
|
31
|
+
const cssPath = path.join(CWD, config.tailwind.css);
|
|
32
|
+
try {
|
|
33
|
+
await fs.access(cssPath);
|
|
34
|
+
result.tailwindCssPath = cssPath;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
// CSS file specified but doesn't exist
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// Extract base color and style
|
|
41
|
+
result.baseColor = config.tailwind?.baseColor;
|
|
42
|
+
result.cssVariables = config.tailwind?.cssVariables;
|
|
43
|
+
result.style = config.style;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// No components.json or invalid JSON - not a shadcn project
|
|
47
|
+
result.hasShadcn = false;
|
|
48
|
+
}
|
|
49
|
+
return result;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Find Tailwind config file (fallback if not in components.json)
|
|
53
|
+
*/
|
|
54
|
+
export async function findTailwindConfigAuto() {
|
|
55
|
+
const possiblePaths = [
|
|
56
|
+
'tailwind.config.js',
|
|
57
|
+
'tailwind.config.ts',
|
|
58
|
+
'tailwind.config.mjs',
|
|
59
|
+
'tailwind.config.cjs',
|
|
60
|
+
];
|
|
61
|
+
for (const configFile of possiblePaths) {
|
|
62
|
+
const configPath = path.join(CWD, configFile);
|
|
63
|
+
try {
|
|
64
|
+
await fs.access(configPath);
|
|
65
|
+
return configPath;
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
// Continue checking
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Extract colors from Tailwind CSS file (for v4 CSS variables)
|
|
75
|
+
*/
|
|
76
|
+
export async function extractColorsFromCss(cssPath) {
|
|
77
|
+
try {
|
|
78
|
+
const content = await fs.readFile(cssPath, 'utf-8');
|
|
79
|
+
const colors = {};
|
|
80
|
+
// Match CSS variables in :root
|
|
81
|
+
const rootMatch = content.match(/:root\s*{([^}]*)}/);
|
|
82
|
+
if (!rootMatch)
|
|
83
|
+
return null;
|
|
84
|
+
const rootContent = rootMatch[1];
|
|
85
|
+
// Extract color variables
|
|
86
|
+
// Format: --primary: 222.2 47.4% 11.2%;
|
|
87
|
+
const colorRegex = /--([\w-]+):\s*([^;]+);/g;
|
|
88
|
+
let match;
|
|
89
|
+
while ((match = colorRegex.exec(rootContent)) !== null) {
|
|
90
|
+
const varName = match[1];
|
|
91
|
+
const varValue = match[2].trim();
|
|
92
|
+
// Convert HSL to hex (basic conversion)
|
|
93
|
+
// Note: This is a simplified version - full implementation would parse HSL properly
|
|
94
|
+
if (varValue.includes('%')) {
|
|
95
|
+
// For now, we'll store the HSL value and document that users should use dsgn.json for hex
|
|
96
|
+
colors[varName] = varValue;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return Object.keys(colors).length > 0 ? colors : null;
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Load Tailwind config colors from JS/TS file
|
|
107
|
+
*/
|
|
108
|
+
export async function loadTailwindConfigColors(configPath) {
|
|
109
|
+
try {
|
|
110
|
+
const fileUrl = pathToFileURL(configPath).href;
|
|
111
|
+
const configModule = await import(fileUrl + '?t=' + Date.now());
|
|
112
|
+
const config = configModule.default || configModule;
|
|
113
|
+
// Extract colors from theme.extend.colors or theme.colors
|
|
114
|
+
const colors = config?.theme?.extend?.colors || config?.theme?.colors || null;
|
|
115
|
+
return colors;
|
|
116
|
+
}
|
|
117
|
+
catch {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Detect all available configuration sources
|
|
123
|
+
*/
|
|
124
|
+
export async function detectAllConfigs() {
|
|
125
|
+
const shadcn = await detectShadcnConfig();
|
|
126
|
+
// Find Tailwind config
|
|
127
|
+
let tailwindConfig = shadcn.tailwindConfigPath || null;
|
|
128
|
+
if (!tailwindConfig) {
|
|
129
|
+
tailwindConfig = await findTailwindConfigAuto();
|
|
130
|
+
}
|
|
131
|
+
// Check for Tailwind CSS
|
|
132
|
+
const cssPath = shadcn.tailwindCssPath || path.join(CWD, 'app/globals.css') || path.join(CWD, 'src/index.css');
|
|
133
|
+
let hasTailwindCss = false;
|
|
134
|
+
let cssColors = null;
|
|
135
|
+
try {
|
|
136
|
+
await fs.access(cssPath);
|
|
137
|
+
hasTailwindCss = true;
|
|
138
|
+
cssColors = await extractColorsFromCss(cssPath);
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
hasTailwindCss = false;
|
|
142
|
+
}
|
|
143
|
+
// Load JS/TS config colors
|
|
144
|
+
let jsColors = null;
|
|
145
|
+
if (tailwindConfig) {
|
|
146
|
+
jsColors = await loadTailwindConfigColors(tailwindConfig);
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
shadcn,
|
|
150
|
+
tailwindConfig,
|
|
151
|
+
hasTailwindCss,
|
|
152
|
+
cssColors,
|
|
153
|
+
jsColors,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=tailwind-detector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailwind-detector.js","sourceRoot":"","sources":["../../src/lib/tailwind-detector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAqBpC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,MAAM,MAAM,GAAmB;QAC7B,SAAS,EAAE,KAAK;KACjB,CAAC;IAEF,IAAI,CAAC;QACH,4BAA4B;QAC5B,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;QAC7D,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;QAC/D,MAAM,MAAM,GAAiB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEjD,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;QAExB,+BAA+B;QAC/B,IAAI,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;YAC5B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC1D,IAAI,CAAC;gBACH,MAAM,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;gBAC5B,MAAM,CAAC,kBAAkB,GAAG,UAAU,CAAC;YACzC,CAAC;YAAC,MAAM,CAAC;gBACP,0CAA0C;YAC5C,CAAC;QACH,CAAC;QAED,4BAA4B;QAC5B,IAAI,MAAM,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC;YACzB,M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ACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TailwindConfig } from './tailwind-config-loader.js';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
3
|
+
export interface AnimationContext {
|
|
4
|
+
progress?: number;
|
|
5
|
+
frame?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function tw(classes: string, tailwindConfig?: TailwindConfig | null, dsgnConfig?: any, animationContext?: AnimationContext): CSSProperties;
|
|
8
|
+
//# sourceMappingURL=tailwind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../src/lib/tailwind.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAOlE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAqyB3C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA0LD,wBAAgB,EAAE,CAChB,OAAO,EAAE,MAAM,EACf,cAAc,GAAE,cAAc,GAAG,IAAW,EAC5C,UAAU,GAAE,GAAU,EACtB,gBAAgB,GAAE,gBAAqB,GACtC,aAAa,CAkHf"}
|