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.
- package/dist/analyzer.js +38 -13
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +104 -72
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.js +33 -7
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +55 -22
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +39 -10
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +56 -23
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +151 -39
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +321 -203
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.js +57 -16
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +71 -28
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +0 -1
- package/dist/dashboard.js.map +1 -1
- package/dist/devtools.js +16 -2
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +21 -2
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.js +140 -56
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +238 -148
- package/dist/engine.mjs.map +1 -1
- package/dist/index.js +50 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +74 -29
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +97 -41
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +177 -115
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.js +0 -1
- package/dist/plugin-api.js.map +1 -1
- package/dist/plugin-registry.js +5 -2
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin-registry.mjs +9 -2
- package/dist/plugin-registry.mjs.map +1 -1
- package/dist/plugin.js +0 -1
- package/dist/plugin.js.map +1 -1
- package/dist/preset.js +0 -1
- package/dist/preset.js.map +1 -1
- package/dist/rspack.js +22 -8
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +39 -18
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +0 -1
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime.js +0 -1
- package/dist/runtime.js.map +1 -1
- package/dist/scanner.js +25 -9
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +84 -61
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.js +91 -37
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +122 -64
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.js +0 -1
- package/dist/storybook-addon.js.map +1 -1
- package/dist/svelte.js +40 -9
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +57 -28
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +6 -3
- package/dist/syntax.js.map +1 -1
- package/dist/syntax.mjs +30 -23
- package/dist/syntax.mjs.map +1 -1
- package/dist/testing.js +0 -1
- package/dist/testing.js.map +1 -1
- package/dist/theme.js +21 -4
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +41 -17
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +58 -16
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +89 -45
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +153 -39
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +321 -203
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +131 -54
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +226 -143
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +40 -9
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +57 -28
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +40 -10
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +59 -27
- package/dist/webpackLoader.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10,10 +10,31 @@ var __esm = (fn, res) => function __init() {
|
|
|
10
10
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
// node_modules/tsup/assets/esm_shims.js
|
|
14
|
+
import path from "path";
|
|
15
|
+
import { fileURLToPath } from "url";
|
|
16
|
+
var getFilename, __filename;
|
|
17
|
+
var init_esm_shims = __esm({
|
|
18
|
+
"node_modules/tsup/assets/esm_shims.js"() {
|
|
19
|
+
"use strict";
|
|
20
|
+
getFilename = () => fileURLToPath(import.meta.url);
|
|
21
|
+
__filename = /* @__PURE__ */ getFilename();
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
13
25
|
// packages/domain/shared/src/native-resolution.ts
|
|
14
26
|
import { createRequire } from "module";
|
|
15
27
|
import * as fs from "fs";
|
|
16
|
-
import * as
|
|
28
|
+
import * as path2 from "path";
|
|
29
|
+
function _safeCreateRequire() {
|
|
30
|
+
if (typeof import.meta !== "undefined" && import.meta.url && !import.meta.url.includes("unknown")) {
|
|
31
|
+
return createRequire(import.meta.url);
|
|
32
|
+
}
|
|
33
|
+
if (typeof __filename !== "undefined") {
|
|
34
|
+
return createRequire(__filename);
|
|
35
|
+
}
|
|
36
|
+
return createRequire(new URL(`file://${process.cwd()}/`).href);
|
|
37
|
+
}
|
|
17
38
|
function platformKey() {
|
|
18
39
|
if (isBrowser) return "browser";
|
|
19
40
|
return `${process.platform}-${process.arch}`;
|
|
@@ -49,11 +70,11 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
49
70
|
const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
|
|
50
71
|
const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
51
72
|
if (runtimeDir) {
|
|
52
|
-
for (const depth of ["..",
|
|
53
|
-
const pkgRoot =
|
|
73
|
+
for (const depth of ["..", path2.join("..", ".."), path2.join("..", "..", "..")]) {
|
|
74
|
+
const pkgRoot = path2.resolve(runtimeDir, depth);
|
|
54
75
|
for (const bin of BINARY_NAMES_SELF) {
|
|
55
76
|
for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
|
|
56
|
-
const candidate =
|
|
77
|
+
const candidate = path2.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
|
|
57
78
|
tried.push(`self-bundled:${candidate}`);
|
|
58
79
|
if (fs.existsSync(candidate)) {
|
|
59
80
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
@@ -67,22 +88,22 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
67
88
|
const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
68
89
|
const localCandidates = [];
|
|
69
90
|
for (const bin of BINARY_NAMES) {
|
|
70
|
-
localCandidates.push(
|
|
71
|
-
localCandidates.push(
|
|
72
|
-
localCandidates.push(
|
|
73
|
-
localCandidates.push(
|
|
91
|
+
localCandidates.push(path2.resolve(base, `${bin}.node`));
|
|
92
|
+
localCandidates.push(path2.resolve(base, "..", `${bin}.node`));
|
|
93
|
+
localCandidates.push(path2.resolve(base, `${bin}.${platform}.node`));
|
|
94
|
+
localCandidates.push(path2.resolve(base, `${bin}.${napiPlatform}.node`));
|
|
74
95
|
}
|
|
75
96
|
for (const startDir of [cwd, base]) {
|
|
76
97
|
let dir = startDir;
|
|
77
98
|
for (let i = 0; i < 6; i++) {
|
|
78
|
-
const nativeDir =
|
|
99
|
+
const nativeDir = path2.resolve(dir, "native");
|
|
79
100
|
for (const bin of BINARY_NAMES) {
|
|
80
|
-
localCandidates.push(
|
|
81
|
-
localCandidates.push(
|
|
82
|
-
localCandidates.push(
|
|
83
|
-
localCandidates.push(
|
|
101
|
+
localCandidates.push(path2.resolve(nativeDir, `${bin}.node`));
|
|
102
|
+
localCandidates.push(path2.resolve(nativeDir, `${bin}.${platform}.node`));
|
|
103
|
+
localCandidates.push(path2.resolve(nativeDir, `${bin}.${napiPlatform}.node`));
|
|
104
|
+
localCandidates.push(path2.resolve(nativeDir, "target", "release", `${bin}.node`));
|
|
84
105
|
}
|
|
85
|
-
const parent =
|
|
106
|
+
const parent = path2.resolve(dir, "..");
|
|
86
107
|
if (parent === dir) break;
|
|
87
108
|
dir = parent;
|
|
88
109
|
}
|
|
@@ -99,10 +120,9 @@ var isBrowser, _require, PLATFORM_MAP;
|
|
|
99
120
|
var init_native_resolution = __esm({
|
|
100
121
|
"packages/domain/shared/src/native-resolution.ts"() {
|
|
101
122
|
"use strict";
|
|
123
|
+
init_esm_shims();
|
|
102
124
|
isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
|
|
103
|
-
_require =
|
|
104
|
-
typeof __require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : import.meta.url
|
|
105
|
-
);
|
|
125
|
+
_require = _safeCreateRequire();
|
|
106
126
|
PLATFORM_MAP = {
|
|
107
127
|
"linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
|
|
108
128
|
"linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
|
|
@@ -117,13 +137,14 @@ var init_native_resolution = __esm({
|
|
|
117
137
|
// packages/domain/shared/src/index.ts
|
|
118
138
|
import { createHash } from "crypto";
|
|
119
139
|
import fs2 from "fs";
|
|
120
|
-
import
|
|
121
|
-
import { fileURLToPath } from "url";
|
|
140
|
+
import path3 from "path";
|
|
141
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
122
142
|
import { createRequire as createRequire2 } from "module";
|
|
123
143
|
var _require2;
|
|
124
144
|
var init_src = __esm({
|
|
125
145
|
"packages/domain/shared/src/index.ts"() {
|
|
126
146
|
"use strict";
|
|
147
|
+
init_esm_shims();
|
|
127
148
|
init_native_resolution();
|
|
128
149
|
_require2 = createRequire2(
|
|
129
150
|
typeof __filename !== "undefined" ? `file://${__filename}` : import.meta.url ?? "file://unknown"
|
|
@@ -131,23 +152,32 @@ var init_src = __esm({
|
|
|
131
152
|
}
|
|
132
153
|
});
|
|
133
154
|
|
|
155
|
+
// src/umbrella/index.ts
|
|
156
|
+
init_esm_shims();
|
|
157
|
+
|
|
134
158
|
// packages/domain/core/src/twProxy.ts
|
|
159
|
+
init_esm_shims();
|
|
135
160
|
import React2 from "react";
|
|
136
161
|
|
|
137
162
|
// packages/domain/core/src/createComponent.ts
|
|
163
|
+
init_esm_shims();
|
|
138
164
|
import React from "react";
|
|
139
165
|
|
|
166
|
+
// packages/domain/core/src/containerQuery.ts
|
|
167
|
+
init_esm_shims();
|
|
168
|
+
|
|
140
169
|
// packages/domain/core/src/native.ts
|
|
170
|
+
init_esm_shims();
|
|
141
171
|
init_src();
|
|
142
172
|
import { createRequire as createRequire3 } from "module";
|
|
143
173
|
import { dirname } from "path";
|
|
144
|
-
import { fileURLToPath as
|
|
174
|
+
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
145
175
|
var isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
|
|
146
176
|
var NATIVE_UNAVAILABLE_MESSAGE = "[tailwind-styled/core] Native binding is required but not available.\nPlease ensure you have run: npm run build:rust";
|
|
147
177
|
var _nodeRequire = createRequire3(
|
|
148
178
|
typeof __filename !== "undefined" ? `file://${__filename}` : typeof import.meta !== "undefined" && import.meta.url ? import.meta.url : "file://unknown"
|
|
149
179
|
);
|
|
150
|
-
var _loadNative = (
|
|
180
|
+
var _loadNative = (path4) => _nodeRequire(path4);
|
|
151
181
|
var nativeBinding = null;
|
|
152
182
|
var bindingLoadAttempted = false;
|
|
153
183
|
var getBinding = () => {
|
|
@@ -161,7 +191,7 @@ var getBinding = () => {
|
|
|
161
191
|
bindingLoadAttempted = true;
|
|
162
192
|
try {
|
|
163
193
|
const runtimeDir = isBrowser2 ? "" : dirname(
|
|
164
|
-
typeof __filename !== "undefined" ? __filename : typeof import.meta !== "undefined" && import.meta.url ?
|
|
194
|
+
typeof __filename !== "undefined" ? __filename : typeof import.meta !== "undefined" && import.meta.url ? fileURLToPath3(import.meta.url) : process.cwd()
|
|
165
195
|
);
|
|
166
196
|
const result = isBrowser2 ? { path: null, source: "not-found", platform: "browser", tried: [] } : resolveNativeBinary(runtimeDir);
|
|
167
197
|
if (result.path && result.path.endsWith(".node")) {
|
|
@@ -301,6 +331,7 @@ function getContainerRegistry() {
|
|
|
301
331
|
}
|
|
302
332
|
|
|
303
333
|
// packages/domain/core/src/merge.ts
|
|
334
|
+
init_esm_shims();
|
|
304
335
|
function createTwMerge(_options = {}) {
|
|
305
336
|
return function twMerge2(...classLists) {
|
|
306
337
|
const inputs = [];
|
|
@@ -327,6 +358,7 @@ function mergeWithRules(rules, ...classLists) {
|
|
|
327
358
|
}
|
|
328
359
|
|
|
329
360
|
// packages/domain/core/src/stateEngine.ts
|
|
361
|
+
init_esm_shims();
|
|
330
362
|
var stateRegistry = /* @__PURE__ */ new Map();
|
|
331
363
|
if (typeof window !== "undefined") {
|
|
332
364
|
window.__TW_STATE_REGISTRY__ = stateRegistry;
|
|
@@ -981,6 +1013,7 @@ var tw = Object.assign(twCallable, tagFactories, {
|
|
|
981
1013
|
});
|
|
982
1014
|
|
|
983
1015
|
// packages/domain/core/src/cv.ts
|
|
1016
|
+
init_esm_shims();
|
|
984
1017
|
var __generatedRegistry = {};
|
|
985
1018
|
function registerVariantTable(componentId, table) {
|
|
986
1019
|
__generatedRegistry[componentId] = table;
|
|
@@ -1116,6 +1149,7 @@ function cv(config, componentId) {
|
|
|
1116
1149
|
}
|
|
1117
1150
|
|
|
1118
1151
|
// packages/domain/core/src/cx.ts
|
|
1152
|
+
init_esm_shims();
|
|
1119
1153
|
function cn(...inputs) {
|
|
1120
1154
|
const strings = [];
|
|
1121
1155
|
for (const item of inputs) {
|
|
@@ -1146,6 +1180,7 @@ function cx(...inputs) {
|
|
|
1146
1180
|
var cxm = cx;
|
|
1147
1181
|
|
|
1148
1182
|
// packages/domain/core/src/styledSystem.ts
|
|
1183
|
+
init_esm_shims();
|
|
1149
1184
|
function tokenVarName(prefix, group, name) {
|
|
1150
1185
|
return `--${prefix}-${group}-${name}`;
|
|
1151
1186
|
}
|
|
@@ -1154,8 +1189,8 @@ function tokenVarRef(prefix, group, name) {
|
|
|
1154
1189
|
}
|
|
1155
1190
|
function resolveTokenRef(tokens, prefix, value) {
|
|
1156
1191
|
if (value.startsWith("token:")) {
|
|
1157
|
-
const
|
|
1158
|
-
const [group, name] =
|
|
1192
|
+
const path4 = value.slice(6);
|
|
1193
|
+
const [group, name] = path4.split(".");
|
|
1159
1194
|
if (group && name && tokens[group]?.[name] !== void 0) {
|
|
1160
1195
|
return tokenVarRef(prefix, group, name);
|
|
1161
1196
|
}
|
|
@@ -1254,13 +1289,13 @@ function createStyledSystem(config) {
|
|
|
1254
1289
|
return createComponent(runtimeTag, merged);
|
|
1255
1290
|
};
|
|
1256
1291
|
}
|
|
1257
|
-
function token(
|
|
1258
|
-
const [group, name] =
|
|
1259
|
-
if (!group || !name) return
|
|
1292
|
+
function token(path4) {
|
|
1293
|
+
const [group, name] = path4.split(".");
|
|
1294
|
+
if (!group || !name) return path4;
|
|
1260
1295
|
return tokenVarRef(prefix, group, name);
|
|
1261
1296
|
}
|
|
1262
|
-
function rawToken(
|
|
1263
|
-
const [group, name] =
|
|
1297
|
+
function rawToken(path4) {
|
|
1298
|
+
const [group, name] = path4.split(".");
|
|
1264
1299
|
if (!group || !name) return void 0;
|
|
1265
1300
|
return tokens[group]?.[name];
|
|
1266
1301
|
}
|
|
@@ -1295,6 +1330,7 @@ function createStyledSystem(config) {
|
|
|
1295
1330
|
}
|
|
1296
1331
|
|
|
1297
1332
|
// packages/domain/core/src/styled.ts
|
|
1333
|
+
init_esm_shims();
|
|
1298
1334
|
function resolveVariantClass(options, props) {
|
|
1299
1335
|
const out = [];
|
|
1300
1336
|
const variants = options.variants ?? {};
|
|
@@ -1326,6 +1362,7 @@ function styled(options) {
|
|
|
1326
1362
|
}
|
|
1327
1363
|
|
|
1328
1364
|
// packages/domain/core/src/twTheme.ts
|
|
1365
|
+
init_esm_shims();
|
|
1329
1366
|
function cssVar(varName, fallback) {
|
|
1330
1367
|
const name = varName.startsWith("--") ? varName : `--${varName}`;
|
|
1331
1368
|
return fallback ? `var(${name}, ${fallback})` : `var(${name})`;
|
|
@@ -1390,7 +1427,14 @@ var v4Tokens = {
|
|
|
1390
1427
|
fontMono: twVar("font", "font-mono")
|
|
1391
1428
|
};
|
|
1392
1429
|
|
|
1430
|
+
// packages/domain/core/src/liveTokenEngine.ts
|
|
1431
|
+
init_esm_shims();
|
|
1432
|
+
|
|
1433
|
+
// packages/domain/theme/src/liveTokens.ts
|
|
1434
|
+
init_esm_shims();
|
|
1435
|
+
|
|
1393
1436
|
// packages/domain/theme/src/liveTokenEngine.ts
|
|
1437
|
+
init_esm_shims();
|
|
1394
1438
|
import React3 from "react";
|
|
1395
1439
|
var TOKEN_ENGINE_KEY = "__TW_TOKEN_ENGINE__";
|
|
1396
1440
|
function tokenVar(name) {
|
|
@@ -1561,6 +1605,7 @@ if (typeof window !== "undefined") {
|
|
|
1561
1605
|
}
|
|
1562
1606
|
|
|
1563
1607
|
// packages/domain/core/src/registry.ts
|
|
1608
|
+
init_esm_shims();
|
|
1564
1609
|
import React4 from "react";
|
|
1565
1610
|
var subComponentRegistry = /* @__PURE__ */ new Map();
|
|
1566
1611
|
function registerSubComponent(entry) {
|