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