tailwind-styled-v4 5.0.40 → 5.1.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.
Files changed (103) hide show
  1. package/dist/analyzer.js +43 -16
  2. package/dist/analyzer.js.map +1 -1
  3. package/dist/analyzer.mjs +104 -72
  4. package/dist/analyzer.mjs.map +1 -1
  5. package/dist/animate.js +33 -7
  6. package/dist/animate.js.map +1 -1
  7. package/dist/animate.mjs +55 -22
  8. package/dist/animate.mjs.map +1 -1
  9. package/dist/atomic.js +39 -10
  10. package/dist/atomic.js.map +1 -1
  11. package/dist/atomic.mjs +56 -23
  12. package/dist/atomic.mjs.map +1 -1
  13. package/dist/cli.js +222 -38
  14. package/dist/cli.js.map +1 -1
  15. package/dist/cli.mjs +321 -203
  16. package/dist/cli.mjs.map +1 -1
  17. package/dist/compiler.js +57 -14
  18. package/dist/compiler.js.map +1 -1
  19. package/dist/compiler.mjs +71 -28
  20. package/dist/compiler.mjs.map +1 -1
  21. package/dist/dashboard.js +0 -1
  22. package/dist/dashboard.js.map +1 -1
  23. package/dist/devtools.js +16 -2
  24. package/dist/devtools.js.map +1 -1
  25. package/dist/devtools.mjs +21 -2
  26. package/dist/devtools.mjs.map +1 -1
  27. package/dist/engine.js +141 -51
  28. package/dist/engine.js.map +1 -1
  29. package/dist/engine.mjs +238 -148
  30. package/dist/engine.mjs.map +1 -1
  31. package/dist/index.js +50 -8
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +74 -29
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/next.js +98 -37
  36. package/dist/next.js.map +1 -1
  37. package/dist/next.mjs +177 -115
  38. package/dist/next.mjs.map +1 -1
  39. package/dist/plugin-api.js +0 -1
  40. package/dist/plugin-api.js.map +1 -1
  41. package/dist/plugin-registry.js +6 -2
  42. package/dist/plugin-registry.js.map +1 -1
  43. package/dist/plugin-registry.mjs +9 -2
  44. package/dist/plugin-registry.mjs.map +1 -1
  45. package/dist/plugin.js +0 -1
  46. package/dist/plugin.js.map +1 -1
  47. package/dist/preset.js +0 -1
  48. package/dist/preset.js.map +1 -1
  49. package/dist/rspack.js +89 -6
  50. package/dist/rspack.js.map +1 -1
  51. package/dist/rspack.mjs +39 -18
  52. package/dist/rspack.mjs.map +1 -1
  53. package/dist/runtime-css.js +0 -1
  54. package/dist/runtime-css.js.map +1 -1
  55. package/dist/runtime.js +0 -1
  56. package/dist/runtime.js.map +1 -1
  57. package/dist/scanner.js +29 -11
  58. package/dist/scanner.js.map +1 -1
  59. package/dist/scanner.mjs +84 -61
  60. package/dist/scanner.mjs.map +1 -1
  61. package/dist/shared.js +91 -35
  62. package/dist/shared.js.map +1 -1
  63. package/dist/shared.mjs +122 -64
  64. package/dist/shared.mjs.map +1 -1
  65. package/dist/storybook-addon.js +0 -1
  66. package/dist/storybook-addon.js.map +1 -1
  67. package/dist/svelte.js +40 -8
  68. package/dist/svelte.js.map +1 -1
  69. package/dist/svelte.mjs +57 -28
  70. package/dist/svelte.mjs.map +1 -1
  71. package/dist/syntax.js +7 -3
  72. package/dist/syntax.js.map +1 -1
  73. package/dist/syntax.mjs +30 -23
  74. package/dist/syntax.mjs.map +1 -1
  75. package/dist/testing.js +0 -1
  76. package/dist/testing.js.map +1 -1
  77. package/dist/theme.js +23 -5
  78. package/dist/theme.js.map +1 -1
  79. package/dist/theme.mjs +41 -17
  80. package/dist/theme.mjs.map +1 -1
  81. package/dist/turbopackLoader.js +58 -14
  82. package/dist/turbopackLoader.js.map +1 -1
  83. package/dist/turbopackLoader.mjs +89 -45
  84. package/dist/turbopackLoader.mjs.map +1 -1
  85. package/dist/tw.js +224 -38
  86. package/dist/tw.js.map +1 -1
  87. package/dist/tw.mjs +321 -203
  88. package/dist/tw.mjs.map +1 -1
  89. package/dist/vite.js +132 -50
  90. package/dist/vite.js.map +1 -1
  91. package/dist/vite.mjs +226 -143
  92. package/dist/vite.mjs.map +1 -1
  93. package/dist/vue.js +40 -8
  94. package/dist/vue.js.map +1 -1
  95. package/dist/vue.mjs +57 -28
  96. package/dist/vue.mjs.map +1 -1
  97. package/dist/webpackLoader.js +40 -10
  98. package/dist/webpackLoader.js.map +1 -1
  99. package/dist/webpackLoader.mjs +59 -27
  100. package/dist/webpackLoader.mjs.map +1 -1
  101. package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  102. package/native/tailwind-styled-native.node +0 -0
  103. package/package.json +1 -1
