tailwind-styled-v4 5.0.39 → 5.0.411

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 +38 -13
  2. package/dist/analyzer.js.map +1 -1
  3. package/dist/analyzer.mjs +104 -72
  4. package/dist/analyzer.mjs.map +1 -1
  5. package/dist/animate.js +33 -7
  6. package/dist/animate.js.map +1 -1
  7. package/dist/animate.mjs +55 -22
  8. package/dist/animate.mjs.map +1 -1
  9. package/dist/atomic.js +39 -10
  10. package/dist/atomic.js.map +1 -1
  11. package/dist/atomic.mjs +56 -23
  12. package/dist/atomic.mjs.map +1 -1
  13. package/dist/cli.js +151 -39
  14. package/dist/cli.js.map +1 -1
  15. package/dist/cli.mjs +321 -203
  16. package/dist/cli.mjs.map +1 -1
  17. package/dist/compiler.js +57 -16
  18. package/dist/compiler.js.map +1 -1
  19. package/dist/compiler.mjs +71 -28
  20. package/dist/compiler.mjs.map +1 -1
  21. package/dist/dashboard.js +0 -1
  22. package/dist/dashboard.js.map +1 -1
  23. package/dist/devtools.js +16 -2
  24. package/dist/devtools.js.map +1 -1
  25. package/dist/devtools.mjs +21 -2
  26. package/dist/devtools.mjs.map +1 -1
  27. package/dist/engine.js +140 -56
  28. package/dist/engine.js.map +1 -1
  29. package/dist/engine.mjs +238 -148
  30. package/dist/engine.mjs.map +1 -1
  31. package/dist/index.js +50 -9
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +74 -29
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/next.js +97 -41
  36. package/dist/next.js.map +1 -1
  37. package/dist/next.mjs +177 -115
  38. package/dist/next.mjs.map +1 -1
  39. package/dist/plugin-api.js +0 -1
  40. package/dist/plugin-api.js.map +1 -1
  41. package/dist/plugin-registry.js +5 -2
  42. package/dist/plugin-registry.js.map +1 -1
  43. package/dist/plugin-registry.mjs +9 -2
  44. package/dist/plugin-registry.mjs.map +1 -1
  45. package/dist/plugin.js +0 -1
  46. package/dist/plugin.js.map +1 -1
  47. package/dist/preset.js +0 -1
  48. package/dist/preset.js.map +1 -1
  49. package/dist/rspack.js +22 -8
  50. package/dist/rspack.js.map +1 -1
  51. package/dist/rspack.mjs +39 -18
  52. package/dist/rspack.mjs.map +1 -1
  53. package/dist/runtime-css.js +0 -1
  54. package/dist/runtime-css.js.map +1 -1
  55. package/dist/runtime.js +0 -1
  56. package/dist/runtime.js.map +1 -1
  57. package/dist/scanner.js +25 -9
  58. package/dist/scanner.js.map +1 -1
  59. package/dist/scanner.mjs +84 -61
  60. package/dist/scanner.mjs.map +1 -1
  61. package/dist/shared.js +91 -37
  62. package/dist/shared.js.map +1 -1
  63. package/dist/shared.mjs +122 -64
  64. package/dist/shared.mjs.map +1 -1
  65. package/dist/storybook-addon.js +0 -1
  66. package/dist/storybook-addon.js.map +1 -1
  67. package/dist/svelte.js +40 -9
  68. package/dist/svelte.js.map +1 -1
  69. package/dist/svelte.mjs +57 -28
  70. package/dist/svelte.mjs.map +1 -1
  71. package/dist/syntax.js +6 -3
  72. package/dist/syntax.js.map +1 -1
  73. package/dist/syntax.mjs +30 -23
  74. package/dist/syntax.mjs.map +1 -1
  75. package/dist/testing.js +0 -1
  76. package/dist/testing.js.map +1 -1
  77. package/dist/theme.js +21 -4
  78. package/dist/theme.js.map +1 -1
  79. package/dist/theme.mjs +41 -17
  80. package/dist/theme.mjs.map +1 -1
  81. package/dist/turbopackLoader.js +58 -16
  82. package/dist/turbopackLoader.js.map +1 -1
  83. package/dist/turbopackLoader.mjs +89 -45
  84. package/dist/turbopackLoader.mjs.map +1 -1
  85. package/dist/tw.js +153 -39
  86. package/dist/tw.js.map +1 -1
  87. package/dist/tw.mjs +321 -203
  88. package/dist/tw.mjs.map +1 -1
  89. package/dist/vite.js +131 -54
  90. package/dist/vite.js.map +1 -1
  91. package/dist/vite.mjs +226 -143
  92. package/dist/vite.mjs.map +1 -1
  93. package/dist/vue.js +40 -9
  94. package/dist/vue.js.map +1 -1
  95. package/dist/vue.mjs +57 -28
  96. package/dist/vue.mjs.map +1 -1
  97. package/dist/webpackLoader.js +40 -10
  98. package/dist/webpackLoader.js.map +1 -1
  99. package/dist/webpackLoader.mjs +59 -27
  100. package/dist/webpackLoader.mjs.map +1 -1
  101. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,3 @@
