weapp-tailwindcss 5.0.0-next.5 → 5.0.0-next.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/bundlers/shared/css-cleanup/at-rules.d.ts +2 -0
- package/dist/bundlers/shared/css-cleanup/color-gamut.d.ts +3 -0
- package/dist/bundlers/shared/css-cleanup/root-cleanups.d.ts +4 -0
- package/dist/bundlers/shared/css-cleanup/selectors.d.ts +8 -0
- package/dist/bundlers/shared/css-cleanup.d.ts +1 -2
- package/dist/bundlers/shared/generator-css/config-directive.d.ts +2 -0
- package/dist/bundlers/shared/generator-css/directives.d.ts +11 -0
- package/dist/bundlers/shared/generator-css/legacy-compat.d.ts +7 -0
- package/dist/bundlers/shared/generator-css/legacy-selectors.d.ts +5 -0
- package/dist/bundlers/shared/generator-css/legacy-units.d.ts +1 -0
- package/dist/bundlers/shared/generator-css/markers.d.ts +16 -0
- package/dist/bundlers/shared/generator-css/source-files.d.ts +11 -0
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +10 -0
- package/dist/bundlers/shared/generator-css.d.ts +10 -23
- package/dist/bundlers/vite/css-finalizer.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/candidates.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +20 -0
- package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +3 -0
- package/dist/bundlers/vite/generate-bundle/dirty-state.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/js-entries.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/js-handler-options.d.ts +8 -0
- package/dist/bundlers/vite/generate-bundle/js-linking.d.ts +13 -0
- package/dist/bundlers/vite/generate-bundle/metrics.d.ts +17 -0
- package/dist/bundlers/vite/generate-bundle/process-plan.d.ts +9 -0
- package/dist/bundlers/vite/generate-bundle/rollup-assets.d.ts +7 -0
- package/dist/bundlers/vite/generate-bundle/signatures.d.ts +8 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +1 -1
- package/dist/bundlers/vite/official-tailwind-plugins.d.ts +5 -0
- package/dist/bundlers/vite/postcss-config.d.ts +6 -0
- package/dist/bundlers/vite/runtime-class-set.d.ts +22 -0
- package/dist/bundlers/vite/tailwind-basedir.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets.d.ts +1 -1
- package/dist/cache-DPN5yKSX.js +497 -0
- package/dist/cache-nq0_XJoS.mjs +429 -0
- package/dist/cli/helpers.d.ts +1 -2
- package/dist/cli/mount-options.d.ts +2 -2
- package/dist/cli/types.d.ts +0 -2
- package/dist/cli.js +107 -603
- package/dist/cli.mjs +118 -613
- package/dist/constants.d.ts +0 -1
- package/dist/context/tailwindcss.d.ts +1 -1
- package/dist/core.js +13 -20
- package/dist/core.mjs +8 -14
- package/dist/css-macro/postcss.js +1 -1
- package/dist/css-macro/postcss.mjs +1 -1
- package/dist/css-macro.js +2 -2
- package/dist/css-macro.mjs +2 -2
- package/dist/defaults.d.ts +15 -1
- package/dist/defaults.js +28 -7
- package/dist/defaults.mjs +25 -8
- package/dist/{generator-Dpp-5s8z.mjs → generator-CzfdCZyd.mjs} +19 -3
- package/dist/{generator-9UEp8OoQ.js → generator-TOp4uz7c.js} +23 -7
- package/dist/{generator-css-MyjZhF0z.mjs → generator-css-B938WI9a.mjs} +617 -570
- package/dist/{generator-css-CGueCYbX.js → generator-css-Dnpl-IY2.js} +622 -569
- package/dist/generator.js +1 -1
- package/dist/generator.mjs +1 -1
- package/dist/gulp.js +18 -21
- package/dist/gulp.mjs +13 -16
- package/dist/index.js +5 -5
- package/dist/index.mjs +4 -4
- package/dist/logger-BRy6XPQ2.js +1 -0
- package/dist/logger-Bub1jggA.mjs +2 -0
- package/dist/postcss/config-directive.d.ts +1 -0
- package/dist/postcss/context.d.ts +9 -0
- package/dist/postcss/source-files.d.ts +8 -0
- package/dist/postcss/tailwind-version.d.ts +3 -0
- package/dist/postcss-BtAP6sQO.mjs +288 -0
- package/dist/postcss-WsXlC7A-.js +298 -0
- package/dist/postcss.js +3 -285
- package/dist/postcss.mjs +1 -278
- package/dist/{recorder-D4BKt75Q.js → precheck-Dka94ArV.js} +139 -274
- package/dist/{recorder-BIW3Kuke.mjs → precheck-DlrmwCc-.mjs} +104 -238
- package/dist/presets.js +6 -4
- package/dist/presets.mjs +4 -2
- package/dist/runtime-patch-pGdCqAEu.mjs +71 -0
- package/dist/runtime-patch-qwuisukL.js +85 -0
- package/dist/tailwindcss/runtime-patch.d.ts +5 -0
- package/dist/tailwindcss/runtime.d.ts +2 -3
- package/dist/tailwindcss/targets.d.ts +1 -5
- package/dist/tailwindcss/v4/patcher.d.ts +1 -1
- package/dist/{logger-1gx9UllH.mjs → tailwindcss-BIJ185GB.mjs} +10 -389
- package/dist/{logger-D9clu_3f.js → tailwindcss-T1U5T-iF.js} +16 -424
- package/dist/types/index.d.ts +1 -6
- package/dist/uni-app-x/vite.d.ts +1 -1
- package/dist/{vite-fDM-UQpR.mjs → vite-BXChkciE.mjs} +630 -509
- package/dist/{vite-BkMGwDeH.js → vite-D0CoRblu.js} +659 -538
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/{webpack-D2Wdk28V.mjs → webpack-BNdGm9KL.mjs} +17 -18
- package/dist/{webpack-CICGEKT9.js → webpack-D-sUCY0u.js} +32 -33
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +3 -6
- package/dist/bundlers/shared/generator-candidates.d.ts +0 -5
- package/dist/bundlers/webpack/shared/css-imports.d.ts +0 -6
- package/dist/cli/config.d.ts +0 -5
- package/dist/cli/helpers/patch-cwd.d.ts +0 -1
- package/dist/cli/mount-options/patch-status.d.ts +0 -2
- package/dist/cli/patch-options.d.ts +0 -6
- package/dist/cli/tokens.d.ts +0 -4
- package/dist/cli/workspace/package-dirs.d.ts +0 -3
- package/dist/cli/workspace/patch-package.d.ts +0 -3
- package/dist/cli/workspace/patch-utils.d.ts +0 -3
- package/dist/cli/workspace/types.d.ts +0 -11
- package/dist/cli/workspace/workspace-globs.d.ts +0 -2
- package/dist/cli/workspace/workspace-io.d.ts +0 -1
- package/dist/cli/workspace/workspace-lock.d.ts +0 -1
- package/dist/cli/workspace.d.ts +0 -2
- package/dist/js/syntax.d.ts +0 -10
- package/dist/patcher-options-DnqazL9E.js +0 -34
- package/dist/patcher-options-GuOwX0-k.mjs +0 -17
- package/dist/tailwindcss/recorder.d.ts +0 -13
- package/dist/tailwindcss/targets/paths.d.ts +0 -13
- package/dist/tailwindcss/targets/record-io.d.ts +0 -5
- package/dist/tailwindcss/targets/recorder.d.ts +0 -3
- package/dist/tailwindcss/targets/types.d.ts +0 -35
- package/dist/version-CWBxRFPB.js +0 -56
- package/dist/version-WNz3MwRv.mjs +0 -49
- /package/dist/{constants-p1dyh1x1.js → constants-BoB_6lFw.js} +0 -0
- /package/dist/{constants-B-_T5UnW.mjs → constants-E_loJC49.mjs} +0 -0
- /package/dist/{run-tasks-Cq5A5nVD.js → run-tasks-B50A3pxt.js} +0 -0
- /package/dist/{run-tasks-DUVrDJGl.mjs → run-tasks-DdNi-hkk.mjs} +0 -0
- /package/dist/{utils-7DUGTFED.mjs → utils-BJjKRQgf.mjs} +0 -0
- /package/dist/{utils-DmC9_In3.js → utils-VZvGusYs.js} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type postcss from 'postcss';
|
|
2
|
+
export declare function removeSpecificityPlaceholders(root: postcss.Root): void;
|
|
3
|
+
export declare function removeUnsupportedBrowserSelectors(root: postcss.Root): void;
|
|
4
|
+
export declare function removeDisplayP3Declarations(root: postcss.Root): void;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type postcss from 'postcss';
|
|
2
|
+
export declare const MINI_PROGRAM_THEME_SCOPE_SELECTOR = ":host,page,.tw-root,wx-root-portal-content";
|
|
3
|
+
export declare const MINI_PROGRAM_PREFLIGHT_SELECTORS: Set<string>;
|
|
4
|
+
export declare const MINI_PROGRAM_THEME_SCOPE_SELECTORS: Set<string>;
|
|
5
|
+
export declare const SPECIFICITY_PLACEHOLDER_SUFFIXES: string[];
|
|
6
|
+
export declare function normalizeSelector(selector: string): string;
|
|
7
|
+
export declare function getRuleSelectors(rule: postcss.Rule): string[];
|
|
8
|
+
export declare function isUnsupportedBrowserSelector(selector: string): boolean;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare function removeUnsupportedAtSupports(css: string): string;
|
|
1
|
+
export { removeUnsupportedAtSupports, removeUnsupportedMiniProgramAtRules } from './css-cleanup/at-rules';
|
|
3
2
|
export declare function hoistTailwindPreflightBase(css: string): string;
|
|
4
3
|
export declare function finalizeMiniProgramCss(css: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function parseImportRequest(params: string): string | undefined;
|
|
2
|
+
export declare function removeTailwindSourceDirectives(rawSource: string): string;
|
|
3
|
+
export declare function hasTailwindSourceDirectives(rawSource: string): boolean;
|
|
4
|
+
export declare function resolveCssEntrySource(rawSource: string, base: string, options?: {
|
|
5
|
+
removeConfig?: boolean;
|
|
6
|
+
}): {
|
|
7
|
+
css: string;
|
|
8
|
+
config: string | undefined;
|
|
9
|
+
configRequest: string | undefined;
|
|
10
|
+
base: string;
|
|
11
|
+
} | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { TailwindResolvedSource } from '../../../generator';
|
|
3
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
4
|
+
export declare function removeTailwindApplyRules(rawSource: string): string;
|
|
5
|
+
export declare function hasConfiguredContainerCompatSources(sources: TailwindResolvedSource[]): boolean;
|
|
6
|
+
export declare function appendLegacyCompatCss(css: string, rawSource: string, generatorTarget: string, styleHandler: InternalUserDefinedOptions['styleHandler'], cssHandlerOptions: IStyleHandlerOptions, generatorStyleOptions: Partial<IStyleHandlerOptions> | undefined): Promise<string>;
|
|
7
|
+
export declare function appendLegacyContainerCompatCss(css: string, rawSource: string, file: string, runtime: Set<string>, configuredContainerCompat: boolean, generatorTarget: string, styleHandler: InternalUserDefinedOptions['styleHandler'], cssHandlerOptions: IStyleHandlerOptions, generatorStyleOptions: Partial<IStyleHandlerOptions> | undefined): Promise<string>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function normalizeCompatSelectors(selector: string): string[];
|
|
2
|
+
export declare function collectGeneratedSelectors(css: string): Set<string>;
|
|
3
|
+
export declare function removeGeneratedSelectorCompatCss(css: string, generatedCss: string): string;
|
|
4
|
+
export declare function collectDedupedPostTransformCompatCss(css: string, generatedCss: string): string;
|
|
5
|
+
export declare function removeDuplicatedViteMarkers(css: string, baseCss: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function inheritLegacyUnitConvertedDeclarations(css: string, legacyCss: string): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const TAILWIND_V4_BANNER_RE: RegExp;
|
|
2
|
+
export declare const TAILWIND_GENERATED_CSS_MARKER_RE: RegExp;
|
|
3
|
+
export declare const GENERATOR_PLACEHOLDER_MARKER_RE: RegExp;
|
|
4
|
+
export declare const GENERATOR_PLACEHOLDER_MARKER_GLOBAL_RE: RegExp;
|
|
5
|
+
export declare const TAILWIND_BANNER_PREFIX_RE: RegExp;
|
|
6
|
+
export declare const TAILWIND_BANNER_RE: RegExp;
|
|
7
|
+
export declare const TAILWIND_BANNER_GLOBAL_RE: RegExp;
|
|
8
|
+
export declare const VITE_MARKER_RE: RegExp;
|
|
9
|
+
export declare function createCssAppend(base: string, extra: string): string;
|
|
10
|
+
export declare function splitTailwindV4GeneratedCss(rawSource: string, rawTailwindCss: string): string | undefined;
|
|
11
|
+
export declare function removeTailwindGeneratedCssByBanner(rawSource: string): string | undefined;
|
|
12
|
+
export declare function stripTailwindBanner(css: string): string;
|
|
13
|
+
export declare function stripTailwindBanners(css: string): string;
|
|
14
|
+
export declare function stripGeneratorPlaceholderMarkers(css: string): string;
|
|
15
|
+
export declare function hasTailwindGeneratedCss(rawSource: string): boolean;
|
|
16
|
+
export declare function hasTailwindGeneratedCssMarkers(rawSource: string): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare function resolveSourceSideCssEntrySource(file: string, sourceOptions: {
|
|
2
|
+
projectRoot?: string;
|
|
3
|
+
cwd?: string;
|
|
4
|
+
}, resolveOptions?: {
|
|
5
|
+
removeConfig?: boolean;
|
|
6
|
+
}): {
|
|
7
|
+
css: string;
|
|
8
|
+
config: string | undefined;
|
|
9
|
+
configRequest: string | undefined;
|
|
10
|
+
base: string;
|
|
11
|
+
} | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { NormalizedWeappTailwindcssGeneratorOptions, TailwindResolvedSource } from '../../../generator';
|
|
3
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
4
|
+
interface GeneratorSourceRuntimeState {
|
|
5
|
+
twPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
6
|
+
}
|
|
7
|
+
export declare function resolveCssSourceBase(file: string, cssHandlerOptions: IStyleHandlerOptions): string;
|
|
8
|
+
export declare function resolveGeneratorSource(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions): Promise<import("@/generator").TailwindV3ResolvedSource | import("tailwindcss-patch").TailwindV4ResolvedSource>;
|
|
9
|
+
export declare function resolveGeneratorSources(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions): Promise<TailwindResolvedSource[]>;
|
|
10
|
+
export {};
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
-
import type { NormalizedWeappTailwindcssGeneratorOptions } from '../../generator';
|
|
3
2
|
import type { InternalUserDefinedOptions } from '../../types';
|
|
3
|
+
export { hasTailwindSourceDirectives, removeTailwindSourceDirectives, resolveCssEntrySource, } from './generator-css/directives';
|
|
4
|
+
export { removeTailwindApplyRules, } from './generator-css/legacy-compat';
|
|
5
|
+
export { inheritLegacyUnitConvertedDeclarations, } from './generator-css/legacy-units';
|
|
6
|
+
export { createCssAppend, hasTailwindGeneratedCss, hasTailwindGeneratedCssMarkers, removeTailwindGeneratedCssByBanner, splitTailwindV4GeneratedCss, stripGeneratorPlaceholderMarkers, stripTailwindBanner, stripTailwindBanners, } from './generator-css/markers';
|
|
7
|
+
export { resolveGeneratorSource, } from './generator-css/source-resolver';
|
|
4
8
|
export interface GenerateCssByGeneratorOptions {
|
|
5
9
|
opts: InternalUserDefinedOptions;
|
|
6
10
|
runtimeState: {
|
|
7
11
|
twPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
8
|
-
|
|
12
|
+
readyPromise: Promise<void>;
|
|
9
13
|
};
|
|
10
14
|
runtime: Set<string>;
|
|
11
15
|
rawSource: string;
|
|
@@ -21,26 +25,9 @@ export interface GenerateCssByGeneratorResult {
|
|
|
21
25
|
source: 'generator';
|
|
22
26
|
dependencies: string[];
|
|
23
27
|
}
|
|
24
|
-
export declare function createCssAppend(base: string, extra: string): string;
|
|
25
|
-
export declare function splitTailwindV4GeneratedCss(rawSource: string, rawTailwindCss: string): string | undefined;
|
|
26
|
-
export declare function removeTailwindGeneratedCssByBanner(rawSource: string): string | undefined;
|
|
27
|
-
export declare function stripTailwindBanner(css: string): string;
|
|
28
|
-
export declare function stripTailwindBanners(css: string): string;
|
|
29
|
-
export declare function stripGeneratorPlaceholderMarkers(css: string): string;
|
|
30
|
-
export declare function hasTailwindGeneratedCss(rawSource: string): boolean;
|
|
31
|
-
export declare function hasTailwindGeneratedCssMarkers(rawSource: string): boolean;
|
|
32
|
-
export declare function inheritLegacyUnitConvertedDeclarations(css: string, legacyCss: string): string;
|
|
33
|
-
export declare function removeTailwindSourceDirectives(rawSource: string): string;
|
|
34
|
-
export declare function hasTailwindSourceDirectives(rawSource: string): boolean;
|
|
35
|
-
export declare function resolveCssEntrySource(rawSource: string, base: string, options?: {
|
|
36
|
-
removeConfig?: boolean;
|
|
37
|
-
}): {
|
|
38
|
-
css: string;
|
|
39
|
-
config: string | undefined;
|
|
40
|
-
configRequest: string | undefined;
|
|
41
|
-
base: string;
|
|
42
|
-
} | undefined;
|
|
43
|
-
export declare function resolveGeneratorSource(majorVersion: number | undefined, runtimeState: GenerateCssByGeneratorOptions['runtimeState'], rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions): Promise<import("@/generator").TailwindV3ResolvedSource | import("tailwindcss-patch").TailwindV4ResolvedSource>;
|
|
44
28
|
export declare function isPureLocalCssImportWrapper(css: string): boolean;
|
|
45
|
-
export declare function removeTailwindApplyRules(rawSource: string): string;
|
|
46
29
|
export declare function generateCssByGenerator(options: GenerateCssByGeneratorOptions): Promise<GenerateCssByGeneratorResult | undefined>;
|
|
30
|
+
export interface ValidateCandidatesByGeneratorOptions extends Omit<GenerateCssByGeneratorOptions, 'runtime'> {
|
|
31
|
+
candidates: Set<string>;
|
|
32
|
+
}
|
|
33
|
+
export declare function validateCandidatesByGenerator(options: ValidateCandidatesByGeneratorOptions): Promise<Set<string>>;
|
|
@@ -5,7 +5,7 @@ interface CssFinalizerContext {
|
|
|
5
5
|
opts: InternalUserDefinedOptions;
|
|
6
6
|
runtimeState: {
|
|
7
7
|
twPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
8
|
-
|
|
8
|
+
readyPromise: Promise<void>;
|
|
9
9
|
};
|
|
10
10
|
ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
|
|
11
11
|
isCssAssetProcessed: (asset: OutputAsset, file?: string) => boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { InternalUserDefinedOptions, IStyleHandlerOptions } from '../../../types';
|
|
2
|
+
type CssHandlerOptions = IStyleHandlerOptions & {
|
|
3
|
+
postcssOptions: {
|
|
4
|
+
options: {
|
|
5
|
+
from: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
majorVersion: number | undefined;
|
|
9
|
+
};
|
|
10
|
+
interface CssHandlerOptionsCacheOptions {
|
|
11
|
+
appType: InternalUserDefinedOptions['appType'];
|
|
12
|
+
mainCssChunkMatcher: InternalUserDefinedOptions['mainCssChunkMatcher'];
|
|
13
|
+
getMajorVersion: () => number | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface CssHandlerOptionsCache {
|
|
16
|
+
getCssHandlerOptions: (file: string) => CssHandlerOptions;
|
|
17
|
+
getCssUserHandlerOptions: (file: string) => CssHandlerOptions;
|
|
18
|
+
}
|
|
19
|
+
export declare function createCssHandlerOptionsCache(options: CssHandlerOptionsCacheOptions): CssHandlerOptionsCache;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
2
|
+
export declare function createCssTransformShareScopeKey(opts: InternalUserDefinedOptions, file: string, rawSource: string): string;
|
|
3
|
+
export declare function createCssRuntimeSignature(runtimeSignature: string, generatorCandidateSignature: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function hasOmittedKnownBundleFiles(currentBundleFiles: string[], previousBundleFiles: Iterable<string>): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CreateJsHandlerOptions, InternalUserDefinedOptions } from '../../../types';
|
|
2
|
+
interface JsHandlerOptionsFactoryOptions {
|
|
3
|
+
getMajorVersion: () => number | undefined;
|
|
4
|
+
moduleGraph: CreateJsHandlerOptions['moduleGraph'];
|
|
5
|
+
}
|
|
6
|
+
export declare function resolveUniAppXJsTransformEnabled(uniAppX: InternalUserDefinedOptions['uniAppX'] | undefined): boolean;
|
|
7
|
+
export declare function createJsHandlerOptionsFactory(options: JsHandlerOptionsFactoryOptions): (absoluteFilename: string, extra?: CreateJsHandlerOptions) => CreateJsHandlerOptions;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { OutputEntry } from '../bundle-entries';
|
|
2
|
+
import type { LinkedJsModuleResult } from '../../../types';
|
|
3
|
+
interface LinkedUpdateHelpersOptions {
|
|
4
|
+
jsEntries: Map<string, OutputEntry>;
|
|
5
|
+
onUpdate: (fileName: string, previous: string, next: string) => void;
|
|
6
|
+
debug: (format: string, ...args: unknown[]) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function createLinkedUpdateHelpers(options: LinkedUpdateHelpersOptions): {
|
|
9
|
+
applyLinkedUpdates: (linked?: Record<string, LinkedJsModuleResult>) => void;
|
|
10
|
+
pendingLinkedUpdates: (() => void)[];
|
|
11
|
+
};
|
|
12
|
+
export declare function collectLinkedFileNames(linked: Record<string, LinkedJsModuleResult> | undefined, getJsEntry: (id: string) => OutputEntry | undefined, linkedSet: Set<string> | undefined): void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface BundleMetric {
|
|
2
|
+
total: number;
|
|
3
|
+
transformed: number;
|
|
4
|
+
cacheHits: number;
|
|
5
|
+
elapsed: number;
|
|
6
|
+
}
|
|
7
|
+
export interface BundleMetrics {
|
|
8
|
+
runtimeSet: number;
|
|
9
|
+
html: BundleMetric;
|
|
10
|
+
js: BundleMetric;
|
|
11
|
+
css: BundleMetric;
|
|
12
|
+
}
|
|
13
|
+
export declare function formatDebugFileList(files: Set<string>, limit?: number): string;
|
|
14
|
+
export declare function createEmptyMetrics(): BundleMetrics;
|
|
15
|
+
export declare function measureElapsed(start: number): number;
|
|
16
|
+
export declare function formatCacheHitRate(metric: BundleMetric): string;
|
|
17
|
+
export declare function formatMs(value: number): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BundleSnapshot } from '../bundle-state';
|
|
2
|
+
interface LogBundleProcessPlanOptions {
|
|
3
|
+
debug: (format: string, ...args: unknown[]) => void;
|
|
4
|
+
snapshot: BundleSnapshot;
|
|
5
|
+
useIncrementalMode: boolean;
|
|
6
|
+
iteration: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function logBundleProcessPlan(options: LogBundleProcessPlanOptions): void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OutputAsset } from 'rollup';
|
|
2
|
+
interface GeneratorDependencyContext {
|
|
3
|
+
addWatchFile?: (id: string) => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function createReplayCssAsset(fileName: string, source: string): OutputAsset;
|
|
6
|
+
export declare function registerGeneratorDependencies(ctx: GeneratorDependencyContext, dependencies: readonly string[] | undefined): void;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EntryType } from '../bundle-state';
|
|
2
|
+
export declare function summarizeStringDiff(previous: string, next: string): string;
|
|
3
|
+
export declare function createLinkedImpactSignature(entry: string, linkedImpactsByEntry: Map<string, Set<string>>, sourceHashByFile: Map<string, string>): string | undefined;
|
|
4
|
+
export declare function createJsHashSalt(runtimeSignature: string, linkedImpactSignature?: string): string;
|
|
5
|
+
export declare function createStableTextSignature(input: string): string;
|
|
6
|
+
export declare function createCandidateSignature(candidates: Set<string>): string;
|
|
7
|
+
export declare function getSnapshotHash(snapshotMap: Map<string, string>, file: string, fallback: string): string;
|
|
8
|
+
export declare function hasRuntimeAffectingSourceChanges(changedByType: Record<EntryType, Set<string>>): boolean;
|
|
@@ -6,7 +6,7 @@ interface GenerateBundleContext {
|
|
|
6
6
|
opts: InternalUserDefinedOptions;
|
|
7
7
|
runtimeState: {
|
|
8
8
|
twPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
9
|
-
|
|
9
|
+
readyPromise: Promise<void>;
|
|
10
10
|
};
|
|
11
11
|
ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
|
|
12
12
|
ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean) => Promise<Set<string>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Plugin } from 'vite';
|
|
2
|
+
export declare function getPostcssPluginName(plugin: unknown): string | undefined;
|
|
3
|
+
export declare function removeTailwindPostcssPlugins(plugins: unknown[]): number;
|
|
4
|
+
export declare function removeTailwindVitePlugins(plugins: Plugin[]): number;
|
|
5
|
+
export declare function disableAndRemoveTailwindVitePlugins(plugins: unknown[]): number;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import postcssrc from 'postcss-load-config';
|
|
2
|
+
export declare function resolveFilteredPostcssConfig(root: string): Promise<{
|
|
3
|
+
options: import("postcss").ProcessOptions<import("postcss").Document | import("postcss").Root>;
|
|
4
|
+
plugins: postcssrc.ResultPlugin[];
|
|
5
|
+
removed: number;
|
|
6
|
+
} | undefined>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { BundleSnapshot } from './bundle-state';
|
|
2
|
+
import type { InternalUserDefinedOptions } from '../../types';
|
|
3
|
+
interface CreateViteRuntimeClassSetOptions {
|
|
4
|
+
opts: InternalUserDefinedOptions;
|
|
5
|
+
initialTwPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
6
|
+
refreshTailwindcssPatcher: InternalUserDefinedOptions['refreshTailwindcssPatcher'];
|
|
7
|
+
uniAppXEnabled: boolean;
|
|
8
|
+
customAttributesEntities: unknown;
|
|
9
|
+
disabledDefaultTemplateHandler: boolean;
|
|
10
|
+
debug: (format: string, ...args: unknown[]) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function createViteRuntimeClassSet(options: CreateViteRuntimeClassSetOptions): {
|
|
13
|
+
runtimeState: {
|
|
14
|
+
twPatcher: import("@/types").TailwindcssPatcherLike;
|
|
15
|
+
readyPromise: Promise<void>;
|
|
16
|
+
refreshTailwindcssPatcher: (options?: import("@/types").RefreshTailwindcssPatcherOptions) => Promise<import("@/types").TailwindcssPatcherLike>;
|
|
17
|
+
};
|
|
18
|
+
refreshRuntimeState: (force: boolean) => Promise<void>;
|
|
19
|
+
ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
|
|
20
|
+
ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean) => Promise<Set<string>>;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveImplicitTailwindcssBasedirFromViteRoot(root: string): string;
|
|
@@ -16,5 +16,6 @@ interface WebpackWatchChangeLike {
|
|
|
16
16
|
removedFiles?: Set<string>;
|
|
17
17
|
}
|
|
18
18
|
export declare function createAssetHashByChunkMap(chunks: Iterable<ChunkLike>): Map<string, string>;
|
|
19
|
+
export declare function createRuntimeAwareCssHash(assetHash: string | undefined, sourceHash: string, runtimeSetHash: string): string;
|
|
19
20
|
export declare function hasWatchChanges(compiler: WebpackWatchChangeLike): boolean;
|
|
20
21
|
export {};
|
|
@@ -6,7 +6,7 @@ interface SetupWebpackV5ProcessAssetsHookOptions {
|
|
|
6
6
|
appType?: AppType;
|
|
7
7
|
runtimeState: {
|
|
8
8
|
twPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
9
|
-
|
|
9
|
+
readyPromise: Promise<void>;
|
|
10
10
|
};
|
|
11
11
|
getRuntimeRefreshRequirement: () => boolean;
|
|
12
12
|
refreshRuntimeMetadata: (force: boolean) => Promise<void>;
|