tailwind-styled-v4 5.0.36 → 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 (163) hide show
  1. package/dist/analyzer.d.mts +152 -5
  2. package/dist/analyzer.d.ts +152 -5
  3. package/dist/analyzer.js +213 -161
  4. package/dist/analyzer.js.map +1 -1
  5. package/dist/analyzer.mjs +118 -82
  6. package/dist/analyzer.mjs.map +1 -1
  7. package/dist/animate.d.mts +30 -3
  8. package/dist/animate.d.ts +30 -3
  9. package/dist/animate.js +131 -87
  10. package/dist/animate.js.map +1 -1
  11. package/dist/animate.mjs +28 -14
  12. package/dist/animate.mjs.map +1 -1
  13. package/dist/atomic.js +105 -68
  14. package/dist/atomic.js.map +1 -1
  15. package/dist/atomic.mjs +40 -13
  16. package/dist/atomic.mjs.map +1 -1
  17. package/dist/cli.js +577 -426
  18. package/dist/cli.js.map +1 -1
  19. package/dist/cli.mjs +466 -304
  20. package/dist/cli.mjs.map +1 -1
  21. package/dist/compiler.d.mts +5 -0
  22. package/dist/compiler.d.ts +5 -0
  23. package/dist/compiler.js +826 -508
  24. package/dist/compiler.js.map +1 -1
  25. package/dist/compiler.mjs +287 -29
  26. package/dist/compiler.mjs.map +1 -1
  27. package/dist/dashboard.js +71 -41
  28. package/dist/dashboard.js.map +1 -1
  29. package/dist/dashboard.mjs +12 -6
  30. package/dist/dashboard.mjs.map +1 -1
  31. package/dist/devtools.d.mts +88 -2
  32. package/dist/devtools.d.ts +88 -2
  33. package/dist/devtools.js +333 -289
  34. package/dist/devtools.js.map +1 -1
  35. package/dist/devtools.mjs +26 -11
  36. package/dist/devtools.mjs.map +1 -1
  37. package/dist/engine.d.mts +557 -6
  38. package/dist/engine.d.ts +557 -6
  39. package/dist/engine.js +679 -502
  40. package/dist/engine.js.map +1 -1
  41. package/dist/engine.mjs +467 -307
  42. package/dist/engine.mjs.map +1 -1
  43. package/dist/index.d.mts +180 -127
  44. package/dist/index.d.ts +180 -127
  45. package/dist/index.js +1329 -7441
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +1266 -7385
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/next.js +318 -243
  50. package/dist/next.js.map +1 -1
  51. package/dist/next.mjs +256 -181
  52. package/dist/next.mjs.map +1 -1
  53. package/dist/plugin-api.d.mts +4 -2
  54. package/dist/plugin-api.d.ts +4 -2
  55. package/dist/plugin-api.js +93 -49
  56. package/dist/plugin-api.js.map +1 -1
  57. package/dist/plugin-api.mjs +26 -6
  58. package/dist/plugin-api.mjs.map +1 -1
  59. package/dist/plugin-registry.js +103 -62
  60. package/dist/plugin-registry.js.map +1 -1
  61. package/dist/plugin-registry.mjs +53 -35
  62. package/dist/plugin-registry.mjs.map +1 -1
  63. package/dist/plugin.d.mts +165 -5
  64. package/dist/plugin.d.ts +165 -5
  65. package/dist/plugin.js +115 -50
  66. package/dist/plugin.js.map +1 -1
  67. package/dist/plugin.mjs +44 -6
  68. package/dist/plugin.mjs.map +1 -1
  69. package/dist/preset.js +47 -15
  70. package/dist/preset.js.map +1 -1
  71. package/dist/preset.mjs +13 -5
  72. package/dist/preset.mjs.map +1 -1
  73. package/dist/rspack.js +82 -50
  74. package/dist/rspack.js.map +1 -1
  75. package/dist/rspack.mjs +20 -12
  76. package/dist/rspack.mjs.map +1 -1
  77. package/dist/runtime-css.js +62 -24
  78. package/dist/runtime-css.js.map +1 -1
  79. package/dist/runtime-css.mjs +15 -7
  80. package/dist/runtime-css.mjs.map +1 -1
  81. package/dist/runtime.d.mts +38 -3
  82. package/dist/runtime.d.ts +38 -3
  83. package/dist/runtime.js +97 -44
  84. package/dist/runtime.js.map +1 -1
  85. package/dist/runtime.mjs +31 -8
  86. package/dist/runtime.mjs.map +1 -1
  87. package/dist/scanner.d.mts +58 -4
  88. package/dist/scanner.d.ts +58 -4
  89. package/dist/scanner.js +163 -120
  90. package/dist/scanner.js.map +1 -1
  91. package/dist/scanner.mjs +67 -39
  92. package/dist/scanner.mjs.map +1 -1
  93. package/dist/shared.d.mts +185 -3
  94. package/dist/shared.d.ts +185 -3
  95. package/dist/shared.js +441 -295
  96. package/dist/shared.js.map +1 -1
  97. package/dist/shared.mjs +253 -122
  98. package/dist/shared.mjs.map +1 -1
  99. package/dist/storybook-addon.d.mts +2 -2
  100. package/dist/storybook-addon.d.ts +2 -2
  101. package/dist/storybook-addon.js +39 -10
  102. package/dist/storybook-addon.js.map +1 -1
  103. package/dist/storybook-addon.mjs +8 -3
  104. package/dist/storybook-addon.mjs.map +1 -1
  105. package/dist/svelte.d.mts +2 -1
  106. package/dist/svelte.d.ts +2 -1
  107. package/dist/svelte.js +88 -64
  108. package/dist/svelte.js.map +1 -1
  109. package/dist/svelte.mjs +28 -13
  110. package/dist/svelte.mjs.map +1 -1
  111. package/dist/syntax.js +68 -37
  112. package/dist/syntax.js.map +1 -1
  113. package/dist/syntax.mjs +8 -7
  114. package/dist/syntax.mjs.map +1 -1
  115. package/dist/testing.js +55 -18
  116. package/dist/testing.js.map +1 -1
  117. package/dist/testing.mjs +16 -3
  118. package/dist/testing.mjs.map +1 -1
  119. package/dist/theme.d.mts +38 -3
  120. package/dist/theme.d.ts +38 -3
  121. package/dist/theme.js +131 -74
  122. package/dist/theme.js.map +1 -1
  123. package/dist/theme.mjs +42 -13
  124. package/dist/theme.mjs.map +1 -1
  125. package/dist/turbopackLoader.js +150 -116
  126. package/dist/turbopackLoader.js.map +1 -1
  127. package/dist/turbopackLoader.mjs +124 -81
  128. package/dist/turbopackLoader.mjs.map +1 -1
  129. package/dist/tw.js +560 -421
  130. package/dist/tw.js.map +1 -1
  131. package/dist/tw.mjs +460 -302
  132. package/dist/tw.mjs.map +1 -1
  133. package/dist/vite.js +561 -446
  134. package/dist/vite.js.map +1 -1
  135. package/dist/vite.mjs +433 -321
  136. package/dist/vite.mjs.map +1 -1
  137. package/dist/vue.d.mts +4 -1
  138. package/dist/vue.d.ts +4 -1
  139. package/dist/vue.js +95 -70
  140. package/dist/vue.js.map +1 -1
  141. package/dist/vue.mjs +30 -14
  142. package/dist/vue.mjs.map +1 -1
  143. package/dist/webpackLoader.js +110 -78
  144. package/dist/webpackLoader.js.map +1 -1
  145. package/dist/webpackLoader.mjs +45 -17
  146. package/dist/webpackLoader.mjs.map +1 -1
  147. package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
  148. package/native/tailwind-styled-native.node +0 -0
  149. package/package.json +3 -1
  150. package/dist/analyzeWorkspace-B1_XRfdl.d.ts +0 -134
  151. package/dist/analyzeWorkspace-hYfu4Hg3.d.mts +0 -134
  152. package/dist/index-DQI6O24n.d.mts +0 -464
  153. package/dist/index-NDINUhLN.d.mts +0 -90
  154. package/dist/index-NDINUhLN.d.ts +0 -90
  155. package/dist/index-UkYbyBkR.d.ts +0 -464
  156. package/dist/liveTokenEngine-CN9ian1R.d.ts +0 -38
  157. package/dist/liveTokenEngine-DKoWRtqH.d.mts +0 -38
  158. package/dist/schemas-DR-SLxZZ.d.mts +0 -59
  159. package/dist/schemas-DR-SLxZZ.d.ts +0 -59
  160. package/dist/trace-Dz4vmZdy.d.mts +0 -96
  161. package/dist/trace-Dz4vmZdy.d.ts +0 -96
  162. package/dist/types-DXr2PmGP.d.mts +0 -31
  163. package/dist/types-DXr2PmGP.d.ts +0 -31
