weapp-tailwindcss 5.0.0-next.24 → 5.0.0-next.25
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/auto-AduSz49t.mjs +80 -0
- package/dist/auto-B11j1XiD.js +117 -0
- package/dist/{bundle-state-DXFq2nEo.js → bundle-state-BY7PWHAc.js} +1 -1
- package/dist/{bundle-state-CP_BWXfx.mjs → bundle-state-CBouNDzi.mjs} +1 -1
- package/dist/cli.js +167 -5
- package/dist/cli.mjs +166 -4
- package/dist/context/runtime-package-replacements.d.ts +2 -0
- package/dist/context/style-options.d.ts +3 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/css-macro/auto.d.ts +10 -0
- package/dist/css-macro/constants.d.ts +5 -2
- package/dist/css-macro/postcss.d.ts +1 -0
- package/dist/css-macro/postcss.js +7 -47
- package/dist/css-macro/postcss.mjs +2 -47
- package/dist/css-macro.js +15 -6
- package/dist/css-macro.mjs +15 -6
- package/dist/{defaults-C6sIKXgC.mjs → defaults-B-1EEhdL.mjs} +2 -1
- package/dist/{defaults-D3cFX6Cq.js → defaults-C10hYUch.js} +2 -1
- package/dist/defaults.js +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/{generator-DdEgn8nG.mjs → generator-CtqzN9L-.mjs} +1 -1
- package/dist/{generator-BcH28HU-.js → generator-DTPePQZ9.js} +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/gulp.js +5 -5
- package/dist/gulp.mjs +5 -5
- package/dist/{incremental-runtime-class-set-Bux7viee.mjs → incremental-runtime-class-set-BlJ86j-A.mjs} +4 -16
- package/dist/{incremental-runtime-class-set-CWdfLHON.js → incremental-runtime-class-set-CERcE0fP.js} +4 -16
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -4
- package/dist/index.mjs +6 -5
- package/dist/{postcss-cD5PXmMU.js → postcss-BAO9tGi5.js} +2 -2
- package/dist/{postcss-nk5bhdoV.mjs → postcss-CYPHxj7a.mjs} +2 -2
- package/dist/postcss-DXkxsPNg.js +192 -0
- package/dist/postcss-DYktK8_T.mjs +169 -0
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-DreRGvYH.mjs → precheck-B4CpMt_w.mjs} +69 -32
- package/dist/{precheck-DtYqujIx.js → precheck-ezN3ovAq.js} +75 -32
- package/dist/presets/uni-app-x.d.ts +1 -0
- package/dist/presets.js +5 -4
- package/dist/presets.mjs +5 -4
- package/dist/{source-candidates-lHtAHLQq.js → source-candidates-0jPRIPmC.js} +1 -1
- package/dist/{source-candidates-B7wmEa-G.mjs → source-candidates-DoyOltpZ.mjs} +1 -1
- package/dist/{tailwindcss-BtUBeOes.js → tailwindcss-nQetCaPp.js} +17 -26
- package/dist/{tailwindcss-DO-VVR5k.mjs → tailwindcss-ujlr9Iad.mjs} +17 -26
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared.d.ts +3 -0
- package/dist/types/user-defined-options/general.d.ts +2 -1
- package/dist/types/user-defined-options/important.d.ts +3 -1
- package/dist/unocss/index.d.ts +2 -0
- package/dist/utils/options.d.ts +2 -0
- package/dist/utils/regex.d.ts +1 -0
- package/dist/{v3-engine-vHlppqaZ.js → v3-engine-Bbsrez2w.js} +67 -19
- package/dist/{v3-engine-CXqgQZUc.mjs → v3-engine-COw08vWd.mjs} +56 -20
- package/dist/{vite-BkNDGBZ2.js → vite-DE8Vfzal.js} +9 -9
- package/dist/{vite-BthAm8kt.mjs → vite-hZsQAY1a.mjs} +9 -9
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +329 -72
- package/dist/weapp-tw-runtime-classset-loader.js +1 -4
- package/dist/{webpack-prCus5xn.js → webpack-CTJcw_sX.js} +6 -6
- package/dist/{webpack-hPc8wUAi.mjs → webpack-c2WJnCJI.mjs} +6 -6
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +9 -11
- package/dist/constants-BG12WAKw.mjs +0 -44
- package/dist/constants-BeeyfJ9k.js +0 -73
- /package/dist/{logger-EVNB9z7i.js → logger-Cdzl3p8j.js} +0 -0
- /package/dist/{logger-CZUxvJJD.mjs → logger-Dr7IvyH2.mjs} +0 -0
- /package/dist/{utils-CGBVVNm6.mjs → utils-B2SJgA1L.mjs} +0 -0
- /package/dist/{utils-4ODFyoqD.js → utils-CSA174-I.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as
|
|
2
|
-
import { n as defuOverrideArray } from "./utils-
|
|
1
|
+
import { G as normalizeStringListOption, H as readInstalledPackageMajorVersion, J as findNearestPackageRoot, V as createTailwindcssPatcher, X as findWorkspaceRoot, Y as findWorkspacePackageDir, f as runtimeSignaturePatchersSymbol, q as omitUndefined } from "./v3-engine-COw08vWd.mjs";
|
|
2
|
+
import { n as defuOverrideArray } from "./utils-B2SJgA1L.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import path from "node:path";
|
|
@@ -107,14 +107,7 @@ function ensureDefaultsIncluded(value) {
|
|
|
107
107
|
return value;
|
|
108
108
|
}
|
|
109
109
|
function normalizeCssEntriesConfig(entries) {
|
|
110
|
-
|
|
111
|
-
if (typeof entries === "string") {
|
|
112
|
-
const trimmed = entries.trim();
|
|
113
|
-
return trimmed ? [trimmed] : void 0;
|
|
114
|
-
}
|
|
115
|
-
if (!Array.isArray(entries)) return;
|
|
116
|
-
const normalized = entries.map((entry) => typeof entry === "string" ? entry.trim() : "").filter((entry) => entry.length > 0);
|
|
117
|
-
return normalized.length > 0 ? normalized : void 0;
|
|
110
|
+
return normalizeStringListOption(entries);
|
|
118
111
|
}
|
|
119
112
|
function hasConfiguredCssEntries(ctx) {
|
|
120
113
|
if (normalizeCssEntriesConfig(ctx.cssEntries)) return true;
|
|
@@ -368,24 +361,22 @@ function tryCreateMultiTailwindcssPatcher(groups, options) {
|
|
|
368
361
|
}
|
|
369
362
|
//#endregion
|
|
370
363
|
//#region src/uni-app-x/options.ts
|
|
364
|
+
const DEFAULT_COMPONENT_LOCAL_STYLES_OPTIONS = {
|
|
365
|
+
enabled: true,
|
|
366
|
+
onlyWhenStyleIsolationVersion2: true
|
|
367
|
+
};
|
|
368
|
+
const DISABLED_COMPONENT_LOCAL_STYLES_OPTIONS = {
|
|
369
|
+
enabled: false,
|
|
370
|
+
onlyWhenStyleIsolationVersion2: true
|
|
371
|
+
};
|
|
372
|
+
function isBooleanUniAppXShortcut(option) {
|
|
373
|
+
return option === true || option === false || option === void 0;
|
|
374
|
+
}
|
|
371
375
|
function resolveComponentLocalStyles(option) {
|
|
372
|
-
if (option
|
|
373
|
-
enabled: false,
|
|
374
|
-
onlyWhenStyleIsolationVersion2: true
|
|
375
|
-
};
|
|
376
|
-
if (option === true || option === void 0) return {
|
|
377
|
-
enabled: false,
|
|
378
|
-
onlyWhenStyleIsolationVersion2: true
|
|
379
|
-
};
|
|
376
|
+
if (isBooleanUniAppXShortcut(option)) return DISABLED_COMPONENT_LOCAL_STYLES_OPTIONS;
|
|
380
377
|
const componentLocalStyles = option.componentLocalStyles;
|
|
381
|
-
if (componentLocalStyles === false) return
|
|
382
|
-
|
|
383
|
-
onlyWhenStyleIsolationVersion2: true
|
|
384
|
-
};
|
|
385
|
-
if (componentLocalStyles === true || componentLocalStyles === void 0) return {
|
|
386
|
-
enabled: true,
|
|
387
|
-
onlyWhenStyleIsolationVersion2: true
|
|
388
|
-
};
|
|
378
|
+
if (componentLocalStyles === false) return DISABLED_COMPONENT_LOCAL_STYLES_OPTIONS;
|
|
379
|
+
if (componentLocalStyles === true || componentLocalStyles === void 0) return DEFAULT_COMPONENT_LOCAL_STYLES_OPTIONS;
|
|
389
380
|
return {
|
|
390
381
|
enabled: componentLocalStyles.enabled !== false,
|
|
391
382
|
onlyWhenStyleIsolationVersion2: componentLocalStyles.onlyWhenStyleIsolationVersion2 !== false
|
package/dist/types/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import type { UniAppXComponentLocalStylesOptions, UniAppXOptions as UniAppXUserD
|
|
|
10
10
|
type AsyncableMethod<T> = T extends (...args: infer A) => infer R ? (...args: A) => Promise<Awaited<R>> | Awaited<R> : never;
|
|
11
11
|
export type { UniAppXComponentLocalStylesOptions, UniAppXUserDefinedOptions, UserDefinedOptions, };
|
|
12
12
|
export type { CssPreflightOptions, IStyleHandlerOptions, ItemOrItemArray };
|
|
13
|
-
export type { AppType, IArbitraryValues, ICustomAttributes, ICustomAttributesEntities } from './shared';
|
|
13
|
+
export type { AppType, IArbitraryValues, ICustomAttributes, ICustomAttributesEntities, IUnocssCompatibilityOptions } from './shared';
|
|
14
14
|
export type RequiredDefined<T> = {
|
|
15
15
|
[K in keyof T]-?: Exclude<T[K], undefined>;
|
|
16
16
|
};
|
package/dist/types/shared.d.ts
CHANGED
|
@@ -3,11 +3,12 @@ import type { LoadedPostcssOptions } from '@weapp-tailwindcss/postcss/types';
|
|
|
3
3
|
import type { ILengthUnitsPatchOptions, TailwindCssPatchOptions } from 'tailwindcss-patch';
|
|
4
4
|
import type { ICreateCacheReturnType } from '../../cache';
|
|
5
5
|
import type { WeappTailwindcssGeneratorUserOptions } from '../../generator';
|
|
6
|
-
import type { AppType, IArbitraryValues } from '../shared';
|
|
6
|
+
import type { AppType, IArbitraryValues, IUnocssCompatibilityOptions } from '../shared';
|
|
7
7
|
export interface UserDefinedOptionsGeneralPart {
|
|
8
8
|
supportCustomLengthUnitsPatch?: ILengthUnitsPatchOptions | boolean | undefined;
|
|
9
9
|
appType?: AppType | undefined;
|
|
10
10
|
arbitraryValues?: IArbitraryValues | undefined;
|
|
11
|
+
unocss?: boolean | IUnocssCompatibilityOptions | undefined;
|
|
11
12
|
jsPreserveClass?: ((keyword: string) => boolean | undefined) | undefined;
|
|
12
13
|
jsArbitraryValueFallback?: boolean | 'auto' | undefined;
|
|
13
14
|
replaceRuntimePackages?: boolean | Record<string, string> | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CssCalcOptions, CssPreflightOptions, IStyleHandlerOptions, PresetEnvOptions, Px2rpxOptions, Rem2rpxOptions, UniAppXUnsupportedMode, UnitsToPxOptions, WeappAutoprefixerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
1
|
+
import type { CssCalcOptions, CssPreflightOptions, IStyleHandlerOptions, PresetEnvOptions, Px2rpxOptions, Rem2rpxOptions, UniAppXUnsupportedMode, UnitConversionOptions, UnitsToPxOptions, WeappAutoprefixerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
2
|
import type { TailwindCssPatchOptions } from 'tailwindcss-patch';
|
|
3
3
|
import type { ICustomAttributes } from '../shared';
|
|
4
4
|
export interface UniAppXComponentLocalStylesOptions {
|
|
@@ -29,6 +29,8 @@ export interface UserDefinedOptionsImportantPart {
|
|
|
29
29
|
rem2rpx?: boolean | Rem2rpxOptions | undefined;
|
|
30
30
|
px2rpx?: boolean | Px2rpxOptions | undefined;
|
|
31
31
|
unitsToPx?: boolean | UnitsToPxOptions | undefined;
|
|
32
|
+
platform?: IStyleHandlerOptions['platform'] | undefined;
|
|
33
|
+
unitConversion?: UnitConversionOptions | undefined;
|
|
32
34
|
cssPresetEnv?: PresetEnvOptions | undefined;
|
|
33
35
|
atRules?: IStyleHandlerOptions['atRules'] | undefined;
|
|
34
36
|
autoprefixer?: WeappAutoprefixerOptions | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function escapeStringRegexp(str: string): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
+
const require_auto = require("./auto-B11j1XiD.js");
|
|
2
3
|
let node_fs = require("node:fs");
|
|
3
4
|
node_fs = require_chunk.__toESM(node_fs);
|
|
4
5
|
let node_module = require("node:module");
|
|
@@ -88,17 +89,31 @@ function omitUndefined(value) {
|
|
|
88
89
|
return Object.fromEntries(definedEntries(value));
|
|
89
90
|
}
|
|
90
91
|
//#endregion
|
|
92
|
+
//#region src/utils/options.ts
|
|
93
|
+
function resolveBooleanObjectOption(value, enabledValue) {
|
|
94
|
+
if (!value) return false;
|
|
95
|
+
if (value === true) return enabledValue;
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
function normalizeStringListOption(value) {
|
|
99
|
+
if (!value) return;
|
|
100
|
+
const values = typeof value === "string" ? [value] : Array.isArray(value) ? value : void 0;
|
|
101
|
+
if (!values) return;
|
|
102
|
+
const normalized = values.map((entry) => typeof entry === "string" ? entry.trim() : "").filter((entry) => entry.length > 0);
|
|
103
|
+
return normalized.length > 0 ? normalized : void 0;
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
91
106
|
//#region src/tailwindcss/patcher-options.ts
|
|
92
107
|
function resolveTailwindcssOptions(options) {
|
|
93
108
|
return options?.tailwindcss ?? options?.tailwind;
|
|
94
109
|
}
|
|
95
110
|
function normalizeExtendLengthUnits(value) {
|
|
96
|
-
if (value ===
|
|
97
|
-
|
|
98
|
-
|
|
111
|
+
if (value === void 0) return;
|
|
112
|
+
const resolved = resolveBooleanObjectOption(value, { enabled: true });
|
|
113
|
+
return resolved && typeof resolved === "object" ? {
|
|
99
114
|
enabled: true,
|
|
100
|
-
...
|
|
101
|
-
};
|
|
115
|
+
...resolved
|
|
116
|
+
} : resolved;
|
|
102
117
|
}
|
|
103
118
|
function normalizeTailwindcssPatcherOptions(options) {
|
|
104
119
|
return options;
|
|
@@ -748,10 +763,12 @@ async function transformTailwindV4CssToWeapp(css, options) {
|
|
|
748
763
|
majorVersion: 4,
|
|
749
764
|
...options
|
|
750
765
|
});
|
|
751
|
-
|
|
766
|
+
const pruneOptions = { preserveConditionalComments: require_auto.hasCssMacroStyleOptions(options) };
|
|
767
|
+
return (0, _weapp_tailwindcss_postcss.pruneMiniProgramGeneratedCss)(protectedCss.restore(result.css), pruneOptions);
|
|
752
768
|
}
|
|
753
769
|
async function transformTailwindV4CssByTarget(css, target, options) {
|
|
754
|
-
|
|
770
|
+
if (target === "weapp") return transformTailwindV4CssToWeapp(css, options);
|
|
771
|
+
return require_auto.hasCssMacroStyleOptions(options) ? require_auto.transformCssMacroCss(css) : css;
|
|
755
772
|
}
|
|
756
773
|
//#endregion
|
|
757
774
|
//#region src/tailwindcss/v4-engine/tailwind-v3-default-colors.ts
|
|
@@ -1652,6 +1669,9 @@ function createIncrementalStyleOptions(styleOptions) {
|
|
|
1652
1669
|
isMainChunk: false
|
|
1653
1670
|
};
|
|
1654
1671
|
}
|
|
1672
|
+
function resolveStyleOptions$1(source, options) {
|
|
1673
|
+
return require_auto.hasCssMacroTailwindV4Directive(source.css) ? require_auto.withCssMacroStyleOptions(options) : options;
|
|
1674
|
+
}
|
|
1655
1675
|
function collectCustomPropertyValues(css) {
|
|
1656
1676
|
const values = /* @__PURE__ */ new Map();
|
|
1657
1677
|
try {
|
|
@@ -1805,6 +1825,7 @@ function removeUnsupportedThemeVendorKeyframes(css) {
|
|
|
1805
1825
|
function createTailwindV4Engine(source) {
|
|
1806
1826
|
async function generateOnce(generateSource, options = {}) {
|
|
1807
1827
|
const { scanSources = true, styleOptions, tailwindcssV3Compatibility, target = "weapp", ...patchOptions } = options;
|
|
1828
|
+
const resolvedStyleOptions = resolveStyleOptions$1(generateSource, styleOptions);
|
|
1808
1829
|
const engine = (0, tailwindcss_patch.createTailwindV4Engine)(createCompatibleSource(generateSource, target, tailwindcssV3Compatibility));
|
|
1809
1830
|
const resolvedScanSources = await resolveScanSources(generateSource, scanSources);
|
|
1810
1831
|
const filesystemCandidates = Array.isArray(resolvedScanSources) ? new Set(await (0, tailwindcss_patch.extractRawCandidates)(resolvedScanSources)) : void 0;
|
|
@@ -1815,7 +1836,7 @@ function createTailwindV4Engine(source) {
|
|
|
1815
1836
|
candidates: normalizedCandidates.candidates
|
|
1816
1837
|
}));
|
|
1817
1838
|
const rawCss = restoreRpxTextCssSelectors(result.css, normalizedCandidates.restoreCandidates);
|
|
1818
|
-
const css = await transformTailwindV4CssByTarget(rawCss, target,
|
|
1839
|
+
const css = await transformTailwindV4CssByTarget(rawCss, target, resolvedStyleOptions);
|
|
1819
1840
|
return {
|
|
1820
1841
|
...result,
|
|
1821
1842
|
classSet: restoreRpxTextCandidates(result.classSet, normalizedCandidates.restoreCandidates),
|
|
@@ -1829,8 +1850,9 @@ function createTailwindV4Engine(source) {
|
|
|
1829
1850
|
const target = options.target ?? "weapp";
|
|
1830
1851
|
const compatibleSource = createCompatibleSource(source, target, options.tailwindcssV3Compatibility);
|
|
1831
1852
|
const requestedCandidates = resolveTargetCandidates(options.candidates, target);
|
|
1853
|
+
const styleOptions = resolveStyleOptions$1(source, options.styleOptions);
|
|
1832
1854
|
if ((options.sources?.length ?? 0) > 0 || options.bareArbitraryValues !== void 0 || Array.isArray(options.scanSources)) return generateOnce(source, options);
|
|
1833
|
-
const cacheKey = createIncrementalGenerateCacheKey$1(compatibleSource, target,
|
|
1855
|
+
const cacheKey = createIncrementalGenerateCacheKey$1(compatibleSource, target, styleOptions, options.tailwindcssV3Compatibility);
|
|
1834
1856
|
if (options.scanSources === true) return runIncrementalGenerateTask(cacheKey, requestedCandidates, options.scanSources, async () => {
|
|
1835
1857
|
const generated = await generateOnce(source, options);
|
|
1836
1858
|
seedIncrementalGenerateCache({
|
|
@@ -1875,7 +1897,7 @@ function createTailwindV4Engine(source) {
|
|
|
1875
1897
|
}
|
|
1876
1898
|
const rawCss = rawCssParts.join("\n");
|
|
1877
1899
|
const incrementalCss = rawCss.length > 0 ? await transformTailwindV4CssByTarget(rawCss, target, {
|
|
1878
|
-
...createIncrementalStyleOptions(
|
|
1900
|
+
...createIncrementalStyleOptions(styleOptions),
|
|
1879
1901
|
customPropertyValues: cached.customPropertyValues
|
|
1880
1902
|
}) : "";
|
|
1881
1903
|
for (const candidate of missingCandidates) cached.seenCandidates.add(candidate);
|
|
@@ -1903,7 +1925,7 @@ function createTailwindV4Engine(source) {
|
|
|
1903
1925
|
compatibleSource,
|
|
1904
1926
|
generated,
|
|
1905
1927
|
requestedCandidates,
|
|
1906
|
-
styleOptions
|
|
1928
|
+
styleOptions,
|
|
1907
1929
|
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility,
|
|
1908
1930
|
target
|
|
1909
1931
|
});
|
|
@@ -2802,16 +2824,22 @@ function ensureMiniProgramV3PreflightReset(css, cssPreflight) {
|
|
|
2802
2824
|
}
|
|
2803
2825
|
}
|
|
2804
2826
|
async function transformTailwindV3CssToWeapp(css, options) {
|
|
2805
|
-
|
|
2827
|
+
const result = await defaultStyleHandler(css, {
|
|
2806
2828
|
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
2807
2829
|
cssRemoveHoverPseudoClass: true,
|
|
2808
2830
|
isMainChunk: true,
|
|
2809
2831
|
majorVersion: 3,
|
|
2810
2832
|
...options
|
|
2811
|
-
})
|
|
2833
|
+
});
|
|
2834
|
+
const pruneOptions = {
|
|
2835
|
+
preservePreflight: true,
|
|
2836
|
+
preserveConditionalComments: require_auto.hasCssMacroStyleOptions(options)
|
|
2837
|
+
};
|
|
2838
|
+
return ensureMiniProgramV3PreflightReset((0, _weapp_tailwindcss_postcss.pruneMiniProgramGeneratedCss)(result.css, pruneOptions), options?.cssPreflight);
|
|
2812
2839
|
}
|
|
2813
2840
|
async function transformTailwindV3CssByTarget(css, target, options) {
|
|
2814
|
-
|
|
2841
|
+
if (target === "weapp") return transformTailwindV3CssToWeapp(css, options);
|
|
2842
|
+
return require_auto.hasCssMacroStyleOptions(options) ? require_auto.transformCssMacroCss(css) : css;
|
|
2815
2843
|
}
|
|
2816
2844
|
//#endregion
|
|
2817
2845
|
//#region src/tailwindcss/v3-engine/generator.ts
|
|
@@ -2874,7 +2902,7 @@ function extractClassCandidatesFromSelector(selector, candidates) {
|
|
|
2874
2902
|
escaped = true;
|
|
2875
2903
|
continue;
|
|
2876
2904
|
}
|
|
2877
|
-
if (/[\w-]/.test(char)) {
|
|
2905
|
+
if (char && /[\w-]/.test(char)) {
|
|
2878
2906
|
candidate += char;
|
|
2879
2907
|
continue;
|
|
2880
2908
|
}
|
|
@@ -2935,6 +2963,12 @@ function createTailwindConfig(source, options) {
|
|
|
2935
2963
|
config.content = hasExplicitContentInput(options) ? createExplicitContentConfig(rawEntries) : mergeContent(config.content, rawEntries);
|
|
2936
2964
|
return config;
|
|
2937
2965
|
}
|
|
2966
|
+
function shouldAutoEnableCssMacro(source) {
|
|
2967
|
+
return require_auto.hasCssMacroTailwindPlugin(normalizeConfigObject(source.configObject)?.plugins);
|
|
2968
|
+
}
|
|
2969
|
+
function resolveStyleOptions(source, options) {
|
|
2970
|
+
return shouldAutoEnableCssMacro(source) ? require_auto.withCssMacroStyleOptions(options) : options;
|
|
2971
|
+
}
|
|
2938
2972
|
function loadTailwindV3Internals(source) {
|
|
2939
2973
|
const requireFromProject = (0, node_module.createRequire)(`${source.cwd}/package.json`);
|
|
2940
2974
|
const requireFromRuntime = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href);
|
|
@@ -3069,6 +3103,7 @@ function createTailwindV3Engine(source) {
|
|
|
3069
3103
|
tailwindInternals ?? (tailwindInternals = loadTailwindV3Internals(source));
|
|
3070
3104
|
const internals = tailwindInternals;
|
|
3071
3105
|
const { styleOptions, target = "weapp" } = options;
|
|
3106
|
+
const resolvedStyleOptions = resolveStyleOptions(generateSource, styleOptions);
|
|
3072
3107
|
const tailwindConfig = internals.validateConfig(internals.resolveConfig(createTailwindConfig(generateSource, options)));
|
|
3073
3108
|
const candidates = mergeGenerateCandidates(generateSource, options);
|
|
3074
3109
|
const changedContent = createChangedContentEntries(candidates, options.sources ?? []);
|
|
@@ -3093,7 +3128,7 @@ function createTailwindV3Engine(source) {
|
|
|
3093
3128
|
context = await internals.processTailwindFeatures(setupContext)(root, result);
|
|
3094
3129
|
}
|
|
3095
3130
|
const rawCss = root.toString();
|
|
3096
|
-
const css = await transformTailwindV3CssByTarget(rawCss, target,
|
|
3131
|
+
const css = await transformTailwindV3CssByTarget(rawCss, target, resolvedStyleOptions);
|
|
3097
3132
|
const dependencies = collectDependencyMessages(result);
|
|
3098
3133
|
for (const dependency of generateSource.dependencies) dependencies.add(dependency);
|
|
3099
3134
|
const classSet = collectClassSet(context);
|
|
@@ -3124,7 +3159,7 @@ function createTailwindV3Engine(source) {
|
|
|
3124
3159
|
internals.collapseDuplicateDeclarations(context)(root, result);
|
|
3125
3160
|
const rawCss = root.toString();
|
|
3126
3161
|
return {
|
|
3127
|
-
css: await transformTailwindV3CssByTarget(rawCss, target, styleOptions),
|
|
3162
|
+
css: await transformTailwindV3CssByTarget(rawCss, target, resolveStyleOptions(source, styleOptions)),
|
|
3128
3163
|
rawCss,
|
|
3129
3164
|
classSet: collectClassSet(context),
|
|
3130
3165
|
dependencies: collectDependencyMessages(result)
|
|
@@ -3135,7 +3170,8 @@ function createTailwindV3Engine(source) {
|
|
|
3135
3170
|
const target = options.target ?? "weapp";
|
|
3136
3171
|
const requestedCandidates = mergeGenerateCandidates(source, options);
|
|
3137
3172
|
if (requestedCandidates.size === 0) return generateOnce(source, options);
|
|
3138
|
-
const
|
|
3173
|
+
const styleOptions = resolveStyleOptions(source, options.styleOptions);
|
|
3174
|
+
const cacheKey = createIncrementalGenerateCacheKey(source, target, styleOptions);
|
|
3139
3175
|
const cached = incrementalGenerateCache.get(cacheKey);
|
|
3140
3176
|
if (cached) {
|
|
3141
3177
|
const missingCandidates = [...requestedCandidates].filter((candidate) => !cached.seenCandidates.has(candidate));
|
|
@@ -3152,7 +3188,7 @@ function createTailwindV3Engine(source) {
|
|
|
3152
3188
|
target: cached.target,
|
|
3153
3189
|
version: 3
|
|
3154
3190
|
};
|
|
3155
|
-
const generated = await generateIncrementalMissingUtilities(cached.context, missingCandidates, target,
|
|
3191
|
+
const generated = await generateIncrementalMissingUtilities(cached.context, missingCandidates, target, styleOptions);
|
|
3156
3192
|
for (const candidate of missingCandidates) cached.seenCandidates.add(candidate);
|
|
3157
3193
|
for (const className of generated.classSet) cached.classSet.add(className);
|
|
3158
3194
|
cached.css = [cached.css, generated.css].filter(Boolean).join("\n");
|
|
@@ -3420,6 +3456,12 @@ Object.defineProperty(exports, "normalizeLegacyContentEntries", {
|
|
|
3420
3456
|
return normalizeLegacyContentEntries;
|
|
3421
3457
|
}
|
|
3422
3458
|
});
|
|
3459
|
+
Object.defineProperty(exports, "normalizeStringListOption", {
|
|
3460
|
+
enumerable: true,
|
|
3461
|
+
get: function() {
|
|
3462
|
+
return normalizeStringListOption;
|
|
3463
|
+
}
|
|
3464
|
+
});
|
|
3423
3465
|
Object.defineProperty(exports, "omitUndefined", {
|
|
3424
3466
|
enumerable: true,
|
|
3425
3467
|
get: function() {
|
|
@@ -3438,6 +3480,12 @@ Object.defineProperty(exports, "readInstalledPackageMajorVersion", {
|
|
|
3438
3480
|
return readInstalledPackageMajorVersion;
|
|
3439
3481
|
}
|
|
3440
3482
|
});
|
|
3483
|
+
Object.defineProperty(exports, "resolveBooleanObjectOption", {
|
|
3484
|
+
enumerable: true,
|
|
3485
|
+
get: function() {
|
|
3486
|
+
return resolveBooleanObjectOption;
|
|
3487
|
+
}
|
|
3488
|
+
});
|
|
3441
3489
|
Object.defineProperty(exports, "resolveCssSourceEntries", {
|
|
3442
3490
|
enumerable: true,
|
|
3443
3491
|
get: function() {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { a as transformCssMacroCss, n as hasCssMacroTailwindPlugin, o as withCssMacroStyleOptions, r as hasCssMacroTailwindV4Directive, t as hasCssMacroStyleOptions } from "./auto-AduSz49t.mjs";
|
|
1
2
|
import { createRequire } from "node:module";
|
|
2
3
|
import fs, { existsSync, readFileSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
3
4
|
import postcss from "postcss";
|
|
@@ -80,17 +81,31 @@ function omitUndefined(value) {
|
|
|
80
81
|
return Object.fromEntries(definedEntries(value));
|
|
81
82
|
}
|
|
82
83
|
//#endregion
|
|
84
|
+
//#region src/utils/options.ts
|
|
85
|
+
function resolveBooleanObjectOption(value, enabledValue) {
|
|
86
|
+
if (!value) return false;
|
|
87
|
+
if (value === true) return enabledValue;
|
|
88
|
+
return value;
|
|
89
|
+
}
|
|
90
|
+
function normalizeStringListOption(value) {
|
|
91
|
+
if (!value) return;
|
|
92
|
+
const values = typeof value === "string" ? [value] : Array.isArray(value) ? value : void 0;
|
|
93
|
+
if (!values) return;
|
|
94
|
+
const normalized = values.map((entry) => typeof entry === "string" ? entry.trim() : "").filter((entry) => entry.length > 0);
|
|
95
|
+
return normalized.length > 0 ? normalized : void 0;
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
83
98
|
//#region src/tailwindcss/patcher-options.ts
|
|
84
99
|
function resolveTailwindcssOptions(options) {
|
|
85
100
|
return options?.tailwindcss ?? options?.tailwind;
|
|
86
101
|
}
|
|
87
102
|
function normalizeExtendLengthUnits(value) {
|
|
88
|
-
if (value ===
|
|
89
|
-
|
|
90
|
-
|
|
103
|
+
if (value === void 0) return;
|
|
104
|
+
const resolved = resolveBooleanObjectOption(value, { enabled: true });
|
|
105
|
+
return resolved && typeof resolved === "object" ? {
|
|
91
106
|
enabled: true,
|
|
92
|
-
...
|
|
93
|
-
};
|
|
107
|
+
...resolved
|
|
108
|
+
} : resolved;
|
|
94
109
|
}
|
|
95
110
|
function normalizeTailwindcssPatcherOptions(options) {
|
|
96
111
|
return options;
|
|
@@ -740,10 +755,12 @@ async function transformTailwindV4CssToWeapp(css, options) {
|
|
|
740
755
|
majorVersion: 4,
|
|
741
756
|
...options
|
|
742
757
|
});
|
|
743
|
-
|
|
758
|
+
const pruneOptions = { preserveConditionalComments: hasCssMacroStyleOptions(options) };
|
|
759
|
+
return pruneMiniProgramGeneratedCss(protectedCss.restore(result.css), pruneOptions);
|
|
744
760
|
}
|
|
745
761
|
async function transformTailwindV4CssByTarget(css, target, options) {
|
|
746
|
-
|
|
762
|
+
if (target === "weapp") return transformTailwindV4CssToWeapp(css, options);
|
|
763
|
+
return hasCssMacroStyleOptions(options) ? transformCssMacroCss(css) : css;
|
|
747
764
|
}
|
|
748
765
|
//#endregion
|
|
749
766
|
//#region src/tailwindcss/v4-engine/tailwind-v3-default-colors.ts
|
|
@@ -1644,6 +1661,9 @@ function createIncrementalStyleOptions(styleOptions) {
|
|
|
1644
1661
|
isMainChunk: false
|
|
1645
1662
|
};
|
|
1646
1663
|
}
|
|
1664
|
+
function resolveStyleOptions$1(source, options) {
|
|
1665
|
+
return hasCssMacroTailwindV4Directive(source.css) ? withCssMacroStyleOptions(options) : options;
|
|
1666
|
+
}
|
|
1647
1667
|
function collectCustomPropertyValues(css) {
|
|
1648
1668
|
const values = /* @__PURE__ */ new Map();
|
|
1649
1669
|
try {
|
|
@@ -1797,6 +1817,7 @@ function removeUnsupportedThemeVendorKeyframes(css) {
|
|
|
1797
1817
|
function createTailwindV4Engine$1(source) {
|
|
1798
1818
|
async function generateOnce(generateSource, options = {}) {
|
|
1799
1819
|
const { scanSources = true, styleOptions, tailwindcssV3Compatibility, target = "weapp", ...patchOptions } = options;
|
|
1820
|
+
const resolvedStyleOptions = resolveStyleOptions$1(generateSource, styleOptions);
|
|
1800
1821
|
const engine = createTailwindV4Engine(createCompatibleSource(generateSource, target, tailwindcssV3Compatibility));
|
|
1801
1822
|
const resolvedScanSources = await resolveScanSources(generateSource, scanSources);
|
|
1802
1823
|
const filesystemCandidates = Array.isArray(resolvedScanSources) ? new Set(await extractRawCandidates(resolvedScanSources)) : void 0;
|
|
@@ -1807,7 +1828,7 @@ function createTailwindV4Engine$1(source) {
|
|
|
1807
1828
|
candidates: normalizedCandidates.candidates
|
|
1808
1829
|
}));
|
|
1809
1830
|
const rawCss = restoreRpxTextCssSelectors(result.css, normalizedCandidates.restoreCandidates);
|
|
1810
|
-
const css = await transformTailwindV4CssByTarget(rawCss, target,
|
|
1831
|
+
const css = await transformTailwindV4CssByTarget(rawCss, target, resolvedStyleOptions);
|
|
1811
1832
|
return {
|
|
1812
1833
|
...result,
|
|
1813
1834
|
classSet: restoreRpxTextCandidates(result.classSet, normalizedCandidates.restoreCandidates),
|
|
@@ -1821,8 +1842,9 @@ function createTailwindV4Engine$1(source) {
|
|
|
1821
1842
|
const target = options.target ?? "weapp";
|
|
1822
1843
|
const compatibleSource = createCompatibleSource(source, target, options.tailwindcssV3Compatibility);
|
|
1823
1844
|
const requestedCandidates = resolveTargetCandidates(options.candidates, target);
|
|
1845
|
+
const styleOptions = resolveStyleOptions$1(source, options.styleOptions);
|
|
1824
1846
|
if ((options.sources?.length ?? 0) > 0 || options.bareArbitraryValues !== void 0 || Array.isArray(options.scanSources)) return generateOnce(source, options);
|
|
1825
|
-
const cacheKey = createIncrementalGenerateCacheKey$1(compatibleSource, target,
|
|
1847
|
+
const cacheKey = createIncrementalGenerateCacheKey$1(compatibleSource, target, styleOptions, options.tailwindcssV3Compatibility);
|
|
1826
1848
|
if (options.scanSources === true) return runIncrementalGenerateTask(cacheKey, requestedCandidates, options.scanSources, async () => {
|
|
1827
1849
|
const generated = await generateOnce(source, options);
|
|
1828
1850
|
seedIncrementalGenerateCache({
|
|
@@ -1867,7 +1889,7 @@ function createTailwindV4Engine$1(source) {
|
|
|
1867
1889
|
}
|
|
1868
1890
|
const rawCss = rawCssParts.join("\n");
|
|
1869
1891
|
const incrementalCss = rawCss.length > 0 ? await transformTailwindV4CssByTarget(rawCss, target, {
|
|
1870
|
-
...createIncrementalStyleOptions(
|
|
1892
|
+
...createIncrementalStyleOptions(styleOptions),
|
|
1871
1893
|
customPropertyValues: cached.customPropertyValues
|
|
1872
1894
|
}) : "";
|
|
1873
1895
|
for (const candidate of missingCandidates) cached.seenCandidates.add(candidate);
|
|
@@ -1895,7 +1917,7 @@ function createTailwindV4Engine$1(source) {
|
|
|
1895
1917
|
compatibleSource,
|
|
1896
1918
|
generated,
|
|
1897
1919
|
requestedCandidates,
|
|
1898
|
-
styleOptions
|
|
1920
|
+
styleOptions,
|
|
1899
1921
|
tailwindcssV3Compatibility: options.tailwindcssV3Compatibility,
|
|
1900
1922
|
target
|
|
1901
1923
|
});
|
|
@@ -2794,16 +2816,22 @@ function ensureMiniProgramV3PreflightReset(css, cssPreflight) {
|
|
|
2794
2816
|
}
|
|
2795
2817
|
}
|
|
2796
2818
|
async function transformTailwindV3CssToWeapp(css, options) {
|
|
2797
|
-
|
|
2819
|
+
const result = await defaultStyleHandler(css, {
|
|
2798
2820
|
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
2799
2821
|
cssRemoveHoverPseudoClass: true,
|
|
2800
2822
|
isMainChunk: true,
|
|
2801
2823
|
majorVersion: 3,
|
|
2802
2824
|
...options
|
|
2803
|
-
})
|
|
2825
|
+
});
|
|
2826
|
+
const pruneOptions = {
|
|
2827
|
+
preservePreflight: true,
|
|
2828
|
+
preserveConditionalComments: hasCssMacroStyleOptions(options)
|
|
2829
|
+
};
|
|
2830
|
+
return ensureMiniProgramV3PreflightReset(pruneMiniProgramGeneratedCss(result.css, pruneOptions), options?.cssPreflight);
|
|
2804
2831
|
}
|
|
2805
2832
|
async function transformTailwindV3CssByTarget(css, target, options) {
|
|
2806
|
-
|
|
2833
|
+
if (target === "weapp") return transformTailwindV3CssToWeapp(css, options);
|
|
2834
|
+
return hasCssMacroStyleOptions(options) ? transformCssMacroCss(css) : css;
|
|
2807
2835
|
}
|
|
2808
2836
|
//#endregion
|
|
2809
2837
|
//#region src/tailwindcss/v3-engine/generator.ts
|
|
@@ -2866,7 +2894,7 @@ function extractClassCandidatesFromSelector(selector, candidates) {
|
|
|
2866
2894
|
escaped = true;
|
|
2867
2895
|
continue;
|
|
2868
2896
|
}
|
|
2869
|
-
if (/[\w-]/.test(char)) {
|
|
2897
|
+
if (char && /[\w-]/.test(char)) {
|
|
2870
2898
|
candidate += char;
|
|
2871
2899
|
continue;
|
|
2872
2900
|
}
|
|
@@ -2927,6 +2955,12 @@ function createTailwindConfig(source, options) {
|
|
|
2927
2955
|
config.content = hasExplicitContentInput(options) ? createExplicitContentConfig(rawEntries) : mergeContent(config.content, rawEntries);
|
|
2928
2956
|
return config;
|
|
2929
2957
|
}
|
|
2958
|
+
function shouldAutoEnableCssMacro(source) {
|
|
2959
|
+
return hasCssMacroTailwindPlugin(normalizeConfigObject(source.configObject)?.plugins);
|
|
2960
|
+
}
|
|
2961
|
+
function resolveStyleOptions(source, options) {
|
|
2962
|
+
return shouldAutoEnableCssMacro(source) ? withCssMacroStyleOptions(options) : options;
|
|
2963
|
+
}
|
|
2930
2964
|
function loadTailwindV3Internals(source) {
|
|
2931
2965
|
const requireFromProject = createRequire(`${source.cwd}/package.json`);
|
|
2932
2966
|
const requireFromRuntime = createRequire(import.meta.url);
|
|
@@ -3061,6 +3095,7 @@ function createTailwindV3Engine(source) {
|
|
|
3061
3095
|
tailwindInternals ?? (tailwindInternals = loadTailwindV3Internals(source));
|
|
3062
3096
|
const internals = tailwindInternals;
|
|
3063
3097
|
const { styleOptions, target = "weapp" } = options;
|
|
3098
|
+
const resolvedStyleOptions = resolveStyleOptions(generateSource, styleOptions);
|
|
3064
3099
|
const tailwindConfig = internals.validateConfig(internals.resolveConfig(createTailwindConfig(generateSource, options)));
|
|
3065
3100
|
const candidates = mergeGenerateCandidates(generateSource, options);
|
|
3066
3101
|
const changedContent = createChangedContentEntries(candidates, options.sources ?? []);
|
|
@@ -3085,7 +3120,7 @@ function createTailwindV3Engine(source) {
|
|
|
3085
3120
|
context = await internals.processTailwindFeatures(setupContext)(root, result);
|
|
3086
3121
|
}
|
|
3087
3122
|
const rawCss = root.toString();
|
|
3088
|
-
const css = await transformTailwindV3CssByTarget(rawCss, target,
|
|
3123
|
+
const css = await transformTailwindV3CssByTarget(rawCss, target, resolvedStyleOptions);
|
|
3089
3124
|
const dependencies = collectDependencyMessages(result);
|
|
3090
3125
|
for (const dependency of generateSource.dependencies) dependencies.add(dependency);
|
|
3091
3126
|
const classSet = collectClassSet(context);
|
|
@@ -3116,7 +3151,7 @@ function createTailwindV3Engine(source) {
|
|
|
3116
3151
|
internals.collapseDuplicateDeclarations(context)(root, result);
|
|
3117
3152
|
const rawCss = root.toString();
|
|
3118
3153
|
return {
|
|
3119
|
-
css: await transformTailwindV3CssByTarget(rawCss, target, styleOptions),
|
|
3154
|
+
css: await transformTailwindV3CssByTarget(rawCss, target, resolveStyleOptions(source, styleOptions)),
|
|
3120
3155
|
rawCss,
|
|
3121
3156
|
classSet: collectClassSet(context),
|
|
3122
3157
|
dependencies: collectDependencyMessages(result)
|
|
@@ -3127,7 +3162,8 @@ function createTailwindV3Engine(source) {
|
|
|
3127
3162
|
const target = options.target ?? "weapp";
|
|
3128
3163
|
const requestedCandidates = mergeGenerateCandidates(source, options);
|
|
3129
3164
|
if (requestedCandidates.size === 0) return generateOnce(source, options);
|
|
3130
|
-
const
|
|
3165
|
+
const styleOptions = resolveStyleOptions(source, options.styleOptions);
|
|
3166
|
+
const cacheKey = createIncrementalGenerateCacheKey(source, target, styleOptions);
|
|
3131
3167
|
const cached = incrementalGenerateCache.get(cacheKey);
|
|
3132
3168
|
if (cached) {
|
|
3133
3169
|
const missingCandidates = [...requestedCandidates].filter((candidate) => !cached.seenCandidates.has(candidate));
|
|
@@ -3144,7 +3180,7 @@ function createTailwindV3Engine(source) {
|
|
|
3144
3180
|
target: cached.target,
|
|
3145
3181
|
version: 3
|
|
3146
3182
|
};
|
|
3147
|
-
const generated = await generateIncrementalMissingUtilities(cached.context, missingCandidates, target,
|
|
3183
|
+
const generated = await generateIncrementalMissingUtilities(cached.context, missingCandidates, target, styleOptions);
|
|
3148
3184
|
for (const candidate of missingCandidates) cached.seenCandidates.add(candidate);
|
|
3149
3185
|
for (const className of generated.classSet) cached.classSet.add(className);
|
|
3150
3186
|
cached.css = [cached.css, generated.css].filter(Boolean).join("\n");
|
|
@@ -3274,4 +3310,4 @@ function resolveTailwindV3SourceFromPatcher(patcher) {
|
|
|
3274
3310
|
return resolveTailwindV3Source(resolveTailwindV3SourceOptionsFromPatcher(patcher));
|
|
3275
3311
|
}
|
|
3276
3312
|
//#endregion
|
|
3277
|
-
export { collectCssInlineSourceCandidates as A, createDebug as B, createTailwindV4Engine$1 as C, loadTailwindV4DesignSystem as D, filterUnsupportedMiniProgramTailwindV4Candidates as E, parseConfigParam$1 as F,
|
|
3313
|
+
export { collectCssInlineSourceCandidates as A, createDebug as B, createTailwindV4Engine$1 as C, loadTailwindV4DesignSystem as D, filterUnsupportedMiniProgramTailwindV4Candidates as E, parseConfigParam$1 as F, normalizeStringListOption as G, readInstalledPackageMajorVersion as H, resolveCssSourceEntries as I, findNearestPackageRoot as J, resolveBooleanObjectOption as K, resolveSourceScanPath as L, expandTailwindSourceEntries as M, isFileMatchedByTailwindSourceEntries as N, DEFAULT_SOURCE_SCAN_EXTENSIONS as O, normalizeLegacyContentEntries as P, resolveTailwindV4CssSourceBase as R, resolveTailwindV4SourceOptionsFromPatcher as S, transformTailwindV4CssToWeapp as T, findTailwindConfig as U, createTailwindcssPatcher as V, resolveTailwindcssOptions as W, findWorkspaceRoot as X, findWorkspacePackageDir as Y, resolveViteSourceScanEntries as _, transformTailwindV3CssByTarget as a, resolveTailwindV4SourceFromPatchOptions as b, getRuntimeClassSetCacheEntry as c, invalidateRuntimeClassSet as d, runtimeSignaturePatchersSymbol as f, resolveTailwindV4EntriesFromCssCached as g, resolveTailwindV4EntriesFromCss as h, createTailwindV3Engine as i, createSourceScanPattern as j, FULL_SOURCE_SCAN_EXTENSION_RE as k, getRuntimeClassSetSignature as l, discoverTailwindV4CssEntries as m, resolveTailwindV3SourceFromPatcher as n, transformTailwindV3CssToWeapp as o, createViteSourceScanMatcher as p, omitUndefined as q, resolveTailwindV3SourceOptionsFromPatcher as r, ensureTailwindcssRuntimePatch as s, resolveTailwindV3Source as t, getRuntimeClassSetSignatureWithSources as u, resolveViteTailwindV4CssDependencies as v, transformTailwindV4CssByTarget as w, resolveTailwindV4SourceFromPatcher as x, resolveTailwindV4Source$1 as y, toPosixPath as z };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-
|
|
5
|
-
const require_precheck = require("./precheck-
|
|
6
|
-
const require_utils = require("./utils-
|
|
7
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
8
|
-
const require_source_candidates = require("./source-candidates-
|
|
9
|
-
const require_bundle_state = require("./bundle-state-
|
|
10
|
-
require("./logger-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-Bbsrez2w.js");
|
|
3
|
+
const require_generator = require("./generator-DTPePQZ9.js");
|
|
4
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-CERcE0fP.js");
|
|
5
|
+
const require_precheck = require("./precheck-ezN3ovAq.js");
|
|
6
|
+
const require_utils = require("./utils-CSA174-I.js");
|
|
7
|
+
const require_tailwindcss = require("./tailwindcss-nQetCaPp.js");
|
|
8
|
+
const require_source_candidates = require("./source-candidates-0jPRIPmC.js");
|
|
9
|
+
const require_bundle_state = require("./bundle-state-BY7PWHAc.js");
|
|
10
|
+
require("./logger-Cdzl3p8j.js");
|
|
11
11
|
let node_fs = require("node:fs");
|
|
12
12
|
node_fs = require_chunk.__toESM(node_fs);
|
|
13
13
|
let postcss = require("postcss");
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { B as createDebug, E as filterUnsupportedMiniProgramTailwindV4Candidates,
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-
|
|
3
|
-
import { a as validateCandidatesByGenerator, c as hasTailwindSourceDirectives, i as generateCssByGenerator, l as normalizeTailwindSourceForGenerator, n as createHmrTimingRecorder, o as processCachedTask, s as hasTailwindRootDirectives, t as createBundleRuntimeClassSetManager, u as hasTailwindGeneratedCssMarkers } from "./incremental-runtime-class-set-
|
|
4
|
-
import { a as
|
|
5
|
-
import { o as resolveUniUtsPlatform } from "./utils-
|
|
6
|
-
import { c as upsertTailwindV4CssSource, i as resolveUniAppXOptions, r as isUniAppXEnabled, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-
|
|
7
|
-
import { n as isSourceCandidateRequest, t as createSourceCandidateCollector } from "./source-candidates-
|
|
8
|
-
import { a as createBundleModuleGraphOptions, b as toAbsoluteOutputPath, c as hasBundlerGeneratedCssMarker, d as resolvePluginDisabledState, f as cleanUrl, g as isSourceStyleRequest, h as slash, i as applyLinkedResults, l as stripBundlerGeneratedCssMarkers, m as isCSSRequest, n as createBundleBuildState, o as pushConcurrentTaskFactories, p as formatPostcssSourceMap, r as updateBundleBuildState, s as createBundlerGeneratedCssMarker, t as buildBundleSnapshot, u as resolvePackageDir, v as normalizeOutputPathKey } from "./bundle-state-
|
|
9
|
-
import { t as logger$1 } from "./logger-
|
|
1
|
+
import { B as createDebug, E as filterUnsupportedMiniProgramTailwindV4Candidates, J as findNearestPackageRoot, U as findTailwindConfig, W as resolveTailwindcssOptions, _ as resolveViteSourceScanEntries, g as resolveTailwindV4EntriesFromCssCached, l as getRuntimeClassSetSignature, m as discoverTailwindV4CssEntries, p as createViteSourceScanMatcher, q as omitUndefined, v as resolveViteTailwindV4CssDependencies } from "./v3-engine-COw08vWd.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-CtqzN9L-.mjs";
|
|
3
|
+
import { a as validateCandidatesByGenerator, c as hasTailwindSourceDirectives, i as generateCssByGenerator, l as normalizeTailwindSourceForGenerator, n as createHmrTimingRecorder, o as processCachedTask, s as hasTailwindRootDirectives, t as createBundleRuntimeClassSetManager, u as hasTailwindGeneratedCssMarkers } from "./incremental-runtime-class-set-BlJ86j-A.mjs";
|
|
4
|
+
import { _ as createTailwindRuntimeReadyPromise, a as vitePluginName, c as analyzeSource, d as isClassContextLiteralPath, f as replaceWxml, g as collectRuntimeClassSet, h as toCustomAttributesEntities, l as JsTokenUpdater, n as getCompilerContext, o as generateCode, p as babelParse, s as createAttributeMatcher, t as shouldSkipJsTransform, u as _defineProperty, y as refreshTailwindRuntimeState } from "./precheck-B4CpMt_w.mjs";
|
|
5
|
+
import { o as resolveUniUtsPlatform } from "./utils-B2SJgA1L.mjs";
|
|
6
|
+
import { c as upsertTailwindV4CssSource, i as resolveUniAppXOptions, r as isUniAppXEnabled, s as hasConfiguredTailwindV4CssRoots } from "./tailwindcss-ujlr9Iad.mjs";
|
|
7
|
+
import { n as isSourceCandidateRequest, t as createSourceCandidateCollector } from "./source-candidates-DoyOltpZ.mjs";
|
|
8
|
+
import { a as createBundleModuleGraphOptions, b as toAbsoluteOutputPath, c as hasBundlerGeneratedCssMarker, d as resolvePluginDisabledState, f as cleanUrl, g as isSourceStyleRequest, h as slash, i as applyLinkedResults, l as stripBundlerGeneratedCssMarkers, m as isCSSRequest, n as createBundleBuildState, o as pushConcurrentTaskFactories, p as formatPostcssSourceMap, r as updateBundleBuildState, s as createBundlerGeneratedCssMarker, t as buildBundleSnapshot, u as resolvePackageDir, v as normalizeOutputPathKey } from "./bundle-state-CBouNDzi.mjs";
|
|
9
|
+
import { t as logger$1 } from "./logger-Dr7IvyH2.mjs";
|
|
10
10
|
import fs, { existsSync, readFileSync } from "node:fs";
|
|
11
11
|
import postcss from "postcss";
|
|
12
12
|
import path from "node:path";
|
package/dist/vite.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_vite = require("./vite-
|
|
2
|
+
const require_vite = require("./vite-DE8Vfzal.js");
|
|
3
3
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_vite.WeappTailwindcss;
|
package/dist/vite.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
1
|
+
import { t as WeappTailwindcss } from "./vite-hZsQAY1a.mjs";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss };
|