tailwind-styled-v4 5.0.37 → 5.0.38

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 (119) hide show
  1. package/dist/analyzer.js +213 -161
  2. package/dist/analyzer.js.map +1 -1
  3. package/dist/analyzer.mjs +118 -82
  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 +28 -14
  8. package/dist/animate.mjs.map +1 -1
  9. package/dist/atomic.js +105 -68
  10. package/dist/atomic.js.map +1 -1
  11. package/dist/atomic.mjs +40 -13
  12. package/dist/atomic.mjs.map +1 -1
  13. package/dist/cli.js +577 -426
  14. package/dist/cli.js.map +1 -1
  15. package/dist/cli.mjs +466 -304
  16. package/dist/cli.mjs.map +1 -1
  17. package/dist/compiler.js +826 -508
  18. package/dist/compiler.js.map +1 -1
  19. package/dist/compiler.mjs +287 -29
  20. package/dist/compiler.mjs.map +1 -1
  21. package/dist/dashboard.js +71 -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 +333 -289
  26. package/dist/devtools.js.map +1 -1
  27. package/dist/devtools.mjs +26 -11
  28. package/dist/devtools.mjs.map +1 -1
  29. package/dist/engine.js +679 -502
  30. package/dist/engine.js.map +1 -1
  31. package/dist/engine.mjs +467 -307
  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 +1329 -7441
  36. package/dist/index.js.map +1 -1
  37. package/dist/index.mjs +1266 -7385
  38. package/dist/index.mjs.map +1 -1
  39. package/dist/next.js +318 -243
  40. package/dist/next.js.map +1 -1
  41. package/dist/next.mjs +256 -181
  42. package/dist/next.mjs.map +1 -1
  43. package/dist/plugin-api.js +93 -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 +67 -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 +101 -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 +47 -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 +82 -50
  60. package/dist/rspack.js.map +1 -1
  61. package/dist/rspack.mjs +20 -12
  62. package/dist/rspack.mjs.map +1 -1
  63. package/dist/runtime-css.js +62 -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 +97 -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 +163 -120
  72. package/dist/scanner.js.map +1 -1
  73. package/dist/scanner.mjs +67 -39
  74. package/dist/scanner.mjs.map +1 -1
  75. package/dist/shared.js +441 -295
  76. package/dist/shared.js.map +1 -1
  77. package/dist/shared.mjs +253 -122
  78. package/dist/shared.mjs.map +1 -1
  79. package/dist/storybook-addon.js +39 -10
  80. package/dist/storybook-addon.js.map +1 -1
  81. package/dist/storybook-addon.mjs +8 -3
  82. package/dist/storybook-addon.mjs.map +1 -1
  83. package/dist/svelte.js +88 -64
  84. package/dist/svelte.js.map +1 -1
  85. package/dist/svelte.mjs +28 -13
  86. package/dist/svelte.mjs.map +1 -1
  87. package/dist/syntax.js +68 -37
  88. package/dist/syntax.js.map +1 -1
  89. package/dist/syntax.mjs +8 -7
  90. package/dist/syntax.mjs.map +1 -1
  91. package/dist/testing.js +55 -18
  92. package/dist/testing.js.map +1 -1
  93. package/dist/testing.mjs +16 -3
  94. package/dist/testing.mjs.map +1 -1
  95. package/dist/theme.js +131 -74
  96. package/dist/theme.js.map +1 -1
  97. package/dist/theme.mjs +42 -13
  98. package/dist/theme.mjs.map +1 -1
  99. package/dist/turbopackLoader.js +150 -116
  100. package/dist/turbopackLoader.js.map +1 -1
  101. package/dist/turbopackLoader.mjs +124 -81
  102. package/dist/turbopackLoader.mjs.map +1 -1
  103. package/dist/tw.js +560 -421
  104. package/dist/tw.js.map +1 -1
  105. package/dist/tw.mjs +460 -302
  106. package/dist/tw.mjs.map +1 -1
  107. package/dist/vite.js +561 -446
  108. package/dist/vite.js.map +1 -1
  109. package/dist/vite.mjs +433 -321
  110. package/dist/vite.mjs.map +1 -1
  111. package/dist/vue.js +95 -70
  112. package/dist/vue.js.map +1 -1
  113. package/dist/vue.mjs +30 -14
  114. package/dist/vue.mjs.map +1 -1
  115. package/dist/webpackLoader.js +110 -78
  116. package/dist/webpackLoader.js.map +1 -1
  117. package/dist/webpackLoader.mjs +45 -17
  118. package/dist/webpackLoader.mjs.map +1 -1
  119. package/package.json +3 -1
