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.
- package/dist/analyzer.js +213 -161
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +121 -83
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.js +131 -87
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +31 -15
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +107 -67
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +47 -14
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +601 -428
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +504 -313
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.js +833 -508
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +298 -30
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +72 -41
- package/dist/dashboard.js.map +1 -1
- package/dist/dashboard.mjs +12 -6
- package/dist/dashboard.mjs.map +1 -1
- package/dist/devtools.js +335 -289
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +28 -11
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.js +719 -506
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +520 -318
- package/dist/engine.mjs.map +1 -1
- package/dist/index.d.mts +145 -319
- package/dist/index.d.ts +145 -319
- package/dist/index.js +1337 -7442
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1275 -7386
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +327 -242
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +272 -184
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.js +94 -49
- package/dist/plugin-api.js.map +1 -1
- package/dist/plugin-api.mjs +26 -6
- package/dist/plugin-api.mjs.map +1 -1
- package/dist/plugin-registry.js +68 -40
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin-registry.mjs +14 -10
- package/dist/plugin-registry.mjs.map +1 -1
- package/dist/plugin.js +102 -53
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +30 -6
- package/dist/plugin.mjs.map +1 -1
- package/dist/preset.js +48 -15
- package/dist/preset.js.map +1 -1
- package/dist/preset.mjs +13 -5
- package/dist/preset.mjs.map +1 -1
- package/dist/rspack.js +108 -53
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +50 -18
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +63 -24
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime-css.mjs +15 -7
- package/dist/runtime-css.mjs.map +1 -1
- package/dist/runtime.js +98 -44
- package/dist/runtime.js.map +1 -1
- package/dist/runtime.mjs +31 -8
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.js +164 -120
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +70 -40
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.d.mts +0 -12
- package/dist/shared.d.ts +0 -12
- package/dist/shared.js +481 -299
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +304 -133
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.js +40 -10
- package/dist/storybook-addon.js.map +1 -1
- package/dist/storybook-addon.mjs +8 -3
- package/dist/storybook-addon.mjs.map +1 -1
- package/dist/svelte.js +95 -64
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +37 -14
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +69 -37
- package/dist/syntax.js.map +1 -1
- package/dist/syntax.mjs +8 -7
- package/dist/syntax.mjs.map +1 -1
- package/dist/testing.js +56 -18
- package/dist/testing.js.map +1 -1
- package/dist/testing.mjs +16 -3
- package/dist/testing.mjs.map +1 -1
- package/dist/theme.js +133 -74
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +45 -14
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +156 -115
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +135 -82
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +584 -423
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +498 -311
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +599 -450
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +484 -332
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +102 -70
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +39 -15
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +112 -77
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +52 -18
- package/dist/webpackLoader.mjs.map +1 -1
- package/native/tailwind-styled-native.linux-x64-gnu.node +0 -0
- package/native/tailwind-styled-native.node +0 -0
- package/package.json +3 -1
package/dist/webpackLoader.js
CHANGED
|
@@ -1,45 +1,38 @@
|
|
|
1
|
-
|
|
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
|
-
var zod = require('zod');
|
|
9
|
-
|
|
10
|
-
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
11
|
-
function _interopNamespace(e) {
|
|
12
|
-
if (e && e.__esModule) return e;
|
|
13
|
-
var n = Object.create(null);
|
|
14
|
-
if (e) {
|
|
15
|
-
Object.keys(e).forEach(function (k) {
|
|
16
|
-
if (k !== 'default') {
|
|
17
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () { return e[k]; }
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
n.default = e;
|
|
26
|
-
return Object.freeze(n);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
|
|
30
|
-
var path__namespace = /*#__PURE__*/_interopNamespace(path);
|
|
31
|
-
|
|
1
|
+
const __importMetaUrl = typeof __filename !== "undefined" ? require("node:url").pathToFileURL(__filename).href : "file://unknown";
|
|
32
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;
|
|
33
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
}) : x)(function(x) {
|
|
37
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
38
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
39
|
-
});
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
40
10
|
var __esm = (fn, res) => function __init() {
|
|
41
11
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
42
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
|
|
43
36
|
function platformKey() {
|
|
44
37
|
if (isBrowser) return "browser";
|
|
45
38
|
return `${process.platform}-${process.arch}`;
|
|
@@ -55,7 +48,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
55
48
|
}
|
|
56
49
|
const envPath = process.env.TW_NATIVE_PATH?.trim();
|
|
57
50
|
if (envPath) {
|
|
58
|
-
if (
|
|
51
|
+
if (fs.existsSync(envPath)) {
|
|
59
52
|
return { path: envPath, source: "env", platform, tried };
|
|
60
53
|
}
|
|
61
54
|
tried.push(`env:${envPath} (not found)`);
|
|
@@ -64,7 +57,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
64
57
|
for (const pkg of prebuiltPkgs) {
|
|
65
58
|
try {
|
|
66
59
|
const candidate = _require.resolve(`${pkg}/tailwind_styled_parser.node`);
|
|
67
|
-
if (
|
|
60
|
+
if (fs.existsSync(candidate)) {
|
|
68
61
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
69
62
|
}
|
|
70
63
|
tried.push(`prebuilt:${pkg} (resolved but missing)`);
|
|
@@ -75,13 +68,13 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
75
68
|
const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
|
|
76
69
|
const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
77
70
|
if (runtimeDir) {
|
|
78
|
-
for (const depth of ["..",
|
|
79
|
-
const pkgRoot =
|
|
71
|
+
for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
|
|
72
|
+
const pkgRoot = path.resolve(runtimeDir, depth);
|
|
80
73
|
for (const bin of BINARY_NAMES_SELF) {
|
|
81
74
|
for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
|
|
82
|
-
const candidate =
|
|
75
|
+
const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
|
|
83
76
|
tried.push(`self-bundled:${candidate}`);
|
|
84
|
-
if (
|
|
77
|
+
if (fs.existsSync(candidate)) {
|
|
85
78
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
86
79
|
}
|
|
87
80
|
}
|
|
@@ -93,39 +86,45 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
93
86
|
const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
94
87
|
const localCandidates = [];
|
|
95
88
|
for (const bin of BINARY_NAMES) {
|
|
96
|
-
localCandidates.push(
|
|
97
|
-
localCandidates.push(
|
|
98
|
-
localCandidates.push(
|
|
99
|
-
localCandidates.push(
|
|
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`));
|
|
100
93
|
}
|
|
101
94
|
for (const startDir of [cwd, base]) {
|
|
102
95
|
let dir = startDir;
|
|
103
96
|
for (let i = 0; i < 6; i++) {
|
|
104
|
-
const nativeDir =
|
|
97
|
+
const nativeDir = path.resolve(dir, "native");
|
|
105
98
|
for (const bin of BINARY_NAMES) {
|
|
106
|
-
localCandidates.push(
|
|
107
|
-
localCandidates.push(
|
|
108
|
-
localCandidates.push(
|
|
109
|
-
localCandidates.push(
|
|
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`));
|
|
110
103
|
}
|
|
111
|
-
const parent =
|
|
104
|
+
const parent = path.resolve(dir, "..");
|
|
112
105
|
if (parent === dir) break;
|
|
113
106
|
dir = parent;
|
|
114
107
|
}
|
|
115
108
|
}
|
|
116
109
|
for (const candidate of localCandidates) {
|
|
117
110
|
tried.push(`local:${candidate}`);
|
|
118
|
-
if (
|
|
111
|
+
if (fs.existsSync(candidate)) {
|
|
119
112
|
return { path: candidate, source: "local", platform, tried };
|
|
120
113
|
}
|
|
121
114
|
}
|
|
122
115
|
return { path: null, source: "not-found", platform, tried };
|
|
123
116
|
}
|
|
124
|
-
var isBrowser, _require, PLATFORM_MAP;
|
|
117
|
+
var import_node_module, fs, path, isBrowser, _require, PLATFORM_MAP;
|
|
125
118
|
var init_native_resolution = __esm({
|
|
126
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"));
|
|
127
124
|
isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
|
|
128
|
-
_require =
|
|
125
|
+
_require = (0, import_node_module.createRequire)(
|
|
126
|
+
typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
|
|
127
|
+
);
|
|
129
128
|
PLATFORM_MAP = {
|
|
130
129
|
"linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
|
|
131
130
|
"linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
|
|
@@ -136,17 +135,29 @@ var init_native_resolution = __esm({
|
|
|
136
135
|
};
|
|
137
136
|
}
|
|
138
137
|
});
|
|
138
|
+
|
|
139
|
+
// packages/domain/shared/src/index.ts
|
|
139
140
|
function resolveRuntimeDir(dir, importMetaUrl) {
|
|
141
|
+
if (dir) return import_node_path.default.resolve(dir);
|
|
140
142
|
try {
|
|
141
|
-
return
|
|
143
|
+
return import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
142
144
|
} catch {
|
|
143
145
|
return process.cwd();
|
|
144
146
|
}
|
|
145
147
|
}
|
|
148
|
+
var import_node_crypto, import_node_fs, import_node_path, import_node_url, import_node_module2, _require2;
|
|
146
149
|
var init_src = __esm({
|
|
147
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");
|
|
148
157
|
init_native_resolution();
|
|
149
|
-
|
|
158
|
+
_require2 = (0, import_node_module2.createRequire)(
|
|
159
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : __importMetaUrl ?? "file://unknown"
|
|
160
|
+
);
|
|
150
161
|
}
|
|
151
162
|
});
|
|
152
163
|
|
|
@@ -154,8 +165,9 @@ var init_src = __esm({
|
|
|
154
165
|
var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge;
|
|
155
166
|
var init_nativeBridge = __esm({
|
|
156
167
|
"packages/domain/compiler/src/nativeBridge.ts"() {
|
|
168
|
+
"use strict";
|
|
157
169
|
init_src();
|
|
158
|
-
_loadNative = (path6) =>
|
|
170
|
+
_loadNative = (path6) => require(path6);
|
|
159
171
|
log = (...args) => {
|
|
160
172
|
if (process.env.DEBUG?.includes("compiler:native")) {
|
|
161
173
|
console.log("[compiler:native]", ...args);
|
|
@@ -181,7 +193,7 @@ var init_nativeBridge = __esm({
|
|
|
181
193
|
}
|
|
182
194
|
bridgeLoadAttempted = true;
|
|
183
195
|
try {
|
|
184
|
-
const runtimeDir = resolveRuntimeDir(void 0,
|
|
196
|
+
const runtimeDir = resolveRuntimeDir(void 0, __importMetaUrl);
|
|
185
197
|
const result = resolveNativeBinary(runtimeDir);
|
|
186
198
|
if (result.path && result.path.endsWith(".node")) {
|
|
187
199
|
try {
|
|
@@ -252,38 +264,46 @@ Tried paths: ${result.tried.join("\n")}`);
|
|
|
252
264
|
// packages/domain/compiler/src/compiler/index.ts
|
|
253
265
|
var init_compiler = __esm({
|
|
254
266
|
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
267
|
+
"use strict";
|
|
255
268
|
}
|
|
256
269
|
});
|
|
257
270
|
|
|
258
271
|
// packages/domain/compiler/src/parser/index.ts
|
|
259
272
|
var init_parser = __esm({
|
|
260
273
|
"packages/domain/compiler/src/parser/index.ts"() {
|
|
274
|
+
"use strict";
|
|
261
275
|
}
|
|
262
276
|
});
|
|
263
277
|
|
|
264
278
|
// packages/domain/compiler/src/analyzer/index.ts
|
|
265
279
|
var init_analyzer = __esm({
|
|
266
280
|
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
281
|
+
"use strict";
|
|
267
282
|
}
|
|
268
283
|
});
|
|
269
284
|
|
|
270
285
|
// packages/domain/compiler/src/cache/index.ts
|
|
271
286
|
var init_cache = __esm({
|
|
272
287
|
"packages/domain/compiler/src/cache/index.ts"() {
|
|
288
|
+
"use strict";
|
|
273
289
|
}
|
|
274
290
|
});
|
|
275
291
|
|
|
276
292
|
// packages/domain/compiler/src/redis/index.ts
|
|
277
293
|
var init_redis = __esm({
|
|
278
294
|
"packages/domain/compiler/src/redis/index.ts"() {
|
|
295
|
+
"use strict";
|
|
279
296
|
}
|
|
280
297
|
});
|
|
281
298
|
|
|
282
299
|
// packages/domain/compiler/src/watch/index.ts
|
|
283
300
|
var init_watch = __esm({
|
|
284
301
|
"packages/domain/compiler/src/watch/index.ts"() {
|
|
302
|
+
"use strict";
|
|
285
303
|
}
|
|
286
304
|
});
|
|
305
|
+
|
|
306
|
+
// packages/domain/compiler/src/index.ts
|
|
287
307
|
function _layoutClassesToCss(classes) {
|
|
288
308
|
const native = getNativeBridge();
|
|
289
309
|
if (!native?.layoutClassesToCss) {
|
|
@@ -318,9 +338,13 @@ function extractContainerCssFromSource(source) {
|
|
|
318
338
|
}
|
|
319
339
|
return rules.join("\n");
|
|
320
340
|
}
|
|
321
|
-
var transformSource, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, registerFileClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
|
|
341
|
+
var import_node_fs2, import_node_path2, import_node_module3, _require3, transformSource, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, registerFileClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
|
|
322
342
|
var init_src2 = __esm({
|
|
323
343
|
"packages/domain/compiler/src/index.ts"() {
|
|
344
|
+
"use strict";
|
|
345
|
+
import_node_fs2 = __toESM(require("fs"), 1);
|
|
346
|
+
import_node_path2 = __toESM(require("path"), 1);
|
|
347
|
+
import_node_module3 = require("module");
|
|
324
348
|
init_nativeBridge();
|
|
325
349
|
init_compiler();
|
|
326
350
|
init_parser();
|
|
@@ -328,7 +352,9 @@ var init_src2 = __esm({
|
|
|
328
352
|
init_cache();
|
|
329
353
|
init_redis();
|
|
330
354
|
init_watch();
|
|
331
|
-
|
|
355
|
+
_require3 = (0, import_node_module3.createRequire)(
|
|
356
|
+
typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
|
|
357
|
+
);
|
|
332
358
|
transformSource = (source, opts) => {
|
|
333
359
|
const native = getNativeBridge();
|
|
334
360
|
if (!native?.transformSource) {
|
|
@@ -426,6 +452,7 @@ var init_src2 = __esm({
|
|
|
426
452
|
// packages/domain/compiler/src/internal.ts
|
|
427
453
|
var init_internal = __esm({
|
|
428
454
|
"packages/domain/compiler/src/internal.ts"() {
|
|
455
|
+
"use strict";
|
|
429
456
|
init_src2();
|
|
430
457
|
init_compiler();
|
|
431
458
|
init_parser();
|
|
@@ -437,7 +464,18 @@ var init_internal = __esm({
|
|
|
437
464
|
});
|
|
438
465
|
|
|
439
466
|
// packages/presentation/next/src/webpackLoader.ts
|
|
467
|
+
var webpackLoader_exports = {};
|
|
468
|
+
__export(webpackLoader_exports, {
|
|
469
|
+
default: () => webpackLoader
|
|
470
|
+
});
|
|
471
|
+
module.exports = __toCommonJS(webpackLoader_exports);
|
|
440
472
|
init_internal();
|
|
473
|
+
var import_node_path4 = __toESM(require("path"), 1);
|
|
474
|
+
var import_zod = require("zod");
|
|
475
|
+
|
|
476
|
+
// packages/presentation/next/src/staticCssWebpackPlugin.ts
|
|
477
|
+
var import_node_fs3 = __toESM(require("fs"), 1);
|
|
478
|
+
var import_node_path3 = __toESM(require("path"), 1);
|
|
441
479
|
var _fileStaticCssMap = /* @__PURE__ */ new Map();
|
|
442
480
|
function setFileStaticCss(filepath, css) {
|
|
443
481
|
if (css && css.trim()) {
|
|
@@ -448,18 +486,18 @@ function setFileStaticCss(filepath, css) {
|
|
|
448
486
|
}
|
|
449
487
|
|
|
450
488
|
// packages/presentation/next/src/webpackLoader.ts
|
|
451
|
-
var WebpackLoaderOptionsSchema =
|
|
452
|
-
mode:
|
|
453
|
-
autoClientBoundary:
|
|
454
|
-
addDataAttr:
|
|
455
|
-
hoist:
|
|
456
|
-
routeCss:
|
|
457
|
-
incremental:
|
|
458
|
-
verbose:
|
|
459
|
-
preserveImports:
|
|
460
|
-
safelistPath:
|
|
489
|
+
var WebpackLoaderOptionsSchema = import_zod.z.object({
|
|
490
|
+
mode: import_zod.z.literal("zero-runtime").optional(),
|
|
491
|
+
autoClientBoundary: import_zod.z.boolean().optional(),
|
|
492
|
+
addDataAttr: import_zod.z.boolean().optional(),
|
|
493
|
+
hoist: import_zod.z.boolean().optional(),
|
|
494
|
+
routeCss: import_zod.z.boolean().optional(),
|
|
495
|
+
incremental: import_zod.z.boolean().optional(),
|
|
496
|
+
verbose: import_zod.z.boolean().optional(),
|
|
497
|
+
preserveImports: import_zod.z.boolean().optional(),
|
|
498
|
+
safelistPath: import_zod.z.string().optional()
|
|
461
499
|
});
|
|
462
|
-
var isNextBuildArtifact = (filepath) => filepath.includes(`${
|
|
500
|
+
var isNextBuildArtifact = (filepath) => filepath.includes(`${import_node_path4.default.sep}.next${import_node_path4.default.sep}`);
|
|
463
501
|
function webpackLoader(source) {
|
|
464
502
|
const callback = this.async?.();
|
|
465
503
|
if (!callback) {
|
|
@@ -500,7 +538,7 @@ function webpackLoader(source) {
|
|
|
500
538
|
const rsc = output.rsc;
|
|
501
539
|
const engine = output.engine ?? "js";
|
|
502
540
|
const env = rsc?.isServer ? "server" : "client";
|
|
503
|
-
const name =
|
|
541
|
+
const name = import_node_path4.default.basename(filepath);
|
|
504
542
|
process.stdout.write(
|
|
505
543
|
`[tailwind-styled/webpack] ${name} -> ${output.classes.length} classes (${env}) [${engine}]
|
|
506
544
|
`
|
|
@@ -519,7 +557,4 @@ function webpackLoader(source) {
|
|
|
519
557
|
callback(null, source);
|
|
520
558
|
}
|
|
521
559
|
}
|
|
522
|
-
|
|
523
|
-
module.exports = webpackLoader;
|
|
524
|
-
//# sourceMappingURL=webpackLoader.js.map
|
|
525
560
|
//# sourceMappingURL=webpackLoader.js.map
|