tailwind-styled-v4 1.0.1 → 4.0.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.
Files changed (90) hide show
  1. package/dist/animate.cjs +252 -0
  2. package/dist/animate.cjs.map +1 -0
  3. package/dist/animate.d.cts +117 -0
  4. package/dist/animate.d.ts +117 -0
  5. package/dist/animate.js +245 -0
  6. package/dist/animate.js.map +1 -0
  7. package/dist/astTransform-ua-eapqs.d.cts +41 -0
  8. package/dist/astTransform-ua-eapqs.d.ts +41 -0
  9. package/dist/compiler.cjs +3594 -0
  10. package/dist/compiler.cjs.map +1 -0
  11. package/dist/compiler.d.cts +716 -0
  12. package/dist/compiler.d.ts +716 -0
  13. package/dist/compiler.js +3535 -0
  14. package/dist/compiler.js.map +1 -0
  15. package/dist/css.cjs +71 -0
  16. package/dist/css.cjs.map +1 -0
  17. package/dist/css.d.cts +45 -0
  18. package/dist/css.d.ts +45 -0
  19. package/dist/css.js +62 -0
  20. package/dist/css.js.map +1 -0
  21. package/dist/devtools.cjs +959 -0
  22. package/dist/devtools.cjs.map +1 -0
  23. package/dist/devtools.d.cts +22 -0
  24. package/dist/devtools.d.ts +22 -0
  25. package/dist/devtools.js +952 -0
  26. package/dist/devtools.js.map +1 -0
  27. package/dist/index.cjs +1058 -0
  28. package/dist/index.cjs.map +1 -0
  29. package/dist/index.d.cts +584 -0
  30. package/dist/index.d.ts +449 -980
  31. package/dist/index.js +1021 -3
  32. package/dist/index.js.map +1 -1
  33. package/dist/next.cjs +268 -0
  34. package/dist/next.cjs.map +1 -0
  35. package/dist/next.d.cts +45 -0
  36. package/dist/next.d.ts +45 -0
  37. package/dist/next.js +261 -0
  38. package/dist/next.js.map +1 -0
  39. package/dist/plugins.cjs +396 -0
  40. package/dist/plugins.cjs.map +1 -0
  41. package/dist/plugins.d.cts +231 -0
  42. package/dist/plugins.d.ts +231 -0
  43. package/dist/plugins.js +381 -0
  44. package/dist/plugins.js.map +1 -0
  45. package/dist/preset.cjs +129 -0
  46. package/dist/preset.cjs.map +1 -0
  47. package/dist/preset.d.cts +249 -0
  48. package/dist/preset.d.ts +249 -0
  49. package/dist/preset.js +124 -0
  50. package/dist/preset.js.map +1 -0
  51. package/dist/theme.cjs +154 -0
  52. package/dist/theme.cjs.map +1 -0
  53. package/dist/theme.d.cts +181 -0
  54. package/dist/theme.d.ts +181 -0
  55. package/dist/theme.js +148 -0
  56. package/dist/theme.js.map +1 -0
  57. package/dist/turbopackLoader.cjs +2689 -0
  58. package/dist/turbopackLoader.cjs.map +1 -0
  59. package/dist/turbopackLoader.d.cts +22 -0
  60. package/dist/turbopackLoader.d.ts +22 -0
  61. package/dist/turbopackLoader.js +2681 -0
  62. package/dist/turbopackLoader.js.map +1 -0
  63. package/dist/vite.cjs +105 -0
  64. package/dist/vite.cjs.map +1 -0
  65. package/dist/vite.d.cts +22 -0
  66. package/dist/vite.d.ts +22 -0
  67. package/dist/vite.js +96 -0
  68. package/dist/vite.js.map +1 -0
  69. package/dist/webpackLoader.cjs +2670 -0
  70. package/dist/webpackLoader.cjs.map +1 -0
  71. package/dist/webpackLoader.d.cts +24 -0
  72. package/dist/webpackLoader.d.ts +24 -0
  73. package/dist/webpackLoader.js +2662 -0
  74. package/dist/webpackLoader.js.map +1 -0
  75. package/package.json +62 -32
  76. package/CHANGELOG.md +0 -75
  77. package/LICENSE +0 -21
  78. package/README.md +0 -608
  79. package/dist/cli/init.js +0 -208
  80. package/dist/compiler/index.d.mts +0 -214
  81. package/dist/compiler/index.d.ts +0 -214
  82. package/dist/compiler/index.js +0 -546
  83. package/dist/compiler/index.js.map +0 -1
  84. package/dist/compiler/index.mjs +0 -504
  85. package/dist/compiler/index.mjs.map +0 -1
  86. package/dist/index.d.mts +0 -1115
  87. package/dist/index.mjs +0 -4
  88. package/dist/index.mjs.map +0 -1
  89. package/dist/turbopack-loader.js +0 -232
  90. package/dist/webpack-loader.js +0 -213
