weapp-tailwindcss 5.0.13 → 5.1.1
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/README.en.md +1 -1
- package/README.md +1 -1
- package/dist/auto-Ba6hDrse.mjs +13 -0
- package/dist/auto-DtU6f3X6.js +18 -0
- package/dist/bundlers/shared/css-cleanup.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/class-selectors.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/directives.d.ts +2 -1
- package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +10 -6
- package/dist/bundlers/shared/generator-css/local-imports.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +0 -1
- package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +3 -3
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +2 -2
- package/dist/bundlers/shared/generator-css/types.d.ts +13 -1
- package/dist/bundlers/shared/generator-css/user-css.d.ts +5 -1
- package/dist/bundlers/shared/generator-css/validate.d.ts +1 -0
- package/dist/bundlers/shared/run-tasks.d.ts +1 -0
- package/dist/bundlers/shared/v4-generation-core.d.ts +11 -0
- package/dist/bundlers/vite/css-finalizer.d.ts +1 -1
- package/dist/bundlers/vite/css-memory.d.ts +16 -0
- package/dist/bundlers/vite/generate-bundle/candidates.d.ts +0 -1
- package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-assets.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-output-helpers.d.ts +39 -0
- package/dist/bundlers/vite/generate-bundle/css-output.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/env-flags.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/final-css-assets.d.ts +13 -0
- package/dist/bundlers/vite/generate-bundle/finalize.d.ts +7 -0
- package/dist/bundlers/vite/generate-bundle/html-processing.d.ts +26 -0
- package/dist/bundlers/vite/generate-bundle/js-processing.d.ts +4 -0
- package/dist/bundlers/vite/generate-bundle/memory-debug.d.ts +21 -18
- package/dist/bundlers/vite/generate-bundle/remembered-css-replay.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/remembered-css.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/root-style-output.d.ts +6 -0
- package/dist/bundlers/vite/generate-bundle/runtime-linked-source-memory.d.ts +25 -0
- package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +3 -1
- package/dist/bundlers/vite/generate-bundle/source-candidate-scope.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/source-candidate-source.d.ts +9 -0
- package/dist/bundlers/vite/generate-bundle/tailwind-v4-css-source.d.ts +9 -0
- package/dist/bundlers/vite/generate-bundle/transform-filter.d.ts +15 -0
- package/dist/bundlers/vite/generate-bundle/types.d.ts +2 -1
- package/dist/bundlers/vite/generate-bundle/vite-css-cache.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle.d.ts +2 -1
- package/dist/bundlers/vite/incremental-runtime-class-set/escaped-candidates.d.ts +1 -0
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +3 -3
- package/dist/bundlers/vite/plugin-cache.d.ts +15 -0
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +1 -0
- package/dist/bundlers/vite/runtime-class-set.d.ts +5 -4
- package/dist/bundlers/vite/source-candidates/script.d.ts +1 -7
- package/dist/bundlers/vite/source-candidates.d.ts +9 -2
- package/dist/bundlers/vite/source-scan/css-entries.d.ts +2 -6
- package/dist/bundlers/vite/source-scan.d.ts +2 -2
- package/dist/bundlers/vite/uni-app-x-css-options.d.ts +1 -1
- package/dist/bundlers/vite/utils.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +26 -2
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/css-source-resolvers.d.ts +34 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.d.ts +48 -11
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/js-module-graph.d.ts +37 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/pipeline-helpers.d.ts +199 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +28 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-refresh.d.ts +11 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +4 -2
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +10 -1
- package/dist/bundlers/webpack/shared/css-loader-runtime.d.ts +1 -0
- package/dist/cache/index.d.ts +1 -0
- package/dist/cli/mount-options.d.ts +2 -2
- package/dist/cli.js +138 -444
- package/dist/cli.mjs +134 -440
- package/dist/context/index.d.ts +3 -3
- package/dist/context/style-options.d.ts +5 -1
- package/dist/context/tailwindcss.d.ts +1 -1
- package/dist/{precheck-B0Z8yW7E.js → context-B6hVF7dr.js} +405 -156
- package/dist/{precheck-CRI90iL1.mjs → context-DlpKD7aN.mjs} +377 -141
- package/dist/core.js +15 -12
- package/dist/core.mjs +10 -7
- package/dist/css-macro/index.d.ts +3 -7
- package/dist/css-macro.js +1 -1
- package/dist/css-macro.mjs +1 -1
- package/dist/{defaults-Bqx18S1f.mjs → defaults-BhE26nSw.mjs} +12 -13
- package/dist/{defaults-C_J_kBpw.js → defaults-CmFBmxsr.js} +11 -18
- package/dist/defaults.d.ts +2 -8
- package/dist/defaults.js +1 -2
- package/dist/defaults.mjs +2 -2
- package/dist/generator/index.d.ts +6 -7
- package/dist/generator/options.d.ts +3 -3
- package/dist/generator/types.d.ts +9 -10
- package/dist/generator-6oMJtTDO.js +170 -0
- package/dist/generator-CjzBK7h-.mjs +123 -0
- package/dist/generator.js +10 -16
- package/dist/generator.mjs +3 -3
- package/dist/{gulp-XT8Jc7lH.js → gulp-BtGq6LP9.js} +49 -87
- package/dist/{gulp-DfOQERcV.mjs → gulp-DNU10Vtc.mjs} +42 -80
- package/dist/gulp.js +1 -1
- package/dist/gulp.mjs +1 -1
- package/dist/{hmr-timing-DQIP_8qP.mjs → hmr-timing-B0KuWDjV.mjs} +1197 -858
- package/dist/{hmr-timing-BMftW7Us.js → hmr-timing-CegXR9O4.js} +1356 -927
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/js/fast-path/oxc.d.ts +4 -0
- package/dist/js/precheck.d.ts +1 -0
- package/dist/postcss.js +3 -4
- package/dist/postcss.mjs +2 -3
- package/dist/presets.js +9 -19
- package/dist/presets.mjs +8 -18
- package/dist/runtime-branch/create-branch.d.ts +2 -0
- package/dist/runtime-branch/generator-target-env.d.ts +4 -0
- package/dist/runtime-branch/index.d.ts +6 -0
- package/dist/runtime-branch/mini-program.d.ts +2 -0
- package/dist/runtime-branch/native-app.d.ts +2 -0
- package/dist/runtime-branch/platform.d.ts +6 -0
- package/dist/runtime-branch/tailwind-version.d.ts +2 -0
- package/dist/runtime-branch/types.d.ts +37 -0
- package/dist/runtime-branch/web.d.ts +2 -0
- package/dist/runtime-branch.d.ts +1 -0
- package/dist/{bundle-state-zQ2MrDdi.mjs → source-candidate-scan-signature-B5af2Ahe.mjs} +187 -17
- package/dist/{bundle-state-CKWeTEhv.js → source-candidate-scan-signature-BKYb9jxa.js} +261 -19
- package/dist/tailwindcss/candidates.d.ts +7 -0
- package/dist/tailwindcss/index.d.ts +2 -2
- package/dist/tailwindcss/runtime/cache.d.ts +6 -6
- package/dist/tailwindcss/runtime-factory.d.ts +12 -0
- package/dist/tailwindcss/runtime-options.d.ts +8 -0
- package/dist/tailwindcss/runtime-types.d.ts +87 -0
- package/dist/tailwindcss/runtime.d.ts +6 -6
- package/dist/tailwindcss/source-scan.d.ts +1 -1
- package/dist/tailwindcss/targets.d.ts +2 -2
- package/dist/tailwindcss/v4/config.d.ts +3 -3
- package/dist/tailwindcss/v4/css-entries.d.ts +1 -0
- package/dist/tailwindcss/v4/css-sources.d.ts +4 -2
- package/dist/tailwindcss/v4/index.d.ts +1 -1
- package/dist/tailwindcss/v4/multi-runtime.d.ts +2 -0
- package/dist/tailwindcss/v4/runtime-factory.d.ts +15 -0
- package/dist/tailwindcss/v4/runtime-options.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/design-system.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/css-compat.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/rpx-candidates.d.ts +3 -3
- package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator.d.ts +10 -3
- package/dist/tailwindcss/v4-engine/index.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/miniprogram.d.ts +7 -1
- package/dist/tailwindcss/v4-engine/source.d.ts +15 -7
- package/dist/tailwindcss/v4-engine/types.d.ts +17 -10
- package/dist/tailwindcss/version.d.ts +1 -1
- package/dist/tailwindcss-B5mRo0-M.mjs +1423 -0
- package/dist/tailwindcss-dbrbY4cd.js +1528 -0
- package/dist/{transform-DfcEjsZF.mjs → transform-fRBeuuK-.mjs} +2 -2
- package/dist/{transform-YmrmxuF3.js → transform-vLwZpiTE.js} +17 -17
- package/dist/typedoc.export.d.ts +1 -1
- package/dist/types/index.d.ts +16 -17
- package/dist/types/shared.d.ts +1 -1
- package/dist/types/{typedoc-tailwindcss-patch.d.ts → typedoc-tailwindcss-runtime.d.ts} +4 -10
- package/dist/types/user-defined-options/general.d.ts +5 -3
- package/dist/types/user-defined-options/important.d.ts +2 -2
- package/dist/types/user-defined-options/matcher.d.ts +7 -0
- package/dist/uni-app-x/style-asset.d.ts +1 -0
- package/dist/v4-engine-C3qSwQ-e.mjs +2376 -0
- package/dist/v4-engine-ON_oSLfO.js +2752 -0
- package/dist/{vite-DjI09vVN.mjs → vite-CWRooooa.mjs} +1417 -540
- package/dist/{vite-CXHVsHmX.js → vite-w-RkgaTY.js} +1575 -698
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +5665 -4443
- package/dist/weapp-tw-runtime-classset-loader.js +15 -4
- package/dist/webpack-8PaV1gG3.mjs +2334 -0
- package/dist/webpack-CGgBOx9l.js +2346 -0
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +6 -7
- package/dist/auto-CTp6wE5a.js +0 -33
- package/dist/auto-Cl8_hsG6.mjs +0 -22
- package/dist/bundlers/vite/incremental-runtime-class-set/v3-candidates.d.ts +0 -13
- package/dist/bundlers/vite/source-candidates/tailwind-v3-default-extractor.d.ts +0 -1
- package/dist/context/tailwindcss/rax.d.ts +0 -2
- package/dist/generator-CzpArpCL.js +0 -92
- package/dist/generator-ITLd7PTl.mjs +0 -67
- package/dist/tailwindcss/patcher-options.d.ts +0 -8
- package/dist/tailwindcss/patcher.d.ts +0 -12
- package/dist/tailwindcss/runtime-patch.d.ts +0 -5
- package/dist/tailwindcss/v3-engine/generator/cache-key.d.ts +0 -3
- package/dist/tailwindcss/v3-engine/generator/content.d.ts +0 -10
- package/dist/tailwindcss/v3-engine/generator/runtime-ready.d.ts +0 -2
- package/dist/tailwindcss/v3-engine/generator.d.ts +0 -19
- package/dist/tailwindcss/v3-engine/index.d.ts +0 -4
- package/dist/tailwindcss/v3-engine/miniprogram.d.ts +0 -4
- package/dist/tailwindcss/v3-engine/source.d.ts +0 -5
- package/dist/tailwindcss/v3-engine/types.d.ts +0 -61
- package/dist/tailwindcss/v4/multi-patcher.d.ts +0 -2
- package/dist/tailwindcss/v4/patcher-options.d.ts +0 -2
- package/dist/tailwindcss/v4/patcher.d.ts +0 -15
- package/dist/tailwindcss/v4-engine/tailwind-v3-compatibility.d.ts +0 -1
- package/dist/tailwindcss/v4-engine/tailwind-v3-default-colors.d.ts +0 -1
- package/dist/tailwindcss-DTq3uYBK.mjs +0 -556
- package/dist/tailwindcss-DZEwT3C_.js +0 -613
- package/dist/v3-engine-2rrgylhn.js +0 -4686
- package/dist/v3-engine-C6eJ0YzK.mjs +0 -4272
- package/dist/webpack-BcPpnT90.mjs +0 -1184
- package/dist/webpack-CfkUkMXG.js +0 -1196
- /package/dist/tailwindcss/{patcher-resolve.d.ts → runtime-resolve.d.ts} +0 -0
package/README.en.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> English | [简体中文](./README.md)
|
|
4
4
|
|
|
5
|
-
This is the core package that brings Tailwind CSS to mini program ecosystems, handling class transformation, CSS compatibility, framework build adapters, and Tailwind
|
|
5
|
+
This is the core package that brings Tailwind CSS to mini program ecosystems, handling class transformation, CSS compatibility, framework build adapters, and Tailwind v4 support.
|
|
6
6
|
|
|
7
7
|
## Website
|
|
8
8
|
|
package/README.md
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { hasCssMacroStyleOptions, hasCssMacroTailwindV4Directive, transformCssMacroCss, withCssMacroStyleOptions } from "@weapp-tailwindcss/postcss";
|
|
2
|
+
//#region src/css-macro/auto.ts
|
|
3
|
+
const CSS_MACRO_PLUGIN_MARKER = "__weappTailwindcssCssMacro";
|
|
4
|
+
function markCssMacroPlugin(value) {
|
|
5
|
+
Object.defineProperty(value, CSS_MACRO_PLUGIN_MARKER, {
|
|
6
|
+
configurable: false,
|
|
7
|
+
enumerable: false,
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { withCssMacroStyleOptions as a, transformCssMacroCss as i, hasCssMacroTailwindV4Directive as n, markCssMacroPlugin as r, hasCssMacroStyleOptions as t };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
require("@weapp-tailwindcss/postcss");
|
|
2
|
+
//#region src/css-macro/auto.ts
|
|
3
|
+
const CSS_MACRO_PLUGIN_MARKER = "__weappTailwindcssCssMacro";
|
|
4
|
+
function markCssMacroPlugin(value) {
|
|
5
|
+
Object.defineProperty(value, CSS_MACRO_PLUGIN_MARKER, {
|
|
6
|
+
configurable: false,
|
|
7
|
+
enumerable: false,
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
Object.defineProperty(exports, "markCssMacroPlugin", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function() {
|
|
16
|
+
return markCssMacroPlugin;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { finalizeMiniProgramCss, hoistTailwindPreflightBase, pruneMiniProgramGeneratedCss, removeUnsupportedAtSupports, removeUnsupportedMiniProgramAtRules, } from '@weapp-tailwindcss/postcss';
|
|
1
|
+
export { finalizeMiniProgramCss, hasMiniProgramCssSpecificityPlaceholders, hoistTailwindPreflightBase, pruneMiniProgramGeneratedCss, removeUnsupportedAtSupports, removeUnsupportedMiniProgramAtRules, stripMiniProgramCssSpecificityPlaceholders, } from '@weapp-tailwindcss/postcss';
|
|
@@ -5,10 +5,11 @@ export declare function parseImportRequest(params: string): string | undefined;
|
|
|
5
5
|
export declare function hasLocalCssImport(rawSource: string): boolean;
|
|
6
6
|
export declare function normalizeTailwindConfigDirectives(rawSource: string, base: string): string;
|
|
7
7
|
export declare function normalizeTailwindSourceForGenerator(rawSource: string, options?: TailwindDirectiveOptions): string;
|
|
8
|
-
export declare function normalizeTailwindV3CssEntrySource(rawSource: string): string;
|
|
9
8
|
export declare function normalizeTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): string;
|
|
10
9
|
export declare function removeTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): string;
|
|
11
10
|
export declare function hasTailwindSourceDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
|
|
11
|
+
export declare function hasTailwindNonRootGenerationDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
|
|
12
|
+
export declare function hasTailwindRootImportDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
|
|
12
13
|
export declare function hasTailwindRootDirectives(rawSource: string, options?: TailwindDirectiveOptions): boolean;
|
|
13
14
|
export declare function hasTailwindApplyDirective(rawSource: string): boolean;
|
|
14
15
|
export declare function resolveCssEntrySource(rawSource: string, base: string, options?: {
|
|
@@ -3,7 +3,8 @@ import type { GeneratorResolvedSource } from './source-resolver';
|
|
|
3
3
|
import type { createWeappTailwindcssGenerator } from '../../../generator';
|
|
4
4
|
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
|
|
5
5
|
import type { InternalUserDefinedOptions } from '../../../types';
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function hasMiniProgramTailwindV4PreflightReset(css: string): boolean;
|
|
7
|
+
export declare function finalizeMiniProgramGeneratorCss(css: string, target: string, _majorVersion: number | undefined, cssPreflight: InternalUserDefinedOptions['cssPreflight'], options?: {
|
|
7
8
|
injectPreflight?: boolean;
|
|
8
9
|
styleOptions?: Partial<IStyleHandlerOptions> | undefined;
|
|
9
10
|
}): string;
|
|
@@ -19,20 +20,20 @@ export declare function mergeScopedRuntimeWithCurrentRuntime(scopedRuntime: Set<
|
|
|
19
20
|
majorVersion?: number | undefined;
|
|
20
21
|
matchedCssSourceFile: boolean;
|
|
21
22
|
}): Set<string>;
|
|
22
|
-
export declare function shouldIsolateScopedCssSource(
|
|
23
|
+
export declare function shouldIsolateScopedCssSource(_majorVersion: number | undefined, source: GeneratorResolvedSource, sourceEntries: TailwindSourceEntry[] | undefined, options: {
|
|
23
24
|
cssHandlerOptions?: IStyleHandlerOptions | undefined;
|
|
24
25
|
target: string;
|
|
25
26
|
}): boolean;
|
|
26
|
-
export declare function shouldIsolateCurrentTailwindV4CssCandidates(
|
|
27
|
+
export declare function shouldIsolateCurrentTailwindV4CssCandidates(_majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
|
|
27
28
|
hasGeneratedCss: boolean;
|
|
28
29
|
hasGeneratedMarkers: boolean;
|
|
29
30
|
rawSource: string;
|
|
30
31
|
}): boolean;
|
|
31
32
|
export declare function shouldScanTailwindV4Sources(majorVersion: number | undefined, target: string, generatorRuntime: Set<string>, isolateCssSource: boolean): boolean;
|
|
32
|
-
export declare function shouldAppendWebBundleCssFallback(target: string,
|
|
33
|
+
export declare function shouldAppendWebBundleCssFallback(target: string, _options: {
|
|
33
34
|
hasSourceDirectives: boolean;
|
|
34
35
|
hasMatchedCssSourceFile: boolean;
|
|
35
|
-
}):
|
|
36
|
+
}): target is "web";
|
|
36
37
|
export declare function isEmptyCssSourceOrderParts(parts: {
|
|
37
38
|
before: string;
|
|
38
39
|
after: string;
|
|
@@ -45,10 +46,14 @@ export declare function splitRawSourceByGeneratedCssOrder(rawSource: string, raw
|
|
|
45
46
|
after: string;
|
|
46
47
|
} | undefined;
|
|
47
48
|
export declare function shouldUseGeneratorForCurrentCss(_majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
|
|
49
|
+
forceGenerator?: boolean | undefined;
|
|
48
50
|
hasGeneratedCss: boolean;
|
|
49
51
|
hasGeneratedMarkers: boolean;
|
|
50
52
|
hasSourceDirectives: boolean;
|
|
51
53
|
rawSource: string;
|
|
54
|
+
runtimeCandidateCount?: number | undefined;
|
|
55
|
+
target?: string | undefined;
|
|
56
|
+
configuredCssSourceCount?: number | undefined;
|
|
52
57
|
}): boolean | undefined;
|
|
53
58
|
export declare function hasGeneratorSourceDirectives(source: string, importFallback: boolean): boolean;
|
|
54
59
|
export declare function createRuntimeWithCurrentCssCandidates(runtime: Set<string>, currentCssCandidates: string[], isolateCurrentCssCandidates: boolean): Set<string>;
|
|
@@ -57,5 +62,4 @@ export declare function mergeGeneratorResults(generatedResults: GeneratorResult[
|
|
|
57
62
|
rawCss: string;
|
|
58
63
|
}) | undefined;
|
|
59
64
|
type GeneratorResult = Awaited<ReturnType<ReturnType<typeof createWeappTailwindcssGenerator>['generate']>>;
|
|
60
|
-
export declare function isSupportedGeneratorMajorVersion(majorVersion: number | undefined): boolean;
|
|
61
65
|
export {};
|
|
@@ -5,3 +5,6 @@ export declare function splitLocalCssImports(source: string): {
|
|
|
5
5
|
source: string;
|
|
6
6
|
} | undefined;
|
|
7
7
|
export declare function restoreLocalCssImports(css: string, imports: string | undefined): string;
|
|
8
|
+
export declare function rewriteLocalCssImportRequestsForOutput(css: string, options?: {
|
|
9
|
+
styleOutputExtension?: string | undefined;
|
|
10
|
+
}): string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { SourceStyleMatchOptions } from './types';
|
|
2
2
|
export declare function normalizeCssSourceForCompare(css: string): string;
|
|
3
|
-
export declare function getOutputFileStem(file: string): string;
|
|
4
3
|
export declare function scoreTailwindV4CssSourceFileMatch(file: string, cssSourceFile: string, sourceOptions: SourceStyleMatchOptions): number;
|
|
@@ -12,4 +12,4 @@ export type GeneratorResolvedSource = TailwindResolvedSource & {
|
|
|
12
12
|
__weappTailwindcssMeta?: GeneratorSourceMetadata | undefined;
|
|
13
13
|
};
|
|
14
14
|
export declare function withGeneratorSourceMetadata(source: TailwindResolvedSource, metadata: GeneratorSourceMetadata): GeneratorResolvedSource;
|
|
15
|
-
export declare function withMatchedSourceSideMetadata(source: TailwindResolvedSource, resolvedEntrySource: SourceSideCssEntrySource): import("@/generator").
|
|
15
|
+
export declare function withMatchedSourceSideMetadata(source: TailwindResolvedSource, resolvedEntrySource: SourceSideCssEntrySource): import("@/generator").TailwindV4ResolvedSource;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { SourceSideCssEntryOptions } from '../source-files';
|
|
2
|
-
import type {
|
|
2
|
+
import type { resolveTailwindV4SourceOptionsFromRuntime } from '../../../../generator';
|
|
3
3
|
import type { TailwindSourceEntry } from '../../../../tailwindcss/source-scan';
|
|
4
4
|
import type { InternalUserDefinedOptions } from '../../../../types';
|
|
5
5
|
export interface GeneratorSourceRuntimeState {
|
|
6
|
-
|
|
6
|
+
tailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
|
|
7
7
|
}
|
|
8
8
|
export interface GeneratorSourceSelectionOptions {
|
|
9
9
|
runtime?: Set<string> | undefined;
|
|
@@ -11,7 +11,7 @@ export interface GeneratorSourceSelectionOptions {
|
|
|
11
11
|
cssEntries?: string[] | undefined;
|
|
12
12
|
cssSources?: TailwindV4CssSource[] | undefined;
|
|
13
13
|
}
|
|
14
|
-
export type TailwindV4SourceOptions = ReturnType<typeof
|
|
14
|
+
export type TailwindV4SourceOptions = ReturnType<typeof resolveTailwindV4SourceOptionsFromRuntime> & {
|
|
15
15
|
config?: string | undefined;
|
|
16
16
|
outputRoot?: string | undefined;
|
|
17
17
|
sourceFile?: string | undefined;
|
|
@@ -4,6 +4,6 @@ import type { NormalizedWeappTailwindcssGeneratorOptions, TailwindResolvedSource
|
|
|
4
4
|
export type { GeneratorResolvedSource, GeneratorSourceMetadata } from './source-resolver/metadata';
|
|
5
5
|
export { resolveCssSourceBase } from './source-resolver/postcss-source';
|
|
6
6
|
export type { GeneratorSourceRuntimeState, GeneratorSourceSelectionOptions } from './source-resolver/types';
|
|
7
|
-
export declare function resolveGeneratorSource(
|
|
7
|
+
export declare function resolveGeneratorSource(_majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<import("@/generator").TailwindV4ResolvedSource | undefined>;
|
|
8
8
|
export declare function resolveGeneratorSources(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<TailwindResolvedSource[]>;
|
|
9
|
-
export declare function resolveGeneratorSourceEntries(source: TailwindResolvedSource, runtimeState?: GeneratorSourceRuntimeState): Promise<
|
|
9
|
+
export declare function resolveGeneratorSourceEntries(source: TailwindResolvedSource, runtimeState?: GeneratorSourceRuntimeState): Promise<import("@/tailwindcss/source-scan").TailwindSourceEntry[] | undefined>;
|
|
@@ -5,7 +5,7 @@ import type { InternalUserDefinedOptions } from '../../../types';
|
|
|
5
5
|
export interface GenerateCssByGeneratorOptions {
|
|
6
6
|
opts: InternalUserDefinedOptions;
|
|
7
7
|
runtimeState: {
|
|
8
|
-
|
|
8
|
+
tailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
|
|
9
9
|
readyPromise: Promise<void>;
|
|
10
10
|
};
|
|
11
11
|
runtime: Set<string>;
|
|
@@ -15,15 +15,27 @@ export interface GenerateCssByGeneratorOptions {
|
|
|
15
15
|
cssUserHandlerOptions: IStyleHandlerOptions;
|
|
16
16
|
cssSources?: TailwindV4CssSource[] | undefined;
|
|
17
17
|
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
18
|
+
sourceCandidates?: Set<string> | undefined;
|
|
18
19
|
styleHandler: InternalUserDefinedOptions['styleHandler'];
|
|
19
20
|
debug: (format: string, ...args: unknown[]) => void;
|
|
21
|
+
userRawSource?: string | undefined;
|
|
22
|
+
userRawSourceProcessed?: boolean | undefined;
|
|
23
|
+
forceGenerator?: boolean | undefined;
|
|
20
24
|
previousCss?: string | undefined;
|
|
21
25
|
deferEmptyScopedCssSource?: boolean | undefined;
|
|
26
|
+
restoreLocalCssImports?: boolean | undefined;
|
|
22
27
|
}
|
|
23
28
|
export interface GenerateCssByGeneratorResult {
|
|
24
29
|
css: string;
|
|
30
|
+
classSet: Set<string>;
|
|
25
31
|
target: string;
|
|
26
32
|
source: 'generator';
|
|
27
33
|
dependencies: string[];
|
|
28
34
|
incremental?: boolean | undefined;
|
|
35
|
+
metadata?: {
|
|
36
|
+
file: string;
|
|
37
|
+
majorVersion?: number | undefined;
|
|
38
|
+
outputFile?: string | undefined;
|
|
39
|
+
rawCss?: string | undefined;
|
|
40
|
+
} | undefined;
|
|
29
41
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
2
|
import type { InternalUserDefinedOptions } from '../../../types';
|
|
3
|
+
export declare function removeTailwindV4GeneratedUserCssArtifacts(source: string): string;
|
|
3
4
|
export declare function removeTailwindV4GeneratorAtRules(source: string): string;
|
|
5
|
+
export declare function isCommentOnlyCss(source: string): boolean;
|
|
6
|
+
export declare function removeMiniProgramHoverSelectors(source: string, enabled?: boolean | undefined): string;
|
|
4
7
|
export declare function stripTailwindSourceMediaFragments(source: string): string;
|
|
5
8
|
export declare function stripUnmatchedTailwindSourceMediaCloseFragments(source: string): string;
|
|
6
9
|
export declare function splitUserCssLayerBlocks(source: string): {
|
|
@@ -13,7 +16,7 @@ export declare function extractGeneratedCssForUserLayerSelectors(css: string, us
|
|
|
13
16
|
rest: string;
|
|
14
17
|
};
|
|
15
18
|
export declare function filterApplyOnlyGeneratedCss(css: string, source: string): string;
|
|
16
|
-
export declare function shouldFilterApplyOnlyGeneratedCss(
|
|
19
|
+
export declare function shouldFilterApplyOnlyGeneratedCss(_majorVersion: number | undefined, target: string, source: string, options: {
|
|
17
20
|
hasGeneratedCss: boolean;
|
|
18
21
|
hasGeneratedMarkers: boolean;
|
|
19
22
|
}): boolean;
|
|
@@ -23,4 +26,5 @@ export declare function transformGeneratorUserCss(source: string, options: {
|
|
|
23
26
|
cssUserHandlerOptions: IStyleHandlerOptions;
|
|
24
27
|
styleHandler: InternalUserDefinedOptions['styleHandler'];
|
|
25
28
|
importFallback: boolean;
|
|
29
|
+
processed?: boolean | undefined;
|
|
26
30
|
}): Promise<string>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { GenerateCssByGeneratorOptions } from './types';
|
|
2
2
|
export interface ValidateCandidatesByGeneratorOptions extends Omit<GenerateCssByGeneratorOptions, 'runtime'> {
|
|
3
3
|
candidates: Set<string>;
|
|
4
|
+
generatedCssSources?: Iterable<string> | undefined;
|
|
4
5
|
skipGenerateFallback?: boolean | undefined;
|
|
5
6
|
}
|
|
6
7
|
export declare function validateCandidatesByGenerator(options: ValidateCandidatesByGeneratorOptions): Promise<Set<string>>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare function runWithConcurrency<T>(factories: Array<() => Promise<T>>, limit?: number): Promise<T[]>;
|
|
2
|
+
export declare function resolveTaskConcurrency(defaultLimit?: number): number;
|
|
2
3
|
export declare function pushConcurrentTaskFactories(queue: Array<Promise<void>>, factories: Array<() => Promise<unknown>>, limit?: number): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { GenerateCssByGeneratorOptions, GenerateCssByGeneratorResult } from './generator-css';
|
|
2
|
+
export interface TailwindV4GenerationCoreInput extends GenerateCssByGeneratorOptions {
|
|
3
|
+
outputFile?: string | undefined;
|
|
4
|
+
sourceCandidates?: Set<string> | undefined;
|
|
5
|
+
}
|
|
6
|
+
export interface TailwindV4GenerationCoreResult extends GenerateCssByGeneratorResult {
|
|
7
|
+
classSet: Set<string>;
|
|
8
|
+
dependencies: string[];
|
|
9
|
+
metadata: NonNullable<GenerateCssByGeneratorResult['metadata']>;
|
|
10
|
+
}
|
|
11
|
+
export declare function generateTailwindV4Css(options: TailwindV4GenerationCoreInput): Promise<TailwindV4GenerationCoreResult | undefined>;
|
|
@@ -9,7 +9,7 @@ interface RememberedMainCssSource {
|
|
|
9
9
|
interface CssFinalizerContext {
|
|
10
10
|
opts: InternalUserDefinedOptions;
|
|
11
11
|
runtimeState: {
|
|
12
|
-
|
|
12
|
+
tailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
|
|
13
13
|
readyPromise: Promise<void>;
|
|
14
14
|
};
|
|
15
15
|
ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
|
|
@@ -11,8 +11,24 @@ export declare function createViteCssMemory(options: {
|
|
|
11
11
|
getRememberedCssSources: () => Map<string, RememberedCssSource>;
|
|
12
12
|
getStats: () => {
|
|
13
13
|
rememberedCssSources: number;
|
|
14
|
+
rememberedCssSourcesRaw: {
|
|
15
|
+
bytes: number;
|
|
16
|
+
mb: number;
|
|
17
|
+
size: number;
|
|
18
|
+
};
|
|
14
19
|
rememberedCssSignatureByFile: number;
|
|
20
|
+
knownCssSources: number;
|
|
21
|
+
knownCssSourcesRaw: {
|
|
22
|
+
bytes: number;
|
|
23
|
+
mb: number;
|
|
24
|
+
size: number;
|
|
25
|
+
};
|
|
15
26
|
knownSfcSources: number;
|
|
27
|
+
knownSfcSourcesRaw: {
|
|
28
|
+
bytes: number;
|
|
29
|
+
mb: number;
|
|
30
|
+
size: number;
|
|
31
|
+
};
|
|
16
32
|
};
|
|
17
33
|
rememberCssSource: (entry: RememberedCssSource, cssRuntimeSignature?: string) => void;
|
|
18
34
|
rememberKnownSfcSource: (id: string, code: string) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { OutputAsset } from 'rollup';
|
|
2
2
|
import type { GenerateBundleThis } from './types';
|
|
3
|
-
export declare function createCssAssetEmitter(context: Pick<GenerateBundleThis, 'emitFile'>): (fileName: string, source: string) => OutputAsset;
|
|
3
|
+
export declare function createCssAssetEmitter(context: Pick<GenerateBundleThis, 'emitFile'>): (fileName: string, source: string) => OutputAsset | undefined;
|
|
4
4
|
export declare function resolveAssetSourceFile(asset: OutputAsset, fallbackFile: string): string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { OutputAsset, OutputChunk } from 'rollup';
|
|
2
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
3
|
+
export declare function resolveCssBundleOutputFile(options: {
|
|
4
|
+
bundleFiles: string[];
|
|
5
|
+
defaultStyleOutputExtension: string;
|
|
6
|
+
file: string;
|
|
7
|
+
isWebGeneratorTarget: boolean;
|
|
8
|
+
opts: InternalUserDefinedOptions;
|
|
9
|
+
shouldPreserveAppCssExtension: boolean;
|
|
10
|
+
}): string;
|
|
11
|
+
export declare function shouldSkipRawSourceStyleAsset(outputFile: string, file: string, rawSource: string): boolean;
|
|
12
|
+
export declare function resolveOutputFileFromMatchedCssSource(options: {
|
|
13
|
+
bundleFiles: string[];
|
|
14
|
+
defaultStyleOutputExtension: string;
|
|
15
|
+
isWebGeneratorTarget: boolean;
|
|
16
|
+
opts: Pick<InternalUserDefinedOptions, 'cssMatcher' | 'platform'>;
|
|
17
|
+
rootDir: string;
|
|
18
|
+
shouldPreserveAppCssExtension: boolean;
|
|
19
|
+
sourceFile: string | undefined;
|
|
20
|
+
sourceRoot?: string | undefined;
|
|
21
|
+
}): string | undefined;
|
|
22
|
+
export declare function createMatchedCssSourceOutputResolver(options: {
|
|
23
|
+
assetSourceFile: string;
|
|
24
|
+
file: string;
|
|
25
|
+
originalFileNames?: string[] | undefined;
|
|
26
|
+
resolveOutputFileFromMatchedCssSource: (sourceFile: string | undefined) => string | undefined;
|
|
27
|
+
}): (sourceFile: string | undefined) => string | undefined;
|
|
28
|
+
export declare function hasViteProcessedCssResultForSource(sourceFile: string, getViteProcessedCssAssetResults?: (() => Iterable<[string, unknown]> | undefined) | undefined): boolean;
|
|
29
|
+
export declare function applyCssResultToBundle(options: {
|
|
30
|
+
assetSourceFile: string;
|
|
31
|
+
bundle: Record<string, OutputAsset | OutputChunk>;
|
|
32
|
+
emitOrReplayCssAsset: (file: string, source: string) => OutputAsset | undefined;
|
|
33
|
+
file: string;
|
|
34
|
+
originalSource: OutputAsset;
|
|
35
|
+
outputFile: string;
|
|
36
|
+
source: string;
|
|
37
|
+
viteProcessedCssAsset: boolean;
|
|
38
|
+
appType: unknown;
|
|
39
|
+
}): void;
|
|
@@ -11,6 +11,7 @@ export declare function resolveReplayCssOutputFile(rootDir: string, file: string
|
|
|
11
11
|
export declare function resolveReplayCssOutputFileFromSourceRoot(rootDir: string, file: string, sourceRoot: string | undefined): string;
|
|
12
12
|
export declare function resolveViteCssOutputFile(file: string, opts: InternalUserDefinedOptions, isWebGeneratorTarget: boolean, preserveCssExtension?: boolean, styleOutputExtension?: string | undefined, styleOutputFiles?: Iterable<string> | undefined): string;
|
|
13
13
|
export declare function resolveViteCssPipelineOutputFile(file: string, opts: Pick<InternalUserDefinedOptions, 'cssMatcher' | 'platform'>, rootDir: string, isWebGeneratorTarget?: boolean, preserveCssExtension?: boolean, sourceRoot?: string | undefined, styleOutputExtension?: string | undefined, styleOutputFiles?: Iterable<string> | undefined): string;
|
|
14
|
+
export declare function resolveViteCssPipelineOutputFileFromSourceFile(sourceFile: string, opts: Pick<InternalUserDefinedOptions, 'cssMatcher' | 'platform'>, rootDir: string, isWebGeneratorTarget?: boolean, preserveCssExtension?: boolean, sourceRoot?: string | undefined, styleOutputExtension?: string | undefined, styleOutputFiles?: Iterable<string> | undefined): string;
|
|
14
15
|
export declare function canProcessViteSourceStyleAsCss(source: string, file: string): boolean;
|
|
15
16
|
export declare function normalizeCssSourceForCompare(css: string): string;
|
|
16
17
|
export declare function stripStyleFileExtension(file: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { OutputAsset, OutputChunk } from 'rollup';
|
|
2
|
+
import type { GenerateBundleContext } from './types';
|
|
3
|
+
import type { IStyleHandlerOptions } from '../../../types';
|
|
4
|
+
export declare function finalizeMiniProgramCssAssets(bundle: Record<string, OutputAsset | OutputChunk>, options: {
|
|
5
|
+
cssMatcher: GenerateBundleContext['opts']['cssMatcher'];
|
|
6
|
+
getCssHandlerOptions: (file: string) => IStyleHandlerOptions;
|
|
7
|
+
isWebGeneratorTarget: boolean;
|
|
8
|
+
lastCssResultByFile?: Map<string, string> | undefined;
|
|
9
|
+
onUpdate: GenerateBundleContext['opts']['onUpdate'];
|
|
10
|
+
recordCssAssetResult: GenerateBundleContext['recordCssAssetResult'];
|
|
11
|
+
styleHandler: GenerateBundleContext['opts']['styleHandler'];
|
|
12
|
+
debug?: GenerateBundleContext['debug'];
|
|
13
|
+
}): Promise<number>;
|
|
@@ -26,6 +26,8 @@ interface FinalizeGenerateBundleOptions {
|
|
|
26
26
|
isNativeAppStyleTarget: boolean;
|
|
27
27
|
isViteProcessedCssAsset: GenerateBundleContext['isViteProcessedCssAsset'];
|
|
28
28
|
isWebGeneratorTarget: boolean;
|
|
29
|
+
jsAfterCss: boolean;
|
|
30
|
+
jsTaskFactories: Array<() => Promise<void>>;
|
|
29
31
|
lastCssResultByFile: Map<string, string>;
|
|
30
32
|
lastCssSourceHashByFile: Map<string, string>;
|
|
31
33
|
linkedByEntry: Map<string, Set<string>> | undefined;
|
|
@@ -54,5 +56,10 @@ interface FinalizeGenerateBundleOptions {
|
|
|
54
56
|
transformRuntime: Set<string>;
|
|
55
57
|
useIncrementalMode: boolean;
|
|
56
58
|
}
|
|
59
|
+
export declare function normalizeTaroRootImportShellAssets(bundle: Record<string, OutputAsset | OutputChunk>, options: Pick<GenerateBundleContext['opts'], 'appType' | 'cssMatcher'> & {
|
|
60
|
+
debug: GenerateBundleContext['debug'];
|
|
61
|
+
onUpdate: GenerateBundleContext['opts']['onUpdate'];
|
|
62
|
+
recordCssAssetResult: GenerateBundleContext['recordCssAssetResult'];
|
|
63
|
+
}): number;
|
|
57
64
|
export declare function finalizeGenerateBundle(options: FinalizeGenerateBundleOptions): Promise<void>;
|
|
58
65
|
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { OutputAsset } from 'rollup';
|
|
2
|
+
import type { createEmptyMetrics } from './metrics';
|
|
3
|
+
import { processCachedTask } from '../../shared/cache';
|
|
4
|
+
export interface ProcessHtmlBundleEntryOptions {
|
|
5
|
+
cache: Parameters<typeof processCachedTask<string>>[0]['cache'];
|
|
6
|
+
context: {
|
|
7
|
+
ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
|
|
8
|
+
};
|
|
9
|
+
debug: (message: string, ...args: unknown[]) => void;
|
|
10
|
+
dynamicRetryCandidates: Set<string>;
|
|
11
|
+
file: string;
|
|
12
|
+
metrics: ReturnType<typeof createEmptyMetrics>;
|
|
13
|
+
onUpdate: (file: string, oldVal: string, newVal: string) => void;
|
|
14
|
+
originalEntrySource: string;
|
|
15
|
+
originalSource: OutputAsset;
|
|
16
|
+
rememberProcessCacheKey: (cacheKey: string, hashKey?: string | number) => void;
|
|
17
|
+
resolveCurrentSourceCandidateSource: (file: string) => string | undefined;
|
|
18
|
+
tasks: Promise<void>[];
|
|
19
|
+
templateHandler: (source: string, options: {
|
|
20
|
+
runtimeSet: Set<string>;
|
|
21
|
+
}) => string | Promise<string>;
|
|
22
|
+
timeTask: (name: string, task: () => Promise<void>) => Promise<void>;
|
|
23
|
+
transformRuntime: Set<string>;
|
|
24
|
+
transformRuntimeSignature: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function processHtmlBundleEntry(options: ProcessHtmlBundleEntryOptions): void;
|
|
@@ -22,8 +22,12 @@ interface ProcessJsBundleEntryOptions {
|
|
|
22
22
|
rememberProcessCacheKey: (cacheKey: string, hashKey?: string | number) => void;
|
|
23
23
|
runtimeSignature: string;
|
|
24
24
|
snapshot: BundleSnapshot;
|
|
25
|
+
shouldSkipAstTransform: ((chunk: OutputChunk) => boolean) | undefined;
|
|
26
|
+
slowJsAstWarnMs: number;
|
|
25
27
|
timeTask: (name: string, task: () => Promise<void>) => Promise<void>;
|
|
26
28
|
transformRuntime: Set<string>;
|
|
29
|
+
transformRuntimeSignature: string;
|
|
30
|
+
transformFilterSignature: string;
|
|
27
31
|
uniAppX: GenerateBundleContext['opts']['uniAppX'];
|
|
28
32
|
useIncrementalMode: boolean;
|
|
29
33
|
}
|
|
@@ -5,8 +5,11 @@ export declare function resolveViteMemoryDebugStats(context: {
|
|
|
5
5
|
cache: GenerateBundleContext['opts']['cache'];
|
|
6
6
|
generatorRuntimeSize: number;
|
|
7
7
|
getViteCssCacheStats?: (() => Record<string, unknown>) | undefined;
|
|
8
|
+
hasOmittedKnownFiles: boolean;
|
|
8
9
|
lastCssResultByFile: Map<string, string>;
|
|
9
10
|
phase: string;
|
|
11
|
+
processCachePruned: boolean;
|
|
12
|
+
processCachePruneSkipReason?: string | undefined;
|
|
10
13
|
runtimeSize: number;
|
|
11
14
|
sourceCandidatesSize: number;
|
|
12
15
|
transformRuntimeSize: number;
|
|
@@ -14,6 +17,9 @@ export declare function resolveViteMemoryDebugStats(context: {
|
|
|
14
17
|
}): {
|
|
15
18
|
phase: string;
|
|
16
19
|
mode: string;
|
|
20
|
+
bundle: {
|
|
21
|
+
hasOmittedKnownFiles: boolean;
|
|
22
|
+
};
|
|
17
23
|
process: {
|
|
18
24
|
rssMb: number;
|
|
19
25
|
heapTotalMb: number;
|
|
@@ -28,10 +34,15 @@ export declare function resolveViteMemoryDebugStats(context: {
|
|
|
28
34
|
generatorRuntime: number;
|
|
29
35
|
};
|
|
30
36
|
processCache: {
|
|
37
|
+
pruneSkipReason?: string;
|
|
31
38
|
instance: number;
|
|
32
39
|
hashMap: number;
|
|
33
40
|
activeCacheKeys: number;
|
|
34
41
|
activeHashKeys: number;
|
|
42
|
+
staleCacheKeys: number;
|
|
43
|
+
staleHashKeys: number;
|
|
44
|
+
pruned: boolean;
|
|
45
|
+
pruneSkipped: boolean;
|
|
35
46
|
};
|
|
36
47
|
viteCss: {
|
|
37
48
|
lastCssResultByFile: {
|
|
@@ -41,21 +52,6 @@ export declare function resolveViteMemoryDebugStats(context: {
|
|
|
41
52
|
};
|
|
42
53
|
};
|
|
43
54
|
tailwind: {
|
|
44
|
-
v3: {
|
|
45
|
-
max: number;
|
|
46
|
-
entryCandidatesMax: number;
|
|
47
|
-
entryCssBytesMax: number;
|
|
48
|
-
size: number;
|
|
49
|
-
entries: {
|
|
50
|
-
key: string;
|
|
51
|
-
candidates: number;
|
|
52
|
-
classSet: number;
|
|
53
|
-
cssBytes: number;
|
|
54
|
-
rawCssBytes: number;
|
|
55
|
-
exactResults: number;
|
|
56
|
-
}[];
|
|
57
|
-
keys: string[];
|
|
58
|
-
};
|
|
59
55
|
v4: {
|
|
60
56
|
max: number;
|
|
61
57
|
entryCandidatesMax: number;
|
|
@@ -64,14 +60,21 @@ export declare function resolveViteMemoryDebugStats(context: {
|
|
|
64
60
|
taskMax: number;
|
|
65
61
|
taskSize: number;
|
|
66
62
|
entries: {
|
|
67
|
-
key: string;
|
|
68
63
|
candidates: number;
|
|
69
64
|
classSet: number;
|
|
70
65
|
cssBytes: number;
|
|
71
66
|
rawCssBytes: number;
|
|
67
|
+
keyHash: string;
|
|
68
|
+
keyBytes: number;
|
|
69
|
+
}[];
|
|
70
|
+
keys: {
|
|
71
|
+
keyHash: string;
|
|
72
|
+
keyBytes: number;
|
|
73
|
+
}[];
|
|
74
|
+
taskKeys: {
|
|
75
|
+
keyHash: string;
|
|
76
|
+
keyBytes: number;
|
|
72
77
|
}[];
|
|
73
|
-
keys: string[];
|
|
74
|
-
taskKeys: string[];
|
|
75
78
|
};
|
|
76
79
|
};
|
|
77
80
|
} | undefined;
|
|
@@ -18,7 +18,7 @@ interface ProcessRememberedCssReplayOptions {
|
|
|
18
18
|
cssTaskFactories: Array<() => Promise<void>>;
|
|
19
19
|
debug: GenerateBundleContext['debug'];
|
|
20
20
|
defaultStyleOutputExtension: string;
|
|
21
|
-
emitOrReplayCssAsset: (fileName: string, source: string) => OutputAsset;
|
|
21
|
+
emitOrReplayCssAsset: (fileName: string, source: string) => OutputAsset | undefined;
|
|
22
22
|
generatorRuntime: Set<string>;
|
|
23
23
|
getCssHandlerOptions: (file: string) => ReturnType<ReturnType<typeof import('./css-handler-options').createCssHandlerOptionsCache>['getCssHandlerOptions']>;
|
|
24
24
|
getCssUserHandlerOptions: (file: string) => ReturnType<ReturnType<typeof import('./css-handler-options').createCssHandlerOptionsCache>['getCssUserHandlerOptions']>;
|
|
@@ -5,7 +5,7 @@ export declare function createRememberedCssRuntimeSignature(cssRuntimeSignature:
|
|
|
5
5
|
export declare function resolveRememberedCssSourceForTest(sources: Iterable<[string, RememberedCssSource]> | undefined, outputFile: string, file: string, originalSource: OutputAsset, outputRoot: string, sourceRoot: string | undefined): RememberedCssSource | undefined;
|
|
6
6
|
export declare function findRememberedCssSources(sources: Iterable<[string, RememberedCssSource]> | undefined, outputFile: string, file: string, originalSource: OutputAsset, outputRoot: string, sourceRoot: string | undefined): RememberedCssSource[];
|
|
7
7
|
export declare function mergeRememberedCssSources(sources: RememberedCssSource[], outputFile: string): RememberedCssSource | undefined;
|
|
8
|
-
export declare function collectRememberedCssReplayGroups(sources: Iterable<[string, RememberedCssSource]> | undefined, opts: Pick<InternalUserDefinedOptions, 'cssMatcher'>, rootDir: string, isWebGeneratorTarget: boolean, preserveCssExtension: boolean, sourceRoot?: string | undefined, styleOutputExtension?: string | undefined, styleOutputFiles?: Iterable<string> | undefined): Map<string, {
|
|
8
|
+
export declare function collectRememberedCssReplayGroups(sources: Iterable<[string, RememberedCssSource]> | undefined, opts: Pick<InternalUserDefinedOptions, 'cssMatcher' | 'platform'>, rootDir: string, isWebGeneratorTarget: boolean, preserveCssExtension: boolean, sourceRoot?: string | undefined, styleOutputExtension?: string | undefined, styleOutputFiles?: Iterable<string> | undefined): Map<string, {
|
|
9
9
|
key: string;
|
|
10
10
|
remembered: RememberedCssSource;
|
|
11
11
|
}[]>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function isRootMiniProgramStyleOutputFile(file: string): boolean;
|
|
2
|
+
export declare function createRelativeCssImportRequest(targetFile: string, importedFile: string): string;
|
|
3
|
+
export declare function createCssImportShell(targetFile: string, importedFile: string): string;
|
|
4
|
+
export declare function createRootMiniProgramOriginStyleOutputFile(file: string): string;
|
|
5
|
+
export declare function shouldKeepRootMiniProgramStyleAsImportShell(appType: unknown): appType is "uni-app-x" | "taro" | "uni-app-vite";
|
|
6
|
+
export declare function shouldMoveRootMiniProgramStyleToImportShellOrigin(appType: unknown): appType is "taro";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { BundleSnapshot } from '../bundle-state';
|
|
2
|
+
import type { RememberedCssSource } from './types';
|
|
3
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
4
|
+
export interface RememberRuntimeLinkedCssSourcesOptions {
|
|
5
|
+
bundleFiles: string[];
|
|
6
|
+
defaultStyleOutputExtension: string;
|
|
7
|
+
debug: (message: string, ...args: unknown[]) => void;
|
|
8
|
+
getConfiguredTailwindV4CssSourceEntries: () => Array<{
|
|
9
|
+
file: string;
|
|
10
|
+
source: string;
|
|
11
|
+
}>;
|
|
12
|
+
getSourceCandidateSource?: ((file: string) => string | undefined) | undefined;
|
|
13
|
+
getSourceCandidateSources?: (() => Iterable<[string, string]>) | undefined;
|
|
14
|
+
isWebGeneratorTarget: boolean;
|
|
15
|
+
jsImportedCssFiles: Set<string>;
|
|
16
|
+
opts: Pick<InternalUserDefinedOptions, 'cssMatcher' | 'platform'>;
|
|
17
|
+
outDir: string;
|
|
18
|
+
rememberCssSource?: ((source: RememberedCssSource) => void) | undefined;
|
|
19
|
+
rootDir: string;
|
|
20
|
+
runtimeLinkedCssFiles: Set<string>;
|
|
21
|
+
shouldPreserveAppCssExtension: boolean;
|
|
22
|
+
snapshot: BundleSnapshot;
|
|
23
|
+
sourceRoot?: string | undefined;
|
|
24
|
+
}
|
|
25
|
+
export declare function rememberRuntimeLinkedCssSources(options: RememberRuntimeLinkedCssSourcesOptions): void;
|