tailwind-styled-v4 5.0.37 → 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 (123) hide show
  1. package/dist/analyzer.js +213 -161
  2. package/dist/analyzer.js.map +1 -1
  3. package/dist/analyzer.mjs +121 -83
  4. package/dist/analyzer.mjs.map +1 -1
  5. package/dist/animate.js +131 -87
  6. package/dist/animate.js.map +1 -1
  7. package/dist/animate.mjs +31 -15
  8. package/dist/animate.mjs.map +1 -1
  9. package/dist/atomic.js +107 -67
  10. package/dist/atomic.js.map +1 -1
  11. package/dist/atomic.mjs +47 -14
  12. package/dist/atomic.mjs.map +1 -1
  13. package/dist/cli.js +601 -428
  14. package/dist/cli.js.map +1 -1
  15. package/dist/cli.mjs +504 -313
  16. package/dist/cli.mjs.map +1 -1
  17. package/dist/compiler.js +833 -508
  18. package/dist/compiler.js.map +1 -1
  19. package/dist/compiler.mjs +298 -30
  20. package/dist/compiler.mjs.map +1 -1
  21. package/dist/dashboard.js +72 -41
  22. package/dist/dashboard.js.map +1 -1
  23. package/dist/dashboard.mjs +12 -6
  24. package/dist/dashboard.mjs.map +1 -1
  25. package/dist/devtools.js +335 -289
  26. package/dist/devtools.js.map +1 -1
  27. package/dist/devtools.mjs +28 -11
  28. package/dist/devtools.mjs.map +1 -1
  29. package/dist/engine.js +719 -506
  30. package/dist/engine.js.map +1 -1
  31. package/dist/engine.mjs +520 -318
  32. package/dist/engine.mjs.map +1 -1
  33. package/dist/index.d.mts +145 -319
  34. package/dist/index.d.ts +145 -319
  35. package/dist/index.js +1337 -7442
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +1275 -7386
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/next.js +327 -242
  40. package/dist/next.js.map +1 -1
  41. package/dist/next.mjs +272 -184
  42. package/dist/next.mjs.map +1 -1
  43. package/dist/plugin-api.js +94 -49
  44. package/dist/plugin-api.js.map +1 -1
  45. package/dist/plugin-api.mjs +26 -6
  46. package/dist/plugin-api.mjs.map +1 -1
  47. package/dist/plugin-registry.js +68 -40
  48. package/dist/plugin-registry.js.map +1 -1
  49. package/dist/plugin-registry.mjs +14 -10
  50. package/dist/plugin-registry.mjs.map +1 -1
  51. package/dist/plugin.js +102 -53
  52. package/dist/plugin.js.map +1 -1
  53. package/dist/plugin.mjs +30 -6
  54. package/dist/plugin.mjs.map +1 -1
  55. package/dist/preset.js +48 -15
  56. package/dist/preset.js.map +1 -1
  57. package/dist/preset.mjs +13 -5
  58. package/dist/preset.mjs.map +1 -1
  59. package/dist/rspack.js +108 -53
  60. package/dist/rspack.js.map +1 -1
  61. package/dist/rspack.mjs +50 -18
  62. package/dist/rspack.mjs.map +1 -1
  63. package/dist/runtime-css.js +63 -24
  64. package/dist/runtime-css.js.map +1 -1
  65. package/dist/runtime-css.mjs +15 -7
  66. package/dist/runtime-css.mjs.map +1 -1
  67. package/dist/runtime.js +98 -44
  68. package/dist/runtime.js.map +1 -1
  69. package/dist/runtime.mjs +31 -8
  70. package/dist/runtime.mjs.map +1 -1
  71. package/dist/scanner.js +164 -120
  72. package/dist/scanner.js.map +1 -1
  73. package/dist/scanner.mjs +70 -40
  74. package/dist/scanner.mjs.map +1 -1
  75. package/dist/shared.d.mts +0 -12
  76. package/dist/shared.d.ts +0 -12
  77. package/dist/shared.js +481 -299
  78. package/dist/shared.js.map +1 -1
  79. package/dist/shared.mjs +304 -133
  80. package/dist/shared.mjs.map +1 -1
  81. package/dist/storybook-addon.js +40 -10
  82. package/dist/storybook-addon.js.map +1 -1
  83. package/dist/storybook-addon.mjs +8 -3
  84. package/dist/storybook-addon.mjs.map +1 -1
  85. package/dist/svelte.js +95 -64
  86. package/dist/svelte.js.map +1 -1
  87. package/dist/svelte.mjs +37 -14
  88. package/dist/svelte.mjs.map +1 -1
  89. package/dist/syntax.js +69 -37
  90. package/dist/syntax.js.map +1 -1
  91. package/dist/syntax.mjs +8 -7
  92. package/dist/syntax.mjs.map +1 -1
  93. package/dist/testing.js +56 -18
  94. package/dist/testing.js.map +1 -1
  95. package/dist/testing.mjs +16 -3
  96. package/dist/testing.mjs.map +1 -1
  97. package/dist/theme.js +133 -74
  98. package/dist/theme.js.map +1 -1
  99. package/dist/theme.mjs +45 -14
  100. package/dist/theme.mjs.map +1 -1
  101. package/dist/turbopackLoader.js +156 -115
  102. package/dist/turbopackLoader.js.map +1 -1
  103. package/dist/turbopackLoader.mjs +135 -82
  104. package/dist/turbopackLoader.mjs.map +1 -1
  105. package/dist/tw.js +584 -423
  106. package/dist/tw.js.map +1 -1
  107. package/dist/tw.mjs +498 -311
  108. package/dist/tw.mjs.map +1 -1
  109. package/dist/vite.js +599 -450
  110. package/dist/vite.js.map +1 -1
  111. package/dist/vite.mjs +484 -332
  112. package/dist/vite.mjs.map +1 -1
  113. package/dist/vue.js +102 -70
  114. package/dist/vue.js.map +1 -1
  115. package/dist/vue.mjs +39 -15
  116. package/dist/vue.mjs.map +1 -1
  117. package/dist/webpackLoader.js +112 -77
  118. package/dist/webpackLoader.js.map +1 -1
  119. package/dist/webpackLoader.mjs +52 -18
  120. package/dist/webpackLoader.mjs.map +1 -1
  121. package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  122. package/native/tailwind-styled-native.node +0 -0
  123. package/package.json +3 -1