1
- const __importMetaUrl = typeof __filename !== "undefined" ? require("node:url").pathToFileURL(__filename).href : "file://unknown";
2
1
  /* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
3
2
  "use strict";
4
3
  var __create = Object.create;
@@ -32,7 +31,26 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
31
  ));
33
32
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
33
 
34
+ // node_modules/tsup/assets/cjs_shims.js
35
+ var getImportMetaUrl, importMetaUrl;
36
+ var init_cjs_shims = __esm({
37
+ "node_modules/tsup/assets/cjs_shims.js"() {
38
+ "use strict";
39
+ getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
40
+ importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
41
+ }
42
+ });
43
+
35
44
  // packages/domain/shared/src/native-resolution.ts
45
+ function _safeCreateRequire() {
46
+ if (typeof import_meta !== "undefined" && importMetaUrl && !importMetaUrl.includes("unknown")) {
47
+ return (0, import_node_module.createRequire)(importMetaUrl);
48
+ }
49
+ if (typeof __filename !== "undefined") {
50
+ return (0, import_node_module.createRequire)(__filename);
51
+ }
52
+ return (0, import_node_module.createRequire)(new URL(`file://${process.cwd()}/`).href);
53
+ }
36
54
  function platformKey() {
37
55
  if (isBrowser) return "browser";
38
56
  return `${process.platform}-${process.arch}`;
@@ -114,17 +132,17 @@ function resolveNativeBinary(runtimeDir) {
114
132
  }
115
133
  return { path: null, source: "not-found", platform, tried };
116
134
  }
117
- var import_node_module, fs, path, isBrowser, _require, PLATFORM_MAP;
135
+ var import_node_module, fs, path, import_meta, isBrowser, _require, PLATFORM_MAP;
118
136
  var init_native_resolution = __esm({
119
137
  "packages/domain/shared/src/native-resolution.ts"() {
120
138
  "use strict";
139
+ init_cjs_shims();
121
140
  import_node_module = require("module");
122
141
  fs = __toESM(require("fs"));
123
142
  path = __toESM(require("path"));
143
+ import_meta = {};
124
144
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
125
- _require = (0, import_node_module.createRequire)(
126
- typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
127
- );
145
+ _require = _safeCreateRequire();
128
146
  PLATFORM_MAP = {
129
147
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
130
148
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -141,6 +159,7 @@ var import_node_crypto, import_node_fs, import_node_path, import_node_url, impor
141
159
  var init_src = __esm({
142
160
  "packages/domain/shared/src/index.ts"() {
143
161
  "use strict";
162
+ init_cjs_shims();
144
163
  import_node_crypto = require("crypto");
145
164
  import_node_fs = __toESM(require("fs"));
146
165
  import_node_path = __toESM(require("path"));
@@ -148,7 +167,7 @@ var init_src = __esm({
148
167
  import_node_module2 = require("module");
149
168
  init_native_resolution();
150
169
  _require2 = (0, import_node_module2.createRequire)(
151
- typeof __filename !== "undefined" ? `file://${__filename}` : __importMetaUrl ?? "file://unknown"
170
+ typeof __filename !== "undefined" ? `file://${__filename}` : importMetaUrl ?? "file://unknown"
152
171
  );
153
172
  }
154
173
  });
@@ -199,23 +218,30 @@ __export(umbrella_exports, {
199
218
  withSubComponents: () => withSubComponents
200
219
  });
201
220
  module.exports = __toCommonJS(umbrella_exports);
221
+ init_cjs_shims();
202
222
 
203
223
  // packages/domain/core/src/twProxy.ts
224
+ init_cjs_shims();
204
225
  var import_react2 = __toESM(require("react"), 1);
205
226
 
206
227
  // packages/domain/core/src/createComponent.ts
228
+ init_cjs_shims();
207
229
  var import_react = __toESM(require("react"), 1);
208
230
 
231
+ // packages/domain/core/src/containerQuery.ts
232
+ init_cjs_shims();
233
+
209
234
  // packages/domain/core/src/native.ts
235
+ init_cjs_shims();
210
236
  var import_node_module3 = require("module");
211
237
  var import_node_path2 = require("path");
212
238
  var import_node_url2 = require("url");
213
239
  init_src();
214
- var import_meta = {};
240
+ var import_meta2 = {};
215
241
  var isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
216
242
  var NATIVE_UNAVAILABLE_MESSAGE = "[tailwind-styled/core] Native binding is required but not available.\nPlease ensure you have run: npm run build:rust";
217
243
  var _nodeRequire = (0, import_node_module3.createRequire)(
218
- typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta !== "undefined" && __importMetaUrl ? __importMetaUrl : "file://unknown"
244
+ typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta2 !== "undefined" && importMetaUrl ? importMetaUrl : "file://unknown"
219
245
  );
220
246
  var _loadNative = (path3) => _nodeRequire(path3);
221
247
  var nativeBinding = null;
@@ -231,7 +257,7 @@ var getBinding = () => {
231
257
  bindingLoadAttempted = true;
232
258
  try {
233
259
  const runtimeDir = isBrowser2 ? "" : (0, import_node_path2.dirname)(
234
- typeof __filename !== "undefined" ? __filename : typeof import_meta !== "undefined" && __importMetaUrl ? (0, import_node_url2.fileURLToPath)(__importMetaUrl) : process.cwd()
260
+ typeof __filename !== "undefined" ? __filename : typeof import_meta2 !== "undefined" && importMetaUrl ? (0, import_node_url2.fileURLToPath)(importMetaUrl) : process.cwd()
235
261
  );
236
262
  const result = isBrowser2 ? { path: null, source: "not-found", platform: "browser", tried: [] } : resolveNativeBinary(runtimeDir);
237
263
  if (result.path && result.path.endsWith(".node")) {
@@ -371,6 +397,7 @@ function getContainerRegistry() {
371
397
  }
372
398
 
373
399
  // packages/domain/core/src/merge.ts
400
+ init_cjs_shims();
374
401
  function createTwMerge(_options = {}) {
375
402
  return function twMerge2(...classLists) {
376
403
  const inputs = [];
@@ -397,6 +424,7 @@ function mergeWithRules(rules, ...classLists) {
397
424
  }
398
425
 
399
426
  // packages/domain/core/src/stateEngine.ts
427
+ init_cjs_shims();
400
428
  var stateRegistry = /* @__PURE__ */ new Map();
