tailwind-styled-v4 5.1.16 → 5.1.18

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.
Files changed (59) hide show
  1. package/dist/atomic.js +16 -4
  2. package/dist/atomic.js.map +1 -1
  3. package/dist/atomic.mjs +13 -2
  4. package/dist/atomic.mjs.map +1 -1
  5. package/dist/cli.js +80 -68
  6. package/dist/cli.js.map +1 -1
  7. package/dist/cli.mjs +77 -66
  8. package/dist/cli.mjs.map +1 -1
  9. package/dist/compiler.d.mts +84 -4
  10. package/dist/compiler.d.ts +84 -4
  11. package/dist/compiler.js +245 -15
  12. package/dist/compiler.js.map +1 -1
  13. package/dist/compiler.mjs +240 -14
  14. package/dist/compiler.mjs.map +1 -1
  15. package/dist/engine.js +209 -167
  16. package/dist/engine.js.map +1 -1
  17. package/dist/engine.mjs +200 -159
  18. package/dist/engine.mjs.map +1 -1
  19. package/dist/index.browser.mjs +0 -3
  20. package/dist/index.browser.mjs.map +1 -1
  21. package/dist/index.js +0 -3
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.mjs +0 -3
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/next.d.mts +16 -0
  26. package/dist/next.d.ts +16 -0
  27. package/dist/next.js +458 -158
  28. package/dist/next.js.map +1 -1
  29. package/dist/next.mjs +454 -154
  30. package/dist/next.mjs.map +1 -1
  31. package/dist/runtime.js +0 -3
  32. package/dist/runtime.js.map +1 -1
  33. package/dist/runtime.mjs +0 -3
  34. package/dist/runtime.mjs.map +1 -1
  35. package/dist/shared.js +106 -64
  36. package/dist/shared.js.map +1 -1
  37. package/dist/shared.mjs +101 -60
  38. package/dist/shared.mjs.map +1 -1
  39. package/dist/theme.js +0 -3
  40. package/dist/theme.js.map +1 -1
  41. package/dist/theme.mjs +0 -3
  42. package/dist/theme.mjs.map +1 -1
  43. package/dist/turbopackLoader.js +94 -52
  44. package/dist/turbopackLoader.js.map +1 -1
  45. package/dist/turbopackLoader.mjs +92 -51
  46. package/dist/turbopackLoader.mjs.map +1 -1
  47. package/dist/tw.js +80 -68
  48. package/dist/tw.js.map +1 -1
  49. package/dist/tw.mjs +77 -66
  50. package/dist/tw.mjs.map +1 -1
  51. package/dist/vite.js +172 -130
  52. package/dist/vite.js.map +1 -1
  53. package/dist/vite.mjs +166 -125
  54. package/dist/vite.mjs.map +1 -1
  55. package/dist/webpackLoader.js +28 -10
  56. package/dist/webpackLoader.js.map +1 -1
  57. package/dist/webpackLoader.mjs +26 -9
  58. package/dist/webpackLoader.mjs.map +1 -1
  59. package/package.json +1 -1
