weapp-tailwindcss 5.0.4 → 5.0.5
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-BZ4n4Icc.js → auto-Cvy0zWpS.js} +1 -1
- package/dist/{bundle-state-D3RZHkXz.js → bundle-state-Cso_ceUo.js} +8 -2
- package/dist/{bundle-state-C-p9eFz1.mjs → bundle-state-DEyxCR4f.mjs} +2 -2
- package/dist/bundlers/shared/generator-css/directives.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +3 -1
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +8 -0
- package/dist/bundlers/vite/serve-css-generation.d.ts +5 -0
- package/dist/bundlers/vite/uni-app-x-css-options.d.ts +2 -0
- package/dist/{chunk-D6vf50IK.js → chunk-emK7D4bc.js} +7 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/css-macro.js +3 -3
- package/dist/{defaults-C5w9OOrj.js → defaults-BPUuNYcD.js} +1 -1
- package/dist/defaults.js +1 -1
- package/dist/{generator-DaPOkJ7W.js → generator-AD-eX8Tr.js} +2 -2
- package/dist/{generator-DRHWC1t-.mjs → generator-DVWLNO0n.mjs} +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/gulp.js +6 -6
- package/dist/gulp.mjs +5 -5
- package/dist/{incremental-runtime-class-set-BYV0yQdp.js → incremental-runtime-class-set-vOetpdWs.js} +195 -43
- package/dist/{incremental-runtime-class-set-Dt-FUQB5.mjs → incremental-runtime-class-set-xf49kky6.mjs} +194 -42
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{postcss-Du8hY-MN.js → postcss-Cbi6RFpf.js} +57 -10
- package/dist/{postcss-CJrmfXvi.mjs → postcss-hSUxK7oR.mjs} +55 -8
- package/dist/postcss-html-transform.js +1 -1
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-lfenbOTF.mjs → precheck-Bsn_LMmo.mjs} +14 -3
- package/dist/{precheck-DgpVCvYk.js → precheck-b8Y8qZg0.js} +17 -6
- package/dist/presets.js +9 -5
- package/dist/presets.mjs +7 -3
- package/dist/reset.js +1 -1
- package/dist/{source-candidates-D7b-Jzsx.mjs → source-candidates-BsWYoIPN.mjs} +1 -1
- package/dist/{source-candidates-B4NvId_j.js → source-candidates-o2ZrKWzu.js} +2 -2
- package/dist/{tailwindcss-D5RogwtV.mjs → tailwindcss-AWaPVF2B.mjs} +1 -1
- package/dist/{tailwindcss-26ZFr5kv.js → tailwindcss-CpQ6X4l6.js} +3 -3
- package/dist/transform-BkGtbxb1.js +14868 -0
- package/dist/transform-DumSZmTh.mjs +14871 -0
- package/dist/uni-app-x/vite.d.ts +3 -0
- package/dist/{utils-nta4tfFs.js → utils-Dolmt8EO.js} +1 -1
- package/dist/{v3-engine-CBahpuIg.js → v3-engine-CM0TRa8V.js} +29 -5
- package/dist/{v3-engine-BCUGX3gX.mjs → v3-engine-Cczrkzqt.mjs} +22 -4
- package/dist/{vite-tjYalmVX.js → vite-CTuHPC91.js} +733 -79
- package/dist/{vite-DS4H5d0f.mjs → vite-DLXDMHON.mjs} +745 -91
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +201 -42
- package/dist/{webpack-0BwLOE_f.js → webpack-BBHJYKqB.js} +8 -8
- package/dist/{webpack-CA-40WU9.mjs → webpack-DJFw08SK.mjs} +6 -6
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +2 -3
- package/dist/transform-Crn84vTL.js +0 -257
- package/dist/transform-FAxHXVZp.mjs +0 -255
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-CTuHPC91.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-DLXDMHON.mjs";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss };
|
|
@@ -97,6 +97,9 @@ function resolveUniAppXOptions(option) {
|
|
|
97
97
|
uvueUnsupported: "warn"
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
|
+
function isUniAppXEnabled(option) {
|
|
101
|
+
return resolveUniAppXOptions(option).enabled;
|
|
102
|
+
}
|
|
100
103
|
//#endregion
|
|
101
104
|
//#region src/context/style-options.ts
|
|
102
105
|
function resolveStyleOptionsFromContext(ctx) {
|
|
@@ -2776,7 +2779,10 @@ function resolveConfigDir(config, projectRoot) {
|
|
|
2776
2779
|
return node_path.default.dirname(configPath);
|
|
2777
2780
|
}
|
|
2778
2781
|
function isBarePackageSpecifier(specifier) {
|
|
2779
|
-
return !specifier.startsWith(".") && !specifier.startsWith("/") && !specifier.includes("\\") && !/^[a-z][a-z\d+.-]*:/i.test(specifier);
|
|
2782
|
+
return !specifier.startsWith(".") && !specifier.startsWith("/") && !specifier.startsWith("#") && !specifier.includes("\\") && !/^[a-z][a-z\d+.-]*:/i.test(specifier);
|
|
2783
|
+
}
|
|
2784
|
+
function isPackageJsonImportSpecifier(specifier) {
|
|
2785
|
+
return typeof specifier === "string" && specifier.startsWith("#");
|
|
2780
2786
|
}
|
|
2781
2787
|
function parseCssImportSpecifier$1(params) {
|
|
2782
2788
|
const value = params.trim();
|
|
@@ -2818,7 +2824,8 @@ function normalizeTailwindV4CssPackageImports(css, packageName) {
|
|
|
2818
2824
|
}
|
|
2819
2825
|
const importSpecifiers = createTailwindV4CssImportSpecifierSet(packageName);
|
|
2820
2826
|
let changed = false;
|
|
2821
|
-
root.walkAtRules(
|
|
2827
|
+
root.walkAtRules((rule) => {
|
|
2828
|
+
if (rule.name !== "import" && rule.name !== "reference") return;
|
|
2822
2829
|
const parsed = parseCssImportSpecifier$1(rule.params);
|
|
2823
2830
|
if (!parsed || !importSpecifiers.has(parsed.specifier)) return;
|
|
2824
2831
|
const cssEntryPoint = resolvePackageCssEntryPoint(`${parsed.specifier}/index.css`);
|
|
@@ -2855,7 +2862,8 @@ function normalizeTailwindV4CssEntrySources(cssEntries, packageName) {
|
|
|
2855
2862
|
}
|
|
2856
2863
|
const base = node_path.default.dirname(file);
|
|
2857
2864
|
const rawCss = (0, node_fs.readFileSync)(file, "utf8");
|
|
2858
|
-
const
|
|
2865
|
+
const entrySource = resolveCssEntrySource(rawCss, base, { removeConfig: false });
|
|
2866
|
+
const css = normalizeTailwindV4CssPackageImports(normalizeConfigDirective(rawCss, entrySource?.config && (0, node_fs.existsSync)(entrySource.config) ? entrySource.config : entrySource?.configRequest && !node_path.default.isAbsolute(entrySource.configRequest) && !isPackageJsonImportSpecifier(entrySource.configRequest) ? node_path.default.resolve(base, entrySource.configRequest) : entrySource?.config), packageName);
|
|
2859
2867
|
cssSources.push({
|
|
2860
2868
|
file,
|
|
2861
2869
|
base,
|
|
@@ -4540,7 +4548,10 @@ async function resolveTailwindV4CssEntrySource(cssEntry, sourceOptions) {
|
|
|
4540
4548
|
const css = (0, node_fs.readFileSync)(cssEntry, "utf8");
|
|
4541
4549
|
const base = node_path.default.dirname(node_path.default.resolve(cssEntry));
|
|
4542
4550
|
const entrySource = resolveCssEntrySource(css, base, { removeConfig: false });
|
|
4543
|
-
const config = resolveExistingConfigPath(entrySource?.config, entrySource?.configRequest, cssEntry,
|
|
4551
|
+
const config = resolveExistingConfigPath(entrySource?.config, entrySource?.configRequest, cssEntry, {
|
|
4552
|
+
...sourceOptions,
|
|
4553
|
+
sourceFile: sourceOptions.sourceFile ?? cssEntry
|
|
4554
|
+
});
|
|
4544
4555
|
return withGeneratorSourceMetadata(await resolveTailwindV4Source({
|
|
4545
4556
|
...omitUndefined(singleEntrySourceOptions),
|
|
4546
4557
|
base,
|
|
@@ -4838,7 +4849,7 @@ function withMatchedSourceSideMetadata(source, resolvedEntrySource) {
|
|
|
4838
4849
|
}
|
|
4839
4850
|
function createTailwindV4ApplyReferenceSource(css, sourceOptions) {
|
|
4840
4851
|
if (!hasTailwindApplyDirective(css) || hasTailwindRootDirectives(css)) return css;
|
|
4841
|
-
return `@
|
|
4852
|
+
return `@import "${sourceOptions.packageName ?? "tailwindcss"}" source(none);\n${css}`;
|
|
4842
4853
|
}
|
|
4843
4854
|
async function resolveGeneratorSource(majorVersion, runtimeState, rawSource, file, cssHandlerOptions, generatorOptions, selectionOptions) {
|
|
4844
4855
|
const base = resolveCssSourceBase(file, cssHandlerOptions);
|
|
@@ -4846,6 +4857,10 @@ async function resolveGeneratorSource(majorVersion, runtimeState, rawSource, fil
|
|
|
4846
4857
|
importFallback: generatorOptions?.importFallback ?? false,
|
|
4847
4858
|
removeConfig: majorVersion === 3
|
|
4848
4859
|
});
|
|
4860
|
+
const applyEntrySource = hasTailwindApplyDirective(rawSource) ? {
|
|
4861
|
+
base,
|
|
4862
|
+
css: rawSource
|
|
4863
|
+
} : void 0;
|
|
4849
4864
|
if (majorVersion === 3) {
|
|
4850
4865
|
const sourceOptions = resolveTailwindV3SourceOptionsFromPatcher(runtimeState.twPatcher);
|
|
4851
4866
|
const mergedSourceOptions = omitUndefined({
|
|
@@ -4856,10 +4871,6 @@ async function resolveGeneratorSource(majorVersion, runtimeState, rawSource, fil
|
|
|
4856
4871
|
cssEntries: selectionOptions?.cssEntries,
|
|
4857
4872
|
cssSources: createCssEntrySources(selectionOptions?.cssEntries)
|
|
4858
4873
|
});
|
|
4859
|
-
const applyEntrySource = hasTailwindApplyDirective(rawSource) ? {
|
|
4860
|
-
base,
|
|
4861
|
-
css: rawSource
|
|
4862
|
-
} : void 0;
|
|
4863
4874
|
const sourceSideEntrySource = canResolveSourceSideCssEntry(file, cssHandlerOptions, mergedSourceOptions) ? resolveSourceSideCssEntrySource(file, mergedSourceOptions, { removeConfig: true }) : void 0;
|
|
4864
4875
|
const shouldPreferSourceSideEntry = shouldPreferResolvedSourceSideEntry(cssEntrySource, sourceSideEntrySource);
|
|
4865
4876
|
const resolvedEntrySource = shouldResolveSourceSideCssEntry(rawSource) ? shouldPreferSourceSideEntry ? sourceSideEntrySource ?? cssEntrySource ?? applyEntrySource : cssEntrySource ?? applyEntrySource ?? sourceSideEntrySource : shouldPreferTailwindV3SourceSideEntry(rawSource, sourceSideEntrySource) || shouldPreferSourceSideEntry ? sourceSideEntrySource ?? cssEntrySource ?? applyEntrySource : cssEntrySource ?? applyEntrySource ?? sourceSideEntrySource;
|
|
@@ -4886,6 +4897,13 @@ async function resolveGeneratorSource(majorVersion, runtimeState, rawSource, fil
|
|
|
4886
4897
|
cssSources: mergeCssSources(sourceOptions.cssSources, sourceOptions.cssSources?.length ? void 0 : createCssEntrySources(selectionOptions?.cssEntries ?? sourceOptions.cssEntries))
|
|
4887
4898
|
}) : void 0;
|
|
4888
4899
|
const normalizedSourceOptions = resolvedSourceOptions ? normalizeTailwindV4CssSourceConfigs(resolvedSourceOptions) : void 0;
|
|
4900
|
+
if (applyEntrySource && !cssHandlerOptions.isMainChunk && !hasTailwindRootDirectives(rawSource, { importFallback: generatorOptions?.importFallback ?? false })) {
|
|
4901
|
+
const css = createTailwindV4ApplyReferenceSource(normalizeConfigDirective(prependConfigDirective(applyEntrySource.css, generatorOptions?.config), void 0), normalizedSourceOptions ?? {});
|
|
4902
|
+
return resolveTailwindV4Source(createSingleTailwindV4SourceOptions(normalizedSourceOptions ?? {}, {
|
|
4903
|
+
base: applyEntrySource.base,
|
|
4904
|
+
css
|
|
4905
|
+
}));
|
|
4906
|
+
}
|
|
4889
4907
|
const shouldPreferSourceSideEntry = shouldResolveSourceSideCssEntry(rawSource) || Boolean(cssEntrySource?.css.includes("weapp-tailwindcss generator-placeholder")) && (sourceOptions?.cssEntries?.length ?? 0) <= 1;
|
|
4890
4908
|
const sourceSideEntrySource = normalizedSourceOptions && shouldPreferSourceSideEntry && canResolveSourceSideCssEntry(file, cssHandlerOptions, normalizedSourceOptions) ? resolveSourceSideCssEntrySource(file, normalizedSourceOptions, { removeConfig: false }) : void 0;
|
|
4891
4909
|
const matchedCssEntrySource = normalizedSourceOptions ? await resolveMatchingTailwindV4CssEntry(rawSource, file, normalizedSourceOptions) : void 0;
|
|
@@ -4902,7 +4920,7 @@ async function resolveGeneratorSource(majorVersion, runtimeState, rawSource, fil
|
|
|
4902
4920
|
...preferredCssEntrySource,
|
|
4903
4921
|
css: prependConfigDirective(preferredCssEntrySource.css, generatorOptions.config)
|
|
4904
4922
|
} : preferredCssEntrySource;
|
|
4905
|
-
const resolvedEntrySource = sourceSideEntrySource ?? cssEntrySource;
|
|
4923
|
+
const resolvedEntrySource = sourceSideEntrySource ?? cssEntrySource ?? applyEntrySource;
|
|
4906
4924
|
if (!resolvedEntrySource) {
|
|
4907
4925
|
const source = await resolveTailwindV4SourceFromPatcher(runtimeState.twPatcher);
|
|
4908
4926
|
return generatorOptions?.config ? {
|
|
@@ -4924,7 +4942,7 @@ async function resolveGeneratorSources(majorVersion, runtimeState, rawSource, fi
|
|
|
4924
4942
|
importFallback: generatorOptions?.importFallback ?? false,
|
|
4925
4943
|
removeConfig: majorVersion === 3
|
|
4926
4944
|
});
|
|
4927
|
-
if (majorVersion !== 4 || cssEntrySource && !cssHandlerOptions.isMainChunk) {
|
|
4945
|
+
if (majorVersion !== 4 || cssEntrySource && !cssHandlerOptions.isMainChunk || !cssHandlerOptions.isMainChunk && hasTailwindApplyDirective(rawSource) && !hasTailwindRootDirectives(rawSource, { importFallback: generatorOptions?.importFallback ?? false })) {
|
|
4928
4946
|
const resolved = await resolveGeneratorSource(majorVersion, runtimeState, rawSource, file, cssHandlerOptions, generatorOptions, selectionOptions);
|
|
4929
4947
|
return resolved ? [resolved] : [];
|
|
4930
4948
|
}
|
|
@@ -5310,13 +5328,38 @@ function finalizeMiniProgramGeneratorCss(css, target, majorVersion, cssPreflight
|
|
|
5310
5328
|
preservePseudoContentInit: majorVersion === 3
|
|
5311
5329
|
});
|
|
5312
5330
|
}
|
|
5331
|
+
function shouldInjectMiniProgramPreflightForGeneratorCss(opts, options) {
|
|
5332
|
+
if (options.cssHandlerOptions.uniAppX === true && options.cssHandlerOptions.uniAppXCssTarget === "uvue") return false;
|
|
5333
|
+
if (!options.isolateCurrentCssCandidates) return true;
|
|
5334
|
+
return isUniAppXEnabled(opts.uniAppX) && Boolean(options.localImports?.trim());
|
|
5335
|
+
}
|
|
5313
5336
|
function mergeScopedRuntimeWithCurrentRuntime(scopedRuntime, runtime, options) {
|
|
5314
5337
|
if (options.isolateCssSource && options.currentCssCandidates?.length) return new Set([...scopedRuntime, ...options.currentCssCandidates]);
|
|
5315
5338
|
if (runtime.size === 0 || !options.cssHandlerOptions.isMainChunk || options.matchedCssSourceFile || options.isolateCssSource && scopedRuntime.size === 0) return scopedRuntime;
|
|
5316
5339
|
return new Set([...scopedRuntime, ...runtime]);
|
|
5317
5340
|
}
|
|
5318
5341
|
function shouldIsolateScopedCssSource(source, sourceEntries) {
|
|
5319
|
-
return
|
|
5342
|
+
return Boolean(source.__weappTailwindcssMeta?.matchedCssSourceFile) || sourceEntries !== void 0 && sourceEntries.length > 0;
|
|
5343
|
+
}
|
|
5344
|
+
function shouldIsolateCurrentTailwindV4CssCandidates(majorVersion, cssHandlerOptions, options) {
|
|
5345
|
+
return majorVersion === 4 && !cssHandlerOptions.isMainChunk && hasTailwindApplyDirective(options.rawSource) && !hasTailwindRootDirectives(options.rawSource) && !options.hasGeneratedCss && !options.hasGeneratedMarkers;
|
|
5346
|
+
}
|
|
5347
|
+
function removeTailwindApplyAtRules(source) {
|
|
5348
|
+
if (!source.includes("@apply")) return source;
|
|
5349
|
+
try {
|
|
5350
|
+
const root = require_watch_dependencies.postcss_default.parse(source);
|
|
5351
|
+
let changed = false;
|
|
5352
|
+
root.walkAtRules("apply", (rule) => {
|
|
5353
|
+
rule.remove();
|
|
5354
|
+
changed = true;
|
|
5355
|
+
});
|
|
5356
|
+
root.walk((node) => {
|
|
5357
|
+
if ("nodes" in node && node.nodes?.length === 0) node.remove();
|
|
5358
|
+
});
|
|
5359
|
+
return changed ? root.toString() : source;
|
|
5360
|
+
} catch {
|
|
5361
|
+
return source;
|
|
5362
|
+
}
|
|
5320
5363
|
}
|
|
5321
5364
|
function shouldScanTailwindV4Sources(majorVersion, target, generatorRuntime, isolateCssSource) {
|
|
5322
5365
|
if (majorVersion !== 4 || isolateCssSource) return false;
|
|
@@ -5344,7 +5387,7 @@ function resolveGeneratorStyleOptions(opts, cssHandlerOptions, generatorStyleOpt
|
|
|
5344
5387
|
};
|
|
5345
5388
|
}
|
|
5346
5389
|
function isLocalImportRequest(request) {
|
|
5347
|
-
return request.length > 0 && !request.startsWith("tailwindcss") && !request.startsWith("weapp-tailwindcss") && !request.startsWith("data:") && !REMOTE_IMPORT_RE.test(request);
|
|
5390
|
+
return request.length > 0 && !request.startsWith("#") && !request.startsWith("tailwindcss") && !request.startsWith("weapp-tailwindcss") && !request.startsWith("data:") && !REMOTE_IMPORT_RE.test(request);
|
|
5348
5391
|
}
|
|
5349
5392
|
function isCommentOnlyCss(source) {
|
|
5350
5393
|
try {
|
|
@@ -5462,11 +5505,70 @@ function extractGeneratedCssForUserLayerSelectors(css, userLayerSource) {
|
|
|
5462
5505
|
};
|
|
5463
5506
|
}
|
|
5464
5507
|
}
|
|
5508
|
+
function normalizeGeneratedSelector(selector) {
|
|
5509
|
+
return selector.replace(/:not\(#\\#\)/g, "").trim();
|
|
5510
|
+
}
|
|
5511
|
+
function collectApplyOnlySourceSelectors(source) {
|
|
5512
|
+
const selectors = /* @__PURE__ */ new Set();
|
|
5513
|
+
try {
|
|
5514
|
+
require_watch_dependencies.postcss_default.parse(source).walkRules((rule) => {
|
|
5515
|
+
if (!rule.nodes?.some((node) => node.type === "atrule" && node.name === "apply")) return;
|
|
5516
|
+
for (const selector of rule.selectors ?? [rule.selector]) {
|
|
5517
|
+
const normalized = normalizeGeneratedSelector(selector);
|
|
5518
|
+
if (normalized) selectors.add(normalized);
|
|
5519
|
+
}
|
|
5520
|
+
});
|
|
5521
|
+
} catch {}
|
|
5522
|
+
return selectors;
|
|
5523
|
+
}
|
|
5524
|
+
function hasOnlyApplyBackedSourceRules(source) {
|
|
5525
|
+
let hasApplyRule = false;
|
|
5526
|
+
let hasNonApplyRule = false;
|
|
5527
|
+
try {
|
|
5528
|
+
require_watch_dependencies.postcss_default.parse(source).walkRules((rule) => {
|
|
5529
|
+
if (rule.nodes?.some((node) => node.type === "atrule" && node.name === "apply")) hasApplyRule = true;
|
|
5530
|
+
else hasNonApplyRule = true;
|
|
5531
|
+
});
|
|
5532
|
+
} catch {
|
|
5533
|
+
return false;
|
|
5534
|
+
}
|
|
5535
|
+
return hasApplyRule && !hasNonApplyRule;
|
|
5536
|
+
}
|
|
5537
|
+
function filterApplyOnlyGeneratedCss(css, source) {
|
|
5538
|
+
const selectors = collectApplyOnlySourceSelectors(source);
|
|
5539
|
+
if (selectors.size === 0) return css;
|
|
5540
|
+
const selectorList = [...selectors];
|
|
5541
|
+
try {
|
|
5542
|
+
const root = require_watch_dependencies.postcss_default.parse(css);
|
|
5543
|
+
root.walkRules((rule) => {
|
|
5544
|
+
const isApplySelector = (rule.selectors ?? [rule.selector]).some((selector) => {
|
|
5545
|
+
const normalized = normalizeGeneratedSelector(selector);
|
|
5546
|
+
return selectorList.some((sourceSelector) => {
|
|
5547
|
+
if (normalized === sourceSelector) return true;
|
|
5548
|
+
if (!normalized.startsWith(sourceSelector)) return false;
|
|
5549
|
+
const next = normalized[sourceSelector.length];
|
|
5550
|
+
return next === ":" || next === "[" || next === ".";
|
|
5551
|
+
});
|
|
5552
|
+
});
|
|
5553
|
+
const isVariableRule = rule.nodes?.some((node) => node.type === "decl" && node.prop.startsWith("--"));
|
|
5554
|
+
if (!isApplySelector && !isVariableRule) rule.remove();
|
|
5555
|
+
});
|
|
5556
|
+
root.walkAtRules((rule) => {
|
|
5557
|
+
if (rule.nodes !== void 0 && rule.nodes.length === 0) rule.remove();
|
|
5558
|
+
});
|
|
5559
|
+
return root.toString();
|
|
5560
|
+
} catch {
|
|
5561
|
+
return css;
|
|
5562
|
+
}
|
|
5563
|
+
}
|
|
5564
|
+
function shouldFilterApplyOnlyGeneratedCss(majorVersion, target, source, options) {
|
|
5565
|
+
return majorVersion === 4 && target === "weapp" && hasTailwindApplyDirective(source) && !hasTailwindRootDirectives(source) && !options.hasGeneratedCss && !options.hasGeneratedMarkers && collectApplyOnlySourceSelectors(source).size > 0 && hasOnlyApplyBackedSourceRules(source);
|
|
5566
|
+
}
|
|
5465
5567
|
async function transformGeneratorUserCss(source, options) {
|
|
5466
5568
|
if (source.trim().length === 0) return "";
|
|
5467
5569
|
const cleanedSource = removeTailwindSourceDirectives(stripUnmatchedTailwindSourceMediaCloseFragments(stripTailwindSourceMediaFragments(source)), { importFallback: options.importFallback });
|
|
5468
5570
|
if (cleanedSource.trim().length === 0) return "";
|
|
5469
|
-
const userSource = stripUnmatchedTailwindSourceMediaCloseFragments(removeTailwindSourceDirectives(stripUnmatchedTailwindSourceMediaCloseFragments(stripTailwindSourceMediaFragments(options.generatorTarget === "weapp" ? (0, _weapp_tailwindcss_postcss.removeUnsupportedMiniProgramAtRules)(cleanedSource) : cleanedSource)), { importFallback: options.importFallback }));
|
|
5571
|
+
const userSource = stripUnmatchedTailwindSourceMediaCloseFragments(removeTailwindApplyAtRules(removeTailwindSourceDirectives(stripUnmatchedTailwindSourceMediaCloseFragments(stripTailwindSourceMediaFragments(options.generatorTarget === "weapp" ? (0, _weapp_tailwindcss_postcss.removeUnsupportedMiniProgramAtRules)(cleanedSource) : cleanedSource)), { importFallback: options.importFallback })));
|
|
5470
5572
|
if (userSource.trim().length === 0) return "";
|
|
5471
5573
|
if (isCommentOnlyCss(userSource)) return userSource;
|
|
5472
5574
|
if (options.generatorTarget !== "weapp") return userSource;
|
|
@@ -5528,6 +5630,32 @@ function prefixLocalCssImportsWithWebpackIgnore(css) {
|
|
|
5528
5630
|
return css;
|
|
5529
5631
|
}
|
|
5530
5632
|
}
|
|
5633
|
+
function splitLocalCssImports(source) {
|
|
5634
|
+
try {
|
|
5635
|
+
const root = require_watch_dependencies.postcss_default.parse(source);
|
|
5636
|
+
const importRoot = require_watch_dependencies.postcss_default.root();
|
|
5637
|
+
let changed = false;
|
|
5638
|
+
for (const node of [...root.nodes]) {
|
|
5639
|
+
if (node.type !== "atrule" || node.name !== "import") continue;
|
|
5640
|
+
const request = parseImportRequest(node.params);
|
|
5641
|
+
if (!request || !isLocalImportRequest(request)) continue;
|
|
5642
|
+
importRoot.append(node.clone());
|
|
5643
|
+
node.remove();
|
|
5644
|
+
changed = true;
|
|
5645
|
+
}
|
|
5646
|
+
const imports = importRoot.nodes.filter((node) => node.type === "atrule" && node.name === "import").map((node) => `@import ${node.params};`).join("\n");
|
|
5647
|
+
return changed ? {
|
|
5648
|
+
imports,
|
|
5649
|
+
source: root.toString()
|
|
5650
|
+
} : void 0;
|
|
5651
|
+
} catch {
|
|
5652
|
+
return;
|
|
5653
|
+
}
|
|
5654
|
+
}
|
|
5655
|
+
function restoreLocalCssImports(css, imports) {
|
|
5656
|
+
if (!imports?.trim()) return css;
|
|
5657
|
+
return createCssSourceOrderAppend(imports, css);
|
|
5658
|
+
}
|
|
5531
5659
|
async function generateCssByGenerator(options) {
|
|
5532
5660
|
const { opts, runtimeState, runtime, rawSource, file, cssHandlerOptions, cssUserHandlerOptions, getSourceCandidatesForEntries, styleHandler, debug } = options;
|
|
5533
5661
|
const generatorOptions = {
|
|
@@ -5536,6 +5664,8 @@ async function generateCssByGenerator(options) {
|
|
|
5536
5664
|
};
|
|
5537
5665
|
const majorVersion = runtimeState.twPatcher.majorVersion;
|
|
5538
5666
|
const effectiveRawSource = stripUnmatchedTailwindSourceMediaCloseFragments(stripTailwindSourceMediaFragments(normalizeTailwindSourceDirectives(rawSource, { importFallback: generatorOptions.importFallback })));
|
|
5667
|
+
const localImportParts = splitLocalCssImports(effectiveRawSource);
|
|
5668
|
+
const generatorRawSource = localImportParts?.source ?? effectiveRawSource;
|
|
5539
5669
|
const cleanedLocalImportWrapper = cleanLocalCssImportWrapperTailwindDirectives(effectiveRawSource);
|
|
5540
5670
|
if (cleanedLocalImportWrapper !== void 0) return {
|
|
5541
5671
|
css: generatorOptions.target === "weapp" ? (0, _weapp_tailwindcss_postcss.removeUnsupportedMiniProgramAtRules)(cleanedLocalImportWrapper) : cleanedLocalImportWrapper,
|
|
@@ -5544,16 +5674,21 @@ async function generateCssByGenerator(options) {
|
|
|
5544
5674
|
dependencies: []
|
|
5545
5675
|
};
|
|
5546
5676
|
if (isPureLocalCssImportWrapper(effectiveRawSource)) return;
|
|
5547
|
-
const hasGeneratedCss = hasTailwindGeneratedCss(
|
|
5548
|
-
const hasSourceDirectives = hasTailwindSourceDirectives(
|
|
5549
|
-
const hasGeneratedMarkers = hasTailwindGeneratedCssMarkers(
|
|
5677
|
+
const hasGeneratedCss = hasTailwindGeneratedCss(generatorRawSource);
|
|
5678
|
+
const hasSourceDirectives = hasTailwindSourceDirectives(generatorRawSource, { importFallback: generatorOptions.importFallback });
|
|
5679
|
+
const hasGeneratedMarkers = hasTailwindGeneratedCssMarkers(generatorRawSource);
|
|
5550
5680
|
const shouldGenerateCurrentCss = hasGeneratedCss || hasGeneratedMarkers || hasSourceDirectives || cssHandlerOptions.isMainChunk;
|
|
5551
5681
|
if (!SUPPORTED_GENERATOR_MAJOR_VERSIONS.has(majorVersion ?? 0) || !shouldGenerateCurrentCss || majorVersion === 3 && !hasSourceDirectives && !hasGeneratedCss && !hasGeneratedMarkers) return;
|
|
5552
5682
|
try {
|
|
5553
5683
|
await runtimeState.readyPromise;
|
|
5554
|
-
const currentCssCandidates = majorVersion === 4 ? await (0, tailwindcss_patch.extractSourceCandidates)(
|
|
5555
|
-
const
|
|
5556
|
-
|
|
5684
|
+
const currentCssCandidates = majorVersion === 4 ? await (0, tailwindcss_patch.extractSourceCandidates)(generatorRawSource, "css", { ...generatorOptions.bareArbitraryValues === void 0 ? {} : { bareArbitraryValues: generatorOptions.bareArbitraryValues } }) : [];
|
|
5685
|
+
const isolateCurrentCssCandidates = shouldIsolateCurrentTailwindV4CssCandidates(majorVersion, cssHandlerOptions, {
|
|
5686
|
+
hasGeneratedCss,
|
|
5687
|
+
hasGeneratedMarkers,
|
|
5688
|
+
rawSource: generatorRawSource
|
|
5689
|
+
});
|
|
5690
|
+
const runtimeWithCurrentCss = isolateCurrentCssCandidates ? new Set(currentCssCandidates) : currentCssCandidates.length > 0 ? new Set([...runtime, ...currentCssCandidates]) : runtime;
|
|
5691
|
+
const sources = await resolveGeneratorSources(majorVersion, runtimeState, generatorRawSource, file, cssHandlerOptions, generatorOptions, {
|
|
5557
5692
|
cssEntries: opts.cssEntries,
|
|
5558
5693
|
getSourceCandidatesForEntries,
|
|
5559
5694
|
runtime: runtimeWithCurrentCss
|
|
@@ -5570,17 +5705,18 @@ async function generateCssByGenerator(options) {
|
|
|
5570
5705
|
debug("defer empty scoped css source generation: %s", file);
|
|
5571
5706
|
return;
|
|
5572
5707
|
}
|
|
5573
|
-
const sourceRuntime = scopedRuntime && (scopedRuntime.size > 0 || isolateCssSource) ? mergeScopedRuntimeWithCurrentRuntime(scopedRuntime, runtimeWithCurrentCss, {
|
|
5708
|
+
const sourceRuntime = scopedRuntime && (scopedRuntime.size > 0 || isolateCssSource) ? isolateCurrentCssCandidates ? runtimeWithCurrentCss : mergeScopedRuntimeWithCurrentRuntime(scopedRuntime, runtimeWithCurrentCss, {
|
|
5574
5709
|
currentCssCandidates,
|
|
5575
5710
|
cssHandlerOptions,
|
|
5576
5711
|
isolateCssSource,
|
|
5577
5712
|
matchedCssSourceFile
|
|
5578
5713
|
}) : runtimeWithCurrentCss;
|
|
5579
5714
|
const generatorRuntime = majorVersion === 4 && generatorOptions.target === "weapp" ? filterUnsupportedMiniProgramTailwindV4Candidates(sourceRuntime) : sourceRuntime;
|
|
5715
|
+
const useIncrementalCache = (majorVersion === 3 || majorVersion === 4) && !(majorVersion === 3 && isolateCssSource);
|
|
5580
5716
|
return generator.generate({
|
|
5581
5717
|
bareArbitraryValues: generatorOptions.bareArbitraryValues,
|
|
5582
5718
|
candidates: generatorRuntime,
|
|
5583
|
-
incrementalCache:
|
|
5719
|
+
incrementalCache: useIncrementalCache,
|
|
5584
5720
|
scanSources: shouldScanTailwindV4Sources(majorVersion, generatorOptions.target, generatorRuntime, isolateCssSource),
|
|
5585
5721
|
styleOptions: generatorStyleOptions,
|
|
5586
5722
|
tailwindcssV3Compatibility: generatorOptions.tailwindcssV3Compatibility,
|
|
@@ -5602,22 +5738,27 @@ async function generateCssByGenerator(options) {
|
|
|
5602
5738
|
sources: generatedResults.flatMap((item) => item.sources)
|
|
5603
5739
|
};
|
|
5604
5740
|
debug("tailwind generator result: %s rawBytes=%d cssBytes=%d candidates=%d", file, generated.rawCss.length, generated.css.length, generated.classSet.size);
|
|
5605
|
-
if ((generated.target !== "weapp" || !hasUserCssLayerBlocks(
|
|
5741
|
+
if ((generated.target !== "weapp" || !hasUserCssLayerBlocks(generatorRawSource)) && typeof options.previousCss === "string" && typeof generated.incrementalCss === "string") {
|
|
5606
5742
|
const incrementalCss = stripTailwindBanner(generated.incrementalCss);
|
|
5607
5743
|
return {
|
|
5608
|
-
css: incrementalCss.trim().length > 0 ? createCssAppend(options.previousCss, finalizeMiniProgramGeneratorCss(incrementalCss, generated.target, majorVersion, opts.cssPreflight, { injectPreflight: false })) : options.previousCss,
|
|
5744
|
+
css: restoreLocalCssImports(incrementalCss.trim().length > 0 ? createCssAppend(options.previousCss, finalizeMiniProgramGeneratorCss(incrementalCss, generated.target, majorVersion, opts.cssPreflight, { injectPreflight: false })) : options.previousCss, localImportParts?.imports),
|
|
5609
5745
|
target: generated.target,
|
|
5610
5746
|
source: "generator",
|
|
5611
5747
|
dependencies: generated.dependencies,
|
|
5612
5748
|
incremental: true
|
|
5613
5749
|
};
|
|
5614
5750
|
}
|
|
5751
|
+
const shouldFilterApplyOnlyCss = shouldFilterApplyOnlyGeneratedCss(majorVersion, generated.target, generatorRawSource, {
|
|
5752
|
+
hasGeneratedCss,
|
|
5753
|
+
hasGeneratedMarkers
|
|
5754
|
+
});
|
|
5755
|
+
const generatedCss = shouldFilterApplyOnlyCss ? filterApplyOnlyGeneratedCss(stripTailwindBanner(generated.css), generatorRawSource) : stripTailwindBanner(generated.css);
|
|
5615
5756
|
const hasMatchedCssSourceFile = sources.some((source) => source.__weappTailwindcssMeta?.matchedCssSourceFile);
|
|
5616
|
-
const orderedExtraCss = hasMatchedCssSourceFile ? splitTailwindV4GeneratedCssBySourceOrder(
|
|
5757
|
+
const orderedExtraCss = hasMatchedCssSourceFile ? splitTailwindV4GeneratedCssBySourceOrder(generatorRawSource, generated.rawCss) : splitRawSourceByGeneratedCssOrder(generatorRawSource, generated.rawCss);
|
|
5617
5758
|
const shouldAppendMatchedCssSourceCompat = !hasMatchedCssSourceFile || orderedExtraCss !== void 0;
|
|
5618
5759
|
if (orderedExtraCss) {
|
|
5619
|
-
let css =
|
|
5620
|
-
if (generated.target === "weapp") css = inheritLegacyUnitConvertedDeclarations(css,
|
|
5760
|
+
let css = generatedCss;
|
|
5761
|
+
if (generated.target === "weapp") css = inheritLegacyUnitConvertedDeclarations(css, generatorRawSource);
|
|
5621
5762
|
const userCssOptions = {
|
|
5622
5763
|
generatorTarget: generated.target,
|
|
5623
5764
|
generatorStyleOptions,
|
|
@@ -5637,27 +5778,33 @@ async function generateCssByGenerator(options) {
|
|
|
5637
5778
|
hasSourceDirectives,
|
|
5638
5779
|
hasMatchedCssSourceFile
|
|
5639
5780
|
})) {
|
|
5640
|
-
const userCss = await transformGeneratorUserCss(
|
|
5781
|
+
const userCss = await transformGeneratorUserCss(generatorRawSource, userCssOptions);
|
|
5641
5782
|
css = createCssSourceOrderAppend(css, userCss);
|
|
5642
5783
|
}
|
|
5643
5784
|
if (generated.target === "weapp" && shouldAppendMatchedCssSourceCompat) {
|
|
5644
5785
|
if (shouldFinalizeMarkedUserLayerComponentsCss(file)) css = reorderMarkedUserLayerComponentsCss(css);
|
|
5645
|
-
|
|
5646
|
-
|
|
5786
|
+
if (!shouldFilterApplyOnlyCss) {
|
|
5787
|
+
css = await appendLegacyCompatCss(css, generatorRawSource, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
5788
|
+
if (!isolateCurrentCssCandidates) css = await appendLegacyContainerCompatCss(css, generatorRawSource, file, runtime, configuredContainerCompat, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
5789
|
+
}
|
|
5647
5790
|
} else if (generated.target === "weapp" && shouldFinalizeMarkedUserLayerComponentsCss(file)) css = reorderMarkedUserLayerComponentsCss(css);
|
|
5648
5791
|
return {
|
|
5649
|
-
css: finalizeMiniProgramGeneratorCss(css, generated.target, majorVersion, opts.cssPreflight
|
|
5792
|
+
css: restoreLocalCssImports(finalizeMiniProgramGeneratorCss(css, generated.target, majorVersion, opts.cssPreflight, { injectPreflight: shouldInjectMiniProgramPreflightForGeneratorCss(opts, {
|
|
5793
|
+
cssHandlerOptions,
|
|
5794
|
+
isolateCurrentCssCandidates,
|
|
5795
|
+
localImports: localImportParts?.imports
|
|
5796
|
+
}) }), localImportParts?.imports),
|
|
5650
5797
|
target: generated.target,
|
|
5651
5798
|
source: "generator",
|
|
5652
5799
|
dependencies: generated.dependencies
|
|
5653
5800
|
};
|
|
5654
5801
|
}
|
|
5655
5802
|
debug("tailwind direct css generation prefix mismatch, append transformed bundle css %s", file);
|
|
5656
|
-
let css =
|
|
5803
|
+
let css = generatedCss;
|
|
5657
5804
|
if (generated.target === "weapp") {
|
|
5658
|
-
css = inheritLegacyUnitConvertedDeclarations(css,
|
|
5659
|
-
if (hasUserCssLayerBlocks(
|
|
5660
|
-
const layerParts = splitUserCssLayerBlocks(
|
|
5805
|
+
css = inheritLegacyUnitConvertedDeclarations(css, generatorRawSource);
|
|
5806
|
+
if (hasUserCssLayerBlocks(generatorRawSource)) {
|
|
5807
|
+
const layerParts = splitUserCssLayerBlocks(generatorRawSource);
|
|
5661
5808
|
const layerUserCss = await transformGeneratorUserCss(layerParts.layer, {
|
|
5662
5809
|
generatorTarget: generated.target,
|
|
5663
5810
|
generatorStyleOptions,
|
|
@@ -5677,7 +5824,7 @@ async function generateCssByGenerator(options) {
|
|
|
5677
5824
|
}
|
|
5678
5825
|
if (hasMatchedCssSourceFile || generated.target === "web") {
|
|
5679
5826
|
if (hasMatchedCssSourceFile && generated.target === "weapp" && !hasGeneratedCss && !hasGeneratedMarkers) {
|
|
5680
|
-
const userCss = await transformGeneratorUserCss(
|
|
5827
|
+
const userCss = await transformGeneratorUserCss(generatorRawSource, {
|
|
5681
5828
|
generatorTarget: generated.target,
|
|
5682
5829
|
generatorStyleOptions,
|
|
5683
5830
|
cssUserHandlerOptions,
|
|
@@ -5686,12 +5833,14 @@ async function generateCssByGenerator(options) {
|
|
|
5686
5833
|
});
|
|
5687
5834
|
css = createCssSourceOrderAppend(css, userCss);
|
|
5688
5835
|
}
|
|
5689
|
-
if (hasMatchedCssSourceFile && generated.target === "weapp")
|
|
5836
|
+
if (hasMatchedCssSourceFile && generated.target === "weapp") {
|
|
5837
|
+
if (!isolateCurrentCssCandidates && !shouldFilterApplyOnlyCss) css = await appendLegacyContainerCompatCss(css, generatorRawSource, file, runtime, configuredContainerCompat, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
5838
|
+
}
|
|
5690
5839
|
if (shouldAppendWebBundleCssFallback(generated.target, {
|
|
5691
5840
|
hasSourceDirectives,
|
|
5692
5841
|
hasMatchedCssSourceFile
|
|
5693
5842
|
})) {
|
|
5694
|
-
const userCss = await transformGeneratorUserCss(
|
|
5843
|
+
const userCss = await transformGeneratorUserCss(generatorRawSource, {
|
|
5695
5844
|
generatorTarget: generated.target,
|
|
5696
5845
|
generatorStyleOptions,
|
|
5697
5846
|
cssUserHandlerOptions,
|
|
@@ -5701,16 +5850,26 @@ async function generateCssByGenerator(options) {
|
|
|
5701
5850
|
css = createCssSourceOrderAppend(css, userCss);
|
|
5702
5851
|
}
|
|
5703
5852
|
return {
|
|
5704
|
-
css: finalizeMiniProgramGeneratorCss(css, generated.target, majorVersion, opts.cssPreflight
|
|
5853
|
+
css: restoreLocalCssImports(finalizeMiniProgramGeneratorCss(css, generated.target, majorVersion, opts.cssPreflight, { injectPreflight: shouldInjectMiniProgramPreflightForGeneratorCss(opts, {
|
|
5854
|
+
cssHandlerOptions,
|
|
5855
|
+
isolateCurrentCssCandidates,
|
|
5856
|
+
localImports: localImportParts?.imports
|
|
5857
|
+
}) }), localImportParts?.imports),
|
|
5705
5858
|
target: generated.target,
|
|
5706
5859
|
source: "generator",
|
|
5707
5860
|
dependencies: generated.dependencies
|
|
5708
5861
|
};
|
|
5709
5862
|
}
|
|
5710
|
-
|
|
5711
|
-
|
|
5863
|
+
if (!shouldFilterApplyOnlyCss) {
|
|
5864
|
+
css = await appendLegacyCompatCss(css, generatorRawSource, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
5865
|
+
css = await appendLegacyContainerCompatCss(css, generatorRawSource, file, runtime, configuredContainerCompat, generated.target, styleHandler, cssHandlerOptions, generatorStyleOptions);
|
|
5866
|
+
}
|
|
5712
5867
|
return {
|
|
5713
|
-
css: finalizeMiniProgramGeneratorCss(css, generated.target, majorVersion, opts.cssPreflight
|
|
5868
|
+
css: restoreLocalCssImports(finalizeMiniProgramGeneratorCss(css, generated.target, majorVersion, opts.cssPreflight, { injectPreflight: shouldInjectMiniProgramPreflightForGeneratorCss(opts, {
|
|
5869
|
+
cssHandlerOptions,
|
|
5870
|
+
isolateCurrentCssCandidates,
|
|
5871
|
+
localImports: localImportParts?.imports
|
|
5872
|
+
}) }), localImportParts?.imports),
|
|
5714
5873
|
target: generated.target,
|
|
5715
5874
|
source: "generator",
|
|
5716
5875
|
dependencies: generated.dependencies
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const require_chunk = require("./chunk-
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
const require_precheck = require("./precheck-
|
|
5
|
-
const require_utils = require("./utils-
|
|
6
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
7
|
-
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-
|
|
8
|
-
const require_bundle_state = require("./bundle-state-
|
|
1
|
+
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CM0TRa8V.js");
|
|
3
|
+
const require_generator = require("./generator-AD-eX8Tr.js");
|
|
4
|
+
const require_precheck = require("./precheck-b8Y8qZg0.js");
|
|
5
|
+
const require_utils = require("./utils-Dolmt8EO.js");
|
|
6
|
+
const require_tailwindcss = require("./tailwindcss-CpQ6X4l6.js");
|
|
7
|
+
const require_incremental_runtime_class_set = require("./incremental-runtime-class-set-vOetpdWs.js");
|
|
8
|
+
const require_bundle_state = require("./bundle-state-Cso_ceUo.js");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
10
10
|
node_fs = require_chunk.__toESM(node_fs);
|
|
11
11
|
let node_module = require("node:module");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-
|
|
3
|
-
import { b as refreshTailwindRuntimeState, d as _defineProperty, i as pluginName, n as getCompilerContext, t as shouldSkipJsTransform, v as createTailwindRuntimeReadyPromise, y as ensureRuntimeClassSet } from "./precheck-
|
|
1
|
+
import { M as removeTailwindSourceDirectives, l as getRuntimeClassSetSignature, lt as createDebug, pt as resolveTailwindcssOptions } from "./v3-engine-Cczrkzqt.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions } from "./generator-DVWLNO0n.mjs";
|
|
3
|
+
import { b as refreshTailwindRuntimeState, d as _defineProperty, i as pluginName, n as getCompilerContext, t as shouldSkipJsTransform, v as createTailwindRuntimeReadyPromise, y as ensureRuntimeClassSet } from "./precheck-Bsn_LMmo.mjs";
|
|
4
4
|
import { r as getGroupedEntries } from "./utils-DsaS975I.mjs";
|
|
5
|
-
import { c as hasConfiguredTailwindV4CssRoots, l as upsertTailwindV4CssSource } from "./tailwindcss-
|
|
6
|
-
import { i as generateCssByGenerator, r as emitHmrTiming, s as processCachedTask, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-
|
|
7
|
-
import {
|
|
5
|
+
import { c as hasConfiguredTailwindV4CssRoots, l as upsertTailwindV4CssSource } from "./tailwindcss-AWaPVF2B.mjs";
|
|
6
|
+
import { i as generateCssByGenerator, r as emitHmrTiming, s as processCachedTask, t as createBundleRuntimeClassSetManager } from "./incremental-runtime-class-set-xf49kky6.mjs";
|
|
7
|
+
import { C as toAbsoluteOutputPath, S as resolveOutputSpecifier, b as stripRequestQuery, d as stripBundlerGeneratedCssMarkers, f as resolvePackageDir, n as createBundleBuildState, p as resolvePluginDisabledState, r as updateBundleBuildState, s as pushConcurrentTaskFactories, t as buildBundleSnapshot, y as isSourceStyleRequest } from "./bundle-state-DEyxCR4f.mjs";
|
|
8
8
|
import Module, { createRequire } from "node:module";
|
|
9
9
|
import fs from "node:fs";
|
|
10
10
|
import process from "node:process";
|
package/dist/webpack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_webpack = require("./webpack-
|
|
2
|
+
const require_webpack = require("./webpack-BBHJYKqB.js");
|
|
3
3
|
exports.WeappTailwindcss = require_webpack.WeappTailwindcss;
|
|
4
4
|
exports.weappTailwindcss = require_webpack.WeappTailwindcss;
|
|
5
5
|
exports.weappTailwindcssPackageDir = require_webpack.weappTailwindcssPackageDir;
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-
|
|
1
|
+
import { n as weappTailwindcssPackageDir, t as WeappTailwindcss } from "./webpack-DJFw08SK.mjs";
|
|
2
2
|
export { WeappTailwindcss, WeappTailwindcss as weappTailwindcss, weappTailwindcssPackageDir };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "weapp-tailwindcss",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5",
|
|
4
4
|
"description": "把 tailwindcss 原子化样式思想,带给小程序开发者们! bring tailwindcss to miniprogram developers!",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -173,7 +173,6 @@
|
|
|
173
173
|
"@babel/traverse": "~7.29.7",
|
|
174
174
|
"@babel/types": "~7.29.7",
|
|
175
175
|
"@vue/compiler-dom": "^3.5.35",
|
|
176
|
-
"@vue/compiler-sfc": "^3.5.35",
|
|
177
176
|
"@weapp-core/escape": "~8.0.0",
|
|
178
177
|
"comment-json": "^5.0.0",
|
|
179
178
|
"debug": "~4.4.3",
|
|
@@ -187,7 +186,7 @@
|
|
|
187
186
|
"tailwindcss-patch": "9.4.2",
|
|
188
187
|
"yaml": "^2.9.0",
|
|
189
188
|
"@weapp-tailwindcss/logger": "2.0.0",
|
|
190
|
-
"@weapp-tailwindcss/postcss": "3.0.
|
|
189
|
+
"@weapp-tailwindcss/postcss": "3.0.3",
|
|
191
190
|
"@weapp-tailwindcss/reset": "0.1.1",
|
|
192
191
|
"@weapp-tailwindcss/shared": "2.0.0",
|
|
193
192
|
"tailwindcss-config": "2.0.0"
|