@weapp-tailwindcss/postcss 3.1.6 → 3.1.8
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/branches/index.d.ts +1 -0
- package/dist/branches/mini-program/index.d.ts +3 -0
- package/dist/branches/style.d.ts +11 -0
- package/dist/branches/uni-app-x-css-uvue/index.d.ts +3 -0
- package/dist/branches/uni-app-x-css-webview/index.d.ts +3 -0
- package/dist/branches/web/index.d.ts +3 -0
- package/dist/frameworks/generic/index.d.ts +1 -0
- package/dist/frameworks/index.d.ts +5 -0
- package/dist/frameworks/kbone/index.d.ts +1 -0
- package/dist/frameworks/mpx/index.d.ts +1 -0
- package/dist/frameworks/native/index.d.ts +1 -0
- package/dist/frameworks/remax/index.d.ts +1 -0
- package/dist/frameworks/shared.d.ts +5 -0
- package/dist/frameworks/taro/index.d.ts +1 -0
- package/dist/frameworks/types.d.ts +18 -0
- package/dist/frameworks/uni-app/index.d.ts +1 -0
- package/dist/frameworks/uni-app-vite/index.d.ts +1 -0
- package/dist/frameworks/uni-app-x/index.d.ts +2 -0
- package/dist/frameworks/weapp-vite/index.d.ts +1 -0
- package/dist/generator-plugin/local-imports.d.ts +6 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +48449 -48175
- package/dist/index.mjs +48437 -48171
- package/dist/pipeline.d.ts +4 -0
- package/dist/selectorParser/utils.d.ts +1 -1
- package/dist/style-targets/index.d.ts +1 -0
- package/dist/style-targets/style.d.ts +8 -0
- package/dist/types.d.ts +4 -0
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type PostcssAppType, type PostcssStyleBranch, type PostcssStyleBranchProfile, resolvePostcssStyleBranch, type ResolvePostcssStyleBranchOptions, resolvePostcssStyleBranchProfile, } from './style';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PostcssFrameworkProfile } from '../frameworks';
|
|
2
|
+
import type { PostcssStyleTarget } from '../style-targets';
|
|
3
|
+
import type { IStyleHandlerOptions } from '../types';
|
|
4
|
+
export type PostcssAppType = 'kbone' | 'mpx' | 'native' | 'remax' | 'taro' | 'uni-app' | 'uni-app-vite' | 'uni-app-x' | 'weapp-vite';
|
|
5
|
+
export type PostcssStyleBranch = PostcssStyleTarget;
|
|
6
|
+
export type PostcssStyleBranchProfile = PostcssFrameworkProfile;
|
|
7
|
+
export interface ResolvePostcssStyleBranchOptions extends Pick<IStyleHandlerOptions, 'platform' | 'uniAppX' | 'uniAppXCssTarget'> {
|
|
8
|
+
appType?: PostcssAppType | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function resolvePostcssStyleBranch(options: ResolvePostcssStyleBranchOptions): PostcssStyleBranch;
|
|
11
|
+
export declare function resolvePostcssStyleBranchProfile(options: ResolvePostcssStyleBranchOptions): PostcssStyleBranchProfile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const genericPostcssFrameworkStrategy: import("..").PostcssFrameworkStrategy;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PostcssFrameworkProfile, PostcssFrameworkStrategy, ResolvePostcssFrameworkOptions } from './types';
|
|
2
|
+
export declare function resolvePostcssFrameworkStrategy(options: ResolvePostcssFrameworkOptions): PostcssFrameworkStrategy;
|
|
3
|
+
export declare function resolvePostcssFrameworkProfile(options: ResolvePostcssFrameworkOptions): PostcssFrameworkProfile;
|
|
4
|
+
export declare function resolvePostcssStyleTarget(options: ResolvePostcssFrameworkOptions): import("..").PostcssStyleTarget;
|
|
5
|
+
export type { PostcssFrameworkProfile, PostcssFrameworkStrategy, PostcssFrameworkType, ResolvePostcssFrameworkOptions, } from './types';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const kbonePostcssFrameworkStrategy: import("..").PostcssFrameworkStrategy;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mpxPostcssFrameworkStrategy: import("..").PostcssFrameworkStrategy;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const nativePostcssFrameworkStrategy: import("..").PostcssFrameworkStrategy;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const remaxPostcssFrameworkStrategy: import("..").PostcssFrameworkStrategy;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PostcssStyleTarget } from '../style-targets';
|
|
2
|
+
import type { PostcssFrameworkStrategy, PostcssFrameworkType, ResolvePostcssFrameworkOptions } from './types';
|
|
3
|
+
export declare function isWebLikeStylePlatform(platform: string | undefined): boolean;
|
|
4
|
+
export declare function resolveWebPlatformOrTarget(options: Pick<ResolvePostcssFrameworkOptions, 'platform'>, fallbackTarget: PostcssStyleTarget): PostcssStyleTarget;
|
|
5
|
+
export declare function createStaticTargetFrameworkStrategy(framework: PostcssFrameworkType, fallbackTarget: PostcssStyleTarget): PostcssFrameworkStrategy;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const taroPostcssFrameworkStrategy: import("..").PostcssFrameworkStrategy;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Result } from 'postcss';
|
|
2
|
+
import type { PostcssAppType } from '../branches';
|
|
3
|
+
import type { PostcssStyleTarget } from '../style-targets';
|
|
4
|
+
import type { IStyleHandlerOptions } from '../types';
|
|
5
|
+
export type PostcssFrameworkType = PostcssAppType | 'generic';
|
|
6
|
+
export interface ResolvePostcssFrameworkOptions extends Pick<IStyleHandlerOptions, 'platform' | 'uniAppX' | 'uniAppXCssTarget'> {
|
|
7
|
+
appType?: PostcssAppType | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface PostcssFrameworkStrategy {
|
|
10
|
+
framework: PostcssFrameworkType;
|
|
11
|
+
resolveStyleTarget: (options: ResolvePostcssFrameworkOptions) => PostcssStyleTarget;
|
|
12
|
+
}
|
|
13
|
+
export interface PostcssFrameworkProfile {
|
|
14
|
+
framework: PostcssFrameworkType;
|
|
15
|
+
target: PostcssStyleTarget;
|
|
16
|
+
branch: PostcssStyleTarget;
|
|
17
|
+
postprocess: (result: Result, options: IStyleHandlerOptions) => Result;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const uniAppPostcssFrameworkStrategy: import("..").PostcssFrameworkStrategy;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const uniAppVitePostcssFrameworkStrategy: import("..").PostcssFrameworkStrategy;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const weappVitePostcssFrameworkStrategy: import("..").PostcssFrameworkStrategy;
|
|
@@ -6,10 +6,16 @@ export interface RewriteLocalCssImportRequestOptions {
|
|
|
6
6
|
export interface RestoreLocalCssImportOptions {
|
|
7
7
|
outputFile?: string | undefined;
|
|
8
8
|
}
|
|
9
|
+
export interface CollectCssImportRequestsRootOptions {
|
|
10
|
+
isSupportedImportRequest?: ((request: string) => boolean) | undefined;
|
|
11
|
+
}
|
|
9
12
|
export declare function createCssSourceOrderAppend(base: string, extra: string): string;
|
|
10
13
|
export declare function isLocalCssImportRequest(request: string): boolean;
|
|
14
|
+
export declare function isMiniProgramLocalCssImportRequest(request: string): boolean;
|
|
11
15
|
export declare function removeTailwindSourceDirectivesRoot(root: Root, options?: TailwindCssDirectiveOptions): boolean;
|
|
12
16
|
export declare function isPureLocalCssImportWrapperRoot(root: Root): boolean;
|
|
17
|
+
export declare function collectCssImportRequestsRoot(root: Root, options?: CollectCssImportRequestsRootOptions): Set<string>;
|
|
18
|
+
export declare function removeUnsupportedMiniProgramCssImportsRoot(root: Root): boolean;
|
|
13
19
|
export declare function isPureLocalCssImportWrapper(css: string): boolean;
|
|
14
20
|
export declare function prefixLocalCssImportsWithWebpackIgnoreRoot(root: Root): boolean;
|
|
15
21
|
export declare function cleanLocalCssImportWrapperTailwindDirectivesRoot(root: Root): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { type PostcssAppType, type PostcssStyleBranch, type PostcssStyleBranchProfile, resolvePostcssStyleBranch, type ResolvePostcssStyleBranchOptions, resolvePostcssStyleBranchProfile, } from './branches';
|
|
1
2
|
export { type DynamicColorMixAlphaProtection, type DynamicColorMixAlphaProtectionOptions, type ModernColorValueNormalization, normalizeModernColorValue, protectDynamicColorMixAlpha, } from './compat/color-mix';
|
|
2
3
|
export { finalizeMiniProgramCss, hasMiniProgramCssSpecificityPlaceholders, hoistTailwindPreflightBase, pruneMiniProgramGeneratedCss, removeUnsupportedAtSupports, removeUnsupportedCascadeLayers, removeUnsupportedMiniProgramAtRules, stripMiniProgramCssSpecificityPlaceholders, unwrapUnsupportedCascadeLayers, } from './compat/mini-program-css';
|
|
3
4
|
export { normalizeMiniProgramPrefixedDeclaration, removeUnsupportedMiniProgramPrefixedAtRule, } from './compat/mini-program-prefixes';
|
|
@@ -5,11 +6,12 @@ export { convertTailwindcssRpxDeclarationsToRem, convertTailwindcssRpxDeclaratio
|
|
|
5
6
|
export { type NormalizedWebCssCompatOptions, normalizeWebCssCompatOptions, transformWebCssCompat, transformWebCssSafeSelectors, } from './compat/web-css';
|
|
6
7
|
export { compileCssMacroConditionalComments, CSS_MACRO_STYLE_OPTIONS_MARKER, hasCssMacroStyleOptions, hasCssMacroTailwindV4CustomVariantConditionalComments, hasCssMacroTailwindV4Directive, hasCssMacroTailwindV4InternalAtRules, hasCssMacroTailwindV4Source, transformCssMacroCss, transformCssMacroTailwindV4Source, withCssMacroStyleOptions, } from './css-macro/auto';
|
|
7
8
|
export { CSS_MACRO_POSTCSS_PLUGIN_NAME, default as cssMacroPostcssPlugin } from './css-macro/postcss';
|
|
9
|
+
export { type PostcssFrameworkProfile, type PostcssFrameworkStrategy, type PostcssFrameworkType, type ResolvePostcssFrameworkOptions, resolvePostcssFrameworkProfile, resolvePostcssFrameworkStrategy, resolvePostcssStyleTarget, } from './frameworks';
|
|
8
10
|
export { createWeappTailwindcssPostcssPlugin } from './generator-plugin';
|
|
9
11
|
export type { NormalizedWeappTailwindcssPostcssGeneratorOptions, TailwindCandidateSource, TailwindResolvedSource, TailwindV4SourceOptions, WeappTailwindcssPostcssGenerateOptions, WeappTailwindcssPostcssGenerateResult, WeappTailwindcssPostcssGenerator, WeappTailwindcssPostcssGeneratorUserOptions, WeappTailwindcssPostcssPluginAdapters, WeappTailwindcssPostcssPluginOptions, WeappTailwindcssPostcssTarget, } from './generator-plugin';
|
|
10
12
|
export { collectApplyOnlyCssSelectors, collectApplyOnlyCssSelectorsRoot, filterApplyOnlyGeneratedCss, filterApplyOnlyGeneratedCssRoot, } from './generator-plugin/apply-only';
|
|
11
13
|
export { analyzeTailwindCssDirectives, isTailwindCssGenerationDirective, isTailwindCssImportAtRule, isTailwindCssImportRequest, isTailwindCssPackageJsonImportRequest, isWeappTailwindcssImportRequest, normalizeTailwindCssImportRequest, parseTailwindCssConfigRequest, parseTailwindCssDirectiveRequest, type TailwindCssDirectiveAnalysis, type TailwindCssDirectiveAnalysisOptions, type TailwindCssDirectiveOptions, } from './generator-plugin/directives';
|
|
12
|
-
export { cleanLocalCssImportWrapperTailwindDirectives, cleanLocalCssImportWrapperTailwindDirectivesRoot, createCssSourceOrderAppend, isLocalCssImportRequest, isPureLocalCssImportWrapper, isPureLocalCssImportWrapperRoot, normalizeOutputImportRequest, prefixLocalCssImportsWithWebpackIgnoreRoot, removeTailwindSourceDirectivesRoot, restoreLocalCssImports, type RewriteLocalCssImportRequestOptions, rewriteLocalCssImportRequestsForOutput, rewriteLocalCssImportRequestsForOutputRoot, splitLocalCssImports, splitLocalCssImportsRoot, } from './generator-plugin/local-imports';
|
|
14
|
+
export { cleanLocalCssImportWrapperTailwindDirectives, cleanLocalCssImportWrapperTailwindDirectivesRoot, collectCssImportRequestsRoot, type CollectCssImportRequestsRootOptions, createCssSourceOrderAppend, isLocalCssImportRequest, isMiniProgramLocalCssImportRequest, isPureLocalCssImportWrapper, isPureLocalCssImportWrapperRoot, normalizeOutputImportRequest, prefixLocalCssImportsWithWebpackIgnoreRoot, removeTailwindSourceDirectivesRoot, removeUnsupportedMiniProgramCssImportsRoot, restoreLocalCssImports, type RewriteLocalCssImportRequestOptions, rewriteLocalCssImportRequestsForOutput, rewriteLocalCssImportRequestsForOutputRoot, splitLocalCssImports, splitLocalCssImportsRoot, } from './generator-plugin/local-imports';
|
|
13
15
|
export * from './handler';
|
|
14
16
|
export { default as postcssHtmlTransform, type IOptions as PostcssHtmlTransformOptions } from './html-transform';
|
|
15
17
|
export { createStylePipeline, type PipelineNodeContext, type PipelineNodeCursor, type PipelineStage, type ResolvedPipelineNode, type StyleProcessingPipeline, } from './pipeline';
|
|
@@ -20,6 +22,7 @@ export type { AcceptedPlugin, AtRule, Container, Declaration, Document, Helpers,
|
|
|
20
22
|
export { createInjectPreflight } from './preflight';
|
|
21
23
|
export { internalCssSelectorReplacer } from './shared';
|
|
22
24
|
export { collectCssInlineSourceCandidates, createSourceScanPattern, createTailwindSourceEntryMatcher, expandInlineSourceCandidatePattern, expandTailwindSourceEntries, FULL_SOURCE_SCAN_EXTENSION_RE, FULL_SOURCE_SCAN_EXTENSIONS, FULL_SOURCE_SCAN_PATTERN, isFileExcludedByTailwindSourceEntries, isFileMatchedByTailwindSourceEntries, normalizeLegacyContentEntries, parseConfigParam, parseSourceFileParam, resolveCssSourceEntries, resolveSourceScanPath, resolveTailwindSourceEntry, type TailwindInlineSourceCandidates, type TailwindSourceEntry, toPosixPath, } from './source-scan';
|
|
25
|
+
export { createPostcssStyleTargetProfile, type PostcssStyleTarget, type PostcssStyleTargetProfile, } from './style-targets';
|
|
23
26
|
export * from './types';
|
|
24
27
|
export { containsCssAfterMinify, filterExistingCssRules, mergeCoveredCssRuleDeclarations, mergeMiniProgramPreflightRuleDeclarations, mergeMiniProgramThemeScopeRuleDeclarations, } from './vite-css-rules';
|
|
25
28
|
export { composeRules as unitConversionComposeRules, presets as unitConversionPresets, } from 'postcss-rule-unit-converter';
|