weapp-tailwindcss 5.0.13 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/dist/auto-Ba6hDrse.mjs +13 -0
- package/dist/auto-DtU6f3X6.js +18 -0
- package/dist/bundlers/shared/css-cleanup.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/directives.d.ts +2 -1
- package/dist/bundlers/shared/generator-css/generation-helpers.d.ts +21 -9
- package/dist/bundlers/shared/generator-css/local-imports.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/source-resolver/apply-reference.d.ts +3 -0
- package/dist/bundlers/shared/generator-css/source-resolver/matching.d.ts +0 -1
- package/dist/bundlers/shared/generator-css/source-resolver/metadata.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/source-resolver/types.d.ts +3 -3
- package/dist/bundlers/shared/generator-css/source-resolver.d.ts +1 -1
- package/dist/bundlers/shared/generator-css/types.d.ts +13 -1
- package/dist/bundlers/shared/generator-css/user-css.d.ts +5 -1
- package/dist/bundlers/shared/run-tasks.d.ts +1 -0
- package/dist/bundlers/shared/v4-generation-core.d.ts +11 -0
- package/dist/bundlers/vite/css-finalizer.d.ts +1 -1
- package/dist/bundlers/vite/css-memory.d.ts +10 -0
- package/dist/bundlers/vite/generate-bundle/candidates.d.ts +0 -1
- package/dist/bundlers/vite/generate-bundle/configured-css-sources.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/css-output.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/env-flags.d.ts +0 -1
- package/dist/bundlers/vite/generate-bundle/final-css-assets.d.ts +12 -0
- package/dist/bundlers/vite/generate-bundle/finalize.d.ts +5 -0
- package/dist/bundlers/vite/generate-bundle/memory-debug.d.ts +21 -18
- package/dist/bundlers/vite/generate-bundle/sfc-style-source.d.ts +3 -1
- package/dist/bundlers/vite/generate-bundle/source-candidate-scope.d.ts +1 -0
- package/dist/bundlers/vite/generate-bundle/types.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle/vite-css-cache.d.ts +1 -1
- package/dist/bundlers/vite/generate-bundle.d.ts +3 -1
- package/dist/bundlers/vite/incremental-runtime-class-set/escaped-candidates.d.ts +1 -0
- package/dist/bundlers/vite/incremental-runtime-class-set.d.ts +3 -3
- package/dist/bundlers/vite/rewrite-css-imports.d.ts +1 -0
- package/dist/bundlers/vite/runtime-class-set.d.ts +5 -5
- package/dist/bundlers/vite/source-candidates/script.d.ts +1 -7
- package/dist/bundlers/vite/source-candidates.d.ts +9 -2
- package/dist/bundlers/vite/source-scan/css-entries.d.ts +2 -6
- package/dist/bundlers/vite/source-scan.d.ts +2 -2
- package/dist/bundlers/vite/uni-app-x-css-options.d.ts +1 -1
- package/dist/bundlers/vite/utils.d.ts +1 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/shared.d.ts +24 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/helpers.d.ts +48 -11
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-assets/source-candidate-cache.d.ts +28 -0
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5-loaders.d.ts +4 -2
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +10 -1
- package/dist/bundlers/webpack/shared/css-loader-runtime.d.ts +1 -0
- package/dist/cache/index.d.ts +1 -0
- package/dist/cli/mount-options.d.ts +2 -2
- package/dist/cli.js +124 -437
- package/dist/cli.mjs +120 -433
- package/dist/context/index.d.ts +3 -3
- package/dist/context/style-options.d.ts +4 -1
- package/dist/context/tailwindcss.d.ts +1 -1
- package/dist/{precheck-B0Z8yW7E.js → context-BHxLe743.js} +391 -153
- package/dist/{precheck-CRI90iL1.mjs → context-Mbzkek1q.mjs} +368 -137
- package/dist/core.js +15 -12
- package/dist/core.mjs +10 -7
- package/dist/css-macro.js +1 -1
- package/dist/css-macro.mjs +1 -1
- package/dist/{defaults-C_J_kBpw.js → defaults-CVcKbXBG.js} +4 -15
- package/dist/{defaults-Bqx18S1f.mjs → defaults-ZElj1zKc.mjs} +5 -10
- package/dist/defaults.d.ts +1 -7
- package/dist/defaults.js +1 -2
- package/dist/defaults.mjs +2 -2
- package/dist/generator/index.d.ts +6 -7
- package/dist/generator/options.d.ts +3 -3
- package/dist/generator/types.d.ts +9 -10
- package/dist/generator-9rUz4Hcb.js +170 -0
- package/dist/generator-Dc4qaPmT.mjs +123 -0
- package/dist/generator.js +10 -16
- package/dist/generator.mjs +3 -3
- package/dist/{gulp-XT8Jc7lH.js → gulp-B_sdP6dx.js} +47 -87
- package/dist/{gulp-DfOQERcV.mjs → gulp-uM36oIJs.mjs} +40 -80
- package/dist/gulp.js +1 -1
- package/dist/gulp.mjs +1 -1
- package/dist/{hmr-timing-DQIP_8qP.mjs → hmr-timing-BXMLsF4b.mjs} +1145 -842
- package/dist/{hmr-timing-BMftW7Us.js → hmr-timing-CogqkFaF.js} +1262 -881
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/js/fast-path/oxc.d.ts +4 -0
- package/dist/js/precheck.d.ts +1 -0
- package/dist/postcss.js +3 -4
- package/dist/postcss.mjs +2 -3
- package/dist/presets.js +9 -19
- package/dist/presets.mjs +8 -18
- package/dist/runtime-branch/create-branch.d.ts +2 -0
- package/dist/runtime-branch/generator-target-env.d.ts +4 -0
- package/dist/runtime-branch/index.d.ts +6 -0
- package/dist/runtime-branch/mini-program.d.ts +2 -0
- package/dist/runtime-branch/native-app.d.ts +2 -0
- package/dist/runtime-branch/platform.d.ts +6 -0
- package/dist/runtime-branch/tailwind-version.d.ts +2 -0
- package/dist/runtime-branch/types.d.ts +37 -0
- package/dist/runtime-branch/web.d.ts +2 -0
- package/dist/runtime-branch.d.ts +1 -0
- package/dist/{bundle-state-CKWeTEhv.js → source-candidate-scan-signature-2ybpptAK.js} +261 -19
- package/dist/{bundle-state-zQ2MrDdi.mjs → source-candidate-scan-signature-Cvb5z1ha.mjs} +187 -17
- package/dist/tailwindcss/candidates.d.ts +7 -0
- package/dist/tailwindcss/index.d.ts +2 -2
- package/dist/tailwindcss/runtime/cache.d.ts +6 -6
- package/dist/tailwindcss/runtime-factory.d.ts +12 -0
- package/dist/tailwindcss/runtime-options.d.ts +8 -0
- package/dist/tailwindcss/runtime-types.d.ts +86 -0
- package/dist/tailwindcss/runtime.d.ts +6 -6
- package/dist/tailwindcss/source-scan.d.ts +1 -1
- package/dist/tailwindcss/targets.d.ts +2 -2
- package/dist/tailwindcss/v4/config.d.ts +3 -3
- package/dist/tailwindcss/v4/css-entries.d.ts +1 -0
- package/dist/tailwindcss/v4/css-sources.d.ts +4 -2
- package/dist/tailwindcss/v4/index.d.ts +1 -1
- package/dist/tailwindcss/v4/multi-runtime.d.ts +2 -0
- package/dist/tailwindcss/v4/runtime-factory.d.ts +15 -0
- package/dist/tailwindcss/v4/runtime-options.d.ts +2 -0
- package/dist/tailwindcss/v4-engine/design-system.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/css-compat.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator/rpx-candidates.d.ts +3 -3
- package/dist/tailwindcss/v4-engine/generator/scan-sources.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/generator.d.ts +10 -3
- package/dist/tailwindcss/v4-engine/index.d.ts +1 -1
- package/dist/tailwindcss/v4-engine/miniprogram.d.ts +7 -1
- package/dist/tailwindcss/v4-engine/source.d.ts +23 -6
- package/dist/tailwindcss/v4-engine/types.d.ts +8 -9
- package/dist/tailwindcss/version.d.ts +1 -1
- package/dist/tailwindcss-DHIYcqXT.js +1523 -0
- package/dist/tailwindcss-wyUHrfil.mjs +1418 -0
- package/dist/{transform-YmrmxuF3.js → transform-CQVOgmzM.js} +17 -17
- package/dist/{transform-DfcEjsZF.mjs → transform-tExdt40m.mjs} +2 -2
- package/dist/typedoc.export.d.ts +1 -1
- package/dist/types/index.d.ts +16 -17
- package/dist/types/shared.d.ts +1 -1
- package/dist/types/{typedoc-tailwindcss-patch.d.ts → typedoc-tailwindcss-runtime.d.ts} +4 -10
- package/dist/types/user-defined-options/general.d.ts +5 -3
- package/dist/types/user-defined-options/important.d.ts +2 -2
- package/dist/uni-app-x/style-asset.d.ts +1 -0
- package/dist/v4-engine-CF9zt4Cw.mjs +2396 -0
- package/dist/v4-engine-D4ubP7N5.js +2778 -0
- package/dist/{vite-CXHVsHmX.js → vite-CP0ylSxZ.js} +1081 -542
- package/dist/{vite-DjI09vVN.mjs → vite-CPO83EhA.mjs} +916 -376
- package/dist/vite.js +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.js +5350 -4165
- package/dist/weapp-tw-runtime-classset-loader.js +15 -4
- package/dist/webpack-Bsek8VhR.js +2094 -0
- package/dist/webpack-BzqhJ8yK.mjs +2082 -0
- package/dist/webpack.js +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +4 -5
- package/dist/auto-CTp6wE5a.js +0 -33
- package/dist/auto-Cl8_hsG6.mjs +0 -22
- package/dist/bundlers/vite/incremental-runtime-class-set/v3-candidates.d.ts +0 -13
- package/dist/bundlers/vite/source-candidates/tailwind-v3-default-extractor.d.ts +0 -1
- package/dist/context/tailwindcss/rax.d.ts +0 -2
- package/dist/generator-CzpArpCL.js +0 -92
- package/dist/generator-ITLd7PTl.mjs +0 -67
- package/dist/tailwindcss/patcher-options.d.ts +0 -8
- package/dist/tailwindcss/patcher.d.ts +0 -12
- package/dist/tailwindcss/runtime-patch.d.ts +0 -5
- package/dist/tailwindcss/v3-engine/generator/cache-key.d.ts +0 -3
- package/dist/tailwindcss/v3-engine/generator/content.d.ts +0 -10
- package/dist/tailwindcss/v3-engine/generator/runtime-ready.d.ts +0 -2
- package/dist/tailwindcss/v3-engine/generator.d.ts +0 -19
- package/dist/tailwindcss/v3-engine/index.d.ts +0 -4
- package/dist/tailwindcss/v3-engine/miniprogram.d.ts +0 -4
- package/dist/tailwindcss/v3-engine/source.d.ts +0 -5
- package/dist/tailwindcss/v3-engine/types.d.ts +0 -61
- package/dist/tailwindcss/v4/multi-patcher.d.ts +0 -2
- package/dist/tailwindcss/v4/patcher-options.d.ts +0 -2
- package/dist/tailwindcss/v4/patcher.d.ts +0 -15
- package/dist/tailwindcss/v4-engine/tailwind-v3-compatibility.d.ts +0 -1
- package/dist/tailwindcss/v4-engine/tailwind-v3-default-colors.d.ts +0 -1
- package/dist/tailwindcss-DTq3uYBK.mjs +0 -556
- package/dist/tailwindcss-DZEwT3C_.js +0 -613
- package/dist/v3-engine-2rrgylhn.js +0 -4686
- package/dist/v3-engine-C6eJ0YzK.mjs +0 -4272
- package/dist/webpack-BcPpnT90.mjs +0 -1184
- package/dist/webpack-CfkUkMXG.js +0 -1196
- /package/dist/tailwindcss/{patcher-resolve.d.ts → runtime-resolve.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TailwindV4CssSource } from 'tailwindcss-
|
|
1
|
+
import type { TailwindV4CssSource } from '@tailwindcss-mangle/engine';
|
|
2
2
|
import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../../tailwindcss/source-scan';
|
|
3
|
-
import type {
|
|
3
|
+
import type { UserDefinedOptions } from '../../../types';
|
|
4
4
|
export interface ResolvedTailwindV4CssEntries {
|
|
5
5
|
entries: TailwindSourceEntry[];
|
|
6
6
|
explicit: boolean;
|
|
@@ -11,10 +11,6 @@ export declare function mergeTailwindInlineSourceCandidates(allInlineCandidates:
|
|
|
11
11
|
export declare function resolveTailwindV4EntriesFromCss(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
|
|
12
12
|
export declare function resolveViteTailwindV4CssDependencies(css: string, base: string): Promise<string[]>;
|
|
13
13
|
export declare function collectExistingCssEntries(options: UserDefinedOptions): string[];
|
|
14
|
-
export declare function resolveTailwindV3CssEntryScan(options: UserDefinedOptions, patcher: TailwindcssPatcherLike): Promise<{
|
|
15
|
-
entries: TailwindSourceEntry[];
|
|
16
|
-
dependencies: Set<string>;
|
|
17
|
-
}>;
|
|
18
14
|
export declare function resolveTailwindV4EntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
|
|
19
15
|
export declare function resolveTailwindConfigEntriesFromCssCached(css: string, base: string): Promise<ResolvedTailwindV4CssEntries | undefined>;
|
|
20
16
|
export declare function discoverTailwindV4CssEntries(root: string, outDir: string | undefined): Promise<string[]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TailwindInlineSourceCandidates, TailwindSourceEntry } from '../../tailwindcss/source-scan';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TailwindcssRuntimeLike, UserDefinedOptions } from '../../types';
|
|
3
3
|
export { discoverTailwindV4CssEntries, resolveTailwindConfigEntriesFromCssCached, resolveTailwindV4EntriesFromCss, resolveTailwindV4EntriesFromCssCached, resolveViteTailwindV4CssDependencies, } from './source-scan/css-entries';
|
|
4
4
|
export type { ResolvedTailwindV4CssEntries } from './source-scan/css-entries';
|
|
5
5
|
export interface ResolvedViteSourceScan {
|
|
@@ -12,5 +12,5 @@ interface ResolveViteSourceScanOptions {
|
|
|
12
12
|
root?: string | undefined;
|
|
13
13
|
outDir?: string | undefined;
|
|
14
14
|
}
|
|
15
|
-
export declare function resolveViteSourceScanEntries(options: UserDefinedOptions,
|
|
15
|
+
export declare function resolveViteSourceScanEntries(options: UserDefinedOptions, runtime: TailwindcssRuntimeLike, scanOptions?: ResolveViteSourceScanOptions): Promise<ResolvedViteSourceScan | undefined>;
|
|
16
16
|
export declare function createViteSourceScanMatcher(entries: TailwindSourceEntry[] | undefined): ((file: string) => boolean) | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { InternalUserDefinedOptions, IStyleHandlerOptions } from '../../types';
|
|
2
|
-
export declare function resolveUniAppXNativeCssHandlerOptions(opts: Pick<InternalUserDefinedOptions, 'appType' | 'uniAppX'>): Partial<IStyleHandlerOptions>;
|
|
2
|
+
export declare function resolveUniAppXNativeCssHandlerOptions(opts: Pick<InternalUserDefinedOptions, 'appType' | 'generator' | 'platform' | 'cssOptions' | 'uniAppX'>): Partial<IStyleHandlerOptions>;
|
|
@@ -4,6 +4,7 @@ export declare function slash(p: string): string;
|
|
|
4
4
|
export declare const isWindows: boolean;
|
|
5
5
|
export declare const cssLangRE: RegExp;
|
|
6
6
|
export declare function isCSSRequest(request: string): boolean;
|
|
7
|
+
export declare function isHTMLRequest(request: string): boolean;
|
|
7
8
|
export declare function normalizePath(id: string): string;
|
|
8
9
|
export { cleanUrl };
|
|
9
10
|
export declare function formatPostcssSourceMap(rawMap: ExistingRawSourceMap, file: string): Promise<ExistingRawSourceMap>;
|
|
@@ -10,6 +10,21 @@ interface ChunkLike {
|
|
|
10
10
|
name?: string;
|
|
11
11
|
hash?: string | null;
|
|
12
12
|
files?: Iterable<string> | Array<string>;
|
|
13
|
+
hasRuntime?: () => boolean;
|
|
14
|
+
}
|
|
15
|
+
interface ModuleLike {
|
|
16
|
+
context?: string;
|
|
17
|
+
dependencies?: Array<unknown> | Iterable<unknown>;
|
|
18
|
+
modules?: ModuleLike[] | Iterable<ModuleLike>;
|
|
19
|
+
request?: string;
|
|
20
|
+
resource?: string;
|
|
21
|
+
rootModule?: ModuleLike;
|
|
22
|
+
userRequest?: string;
|
|
23
|
+
}
|
|
24
|
+
interface ChunkGraphLike {
|
|
25
|
+
getChunkModulesIterable?: (chunk: ChunkLike) => Iterable<ModuleLike> | undefined;
|
|
26
|
+
getIssuer?: (module: ModuleLike) => ModuleLike | null | undefined;
|
|
27
|
+
getModule?: (dependency: unknown) => ModuleLike | null | undefined;
|
|
13
28
|
}
|
|
14
29
|
interface WebpackWatchChangeLike {
|
|
15
30
|
modifiedFiles?: Set<string>;
|
|
@@ -19,6 +34,15 @@ interface RuntimeWatchDependenciesLike {
|
|
|
19
34
|
files?: Iterable<string>;
|
|
20
35
|
contexts?: Iterable<string>;
|
|
21
36
|
}
|
|
37
|
+
export declare function inferWebpackMainCssFiles(chunks: Iterable<ChunkLike>, cssMatcher: (file: string) => boolean, options?: {
|
|
38
|
+
mainSourceFiles?: ReadonlySet<string> | undefined;
|
|
39
|
+
resourcesByAsset?: ReadonlyMap<string, ReadonlySet<string>> | undefined;
|
|
40
|
+
}): Set<string>;
|
|
41
|
+
export declare function resolveSingleActiveWebpackCssResource(assetResources: ReadonlySet<string> | undefined, activeWebpackAssetResourceFiles: ReadonlySet<string>): string | undefined;
|
|
42
|
+
export declare function createWebpackCssAssetResourceMap(chunks: Iterable<ChunkLike>, chunkGraph: ChunkGraphLike | undefined, cssMatcher: (file: string) => boolean, normalizeResource: (resource: string, issuer?: {
|
|
43
|
+
context?: string;
|
|
44
|
+
resource?: string;
|
|
45
|
+
}) => string | undefined): Map<string, Set<string>>;
|
|
22
46
|
export declare function createAssetHashByChunkMap(chunks: Iterable<ChunkLike>): Map<string, string>;
|
|
23
47
|
export declare function createRuntimeAwareCssHash(assetHash: string | undefined, sourceHash: string, runtimeSetHash: string): string;
|
|
24
48
|
export declare function hasWatchChanges(compiler: WebpackWatchChangeLike): boolean;
|
|
@@ -1,21 +1,37 @@
|
|
|
1
1
|
import type { Compiler, sources as WebpackSources } from 'webpack';
|
|
2
|
+
import type { BundleBuildState, BundleSnapshot } from '../../../vite/bundle-state';
|
|
2
3
|
import type { BundleRuntimeClassSetManager } from '../../../vite/incremental-runtime-class-set';
|
|
4
|
+
import type { WebpackGeneratedCssRegistration } from '../../loaders/runtime-registry';
|
|
3
5
|
import type { AppType, InternalUserDefinedOptions } from '../../../../types';
|
|
4
6
|
export interface SetupWebpackV5ProcessAssetsHookOptions {
|
|
5
7
|
compiler: Compiler;
|
|
6
8
|
options: InternalUserDefinedOptions;
|
|
7
9
|
appType?: AppType | undefined;
|
|
8
10
|
runtimeState: {
|
|
9
|
-
|
|
11
|
+
tailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
|
|
10
12
|
readyPromise: Promise<void>;
|
|
11
13
|
};
|
|
12
14
|
getRuntimeRefreshRequirement: () => boolean;
|
|
13
15
|
refreshRuntimeMetadata: (force: boolean) => Promise<void>;
|
|
14
|
-
|
|
16
|
+
isKnownWebpackProcessedCssAsset?: ((file: string, metadata?: {
|
|
17
|
+
isMainCssChunk?: boolean | undefined;
|
|
18
|
+
}) => boolean) | undefined;
|
|
19
|
+
isWebpackProcessedCssAsset?: ((file: string, rawSource: string, metadata?: {
|
|
20
|
+
isMainCssChunk?: boolean | undefined;
|
|
21
|
+
}) => boolean) | undefined;
|
|
15
22
|
consumeRuntimeRefreshRequirement: () => void;
|
|
16
23
|
isWatchMode?: (() => boolean) | undefined;
|
|
24
|
+
getWatchChangedFiles?: (() => Iterable<string>) | undefined;
|
|
17
25
|
runtimeClassSetManager?: BundleRuntimeClassSetManager | undefined;
|
|
18
|
-
getWebpackCssSources?: (() => Iterable<[string,
|
|
26
|
+
getWebpackCssSources?: (() => Iterable<[string, {
|
|
27
|
+
css: string | undefined;
|
|
28
|
+
processed?: boolean | undefined;
|
|
29
|
+
}]>) | undefined;
|
|
30
|
+
getWebpackGeneratedCssSources?: (() => Iterable<[string, WebpackGeneratedCssRegistration]>) | undefined;
|
|
31
|
+
pruneWebpackCssSources?: ((activeSourceFiles: ReadonlySet<string>, options?: {
|
|
32
|
+
watchMode?: boolean | undefined;
|
|
33
|
+
}) => void) | undefined;
|
|
34
|
+
prepareWebpackCssSources?: ((activeAssetResources?: ReadonlySet<string>) => ReadonlySet<string>) | undefined;
|
|
19
35
|
debug: (format: string, ...args: unknown[]) => void;
|
|
20
36
|
}
|
|
21
37
|
export type WebpackSourceLike = string | WebpackSources.Source;
|
|
@@ -27,15 +43,35 @@ interface WebpackAssetCompilationLike {
|
|
|
27
43
|
} | undefined;
|
|
28
44
|
updateAsset: Compiler['webpack']['Compilation']['prototype']['updateAsset'];
|
|
29
45
|
}
|
|
30
|
-
export declare function
|
|
46
|
+
export declare function buildWebpackBundleSnapshot(assets: Record<string, {
|
|
31
47
|
source: () => unknown;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
48
|
+
}>, opts: InternalUserDefinedOptions, state: BundleBuildState, compilation?: WebpackAssetCompilationLike | undefined): {
|
|
49
|
+
entries: import("../../../vite/bundle-state").BundleStateEntry[];
|
|
50
|
+
jsEntries: Map<any, any>;
|
|
51
|
+
sourceHashByFile: Map<string, string>;
|
|
52
|
+
runtimeAffectingSignatureByFile: Map<string, string>;
|
|
53
|
+
runtimeAffectingHashByFile: Map<string, string>;
|
|
54
|
+
hasOmittedKnownFiles: false;
|
|
55
|
+
changedByType: {
|
|
56
|
+
html: Set<string>;
|
|
57
|
+
js: Set<string>;
|
|
58
|
+
css: Set<string>;
|
|
59
|
+
other: Set<string>;
|
|
37
60
|
};
|
|
61
|
+
runtimeAffectingChangedByType: {
|
|
62
|
+
html: Set<string>;
|
|
63
|
+
js: Set<string>;
|
|
64
|
+
css: Set<string>;
|
|
65
|
+
other: Set<string>;
|
|
66
|
+
};
|
|
67
|
+
processFiles: {
|
|
68
|
+
html: Set<string>;
|
|
69
|
+
js: Set<string>;
|
|
70
|
+
css: Set<string>;
|
|
71
|
+
};
|
|
72
|
+
linkedImpactsByEntry: Map<any, any>;
|
|
38
73
|
};
|
|
74
|
+
export declare function releaseWebpackBundleSnapshotSources(snapshot: BundleSnapshot): void;
|
|
39
75
|
export declare function stringifyWebpackSource(source: unknown): string;
|
|
40
76
|
export declare function createWebpackAssetUpdater(options: {
|
|
41
77
|
compilation: WebpackAssetCompilationLike;
|
|
@@ -44,8 +80,9 @@ export declare function createWebpackAssetUpdater(options: {
|
|
|
44
80
|
debug: (format: string, ...args: unknown[]) => void;
|
|
45
81
|
}): {
|
|
46
82
|
getCurrentAssetSource: (file: string) => string | undefined;
|
|
47
|
-
updateAssetIfChanged: (file: string, source: WebpackSourceLike, { notifyUpdate }?: {
|
|
48
|
-
|
|
83
|
+
updateAssetIfChanged: (file: string, source: WebpackSourceLike, { compare, notifyUpdate, }?: {
|
|
84
|
+
compare?: boolean | undefined;
|
|
85
|
+
notifyUpdate?: boolean | undefined;
|
|
49
86
|
}) => boolean;
|
|
50
87
|
};
|
|
51
88
|
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { SourceCandidateStore } from '../../../vite/source-candidates';
|
|
2
|
+
import type { ResolvedViteSourceScan } from '../../../vite/source-scan';
|
|
3
|
+
export interface WebpackSourceCandidateCacheRecord {
|
|
4
|
+
getSourceCandidatesForEntries: SourceCandidateStore['valuesForEntries'];
|
|
5
|
+
signatureHash: string;
|
|
6
|
+
tokenSources: ReturnType<SourceCandidateStore['sourcesForEntries']>;
|
|
7
|
+
}
|
|
8
|
+
export interface WebpackSourceCandidateScanMemoryStats {
|
|
9
|
+
entries: number;
|
|
10
|
+
files: number;
|
|
11
|
+
lastHit: boolean;
|
|
12
|
+
signatureHash?: string | undefined;
|
|
13
|
+
snapshots: number;
|
|
14
|
+
}
|
|
15
|
+
interface ResolveWebpackSourceCandidateCacheOptions {
|
|
16
|
+
changedFiles?: Iterable<string> | undefined;
|
|
17
|
+
collector: SourceCandidateStore;
|
|
18
|
+
outDir: string;
|
|
19
|
+
root: string;
|
|
20
|
+
sourceScan: ResolvedViteSourceScan | undefined;
|
|
21
|
+
watchMode: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function createWebpackSourceCandidateScanCache(): {
|
|
24
|
+
getMemoryStats: () => WebpackSourceCandidateScanMemoryStats;
|
|
25
|
+
resolve: ({ changedFiles, collector, outDir, root, sourceScan, watchMode, }: ResolveWebpackSourceCandidateCacheOptions) => Promise<WebpackSourceCandidateCacheRecord>;
|
|
26
|
+
};
|
|
27
|
+
export type WebpackSourceCandidateScanCache = ReturnType<typeof createWebpackSourceCandidateScanCache>;
|
|
28
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { TailwindV4CssSource } from 'tailwindcss-
|
|
1
|
+
import type { TailwindV4CssSource } from '@tailwindcss-mangle/engine';
|
|
2
2
|
import type { Compiler } from 'webpack';
|
|
3
|
-
import type { WebpackCssSourceRegistration } from '../loaders/runtime-registry';
|
|
3
|
+
import type { WebpackCssSourceRegistration, WebpackGeneratedCssRegistration } from '../loaders/runtime-registry';
|
|
4
4
|
import type { TailwindRuntimeState } from '../../../tailwindcss/runtime';
|
|
5
5
|
import type { AppType, InternalUserDefinedOptions } from '../../../types';
|
|
6
6
|
interface SetupWebpackV5LoadersOptions {
|
|
@@ -15,6 +15,8 @@ interface SetupWebpackV5LoadersOptions {
|
|
|
15
15
|
getClassSetInLoader: () => Promise<void>;
|
|
16
16
|
getRuntimeSetInLoader: () => Promise<Set<string>>;
|
|
17
17
|
markWebpackProcessedCssSource?: ((file: string) => void) | undefined;
|
|
18
|
+
markWebpackCssSourceModule?: ((file: string) => void) | undefined;
|
|
19
|
+
registerWebpackGeneratedCss?: ((source: WebpackGeneratedCssRegistration) => void) | undefined;
|
|
18
20
|
registerWebpackCssSourceFile?: ((source: WebpackCssSourceRegistration) => void) | undefined;
|
|
19
21
|
getRuntimeWatchDependencies: () => {
|
|
20
22
|
files: ReadonlySet<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TailwindV4CssSource } from 'tailwindcss-
|
|
1
|
+
import type { TailwindV4CssSource } from '@tailwindcss-mangle/engine';
|
|
2
2
|
import type { TailwindRuntimeState } from '../../../tailwindcss/runtime';
|
|
3
3
|
import type { AppType, InternalUserDefinedOptions } from '../../../types';
|
|
4
4
|
export interface WebpackRuntimeClassSetLoaderOptions {
|
|
@@ -13,6 +13,13 @@ export interface RuntimeLoaderWatchDependencies {
|
|
|
13
13
|
export interface WebpackCssSourceRegistration {
|
|
14
14
|
css?: string | undefined;
|
|
15
15
|
file: string;
|
|
16
|
+
processed?: boolean | undefined;
|
|
17
|
+
}
|
|
18
|
+
export interface WebpackGeneratedCssRegistration {
|
|
19
|
+
classSet: Set<string>;
|
|
20
|
+
css: string;
|
|
21
|
+
dependencies: string[];
|
|
22
|
+
file: string;
|
|
16
23
|
}
|
|
17
24
|
export interface WebpackCssImportRewriteRuntimeOptions {
|
|
18
25
|
pkgDir: string;
|
|
@@ -22,6 +29,8 @@ export interface WebpackCssImportRewriteRuntimeOptions {
|
|
|
22
29
|
registerCssSource?: (source: TailwindV4CssSource) => Promise<void> | void;
|
|
23
30
|
getRuntimeSet?: () => Promise<Set<string>> | Set<string>;
|
|
24
31
|
markGeneratedCssSource?: (file: string) => void;
|
|
32
|
+
registerGeneratedCss?: (source: WebpackGeneratedCssRegistration) => void;
|
|
33
|
+
registerCssSourceFile?: (source: WebpackCssSourceRegistration) => void;
|
|
25
34
|
}
|
|
26
35
|
export interface WebpackCssImportRewriteLoaderOptions {
|
|
27
36
|
tailwindcssImportRewrite?: WebpackCssImportRewriteRuntimeOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isWebpackCssLoaderRuntimeSource(source: string): boolean;
|
package/dist/cache/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export interface ICreateCacheReturnType {
|
|
|
35
35
|
cacheKeys?: Iterable<string> | undefined;
|
|
36
36
|
hashKeys?: Iterable<HashMapKey> | undefined;
|
|
37
37
|
}) => void;
|
|
38
|
+
pruneHashKeys?: (hashKeys: Iterable<HashMapKey>) => void;
|
|
38
39
|
process: <T extends CacheValue>(options: CacheProcessOptions<T>) => Promise<T>;
|
|
39
40
|
}
|
|
40
41
|
declare function createCache(options?: boolean): ICreateCacheReturnType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TailwindcssPatchCliMountOptions } from 'tailwindcss-patch';
|
|
2
1
|
export declare const PATCH_COMMAND_OBSOLETE_NOTICE = "\u63D0\u793A\uFF1Aweapp-tailwindcss@5 \u5DF2\u7531\u6784\u5EFA\u8FD0\u884C\u65F6\u63A5\u7BA1 Tailwind CSS \u5904\u7406\uFF0Cweapp-tw patch \u5DF2\u65E0\u9700\u6267\u884C\uFF1B\u8BF7\u79FB\u9664 package.json \u4E2D\u7684 postinstall \u94A9\u5B50\u3002";
|
|
2
|
+
export declare const obsoletePatchCommands: readonly ["extract", "tokens", "init", "migrate", "restore", "validate"];
|
|
3
3
|
export declare function logPatchCommandObsoleteNotice(): void;
|
|
4
|
-
export declare
|
|
4
|
+
export declare function logObsoletePatchCommand(command: string): void;
|