@@ -1,11 +1,3 @@
1
- import { createRequire } from 'module';
2
- import * as fs from 'fs';
3
- import * as path from 'path';
4
- import path__default from 'path';
5
- import 'crypto';
6
- import { fileURLToPath } from 'url';
7
- import { z } from 'zod';
8
-
9
1
  /* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
10
2
  var __getOwnPropNames = Object.getOwnPropertyNames;
11
3
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
@@ -17,6 +9,11 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
17
9
  var __esm = (fn, res) => function __init() {
18
10
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
19
11
  };
12
+
13
+ // packages/domain/shared/src/native-resolution.ts
14
+ import { createRequire } from "module";
15
+ import * as fs from "fs";
16
+ import * as path from "path";
20
17
  function platformKey() {
21
18
  if (isBrowser) return "browser";
22
19
  return `${process.platform}-${process.arch}`;
@@ -101,8 +98,11 @@ function resolveNativeBinary(runtimeDir) {
101
98
  var isBrowser, _require, PLATFORM_MAP;
102
99
  var init_native_resolution = __esm({
103
100
  "packages/domain/shared/src/native-resolution.ts"() {
101
+ "use strict";
104
102
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
105
- _require = typeof __require !== "undefined" ? __require : createRequire(import.meta.url);
103
+ _require = createRequire(
104
+ typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
105
+ );
106
106
  PLATFORM_MAP = {
107
107
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
108
108
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -113,17 +113,29 @@ var init_native_resolution = __esm({
113
113
  };
114
114
  }
115
115
  });
116
+
117
+ // packages/domain/shared/src/index.ts
118
+ import { createHash } from "crypto";
119
+ import fs2 from "fs";
120
+ import path2 from "path";
121
+ import { fileURLToPath } from "url";
122
+ import { createRequire as createRequire2 } from "module";
116
123
  function resolveRuntimeDir(dir, importMetaUrl) {
124
+ if (dir) return path2.resolve(dir);
117
125
  try {
118
- return path__default.dirname(fileURLToPath(importMetaUrl));
126
+ return path2.dirname(fileURLToPath(importMetaUrl));
119
127
  } catch {
120
128
  return process.cwd();
121
129
  }
122
130
  }
131
+ var _require2;
123
132
  var init_src = __esm({
124
133
  "packages/domain/shared/src/index.ts"() {
134
+ "use strict";
125
135
  init_native_resolution();
126
- createRequire(import.meta.url);
136
+ _require2 = createRequire2(
137
+ typeof __filename !== "undefined" ? `file://${__filename}` : import.meta.url ?? "file://unknown"
138
+ );
127
139
  }
128
140
  });
129
141
 
@@ -131,6 +143,7 @@ var init_src = __esm({
131
143
  var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge;
132
144
  var init_nativeBridge = __esm({
133
145
  "packages/domain/compiler/src/nativeBridge.ts"() {
146
+ "use strict";
134
147
  init_src();
135
148
  _loadNative = (path6) => __require(path6);
136
149
  log = (...args) => {
@@ -229,38 +242,49 @@ Tried paths: ${result.tried.join("\n")}`);
229
242
  // packages/domain/compiler/src/compiler/index.ts
230
243
  var init_compiler = __esm({
231
244
  "packages/domain/compiler/src/compiler/index.ts"() {
245
+ "use strict";
232
246
  }
233
247
  });
234
248
 
235
249
  // packages/domain/compiler/src/parser/index.ts
236
250
  var init_parser = __esm({
237
251
  "packages/domain/compiler/src/parser/index.ts"() {
252
+ "use strict";
238
253
  }
239
254
  });
240
255
 
241
256
  // packages/domain/compiler/src/analyzer/index.ts
242
257
  var init_analyzer = __esm({
243
258
  "packages/domain/compiler/src/analyzer/index.ts"() {
259
+ "use strict";
244
260
  }
245
261
  });
246
262
 
247
263
  // packages/domain/compiler/src/cache/index.ts
248
264
  var init_cache = __esm({
249
265
  "packages/domain/compiler/src/cache/index.ts"() {
266
+ "use strict";
250
267
  }
251
268
  });
252
269
 
253
270
  // packages/domain/compiler/src/redis/index.ts
254
271
  var init_redis = __esm({
255
272
  "packages/domain/compiler/src/redis/index.ts"() {
273
+ "use strict";
256
274
  }
257
275
  });
258
276
 
259
277
  // packages/domain/compiler/src/watch/index.ts
260
278
  var init_watch = __esm({
261
279
  "packages/domain/compiler/src/watch/index.ts"() {
280
+ "use strict";
262
281
  }
263
282
  });
283
+
284
+ // packages/domain/compiler/src/index.ts
285
+ import fs3 from "fs";
286
+ import path3 from "path";
287
+ import { createRequire as createRequire3 } from "module";
264
288
  function _layoutClassesToCss(classes) {
265
289
  const native = getNativeBridge();
266
290
  if (!native?.layoutClassesToCss) {
@@ -295,9 +319,10 @@ function extractContainerCssFromSource(source) {
295
319
  }
296
320
  return rules.join("\n");
297
321
  }
298
- var transformSource, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, registerFileClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
322
+ var _require3, transformSource, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, registerFileClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
299
323
  var init_src2 = __esm({
300
324
  "packages/domain/compiler/src/index.ts"() {
325
+ "use strict";
301
326
  init_nativeBridge();
302
327
  init_compiler();
303
328
  init_parser();
@@ -305,7 +330,9 @@ var init_src2 = __esm({
305
330
  init_cache();
306
331
  init_redis();
307
332
  init_watch();
308
- createRequire(import.meta.url);
333
+ _require3 = createRequire3(
334
+ typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
335
+ );
309
336
  transformSource = (source, opts) => {
310
337
  const native = getNativeBridge();
311
338
  if (!native?.transformSource) {
@@ -403,6 +430,7 @@ var init_src2 = __esm({
403
430
  // packages/domain/compiler/src/internal.ts
404
431
  var init_internal = __esm({
405
432
  "packages/domain/compiler/src/internal.ts"() {
433
+ "use strict";
406
434
  init_src2();
407
435
  init_compiler();
408
436
  init_parser();
@@ -415,6 +443,12 @@ var init_internal = __esm({
415
443
 
416
444
  // packages/presentation/next/src/webpackLoader.ts
417
445
  init_internal();
446
+ import path5 from "path";
447
+ import { z } from "zod";
448
+
449
+ // packages/presentation/next/src/staticCssWebpackPlugin.ts
450
+ import fs4 from "fs";
451
+ import path4 from "path";
418
452
  var _fileStaticCssMap = /* @__PURE__ */ new Map();
