weapp-tailwindcss 5.0.0-next.11 → 5.0.0-next.13
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-BRkhpjio.js → bundle-state-Bz8vLnCf.js} +3 -2
- package/dist/{bundle-state-BrtFgX-A.mjs → bundle-state-CP2XS3Uj.mjs} +3 -2
- package/dist/bundlers/shared/css-cleanup.d.ts +6 -1
- package/dist/bundlers/shared/generator-css/source-files.d.ts +9 -6
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +16 -2
- package/dist/bundlers/shared/generator-css.d.ts +4 -0
- package/dist/bundlers/shared/hmr-timing.d.ts +18 -1
- package/dist/bundlers/vite/bundle-state.d.ts +1 -0
- package/dist/bundlers/vite/css-finalizer.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/css-handler-options.d.ts +5 -1
- package/dist/bundlers/vite/generate-bundle/css-share-scope.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle.d.ts +8 -1
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +1 -0
- package/dist/bundlers/vite/runtime-class-set.d.ts +4 -1
- package/dist/bundlers/vite/source-candidates.d.ts +11 -0
- package/dist/bundlers/vite/source-scan.d.ts +18 -1
- package/dist/bundlers/vite/static-config-content.d.ts +5 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +5 -0
- package/dist/cli.js +453 -9
- package/dist/cli.mjs +451 -8
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- 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.js +1 -1
- package/dist/defaults.mjs +1 -1
- package/dist/generator-C9H44wEF.mjs +32 -0
- package/dist/generator-CRORPkpW.js +55 -0
- package/dist/generator.js +12 -11
- package/dist/generator.mjs +2 -1
- package/dist/gulp.js +49 -13
- package/dist/gulp.mjs +46 -10
- package/dist/{incremental-runtime-class-set-CBMefNHQ.js → incremental-runtime-class-set-DN9KKjSi.js} +512 -103
- package/dist/{incremental-runtime-class-set-DaS2yw5c.mjs → incremental-runtime-class-set-Dbn4yPfZ.mjs} +491 -88
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{postcss-BdcRlSpp.js → postcss-Ab7YzAbs.js} +30 -19
- package/dist/{postcss-Bs-RbNzK.js → postcss-CZE8k8oP.js} +59 -53
- package/dist/{postcss-xZDiTRII.mjs → postcss-CtlrNknb.mjs} +19 -8
- package/dist/postcss.js +1 -1
- package/dist/postcss.mjs +1 -1
- package/dist/{precheck-D5eEdqeH.js → precheck-CRX-pMKJ.js} +37 -17
- package/dist/{precheck-DtBGFS-n.mjs → precheck-SG48aLG2.mjs} +29 -9
- package/dist/presets.js +6 -6
- package/dist/presets.mjs +4 -4
- package/dist/source-candidates-C4YgmZ8A.js +274 -0
- package/dist/source-candidates-CyupdLKi.mjs +259 -0
- package/dist/tailwindcss/runtime/cache.d.ts +1 -0
- package/dist/tailwindcss/v3-engine/types.d.ts +3 -0
- package/dist/tailwindcss/v4-engine/types.d.ts +8 -0
- package/dist/{tailwindcss-DGM8lHUj.mjs → tailwindcss-BbTVeQkG.mjs} +9 -4
- package/dist/{tailwindcss-B78nj6n7.js → tailwindcss-DZ6jVYb4.js} +21 -16
- package/dist/v3-engine-D61eilBl.mjs +3208 -0
- package/dist/v3-engine-DwV1E6rX.js +3461 -0
- package/dist/{vite-C8S1wfyQ.mjs → vite-Ti_qSctn.mjs} +380 -542
- package/dist/{vite-BEj9JOOA.js → vite-xKS6RvLR.js} +385 -550
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +29 -9
- package/dist/weapp-tw-runtime-classset-loader.js +1 -1
- package/dist/{webpack-ZGIKKpFf.mjs → webpack-DvptFz7B.mjs} +36 -19
- package/dist/{webpack-Dm1IXTIh.js → webpack-wfNutjMm.js} +40 -23
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +3 -3
- package/dist/cache-B_9E7FxF.js +0 -517
- package/dist/cache-DEDxBMIw.mjs +0 -443
- package/dist/generator-CahkD2vq.mjs +0 -1469
- package/dist/generator-Ck1Dd1V0.js +0 -1568
- package/dist/runtime-patch-CqB-A4zA.js +0 -85
- package/dist/runtime-patch-DGKsVkiG.mjs +0 -71
- package/dist/source-scan-CIVTa3Cj.js +0 -297
- package/dist/source-scan-CJ0y0XBj.mjs +0 -258
- /package/dist/{constants-BeeyfJ9k.js → constants-BoB_6lFw.js} +0 -0
- /package/dist/{constants-BG12WAKw.mjs → constants-E_loJC49.mjs} +0 -0
- /package/dist/{logger-EVNB9z7i.js → logger-BRy6XPQ2.js} +0 -0
- /package/dist/{logger-CZUxvJJD.mjs → logger-Bub1jggA.mjs} +0 -0
- /package/dist/{utils-CGBVVNm6.mjs → utils-CycMvPn_.mjs} +0 -0
- /package/dist/{utils-4ODFyoqD.js → utils-D0MZP_tr.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-8l464Juk.js");
|
|
2
|
-
const require_precheck = require("./precheck-
|
|
2
|
+
const require_precheck = require("./precheck-CRX-pMKJ.js");
|
|
3
3
|
let node_module = require("node:module");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -243,7 +243,8 @@ function createBundleBuildState() {
|
|
|
243
243
|
runtimeAffectingSignatureByFile: /* @__PURE__ */ new Map(),
|
|
244
244
|
runtimeAffectingHashByFile: /* @__PURE__ */ new Map(),
|
|
245
245
|
linkedByEntry: /* @__PURE__ */ new Map(),
|
|
246
|
-
dependentsByLinkedFile: /* @__PURE__ */ new Map()
|
|
246
|
+
dependentsByLinkedFile: /* @__PURE__ */ new Map(),
|
|
247
|
+
generatorCandidateSignature: void 0
|
|
247
248
|
};
|
|
248
249
|
}
|
|
249
250
|
function createChangedByType() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as traverse, u as babelParse } from "./precheck-
|
|
1
|
+
import { d as traverse, u as babelParse } from "./precheck-SG48aLG2.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { Buffer } from "node:buffer";
|
|
@@ -241,7 +241,8 @@ function createBundleBuildState() {
|
|
|
241
241
|
runtimeAffectingSignatureByFile: /* @__PURE__ */ new Map(),
|
|
242
242
|
runtimeAffectingHashByFile: /* @__PURE__ */ new Map(),
|
|
243
243
|
linkedByEntry: /* @__PURE__ */ new Map(),
|
|
244
|
-
dependentsByLinkedFile: /* @__PURE__ */ new Map()
|
|
244
|
+
dependentsByLinkedFile: /* @__PURE__ */ new Map(),
|
|
245
|
+
generatorCandidateSignature: void 0
|
|
245
246
|
};
|
|
246
247
|
}
|
|
247
248
|
function createChangedByType() {
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import type { CssPreflightOptions } from '../../types';
|
|
1
2
|
export { removeUnsupportedAtSupports, removeUnsupportedMiniProgramAtRules } from './css-cleanup/at-rules';
|
|
3
|
+
interface FinalizeMiniProgramCssOptions {
|
|
4
|
+
cssPreflight?: CssPreflightOptions | undefined;
|
|
5
|
+
preservePseudoContentInit?: boolean;
|
|
6
|
+
}
|
|
2
7
|
export declare function hoistTailwindPreflightBase(css: string): string;
|
|
3
|
-
export declare function finalizeMiniProgramCss(css: string): string;
|
|
8
|
+
export declare function finalizeMiniProgramCss(css: string, options?: FinalizeMiniProgramCssOptions): string;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
export interface SourceSideCssEntrySource {
|
|
2
|
+
css: string;
|
|
3
|
+
config?: string | undefined;
|
|
4
|
+
configRequest?: string | undefined;
|
|
5
|
+
base: string;
|
|
6
|
+
file: string;
|
|
7
|
+
}
|
|
1
8
|
export declare function resolveSourceSideCssEntrySource(file: string, sourceOptions: {
|
|
2
9
|
projectRoot?: string;
|
|
3
10
|
cwd?: string;
|
|
11
|
+
outputRoot?: string;
|
|
4
12
|
}, resolveOptions?: {
|
|
5
13
|
removeConfig?: boolean;
|
|
6
|
-
}):
|
|
7
|
-
css: string;
|
|
8
|
-
config: string | undefined;
|
|
9
|
-
configRequest: string | undefined;
|
|
10
|
-
base: string;
|
|
11
|
-
} | undefined;
|
|
14
|
+
}): SourceSideCssEntrySource | undefined;
|
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
2
|
import type { NormalizedWeappTailwindcssGeneratorOptions, TailwindResolvedSource } from '../../../generator';
|
|
3
|
+
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan';
|
|
3
4
|
import type { InternalUserDefinedOptions } from '../../../types';
|
|
4
5
|
interface GeneratorSourceRuntimeState {
|
|
5
6
|
twPatcher: InternalUserDefinedOptions['twPatcher'];
|
|
6
7
|
}
|
|
8
|
+
interface GeneratorSourceSelectionOptions {
|
|
9
|
+
runtime?: Set<string> | undefined;
|
|
10
|
+
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface GeneratorSourceMetadata {
|
|
13
|
+
matchedCssSourceFile?: string | undefined;
|
|
14
|
+
sourceBase?: string | undefined;
|
|
15
|
+
sourceCss?: string | undefined;
|
|
16
|
+
}
|
|
17
|
+
export type GeneratorResolvedSource = TailwindResolvedSource & {
|
|
18
|
+
__weappTailwindcssMeta?: GeneratorSourceMetadata | undefined;
|
|
19
|
+
};
|
|
7
20
|
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("
|
|
9
|
-
export declare function resolveGeneratorSources(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions): Promise<TailwindResolvedSource[]>;
|
|
21
|
+
export declare function resolveGeneratorSource(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<import("tailwindcss-patch").TailwindV4ResolvedSource | import("@/generator").TailwindV3ResolvedSource | undefined>;
|
|
22
|
+
export declare function resolveGeneratorSources(majorVersion: number | undefined, runtimeState: GeneratorSourceRuntimeState, rawSource: string, file: string, cssHandlerOptions: IStyleHandlerOptions, generatorOptions?: NormalizedWeappTailwindcssGeneratorOptions, selectionOptions?: GeneratorSourceSelectionOptions): Promise<TailwindResolvedSource[]>;
|
|
23
|
+
export declare function resolveGeneratorSourceEntries(source: TailwindResolvedSource, runtimeState?: GeneratorSourceRuntimeState): Promise<TailwindSourceEntry[] | undefined>;
|
|
10
24
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { TailwindSourceEntry } from '../../tailwindcss/source-scan';
|
|
2
3
|
import type { InternalUserDefinedOptions } from '../../types';
|
|
3
4
|
export { hasTailwindSourceDirectives, normalizeTailwindSourceForGenerator, removeTailwindSourceDirectives, resolveCssEntrySource, } from './generator-css/directives';
|
|
4
5
|
export { removeTailwindApplyRules, } from './generator-css/legacy-compat';
|
|
@@ -16,14 +17,17 @@ export interface GenerateCssByGeneratorOptions {
|
|
|
16
17
|
file: string;
|
|
17
18
|
cssHandlerOptions: IStyleHandlerOptions;
|
|
18
19
|
cssUserHandlerOptions: IStyleHandlerOptions;
|
|
20
|
+
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
19
21
|
styleHandler: InternalUserDefinedOptions['styleHandler'];
|
|
20
22
|
debug: (format: string, ...args: unknown[]) => void;
|
|
23
|
+
previousCss?: string | undefined;
|
|
21
24
|
}
|
|
22
25
|
export interface GenerateCssByGeneratorResult {
|
|
23
26
|
css: string;
|
|
24
27
|
target: string;
|
|
25
28
|
source: 'generator';
|
|
26
29
|
dependencies: string[];
|
|
30
|
+
incremental?: boolean | undefined;
|
|
27
31
|
}
|
|
28
32
|
export declare function isPureLocalCssImportWrapper(css: string): boolean;
|
|
29
33
|
export declare function generateCssByGenerator(options: GenerateCssByGeneratorOptions): Promise<GenerateCssByGeneratorResult | undefined>;
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
export interface HmrTimingDetails {
|
|
2
|
+
emit?: boolean;
|
|
2
3
|
file?: string;
|
|
4
|
+
hooks?: Record<string, HmrTimingHookSummary>;
|
|
5
|
+
metric?: 'hook' | 'total';
|
|
6
|
+
wallMs?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface HmrTimingHookSummary {
|
|
9
|
+
count: number;
|
|
10
|
+
durationMs: number;
|
|
11
|
+
maxMs: number;
|
|
12
|
+
}
|
|
13
|
+
type HmrTimingBundler = 'vite' | 'webpack' | 'gulp';
|
|
14
|
+
export interface HmrTimingRecorder {
|
|
15
|
+
emitTotal: (phase?: string) => void;
|
|
16
|
+
measure: <T>(phase: string, task: () => T | Promise<T>, details?: HmrTimingDetails) => Promise<T>;
|
|
17
|
+
record: (phase: string, durationMs: number, details?: HmrTimingDetails) => void;
|
|
3
18
|
}
|
|
4
19
|
export declare function shouldEmitHmrTiming(): boolean;
|
|
5
|
-
export declare function emitHmrTiming(bundler:
|
|
20
|
+
export declare function emitHmrTiming(bundler: HmrTimingBundler, phase: string, durationMs: number, details?: HmrTimingDetails): void;
|
|
21
|
+
export declare function createHmrTimingRecorder(bundler: HmrTimingBundler): HmrTimingRecorder;
|
|
22
|
+
export {};
|
|
@@ -31,6 +31,7 @@ export interface BundleBuildState {
|
|
|
31
31
|
runtimeAffectingHashByFile: Map<string, string>;
|
|
32
32
|
linkedByEntry: Map<string, Set<string>>;
|
|
33
33
|
dependentsByLinkedFile: Map<string, Set<string>>;
|
|
34
|
+
generatorCandidateSignature?: string | undefined;
|
|
34
35
|
}
|
|
35
36
|
interface UpdateBundleBuildStateOptions {
|
|
36
37
|
incremental?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { OutputAsset } from 'rollup';
|
|
2
2
|
import type { Plugin, ResolvedConfig } from 'vite';
|
|
3
|
+
import type { TailwindSourceEntry } from '../../tailwindcss/source-scan';
|
|
3
4
|
import type { InternalUserDefinedOptions } from '../../types';
|
|
4
5
|
interface CssFinalizerContext {
|
|
5
6
|
opts: InternalUserDefinedOptions;
|
|
@@ -15,6 +16,7 @@ interface CssFinalizerContext {
|
|
|
15
16
|
recordCssAssetResult?: (file: string, css: string) => void;
|
|
16
17
|
getRecordedGeneratorCandidates?: () => Set<string> | undefined;
|
|
17
18
|
getSourceCandidates?: () => Set<string>;
|
|
19
|
+
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
18
20
|
waitForSourceCandidateSyncs?: () => Promise<void>;
|
|
19
21
|
rememberMainCssSource?: (file: string, rawSource: string) => void;
|
|
20
22
|
}
|
|
@@ -6,11 +6,15 @@ type CssHandlerOptions = IStyleHandlerOptions & {
|
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
8
|
majorVersion: number | undefined;
|
|
9
|
+
sourceOptions?: {
|
|
10
|
+
outputRoot?: string | undefined;
|
|
11
|
+
} | undefined;
|
|
9
12
|
};
|
|
10
13
|
interface CssHandlerOptionsCacheOptions {
|
|
11
|
-
|
|
14
|
+
getAppType: () => InternalUserDefinedOptions['appType'];
|
|
12
15
|
mainCssChunkMatcher: InternalUserDefinedOptions['mainCssChunkMatcher'];
|
|
13
16
|
getMajorVersion: () => number | undefined;
|
|
17
|
+
getOutputRoot?: (() => string | undefined) | undefined;
|
|
14
18
|
}
|
|
15
19
|
export interface CssHandlerOptionsCache {
|
|
16
20
|
getCssHandlerOptions: (file: string) => CssHandlerOptions;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { InternalUserDefinedOptions } from '../../../types';
|
|
2
|
+
export declare function createCssTransformShareScope(file: string, rawSource: string): string;
|
|
2
3
|
export declare function createCssTransformShareScopeKey(opts: InternalUserDefinedOptions, file: string, rawSource: string): string;
|
|
3
4
|
export declare function createCssRuntimeSignature(runtimeSignature: string, generatorCandidateSignature: string): string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { OutputAsset, OutputChunk } from 'rollup';
|
|
2
2
|
import type { ResolvedConfig } from 'vite';
|
|
3
|
+
import type { HmrTimingRecorder } from '../shared/hmr-timing';
|
|
3
4
|
import type { BundleSnapshot } from './bundle-state';
|
|
5
|
+
import type { TailwindSourceEntry } from '../../tailwindcss/source-scan';
|
|
4
6
|
import type { InternalUserDefinedOptions } from '../../types';
|
|
5
7
|
interface GenerateBundleContext {
|
|
6
8
|
opts: InternalUserDefinedOptions;
|
|
@@ -9,18 +11,23 @@ interface GenerateBundleContext {
|
|
|
9
11
|
readyPromise: Promise<void>;
|
|
10
12
|
};
|
|
11
13
|
ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
|
|
12
|
-
ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean
|
|
14
|
+
ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean, options?: {
|
|
15
|
+
allowBaselineOnlyInitialSync?: boolean | undefined;
|
|
16
|
+
baseClassSet?: Set<string> | undefined;
|
|
17
|
+
}) => Promise<Set<string>>;
|
|
13
18
|
debug: (format: string, ...args: unknown[]) => void;
|
|
14
19
|
getResolvedConfig: () => ResolvedConfig | undefined;
|
|
15
20
|
markCssAssetProcessed?: (asset: OutputAsset, file?: string) => void;
|
|
16
21
|
recordCssAssetResult?: (file: string, css: string) => void;
|
|
17
22
|
getSourceCandidates?: () => Set<string>;
|
|
23
|
+
getSourceCandidatesForEntries?: ((entries: TailwindSourceEntry[] | undefined) => Set<string>) | undefined;
|
|
18
24
|
waitForSourceCandidateSyncs?: () => Promise<void>;
|
|
19
25
|
rememberMainCssSource?: (file: string, rawSource: string, cssRuntimeSignature: string) => void;
|
|
20
26
|
getRememberedMainCssSources?: () => Map<string, string>;
|
|
21
27
|
getRememberedMainCssSignature?: (file: string) => string | undefined;
|
|
22
28
|
setRememberedMainCssSignature?: (file: string, cssRuntimeSignature: string) => void;
|
|
23
29
|
recordGeneratorCandidates?: (candidates: Set<string>) => void;
|
|
30
|
+
hmrTimingRecorder?: HmrTimingRecorder;
|
|
24
31
|
}
|
|
25
32
|
interface GenerateBundleThis {
|
|
26
33
|
addWatchFile?: (id: string) => void;
|
|
@@ -15,6 +15,7 @@ export interface BundleRuntimeClassSetManager {
|
|
|
15
15
|
}
|
|
16
16
|
export interface BundleRuntimeClassSetSyncOptions {
|
|
17
17
|
baseClassSet?: Set<string> | undefined;
|
|
18
|
+
skipInitialFullScanWithBase?: boolean | undefined;
|
|
18
19
|
}
|
|
19
20
|
interface CreateBundleRuntimeClassSetManagerOptions {
|
|
20
21
|
extractCandidates?: ExtractValidCandidatesFn;
|
|
@@ -17,6 +17,9 @@ export declare function createViteRuntimeClassSet(options: CreateViteRuntimeClas
|
|
|
17
17
|
};
|
|
18
18
|
refreshRuntimeState: (force: boolean) => Promise<void>;
|
|
19
19
|
ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
|
|
20
|
-
ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean
|
|
20
|
+
ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean, options?: {
|
|
21
|
+
allowBaselineOnlyInitialSync?: boolean | undefined;
|
|
22
|
+
baseClassSet?: Set<string> | undefined;
|
|
23
|
+
}) => Promise<Set<string>>;
|
|
21
24
|
};
|
|
22
25
|
export {};
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan';
|
|
2
2
|
export interface SourceCandidateCollector {
|
|
3
3
|
sync: (id: string, source: string) => Promise<void>;
|
|
4
|
+
merge: (id: string, source: string) => Promise<void>;
|
|
4
5
|
syncFile: (id: string) => Promise<void>;
|
|
5
6
|
scanRoot: (options: ScanSourceCandidateRootOptions) => Promise<void>;
|
|
6
7
|
syncInline: (inlineCandidates: TailwindInlineSourceCandidates | undefined) => void;
|
|
7
8
|
remove: (id: string) => void;
|
|
8
9
|
values: () => Set<string>;
|
|
10
|
+
valuesForEntries: (entries: TailwindSourceEntry[] | undefined) => Set<string>;
|
|
11
|
+
snapshot: () => SourceCandidateCollectorSnapshot;
|
|
12
|
+
restore: (snapshot: SourceCandidateCollectorSnapshot) => void;
|
|
9
13
|
clear: () => void;
|
|
10
14
|
}
|
|
15
|
+
export interface SourceCandidateCollectorSnapshot {
|
|
16
|
+
candidatesById: Array<[string, string[]]>;
|
|
17
|
+
scanCandidatesById?: Array<[string, string[]]> | undefined;
|
|
18
|
+
transformCandidatesById?: Array<[string, string[]]> | undefined;
|
|
19
|
+
inlineExcludedCandidates: string[];
|
|
20
|
+
inlineIncludedCandidates: string[];
|
|
21
|
+
}
|
|
11
22
|
interface ScanSourceCandidateRootOptions {
|
|
12
23
|
root: string;
|
|
13
24
|
outDir?: string | undefined;
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan';
|
|
2
2
|
import type { TailwindcssPatcherLike, UserDefinedOptions } from '../../types';
|
|
3
|
+
export interface ResolvedTailwindV4CssEntries {
|
|
4
|
+
entries: TailwindSourceEntry[];
|
|
5
|
+
explicit: boolean;
|
|
6
|
+
inlineCandidates: TailwindInlineSourceCandidates;
|
|
7
|
+
dependencies: string[];
|
|
8
|
+
}
|
|
3
9
|
export interface ResolvedViteSourceScan {
|
|
10
|
+
dependencies?: string[] | undefined;
|
|
4
11
|
entries?: TailwindSourceEntry[] | undefined;
|
|
12
|
+
explicit?: boolean | undefined;
|
|
5
13
|
inlineCandidates?: TailwindInlineSourceCandidates | undefined;
|
|
6
14
|
}
|
|
15
|
+
interface ResolveViteSourceScanOptions {
|
|
16
|
+
root?: string | undefined;
|
|
17
|
+
outDir?: string | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare function mergeTailwindInlineSourceCandidates(allInlineCandidates: Array<TailwindInlineSourceCandidates | undefined>): TailwindInlineSourceCandidates | undefined;
|
|
20
|
+
export declare function resolveTailwindV4EntriesFromCss(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
|
|
7
21
|
export declare function resolveViteTailwindV4CssDependencies(css: string, base: string): Promise<string[]>;
|
|
8
|
-
export declare function
|
|
22
|
+
export declare function resolveTailwindV4EntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
|
|
23
|
+
export declare function discoverTailwindV4CssEntries(root: string, outDir: string | undefined): Promise<string[]>;
|
|
24
|
+
export declare function resolveViteSourceScanEntries(options: UserDefinedOptions, patcher: TailwindcssPatcherLike, scanOptions?: ResolveViteSourceScanOptions): Promise<ResolvedViteSourceScan | undefined>;
|
|
9
25
|
export declare function createViteSourceScanMatcher(entries: TailwindSourceEntry[] | undefined): ((file: string) => boolean) | undefined;
|
|
26
|
+
export {};
|
|
@@ -15,7 +15,12 @@ interface WebpackWatchChangeLike {
|
|
|
15
15
|
modifiedFiles?: Set<string>;
|
|
16
16
|
removedFiles?: Set<string>;
|
|
17
17
|
}
|
|
18
|
+
interface RuntimeWatchDependenciesLike {
|
|
19
|
+
files?: Iterable<string>;
|
|
20
|
+
contexts?: Iterable<string>;
|
|
21
|
+
}
|
|
18
22
|
export declare function createAssetHashByChunkMap(chunks: Iterable<ChunkLike>): Map<string, string>;
|
|
19
23
|
export declare function createRuntimeAwareCssHash(assetHash: string | undefined, sourceHash: string, runtimeSetHash: string): string;
|
|
20
24
|
export declare function hasWatchChanges(compiler: WebpackWatchChangeLike): boolean;
|
|
25
|
+
export declare function isWatchFileInRuntimeDependencies(file: string, dependencies: RuntimeWatchDependenciesLike): boolean;
|
|
21
26
|
export {};
|