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/vite.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"],
@@ -1229,7 +1261,9 @@ var require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
1229
1261
  var init_tailwindEngine = __esm({
1230
1262
  "packages/domain/compiler/src/tailwindEngine.ts"() {
1231
1263
  "use strict";
1232
- require2 = createRequire2(import.meta.url);
1264
+ require2 = createRequire2(
1265
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : "file://unknown"
1266
+ );
1233
1267
  MAX_CACHE_MEMORY = 256 * 1024;
1234
1268
  _twEngine = null;
1235
1269
  _twEngineError = null;
@@ -1420,7 +1454,9 @@ var init_tailwindEngine2 = __esm({
1420
1454
  init_cssGeneratorNative();
1421
1455
  init_cssCompilationNative();
1422
1456
  init_tailwindEngine();
1423
- require3 = createRequire3(import.meta.url);
1457
+ require3 = createRequire3(
1458
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : "file://unknown"
1459
+ );
1424
1460
  _cssCache = /* @__PURE__ */ new Map();
1425
1461
  _cacheHits = 0;
1426
1462
  _cacheMisses = 0;
@@ -3522,7 +3558,9 @@ var init_src = __esm({
3522
3558
  return `[${this.source.toUpperCase()}:${this.code}] ${this.message}`;
3523
3559
  }
3524
3560
  };
3525
- _require2 = createRequire4(import.meta.url);
3561
+ _require2 = createRequire4(
3562
+ typeof __filename !== "undefined" ? `file://${__filename}` : import.meta.url ?? "file://unknown"
3563
+ );
3526
3564
  LRUCache = class {
3527
3565
  capacity;
3528
3566
  cache;
@@ -3725,7 +3763,9 @@ var init_src2 = __esm({
3725
3763
  init_cache();
3726
3764
  init_redis();
3727
3765
  init_watch();
3728
- _require3 = createRequire5(import.meta.url);
3766
+ _require3 = createRequire5(
3767
+ typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
3768
+ );
3729
3769
  transformSource = (source, opts) => {
3730
3770
  const native = getNativeBridge();
3731
3771
  if (!native?.transformSource) {