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/cli.js CHANGED
@@ -3105,81 +3105,15 @@ var init_errors = __esm({
3105
3105
  }
3106
3106
  });
3107
3107
 
3108
- // packages/domain/shared/src/esmHelpers.ts
3109
- function getNodeModuleRef() {
3110
- if (isBrowser) return null;
3111
- if (nodeModuleRef !== null) return nodeModuleRef;
3112
- try {
3113
- const test = typeof require === "function" ? require("module") : null;
3114
- nodeModuleRef = test;
3115
- return test;
3116
- } catch {
3117
- nodeModuleRef = null;
3118
- return null;
3119
- }
3120
- }
3121
- function getCurrentFileUrl() {
3122
- if (__importMetaUrl) {
3123
- return __importMetaUrl;
3124
- }
3125
- if (typeof __filename !== "undefined") {
3126
- return `file://${__filename.replace(/\\/g, "/")}`;
3127
- }
3128
- return "file://unknown";
3129
- }
3130
- function getNodePath() {
3131
- if (isBrowser) throw new Error("node:path not available in browser");
3132
- if (!_nodePath) {
3133
- if (typeof require === "function") {
3134
- _nodePath = require("path");
3135
- } else {
3136
- const nodeRequire = getNodeModuleRef();
3137
- if (!nodeRequire) throw new Error("require not available");
3138
- _nodePath = nodeRequire.createRequire(getCurrentFileUrl())("node:path");
3139
- }
3140
- }
3141
- return _nodePath;
3142
- }
3143
- function getNodeUrl() {
3144
- if (isBrowser) throw new Error("node:url not available in browser");
3145
- if (!_nodeUrl) {
3146
- if (typeof require === "function") {
3147
- _nodeUrl = require("url");
3148
- } else {
3149
- const nodeRequire = getNodeModuleRef();
3150
- if (!nodeRequire) throw new Error("require not available");
3151
- _nodeUrl = nodeRequire.createRequire(getCurrentFileUrl())("node:url");
3152
- }
3153
- }
3154
- return _nodeUrl;
3155
- }
3156
- function getDirname(importMetaUrl) {
3157
- if (isBrowser) return "";
3158
- if (typeof __dirname !== "undefined") return __dirname;
3159
- const nodePath = getNodePath();
3160
- const nodeUrl = getNodeUrl();
3161
- return nodePath.dirname(nodeUrl.fileURLToPath(importMetaUrl));
3162
- }
3163
- var isBrowser, nodeModuleRef, _nodePath, _nodeUrl;
3164
- var init_esmHelpers = __esm({
3165
- "packages/domain/shared/src/esmHelpers.ts"() {
3166
- "use strict";
3167
- isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
3168
- nodeModuleRef = null;
3169
- _nodePath = null;
3170
- _nodeUrl = null;
3171
- }
3172
- });
3173
-
3174
3108
  // packages/domain/shared/src/native-resolution.ts
3175
3109
  function platformKey() {
3176
- if (isBrowser2) return "browser";
3110
+ if (isBrowser) return "browser";
3177
3111
  return `${process.platform}-${process.arch}`;
3178
3112
  }
