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/turbopackLoader.js
CHANGED
|
@@ -1,44 +1,12 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
1
|
+
const __importMetaUrl = typeof __filename !== "undefined" ? require("node:url").pathToFileURL(__filename).href : "file://unknown";
|
|
31
2
|
/* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
3
|
+
"use strict";
|
|
4
|
+
var __create = Object.create;
|
|
32
5
|
var __defProp = Object.defineProperty;
|
|
33
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
34
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
35
9
|
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
10
|
var __esm = (fn, res) => function __init() {
|
|
43
11
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
44
12
|
};
|
|
@@ -54,7 +22,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
54
22
|
}
|
|
55
23
|
return to;
|
|
56
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
|
+
));
|
|
57
33
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
|
+
|
|
35
|
+
// packages/domain/shared/src/native-resolution.ts
|
|
58
36
|
function platformKey() {
|
|
59
37
|
if (isBrowser) return "browser";
|
|
60
38
|
return `${process.platform}-${process.arch}`;
|
|
@@ -70,7 +48,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
70
48
|
}
|
|
71
49
|
const envPath = process.env.TW_NATIVE_PATH?.trim();
|
|
72
50
|
if (envPath) {
|
|
73
|
-
if (
|
|
51
|
+
if (fs.existsSync(envPath)) {
|
|
74
52
|
return { path: envPath, source: "env", platform, tried };
|
|
75
53
|
}
|
|
76
54
|
tried.push(`env:${envPath} (not found)`);
|
|
@@ -79,7 +57,7 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
79
57
|
for (const pkg of prebuiltPkgs) {
|
|
80
58
|
try {
|
|
81
59
|
const candidate = _require.resolve(`${pkg}/tailwind_styled_parser.node`);
|
|
82
|
-
if (
|
|
60
|
+
if (fs.existsSync(candidate)) {
|
|
83
61
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
84
62
|
}
|
|
85
63
|
tried.push(`prebuilt:${pkg} (resolved but missing)`);
|
|
@@ -90,13 +68,13 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
90
68
|
const napiPlatform = platform === "linux-x64" ? "linux-x64-gnu" : platform === "linux-arm64" ? "linux-arm64-gnu" : platform;
|
|
91
69
|
const BINARY_NAMES_SELF = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
92
70
|
if (runtimeDir) {
|
|
93
|
-
for (const depth of ["..",
|
|
94
|
-
const pkgRoot =
|
|
71
|
+
for (const depth of ["..", path.join("..", ".."), path.join("..", "..", "..")]) {
|
|
72
|
+
const pkgRoot = path.resolve(runtimeDir, depth);
|
|
95
73
|
for (const bin of BINARY_NAMES_SELF) {
|
|
96
74
|
for (const suffix of ["", `.${platform}`, `.${napiPlatform}`]) {
|
|
97
|
-
const candidate =
|
|
75
|
+
const candidate = path.resolve(pkgRoot, "native", `${bin}${suffix}.node`);
|
|
98
76
|
tried.push(`self-bundled:${candidate}`);
|
|
99
|
-
if (
|
|
77
|
+
if (fs.existsSync(candidate)) {
|
|
100
78
|
return { path: candidate, source: "prebuilt", platform, tried };
|
|
101
79
|
}
|
|
102
80
|
}
|
|
@@ -108,39 +86,45 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
108
86
|
const BINARY_NAMES = ["tailwind-styled-native", "tailwind_styled_parser"];
|
|
109
87
|
const localCandidates = [];
|
|
110
88
|
for (const bin of BINARY_NAMES) {
|
|
111
|
-
localCandidates.push(
|
|
112
|
-
localCandidates.push(
|
|
113
|
-
localCandidates.push(
|
|
114
|
-
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`));
|
|
115
93
|
}
|
|
116
94
|
for (const startDir of [cwd, base]) {
|
|
117
95
|
let dir = startDir;
|
|
118
96
|
for (let i = 0; i < 6; i++) {
|
|
119
|
-
const nativeDir =
|
|
97
|
+
const nativeDir = path.resolve(dir, "native");
|
|
120
98
|
for (const bin of BINARY_NAMES) {
|
|
121
|
-
localCandidates.push(
|
|
122
|
-
localCandidates.push(
|
|
123
|
-
localCandidates.push(
|
|
124
|
-
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`));
|
|
125
103
|
}
|
|
126
|
-
const parent =
|
|
104
|
+
const parent = path.resolve(dir, "..");
|
|
127
105
|
if (parent === dir) break;
|
|
128
106
|
dir = parent;
|
|
129
107
|
}
|
|
130
108
|
}
|
|
131
109
|
for (const candidate of localCandidates) {
|
|
132
110
|
tried.push(`local:${candidate}`);
|
|
133
|
-
if (
|
|
111
|
+
if (fs.existsSync(candidate)) {
|
|
134
112
|
return { path: candidate, source: "local", platform, tried };
|
|
135
113
|
}
|
|
136
114
|
}
|
|
137
115
|
return { path: null, source: "not-found", platform, tried };
|
|
138
116
|
}
|
|
139
|
-
var isBrowser, _require, PLATFORM_MAP;
|
|
117
|
+
var import_node_module, fs, path, isBrowser, _require, PLATFORM_MAP;
|
|
140
118
|
var init_native_resolution = __esm({
|
|
141
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"));
|
|
142
124
|
isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
|
|
143
|
-
_require =
|
|
125
|
+
_require = (0, import_node_module.createRequire)(
|
|
126
|
+
typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
|
|
127
|
+
);
|
|
144
128
|
PLATFORM_MAP = {
|
|
145
129
|
"linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
|
|
146
130
|
"linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
|
|
@@ -151,17 +135,29 @@ var init_native_resolution = __esm({
|
|
|
151
135
|
};
|
|
152
136
|
}
|
|
153
137
|
});
|
|
138
|
+
|
|
139
|
+
// packages/domain/shared/src/index.ts
|
|
154
140
|
function resolveRuntimeDir(dir, importMetaUrl) {
|
|
141
|
+
if (dir) return import_node_path.default.resolve(dir);
|
|
155
142
|
try {
|
|
156
|
-
return
|
|
143
|
+
return import_node_path.default.dirname((0, import_node_url.fileURLToPath)(importMetaUrl));
|
|
157
144
|
} catch {
|
|
158
145
|
return process.cwd();
|
|
159
146
|
}
|
|
160
147
|
}
|
|
148
|
+
var import_node_crypto, import_node_fs, import_node_path, import_node_url, import_node_module2, _require2;
|
|
161
149
|
var init_src = __esm({
|
|
162
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");
|
|
163
157
|
init_native_resolution();
|
|
164
|
-
|
|
158
|
+
_require2 = (0, import_node_module2.createRequire)(
|
|
159
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : __importMetaUrl ?? "file://unknown"
|
|
160
|
+
);
|
|
165
161
|
}
|
|
166
162
|
});
|
|
167
163
|
|
|
@@ -169,8 +165,9 @@ var init_src = __esm({
|
|
|
169
165
|
var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, adaptNativeResult;
|
|
170
166
|
var init_nativeBridge = __esm({
|
|
171
167
|
"packages/domain/compiler/src/nativeBridge.ts"() {
|
|
168
|
+
"use strict";
|
|
172
169
|
init_src();
|
|
173
|
-
_loadNative = (path5) =>
|
|
170
|
+
_loadNative = (path5) => require(path5);
|
|
174
171
|
log = (...args) => {
|
|
175
172
|
if (process.env.DEBUG?.includes("compiler:native")) {
|
|
176
173
|
console.log("[compiler:native]", ...args);
|
|
@@ -196,7 +193,7 @@ var init_nativeBridge = __esm({
|
|
|
196
193
|
}
|
|
197
194
|
bridgeLoadAttempted = true;
|
|
198
195
|
try {
|
|
199
|
-
const runtimeDir = resolveRuntimeDir(void 0,
|
|
196
|
+
const runtimeDir = resolveRuntimeDir(void 0, __importMetaUrl);
|
|
200
197
|
const result = resolveNativeBinary(runtimeDir);
|
|
201
198
|
if (result.path && result.path.endsWith(".node")) {
|
|
202
199
|
try {
|
|
@@ -308,6 +305,7 @@ function resetCacheStats() {
|
|
|
308
305
|
}
|
|
309
306
|
var init_cssGeneratorNative = __esm({
|
|
310
307
|
"packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
|
|
308
|
+
"use strict";
|
|
311
309
|
init_nativeBridge();
|
|
312
310
|
}
|
|
313
311
|
});
|
|
@@ -380,6 +378,7 @@ function atomicRegistrySize() {
|
|
|
380
378
|
}
|
|
381
379
|
var init_compilationNative = __esm({
|
|
382
380
|
"packages/domain/compiler/src/compiler/compilationNative.ts"() {
|
|
381
|
+
"use strict";
|
|
383
382
|
init_nativeBridge();
|
|
384
383
|
}
|
|
385
384
|
});
|
|
@@ -523,6 +522,7 @@ function twMergeRaw(classLists) {
|
|
|
523
522
|
}
|
|
524
523
|
var init_cssCompilationNative = __esm({
|
|
525
524
|
"packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
|
|
525
|
+
"use strict";
|
|
526
526
|
init_nativeBridge();
|
|
527
527
|
}
|
|
528
528
|
});
|
|
@@ -622,6 +622,7 @@ function idRegistryImport(importedData) {
|
|
|
622
622
|
}
|
|
623
623
|
var init_idRegistryNative = __esm({
|
|
624
624
|
"packages/domain/compiler/src/compiler/idRegistryNative.ts"() {
|
|
625
|
+
"use strict";
|
|
625
626
|
init_nativeBridge();
|
|
626
627
|
}
|
|
627
628
|
});
|
|
@@ -763,9 +764,12 @@ function scanFilesBatchNative(filesJson) {
|
|
|
763
764
|
}
|
|
764
765
|
var init_streamingNative = __esm({
|
|
765
766
|
"packages/domain/compiler/src/compiler/streamingNative.ts"() {
|
|
767
|
+
"use strict";
|
|
766
768
|
init_nativeBridge();
|
|
767
769
|
}
|
|
768
770
|
});
|
|
771
|
+
|
|
772
|
+
// packages/domain/compiler/src/tailwindEngine.ts
|
|
769
773
|
function loadTailwindEngine() {
|
|
770
774
|
if (_twEngine) return _twEngine;
|
|
771
775
|
if (_twEngineError) throw _twEngineError;
|
|
@@ -785,10 +789,10 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
785
789
|
if (classes.length === 0) return "";
|
|
786
790
|
const tw = loadTailwindEngine();
|
|
787
791
|
const input = cssEntryContent ?? "@import 'tailwindcss';";
|
|
788
|
-
const { readFileSync, existsSync: existsSync2 } = await import(
|
|
789
|
-
const { dirname, resolve: resolve2 } = await import(
|
|
792
|
+
const { readFileSync, existsSync: existsSync2 } = await import("fs");
|
|
793
|
+
const { dirname, resolve: resolve2 } = await import("path");
|
|
790
794
|
const projectRoot = root ?? process.cwd();
|
|
791
|
-
const req =
|
|
795
|
+
const req = (0, import_node_module3.createRequire)(resolve2(projectRoot, "package.json"));
|
|
792
796
|
const loadStylesheet = async (id, base) => {
|
|
793
797
|
try {
|
|
794
798
|
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 +812,16 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
808
812
|
const compiler = await Promise.resolve(tw.compile(input, { loadStylesheet }));
|
|
809
813
|
return compiler.build(classes);
|
|
810
814
|
}
|
|
811
|
-
var require2, _twEngine, _twEngineError;
|
|
815
|
+
var import_node_module3, import_meta, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
|
|
812
816
|
var init_tailwindEngine = __esm({
|
|
813
817
|
"packages/domain/compiler/src/tailwindEngine.ts"() {
|
|
814
|
-
|
|
818
|
+
"use strict";
|
|
819
|
+
import_node_module3 = require("module");
|
|
820
|
+
import_meta = {};
|
|
821
|
+
require2 = (0, import_node_module3.createRequire)(
|
|
822
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta !== "undefined" && __importMetaUrl ? __importMetaUrl : "file://unknown"
|
|
823
|
+
);
|
|
824
|
+
MAX_CACHE_MEMORY = 256 * 1024;
|
|
815
825
|
_twEngine = null;
|
|
816
826
|
_twEngineError = null;
|
|
817
827
|
}
|
|
@@ -992,24 +1002,31 @@ function processTailwindCssWithTargets(css, targets) {
|
|
|
992
1002
|
}
|
|
993
1003
|
return result.css;
|
|
994
1004
|
}
|
|
995
|
-
var _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE;
|
|
1005
|
+
var import_node_module4, import_meta2, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
|
|
996
1006
|
var init_tailwindEngine2 = __esm({
|
|
997
1007
|
"packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
|
|
1008
|
+
"use strict";
|
|
1009
|
+
import_node_module4 = require("module");
|
|
998
1010
|
init_nativeBridge();
|
|
999
1011
|
init_cssGeneratorNative();
|
|
1000
1012
|
init_cssCompilationNative();
|
|
1001
1013
|
init_tailwindEngine();
|
|
1002
|
-
|
|
1014
|
+
import_meta2 = {};
|
|
1015
|
+
require3 = (0, import_node_module4.createRequire)(
|
|
1016
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : typeof import_meta2 !== "undefined" && __importMetaUrl ? __importMetaUrl : "file://unknown"
|
|
1017
|
+
);
|
|
1003
1018
|
_cssCache = /* @__PURE__ */ new Map();
|
|
1004
1019
|
_cacheHits = 0;
|
|
1005
1020
|
_cacheMisses = 0;
|
|
1006
1021
|
MAX_CACHE_SIZE = 100;
|
|
1022
|
+
MAX_CACHE_MEMORY2 = 256 * 1024;
|
|
1007
1023
|
}
|
|
1008
1024
|
});
|
|
1009
1025
|
|
|
1010
1026
|
// packages/domain/compiler/src/compiler/index.ts
|
|
1011
1027
|
var init_compiler = __esm({
|
|
1012
1028
|
"packages/domain/compiler/src/compiler/index.ts"() {
|
|
1029
|
+
"use strict";
|
|
1013
1030
|
init_cssGeneratorNative();
|
|
1014
1031
|
init_compilationNative();
|
|
1015
1032
|
init_cssCompilationNative();
|
|
@@ -1022,6 +1039,7 @@ var init_compiler = __esm({
|
|
|
1022
1039
|
var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
|
|
1023
1040
|
var init_parser = __esm({
|
|
1024
1041
|
"packages/domain/compiler/src/parser/index.ts"() {
|
|
1042
|
+
"use strict";
|
|
1025
1043
|
init_nativeBridge();
|
|
1026
1044
|
parseClasses = (raw) => {
|
|
1027
1045
|
const native = getNativeBridge();
|
|
@@ -1200,6 +1218,7 @@ function resetMemoryStats() {
|
|
|
1200
1218
|
}
|
|
1201
1219
|
var init_analyzerNative = __esm({
|
|
1202
1220
|
"packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
|
|
1221
|
+
"use strict";
|
|
1203
1222
|
init_nativeBridge();
|
|
1204
1223
|
}
|
|
1205
1224
|
});
|
|
@@ -1293,6 +1312,7 @@ function resolveSimpleVariants(configJson) {
|
|
|
1293
1312
|
}
|
|
1294
1313
|
var init_themeResolutionNative = __esm({
|
|
1295
1314
|
"packages/domain/compiler/src/analyzer/themeResolutionNative.ts"() {
|
|
1315
|
+
"use strict";
|
|
1296
1316
|
init_nativeBridge();
|
|
1297
1317
|
}
|
|
1298
1318
|
});
|
|
@@ -1340,6 +1360,7 @@ function generateSubComponentTypes(root, outputPath) {
|
|
|
1340
1360
|
}
|
|
1341
1361
|
var init_scannerNative = __esm({
|
|
1342
1362
|
"packages/domain/compiler/src/analyzer/scannerNative.ts"() {
|
|
1363
|
+
"use strict";
|
|
1343
1364
|
init_nativeBridge();
|
|
1344
1365
|
}
|
|
1345
1366
|
});
|
|
@@ -1347,6 +1368,7 @@ var init_scannerNative = __esm({
|
|
|
1347
1368
|
// packages/domain/compiler/src/analyzer/index.ts
|
|
1348
1369
|
var init_analyzer = __esm({
|
|
1349
1370
|
"packages/domain/compiler/src/analyzer/index.ts"() {
|
|
1371
|
+
"use strict";
|
|
1350
1372
|
init_analyzerNative();
|
|
1351
1373
|
init_themeResolutionNative();
|
|
1352
1374
|
init_scannerNative();
|
|
@@ -1535,6 +1557,7 @@ function resetResolverPoolStats() {
|
|
|
1535
1557
|
}
|
|
1536
1558
|
var init_cacheNative = __esm({
|
|
1537
1559
|
"packages/domain/compiler/src/cache/cacheNative.ts"() {
|
|
1560
|
+
"use strict";
|
|
1538
1561
|
init_nativeBridge();
|
|
1539
1562
|
}
|
|
1540
1563
|
});
|
|
@@ -1542,6 +1565,7 @@ var init_cacheNative = __esm({
|
|
|
1542
1565
|
// packages/domain/compiler/src/cache/index.ts
|
|
1543
1566
|
var init_cache = __esm({
|
|
1544
1567
|
"packages/domain/compiler/src/cache/index.ts"() {
|
|
1568
|
+
"use strict";
|
|
1545
1569
|
init_cacheNative();
|
|
1546
1570
|
}
|
|
1547
1571
|
});
|
|
@@ -1790,6 +1814,7 @@ function redisDiagnose() {
|
|
|
1790
1814
|
}
|
|
1791
1815
|
var init_redisNative = __esm({
|
|
1792
1816
|
"packages/domain/compiler/src/redis/redisNative.ts"() {
|
|
1817
|
+
"use strict";
|
|
1793
1818
|
init_nativeBridge();
|
|
1794
1819
|
}
|
|
1795
1820
|
});
|
|
@@ -1797,6 +1822,7 @@ var init_redisNative = __esm({
|
|
|
1797
1822
|
// packages/domain/compiler/src/redis/index.ts
|
|
1798
1823
|
var init_redis = __esm({
|
|
1799
1824
|
"packages/domain/compiler/src/redis/index.ts"() {
|
|
1825
|
+
"use strict";
|
|
1800
1826
|
init_redisNative();
|
|
1801
1827
|
}
|
|
1802
1828
|
});
|
|
@@ -1935,6 +1961,7 @@ function getCompilerDiagnostics() {
|
|
|
1935
1961
|
}
|
|
1936
1962
|
var init_watchSystemNative = __esm({
|
|
1937
1963
|
"packages/domain/compiler/src/watch/watchSystemNative.ts"() {
|
|
1964
|
+
"use strict";
|
|
1938
1965
|
init_nativeBridge();
|
|
1939
1966
|
}
|
|
1940
1967
|
});
|
|
@@ -1942,9 +1969,12 @@ var init_watchSystemNative = __esm({
|
|
|
1942
1969
|
// packages/domain/compiler/src/watch/index.ts
|
|
1943
1970
|
var init_watch = __esm({
|
|
1944
1971
|
"packages/domain/compiler/src/watch/index.ts"() {
|
|
1972
|
+
"use strict";
|
|
1945
1973
|
init_watchSystemNative();
|
|
1946
1974
|
}
|
|
1947
1975
|
});
|
|
1976
|
+
|
|
1977
|
+
// packages/domain/compiler/src/index.ts
|
|
1948
1978
|
function _layoutClassesToCss(classes) {
|
|
1949
1979
|
const native = getNativeBridge();
|
|
1950
1980
|
if (!native?.layoutClassesToCss) {
|
|
@@ -1979,9 +2009,13 @@ function extractContainerCssFromSource(source) {
|
|
|
1979
2009
|
}
|
|
1980
2010
|
return rules.join("\n");
|
|
1981
2011
|
}
|
|
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;
|
|
2012
|
+
var import_node_fs2, import_node_path2, import_node_module5, _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
2013
|
var init_src2 = __esm({
|
|
1984
2014
|
"packages/domain/compiler/src/index.ts"() {
|
|
2015
|
+
"use strict";
|
|
2016
|
+
import_node_fs2 = __toESM(require("fs"), 1);
|
|
2017
|
+
import_node_path2 = __toESM(require("path"), 1);
|
|
2018
|
+
import_node_module5 = require("module");
|
|
1985
2019
|
init_nativeBridge();
|
|
1986
2020
|
init_compiler();
|
|
1987
2021
|
init_parser();
|
|
@@ -1989,7 +2023,9 @@ var init_src2 = __esm({
|
|
|
1989
2023
|
init_cache();
|
|
1990
2024
|
init_redis();
|
|
1991
2025
|
init_watch();
|
|
1992
|
-
_require3 =
|
|
2026
|
+
_require3 = (0, import_node_module5.createRequire)(
|
|
2027
|
+
typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
|
|
2028
|
+
);
|
|
1993
2029
|
transformSource = (source, opts) => {
|
|
1994
2030
|
const native = getNativeBridge();
|
|
1995
2031
|
if (!native?.transformSource) {
|
|
@@ -2081,7 +2117,7 @@ var init_src2 = __esm({
|
|
|
2081
2117
|
};
|
|
2082
2118
|
scanProjectUsage = (dirs, cwd) => {
|
|
2083
2119
|
const { batchExtractClasses: batchExtractClasses2 } = _require3("./parser");
|
|
2084
|
-
const files = dirs.map((dir) =>
|
|
2120
|
+
const files = dirs.map((dir) => import_node_path2.default.resolve(cwd, dir));
|
|
2085
2121
|
const results = batchExtractClasses2(files) || [];
|
|
2086
2122
|
const combined = {};
|
|
2087
2123
|
for (const result of results) {
|
|
@@ -2098,13 +2134,13 @@ var init_src2 = __esm({
|
|
|
2098
2134
|
const classes = scanProjectUsage(scanDirs, cwd || process.cwd());
|
|
2099
2135
|
const allClasses = Object.keys(classes).sort();
|
|
2100
2136
|
if (outputPath) {
|
|
2101
|
-
|
|
2137
|
+
import_node_fs2.default.writeFileSync(outputPath, JSON.stringify(allClasses, null, 2));
|
|
2102
2138
|
}
|
|
2103
2139
|
return allClasses;
|
|
2104
2140
|
};
|
|
2105
2141
|
loadSafelist = (safelistPath) => {
|
|
2106
2142
|
try {
|
|
2107
|
-
const content =
|
|
2143
|
+
const content = import_node_fs2.default.readFileSync(safelistPath, "utf-8");
|
|
2108
2144
|
return JSON.parse(content);
|
|
2109
2145
|
} catch {
|
|
2110
2146
|
return [];
|
|
@@ -2118,9 +2154,9 @@ var init_src2 = __esm({
|
|
|
2118
2154
|
"tailwind.config.cjs"
|
|
2119
2155
|
];
|
|
2120
2156
|
for (const file of configFiles) {
|
|
2121
|
-
const fullPath =
|
|
2122
|
-
if (
|
|
2123
|
-
const mod =
|
|
2157
|
+
const fullPath = import_node_path2.default.join(cwd, file);
|
|
2158
|
+
if (import_node_fs2.default.existsSync(fullPath)) {
|
|
2159
|
+
const mod = require(fullPath);
|
|
2124
2160
|
return mod.default || mod;
|
|
2125
2161
|
}
|
|
2126
2162
|
}
|
|
@@ -2129,9 +2165,9 @@ var init_src2 = __esm({
|
|
|
2129
2165
|
getContentPaths = (cwd = process.cwd()) => {
|
|
2130
2166
|
return {
|
|
2131
2167
|
content: [
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2168
|
+
import_node_path2.default.join(cwd, "src/**/*.{js,ts,jsx,tsx}"),
|
|
2169
|
+
import_node_path2.default.join(cwd, "app/**/*.{js,ts,jsx,tsx}"),
|
|
2170
|
+
import_node_path2.default.join(cwd, "pages/**/*.{js,ts,jsx,tsx}")
|
|
2135
2171
|
]
|
|
2136
2172
|
};
|
|
2137
2173
|
};
|
|
@@ -2545,6 +2581,7 @@ __export(internal_exports, {
|
|
|
2545
2581
|
});
|
|
2546
2582
|
var init_internal = __esm({
|
|
2547
2583
|
"packages/domain/compiler/src/internal.ts"() {
|
|
2584
|
+
"use strict";
|
|
2548
2585
|
init_src2();
|
|
2549
2586
|
init_tailwindEngine2();
|
|
2550
2587
|
init_compiler();
|
|
@@ -2557,11 +2594,18 @@ var init_internal = __esm({
|
|
|
2557
2594
|
});
|
|
2558
2595
|
|
|
2559
2596
|
// packages/presentation/next/src/turbopackLoader.ts
|
|
2597
|
+
var turbopackLoader_exports = {};
|
|
2598
|
+
__export(turbopackLoader_exports, {
|
|
2599
|
+
default: () => turbopackLoader
|
|
2600
|
+
});
|
|
2601
|
+
module.exports = __toCommonJS(turbopackLoader_exports);
|
|
2560
2602
|
init_internal();
|
|
2603
|
+
var import_node_fs3 = __toESM(require("fs"), 1);
|
|
2604
|
+
var import_node_path3 = __toESM(require("path"), 1);
|
|
2561
2605
|
var _writtenRules = /* @__PURE__ */ new Set();
|
|
2562
2606
|
function appendStaticCssToFile(staticCss, safelistPath) {
|
|
2563
2607
|
if (!staticCss.trim() || !safelistPath) return;
|
|
2564
|
-
const stateFilePath =
|
|
2608
|
+
const stateFilePath = import_node_path3.default.join(import_node_path3.default.dirname(safelistPath), "_tw-state-static.css");
|
|
2565
2609
|
const newRules = [];
|
|
2566
2610
|
for (const chunk of staticCss.split(/(?<=\})\s*/)) {
|
|
2567
2611
|
const rule = chunk.trim();
|
|
@@ -2572,9 +2616,9 @@ function appendStaticCssToFile(staticCss, safelistPath) {
|
|
|
2572
2616
|
}
|
|
2573
2617
|
if (newRules.length === 0) return;
|
|
2574
2618
|
try {
|
|
2575
|
-
|
|
2576
|
-
if (!
|
|
2577
|
-
|
|
2619
|
+
import_node_fs3.default.mkdirSync(import_node_path3.default.dirname(stateFilePath), { recursive: true });
|
|
2620
|
+
if (!import_node_fs3.default.existsSync(stateFilePath)) {
|
|
2621
|
+
import_node_fs3.default.writeFileSync(
|
|
2578
2622
|
stateFilePath,
|
|
2579
2623
|
`/* _tw-state-static.css \u2014 Auto-generated by tailwind-styled-v4. DO NOT EDIT.
|
|
2580
2624
|
* Import di globals.css: @import "./_tw-state-static.css";
|
|
@@ -2585,7 +2629,7 @@ function appendStaticCssToFile(staticCss, safelistPath) {
|
|
|
2585
2629
|
"utf-8"
|
|
2586
2630
|
);
|
|
2587
2631
|
}
|
|
2588
|
-
|
|
2632
|
+
import_node_fs3.default.appendFileSync(stateFilePath, newRules.join("\n") + "\n", "utf-8");
|
|
2589
2633
|
} catch {
|
|
2590
2634
|
}
|
|
2591
2635
|
}
|
|
@@ -2624,11 +2668,11 @@ var CYCLE_SENTINEL = "_cycle.txt";
|
|
|
2624
2668
|
var START_SENTINEL = "_start.txt";
|
|
2625
2669
|
var _workerCache = /* @__PURE__ */ new Map();
|
|
2626
2670
|
function getTwClassesDir(safelistPath) {
|
|
2627
|
-
return
|
|
2671
|
+
return import_node_path3.default.join(import_node_path3.default.dirname(safelistPath), "tw-classes");
|
|
2628
2672
|
}
|
|
2629
2673
|
function readSentinel(filePath) {
|
|
2630
2674
|
try {
|
|
2631
|
-
return
|
|
2675
|
+
return import_node_fs3.default.readFileSync(filePath, "utf-8").trim();
|
|
2632
2676
|
} catch {
|
|
2633
2677
|
return "";
|
|
2634
2678
|
}
|
|
@@ -2638,36 +2682,36 @@ function clearAndMarkCycle(twClassesDir, startId) {
|
|
|
2638
2682
|
if (_clearLock) return;
|
|
2639
2683
|
_clearLock = true;
|
|
2640
2684
|
try {
|
|
2641
|
-
if (
|
|
2685
|
+
if (import_node_fs3.default.existsSync(twClassesDir)) {
|
|
2642
2686
|
const tempDir = `${twClassesDir}_clearing_${Date.now()}`;
|
|
2643
2687
|
try {
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
const startFile =
|
|
2647
|
-
if (
|
|
2648
|
-
|
|
2688
|
+
import_node_fs3.default.renameSync(twClassesDir, tempDir);
|
|
2689
|
+
import_node_fs3.default.mkdirSync(twClassesDir, { recursive: true });
|
|
2690
|
+
const startFile = import_node_path3.default.join(tempDir, START_SENTINEL);
|
|
2691
|
+
if (import_node_fs3.default.existsSync(startFile)) {
|
|
2692
|
+
import_node_fs3.default.copyFileSync(startFile, import_node_path3.default.join(twClassesDir, START_SENTINEL));
|
|
2649
2693
|
}
|
|
2650
|
-
const mergedFile =
|
|
2651
|
-
if (
|
|
2652
|
-
|
|
2694
|
+
const mergedFile = import_node_path3.default.join(tempDir, "_webpack-merged.css");
|
|
2695
|
+
if (import_node_fs3.default.existsSync(mergedFile)) {
|
|
2696
|
+
import_node_fs3.default.copyFileSync(mergedFile, import_node_path3.default.join(twClassesDir, "_webpack-merged.css"));
|
|
2653
2697
|
}
|
|
2654
|
-
|
|
2698
|
+
import_node_fs3.default.writeFileSync(import_node_path3.default.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
|
|
2655
2699
|
_workerCache.set(twClassesDir, startId);
|
|
2656
|
-
|
|
2700
|
+
import_node_fs3.default.rmSync(tempDir, { recursive: true, force: true });
|
|
2657
2701
|
} catch {
|
|
2658
|
-
for (const file of
|
|
2702
|
+
for (const file of import_node_fs3.default.readdirSync(twClassesDir)) {
|
|
2659
2703
|
if (file === START_SENTINEL || file === "_webpack-merged.css") continue;
|
|
2660
2704
|
try {
|
|
2661
|
-
|
|
2705
|
+
import_node_fs3.default.unlinkSync(import_node_path3.default.join(twClassesDir, file));
|
|
2662
2706
|
} catch {
|
|
2663
2707
|
}
|
|
2664
2708
|
}
|
|
2665
|
-
|
|
2709
|
+
import_node_fs3.default.writeFileSync(import_node_path3.default.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
|
|
2666
2710
|
_workerCache.set(twClassesDir, startId);
|
|
2667
2711
|
}
|
|
2668
2712
|
} else {
|
|
2669
|
-
|
|
2670
|
-
|
|
2713
|
+
import_node_fs3.default.mkdirSync(twClassesDir, { recursive: true });
|
|
2714
|
+
import_node_fs3.default.writeFileSync(import_node_path3.default.join(twClassesDir, CYCLE_SENTINEL), startId, "utf-8");
|
|
2671
2715
|
_workerCache.set(twClassesDir, startId);
|
|
2672
2716
|
}
|
|
2673
2717
|
} catch {
|
|
@@ -2678,41 +2722,41 @@ function clearAndMarkCycle(twClassesDir, startId) {
|
|
|
2678
2722
|
function getPerFileSafelistPath(safelistDir, resourcePath) {
|
|
2679
2723
|
const normalized = resourcePath.replace(/\\/g, "/");
|
|
2680
2724
|
const slug = normalized.replace(/^.*\/src\//, "").replace(/\.[tj]sx?$/, "").replace(/[^a-zA-Z0-9]/g, "_").slice(0, 80);
|
|
2681
|
-
return
|
|
2725
|
+
return import_node_path3.default.join(safelistDir, `${slug}.css`);
|
|
2682
2726
|
}
|
|
2683
2727
|
function writePerFileSafelist(safelistPath, resourcePath, classes) {
|
|
2684
2728
|
if (!safelistPath || classes.length === 0) return;
|
|
2685
2729
|
try {
|
|
2686
2730
|
const twClassesDir = getTwClassesDir(safelistPath);
|
|
2687
|
-
const startId = readSentinel(
|
|
2688
|
-
const cachedCycle = _workerCache.get(twClassesDir) ?? readSentinel(
|
|
2731
|
+
const startId = readSentinel(import_node_path3.default.join(twClassesDir, START_SENTINEL));
|
|
2732
|
+
const cachedCycle = _workerCache.get(twClassesDir) ?? readSentinel(import_node_path3.default.join(twClassesDir, CYCLE_SENTINEL));
|
|
2689
2733
|
if (startId && cachedCycle !== startId) {
|
|
2690
2734
|
clearAndMarkCycle(twClassesDir, startId);
|
|
2691
|
-
} else if (!
|
|
2692
|
-
|
|
2735
|
+
} else if (!import_node_fs3.default.existsSync(twClassesDir)) {
|
|
2736
|
+
import_node_fs3.default.mkdirSync(twClassesDir, { recursive: true });
|
|
2693
2737
|
}
|
|
2694
2738
|
const outPath = getPerFileSafelistPath(twClassesDir, resourcePath);
|
|
2695
2739
|
const sorted = [...new Set(classes)].sort();
|
|
2696
2740
|
const css = [
|
|
2697
|
-
`/* tw-safelist: ${
|
|
2741
|
+
`/* tw-safelist: ${import_node_path3.default.basename(resourcePath)} \u2014 auto-generated */`,
|
|
2698
2742
|
"@layer utilities {",
|
|
2699
2743
|
sorted.map((cls) => `.${cls.replace(/([^a-zA-Z0-9_-])/g, "\\$1")} {}`).join("\n"),
|
|
2700
2744
|
"}"
|
|
2701
2745
|
].join("\n");
|
|
2702
2746
|
try {
|
|
2703
|
-
if (
|
|
2747
|
+
if (import_node_fs3.default.readFileSync(outPath, "utf-8") === css) return;
|
|
2704
2748
|
} catch {
|
|
2705
2749
|
}
|
|
2706
2750
|
const tmpPath = `${outPath}.tmp`;
|
|
2707
2751
|
try {
|
|
2708
|
-
|
|
2709
|
-
|
|
2752
|
+
import_node_fs3.default.writeFileSync(tmpPath, css, "utf-8");
|
|
2753
|
+
import_node_fs3.default.renameSync(tmpPath, outPath);
|
|
2710
2754
|
} catch {
|
|
2711
2755
|
try {
|
|
2712
|
-
|
|
2756
|
+
import_node_fs3.default.unlinkSync(tmpPath);
|
|
2713
2757
|
} catch {
|
|
2714
2758
|
}
|
|
2715
|
-
|
|
2759
|
+
import_node_fs3.default.writeFileSync(outPath, css, "utf-8");
|
|
2716
2760
|
}
|
|
2717
2761
|
} catch {
|
|
2718
2762
|
}
|
|
@@ -2726,7 +2770,7 @@ function turbopackLoader(source, options = {}) {
|
|
|
2726
2770
|
const router = detectRouter(this.resourcePath);
|
|
2727
2771
|
const nextMajor = parseNum(options.nextMajor);
|
|
2728
2772
|
const debug = parseBool(options.debug);
|
|
2729
|
-
const filename =
|
|
2773
|
+
const filename = import_node_path3.default.basename(this.resourcePath);
|
|
2730
2774
|
const effective = {
|
|
2731
2775
|
addDataAttr: parseBool(options.addDataAttr),
|
|
2732
2776
|
// App Router: selalu auto-detect client boundary
|
|
@@ -2788,7 +2832,4 @@ function turbopackLoader(source, options = {}) {
|
|
|
2788
2832
|
return source;
|
|
2789
2833
|
}
|
|
2790
2834
|
}
|
|
2791
|
-
|
|
2792
|
-
module.exports = turbopackLoader;
|
|
2793
|
-
//# sourceMappingURL=turbopackLoader.js.map
|
|
2794
2835
|
//# sourceMappingURL=turbopackLoader.js.map
|