@udixio/tailwind 1.3.0 → 1.4.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/dist/node.js ADDED
@@ -0,0 +1,332 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import { T as TailwindImplPluginBrowser, m as main } from "./tailwind.plugin-BqW8MAYp.js";
5
+ import { f, s } from "./tailwind.plugin-BqW8MAYp.js";
6
+ import { PluginAbstract, FontPlugin } from "@udixio/theme";
7
+ import * as fs from "fs";
8
+ import * as console from "node:console";
9
+ import { join, resolve, dirname, normalize } from "pathe";
10
+ import chalk from "chalk";
11
+ class TailwindPlugin extends PluginAbstract {
12
+ constructor() {
13
+ super(...arguments);
14
+ __publicField(this, "dependencies", [FontPlugin]);
15
+ __publicField(this, "name", "tailwind");
16
+ __publicField(this, "pluginClass", TailwindImplPlugin);
17
+ }
18
+ }
19
+ class TailwindImplPlugin extends TailwindImplPluginBrowser {
20
+ isNodeJs() {
21
+ return typeof process !== "undefined" && process.versions != null && process.versions.node != null;
22
+ }
23
+ async onLoad() {
24
+ var _a;
25
+ if (!this.isNodeJs()) {
26
+ await super.onLoad();
27
+ return;
28
+ }
29
+ const { join: join2, resolve: resolve2 } = await import("pathe");
30
+ const {
31
+ createOrUpdateFile: createOrUpdateFile2,
32
+ findProjectRoot: findProjectRoot2,
33
+ findTailwindCssFile: findTailwindCssFile2,
34
+ getFileContent: getFileContent2,
35
+ replaceFileContent: replaceFileContent2
36
+ } = await Promise.resolve().then(() => file);
37
+ this.colors = {};
38
+ for (const isDark of [false, true]) {
39
+ this.api.themes.update({ isDark });
40
+ for (const [key, value] of this.api.colors.getColors().entries()) {
41
+ const newKey = key.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
42
+ (_a = this.colors)[newKey] ?? (_a[newKey] = { light: "", dark: "" });
43
+ this.colors[newKey][isDark ? "dark" : "light"] = value.getHex();
44
+ }
45
+ }
46
+ let udixioCssPath = this.options.styleFilePath;
47
+ const projectRoot = await findProjectRoot2(resolve2());
48
+ if (!udixioCssPath) {
49
+ const searchPattern = /@import ["']tailwindcss["'];/;
50
+ const replacement = `@import 'tailwindcss';
51
+ @import "./udixio.css";`;
52
+ const tailwindCssPath = await findTailwindCssFile2(
53
+ projectRoot,
54
+ searchPattern
55
+ );
56
+ udixioCssPath = join2(tailwindCssPath, "../udixio.css");
57
+ if (!await getFileContent2(tailwindCssPath, /@import\s+"\.\/udixio\.css";/)) {
58
+ await replaceFileContent2(tailwindCssPath, searchPattern, replacement);
59
+ }
60
+ }
61
+ const { fontStyles, fontFamily } = this.api.plugins.getPlugin(FontPlugin).getInstance().getFonts();
62
+ const configCss = {
63
+ colorKeys: Object.keys(this.colors).join(", "),
64
+ fontStyles: Object.entries(fontStyles).map(
65
+ ([fontRole, fontStyle]) => Object.entries(fontStyle).map(
66
+ ([fontSize, fontStyle2]) => `${fontRole}-${fontSize} ${Object.entries(fontStyle2).map(([name, value]) => `${name}[${value}]`).join(" ")}`
67
+ ).join(", ")
68
+ ).join(", "),
69
+ responsiveBreakPoints: Object.entries(
70
+ this.options.responsiveBreakPoints ?? {}
71
+ ).map(([key, value]) => `${key} ${value}`).join(", ")
72
+ };
73
+ this.outputCss += `@plugin "@udixio/tailwind" {
74
+ colorKeys: ${configCss.colorKeys};
75
+ fontStyles: ${configCss.fontStyles};
76
+ responsiveBreakPoints: ${configCss.responsiveBreakPoints};
77
+ }`;
78
+ this.loadColor();
79
+ this.outputCss += `
80
+ @theme {
81
+ ${Object.entries(fontFamily).map(
82
+ ([key, values]) => `--font-${key}: ${values.map((value) => `"${value}"`).join(", ")};`
83
+ ).join("\n ")}
84
+ }`;
85
+ await createOrUpdateFile2(udixioCssPath, this.outputCss);
86
+ }
87
+ }
88
+ const normalizePath = async (filePath) => {
89
+ const { fileURLToPath } = await import("url");
90
+ try {
91
+ if (filePath.startsWith("file://")) {
92
+ return normalize(fileURLToPath(filePath));
93
+ }
94
+ return normalize(filePath);
95
+ } catch (error) {
96
+ console.warn(
97
+ chalk.yellow(
98
+ `⚠️ Could not process path ${filePath}, treating as regular path`
99
+ )
100
+ );
101
+ return normalize(filePath);
102
+ }
103
+ };
104
+ const safeExistsSync = async (filePath) => {
105
+ return fs.existsSync(await normalizePath(filePath));
106
+ };
107
+ const safeReadFileSync = async (filePath, encoding = "utf8") => {
108
+ return fs.readFileSync(await normalizePath(filePath), encoding);
109
+ };
110
+ const safeWriteFileSync = async (filePath, data) => {
111
+ const normalizedPath = await normalizePath(filePath);
112
+ const dirPath = dirname(normalizedPath);
113
+ if (!fs.existsSync(dirPath)) {
114
+ fs.mkdirSync(dirPath, { recursive: true });
115
+ }
116
+ fs.writeFileSync(normalizedPath, data);
117
+ };
118
+ const createOrUpdateFile = async (filePath, content) => {
119
+ try {
120
+ const normalizedPath = normalizePath(filePath);
121
+ if (!await safeExistsSync(filePath)) {
122
+ await safeWriteFileSync(filePath, content);
123
+ console.log(
124
+ chalk.green(`📄 Created`) + chalk.gray(` • `) + chalk.cyan(normalizedPath)
125
+ );
126
+ } else {
127
+ console.log(
128
+ chalk.blue(`📝 Exists`) + chalk.gray(` • `) + chalk.cyan(normalizedPath)
129
+ );
130
+ await replaceFileContent(filePath, /[\s\S]*/, content);
131
+ }
132
+ } catch (error) {
133
+ console.error(
134
+ chalk.red(`🚨 Failed to create file`) + chalk.gray(` • `) + chalk.cyan(filePath)
135
+ );
136
+ console.error(
137
+ chalk.gray(` `) + chalk.red(error instanceof Error ? error.message : error)
138
+ );
139
+ }
140
+ };
141
+ const getFileContent = async (filePath, searchPattern) => {
142
+ try {
143
+ const normalizedPath = normalizePath(filePath);
144
+ if (!await safeExistsSync(filePath)) {
145
+ console.error(
146
+ chalk.red(`❌ File not found`) + chalk.gray(` • `) + chalk.cyan(normalizedPath)
147
+ );
148
+ return null;
149
+ }
150
+ const fileContent = await safeReadFileSync(filePath);
151
+ if (searchPattern) {
152
+ if (typeof searchPattern === "string") {
153
+ const found = fileContent.includes(searchPattern) ? searchPattern : false;
154
+ if (found) {
155
+ console.log(
156
+ chalk.green(`🔍 Found`) + chalk.gray(` • `) + chalk.yellow(`"${searchPattern}"`)
157
+ );
158
+ } else {
159
+ console.log(
160
+ chalk.yellow(`🔍 Missing`) + chalk.gray(` • `) + chalk.yellow(`"${searchPattern}"`)
161
+ );
162
+ }
163
+ return found;
164
+ } else {
165
+ const match = fileContent.match(searchPattern);
166
+ if (match) {
167
+ console.log(
168
+ chalk.green(`🎯 Match`) + chalk.gray(` • `) + chalk.yellow(`"${match[0]}"`)
169
+ );
170
+ return match[0];
171
+ } else {
172
+ console.log(
173
+ chalk.yellow(`🎯 No match`) + chalk.gray(` • `) + chalk.magenta(searchPattern.toString())
174
+ );
175
+ return false;
176
+ }
177
+ }
178
+ }
179
+ console.log(
180
+ chalk.blue(`📖 Read`) + chalk.gray(` • `) + chalk.cyan(normalizedPath)
181
+ );
182
+ return fileContent;
183
+ } catch (error) {
184
+ console.error(
185
+ chalk.red(`🚨 Read failed`) + chalk.gray(` • `) + chalk.cyan(filePath)
186
+ );
187
+ console.error(
188
+ chalk.gray(` `) + chalk.red(error instanceof Error ? error.message : error)
189
+ );
190
+ return null;
191
+ }
192
+ };
193
+ const replaceFileContent = async (filePath, searchPattern, replacement) => {
194
+ try {
195
+ const { replaceInFileSync } = await import("replace-in-file");
196
+ const normalizedPath = await normalizePath(filePath);
197
+ const results = replaceInFileSync({
198
+ files: normalizedPath,
199
+ from: searchPattern,
200
+ to: replacement
201
+ });
202
+ if (results.length > 0 && results[0].hasChanged) {
203
+ console.log(
204
+ chalk.green(`✏️ Updated`) + chalk.gray(` • `) + chalk.cyan(normalizedPath)
205
+ );
206
+ } else {
207
+ console.log(
208
+ chalk.yellow(`⏭️ Skipped`) + chalk.gray(` • `) + chalk.cyan(normalizedPath) + chalk.gray(` (no changes needed)`)
209
+ );
210
+ }
211
+ } catch (error) {
212
+ console.error(
213
+ chalk.red(`🚨 Update failed`) + chalk.gray(` • `) + chalk.cyan(filePath)
214
+ );
215
+ console.error(
216
+ chalk.gray(` `) + chalk.red(error instanceof Error ? error.message : error)
217
+ );
218
+ }
219
+ };
220
+ const findTailwindCssFile = async (startDir, searchPattern) => {
221
+ const normalizedStartDir = await normalizePath(startDir);
222
+ console.log(chalk.blue(`🔎 Searching for CSS file...`));
223
+ console.log(
224
+ chalk.gray(` Starting from: `) + chalk.cyan(normalizedStartDir)
225
+ );
226
+ const stack = [normalizedStartDir];
227
+ let filesScanned = 0;
228
+ while (stack.length > 0) {
229
+ const currentDir = stack.pop();
230
+ let files;
231
+ try {
232
+ files = fs.readdirSync(currentDir);
233
+ } catch (error) {
234
+ console.error(
235
+ chalk.gray(` `) + chalk.red(`❌ Cannot read directory: `) + chalk.cyan(currentDir)
236
+ );
237
+ continue;
238
+ }
239
+ for (const file2 of files) {
240
+ const filePath = join(currentDir, file2);
241
+ let stats;
242
+ try {
243
+ stats = fs.statSync(filePath);
244
+ } catch (error) {
245
+ console.error(
246
+ chalk.gray(` `) + chalk.red(`❌ Cannot access: `) + chalk.cyan(filePath)
247
+ );
248
+ continue;
249
+ }
250
+ if (stats.isDirectory()) {
251
+ if (file2 !== "node_modules" && !file2.startsWith(".")) {
252
+ stack.push(filePath);
253
+ }
254
+ } else if (stats.isFile() && (file2.endsWith(".css") || file2.endsWith(".scss") || file2.endsWith(".sass"))) {
255
+ try {
256
+ filesScanned++;
257
+ process.stdout.write(
258
+ chalk.gray(` 📂 Scanning: `) + chalk.yellow(file2) + `\r`
259
+ );
260
+ const content = await safeReadFileSync(filePath);
261
+ const hasMatch = typeof searchPattern === "string" ? content.includes(searchPattern) : searchPattern.test(content);
262
+ if (hasMatch) {
263
+ console.log(chalk.green(`
264
+ 🎯 Found target file!`));
265
+ console.log(chalk.gray(` 📍 Location: `) + chalk.cyan(filePath));
266
+ return filePath;
267
+ }
268
+ } catch (readError) {
269
+ console.error(
270
+ chalk.gray(`
271
+ `) + chalk.red(`❌ Cannot read: `) + chalk.cyan(filePath)
272
+ );
273
+ }
274
+ }
275
+ }
276
+ }
277
+ console.log(
278
+ chalk.blue(`
279
+ 📊 Scanned `) + chalk.white.bold(filesScanned.toString()) + chalk.blue(` CSS files`)
280
+ );
281
+ const errorMsg = chalk.red(`❌ No file found containing `) + chalk.yellow(`"${searchPattern}"`) + chalk.red(` in `) + chalk.cyan(`"${normalizedStartDir}"`);
282
+ throw new Error(errorMsg);
283
+ };
284
+ async function findProjectRoot(startPath) {
285
+ const normalizedStartPath = await normalizePath(startPath);
286
+ let currentPath = resolve(normalizedStartPath);
287
+ let levels = 0;
288
+ console.log(chalk.blue(`🏠 Finding project root...`));
289
+ console.log(
290
+ chalk.gray(` Starting from: `) + chalk.cyan(normalizedStartPath)
291
+ );
292
+ while (!fs.existsSync(join(currentPath, "package.json"))) {
293
+ const parentPath = dirname(currentPath);
294
+ if (currentPath === parentPath) {
295
+ console.error(
296
+ chalk.red(`❌ Project root not found after checking `) + chalk.white.bold(levels.toString()) + chalk.red(` levels`)
297
+ );
298
+ throw new Error(
299
+ chalk.red("Unable to locate project root (no package.json found)")
300
+ );
301
+ }
302
+ currentPath = parentPath;
303
+ levels++;
304
+ if (levels > 10) {
305
+ console.error(
306
+ chalk.red(`❌ Stopped after `) + chalk.white.bold(levels.toString()) + chalk.red(` levels (too deep)`)
307
+ );
308
+ throw new Error(chalk.red("Project root search exceeded maximum depth"));
309
+ }
310
+ }
311
+ console.log(chalk.green(`📁 Project root: `) + chalk.cyan(currentPath));
312
+ return currentPath;
313
+ }
314
+ const file = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
315
+ __proto__: null,
316
+ createOrUpdateFile,
317
+ findProjectRoot,
318
+ findTailwindCssFile,
319
+ getFileContent,
320
+ replaceFileContent
321
+ }, Symbol.toStringTag, { value: "Module" }));
322
+ export {
323
+ TailwindPlugin,
324
+ createOrUpdateFile,
325
+ main as default,
326
+ findProjectRoot,
327
+ findTailwindCssFile,
328
+ f as font,
329
+ getFileContent,
330
+ replaceFileContent,
331
+ s as state
332
+ };
@@ -0,0 +1,219 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import plugin from "tailwindcss/plugin";
5
+ import { PluginAbstract, FontPlugin, PluginImplAbstract } from "@udixio/theme";
6
+ const defaultConfig = {
7
+ statePrefix: "state",
8
+ disabledStyles: {
9
+ textOpacity: 0.38,
10
+ backgroundOpacity: 0.12
11
+ },
12
+ transition: {
13
+ duration: 150
14
+ }
15
+ };
16
+ const state = plugin.withOptions(({ colorKeys }) => {
17
+ const resolved = {
18
+ ...defaultConfig,
19
+ disabledStyles: {
20
+ ...defaultConfig.disabledStyles,
21
+ ...{}
22
+ },
23
+ transition: {
24
+ ...defaultConfig.transition,
25
+ ...{}
26
+ }
27
+ };
28
+ return ({ addComponents }) => {
29
+ const newComponents = {};
30
+ for (const isGroup of [false, true]) {
31
+ const group = isGroup ? "group-" : "";
32
+ for (const colorName of colorKeys) {
33
+ const className = `.${group}${resolved.statePrefix}-${colorName}`;
34
+ newComponents[className] = {
35
+ [`@apply ${group}hover:bg-${colorName}/[0.08]`]: {},
36
+ [`@apply ${group}active:bg-${colorName}/[0.12]`]: {},
37
+ [`@apply ${group}focus-visible:bg-${colorName}/[0.12]`]: {},
38
+ [`@apply transition-colors`]: {},
39
+ [`@apply duration-${resolved.transition.duration}`]: {},
40
+ [`@apply ${group}disabled:text-on-surface/[${resolved.disabledStyles.textOpacity}]`]: {},
41
+ [`@apply ${group}disabled:bg-on-surface/[${resolved.disabledStyles.backgroundOpacity}]`]: {}
42
+ };
43
+ }
44
+ }
45
+ for (const colorName of colorKeys) {
46
+ for (const stateName of ["hover", "active", "focus", "disabled"]) {
47
+ const className = `.${stateName}-${resolved.statePrefix}-${colorName}`;
48
+ if (stateName === "disabled") {
49
+ newComponents[className] = {
50
+ [`@apply text-on-surface/[${resolved.disabledStyles.textOpacity}]`]: {},
51
+ [`@apply bg-on-surface/[${resolved.disabledStyles.backgroundOpacity}]`]: {}
52
+ };
53
+ } else {
54
+ const opacity = stateName === "hover" ? 0.08 : 0.12;
55
+ newComponents[className] = {
56
+ [`@apply bg-${colorName}/[${opacity}]`]: {}
57
+ };
58
+ }
59
+ }
60
+ }
61
+ addComponents(newComponents);
62
+ };
63
+ });
64
+ const font = plugin.withOptions((options) => {
65
+ return ({
66
+ addUtilities,
67
+ theme
68
+ }) => {
69
+ const { fontStyles, responsiveBreakPoints } = options;
70
+ const pixelUnit = "rem";
71
+ const newUtilities = {};
72
+ const baseTextStyle = (sizeValue) => ({
73
+ fontSize: sizeValue.fontSize + pixelUnit,
74
+ fontWeight: sizeValue.fontWeight,
75
+ lineHeight: sizeValue.lineHeight + pixelUnit,
76
+ letterSpacing: sizeValue.letterSpacing ? sizeValue.letterSpacing + pixelUnit : null,
77
+ fontFamily: theme("fontFamily." + sizeValue.fontFamily)
78
+ });
79
+ const responsiveTextStyle = (sizeValue, breakPointName, breakPointRatio) => ({
80
+ [`@media (min-width: ${theme("screens." + breakPointName, {})})`]: {
81
+ fontSize: sizeValue.fontSize * breakPointRatio + pixelUnit,
82
+ lineHeight: sizeValue.lineHeight * breakPointRatio + pixelUnit
83
+ }
84
+ });
85
+ for (const [roleName, roleValue] of Object.entries(fontStyles)) {
86
+ for (const [sizeName, sizeValue] of Object.entries(roleValue)) {
87
+ newUtilities[`.text-${roleName}-${sizeName}`] = {
88
+ ...baseTextStyle(sizeValue),
89
+ ...Object.entries(responsiveBreakPoints).reduce(
90
+ (acc, [breakPointName, breakPointRatio]) => ({
91
+ ...acc,
92
+ ...responsiveTextStyle(
93
+ sizeValue,
94
+ breakPointName,
95
+ breakPointRatio
96
+ )
97
+ }),
98
+ {}
99
+ )
100
+ };
101
+ }
102
+ }
103
+ addUtilities(newUtilities);
104
+ };
105
+ });
106
+ const shadow = plugin(
107
+ ({ addUtilities }) => {
108
+ addUtilities({
109
+ [".shadow"]: {
110
+ boxShadow: "0 4px 10px #00000008, 0 0 2px #0000000f, 0 2px 6px #0000001f"
111
+ },
112
+ [".shadow-1"]: {
113
+ boxShadow: "0px 1px 3px 1px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30)"
114
+ },
115
+ [".shadow-2"]: {
116
+ boxShadow: "0px 2px 6px 2px rgba(0, 0, 0, 0.15), 0px 1px 2px 0px rgba(0, 0, 0, 0.30)"
117
+ },
118
+ [".shadow-3"]: {
119
+ boxShadow: "0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)"
120
+ },
121
+ [".shadow-4"]: {
122
+ boxShadow: "0px 2px 3px 0px rgba(0, 0, 0, 0.30), 0px 6px 10px 4px rgba(0, 0, 0, 0.15)"
123
+ },
124
+ [".box-shadow-5"]: {
125
+ boxShadow: "0px 4px 4px 0px rgba(0, 0, 0, 0.30), 0px 8px 12px 6px rgba(0, 0, 0, 0.15)"
126
+ }
127
+ });
128
+ }
129
+ );
130
+ const main = plugin.withOptions((args) => {
131
+ const configCss = args;
132
+ const fontStyles = {};
133
+ configCss.fontStyles.forEach((line) => {
134
+ const [styleToken, ...properties] = line.split(" ");
135
+ const [roleToken, sizeToken] = styleToken.split("-");
136
+ fontStyles[roleToken] ?? (fontStyles[roleToken] = {});
137
+ properties.forEach((properties2) => {
138
+ var _a;
139
+ (_a = fontStyles[roleToken])[sizeToken] ?? (_a[sizeToken] = {});
140
+ const [key, value] = properties2.slice(0, -1).split("[");
141
+ fontStyles[roleToken][sizeToken][key] = value;
142
+ });
143
+ });
144
+ let breakPointsCss = configCss.responsiveBreakPoints;
145
+ if (!Array.isArray(breakPointsCss)) {
146
+ breakPointsCss = [breakPointsCss];
147
+ }
148
+ const responsiveBreakPoints = {};
149
+ breakPointsCss.forEach((line) => {
150
+ const [key, value] = line.split(" ");
151
+ responsiveBreakPoints[key] = value;
152
+ });
153
+ const options = {
154
+ colorKeys: configCss.colorKeys,
155
+ fontStyles,
156
+ responsiveBreakPoints
157
+ };
158
+ return (api) => {
159
+ font(options).handler(api);
160
+ state(options).handler(api);
161
+ shadow.handler(api);
162
+ };
163
+ });
164
+ class TailwindPlugin extends PluginAbstract {
165
+ constructor() {
166
+ super(...arguments);
167
+ __publicField(this, "dependencies", [FontPlugin]);
168
+ __publicField(this, "name", "tailwind");
169
+ __publicField(this, "pluginClass", TailwindImplPluginBrowser);
170
+ }
171
+ }
172
+ class TailwindImplPluginBrowser extends PluginImplAbstract {
173
+ constructor() {
174
+ super(...arguments);
175
+ __publicField(this, "outputCss", "");
176
+ __publicField(this, "colors", {});
177
+ }
178
+ onInit() {
179
+ var _a;
180
+ (_a = this.options).responsiveBreakPoints ?? (_a.responsiveBreakPoints = {
181
+ lg: 1.125
182
+ });
183
+ }
184
+ loadColor() {
185
+ this.outputCss += `
186
+ @custom-variant dark (&:where(.dark, .dark *));
187
+ @theme {
188
+ --color-*: initial;
189
+ ${Object.entries(this.colors).map(([key, value]) => `--color-${key}: ${value.light};`).join("\n ")}
190
+ }
191
+ @layer theme {
192
+ .dark {
193
+ ${Object.entries(this.colors).map(([key, value]) => `--color-${key}: ${value.dark};`).join("\n ")}
194
+ }
195
+ }
196
+ `;
197
+ }
198
+ async onLoad() {
199
+ var _a;
200
+ this.colors = {};
201
+ for (const isDark of [false, true]) {
202
+ this.api.themes.update({ isDark });
203
+ for (const [key, value] of this.api.colors.getColors().entries()) {
204
+ const newKey = key.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
205
+ (_a = this.colors)[newKey] ?? (_a[newKey] = { light: "", dark: "" });
206
+ this.colors[newKey][isDark ? "dark" : "light"] = value.getHex();
207
+ }
208
+ }
209
+ await import("@tailwindcss/browser");
210
+ this.loadColor();
211
+ }
212
+ }
213
+ export {
214
+ TailwindImplPluginBrowser as T,
215
+ TailwindPlugin as a,
216
+ font as f,
217
+ main as m,
218
+ state as s
219
+ };