@@ -1,5 +1,32 @@
1
- import { A as AnimationRegistryOptions, a as AnimateOptions, C as CompiledAnimation, K as KeyframesDefinition } from './types-DXr2PmGP.mjs';
2
- export { b as CSSDirection, c as CSSEasing, d as CSSFillMode, e as CSSIterationCount, f as CubicBezierEasing, P as PresetEasing, S as StepsEasing } from './types-DXr2PmGP.mjs';
1
+ type CSSFillMode = "none" | "forwards" | "backwards" | "both";
2
+ type CSSDirection = "normal" | "reverse" | "alternate" | "alternate-reverse";
3
+ type CSSIterationCount = number | "infinite";
4
+ type PresetEasing = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "step-start" | "step-end";
5
+ type CubicBezierEasing = `cubic-bezier(${string})`;
6
+ type StepsEasing = `steps(${string})`;
7
+ type CSSEasing = PresetEasing | CubicBezierEasing | StepsEasing;
8
+ interface AnimateOptions {
9
+ from: string;
10
+ to: string;
11
+ duration?: number;
12
+ easing?: CSSEasing;
13
+ delay?: number;
14
+ fill?: CSSFillMode;
15
+ iterations?: CSSIterationCount;
16
+ direction?: CSSDirection;
17
+ name?: string;
18
+ }
19
+ interface KeyframesDefinition {
20
+ [stop: string]: string;
21
+ }
22
+ interface CompiledAnimation {
23
+ className: string;
24
+ keyframesCss: string;
25
+ animationCss: string;
26
+ }
27
+ interface AnimationRegistryOptions {
28
+ cacheLimit?: number;
29
+ }
3
30
 