package/dist/atomic.js CHANGED
@@ -1,44 +1,37 @@
1
- 'use strict';
2
-
3
- var module$1 = require('module');
4
- var fs = require('fs');
5
- var path = require('path');
6
- require('crypto');
7
- var url = require('url');
8
-
9
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
10
- function _interopNamespace(e) {
11
- if (e && e.__esModule) return e;
12
- var n = Object.create(null);
13
- if (e) {
14
- Object.keys(e).forEach(function (k) {
15
- if (k !== 'default') {
16
- var d = Object.getOwnPropertyDescriptor(e, k);
17
- Object.defineProperty(n, k, d.get ? d : {
18
- enumerable: true,
19
- get: function () { return e[k]; }
20
- });
21
- }
22
- });
23
- }
24
- n.default = e;
25
- return Object.freeze(n);
26
- }
27
-
28
- var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
29
- var path__namespace = /*#__PURE__*/_interopNamespace(path);
30
-
31
1
  /* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
2
+ "use strict";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
32
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
33
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
34
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
35
- }) : x)(function(x) {
36
- if (typeof require !== "undefined") return require.apply(this, arguments);
37
- throw Error('Dynamic require of "' + x + '" is not supported');
38
- });
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
39
9
  var __esm = (fn, res) => function __init() {
40
10
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
41
11
  };
12
+ var __export = (target, all) => {
13
+ for (var name in all)
14
+ __defProp(target, name, { get: all[name], enumerable: true });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from))
19
+ if (!__hasOwnProp.call(to, key) && key !== except)
20
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
+ mod
31
+ ));
32
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
33
+
34
+ // packages/domain/shared/src/native-resolution.ts
42
35
  function platformKey() {
43
36
  if (isBrowser) return "browser";
44
37
  return `${process.platform}-${process.arch}`;
@@ -54,7 +47,7 @@ function resolveNativeBinary(runtimeDir) {
54
47
  }
55
48
  const envPath = process.env.TW_NATIVE_PATH?.trim();
56
49
  if (envPath) {
57
- if (fs__namespace.existsSync(envPath)) {
50
+ if (fs.existsSync(envPath)) {
58
51
  return { path: envPath, source: "env", platform, tried };
59
52
  }
60
53
  tried.push(`env:${envPath} (not found)`);
@@ -63,7 +56,7 @@ function resolveNativeBinary(runtimeDir) {
63
56
  for (const pkg of prebuiltPkgs) {
64
57
  try {
65
58
  const candidate = _require.resolve(`${pkg}/tailwind_styled_parser.node`);
66
- if (fs__namespace.existsSync(candidate)) {
59
+ if (fs.existsSync(candidate)) {
67
60
  return { path: candidate, source: "prebuilt", platform, tried };
68
61
  }
69
62
  tried.push(`prebuilt:${pkg} (resolved but missing)`);
@@ -74,13 +67,13 @@ function resolveNativeBinary(runtimeDir) {
74
67
  const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
75
68
  const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
76
69
  if (runtimeDir) {
77
- for (const depth of ["..", path__namespace.join("..", ".."), path__namespace.join("..", "..", "..")]) {
78
- const pkgRoot = path__namespace.resolve(runtimeDir, depth);
70
+ for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
71
+ const pkgRoot = path.resolve(runtimeDir, depth);
79
72
  for (const bin of BINARY_NAMES_SELF) {
80
73
  for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
81
- const candidate = path__namespace.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
74
+ const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
82
75
  tried.push(`self-bundled:${candidate}`);
83
- if (fs__namespace.existsSync(candidate)) {
76
+ if (fs.existsSync(candidate)) {
84
77
  return { path: candidate, source: "prebuilt", platform, tried };
85
78
  }
86
79
  }
@@ -92,39 +85,44 @@ function resolveNativeBinary(runtimeDir) {
92
85
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
93
86
  const localCandidates = [];
94
87
  for (const bin of BINARY_NAMES) {
95
- localCandidates.push(path__namespace.resolve(base, `${bin}.node`));
96
- localCandidates.push(path__namespace.resolve(base, "..", `${bin}.node`));
97
- localCandidates.push(path__namespace.resolve(base, `${bin}.${platform}.node`));
98
- localCandidates.push(path__namespace.resolve(base, `${bin}.${napiPlatform}.node`));
88
+ localCandidates.push(path.resolve(base, `${bin}.node`));
89
+ localCandidates.push(path.resolve(base, "..", `${bin}.node`));
90
+ localCandidates.push(path.resolve(base, `${bin}.${platform}.node`));
91
+ localCandidates.push(path.resolve(base, `${bin}.${napiPlatform}.node`));
99
92
  }
100
93
  for (const startDir of [cwd, base]) {
101
94
  let dir = startDir;
102
95
  for (let i = 0; i < 6; i++) {
103
- const nativeDir = path__namespace.resolve(dir, "native");
96
+ const nativeDir = path.resolve(dir, "native");
104
97
  for (const bin of BINARY_NAMES) {
105
- localCandidates.push(path__namespace.resolve(nativeDir, `${bin}.node`));
106
- localCandidates.push(path__namespace.resolve(nativeDir, `${bin}.${platform}.node`));
107
- localCandidates.push(path__namespace.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
108
- localCandidates.push(path__namespace.resolve(nativeDir, "target", "release", `${bin}.node`));
98
+ localCandidates.push(path.resolve(nativeDir, `${bin}.node`));
99
+ localCandidates.push(path.resolve(nativeDir, `${bin}.${platform}.node`));
100
+ localCandidates.push(path.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
101
+ localCandidates.push(path.resolve(nativeDir, "target", "release", `${bin}.node`));
109
102
  }
110
- const parent = path__namespace.resolve(dir, "..");
103
+ const parent = path.resolve(dir, "..");
111
104
  if (parent === dir) break;
112
105
  dir = parent;
113
106
  }
114
107
  }
115
108
  for (const candidate of localCandidates) {
116
109
  tried.push(`local:${candidate}`);
117
- if (fs__namespace.existsSync(candidate)) {
110
+ if (fs.existsSync(candidate)) {
118
111
  return { path: candidate, source: "local", platform, tried };
119
112
  }
120
113
  }
121
114
  return { path: null, source: "not-found", platform, tried };
122
115
  }
123
- var isBrowser, _require, PLATFORM_MAP;
116
+ var import_node_module, fs, path, import_meta, isBrowser, _require, PLATFORM_MAP;
124
117
  var init_native_resolution = __esm({
125
118
  "packages/domain/shared/src/native-resolution.ts"() {
119
+ "use strict";
120
+ import_node_module = require("module");
121
+ fs = __toESM(require("fs"));
122
+ path = __toESM(require("path"));
123
+ import_meta = {};
126
124
  isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
127
- _require = typeof __require !== "undefined" ? __require : module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('atomic.js', document.baseURI).href)));
125
+ _require = typeof require !== "undefined" ? require : (0, import_node_module.createRequire)(import_meta.url);
128
126
  PLATFORM_MAP = {
129
127
  "linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
130
128
  "linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
@@ -135,26 +133,39 @@ var init_native_resolution = __esm({
135
133
  };
136
134
  }
137
135
  });
136
+
137
+ // packages/domain/shared/src/index.ts
138
138
  function resolveRuntimeDir(dir, importMetaUrl) {
139
+ if (dir) return import_node_path.default.resolve(dir);
139
140
  try {
140
- return path__namespace.default.dirname(url.fileURLToPath(importMetaUrl));
141
+ return import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
141
142
  } catch {
142
143
  return process.cwd();
143
144
  }
144
145
  }
146
+ var import_node_crypto, import_node_fs, import_node_path, import_node_url, import_node_module2, import_meta2, _require2;
145
147
  var init_src = __esm({
146
148
  "packages/domain/shared/src/index.ts"() {
149
+ "use strict";
150
+ import_node_crypto = require("crypto");
151
+ import_node_fs = __toESM(require("fs"));
152
+ import_node_path = __toESM(require("path"));
153
+ import_node_url = require("url");
154
+ import_node_module2 = require("module");
147
155
  init_native_resolution();
148
- module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('atomic.js', document.baseURI).href)));
156
+ import_meta2 = {};
157
+ _require2 = (0, import_node_module2.createRequire)(import_meta2.url);
149
158
  }
150
159
  });
151
160
 
152
161
  // packages/domain/compiler/src/nativeBridge.ts
153
- var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge;
162
+ var import_meta3, _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge;
154
163
  var init_nativeBridge = __esm({
155
164
  "packages/domain/compiler/src/nativeBridge.ts"() {
165
+ "use strict";
156
166
  init_src();
157
- _loadNative = (path4) => __require(path4);
167
+ import_meta3 = {};
168
+ _loadNative = (path4) => require(path4);
158
169
  log = (...args) => {
159
170
  if (process.env.DEBUG?.includes("compiler:native")) {
160
171
  console.log("[compiler:native]", ...args);
@@ -180,7 +191,7 @@ var init_nativeBridge = __esm({
180
191
  }
181
192
  bridgeLoadAttempted = true;
182
193
  try {
183
- const runtimeDir = resolveRuntimeDir(void 0, (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('atomic.js', document.baseURI).href)));
194
+ const runtimeDir = resolveRuntimeDir(void 0, import_meta3.url);
184
195
  const result = resolveNativeBinary(runtimeDir);
185
196
  if (result.path && result.path.endsWith(".node")) {
186
197
  try {
@@ -251,40 +262,53 @@ Tried paths: ${result.tried.join("\n")}`);
251
262
  // packages/domain/compiler/src/compiler/index.ts
252
263
  var init_compiler = __esm({
253
264
  "packages/domain/compiler/src/compiler/index.ts"() {
265
+ "use strict";
254
266
  }
255
267
  });
256
268
 
257
269
  // packages/domain/compiler/src/parser/index.ts
258
270
  var init_parser = __esm({
259
271
  "packages/domain/compiler/src/parser/index.ts"() {
272
+ "use strict";
260
273
  }
261
274
  });
262
275
 
263
276
  // packages/domain/compiler/src/analyzer/index.ts
264
277
  var init_analyzer = __esm({
265
278
  "packages/domain/compiler/src/analyzer/index.ts"() {
279
+ "use strict";
266
280
  }
267
281
  });
268
282
 
269
283
  // packages/domain/compiler/src/cache/index.ts
270
284
  var init_cache = __esm({
271
285
  "packages/domain/compiler/src/cache/index.ts"() {
286
+ "use strict";
272
287
  }
273
288
  });
274
289
 
275
290
  // packages/domain/compiler/src/redis/index.ts
276
291
  var init_redis = __esm({
277
292
  "packages/domain/compiler/src/redis/index.ts"() {
293
+ "use strict";
278
294
  }
279
295
  });
280
296
 
281
297
  // packages/domain/compiler/src/watch/index.ts
282
298
  var init_watch = __esm({
283
299
  "packages/domain/compiler/src/watch/index.ts"() {
300
+ "use strict";
284
301
  }
285
302
  });
303
+
304
+ // packages/domain/compiler/src/index.ts
305
+ var import_node_fs2, import_node_path2, import_node_module3, import_meta4, _require3;
286
306
  var init_src2 = __esm({
287
307
  "packages/domain/compiler/src/index.ts"() {
308
+ "use strict";
309
+ import_node_fs2 = __toESM(require("fs"), 1);
310
+ import_node_path2 = __toESM(require("path"), 1);
311
+ import_node_module3 = require("module");
288
312
  init_nativeBridge();
289
313
  init_compiler();
290
314
  init_parser();
@@ -292,10 +316,22 @@ var init_src2 = __esm({
292
316
  init_cache();
293
317
  init_redis();
294
318
  init_watch();
295
- module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('atomic.js', document.baseURI).href)));
319
+ import_meta4 = {};
320
+ _require3 = (0, import_node_module3.createRequire)(import_meta4.url);
296
321
  }
297
322
  });
298
323
 
324
+ // src/umbrella/atomic.ts
325
+ var atomic_exports = {};
326
+ __export(atomic_exports, {
327
+ clearAtomicRegistry: () => clearAtomicRegistry,
328
+ generateAtomicCss: () => generateAtomicCss,
329
+ getAtomicRegistry: () => getAtomicRegistry,
330
+ parseAtomicClass: () => parseAtomicClass,
331
+ toAtomicClasses: () => toAtomicClasses
332
+ });
333
+ module.exports = __toCommonJS(atomic_exports);
334
+
299
335
  // packages/domain/atomic/src/index.ts
300
336
  init_src2();
301
337
  function getNative() {
@@ -340,11 +376,12 @@ function clearAtomicRegistry() {
340
376
  }
341
377
  native.clearAtomicRegistry();
342
378
  }
343
-
344
- exports.clearAtomicRegistry = clearAtomicRegistry;
345
- exports.generateAtomicCss = generateAtomicCss;
346
- exports.getAtomicRegistry = getAtomicRegistry;
347
- exports.parseAtomicClass = parseAtomicClass;
348
- exports.toAtomicClasses = toAtomicClasses;
349
- //# sourceMappingURL=atomic.js.map
379
+ // Annotate the CommonJS export names for ESM import in node:
380
+ 0 && (module.exports = {
381
+ clearAtomicRegistry,
382
+ generateAtomicCss,
383
+ getAtomicRegistry,
384
+ parseAtomicClass,
385
+ toAtomicClasses
386
+ });
350
387
  //# sourceMappingURL=atomic.js.map