@weapp-tailwindcss/postcss 3.0.3 → 3.0.4
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/compat/color-mix/constants.d.ts +9 -0
- package/dist/compat/color-mix/modern.d.ts +2 -0
- package/dist/compat/color-mix/parse.d.ts +9 -0
- package/dist/compat/color-mix/resolve.d.ts +5 -0
- package/dist/compat/mini-program-css/directives.d.ts +5 -0
- package/dist/compat/mini-program-css/finalize-options.d.ts +6 -0
- package/dist/compat/mini-program-css/finalize.d.ts +4 -12
- package/dist/compat/mini-program-css/hoist.d.ts +4 -0
- package/dist/compat/mini-program-css/preflight.d.ts +7 -0
- package/dist/compat/mini-program-css/root-cleanups.d.ts +6 -0
- package/dist/compat/mini-program-css/theme.d.ts +3 -0
- package/dist/index.js +441 -281
- package/dist/index.mjs +440 -281
- package/dist/selectorParser/rule-transformer/nodes.d.ts +7 -0
- package/dist/selectorParser/rule-transformer/pseudos.d.ts +6 -0
- package/dist/selectorParser/rule-transformer/types.d.ts +14 -0
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const COLOR_MIX_NAME = "color-mix";
|
|
2
|
+
export declare const MODERN_COLOR_FUNCTION_NAMES: Set<string>;
|
|
3
|
+
export declare const PLACEHOLDER_PREFIX = "__weapp_tw_color_mix_";
|
|
4
|
+
export declare const DYNAMIC_ALPHA_RE: RegExp;
|
|
5
|
+
export declare const INTERNAL_TAILWIND_ALPHA_RE: RegExp;
|
|
6
|
+
export declare const TRANSPARENT_COLOR_RE: RegExp;
|
|
7
|
+
export declare const CURRENT_COLOR_RE: RegExp;
|
|
8
|
+
export declare const CSS_WIDE_KEYWORD_RE: RegExp;
|
|
9
|
+
export declare const CUSTOM_PROPERTY_RE: RegExp;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ColorData } from '@csstools/css-color-parser';
|
|
2
|
+
import type { Node } from 'postcss-value-parser';
|
|
3
|
+
export declare function splitArguments(nodes: Node[]): Node[][];
|
|
4
|
+
export declare function splitStopSegments(nodes: Node[]): Node[][];
|
|
5
|
+
export declare function trimNodes(nodes: Node[]): Node[];
|
|
6
|
+
export declare function parseAlphaValue(alphaSource: string): number | undefined;
|
|
7
|
+
export declare function resolveColorData(colorSource: string, customPropertyValues: ReadonlyMap<string, string>, depth?: number): ColorData | undefined;
|
|
8
|
+
export declare function normalizeColorFunctionName(colorSource: string, alpha: number, customPropertyValues: ReadonlyMap<string, string>): string | undefined;
|
|
9
|
+
export declare function normalizeStandaloneColorFunction(colorSource: string): string | undefined;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import postcss from 'postcss';
|
|
2
|
+
export declare const TAILWIND_V4_BANNER_RE: RegExp;
|
|
3
|
+
export declare function hasTailwindcssV4Signal(css: string): boolean;
|
|
4
|
+
export declare function unwrapTailwindSourceMedia(root: postcss.Root): void;
|
|
5
|
+
export declare function removeTailwindGenerationDirectives(root: postcss.Root): void;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
preservePseudoContentInit?: boolean;
|
|
6
|
-
isTailwindcssV4?: boolean | undefined;
|
|
7
|
-
}
|
|
8
|
-
export declare function collectPreflightRules(root: postcss.Root, options?: {
|
|
9
|
-
preservePseudoContentInit?: boolean;
|
|
10
|
-
cssPreflight?: CssPreflightOptions | undefined;
|
|
11
|
-
}): postcss.Rule[];
|
|
12
|
-
export declare function insertHoistedRules(root: postcss.Root, rules: postcss.Rule[], anchor?: postcss.Comment): void;
|
|
1
|
+
import type { FinalizeMiniProgramCssOptions } from './finalize-options';
|
|
2
|
+
export type { FinalizeMiniProgramCssOptions } from './finalize-options';
|
|
3
|
+
export { insertHoistedRules } from './hoist';
|
|
4
|
+
export { collectPreflightRules } from './preflight';
|
|
13
5
|
export declare function hoistTailwindPreflightBase(css: string): string;
|
|
14
6
|
export declare function finalizeMiniProgramCss(css: string, options?: FinalizeMiniProgramCssOptions): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import postcss from 'postcss';
|
|
2
|
+
export declare function createHoistInsertionAnchor(root: postcss.Root): postcss.Comment | undefined;
|
|
3
|
+
export declare function insertHoistedRules(root: postcss.Root, rules: postcss.Rule[], anchor?: postcss.Comment): void;
|
|
4
|
+
export declare function mergeEquivalentHoistedRules(rules: postcss.Rule[]): postcss.Rule[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CssPreflightOptions } from '../../types';
|
|
2
|
+
import postcss from 'postcss';
|
|
3
|
+
export declare function collectPreflightRules(root: postcss.Root, options?: {
|
|
4
|
+
preservePseudoContentInit?: boolean;
|
|
5
|
+
cssPreflight?: CssPreflightOptions | undefined;
|
|
6
|
+
}): postcss.Rule[];
|
|
7
|
+
export declare function createPreflightResetRule(cssPreflight: CssPreflightOptions | undefined): postcss.Rule | undefined;
|
|
@@ -2,4 +2,10 @@ import type postcss from 'postcss';
|
|
|
2
2
|
export declare function removeSpecificityPlaceholders(root: postcss.Root): void;
|
|
3
3
|
export declare function removeUnsupportedBrowserSelectors(root: postcss.Root): void;
|
|
4
4
|
export declare function removeDisplayP3Declarations(root: postcss.Root): void;
|
|
5
|
+
interface RemoveTailwindContainerRulesOptions {
|
|
6
|
+
generatedOnly?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function removeTailwindContainerMaxWidthMediaRules(root: postcss.Root): void;
|
|
9
|
+
export declare function removeTailwindContainerWidthRules(root: postcss.Root, options?: RemoveTailwindContainerRulesOptions): void;
|
|
5
10
|
export declare function removeUnsupportedModernColorDeclarations(root: postcss.Root): void;
|
|
11
|
+
export {};
|