weapp-tailwindcss 5.1.13 → 5.1.14

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 (46) hide show
  1. package/dist/bundlers/vite/css-finalizer.d.ts +1 -0
  2. package/dist/bundlers/vite/frameworks/taro/index.d.ts +2 -0
  3. package/dist/bundlers/vite/frameworks/uni-app/index.d.ts +2 -0
  4. package/dist/bundlers/vite/frameworks/uni-app-x/index.d.ts +2 -0
  5. package/dist/bundlers/vite/generate-bundle/remembered-css-replay.d.ts +3 -0
  6. package/dist/bundlers/vite/generate-bundle/root-style-output.d.ts +18 -0
  7. package/dist/bundlers/vite/generate-bundle/types.d.ts +2 -0
  8. package/dist/bundlers/vite/serve-root-import-shell.d.ts +8 -0
  9. package/dist/bundlers/vite/source-candidates.d.ts +3 -0
  10. package/dist/{context-xSJE588m.mjs → context-BL8Gy71H.mjs} +5 -3
  11. package/dist/{context-DRRgW7i2.js → context-VeFq_8vW.js} +5 -3
  12. package/dist/core.js +1 -1
  13. package/dist/core.mjs +1 -1
  14. package/dist/{generator-BvPcmqxU.mjs → generator-B59OA64h.mjs} +17 -3
  15. package/dist/{generator-CS10c9g1.js → generator-CEnUsjed.js} +17 -3
  16. package/dist/generator.js +1 -1
  17. package/dist/generator.mjs +1 -1
  18. package/dist/{gulp-DNZZvUMq.js → gulp-C1Q3LRzg.js} +9 -5
  19. package/dist/{gulp-BEOzXrbp.mjs → gulp-DUYWxmZC.mjs} +9 -5
  20. package/dist/gulp.js +1 -1
  21. package/dist/gulp.mjs +1 -1
  22. package/dist/{hmr-timing-DW1g3zjl.js → hmr-timing-BZ5sWIqO.js} +104 -14
  23. package/dist/{hmr-timing-hRhRAjYV.mjs → hmr-timing-C3ed5vCx.mjs} +105 -15
  24. package/dist/index.js +4 -4
  25. package/dist/index.mjs +4 -4
  26. package/dist/postcss.js +1 -1
  27. package/dist/postcss.mjs +1 -1
  28. package/dist/presets.js +1 -1
  29. package/dist/presets.mjs +1 -1
  30. package/dist/rspack.js +1 -1
  31. package/dist/rspack.mjs +1 -1
  32. package/dist/{source-candidate-scan-signature-t4XKAQ04.mjs → source-candidate-scan-signature-D7RWjWsY.mjs} +17 -44
  33. package/dist/{source-candidate-scan-signature-CMgu5bJk.js → source-candidate-scan-signature-R3dzamcm.js} +17 -44
  34. package/dist/tailwindcss/candidates.d.ts +4 -0
  35. package/dist/{tailwindcss-DZT_pWrd.mjs → tailwindcss-DPcKMLxL.mjs} +1 -1
  36. package/dist/{tailwindcss-z9JMF-qU.js → tailwindcss-KBYPJ2DW.js} +1 -1
  37. package/dist/{vite-DnkObu2L.js → vite-BNlPdsGM.js} +262 -52
  38. package/dist/{vite-Tpgi77vE.mjs → vite-CBU5NXTX.mjs} +262 -52
  39. package/dist/vite.js +1 -1
  40. package/dist/vite.mjs +1 -1
  41. package/dist/weapp-tw-css-import-rewrite-loader.js +2061 -15
  42. package/dist/{webpack-CTYm19zA.mjs → webpack-CZ38fMGC.mjs} +10 -6
  43. package/dist/{webpack-CzXjfvYS.js → webpack-Jpe048pQ.js} +10 -6
  44. package/dist/webpack.js +1 -1
  45. package/dist/webpack.mjs +1 -1
  46. package/package.json +3 -3
@@ -1,8 +1,8 @@
1
- import { $ as normalizeTailwindSourceDirectives, A as filterApplyOnlyGeneratedCss, At as resolveTailwindV4CssSourceBase, B as stripUnmatchedTailwindSourceMediaCloseFragments, F as removeTailwindV4GeneratedUserCssArtifacts, G as removeUnsupportedMiniProgramAtRules, H as finalizeMiniProgramCss, I as removeTailwindV4GeneratorAtRules, J as hasTailwindApplyDirective, L as shouldFilterApplyOnlyGeneratedCss, M as isCommentOnlyCss, N as normalizeEmptyTailwindCustomVariants, Nt as filterUnsupportedMiniProgramTailwindV4Candidates, Pt as loadTailwindV4DesignSystem, R as splitUserCssLayerBlocks, Tt as isFileMatchedByTailwindSourceEntries, V as transformGeneratorUserCss, X as hasTailwindRootDirectives, Z as hasTailwindSourceDirectives, a as resolveGeneratorRuntimeBranch, at as VITE_MARKER_RE, ct as hasTailwindGeneratedCssMarkers, d as resolveTailwindV4SourceFromRuntime, dt as splitTailwindV4GeneratedCssBySourceOrder, ft as stripGeneratorPlaceholderMarkers, gt as prependConfigDirective, ht as normalizeConfigDirective, i as normalizeWeappTailwindcssGeneratorOptions, it as GENERATOR_PLACEHOLDER_MARKER_RE, j as hasUserCssLayerBlocks, jt as toPosixPath$1, k as extractGeneratedCssForUserLayerSelectors, kt as resolveSourceScanPath, lt as splitGeneratorPlaceholderCssBySourceOrder, mt as stripTailwindBanners, nt as removeTailwindSourceDirectives, ot as createCssAppend, p as resolveTailwindV4SourceOptionsFromRuntime, pt as stripTailwindBanner, rt as resolveCssEntrySource, s as shouldUseMiniProgramCssBranch, st as hasTailwindGeneratedCss, t as createWeappTailwindcssGenerator, tt as parseImportRequest, u as resolveTailwindV4Source$1, ut as splitTailwindGeneratedCssByBanner, xt as FULL_SOURCE_SCAN_EXTENSION_RE, z as stripTailwindSourceMediaFragments } from "./generator-BvPcmqxU.mjs";
1
+ import { $ as normalizeTailwindSourceDirectives, A as filterApplyOnlyGeneratedCss, At as resolveTailwindV4CssSourceBase, B as stripUnmatchedTailwindSourceMediaCloseFragments, F as removeTailwindV4GeneratedUserCssArtifacts, G as removeUnsupportedMiniProgramAtRules, H as finalizeMiniProgramCss, I as removeTailwindV4GeneratorAtRules, J as hasTailwindApplyDirective, L as shouldFilterApplyOnlyGeneratedCss, M as isCommentOnlyCss, N as normalizeEmptyTailwindCustomVariants, Nt as filterUnsupportedMiniProgramTailwindV4Candidates, Pt as loadTailwindV4DesignSystem, R as splitUserCssLayerBlocks, Tt as isFileMatchedByTailwindSourceEntries, V as transformGeneratorUserCss, X as hasTailwindRootDirectives, Z as hasTailwindSourceDirectives, a as resolveGeneratorRuntimeBranch, at as VITE_MARKER_RE, ct as hasTailwindGeneratedCssMarkers, d as resolveTailwindV4SourceFromRuntime, dt as splitTailwindV4GeneratedCssBySourceOrder, ft as stripGeneratorPlaceholderMarkers, gt as prependConfigDirective, ht as normalizeConfigDirective, i as normalizeWeappTailwindcssGeneratorOptions, it as GENERATOR_PLACEHOLDER_MARKER_RE, j as hasUserCssLayerBlocks, jt as toPosixPath$1, k as extractGeneratedCssForUserLayerSelectors, kt as resolveSourceScanPath, lt as splitGeneratorPlaceholderCssBySourceOrder, mt as stripTailwindBanners, nt as removeTailwindSourceDirectives, ot as createCssAppend, p as resolveTailwindV4SourceOptionsFromRuntime, pt as stripTailwindBanner, rt as resolveCssEntrySource, s as shouldUseMiniProgramCssBranch, st as hasTailwindGeneratedCss, t as createWeappTailwindcssGenerator, tt as parseImportRequest, u as resolveTailwindV4Source$1, ut as splitTailwindGeneratedCssByBanner, xt as FULL_SOURCE_SCAN_EXTENSION_RE, z as stripTailwindSourceMediaFragments } from "./generator-B59OA64h.mjs";
2
2
  import { t as omitUndefined } from "./object-BJSWl-E5.mjs";