4
31
  interface AnimationRegistry {
5
32
  compileAnimation(opts: AnimateOptions): Promise<CompiledAnimation>;
@@ -44,4 +71,4 @@ declare const animations: {
44
71
  readonly spinIn: () => Promise<string>;
45
72
  };
46
73
 
47
- export { AnimateOptions, createAnimationRegistry as AnimationRegistry, AnimationRegistryOptions, type AnimationRegistry as AnimationRegistryType, CompiledAnimation, type InjectAnimationCssOptions, KeyframesDefinition, animate, animations, compileAnimation, compileKeyframes, createAnimationRegistry, extractAnimationCss, getDefaultAnimationRegistry, initAnimate, injectAnimationCss, keyframes, resetAnimationRegistry };
74
+ export { type AnimateOptions, createAnimationRegistry as AnimationRegistry, type AnimationRegistryOptions, type AnimationRegistry as AnimationRegistryType, type CSSDirection, type CSSEasing, type CSSFillMode, type CSSIterationCount, type CompiledAnimation, type CubicBezierEasing, type InjectAnimationCssOptions, type KeyframesDefinition, type PresetEasing, type StepsEasing, animate, animations, compileAnimation, compileKeyframes, createAnimationRegistry, extractAnimationCss, getDefaultAnimationRegistry, initAnimate, injectAnimationCss, keyframes, resetAnimationRegistry };
package/dist/animate.d.ts CHANGED
@@ -1,5 +1,32 @@
1
- import { A as AnimationRegistryOptions, a as AnimateOptions, C as CompiledAnimation, K as KeyframesDefinition } from './types-DXr2PmGP.js';
2
- export { b as CSSDirection, c as CSSEasing, d as CSSFillMode, e as CSSIterationCount, f as CubicBezierEasing, P as PresetEasing, S as StepsEasing } from './types-DXr2PmGP.js';
1
+ type CSSFillMode = "none" | "forwards" | "backwards" | "both";
2
+ type CSSDirection = "normal" | "reverse" | "alternate" | "alternate-reverse";
3
+ type CSSIterationCount = number | "infinite";
4
+ type PresetEasing = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "step-start" | "step-end";
5
+ type CubicBezierEasing = `cubic-bezier(${string})`;
6
+ type StepsEasing = `steps(${string})`;
7
+ type CSSEasing = PresetEasing | CubicBezierEasing | StepsEasing;
8
+ interface AnimateOptions {
9
+ from: string;
10
+ to: string;
11
+ duration?: number;
12
+ easing?: CSSEasing;
13
+ delay?: number;
14
+ fill?: CSSFillMode;
15
+ iterations?: CSSIterationCount;
16
+ direction?: CSSDirection;
17
+ name?: string;
18
+ }
19
+ interface KeyframesDefinition {
20
+ [stop: string]: string;
21
+ }
22
+ interface CompiledAnimation {
23
+ className: string;
24
+ keyframesCss: string;
25
+ animationCss: string;
26
+ }
27
+ interface AnimationRegistryOptions {
28
+ cacheLimit?: number;
29
+ }
3
30
 
4
31
  interface AnimationRegistry {
5
32
  compileAnimation(opts: AnimateOptions): Promise<CompiledAnimation>;
@@ -44,4 +71,4 @@ declare const animations: {
44
71
  readonly spinIn: () => Promise<string>;
45
72
  };
46
73
 
47
- export { AnimateOptions, createAnimationRegistry as AnimationRegistry, AnimationRegistryOptions, type AnimationRegistry as AnimationRegistryType, CompiledAnimation, type InjectAnimationCssOptions, KeyframesDefinition, animate, animations, compileAnimation, compileKeyframes, createAnimationRegistry, extractAnimationCss, getDefaultAnimationRegistry, initAnimate, injectAnimationCss, keyframes, resetAnimationRegistry };
74
+ export { type AnimateOptions, createAnimationRegistry as AnimationRegistry, type AnimationRegistryOptions, type AnimationRegistry as AnimationRegistryType, type CSSDirection, type CSSEasing, type CSSFillMode, type CSSIterationCount, type CompiledAnimation, type CubicBezierEasing, type InjectAnimationCssOptions, type KeyframesDefinition, type PresetEasing, type StepsEasing, animate, animations, compileAnimation, compileKeyframes, createAnimationRegistry, extractAnimationCss, getDefaultAnimationRegistry, initAnimate, injectAnimationCss, keyframes, resetAnimationRegistry };
package/dist/animate.js CHANGED
@@ -1,23 +1,37 @@
1
- 'use strict';
2
-
3
- require('crypto');
4
- var fs = require('fs');
5
- var path = require('path');
6
- var url = require('url');
7
- var module$1 = require('module');
8
- var zod = require('zod');
9
-
10
- var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
11
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
12
-
13
- var fs__default = /*#__PURE__*/_interopDefault(fs);
14
- var path__default = /*#__PURE__*/_interopDefault(path);
15
-
16
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;
17
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
18
9
  var __esm = (fn, res) => function __init() {
19
10
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
20
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/index.ts
21
35
  function createDebugLogger(namespace, label) {
22
36
  const prefix = label ? `[${namespace}:${label}]` : `[${namespace}]`;
23
37
  return (msg) => {
@@ -36,9 +50,9 @@ function loadNativeBinding(options) {
36
50
  const { runtimeDir, candidates, isValid } = options;
37
51
  const loadErrors = [];
38
52
  for (const candidate of candidates) {
39
- const candidatePath = path__default.default.resolve(runtimeDir, candidate);
53
+ const candidatePath = import_node_path.default.resolve(runtimeDir, candidate);
40
54
  try {
41
- if (!fs__default.default.existsSync(candidatePath) && !fs__default.default.existsSync(candidatePath + ".node")) {
55
+ if (!import_node_fs.default.existsSync(candidatePath) && !import_node_fs.default.existsSync(candidatePath + ".node")) {
42
56
  continue;
43
57
  }
44
58
  const mod = requireNativeModule(candidatePath);
@@ -70,9 +84,9 @@ function resolveNativeBindingCandidates(options) {
70
84
  }
71
85
  }
72
86
  if (!includeDefaultCandidates) return candidates;
73
- if (fs__default.default.existsSync(runtimeDir)) {
87
+ if (import_node_fs.default.existsSync(runtimeDir)) {
74
88
  try {
75
- for (const entry of fs__default.default.readdirSync(runtimeDir)) {
89
+ for (const entry of import_node_fs.default.readdirSync(runtimeDir)) {
76
90
  if (entry.endsWith(".node")) candidates.push(entry);
77
91
  }
78
92
  } catch {
@@ -81,29 +95,36 @@ function resolveNativeBindingCandidates(options) {
81
95
  const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
82
96
  const napiPlatform = process.platform === "linux" && process.arch === "x64" ? "linux-x64-gnu" : process.platform === "linux" && process.arch === "arm64" ? "linux-arm64-gnu" : `${process.platform}-${process.arch}`;
83
97
  for (const bin of BINARY_NAMES) {
84
- candidates.push(path__default.default.resolve(runtimeDir, `${bin}.node`));
85
- candidates.push(path__default.default.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
86
- candidates.push(path__default.default.resolve(runtimeDir, "..", "native", `${bin}.node`));
87
- candidates.push(path__default.default.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
88
- candidates.push(path__default.default.resolve(process.cwd(), "native", `${bin}.node`));
89
- candidates.push(path__default.default.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
90
- candidates.push(path__default.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
91
- candidates.push(path__default.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
92
- candidates.push(path__default.default.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
98
+ candidates.push(import_node_path.default.resolve(runtimeDir, `${bin}.node`));
99
+ candidates.push(import_node_path.default.resolve(runtimeDir, `${bin}.${napiPlatform}.node`));
100
+ candidates.push(import_node_path.default.resolve(runtimeDir, "..", "native", `${bin}.node`));
101
+ candidates.push(import_node_path.default.resolve(runtimeDir, "..", "native", `${bin}.${napiPlatform}.node`));
102
+ candidates.push(import_node_path.default.resolve(process.cwd(), "native", `${bin}.node`));
103
+ candidates.push(import_node_path.default.resolve(process.cwd(), "native", `${bin}.${napiPlatform}.node`));
104
+ candidates.push(import_node_path.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.node`));
105
+ candidates.push(import_node_path.default.resolve(runtimeDir, "..", "..", "..", "..", "native", `${bin}.${napiPlatform}.node`));
106
+ candidates.push(import_node_path.default.resolve(runtimeDir, "..", "..", "..", "native", `${bin}.node`));
93
107
  }
94
108
  return Array.from(new Set(candidates));
95
109
  }
96
110
  function resolveRuntimeDir(dir, importMetaUrl) {
97
- if (dir) return path__default.default.resolve(dir);
111
+ if (dir) return import_node_path.default.resolve(dir);
98
112
  try {
99
- return path__default.default.dirname(url.fileURLToPath(importMetaUrl));
113
+ return import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
100
114
  } catch {
101
115
  return process.cwd();
102
116
  }
103
117
  }
104
- var TwError, _require, LRUCache;
118
+ var import_node_crypto, import_node_fs, import_node_path, import_node_url, import_node_module, import_meta, TwError, _require, LRUCache;
105
119
  var init_src = __esm({
106
120
  "packages/domain/shared/src/index.ts"() {
121
+ "use strict";
122
+ import_node_crypto = require("crypto");
123
+ import_node_fs = __toESM(require("fs"));
124
+ import_node_path = __toESM(require("path"));
125
+ import_node_url = require("url");
126
+ import_node_module = require("module");
127
+ import_meta = {};
107
128
  TwError = class _TwError extends Error {
108
129
  /** @deprecated Gunakan source */
109
130
  domain;
@@ -156,7 +177,7 @@ var init_src = __esm({
156
177
  return `[${this.source.toUpperCase()}:${this.code}] ${this.message}`;
157
178
  }
158
179
  };
159
- _require = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('animate.js', document.baseURI).href)));
180
+ _require = (0, import_node_module.createRequire)(import_meta.url);
160
181
  LRUCache = class {
161
182
  capacity;
162
183
  cache;
@@ -201,14 +222,33 @@ var init_src = __esm({
201
222
  }
202
223
  });
203
224
 
225
+ // src/umbrella/animate.ts
226
+ var animate_exports = {};
227
+ __export(animate_exports, {
228
+ AnimationRegistry: () => createAnimationRegistry,
229
+ animate: () => animate,
230
+ animations: () => animations,
231
+ compileAnimation: () => compileAnimation,
232
+ compileKeyframes: () => compileKeyframes,
233
+ createAnimationRegistry: () => createAnimationRegistry,
234
+ extractAnimationCss: () => extractAnimationCss,
235
+ getDefaultAnimationRegistry: () => getDefaultAnimationRegistry,
236
+ initAnimate: () => initAnimate2,
237
+ injectAnimationCss: () => injectAnimationCss,
238
+ keyframes: () => keyframes,
239
+ resetAnimationRegistry: () => resetAnimationRegistry
240
+ });
241
+ module.exports = __toCommonJS(animate_exports);
242
+
204
243
  // packages/domain/animate/src/binding.ts
205
244
  init_src();
245
+ var import_meta2 = {};
206
246
  var createAnimateBindingLoader = () => {
207
247
  const _state = { bindingPromise: null };
208
248
  const loadAnimateBinding = () => {
209
249
  const runtimeDir = resolveRuntimeDir(
210
250
  typeof __dirname === "string" ? __dirname : void 0,
211
- (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('animate.js', document.baseURI).href))
251
+ import_meta2.url
212
252
  );
213
253
  const candidates = resolveBindingCandidates(runtimeDir);
214
254
  const { binding, loadErrors, loadedPath } = loadNativeBinding({
@@ -254,8 +294,8 @@ var createAnimateBindingLoader = () => {
254
294
  var animateBindingLoader = createAnimateBindingLoader();
255
295
  var DEBUG_NAMESPACE = "tailwind-styled:animate";
256
296
  var debugLog = createDebugLogger(DEBUG_NAMESPACE, "tailwind-styled/animate");
257
- function isAnimateModule(module) {
258
- const candidate = module;
297
+ function isAnimateModule(module2) {
298
+ const candidate = module2;
259
299
  return typeof candidate?.compileAnimation === "function" && typeof candidate?.compileKeyframes === "function";
260
300
  }
261
301
  function resolveBindingCandidates(runtimeDir) {
@@ -384,6 +424,7 @@ function createAnimationPresets(registry) {
384
424
  init_src();
385
425
 
386
426
  // packages/domain/analyzer/src/utils.ts
427
+ var import_node_fs2 = __toESM(require("fs"), 1);
387
428
  init_src();
388
429
  var DEBUG_NAMESPACE2 = "tailwind-styled:analyzer";
389
430
  function formatErrorMessage(error) {
@@ -392,8 +433,9 @@ function formatErrorMessage(error) {
392
433
  var debugLog2 = createDebugLogger(DEBUG_NAMESPACE2, "tailwind-styled/analyzer");
393
434
 
394
435
  // packages/domain/analyzer/src/binding.ts
395
- var isAnalyzerModule = (module) => {
396
- const candidate = module;
436
+ var import_meta3 = {};
437
+ var isAnalyzerModule = (module2) => {
438
+ const candidate = module2;
397
439
  return typeof candidate?.analyzeClasses === "function" || typeof candidate?.analyzeClassesWorkspace === "function";
398
440
  };
399
441
  var createAnalyzerBindingLoader = () => {
@@ -403,7 +445,7 @@ var createAnalyzerBindingLoader = () => {
403
445
  _state.bindingPromise = (async () => {
404
446
  const runtimeDir = resolveRuntimeDir(
405
447
  typeof __dirname === "string" ? __dirname : void 0,
406
- (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('animate.js', document.baseURI).href))
448
+ import_meta3.url
407
449
  );
408
450
  const candidates = resolveNativeBindingCandidates({
409
451
  runtimeDir,
@@ -443,7 +485,7 @@ async function requireNativeBinding() {
443
485
  if (binding?.analyzeClasses) return binding;
444
486
  const runtimeDir = resolveRuntimeDir(
445
487
  typeof __dirname === "string" ? __dirname : void 0,
446
- (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('animate.js', document.baseURI).href))
488
+ import_meta3.url
447
489
  );
448
490
  const candidates = resolveNativeBindingCandidates({
449
491
  runtimeDir,
@@ -476,6 +518,7 @@ async function requireNativeCssCompiler() {
476
518
 
477
519
  // packages/domain/analyzer/src/schemas.ts
478
520
  init_src();
521
+ var import_zod = require("zod");
479
522
  var formatIssuePath2 = (path2) => path2.length > 0 ? path2.map(
480
523
  (segment) => typeof segment === "symbol" ? segment.description ?? segment.toString() : String(segment)
481
524
  ).join(".") : "<root>";
@@ -499,76 +542,76 @@ var parseWithSchema = (schema, data, label) => {
499
542
  parsed.error
500
543
  );
501
544
  };
502
- var CountSchema = zod.z.number().int().min(0);
503
- zod.z.object({
504
- name: zod.z.string(),
545
+ var CountSchema = import_zod.z.number().int().min(0);
546
+ var ClassUsageSchema = import_zod.z.object({
547
+ name: import_zod.z.string(),
505
548
  count: CountSchema,
506
- isUnused: zod.z.boolean().optional(),
507
- isConflict: zod.z.boolean().optional()
549
+ isUnused: import_zod.z.boolean().optional(),
550
+ isConflict: import_zod.z.boolean().optional()
508
551
  });
509
- zod.z.object({
510
- className: zod.z.string(),
511
- variants: zod.z.array(zod.z.string()),
512
- classes: zod.z.array(zod.z.string()),
513
- message: zod.z.string()
552
+ var ClassConflictSchema = import_zod.z.object({
553
+ className: import_zod.z.string(),
554
+ variants: import_zod.z.array(import_zod.z.string()),
555
+ classes: import_zod.z.array(import_zod.z.string()),
556
+ message: import_zod.z.string()
514
557
  });
515
- var ClassCountSchema = zod.z.object({
516
- name: zod.z.string(),
558
+ var ClassCountSchema = import_zod.z.object({
559
+ name: import_zod.z.string(),
517
560
  count: CountSchema
518
561
  });
519
- zod.z.object({
520
- root: zod.z.string(),
562
+ var NativeReportSchema = import_zod.z.object({
563
+ root: import_zod.z.string(),
521
564
  totalFiles: CountSchema,
522
565
  uniqueClassCount: CountSchema,
523
566
  totalClassOccurrences: CountSchema,
524
- topClasses: zod.z.array(ClassCountSchema),
525
- duplicateCandidates: zod.z.array(ClassCountSchema),
526
- safelist: zod.z.array(zod.z.string())
567
+ topClasses: import_zod.z.array(ClassCountSchema),
568
+ duplicateCandidates: import_zod.z.array(ClassCountSchema),
569
+ safelist: import_zod.z.array(import_zod.z.string())
527
570
  });
528
- var NativeCssCompileResultSchema = zod.z.object({
529
- css: zod.z.string(),
530
- resolvedClasses: zod.z.array(zod.z.string()),
531
- unknownClasses: zod.z.array(zod.z.string()),
571
+ var NativeCssCompileResultSchema = import_zod.z.object({
572
+ css: import_zod.z.string(),
573
+ resolvedClasses: import_zod.z.array(import_zod.z.string()),
574
+ unknownClasses: import_zod.z.array(import_zod.z.string()),
532
575
  sizeBytes: CountSchema
533
576
  });
534
- var AnalyzerClassStatsSchema = zod.z.object({
535
- top: zod.z.number({
577
+ var AnalyzerClassStatsSchema = import_zod.z.object({
578
+ top: import_zod.z.number({
536
579
  error: "analyzeWorkspace options.classStats.top must be a number when provided."
537
580
  }).finite().optional(),
538
- frequentThreshold: zod.z.number({
581
+ frequentThreshold: import_zod.z.number({
539
582
  error: "analyzeWorkspace options.classStats.frequentThreshold must be a number when provided."
540
583
  }).finite().optional()
541
584
  });
542
- var AnalyzerSemanticOptionsSchema = zod.z.object({
543
- tailwindConfigPath: zod.z.string({
585
+ var AnalyzerSemanticOptionsSchema = import_zod.z.object({
586
+ tailwindConfigPath: import_zod.z.string({
544
587
  error: "analyzeWorkspace options.semantic.tailwindConfigPath must be a non-empty string when provided."
545
588
  }).min(
546
589
  1,
547
590
  "analyzeWorkspace options.semantic.tailwindConfigPath must be a non-empty string when provided."
548
591
  ).optional()
549
592
  });
550
- zod.z.object({
551
- scanner: zod.z.custom(
593
+ var AnalyzerOptionsSchema = import_zod.z.object({
594
+ scanner: import_zod.z.custom(
552
595
  (value) => isPlainObject(value),
553
596
  "analyzeWorkspace options.scanner must be an object when provided."
554
597
  ).optional(),
555
598
  classStats: AnalyzerClassStatsSchema.optional(),
556
- semantic: zod.z.union([
557
- zod.z.boolean({
599
+ semantic: import_zod.z.union([
600
+ import_zod.z.boolean({
558
601
  error: "analyzeWorkspace options.semantic must be a boolean or an object when provided."
559
602
  }),
560
603
  AnalyzerSemanticOptionsSchema
561
604
  ]).optional(),
562
- includeClass: zod.z.custom(
605
+ includeClass: import_zod.z.custom(
563
606
  (value) => typeof value === "function",
564
607
  "analyzeWorkspace options.includeClass must be a function when provided."
565
608
  ).optional()
566
609
  });
567
- var ClassToCssOptionsSchema = zod.z.object({
568
- prefix: zod.z.union([zod.z.string(), zod.z.null()], {
610
+ var ClassToCssOptionsSchema = import_zod.z.object({
611
+ prefix: import_zod.z.union([import_zod.z.string(), import_zod.z.null()], {
569
612
  error: "classToCss options.prefix must be a string or null when provided."
570
613
  }).optional(),
571
- strict: zod.z.boolean({
614
+ strict: import_zod.z.boolean({
572
615
  error: "classToCss options.strict must be a boolean when provided."
573
616
  }).optional()
574
617
  });
@@ -912,18 +955,19 @@ function injectAnimationCss(registry = defaultRegistry, options = {}) {
912
955
  styleEl.textContent = registry.extractCss();
913
956
  }
914
957
  var animations = createAnimationPresets(defaultRegistry);
915
-
916
- exports.AnimationRegistry = createAnimationRegistry;
917
- exports.animate = animate;
918
- exports.animations = animations;
919
- exports.compileAnimation = compileAnimation;
920
- exports.compileKeyframes = compileKeyframes;
921
- exports.createAnimationRegistry = createAnimationRegistry;
922
- exports.extractAnimationCss = extractAnimationCss;
923
- exports.getDefaultAnimationRegistry = getDefaultAnimationRegistry;
924
- exports.initAnimate = initAnimate2;
925
- exports.injectAnimationCss = injectAnimationCss;
926
- exports.keyframes = keyframes;
927
- exports.resetAnimationRegistry = resetAnimationRegistry;
928
- //# sourceMappingURL=animate.js.map
958
+ // Annotate the CommonJS export names for ESM import in node:
959
+ 0 && (module.exports = {
960
+ AnimationRegistry,
961
+ animate,
962
+ animations,
963
+ compileAnimation,
964
+ compileKeyframes,
965
+ createAnimationRegistry,
966
+ extractAnimationCss,
967
+ getDefaultAnimationRegistry,
968
+ initAnimate,
969
+ injectAnimationCss,
970
+ keyframes,
971
+ resetAnimationRegistry
972
+ });
929
973
  //# sourceMappingURL=animate.js.map