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.
- package/dist/analyzer.js +213 -161
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +118 -82
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.js +131 -87
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +28 -14
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +105 -68
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +40 -13
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +577 -426
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +466 -304
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.js +826 -508
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +287 -29
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +71 -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 +333 -289
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +26 -11
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.js +679 -502
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +467 -307
- 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 +1329 -7441
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1266 -7385
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +318 -243
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +256 -181
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.js +93 -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 +67 -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 +101 -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 +47 -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 +82 -50
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +20 -12
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +62 -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 +97 -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 +163 -120
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +67 -39
- package/dist/scanner.mjs.map +1 -1
- package/dist/shared.js +441 -295
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +253 -122
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.js +39 -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 +88 -64
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +28 -13
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +68 -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 +55 -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 +131 -74
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +42 -13
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +150 -116
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +124 -81
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +560 -421
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +460 -302
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +561 -446
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +433 -321
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +95 -70
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +30 -14
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +110 -78
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +45 -17
- package/dist/webpackLoader.mjs.map +1 -1
- package/package.json +3 -1
package/dist/turbopackLoader.js
CHANGED
|
@@ -1,44 +1,11 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var module$1 = require('module');
|
|
4
|
-
var fs4 = require('fs');
|
|
5
|
-
var path4 = 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 fs4__namespace = /*#__PURE__*/_interopNamespace(fs4);
|
|
29
|
-
var path4__namespace = /*#__PURE__*/_interopNamespace(path4);
|
|
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;
|
|
32
4
|
var __defProp = Object.defineProperty;
|
|
33
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
34
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
35
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
36
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
37
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
38
|
-
}) : x)(function(x) {
|
|
39
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
40
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
41
|
-
});
|
|
42
9
|
var __esm = (fn, res) => function __init() {
|
|
43
10
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
44
11
|
};
|
|
@@ -54,7 +21,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
54
21
|
}
|
|
55
22
|
return to;
|
|
56
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
|
+
));
|
|
57
32
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
33
|
+
|
|
34
|
+
// packages/domain/shared/src/native-resolution.ts
|
|
58
35
|
function platformKey() {
|
|
59
36
|
if (isBrowser) return "browser";
|
|
60
37
|
return `${process.platform}-${process.arch}`;
|
|
@@ -70,7 +47,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
70
47
|
}
|
|
71
48
|
const envPath = process.env.TW_NATIVE_PATH?.trim();
|
|
72
49
|
if (envPath) {
|
|
73
|
-
if (
|
|
50
|
+
if (fs.existsSync(envPath)) {
|
|
74
51
|
return { path: envPath, source: "env", platform, tried };
|
|
75
52
|
}
|
|
76
53
|
tried.push(`env:${envPath} (not found)`);
|
|
@@ -79,7 +56,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
79
56
|
for (const pkg of prebuiltPkgs) {
|
|
80
57
|
try {
|
|
81
58
|
const candidate = _require.resolve(`${pkg}/tailwind_styled_parser.node`);
|
|
82
|
-
if (
|
|
59
|
+
if (fs.existsSync(candidate)) {
|
|
83
60
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
84
61
|
}
|
|
85
62
|
tried.push(`prebuilt:${pkg} (resolved but missing)`);
|
|
@@ -90,13 +67,13 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
90
67
|
const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
|
|
91
68
|
const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
92
69
|
if (runtimeDir) {
|
|
93
|
-
for (const depth of ["..",
|
|
94
|
-
const pkgRoot =
|
|
70
|
+
for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
|
|
71
|
+
const pkgRoot = path.resolve(runtimeDir, depth);
|
|
95
72
|
for (const bin of BINARY_NAMES_SELF) {
|
|
96
73
|
for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
|
|
97
|
-
const candidate =
|
|
74
|
+
const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
|
|
98
75
|
tried.push(`self-bundled:${candidate}`);
|
|
99
|
-
if (
|
|
76
|
+
if (fs.existsSync(candidate)) {
|
|
100
77
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
101
78
|
}
|
|
102
79
|
}
|
|
@@ -108,39 +85,44 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
108
85
|
const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
109
86
|
const localCandidates = [];
|
|
110
87
|
for (const bin of BINARY_NAMES) {
|
|
111
|
-
localCandidates.push(
|
|
112
|
-
localCandidates.push(
|
|
113
|
-
localCandidates.push(
|
|
114
|
-
localCandidates.push(
|
|
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`));
|
|
115
92
|
}
|
|
116
93
|
for (const startDir of [cwd, base]) {
|
|
117
94
|
let dir = startDir;
|
|
118
95
|
for (let i = 0; i < 6; i++) {
|
|
119
|
-
const nativeDir =
|
|
96
|
+
const nativeDir = path.resolve(dir, "native");
|
|
120
97
|
for (const bin of BINARY_NAMES) {
|
|
121
|
-
localCandidates.push(
|
|
122
|
-
localCandidates.push(
|
|
123
|
-
localCandidates.push(
|
|
124
|
-
localCandidates.push(
|
|
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`));
|
|
125
102
|
}
|
|
126
|
-
const parent =
|
|
103
|
+
const parent = path.resolve(dir, "..");
|
|
127
104
|
if (parent === dir) break;
|
|
128
105
|
dir = parent;
|
|
129
106
|
}
|
|
130
107
|
}
|
|
131
108
|
for (const candidate of localCandidates) {
|
|
132
109
|
tried.push(`local:${candidate}`);
|
|
133
|
-
if (
|
|
110
|
+
if (fs.existsSync(candidate)) {
|
|
134
111
|
return { path: candidate, source: "local", platform, tried };
|
|
135
112
|
}
|
|
136
113
|
}
|
|
137
114
|
return { path: null, source: "not-found", platform, tried };
|
|
138
115
|
}
|
|
139
|
-
var isBrowser, _require, PLATFORM_MAP;
|
|
116
|
+
var import_node_module, fs, path, import_meta, isBrowser, _require, PLATFORM_MAP;
|
|
140
117
|
var init_native_resolution = __esm({
|
|
141
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 = {};
|
|
142
124
|
isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
|
|
143
|
-
_require = typeof
|
|
125
|
+
_require = typeof require !== "undefined" ? require : (0, import_node_module.createRequire)(import_meta.url);
|
|
144
126
|
PLATFORM_MAP = {
|
|
145
127
|
"linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
|
|
146
128
|
"linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
|
|
@@ -151,26 +133,39 @@ var init_native_resolution = __esm({
|
|
|
151
133
|
};
|
|
152
134
|
}
|
|
153
135
|
});
|
|
136
|
+
|
|
137
|
+
// packages/domain/shared/src/index.ts
|
|
154
138
|
function resolveRuntimeDir(dir, importMetaUrl) {
|
|
139
|
+
if (dir) return import_node_path.default.resolve(dir);
|
|
155
140
|
try {
|
|
156
|
-
return
|
|
141
|
+
return import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
157
142
|
} catch {
|
|
158
143
|
return process.cwd();
|
|
159
144
|
}
|
|
160
145
|
}
|
|
146
|
+
var import_node_crypto, import_node_fs, import_node_path, import_node_url, import_node_module2, import_meta2, _require2;
|
|
161
147
|
var init_src = __esm({
|
|
162
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");
|
|
163
155
|
init_native_resolution();
|
|
164
|
-
|
|
156
|
+
import_meta2 = {};
|
|
157
|
+
_require2 = (0, import_node_module2.createRequire)(import_meta2.url);
|
|
165
158
|
}
|
|
166
159
|
});
|
|
167
160
|
|
|
168
161
|
// packages/domain/compiler/src/nativeBridge.ts
|
|
169
|
-
var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, adaptNativeResult;
|
|
162
|
+
var import_meta3, _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, adaptNativeResult;
|
|
170
163
|
var init_nativeBridge = __esm({
|
|
171
164
|
"packages/domain/compiler/src/nativeBridge.ts"() {
|
|
165
|
+
"use strict";
|
|
172
166
|
init_src();
|
|
173
|
-
|
|
167
|
+
import_meta3 = {};
|
|
168
|
+
_loadNative = (path5) => require(path5);
|
|
174
169
|
log = (...args) => {
|
|
175
170
|
if (process.env.DEBUG?.includes("compiler:native")) {
|
|
176
171
|
console.log("[compiler:native]", ...args);
|
|
@@ -196,7 +191,7 @@ var init_nativeBridge = __esm({
|
|
|
196
191
|
}
|
|
197
192
|
bridgeLoadAttempted = true;
|
|
198
193
|
try {
|
|
199
|
-
const runtimeDir = resolveRuntimeDir(void 0,
|
|
194
|
+
const runtimeDir = resolveRuntimeDir(void 0, import_meta3.url);
|
|
200
195
|
const result = resolveNativeBinary(runtimeDir);
|
|
201
196
|
if (result.path && result.path.endsWith(".node")) {
|
|
202
197
|
try {
|
|
@@ -308,6 +303,7 @@ function resetCacheStats() {
|
|
|
308
303
|
}
|
|
309
304
|
var init_cssGeneratorNative = __esm({
|
|
310
305
|
"packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
|
|
306
|
+
"use strict";
|
|
311
307
|
init_nativeBridge();
|
|
312
308
|
}
|
|
313
309
|
});
|
|
@@ -380,6 +376,7 @@ function atomicRegistrySize() {
|
|
|
380
376
|
}
|
|
381
377
|
var init_compilationNative = __esm({
|
|
382
378
|
"packages/domain/compiler/src/compiler/compilationNative.ts"() {
|
|
379
|
+
"use strict";
|
|
383
380
|
init_nativeBridge();
|
|
384
381
|
}
|
|
385
382
|
});
|
|
@@ -523,6 +520,7 @@ function twMergeRaw(classLists) {
|
|
|
523
520
|
}
|
|
524
521
|
var init_cssCompilationNative = __esm({
|
|
525
522
|
"packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
|
|
523
|
+
"use strict";
|
|
526
524
|
init_nativeBridge();
|
|
527
525
|
}
|
|
528
526
|
});
|
|
@@ -622,6 +620,7 @@ function idRegistryImport(importedData) {
|
|
|
622
620
|
}
|
|
623
621
|
var init_idRegistryNative = __esm({
|
|
624
622
|
"packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
|
|
623
|
+
"use strict";
|
|
625
624
|
init_nativeBridge();
|
|
626
625
|
}
|
|
627
626
|
});
|
|
@@ -763,9 +762,12 @@ function scanFilesBatchNative(filesJson) {
|
|
|
763
762
|
}
|
|
764
763
|
var init_streamingNative = __esm({
|
|
765
764
|
"packages/domain/compiler/src/compiler/streamingNative.ts"() {
|
|
765
|
+
"use strict";
|
|
766
766
|
init_nativeBridge();
|
|
767
767
|
}
|
|
768
768
|
});
|
|
769
|
+
|
|
770
|
+
// packages/domain/compiler/src/tailwindEngine.ts
|
|
769
771
|
function loadTailwindEngine() {
|
|
770
772
|
if (_twEngine) return _twEngine;
|
|
771
773
|
if (_twEngineError) throw _twEngineError;
|
|
@@ -785,10 +787,10 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
785
787
|
if (classes.length === 0) return "";
|
|
786
788
|
const tw = loadTailwindEngine();
|
|
787
789
|
const input = cssEntryContent ?? "@import 'tailwindcss';";
|
|
788
|
-
const { readFileSync, existsSync: existsSync2 } = await import(
|
|
789
|
-
const { dirname, resolve: resolve2 } = await import(
|
|
790
|
+
const { readFileSync, existsSync: existsSync2 } = await import("fs");
|
|
791
|
+
const { dirname, resolve: resolve2 } = await import("path");
|
|
790
792
|
const projectRoot = root ?? process.cwd();
|
|
791
|
-
const req =
|
|
793
|
+
const req = (0, import_node_module3.createRequire)(resolve2(projectRoot, "package.json"));
|
|
792
794
|
const loadStylesheet = async (id, base) => {
|
|
793
795
|
try {
|
|
794
796
|
const cssId = id === "tailwindcss" ? "tailwindcss/index.css" : id === "tailwindcss/preflight" ? "tailwindcss/preflight.css" : id === "tailwindcss/utilities" ? "tailwindcss/utilities.css" : id === "tailwindcss/theme" ? "tailwindcss/theme.css" : id;
|
|
@@ -808,10 +810,14 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
808
810
|
const compiler = await Promise.resolve(tw.compile(input, { loadStylesheet }));
|
|
809
811
|
return compiler.build(classes);
|
|
810
812
|
}
|
|
811
|
-
var require2, _twEngine, _twEngineError;
|
|
813
|
+
var import_node_module3, import_meta4, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
|
|
812
814
|
var init_tailwindEngine = __esm({
|
|
813
815
|
"packages/domain/compiler/src/tailwindEngine.ts"() {
|
|
814
|
-
|
|
816
|
+
"use strict";
|
|
817
|
+
import_node_module3 = require("module");
|
|
818
|
+
import_meta4 = {};
|
|
819
|
+
require2 = (0, import_node_module3.createRequire)(import_meta4.url);
|
|
820
|
+
MAX_CACHE_MEMORY = 256 * 1024;
|
|
815
821
|
_twEngine = null;
|
|
816
822
|
_twEngineError = null;
|
|
817
823
|
}
|
|
@@ -992,24 +998,29 @@ function processTailwindCssWithTargets(css, targets) {
|
|
|
992
998
|
}
|
|
993
999
|
return result.css;
|
|
994
1000
|
}
|
|
995
|
-
var _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE;
|
|
1001
|
+
var import_node_module4, import_meta5, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
|
|
996
1002
|
var init_tailwindEngine2 = __esm({
|
|
997
1003
|
"packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
|
|
1004
|
+
"use strict";
|
|
1005
|
+
import_node_module4 = require("module");
|
|
998
1006
|
init_nativeBridge();
|
|
999
1007
|
init_cssGeneratorNative();
|
|
1000
1008
|
init_cssCompilationNative();
|
|
1001
1009
|
init_tailwindEngine();
|
|
1002
|
-
|
|
1010
|
+
import_meta5 = {};
|
|
1011
|
+
require3 = (0, import_node_module4.createRequire)(import_meta5.url);
|
|
1003
1012
|
_cssCache = /* @__PURE__ */ new Map();
|
|
1004
1013
|
_cacheHits = 0;
|
|
1005
1014
|
_cacheMisses = 0;
|
|
1006
1015
|
MAX_CACHE_SIZE = 100;
|
|
1016
|
+
MAX_CACHE_MEMORY2 = 256 * 1024;
|
|
1007
1017
|
}
|
|
1008
1018
|
});
|
|
1009
1019
|
|
|
1010
1020
|
// packages/domain/compiler/src/compiler/index.ts
|
|
1011
1021
|
var init_compiler = __esm({
|
|
1012
1022
|
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
1023
|
+
"use strict";
|
|
1013
1024
|
init_cssGeneratorNative();
|
|
1014
1025
|
init_compilationNative();
|
|
1015
1026
|
init_cssCompilationNative();
|
|
@@ -1022,6 +1033,7 @@ var init_compiler = __esm({
|
|
|
1022
1033
|
var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
|
|
1023
1034
|
var init_parser = __esm({
|
|
1024
1035
|
"packages/domain/compiler/src/parser/index.ts"() {
|
|
1036
|
+
"use strict";
|
|
1025
1037
|
init_nativeBridge();
|
|
1026
1038
|
parseClasses = (raw) => {
|
|
1027
1039
|
const native = getNativeBridge();
|
|
@@ -1200,6 +1212,7 @@ function resetMemoryStats() {
|
|
|
1200
1212
|
}
|
|
1201
1213
|
var init_analyzerNative = __esm({
|
|
1202
1214
|
"packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
|
|
1215
|
+
"use strict";
|
|
1203
1216
|
init_nativeBridge();
|
|
1204
1217
|
}
|
|
1205
1218
|
});
|
|
@@ -1293,6 +1306,7 @@ function resolveSimpleVariants(configJson) {
|
|
|
1293
1306
|
}
|
|
1294
1307
|
var init_themeResolutionNative = __esm({
|
|
1295
1308
|
"packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
|
|
1309
|
+
"use strict";
|
|
1296
1310
|
init_nativeBridge();
|
|
1297
1311
|
}
|
|
1298
1312
|
});
|
|
@@ -1340,6 +1354,7 @@ function generateSubComponentTypes(root, outputPath) {
|
|
|
1340
1354
|
}
|
|
1341
1355
|
var init_scannerNative = __esm({
|
|
1342
1356
|
"packages/domain/compiler/src/analyzer/scannerNative.ts"() {
|
|
1357
|
+
"use strict";
|
|
1343
1358
|
init_nativeBridge();
|
|
1344
1359
|
}
|
|
1345
1360
|
});
|
|
@@ -1347,6 +1362,7 @@ var init_scannerNative = __esm({
|
|
|
1347
1362
|
// packages/domain/compiler/src/analyzer/index.ts
|
|
1348
1363
|
var init_analyzer = __esm({
|
|
1349
1364
|
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
1365
|
+
"use strict";
|
|
1350
1366
|
init_analyzerNative();
|
|
1351
1367
|
init_themeResolutionNative();
|
|
1352
1368
|
init_scannerNative();
|
|
@@ -1535,6 +1551,7 @@ function resetResolverPoolStats() {
|
|
|
1535
1551
|
}
|
|
1536
1552
|
var init_cacheNative = __esm({
|
|
1537
1553
|
"packages/domain/compiler/src/cache/cacheNative.ts"() {
|
|
1554
|
+
"use strict";
|
|
1538
1555
|
init_nativeBridge();
|
|
1539
1556
|
}
|
|
1540
1557
|
});
|
|
@@ -1542,6 +1559,7 @@ var init_cacheNative = __esm({
|
|
|
1542
1559
|
// packages/domain/compiler/src/cache/index.ts
|
|
1543
1560
|
var init_cache = __esm({
|
|
1544
1561
|
"packages/domain/compiler/src/cache/index.ts"() {
|
|
1562
|
+
"use strict";
|
|
1545
1563
|
init_cacheNative();
|
|
1546
1564
|
}
|
|
1547
1565
|
});
|
|
@@ -1790,6 +1808,7 @@ function redisDiagnose() {
|
|
|
1790
1808
|
}
|
|
1791
1809
|
var init_redisNative = __esm({
|
|
1792
1810
|
"packages/domain/compiler/src/redis/redisNative.ts"() {
|
|
1811
|
+
"use strict";
|
|
1793
1812
|
init_nativeBridge();
|
|
1794
1813
|
}
|
|
1795
1814
|
});
|
|
@@ -1797,6 +1816,7 @@ var init_redisNative = __esm({
|
|
|
1797
1816
|
// packages/domain/compiler/src/redis/index.ts
|
|
1798
1817
|
var init_redis = __esm({
|
|
1799
1818
|
"packages/domain/compiler/src/redis/index.ts"() {
|
|
1819
|
+
"use strict";
|
|
1800
1820
|
init_redisNative();
|
|
1801
1821
|
}
|
|
1802
1822
|
});
|
|
@@ -1935,6 +1955,7 @@ function getCompilerDiagnostics() {
|
|
|
1935
1955
|
}
|
|
1936
1956
|
var init_watchSystemNative = __esm({
|
|
1937
1957
|
"packages/domain/compiler/src/watch/watchSystemNative.ts"() {
|
|
1958
|
+
"use strict";
|
|
1938
1959
|
init_nativeBridge();
|
|
1939
1960
|
}
|
|
1940
1961
|
});
|
|
@@ -1942,9 +1963,12 @@ var init_watchSystemNative = __esm({
|
|
|
1942
1963
|
// packages/domain/compiler/src/watch/index.ts
|
|
1943
1964
|
var init_watch = __esm({
|
|
1944
1965
|
"packages/domain/compiler/src/watch/index.ts"() {
|
|
1966
|
+
"use strict";
|
|
1945
1967
|
init_watchSystemNative();
|
|
1946
1968
|
}
|
|
1947
1969
|
});
|
|
1970
|
+
|
|
1971
|
+
// packages/domain/compiler/src/index.ts
|
|
1948
1972
|
function _layoutClassesToCss(classes) {
|
|
1949
1973
|
const native = getNativeBridge();
|
|
1950
1974
|
if (!native?.layoutClassesToCss) {
|
|
@@ -1979,9 +2003,13 @@ function extractContainerCssFromSource(source) {
|
|
|
1979
2003
|
}
|
|
1980
2004
|
return rules.join("\n");
|
|
1981
2005
|
}
|
|
1982
|
-
var _require3, transformSource, hasTwUsage, isAlreadyTransformed, shouldProcess, compileCssFromClasses, buildStyleTag, generateCssForClasses, eliminateDeadCss, findDeadVariants, runElimination, scanProjectUsage, generateSafelist, loadSafelist, loadTailwindConfig, getContentPaths, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, fileToRoute, getAllRoutes, getRouteClasses, registerFileClasses, registerGlobalClasses, _incrementalEngineInstance, getIncrementalEngine, resetIncrementalEngine, IncrementalEngine, getBucketEngine, resetBucketEngine, classifyNode, detectConflicts, bucketSort, analyzeFile, analyzeVariantUsage, injectClientDirective, injectServerOnlyComment, analyzeClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
|
|
2006
|
+
var import_node_fs2, import_node_path2, import_node_module5, import_meta6, _require3, transformSource, hasTwUsage, isAlreadyTransformed, shouldProcess, compileCssFromClasses, buildStyleTag, generateCssForClasses, eliminateDeadCss, findDeadVariants, runElimination, scanProjectUsage, generateSafelist, loadSafelist, loadTailwindConfig, getContentPaths, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, fileToRoute, getAllRoutes, getRouteClasses, registerFileClasses, registerGlobalClasses, _incrementalEngineInstance, getIncrementalEngine, resetIncrementalEngine, IncrementalEngine, getBucketEngine, resetBucketEngine, classifyNode, detectConflicts, bucketSort, analyzeFile, analyzeVariantUsage, injectClientDirective, injectServerOnlyComment, analyzeClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
|
|
1983
2007
|
var init_src2 = __esm({
|
|
1984
2008
|
"packages/domain/compiler/src/index.ts"() {
|
|
2009
|
+
"use strict";
|
|
2010
|
+
import_node_fs2 = __toESM(require("fs"), 1);
|
|
2011
|
+
import_node_path2 = __toESM(require("path"), 1);
|
|
2012
|
+
import_node_module5 = require("module");
|
|
1985
2013
|
init_nativeBridge();
|
|
1986
2014
|
init_compiler();
|
|
1987
2015
|
init_parser();
|
|
@@ -1989,7 +2017,8 @@ var init_src2 = __esm({
|
|
|
1989
2017
|
init_cache();
|
|
1990
2018
|
init_redis();
|
|
1991
2019
|
init_watch();
|
|
1992
|
-
|
|
2020
|
+
import_meta6 = {};
|
|
2021
|
+
_require3 = (0, import_node_module5.createRequire)(import_meta6.url);
|
|
1993
2022
|
transformSource = (source, opts) => {
|
|
1994
2023
|
const native = getNativeBridge();
|
|
1995
2024
|
if (!native?.transformSource) {
|
|
@@ -2081,7 +2110,7 @@ var init_src2 = __esm({
|
|
|
2081
2110
|
};
|
|
2082
2111
|
scanProjectUsage = (dirs, cwd) => {
|
|
2083
2112
|
const { batchExtractClasses: batchExtractClasses2 } = _require3("./parser");
|
|
2084
|
-
const files = dirs.map((dir) =>
|
|
2113
|
+
const files = dirs.map((dir) => import_node_path2.default.resolve(cwd, dir));
|
|
2085
2114
|
const results = batchExtractClasses2(files) || [];
|
|
2086
2115
|
const combined = {};
|
|
2087
2116
|
for (const result of results) {
|
|
@@ -2098,13 +2127,13 @@ var init_src2 = __esm({
|
|
|
2098
2127
|
const classes = scanProjectUsage(scanDirs, cwd || process.cwd());
|
|
2099
2128
|
const allClasses = Object.keys(classes).sort();
|
|
2100
2129
|
if (outputPath) {
|
|
2101
|
-
|
|
2130
|
+
import_node_fs2.default.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
|
|
2102
2131
|
}
|
|
2103
2132
|
return allClasses;
|
|
2104
2133
|
};
|
|
2105
2134
|
loadSafelist = (safelistPath) => {
|
|
2106
2135
|
try {
|
|
2107
|
-
const content =
|
|
2136
|
+
const content = import_node_fs2.default.readFileSync(safelistPath, "utf-8");
|
|
2108
2137
|
return JSON.parse(content);
|
|
2109
2138
|
} catch {
|
|
2110
2139
|
return [];
|
|
@@ -2118,9 +2147,9 @@ var init_src2 = __esm({
|
|
|
2118
2147
|
"tailwind.config.cjs"
|
|
2119
2148
|
];
|
|
2120
2149
|
for (const file of configFiles) {
|
|
2121
|
-
const fullPath =
|
|
2122
|
-
if (
|
|
2123
|
-
const mod =
|
|
2150
|
+
const fullPath = import_node_path2.default.join(cwd, file);
|
|
2151
|
+
if (import_node_fs2.default.existsSync(fullPath)) {
|
|
2152
|
+
const mod = require(fullPath);
|
|
2124
2153
|
return mod.default || mod;
|
|
2125
2154
|
}
|
|
2126
2155
|
}
|
|
@@ -2129,9 +2158,9 @@ var init_src2 = __esm({
|
|
|
2129
2158
|
getContentPaths = (cwd = process.cwd()) => {
|
|
2130
2159
|
return {
|
|
2131
2160
|
content: [
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2161
|
+
import_node_path2.default.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
|
|
2162
|
+
import_node_path2.default.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
|
|
2163
|
+
import_node_path2.default.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
|
|
2135
2164
|
]
|
|
2136
2165
|
};
|
|
2137
2166
|
};
|
|
@@ -2545,6 +2574,7 @@ __export(internal_exports, {
|
|
|
2545
2574
|
});
|
|
2546
2575
|
var init_internal = __esm({
|
|
2547
2576
|
"packages/domain/compiler/src/internal.ts"() {
|
|
2577
|
+
"use strict";
|
|
2548
2578
|
init_src2();
|
|
2549
2579
|
init_tailwindEngine2();
|
|
2550
2580
|
init_compiler();
|
|
@@ -2557,11 +2587,18 @@ var init_internal = __esm({
|
|
|
2557
2587
|
});
|
|
2558
2588
|
|
|
2559
2589
|
// packages/presentation/next/src/turbopackLoader.ts
|
|
2590
|
+
var turbopackLoader_exports = {};
|
|
2591
|
+
__export(turbopackLoader_exports, {
|
|
2592
|
+
default: () => turbopackLoader
|
|
2593
|
+
});
|
|
2594
|
+
module.exports = __toCommonJS(turbopackLoader_exports);
|
|
2560
2595
|
init_internal();
|
|
2596
|
+
var import_node_fs3 = __toESM(require("fs"), 1);
|
|
2597
|
+
var import_node_path3 = __toESM(require("path"), 1);
|
|
2561
2598
|
var _writtenRules = /* @__PURE__ */ new Set();
|
|
2562
2599
|
function appendStaticCssToFile(staticCss, safelistPath) {
|
|
2563
2600
|
if (!staticCss.trim() || !safelistPath) return;
|
|
2564
|
-
const stateFilePath =
|
|
2601
|
+
const stateFilePath = import_node_path3.default.join(import_node_path3.default.dirname(safelistPath), "_tw-state-static.css");
|
|
2565
2602
|
const newRules = [];
|
|
2566
2603
|
for (const chunk of staticCss.split(/(?<=\})\s*/)) {
|
|
2567
2604
|
const rule = chunk.trim();
|
|
@@ -2572,9 +2609,9 @@ function appendStaticCssToFile(staticCss, safelistPath) {
|
|
|
2572
2609
|
}
|
|
2573
2610
|
if (newRules.length === 0) return;
|
|
2574
2611
|
try {
|
|
2575
|
-
|
|
2576
|
-
if (!
|
|
2577
|
-
|
|
2612
|
+
import_node_fs3.default.mkdirSync(import_node_path3.default.dirname(stateFilePath), { recursive: true });
|
|
2613
|
+
if (!import_node_fs3.default.existsSync(stateFilePath)) {
|
|
2614
|
+
import_node_fs3.default.writeFileSync(
|
|
2578
2615
|
stateFilePath,
|
|
2579
2616
|
`/* _tw-state-static.css \u2014 Auto-generated by tailwind-styled-v4. DO NOT EDIT.
|
|
2580
2617
|
* Import di globals.css: @import "./_tw-state-static.css";
|
|
@@ -2585,7 +2622,7 @@ function appendStaticCssToFile(staticCss, safelistPath) {
|
|
|
2585
2622
|
"utf-8"
|
|
2586
2623
|
);
|
|
2587
2624
|
}
|
|
2588
|
-
|
|
2625
|
+
import_node_fs3.default.appendFileSync(stateFilePath, newRules.join("\n") + "\n", "utf-8");
|
|
2589
2626
|
} catch {
|
|
2590
2627
|
}
|
|
2591
2628
|
}
|
|
@@ -2624,11 +2661,11 @@ var CYCLE_SENTINEL = "_cycle.txt";
|
|
|
2624
2661
|
var START_SENTINEL = "_start.txt";
|
|
2625
2662
|
var _workerCache = /* @__PURE__ */ new Map();
|
|
2626
2663
|
function getTwClassesDir(safelistPath) {
|
|
2627
|
-
return
|
|
2664
|
+
return import_node_path3.default.join(import_node_path3.default.dirname(safelistPath), "tw-classes");
|
|
2628
2665
|
}
|
|
2629
2666
|
function readSentinel(filePath) {
|
|
2630
2667
|
try {
|
|
2631
|
-
return
|
|
2668
|
+
return import_node_fs3.default.readFileSync(filePath, "utf-8").trim();
|
|
2632
2669
|
} catch {
|
|
2633
2670
|
return "";
|
|
2634
2671
|
}
|
|
@@ -2638,36 +2675,36 @@ function clearAndMarkCycle(twClassesDir, startId) {
|
|
|
2638
2675
|
if (_clearLock) return;
|
|
2639
2676
|
_clearLock = true;
|
|
2640
2677
|
try {
|
|
2641
|
-
if (
|
|
2678
|
+
if (import_node_fs3.default.existsSync(twClassesDir)) {
|
|
2642
2679
|
const tempDir = `${twClassesDir}_clearing_${Date.now()}`;
|
|
2643
2680
|
try {
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
const startFile =
|
|
2647
|
-
if (
|
|
2648
|
-
|
|
2681
|
+
import_node_fs3.default.renameSync(twClassesDir, tempDir);
|
|
2682
|
+
import_node_fs3.default.mkdirSync(twClassesDir, { recursive: true });
|
|
2683
|
+
const startFile = import_node_path3.default.join(tempDir, START_SENTINEL);
|
|
2684
|
+
if (import_node_fs3.default.existsSync(startFile)) {
|
|
2685
|
+
import_node_fs3.default.copyFileSync(startFile, import_node_path3.default.join(twClassesDir, START_SENTINEL));
|
|
2649
2686
|
}
|
|
2650
|
-
const mergedFile =
|
|
2651
|
-
if (
|
|
2652
|
-
|
|
2687
|
+
const mergedFile = import_node_path3.default.join(tempDir, "_webpack-merged.css");
|
|
2688
|
+
if (import_node_fs3.default.existsSync(mergedFile)) {
|
|
2689
|
+
import_node_fs3.default.copyFileSync(mergedFile, import_node_path3.default.join(twClassesDir, "_webpack-merged.css"));
|
|
2653
2690
|
}
|
|
2654
|
-
|
|
2691
|
+
import_node_fs3.default.writeFileSync(import_node_path3.default.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
|
|
2655
2692
|
_workerCache.set(twClassesDir, startId);
|
|
2656
|
-
|
|
2693
|
+
import_node_fs3.default.rmSync(tempDir, { recursive: true, force: true });
|
|
2657
2694
|
} catch {
|
|
2658
|
-
for (const file of
|
|
2695
|
+
for (const file of import_node_fs3.default.readdirSync(twClassesDir)) {
|
|
2659
2696
|
if (file === START_SENTINEL || file === "_webpack-merged.css") continue;
|
|
2660
2697
|
try {
|
|
2661
|
-
|
|
2698
|
+
import_node_fs3.default.unlinkSync(import_node_path3.default.join(twClassesDir, file));
|
|
2662
2699
|
} catch {
|
|
2663
2700
|
}
|
|
2664
2701
|
}
|
|
2665
|
-
|
|
2702
|
+
import_node_fs3.default.writeFileSync(import_node_path3.default.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
|
|
2666
2703
|
_workerCache.set(twClassesDir, startId);
|
|
2667
2704
|
}
|
|
2668
2705
|
} else {
|
|
2669
|
-
|
|
2670
|
-
|
|
2706
|
+
import_node_fs3.default.mkdirSync(twClassesDir, { recursive: true });
|
|
2707
|
+
import_node_fs3.default.writeFileSync(import_node_path3.default.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
|
|
2671
2708
|
_workerCache.set(twClassesDir, startId);
|
|
2672
2709
|
}
|
|
2673
2710
|
} catch {
|
|
@@ -2678,41 +2715,41 @@ function clearAndMarkCycle(twClassesDir, startId) {
|
|
|
2678
2715
|
function getPerFileSafelistPath(safelistDir, resourcePath) {
|
|
2679
2716
|
const normalized = resourcePath.replace(/\\/g, "/");
|
|
2680
2717
|
const slug = normalized.replace(/^.*\/src\//, "").replace(/\.[tj]sx?$/, "").replace(/[^a-zA-Z0-9]/g, "_").slice(0, 80);
|
|
2681
|
-
return
|
|
2718
|
+
return import_node_path3.default.join(safelistDir, `${slug}.css`);
|
|
2682
2719
|
}
|
|
2683
2720
|
function writePerFileSafelist(safelistPath, resourcePath, classes) {
|
|
2684
2721
|
if (!safelistPath || classes.length === 0) return;
|
|
2685
2722
|
try {
|
|
2686
2723
|
const twClassesDir = getTwClassesDir(safelistPath);
|
|
2687
|
-
const startId = readSentinel(
|
|
2688
|
-
const cachedCycle = _workerCache.get(twClassesDir) ?? readSentinel(
|
|
2724
|
+
const startId = readSentinel(import_node_path3.default.join(twClassesDir, START_SENTINEL));
|
|
2725
|
+
const cachedCycle = _workerCache.get(twClassesDir) ?? readSentinel(import_node_path3.default.join(twClassesDir, CYCLE_SENTINEL));
|
|
2689
2726
|
if (startId && cachedCycle !== startId) {
|
|
2690
2727
|
clearAndMarkCycle(twClassesDir, startId);
|
|
2691
|
-
} else if (!
|
|
2692
|
-
|
|
2728
|
+
} else if (!import_node_fs3.default.existsSync(twClassesDir)) {
|
|
2729
|
+
import_node_fs3.default.mkdirSync(twClassesDir, { recursive: true });
|
|
2693
2730
|
}
|
|
2694
2731
|
const outPath = getPerFileSafelistPath(twClassesDir, resourcePath);
|
|
2695
2732
|
const sorted = [...new Set(classes)].sort();
|
|
2696
2733
|
const css = [
|
|
2697
|
-
`/* tw-safelist: ${
|
|
2734
|
+
`/* tw-safelist: ${import_node_path3.default.basename(resourcePath)} \u2014 auto-generated */`,
|
|
2698
2735
|
"@layer utilities {",
|
|
2699
2736
|
sorted.map((cls) => `.${cls.replace(/([^a-zA-Z0-9_-])/g, "\\$1")} {}`).join("\n"),
|
|
2700
2737
|
"}"
|
|
2701
2738
|
].join("\n");
|
|
2702
2739
|
try {
|
|
2703
|
-
if (
|
|
2740
|
+
if (import_node_fs3.default.readFileSync(outPath, "utf-8") === css) return;
|
|
2704
2741
|
} catch {
|
|
2705
2742
|
}
|
|
2706
2743
|
const tmpPath = `${outPath}.tmp`;
|
|
2707
2744
|
try {
|
|
2708
|
-
|
|
2709
|
-
|
|
2745
|
+
import_node_fs3.default.writeFileSync(tmpPath, css, "utf-8");
|
|
2746
|
+
import_node_fs3.default.renameSync(tmpPath, outPath);
|
|
2710
2747
|
} catch {
|
|
2711
2748
|
try {
|
|
2712
|
-
|
|
2749
|
+
import_node_fs3.default.unlinkSync(tmpPath);
|
|
2713
2750
|
} catch {
|
|
2714
2751
|
}
|
|
2715
|
-
|
|
2752
|
+
import_node_fs3.default.writeFileSync(outPath, css, "utf-8");
|
|
2716
2753
|
}
|
|
2717
2754
|
} catch {
|
|
2718
2755
|
}
|
|
@@ -2726,7 +2763,7 @@ function turbopackLoader(source, options = {}) {
|
|
|
2726
2763
|
const router = detectRouter(this.resourcePath);
|
|
2727
2764
|
const nextMajor = parseNum(options.nextMajor);
|
|
2728
2765
|
const debug = parseBool(options.debug);
|
|
2729
|
-
const filename =
|
|
2766
|
+
const filename = import_node_path3.default.basename(this.resourcePath);
|
|
2730
2767
|
const effective = {
|
|
2731
2768
|
addDataAttr: parseBool(options.addDataAttr),
|
|
2732
2769
|
// App Router: selalu auto-detect client boundary
|
|
@@ -2788,7 +2825,4 @@ function turbopackLoader(source, options = {}) {
|
|
|
2788
2825
|
return source;
|
|
2789
2826
|
}
|
|
2790
2827
|
}
|
|
2791
|
-
|
|
2792
|
-
module.exports = turbopackLoader;
|
|
2793
|
-
//# sourceMappingURL=turbopackLoader.js.map
|
|
2794
2828
|
//# sourceMappingURL=turbopackLoader.js.map
|