3179
3113
  function resolveNativeBinary(runtimeDir) {
3180
3114
  const platform = platformKey();
3181
3115
  const tried = [];
3182
- if (isBrowser2) {
3116
+ if (isBrowser) {
3183
3117
  return { path: null, source: "not-found", platform, tried: ["not available in browser"] };
3184
3118
  }
3185
3119
  if (process.env.TWS_NO_NATIVE === "1" || process.env.TWS_DISABLE_NATIVE === "1") {
@@ -3253,14 +3187,14 @@ function resolveNativeBinary(runtimeDir) {
3253
3187
  }
3254
3188
  return { path: null, source: "not-found", platform, tried };
3255
3189
  }
3256
- var import_node_module, fs, path, isBrowser2, _require, PLATFORM_MAP;
3190
+ var import_node_module, fs, path, isBrowser, _require, PLATFORM_MAP;
3257
3191
  var init_native_resolution = __esm({
3258
3192
  "packages/domain/shared/src/native-resolution.ts"() {
3259
3193
  "use strict";
3260
3194
  import_node_module = require("module");
3261
3195
  fs = __toESM(require("fs"));
3262
3196
  path = __toESM(require("path"));
3263
- isBrowser2 = typeof window !== "undefined" || typeof document !== "undefined";
3197
+ isBrowser = typeof window !== "undefined" || typeof document !== "undefined";
3264
3198
  _require = (0, import_node_module.createRequire)(
3265
3199
  typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : __importMetaUrl
3266
3200
  );
@@ -3392,7 +3326,6 @@ var init_src = __esm({
3392
3326
  import_node_path = __toESM(require("path"));
3393
3327
  import_node_url = require("url");
3394
3328
  import_node_module2 = require("module");
3395
- init_esmHelpers();
3396
3329
  init_native_resolution();
3397
3330
  TwError = class _TwError extends Error {
3398
3331
  /** @deprecated Gunakan source */
@@ -3481,12 +3414,12 @@ __export(native_bridge_exports, {
3481
3414
  startWatchNative: () => startWatchNative,
3482
3415
  stopWatchNative: () => stopWatchNative
3483
3416
  });
3484
- function getDirname2() {
3417
+ function getDirname() {
3485
3418
  if (typeof __dirname !== "undefined") {
3486
3419
  return __dirname;
3487
3420
  }
3488
- if (typeof import_meta !== "undefined" && __importMetaUrl) {
3489
- return import_node_path2.default.dirname((0, import_node_url2.fileURLToPath)(__importMetaUrl));
3421
+ if (false) {
3422
+ return path3.dirname(fileURLToPath2(__importMetaUrl));
3490
3423
  }
3491
3424
  return process.cwd();
3492
3425
  }
@@ -3691,14 +3624,13 @@ function hasNativeWatchBinding() {
3691
3624
  return false;
3692
3625
  }
3693
3626
  }
3694
- var import_node_path2, import_node_url2, import_meta, log, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader, scannerGetBinding, resetScannerBridgeCache;
3627
+ var import_node_path2, import_node_url2, log, isValidScannerBinding, createScannerBridgeLoader, scannerBridgeLoader, scannerGetBinding, resetScannerBridgeCache;
3695
3628
  var init_native_bridge = __esm({
3696
3629
  "packages/domain/scanner/src/native-bridge.ts"() {
3697
3630
  "use strict";
3698
- import_node_path2 = __toESM(require("path"), 1);
3631
+ import_node_path2 = require("path");
3699
3632
  import_node_url2 = require("url");
3700
3633
  init_src();
3701
- import_meta = {};
3702
3634
  log = createDebugLogger("scanner:native");
3703
3635
  isValidScannerBinding = (module2) => {
3704
3636
  const candidate = module2;
@@ -3740,7 +3672,7 @@ var init_native_bridge = __esm({
3740
3672
  }
3741
3673
  return throwNativeBindingError();
3742
3674
  }
3743
- const runtimeDir = getDirname2();
3675
+ const runtimeDir = getDirname();
3744
3676
  const candidates = resolveNativeBindingCandidates({
3745
3677
  runtimeDir,
3746
3678
  includeDefaultCandidates: true
@@ -4006,8 +3938,8 @@ function getRuntimeDir() {
4006
3938
  if (typeof __dirname !== "undefined" && __dirname.length > 0) {
4007
3939
  return __dirname;
4008
3940
  }
4009
- if (typeof import_meta2 !== "undefined" && __importMetaUrl) {
4010
- return import_node_path5.default.dirname((0, import_node_url4.fileURLToPath)(__importMetaUrl));
3941
+ if (false) {
3942
+ return import_node_path5.default.dirname(fileURLToPath4(__importMetaUrl));
4011
3943
  }
4012
3944
  return process.cwd();
4013
3945
  }
@@ -4016,8 +3948,8 @@ function resolveScannerWorkerModulePath() {
4016
3948
  if (typeof __dirname !== "undefined" && __dirname.length > 0) {
4017
3949
  return __dirname;
4018
3950
  }
4019
- if (typeof import_meta2 !== "undefined" && __importMetaUrl) {
4020
- return import_node_path5.default.dirname((0, import_node_url4.fileURLToPath)(__importMetaUrl));
3951
+ if (false) {
3952
+ return import_node_path5.default.dirname(fileURLToPath4(__importMetaUrl));
4021
3953
  }
4022
3954
  return process.cwd();
4023
3955
  })();
@@ -4290,7 +4222,7 @@ async function scanWorkspaceAsync(rootDir, options = {}) {
4290
4222
  return scanWorkspace(rootDir, normalizedOptions);
4291
4223
  }
4292
4224
  }
4293
- var import_node_fs3, import_node_module3, import_node_path5, import_node_url4, import_node_worker_threads2, import_meta2, log2, SCAN_WORKER_TIMEOUT_MS, createNativeParserLoader, nativeParserLoader, DEFAULT_EXTENSIONS, DEFAULT_IGNORES;
4225
+ 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;
4294
4226
  var init_src2 = __esm({
4295
4227
  "packages/domain/scanner/src/index.ts"() {
4296
4228
  "use strict";
@@ -4306,7 +4238,6 @@ var init_src2 = __esm({
4306
4238
  init_schemas();
4307
4239
  init_schemas();
4308
4240
  init_native_bridge();
4309
- import_meta2 = {};
4310
4241
  log2 = createLogger("scanner");
4311
4242
  SCAN_WORKER_TIMEOUT_MS = 12e4;
4312
4243
  createNativeParserLoader = () => {
@@ -6116,12 +6047,12 @@ function buildCreateProgram(context) {
6116
6047
  async function main(rawArgs = process.argv.slice(2)) {
6117
6048
  await runCliMain({
6118
6049
  argv: [process.execPath, "create-tailwind-styled", ...rawArgs],
6119
- importMetaUrl: typeof import_meta3 !== "undefined" && __importMetaUrl ? __importMetaUrl : `file://${process.argv[1] ?? "unknown"}`,
6050
+ importMetaUrl: false ? __importMetaUrl : `file://${process.argv[1] ?? "unknown"}`,
6120
6051
  commandHint: "create",
6121
6052
  buildProgram: buildCreateProgram
6122
6053
  });
6123
6054
  }
6124
- var import_node_path19, import_prompts4, import_meta3, TEMPLATE_NAMES, TEMPLATES;
6055
+ var import_node_path19, import_prompts4, TEMPLATE_NAMES, TEMPLATES;
6125
6056
  var init_createApp = __esm({
6126
6057
  "packages/infrastructure/cli/src/createApp.ts"() {
6127
6058
  "use strict";
@@ -6131,7 +6062,6 @@ var init_createApp = __esm({
6131
6062
  init_errors();
6132
6063
  init_fs();
6133
6064
  init_runtime();
6134
- import_meta3 = {};
6135
6065
  TEMPLATE_NAMES = ["next-app", "vite-react", "vite-vue", "vite-svelte", "simple"];
6136
6066
  TEMPLATES = {
6137
6067
  "next-app": createNextApp,
@@ -8961,7 +8891,6 @@ init_errors();
8961
8891
  init_fs();
8962
8892
  init_json();
8963
8893
  init_src4();
8964
- var import_meta4 = {};
8965
8894
  var DEFAULT_TAILWIND_CSS2 = '@import "tailwindcss";\n';
8966
8895
  var DEFAULT_TW_CONFIG = `${JSON.stringify(
8967
8896
  {
@@ -9272,7 +9201,7 @@ async function runPreflightCli(rawArgs) {
9272
9201
  function isDirectExecution() {
9273
9202
  const scriptPath = process.argv[1];
9274
9203
  if (!scriptPath) return false;
9275
- const currentUrl = typeof import_meta4 !== "undefined" && __importMetaUrl ? __importMetaUrl : `file://${scriptPath}`;
9204
+ const currentUrl = false ? __importMetaUrl : `file://${scriptPath}`;
9276
9205
  return currentUrl === (0, import_node_url7.pathToFileURL)(scriptPath).href;
9277
9206
  }
9278
9207
  if (isDirectExecution()) {
@@ -9694,12 +9623,11 @@ init_internal();
9694
9623
 
9695
9624
  // packages/domain/engine/src/native-bridge.ts
9696
9625
  init_src();
9697
- var import_meta5 = {};
9698
9626
  var log4 = createDebugLogger("engine:native");
9699
- function getDirname3() {
9627
+ function getDirname2() {
9700
9628
  if (typeof __dirname !== "undefined") return __dirname;
9701
- if (typeof import_meta5 !== "undefined" && __importMetaUrl) {
9702
- return getDirname(__importMetaUrl);
9629
+ if (false) {
9630
+ return getEsmDirname(__importMetaUrl);
9703
9631
  }
9704
9632
  return process.cwd();
9705
9633
  }
@@ -9743,7 +9671,7 @@ var createEngineBindingLoader = () => {
9743
9671
  }
9744
9672
  return cached;
9745
9673
  }
9746
- const runtimeDir = getDirname3();
9674
+ const runtimeDir = getDirname2();
9747
9675
  const candidates = resolveNativeBindingCandidates({
9748
9676
  runtimeDir,
9749
9677
  includeDefaultCandidates: true