tailwind-styled-v4 5.0.38 → 5.0.40
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 +18 -20
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +3 -1
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.js +8 -8
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +3 -1
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +15 -12
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +9 -3
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +45 -95
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +42 -13
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.js +23 -18
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +15 -5
- package/dist/compiler.mjs.map +1 -1
- package/dist/dashboard.js +1 -0
- package/dist/dashboard.js.map +1 -1
- package/dist/devtools.js +5 -3
- package/dist/devtools.js.map +1 -1
- package/dist/devtools.mjs +3 -1
- package/dist/devtools.mjs.map +1 -1
- package/dist/engine.js +83 -53
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +58 -16
- package/dist/engine.mjs.map +1 -1
- package/dist/index.js +15 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -4
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +35 -30
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +21 -8
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.js +1 -0
- package/dist/plugin-api.js.map +1 -1
- package/dist/plugin-registry.js +2 -2
- package/dist/plugin-registry.js.map +1 -1
- package/dist/plugin.js +1 -0
- package/dist/plugin.js.map +1 -1
- package/dist/preset.js +1 -0
- package/dist/preset.js.map +1 -1
- package/dist/rspack.js +9 -55
- package/dist/rspack.js.map +1 -1
- package/dist/rspack.mjs +31 -7
- package/dist/rspack.mjs.map +1 -1
- package/dist/runtime-css.js +1 -0
- package/dist/runtime-css.js.map +1 -1
- package/dist/runtime.js +1 -0
- package/dist/runtime.js.map +1 -1
- package/dist/scanner.js +14 -15
- package/dist/scanner.js.map +1 -1
- package/dist/scanner.mjs +3 -1
- 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 +64 -30
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +55 -15
- package/dist/shared.mjs.map +1 -1
- package/dist/storybook-addon.js +1 -0
- package/dist/storybook-addon.js.map +1 -1
- package/dist/svelte.js +15 -9
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +12 -4
- package/dist/svelte.mjs.map +1 -1
- package/dist/syntax.js +3 -3
- package/dist/syntax.js.map +1 -1
- package/dist/testing.js +1 -0
- package/dist/testing.js.map +1 -1
- package/dist/theme.js +8 -7
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +3 -1
- package/dist/theme.mjs.map +1 -1
- package/dist/turbopackLoader.js +23 -18
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +15 -5
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +45 -95
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +42 -13
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +80 -51
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +55 -15
- package/dist/vite.mjs.map +1 -1
- package/dist/vue.js +15 -9
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +12 -4
- package/dist/vue.mjs.map +1 -1
- package/dist/webpackLoader.js +15 -12
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +9 -3
- 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 +1 -1
package/dist/next.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const __importMetaUrl = typeof __filename !== "undefined" ? require("node:url").pathToFileURL(__filename).href : "file://unknown";
|
|
1
2
|
/* tailwind-styled-v4 v5.0.4 | MIT | https://github.com/dictionar32/tailwind-styled-v4 */
|
|
2
3
|
"use strict";
|
|
3
4
|
var __create = Object.create;
|
|
@@ -204,16 +205,17 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
204
205
|
}
|
|
205
206
|
return { path: null, source: "not-found", platform, tried };
|
|
206
207
|
}
|
|
207
|
-
var import_node_module, fs, path,
|
|
208
|
+
var import_node_module, fs, path, isBrowser2, _require, PLATFORM_MAP;
|
|
208
209
|
var init_native_resolution = __esm({
|
|
209
210
|
"packages/domain/shared/src/native-resolution.ts"() {
|
|
210
211
|
"use strict";
|
|
211
212
|
import_node_module = require("module");
|
|
212
213
|
fs = __toESM(require("fs"));
|
|
213
214
|
path = __toESM(require("path"));
|
|
214
|
-
import_meta = {};
|
|
215
215
|
isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
|
|
216
|
-
_require =
|
|
216
|
+
_require = (0, import_node_module.createRequire)(
|
|
217
|
+
typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
|
|
218
|
+
);
|
|
217
219
|
PLATFORM_MAP = {
|
|
218
220
|
"linux-x64": ["@tailwind-styled/native-linux-x64-gnu", "@tailwind-styled/native-linux-x64"],
|
|
219
221
|
"linux-arm64": ["@tailwind-styled/native-linux-arm64-gnu", "@tailwind-styled/native-linux-arm64"],
|
|
@@ -226,12 +228,11 @@ var init_native_resolution = __esm({
|
|
|
226
228
|
});
|
|
227
229
|
|
|
228
230
|
// packages/domain/compiler/src/nativeBridge.ts
|
|
229
|
-
var
|
|
231
|
+
var _loadNative, log, NATIVE_UNAVAILABLE_MESSAGE, nativeBridge, bridgeLoadAttempted, bridgeLoadError, isValidNativeBridge, getNativeBridge, resetNativeBridgeCache, adaptNativeResult;
|
|
230
232
|
var init_nativeBridge = __esm({
|
|
231
233
|
"packages/domain/compiler/src/nativeBridge.ts"() {
|
|
232
234
|
"use strict";
|
|
233
235
|
init_src2();
|
|
234
|
-
import_meta2 = {};
|
|
235
236
|
_loadNative = (path12) => require(path12);
|
|
236
237
|
log = (...args) => {
|
|
237
238
|
if (process.env.DEBUG?.includes("compiler:native")) {
|
|
@@ -258,7 +259,7 @@ var init_nativeBridge = __esm({
|
|
|
258
259
|
}
|
|
259
260
|
bridgeLoadAttempted = true;
|
|
260
261
|
try {
|
|
261
|
-
const runtimeDir = resolveRuntimeDir(void 0,
|
|
262
|
+
const runtimeDir = resolveRuntimeDir(void 0, __importMetaUrl);
|
|
262
263
|
const result = resolveNativeBinary(runtimeDir);
|
|
263
264
|
if (result.path && result.path.endsWith(".node")) {
|
|
264
265
|
try {
|
|
@@ -895,13 +896,14 @@ async function generateRawCss(classes, cssEntryContent, root) {
|
|
|
895
896
|
const compiler = await Promise.resolve(tw.compile(input, { loadStylesheet }));
|
|
896
897
|
return compiler.build(classes);
|
|
897
898
|
}
|
|
898
|
-
var import_node_module2,
|
|
899
|
+
var import_node_module2, require2, MAX_CACHE_MEMORY, _twEngine, _twEngineError;
|
|
899
900
|
var init_tailwindEngine = __esm({
|
|
900
901
|
"packages/domain/compiler/src/tailwindEngine.ts"() {
|
|
901
902
|
"use strict";
|
|
902
903
|
import_node_module2 = require("module");
|
|
903
|
-
|
|
904
|
-
|
|
904
|
+
require2 = (0, import_node_module2.createRequire)(
|
|
905
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : false ? __importMetaUrl : "file://unknown"
|
|
906
|
+
);
|
|
905
907
|
MAX_CACHE_MEMORY = 256 * 1024;
|
|
906
908
|
_twEngine = null;
|
|
907
909
|
_twEngineError = null;
|
|
@@ -1083,7 +1085,7 @@ function processTailwindCssWithTargets(css, targets) {
|
|
|
1083
1085
|
}
|
|
1084
1086
|
return result.css;
|
|
1085
1087
|
}
|
|
1086
|
-
var import_node_module3,
|
|
1088
|
+
var import_node_module3, require3, _cssCache, _cacheHits, _cacheMisses, MAX_CACHE_SIZE, MAX_CACHE_MEMORY2;
|
|
1087
1089
|
var init_tailwindEngine2 = __esm({
|
|
1088
1090
|
"packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
|
|
1089
1091
|
"use strict";
|
|
@@ -1092,8 +1094,9 @@ var init_tailwindEngine2 = __esm({
|
|
|
1092
1094
|
init_cssGeneratorNative();
|
|
1093
1095
|
init_cssCompilationNative();
|
|
1094
1096
|
init_tailwindEngine();
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
+
require3 = (0, import_node_module3.createRequire)(
|
|
1098
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : false ? __importMetaUrl : "file://unknown"
|
|
1099
|
+
);
|
|
1097
1100
|
_cssCache = /* @__PURE__ */ new Map();
|
|
1098
1101
|
_cacheHits = 0;
|
|
1099
1102
|
_cacheMisses = 0;
|
|
@@ -2311,7 +2314,7 @@ function extractContainerCssFromSource(source) {
|
|
|
2311
2314
|
}
|
|
2312
2315
|
return rules.join("\n");
|
|
2313
2316
|
}
|
|
2314
|
-
var import_node_fs, import_node_path, import_node_module4,
|
|
2317
|
+
var import_node_fs, import_node_path, import_node_module4, _require2, 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, BucketEngine, classifyNode, detectConflicts, bucketSort, analyzeFile, analyzeVariantUsage, injectClientDirective, injectServerOnlyComment, analyzeClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
|
|
2315
2318
|
var init_src = __esm({
|
|
2316
2319
|
"packages/domain/compiler/src/index.ts"() {
|
|
2317
2320
|
"use strict";
|
|
@@ -2325,8 +2328,9 @@ var init_src = __esm({
|
|
|
2325
2328
|
init_cache();
|
|
2326
2329
|
init_redis();
|
|
2327
2330
|
init_watch();
|
|
2328
|
-
|
|
2329
|
-
|
|
2331
|
+
_require2 = (0, import_node_module4.createRequire)(
|
|
2332
|
+
typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
|
|
2333
|
+
);
|
|
2330
2334
|
transformSource = (source, opts) => {
|
|
2331
2335
|
const native = getNativeBridge();
|
|
2332
2336
|
if (!native?.transformSource) {
|
|
@@ -3330,7 +3334,7 @@ function resolveRuntimeDir(dir, importMetaUrl) {
|
|
|
3330
3334
|
return process.cwd();
|
|
3331
3335
|
}
|
|
3332
3336
|
}
|
|
3333
|
-
var import_node_crypto, import_node_fs4, import_node_path4, import_node_url, import_node_module5,
|
|
3337
|
+
var import_node_crypto, import_node_fs4, import_node_path4, import_node_url, import_node_module5, TwError, _require3;
|
|
3334
3338
|
var init_src2 = __esm({
|
|
3335
3339
|
"packages/domain/shared/src/index.ts"() {
|
|
3336
3340
|
"use strict";
|
|
@@ -3343,7 +3347,6 @@ var init_src2 = __esm({
|
|
|
3343
3347
|
init_native_resolution();
|
|
3344
3348
|
init_staticStateExtractor();
|
|
3345
3349
|
init_logger();
|
|
3346
|
-
import_meta6 = {};
|
|
3347
3350
|
TwError = class _TwError extends Error {
|
|
3348
3351
|
/** @deprecated Gunakan source */
|
|
3349
3352
|
domain;
|
|
@@ -3396,7 +3399,9 @@ var init_src2 = __esm({
|
|
|
3396
3399
|
return `[${this.source.toUpperCase()}:${this.code}] ${this.message}`;
|
|
3397
3400
|
}
|
|
3398
3401
|
};
|
|
3399
|
-
_require3 = (0, import_node_module5.createRequire)(
|
|
3402
|
+
_require3 = (0, import_node_module5.createRequire)(
|
|
3403
|
+
typeof __filename !== "undefined" ? `file://${__filename}` : __importMetaUrl ?? "file://unknown"
|
|
3404
|
+
);
|
|
3400
3405
|
}
|
|
3401
3406
|
});
|
|
3402
3407
|
|
|
@@ -3433,8 +3438,8 @@ function getDirname() {
|
|
|
3433
3438
|
if (typeof __dirname !== "undefined") {
|
|
3434
3439
|
return __dirname;
|
|
3435
3440
|
}
|
|
3436
|
-
if (
|
|
3437
|
-
return
|
|
3441
|
+
if (false) {
|
|
3442
|
+
return path6.dirname(fileURLToPath2(__importMetaUrl));
|
|
3438
3443
|
}
|
|
3439
3444
|
return process.cwd();
|
|
3440
3445
|
}
|
|
@@ -3639,14 +3644,13 @@ function hasNativeWatchBinding() {
|
|
|
3639
3644
|
return false;
|
|
3640
3645
|
}
|
|
3641
3646
|
}
|
|
3642
|
-
var import_node_path5, import_node_url2,
|
|
3647
|
+
var import_node_path5, import_node_url2, log2, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader, scannerGetBinding, resetScannerBridgeCache;
|
|
3643
3648
|
var init_native_bridge = __esm({
|
|
3644
3649
|
"packages/domain/scanner/src/native-bridge.ts"() {
|
|
3645
3650
|
"use strict";
|
|
3646
|
-
import_node_path5 =
|
|
3651
|
+
import_node_path5 = require("path");
|
|
3647
3652
|
import_node_url2 = require("url");
|
|
3648
3653
|
init_src2();
|
|
3649
|
-
import_meta7 = {};
|
|
3650
3654
|
log2 = createDebugLogger("scanner:native");
|
|
3651
3655
|
isValidScannerBinding = (module2) => {
|
|
3652
3656
|
const candidate = module2;
|
|
@@ -3887,14 +3891,13 @@ var parseScanWorkspaceOptions = (options) => parseWithSchema2(ScanWorkspaceOptio
|
|
|
3887
3891
|
var parseScanWorkspaceResult = (result) => parseWithSchema2(ScanWorkspaceResultSchema, result, "scanner workspace result is invalid");
|
|
3888
3892
|
|
|
3889
3893
|
// packages/domain/scanner/src/index.ts
|
|
3890
|
-
var import_meta8 = {};
|
|
3891
3894
|
var log3 = createLogger2("scanner");
|
|
3892
3895
|
function getRuntimeDir() {
|
|
3893
3896
|
if (typeof __dirname !== "undefined" && __dirname.length > 0) {
|
|
3894
3897
|
return __dirname;
|
|
3895
3898
|
}
|
|
3896
|
-
if (
|
|
3897
|
-
return import_node_path7.default.dirname((
|
|
3899
|
+
if (false) {
|
|
3900
|
+
return import_node_path7.default.dirname(fileURLToPath3(__importMetaUrl));
|
|
3898
3901
|
}
|
|
3899
3902
|
return process.cwd();
|
|
3900
3903
|
}
|
|
@@ -4298,7 +4301,6 @@ var StaticCssWebpackPlugin = class _StaticCssWebpackPlugin {
|
|
|
4298
4301
|
};
|
|
4299
4302
|
|
|
4300
4303
|
// packages/presentation/next/src/withTailwindStyled.ts
|
|
4301
|
-
var import_meta9 = {};
|
|
4302
4304
|
function getDirnameFromUrl2(importMetaUrl) {
|
|
4303
4305
|
if (typeof importMetaUrl !== "string") return "";
|
|
4304
4306
|
if (importMetaUrl.startsWith("file://")) {
|
|
@@ -4312,11 +4314,14 @@ function getDirnameFromUrl2(importMetaUrl) {
|
|
|
4312
4314
|
const lastSlash = Math.max(importMetaUrl.lastIndexOf("/"), importMetaUrl.lastIndexOf("\\"));
|
|
4313
4315
|
return lastSlash > 0 ? importMetaUrl.slice(0, lastSlash) : "";
|
|
4314
4316
|
}
|
|
4315
|
-
var require4 = (0, import_node_module7.createRequire)(
|
|
4316
|
-
|
|
4317
|
+
var require4 = (0, import_node_module7.createRequire)(
|
|
4318
|
+
false ? __importMetaUrl : typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown"
|
|
4319
|
+
);
|
|
4320
|
+
var _importMetaUrl = false ? __importMetaUrl : typeof __filename !== "undefined" ? `file://${__filename}` : void 0;
|
|
4321
|
+
var resolveRuntimeDir2 = () => _importMetaUrl ? getDirnameFromUrl2(_importMetaUrl) : __dirname;
|
|
4317
4322
|
var resolveLoaderPath2 = (basename) => {
|
|
4318
4323
|
try {
|
|
4319
|
-
return resolveLoaderPath(basename,
|
|
4324
|
+
return resolveLoaderPath(basename, _importMetaUrl ?? `file://${__filename}`);
|
|
4320
4325
|
} catch {
|
|
4321
4326
|
const runtimeDir = resolveRuntimeDir2();
|
|
4322
4327
|
const candidates = [
|