401
429
  if (typeof window !== "undefined") {
402
430
  window.__TW_STATE_REGISTRY__ = stateRegistry;
@@ -1051,6 +1079,7 @@ var tw = Object.assign(twCallable, tagFactories, {
1051
1079
  });
1052
1080
 
1053
1081
  // packages/domain/core/src/cv.ts
1082
+ init_cjs_shims();
1054
1083
  var __generatedRegistry = {};
1055
1084
  function registerVariantTable(componentId, table) {
1056
1085
  __generatedRegistry[componentId] = table;
@@ -1186,6 +1215,7 @@ function cv(config, componentId) {
1186
1215
  }
1187
1216
 
1188
1217
  // packages/domain/core/src/cx.ts
1218
+ init_cjs_shims();
1189
1219
  function cn(...inputs) {
1190
1220
  const strings = [];
1191
1221
  for (const item of inputs) {
@@ -1216,6 +1246,7 @@ function cx(...inputs) {
1216
1246
  var cxm = cx;
1217
1247
 
1218
1248
  // packages/domain/core/src/styledSystem.ts
1249
+ init_cjs_shims();
1219
1250
  function tokenVarName(prefix, group, name) {
1220
1251
  return `--${prefix}-${group}-${name}`;
1221
1252
  }
@@ -1365,6 +1396,7 @@ function createStyledSystem(config) {
1365
1396
  }
1366
1397
 
1367
1398
  // packages/domain/core/src/styled.ts
1399
+ init_cjs_shims();
1368
1400
  function resolveVariantClass(options, props) {
1369
1401
  const out = [];
1370
1402
  const variants = options.variants ?? {};
@@ -1396,6 +1428,7 @@ function styled(options) {
1396
1428
  }
1397
1429
 
1398
1430
  // packages/domain/core/src/twTheme.ts
1431
+ init_cjs_shims();
1399
1432
  function cssVar(varName, fallback) {
1400
1433
  const name = varName.startsWith("--") ? varName : `--${varName}`;
1401
1434
  return fallback ? `var(${name}, ${fallback})` : `var(${name})`;
@@ -1460,7 +1493,14 @@ var v4Tokens = {
1460
1493
  fontMono: twVar("font", "font-mono")
1461
1494
  };
1462
1495
 
1496
+ // packages/domain/core/src/liveTokenEngine.ts
1497
+ init_cjs_shims();
1498
+
1499
+ // packages/domain/theme/src/liveTokens.ts
1500
+ init_cjs_shims();
1501
+
1463
1502
  // packages/domain/theme/src/liveTokenEngine.ts
1503
+ init_cjs_shims();
1464
1504
  var import_react3 = __toESM(require("react"), 1);
1465
1505
  var TOKEN_ENGINE_KEY = "__TW_TOKEN_ENGINE__";
1466
1506
  function tokenVar(name) {
@@ -1631,6 +1671,7 @@ if (typeof window !== "undefined") {
1631
1671
  }
1632
1672
 
1633
1673
  // packages/domain/core/src/registry.ts
1674
+ init_cjs_shims();
1634
1675
  var import_react4 = __toESM(require("react"), 1);
1635
1676
  var subComponentRegistry = /* @__PURE__ */ new Map();
1636
1677
  function registerSubComponent(entry) {