@@ -1,4 +1,3 @@
1
- const __importMetaUrl = typeof __filename !== "undefined" ? require("node:url").pathToFileURL(__filename).href : "file://unknown";
2
1
  /* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
3
2
  "use strict";
4
3
  var __create = Object.create;
@@ -32,7 +31,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
31
  ));
33
32
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
33
 
34
+ // node_modules/tsup/assets/cjs_shims.js
35
+ var getImportMetaUrl, importMetaUrl;
36
+ var init_cjs_shims = __esm({
37
+ "node_modules/tsup/assets/cjs_shims.js"() {
38
+ "use strict";
39
+ getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
40
+ importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
41
+ }
42
+ });
43
+
35
44
  // packages/domain/shared/src/native-resolution.ts
45
+ function _safeCreateRequire() {
46
+ if (typeof import_meta !== "undefined" && importMetaUrl && !importMetaUrl.includes("unknown")) {
47
+ return (0, import_node_module.createRequire)(importMetaUrl);
48
+ }
49
+ if (typeof __filename !== "undefined") {
50
+ return (0, import_node_module.createRequire)(__filename);
51
+ }
52
+ return (0, import_node_module.createRequire)(new URL(`file://${process.cwd()}/`).href);
53
+ }
36
54
  function platformKey() {
37
55
  if (isBrowser) return "browser";
38
56
  return `${process.platform}-${process.arch}`;
@@ -114,17 +132,17 @@ function resolveNativeBinary(runtimeDir) {
114
132
  }
115
133
  return { path: null, source: "not-found", platform, tried };
116
134
  }
117
- var import_node_module, fs, path, isBrowser, _require, PLATFORM_MAP;
135
+ var import_node_module, fs, path, import_meta, isBrowser, _require, PLATFORM_MAP;
118
136
  var init_native_resolution = __esm({
119
137
  "packages/domain/shared/src/native-resolution.ts"() {
120
138
  "use strict";
139
+ init_cjs_shims();
121
140
  import_node_module = require("module");
122
141
  fs = __toESM(require("fs"));
123
142
  path = __toESM(require("path"));
143
+ import_meta = {};
124
144
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
125
- _require = (0, import_node_module.createRequire)(
126
- typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
127
- );
145
+ _require = _safeCreateRequire();
128
146
  PLATFORM_MAP = {
129
147
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
130
148
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -137,10 +155,10 @@ var init_native_resolution = __esm({
137
155
  });
138
156
 
139
157
  // packages/domain/shared/src/index.ts
140
- function resolveRuntimeDir(dir, importMetaUrl) {
158
+ function resolveRuntimeDir(dir, importMetaUrl2) {
141
159
  if (dir) return import_node_path.default.resolve(dir);
142
160
  try {
143
- return import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
161
+ return import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl2));
144
162
  } catch {
145
163
  return process.cwd();
146
164
  }
@@ -149,6 +167,7 @@ var import_node_crypto, import_node_fs, import_node_path, import_node_url, impor
149
167
  var init_src = __esm({
150
168
  "packages/domain/shared/src/index.ts"() {
151
169
  "use strict";
170
+ init_cjs_shims();
152
171
  import_node_crypto = require("crypto");
153
172
  import_node_fs = __toESM(require("fs"));
154
173
  import_node_path = __toESM(require("path"));
@@ -156,7 +175,7 @@ var init_src = __esm({
156
175
  import_node_module2 = require("module");
157
176
  init_native_resolution();
158
177
  _require2 = (0, import_node_module2.createRequire)(
159
- typeof __filename !== "undefined" ? `file://${__filename}` : __importMetaUrl ?? "file://unknown"
178
+ typeof __filename !== "undefined" ? `file://${__filename}` : importMetaUrl ?? "file://unknown"
160
179
  );
161
180
  }
162
181
  });
@@ -166,6 +185,7 @@ var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttemp
166
185
  var init_nativeBridge = __esm({
167
186
  "packages/domain/compiler/src/nativeBridge.ts"() {
168
187
  "use strict";
188
+ init_cjs_shims();
169
189
  init_src();
170
190
  _loadNative = (path5) => require(path5);
171
191
  log = (...args) => {
@@ -193,7 +213,7 @@ var init_nativeBridge = __esm({
193
213
  }
194
214
  bridgeLoadAttempted = true;
195
215
  try {
196
- const runtimeDir = resolveRuntimeDir(void 0, __importMetaUrl);
216
+ const runtimeDir = resolveRuntimeDir(void 0, importMetaUrl);
197
217
  const result = resolveNativeBinary(runtimeDir);
198
218
  if (result.path && result.path.endsWith(".node")) {
199
219
  try {
@@ -306,6 +326,7 @@ function resetCacheStats() {
306
326
  var init_cssGeneratorNative = __esm({
307
327
  "packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
308
328
  "use strict";
329
+ init_cjs_shims();
309
330
  init_nativeBridge();
310
331
  }
311
332
  });
@@ -379,6 +400,7 @@ function atomicRegistrySize() {
379
400
  var init_compilationNative = __esm({
380
401
  "packages/domain/compiler/src/compiler/compilationNative.ts"() {
381
402
  "use strict";
403
+ init_cjs_shims();
382
404
  init_nativeBridge();
383
405
  }
384
406
  });
@@ -523,6 +545,7 @@ function twMergeRaw(classLists) {
523
545
  var init_cssCompilationNative = __esm({
524
546
  "packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
525
547
  "use strict";
548
+ init_cjs_shims();
526
549
  init_nativeBridge();
527
550
  }
528
551
  });
@@ -623,6 +646,7 @@ function idRegistryImport(importedData) {
623
646
  var init_idRegistryNative = __esm({
624
647
  "packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
625
648
  "use strict";
649
+ init_cjs_shims();
626
650
  init_nativeBridge();
627
651
  }
628
652
  });
@@ -765,6 +789,7 @@ function scanFilesBatchNative(filesJson) {
765
789
  var init_streamingNative = __esm({
766
790
  "packages/domain/compiler/src/compiler/streamingNative.ts"() {
767
791
  "use strict";
792
+ init_cjs_shims();
768
793
  init_nativeBridge();
769
794
  }
770
795
  });
@@ -812,13 +837,15 @@ async function generateRawCss(classes, cssEntryContent, root) {
812
837
  const compiler = await Promise.resolve(tw.compile(input, { loadStylesheet }));
813
838
  return compiler.build(classes);
814
839
  }
815
- var import_node_module3, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
840
+ var import_node_module3, import_meta2, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
816
841
  var init_tailwindEngine = __esm({
817
842
  "packages/domain/compiler/src/tailwindEngine.ts"() {
818
843
  "use strict";
844
+ init_cjs_shims();
819
845
  import_node_module3 = require("module");
846
+ import_meta2 = {};
820
847
  require2 = (0, import_node_module3.createRequire)(
821
- typeof __filename !== "undefined" ? `file://${__filename}` : false ? __importMetaUrl : "file://unknown"
848
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta2 !== "undefined" && importMetaUrl ? importMetaUrl : "file://unknown"
822
849
  );
823
850
  MAX_CACHE_MEMORY = 256 * 1024;
824
851
  _twEngine = null;
@@ -1001,17 +1028,19 @@ function processTailwindCssWithTargets(css, targets) {
1001
1028
  }
1002
1029
  return result.css;
1003
1030
  }
1004
- var import_node_module4, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
1031
+ var import_node_module4, import_meta3, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
1005
1032
  var init_tailwindEngine2 = __esm({
1006
1033
  "packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
1007
1034
  "use strict";
1035
+ init_cjs_shims();
1008
1036
  import_node_module4 = require("module");
1009
1037
  init_nativeBridge();
1010
1038
  init_cssGeneratorNative();
1011
1039
  init_cssCompilationNative();
1012
1040
  init_tailwindEngine();
1041
+ import_meta3 = {};
1013
1042
  require3 = (0, import_node_module4.createRequire)(
1014
- typeof __filename !== "undefined" ? `file://${__filename}` : false ? __importMetaUrl : "file://unknown"
1043
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta3 !== "undefined" && importMetaUrl ? importMetaUrl : "file://unknown"
1015
1044
  );
1016
1045
  _cssCache = /* @__PURE__ */ new Map();
