tailwind-styled-v4 5.0.38 → 5.0.39

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 (101) hide show
  1. package/dist/analyzer.js +19 -19
  2. package/dist/analyzer.js.map +1 -1
  3. package/dist/analyzer.mjs +3 -1
  4. package/dist/analyzer.mjs.map +1 -1
  5. package/dist/animate.js +8 -8
  6. package/dist/animate.js.map +1 -1
  7. package/dist/animate.mjs +3 -1
  8. package/dist/animate.mjs.map +1 -1
  9. package/dist/atomic.js +15 -12
  10. package/dist/atomic.js.map +1 -1
  11. package/dist/atomic.mjs +9 -3
  12. package/dist/atomic.mjs.map +1 -1
  13. package/dist/cli.js +71 -49
  14. package/dist/cli.js.map +1 -1
  15. package/dist/cli.mjs +42 -13
  16. package/dist/cli.mjs.map +1 -1
  17. package/dist/compiler.js +25 -18
  18. package/dist/compiler.js.map +1 -1
  19. package/dist/compiler.mjs +15 -5
  20. package/dist/compiler.mjs.map +1 -1
  21. package/dist/dashboard.js +1 -0
  22. package/dist/dashboard.js.map +1 -1
  23. package/dist/devtools.js +5 -3
  24. package/dist/devtools.js.map +1 -1
  25. package/dist/devtools.mjs +3 -1
  26. package/dist/devtools.mjs.map +1 -1
  27. package/dist/engine.js +88 -52
  28. package/dist/engine.js.map +1 -1
  29. package/dist/engine.mjs +58 -16
  30. package/dist/engine.mjs.map +1 -1
  31. package/dist/index.js +16 -9
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +12 -4
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/next.js +39 -29
  36. package/dist/next.js.map +1 -1
  37. package/dist/next.mjs +21 -8
  38. package/dist/next.mjs.map +1 -1
  39. package/dist/plugin-api.js +1 -0
  40. package/dist/plugin-api.js.map +1 -1
  41. package/dist/plugin-registry.js +2 -1
  42. package/dist/plugin-registry.js.map +1 -1
  43. package/dist/plugin.js +1 -0
  44. package/dist/plugin.js.map +1 -1
  45. package/dist/preset.js +1 -0
  46. package/dist/preset.js.map +1 -1
  47. package/dist/rspack.js +37 -14
  48. package/dist/rspack.js.map +1 -1
  49. package/dist/rspack.mjs +31 -7
  50. package/dist/rspack.mjs.map +1 -1
  51. package/dist/runtime-css.js +1 -0
  52. package/dist/runtime-css.js.map +1 -1
  53. package/dist/runtime.js +1 -0
  54. package/dist/runtime.js.map +1 -1
  55. package/dist/scanner.js +15 -14
  56. package/dist/scanner.js.map +1 -1
  57. package/dist/scanner.mjs +3 -1
  58. package/dist/scanner.mjs.map +1 -1
  59. package/dist/shared.d.mts +0 -12
  60. package/dist/shared.d.ts +0 -12
  61. package/dist/shared.js +66 -30
  62. package/dist/shared.js.map +1 -1
  63. package/dist/shared.mjs +55 -15
  64. package/dist/shared.mjs.map +1 -1
  65. package/dist/storybook-addon.js +1 -0
  66. package/dist/storybook-addon.js.map +1 -1
  67. package/dist/svelte.js +16 -9
  68. package/dist/svelte.js.map +1 -1
  69. package/dist/svelte.mjs +12 -4
  70. package/dist/svelte.mjs.map +1 -1
  71. package/dist/syntax.js +3 -2
  72. package/dist/syntax.js.map +1 -1
  73. package/dist/testing.js +1 -0
  74. package/dist/testing.js.map +1 -1
  75. package/dist/theme.js +8 -6
  76. package/dist/theme.js.map +1 -1
  77. package/dist/theme.mjs +3 -1
  78. package/dist/theme.mjs.map +1 -1
  79. package/dist/turbopackLoader.js +25 -18
  80. package/dist/turbopackLoader.js.map +1 -1
  81. package/dist/turbopackLoader.mjs +15 -5
  82. package/dist/turbopackLoader.mjs.map +1 -1
  83. package/dist/tw.js +71 -49
  84. package/dist/tw.js.map +1 -1
  85. package/dist/tw.mjs +42 -13
  86. package/dist/tw.mjs.map +1 -1
  87. package/dist/vite.js +84 -50
  88. package/dist/vite.js.map +1 -1
  89. package/dist/vite.mjs +55 -15
  90. package/dist/vite.mjs.map +1 -1
  91. package/dist/vue.js +16 -9
  92. package/dist/vue.js.map +1 -1
  93. package/dist/vue.mjs +12 -4
  94. package/dist/vue.mjs.map +1 -1
  95. package/dist/webpackLoader.js +15 -12
  96. package/dist/webpackLoader.js.map +1 -1
  97. package/dist/webpackLoader.mjs +9 -3
  98. package/dist/webpackLoader.mjs.map +1 -1
  99. package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  100. package/native/tailwind-styled-native.node +0 -0
  101. package/package.json +1 -1
