weapp-tailwindcss 5.0.5 → 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-Cso_ceUo.js → bundle-state-BzwPS-UI.js} +2 -1
- package/dist/{bundle-state-DEyxCR4f.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-AD-eX8Tr.js → generator-6yF8wjxR.js} +1 -1
- package/dist/{generator-DVWLNO0n.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-vOetpdWs.js → hmr-timing-BKQNRxHr.js} +1257 -459
- package/dist/{incremental-runtime-class-set-xf49kky6.mjs → hmr-timing-BVTGf5ch.mjs} +1221 -477
- package/dist/index.js +5 -5
- package/dist/index.mjs +5 -5
- package/dist/{postcss-Cbi6RFpf.js → postcss-BTIunhWl.js} +7 -7
- package/dist/{postcss-hSUxK7oR.mjs → postcss-BtmrrZ31.mjs} +4 -4
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-Bsn_LMmo.mjs → precheck-CZjr87m_.mjs} +19 -5
- package/dist/{precheck-b8Y8qZg0.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-AWaPVF2B.mjs → tailwindcss-bbQUg25J.mjs} +2 -2
- package/dist/{tailwindcss-CpQ6X4l6.js → tailwindcss-vswd1gc3.js} +2 -2
- package/dist/{transform-BkGtbxb1.js → transform-CReJxxh_.js} +11 -2
- package/dist/{transform-DumSZmTh.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-CM0TRa8V.js → v3-engine-CEMXFegG.js} +714 -663
- package/dist/{v3-engine-Cczrkzqt.mjs → v3-engine-CdIwmHuc.mjs} +758 -707
- package/dist/{vite-CTuHPC91.js → vite-0jFbh9hx.js} +1797 -386
- package/dist/{vite-DLXDMHON.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 +1169 -1002
- package/dist/{webpack-DJFw08SK.mjs → webpack-Dx6_eg5k.mjs} +96 -36
- package/dist/{webpack-BBHJYKqB.js → webpack-aEuDoYfQ.js} +105 -44
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +6 -5
- package/dist/source-candidates-BsWYoIPN.mjs +0 -355
- package/dist/source-candidates-o2ZrKWzu.js +0 -374
|
@@ -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 node_module = require("node:module");
|
|
4
4
|
let node_process = require("node:process");
|
|
5
5
|
node_process = require_chunk.__toESM(node_process);
|
|
@@ -133,6 +133,7 @@ function stripBundlerGeneratedCssMarkers(source) {
|
|
|
133
133
|
}
|
|
134
134
|
function parseBundlerGeneratedCssMarkerBlocks(source) {
|
|
135
135
|
const blocks = [];
|
|
136
|
+
BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.lastIndex = 0;
|
|
136
137
|
let match = BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.exec(source);
|
|
137
138
|
while (match !== null) {
|
|
138
139
|
const cssStart = BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.lastIndex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as traverse, m as babelParse, o as Parser } from "./precheck-
|
|
1
|
+
import { h as traverse, m as babelParse, o as Parser } from "./precheck-CZjr87m_.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import path from "node:path";
|
|
@@ -130,6 +130,7 @@ function stripBundlerGeneratedCssMarkers(source) {
|
|
|
130
130
|
}
|
|
131
131
|
function parseBundlerGeneratedCssMarkerBlocks(source) {
|
|
132
132
|
const blocks = [];
|
|
133
|
+
BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.lastIndex = 0;
|
|
133
134
|
let match = BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.exec(source);
|
|
134
135
|
while (match !== null) {
|
|
135
136
|
const cssStart = BUNDLER_GENERATED_CSS_MARKER_CAPTURE_RE.lastIndex;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { CreateJsHandlerOptions, IStyleHandlerOptions, ITemplateHandlerOptions, UserDefinedOptions } from '../../types';
|
|
2
|
-
import stream from 'node:stream';
|
|
3
2
|
export declare function createPlugins(options?: UserDefinedOptions): {
|
|
4
|
-
transformWxss: (options?: Partial<IStyleHandlerOptions>) => stream.Transform;
|
|
5
|
-
transformWxml: (options?: Partial<ITemplateHandlerOptions>) => stream.Transform;
|
|
6
|
-
transformJs: (options?: Partial<CreateJsHandlerOptions>) => stream.Transform;
|
|
3
|
+
transformWxss: (options?: Partial<IStyleHandlerOptions>) => import("stream").Transform;
|
|
4
|
+
transformWxml: (options?: Partial<ITemplateHandlerOptions>) => import("stream").Transform;
|
|
5
|
+
transformJs: (options?: Partial<CreateJsHandlerOptions>) => import("stream").Transform;
|
|
7
6
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { finalizeMiniProgramCss, hoistTailwindPreflightBase, removeUnsupportedAtSupports, removeUnsupportedMiniProgramAtRules, } from '@weapp-tailwindcss/postcss';
|
|
1
|
+
export { finalizeMiniProgramCss, hoistTailwindPreflightBase, pruneMiniProgramGeneratedCss, removeUnsupportedAtSupports, removeUnsupportedMiniProgramAtRules, } from '@weapp-tailwindcss/postcss';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TailwindSourceEntry } from '../../tailwindcss/source-scan';
|
|
2
|
+
import type { InternalUserDefinedOptions } from '../../types';
|
|
3
|
+
export interface CssTokenSource {
|
|
4
|
+
token: string;
|
|
5
|
+
sources: string[];
|
|
6
|
+
}
|
|
7
|
+
export type CssTokenSourceMap = Map<string, CssTokenSource>;
|
|
8
|
+
export type CssSourceTraceGetter = (entries: TailwindSourceEntry[] | undefined) => CssTokenSourceMap | undefined;
|
|
9
|
+
export interface CssSourceTraceOptions {
|
|
10
|
+
root?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
export type CssSourceTraceUserOptions = boolean | CssSourceTraceOptions;
|
|
13
|
+
export interface AnnotateCssSourceTraceOptions {
|
|
14
|
+
opts: InternalUserDefinedOptions;
|
|
15
|
+
tokenSources?: CssTokenSourceMap | undefined;
|
|
16
|
+
}
|
|
17
|
+
export declare function isCssSourceTraceEnabled(opts: Pick<InternalUserDefinedOptions, 'cssSourceTrace'>): boolean;
|
|
18
|
+
export declare function createCssTokenSourceMap(sourcesByToken: Map<string, Set<string>>, opts: InternalUserDefinedOptions): CssTokenSourceMap;
|
|
19
|
+
export declare function createCssSourceTraceCacheSignature(tokenSources: CssTokenSourceMap | undefined, opts: Pick<InternalUserDefinedOptions, 'cssSourceTrace'>): string;
|
|
20
|
+
export declare function annotateCssSourceTrace(css: string, options: AnnotateCssSourceTraceOptions): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface TailwindDirectiveOptions {
|
|
2
|
+
importFallback?: boolean | undefined;
|
|
3
|
+
}
|
|
4
|
+
export declare function extractTailwindDirectiveLines(rawSource: string, options?: TailwindDirectiveOptions & {
|
|
5
|
+
removeConfig?: boolean;
|
|
6
|
+
}): string[];
|
|
7
|
+
export declare function extractTailwindSourceForPostcssFallback(rawSource: string, options?: TailwindDirectiveOptions & {
|
|
8
|
+
removeConfig?: boolean;
|
|
9
|
+
}): string | undefined;
|
|
10
|
+
export declare function extractConfigRequestFromSource(rawSource: string): string | undefined;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { GeneratorResolvedSource } from './source-resolver';
|
|
3
|
+
import type { createWeappTailwindcssGenerator } from '../../../generator';
|
|
4
|
+
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
|
|
5
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
6
|
+
export declare function finalizeMiniProgramGeneratorCss(css: string, target: string, majorVersion: number | undefined, cssPreflight: InternalUserDefinedOptions['cssPreflight'], options?: {
|
|
7
|
+
injectPreflight?: boolean;
|
|
8
|
+
}): string;
|
|
9
|
+
export declare function shouldInjectMiniProgramPreflightForGeneratorCss(opts: InternalUserDefinedOptions, options: {
|
|
10
|
+
cssHandlerOptions: IStyleHandlerOptions;
|
|
11
|
+
isolateCurrentCssCandidates: boolean;
|
|
12
|
+
localImports?: string | undefined;
|
|
13
|
+
}): boolean;
|
|
14
|
+
export declare function mergeScopedRuntimeWithCurrentRuntime(scopedRuntime: Set<string>, runtime: Set<string>, options: {
|
|
15
|
+
currentCssCandidates?: string[] | undefined;
|
|
16
|
+
cssHandlerOptions: IStyleHandlerOptions;
|
|
17
|
+
isolateCssSource: boolean;
|
|
18
|
+
matchedCssSourceFile: boolean;
|
|
19
|
+
}): Set<string>;
|
|
20
|
+
export declare function shouldIsolateScopedCssSource(source: GeneratorResolvedSource, sourceEntries: TailwindSourceEntry[] | undefined): boolean;
|
|
21
|
+
export declare function shouldIsolateCurrentTailwindV4CssCandidates(majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
|
|
22
|
+
hasGeneratedCss: boolean;
|
|
23
|
+
hasGeneratedMarkers: boolean;
|
|
24
|
+
rawSource: string;
|
|
25
|
+
}): boolean;
|
|
26
|
+
export declare function shouldScanTailwindV4Sources(majorVersion: number | undefined, target: string, generatorRuntime: Set<string>, isolateCssSource: boolean): boolean;
|
|
27
|
+
export declare function shouldAppendWebBundleCssFallback(target: string, options: {
|
|
28
|
+
hasSourceDirectives: boolean;
|
|
29
|
+
hasMatchedCssSourceFile: boolean;
|
|
30
|
+
}): boolean;
|
|
31
|
+
export declare function isEmptyCssSourceOrderParts(parts: {
|
|
32
|
+
before: string;
|
|
33
|
+
after: string;
|
|
34
|
+
}): boolean;
|
|
35
|
+
export declare function resolveGeneratorStyleOptions(opts: InternalUserDefinedOptions, cssHandlerOptions: IStyleHandlerOptions, generatorStyleOptions: Partial<IStyleHandlerOptions> | undefined): Partial<IStyleHandlerOptions>;
|
|
36
|
+
export declare function createCssSourceOrderAppend(base: string, extra: string): string;
|
|
37
|
+
export declare function shouldFinalizeMarkedUserLayerComponentsCss(file: string): boolean;
|
|
38
|
+
export declare function splitRawSourceByGeneratedCssOrder(rawSource: string, rawTailwindCss: string): {
|
|
39
|
+
before: string;
|
|
40
|
+
after: string;
|
|
41
|
+
} | undefined;
|
|
42
|
+
export declare function shouldUseGeneratorForCurrentCss(majorVersion: number | undefined, cssHandlerOptions: IStyleHandlerOptions, options: {
|
|
43
|
+
hasGeneratedCss: boolean;
|
|
44
|
+
hasGeneratedMarkers: boolean;
|
|
45
|
+
hasSourceDirectives: boolean;
|
|
46
|
+
rawSource: string;
|
|
47
|
+
}): boolean | undefined;
|
|
48
|
+
export declare function hasGeneratorSourceDirectives(source: string, importFallback: boolean): boolean;
|
|
49
|
+
export declare function createRuntimeWithCurrentCssCandidates(runtime: Set<string>, currentCssCandidates: string[], isolateCurrentCssCandidates: boolean): Set<string>;
|
|
50
|
+
export declare function mergeGeneratorResults(generatedResults: GeneratorResult[]): (import("@/generator").TailwindV4GenerateResult & {
|
|
51
|
+
target: import("@/generator").WeappTailwindcssGeneratorTarget;
|
|
52
|
+
rawCss: string;
|
|
53
|
+
}) | undefined;
|
|
54
|
+
type GeneratorResult = Awaited<ReturnType<ReturnType<typeof createWeappTailwindcssGenerator>['generate']>>;
|
|
55
|
+
export declare function isSupportedGeneratorMajorVersion(majorVersion: number | undefined): boolean;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function isPureLocalCssImportWrapper(css: string): boolean;
|
|
2
|
+
export declare function cleanLocalCssImportWrapperTailwindDirectives(css: string): string | undefined;
|
|
3
|
+
export declare function splitLocalCssImports(source: string): {
|
|
4
|
+
imports: string;
|
|
5
|
+
source: string;
|
|
6
|
+
} | undefined;
|
|
7
|
+
export declare function restoreLocalCssImports(css: string, imports: string | undefined): string;
|
|
@@ -20,7 +20,7 @@ export type GeneratorResolvedSource = TailwindResolvedSource & {
|
|
|
20
20
|
__weappTailwindcssMeta?: GeneratorSourceMetadata | undefined;
|
|
21
21
|
};
|
|
22
22
|
export declare function resolveCssSourceBase(file: string, cssHandlerOptions: IStyleHandlerOptions): string;
|
|
23
|
-
export declare function resolveGeneratorSource(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<import("
|
|
23
|
+
export declare function resolveGeneratorSource(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<import("@/generator").TailwindV3ResolvedSource | import("tailwindcss-patch").TailwindV4ResolvedSource | undefined>;
|
|
24
24
|
export declare function resolveGeneratorSources(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<TailwindResolvedSource[]>;
|
|
25
25
|
export declare function resolveGeneratorSourceEntries(source: TailwindResolvedSource, runtimeState?: GeneratorSourceRuntimeState): Promise<TailwindSourceEntry[] | undefined>;
|
|
26
26
|
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
|
|
3
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
4
|
+
export interface GenerateCssByGeneratorOptions {
|
|
5
|
+
opts: InternalUserDefinedOptions;
|
|
6
|
+
runtimeState: {
|
|
7
|
+
twPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
8
|
+
readyPromise: Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
runtime: Set<string>;
|
|
11
|
+
rawSource: string;
|
|
12
|
+
file: string;
|
|
13
|
+
cssHandlerOptions: IStyleHandlerOptions;
|
|
14
|
+
cssUserHandlerOptions: IStyleHandlerOptions;
|
|
15
|
+
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
16
|
+
styleHandler: InternalUserDefinedOptions['styleHandler'];
|
|
17
|
+
debug: (format: string, ...args: unknown[]) => void;
|
|
18
|
+
previousCss?: string | undefined;
|
|
19
|
+
deferEmptyScopedCssSource?: boolean | undefined;
|
|
20
|
+
}
|
|
21
|
+
export interface GenerateCssByGeneratorResult {
|
|
22
|
+
css: string;
|
|
23
|
+
target: string;
|
|
24
|
+
source: 'generator';
|
|
25
|
+
dependencies: string[];
|
|
26
|
+
incremental?: boolean | undefined;
|
|
27
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
3
|
+
export declare function removeTailwindV4GeneratorAtRules(source: string): string;
|
|
4
|
+
export declare function stripTailwindSourceMediaFragments(source: string): string;
|
|
5
|
+
export declare function stripUnmatchedTailwindSourceMediaCloseFragments(source: string): string;
|
|
6
|
+
export declare function splitUserCssLayerBlocks(source: string): {
|
|
7
|
+
layer: string;
|
|
8
|
+
rest: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function hasUserCssLayerBlocks(source: string): boolean;
|
|
11
|
+
export declare function extractGeneratedCssForUserLayerSelectors(css: string, userLayerSource: string): {
|
|
12
|
+
layer: string;
|
|
13
|
+
rest: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function filterApplyOnlyGeneratedCss(css: string, source: string): string;
|
|
16
|
+
export declare function shouldFilterApplyOnlyGeneratedCss(majorVersion: number | undefined, target: string, source: string, options: {
|
|
17
|
+
hasGeneratedCss: boolean;
|
|
18
|
+
hasGeneratedMarkers: boolean;
|
|
19
|
+
}): boolean;
|
|
20
|
+
export declare function transformGeneratorUserCss(source: string, options: {
|
|
21
|
+
generatorTarget: string;
|
|
22
|
+
generatorStyleOptions: Partial<IStyleHandlerOptions>;
|
|
23
|
+
cssUserHandlerOptions: IStyleHandlerOptions;
|
|
24
|
+
styleHandler: InternalUserDefinedOptions['styleHandler'];
|
|
25
|
+
importFallback: boolean;
|
|
26
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { GenerateCssByGeneratorOptions } from './types';
|
|
2
|
+
export interface ValidateCandidatesByGeneratorOptions extends Omit<GenerateCssByGeneratorOptions, 'runtime'> {
|
|
3
|
+
candidates: Set<string>;
|
|
4
|
+
}
|
|
5
|
+
export declare function validateCandidatesByGenerator(options: ValidateCandidatesByGeneratorOptions): Promise<Set<string>>;
|
|
@@ -1,38 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { TailwindSourceEntry } from '../../tailwindcss/source-scan';
|
|
3
|
-
import type { InternalUserDefinedOptions } from '../../types';
|
|
1
|
+
import type { GenerateCssByGeneratorOptions, GenerateCssByGeneratorResult } from './generator-css/types';
|
|
4
2
|
export { hasTailwindSourceDirectives, normalizeTailwindSourceForGenerator, removeTailwindSourceDirectives, resolveCssEntrySource, } from './generator-css/directives';
|
|
5
3
|
export { removeTailwindApplyRules, } from './generator-css/legacy-compat';
|
|
6
4
|
export { inheritLegacyUnitConvertedDeclarations, } from './generator-css/legacy-units';
|
|
5
|
+
export { isPureLocalCssImportWrapper, } from './generator-css/local-imports';
|
|
7
6
|
export { createCssAppend, hasTailwindGeneratedCss, hasTailwindGeneratedCssMarkers, removeTailwindGeneratedCssByBanner, splitGeneratorPlaceholderCssBySourceOrder, splitTailwindGeneratedCssByBanner, splitTailwindV4GeneratedCss, splitTailwindV4GeneratedCssBySourceOrder, stripGeneratorPlaceholderMarkers, stripTailwindBanner, stripTailwindBanners, } from './generator-css/markers';
|
|
8
7
|
export { resolveGeneratorSource, } from './generator-css/source-resolver';
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
runtimeState: {
|
|
12
|
-
twPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
13
|
-
readyPromise: Promise<void>;
|
|
14
|
-
};
|
|
15
|
-
runtime: Set<string>;
|
|
16
|
-
rawSource: string;
|
|
17
|
-
file: string;
|
|
18
|
-
cssHandlerOptions: IStyleHandlerOptions;
|
|
19
|
-
cssUserHandlerOptions: IStyleHandlerOptions;
|
|
20
|
-
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
21
|
-
styleHandler: InternalUserDefinedOptions['styleHandler'];
|
|
22
|
-
debug: (format: string, ...args: unknown[]) => void;
|
|
23
|
-
previousCss?: string | undefined;
|
|
24
|
-
deferEmptyScopedCssSource?: boolean | undefined;
|
|
25
|
-
}
|
|
26
|
-
export interface GenerateCssByGeneratorResult {
|
|
27
|
-
css: string;
|
|
28
|
-
target: string;
|
|
29
|
-
source: 'generator';
|
|
30
|
-
dependencies: string[];
|
|
31
|
-
incremental?: boolean | undefined;
|
|
32
|
-
}
|
|
33
|
-
export declare function isPureLocalCssImportWrapper(css: string): boolean;
|
|
8
|
+
export type { GenerateCssByGeneratorOptions, GenerateCssByGeneratorResult, } from './generator-css/types';
|
|
9
|
+
export { validateCandidatesByGenerator, } from './generator-css/validate';
|
|
34
10
|
export declare function generateCssByGenerator(options: GenerateCssByGeneratorOptions): Promise<GenerateCssByGeneratorResult | undefined>;
|
|
35
|
-
export interface ValidateCandidatesByGeneratorOptions extends Omit<GenerateCssByGeneratorOptions, 'runtime'> {
|
|
36
|
-
candidates: Set<string>;
|
|
37
|
-
}
|
|
38
|
-
export declare function validateCandidatesByGenerator(options: ValidateCandidatesByGeneratorOptions): Promise<Set<string>>;
|
|
@@ -20,14 +20,17 @@ interface CssFinalizerContext {
|
|
|
20
20
|
recordCssAssetResult?: (file: string, css: string) => void;
|
|
21
21
|
recordViteProcessedCssAssetResult?: (file: string, css: string, options?: {
|
|
22
22
|
injectIntoMain?: boolean | undefined;
|
|
23
|
+
outputFile?: string | undefined;
|
|
23
24
|
}) => void;
|
|
24
25
|
getViteProcessedCssAssetResults?: () => Iterable<[string, string | {
|
|
25
26
|
css: string;
|
|
26
27
|
injectIntoMain?: boolean | undefined;
|
|
28
|
+
outputFile?: string | undefined;
|
|
27
29
|
}]>;
|
|
28
30
|
getRecordedGeneratorCandidates?: () => Set<string> | undefined;
|
|
29
31
|
getSourceCandidates?: () => Set<string>;
|
|
30
32
|
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
33
|
+
getSourceCandidateSourcesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Map<string, Set<string>>) | undefined;
|
|
31
34
|
waitForSourceCandidateSyncs?: () => Promise<void>;
|
|
32
35
|
rememberMainCssSource?: (file: string, rawSource: string) => void;
|
|
33
36
|
getRememberedMainCssSource?: (file: string) => RememberedMainCssSource | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
2
|
+
export declare const SOURCE_STYLE_OUTPUT_EXT_RE: RegExp;
|
|
3
|
+
export declare const CSS_SOURCE_OUTPUT_EXT_RE: RegExp;
|
|
4
|
+
export declare const MINI_PROGRAM_STYLE_OUTPUT_EXT_RE: RegExp;
|
|
5
|
+
export declare function resolveReplayCssOutputFile(rootDir: string, file: string): string;
|
|
6
|
+
export declare function resolveViteCssOutputFile(file: string, opts: InternalUserDefinedOptions, isWebGeneratorTarget: boolean, preserveCssExtension?: boolean): string;
|
|
7
|
+
export declare function resolveViteCssPipelineOutputFile(file: string, _opts: Pick<InternalUserDefinedOptions, 'cssMatcher'>, rootDir: string, isWebGeneratorTarget?: boolean, preserveCssExtension?: boolean): string;
|
|
8
|
+
export declare function canProcessViteSourceStyleAsCss(source: string, file: string): boolean;
|
|
9
|
+
export declare function normalizeCssSourceForCompare(css: string): string;
|
|
10
|
+
export declare function stripStyleFileExtension(file: string): string;
|
|
11
|
+
export declare function isAppOriginCssFile(file: string): boolean;
|
|
12
|
+
export declare function isMainAppCssFile(file: string): boolean;
|
|
13
|
+
export declare function isMainStyleEntryCssFile(file: string): boolean;
|
|
14
|
+
export declare function isTailwindEntryCssFile(file: string): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { OutputAsset } from 'rollup';
|
|
2
|
+
import type { RememberedCssSource } from './types';
|
|
3
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
4
|
+
export declare function createRememberedCssRuntimeSignature(cssRuntimeSignature: string, cssRuntimeAffectingHash: string): string;
|
|
5
|
+
export declare function resolveRememberedCssSourceForTest(sources: Iterable<[string, RememberedCssSource]> | undefined, outputFile: string, file: string, originalSource: OutputAsset, outputRoot: string, sourceRoot: string | undefined): RememberedCssSource | undefined;
|
|
6
|
+
export declare function findRememberedCssSources(sources: Iterable<[string, RememberedCssSource]> | undefined, outputFile: string, file: string, originalSource: OutputAsset, outputRoot: string, sourceRoot: string | undefined): RememberedCssSource[];
|
|
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): Map<string, {
|
|
9
|
+
key: string;
|
|
10
|
+
remembered: RememberedCssSource;
|
|
11
|
+
}[]>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OutputChunk } from 'rollup';
|
|
2
|
+
import type { BundleSnapshot } from '../bundle-state';
|
|
3
|
+
import type { RememberedCssSource } from './types';
|
|
4
|
+
export declare function extractSfcStyleSources(source: string): string[];
|
|
5
|
+
export declare function hasSfcStyleSources(source: string): boolean;
|
|
6
|
+
export declare function hasTailwindGenerationSource(source: string): boolean;
|
|
7
|
+
export declare function resolveSfcStyleSourceFromOutputFile(outputFile: string, snapshot: BundleSnapshot, outputRoot: string, sourceRoot: string | undefined, getSfcSource: ((file: string) => string | undefined) | undefined, debug: (format: string, ...args: unknown[]) => void): Promise<RememberedCssSource | undefined>;
|
|
8
|
+
export declare function normalizeSfcSourceFileForCompare(file: string): string;
|
|
9
|
+
export declare function collectChunkModuleIds(output: OutputChunk): string[];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function isMatchingCssSourceFile(outputFile: string, cssSourceFile: string, outputRoot: string): boolean;
|
|
2
|
+
export declare function collectStyleFileMatchBases(file: string, roots: Array<string | undefined>): Set<string>;
|
|
3
|
+
export declare function collectParentDirectories(file: string): string[];
|
|
4
|
+
export declare function hasMatchingStyleFileBase(outputFile: string, sourceFile: string, outputRoot: string, sourceRoot: string | undefined): boolean;
|
|
5
|
+
export declare function scoreMatchingStyleFileBase(outputFile: string, sourceFile: string, outputRoot: string, sourceRoot: string | undefined): number;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OutputAsset, OutputChunk } from 'rollup';
|
|
2
|
+
import type { BundleSnapshot } from '../bundle-state';
|
|
3
|
+
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
|
|
4
|
+
export declare function normalizePackageRoot(root: string): string;
|
|
5
|
+
export declare function collectMiniProgramSubpackageRoots(bundle: Record<string, OutputAsset | OutputChunk>): Set<string> | undefined;
|
|
6
|
+
export declare function isSubpackageOutputFile(file: string, subpackageRoots: Set<string>): boolean;
|
|
7
|
+
export declare function collectMiniProgramSubpackageSourceEntries(snapshot: BundleSnapshot, subpackageRoots: Set<string>, sourceBaseRoots: Array<string | undefined>): TailwindSourceEntry[];
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { OutputAsset } from 'rollup';
|
|
2
|
+
import type { ResolvedConfig } from 'vite';
|
|
3
|
+
import type { HmrTimingRecorder } from '../../shared/hmr-timing';
|
|
4
|
+
import type { BundleSnapshot } from '../bundle-state';
|
|
5
|
+
import type { SourceCandidateFilterOptions } from '../source-candidates';
|
|
6
|
+
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
|
|
7
|
+
import type { InternalUserDefinedOptions } from '../../../types';
|
|
8
|
+
export interface GenerateBundleContext {
|
|
9
|
+
opts: InternalUserDefinedOptions;
|
|
10
|
+
runtimeState: {
|
|
11
|
+
twPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
12
|
+
readyPromise: Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
|
|
15
|
+
ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean, options?: {
|
|
16
|
+
allowBaselineOnlyInitialSync?: boolean | undefined;
|
|
17
|
+
baseClassSet?: Set<string> | undefined;
|
|
18
|
+
transformOnly?: boolean | undefined;
|
|
19
|
+
}) => Promise<Set<string>>;
|
|
20
|
+
debug: (format: string, ...args: unknown[]) => void;
|
|
21
|
+
getResolvedConfig: () => ResolvedConfig | undefined;
|
|
22
|
+
markCssAssetProcessed?: (asset: OutputAsset, file?: string) => void;
|
|
23
|
+
isCssAssetProcessed?: (asset: OutputAsset, file?: string) => boolean;
|
|
24
|
+
isViteProcessedCssAsset?: (asset: OutputAsset, file?: string) => boolean;
|
|
25
|
+
recordCssAssetResult?: (file: string, css: string) => void;
|
|
26
|
+
recordViteProcessedCssAssetResult?: (file: string, css: string, options?: {
|
|
27
|
+
injectIntoMain?: boolean | undefined;
|
|
28
|
+
outputFile?: string | undefined;
|
|
29
|
+
}) => void;
|
|
30
|
+
getViteProcessedCssAssetResults?: () => Iterable<[string, string | {
|
|
31
|
+
css: string;
|
|
32
|
+
injectIntoMain?: boolean | undefined;
|
|
33
|
+
outputFile?: string | undefined;
|
|
34
|
+
}]>;
|
|
35
|
+
getViteProcessedCssAssetResult?: (file: string) => {
|
|
36
|
+
css: string;
|
|
37
|
+
injectIntoMain?: boolean | undefined;
|
|
38
|
+
outputFile?: string | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
getSourceCandidates?: () => Set<string>;
|
|
41
|
+
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>) | undefined;
|
|
42
|
+
getSourceCandidateSourcesForEntries?: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined;
|
|
43
|
+
waitForSourceCandidateSyncs?: () => Promise<void>;
|
|
44
|
+
rememberCssSource?: (entry: RememberedCssSource, cssRuntimeSignature?: string) => void;
|
|
45
|
+
refreshRememberedCssSource?: (entry: RememberedCssSource) => Promise<RememberedCssSource | undefined> | RememberedCssSource | undefined;
|
|
46
|
+
getRememberedCssSources?: () => Iterable<[string, RememberedCssSource]>;
|
|
47
|
+
getRememberedCssSignature?: (file: string) => string | undefined;
|
|
48
|
+
setRememberedCssSignature?: (file: string, cssRuntimeSignature: string) => void;
|
|
49
|
+
getKnownSfcSource?: (file: string) => string | undefined;
|
|
50
|
+
recordGeneratorCandidates?: (candidates: Set<string>) => void;
|
|
51
|
+
hmrTimingRecorder?: HmrTimingRecorder;
|
|
52
|
+
}
|
|
53
|
+
export interface RememberedCssSource {
|
|
54
|
+
outputFile: string;
|
|
55
|
+
rawSource: string;
|
|
56
|
+
sourceFile: string;
|
|
57
|
+
}
|
|
58
|
+
export interface GenerateBundleThis {
|
|
59
|
+
addWatchFile?: (id: string) => void;
|
|
60
|
+
emitFile?: (emittedFile: {
|
|
61
|
+
type: 'asset';
|
|
62
|
+
fileName: string;
|
|
63
|
+
source: string;
|
|
64
|
+
}) => string;
|
|
65
|
+
getModuleInfo?: (id: string) => {
|
|
66
|
+
code: string | null;
|
|
67
|
+
} | null;
|
|
68
|
+
}
|
|
@@ -1,64 +1,6 @@
|
|
|
1
1
|
import type { OutputAsset, OutputChunk } from 'rollup';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import type { InternalUserDefinedOptions } from '../../types';
|
|
7
|
-
interface GenerateBundleContext {
|
|
8
|
-
opts: InternalUserDefinedOptions;
|
|
9
|
-
runtimeState: {
|
|
10
|
-
twPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
11
|
-
readyPromise: Promise<void>;
|
|
12
|
-
};
|
|
13
|
-
ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
|
|
14
|
-
ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean, options?: {
|
|
15
|
-
allowBaselineOnlyInitialSync?: boolean | undefined;
|
|
16
|
-
baseClassSet?: Set<string> | undefined;
|
|
17
|
-
transformOnly?: boolean | undefined;
|
|
18
|
-
}) => Promise<Set<string>>;
|
|
19
|
-
debug: (format: string, ...args: unknown[]) => void;
|
|
20
|
-
getResolvedConfig: () => ResolvedConfig | undefined;
|
|
21
|
-
markCssAssetProcessed?: (asset: OutputAsset, file?: string) => void;
|
|
22
|
-
isCssAssetProcessed?: (asset: OutputAsset, file?: string) => boolean;
|
|
23
|
-
isViteProcessedCssAsset?: (asset: OutputAsset, file?: string) => boolean;
|
|
24
|
-
recordCssAssetResult?: (file: string, css: string) => void;
|
|
25
|
-
recordViteProcessedCssAssetResult?: (file: string, css: string, options?: {
|
|
26
|
-
injectIntoMain?: boolean | undefined;
|
|
27
|
-
}) => void;
|
|
28
|
-
getViteProcessedCssAssetResults?: () => Iterable<[string, string | {
|
|
29
|
-
css: string;
|
|
30
|
-
injectIntoMain?: boolean | undefined;
|
|
31
|
-
}]>;
|
|
32
|
-
getViteProcessedCssAssetResult?: (file: string) => {
|
|
33
|
-
css: string;
|
|
34
|
-
injectIntoMain?: boolean | undefined;
|
|
35
|
-
} | undefined;
|
|
36
|
-
getSourceCandidates?: () => Set<string>;
|
|
37
|
-
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
38
|
-
waitForSourceCandidateSyncs?: () => Promise<void>;
|
|
39
|
-
rememberCssSource?: (entry: RememberedCssSource, cssRuntimeSignature?: string) => void;
|
|
40
|
-
refreshRememberedCssSource?: (entry: RememberedCssSource) => Promise<RememberedCssSource | undefined> | RememberedCssSource | undefined;
|
|
41
|
-
getRememberedCssSources?: () => Iterable<[string, RememberedCssSource]>;
|
|
42
|
-
getRememberedCssSignature?: (file: string) => string | undefined;
|
|
43
|
-
setRememberedCssSignature?: (file: string, cssRuntimeSignature: string) => void;
|
|
44
|
-
recordGeneratorCandidates?: (candidates: Set<string>) => void;
|
|
45
|
-
hmrTimingRecorder?: HmrTimingRecorder;
|
|
46
|
-
}
|
|
47
|
-
export interface RememberedCssSource {
|
|
48
|
-
outputFile: string;
|
|
49
|
-
rawSource: string;
|
|
50
|
-
sourceFile: string;
|
|
51
|
-
}
|
|
52
|
-
interface GenerateBundleThis {
|
|
53
|
-
addWatchFile?: (id: string) => void;
|
|
54
|
-
emitFile?: (emittedFile: {
|
|
55
|
-
type: 'asset';
|
|
56
|
-
fileName: string;
|
|
57
|
-
source: string;
|
|
58
|
-
}) => string;
|
|
59
|
-
}
|
|
60
|
-
export declare function resolveReplayCssOutputFile(rootDir: string, file: string): string;
|
|
61
|
-
export declare function resolveViteCssPipelineOutputFile(file: string, _opts: Pick<InternalUserDefinedOptions, 'cssMatcher'>, rootDir: string, isWebGeneratorTarget?: boolean, preserveCssExtension?: boolean): string;
|
|
62
|
-
export declare function resolveRememberedCssSourceForTest(sources: Iterable<[string, RememberedCssSource]> | undefined, outputFile: string, file: string, originalSource: OutputAsset, outputRoot: string, sourceRoot: string | undefined): RememberedCssSource | undefined;
|
|
2
|
+
import type { GenerateBundleContext, GenerateBundleThis } from './generate-bundle/types';
|
|
3
|
+
export { resolveReplayCssOutputFile, resolveViteCssPipelineOutputFile } from './generate-bundle/css-output';
|
|
4
|
+
export { resolveRememberedCssSourceForTest } from './generate-bundle/remembered-css';
|
|
5
|
+
export type { GenerateBundleContext, GenerateBundleThis, RememberedCssSource } from './generate-bundle/types';
|
|
63
6
|
export declare function createGenerateBundleHook(context: GenerateBundleContext): (this: GenerateBundleThis, _opt: unknown, bundle: Record<string, OutputAsset | OutputChunk>) => Promise<void>;
|
|
64
|
-
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BundleSnapshot, BundleStateEntry } from '../bundle-state';
|
|
2
|
+
export declare function createRuntimeEntries(snapshot: BundleSnapshot): BundleStateEntry[];
|
|
3
|
+
export declare function collectChangedRuntimeFiles(snapshot: BundleSnapshot): Set<string>;
|
|
4
|
+
export declare function resolveEntryExtension(entry: BundleStateEntry): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type ExtractRawCandidateResult = Array<{
|
|
2
|
+
rawCandidate?: string | undefined;
|
|
3
|
+
start?: number | undefined;
|
|
4
|
+
} | null | undefined>;
|
|
5
|
+
export declare function createHighConfidenceLiteralRanges(source: string, matches: ExtractRawCandidateResult): {
|
|
6
|
+
start: number;
|
|
7
|
+
end: number;
|
|
8
|
+
}[];
|
|
9
|
+
export declare function isRawCandidateAllowedForV3(source: string, candidate: string, start: number | undefined, extension: string, knownSourceCandidates?: Set<string>, highConfidenceLiteralRanges?: Array<{
|
|
10
|
+
start: number;
|
|
11
|
+
end: number;
|
|
12
|
+
}>): boolean;
|
|
13
|
+
export {};
|
|
@@ -22,6 +22,7 @@ export interface BundleRuntimeClassSetSyncOptions {
|
|
|
22
22
|
}
|
|
23
23
|
interface CreateBundleRuntimeClassSetManagerOptions {
|
|
24
24
|
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
25
|
+
escapeMap?: Record<string, string> | undefined;
|
|
25
26
|
extractCandidates?: ExtractValidCandidatesFn;
|
|
26
27
|
extractRawCandidates?: ExtractRawCandidatesFn;
|
|
27
28
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function mergeMiniProgramPreflightRuleDeclarations(baseCss: string, css: string): {
|
|
2
|
+
baseCss: string;
|
|
3
|
+
css: string;
|
|
4
|
+
changed: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function mergeMiniProgramThemeScopeRuleDeclarations(baseCss: string, css: string): {
|
|
7
|
+
baseCss: string;
|
|
8
|
+
css: string;
|
|
9
|
+
changed: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function mergeCoveredCssRuleDeclarations(baseCss: string, css: string): {
|
|
12
|
+
baseCss: string;
|
|
13
|
+
css: string;
|
|
14
|
+
changed: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare function filterExistingCssRules(baseCss: string, css: string): string;
|
|
17
|
+
export declare function containsCssAfterMinify(baseCss: string, css: string): boolean;
|
|
@@ -8,6 +8,7 @@ interface CssAssetProcessedMarker {
|
|
|
8
8
|
}
|
|
9
9
|
interface CssAssetResultRecordOptions {
|
|
10
10
|
injectIntoMain?: boolean | undefined;
|
|
11
|
+
outputFile?: string | undefined;
|
|
11
12
|
}
|
|
12
13
|
interface CssAssetResultRecorder {
|
|
13
14
|
(file: string, css: string, options?: CssAssetResultRecordOptions): void;
|
|
@@ -16,6 +17,7 @@ interface CssAssetResultsGetter {
|
|
|
16
17
|
(): Iterable<[string, string | {
|
|
17
18
|
css: string;
|
|
18
19
|
injectIntoMain?: boolean | undefined;
|
|
20
|
+
outputFile?: string | undefined;
|
|
19
21
|
}]>;
|
|
20
22
|
}
|
|
21
23
|
interface CollectViteProcessedCssAssetOptions {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
|
|
2
|
+
interface ResolveSourceCandidateScanFilesOptions {
|
|
3
|
+
entries?: TailwindSourceEntry[] | undefined;
|
|
4
|
+
explicit?: boolean | undefined;
|
|
5
|
+
filter: (id: string) => boolean;
|
|
6
|
+
outDir?: string | undefined;
|
|
7
|
+
root: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function resolveSourceCandidateScanFiles(options: ResolveSourceCandidateScanFilesOptions): Promise<string[]>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IArbitraryValues } from '../../../types/shared';
|
|
2
|
+
interface ScriptCandidateExtractionOptions {
|
|
3
|
+
bareArbitraryValues?: IArbitraryValues['bareArbitraryValues'] | undefined;
|
|
4
|
+
extractor?: ((source: string, extension: string) => Promise<Iterable<string>> | Iterable<string>) | undefined;
|
|
5
|
+
}
|
|
6
|
+
export declare function extractScriptStringCandidates(source: string, extension: string, options: ScriptCandidateExtractionOptions): Promise<never[] | Set<string>>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createTailwindV3DefaultExtractor(): ((source: string) => Set<string>) | undefined;
|