weapp-tailwindcss 5.0.6 → 5.0.7
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/{bundle-state-CFgzVHFP.js → bundle-state-BzwPS-UI.js} +2 -1
- package/dist/{bundle-state-CdNXQl-o.mjs → bundle-state-ChcOKb9w.mjs} +2 -1
- package/dist/bundlers/gulp/index.d.ts +3 -4
- package/dist/bundlers/gulp/module-graph.d.ts +2 -0
- package/dist/bundlers/gulp/runtime-snapshot.d.ts +5 -0
- package/dist/bundlers/gulp/vinyl-transform.d.ts +3 -0
- package/dist/bundlers/shared/css-cleanup.d.ts +1 -1
- package/dist/bundlers/shared/css-source-trace.d.ts +20 -0
- package/dist/bundlers/shared/generator-css/directives/fallback.d.ts +11 -0
- package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +56 -0
- package/dist/bundlers/shared/generator-css/local-imports.d.ts +7 -0
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/types.d.ts +27 -0
- package/dist/bundlers/shared/generator-css/user-css.d.ts +26 -0
- package/dist/bundlers/shared/generator-css/validate.d.ts +5 -0
- package/dist/bundlers/shared/generator-css.d.ts +4 -32
- package/dist/bundlers/vite/css-finalizer.d.ts +3 -0
- package/dist/bundlers/vite/generate-bundle/css-config-directives.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/css-output.d.ts +14 -0
- package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +11 -0
- package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +9 -0
- package/dist/bundlers/vite/generate-bundle/style-matching.d.ts +5 -0
- package/dist/bundlers/vite/generate-bundle/subpackages.d.ts +7 -0
- package/dist/bundlers/vite/generate-bundle/types.d.ts +68 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +4 -62
- package/dist/bundlers/vite/incremental-runtime-class-set/entries.d.ts +4 -0
- package/dist/bundlers/vite/incremental-runtime-class-set/escaped-candidates.d.ts +2 -0
- package/dist/bundlers/vite/incremental-runtime-class-set/v3-candidates.d.ts +13 -0
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +1 -0
- package/dist/bundlers/vite/processed-css-assets/css-rules.d.ts +17 -0
- package/dist/bundlers/vite/processed-css-assets.d.ts +2 -0
- package/dist/bundlers/vite/source-candidates/scan-root.d.ts +10 -0
- package/dist/bundlers/vite/source-candidates/script.d.ts +7 -0
- package/dist/bundlers/vite/source-candidates/tailwind-v3-default-extractor.d.ts +1 -0
- package/dist/bundlers/vite/source-candidates.d.ts +8 -3
- package/dist/bundlers/vite/source-scan/css-entries.d.ts +20 -0
- package/dist/bundlers/vite/source-scan/dependencies.d.ts +2 -0
- package/dist/bundlers/vite/source-scan.d.ts +2 -12
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.d.ts +48 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +1 -20
- package/dist/cli.js +69 -69
- package/dist/cli.mjs +69 -69
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{defaults-BPUuNYcD.js → defaults-Boc26eel.js} +1 -0
- package/dist/{defaults-8xrgzxFY.mjs → defaults-DH0ZQRhy.mjs} +1 -0
- package/dist/defaults.js +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/{generator-C56PJYxA.js → generator-6yF8wjxR.js} +1 -1
- package/dist/{generator-Bgn4m8An.mjs → generator-BON6M1bL.mjs} +1 -1
- package/dist/generator.js +2 -2
- package/dist/generator.mjs +2 -2
- package/dist/gulp-_7p1Z2vc.js +473 -0
- package/dist/gulp-oE-Byqk6.mjs +463 -0
- package/dist/gulp.js +4 -414
- package/dist/gulp.mjs +1 -406
- package/dist/{incremental-runtime-class-set-Bmzdjlk0.js → hmr-timing-BKQNRxHr.js} +1205 -449
- package/dist/{incremental-runtime-class-set-BEYHQkZc.mjs → hmr-timing-BVTGf5ch.mjs} +1169 -467
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/dist/{postcss-B7QNe78h.js → postcss-BTIunhWl.js} +7 -7
- package/dist/{postcss-BgINK7Nm.mjs → postcss-BtmrrZ31.mjs} +4 -4
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-Copn2SqE.mjs → precheck-CZjr87m_.mjs} +19 -5
- package/dist/{precheck-CyPbGn38.js → precheck-fhIkzCSU.js} +19 -5
- package/dist/presets.js +2 -2
- package/dist/presets.mjs +2 -2
- package/dist/tailwindcss/source-scan/inline-source.d.ts +7 -0
- package/dist/tailwindcss/source-scan.d.ts +2 -7
- package/dist/tailwindcss/v3-engine/generator/cache-key.d.ts +3 -0
- package/dist/tailwindcss/v3-engine/generator/content.d.ts +10 -0
- package/dist/tailwindcss/v3-engine/generator/runtime-ready.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/generator/css-compat.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/generator/rpx-candidates.d.ts +6 -0
- package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/types.d.ts +1 -1
- package/dist/{tailwindcss-C0Zgo3Es.mjs → tailwindcss-bbQUg25J.mjs} +2 -2
- package/dist/{tailwindcss-Tw6CSVHL.js → tailwindcss-vswd1gc3.js} +2 -2
- package/dist/{transform-95ivJthq.js → transform-CReJxxh_.js} +11 -2
- package/dist/{transform-DgCFGtQR.mjs → transform-DEsFlG9k.mjs} +11 -2
- package/dist/types/typedoc-tailwindcss-patch.d.ts +4 -2
- package/dist/types/user-defined-options/general.d.ts +5 -0
- package/dist/uni-app-x/component-local-style.d.ts +1 -0
- package/dist/uni-app-x/harmony.d.ts +1 -0
- package/dist/uni-app-x/style-asset/style-value.d.ts +16 -0
- package/dist/uni-app-x/style-asset.d.ts +20 -0
- package/dist/uni-app-x/transform.d.ts +1 -0
- package/dist/uni-app-x/vite.d.ts +1 -0
- package/dist/{v3-engine-6FVAcrZl.js → v3-engine-CEMXFegG.js} +758 -708
- package/dist/{v3-engine-Ji6AXPh2.mjs → v3-engine-CdIwmHuc.mjs} +756 -706
- package/dist/{vite-Bw6LOXvf.js → vite-0jFbh9hx.js} +1797 -386
- package/dist/{vite-ChZ2cbn4.mjs → vite-C7BGAlCE.mjs} +1779 -369
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +1104 -980
- package/dist/{webpack-CMJ7iqN7.mjs → webpack-Dx6_eg5k.mjs} +96 -36
- package/dist/{webpack-nn3P8_S_.js → webpack-aEuDoYfQ.js} +105 -44
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +7 -6
- package/dist/source-candidates-BODCmzz5.mjs +0 -355
- package/dist/source-candidates-Caf2GDvx.js +0 -374
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_generator = require("./generator-
|
|
3
|
-
const require_gulp = require("./gulp.js");
|
|
4
|
-
const require_postcss = require("./postcss-
|
|
5
|
-
const require_vite = require("./vite-
|
|
6
|
-
const require_webpack = require("./webpack-
|
|
2
|
+
const require_generator = require("./generator-6yF8wjxR.js");
|
|
3
|
+
const require_gulp = require("./gulp-_7p1Z2vc.js");
|
|
4
|
+
const require_postcss = require("./postcss-BTIunhWl.js");
|
|
5
|
+
const require_vite = require("./vite-0jFbh9hx.js");
|
|
6
|
+
const require_webpack = require("./webpack-aEuDoYfQ.js");
|
|
7
7
|
let _weapp_tailwindcss_postcss = require("@weapp-tailwindcss/postcss");
|
|
8
8
|
exports.WeappTailwindcss = require_vite.WeappTailwindcss;
|
|
9
9
|
exports.createPlugins = require_gulp.createPlugins;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createWeappTailwindcssGenerator } from "./generator-
|
|
2
|
-
import {
|
|
3
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
4
|
-
import { t as WeappTailwindcss } from "./vite-
|
|
5
|
-
import { n as weappTailwindcssPackageDir } from "./webpack-
|
|
1
|
+
import { t as createWeappTailwindcssGenerator } from "./generator-BON6M1bL.mjs";
|
|
2
|
+
import { t as createPlugins } from "./gulp-oE-Byqk6.mjs";
|
|
3
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-BtmrrZ31.mjs";
|
|
4
|
+
import { t as WeappTailwindcss } from "./vite-C7BGAlCE.mjs";
|
|
5
|
+
import { n as weappTailwindcssPackageDir } from "./webpack-Dx6_eg5k.mjs";
|
|
6
6
|
import { unitConversionComposeRules, unitConversionPresets } from "@weapp-tailwindcss/postcss";
|
|
7
7
|
export { WeappTailwindcss, createPlugins, createWeappTailwindcssGenerator, unitConversionComposeRules, unitConversionPresets, weappTailwindcssPackageDir, weappTailwindcssPostcssPlugin };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_generator = require("./generator-
|
|
4
|
-
let postcss
|
|
5
|
-
postcss
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CEMXFegG.js");
|
|
3
|
+
const require_generator = require("./generator-6yF8wjxR.js");
|
|
4
|
+
let postcss = require("postcss");
|
|
5
|
+
postcss = require_chunk.__toESM(postcss);
|
|
6
6
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
7
7
|
let node_process = require("node:process");
|
|
8
8
|
node_process = require_chunk.__toESM(node_process);
|
|
@@ -42,7 +42,7 @@ function resolvePostcssProjectRoot(result, options) {
|
|
|
42
42
|
function replaceRootCss(root, css, result) {
|
|
43
43
|
root.removeAll();
|
|
44
44
|
try {
|
|
45
|
-
const nextRoot = postcss
|
|
45
|
+
const nextRoot = postcss.default.parse(css, { from: resolveInputFile(result) });
|
|
46
46
|
root.append(nextRoot.nodes);
|
|
47
47
|
} catch {
|
|
48
48
|
root.raws = { after: css };
|
|
@@ -195,7 +195,7 @@ function normalizeSelector(selector) {
|
|
|
195
195
|
function collectApplyOnlyCssSelectors(css) {
|
|
196
196
|
const selectors = /* @__PURE__ */ new Set();
|
|
197
197
|
try {
|
|
198
|
-
postcss.parse(css).walkRules((rule) => {
|
|
198
|
+
postcss.default.parse(css).walkRules((rule) => {
|
|
199
199
|
if (!rule.nodes?.some((node) => node.type === "atrule" && node.name === "apply")) return;
|
|
200
200
|
for (const selector of rule.selectors ?? [rule.selector]) {
|
|
201
201
|
const normalized = normalizeSelector(selector);
|
|
@@ -212,7 +212,7 @@ function filterApplyOnlyGeneratedCss(css, rawCss) {
|
|
|
212
212
|
const selectors = collectApplyOnlyCssSelectors(rawCss);
|
|
213
213
|
if (selectors.size === 0) return css;
|
|
214
214
|
try {
|
|
215
|
-
const root = postcss.parse(css);
|
|
215
|
+
const root = postcss.default.parse(css);
|
|
216
216
|
root.walkRules((rule) => {
|
|
217
217
|
if (!ruleMatchesApplyOnlySelector(rule, selectors) && !rule.nodes?.some((node) => node.type === "decl" && node.prop.startsWith("--"))) rule.remove();
|
|
218
218
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-
|
|
3
|
-
import postcss
|
|
1
|
+
import { $ as createSourceScanPattern, T as hasTailwindRootDirectives, Z as DEFAULT_SOURCE_SCAN_EXTENSIONS, ct as collectCssInlineSourceCandidates, dt as readInstalledPackageMajorVersion, et as expandTailwindSourceEntries, it as resolveCssSourceEntries, nt as normalizeLegacyContentEntries, rt as parseConfigParam, t as resolveTailwindV3Source, w as hasTailwindApplyDirective, y as resolveTailwindV4Source$1 } from "./v3-engine-CdIwmHuc.mjs";
|
|
2
|
+
import { i as normalizeWeappTailwindcssGeneratorOptions, t as createWeappTailwindcssGenerator } from "./generator-BON6M1bL.mjs";
|
|
3
|
+
import postcss from "postcss";
|
|
4
4
|
import { extractRawCandidatesWithPositions, extractValidCandidates } from "tailwindcss-patch";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import path from "node:path";
|
|
@@ -38,7 +38,7 @@ function resolvePostcssProjectRoot(result, options) {
|
|
|
38
38
|
function replaceRootCss(root, css, result) {
|
|
39
39
|
root.removeAll();
|
|
40
40
|
try {
|
|
41
|
-
const nextRoot = postcss
|
|
41
|
+
const nextRoot = postcss.parse(css, { from: resolveInputFile(result) });
|
|
42
42
|
root.append(nextRoot.nodes);
|
|
43
43
|
} catch {
|
|
44
44
|
root.raws = { after: css };
|
package/dist/postcss.js
CHANGED
|
@@ -2,6 +2,6 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_postcss = require("./postcss-
|
|
5
|
+
const require_postcss = require("./postcss-BTIunhWl.js");
|
|
6
6
|
exports.default = require_postcss.weappTailwindcssPostcssPlugin;
|
|
7
7
|
exports.weappTailwindcssPostcssPlugin = require_postcss.weappTailwindcssPostcssPlugin;
|
package/dist/postcss.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as weappTailwindcssPostcssPlugin } from "./postcss-
|
|
1
|
+
import { t as weappTailwindcssPostcssPlugin } from "./postcss-BtmrrZ31.mjs";
|
|
2
2
|
export { weappTailwindcssPostcssPlugin as default, weappTailwindcssPostcssPlugin };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { K as createTailwindV4Engine$1, c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet,
|
|
2
|
-
import { a as resolveDefaultCssPreflight, i as getDefaultOptions, o as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH, s as HARD_PARSE_CACHE_MAX_ENTRIES } from "./defaults-
|
|
1
|
+
import { K as createTailwindV4Engine$1, c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, ht as resolveBooleanObjectOption, lt as createDebug, s as ensureTailwindcssRuntimePatch, u as getRuntimeClassSetSignatureWithSources, x as resolveTailwindV4SourceFromPatcher, yt as omitUndefined } from "./v3-engine-CdIwmHuc.mjs";
|
|
2
|
+
import { a as resolveDefaultCssPreflight, i as getDefaultOptions, o as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH, s as HARD_PARSE_CACHE_MAX_ENTRIES } from "./defaults-DH0ZQRhy.mjs";
|
|
3
3
|
import { i as isMap, n as defuOverrideArray } from "./utils-DsaS975I.mjs";
|
|
4
|
-
import { i as resolveUniAppXOptions, o as applyV4CssCalcDefaults, s as warnMissingCssEntries, t as createTailwindcssPatcherFromContext } from "./tailwindcss-
|
|
4
|
+
import { i as resolveUniAppXOptions, o as applyV4CssCalcDefaults, s as warnMissingCssEntries, t as createTailwindcssPatcherFromContext } from "./tailwindcss-bbQUg25J.mjs";
|
|
5
5
|
import { splitCandidateTokens } from "tailwindcss-patch";
|
|
6
6
|
import process from "node:process";
|
|
7
7
|
import path from "node:path";
|
|
@@ -212,6 +212,15 @@ async function collectTailwindV4GeneratorClassSet(twPatcher) {
|
|
|
212
212
|
return;
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
+
async function mergeTailwindV4GeneratorClassSet(twPatcher, classSet) {
|
|
216
|
+
if (twPatcher.majorVersion !== 4) return classSet;
|
|
217
|
+
const generatorClassSet = await collectTailwindV4GeneratorClassSet(twPatcher);
|
|
218
|
+
if (!generatorClassSet || generatorClassSet.size === 0) return classSet;
|
|
219
|
+
return new Set([...classSet, ...generatorClassSet]);
|
|
220
|
+
}
|
|
221
|
+
function canReturnExtractClassSetImmediately(twPatcher) {
|
|
222
|
+
return twPatcher.majorVersion !== 4;
|
|
223
|
+
}
|
|
215
224
|
async function collectRuntimeClassSet(twPatcher, options = {}) {
|
|
216
225
|
let activePatcher = twPatcher;
|
|
217
226
|
if (options.force && !options.skipRefresh) {
|
|
@@ -238,8 +247,13 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
|
|
|
238
247
|
const result = await activePatcher.extract({ write: false });
|
|
239
248
|
if (result?.classSet) {
|
|
240
249
|
if (result.classSet.size > 0) {
|
|
241
|
-
|
|
242
|
-
|
|
250
|
+
if (canReturnExtractClassSetImmediately(activePatcher)) {
|
|
251
|
+
debug$1("runtime class set resolved via extract(), size=%d", result.classSet.size);
|
|
252
|
+
return result.classSet;
|
|
253
|
+
}
|
|
254
|
+
const merged = await mergeTailwindV4GeneratorClassSet(activePatcher, result.classSet);
|
|
255
|
+
debug$1("runtime class set resolved via extract() + tailwindcss v4 source scan, extract=%d merged=%d", result.classSet.size, merged.size);
|
|
256
|
+
return merged;
|
|
243
257
|
}
|
|
244
258
|
if (preferExtract && activePatcher.majorVersion !== 4) {
|
|
245
259
|
debug$1("runtime class set resolved via empty extract() on force collect, size=0");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
-
const require_defaults = require("./defaults-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CEMXFegG.js");
|
|
3
|
+
const require_defaults = require("./defaults-Boc26eel.js");
|
|
4
4
|
require("./utils-Dolmt8EO.js");
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-vswd1gc3.js");
|
|
6
6
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
7
7
|
let node_process = require("node:process");
|
|
8
8
|
node_process = require_chunk.__toESM(node_process);
|
|
@@ -219,6 +219,15 @@ async function collectTailwindV4GeneratorClassSet(twPatcher) {
|
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
+
async function mergeTailwindV4GeneratorClassSet(twPatcher, classSet) {
|
|
223
|
+
if (twPatcher.majorVersion !== 4) return classSet;
|
|
224
|
+
const generatorClassSet = await collectTailwindV4GeneratorClassSet(twPatcher);
|
|
225
|
+
if (!generatorClassSet || generatorClassSet.size === 0) return classSet;
|
|
226
|
+
return new Set([...classSet, ...generatorClassSet]);
|
|
227
|
+
}
|
|
228
|
+
function canReturnExtractClassSetImmediately(twPatcher) {
|
|
229
|
+
return twPatcher.majorVersion !== 4;
|
|
230
|
+
}
|
|
222
231
|
async function collectRuntimeClassSet(twPatcher, options = {}) {
|
|
223
232
|
let activePatcher = twPatcher;
|
|
224
233
|
if (options.force && !options.skipRefresh) {
|
|
@@ -245,8 +254,13 @@ async function collectRuntimeClassSet(twPatcher, options = {}) {
|
|
|
245
254
|
const result = await activePatcher.extract({ write: false });
|
|
246
255
|
if (result?.classSet) {
|
|
247
256
|
if (result.classSet.size > 0) {
|
|
248
|
-
|
|
249
|
-
|
|
257
|
+
if (canReturnExtractClassSetImmediately(activePatcher)) {
|
|
258
|
+
debug$1("runtime class set resolved via extract(), size=%d", result.classSet.size);
|
|
259
|
+
return result.classSet;
|
|
260
|
+
}
|
|
261
|
+
const merged = await mergeTailwindV4GeneratorClassSet(activePatcher, result.classSet);
|
|
262
|
+
debug$1("runtime class set resolved via extract() + tailwindcss v4 source scan, extract=%d merged=%d", result.classSet.size, merged.size);
|
|
263
|
+
return merged;
|
|
250
264
|
}
|
|
251
265
|
if (preferExtract && activePatcher.majorVersion !== 4) {
|
|
252
266
|
debug$1("runtime class set resolved via empty extract() on force collect, size=0");
|
package/dist/presets.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
3
|
-
const require_v3_engine = require("./v3-engine-
|
|
3
|
+
const require_v3_engine = require("./v3-engine-CEMXFegG.js");
|
|
4
4
|
const require_utils = require("./utils-Dolmt8EO.js");
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-vswd1gc3.js");
|
|
6
6
|
require("./logger-TlKT3xmR.js");
|
|
7
7
|
let node_process = require("node:process");
|
|
8
8
|
node_process = require_chunk.__toESM(node_process);
|
package/dist/presets.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { yt as omitUndefined } from "./v3-engine-CdIwmHuc.mjs";
|
|
2
2
|
import { n as defuOverrideArray, o as resolveUniUtsPlatform } from "./utils-DsaS975I.mjs";
|
|
3
|
-
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-
|
|
3
|
+
import { i as resolveUniAppXOptions, n as resolveTailwindcssBasedir } from "./tailwindcss-bbQUg25J.mjs";
|
|
4
4
|
import { t as logger } from "./logger-BNzxZbZj.mjs";
|
|
5
5
|
import process from "node:process";
|
|
6
6
|
import path from "node:path";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Root } from 'postcss';
|
|
2
|
+
export interface TailwindInlineSourceCandidates {
|
|
3
|
+
included: Set<string>;
|
|
4
|
+
excluded: Set<string>;
|
|
5
|
+
}
|
|
6
|
+
export declare function expandInlineSourceCandidatePattern(pattern: string): string[];
|
|
7
|
+
export declare function collectCssInlineSourceCandidates(root: Root): TailwindInlineSourceCandidates;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import type { Root } from 'postcss';
|
|
2
1
|
import type { TailwindV4CssSource } from 'tailwindcss-patch';
|
|
3
2
|
export interface TailwindSourceEntry {
|
|
4
3
|
base: string;
|
|
5
4
|
pattern: string;
|
|
6
5
|
negated: boolean;
|
|
7
6
|
}
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
excluded: Set<string>;
|
|
11
|
-
}
|
|
7
|
+
export type { TailwindInlineSourceCandidates } from './source-scan/inline-source';
|
|
8
|
+
export { collectCssInlineSourceCandidates, expandInlineSourceCandidatePattern } from './source-scan/inline-source';
|
|
12
9
|
export declare const DEFAULT_SOURCE_SCAN_EXTENSIONS: string[];
|
|
13
10
|
export declare const FULL_SOURCE_SCAN_EXTENSIONS: string[];
|
|
14
11
|
export declare function createSourceScanPattern(extensions?: string[]): string;
|
|
@@ -21,8 +18,6 @@ export declare function isFileMatchedByTailwindSourceEntries(file: string, entri
|
|
|
21
18
|
export declare function createTailwindSourceEntryMatcher(entries: TailwindSourceEntry[] | undefined): ((file: string) => boolean) | undefined;
|
|
22
19
|
export declare function resolveTailwindV4CssSourceBase(source: Pick<TailwindV4CssSource, 'base' | 'file'>, fallbackBase: string): string;
|
|
23
20
|
export declare function parseConfigParam(params: string): string | undefined;
|
|
24
|
-
export declare function expandInlineSourceCandidatePattern(pattern: string): string[];
|
|
25
|
-
export declare function collectCssInlineSourceCandidates(root: Root): TailwindInlineSourceCandidates;
|
|
26
21
|
export declare function normalizeLegacyContentEntries(content: unknown, base: string, options?: {
|
|
27
22
|
relativeBase?: string | undefined;
|
|
28
23
|
}): TailwindSourceEntry[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { TailwindV3GenerateOptions, TailwindV3GenerateTarget, TailwindV3ResolvedSource } from '../types';
|
|
3
|
+
export declare function createIncrementalGenerateCacheKey(source: TailwindV3ResolvedSource, target: TailwindV3GenerateTarget, styleOptions: Partial<IStyleHandlerOptions> | undefined, bareArbitraryValues: TailwindV3GenerateOptions['bareArbitraryValues']): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Config } from 'tailwindcss';
|
|
2
|
+
import type { TailwindV3CandidateSource, TailwindV3GenerateOptions, TailwindV3ResolvedSource } from '../types';
|
|
3
|
+
export declare function createChangedContentEntries(candidates: Iterable<string>, sources: TailwindV3CandidateSource[]): {
|
|
4
|
+
content: string;
|
|
5
|
+
extension: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare function collectCandidates(candidates: Iterable<string> | undefined): Set<string>;
|
|
8
|
+
export declare function mergeGenerateCandidates(source: TailwindV3ResolvedSource, options: TailwindV3GenerateOptions): Set<string>;
|
|
9
|
+
export declare function normalizeConfigObject(config: Config | undefined): import("tailwindcss/types/config").Config | undefined;
|
|
10
|
+
export declare function createTailwindConfig(source: TailwindV3ResolvedSource, options: TailwindV3GenerateOptions): import("tailwindcss/types/config").Config;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function normalizeRpxTextCandidates(candidates: Iterable<string>): {
|
|
2
|
+
candidates: Set<string>;
|
|
3
|
+
restoreCandidates: Map<string, string>;
|
|
4
|
+
};
|
|
5
|
+
export declare function restoreRpxTextCandidates(candidates: Iterable<string>, restoreCandidates: ReadonlyMap<string, string>): Set<string>;
|
|
6
|
+
export declare function restoreRpxTextCssSelectors(css: string, restoreCandidates: ReadonlyMap<string, string>): string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { TailwindV4GenerateOptions, TailwindV4ResolvedSource } from '../types';
|
|
2
|
+
export declare function resolveScanSources(source: TailwindV4ResolvedSource, scanSources: TailwindV4GenerateOptions['scanSources']): Promise<boolean | import("tailwindcss-patch").TailwindV4SourcePattern[] | undefined>;
|
|
@@ -6,7 +6,7 @@ export interface TailwindV4SourcePattern {
|
|
|
6
6
|
pattern: string;
|
|
7
7
|
negated: boolean;
|
|
8
8
|
}
|
|
9
|
-
type TailwindV4PatchGenerateOptions = Omit<PatchTailwindV4GenerateOptions, 'target' | 'styleOptions' | 'tailwindcssV3Compatibility' | 'scanSources'>;
|
|
9
|
+
type TailwindV4PatchGenerateOptions = Omit<PatchTailwindV4GenerateOptions, 'target' | 'styleOptions' | 'tailwindcssV3Compatibility' | 'scanSources' | 'bareArbitraryValues'>;
|
|
10
10
|
export interface TailwindV4GenerateOptions extends TailwindV4PatchGenerateOptions {
|
|
11
11
|
incrementalCache?: boolean | undefined;
|
|
12
12
|
bareArbitraryValues?: PatchTailwindV4GenerateOptions['bareArbitraryValues'] | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _t as
|
|
1
|
+
import { _t as findWorkspacePackageDir, dt as readInstalledPackageMajorVersion, f as runtimeSignaturePatchersSymbol, gt as findNearestPackageRoot, mt as normalizeStringListOption, ut as createTailwindcssPatcher, vt as findWorkspaceRoot, yt as omitUndefined } from "./v3-engine-CdIwmHuc.mjs";
|
|
2
2
|
import { n as defuOverrideArray } from "./utils-DsaS975I.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
5
4
|
import process from "node:process";
|
|
5
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { logger } from "@weapp-tailwindcss/logger";
|
|
8
8
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_v3_engine = require("./v3-engine-
|
|
2
|
+
const require_v3_engine = require("./v3-engine-CEMXFegG.js");
|
|
3
3
|
require("./utils-Dolmt8EO.js");
|
|
4
|
-
let node_fs = require("node:fs");
|
|
5
4
|
let node_module = require("node:module");
|
|
6
5
|
let node_process = require("node:process");
|
|
7
6
|
node_process = require_chunk.__toESM(node_process);
|
|
7
|
+
let node_fs = require("node:fs");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
node_path = require_chunk.__toESM(node_path);
|
|
10
10
|
let _weapp_tailwindcss_logger = require("@weapp-tailwindcss/logger");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-emK7D4bc.js");
|
|
2
|
-
const require_precheck = require("./precheck-
|
|
2
|
+
const require_precheck = require("./precheck-fhIkzCSU.js");
|
|
3
3
|
let tailwindcss_patch = require("tailwindcss-patch");
|
|
4
4
|
let magic_string = require("magic-string");
|
|
5
5
|
magic_string = require_chunk.__toESM(magic_string);
|
|
@@ -14584,6 +14584,7 @@ var import_compiler_dom = (/* @__PURE__ */ require_chunk.__commonJSMin(((exports
|
|
|
14584
14584
|
const EXPRESSION_WRAPPER_PREFIX = "(\n";
|
|
14585
14585
|
const EXPRESSION_WRAPPER_SUFFIX = "\n)";
|
|
14586
14586
|
const COMPONENT_RE = /(?:^|[/\\])components(?:[/\\].+)?\.(?:uvue|nvue)$/;
|
|
14587
|
+
const PAGE_RE = /(?:^|[/\\])pages(?:[/\\].+)?\.(?:uvue|nvue)$/;
|
|
14587
14588
|
function createStableHash(input) {
|
|
14588
14589
|
let hash = 2166136261;
|
|
14589
14590
|
for (let i = 0; i < input.length; i++) {
|
|
@@ -14612,6 +14613,9 @@ function isRuntimeCandidate(candidate, runtimeSet) {
|
|
|
14612
14613
|
function shouldEnableComponentLocalStyle(id) {
|
|
14613
14614
|
return COMPONENT_RE.test(id);
|
|
14614
14615
|
}
|
|
14616
|
+
function shouldEnablePageLocalStyle(id) {
|
|
14617
|
+
return PAGE_RE.test(id);
|
|
14618
|
+
}
|
|
14615
14619
|
var UniAppXComponentLocalStyleCollector = class {
|
|
14616
14620
|
constructor(fileId, runtimeSet) {
|
|
14617
14621
|
this.fileId = fileId;
|
|
@@ -14766,6 +14770,11 @@ function updateDirectiveExpressionWithLocalStyle(ms, prop, offset, jsHandler, co
|
|
|
14766
14770
|
});
|
|
14767
14771
|
ms.update(start, end, collector.rewriteTransformedCode(generated, { wrapExpression: true }));
|
|
14768
14772
|
}
|
|
14773
|
+
function shouldEnableLocalStyle(id, options) {
|
|
14774
|
+
if (options.enableComponentLocalStyle && shouldEnableComponentLocalStyle(id)) return true;
|
|
14775
|
+
if (options.enablePageLocalStyle && shouldEnablePageLocalStyle(id)) return true;
|
|
14776
|
+
return false;
|
|
14777
|
+
}
|
|
14769
14778
|
function shouldHandleAttribute(tag, attrName, disabledDefaultTemplateHandler, matchCustomAttribute) {
|
|
14770
14779
|
const lowerName = attrName.toLowerCase();
|
|
14771
14780
|
const shouldHandleDefault = !disabledDefaultTemplateHandler && lowerName === "class";
|
|
@@ -14817,7 +14826,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
|
|
|
14817
14826
|
const matchCustomAttribute = require_precheck.createAttributeMatcher(customAttributesEntities);
|
|
14818
14827
|
const ms = new magic_string.default(code);
|
|
14819
14828
|
const descriptor = parseSfc(code);
|
|
14820
|
-
const localStyleCollector =
|
|
14829
|
+
const localStyleCollector = shouldEnableLocalStyle(id, options) ? new UniAppXComponentLocalStyleCollector(id, runtimeSet) : void 0;
|
|
14821
14830
|
if (descriptor.errors.length === 0) {
|
|
14822
14831
|
if (descriptor.template?.ast) {
|
|
14823
14832
|
const templateOffset = descriptor.template.start;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createAttributeMatcher, d as _defineProperty, f as isClassContextLiteralPath, l as analyzeSource, m as babelParse, p as replaceWxml, s as generateCode, u as JsTokenUpdater } from "./precheck-
|
|
1
|
+
import { c as createAttributeMatcher, d as _defineProperty, f as isClassContextLiteralPath, l as analyzeSource, m as babelParse, p as replaceWxml, s as generateCode, u as JsTokenUpdater } from "./precheck-CZjr87m_.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { splitCandidateTokens } from "tailwindcss-patch";
|
|
4
4
|
import MagicString from "magic-string";
|
|
@@ -14587,6 +14587,7 @@ var import_compiler_dom = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14587
14587
|
const EXPRESSION_WRAPPER_PREFIX = "(\n";
|
|
14588
14588
|
const EXPRESSION_WRAPPER_SUFFIX = "\n)";
|
|
14589
14589
|
const COMPONENT_RE = /(?:^|[/\\])components(?:[/\\].+)?\.(?:uvue|nvue)$/;
|
|
14590
|
+
const PAGE_RE = /(?:^|[/\\])pages(?:[/\\].+)?\.(?:uvue|nvue)$/;
|
|
14590
14591
|
function createStableHash(input) {
|
|
14591
14592
|
let hash = 2166136261;
|
|
14592
14593
|
for (let i = 0; i < input.length; i++) {
|
|
@@ -14615,6 +14616,9 @@ function isRuntimeCandidate(candidate, runtimeSet) {
|
|
|
14615
14616
|
function shouldEnableComponentLocalStyle(id) {
|
|
14616
14617
|
return COMPONENT_RE.test(id);
|
|
14617
14618
|
}
|
|
14619
|
+
function shouldEnablePageLocalStyle(id) {
|
|
14620
|
+
return PAGE_RE.test(id);
|
|
14621
|
+
}
|
|
14618
14622
|
var UniAppXComponentLocalStyleCollector = class {
|
|
14619
14623
|
constructor(fileId, runtimeSet) {
|
|
14620
14624
|
this.fileId = fileId;
|
|
@@ -14769,6 +14773,11 @@ function updateDirectiveExpressionWithLocalStyle(ms, prop, offset, jsHandler, co
|
|
|
14769
14773
|
});
|
|
14770
14774
|
ms.update(start, end, collector.rewriteTransformedCode(generated, { wrapExpression: true }));
|
|
14771
14775
|
}
|
|
14776
|
+
function shouldEnableLocalStyle(id, options) {
|
|
14777
|
+
if (options.enableComponentLocalStyle && shouldEnableComponentLocalStyle(id)) return true;
|
|
14778
|
+
if (options.enablePageLocalStyle && shouldEnablePageLocalStyle(id)) return true;
|
|
14779
|
+
return false;
|
|
14780
|
+
}
|
|
14772
14781
|
function shouldHandleAttribute(tag, attrName, disabledDefaultTemplateHandler, matchCustomAttribute) {
|
|
14773
14782
|
const lowerName = attrName.toLowerCase();
|
|
14774
14783
|
const shouldHandleDefault = !disabledDefaultTemplateHandler && lowerName === "class";
|
|
@@ -14820,7 +14829,7 @@ function transformUVue(code, id, jsHandler, runtimeSet, options = {}) {
|
|
|
14820
14829
|
const matchCustomAttribute = createAttributeMatcher(customAttributesEntities);
|
|
14821
14830
|
const ms = new MagicString(code);
|
|
14822
14831
|
const descriptor = parseSfc(code);
|
|
14823
|
-
const localStyleCollector =
|
|
14832
|
+
const localStyleCollector = shouldEnableLocalStyle(id, options) ? new UniAppXComponentLocalStyleCollector(id, runtimeSet) : void 0;
|
|
14824
14833
|
if (descriptor.errors.length === 0) {
|
|
14825
14834
|
if (descriptor.template?.ast) {
|
|
14826
14835
|
const templateOffset = descriptor.template.start;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { SourceEntry } from '@tailwindcss/oxide';
|
|
2
1
|
import type { PackageResolvingOptions } from 'local-pkg';
|
|
3
2
|
import type { ILengthUnitsPatchOptions } from 'tailwindcss-patch';
|
|
4
|
-
import type {
|
|
3
|
+
import type { TailwindSourceEntry as SourceEntry } from '../tailwindcss/source-scan';
|
|
4
|
+
import type { TailwindV4SourceOptions } from '../tailwindcss/v4-engine';
|
|
5
|
+
type TailwindV4CssSource = NonNullable<TailwindV4SourceOptions['cssSources']>[number];
|
|
5
6
|
export type CacheStrategy = 'merge' | 'overwrite';
|
|
6
7
|
export type CacheDriver = 'file' | 'memory' | 'noop';
|
|
7
8
|
export interface CacheOptions {
|
|
@@ -65,3 +66,4 @@ export interface TailwindCssPatchOptions {
|
|
|
65
66
|
filter?: (className: string) => boolean;
|
|
66
67
|
cache?: boolean | CacheOptions;
|
|
67
68
|
}
|
|
69
|
+
export {};
|
|
@@ -4,6 +4,10 @@ import type { ILengthUnitsPatchOptions, TailwindCssPatchOptions } from 'tailwind
|
|
|
4
4
|
import type { ICreateCacheReturnType } from '../../cache';
|
|
5
5
|
import type { WeappTailwindcssGeneratorUserOptions } from '../../generator';
|
|
6
6
|
import type { AppType, IArbitraryValues, IUnocssCompatibilityOptions } from '../shared';
|
|
7
|
+
export interface CssSourceTraceOptions {
|
|
8
|
+
root?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export type CssSourceTraceUserOptions = boolean | CssSourceTraceOptions;
|
|
7
11
|
export interface UserDefinedOptionsGeneralPart {
|
|
8
12
|
supportCustomLengthUnitsPatch?: ILengthUnitsPatchOptions | boolean | undefined;
|
|
9
13
|
appType?: AppType | undefined;
|
|
@@ -13,6 +17,7 @@ export interface UserDefinedOptionsGeneralPart {
|
|
|
13
17
|
jsArbitraryValueFallback?: boolean | 'auto' | undefined;
|
|
14
18
|
replaceRuntimePackages?: boolean | Record<string, string> | undefined;
|
|
15
19
|
generator?: WeappTailwindcssGeneratorUserOptions | undefined;
|
|
20
|
+
cssSourceTrace?: CssSourceTraceUserOptions | undefined;
|
|
16
21
|
disabledDefaultTemplateHandler?: boolean | undefined;
|
|
17
22
|
runtimeLoaderPath?: string | undefined;
|
|
18
23
|
tailwindcssBasedir?: string | undefined;
|
|
@@ -2,6 +2,7 @@ interface RewriteCodeOptions {
|
|
|
2
2
|
wrapExpression?: boolean;
|
|
3
3
|
}
|
|
4
4
|
export declare function shouldEnableComponentLocalStyle(id: string): boolean;
|
|
5
|
+
export declare function shouldEnablePageLocalStyle(id: string): boolean;
|
|
5
6
|
export declare class UniAppXComponentLocalStyleCollector {
|
|
6
7
|
private readonly fileId;
|
|
7
8
|
private readonly runtimeSet?;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isUniAppXHarmonyOutDir(outDir: string | undefined): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { OutputChunk } from 'rollup';
|
|
2
|
+
type StyleDeclarations = Record<string, string | number>;
|
|
3
|
+
export type StyleValue = Record<string, Record<string, StyleDeclarations>>;
|
|
4
|
+
export declare function parseStyleExport(source: string): StyleValue | undefined;
|
|
5
|
+
export declare function parseStyleObject(source: string): StyleValue | undefined;
|
|
6
|
+
export declare function parseSourceMapSourcesContent(source: string): string[];
|
|
7
|
+
export declare function collectChunkMapSourcesContent(chunk: OutputChunk): string[];
|
|
8
|
+
export declare function styleExportToUtsMap(styleExport: StyleValue): string;
|
|
9
|
+
export declare function createUtsStyleArrayFromAppStyles(code: string, appSource?: string): string | undefined;
|
|
10
|
+
export declare function cssSourceToStyleValue(source: string): StyleValue | undefined;
|
|
11
|
+
export declare function mergeStyleValues(...items: Array<StyleValue | undefined>): StyleValue | undefined;
|
|
12
|
+
export declare function createStyleValueFromApplySources(sources: string[], utilityStyles: StyleValue | undefined): StyleValue | undefined;
|
|
13
|
+
export declare function collectUniAppXHarmonyApplyStyleSourcesFromSource(source: string): string[];
|
|
14
|
+
export declare function collectUniAppXHarmonyApplyUtilitiesFromSources(sources: Iterable<string>): Set<string>;
|
|
15
|
+
export declare function createMergedStyleValue(code: string, localStyle: StyleValue | undefined, appStyle: StyleValue): StyleValue | undefined;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { OutputAsset, OutputChunk } from 'rollup';
|
|
2
|
+
import { collectUniAppXHarmonyApplyStyleSourcesFromSource, collectUniAppXHarmonyApplyUtilitiesFromSources } from './style-asset/style-value';
|
|
3
|
+
export declare const UNI_APP_X_STYLE_PLACEHOLDER_VERSION = "uni-app-x-style-placeholder-v2";
|
|
4
|
+
type BundleItem = {
|
|
5
|
+
type: string;
|
|
6
|
+
} | OutputAsset | OutputChunk;
|
|
7
|
+
interface HarmonyStyleInjectOptions {
|
|
8
|
+
cssSources?: Iterable<string | undefined> | undefined;
|
|
9
|
+
excludeComponents?: boolean | undefined;
|
|
10
|
+
mapSources?: Iterable<string | undefined> | undefined;
|
|
11
|
+
}
|
|
12
|
+
export { collectUniAppXHarmonyApplyStyleSourcesFromSource, collectUniAppXHarmonyApplyUtilitiesFromSources, };
|
|
13
|
+
export declare function createUniAppXHarmonyApplyGeneratorSource(applyStyleSources: string[], _applyUtilities: Iterable<string>): string;
|
|
14
|
+
export declare function collectUniAppXHarmonyApplyUtilities(bundle: Record<string, BundleItem>): Set<string>;
|
|
15
|
+
export declare function collectUniAppXHarmonyApplyStyleSources(bundle: Record<string, BundleItem>): string[];
|
|
16
|
+
export declare function injectUniAppXStylePlaceholder(file: string, code: string, getAssetSource?: (file: string) => string | undefined): string;
|
|
17
|
+
export declare function injectUniAppXHarmonyGlobalStyles(file: string, code: string, getBundleSource?: (file: string) => string | undefined, options?: HarmonyStyleInjectOptions): string;
|
|
18
|
+
export declare function injectUniAppXHarmonyBundleStyles(bundle: Record<string, BundleItem>, options?: HarmonyStyleInjectOptions): boolean;
|
|
19
|
+
export declare function isUniAppXHarmonyBundle(bundle: Record<string, BundleItem>): boolean;
|
|
20
|
+
export declare function createUniAppXBundleAssetSourceGetter(bundle: Record<string, BundleItem>): (file: string) => string | undefined;
|
|
@@ -4,6 +4,7 @@ interface TransformUVueOptions {
|
|
|
4
4
|
customAttributesEntities?: ICustomAttributesEntities;
|
|
5
5
|
disabledDefaultTemplateHandler?: boolean;
|
|
6
6
|
enableComponentLocalStyle?: boolean;
|
|
7
|
+
enablePageLocalStyle?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare function transformUVue(code: string, id: string, jsHandler: JsHandler, runtimeSet?: Set<string>, options?: TransformUVueOptions): undefined | TransformResult;
|
|
9
10
|
export {};
|
package/dist/uni-app-x/vite.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ interface CreateUniAppXAssetTaskOptions {
|
|
|
34
34
|
runtimeSet: Set<string>;
|
|
35
35
|
applyLinkedResults: ApplyLinkedResults;
|
|
36
36
|
uniAppX?: InternalUserDefinedOptions['uniAppX'];
|
|
37
|
+
getAssetSource?: (file: string) => string | undefined;
|
|
37
38
|
}
|
|
38
39
|
export declare function createUniAppXAssetTask(file: string, originalSource: OutputAsset, outDir: string, options: CreateUniAppXAssetTaskOptions): () => Promise<void>;
|
|
39
40
|
export {};
|