package/dist/engine.mjs CHANGED
@@ -300,48 +300,78 @@ function getNodeModuleRef() {
300
300
  return null;
301
301
  }
302
302
  }
303
+ function getCurrentFileUrl() {
304
+ if (import.meta.url) {
305
+ return import.meta.url;
306
+ }
307
+ if (typeof __filename !== "undefined") {
308
+ return `file://${__filename.replace(/\\/g, "/")}`;
309
+ }
310
+ return "file://unknown";
311
+ }
303
312
  function getNodePath() {
304
313
  if (isBrowser) throw new Error("node:path not available in browser");
305
- const nodeRequire = getNodeModuleRef();
306
- if (!nodeRequire) throw new Error("require not available");
307
- if (!_nodePath) _nodePath = nodeRequire.createRequire(import.meta.url)("node:path");
314
+ if (!_nodePath) {
315
+ if (typeof __require === "function") {
316
+ _nodePath = __require("path");
317
+ } else {
318
+ const nodeRequire = getNodeModuleRef();
319
+ if (!nodeRequire) throw new Error("require not available");
320
+ _nodePath = nodeRequire.createRequire(getCurrentFileUrl())("node:path");
321
+ }
322
+ }
308
323
  return _nodePath;
309
324
  }
310
325
  function getNodeUrl() {
311
326
  if (isBrowser) throw new Error("node:url not available in browser");
312
- const nodeRequire = getNodeModuleRef();
313
- if (!nodeRequire) throw new Error("require not available");
314
- if (!_nodeUrl) _nodeUrl = nodeRequire.createRequire(import.meta.url)("node:url");
327
+ if (!_nodeUrl) {
328
+ if (typeof __require === "function") {
329
+ _nodeUrl = __require("url");
330
+ } else {
331
+ const nodeRequire = getNodeModuleRef();
332
+ if (!nodeRequire) throw new Error("require not available");
333
+ _nodeUrl = nodeRequire.createRequire(getCurrentFileUrl())("node:url");
334
+ }
335
+ }
315
336
  return _nodeUrl;
316
337
  }
317
338
  function getNodeFs() {
318
339
  if (isBrowser) throw new Error("node:fs not available in browser");
319
- const nodeRequire = getNodeModuleRef();
320
- if (!nodeRequire) throw new Error("require not available");
321
- if (!_nodeFs) _nodeFs = nodeRequire.createRequire(import.meta.url)("node:fs");
340
+ if (!_nodeFs) {
341
+ if (typeof __require === "function") {
342
+ _nodeFs = __require("fs");
343
+ } else {
344
+ const nodeRequire = getNodeModuleRef();
345
+ if (!nodeRequire) throw new Error("require not available");
346
+ _nodeFs = nodeRequire.createRequire(getCurrentFileUrl())("node:fs");
347
+ }
348
+ }
322
349
  return _nodeFs;
323
350
  }
324
351
  function createEsmRequire(importMetaUrl) {
325
352
  if (isBrowser) throw new Error("require not available in browser");
353
+ if (typeof __require === "function") return __require;
326
354
  const nodeRequire = getNodeModuleRef();
327
355
  if (!nodeRequire) throw new Error("require not available");
328
356
  return nodeRequire.createRequire(importMetaUrl);
329
357
  }
