tailwind-styled-v4 5.0.38 → 5.0.40

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 +18 -20
  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 +45 -95
  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 +23 -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 +83 -53
  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 +15 -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 +35 -30
  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 -2
  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 +9 -55
  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 +14 -15
  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 +64 -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 +15 -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 -3
  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 -7
  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 +23 -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 +45 -95
  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 +80 -51
  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 +15 -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/tw.mjs CHANGED
@@ -3123,22 +3123,44 @@ function getNodeModuleRef() {
3123
3123
  return null;
3124
3124
  }
3125
3125
  }
3126
+ function getCurrentFileUrl() {
3127
+ if (import.meta.url) {
3128
+ return import.meta.url;
3129
+ }
3130
+ if (typeof __filename !== "undefined") {
3131
+ return `file://${__filename.replace(/\\/g, "/")}`;
3132
+ }
3133
+ return "file://unknown";
3134
+ }
3126
3135
  function getNodePath() {
3127
3136
  if (isBrowser) throw new Error("node:path not available in browser");
3128
- const nodeRequire = getNodeModuleRef();
3129
- if (!nodeRequire) throw new Error("require not available");
3130
- if (!_nodePath) _nodePath = nodeRequire.createRequire(import.meta.url)("node:path");
3137
+ if (!_nodePath) {
3138
+ if (typeof __require === "function") {
3139
+ _nodePath = __require("path");
3140
+ } else {
3141
+ const nodeRequire = getNodeModuleRef();
3142
+ if (!nodeRequire) throw new Error("require not available");
3143
+ _nodePath = nodeRequire.createRequire(getCurrentFileUrl())("node:path");
3144
+ }
3145
+ }
3131
3146
  return _nodePath;
3132
3147
  }
3133
3148
  function getNodeUrl() {
3134
3149
  if (isBrowser) throw new Error("node:url not available in browser");
3135
- const nodeRequire = getNodeModuleRef();
3136
- if (!nodeRequire) throw new Error("require not available");
3137
- if (!_nodeUrl) _nodeUrl = nodeRequire.createRequire(import.meta.url)("node:url");
3150
+ if (!_nodeUrl) {
3151
+ if (typeof __require === "function") {
3152
+ _nodeUrl = __require("url");
3153
+ } else {
3154
+ const nodeRequire = getNodeModuleRef();
3155
+ if (!nodeRequire) throw new Error("require not available");
3156
+ _nodeUrl = nodeRequire.createRequire(getCurrentFileUrl())("node:url");
3157
+ }
3158
+ }
3138
3159
  return _nodeUrl;
3139
3160
  }
3140
3161
  function getDirname(importMetaUrl) {
3141
3162
  if (isBrowser) return "";
3163
+ if (typeof __dirname !== "undefined") return __dirname;
3142
3164
  const nodePath = getNodePath();
3143
3165
  const nodeUrl = getNodeUrl();
3144
3166
  return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
@@ -3244,7 +3266,9 @@ var init_native_resolution = __esm({
3244
3266
  "packages/domain/shared/src/native-resolution.ts"() {
3245
3267
  "use strict";
3246
3268
  isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
3247
- _require = typeof __require !== "undefined" ? __require : createRequire(import.meta.url);
3269
+ _require = createRequire(
3270
+ typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
3271
+ );
3248
3272
  PLATFORM_MAP = {
3249
3273
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
3250
3274
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -3427,7 +3451,9 @@ var init_src = __esm({
3427
3451
  return `[${this.source.toUpperCase()}:${this.code}] ${this.message}`;
3428
3452
  }
3429
3453
  };
3430
- _require2 = createRequire2(import.meta.url);
3454
+ _require2 = createRequire2(
3455
+ typeof __filename !== "undefined" ? `file://${__filename}` : import.meta.url ?? "file://unknown"
3456
+ );
3431
3457
  }
3432
3458
  });
3433
3459
 
@@ -6097,7 +6123,7 @@ function buildCreateProgram(context) {
6097
6123
  async function main(rawArgs = process.argv.slice(2)) {
6098
6124
  await runCliMain({
6099
6125
  argv: [process.execPath, "create-tailwind-styled", ...rawArgs],
6100
- importMetaUrl: import.meta.url,
6126
+ importMetaUrl: typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : `file://${process.argv[1] ?? "unknown"}`,
6101
6127
  commandHint: "create",
6102
6128
  buildProgram: buildCreateProgram
6103
6129
  });
@@ -6278,7 +6304,9 @@ var init_src4 = __esm({
6278
6304
  init_cache();
6279
6305
  init_redis();
6280
6306
  init_watch();
6281
- _require3 = createRequire4(import.meta.url);
6307
+ _require3 = createRequire4(
6308
+ typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
6309
+ );
6282
6310
  compileCssFromClasses = (classes, prefix) => {
6283
6311
  const native = getNativeBridge();
6284
6312
  if (!native?.transformSource) {
@@ -9237,7 +9265,8 @@ async function runPreflightCli(rawArgs) {
9237
9265
  function isDirectExecution() {
9238
9266
  const scriptPath = process.argv[1];
9239
9267
  if (!scriptPath) return false;
9240
- return import.meta.url === pathToFileURL2(scriptPath).href;
9268
+ const currentUrl = typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : `file://${scriptPath}`;
9269
+ return currentUrl === pathToFileURL2(scriptPath).href;
9241
9270
  }
9242
9271
  if (isDirectExecution()) {
9243
9272
  runPreflightCli(process.argv.slice(2)).catch((error) => {
@@ -11636,8 +11665,8 @@ async function main2() {
11636
11665
  buildProgram: buildMainProgram
11637
11666
  });
11638
11667
  }
11639
- var __filename2 = fileURLToPath6(import.meta.url);
11640
- if (process.argv[1] === __filename2) {
11668
+ var __currentFile = fileURLToPath6(import.meta.url);
11669
+ if (process.argv[1] === __currentFile) {
11641
11670
  main2();
11642
11671
  }
11643
11672
  //# sourceMappingURL=tw.mjs.map