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
package/dist/compiler.js CHANGED
@@ -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 = (path4) => require(path4);
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 {
@@ -324,6 +344,7 @@ function resetCacheStats() {
324
344
  var init_cssGeneratorNative = __esm({
325
345
  "packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
326
346
  "use strict";
347
+ init_cjs_shims();
327
348
  init_nativeBridge();
328
349
  }
329
350
  });
@@ -397,6 +418,7 @@ function atomicRegistrySize() {
397
418
  var init_compilationNative = __esm({
398
419
  "packages/domain/compiler/src/compiler/compilationNative.ts"() {
399
420
  "use strict";
421
+ init_cjs_shims();
400
422
  init_nativeBridge();
401
423
  }
402
424
  });
@@ -541,6 +563,7 @@ function twMergeRaw(classLists) {
541
563
  var init_cssCompilationNative = __esm({
542
564
  "packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
543
565
  "use strict";
566
+ init_cjs_shims();
544
567
  init_nativeBridge();
545
568
  }
546
569
  });
@@ -641,6 +664,7 @@ function idRegistryImport(importedData) {
641
664
  var init_idRegistryNative = __esm({
642
665
  "packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
643
666
  "use strict";
667
+ init_cjs_shims();
644
668
  init_nativeBridge();
645
669
  }
646
670
  });
@@ -783,6 +807,7 @@ function scanFilesBatchNative(filesJson) {
783
807
  var init_streamingNative = __esm({
784
808
  "packages/domain/compiler/src/compiler/streamingNative.ts"() {
785
809
  "use strict";
810
+ init_cjs_shims();
786
811
  init_nativeBridge();
787
812
  }
788
813
  });
@@ -830,13 +855,15 @@ async function generateRawCss(classes, cssEntryContent, root) {
830
855
  const compiler = await Promise.resolve(tw.compile(input, { loadStylesheet }));
831
856
  return compiler.build(classes);
832
857
  }
833
- var import_node_module3, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
858
+ var import_node_module3, import_meta2, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
834
859
  var init_tailwindEngine = __esm({
835
860
  "packages/domain/compiler/src/tailwindEngine.ts"() {
836
861
  "use strict";
862
+ init_cjs_shims();
837
863
  import_node_module3 = require("module");
864
+ import_meta2 = {};
838
865
  require2 = (0, import_node_module3.createRequire)(
839
- typeof __filename !== "undefined" ? `file://${__filename}` : false ? __importMetaUrl : "file://unknown"
866
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta2 !== "undefined" && importMetaUrl ? importMetaUrl : "file://unknown"
840
867
  );
841
868
  MAX_CACHE_MEMORY = 256 * 1024;
842
869
  _twEngine = null;
@@ -1019,17 +1046,19 @@ function processTailwindCssWithTargets(css, targets) {
1019
1046
  }
1020
1047
  return result.css;
1021
1048
  }
1022
- var import_node_module4, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
1049
+ var import_node_module4, import_meta3, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
1023
1050
  var init_tailwindEngine2 = __esm({
1024
1051
  "packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
1025
1052
  "use strict";
1053
+ init_cjs_shims();
1026
1054
  import_node_module4 = require("module");
1027
1055
  init_nativeBridge();
1028
1056
  init_cssGeneratorNative();
1029
1057
  init_cssCompilationNative();
1030
1058
  init_tailwindEngine();
1059
+ import_meta3 = {};
1031
1060
  require3 = (0, import_node_module4.createRequire)(
1032
- typeof __filename !== "undefined" ? `file://${__filename}` : false ? __importMetaUrl : "file://unknown"
1061
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta3 !== "undefined" && importMetaUrl ? importMetaUrl : "file://unknown"
1033
1062
  );
1034
1063
  _cssCache = /* @__PURE__ */ new Map();
1035
1064
  _cacheHits = 0;
@@ -1043,6 +1072,7 @@ var init_tailwindEngine2 = __esm({
1043
1072
  var init_compiler = __esm({
1044
1073
  "packages/domain/compiler/src/compiler/index.ts"() {
1045
1074
  "use strict";
1075
+ init_cjs_shims();
1046
1076
  init_cssGeneratorNative();
1047
1077
  init_compilationNative();
1048
1078
  init_cssCompilationNative();
@@ -1057,6 +1087,7 @@ var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astEx
1057
1087
  var init_parser = __esm({
1058
1088
  "packages/domain/compiler/src/parser/index.ts"() {
1059
1089
  "use strict";
1090
+ init_cjs_shims();
1060
1091
  init_nativeBridge();
1061
1092
  parseClasses = (raw) => {
1062
1093
  const native = getNativeBridge();
@@ -1236,6 +1267,7 @@ function resetMemoryStats() {
1236
1267
  var init_analyzerNative = __esm({
1237
1268
  "packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
1238
1269
  "use strict";
1270
+ init_cjs_shims();
1239
1271
  init_nativeBridge();
1240
1272
  }
1241
1273
  });
@@ -1330,6 +1362,7 @@ function resolveSimpleVariants(configJson) {
1330
1362
  var init_themeResolutionNative = __esm({
1331
1363
  "packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
1332
1364
  "use strict";
1365
+ init_cjs_shims();
1333
1366
  init_nativeBridge();
1334
1367
  }
1335
1368
  });
@@ -1378,6 +1411,7 @@ function generateSubComponentTypes(root, outputPath) {
1378
1411
  var init_scannerNative = __esm({
1379
1412
  "packages/domain/compiler/src/analyzer/scannerNative.ts"() {
1380
1413
  "use strict";
1414
+ init_cjs_shims();
1381
1415
  init_nativeBridge();
1382
1416
  }
1383
1417
  });
@@ -1386,6 +1420,7 @@ var init_scannerNative = __esm({
1386
1420
  var init_analyzer = __esm({
1387
1421
  "packages/domain/compiler/src/analyzer/index.ts"() {
1388
1422
  "use strict";
1423
+ init_cjs_shims();
1389
1424
  init_analyzerNative();
1390
1425
  init_themeResolutionNative();
1391
1426
  init_scannerNative();
@@ -1575,6 +1610,7 @@ function resetResolverPoolStats() {
1575
1610
  var init_cacheNative = __esm({
1576
1611
  "packages/domain/compiler/src/cache/cacheNative.ts"() {
1577
1612
  "use strict";
1613
+ init_cjs_shims();
1578
1614
  init_nativeBridge();
1579
1615
  }
1580
1616
  });
@@ -1583,6 +1619,7 @@ var init_cacheNative = __esm({
1583
1619
  var init_cache = __esm({
1584
1620
  "packages/domain/compiler/src/cache/index.ts"() {
1585
1621
  "use strict";
1622
+ init_cjs_shims();
1586
1623
  init_cacheNative();
1587
1624
  }
1588
1625
  });
@@ -1832,6 +1869,7 @@ function redisDiagnose() {
1832
1869
  var init_redisNative = __esm({
1833
1870
  "packages/domain/compiler/src/redis/redisNative.ts"() {
1834
1871
  "use strict";
1872
+ init_cjs_shims();
1835
1873
  init_nativeBridge();
1836
1874
  }
1837
1875
  });
@@ -1840,6 +1878,7 @@ var init_redisNative = __esm({
1840
1878
  var init_redis = __esm({
1841
1879
  "packages/domain/compiler/src/redis/index.ts"() {
1842
1880
  "use strict";
1881
+ init_cjs_shims();
1843
1882
  init_redisNative();
1844
1883
  }
1845
1884
  });
@@ -1979,6 +2018,7 @@ function getCompilerDiagnostics() {
1979
2018
  var init_watchSystemNative = __esm({
1980
2019
  "packages/domain/compiler/src/watch/watchSystemNative.ts"() {
1981
2020
  "use strict";
2021
+ init_cjs_shims();
1982
2022
  init_nativeBridge();
1983
2023
  }
1984
2024
  });
@@ -1987,6 +2027,7 @@ var init_watchSystemNative = __esm({
1987
2027
  var init_watch = __esm({
1988
2028
  "packages/domain/compiler/src/watch/index.ts"() {
1989
2029
  "use strict";
2030
+ init_cjs_shims();
1990
2031
  init_watchSystemNative();
1991
2032
  }
1992
2033
  });
@@ -2030,6 +2071,7 @@ var import_node_fs2, import_node_path2, import_node_module5, _require3, transfor
2030
2071
  var init_src2 = __esm({
2031
2072
  "packages/domain/compiler/src/index.ts"() {
2032
2073
  "use strict";
2074
+ init_cjs_shims();
2033
2075
  import_node_fs2 = __toESM(require("fs"), 1);
2034
2076
  import_node_path2 = __toESM(require("path"), 1);
2035
2077
  import_node_module5 = require("module");
@@ -2041,7 +2083,7 @@ var init_src2 = __esm({
2041
2083
  init_redis();
2042
2084
  init_watch();
2043
2085
  _require3 = (0, import_node_module5.createRequire)(
2044
- typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
2086
+ typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : importMetaUrl
2045
2087
  );
2046
2088
  transformSource = (source, opts) => {
2047
2089
  const native = getNativeBridge();
@@ -2603,6 +2645,7 @@ __export(compiler_exports, {
2603
2645
  watchResume: () => watchResume
2604
2646
  });
2605
2647
  module.exports = __toCommonJS(compiler_exports);
2648
+ init_cjs_shims();
2606
2649
  init_src2();
2607
2650
  // Annotate the CommonJS export names for ESM import in node:
2608
2651
  0 && (module.exports = {