3
- import { h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, r as isUniAppXEnabled, v as includesTailwindV4PreflightDirective } from "./tailwindcss-DZT_pWrd.mjs";
4
- import { _ as babelParse, b as md5Hash, g as replaceWxml, v as traverse, y as createDebug } from "./wxml-DdGdeqaH.mjs";
5
- import { r as resolveStyleOptionsFromContext } from "./context-xSJE588m.mjs";
3
+ import { h as resolveTailwindV4EntriesFromCss, l as getRuntimeClassSetSignature, r as isUniAppXEnabled, v as includesTailwindV4PreflightDirective } from "./tailwindcss-DPcKMLxL.mjs";
4
+ import { _ as babelParse, b as md5Hash, g as replaceWxml, i as createAttributeMatcher, n as Parser, v as traverse, y as createDebug } from "./wxml-DdGdeqaH.mjs";
5
+ import { r as resolveStyleOptionsFromContext } from "./context-BL8Gy71H.mjs";
6
6
  import { existsSync, readFileSync } from "node:fs";
7
7
  import path from "node:path";
8
8
  import process from "node:process";
@@ -1472,7 +1472,8 @@ async function resolveGeneratorSource(_majorVersion, runtimeState, rawSource, fi
1472
1472
  index: 0,
1473
1473
  matched: true
1474
1474
  }) : void 0;
