weapp-tailwindcss 5.2.11 → 5.2.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/bundlers/shared/generator-css/user-css/source-fragments.d.ts +6 -0
- package/dist/bundlers/shared/generator-css/user-css.d.ts +1 -1
- package/dist/bundlers/shared/hmr-timing.d.ts +1 -0
- package/dist/bundlers/shared/source-candidates/scan-root.d.ts +2 -0
- package/dist/bundlers/vite/css-finalizer/generic-web-fast-path.d.ts +16 -0
- package/dist/bundlers/vite/css-finalizer/options.d.ts +5 -0
- package/dist/bundlers/vite/generate-bundle/types.d.ts +1 -0
- package/dist/bundlers/vite/shared/generic-web-production-fast-path.d.ts +28 -0
- package/dist/bundlers/webpack/loaders/runtime-registry.d.ts +1 -0
- package/dist/cli.cjs +372 -293
- package/dist/cli.js +20 -11
- package/dist/{context-DbL0d-zB.js → context-CKQKq4Mv.js} +19 -8
- package/dist/{context-C3TryIjF.cjs → context-vWlNv-Cf.cjs} +17 -11
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{css-imports-DfNC3e6a.cjs → css-imports-BFMU7Hpd.cjs} +1 -1
- package/dist/css-macro/postcss.cjs +1 -1
- package/dist/css-macro.cjs +1 -1
- package/dist/defaults.cjs +2 -0
- package/dist/defaults.js +2 -0
- package/dist/framework.cjs +1 -1
- package/dist/{generator-BLpOsd5O.js → generator-BP4WmgIo.js} +36 -15
- package/dist/{generator-B0dCFlP1.cjs → generator-BXrWA7Sj.cjs} +43 -22
- package/dist/generator.cjs +1 -1
- package/dist/generator.js +1 -1
- package/dist/{gulp-DSrcDQsA.cjs → gulp-DxKLSgXX.cjs} +16 -13
- package/dist/{gulp-BLaGc0MJ.js → gulp-G--cGMcR.js} +12 -9
- package/dist/gulp.cjs +1 -1
- package/dist/gulp.js +1 -1
- package/dist/{hmr-timing-BnGBBJ6S.cjs → hmr-timing-BtqnyxAO.cjs} +5 -5
- package/dist/{hmr-timing-DXyGw6jp.js → hmr-timing-iTua_Z55.js} +47 -16
- package/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/dist/{object-Bvy6-w9r.js → object-B-8IHefx.js} +4 -4
- package/dist/{object-C_Vr6_S5.cjs → object-DbHtAXRk.cjs} +4 -4
- package/dist/{options-zpZez7qe.cjs → options-DbYws6lr.cjs} +8 -17
- package/dist/{pipeline-helpers-B5CzvTUJ.cjs → pipeline-helpers-DnYpfbat.cjs} +25 -10
- package/dist/postcss-html-transform.cjs +1 -1
- package/dist/postcss.cjs +1 -1
- package/dist/postcss.js +1 -1
- package/dist/presets.cjs +6 -5
- package/dist/presets.js +4 -3
- package/dist/reset.cjs +1 -1
- package/dist/{rolldown-runtime-CVvi-lCc.cjs → rolldown-runtime-Ctb5zv51.cjs} +1 -1
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.js +1 -1
- package/dist/{runtime-registry-Y7NrD2WH.cjs → runtime-registry-BlIjpImP.cjs} +10 -0
- package/dist/{source-candidate-scan-signature-GjsLzP8Z.cjs → source-candidate-scan-signature-Ggn8fzkT.cjs} +6 -5
- package/dist/{source-candidate-scan-signature-xgmxO8_F.js → source-candidate-scan-signature-TKJIs7VF.js} +5 -4
- package/dist/{style-options-COpQc8fr.cjs → style-options-Cta1OP3i.cjs} +9 -4
- package/dist/{tailwindcss-2zdmASlM.js → tailwindcss-C2K-vjJv.js} +20 -20
- package/dist/{tailwindcss-LtnGCxF0.cjs → tailwindcss-D1M2xj5O.cjs} +17 -13
- package/dist/{transform-BlsDWgjt.js → transform-52FLRu-0.js} +2 -2
- package/dist/{transform-9wbmvHcC.cjs → transform-BiHG42Rp.cjs} +2 -2
- package/dist/types/user-defined-options/general.d.ts +2 -0
- package/dist/{v4-generation-core-D4zQcQqW.cjs → v4-generation-core-D-zVR2mt.cjs} +53 -16
- package/dist/{vite-BWmBFzgf.js → vite-B577QMUl.js} +317 -82
- package/dist/{vite-DTDbD-95.cjs → vite-BFWJAH16.cjs} +322 -87
- package/dist/vite.cjs +1 -1
- package/dist/vite.js +1 -1
- package/dist/{watch-dependencies-BZGubvuJ.cjs → watch-dependencies-DLZDrWdH.cjs} +1 -1
- package/dist/weapp-tw-css-generation-loader.cjs +1 -1
- package/dist/weapp-tw-css-import-rewrite-loader.cjs +14 -12
- package/dist/weapp-tw-runtime-classset-loader.cjs +5 -4
- package/dist/{webpack-CtUyQNqC.js → webpack-DLJkStre.js} +41 -22
- package/dist/{webpack-Bpovb6YE.cjs → webpack-DTqFKvcE.cjs} +46 -36
- package/dist/webpack.cjs +1 -1
- package/dist/webpack.js +1 -1
- package/dist/{wxml-CWJc0yY-.js → wxml-B7OAVpXJ.js} +10 -6
- package/dist/{wxml-DUIdXCVa.cjs → wxml-CQmBCjOR.cjs} +386 -311
- package/package.json +6 -6
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
2
|
export declare function removeTailwindV4GeneratorAtRules(source: string): string;
|
|
3
3
|
export declare function isCommentOnlyCss(source: string): boolean;
|
|
4
|
+
export interface RemoveMiniProgramInteractiveSelectorsOptions {
|
|
5
|
+
active?: boolean | undefined;
|
|
6
|
+
hover?: boolean | undefined;
|
|
7
|
+
focus?: boolean | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare function removeMiniProgramInteractiveSelectors(source: string, options?: RemoveMiniProgramInteractiveSelectorsOptions): string;
|
|
4
10
|
export declare function removeMiniProgramHoverSelectors(source: string, enabled?: boolean | undefined): string;
|
|
5
11
|
export declare function removeProcessedMiniProgramUnsupportedCss(source: string, options: Partial<IStyleHandlerOptions>): string;
|
|
6
12
|
export declare function unwrapMiniProgramCascadeLayers(source: string): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { filterApplyOnlyGeneratedCss, normalizeEmptyTailwindCustomVariants, shouldFilterApplyOnlyGeneratedCss } from './user-css/apply-only.js';
|
|
2
2
|
export { removeTailwindV4GeneratedUserCssArtifacts } from './user-css/generated-cleanup.js';
|
|
3
|
-
export { isCommentOnlyCss, removeMiniProgramHoverSelectors, removeTailwindV4GeneratorAtRules, stripTailwindSourceMediaFragments, stripUnmatchedTailwindSourceMediaCloseFragments } from './user-css/source-fragments.js';
|
|
3
|
+
export { isCommentOnlyCss, removeMiniProgramHoverSelectors, removeMiniProgramInteractiveSelectors, removeTailwindV4GeneratorAtRules, stripTailwindSourceMediaFragments, stripUnmatchedTailwindSourceMediaCloseFragments } from './user-css/source-fragments.js';
|
|
4
4
|
export { transformGeneratorUserCss } from './user-css/transform.js';
|
|
5
5
|
export { extractGeneratedCssForUserLayerSelectors, hasUserCssLayerBlocks, splitUserCssLayerBlocks } from './user-css/user-layers.js';
|
|
@@ -4,6 +4,7 @@ export interface HmrTimingDetails {
|
|
|
4
4
|
hooks?: Record<string, HmrTimingHookSummary>;
|
|
5
5
|
metric?: 'hook' | 'total';
|
|
6
6
|
memoryDebug?: Record<string, unknown> | undefined;
|
|
7
|
+
timingDetails?: Record<string, number> | undefined;
|
|
7
8
|
wallMs?: number;
|
|
8
9
|
}
|
|
9
10
|
export interface HmrTimingHookSummary {
|
|
@@ -6,5 +6,7 @@ interface ResolveSourceCandidateScanFilesOptions {
|
|
|
6
6
|
outDir?: string | undefined;
|
|
7
7
|
root: string;
|
|
8
8
|
}
|
|
9
|
+
type SourceCandidateEligibilityRoot = Omit<ResolveSourceCandidateScanFilesOptions, 'filter'>;
|
|
10
|
+
export declare function createSourceCandidateEligibilityMatcher(roots: SourceCandidateEligibilityRoot[]): (file: string) => boolean;
|
|
9
11
|
export declare function resolveSourceCandidateScanFiles(options: ResolveSourceCandidateScanFilesOptions): Promise<string[]>;
|
|
10
12
|
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { OutputBundle } from 'rollup';
|
|
2
|
+
import type { ViteFrameworkCssPipelineContext } from '../shared/framework-strategy.js';
|
|
3
|
+
import type { CssFinalizerContext } from './options.js';
|
|
4
|
+
interface GenericWebFinalizerFastPathContext {
|
|
5
|
+
bundle: OutputBundle;
|
|
6
|
+
context: CssFinalizerContext;
|
|
7
|
+
createCssPipelineContext: (file: string) => ViteFrameworkCssPipelineContext;
|
|
8
|
+
isHarmonyAppStyleTarget: boolean;
|
|
9
|
+
isNativeAppStyleTarget: boolean;
|
|
10
|
+
isWebGeneratorTarget: boolean;
|
|
11
|
+
recordTiming: (phase: string, startedAt: number) => void;
|
|
12
|
+
rootDir: string;
|
|
13
|
+
sourceRoot: string | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare function tryFinalizeGenericWebCss(options: GenericWebFinalizerFastPathContext): boolean;
|
|
16
|
+
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { IStyleHandlerOptions } from '@weapp-tailwindcss/postcss/types';
|
|
2
2
|
import type { OutputAsset } from 'rollup';
|
|
3
3
|
import type { ResolvedConfig } from 'vite';
|
|
4
|
+
import type { HmrTimingRecorder } from '../../shared/hmr-timing.js';
|
|
5
|
+
import type { ViteCssAssetIdentity } from '../css-asset-identity.js';
|
|
4
6
|
import type { ViteFrameworkCssPipelineContext, ViteFrameworkCssPipelineStrategy } from '../shared/framework-strategy.js';
|
|
5
7
|
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan.js';
|
|
6
8
|
import type { InternalUserDefinedOptions } from '../../../types/index.js';
|
|
@@ -9,6 +11,7 @@ interface RememberedMainCssSource {
|
|
|
9
11
|
sourceFile: string;
|
|
10
12
|
}
|
|
11
13
|
export interface CssFinalizerContext {
|
|
14
|
+
frameworkName?: string | undefined;
|
|
12
15
|
opts: InternalUserDefinedOptions;
|
|
13
16
|
runtimeState: {
|
|
14
17
|
tailwindRuntime: InternalUserDefinedOptions['tailwindRuntime'];
|
|
@@ -38,7 +41,9 @@ export interface CssFinalizerContext {
|
|
|
38
41
|
rememberMainCssSource?: (file: string, rawSource: string) => void;
|
|
39
42
|
getRememberedMainCssSource?: (file: string) => RememberedMainCssSource | undefined;
|
|
40
43
|
isViteProcessedCssAsset?: (asset: OutputAsset, file?: string) => boolean;
|
|
44
|
+
resolveCssAssetIdentity?: (asset: OutputAsset, file?: string) => ViteCssAssetIdentity;
|
|
41
45
|
frameworkRootImportShellTargetByFile?: ReadonlyMap<string, string> | undefined;
|
|
46
|
+
hmrTimingRecorder?: HmrTimingRecorder | undefined;
|
|
42
47
|
}
|
|
43
48
|
export interface CssFinalizerThis {
|
|
44
49
|
addWatchFile?: (id: string) => void;
|
|
@@ -8,6 +8,7 @@ import type { SourceCandidateFilterOptions } from '../source-candidates.js';
|
|
|
8
8
|
import type { TailwindSourceEntry } from '../../../tailwindcss/source-scan.js';
|
|
9
9
|
import type { InternalUserDefinedOptions } from '../../../types/index.js';
|
|
10
10
|
export interface GenerateBundleContext {
|
|
11
|
+
onSkipProcessBundle?: (() => void | Promise<void>) | undefined;
|
|
11
12
|
processMarkupAndScripts?: boolean | undefined;
|
|
12
13
|
processStyles?: boolean | undefined;
|
|
13
14
|
shouldProcessBundle?: (() => boolean) | undefined;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ResolvedConfig } from 'vite';
|
|
2
|
+
interface GenericWebProductionFastPathOptions {
|
|
3
|
+
command: ResolvedConfig['command'] | undefined;
|
|
4
|
+
frameworkName: string;
|
|
5
|
+
hasProcessedCss: boolean;
|
|
6
|
+
isWebGeneratorTarget: boolean;
|
|
7
|
+
watch: ResolvedConfig['build']['watch'] | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface GenericWebFinalizerFastPathOptions extends GenericWebProductionFastPathOptions {
|
|
10
|
+
hasFrameworkRootImportShells: boolean;
|
|
11
|
+
isHarmonyAppStyleTarget: boolean;
|
|
12
|
+
isNativeAppStyleTarget: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface GenericWebProductionBundleHooksOptions {
|
|
15
|
+
frameworkName: string;
|
|
16
|
+
getHasProcessedCss: () => boolean;
|
|
17
|
+
getIsWebGeneratorTarget: () => boolean;
|
|
18
|
+
getResolvedConfig: () => ResolvedConfig | undefined;
|
|
19
|
+
onEnd: () => void;
|
|
20
|
+
onStart: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare function shouldUseGenericWebProductionFastPath(options: GenericWebProductionFastPathOptions): boolean;
|
|
23
|
+
export declare function shouldUseGenericWebFinalizerFastPath(options: GenericWebFinalizerFastPathOptions): boolean;
|
|
24
|
+
export declare function createGenericWebProductionBundleHooks(options: GenericWebProductionBundleHooksOptions): {
|
|
25
|
+
onSkipProcessBundle: () => void;
|
|
26
|
+
shouldProcessBundle: () => boolean;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -49,3 +49,4 @@ export interface WebpackLoaderRuntimeEntry {
|
|
|
49
49
|
export declare function setWebpackLoaderRuntime(key: string, entry: WebpackLoaderRuntimeEntry): void;
|
|
50
50
|
export declare function deleteWebpackLoaderRuntime(key: string): void;
|
|
51
51
|
export declare function getWebpackLoaderRuntime(key?: string): any;
|
|
52
|
+
export declare function getLatestWebpackLoaderRuntime(): any;
|