weapp-tailwindcss 5.0.8 → 5.0.11
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-CTp6wE5a.js +33 -0
- package/dist/auto-Cl8_hsG6.mjs +22 -0
- package/dist/{bundle-state-cHwTyrOS.js → bundle-state-BwtEqxvU.js} +3 -3
- package/dist/{bundle-state-5FtFktJr.mjs → bundle-state-CXzPknlT.mjs} +2 -2
- package/dist/bundlers/vite/official-tailwind-plugins.d.ts +0 -2
- package/dist/cli.js +1 -159
- package/dist/cli.mjs +1 -159
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/css-macro/auto.d.ts +1 -7
- package/dist/css-macro/postcss.d.ts +1 -6
- package/dist/css-macro/postcss.js +15 -3
- package/dist/css-macro/postcss.mjs +2 -2
- package/dist/css-macro.js +19 -5
- package/dist/css-macro.mjs +16 -2
- package/dist/{generator-C--TrAod.js → generator-ChgOWNOj.js} +1 -1
- package/dist/{generator-DnwUQOXB.mjs → generator-h2XRiJ9-.mjs} +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/{gulp-B22YSGU_.mjs → gulp-Be88jhoY.mjs} +5 -5
- package/dist/{gulp-5Tan5bHG.js → gulp-CHtZF-oT.js} +6 -6
- package/dist/gulp.js +1 -1
- package/dist/gulp.mjs +1 -1
- package/dist/{hmr-timing-CscCNKb9.js → hmr-timing-BkivBZvN.js} +41 -43
- package/dist/{hmr-timing-DK-mine6.mjs → hmr-timing-Ct5w4hdM.mjs} +6 -7
- package/dist/index.js +6 -6
- package/dist/index.mjs +5 -5
- package/dist/postcss.d.ts +2 -13
- package/dist/postcss.js +14 -3
- package/dist/postcss.mjs +10 -1
- package/dist/{precheck-CcxTR7E_.mjs → precheck-BpHxsWRd.mjs} +4 -4
- package/dist/{precheck-B8y6tDvG.js → precheck-CY9oaH49.js} +5 -5
- package/dist/presets.js +4 -4
- package/dist/presets.mjs +3 -3
- package/dist/tailwindcss/source-scan/inline-source.d.ts +1 -1
- package/dist/{tailwindcss-0DaftXcU.mjs → tailwindcss-Bfy2egdX.mjs} +2 -2
- package/dist/{tailwindcss-DbZ4o4m_.js → tailwindcss-DbbAKAZP.js} +3 -3
- package/dist/{transform-DiW_u3eD.js → transform-Cd634UZV.js} +1 -1
- package/dist/{transform-DRyWUN5X.mjs → transform-r5evL6Hn.mjs} +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/{v3-engine-ArQVHEau.mjs → v3-engine-CFkP6dWF.mjs} +4 -5
- package/dist/{v3-engine-DdlvXpID.js → v3-engine-D0yA9ZkF.js} +35 -73
- package/dist/{vite-_iUhzc4t.mjs → vite-Bd8qf9dK.mjs} +21 -423
- package/dist/{vite-C_IUnDBy.js → vite-j9cB2Ff1.js} +38 -443
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/watch-dependencies-bpG6kmAf.js +80 -0
- package/dist/weapp-tw-css-import-rewrite-loader.js +60 -393
- package/dist/weapp-tw-runtime-classset-loader.js +2 -2
- package/dist/{webpack-KLoTb5Dr.js → webpack-CJAOcYEO.js} +8 -8
- package/dist/{webpack-CqnI4Ymw.mjs → webpack-DPdrcC2X.mjs} +7 -7
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +3 -5
- package/dist/auto-Cvy0zWpS.js +0 -238
- package/dist/auto-DEHRmEAx.mjs +0 -200
- package/dist/bundlers/vite/postcss-config.d.ts +0 -6
- package/dist/bundlers/vite/processed-css-assets/css-rules.d.ts +0 -17
- package/dist/postcss/config-directive.d.ts +0 -1
- package/dist/postcss/context.d.ts +0 -9
- package/dist/postcss/source-files.d.ts +0 -8
- package/dist/postcss/tailwind-version.d.ts +0 -3
- package/dist/postcss-C7BMYpEF.mjs +0 -169
- package/dist/postcss-CiYLsqZn.js +0 -192
- package/dist/postcss-CjWuDZwL.mjs +0 -275
- package/dist/postcss-R5pDVHUy.js +0 -284
- package/dist/watch-dependencies-zwx4EhBn.js +0 -5535
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_auto = require("./auto-
|
|
2
|
+
const require_auto = require("./auto-CTp6wE5a.js");
|
|
3
3
|
let node_module = require("node:module");
|
|
4
|
-
let
|
|
5
|
-
postcss = require_chunk.__toESM(postcss);
|
|
4
|
+
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
6
5
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
7
6
|
tailwindcss_patch = require_chunk.__toESM(tailwindcss_patch);
|
|
8
|
-
let node_process = require("node:process");
|
|
9
|
-
node_process = require_chunk.__toESM(node_process);
|
|
10
7
|
let node_fs = require("node:fs");
|
|
11
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
12
9
|
let node_path = require("node:path");
|
|
13
10
|
node_path = require_chunk.__toESM(node_path);
|
|
11
|
+
let node_process = require("node:process");
|
|
12
|
+
node_process = require_chunk.__toESM(node_process);
|
|
14
13
|
let _weapp_tailwindcss_logger = require("@weapp-tailwindcss/logger");
|
|
15
14
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
16
15
|
let node_url = require("node:url");
|
|
@@ -19,7 +18,6 @@ debug = require_chunk.__toESM(debug);
|
|
|
19
18
|
let node_fs_promises = require("node:fs/promises");
|
|
20
19
|
let micromatch = require("micromatch");
|
|
21
20
|
micromatch = require_chunk.__toESM(micromatch);
|
|
22
|
-
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
23
21
|
let fast_glob = require("fast-glob");
|
|
24
22
|
fast_glob = require_chunk.__toESM(fast_glob);
|
|
25
23
|
let tailwindcss_config = require("tailwindcss-config");
|
|
@@ -61,7 +59,7 @@ function collectApplyCandidatesFromCss(css) {
|
|
|
61
59
|
if (!css.includes("@apply")) return [];
|
|
62
60
|
const candidates = /* @__PURE__ */ new Set();
|
|
63
61
|
try {
|
|
64
|
-
postcss.
|
|
62
|
+
_weapp_tailwindcss_postcss.postcss.parse(css).walkAtRules("apply", (rule) => {
|
|
65
63
|
for (const candidate of rule.params.split(/\s+/)) {
|
|
66
64
|
const normalized = candidate.replace(/!important$/, "").trim();
|
|
67
65
|
if (normalized) candidates.add(normalized);
|
|
@@ -102,7 +100,7 @@ function collectLayerCandidatesFromCss(css) {
|
|
|
102
100
|
if (!css.includes("@layer")) return [];
|
|
103
101
|
const candidates = /* @__PURE__ */ new Set();
|
|
104
102
|
try {
|
|
105
|
-
postcss.
|
|
103
|
+
_weapp_tailwindcss_postcss.postcss.parse(css).walkAtRules("layer", (layer) => {
|
|
106
104
|
if (!isTailwindCandidateLayer(layer.params)) return;
|
|
107
105
|
layer.walkRules((rule) => {
|
|
108
106
|
extractClassCandidatesFromSelector(rule.selector, candidates);
|
|
@@ -1663,7 +1661,7 @@ function removeUnlayeredTailwindV4PreflightImports(css) {
|
|
|
1663
1661
|
if (!css.includes("preflight")) return css;
|
|
1664
1662
|
let root;
|
|
1665
1663
|
try {
|
|
1666
|
-
root = postcss.
|
|
1664
|
+
root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
1667
1665
|
} catch {
|
|
1668
1666
|
return css;
|
|
1669
1667
|
}
|
|
@@ -1691,7 +1689,7 @@ function removeUnsupportedThemeVendorKeyframes(css) {
|
|
|
1691
1689
|
if (!css.includes("@theme") || !css.includes("@-")) return css;
|
|
1692
1690
|
let root;
|
|
1693
1691
|
try {
|
|
1694
|
-
root = postcss.
|
|
1692
|
+
root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
1695
1693
|
} catch {
|
|
1696
1694
|
return css;
|
|
1697
1695
|
}
|
|
@@ -1822,7 +1820,7 @@ async function resolveCssDefinedScanSources(source) {
|
|
|
1822
1820
|
const from = source.dependencies[0];
|
|
1823
1821
|
let root;
|
|
1824
1822
|
try {
|
|
1825
|
-
root = postcss.
|
|
1823
|
+
root = _weapp_tailwindcss_postcss.postcss.parse(source.css, { from });
|
|
1826
1824
|
} catch {
|
|
1827
1825
|
return;
|
|
1828
1826
|
}
|
|
@@ -1869,7 +1867,7 @@ function normalizeTailwindV4GeneratedUrlValues(css) {
|
|
|
1869
1867
|
});
|
|
1870
1868
|
}
|
|
1871
1869
|
async function transformTailwindV4CssToWeapp(css, options) {
|
|
1872
|
-
const protectedCss = (0, _weapp_tailwindcss_postcss.protectDynamicColorMixAlpha)(normalizeTailwindV4GeneratedUrlValues(
|
|
1870
|
+
const protectedCss = (0, _weapp_tailwindcss_postcss.protectDynamicColorMixAlpha)(normalizeTailwindV4GeneratedUrlValues((0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options) ? await (0, _weapp_tailwindcss_postcss.transformCssMacroCss)(css, options) : css), { customPropertyValues: options && "customPropertyValues" in options ? options.customPropertyValues : void 0 });
|
|
1873
1871
|
const result = await defaultStyleHandler$1(protectedCss.css, {
|
|
1874
1872
|
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
1875
1873
|
cssRemoveHoverPseudoClass: true,
|
|
@@ -1877,12 +1875,12 @@ async function transformTailwindV4CssToWeapp(css, options) {
|
|
|
1877
1875
|
majorVersion: 4,
|
|
1878
1876
|
...options
|
|
1879
1877
|
});
|
|
1880
|
-
const pruneOptions = { preserveConditionalComments:
|
|
1878
|
+
const pruneOptions = { preserveConditionalComments: (0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options) };
|
|
1881
1879
|
return (0, _weapp_tailwindcss_postcss.pruneMiniProgramGeneratedCss)(protectedCss.restore(result.css), pruneOptions);
|
|
1882
1880
|
}
|
|
1883
1881
|
async function transformTailwindV4CssByTarget(css, target, options) {
|
|
1884
1882
|
if (target === "weapp") return transformTailwindV4CssToWeapp(css, options);
|
|
1885
|
-
return
|
|
1883
|
+
return (0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options) ? (0, _weapp_tailwindcss_postcss.transformCssMacroCss)(css, options) : css;
|
|
1886
1884
|
}
|
|
1887
1885
|
//#endregion
|
|
1888
1886
|
//#region src/tailwindcss/v4-engine/generator.ts
|
|
@@ -1969,12 +1967,12 @@ function createIncrementalStyleOptions(styleOptions) {
|
|
|
1969
1967
|
};
|
|
1970
1968
|
}
|
|
1971
1969
|
function resolveStyleOptions$1(source, options) {
|
|
1972
|
-
return
|
|
1970
|
+
return (0, _weapp_tailwindcss_postcss.hasCssMacroTailwindV4Directive)(source.css) ? (0, _weapp_tailwindcss_postcss.withCssMacroStyleOptions)(options) : options;
|
|
1973
1971
|
}
|
|
1974
1972
|
function collectCustomPropertyValues(css) {
|
|
1975
1973
|
const values = /* @__PURE__ */ new Map();
|
|
1976
1974
|
try {
|
|
1977
|
-
postcss.
|
|
1975
|
+
_weapp_tailwindcss_postcss.postcss.parse(css).walkDecls((decl) => {
|
|
1978
1976
|
if (decl.prop.startsWith("--")) values.set(decl.prop, decl.value.trim());
|
|
1979
1977
|
});
|
|
1980
1978
|
} catch {}
|
|
@@ -2413,7 +2411,7 @@ function parseImportRequest(params) {
|
|
|
2413
2411
|
function hasLocalCssImport(rawSource) {
|
|
2414
2412
|
let found = false;
|
|
2415
2413
|
try {
|
|
2416
|
-
postcss.
|
|
2414
|
+
_weapp_tailwindcss_postcss.postcss.parse(rawSource).walkAtRules("import", (rule) => {
|
|
2417
2415
|
const request = parseImportRequest(rule.params);
|
|
2418
2416
|
if (request?.startsWith(".") === true || request?.startsWith("/") === true) {
|
|
2419
2417
|
found = true;
|
|
@@ -2482,12 +2480,12 @@ function normalizeTailwindSourceForGenerator(rawSource, options = {}) {
|
|
|
2482
2480
|
}
|
|
2483
2481
|
function normalizeTailwindV3CssEntrySource(rawSource) {
|
|
2484
2482
|
try {
|
|
2485
|
-
const root = postcss.
|
|
2483
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(rawSource);
|
|
2486
2484
|
let changed = false;
|
|
2487
2485
|
root.walkAtRules("import", (node) => {
|
|
2488
2486
|
const layer = TAILWIND_V3_SUBPATH_IMPORT_LAYERS.get(parseImportRequest(node.params) ?? "");
|
|
2489
2487
|
if (!layer) return;
|
|
2490
|
-
node.replaceWith(postcss.
|
|
2488
|
+
node.replaceWith(_weapp_tailwindcss_postcss.postcss.atRule({
|
|
2491
2489
|
name: "tailwind",
|
|
2492
2490
|
params: layer
|
|
2493
2491
|
}));
|
|
@@ -2501,7 +2499,7 @@ function normalizeTailwindV3CssEntrySource(rawSource) {
|
|
|
2501
2499
|
function normalizeTailwindSourceDirectives(rawSource, options = {}) {
|
|
2502
2500
|
if (!options.importFallback) return rawSource;
|
|
2503
2501
|
try {
|
|
2504
|
-
const root = postcss.
|
|
2502
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(rawSource);
|
|
2505
2503
|
return normalizeTailwindImportAtRules(root, options) ? root.toString() : rawSource;
|
|
2506
2504
|
} catch {
|
|
2507
2505
|
return extractTailwindSourceForPostcssFallback(rawSource, options) ?? rawSource;
|
|
@@ -2536,7 +2534,7 @@ function removeTailwindSourceDirectives(rawSource, options = {}) {
|
|
|
2536
2534
|
try {
|
|
2537
2535
|
const source = hasPreprocessorOnlySyntax(rawSource) ? extractTailwindSourceForPostcssFallback(rawSource, options) : stripGeneratorPlaceholderMarkers(rawSource);
|
|
2538
2536
|
if (!source) return "";
|
|
2539
|
-
const root = postcss.
|
|
2537
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(source);
|
|
2540
2538
|
let removed = false;
|
|
2541
2539
|
root.walk((node) => {
|
|
2542
2540
|
if (isTailwindSourceDirective(node, options)) {
|
|
@@ -2552,7 +2550,7 @@ function removeTailwindSourceDirectives(rawSource, options = {}) {
|
|
|
2552
2550
|
function hasTailwindSourceDirectives(rawSource, options = {}) {
|
|
2553
2551
|
try {
|
|
2554
2552
|
if (GENERATOR_PLACEHOLDER_MARKER_RE.test(rawSource)) return true;
|
|
2555
|
-
const root = postcss.
|
|
2553
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(rawSource);
|
|
2556
2554
|
let found = false;
|
|
2557
2555
|
const ignoreLayer = hasGeneratedCssArtifacts(rawSource);
|
|
2558
2556
|
root.walk((node) => {
|
|
@@ -2572,7 +2570,7 @@ function hasTailwindSourceDirectives(rawSource, options = {}) {
|
|
|
2572
2570
|
function hasTailwindRootDirectives(rawSource, options = {}) {
|
|
2573
2571
|
if (!TAILWIND_ROOT_DIRECTIVE_RE.test(rawSource) && !(options.importFallback && rawSource.includes("weapp-tailwindcss"))) return false;
|
|
2574
2572
|
try {
|
|
2575
|
-
const root = postcss.
|
|
2573
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(rawSource);
|
|
2576
2574
|
let found = false;
|
|
2577
2575
|
root.walkAtRules((node) => {
|
|
2578
2576
|
const request = node.name === "import" ? parseImportRequest(node.params) : node.name === "config" || node.name === "plugin" ? parseConfigRequest(node.params) : void 0;
|
|
@@ -2589,7 +2587,7 @@ function hasTailwindRootDirectives(rawSource, options = {}) {
|
|
|
2589
2587
|
function hasTailwindApplyDirective(rawSource) {
|
|
2590
2588
|
if (!rawSource.includes("@apply")) return false;
|
|
2591
2589
|
try {
|
|
2592
|
-
const root = postcss.
|
|
2590
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(rawSource);
|
|
2593
2591
|
let found = false;
|
|
2594
2592
|
root.walkAtRules("apply", () => {
|
|
2595
2593
|
found = true;
|
|
@@ -2602,7 +2600,7 @@ function hasTailwindApplyDirective(rawSource) {
|
|
|
2602
2600
|
}
|
|
2603
2601
|
function resolveCssEntrySource(rawSource, base, options = {}) {
|
|
2604
2602
|
try {
|
|
2605
|
-
const root = postcss.
|
|
2603
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(rawSource);
|
|
2606
2604
|
const normalizedImports = normalizeTailwindImportAtRules(root, options);
|
|
2607
2605
|
let found = false;
|
|
2608
2606
|
let config;
|
|
@@ -2745,7 +2743,7 @@ function normalizeTailwindV4CssPackageImports(css, packageName) {
|
|
|
2745
2743
|
if (!css.includes("tailwindcss")) return css;
|
|
2746
2744
|
let root;
|
|
2747
2745
|
try {
|
|
2748
|
-
root = postcss.
|
|
2746
|
+
root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
2749
2747
|
} catch {
|
|
2750
2748
|
return css;
|
|
2751
2749
|
}
|
|
@@ -3156,7 +3154,7 @@ async function resolveConfigContentEntries(root, base) {
|
|
|
3156
3154
|
async function resolveTailwindV4EntriesFromCss(css, base) {
|
|
3157
3155
|
let root;
|
|
3158
3156
|
try {
|
|
3159
|
-
root = postcss.
|
|
3157
|
+
root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
3160
3158
|
} catch {
|
|
3161
3159
|
return;
|
|
3162
3160
|
}
|
|
@@ -3260,7 +3258,7 @@ async function pathExistsAsFile(file) {
|
|
|
3260
3258
|
async function resolveTailwindV4EntriesFromCssCached(css, base) {
|
|
3261
3259
|
let root;
|
|
3262
3260
|
try {
|
|
3263
|
-
root = postcss.
|
|
3261
|
+
root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
3264
3262
|
} catch {
|
|
3265
3263
|
return;
|
|
3266
3264
|
}
|
|
@@ -3684,7 +3682,7 @@ function hasResetDeclaration(rule) {
|
|
|
3684
3682
|
}
|
|
3685
3683
|
function createPreflightDeclarations(cssPreflight) {
|
|
3686
3684
|
if (!cssPreflight || typeof cssPreflight !== "object") return [];
|
|
3687
|
-
return Object.entries(cssPreflight).filter((entry) => entry[1] !== false).map(([prop, value]) => postcss.
|
|
3685
|
+
return Object.entries(cssPreflight).filter((entry) => entry[1] !== false).map(([prop, value]) => _weapp_tailwindcss_postcss.postcss.decl({
|
|
3688
3686
|
prop,
|
|
3689
3687
|
value: value.toString()
|
|
3690
3688
|
}));
|
|
@@ -3693,7 +3691,7 @@ function ensureMiniProgramV3PreflightReset(css, cssPreflight) {
|
|
|
3693
3691
|
const declarations = createPreflightDeclarations(cssPreflight);
|
|
3694
3692
|
if (declarations.length === 0) return css;
|
|
3695
3693
|
try {
|
|
3696
|
-
const root = postcss.
|
|
3694
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
3697
3695
|
let targetRule;
|
|
3698
3696
|
let hasReset = false;
|
|
3699
3697
|
root.walkRules((rule) => {
|
|
@@ -3709,7 +3707,7 @@ function ensureMiniProgramV3PreflightReset(css, cssPreflight) {
|
|
|
3709
3707
|
}
|
|
3710
3708
|
}
|
|
3711
3709
|
async function transformTailwindV3CssToWeapp(css, options) {
|
|
3712
|
-
const result = await defaultStyleHandler(
|
|
3710
|
+
const result = await defaultStyleHandler((0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options) ? await (0, _weapp_tailwindcss_postcss.transformCssMacroCss)(css, options) : css, {
|
|
3713
3711
|
cssChildCombinatorReplaceValue: ["view", "text"],
|
|
3714
3712
|
cssRemoveHoverPseudoClass: true,
|
|
3715
3713
|
isMainChunk: true,
|
|
@@ -3718,13 +3716,13 @@ async function transformTailwindV3CssToWeapp(css, options) {
|
|
|
3718
3716
|
});
|
|
3719
3717
|
const pruneOptions = {
|
|
3720
3718
|
preservePreflight: true,
|
|
3721
|
-
preserveConditionalComments:
|
|
3719
|
+
preserveConditionalComments: (0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options)
|
|
3722
3720
|
};
|
|
3723
3721
|
return ensureMiniProgramV3PreflightReset((0, _weapp_tailwindcss_postcss.pruneMiniProgramGeneratedCss)(result.css, pruneOptions), options?.cssPreflight);
|
|
3724
3722
|
}
|
|
3725
3723
|
async function transformTailwindV3CssByTarget(css, target, options) {
|
|
3726
3724
|
if (target === "weapp") return transformTailwindV3CssToWeapp(css, options);
|
|
3727
|
-
return
|
|
3725
|
+
return (0, _weapp_tailwindcss_postcss.hasCssMacroStyleOptions)(options) ? (0, _weapp_tailwindcss_postcss.transformCssMacroCss)(css, options) : css;
|
|
3728
3726
|
}
|
|
3729
3727
|
//#endregion
|
|
3730
3728
|
//#region src/tailwindcss/v3-engine/generator.ts
|
|
@@ -3795,7 +3793,7 @@ function shouldAutoEnableCssMacro(source) {
|
|
|
3795
3793
|
return require_auto.hasCssMacroTailwindPlugin(normalizeConfigObject(source.configObject)?.plugins);
|
|
3796
3794
|
}
|
|
3797
3795
|
function resolveStyleOptions(source, options) {
|
|
3798
|
-
return shouldAutoEnableCssMacro(source) ?
|
|
3796
|
+
return shouldAutoEnableCssMacro(source) ? (0, _weapp_tailwindcss_postcss.withCssMacroStyleOptions)(options) : options;
|
|
3799
3797
|
}
|
|
3800
3798
|
function loadTailwindV3Internals(source) {
|
|
3801
3799
|
const requireFromProject = (0, node_module.createRequire)(`${source.cwd}/package.json`);
|
|
@@ -3901,7 +3899,7 @@ function createTailwindV3Engine(source) {
|
|
|
3901
3899
|
const tailwindConfig = internals.validateConfig(internals.resolveConfig(createTailwindConfig(generateSource, tailwindOptions)));
|
|
3902
3900
|
const candidates = normalizedCandidates.candidates;
|
|
3903
3901
|
const changedContent = createChangedContentEntries(candidates, options.sources ?? []);
|
|
3904
|
-
const root = postcss.
|
|
3902
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(generateSource.css, { from: void 0 });
|
|
3905
3903
|
const result = {
|
|
3906
3904
|
css: "",
|
|
3907
3905
|
messages: []
|
|
@@ -3951,7 +3949,7 @@ function createTailwindV3Engine(source) {
|
|
|
3951
3949
|
async function generateIncrementalMissingUtilities(context, candidates, target, styleOptions, bareArbitraryValues) {
|
|
3952
3950
|
tailwindInternals ?? (tailwindInternals = loadTailwindV3Internals(source));
|
|
3953
3951
|
const internals = tailwindInternals;
|
|
3954
|
-
const root = postcss.
|
|
3952
|
+
const root = _weapp_tailwindcss_postcss.postcss.root();
|
|
3955
3953
|
const result = {
|
|
3956
3954
|
css: "",
|
|
3957
3955
|
messages: []
|
|
@@ -4073,7 +4071,7 @@ function resolveCssConfig(css, base) {
|
|
|
4073
4071
|
css,
|
|
4074
4072
|
config: void 0
|
|
4075
4073
|
};
|
|
4076
|
-
const root = postcss.
|
|
4074
|
+
const root = _weapp_tailwindcss_postcss.postcss.parse(css);
|
|
4077
4075
|
let config;
|
|
4078
4076
|
root.walkAtRules("config", (rule) => {
|
|
4079
4077
|
const configPath = parseConfigParam(rule.params);
|
|
@@ -4136,12 +4134,6 @@ function resolveTailwindV3SourceFromPatcher(patcher) {
|
|
|
4136
4134
|
return resolveTailwindV3Source(resolveTailwindV3SourceOptionsFromPatcher(patcher));
|
|
4137
4135
|
}
|
|
4138
4136
|
//#endregion
|
|
4139
|
-
Object.defineProperty(exports, "DEFAULT_SOURCE_SCAN_EXTENSIONS", {
|
|
4140
|
-
enumerable: true,
|
|
4141
|
-
get: function() {
|
|
4142
|
-
return DEFAULT_SOURCE_SCAN_EXTENSIONS;
|
|
4143
|
-
}
|
|
4144
|
-
});
|
|
4145
4137
|
Object.defineProperty(exports, "FULL_SOURCE_SCAN_EXTENSION_RE", {
|
|
4146
4138
|
enumerable: true,
|
|
4147
4139
|
get: function() {
|
|
@@ -4154,12 +4146,6 @@ Object.defineProperty(exports, "VITE_MARKER_RE", {
|
|
|
4154
4146
|
return VITE_MARKER_RE;
|
|
4155
4147
|
}
|
|
4156
4148
|
});
|
|
4157
|
-
Object.defineProperty(exports, "collectCssInlineSourceCandidates", {
|
|
4158
|
-
enumerable: true,
|
|
4159
|
-
get: function() {
|
|
4160
|
-
return collectCssInlineSourceCandidates;
|
|
4161
|
-
}
|
|
4162
|
-
});
|
|
4163
4149
|
Object.defineProperty(exports, "createCssAppend", {
|
|
4164
4150
|
enumerable: true,
|
|
4165
4151
|
get: function() {
|
|
@@ -4172,12 +4158,6 @@ Object.defineProperty(exports, "createDebug", {
|
|
|
4172
4158
|
return createDebug;
|
|
4173
4159
|
}
|
|
4174
4160
|
});
|
|
4175
|
-
Object.defineProperty(exports, "createSourceScanPattern", {
|
|
4176
|
-
enumerable: true,
|
|
4177
|
-
get: function() {
|
|
4178
|
-
return createSourceScanPattern;
|
|
4179
|
-
}
|
|
4180
|
-
});
|
|
4181
4161
|
Object.defineProperty(exports, "createTailwindV3Engine", {
|
|
4182
4162
|
enumerable: true,
|
|
4183
4163
|
get: function() {
|
|
@@ -4214,12 +4194,6 @@ Object.defineProperty(exports, "ensureTailwindcssRuntimePatch", {
|
|
|
4214
4194
|
return ensureTailwindcssRuntimePatch;
|
|
4215
4195
|
}
|
|
4216
4196
|
});
|
|
4217
|
-
Object.defineProperty(exports, "expandTailwindSourceEntries", {
|
|
4218
|
-
enumerable: true,
|
|
4219
|
-
get: function() {
|
|
4220
|
-
return expandTailwindSourceEntries;
|
|
4221
|
-
}
|
|
4222
|
-
});
|
|
4223
4197
|
Object.defineProperty(exports, "filterUnsupportedMiniProgramTailwindV4Candidates", {
|
|
4224
4198
|
enumerable: true,
|
|
4225
4199
|
get: function() {
|
|
@@ -4364,12 +4338,6 @@ Object.defineProperty(exports, "omitUndefined", {
|
|
|
4364
4338
|
return omitUndefined;
|
|
4365
4339
|
}
|
|
4366
4340
|
});
|
|
4367
|
-
Object.defineProperty(exports, "parseConfigParam", {
|
|
4368
|
-
enumerable: true,
|
|
4369
|
-
get: function() {
|
|
4370
|
-
return parseConfigParam$1;
|
|
4371
|
-
}
|
|
4372
|
-
});
|
|
4373
4341
|
Object.defineProperty(exports, "parseImportRequest", {
|
|
4374
4342
|
enumerable: true,
|
|
4375
4343
|
get: function() {
|
|
@@ -4406,12 +4374,6 @@ Object.defineProperty(exports, "resolveCssEntrySource", {
|
|
|
4406
4374
|
return resolveCssEntrySource;
|
|
4407
4375
|
}
|
|
4408
4376
|
});
|
|
4409
|
-
Object.defineProperty(exports, "resolveCssSourceEntries", {
|
|
4410
|
-
enumerable: true,
|
|
4411
|
-
get: function() {
|
|
4412
|
-
return resolveCssSourceEntries;
|
|
4413
|
-
}
|
|
4414
|
-
});
|
|
4415
4377
|
Object.defineProperty(exports, "resolveSourceScanPath", {
|
|
4416
4378
|
enumerable: true,
|
|
4417
4379
|
get: function() {
|