@weapp-tailwindcss/postcss 3.1.11 → 3.2.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/dist/branches/index.d.ts +1 -1
- package/dist/branches/mini-program/index.d.ts +1 -1
- package/dist/branches/style.d.ts +3 -3
- package/dist/branches/uni-app-x-css-uvue/index.d.ts +1 -1
- package/dist/branches/uni-app-x-css-webview/index.d.ts +1 -1
- package/dist/branches/web/index.d.ts +1 -1
- package/dist/compat/mini-program-css/finalize-options.d.ts +8 -1
- package/dist/compat/mini-program-css/finalize.d.ts +4 -4
- package/dist/compat/mini-program-css/index.d.ts +5 -5
- package/dist/compat/mini-program-css/preflight.d.ts +1 -1
- package/dist/compat/mini-program-css/prune-generated.d.ts +1 -0
- package/dist/compat/mini-program-css/root-cleanups.d.ts +2 -1
- package/dist/compat/mini-program-css/selectors.d.ts +1 -1
- package/dist/compat/mini-program-css/theme.d.ts +1 -1
- package/dist/compat/tailwindcss-v4/declarations.d.ts +2 -0
- package/dist/compat/tailwindcss-v4/gradients.d.ts +8 -0
- package/dist/compat/tailwindcss-v4/modern-syntax.d.ts +6 -0
- package/dist/compat/tailwindcss-v4/variables.d.ts +30 -0
- package/dist/compat/tailwindcss-v4.d.ts +4 -21
- package/dist/compat/uni-app-x-uvue/theme.d.ts +7 -0
- package/dist/compat/uni-app-x-uvue.d.ts +3 -2
- package/dist/compat/uni-app-x.d.ts +1 -1
- package/dist/compat/web-css.d.ts +1 -1
- package/dist/css-macro/auto.d.ts +1 -1
- package/dist/css-macro/postcss.cjs +7 -0
- package/dist/css-macro/postcss.js +2 -7
- package/dist/defaults.d.ts +1 -1
- package/dist/frameworks/generic/index.d.ts +1 -1
- package/dist/frameworks/index.d.ts +3 -3
- package/dist/frameworks/kbone/index.d.ts +1 -1
- package/dist/frameworks/mpx/index.d.ts +1 -1
- package/dist/frameworks/native/index.d.ts +1 -1
- package/dist/frameworks/remax/index.d.ts +1 -1
- package/dist/frameworks/shared.d.ts +2 -2
- package/dist/frameworks/taro/index.d.ts +1 -1
- package/dist/frameworks/types.d.ts +3 -3
- package/dist/frameworks/uni-app/index.d.ts +1 -1
- package/dist/frameworks/uni-app-vite/index.d.ts +1 -1
- package/dist/frameworks/uni-app-x/index.d.ts +1 -1
- package/dist/frameworks/weapp-vite/index.d.ts +1 -1
- package/dist/generator-plugin/context.d.ts +1 -1
- package/dist/generator-plugin/index.d.ts +2 -2
- package/dist/generator-plugin/local-imports.d.ts +1 -1
- package/dist/generator-plugin/source-files.d.ts +2 -2
- package/dist/generator-plugin/types.d.ts +1 -1
- package/dist/handler.d.ts +1 -1
- package/dist/{html-transform.mjs → html-transform.cjs} +6 -4
- package/dist/html-transform.js +4 -6
- package/dist/{index.mjs → index.cjs} +3393 -22728
- package/dist/index.d.ts +28 -27
- package/dist/index.js +2385 -62712
- package/dist/mp.d.ts +1 -1
- package/dist/options-resolver.d.ts +1 -1
- package/dist/pipeline.d.ts +3 -3
- package/dist/plugins/getCalcDuplicateCleaner.d.ts +1 -1
- package/dist/plugins/getCalcPlugin.d.ts +1 -1
- package/dist/plugins/getCustomPropertyCleaner.d.ts +1 -1
- package/dist/plugins/getPxTransformPlugin.d.ts +1 -1
- package/dist/plugins/getRemTransformPlugin.d.ts +1 -1
- package/dist/plugins/getUnitConversionPlugin.d.ts +1 -1
- package/dist/plugins/getUnitsToPxPlugin.d.ts +1 -1
- package/dist/plugins/index.d.ts +4 -4
- package/dist/plugins/post/specificity-cleaner.d.ts +1 -1
- package/dist/plugins/post.d.ts +2 -2
- package/dist/plugins/pre.d.ts +1 -1
- package/dist/{postcss-BNPP2oxO.mjs → postcss-CICDAfoB.js} +11 -2
- package/dist/{postcss-DAEMn9OL.js → postcss-CfbYRXJi.cjs} +11 -2
- package/dist/postcss-config.d.ts +4 -0
- package/dist/preflight.d.ts +1 -1
- package/dist/processor-cache.d.ts +3 -3
- package/dist/selectorParser/fallback.d.ts +1 -1
- package/dist/selectorParser/rule-transformer/nodes.d.ts +1 -1
- package/dist/selectorParser/rule-transformer/pseudos.d.ts +2 -2
- package/dist/selectorParser/rule-transformer/types.d.ts +1 -1
- package/dist/selectorParser/rule-transformer.d.ts +1 -1
- package/dist/selectorParser/spacing.d.ts +1 -1
- package/dist/selectorParser/utils.d.ts +1 -1
- package/dist/selectorParser.d.ts +4 -4
- package/dist/shared.d.ts +1 -1
- package/dist/source-scan.d.ts +2 -2
- package/dist/style-targets/index.d.ts +1 -1
- package/dist/style-targets/style.d.ts +1 -1
- package/dist/types.cjs +0 -0
- package/dist/types.d.ts +15 -7
- package/dist/types.js +1 -0
- package/dist/vite-css-rules/containment.d.ts +2 -0
- package/dist/vite-css-rules/coverage.d.ts +9 -0
- package/dist/vite-css-rules/mini-program.d.ts +10 -0
- package/dist/vite-css-rules/structure.d.ts +26 -0
- package/dist/vite-css-rules.d.ts +3 -18
- package/package.json +27 -25
- package/dist/css-macro/postcss.mjs +0 -2
- package/dist/types.mjs +0 -1
- /package/dist/{rolldown-runtime-emK7D4bc.js → rolldown-runtime-emK7D4bc.cjs} +0 -0
package/dist/branches/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type PostcssAppType, type PostcssStyleBranch, type PostcssStyleBranchProfile, resolvePostcssStyleBranch, type ResolvePostcssStyleBranchOptions, resolvePostcssStyleBranchProfile, } from './style';
|
|
1
|
+
export { type PostcssAppType, type PostcssStyleBranch, type PostcssStyleBranchProfile, resolvePostcssStyleBranch, type ResolvePostcssStyleBranchOptions, resolvePostcssStyleBranchProfile, } from './style.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Result } from 'postcss';
|
|
2
|
-
import type { IStyleHandlerOptions } from '../../types';
|
|
2
|
+
import type { IStyleHandlerOptions } from '../../types.js';
|
|
3
3
|
export declare function postprocessMiniProgramCss(result: Result, _options: IStyleHandlerOptions): Result<import("postcss").Document | import("postcss").Root>;
|
package/dist/branches/style.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { PostcssFrameworkProfile } from '../frameworks';
|
|
2
|
-
import type { PostcssStyleTarget } from '../style-targets';
|
|
3
|
-
import type { IStyleHandlerOptions } from '../types';
|
|
1
|
+
import type { PostcssFrameworkProfile } from '../frameworks/index.js';
|
|
2
|
+
import type { PostcssStyleTarget } from '../style-targets/index.js';
|
|
3
|
+
import type { IStyleHandlerOptions } from '../types.js';
|
|
4
4
|
export type PostcssAppType = 'kbone' | 'mpx' | 'native' | 'remax' | 'taro' | 'uni-app' | 'uni-app-vite' | 'uni-app-x' | 'weapp-vite';
|
|
5
5
|
export type PostcssStyleBranch = PostcssStyleTarget;
|
|
6
6
|
export type PostcssStyleBranchProfile = PostcssFrameworkProfile;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Result } from 'postcss';
|
|
2
|
-
import type { IStyleHandlerOptions } from '../../types';
|
|
2
|
+
import type { IStyleHandlerOptions } from '../../types.js';
|
|
3
3
|
export declare function postprocessUniAppXUvueCss(result: Result, options: IStyleHandlerOptions): Result<import("postcss").Document | import("postcss").Root>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Result } from 'postcss';
|
|
2
|
-
import type { IStyleHandlerOptions } from '../../types';
|
|
2
|
+
import type { IStyleHandlerOptions } from '../../types.js';
|
|
3
3
|
export declare function postprocessUniAppXWebviewCss(result: Result, options: IStyleHandlerOptions): Result<import("postcss").Document | import("postcss").Root>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Result } from 'postcss';
|
|
2
|
-
import type { IStyleHandlerOptions } from '../../types';
|
|
2
|
+
import type { IStyleHandlerOptions } from '../../types.js';
|
|
3
3
|
export declare function postprocessWebCss(result: Result, _options: IStyleHandlerOptions): Result<import("postcss").Document | import("postcss").Root>;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import type { CssPreflightOptions, CssSelectorReplacement } from '../../types';
|
|
1
|
+
import type { CssPreflightOptions, CssSelectorReplacement } from '../../types.js';
|
|
2
2
|
export interface FinalizeMiniProgramCssOptions {
|
|
3
3
|
cssPreflight?: CssPreflightOptions | undefined;
|
|
4
4
|
cssSelectorReplacement?: CssSelectorReplacement | undefined;
|
|
5
5
|
isTailwindcssV4?: boolean | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* 是否递归移除子规则被清理而变空的父级条件规则。
|
|
8
|
+
*
|
|
9
|
+
* 增量生成的 CSS 可能只包含条件规则中的新片段,父级容器由已缓存产物提供,
|
|
10
|
+
* 此时应保留占位容器,避免后续追加 CSS 时丢失层级。
|
|
11
|
+
*/
|
|
12
|
+
removeEmptyAtRuleAncestors?: boolean | undefined;
|
|
6
13
|
/**
|
|
7
14
|
* 是否为 Tailwind CSS v4 渐变工具类生成小程序字面量兜底。
|
|
8
15
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FinalizeMiniProgramCssOptions } from './finalize-options';
|
|
2
|
-
export type { FinalizeMiniProgramCssOptions } from './finalize-options';
|
|
3
|
-
export { insertHoistedRules } from './hoist';
|
|
4
|
-
export { collectPreflightRules } from './preflight';
|
|
1
|
+
import type { FinalizeMiniProgramCssOptions } from './finalize-options.js';
|
|
2
|
+
export type { FinalizeMiniProgramCssOptions } from './finalize-options.js';
|
|
3
|
+
export { insertHoistedRules } from './hoist.js';
|
|
4
|
+
export { collectPreflightRules } from './preflight.js';
|
|
5
5
|
export declare function hoistTailwindPreflightBase(css: string): string;
|
|
6
6
|
export declare function finalizeMiniProgramCss(css: string, options?: FinalizeMiniProgramCssOptions): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { removeUnsupportedAtSupports, removeUnsupportedCascadeLayers, removeUnsupportedMiniProgramAtRules, unwrapUnsupportedCascadeLayers, } from './at-rules';
|
|
2
|
-
export { consumeCascadeLayers } from './cascade-layers';
|
|
3
|
-
export { finalizeMiniProgramCss, type FinalizeMiniProgramCssOptions, hoistTailwindPreflightBase, } from './finalize';
|
|
4
|
-
export { normalizeMiniProgramGeneratedCssForPostcss, pruneMiniProgramGeneratedCss, type PruneMiniProgramGeneratedCssOptions, } from './prune-generated';
|
|
5
|
-
export { hasMiniProgramCssSpecificityPlaceholders, stripMiniProgramCssSpecificityPlaceholders, } from './root-cleanups';
|
|
1
|
+
export { removeUnsupportedAtSupports, removeUnsupportedCascadeLayers, removeUnsupportedMiniProgramAtRules, unwrapUnsupportedCascadeLayers, } from './at-rules.js';
|
|
2
|
+
export { consumeCascadeLayers } from './cascade-layers.js';
|
|
3
|
+
export { finalizeMiniProgramCss, type FinalizeMiniProgramCssOptions, hoistTailwindPreflightBase, } from './finalize.js';
|
|
4
|
+
export { normalizeMiniProgramGeneratedCssForPostcss, pruneMiniProgramGeneratedCss, type PruneMiniProgramGeneratedCssOptions, } from './prune-generated.js';
|
|
5
|
+
export { hasMiniProgramCssSpecificityPlaceholders, removeEmptyAtRules, stripMiniProgramCssSpecificityPlaceholders, } from './root-cleanups.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CssPreflightOptions, CssSelectorReplacement } from '../../types';
|
|
1
|
+
import type { CssPreflightOptions, CssSelectorReplacement } from '../../types.js';
|
|
2
2
|
import postcss from 'postcss';
|
|
3
3
|
export declare function collectPreflightRules(root: postcss.Root, options?: {
|
|
4
4
|
cssPreflight?: CssPreflightOptions | undefined;
|
|
@@ -4,7 +4,8 @@ export declare function hasMiniProgramCssSpecificityPlaceholders(source: string)
|
|
|
4
4
|
export declare function stripMiniProgramCssSpecificityPlaceholders(source: string): string;
|
|
5
5
|
export declare const removeSpecificityPlaceholdersFromSource: typeof stripMiniProgramCssSpecificityPlaceholders;
|
|
6
6
|
export declare function removeRootSpecificityPlaceholders(root: postcss.Root): void;
|
|
7
|
-
export declare function removeEmptyAtRules(root: postcss.Root):
|
|
7
|
+
export declare function removeEmptyAtRules(root: postcss.Root): number;
|
|
8
|
+
export declare function removeEmptyBlockAtRules(root: postcss.Root): number;
|
|
8
9
|
export declare function removeUnsupportedBrowserSelectors(root: postcss.Root): void;
|
|
9
10
|
export declare function removeDisplayP3Declarations(root: postcss.Root): void;
|
|
10
11
|
interface RemoveTailwindContainerRulesOptions {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type postcss from 'postcss';
|
|
2
|
-
import type { CssSelectorReplacement } from '../../types';
|
|
2
|
+
import type { CssSelectorReplacement } from '../../types.js';
|
|
3
3
|
export declare const MINI_PROGRAM_THEME_SCOPE_SELECTOR = ":host,page,.tw-root,wx-root-portal-content";
|
|
4
4
|
export declare const MINI_PROGRAM_ELEMENT_SCOPE_SELECTOR = "view,text,::after,::before";
|
|
5
5
|
export declare const MINI_PROGRAM_ELEMENT_SCOPE_SELECTORS: Set<string>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { FinalizeMiniProgramCssOptions } from './finalize-options';
|
|
1
|
+
import type { FinalizeMiniProgramCssOptions } from './finalize-options.js';
|
|
2
2
|
import postcss from 'postcss';
|
|
3
3
|
export declare function collectThemeVariableRule(root: postcss.Root, options?: FinalizeMiniProgramCssOptions): postcss.Rule | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Declaration as PostcssDeclaration, Root, Rule } from 'postcss';
|
|
2
|
+
export declare function normalizeTailwindcssV4GradientPosition(value: string): string;
|
|
3
|
+
export declare function normalizeTailwindcssV4InfinityCalcValue(value: string): string;
|
|
4
|
+
/** 在预处理器解析前收敛 Tailwind v4 生成的无限圆角,避免 Sass 将 infinity 当作非法表达式。 */
|
|
5
|
+
export declare function normalizeTailwindcssV4InfinityCalcCss(css: string): string;
|
|
6
|
+
export declare function normalizeTailwindcssV4GradientDirectionDeclaration(rule: Rule, decl: PostcssDeclaration): string;
|
|
7
|
+
export declare function mergeTailwindcssV4GradientDirectionRules(root: Root): void;
|
|
8
|
+
export declare function appendTailwindcssV4MiniProgramGradientRules(root: Root): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AtRule, Declaration } from 'postcss';
|
|
2
|
+
export declare function isTailwindcssV4ModernCheck(atRule: AtRule): boolean;
|
|
3
|
+
export declare function isTailwindcssV4LinearGradientSupports(atRule: AtRule): boolean;
|
|
4
|
+
export declare function isTailwindcssV4DisplayP3Supports(atRule: AtRule): boolean;
|
|
5
|
+
export declare function isTailwindcssV4DisplayP3Media(atRule: AtRule): boolean;
|
|
6
|
+
export declare function isTailwindcssV4DisplayP3Declaration(decl: Declaration): boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Root, Rule } from 'postcss';
|
|
2
|
+
import { Declaration } from 'postcss';
|
|
3
|
+
export declare const RADIUS_THRESHOLD = 100000;
|
|
4
|
+
export declare const CLAMP_PX = 9999;
|
|
5
|
+
export declare const INFINITY_CALC_VALUE_REGEXP: RegExp;
|
|
6
|
+
export declare const MODERN_CHECK_WEBKIT_HYPHENS_RE: RegExp;
|
|
7
|
+
export declare const MODERN_CHECK_MARGIN_TRIM_RE: RegExp;
|
|
8
|
+
export declare const MODERN_CHECK_MOZ_ORIENT_RE: RegExp;
|
|
9
|
+
export declare const MODERN_CHECK_COLOR_RGB_RE: RegExp;
|
|
10
|
+
export declare const LINEAR_GRADIENT_LAB_RE: RegExp;
|
|
11
|
+
export declare const DISPLAY_P3_COLOR_RE: RegExp;
|
|
12
|
+
export declare const DISPLAY_P3_VALUE_RE: RegExp;
|
|
13
|
+
export declare const COLOR_GAMUT_P3_RE: RegExp;
|
|
14
|
+
export declare const GRADIENT_BACKGROUND_RE: RegExp;
|
|
15
|
+
export declare const GRADIENT_STOPS_VAR_RE: RegExp;
|
|
16
|
+
export declare const SIMPLE_CLASS_SELECTOR_RE: RegExp;
|
|
17
|
+
export declare const COLOR_VAR_RE: RegExp;
|
|
18
|
+
export declare const GRADIENT_DIRECTION_CLASS_RE: RegExp;
|
|
19
|
+
export declare const RADIUS_VALUE_RE: RegExp;
|
|
20
|
+
export declare const SCIENTIFIC_NOTATION_RE: RegExp;
|
|
21
|
+
export declare const TW_GRADIENT_POSITION_PROPS: Set<string>;
|
|
22
|
+
export declare function isTailwindcssV4(options?: {
|
|
23
|
+
majorVersion?: 4;
|
|
24
|
+
}): boolean;
|
|
25
|
+
export declare function testIfRootHostForV4(node: Rule): boolean;
|
|
26
|
+
export declare const cssVarsV4Nodes: Declaration[];
|
|
27
|
+
export declare function collectUsedTailwindcssV4Variables(root: Root): Set<string>;
|
|
28
|
+
export declare function usesTailwindcssV4ContentVariable(root: Root): boolean;
|
|
29
|
+
export declare function createUsedCssVarsV4Nodes(usedProps: ReadonlySet<string>): Declaration[];
|
|
30
|
+
export declare function createMissingCssVarsV4Nodes(root: Root, usedProps: ReadonlySet<string>): Declaration[];
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}): boolean;
|
|
6
|
-
export declare function testIfRootHostForV4(node: Rule): boolean;
|
|
7
|
-
export declare const cssVarsV4Nodes: PostcssDeclaration[];
|
|
8
|
-
export declare function collectUsedTailwindcssV4Variables(root: Root): Set<string>;
|
|
9
|
-
export declare function usesTailwindcssV4ContentVariable(root: Root): boolean;
|
|
10
|
-
export declare function createUsedCssVarsV4Nodes(usedProps: ReadonlySet<string>): PostcssDeclaration[];
|
|
11
|
-
export declare function createMissingCssVarsV4Nodes(root: Root, usedProps: ReadonlySet<string>): PostcssDeclaration[];
|
|
12
|
-
export declare function normalizeTailwindcssV4GradientPosition(value: string): string;
|
|
13
|
-
export declare function normalizeTailwindcssV4InfinityCalcValue(value: string): string;
|
|
14
|
-
export declare function mergeTailwindcssV4GradientDirectionRules(root: Root): void;
|
|
15
|
-
export declare function appendTailwindcssV4MiniProgramGradientRules(root: Root): void;
|
|
16
|
-
export declare function isTailwindcssV4ModernCheck(atRule: AtRule): boolean;
|
|
17
|
-
export declare function isTailwindcssV4LinearGradientSupports(atRule: AtRule): boolean;
|
|
18
|
-
export declare function isTailwindcssV4DisplayP3Supports(atRule: AtRule): boolean;
|
|
19
|
-
export declare function isTailwindcssV4DisplayP3Media(atRule: AtRule): boolean;
|
|
20
|
-
export declare function isTailwindcssV4DisplayP3Declaration(decl: Declaration): boolean;
|
|
21
|
-
export declare function normalizeTailwindcssV4Declaration(decl: Declaration): boolean;
|
|
1
|
+
export { normalizeTailwindcssV4Declaration } from './tailwindcss-v4/declarations.js';
|
|
2
|
+
export { appendTailwindcssV4MiniProgramGradientRules, mergeTailwindcssV4GradientDirectionRules, normalizeTailwindcssV4GradientPosition, normalizeTailwindcssV4InfinityCalcCss, normalizeTailwindcssV4InfinityCalcValue } from './tailwindcss-v4/gradients.js';
|
|
3
|
+
export { isTailwindcssV4DisplayP3Declaration, isTailwindcssV4DisplayP3Media, isTailwindcssV4DisplayP3Supports, isTailwindcssV4LinearGradientSupports, isTailwindcssV4ModernCheck } from './tailwindcss-v4/modern-syntax.js';
|
|
4
|
+
export { collectUsedTailwindcssV4Variables, createMissingCssVarsV4Nodes, createUsedCssVarsV4Nodes, cssVarsV4Nodes, isTailwindcssV4, testIfRootHostForV4, usesTailwindcssV4ContentVariable } from './tailwindcss-v4/variables.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Root, Rule } from 'postcss';
|
|
2
|
+
export declare function isUniAppXSystemRootCarrierRule(rule: Rule): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* UVUE 不支持 Tailwind 的混合根选择器,因此先把根作用域中的静态主题 token
|
|
5
|
+
* 内联到实际 utility,再移除仅用于变量承载的系统规则。
|
|
6
|
+
*/
|
|
7
|
+
export declare function consumeUniAppXSystemRootTheme(root: Root, customPropertyValues?: ReadonlyMap<string, string>): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { Result as PostcssResult } from 'postcss';
|
|
2
|
-
import type { IStyleHandlerOptions } from '../types';
|
|
3
|
-
|
|
2
|
+
import type { IStyleHandlerOptions } from '../types.js';
|
|
3
|
+
import postcss from 'postcss';
|
|
4
|
+
export declare function applyUniAppXUvueCompatibility(result: PostcssResult, options?: Pick<IStyleHandlerOptions, 'customPropertyValues' | 'uniAppX' | 'uniAppXCssTarget' | 'uniAppXUnsupported'>): PostcssResult<postcss.Document | postcss.Root>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Result as PostcssResult, Rule } from 'postcss';
|
|
2
2
|
import type { Node, Pseudo } from 'postcss-selector-parser';
|
|
3
|
-
import type { IStyleHandlerOptions } from '../types';
|
|
3
|
+
import type { IStyleHandlerOptions } from '../types.js';
|
|
4
4
|
import postcss from 'postcss';
|
|
5
5
|
export declare function isUniAppXEnabled(options?: Pick<IStyleHandlerOptions, 'uniAppX'>): boolean;
|
|
6
6
|
export declare function applyUniAppXBaseCompatibility(result: PostcssResult, options?: Pick<IStyleHandlerOptions, 'uniAppX'>): PostcssResult<postcss.Document | postcss.Root>;
|
package/dist/compat/web-css.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WebCssCompatFeatures, WebCssCompatUserOptions } from '../types';
|
|
1
|
+
import type { WebCssCompatFeatures, WebCssCompatUserOptions } from '../types.js';
|
|
2
2
|
export interface NormalizedWebCssCompatOptions {
|
|
3
3
|
preset: 'off' | 'legacy-web';
|
|
4
4
|
features: Required<WebCssCompatFeatures>;
|
package/dist/css-macro/auto.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IStyleHandlerOptions } from '../types';
|
|
1
|
+
import type { IStyleHandlerOptions } from '../types.js';
|
|
2
2
|
export declare const CSS_MACRO_STYLE_OPTIONS_MARKER = "__weappTailwindcssCssMacroEnabled";
|
|
3
3
|
export declare function compileCssMacroConditionalComments(css: string, options?: Pick<IStyleHandlerOptions, 'platform'>): string;
|
|
4
4
|
export declare function hasCssMacroTailwindV4Directive(css: string | undefined): boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_postcss = require("../postcss-CfbYRXJi.cjs");
|
|
6
|
+
exports.CSS_MACRO_POSTCSS_PLUGIN_NAME = require_postcss.CSS_MACRO_POSTCSS_PLUGIN_NAME;
|
|
7
|
+
exports.default = require_postcss.creator;
|
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
-
});
|
|
5
|
-
const require_postcss = require("../postcss-DAEMn9OL.js");
|
|
6
|
-
exports.CSS_MACRO_POSTCSS_PLUGIN_NAME = require_postcss.CSS_MACRO_POSTCSS_PLUGIN_NAME;
|
|
7
|
-
exports.default = require_postcss.creator;
|
|
1
|
+
import { CSS_MACRO_POSTCSS_PLUGIN_NAME, creator } from "../postcss-CICDAfoB.js";
|
|
2
|
+
export { CSS_MACRO_POSTCSS_PLUGIN_NAME, creator as default };
|
package/dist/defaults.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { IStyleHandlerOptions } from './types';
|
|
1
|
+
import type { IStyleHandlerOptions } from './types.js';
|
|
2
2
|
export declare function getDefaultOptions(options?: Partial<IStyleHandlerOptions>): Partial<IStyleHandlerOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const genericPostcssFrameworkStrategy: import("
|
|
1
|
+
export declare const genericPostcssFrameworkStrategy: import("../index.js").PostcssFrameworkStrategy;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PostcssFrameworkProfile, PostcssFrameworkStrategy, ResolvePostcssFrameworkOptions } from './types';
|
|
1
|
+
import type { PostcssFrameworkProfile, PostcssFrameworkStrategy, ResolvePostcssFrameworkOptions } from './types.js';
|
|
2
2
|
export declare function resolvePostcssFrameworkStrategy(options: ResolvePostcssFrameworkOptions): PostcssFrameworkStrategy;
|
|
3
3
|
export declare function resolvePostcssFrameworkProfile(options: ResolvePostcssFrameworkOptions): PostcssFrameworkProfile;
|
|
4
|
-
export declare function resolvePostcssStyleTarget(options: ResolvePostcssFrameworkOptions): import("
|
|
5
|
-
export type { PostcssFrameworkProfile, PostcssFrameworkStrategy, PostcssFrameworkType, ResolvePostcssFrameworkOptions, } from './types';
|
|
4
|
+
export declare function resolvePostcssStyleTarget(options: ResolvePostcssFrameworkOptions): import("../index.js").PostcssStyleTarget;
|
|
5
|
+
export type { PostcssFrameworkProfile, PostcssFrameworkStrategy, PostcssFrameworkType, ResolvePostcssFrameworkOptions, } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const kbonePostcssFrameworkStrategy: import("
|
|
1
|
+
export declare const kbonePostcssFrameworkStrategy: import("../index.js").PostcssFrameworkStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const mpxPostcssFrameworkStrategy: import("
|
|
1
|
+
export declare const mpxPostcssFrameworkStrategy: import("../index.js").PostcssFrameworkStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const nativePostcssFrameworkStrategy: import("
|
|
1
|
+
export declare const nativePostcssFrameworkStrategy: import("../index.js").PostcssFrameworkStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const remaxPostcssFrameworkStrategy: import("
|
|
1
|
+
export declare const remaxPostcssFrameworkStrategy: import("../index.js").PostcssFrameworkStrategy;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PostcssStyleTarget } from '../style-targets';
|
|
2
|
-
import type { PostcssFrameworkStrategy, PostcssFrameworkType, ResolvePostcssFrameworkOptions } from './types';
|
|
1
|
+
import type { PostcssStyleTarget } from '../style-targets/index.js';
|
|
2
|
+
import type { PostcssFrameworkStrategy, PostcssFrameworkType, ResolvePostcssFrameworkOptions } from './types.js';
|
|
3
3
|
export declare function isWebLikeStylePlatform(platform: string | undefined): boolean;
|
|
4
4
|
export declare function resolveWebPlatformOrTarget(options: Pick<ResolvePostcssFrameworkOptions, 'platform'>, fallbackTarget: PostcssStyleTarget): PostcssStyleTarget;
|
|
5
5
|
export declare function createStaticTargetFrameworkStrategy(framework: PostcssFrameworkType, fallbackTarget: PostcssStyleTarget): PostcssFrameworkStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const taroPostcssFrameworkStrategy: import("
|
|
1
|
+
export declare const taroPostcssFrameworkStrategy: import("../index.js").PostcssFrameworkStrategy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
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';
|
|
2
|
+
import type { PostcssAppType } from '../branches/index.js';
|
|
3
|
+
import type { PostcssStyleTarget } from '../style-targets/index.js';
|
|
4
|
+
import type { IStyleHandlerOptions } from '../types.js';
|
|
5
5
|
export type PostcssFrameworkType = PostcssAppType | 'generic';
|
|
6
6
|
export interface ResolvePostcssFrameworkOptions extends Pick<IStyleHandlerOptions, 'platform' | 'uniAppX' | 'uniAppXCssTarget'> {
|
|
7
7
|
appType?: PostcssAppType | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const uniAppPostcssFrameworkStrategy: import("
|
|
1
|
+
export declare const uniAppPostcssFrameworkStrategy: import("../index.js").PostcssFrameworkStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const uniAppVitePostcssFrameworkStrategy: import("
|
|
1
|
+
export declare const uniAppVitePostcssFrameworkStrategy: import("../index.js").PostcssFrameworkStrategy;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PostcssFrameworkStrategy } from '../types';
|
|
1
|
+
import type { PostcssFrameworkStrategy } from '../types.js';
|
|
2
2
|
export declare const uniAppXPostcssFrameworkStrategy: PostcssFrameworkStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const weappVitePostcssFrameworkStrategy: import("
|
|
1
|
+
export declare const weappVitePostcssFrameworkStrategy: import("../index.js").PostcssFrameworkStrategy;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Result, Root } from 'postcss';
|
|
2
|
-
import type { WeappTailwindcssPostcssGenerateResult, WeappTailwindcssPostcssPluginOptions } from './types';
|
|
2
|
+
import type { WeappTailwindcssPostcssGenerateResult, WeappTailwindcssPostcssPluginOptions } from './types.js';
|
|
3
3
|
export declare function resolveInputFile(result: Result): string | undefined;
|
|
4
4
|
export declare function resolvePostcssBase(result: Result, options: WeappTailwindcssPostcssPluginOptions): string;
|
|
5
5
|
export declare function resolvePostcssProjectRoot(result: Result, options: WeappTailwindcssPostcssPluginOptions): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PluginCreator } from 'postcss';
|
|
2
|
-
import type { WeappTailwindcssPostcssPluginAdapters, WeappTailwindcssPostcssPluginOptions } from './types';
|
|
2
|
+
import type { WeappTailwindcssPostcssPluginAdapters, WeappTailwindcssPostcssPluginOptions } from './types.js';
|
|
3
3
|
export declare function createWeappTailwindcssPostcssPlugin(adapters: WeappTailwindcssPostcssPluginAdapters): PluginCreator<WeappTailwindcssPostcssPluginOptions>;
|
|
4
|
-
export type { NormalizedWeappTailwindcssPostcssGeneratorOptions, TailwindCandidateSource, TailwindResolvedSource, TailwindV4SourceOptions, WeappTailwindcssPostcssGenerateOptions, WeappTailwindcssPostcssGenerateResult, WeappTailwindcssPostcssGenerator, WeappTailwindcssPostcssGeneratorUserOptions, WeappTailwindcssPostcssPluginAdapters, WeappTailwindcssPostcssPluginOptions, WeappTailwindcssPostcssTarget, } from './types';
|
|
4
|
+
export type { NormalizedWeappTailwindcssPostcssGeneratorOptions, TailwindCandidateSource, TailwindResolvedSource, TailwindV4SourceOptions, WeappTailwindcssPostcssGenerateOptions, WeappTailwindcssPostcssGenerateResult, WeappTailwindcssPostcssGenerator, WeappTailwindcssPostcssGeneratorUserOptions, WeappTailwindcssPostcssPluginAdapters, WeappTailwindcssPostcssPluginOptions, WeappTailwindcssPostcssTarget, } from './types.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Root } from 'postcss';
|
|
2
|
-
import type { TailwindCssDirectiveOptions } from './directives';
|
|
2
|
+
import type { TailwindCssDirectiveOptions } from './directives.js';
|
|
3
3
|
export interface RewriteLocalCssImportRequestOptions {
|
|
4
4
|
styleOutputExtension?: string | undefined;
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Result, Root } from 'postcss';
|
|
2
|
-
import type { TailwindSourceEntry } from '../source-scan';
|
|
3
|
-
import type { TailwindCandidateSource, WeappTailwindcssPostcssPluginOptions } from './types';
|
|
2
|
+
import type { TailwindSourceEntry } from '../source-scan.js';
|
|
3
|
+
import type { TailwindCandidateSource, WeappTailwindcssPostcssPluginOptions } from './types.js';
|
|
4
4
|
export declare function collectAutoTailwindCandidates(root: Root, result: Result, options: WeappTailwindcssPostcssPluginOptions, context?: {
|
|
5
5
|
css?: string | undefined;
|
|
6
6
|
sourceEntries?: TailwindSourceEntry[] | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IStyleHandlerOptions, WebCssCompatUserOptions } from '../types';
|
|
1
|
+
import type { IStyleHandlerOptions, WebCssCompatUserOptions } from '../types.js';
|
|
2
2
|
export type WeappTailwindcssPostcssTarget = 'weapp' | 'web';
|
|
3
3
|
export interface TailwindCandidateSource {
|
|
4
4
|
content: string;
|
package/dist/handler.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { IStyleHandlerOptions, StyleHandler } from './types';
|
|
1
|
+
import type { IStyleHandlerOptions, StyleHandler } from './types.js';
|
|
2
2
|
export declare function createStyleHandler(options?: Partial<IStyleHandlerOptions>): StyleHandler;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-emK7D4bc.cjs");
|
|
2
|
+
let node_process = require("node:process");
|
|
3
|
+
node_process = require_rolldown_runtime.__toESM(node_process, 1);
|
|
4
|
+
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
3
5
|
//#region src/html-transform.ts
|
|
4
6
|
const htmlTags = [
|
|
5
7
|
"html",
|
|
@@ -150,7 +152,7 @@ const miniAppTags = [
|
|
|
150
152
|
const tags2Rgx = (tags = []) => new RegExp(`(^| |\\+|,|~|>|\\n)(${tags.join("|")})\\b(?=$| |\\.|\\+|,|~|:|\\[)`, "g");
|
|
151
153
|
const UNIVERSAL_SELECTOR_RE = /(?:^| )\*(?![=/*])/;
|
|
152
154
|
const postcssHtmlTransform = (opts = {}) => {
|
|
153
|
-
const options = defu(opts, { platform:
|
|
155
|
+
const options = (0, _weapp_tailwindcss_shared.defu)(opts, { platform: node_process.default.env.TARO_ENV });
|
|
154
156
|
let selectorFilter;
|
|
155
157
|
let walkRules;
|
|
156
158
|
switch (options.platform) {
|
|
@@ -188,4 +190,4 @@ const postcssHtmlTransform = (opts = {}) => {
|
|
|
188
190
|
};
|
|
189
191
|
postcssHtmlTransform.postcss = true;
|
|
190
192
|
//#endregion
|
|
191
|
-
|
|
193
|
+
module.exports = postcssHtmlTransform;
|
package/dist/html-transform.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
node_process = require_rolldown_runtime.__toESM(node_process);
|
|
4
|
-
let _weapp_tailwindcss_shared = require("@weapp-tailwindcss/shared");
|
|
1
|
+
import process from "node:process";
|
|
2
|
+
import { defu } from "@weapp-tailwindcss/shared";
|
|
5
3
|
//#region src/html-transform.ts
|
|
6
4
|
const htmlTags = [
|
|
7
5
|
"html",
|
|
@@ -152,7 +150,7 @@ const miniAppTags = [
|
|
|
152
150
|
const tags2Rgx = (tags = []) => new RegExp(`(^| |\\+|,|~|>|\\n)(${tags.join("|")})\\b(?=$| |\\.|\\+|,|~|:|\\[)`, "g");
|
|
153
151
|
const UNIVERSAL_SELECTOR_RE = /(?:^| )\*(?![=/*])/;
|
|
154
152
|
const postcssHtmlTransform = (opts = {}) => {
|
|
155
|
-
const options =
|
|
153
|
+
const options = defu(opts, { platform: process.env.TARO_ENV });
|
|
156
154
|
let selectorFilter;
|
|
157
155
|
let walkRules;
|
|
158
156
|
switch (options.platform) {
|
|
@@ -190,4 +188,4 @@ const postcssHtmlTransform = (opts = {}) => {
|
|
|
190
188
|
};
|
|
191
189
|
postcssHtmlTransform.postcss = true;
|
|
192
190
|
//#endregion
|
|
193
|
-
|
|
191
|
+
export { postcssHtmlTransform as default };
|