weapp-tailwindcss 5.5.8 → 5.5.10
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/vite/css-calc-stage.d.ts +8 -0
- package/dist/bundlers/vite/css-finalizer/css-calc.d.ts +1 -0
- package/dist/bundlers/vite/css-finalizer/css-scope-graph.d.ts +5 -0
- package/dist/bundlers/vite/css-finalizer/final-assets.d.ts +1 -1
- package/dist/bundlers/vite/css-finalizer/options.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/css-cache-task.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/css-output-helpers.d.ts +2 -0
- package/dist/bundlers/vite/generate-bundle/css-transform-result.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/remembered-css-replay.d.ts +3 -3
- package/dist/bundlers/vite/generate-bundle/scoped-generator-runtime-cache.d.ts +5 -0
- package/dist/bundlers/vite/generate-bundle/scoped-generator-sources.d.ts +36 -0
- package/dist/bundlers/vite/generate-bundle/scoped-generator.d.ts +6 -1
- package/dist/bundlers/vite/generate-bundle/source-candidate-scope.d.ts +2 -2
- package/dist/bundlers/vite/generate-bundle/source-trace.d.ts +2 -0
- package/dist/bundlers/vite/runtime-class-set/cache.d.ts +14 -0
- package/dist/bundlers/vite/runtime-class-set/invalidation-plugin.d.ts +6 -0
- package/dist/bundlers/vite/runtime-class-set/lifecycle.d.ts +12 -0
- package/dist/bundlers/vite/runtime-class-set.d.ts +1 -0
- package/dist/bundlers/vite/shared/create-framework-plugins-runtime.d.ts +1 -2
- package/dist/bundlers/vite/shared/framework-source-scan-session.d.ts +1 -0
- package/dist/{compiler-DbwS3329.cjs → compiler-TvqqdOMD.cjs} +50 -38
- package/dist/{compiler-CThodfGH.js → compiler-v9sYta8W.js} +35 -30
- package/dist/core/compiler/generation-cache.d.ts +4 -2
- package/dist/core/compiler/root-store.d.ts +1 -1
- package/dist/core/compiler/source.d.ts +7 -0
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{scoped-generator-DlQrVbuC.js → css-cleanup-B3xP5Qph.js} +26 -23
- package/dist/{generated-css-marker-B0RyziOH.cjs → generated-css-marker-nqjR6ntO.cjs} +102 -26
- package/dist/generation/pipeline/style-context.d.ts +3 -0
- package/dist/{generator-CxauQbx3.cjs → generator-B1sYQpWu.cjs} +165 -90
- package/dist/{generator-oKZ5mCJ5.js → generator-LqofzXgr.js} +155 -92
- package/dist/generator.cjs +1 -1
- package/dist/generator.js +1 -1
- package/dist/{gulp-DhddVxGA.js → gulp-BCV0gOMb.js} +4 -4
- package/dist/{gulp-CngHA9cU.cjs → gulp-DrX6QS3N.cjs} +5 -5
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-Dc4c1VRg.cjs → hmr-timing-B56wp7y-.cjs} +4 -4
- package/dist/{hmr-timing-xPpat-km.js → hmr-timing-Bb54exB0.js} +102 -26
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/{pipeline-helpers-EUud9R2K.cjs → pipeline-helpers-DJ3VZ01J.cjs} +3 -3
- package/dist/postcss.cjs +1 -1
- package/dist/postcss.js +1 -1
- package/dist/presets.cjs +2 -2
- package/dist/presets.js +2 -2
- package/dist/project-sources/candidates/view-memo.d.ts +7 -0
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +2 -2
- package/dist/{scoped-generator-lbTwL6mD.cjs → scoped-generator-DqNb8nJG.cjs} +31 -24
- package/dist/{source-candidate-scan-signature-BjVQYL-C.js → source-candidate-scan-signature-BWLf4tuO.js} +2 -2
- package/dist/{source-candidate-scan-signature-nG-rg809.cjs → source-candidate-scan-signature-_ohG0ePd.cjs} +2 -2
- package/dist/tailwindcss/v4/rpx-theme-warning.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/raw-generation.d.ts +30 -0
- package/dist/tailwindcss/v4-engine/generator/style-context.d.ts +3 -0
- package/dist/tailwindcss/v4-engine/types.d.ts +2 -0
- package/dist/{tailwindcss-kSd0ykiX.js → tailwindcss-XNfJSlhp.js} +2 -2
- package/dist/{tailwindcss-U3KIUegn.cjs → tailwindcss-uf04Iolj.cjs} +2 -2
- package/dist/{transform-DVg4q8hh.cjs → transform-CxVM0PfA.cjs} +3 -3
- package/dist/{transform-BAon9ykq.js → transform-D0NXKPmD.js} +3 -3
- package/dist/utils/stable-serialize.d.ts +1 -0
- package/dist/vite/web.cjs +1 -1
- package/dist/vite/web.js +1 -1
- package/dist/{vite-IX83wh_L.cjs → vite-C3Zh6iYK.cjs} +434 -209
- package/dist/{vite-D-RGkmOE.js → vite-D6_FxvdM.js} +434 -209
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/weapp-tw-css-generation-loader.cjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +5 -5
- package/dist/{web-DHfZ_KC9.cjs → web-BzeWG_XO.cjs} +442 -155
- package/dist/{web--kA4HUTm.js → web-K3qAX4sN.js} +431 -156
- package/dist/{webpack-Bhkd27Rs.js → webpack-BZBqKB4Y.js} +6 -6
- package/dist/{webpack-BetjemzT.cjs → webpack-Dbj2uykF.cjs} +8 -8
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/package.json +5 -4
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
|
+
import type { InternalUserDefinedOptions } from '../../types/index.js';
|
|
3
|
+
export interface ViteCssCalcStage {
|
|
4
|
+
options: InternalUserDefinedOptions;
|
|
5
|
+
getFinalOptions: () => Partial<IStyleHandlerOptions> | undefined;
|
|
6
|
+
shouldDefer: () => boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function createViteCssCalcStage(original: InternalUserDefinedOptions, isBuild: () => boolean, getPlatform?: () => string | undefined): ViteCssCalcStage;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { OutputBundle } from 'rollup';
|
|
2
2
|
import type { CssFinalizerContext } from './options.js';
|
|
3
|
+
export declare function finalizeCssCalc(bundle: OutputBundle, context: CssFinalizerContext, convertUnits?: boolean): Promise<void>;
|
|
3
4
|
export declare function finalizeWebCssCalc(bundle: OutputBundle, context: CssFinalizerContext): Promise<void>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { OutputBundle } from 'rollup';
|
|
2
2
|
import type { CssFinalizerContext } from './options.js';
|
|
3
|
-
export declare function finalizeCssAssets(bundle: OutputBundle, context: CssFinalizerContext, isWebGeneratorTarget: boolean, files: ReadonlySet<string>): Promise<void
|
|
3
|
+
export declare function finalizeCssAssets(bundle: OutputBundle, context: CssFinalizerContext, isWebGeneratorTarget: boolean, files: ReadonlySet<string>): Promise<void>;
|
|
@@ -13,6 +13,7 @@ interface RememberedMainCssSource {
|
|
|
13
13
|
export interface CssFinalizerContext {
|
|
14
14
|
frameworkName?: string | undefined;
|
|
15
15
|
opts: InternalUserDefinedOptions;
|
|
16
|
+
getFinalCssCalcOptions?: (() => Partial<IStyleHandlerOptions> | undefined) | undefined;
|
|
16
17
|
runtimeState: {
|
|
17
18
|
tailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
|
|
18
19
|
readyPromise: Promise<void>;
|
|
@@ -3,6 +3,7 @@ import type { RememberedCssSource } from './types.js';
|
|
|
3
3
|
import type { ICreateCacheReturnType } from '../../../cache/index.js';
|
|
4
4
|
export interface ApplyViteCssCacheResultOptions {
|
|
5
5
|
applyCssResult: (source: string) => void;
|
|
6
|
+
recordCssResult?: ((source: string) => void) | undefined;
|
|
6
7
|
cssRuntimeAffectingHash: string;
|
|
7
8
|
generatorRawSource: string;
|
|
8
9
|
generatorSourceFile: string;
|
|
@@ -27,6 +27,7 @@ export declare function createMatchedCssSourceOutputResolver(options: {
|
|
|
27
27
|
assetSourceFile: string;
|
|
28
28
|
file: string;
|
|
29
29
|
originalFileNames?: string[] | undefined;
|
|
30
|
+
ownedSourceFiles?: string[] | undefined;
|
|
30
31
|
resolveOutputFileFromMatchedCssSource: (sourceFile: string | undefined) => string | undefined;
|
|
31
32
|
}): (sourceFile: string | undefined) => string | undefined;
|
|
32
33
|
export type ResolveCssAssetOutputPlanOptions = Parameters<typeof resolveCssBundleOutputFile>[0] & {
|
|
@@ -36,6 +37,7 @@ export type ResolveCssAssetOutputPlanOptions = Parameters<typeof resolveCssBundl
|
|
|
36
37
|
}>;
|
|
37
38
|
normalizeConfiguredSourceFile: (file: string) => string;
|
|
38
39
|
originalFileNames: string[] | undefined;
|
|
40
|
+
ownedSourceFiles?: string[] | undefined;
|
|
39
41
|
resolveOutputFileFromMatchedCssSource: (sourceFile: string | undefined) => string | undefined;
|
|
40
42
|
rootImportShellOutputFile: string;
|
|
41
43
|
rootImportShellTarget: string | undefined;
|
|
@@ -21,3 +21,4 @@ export interface ApplyViteCssTransformTaskResultOptions {
|
|
|
21
21
|
vitePipelineCssInjectionOutputFile: string;
|
|
22
22
|
}
|
|
23
23
|
export declare function applyViteCssTransformTaskResult(options: ApplyViteCssTransformTaskResultOptions): string;
|
|
24
|
+
export declare function recordViteCssContribution(options: Pick<ApplyViteCssTransformTaskResultOptions, 'file' | 'outputIsMainChunk' | 'recordViteProcessedCssAssetResult' | 'shouldRecordVitePipelineCssByOutput' | 'shouldInjectVitePipelineCssIntoMain' | 'vitePipelineCssAsset' | 'vitePipelineCssInjectionOutputFile'>, css: string): void;
|
|
@@ -10,13 +10,13 @@ interface ProcessRememberedCssReplayOptions {
|
|
|
10
10
|
changedCssFiles: Set<string>;
|
|
11
11
|
createScopedGeneratorRuntime: (outputFile: string, cssHandlerOptions: {
|
|
12
12
|
isMainChunk?: boolean | undefined;
|
|
13
|
-
}, runtime: Set<string>, rawSource?: string | undefined, sourceFile?: string | undefined) => Promise<Set<string>>;
|
|
13
|
+
}, runtime: Set<string>, rawSource?: string | undefined, sourceFile?: string | undefined, scopeToSource?: boolean | undefined) => Promise<Set<string>>;
|
|
14
14
|
createScopedSourceCandidateGetter: (outputFile: string, cssHandlerOptions: {
|
|
15
15
|
isMainChunk?: boolean | undefined;
|
|
16
|
-
}) => GenerateBundleContext['getSourceCandidatesForEntries'];
|
|
16
|
+
}, sourceFile?: string | undefined) => GenerateBundleContext['getSourceCandidatesForEntries'];
|
|
17
17
|
createScopedSourceCandidateSourceGetter: (outputFile: string, cssHandlerOptions: {
|
|
18
18
|
isMainChunk?: boolean | undefined;
|
|
19
|
-
}) => GenerateBundleContext['getSourceCandidateSourcesForEntries'];
|
|
19
|
+
}, sourceFile?: string | undefined) => GenerateBundleContext['getSourceCandidateSourcesForEntries'];
|
|
20
20
|
cssTaskFactories: Array<() => Promise<void>>;
|
|
21
21
|
cssPipelineContext: ViteFrameworkCssPipelineContext;
|
|
22
22
|
cssPipelineStrategy?: ViteFrameworkCssPipelineStrategy | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type RuntimeResolver = (outputFile: string, options: {
|
|
2
|
+
isMainChunk?: boolean | undefined;
|
|
3
|
+
}, runtime: Set<string>, rawSource?: string, sourceFile?: string, scopeToSource?: boolean) => Promise<Set<string>>;
|
|
4
|
+
export declare function memoizeScopedGeneratorRuntime(resolve: RuntimeResolver): RuntimeResolver;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { createScopedGeneratorCandidateSignature } from './scoped-generator.js';
|
|
2
|
+
import type { RememberedCssSource } from './types.js';
|
|
3
|
+
interface GeneratorCssHandlerOptions {
|
|
4
|
+
isMainChunk?: boolean | undefined;
|
|
5
|
+
}
|
|
6
|
+
type SourceTraceResolver = (rawSource: string, sourceFile: string, options?: {
|
|
7
|
+
scopeToSource?: boolean;
|
|
8
|
+
}) => Promise<Map<string, Set<string>> | undefined>;
|
|
9
|
+
type RuntimeResolver = (outputFile: string, options: GeneratorCssHandlerOptions, runtime: Set<string>, rawSource?: string, sourceFile?: string, scopeToSource?: boolean) => Promise<Set<string>>;
|
|
10
|
+
type CandidateSignatureResolver = typeof createScopedGeneratorCandidateSignature;
|
|
11
|
+
type SignatureSource = Pick<RememberedCssSource, 'rawSource' | 'sourceFile'>;
|
|
12
|
+
export declare function hasScopedSourceDirectives(sources: readonly RememberedCssSource[]): boolean;
|
|
13
|
+
export declare function createScopedGeneratorSourceData(options: {
|
|
14
|
+
createScopedGeneratorRuntime: RuntimeResolver;
|
|
15
|
+
createScopedGeneratorSourceTraceMap: SourceTraceResolver;
|
|
16
|
+
generatorCssHandlerOptions: GeneratorCssHandlerOptions;
|
|
17
|
+
generatorRawSource: string;
|
|
18
|
+
generatorRuntime: Set<string>;
|
|
19
|
+
generatorSourceFile: string;
|
|
20
|
+
rememberedCssSources: RememberedCssSource[];
|
|
21
|
+
scopedSourceCandidateSourceGetter: ((entries: unknown) => Map<string, Set<string>>) | undefined;
|
|
22
|
+
outputFile: string;
|
|
23
|
+
}): Promise<{
|
|
24
|
+
scopedGeneratorRuntime: Set<string>;
|
|
25
|
+
signatureSources: SignatureSource[];
|
|
26
|
+
sourceTraceSources: Map<string, Set<string>> | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
export declare function createScopedGeneratorCandidateSignatureForSources(options: {
|
|
29
|
+
createScopedGeneratorCandidateSignature: CandidateSignatureResolver;
|
|
30
|
+
generatorCssHandlerOptions: GeneratorCssHandlerOptions;
|
|
31
|
+
majorVersion: number | undefined;
|
|
32
|
+
scopedSourceCandidateGetter: Parameters<CandidateSignatureResolver>[3];
|
|
33
|
+
signatureSources: readonly SignatureSource[];
|
|
34
|
+
trackedGeneratorCandidateSignature: string;
|
|
35
|
+
}): Promise<string>;
|
|
36
|
+
export {};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import type { SourceCandidateFilterOptions } from '../source-candidates.js';
|
|
2
2
|
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan.js';
|
|
3
|
+
export declare function hasOwnSourceDirectives(rawSource: string, scopeToSource?: boolean): boolean;
|
|
3
4
|
export declare function createScopedGeneratorCandidateSignature(rawSource: string, sourceFile: string, fallbackSignature: string, getSourceCandidatesForEntries: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>) | undefined, options?: {
|
|
4
5
|
includeFallbackSignature?: boolean | undefined;
|
|
5
6
|
majorVersion?: number | undefined;
|
|
7
|
+
scopeToSource?: boolean | undefined;
|
|
6
8
|
}): Promise<string>;
|
|
7
|
-
export declare function createScopedGeneratorSourceTraceMap(rawSource: string, sourceFile: string, getSourceCandidateSourcesForEntries: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined
|
|
9
|
+
export declare function createScopedGeneratorSourceTraceMap(rawSource: string, sourceFile: string, getSourceCandidateSourcesForEntries: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined, options?: {
|
|
10
|
+
scopeToSource?: boolean | undefined;
|
|
11
|
+
}): Promise<Map<string, Set<string>> | undefined>;
|
|
8
12
|
export declare function createScopedGeneratorRuntime(options: {
|
|
9
13
|
cssHandlerOptions: {
|
|
10
14
|
isMainChunk?: boolean | undefined;
|
|
@@ -18,5 +22,6 @@ export declare function createScopedGeneratorRuntime(options: {
|
|
|
18
22
|
isMainChunk?: boolean | undefined;
|
|
19
23
|
}) => boolean;
|
|
20
24
|
sourceFile?: string | undefined;
|
|
25
|
+
scopeToSource?: boolean | undefined;
|
|
21
26
|
scopedSourceCandidateGetter: ((entries: TailwindSourceEntry[] | undefined, options?: SourceCandidateFilterOptions) => Set<string>) | undefined;
|
|
22
27
|
}): Promise<Set<string>>;
|
|
@@ -16,10 +16,10 @@ interface CreateSubpackageSourceCandidateScopeOptions {
|
|
|
16
16
|
export declare function createSubpackageSourceCandidateScope(options: CreateSubpackageSourceCandidateScopeOptions): {
|
|
17
17
|
createScopedSourceCandidateGetter: (outputFile: string, cssHandlerOptions: {
|
|
18
18
|
isMainChunk?: boolean | undefined;
|
|
19
|
-
}) => ((entries: TailwindSourceEntry[] | undefined, filterOptions?: SourceCandidateFilterOptions) => Set<string>) | undefined;
|
|
19
|
+
}, sourceFile?: string) => ((entries: TailwindSourceEntry[] | undefined, filterOptions?: SourceCandidateFilterOptions) => Set<string>) | undefined;
|
|
20
20
|
createScopedSourceCandidateSourceGetter: (outputFile: string, cssHandlerOptions: {
|
|
21
21
|
isMainChunk?: boolean | undefined;
|
|
22
|
-
}) => ((entries: TailwindSourceEntry[] | undefined, filterOptions?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined;
|
|
22
|
+
}, sourceFile?: string) => ((entries: TailwindSourceEntry[] | undefined, filterOptions?: SourceCandidateFilterOptions) => Map<string, Set<string>>) | undefined;
|
|
23
23
|
shouldExcludeSubpackageSourceCandidates: (outputFile: string, cssHandlerOptions: {
|
|
24
24
|
isMainChunk?: boolean | undefined;
|
|
25
25
|
}) => boolean;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { RememberedCssSource } from './types.js';
|
|
2
|
+
export declare function createMergedCssSourceTraceMap(sources: Pick<RememberedCssSource, 'rawSource' | 'sourceFile'>[], resolve: (source: Pick<RememberedCssSource, 'rawSource' | 'sourceFile'>) => Promise<Map<string, Set<string>> | undefined>): Promise<Map<string, Set<string>>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface RuntimeClassSetCacheOptions {
|
|
2
|
+
refresh: () => Promise<void>;
|
|
3
|
+
collect: () => Promise<Set<string>>;
|
|
4
|
+
}
|
|
5
|
+
export declare function createRuntimeClassSetCache(options: RuntimeClassSetCacheOptions): {
|
|
6
|
+
get: () => Promise<Set<string>>;
|
|
7
|
+
refresh: () => Promise<void>;
|
|
8
|
+
invalidate: () => void;
|
|
9
|
+
peek: () => Set<string> | undefined;
|
|
10
|
+
revision: () => number;
|
|
11
|
+
remember(next: Set<string>, expectedRevision: number): void;
|
|
12
|
+
dispose(): void;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Plugin, ResolvedConfig } from 'vite';
|
|
2
|
+
interface RuntimeClassSetLifecycleOptions {
|
|
3
|
+
plugins: Plugin[];
|
|
4
|
+
uniAppX: boolean;
|
|
5
|
+
invalidate: () => void;
|
|
6
|
+
isEnabled: () => boolean;
|
|
7
|
+
isRelevant: (id: string) => boolean;
|
|
8
|
+
dispose: () => void;
|
|
9
|
+
getResolvedConfig: () => ResolvedConfig | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare function installRuntimeClassSetLifecycle(options: RuntimeClassSetLifecycleOptions): void;
|
|
12
|
+
export {};
|
|
@@ -12,6 +12,7 @@ interface CreateViteRuntimeClassSetOptions {
|
|
|
12
12
|
export declare function createViteRuntimeClassSet(options: CreateViteRuntimeClassSetOptions): {
|
|
13
13
|
runtimeState: import("../../compiler/runtime-state.js").CompilerRuntimeState;
|
|
14
14
|
refreshRuntimeState: (force: boolean) => Promise<void>;
|
|
15
|
+
invalidateRuntimeClassSet: () => void;
|
|
15
16
|
ensureRuntimeClassSet: (force?: boolean) => Promise<Set<string>>;
|
|
16
17
|
ensureBundleRuntimeClassSet: (snapshot: BundleSnapshot, forceRefresh?: boolean, options?: {
|
|
17
18
|
allowBaselineOnlyInitialSync?: boolean | undefined;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { ViteFrameworkBranchContext } from './create-framework-plugins.js';
|
|
2
2
|
import type { ViteFrameworkRuntimeOptions } from './framework-runtime-options.js';
|
|
3
|
-
declare function createViteFrameworkPlugins(options: ViteFrameworkRuntimeOptions | undefined, frameworkBranch: ViteFrameworkBranchContext): any;
|
|
4
|
-
export { createViteFrameworkPlugins };
|
|
3
|
+
export declare function createViteFrameworkPlugins(options: ViteFrameworkRuntimeOptions | undefined, frameworkBranch: ViteFrameworkBranchContext): any;
|
|
@@ -35,6 +35,7 @@ export declare function createFrameworkSourceScanSession(options: FrameworkSourc
|
|
|
35
35
|
pendingHotUpdateChangeByFile: number;
|
|
36
36
|
sourceCandidateScanCache: number;
|
|
37
37
|
};
|
|
38
|
+
getWatchFiles: () => Set<string>;
|
|
38
39
|
invalidate: () => void;
|
|
39
40
|
isDependency: (file: string) => boolean;
|
|
40
41
|
matches: (file: string) => boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-fg3euq-1.cjs");
|
|
2
2
|
const require_framework = require("./framework.cjs");
|
|
3
|
-
const require_generator = require("./generator-
|
|
3
|
+
const require_generator = require("./generator-B1sYQpWu.cjs");
|
|
4
4
|
require("./utils-CuKLf1Zv.cjs");
|
|
5
|
-
const require_tailwindcss = require("./tailwindcss-
|
|
5
|
+
const require_tailwindcss = require("./tailwindcss-uf04Iolj.cjs");
|
|
6
6
|
const require_defaults = require("./defaults-CyX5iO9y.cjs");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_rolldown_runtime.__toESM(node_path, 1);
|
|
@@ -59,21 +59,11 @@ function createGenerationArtifact(fragments, options) {
|
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region src/core/compiler/source-fingerprint.ts
|
|
62
|
-
function stableSerialize(value, stack = /* @__PURE__ */ new WeakSet()) {
|
|
63
|
-
if (value == null || typeof value === "number" || typeof value === "boolean" || typeof value === "string") return JSON.stringify(value);
|
|
64
|
-
if (typeof value === "function") return `[Function:${value.name}]`;
|
|
65
|
-
if (typeof value !== "object") return String(value);
|
|
66
|
-
if (stack.has(value)) return "[Circular]";
|
|
67
|
-
stack.add(value);
|
|
68
|
-
const serialized = Array.isArray(value) ? `[${value.map((item) => stableSerialize(item, stack)).join(",")}]` : `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${stableSerialize(value[key], stack)}`).join(",")}}`;
|
|
69
|
-
stack.delete(value);
|
|
70
|
-
return serialized;
|
|
71
|
-
}
|
|
72
62
|
function createSourceFingerprint(source) {
|
|
73
63
|
return createCompilerValueFingerprint(source);
|
|
74
64
|
}
|
|
75
65
|
function createCompilerValueFingerprint(value) {
|
|
76
|
-
return (0, _weapp_tailwindcss_shared_node.md5)(stableSerialize(value));
|
|
66
|
+
return (0, _weapp_tailwindcss_shared_node.md5)(require_generator.stableSerialize(value));
|
|
77
67
|
}
|
|
78
68
|
//#endregion
|
|
79
69
|
//#region src/compiler/candidate-index.ts
|
|
@@ -871,10 +861,10 @@ var AssetEmissionPlan = class {
|
|
|
871
861
|
//#region src/core/compiler/generation-cache.ts
|
|
872
862
|
function createCompilerGenerationCacheKey(request, candidates, target) {
|
|
873
863
|
return {
|
|
874
|
-
bareArbitraryValues: request.bareArbitraryValues,
|
|
864
|
+
bareArbitraryValuesFingerprint: request.bareArbitraryValues === void 0 ? void 0 : createCompilerValueFingerprint(request.bareArbitraryValues),
|
|
875
865
|
candidateSignature: [...candidates].sort().join("\0"),
|
|
876
866
|
incrementalCache: request.incrementalCache,
|
|
877
|
-
scanSources: request.scanSources,
|
|
867
|
+
scanSourcesFingerprint: request.scanSources === void 0 ? void 0 : createCompilerValueFingerprint(request.scanSources),
|
|
878
868
|
scanMode: request.scanMode,
|
|
879
869
|
excludeFilesFingerprint: request.excludeFiles === void 0 ? void 0 : createCompilerValueFingerprint(request.excludeFiles),
|
|
880
870
|
sourcesFingerprint: request.sources === void 0 ? void 0 : createCompilerValueFingerprint(request.sources),
|
|
@@ -883,7 +873,7 @@ function createCompilerGenerationCacheKey(request, candidates, target) {
|
|
|
883
873
|
};
|
|
884
874
|
}
|
|
885
875
|
function isSameCompilerGenerationCacheKey(left, right) {
|
|
886
|
-
return left.
|
|
876
|
+
return left.bareArbitraryValuesFingerprint === right.bareArbitraryValuesFingerprint && left.candidateSignature === right.candidateSignature && left.incrementalCache === right.incrementalCache && left.scanSourcesFingerprint === right.scanSourcesFingerprint && left.scanMode === right.scanMode && left.excludeFilesFingerprint === right.excludeFilesFingerprint && left.sourcesFingerprint === right.sourcesFingerprint && left.styleOptionsFingerprint === right.styleOptionsFingerprint && left.target === right.target;
|
|
887
877
|
}
|
|
888
878
|
function reuseCompilerGenerationResult(result) {
|
|
889
879
|
return {
|
|
@@ -1051,7 +1041,7 @@ var CompilerRootStore = class {
|
|
|
1051
1041
|
entry.generationCache = void 0;
|
|
1052
1042
|
entry.latestSnapshot = void 0;
|
|
1053
1043
|
entry.source = void 0;
|
|
1054
|
-
entry.
|
|
1044
|
+
entry.sourceInputFingerprint = void 0;
|
|
1055
1045
|
entry.sourceFingerprint = void 0;
|
|
1056
1046
|
entry.sources = [];
|
|
1057
1047
|
if (notifyEvicted) this.onRootEvicted?.(id);
|
|
@@ -1229,6 +1219,28 @@ function createImmutableSet(values) {
|
|
|
1229
1219
|
return new ImmutableSetView(values);
|
|
1230
1220
|
}
|
|
1231
1221
|
//#endregion
|
|
1222
|
+
//#region src/core/compiler/source.ts
|
|
1223
|
+
async function resolveCompilerSource(entry, request, invalidation) {
|
|
1224
|
+
if (request.source && request.sourceOptions) throw new Error("generate() 的 source 与 sourceOptions 互斥。");
|
|
1225
|
+
if (!request.source && !request.sourceOptions) throw new Error("generate() 必须提供 source 或 sourceOptions。");
|
|
1226
|
+
const input = structuredClone(request.source ? { source: request.source } : {
|
|
1227
|
+
sourceOptions: request.sourceOptions,
|
|
1228
|
+
cwd: node_process.default.cwd()
|
|
1229
|
+
});
|
|
1230
|
+
const sourceInputFingerprint = createCompilerValueFingerprint(input);
|
|
1231
|
+
if (entry.source !== void 0 && entry.sourceFingerprint !== void 0 && entry.sourceInputFingerprint === sourceInputFingerprint && entry.appliedInvalidation === invalidation) return {
|
|
1232
|
+
source: entry.source,
|
|
1233
|
+
sourceFingerprint: entry.sourceFingerprint,
|
|
1234
|
+
sourceInputFingerprint
|
|
1235
|
+
};
|
|
1236
|
+
const source = input.source ?? await require_generator.resolveTailwindV4Source(input.sourceOptions);
|
|
1237
|
+
return {
|
|
1238
|
+
source,
|
|
1239
|
+
sourceFingerprint: createSourceFingerprint(source),
|
|
1240
|
+
sourceInputFingerprint
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
//#endregion
|
|
1232
1244
|
//#region src/cache/index.ts
|
|
1233
1245
|
function isProcessResult(value) {
|
|
1234
1246
|
return typeof value === "object" && value !== null && "result" in value;
|
|
@@ -35863,7 +35875,7 @@ function babelParse(code, opts = {}) {
|
|
|
35863
35875
|
return result;
|
|
35864
35876
|
}
|
|
35865
35877
|
//#endregion
|
|
35866
|
-
//#region ../../node_modules/.pnpm/magic-string@1.4.
|
|
35878
|
+
//#region ../../node_modules/.pnpm/magic-string@1.4.2/node_modules/magic-string/dist/index.mjs
|
|
35867
35879
|
var BitSet = class BitSet {
|
|
35868
35880
|
constructor(arg) {
|
|
35869
35881
|
this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
|
|
@@ -35957,7 +35969,7 @@ var Chunk = class Chunk {
|
|
|
35957
35969
|
this.outro = "";
|
|
35958
35970
|
this.end = index;
|
|
35959
35971
|
if (this.edited) {
|
|
35960
|
-
newChunk.edit("", false);
|
|
35972
|
+
newChunk.edit("", false, true);
|
|
35961
35973
|
this.content = "";
|
|
35962
35974
|
} else this.content = originalBefore;
|
|
35963
35975
|
newChunk.next = this.next;
|
|
@@ -36919,7 +36931,7 @@ var MagicString = class MagicString {
|
|
|
36919
36931
|
* Content appended or prepended at positions strictly inside the range is removed with it, while
|
|
36920
36932
|
* content attached at `start` or `end` is preserved — use `s.overwrite(start, end, '')` to remove
|
|
36921
36933
|
* the range including its edge inserts.
|
|
36922
|
-
*
|
|
36934
|
+
* Repeated removals and removals with partially overlapping ranges are allowed.
|
|
36923
36935
|
*/
|
|
36924
36936
|
remove(start, end) {
|
|
36925
36937
|
start = start + this.offset;
|
|
@@ -37201,10 +37213,16 @@ var MagicString = class MagicString {
|
|
|
37201
37213
|
* @internal
|
|
37202
37214
|
*/
|
|
37203
37215
|
_hasRemovedContent(start, end) {
|
|
37204
|
-
let chunk = this.
|
|
37205
|
-
|
|
37206
|
-
|
|
37207
|
-
|
|
37216
|
+
let chunk = this.byStart.get(start);
|
|
37217
|
+
if (!chunk) {
|
|
37218
|
+
chunk = this.lastSearchedChunk;
|
|
37219
|
+
const searchForward = start >= chunk.end;
|
|
37220
|
+
while (chunk && !chunk.contains(start)) chunk = searchForward ? this.byStart.get(chunk.end) : this.byEnd.get(chunk.start);
|
|
37221
|
+
if (chunk) this.lastSearchedChunk = chunk;
|
|
37222
|
+
}
|
|
37223
|
+
while (chunk && chunk.start < end) {
|
|
37224
|
+
if (chunk.content === "") return true;
|
|
37225
|
+
chunk = this.byStart.get(chunk.end);
|
|
37208
37226
|
}
|
|
37209
37227
|
return false;
|
|
37210
37228
|
}
|
|
@@ -37268,6 +37286,7 @@ var MagicString = class MagicString {
|
|
|
37268
37286
|
const stringLength = string.length;
|
|
37269
37287
|
if (stringLength === 0) {
|
|
37270
37288
|
for (let index = 0; index <= original.length; index += 1) {
|
|
37289
|
+
if (this._hasRemovedContent(index, index)) continue;
|
|
37271
37290
|
const _replacement = typeof replacement === "function" ? replacement("", index, original) : expandReplacement(replacement, "", index, original, [], void 0);
|
|
37272
37291
|
if (_replacement !== "") this.appendRight(index, _replacement);
|
|
37273
37292
|
}
|
|
@@ -41312,20 +41331,10 @@ function createCompiler(options = {}) {
|
|
|
41312
41331
|
track,
|
|
41313
41332
|
userOptions
|
|
41314
41333
|
});
|
|
41315
|
-
async function resolveRequestSource(entry, request) {
|
|
41316
|
-
if (request.source && request.sourceOptions) throw new Error("generate() 的 source 与 sourceOptions 互斥。");
|
|
41317
|
-
if (!request.source && !request.sourceOptions) throw new Error("generate() 必须提供 source 或 sourceOptions。");
|
|
41318
|
-
const sourceInput = request.source ?? request.sourceOptions;
|
|
41319
|
-
return {
|
|
41320
|
-
source: entry.source !== void 0 && entry.sourceInput === sourceInput && entry.appliedInvalidation === entry.invalidation ? entry.source : request.source ?? await require_generator.resolveTailwindV4Source(request.sourceOptions),
|
|
41321
|
-
sourceInput
|
|
41322
|
-
};
|
|
41323
|
-
}
|
|
41324
41334
|
async function runGenerate(entry, request) {
|
|
41325
41335
|
if (!entry.active) throw new Error(`Compiler root 已被移除:${entry.id}`);
|
|
41326
41336
|
const invalidation = entry.invalidation;
|
|
41327
|
-
const { source,
|
|
41328
|
-
const sourceFingerprint = entry.sourceInput === sourceInput && entry.sourceFingerprint !== void 0 && entry.appliedInvalidation === invalidation ? entry.sourceFingerprint : createSourceFingerprint(source);
|
|
41337
|
+
const { source, sourceFingerprint, sourceInputFingerprint } = await resolveCompilerSource(entry, request, invalidation);
|
|
41329
41338
|
const sourceReused = entry.sourceFingerprint === sourceFingerprint;
|
|
41330
41339
|
const engineReused = sourceReused && entry.generator !== void 0 && entry.appliedInvalidation === invalidation;
|
|
41331
41340
|
const generator = engineReused ? entry.generator : require_generator.createWeappTailwindcssGenerator(source);
|
|
@@ -41372,15 +41381,18 @@ function createCompiler(options = {}) {
|
|
|
41372
41381
|
entry.generator = generator;
|
|
41373
41382
|
entry.generationCache = {
|
|
41374
41383
|
key: generationCacheKey,
|
|
41375
|
-
result:
|
|
41384
|
+
result: {
|
|
41385
|
+
...generated,
|
|
41386
|
+
sources: [...snapshot.sources]
|
|
41387
|
+
}
|
|
41376
41388
|
};
|
|
41377
41389
|
entry.source = source;
|
|
41378
41390
|
entry.sourceFingerprint = sourceFingerprint;
|
|
41379
|
-
entry.
|
|
41391
|
+
entry.sourceInputFingerprint = sourceInputFingerprint;
|
|
41380
41392
|
entry.appliedInvalidation = invalidation;
|
|
41381
41393
|
entry.latestSnapshot = snapshot;
|
|
41382
41394
|
rootStore.attachDependencies(entry, dependencies);
|
|
41383
|
-
rootStore.attachSources(entry, sources);
|
|
41395
|
+
rootStore.attachSources(entry, snapshot.sources);
|
|
41384
41396
|
if (!engineReused && previousGenerator !== generator) previousGenerator?.dispose?.();
|
|
41385
41397
|
const css = target === "tailwind" ? generated.rawCss : generated.css;
|
|
41386
41398
|
const incrementalCss = target === "tailwind" ? generated.incrementalRawCss : generated.incrementalCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, i as resolveUniAppXOptions, o as applyV4CssCalcDefaults, s as warnMissingCssEntries, t as createTailwindcssRuntimeFromContext, u as getRuntimeClassSetSignatureWithSources, v as source_scan_exports } from "./tailwindcss-
|
|
1
|
+
import { c as getRuntimeClassSetCacheEntry, d as invalidateRuntimeClassSet, i as resolveUniAppXOptions, o as applyV4CssCalcDefaults, s as warnMissingCssEntries, t as createTailwindcssRuntimeFromContext, u as getRuntimeClassSetSignatureWithSources, v as source_scan_exports } from "./tailwindcss-XNfJSlhp.js";
|
|
2
2
|
import { resolveMpxPlatform } from "./framework.js";
|
|
3
|
-
import { B as loadTailwindV4DesignSystem,
|
|
3
|
+
import { B as stableSerialize, H as loadTailwindV4DesignSystem, L as resolveCssMacroTailwindV4Source, M as createTailwindV4Engine$1, O as resolveRuntimeBareArbitraryValues, P as _defineProperty, T as omitUndefined, U as resolveValidTailwindV4Candidates$1, V as shouldUseUniAppWebRpxCompatibility, a as resolveGeneratorRuntimeBranch, d as resolveTailwindV4SourceFromRuntime, i as normalizeWeappTailwindcssGeneratorOptions, j as resolveBooleanObjectOption, t as createWeappTailwindcssGenerator, u as resolveTailwindV4Source$1 } from "./generator-LqofzXgr.js";
|
|
4
4
|
import { i as isMap, n as defuOverrideArray$1 } from "./utils-MVwpU07P.js";
|
|
5
5
|
import { a as DEFAULT_PARSE_CACHE_MAX_SOURCE_LENGTH, i as resolveDefaultCssPreflight, o as HARD_PARSE_CACHE_MAX_ENTRIES, r as getDefaultOptions } from "./defaults-AQuvJS-h.js";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -59,16 +59,6 @@ function createGenerationArtifact(fragments, options) {
|
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region src/core/compiler/source-fingerprint.ts
|
|
62
|
-
function stableSerialize(value, stack = /* @__PURE__ */ new WeakSet()) {
|
|
63
|
-
if (value == null || typeof value === "number" || typeof value === "boolean" || typeof value === "string") return JSON.stringify(value);
|
|
64
|
-
if (typeof value === "function") return `[Function:${value.name}]`;
|
|
65
|
-
if (typeof value !== "object") return String(value);
|
|
66
|
-
if (stack.has(value)) return "[Circular]";
|
|
67
|
-
stack.add(value);
|
|
68
|
-
const serialized = Array.isArray(value) ? `[${value.map((item) => stableSerialize(item, stack)).join(",")}]` : `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${stableSerialize(value[key], stack)}`).join(",")}}`;
|
|
69
|
-
stack.delete(value);
|
|
70
|
-
return serialized;
|
|
71
|
-
}
|
|
72
62
|
function createSourceFingerprint(source) {
|
|
73
63
|
return createCompilerValueFingerprint(source);
|
|
74
64
|
}
|
|
@@ -895,10 +885,10 @@ function createCompilationEventBus() {
|
|
|
895
885
|
//#region src/core/compiler/generation-cache.ts
|
|
896
886
|
function createCompilerGenerationCacheKey(request, candidates, target) {
|
|
897
887
|
return {
|
|
898
|
-
bareArbitraryValues: request.bareArbitraryValues,
|
|
888
|
+
bareArbitraryValuesFingerprint: request.bareArbitraryValues === void 0 ? void 0 : createCompilerValueFingerprint(request.bareArbitraryValues),
|
|
899
889
|
candidateSignature: [...candidates].sort().join("\0"),
|
|
900
890
|
incrementalCache: request.incrementalCache,
|
|
901
|
-
scanSources: request.scanSources,
|
|
891
|
+
scanSourcesFingerprint: request.scanSources === void 0 ? void 0 : createCompilerValueFingerprint(request.scanSources),
|
|
902
892
|
scanMode: request.scanMode,
|
|
903
893
|
excludeFilesFingerprint: request.excludeFiles === void 0 ? void 0 : createCompilerValueFingerprint(request.excludeFiles),
|
|
904
894
|
sourcesFingerprint: request.sources === void 0 ? void 0 : createCompilerValueFingerprint(request.sources),
|
|
@@ -907,7 +897,7 @@ function createCompilerGenerationCacheKey(request, candidates, target) {
|
|
|
907
897
|
};
|
|
908
898
|
}
|
|
909
899
|
function isSameCompilerGenerationCacheKey(left, right) {
|
|
910
|
-
return left.
|
|
900
|
+
return left.bareArbitraryValuesFingerprint === right.bareArbitraryValuesFingerprint && left.candidateSignature === right.candidateSignature && left.incrementalCache === right.incrementalCache && left.scanSourcesFingerprint === right.scanSourcesFingerprint && left.scanMode === right.scanMode && left.excludeFilesFingerprint === right.excludeFilesFingerprint && left.sourcesFingerprint === right.sourcesFingerprint && left.styleOptionsFingerprint === right.styleOptionsFingerprint && left.target === right.target;
|
|
911
901
|
}
|
|
912
902
|
function reuseCompilerGenerationResult(result) {
|
|
913
903
|
return {
|
|
@@ -1075,7 +1065,7 @@ var CompilerRootStore = class {
|
|
|
1075
1065
|
entry.generationCache = void 0;
|
|
1076
1066
|
entry.latestSnapshot = void 0;
|
|
1077
1067
|
entry.source = void 0;
|
|
1078
|
-
entry.
|
|
1068
|
+
entry.sourceInputFingerprint = void 0;
|
|
1079
1069
|
entry.sourceFingerprint = void 0;
|
|
1080
1070
|
entry.sources = [];
|
|
1081
1071
|
if (notifyEvicted) this.onRootEvicted?.(id);
|
|
@@ -1253,6 +1243,28 @@ function createImmutableSet(values) {
|
|
|
1253
1243
|
return new ImmutableSetView(values);
|
|
1254
1244
|
}
|
|
1255
1245
|
//#endregion
|
|
1246
|
+
//#region src/core/compiler/source.ts
|
|
1247
|
+
async function resolveCompilerSource(entry, request, invalidation) {
|
|
1248
|
+
if (request.source && request.sourceOptions) throw new Error("generate() 的 source 与 sourceOptions 互斥。");
|
|
1249
|
+
if (!request.source && !request.sourceOptions) throw new Error("generate() 必须提供 source 或 sourceOptions。");
|
|
1250
|
+
const input = structuredClone(request.source ? { source: request.source } : {
|
|
1251
|
+
sourceOptions: request.sourceOptions,
|
|
1252
|
+
cwd: process.cwd()
|
|
1253
|
+
});
|
|
1254
|
+
const sourceInputFingerprint = createCompilerValueFingerprint(input);
|
|
1255
|
+
if (entry.source !== void 0 && entry.sourceFingerprint !== void 0 && entry.sourceInputFingerprint === sourceInputFingerprint && entry.appliedInvalidation === invalidation) return {
|
|
1256
|
+
source: entry.source,
|
|
1257
|
+
sourceFingerprint: entry.sourceFingerprint,
|
|
1258
|
+
sourceInputFingerprint
|
|
1259
|
+
};
|
|
1260
|
+
const source = input.source ?? await resolveTailwindV4Source$1(input.sourceOptions);
|
|
1261
|
+
return {
|
|
1262
|
+
source,
|
|
1263
|
+
sourceFingerprint: createSourceFingerprint(source),
|
|
1264
|
+
sourceInputFingerprint
|
|
1265
|
+
};
|
|
1266
|
+
}
|
|
1267
|
+
//#endregion
|
|
1256
1268
|
//#region src/cache/index.ts
|
|
1257
1269
|
function isProcessResult(value) {
|
|
1258
1270
|
return typeof value === "object" && value !== null && "result" in value;
|
|
@@ -4427,20 +4439,10 @@ function createCompiler(options = {}) {
|
|
|
4427
4439
|
track,
|
|
4428
4440
|
userOptions
|
|
4429
4441
|
});
|
|
4430
|
-
async function resolveRequestSource(entry, request) {
|
|
4431
|
-
if (request.source && request.sourceOptions) throw new Error("generate() 的 source 与 sourceOptions 互斥。");
|
|
4432
|
-
if (!request.source && !request.sourceOptions) throw new Error("generate() 必须提供 source 或 sourceOptions。");
|
|
4433
|
-
const sourceInput = request.source ?? request.sourceOptions;
|
|
4434
|
-
return {
|
|
4435
|
-
source: entry.source !== void 0 && entry.sourceInput === sourceInput && entry.appliedInvalidation === entry.invalidation ? entry.source : request.source ?? await resolveTailwindV4Source$1(request.sourceOptions),
|
|
4436
|
-
sourceInput
|
|
4437
|
-
};
|
|
4438
|
-
}
|
|
4439
4442
|
async function runGenerate(entry, request) {
|
|
4440
4443
|
if (!entry.active) throw new Error(`Compiler root 已被移除:${entry.id}`);
|
|
4441
4444
|
const invalidation = entry.invalidation;
|
|
4442
|
-
const { source,
|
|
4443
|
-
const sourceFingerprint = entry.sourceInput === sourceInput && entry.sourceFingerprint !== void 0 && entry.appliedInvalidation === invalidation ? entry.sourceFingerprint : createSourceFingerprint(source);
|
|
4445
|
+
const { source, sourceFingerprint, sourceInputFingerprint } = await resolveCompilerSource(entry, request, invalidation);
|
|
4444
4446
|
const sourceReused = entry.sourceFingerprint === sourceFingerprint;
|
|
4445
4447
|
const engineReused = sourceReused && entry.generator !== void 0 && entry.appliedInvalidation === invalidation;
|
|
4446
4448
|
const generator = engineReused ? entry.generator : createWeappTailwindcssGenerator(source);
|
|
@@ -4487,15 +4489,18 @@ function createCompiler(options = {}) {
|
|
|
4487
4489
|
entry.generator = generator;
|
|
4488
4490
|
entry.generationCache = {
|
|
4489
4491
|
key: generationCacheKey,
|
|
4490
|
-
result:
|
|
4492
|
+
result: {
|
|
4493
|
+
...generated,
|
|
4494
|
+
sources: [...snapshot.sources]
|
|
4495
|
+
}
|
|
4491
4496
|
};
|
|
4492
4497
|
entry.source = source;
|
|
4493
4498
|
entry.sourceFingerprint = sourceFingerprint;
|
|
4494
|
-
entry.
|
|
4499
|
+
entry.sourceInputFingerprint = sourceInputFingerprint;
|
|
4495
4500
|
entry.appliedInvalidation = invalidation;
|
|
4496
4501
|
entry.latestSnapshot = snapshot;
|
|
4497
4502
|
rootStore.attachDependencies(entry, dependencies);
|
|
4498
|
-
rootStore.attachSources(entry, sources);
|
|
4503
|
+
rootStore.attachSources(entry, snapshot.sources);
|
|
4499
4504
|
if (!engineReused && previousGenerator !== generator) previousGenerator?.dispose?.();
|
|
4500
4505
|
const css = target === "tailwind" ? generated.rawCss : generated.css;
|
|
4501
4506
|
const incrementalCss = target === "tailwind" ? generated.incrementalRawCss : generated.incrementalCss;
|
|
@@ -5,10 +5,10 @@ export interface CompilerGenerationCacheEntry {
|
|
|
5
5
|
result: WeappTailwindcssGenerateResult;
|
|
6
6
|
}
|
|
7
7
|
interface CompilerGenerationCacheKey {
|
|
8
|
-
|
|
8
|
+
bareArbitraryValuesFingerprint: string | undefined;
|
|
9
9
|
candidateSignature: string;
|
|
10
10
|
incrementalCache: CompilerGenerateRequest['incrementalCache'];
|
|
11
|
-
|
|
11
|
+
scanSourcesFingerprint: string | undefined;
|
|
12
12
|
scanMode: CompilerGenerateRequest['scanMode'];
|
|
13
13
|
excludeFilesFingerprint: string | undefined;
|
|
14
14
|
sourcesFingerprint: string | undefined;
|
|
@@ -22,6 +22,8 @@ export declare function reuseCompilerGenerationResult(result: WeappTailwindcssGe
|
|
|
22
22
|
incrementalRawCss: string;
|
|
23
23
|
css: string;
|
|
24
24
|
rawCss: string;
|
|
25
|
+
customPropertyValues?: ReadonlyMap<string, string> | undefined;
|
|
26
|
+
customPropertyContextCss?: string | undefined;
|
|
25
27
|
target: "weapp" | "web";
|
|
26
28
|
root: import("@weapp-tailwindcss/engine").TailwindV4CompiledSourceRoot;
|
|
27
29
|
sources: import("@weapp-tailwindcss/engine").TailwindV4SourcePattern[];
|
|
@@ -20,7 +20,7 @@ export interface CompilerRootSession {
|
|
|
20
20
|
pendingCount: number;
|
|
21
21
|
source?: TailwindV4ResolvedSource | undefined;
|
|
22
22
|
sourceFingerprint?: string | undefined;
|
|
23
|
-
|
|
23
|
+
sourceInputFingerprint?: string | undefined;
|
|
24
24
|
sources: CompilerSourcePattern[];
|
|
25
25
|
}
|
|
26
26
|
export declare class CompilerRootStore {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CompilerRootSession } from './root-store.js';
|
|
2
|
+
import type { CompilerGenerateRequest } from './types.js';
|
|
3
|
+
export declare function resolveCompilerSource(entry: CompilerRootSession, request: CompilerGenerateRequest, invalidation: number): Promise<{
|
|
4
|
+
source: import("../../generator/index.js").TailwindV4ResolvedSource;
|
|
5
|
+
sourceFingerprint: string;
|
|
6
|
+
sourceInputFingerprint: string;
|
|
7
|
+
}>;
|
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_compiler = require("./compiler-
|
|
2
|
+
const require_compiler = require("./compiler-TvqqdOMD.cjs");
|
|
3
3
|
const require_runtime_state = require("./runtime-state-BOzuVoKl.cjs");
|
|
4
4
|
let _weapp_tailwindcss_postcss_transform = require("@weapp-tailwindcss/postcss/transform");
|
|
5
5
|
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
package/dist/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as createTailwindRuntimeReadyPromise, F as createCompilationEventBus, d as createCompiler, f as getCompilerContext, j as ensureRuntimeClassSet, t as createCompilerRuntimeState, y as shouldSkipJsTransform } from "./compiler-
|
|
1
|
+
import { A as createTailwindRuntimeReadyPromise, F as createCompilationEventBus, d as createCompiler, f as getCompilerContext, j as ensureRuntimeClassSet, t as createCompilerRuntimeState, y as shouldSkipJsTransform } from "./compiler-v9sYta8W.js";
|
|
2
2
|
import { finalizeMiniProgramCss, finalizeMiniProgramCssRoot, postcss, removeTailwindSourceDirectivesRoot } from "@weapp-tailwindcss/postcss/transform";
|
|
3
3
|
import { defuOverrideArray } from "@weapp-tailwindcss/shared";
|
|
4
4
|
import { performance } from "node:perf_hooks";
|