package/dist/vite.cjs ADDED
@@ -0,0 +1,105 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var path = require('path');
6
+ var compiler = require('@tailwind-styled/compiler');
7
+
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
+
10
+ var path__default = /*#__PURE__*/_interopDefault(path);
11
+
12
+ /* tailwind-styled-v4 v4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
13
+ var __defProp = Object.defineProperty;
14
+ var __defProps = Object.defineProperties;
15
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
16
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
17
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
18
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
19
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
20
+ var __spreadValues = (a, b) => {
21
+ for (var prop in b || (b = {}))
22
+ if (__hasOwnProp.call(b, prop))
23
+ __defNormalProp(a, prop, b[prop]);
24
+ if (__getOwnPropSymbols)
25
+ for (var prop of __getOwnPropSymbols(b)) {
26
+ if (__propIsEnum.call(b, prop))
27
+ __defNormalProp(a, prop, b[prop]);
28
+ }
29
+ return a;
30
+ };
31
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
32
+ var __objRest = (source, exclude) => {
33
+ var target = {};
34
+ for (var prop in source)
35
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
36
+ target[prop] = source[prop];
37
+ if (source != null && __getOwnPropSymbols)
38
+ for (var prop of __getOwnPropSymbols(source)) {
39
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
40
+ target[prop] = source[prop];
41
+ }
42
+ return target;
43
+ };
44
+ function tailwindStyledPlugin(opts = {}) {
45
+ const _a = opts, {
46
+ include = /\.(tsx|ts|jsx|js)$/,
47
+ exclude = /node_modules/,
48
+ scanDirs = ["src"],
49
+ safelistOutput = ".tailwind-styled-safelist.json",
50
+ generateSafelist: doSafelist = true
51
+ } = _a, transformOpts = __objRest(_a, [
52
+ "include",
53
+ "exclude",
54
+ "scanDirs",
55
+ "safelistOutput",
56
+ "generateSafelist"
57
+ ]);
58
+ let root = process.cwd();
59
+ let isDev = true;
60
+ return {
61
+ name: "tailwind-styled-v4",
62
+ enforce: "pre",
63
+ configResolved(config) {
64
+ root = config.root;
65
+ isDev = config.command === "serve";
66
+ },
67
+ transform(source, id) {
68
+ var _a2, _b;
69
+ const filepath = id.split("?")[0];
70
+ if (!include.test(filepath)) return null;
71
+ if (exclude.test(filepath)) return null;
72
+ if (!compiler.shouldProcess(filepath)) return null;
73
+ const result = compiler.transformSource(source, __spreadProps(__spreadValues({}, transformOpts), {
74
+ mode: (_a2 = transformOpts.mode) != null ? _a2 : isDev ? "runtime" : "zero-runtime",
75
+ addDataAttr: (_b = transformOpts.addDataAttr) != null ? _b : isDev,
76
+ filename: filepath
77
+ }));
78
+ if (!result.changed) return null;
79
+ return { code: result.code, map: null };
80
+ },
81
+ buildEnd() {
82
+ if (!doSafelist || isDev) return;
83
+ try {
84
+ compiler.generateSafelist(
85
+ scanDirs.map((d) => path__default.default.resolve(root, d)),
86
+ path__default.default.resolve(root, safelistOutput),
87
+ root
88
+ );
89
+ } catch (e) {
90
+ console.warn("[tailwind-styled-v4] Safelist generation failed:", e);
91
+ }
92
+ },
93
+ handleHotUpdate({ file, server }) {
94
+ if (include.test(file) && compiler.shouldProcess(file)) {
95
+ server.ws.send({ type: "full-reload" });
96
+ }
97
+ }
98
+ };
99
+ }
100
+ var plugin_default = tailwindStyledPlugin;
101
+
102
+ exports.default = plugin_default;
103
+ exports.tailwindStyledPlugin = tailwindStyledPlugin;
104
+ //# sourceMappingURL=vite.cjs.map
105
+ //# sourceMappingURL=vite.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../vite/src/plugin.ts"],"names":["_a","shouldProcess","transformSource","generateSafelist","path"],"mappings":";;;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in } from \"tailwind-styled-v4/vite\"\n * export default defineConfig({\n * plugins: [react(), tailwindStyledPlugin()]\n * })\n */\n\nimport path from \"node:path\"\nimport type { TransformOptions } from \"@tailwind-styled/compiler\"\nimport { generateSafelist, shouldProcess, transformSource } from \"@tailwind-styled/compiler\"\n\nexport interface VitePluginOptions extends TransformOptions {\n include?: RegExp\n exclude?: RegExp\n scanDirs?: string[]\n safelistOutput?: string\n generateSafelist?: boolean\n}\n\nexport function tailwindStyledPlugin(opts: VitePluginOptions = {}): any {\n const {\n include = /\\.(tsx|ts|jsx|js)$/,\n exclude = /node_modules/,\n scanDirs = [\"src\"],\n safelistOutput = \".tailwind-styled-safelist.json\",\n generateSafelist: doSafelist = true,\n ...transformOpts\n } = opts\n\n let root = process.cwd()\n let isDev = true\n\n return {\n name: \"tailwind-styled-v4\",\n enforce: \"pre\" as const,\n\n configResolved(config: any) {\n root = config.root\n isDev = config.command === \"serve\"\n },\n\n transform(source: string, id: string) {\n const filepath = id.split(\"?\")[0]\n if (!include.test(filepath)) return null\n if (exclude.test(filepath)) return null\n if (!shouldProcess(filepath)) return null\n\n const result = transformSource(source, {\n ...transformOpts,\n mode: transformOpts.mode ?? (isDev ? \"runtime\" : \"zero-runtime\"),\n addDataAttr: transformOpts.addDataAttr ?? isDev,\n filename: filepath,\n })\n\n if (!result.changed) return null\n return { code: result.code, map: null }\n },\n\n buildEnd() {\n if (!doSafelist || isDev) return\n\n try {\n generateSafelist(\n scanDirs.map((d) => path.resolve(root, d)),\n path.resolve(root, safelistOutput),\n root\n )\n } catch (e) {\n console.warn(\"[tailwind-styled-v4] Safelist generation failed:\", e)\n }\n },\n\n handleHotUpdate({ file, server }: any) {\n if (include.test(file) && shouldProcess(file)) {\n server.ws.send({ type: \"full-reload\" })\n }\n },\n }\n}\n\nexport default tailwindStyledPlugin\n"]}
@@ -0,0 +1,22 @@
1
+ import { TransformOptions } from '@tailwind-styled/compiler';
2
+
3
+ /**
4
+ * tailwind-styled-v4 — Vite Plugin
5
+ *
6
+ * Usage in vite.config.ts:
7
+ * import { tailwindStyledPlugin } from "tailwind-styled-v4/vite"
8
+ * export default defineConfig({
9
+ * plugins: [react(), tailwindStyledPlugin()]
10
+ * })
11
+ */
12
+
13
+ interface VitePluginOptions extends TransformOptions {
14
+ include?: RegExp;
15
+ exclude?: RegExp;
16
+ scanDirs?: string[];
17
+ safelistOutput?: string;
18
+ generateSafelist?: boolean;
19
+ }
20
+ declare function tailwindStyledPlugin(opts?: VitePluginOptions): any;
21
+
22
+ export { type VitePluginOptions, tailwindStyledPlugin as default, tailwindStyledPlugin };
package/dist/vite.d.ts ADDED
@@ -0,0 +1,22 @@
1
+ import { TransformOptions } from '@tailwind-styled/compiler';
2
+
3
+ /**
4
+ * tailwind-styled-v4 — Vite Plugin
5
+ *
6
+ * Usage in vite.config.ts:
7
+ * import { tailwindStyledPlugin } from "tailwind-styled-v4/vite"
8
+ * export default defineConfig({
9
+ * plugins: [react(), tailwindStyledPlugin()]
10
+ * })
11
+ */
12
+
13
+ interface VitePluginOptions extends TransformOptions {
14
+ include?: RegExp;
15
+ exclude?: RegExp;
16
+ scanDirs?: string[];
17
+ safelistOutput?: string;
18
+ generateSafelist?: boolean;
19
+ }
20
+ declare function tailwindStyledPlugin(opts?: VitePluginOptions): any;
21
+
22
+ export { type VitePluginOptions, tailwindStyledPlugin as default, tailwindStyledPlugin };
package/dist/vite.js ADDED
@@ -0,0 +1,96 @@
1
+ import path from 'path';
2
+ import { shouldProcess, transformSource, generateSafelist } from '@tailwind-styled/compiler';
3
+
4
+ /* tailwind-styled-v4 v4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
5
+ var __defProp = Object.defineProperty;
6
+ var __defProps = Object.defineProperties;
7
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __objRest = (source, exclude) => {
25
+ var target = {};
26
+ for (var prop in source)
27
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
28
+ target[prop] = source[prop];
29
+ if (source != null && __getOwnPropSymbols)
30
+ for (var prop of __getOwnPropSymbols(source)) {
31
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
32
+ target[prop] = source[prop];
33
+ }
34
+ return target;
35
+ };
36
+ function tailwindStyledPlugin(opts = {}) {
37
+ const _a = opts, {
38
+ include = /\.(tsx|ts|jsx|js)$/,
39
+ exclude = /node_modules/,
40
+ scanDirs = ["src"],
41
+ safelistOutput = ".tailwind-styled-safelist.json",
42
+ generateSafelist: doSafelist = true
43
+ } = _a, transformOpts = __objRest(_a, [
44
+ "include",
45
+ "exclude",
46
+ "scanDirs",
47
+ "safelistOutput",
48
+ "generateSafelist"
49
+ ]);
50
+ let root = process.cwd();
51
+ let isDev = true;
52
+ return {
53
+ name: "tailwind-styled-v4",
54
+ enforce: "pre",
55
+ configResolved(config) {
56
+ root = config.root;
57
+ isDev = config.command === "serve";
58
+ },
59
+ transform(source, id) {
60
+ var _a2, _b;
61
+ const filepath = id.split("?")[0];
62
+ if (!include.test(filepath)) return null;
63
+ if (exclude.test(filepath)) return null;
64
+ if (!shouldProcess(filepath)) return null;
65
+ const result = transformSource(source, __spreadProps(__spreadValues({}, transformOpts), {
66
+ mode: (_a2 = transformOpts.mode) != null ? _a2 : isDev ? "runtime" : "zero-runtime",
67
+ addDataAttr: (_b = transformOpts.addDataAttr) != null ? _b : isDev,
68
+ filename: filepath
69
+ }));
70
+ if (!result.changed) return null;
71
+ return { code: result.code, map: null };
72
+ },
73
+ buildEnd() {
74
+ if (!doSafelist || isDev) return;
75
+ try {
76
+ generateSafelist(
77
+ scanDirs.map((d) => path.resolve(root, d)),
78
+ path.resolve(root, safelistOutput),
79
+ root
80
+ );
81
+ } catch (e) {
82
+ console.warn("[tailwind-styled-v4] Safelist generation failed:", e);
83
+ }
84
+ },
85
+ handleHotUpdate({ file, server }) {
86
+ if (include.test(file) && shouldProcess(file)) {
87
+ server.ws.send({ type: "full-reload" });
88
+ }
89
+ }
90
+ };
91
+ }
92
+ var plugin_default = tailwindStyledPlugin;
93
+
94
+ export { plugin_default as default, tailwindStyledPlugin };
95
+ //# sourceMappingURL=vite.js.map
96
+ //# sourceMappingURL=vite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../vite/src/plugin.ts"],"names":["_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBO,SAAS,oBAAA,CAAqB,IAAA,GAA0B,EAAC,EAAQ;AACtE,EAAA,MAOI,EAAA,GAAA,IAAA,EANF;AAAA,IAAA,OAAA,GAAU,oBAAA;AAAA,IACV,OAAA,GAAU,cAAA;AAAA,IACV,QAAA,GAAW,CAAC,KAAK,CAAA;AAAA,IACjB,cAAA,GAAiB,gCAAA;AAAA,IACjB,kBAAkB,UAAA,GAAa;AAAA,GA5BnC,GA8BM,EAAA,EADC,aAAA,GAAA,SAAA,CACD,EAAA,EADC;AAAA,IALH,SAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,gBAAA;AAAA,IACA;AAAA,GAAA,CAAA;AAIF,EAAA,IAAI,IAAA,GAAO,QAAQ,GAAA,EAAI;AACvB,EAAA,IAAI,KAAA,GAAQ,IAAA;AAEZ,E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IAAI,CAAC,CAAA,KAAM,KAAK,OAAA,CAAQ,IAAA,EAAM,CAAC,CAAC,CAAA;AAAA,UACzC,IAAA,CAAK,OAAA,CAAQ,IAAA,EAAM,cAAc,CAAA;AAAA,UACjC;AAAA,SACF;AAAA,MACF,SAAS,CAAA,EAAG;AACV,QAAA,OAAA,CAAQ,IAAA,CAAK,oDAAoD,CAAC,CAAA;AAAA,MACpE;AAAA,IACF,CAAA;AAAA,IAEA,eAAA,CAAgB,EAAE,IAAA,EAAM,MAAA,EAAO,EAAQ;AACrC,MAAA,IAAI,QAAQ,IAAA,CAAK,IAAI,CAAA,IAAK,aAAA,CAAc,IAAI,CAAA,EAAG;AAC7C,QAAA,MAAA,CAAO,EAAA,CAAG,IAAA,CAAK,EAAE,IAAA,EAAM,eAAe,CAAA;AAAA,MACxC;AAAA,IACF;AAAA,GACF;AACF;AAEA,IAAO,cAAA,GAAQ","file":"vite.js","sourcesContent":["/**\n * tailwind-styled-v4 — Vite Plugin\n *\n * Usage in vite.config.ts:\n * import { tailwindStyledPlugin } from \"tailwind-styled-v4/vite\"\n * export default defineConfig({\n * plugins: [react(), tailwindStyledPlugin()]\n * })\n */\n\nimport path from \"node:path\"\nimport type { TransformOptions } from \"@tailwind-styled/compiler\"\nimport { generateSafelist, shouldProcess, transformSource } from \"@tailwind-styled/compiler\"\n\nexport interface VitePluginOptions extends TransformOptions {\n include?: RegExp\n exclude?: RegExp\n scanDirs?: string[]\n safelistOutput?: string\n generateSafelist?: boolean\n}\n\nexport function tailwindStyledPlugin(opts: VitePluginOptions = {}): any {\n const {\n include = /\\.(tsx|ts|jsx|js)$/,\n exclude = /node_modules/,\n scanDirs = [\"src\"],\n safelistOutput = \".tailwind-styled-safelist.json\",\n generateSafelist: doSafelist = true,\n ...transformOpts\n } = opts\n\n let root = process.cwd()\n let isDev = true\n\n return {\n name: \"tailwind-styled-v4\",\n enforce: \"pre\" as const,\n\n configResolved(config: any) {\n root = config.root\n isDev = config.command === \"serve\"\n },\n\n transform(source: string, id: string) {\n const filepath = id.split(\"?\")[0]\n if (!include.test(filepath)) return null\n if (exclude.test(filepath)) return null\n if (!shouldProcess(filepath)) return null\n\n const result = transformSource(source, {\n ...transformOpts,\n mode: transformOpts.mode ?? (isDev ? \"runtime\" : \"zero-runtime\"),\n addDataAttr: transformOpts.addDataAttr ?? isDev,\n filename: filepath,\n })\n\n if (!result.changed) return null\n return { code: result.code, map: null }\n },\n\n buildEnd() {\n if (!doSafelist || isDev) return\n\n try {\n generateSafelist(\n scanDirs.map((d) => path.resolve(root, d)),\n path.resolve(root, safelistOutput),\n root\n )\n } catch (e) {\n console.warn(\"[tailwind-styled-v4] Safelist generation failed:\", e)\n }\n },\n\n handleHotUpdate({ file, server }: any) {\n if (include.test(file) && shouldProcess(file)) {\n server.ws.send({ type: \"full-reload\" })\n }\n },\n }\n}\n\nexport default tailwindStyledPlugin\n"]}