loopwind 0.21.0 → 0.23.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.
- package/README.md +9 -2
- package/dist/cli.js +5 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/render.d.ts +1 -0
- package/dist/commands/render.d.ts.map +1 -1
- package/dist/commands/render.js +1 -0
- package/dist/commands/render.js.map +1 -1
- package/dist/lib/encode-worker.d.ts +2 -0
- package/dist/lib/encode-worker.d.ts.map +1 -0
- package/dist/lib/encode-worker.js +29 -0
- package/dist/lib/encode-worker.js.map +1 -0
- package/dist/lib/mjpeg-muxer.d.ts +46 -0
- package/dist/lib/mjpeg-muxer.d.ts.map +1 -0
- package/dist/lib/mjpeg-muxer.js +513 -0
- package/dist/lib/mjpeg-muxer.js.map +1 -0
- package/dist/lib/render-core.d.ts +63 -0
- package/dist/lib/render-core.d.ts.map +1 -0
- package/dist/lib/render-core.js +65 -0
- package/dist/lib/render-core.js.map +1 -0
- package/dist/lib/renderer.d.ts.map +1 -1
- package/dist/lib/renderer.js +10 -7
- package/dist/lib/renderer.js.map +1 -1
- package/dist/lib/resvg-init.d.ts +15 -0
- package/dist/lib/resvg-init.d.ts.map +1 -0
- package/dist/lib/resvg-init.js +55 -0
- package/dist/lib/resvg-init.js.map +1 -0
- package/dist/lib/tailwind/colors.d.ts +8 -0
- package/dist/lib/tailwind/colors.d.ts.map +1 -0
- package/dist/lib/tailwind/colors.js +102 -0
- package/dist/lib/tailwind/colors.js.map +1 -0
- package/dist/lib/tailwind/index.d.ts +10 -0
- package/dist/lib/tailwind/index.d.ts.map +1 -0
- package/dist/lib/tailwind/index.js +9 -0
- package/dist/lib/tailwind/index.js.map +1 -0
- package/dist/lib/tailwind/resolvers.d.ts +28 -0
- package/dist/lib/tailwind/resolvers.d.ts.map +1 -0
- package/dist/lib/tailwind/resolvers.js +94 -0
- package/dist/lib/tailwind/resolvers.js.map +1 -0
- package/dist/lib/tailwind/types.d.ts +29 -0
- package/dist/lib/tailwind/types.d.ts.map +1 -0
- package/dist/lib/tailwind/types.js +8 -0
- package/dist/lib/tailwind/types.js.map +1 -0
- package/dist/lib/tailwind-config-loader.d.ts +8 -45
- package/dist/lib/tailwind-config-loader.d.ts.map +1 -1
- package/dist/lib/tailwind-config-loader.js +6 -429
- package/dist/lib/tailwind-config-loader.js.map +1 -1
- package/dist/lib/tailwind.d.ts +1 -1
- package/dist/lib/tailwind.d.ts.map +1 -1
- package/dist/lib/tailwind.js +1 -1
- package/dist/lib/tailwind.js.map +1 -1
- package/dist/lib/video-preview.d.ts.map +1 -1
- package/dist/lib/video-preview.js +28 -16
- package/dist/lib/video-preview.js.map +1 -1
- package/dist/lib/video-renderer.d.ts +19 -1
- package/dist/lib/video-renderer.d.ts.map +1 -1
- package/dist/lib/video-renderer.js +194 -70
- package/dist/lib/video-renderer.js.map +1 -1
- package/dist/sdk/edge/index.d.ts +91 -0
- package/dist/sdk/edge/index.d.ts.map +1 -0
- package/dist/sdk/edge/index.js +187 -0
- package/dist/sdk/edge/index.js.map +1 -0
- package/dist/sdk/workers/index.d.ts +135 -0
- package/dist/sdk/workers/index.d.ts.map +1 -0
- package/dist/sdk/workers/index.js +271 -0
- package/dist/sdk/workers/index.js.map +1 -0
- package/dist/sdk/workers/tailwind-config.d.ts +48 -0
- package/dist/sdk/workers/tailwind-config.d.ts.map +1 -0
- package/dist/sdk/workers/tailwind-config.js +187 -0
- package/dist/sdk/workers/tailwind-config.js.map +1 -0
- package/dist/sdk/workers/tailwind.d.ts +9 -0
- package/dist/sdk/workers/tailwind.d.ts.map +1 -0
- package/dist/sdk/workers/tailwind.js +8 -0
- package/dist/sdk/workers/tailwind.js.map +1 -0
- package/package.json +6 -2
- package/test-cloudflare-worker/README.md +64 -0
- package/test-cloudflare-worker/dist/README.md +1 -0
- package/test-cloudflare-worker/dist/index.js +23743 -0
- package/test-cloudflare-worker/dist/index.js.map +8 -0
- package/test-cloudflare-worker/package-lock.json +1773 -0
- package/test-cloudflare-worker/package.json +25 -0
- package/test-cloudflare-worker/test-sdk.mjs +75 -0
- package/test-cloudflare-worker/wrangler.toml +14 -0
- package/test-video-720p.mjs +96 -0
- package/test-video-breakdown.mjs +98 -0
- package/test-video-perf-1080.mjs +67 -0
- package/test-video-perf.mjs +56 -0
- package/test-worker-1080p.mjs +103 -0
- package/test-worker-viability.mjs +140 -0
- package/website/astro.config.mjs +4 -9
- package/website/dist/_astro/PlaygroundEditor.DzFavsm8.js +26 -0
- package/website/dist/_astro/VideoPreviewClient.BrajhYmh.js +1 -0
- package/website/dist/_astro/agents.CZXv4DCM.css +1 -0
- package/website/dist/_astro/client.BHSq4mdQ.js +33 -0
- package/website/dist/_astro/index.CTbGshLK.js +9 -0
- package/website/dist/_astro/jsx-runtime.BjG_zV1W.js +9 -0
- package/website/dist/_routes.json +1 -0
- package/website/dist/_worker.js/_@astrojs-ssr-adapter.mjs +4 -4
- package/website/dist/_worker.js/_astro-internal_middleware.mjs +2 -2
- package/website/dist/_worker.js/chunks/Logo_Cud5QvBJ.mjs +22 -0
- package/website/dist/_worker.js/chunks/_@astro-renderers_-YVK7NHa.mjs +15015 -0
- package/website/dist/_worker.js/chunks/astro/{server_Y5_QHO8v.mjs → server_CsUrSZgd.mjs} +113 -2
- package/website/dist/_worker.js/chunks/{astro-designed-error-pages_BNTLO-TA.mjs → astro-designed-error-pages_1ELXm5Tt.mjs} +1 -1
- package/website/dist/_worker.js/chunks/{index_C1UTDwYg.mjs → index_BDWR1Q-q.mjs} +2 -2
- package/website/dist/_worker.js/chunks/{noop-middleware_DlWGj5t5.mjs → noop-middleware_B8fH5jha.mjs} +1 -1
- package/website/dist/_worker.js/index.js +38 -30
- package/website/dist/_worker.js/manifest_Bk6136-u.mjs +98 -0
- package/website/dist/_worker.js/pages/_image.astro.mjs +1 -1
- package/website/dist/_worker.js/pages/api/playground/render.astro.mjs +25562 -0
- package/website/dist/_worker.js/pages/api/playground/templates.astro.mjs +92 -0
- package/website/dist/_worker.js/pages/api/raw-markdown/_---path_.astro.mjs +1 -1
- package/website/dist/_worker.js/pages/playground/_example_.astro.mjs +95 -0
- package/website/dist/_worker.js/pages/playground.astro.mjs +1 -0
- package/website/dist/_worker.js/renderers.mjs +1 -56
- package/website/dist/agents/index.html +4 -2
- package/website/dist/animation/index.html +629 -3
- package/website/dist/config/index.html +4 -2
- package/website/dist/fonts/index.html +4 -2
- package/website/dist/getting-started/index.html +4 -2
- package/website/dist/helpers/index.html +196 -10
- package/website/dist/images/index.html +4 -2
- package/website/dist/index.html +4 -3
- package/website/dist/llm.txt +870 -20
- package/website/dist/playground/index.html +6 -0
- package/website/dist/preview/index.html +4 -2
- package/website/dist/sdk/index.html +639 -127
- package/website/dist/sitemap.xml +12 -12
- package/website/dist/styling/index.html +4 -2
- package/website/dist/templates/index.html +4 -2
- package/website/dist/video/index.html +47 -12
- package/website/package-lock.json +11 -1
- package/website/package.json +3 -1
- package/website/wrangler.toml +9 -0
- package/_dsgn/templates/dashed-stroke-test/template.tsx +0 -73
- package/_dsgn/templates/path-follow-test/template.tsx +0 -176
- package/_dsgn/templates/path-simple-test/template.tsx +0 -98
- package/_dsgn/templates/stroke-dash-test/meta.json +0 -12
- package/_dsgn/templates/stroke-dash-test/template.tsx +0 -53
- package/website/dist/_astro/agents.Yx-L_igG.css +0 -1
- package/website/dist/_worker.js/manifest_CT_D-YDe.mjs +0 -98
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/lib/tailwind/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1,47 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tailwind config
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
fontFamily?: Record<string, string[]>;
|
|
11
|
-
borderRadius?: Record<string, string>;
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
colors?: Record<string, any>;
|
|
15
|
-
spacing?: Record<string, string>;
|
|
16
|
-
fontSize?: Record<string, any>;
|
|
17
|
-
fontFamily?: Record<string, string[]>;
|
|
18
|
-
borderRadius?: Record<string, string>;
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Load and parse Tailwind config
|
|
25
|
-
*/
|
|
26
|
-
export declare function loadTailwindConfig(): Promise<TailwindConfig | null>;
|
|
27
|
-
/**
|
|
28
|
-
* Resolve a color from Tailwind config
|
|
29
|
-
* Supports: primary, blue-500, slate-200, etc.
|
|
30
|
-
*/
|
|
31
|
-
export declare function resolveColor(colorName: string, tailwindConfig: TailwindConfig | null): string | null;
|
|
32
|
-
/**
|
|
33
|
-
* Resolve spacing value from Tailwind config
|
|
34
|
-
*/
|
|
35
|
-
export declare function resolveSpacing(value: string, tailwindConfig: TailwindConfig | null): string | null;
|
|
36
|
-
/**
|
|
37
|
-
* Resolve font size from Tailwind config
|
|
38
|
-
*/
|
|
39
|
-
export declare function resolveFontSize(size: string, tailwindConfig: TailwindConfig | null): {
|
|
40
|
-
fontSize: string;
|
|
41
|
-
lineHeight?: string;
|
|
42
|
-
} | null;
|
|
43
|
-
/**
|
|
44
|
-
* Resolve border radius from Tailwind config
|
|
45
|
-
*/
|
|
46
|
-
export declare function resolveBorderRadius(value: string, tailwindConfig: TailwindConfig | null): string | null;
|
|
2
|
+
* Tailwind config utilities
|
|
3
|
+
*
|
|
4
|
+
* Re-exports from shared modules for backwards compatibility.
|
|
5
|
+
* The auto-loading functionality has been removed.
|
|
6
|
+
*/
|
|
7
|
+
export type { TailwindConfig } from './tailwind/types.js';
|
|
8
|
+
export { DEFAULT_COLORS } from './tailwind/colors.js';
|
|
9
|
+
export { resolveColor, resolveSpacing, resolveFontSize, resolveBorderRadius, } from './tailwind/resolvers.js';
|
|
47
10
|
//# sourceMappingURL=tailwind-config-loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-config-loader.d.ts","sourceRoot":"","sources":["../../src/lib/tailwind-config-loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tailwind-config-loader.d.ts","sourceRoot":"","sources":["../../src/lib/tailwind-config-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,432 +1,9 @@
|
|
|
1
|
-
import fs from 'fs/promises';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { pathToFileURL } from 'url';
|
|
4
|
-
import { CWD } from './constants.js';
|
|
5
1
|
/**
|
|
6
|
-
*
|
|
2
|
+
* Tailwind config utilities
|
|
3
|
+
*
|
|
4
|
+
* Re-exports from shared modules for backwards compatibility.
|
|
5
|
+
* The auto-loading functionality has been removed.
|
|
7
6
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
}
|
|
7
|
+
export { DEFAULT_COLORS } from './tailwind/colors.js';
|
|
8
|
+
export { resolveColor, resolveSpacing, resolveFontSize, resolveBorderRadius, } from './tailwind/resolvers.js';
|
|
432
9
|
//# sourceMappingURL=tailwind-config-loader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-config-loader.js","sourceRoot":"","sources":["../../src/lib/tailwind-config-loader.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tailwind-config-loader.js","sourceRoot":"","sources":["../../src/lib/tailwind-config-loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAC"}
|
package/dist/lib/tailwind.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../src/lib/tailwind.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tailwind.d.ts","sourceRoot":"","sources":["../../src/lib/tailwind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAO1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAgkC3C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA2oBD,wBAAgB,EAAE,CAChB,OAAO,EAAE,MAAM,EACf,cAAc,GAAE,cAAc,GAAG,IAAW,EAC5C,cAAc,GAAE,GAAU,EAC1B,gBAAgB,GAAE,gBAAqB,GACtC,aAAa,CA2Mf"}
|
package/dist/lib/tailwind.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveColor, resolveSpacing, resolveFontSize, resolveBorderRadius, } from './tailwind
|
|
1
|
+
import { resolveColor, resolveSpacing, resolveFontSize, resolveBorderRadius, } from './tailwind/resolvers.js';
|
|
2
2
|
/**
|
|
3
3
|
* Tailwind class to style property mapping
|
|
4
4
|
* This is a simplified version - in production you'd parse the full Tailwind config
|