@@ -186,7 +186,7 @@ var init_nativeBridge = __esm({
186
186
  "use strict";
187
187
  init_cjs_shims();
188
188
  init_src();
189
- _loadNative = (path6) => require(path6);
189
+ _loadNative = (path7) => require(path7);
190
190
  log = (...args) => {
191
191
  if (process.env.DEBUG?.includes("compiler:native")) {
192
192
  console.log("[compiler:native]", ...args);
@@ -328,6 +328,17 @@ var init_watch = __esm({
328
328
  }
329
329
  });
330
330
 
331
+ // packages/domain/compiler/src/routeGraph.ts
332
+ var import_node_fs2, import_node_path2;
333
+ var init_routeGraph = __esm({
334
+ "packages/domain/compiler/src/routeGraph.ts"() {
335
+ "use strict";
336
+ init_cjs_shims();
337
+ import_node_fs2 = __toESM(require("fs"), 1);
338
+ import_node_path2 = __toESM(require("path"), 1);
339
+ }
340
+ });
341
+
331
342
  // packages/domain/compiler/src/index.ts
332
343
  function _layoutClassesToCss(classes) {
333
344
  const native = getNativeBridge();
@@ -363,13 +374,13 @@ function extractContainerCssFromSource(source) {
363
374
  }
364
375
  return rules.join("\n");
365
376
  }
366
- var import_node_fs2, import_node_path2, import_node_module3, _require3, transformSource, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, registerFileClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
377
+ var import_node_fs3, import_node_path3, import_node_module3, _require3, transformSource, _CONTAINER_BREAKPOINTS, runLoaderTransform, shouldSkipFile, _fileClassesMap, registerFileClasses, extractTwStateConfigs, generateStaticStateCss, extractAndGenerateStateCss;
367
378
  var init_src2 = __esm({
368
379
  "packages/domain/compiler/src/index.ts"() {
369
380
  "use strict";
370
381
  init_cjs_shims();
371
- import_node_fs2 = __toESM(require("fs"), 1);
372
- import_node_path2 = __toESM(require("path"), 1);
382
+ import_node_fs3 = __toESM(require("fs"), 1);
383
+ import_node_path3 = __toESM(require("path"), 1);
373
384
  import_node_module3 = require("module");
374
385
  init_nativeBridge();
375
386
  init_compiler();
@@ -378,6 +389,7 @@ var init_src2 = __esm({
378
389
  init_cache();
379
390
  init_redis();
380
391
  init_watch();
392
+ init_routeGraph();
381
393
  _require3 = (0, import_node_module3.createRequire)(
382
394
  typeof require !== "undefined" ? typeof __filename !== "undefined" ? `file://${__filename}` : "file://unknown" : importMetaUrl
383
395
  );
@@ -442,7 +454,13 @@ var init_src2 = __esm({
442
454
  }
443
455
  return false;
444
456
  };
445
- registerFileClasses = (_filepath, _classes) => {
457
+ _fileClassesMap = /* @__PURE__ */ new Map();
458
+ registerFileClasses = (filepath, classes) => {
459
+ if (!classes || classes.length === 0) {
460
+ _fileClassesMap.delete(filepath);
461
+ return;
462
+ }
463
+ _fileClassesMap.set(filepath, new Set(classes));
446
464
  };
447
465
  extractTwStateConfigs = (source, filename) => {
448
466
  const native = getNativeBridge();
@@ -498,13 +516,13 @@ __export(webpackLoader_exports, {
498
516
  module.exports = __toCommonJS(webpackLoader_exports);
499
517
  init_cjs_shims();
500
518
  init_internal();
501
- var import_node_path4 = __toESM(require("path"), 1);
519
+ var import_node_path5 = __toESM(require("path"), 1);
502
520
  var import_zod = require("zod");
503
521
 
504
522
  // packages/presentation/next/src/staticCssWebpackPlugin.ts
505
523
  init_cjs_shims();
506
- var import_node_fs3 = __toESM(require("fs"), 1);
507
- var import_node_path3 = __toESM(require("path"), 1);
524
+ var import_node_fs4 = __toESM(require("fs"), 1);
525
+ var import_node_path4 = __toESM(require("path"), 1);
508
526
  var _fileStaticCssMap = /* @__PURE__ */ new Map();
509
527
  function setFileStaticCss(filepath, css) {
510
528
  if (css && css.trim()) {
@@ -526,7 +544,7 @@ var WebpackLoaderOptionsSchema = import_zod.z.object({
526
544
  preserveImports: import_zod.z.boolean().optional(),
527
545
  safelistPath: import_zod.z.string().optional()
528
546
  });
529
- var isNextBuildArtifact = (filepath) => filepath.includes(`${import_node_path4.default.sep}.next${import_node_path4.default.sep}`);
547
+ var isNextBuildArtifact = (filepath) => filepath.includes(`${import_node_path5.default.sep}.next${import_node_path5.default.sep}`);
530
548
  function webpackLoader(source) {
531
549
  const callback = this.async?.();
532
550
  if (!callback) {
@@ -567,7 +585,7 @@ function webpackLoader(source) {
567
585
  const rsc = output.rsc;
568
586
  const engine = output.engine ?? "js";
569
587
  const env = rsc?.isServer ? "server" : "client";
570
- const name = import_node_path4.default.basename(filepath);
588
+ const name = import_node_path5.default.basename(filepath);
571
589
  process.stdout.write(
572
590
  `[tailwind-styled/webpack] ${name} -> ${output.classes.length} classes (${env}) [${engine}]
573
591
  `