1017
1046
  _cacheHits = 0;
@@ -1025,6 +1054,7 @@ var init_tailwindEngine2 = __esm({
1025
1054
  var init_compiler = __esm({
1026
1055
  "packages/domain/compiler/src/compiler/index.ts"() {
1027
1056
  "use strict";
1057
+ init_cjs_shims();
1028
1058
  init_cssGeneratorNative();
1029
1059
  init_compilationNative();
1030
1060
  init_cssCompilationNative();
@@ -1038,6 +1068,7 @@ var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astEx
1038
1068
  var init_parser = __esm({
1039
1069
  "packages/domain/compiler/src/parser/index.ts"() {
1040
1070
  "use strict";
1071
+ init_cjs_shims();
1041
1072
  init_nativeBridge();
1042
1073
  parseClasses = (raw) => {
1043
1074
  const native = getNativeBridge();
@@ -1217,6 +1248,7 @@ function resetMemoryStats() {
1217
1248
  var init_analyzerNative = __esm({
1218
1249
  "packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
1219
1250
  "use strict";
1251
+ init_cjs_shims();
1220
1252
  init_nativeBridge();
1221
1253
  }
1222
1254
  });
@@ -1311,6 +1343,7 @@ function resolveSimpleVariants(configJson) {
1311
1343
  var init_themeResolutionNative = __esm({
1312
1344
  "packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
1313
1345
  "use strict";
1346
+ init_cjs_shims();
1314
1347
  init_nativeBridge();
1315
1348
  }
1316
1349
  });
@@ -1359,6 +1392,7 @@ function generateSubComponentTypes(root, outputPath) {
1359
1392
  var init_scannerNative = __esm({
1360
1393
  "packages/domain/compiler/src/analyzer/scannerNative.ts"() {
1361
1394
  "use strict";
1395
+ init_cjs_shims();
1362
1396
  init_nativeBridge();
1363
1397
  }
1364
1398
  });
@@ -1367,6 +1401,7 @@ var init_scannerNative = __esm({
1367
1401
  var init_analyzer = __esm({
1368
1402
  "packages/domain/compiler/src/analyzer/index.ts"() {
1369
1403
  "use strict";
1404
+ init_cjs_shims();
1370
1405
  init_analyzerNative();
1371
1406
  init_themeResolutionNative();
1372
1407
  init_scannerNative();
@@ -1556,6 +1591,7 @@ function resetResolverPoolStats() {
1556
1591
  var init_cacheNative = __esm({
1557
1592
  "packages/domain/compiler/src/cache/cacheNative.ts"() {
1558
1593
  "use strict";
1594
+ init_cjs_shims();
1559
1595
  init_nativeBridge();
1560
1596
  }
1561
1597
  });
@@ -1564,6 +1600,7 @@ var init_cacheNative = __esm({
1564
1600
  var init_cache = __esm({
1565
1601
  "packages/domain/compiler/src/cache/index.ts"() {
1566
1602
  "use strict";
1603
+ init_cjs_shims();
1567
1604
  init_cacheNative();
1568
1605
  }
1569
1606
  });
@@ -1813,6 +1850,7 @@ function redisDiagnose() {
1813
1850
  var init_redisNative = __esm({
1814
1851
  "packages/domain/compiler/src/redis/redisNative.ts"() {
1815
1852
  "use strict";
1853
+ init_cjs_shims();
1816
1854
  init_nativeBridge();
1817
1855
  }
1818
1856
  });
@@ -1821,6 +1859,7 @@ var init_redisNative = __esm({
1821
1859
  var init_redis = __esm({
1822
1860
  "packages/domain/compiler/src/redis/index.ts"() {
1823
1861
  "use strict";
1862
+ init_cjs_shims();
1824
1863
  init_redisNative();
1825
1864
  }
1826
1865
  });
@@ -1960,6 +1999,7 @@ function getCompilerDiagnostics() {
1960
1999
  var init_watchSystemNative = __esm({
1961
2000
  "packages/domain/compiler/src/watch/watchSystemNative.ts"() {
1962
2001
  "use strict";
2002
+ init_cjs_shims();
1963
2003
  init_nativeBridge();
1964
2004
  }
1965
2005
  });
@@ -1968,6 +2008,7 @@ var init_watchSystemNative = __esm({
1968
2008
  var init_watch = __esm({
1969
2009
  "packages/domain/compiler/src/watch/index.ts"() {
1970
2010
  "use strict";
2011
+ init_cjs_shims();
1971
2012
  init_watchSystemNative();
1972
2013
  }
1973
2014
  });
@@ -2011,6 +2052,7 @@ var import_node_fs2, import_node_path2, import_node_module5, _require3, transfor
2011
2052
  var init_src2 = __esm({
2012
2053
  "packages/domain/compiler/src/index.ts"() {
2013
2054
  "use strict";
2055
+ init_cjs_shims();
2014
2056
  import_node_fs2 = __toESM(require("fs"), 1);
2015
2057
  import_node_path2 = __toESM(require("path"), 1);
2016
2058
  import_node_module5 = require("module");
@@ -2022,7 +2064,7 @@ var init_src2 = __esm({
2022
2064
  init_redis();
2023
2065
  init_watch();
2024
2066
  _require3 = (0, import_node_module5.createRequire)(
2025
- typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
2067
+ typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : importMetaUrl
2026
2068
  );
2027
2069
  transformSource = (source, opts) => {
2028
2070
  const native = getNativeBridge();
@@ -2580,6 +2622,7 @@ __export(internal_exports, {
2580
2622
  var init_internal = __esm({
2581
2623
  "packages/domain/compiler/src/internal.ts"() {
2582
2624
  "use strict";
2625
+ init_cjs_shims();
2583
2626
  init_src2();
2584
2627
  init_tailwindEngine2();
2585
2628
  init_compiler();
@@ -2597,6 +2640,7 @@ __export(turbopackLoader_exports, {
2597
2640
  default: () => turbopackLoader
2598
2641
  });
2599
2642
  module.exports = __toCommonJS(turbopackLoader_exports);
2643
+ init_cjs_shims();
2600
2644
  init_internal();
2601
2645
  var import_node_fs3 = __toESM(require("fs"), 1);
2602
2646
  var import_node_path3 = __toESM(require("path"), 1);