330
358
  function getDirname(importMetaUrl) {
331
359
  if (isBrowser) return "";
360
+ if (typeof __dirname !== "undefined") return __dirname;
332
361
  const nodePath = getNodePath();
333
362
  const nodeUrl = getNodeUrl();
334
363
  return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
335
364
  }
336
365
  function getFilename(importMetaUrl) {
337
366
  if (isBrowser) return "";
367
+ if (typeof __filename !== "undefined") return __filename;
338
368
  return getNodeUrl().fileURLToPath(importMetaUrl);
339
369
  }
340
370
  function resolveFromRoot(...segments) {
341
371
  if (isBrowser) return segments.join("/");
342
372
  const nodePath = getNodePath();
343
373
  const nodeFs = getNodeFs();
344
- let dir = getDirname(import.meta.url);
374
+ let dir = typeof __dirname !== "undefined" ? __dirname : getDirname(getCurrentFileUrl());
345
375
  for (let i = 0; i < 10; i++) {
346
376
  const pkgPath = nodePath.join(dir, "package.json");
347
377
  try {
@@ -947,7 +977,9 @@ var init_native_resolution = __esm({
947
977
  "packages/domain/shared/src/native-resolution.ts"() {
948
978
  "use strict";
949
979
  isBrowser3 = typeof window !== "undefined" || typeof document !== "undefined";
950
- _require = typeof __require !== "undefined" ? __require : createRequire(import.meta.url);
980
+ _require = createRequire(
981
+ typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
982
+ );
951
983
  PLATFORM_MAP = {
952
984
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
953
985
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -1653,7 +1685,9 @@ var require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
1653
1685
  var init_tailwindEngine = __esm({
1654
1686
  "packages/domain/compiler/src/tailwindEngine.ts"() {
1655
1687
  "use strict";
1656
- require2 = createRequire2(import.meta.url);
1688
+ require2 = createRequire2(
1689
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : "file://unknown"
1690
+ );
1657
1691
  MAX_CACHE_MEMORY = 256 * 1024;
1658
1692
  _twEngine = null;
1659
1693
  _twEngineError = null;
@@ -1844,7 +1878,9 @@ var init_tailwindEngine2 = __esm({
1844
1878
  init_cssGeneratorNative();
1845
1879
  init_cssCompilationNative();
1846
1880
  init_tailwindEngine();
1847
- require3 = createRequire3(import.meta.url);
1881
+ require3 = createRequire3(
1882
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : "file://unknown"
1883
+ );
1848
1884
  _cssCache = /* @__PURE__ */ new Map();
1849
1885
  _cacheHits = 0;
1850
1886
  _cacheMisses = 0;
@@ -2853,7 +2889,9 @@ var init_src = __esm({
2853
2889
  init_cache();
2854
2890
  init_redis();
2855
2891
  init_watch();
2856
- _require2 = createRequire4(import.meta.url);
2892
+ _require2 = createRequire4(
2893
+ typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
2894
+ );
2857
2895
  transformSource = (source, opts) => {
2858
2896
  const native = getNativeBridge();
2859
2897
  if (!native?.transformSource) {
@@ -4012,7 +4050,9 @@ var init_src2 = __esm({
4012
4050
  return `[${this.source.toUpperCase()}:${this.code}] ${this.message}`;
4013
4051
  }
4014
4052
  };
4015
- _require3 = createRequire5(import.meta.url);
4053
+ _require3 = createRequire5(
4054
+ typeof __filename !== "undefined" ? `file://${__filename}` : import.meta.url ?? "file://unknown"
4055
+ );
4016
4056
  LRUCache = class {
4017
4057
  capacity;
4018
4058
  cache;
@@ -6992,7 +7032,9 @@ var getBinding = () => {
6992
7032
  return watchBindingState.binding;
6993
7033
  }
6994
7034
  const runtimeDir = typeof __dirname === "string" ? __dirname : process.cwd();
6995
- const req = createRequire7(import.meta.url);
7035
+ const req = createRequire7(
7036
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : "file://unknown"
7037
+ );
6996
7038
  const _pa = `${process.platform}-${process.arch}`;
6997
7039
  const _paGnu = _pa === "linux-x64" ? "linux-x64-gnu" : _pa === "linux-arm64" ? "linux-arm64-gnu" : _pa;
6998
7040
  const candidates = [