1475
- const configuredCssSource = normalizedSourceOptions && hasConfiguredTailwindV4CssSource(normalizedSourceOptions) && hasTailwindGeneratedCssMarkers(rawSource) ? matchedCssSource ?? candidateMatchedCssSource ?? singleConfiguredCssSource ?? await resolveTailwindV4Source$1(normalizedSourceOptions) : void 0;
1475
+ const canResolveCombinedConfiguredCssSources = (normalizedSourceOptions?.cssSources?.length ?? 0) <= 1 || hasTailwindGeneratedCss(rawSource);
1476
+ const configuredCssSource = normalizedSourceOptions && hasConfiguredTailwindV4CssSource(normalizedSourceOptions) && hasTailwindGeneratedCssMarkers(rawSource) ? matchedCssSource ?? candidateMatchedCssSource ?? singleConfiguredCssSource ?? (canResolveCombinedConfiguredCssSources ? await resolveTailwindV4Source$1(normalizedSourceOptions) : void 0) : void 0;
1476
1477
  if (configuredCssSource) return generatorOptions?.config ? {
1477
1478
  ...configuredCssSource,
1478
1479
  css: prependConfigDirective(configuredCssSource.css, generatorOptions.config)
@@ -2464,6 +2465,8 @@ async function generateCssByGenerator(options) {
2464
2465
  }
2465
2466
  debug("tailwind direct css generation prefix mismatch, append transformed bundle css %s", file);
2466
2467
  let css = generatedCss;
2468
+ const distinctUserLayerParts = hasDistinctUserRawSource && hasUserCssLayerBlocks(generatedUserCssRawSource) ? splitUserCssLayerBlocks(generatedUserCssRawSource) : void 0;
2469
+ let restoredDistinctUserLayerCss = false;
2467
2470
  if (generated.target === "weapp" && generatorRawSource.includes("weapp-tailwindcss generator-placeholder") && !hasUserCssLayerBlocks(generatorRawSource)) css = createCssSourceOrderAppend$1(await transformGeneratorUserCss(generatedUserCssRawSource, {
2468
2471
  generatorTarget: generated.target,
2469
2472
  generatorStyleOptions,
@@ -2493,10 +2496,26 @@ async function generateCssByGenerator(options) {
2493
2496
  if (shouldFinalizeMarkedUserLayerComponentsCss(file)) css = reorderMarkedUserLayerComponentsCss(css);
2494
2497
  }
2495
2498
  }
2499
+ if (hasDistinctUserRawSource && distinctUserLayerParts) {
2500
+ const layerUserCss = await transformGeneratorUserCss(distinctUserLayerParts.layer, {
2501
+ generatorTarget: generated.target,
2502
+ generatorStyleOptions,
2503
+ cssUserHandlerOptions,
2504
+ styleHandler,
2505
+ importFallback: generatorOptions.importFallback,
2506
+ processed: userRawSourceProcessed
2507
+ });
2508
+ if (filterExistingCssRules(css, layerUserCss).trim().length > 0) {
2509
+ css = createCssSourceOrderAppend$1(wrapUserLayerComponentsCss(layerUserCss), css);
2510
+ restoredDistinctUserLayerCss = true;
2511
+ if (shouldFinalizeMarkedUserLayerComponentsCss(file)) css = reorderMarkedUserLayerComponentsCss(css);
2512
+ }
2513
+ }
2496
2514
  }
2497
2515
  if (hasMatchedCssSourceFile || generated.target === "web") {
2498
2516
  if (generated.target === "weapp" && !hasGeneratedCss && !hasGeneratedMarkers) {
2499
- const userCss = await transformGeneratorUserCss(generatedUserCssRawSource, {
2517
+ const distinctUserCssRawSource = restoredDistinctUserLayerCss ? distinctUserLayerParts?.rest ?? generatedUserCssRawSource : generatedUserCssRawSource;
2518
+ const userCss = await transformGeneratorUserCss(distinctUserCssRawSource, {
2500
2519
  generatorTarget: generated.target,
2501
2520
  generatorStyleOptions,
2502
2521
  cssUserHandlerOptions,
@@ -2504,10 +2523,11 @@ async function generateCssByGenerator(options) {
2504
2523
  importFallback: generatorOptions.importFallback,
2505
2524
  processed: userRawSourceProcessed
2506
2525
  });
2507
- const missingUserCss = isCssAlreadyRepresentedByMarkers(css, generatedUserCssRawSource) ? filterExistingCssRules(css, userCss) : userCss;
2526
+ const missingUserCss = isCssAlreadyRepresentedByMarkers(css, distinctUserCssRawSource) ? filterExistingCssRules(css, userCss) : userCss;
2508
2527
  css = createCssSourceOrderAppend$1(css, missingUserCss);
2509
2528
  } else if (hasMatchedCssSourceFile && generated.target === "weapp" && hasGeneratedMarkers && !hasGeneratedCss) {
2510
- const userCss = await transformGeneratorUserCss(removeTailwindV4GeneratedUserCssArtifacts(userCssRawSource), {
2529
+ const cleanedUserCssRawSource = removeTailwindV4GeneratedUserCssArtifacts(userCssRawSource);
2530
+ const userCss = await transformGeneratorUserCss(restoredDistinctUserLayerCss && hasUserCssLayerBlocks(cleanedUserCssRawSource) ? splitUserCssLayerBlocks(cleanedUserCssRawSource).rest : cleanedUserCssRawSource, {
2511
2531
  generatorTarget: generated.target,
2512
2532
  generatorStyleOptions,
2513
2533
  cssUserHandlerOptions,
@@ -2572,7 +2592,8 @@ async function generateCssByGenerator(options) {
2572
2592
  css = await appendLegacyContainerCompatCss(css, generatedUserCssRawSource, file, runtime, configuredContainerCompat, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
2573
2593
  }
2574
2594
  if (generated.target === "weapp" && hasDistinctUserRawSource && !hasGeneratedCss && !hasGeneratedMarkers && !hasTailwindApplyDirective(generatedUserCssRawSource)) {
2575
- const userCss = await transformGeneratorUserCss(generatedUserCssRawSource, {
2595
+ const distinctUserCssRawSource = restoredDistinctUserLayerCss ? distinctUserLayerParts?.rest ?? generatedUserCssRawSource : generatedUserCssRawSource;
2596
+ const userCss = await transformGeneratorUserCss(distinctUserCssRawSource, {
2576
2597
  generatorTarget: generated.target,
2577
2598
  generatorStyleOptions,
2578
2599
  cssUserHandlerOptions,
@@ -2580,7 +2601,7 @@ async function generateCssByGenerator(options) {
2580
2601
  importFallback: generatorOptions.importFallback,
2581
2602
  processed: userRawSourceProcessed
2582
2603
  });
2583
- const missingUserCss = isCssAlreadyRepresentedByMarkers(css, generatedUserCssRawSource) ? filterExistingCssRules(css, userCss) : userCss;
2604
+ const missingUserCss = isCssAlreadyRepresentedByMarkers(css, distinctUserCssRawSource) ? filterExistingCssRules(css, userCss) : userCss;
2584
2605
  css = createCssSourceOrderAppend$1(css, missingUserCss);
2585
2606
  }
2586
2607
  const finalCss = finalizeGeneratorCss(css, generated.target, {
@@ -2889,10 +2910,66 @@ const SCRIPT_SOURCE_CANDIDATE_EXTENSIONS = /* @__PURE__ */ new Set([
2889
2910
  "mts",
2890
2911
  "cts"
2891
2912
  ]);
2913
+ const TEMPLATE_SOURCE_CANDIDATE_EXTENSIONS = /* @__PURE__ */ new Set([
2914
+ "html",
2915
+ "wxml",
2916
+ "axml",
2917
+ "jxml",
2918
+ "ksml",
2919
+ "ttml",
2920
+ "qml",
2921
+ "tyml",
2922
+ "xhsml",
2923
+ "swan",
2924
+ "vue",
2925
+ "uvue",
2926
+ "nvue",
2927
+ "mpx"
2928
+ ]);
2892
2929
  async function extractCandidatesFromSource(source, extension, options = {}) {
2893
2930
  const candidates = options.extractor ? new Set(await options.extractor(source, extension)) : new Set(await extractSourceCandidates(source, extension, { ...options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: options.bareArbitraryValues } }));
2894
2931
  const scriptCandidates = await extractScriptStringCandidates(source, extension, options);
2895
2932
  for (const candidate of scriptCandidates) candidates.add(candidate);
2933
+ const templateAttributeCandidates = await extractTemplateAttributeCandidates(source, extension, options);
2934
+ for (const candidate of templateAttributeCandidates) candidates.add(candidate);
2935
+ return candidates;
2936
+ }
2937
+ function isDefaultTemplateAttribute(name) {
2938
+ if (name === "class" || name === "hover-class" || name === "virtualhostclass") return true;
2939
+ const lowerName = name.toLowerCase();
2940
+ return lowerName === "class" || lowerName === "hover-class" || lowerName === "virtualhostclass";
2941
+ }
2942
+ async function extractCandidateTokensFromTemplateAttributeValue(value, options) {
2943
+ return options.extractor ? await options.extractor(value, "html") : await extractSourceCandidates(value, "html", { ...options.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: options.bareArbitraryValues } });
2944
+ }
2945
+ async function extractTemplateAttributeCandidates(source, extension, options) {
2946
+ if (!TEMPLATE_SOURCE_CANDIDATE_EXTENSIONS.has(extension)) return [];
2947
+ if (!options.customAttributesEntities?.length) return [];
2948
+ const candidates = /* @__PURE__ */ new Set();
2949
+ const matchCustomAttribute = createAttributeMatcher(options.customAttributesEntities);
2950
+ const defaultTemplateHandlerEnabled = !options.disabledDefaultTemplateHandler;
2951
+ let tag = "";
2952
+ const tasks = [];
2953
+ const parser = new Parser({
2954
+ onopentagname(name) {
2955
+ tag = name;
2956
+ },
2957
+ onattribute(name, value) {
2958
+ if (!value) return;
2959
+ const shouldHandleDefault = defaultTemplateHandlerEnabled && isDefaultTemplateAttribute(name);
2960
+ const shouldHandleCustom = matchCustomAttribute?.(tag, name) ?? false;
2961
+ if (!shouldHandleDefault && !shouldHandleCustom) return;
2962
+ tasks.push((async () => {
2963
+ for (const candidate of await extractCandidateTokensFromTemplateAttributeValue(value, options)) candidates.add(candidate);
2964
+ })());
2965
+ },
2966
+ onclosetag() {
2967
+ tag = "";
2968
+ }
2969
+ }, { xmlMode: true });
2970
+ parser.write(source);
2971
+ parser.end();
2972
+ await Promise.all(tasks);
2896
2973
  return candidates;
2897
2974
  }
2898
2975
  async function extractScriptStringCandidates(source, extension, options) {
@@ -3042,8 +3119,21 @@ function resolveSourceCandidateExtension(id) {
3042
3119
  const normalized = cleanUrl(id);
3043
3120
  return /\.([^.\\/]+)$/.exec(normalized)?.[1] ?? "html";
3044
3121
  }
3045
- function createSourceCandidateContentCacheKey(extension, source, bareArbitraryValues, extractor) {
3046
- return `${extension}\0${JSON.stringify(bareArbitraryValues ?? false)}\0${extractor ? "custom" : "default"}\0${md5Hash(source)}`;
3122
+ function createSourceCandidateContentCacheKey(extension, source, bareArbitraryValues, customAttributesEntities, disabledDefaultTemplateHandler, extractor) {
3123
+ return [
3124
+ extension,
3125
+ JSON.stringify(bareArbitraryValues ?? false),
3126
+ createCustomAttributesCacheSignature(customAttributesEntities),
3127
+ disabledDefaultTemplateHandler === true ? "default-template:off" : "default-template:on",
3128
+ extractor ? "custom" : "default",
3129
+ md5Hash(source)
3130
+ ].join("\0");
3131
+ }
3132
+ function createCustomAttributesCacheSignature(customAttributesEntities) {
3133
+ return JSON.stringify((customAttributesEntities ?? []).map(([selector, props]) => [stringifyCustomAttributeToken(selector), Array.isArray(props) ? props.map(stringifyCustomAttributeToken) : stringifyCustomAttributeToken(props)]));
3134
+ }
3135
+ function stringifyCustomAttributeToken(token) {
3136
+ return typeof token === "string" ? `s:${token}` : `r:${token.source}/${token.flags}`;
3047
3137
  }
3048
3138
  async function extractCandidates(source, extension, options) {
3049
3139
  return extractCandidatesFromSource(source, extension, options);
@@ -3090,7 +3180,7 @@ function createSourceCandidateStore(options = {}) {
3090
3180
  const normalizedId = cleanUrl(id);
3091
3181
  scanSourceById.set(normalizedId, source);
3092
3182
  const extension = resolveSourceCandidateExtension(normalizedId);
3093
- const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues, options.extractor);
3183
+ const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues, options.customAttributesEntities, options.disabledDefaultTemplateHandler, options.extractor);
3094
3184
  const cachedCandidates = sourceCandidateContentCache.get(contentCacheKey);
3095
3185
  if (cachedCandidates) {
3096
3186
  replaceScanLayer(normalizedId, new Set(cachedCandidates));
@@ -3103,7 +3193,7 @@ function createSourceCandidateStore(options = {}) {
3103
3193
  async function syncCss(id, source) {
3104
3194
  const normalizedId = cleanUrl(id);
3105
3195
  cssSourceById.set(normalizedId, source);
3106
- const contentCacheKey = createSourceCandidateContentCacheKey("css", source, options.bareArbitraryValues, options.extractor);
3196
+ const contentCacheKey = createSourceCandidateContentCacheKey("css", source, options.bareArbitraryValues, options.customAttributesEntities, options.disabledDefaultTemplateHandler, options.extractor);
3107
3197
  const cachedCandidates = sourceCandidateContentCache.get(contentCacheKey);
3108
3198
  if (cachedCandidates) {
3109
3199
  replaceCssLayer(normalizedId, new Set(cachedCandidates));
@@ -3117,7 +3207,7 @@ function createSourceCandidateStore(options = {}) {
3117
3207
  const normalizedId = cleanUrl(id);
3118
3208
  transformSourceById.set(normalizedId, source);
3119
3209
  const extension = resolveSourceCandidateExtension(normalizedId);
3120
- const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues, options.extractor);
3210
+ const contentCacheKey = createSourceCandidateContentCacheKey(extension, source, options.bareArbitraryValues, options.customAttributesEntities, options.disabledDefaultTemplateHandler, options.extractor);
3121
3211
  const cachedCandidates = sourceCandidateContentCache.get(contentCacheKey);
3122
3212
  const extractedCandidates = cachedCandidates ? new Set(cachedCandidates) : await extractCandidates(source, extension, options);
3123
3213
  if (!cachedCandidates) sourceCandidateContentCache.set(contentCacheKey, [...extractedCandidates]);
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_framework = require("./framework.js");
3
- const require_generator = require("./generator-CS10c9g1.js");
4
- const require_gulp = require("./gulp-DNZZvUMq.js");
3
+ const require_generator = require("./generator-CEnUsjed.js");
4
+ const require_gulp = require("./gulp-C1Q3LRzg.js");
5
5
  const require_postcss = require("./postcss.js");
6
- const require_vite = require("./vite-DnkObu2L.js");
7
- const require_webpack = require("./webpack-CzXjfvYS.js");
6
+ const require_vite = require("./vite-BNlPdsGM.js");
7
+ const require_webpack = require("./webpack-Jpe048pQ.js");
8
8
  require("./webpack.js");
9
9
  let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
10
10
  exports.WeappTailwindcss = require_vite.WeappTailwindcss;
package/dist/index.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform } from "./framework.mjs";
2
- import { t as createWeappTailwindcssGenerator } from "./generator-BvPcmqxU.mjs";
3
- import { t as createPlugins } from "./gulp-BEOzXrbp.mjs";
2
+ import { t as createWeappTailwindcssGenerator } from "./generator-B59OA64h.mjs";
3
+ import { t as createPlugins } from "./gulp-DUYWxmZC.mjs";
4
4
  import weappTailwindcssPostcssPlugin from "./postcss.mjs";
5
- import { t as WeappTailwindcss } from "./vite-Tpgi77vE.mjs";
6
- import { n as weappTailwindcssPackageDir } from "./webpack-CTYm19zA.mjs";
5
+ import { t as WeappTailwindcss } from "./vite-CBU5NXTX.mjs";
6
+ import { n as weappTailwindcssPackageDir } from "./webpack-CZ38fMGC.mjs";
7
7
  import "./webpack.mjs";
8
8
  import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
9
9
  export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, detectAppType, detectAppTypeFromEnv, detectAppTypeFromPackageJson, isMpxPackage, isRunningInHBuilderX, isTaroPackage, isUniAppPackage, isUniAppVitePackage, isUniAppXManifest, isUniAppXPackage, isWeappVitePackage, resolveImplicitAppTypeFromViteRoot, resolveMpxPlatform, resolvePlatform, resolveTaroPlatform, resolveUniAppXPlatform, resolveUniPlatform, resolveUniPlatformsFromEnv, resolveUniUtsPlatform, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
package/dist/postcss.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_generator = require("./generator-CS10c9g1.js");
5
+ const require_generator = require("./generator-CEnUsjed.js");
6
6
  const weappTailwindcssPostcssPlugin = (0, require("@weapp-tailwindcss/postcss").createWeappTailwindcssPostcssPlugin)({
7
7
  createGenerator: (source) => {
8
8
  return require_generator.createWeappTailwindcssGenerator(source);
package/dist/postcss.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source } from "./generator-BvPcmqxU.mjs";
1
+ import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source } from "./generator-B59OA64h.mjs";
2
2
  import { createWeappTailwindcssPostcssPlugin } from "@weapp-tailwindcss/postcss";
3
3
  const weappTailwindcssPostcssPlugin = createWeappTailwindcssPostcssPlugin({
4
4
  createGenerator: (source) => {
package/dist/presets.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
3
3
  const require_framework = require("./framework.js");
4
4
  const require_object = require("./object-COs_Mw6p.js");
5
- const require_tailwindcss = require("./tailwindcss-z9JMF-qU.js");
5
+ const require_tailwindcss = require("./tailwindcss-KBYPJ2DW.js");
6
6
  require("./utils-CuKLf1Zv.js");
7
7
  require("./logger-TlKT3xmR.js");
8
8
  let node_path = require("node:path");
package/dist/presets.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { resolveTaroPlatform, resolveUniPlatformsFromEnv } from "./framework.mjs";
2
2
  import { t as omitUndefined } from "./object-BJSWl-E5.mjs";
3
- import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-DZT_pWrd.mjs";
3
+ import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-DPcKMLxL.mjs";
4
4
  import { n as defuOverrideArray } from "./utils-MVwpU07P.mjs";
5
5
  import { t as logger } from "./logger-BNzxZbZj.mjs";
6
6
  import path from "node:path";
package/dist/rspack.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
3
- const require_webpack = require("./webpack-CzXjfvYS.js");
3
+ const require_webpack = require("./webpack-Jpe048pQ.js");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_rolldown_runtime.__toESM(node_path);
6
6
  //#region src/bundlers/rspack/index.ts
package/dist/rspack.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-CTYm19zA.mjs";
1
+ import { n as weappTailwindcssPackageDir, r as __dirname, t as WeappTailwindcss } from "./webpack-CZ38fMGC.mjs";
2
2
  import path from "node:path";
3
3
  //#region src/bundlers/rspack/index.ts
4
4
  const CSS_IMPORT_REWRITE_LOADER_NAME = "weapp-tw-css-import-rewrite-loader";
@@ -1,8 +1,8 @@
1
1
  import { detectAppType } from "./framework.mjs";
2
2
  import { n as hasCssMacroTailwindV4CustomVariantConditionalComments } from "./auto-CrJJc5rK.mjs";
3
- import { g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions } from "./tailwindcss-DZT_pWrd.mjs";
3
+ import { g as resolveTailwindV4EntriesFromCssCached, i as resolveUniAppXOptions } from "./tailwindcss-DPcKMLxL.mjs";
4
4
  import { _ as babelParse, n as Parser, v as traverse } from "./wxml-DdGdeqaH.mjs";
5
- import { u as generateCssByGenerator } from "./hmr-timing-hRhRAjYV.mjs";
5
+ import { u as generateCssByGenerator } from "./hmr-timing-C3ed5vCx.mjs";
6
6
  import { createRequire } from "node:module";
7
7
  import path from "node:path";
8
8
  import process from "node:process";
@@ -702,78 +702,51 @@ function createLocalSourceEntries(sourceFile) {
702
702
  }];
703
703
  }
704
704
  function intersectCandidates(first, second) {
705
- const scoped = /* @__PURE__ */ new Set();
705
+ if (first.size === 0 || second.size === 0) return /* @__PURE__ */ new Set();
706
706
  const [small, large] = first.size <= second.size ? [first, second] : [second, first];
707
+ const scoped = /* @__PURE__ */ new Set();
707
708
  for (const candidate of small) if (large.has(candidate)) scoped.add(candidate);
708
709
  return scoped;
709
710
  }
710
- function intersectCandidateSourceMaps(first, second) {
711
- if (first.size === 0 || second.size === 0) return /* @__PURE__ */ new Map();
712
- const scoped = /* @__PURE__ */ new Map();
713
- for (const [candidate, sources] of first) if (second.has(candidate)) scoped.set(candidate, sources);
714
- return scoped;
715
- }
716
711
  function mergeCandidates(first, second) {
717
712
  return /* @__PURE__ */ new Set([...first, ...second]);
718
713
  }
719
- function intersectExplicitSourceCandidates(scopedCandidates, localCandidates) {
720
- if (localCandidates.size === 0 && scopedCandidates.size > 0) return scopedCandidates;
721
- return intersectCandidates(scopedCandidates, localCandidates);
722
- }
723
- function resolveExplicitSourceCandidates(scopedCandidates, localCandidates, fallbackCandidates) {
724
- if (scopedCandidates.size === 0 && localCandidates.size === 0 && fallbackCandidates?.size) return fallbackCandidates;
725
- return intersectExplicitSourceCandidates(scopedCandidates, localCandidates);
726
- }
727
- function resolveExplicitSourceMaps(scopedSources, localSources, fallbackSources) {
728
- if (scopedSources.size === 0 && localSources.size === 0 && fallbackSources?.size) return fallbackSources;
729
- if (localSources.size === 0 && scopedSources.size > 0) return scopedSources;
730
- return intersectCandidateSourceMaps(scopedSources, localSources);
714
+ function canFallbackToOutputCandidates(rawSource, entries) {
715
+ return rawSource.includes("@source") && entries.length > 0 && entries.every((entry) => !entry.negated);
731
716
  }
732
717
  function resolveScopedSourceEntries(rawSource, sourceFile, resolvedEntries) {
733
718
  if (!hasOwnSourceDirectives(rawSource)) return {
734
719
  entries: resolvedEntries,
735
720
  localEntries: void 0
736
721
  };
737
- const localEntries = createLocalSourceEntries(sourceFile);
738
- if (!resolvedEntries || resolvedEntries.length === 0) return {
739
- entries: localEntries,
740
- localEntries: void 0
741
- };
742
- return {
743
- entries: resolvedEntries,
744
- localEntries
745
- };
722
+ if (resolvedEntries !== void 0) return { entries: resolvedEntries };
723
+ return { entries: createLocalSourceEntries(sourceFile) };
746
724
  }
747
725
  async function resolveScopedGeneratorSourceEntries(rawSource, sourceFile) {
748
726
  return resolveScopedSourceEntries(rawSource, sourceFile, (await resolveTailwindV4EntriesFromCssCached(rawSource, path.dirname(path.resolve(sourceFile.replace(/[?#].*$/, "")))))?.entries);
749
727
  }
750
728
  async function createScopedGeneratorCandidateSignature(rawSource, sourceFile, fallbackSignature, getSourceCandidatesForEntries, options = {}) {
751
729
  if (!getSourceCandidatesForEntries || !hasOwnSourceDirectives(rawSource)) return fallbackSignature;
752
- const { entries, localEntries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
730
+ const { entries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
753
731
  if (entries === void 0) return fallbackSignature;
754
- const scopedCandidates = getSourceCandidatesForEntries(entries);
755
- const scopedSignature = createCandidateSignature(localEntries ? resolveExplicitSourceCandidates(scopedCandidates, getSourceCandidatesForEntries(localEntries), getSourceCandidatesForEntries(void 0)) : scopedCandidates);
732
+ const scopedSignature = createCandidateSignature(getSourceCandidatesForEntries(entries));
756
733
  return options.includeFallbackSignature === true ? `${scopedSignature}:${fallbackSignature}` : scopedSignature;
757
734
  }
758
735
  async function createScopedGeneratorSourceTraceMap(rawSource, sourceFile, getSourceCandidateSourcesForEntries) {
759
736
  if (!getSourceCandidateSourcesForEntries || !hasOwnSourceDirectives(rawSource)) return getSourceCandidateSourcesForEntries?.(void 0);
760
- const { entries, localEntries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
737
+ const { entries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
761
738
  if (entries === void 0) return getSourceCandidateSourcesForEntries(void 0);
762
- const scopedSources = getSourceCandidateSourcesForEntries(entries);
763
- return localEntries ? resolveExplicitSourceMaps(scopedSources, getSourceCandidateSourcesForEntries(localEntries), getSourceCandidateSourcesForEntries(void 0)) : scopedSources;
739
+ return getSourceCandidateSourcesForEntries(entries);
764
740
  }
765
741
  async function createScopedGeneratorRuntime(options) {
766
742
  const { cssHandlerOptions, fallbackRuntime, getSourceCandidatesForEntries, outputFile, rawSource, shouldExcludeSubpackageSourceCandidates, sourceFile, scopedSourceCandidateGetter } = options;
767
743
  if (getSourceCandidatesForEntries && rawSource && sourceFile) {
768
- const { entries, localEntries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
744
+ const { entries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
769
745
  if (entries !== void 0 && (entries.length > 0 || hasOwnSourceDirectives(rawSource))) {
770
- const scopedCandidates = scopedSourceCandidateGetter?.(entries) ?? getSourceCandidatesForEntries(entries);
771
- const shouldMergeFallbackRuntime = hasCssMacroTailwindV4CustomVariantConditionalComments(rawSource);
772
- if (!localEntries) return shouldMergeFallbackRuntime ? mergeCandidates(scopedCandidates, fallbackRuntime) : scopedCandidates;
773
- const localCandidates = scopedSourceCandidateGetter?.(localEntries) ?? getSourceCandidatesForEntries(localEntries);
774
- const fallbackCandidates = scopedSourceCandidateGetter?.(void 0);
775
- const scopedLocalCandidates = resolveExplicitSourceCandidates(scopedCandidates, localCandidates, fallbackCandidates);
776
- return shouldMergeFallbackRuntime ? mergeCandidates(scopedLocalCandidates, fallbackRuntime) : scopedLocalCandidates;
746
+ const explicitCandidates = getSourceCandidatesForEntries(entries);
747
+ const outputCandidates = scopedSourceCandidateGetter?.(void 0);
748
+ const scopedCandidates = outputCandidates ? explicitCandidates.size === 0 && canFallbackToOutputCandidates(rawSource, entries) ? outputCandidates : intersectCandidates(explicitCandidates, outputCandidates) : explicitCandidates;
749
+ return hasCssMacroTailwindV4CustomVariantConditionalComments(rawSource) ? mergeCandidates(scopedCandidates, fallbackRuntime) : scopedCandidates;
777
750
  }
778
751
  }
779
752
  const scopedCandidates = scopedSourceCandidateGetter?.(void 0);
@@ -1,9 +1,9 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
2
2
  const require_framework = require("./framework.js");
3
3
  require("./auto-DtU6f3X6.js");
4
- const require_tailwindcss = require("./tailwindcss-z9JMF-qU.js");
4
+ const require_tailwindcss = require("./tailwindcss-KBYPJ2DW.js");
5
5
  const require_wxml = require("./wxml-Ce10eREX.js");
6
- const require_hmr_timing = require("./hmr-timing-DW1g3zjl.js");
6
+ const require_hmr_timing = require("./hmr-timing-BZ5sWIqO.js");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_rolldown_runtime.__toESM(node_path);
9
9
  let node_process = require("node:process");
@@ -706,78 +706,51 @@ function createLocalSourceEntries(sourceFile) {
706
706
  }];
707
707
  }
708
708
  function intersectCandidates(first, second) {
709
- const scoped = /* @__PURE__ */ new Set();
709
+ if (first.size === 0 || second.size === 0) return /* @__PURE__ */ new Set();
710
710
  const [small, large] = first.size <= second.size ? [first, second] : [second, first];
711
+ const scoped = /* @__PURE__ */ new Set();
711
712
  for (const candidate of small) if (large.has(candidate)) scoped.add(candidate);
712
713
  return scoped;
713
714
  }
714
- function intersectCandidateSourceMaps(first, second) {
715
- if (first.size === 0 || second.size === 0) return /* @__PURE__ */ new Map();
716
- const scoped = /* @__PURE__ */ new Map();
717
- for (const [candidate, sources] of first) if (second.has(candidate)) scoped.set(candidate, sources);
718
- return scoped;
719
- }
720
715
  function mergeCandidates(first, second) {
721
716
  return /* @__PURE__ */ new Set([...first, ...second]);
722
717
  }
723
- function intersectExplicitSourceCandidates(scopedCandidates, localCandidates) {
724
- if (localCandidates.size === 0 && scopedCandidates.size > 0) return scopedCandidates;
725
- return intersectCandidates(scopedCandidates, localCandidates);
726
- }
727
- function resolveExplicitSourceCandidates(scopedCandidates, localCandidates, fallbackCandidates) {
728
- if (scopedCandidates.size === 0 && localCandidates.size === 0 && fallbackCandidates?.size) return fallbackCandidates;
729
- return intersectExplicitSourceCandidates(scopedCandidates, localCandidates);
730
- }
731
- function resolveExplicitSourceMaps(scopedSources, localSources, fallbackSources) {
732
- if (scopedSources.size === 0 && localSources.size === 0 && fallbackSources?.size) return fallbackSources;
733
- if (localSources.size === 0 && scopedSources.size > 0) return scopedSources;
734
- return intersectCandidateSourceMaps(scopedSources, localSources);
718
+ function canFallbackToOutputCandidates(rawSource, entries) {
719
+ return rawSource.includes("@source") && entries.length > 0 && entries.every((entry) => !entry.negated);
735
720
  }
736
721
  function resolveScopedSourceEntries(rawSource, sourceFile, resolvedEntries) {
737
722
  if (!hasOwnSourceDirectives(rawSource)) return {
738
723
  entries: resolvedEntries,
739
724
  localEntries: void 0
740
725
  };
741
- const localEntries = createLocalSourceEntries(sourceFile);
742
- if (!resolvedEntries || resolvedEntries.length === 0) return {
743
- entries: localEntries,
744
- localEntries: void 0
745
- };
746
- return {
747
- entries: resolvedEntries,
748
- localEntries
749
- };
726
+ if (resolvedEntries !== void 0) return { entries: resolvedEntries };
727
+ return { entries: createLocalSourceEntries(sourceFile) };
750
728
  }
751
729
  async function resolveScopedGeneratorSourceEntries(rawSource, sourceFile) {
752
730
  return resolveScopedSourceEntries(rawSource, sourceFile, (await require_tailwindcss.resolveTailwindV4EntriesFromCssCached(rawSource, node_path.default.dirname(node_path.default.resolve(sourceFile.replace(/[?#].*$/, "")))))?.entries);
753
731
  }
754
732
  async function createScopedGeneratorCandidateSignature(rawSource, sourceFile, fallbackSignature, getSourceCandidatesForEntries, options = {}) {
755
733
  if (!getSourceCandidatesForEntries || !hasOwnSourceDirectives(rawSource)) return fallbackSignature;
756
- const { entries, localEntries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
734
+ const { entries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
757
735
  if (entries === void 0) return fallbackSignature;
758
- const scopedCandidates = getSourceCandidatesForEntries(entries);
759
- const scopedSignature = createCandidateSignature(localEntries ? resolveExplicitSourceCandidates(scopedCandidates, getSourceCandidatesForEntries(localEntries), getSourceCandidatesForEntries(void 0)) : scopedCandidates);
736
+ const scopedSignature = createCandidateSignature(getSourceCandidatesForEntries(entries));
760
737
  return options.includeFallbackSignature === true ? `${scopedSignature}:${fallbackSignature}` : scopedSignature;
761
738
  }
762
739
  async function createScopedGeneratorSourceTraceMap(rawSource, sourceFile, getSourceCandidateSourcesForEntries) {
763
740
  if (!getSourceCandidateSourcesForEntries || !hasOwnSourceDirectives(rawSource)) return getSourceCandidateSourcesForEntries?.(void 0);
764
- const { entries, localEntries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
741
+ const { entries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
765
742
  if (entries === void 0) return getSourceCandidateSourcesForEntries(void 0);
766
- const scopedSources = getSourceCandidateSourcesForEntries(entries);
767
- return localEntries ? resolveExplicitSourceMaps(scopedSources, getSourceCandidateSourcesForEntries(localEntries), getSourceCandidateSourcesForEntries(void 0)) : scopedSources;
743
+ return getSourceCandidateSourcesForEntries(entries);
768
744
  }
769
745
  async function createScopedGeneratorRuntime(options) {
770
746
  const { cssHandlerOptions, fallbackRuntime, getSourceCandidatesForEntries, outputFile, rawSource, shouldExcludeSubpackageSourceCandidates, sourceFile, scopedSourceCandidateGetter } = options;
771
747
  if (getSourceCandidatesForEntries && rawSource && sourceFile) {
772
- const { entries, localEntries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
748
+ const { entries } = await resolveScopedGeneratorSourceEntries(rawSource, sourceFile);
773
749
  if (entries !== void 0 && (entries.length > 0 || hasOwnSourceDirectives(rawSource))) {
774
- const scopedCandidates = scopedSourceCandidateGetter?.(entries) ?? getSourceCandidatesForEntries(entries);
775
- const shouldMergeFallbackRuntime = (0, _weapp_tailwindcss_postcss.hasCssMacroTailwindV4CustomVariantConditionalComments)(rawSource);
776
- if (!localEntries) return shouldMergeFallbackRuntime ? mergeCandidates(scopedCandidates, fallbackRuntime) : scopedCandidates;
777
- const localCandidates = scopedSourceCandidateGetter?.(localEntries) ?? getSourceCandidatesForEntries(localEntries);
778
- const fallbackCandidates = scopedSourceCandidateGetter?.(void 0);
779
- const scopedLocalCandidates = resolveExplicitSourceCandidates(scopedCandidates, localCandidates, fallbackCandidates);
780
- return shouldMergeFallbackRuntime ? mergeCandidates(scopedLocalCandidates, fallbackRuntime) : scopedLocalCandidates;
750
+ const explicitCandidates = getSourceCandidatesForEntries(entries);
751
+ const outputCandidates = scopedSourceCandidateGetter?.(void 0);
752
+ const scopedCandidates = outputCandidates ? explicitCandidates.size === 0 && canFallbackToOutputCandidates(rawSource, entries) ? outputCandidates : intersectCandidates(explicitCandidates, outputCandidates) : explicitCandidates;
753
+ return (0, _weapp_tailwindcss_postcss.hasCssMacroTailwindV4CustomVariantConditionalComments)(rawSource) ? mergeCandidates(scopedCandidates, fallbackRuntime) : scopedCandidates;
781
754
  }
782
755
  }
783
756
  const scopedCandidates = scopedSourceCandidateGetter?.(void 0);
@@ -1,7 +1,11 @@
1
+ import type { ICustomAttributesEntities } from '../types';
1
2
  import type { IArbitraryValues } from '../types/shared';
2
3
  export interface SourceCandidateExtractionOptions {
3
4
  bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
5
+ customAttributesEntities?: ICustomAttributesEntities | undefined;
6
+ disabledDefaultTemplateHandler?: boolean | undefined;
4
7
  extractor?: ((source: string, extension: string) => Promise<Iterable<string>> | Iterable<string>) | undefined;
5
8
  }
6
9
  export declare function extractCandidatesFromSource(source: string, extension: string, options?: SourceCandidateExtractionOptions): Promise<Set<string>>;
10
+ export declare function extractTemplateAttributeCandidates(source: string, extension: string, options: SourceCandidateExtractionOptions): Promise<never[] | Set<string>>;
7
11
  export declare function extractScriptStringCandidates(source: string, extension: string, options: SourceCandidateExtractionOptions): Promise<never[] | Set<string>>;
@@ -1,4 +1,4 @@
1
- import { At as resolveTailwindV4CssSourceBase, C as findWorkspaceRoot, Ct as createTailwindSourceEntryMatcher, D as normalizeStringListOption, Dt as parseConfigParam, E as resolveTailwindcssOptions, Et as normalizeLegacyContentEntries, Mt as resolveCssMacroTailwindV4Source, Ot as resolveCssSourceEntries, Pt as loadTailwindV4DesignSystem, S as findWorkspacePackageDir, St as FULL_SOURCE_SCAN_PATTERN, T as normalizeTailwindcssRuntimeOptions, _ as groupCssEntriesByBase, b as normalizeCssEntries, d as resolveTailwindV4SourceFromRuntime, h as hasConfiguredTailwindV4CssRoots, i as normalizeWeappTailwindcssGeneratorOptions, m as filterTailwindV4CssSourceRoots, p as resolveTailwindV4SourceOptionsFromRuntime, v as guessBasedirFromEntries, w as normalizeExtendLengthUnits, wt as expandTailwindSourceEntries, x as findNearestPackageRoot, y as isTailwindV4CssEntry } from "./generator-BvPcmqxU.mjs";
1
+ import { At as resolveTailwindV4CssSourceBase, C as findWorkspaceRoot, Ct as createTailwindSourceEntryMatcher, D as normalizeStringListOption, Dt as parseConfigParam, E as resolveTailwindcssOptions, Et as normalizeLegacyContentEntries, Mt as resolveCssMacroTailwindV4Source, Ot as resolveCssSourceEntries, Pt as loadTailwindV4DesignSystem, S as findWorkspacePackageDir, St as FULL_SOURCE_SCAN_PATTERN, T as normalizeTailwindcssRuntimeOptions, _ as groupCssEntriesByBase, b as normalizeCssEntries, d as resolveTailwindV4SourceFromRuntime, h as hasConfiguredTailwindV4CssRoots, i as normalizeWeappTailwindcssGeneratorOptions, m as filterTailwindV4CssSourceRoots, p as resolveTailwindV4SourceOptionsFromRuntime, v as guessBasedirFromEntries, w as normalizeExtendLengthUnits, wt as expandTailwindSourceEntries, x as findNearestPackageRoot, y as isTailwindV4CssEntry } from "./generator-B59OA64h.mjs";
2
2
  import { t as omitUndefined } from "./object-BJSWl-E5.mjs";
3
3
  import { n as defuOverrideArray$1 } from "./utils-MVwpU07P.mjs";
4
4
  import { createRequire } from "node:module";
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.js");
2
- const require_generator = require("./generator-CS10c9g1.js");
2
+ const require_generator = require("./generator-CEnUsjed.js");
3
3
  const require_object = require("./object-COs_Mw6p.js");
4
4
  require("./utils-CuKLf1Zv.js");
5
5
  let node_fs = require("node:fs");