419
453
  function setFileStaticCss(filepath, css) {
420
454
  if (css && css.trim()) {
@@ -436,7 +470,7 @@ var WebpackLoaderOptionsSchema = z.object({
436
470
  preserveImports: z.boolean().optional(),
437
471
  safelistPath: z.string().optional()
438
472
  });
439
- var isNextBuildArtifact = (filepath) => filepath.includes(`${path__default.sep}.next${path__default.sep}`);
473
+ var isNextBuildArtifact = (filepath) => filepath.includes(`${path5.sep}.next${path5.sep}`);
440
474
  function webpackLoader(source) {
441
475
  const callback = this.async?.();
442
476
  if (!callback) {
@@ -477,7 +511,7 @@ function webpackLoader(source) {
477
511
  const rsc = output.rsc;
478
512
  const engine = output.engine ?? "js";
479
513
  const env = rsc?.isServer ? "server" : "client";
480
- const name = path__default.basename(filepath);
514
+ const name = path5.basename(filepath);
481
515
  process.stdout.write(
482
516
  `[tailwind-styled/webpack] ${name} -> ${output.classes.length} classes (${env}) [${engine}]
483
517
  `
@@ -496,7 +530,7 @@ function webpackLoader(source) {
496
530
  callback(null, source);
497
531
  }
498
532
  }
499
-
500
- export { webpackLoader as default };
501
- //# sourceMappingURL=webpackLoader.mjs.map
533
+ export {
534
+ webpackLoader as default
535
+ };
502
536
  //# sourceMappingURL=webpackLoader.mjs.map