tailwind-styled-v4 5.0.39 → 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 +9 -11
- package/dist/analyzer.js.map +1 -1
- package/dist/cli.js +22 -94
- package/dist/cli.js.map +1 -1
- package/dist/compiler.js +4 -6
- package/dist/compiler.js.map +1 -1
- package/dist/engine.js +17 -23
- package/dist/engine.js.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/next.js +12 -17
- package/dist/next.js.map +1 -1
- package/dist/plugin-registry.js +1 -2
- package/dist/plugin-registry.js.map +1 -1
- package/dist/rspack.js +4 -73
- package/dist/rspack.js.map +1 -1
- package/dist/scanner.js +8 -10
- package/dist/scanner.js.map +1 -1
- package/dist/shared.js +4 -6
- package/dist/shared.js.map +1 -1
- package/dist/svelte.js +2 -3
- package/dist/svelte.js.map +1 -1
- package/dist/syntax.js +2 -3
- package/dist/syntax.js.map +1 -1
- package/dist/theme.js +3 -4
- package/dist/theme.js.map +1 -1
- package/dist/turbopackLoader.js +4 -6
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/tw.js +22 -94
- package/dist/tw.js.map +1 -1
- package/dist/vite.js +16 -21
- package/dist/vite.js.map +1 -1
- package/dist/vue.js +2 -3
- package/dist/vue.js.map +1 -1
- package/package.json +1 -1
package/dist/tw.js
CHANGED
|
@@ -3106,81 +3106,15 @@ var init_errors = __esm({
|
|
|
3106
3106
|
}
|
|
3107
3107
|
});
|
|
3108
3108
|
|
|
3109
|
-
// packages/domain/shared/src/esmHelpers.ts
|
|
3110
|
-
function getNodeModuleRef() {
|
|
3111
|
-
if (isBrowser) return null;
|
|
3112
|
-
if (nodeModuleRef !== null) return nodeModuleRef;
|
|
3113
|
-
try {
|
|
3114
|
-
const test = typeof require === "function" ? require("module") : null;
|
|
3115
|
-
nodeModuleRef = test;
|
|
3116
|
-
return test;
|
|
3117
|
-
} catch {
|
|
3118
|
-
nodeModuleRef = null;
|
|
3119
|
-
return null;
|
|
3120
|
-
}
|
|
3121
|
-
}
|
|
3122
|
-
function getCurrentFileUrl() {
|
|
3123
|
-
if (__importMetaUrl) {
|
|
3124
|
-
return __importMetaUrl;
|
|
3125
|
-
}
|
|
3126
|
-
if (typeof __filename !== "undefined") {
|
|
3127
|
-
return `file://${__filename.replace(/\\/g, "/")}`;
|
|
3128
|
-
}
|
|
3129
|
-
return "file://unknown";
|
|
3130
|
-
}
|
|
3131
|
-
function getNodePath() {
|
|
3132
|
-
if (isBrowser) throw new Error("node:path not available in browser");
|
|
3133
|
-
if (!_nodePath) {
|
|
3134
|
-
if (typeof require === "function") {
|
|
3135
|
-
_nodePath = require("path");
|
|
3136
|
-
} else {
|
|
3137
|
-
const nodeRequire = getNodeModuleRef();
|
|
3138
|
-
if (!nodeRequire) throw new Error("require not available");
|
|
3139
|
-
_nodePath = nodeRequire.createRequire(getCurrentFileUrl())("node:path");
|
|
3140
|
-
}
|
|
3141
|
-
}
|
|
3142
|
-
return _nodePath;
|
|
3143
|
-
}
|
|
3144
|
-
function getNodeUrl() {
|
|
3145
|
-
if (isBrowser) throw new Error("node:url not available in browser");
|
|
3146
|
-
if (!_nodeUrl) {
|
|
3147
|
-
if (typeof require === "function") {
|
|
3148
|
-
_nodeUrl = require("url");
|
|
3149
|
-
} else {
|
|
3150
|
-
const nodeRequire = getNodeModuleRef();
|
|
3151
|
-
if (!nodeRequire) throw new Error("require not available");
|
|
3152
|
-
_nodeUrl = nodeRequire.createRequire(getCurrentFileUrl())("node:url");
|
|
3153
|
-
}
|
|
3154
|
-
}
|
|
3155
|
-
return _nodeUrl;
|
|
3156
|
-
}
|
|
3157
|
-
function getDirname(importMetaUrl) {
|
|
3158
|
-
if (isBrowser) return "";
|
|
3159
|
-
if (typeof __dirname !== "undefined") return __dirname;
|
|
3160
|
-
const nodePath = getNodePath();
|
|
3161
|
-
const nodeUrl = getNodeUrl();
|
|
3162
|
-
return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
|
|
3163
|
-
}
|
|
3164
|
-
var isBrowser, nodeModuleRef, _nodePath, _nodeUrl;
|
|
3165
|
-
var init_esmHelpers = __esm({
|
|
3166
|
-
"packages/domain/shared/src/esmHelpers.ts"() {
|
|
3167
|
-
"use strict";
|
|
3168
|
-
isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
|
|
3169
|
-
nodeModuleRef = null;
|
|
3170
|
-
_nodePath = null;
|
|
3171
|
-
_nodeUrl = null;
|
|
3172
|
-
}
|
|
3173
|
-
});
|
|
3174
|
-
|
|
3175
3109
|
// packages/domain/shared/src/native-resolution.ts
|
|
3176
3110
|
function platformKey() {
|
|
3177
|
-
if (
|
|
3111
|
+
if (isBrowser) return "browser";
|
|
3178
3112
|
return `${process.platform}-${process.arch}`;
|
|
3179
3113
|
}
|
|
3180
3114
|
function resolveNativeBinary(runtimeDir) {
|
|
3181
3115
|
const platform = platformKey();
|
|
3182
3116
|
const tried = [];
|
|
3183
|
-
if (
|
|
3117
|
+
if (isBrowser) {
|
|
3184
3118
|
return { path: null, source: "not-found", platform, tried: ["not available in browser"] };
|
|
3185
3119
|
}
|
|
3186
3120
|
if (process.env.TWS_NO_NATIVE === "1" || process.env.TWS_DISABLE_NATIVE === "1") {
|
|
@@ -3254,14 +3188,14 @@ function resolveNativeBinary(runtimeDir) {
|
|
|
3254
3188
|
}
|
|
3255
3189
|
return { path: null, source: "not-found", platform, tried };
|
|
3256
3190
|
}
|
|
3257
|
-
var import_node_module, fs, path,
|
|
3191
|
+
var import_node_module, fs, path, isBrowser, _require, PLATFORM_MAP;
|
|
3258
3192
|
var init_native_resolution = __esm({
|
|
3259
3193
|
"packages/domain/shared/src/native-resolution.ts"() {
|
|
3260
3194
|
"use strict";
|
|
3261
3195
|
import_node_module = require("module");
|
|
3262
3196
|
fs = __toESM(require("fs"));
|
|
3263
3197
|
path = __toESM(require("path"));
|
|
3264
|
-
|
|
3198
|
+
isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
|
|
3265
3199
|
_require = (0, import_node_module.createRequire)(
|
|
3266
3200
|
typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
|
|
3267
3201
|
);
|
|
@@ -3393,7 +3327,6 @@ var init_src = __esm({
|
|
|
3393
3327
|
import_node_path = __toESM(require("path"));
|
|
3394
3328
|
import_node_url = require("url");
|
|
3395
3329
|
import_node_module2 = require("module");
|
|
3396
|
-
init_esmHelpers();
|
|
3397
3330
|
init_native_resolution();
|
|
3398
3331
|
TwError = class _TwError extends Error {
|
|
3399
3332
|
/** @deprecated Gunakan source */
|
|
@@ -3482,12 +3415,12 @@ __export(native_bridge_exports, {
|
|
|
3482
3415
|
startWatchNative: () => startWatchNative,
|
|
3483
3416
|
stopWatchNative: () => stopWatchNative
|
|
3484
3417
|
});
|
|
3485
|
-
function
|
|
3418
|
+
function getDirname() {
|
|
3486
3419
|
if (typeof __dirname !== "undefined") {
|
|
3487
3420
|
return __dirname;
|
|
3488
3421
|
}
|
|
3489
|
-
if (
|
|
3490
|
-
return
|
|
3422
|
+
if (false) {
|
|
3423
|
+
return path3.dirname(fileURLToPath2(__importMetaUrl));
|
|
3491
3424
|
}
|
|
3492
3425
|
return process.cwd();
|
|
3493
3426
|
}
|
|
@@ -3692,14 +3625,13 @@ function hasNativeWatchBinding() {
|
|
|
3692
3625
|
return false;
|
|
3693
3626
|
}
|
|
3694
3627
|
}
|
|
3695
|
-
var import_node_path2, import_node_url2,
|
|
3628
|
+
var import_node_path2, import_node_url2, log, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader, scannerGetBinding, resetScannerBridgeCache;
|
|
3696
3629
|
var init_native_bridge = __esm({
|
|
3697
3630
|
"packages/domain/scanner/src/native-bridge.ts"() {
|
|
3698
3631
|
"use strict";
|
|
3699
|
-
import_node_path2 =
|
|
3632
|
+
import_node_path2 = require("path");
|
|
3700
3633
|
import_node_url2 = require("url");
|
|
3701
3634
|
init_src();
|
|
3702
|
-
import_meta = {};
|
|
3703
3635
|
log = createDebugLogger("scanner:native");
|
|
3704
3636
|
isValidScannerBinding = (module2) => {
|
|
3705
3637
|
const candidate = module2;
|
|
@@ -3741,7 +3673,7 @@ var init_native_bridge = __esm({
|
|
|
3741
3673
|
}
|
|
3742
3674
|
return throwNativeBindingError();
|
|
3743
3675
|
}
|
|
3744
|
-
const runtimeDir =
|
|
3676
|
+
const runtimeDir = getDirname();
|
|
3745
3677
|
const candidates = resolveNativeBindingCandidates({
|
|
3746
3678
|
runtimeDir,
|
|
3747
3679
|
includeDefaultCandidates: true
|
|
@@ -4007,8 +3939,8 @@ function getRuntimeDir() {
|
|
|
4007
3939
|
if (typeof __dirname !== "undefined" && __dirname.length > 0) {
|
|
4008
3940
|
return __dirname;
|
|
4009
3941
|
}
|
|
4010
|
-
if (
|
|
4011
|
-
return import_node_path5.default.dirname((
|
|
3942
|
+
if (false) {
|
|
3943
|
+
return import_node_path5.default.dirname(fileURLToPath4(__importMetaUrl));
|
|
4012
3944
|
}
|
|
4013
3945
|
return process.cwd();
|
|
4014
3946
|
}
|
|
@@ -4017,8 +3949,8 @@ function resolveScannerWorkerModulePath() {
|
|
|
4017
3949
|
if (typeof __dirname !== "undefined" && __dirname.length > 0) {
|
|
4018
3950
|
return __dirname;
|
|
4019
3951
|
}
|
|
4020
|
-
if (
|
|
4021
|
-
return import_node_path5.default.dirname((
|
|
3952
|
+
if (false) {
|
|
3953
|
+
return import_node_path5.default.dirname(fileURLToPath4(__importMetaUrl));
|
|
4022
3954
|
}
|
|
4023
3955
|
return process.cwd();
|
|
4024
3956
|
})();
|
|
@@ -4291,7 +4223,7 @@ async function scanWorkspaceAsync(rootDir, options = {}) {
|
|
|
4291
4223
|
return scanWorkspace(rootDir, normalizedOptions);
|
|
4292
4224
|
}
|
|
4293
4225
|
}
|
|
4294
|
-
var import_node_fs3, import_node_module3, import_node_path5, import_node_url4, import_node_worker_threads2,
|
|
4226
|
+
var import_node_fs3, import_node_module3, import_node_path5, import_node_url4, import_node_worker_threads2, log2, SCAN_WORKER_TIMEOUT_MS, createNativeParserLoader, nativeParserLoader, DEFAULT_EXTENSIONS, DEFAULT_IGNORES;
|
|
4295
4227
|
var init_src2 = __esm({
|
|
4296
4228
|
"packages/domain/scanner/src/index.ts"() {
|
|
4297
4229
|
"use strict";
|
|
@@ -4307,7 +4239,6 @@ var init_src2 = __esm({
|
|
|
4307
4239
|
init_schemas();
|
|
4308
4240
|
init_schemas();
|
|
4309
4241
|
init_native_bridge();
|
|
4310
|
-
import_meta2 = {};
|
|
4311
4242
|
log2 = createLogger("scanner");
|
|
4312
4243
|
SCAN_WORKER_TIMEOUT_MS = 12e4;
|
|
4313
4244
|
createNativeParserLoader = () => {
|
|
@@ -6117,12 +6048,12 @@ function buildCreateProgram(context) {
|
|
|
6117
6048
|
async function main(rawArgs = process.argv.slice(2)) {
|
|
6118
6049
|
await runCliMain({
|
|
6119
6050
|
argv: [process.execPath, "create-tailwind-styled", ...rawArgs],
|
|
6120
|
-
importMetaUrl:
|
|
6051
|
+
importMetaUrl: false ? __importMetaUrl : `file://${process.argv[1] ?? "unknown"}`,
|
|
6121
6052
|
commandHint: "create",
|
|
6122
6053
|
buildProgram: buildCreateProgram
|
|
6123
6054
|
});
|
|
6124
6055
|
}
|
|
6125
|
-
var import_node_path19, import_prompts4,
|
|
6056
|
+
var import_node_path19, import_prompts4, TEMPLATE_NAMES, TEMPLATES;
|
|
6126
6057
|
var init_createApp = __esm({
|
|
6127
6058
|
"packages/infrastructure/cli/src/createApp.ts"() {
|
|
6128
6059
|
"use strict";
|
|
@@ -6132,7 +6063,6 @@ var init_createApp = __esm({
|
|
|
6132
6063
|
init_errors();
|
|
6133
6064
|
init_fs();
|
|
6134
6065
|
init_runtime();
|
|
6135
|
-
import_meta3 = {};
|
|
6136
6066
|
TEMPLATE_NAMES = ["next-app", "vite-react", "vite-vue", "vite-svelte", "simple"];
|
|
6137
6067
|
TEMPLATES = {
|
|
6138
6068
|
"next-app": createNextApp,
|
|
@@ -8952,7 +8882,6 @@ init_errors();
|
|
|
8952
8882
|
init_fs();
|
|
8953
8883
|
init_json();
|
|
8954
8884
|
init_src4();
|
|
8955
|
-
var import_meta4 = {};
|
|
8956
8885
|
var DEFAULT_TAILWIND_CSS2 = '@import "tailwindcss";\n';
|
|
8957
8886
|
var DEFAULT_TW_CONFIG = `${JSON.stringify(
|
|
8958
8887
|
{
|
|
@@ -9263,7 +9192,7 @@ async function runPreflightCli(rawArgs) {
|
|
|
9263
9192
|
function isDirectExecution() {
|
|
9264
9193
|
const scriptPath = process.argv[1];
|
|
9265
9194
|
if (!scriptPath) return false;
|
|
9266
|
-
const currentUrl =
|
|
9195
|
+
const currentUrl = false ? __importMetaUrl : `file://${scriptPath}`;
|
|
9267
9196
|
return currentUrl === (0, import_node_url7.pathToFileURL)(scriptPath).href;
|
|
9268
9197
|
}
|
|
9269
9198
|
if (isDirectExecution()) {
|
|
@@ -9685,12 +9614,11 @@ init_internal();
|
|
|
9685
9614
|
|
|
9686
9615
|
// packages/domain/engine/src/native-bridge.ts
|
|
9687
9616
|
init_src();
|
|
9688
|
-
var import_meta5 = {};
|
|
9689
9617
|
var log4 = createDebugLogger("engine:native");
|
|
9690
|
-
function
|
|
9618
|
+
function getDirname2() {
|
|
9691
9619
|
if (typeof __dirname !== "undefined") return __dirname;
|
|
9692
|
-
if (
|
|
9693
|
-
return
|
|
9620
|
+
if (false) {
|
|
9621
|
+
return getEsmDirname(__importMetaUrl);
|
|
9694
9622
|
}
|
|
9695
9623
|
return process.cwd();
|
|
9696
9624
|
}
|
|
@@ -9734,7 +9662,7 @@ var createEngineBindingLoader = () => {
|
|
|
9734
9662
|
}
|
|
9735
9663
|
return cached;
|
|
9736
9664
|
}
|
|
9737
|
-
const runtimeDir =
|
|
9665
|
+
const runtimeDir = getDirname2();
|
|
9738
9666
|
const candidates = resolveNativeBindingCandidates({
|
|
9739
9667
|
runtimeDir,
|
|
9740
9668
|
includeDefaultCandidates: true
|