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