@weapp-tailwindcss/postcss 2.1.6-alpha.0 → 2.1.6-alpha.1

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/index.d.mts CHANGED
@@ -1,6 +1,5 @@
1
- import { I as IStyleHandlerOptions, S as StyleHandler, a as InternalCssSelectorReplacerOptions } from './types-BUB5jCYX.mjs';
2
- export { C as CssCalcOptions, b as CssPreflightOptions, c as IPropValue, L as LoadedPostcssOptions, P as PipelineNodeContext, d as PipelineNodeCursor, e as PipelineStage, R as RequiredStyleHandlerOptions, f as ResolvedPipelineNode, g as StyleProcessingPipeline, U as UserDefinedPostcssOptions, h as createInjectPreflight, i as createStylePipeline } from './types-BUB5jCYX.mjs';
3
- export { pluginOptions as PresetEnvOptions } from 'postcss-preset-env';
1
+ import { I as IStyleHandlerOptions, S as StyleHandler, a as InternalCssSelectorReplacerOptions } from './types-CsRGpZ_r.mjs';
2
+ export { C as CssCalcOptions, b as CssPreflightOptions, c as IPropValue, L as LoadedPostcssOptions, P as PipelineNodeContext, d as PipelineNodeCursor, e as PipelineStage, f as PresetEnvOptions, R as RequiredStyleHandlerOptions, g as ResolvedPipelineNode, h as StyleProcessingPipeline, U as UserDefinedPostcssOptions, i as createInjectPreflight, j as createStylePipeline } from './types-CsRGpZ_r.mjs';
4
3
  export { PxTransformOptions as Px2rpxOptions } from 'postcss-pxtrans';
5
4
  export { UserDefinedOptions as Rem2rpxOptions } from 'postcss-rem-to-responsive-pixel';
6
5
  export { UserDefinedOptions as UnitsToPxOptions } from 'postcss-units-to-px';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { I as IStyleHandlerOptions, S as StyleHandler, a as InternalCssSelectorReplacerOptions } from './types-BUB5jCYX.js';
2
- export { C as CssCalcOptions, b as CssPreflightOptions, c as IPropValue, L as LoadedPostcssOptions, P as PipelineNodeContext, d as PipelineNodeCursor, e as PipelineStage, R as RequiredStyleHandlerOptions, f as ResolvedPipelineNode, g as StyleProcessingPipeline, U as UserDefinedPostcssOptions, h as createInjectPreflight, i as createStylePipeline } from './types-BUB5jCYX.js';
3
- export { pluginOptions as PresetEnvOptions } from 'postcss-preset-env';
1
+ import { I as IStyleHandlerOptions, S as StyleHandler, a as InternalCssSelectorReplacerOptions } from './types-CsRGpZ_r.js';
2
+ export { C as CssCalcOptions, b as CssPreflightOptions, c as IPropValue, L as LoadedPostcssOptions, P as PipelineNodeContext, d as PipelineNodeCursor, e as PipelineStage, f as PresetEnvOptions, R as RequiredStyleHandlerOptions, g as ResolvedPipelineNode, h as StyleProcessingPipeline, U as UserDefinedPostcssOptions, i as createInjectPreflight, j as createStylePipeline } from './types-CsRGpZ_r.js';
4
3
  export { PxTransformOptions as Px2rpxOptions } from 'postcss-pxtrans';
5
4
  export { UserDefinedOptions as Rem2rpxOptions } from 'postcss-rem-to-responsive-pixel';
6
5
  export { UserDefinedOptions as UnitsToPxOptions } from 'postcss-units-to-px';
package/dist/index.js CHANGED
@@ -2169,11 +2169,12 @@ function createPreparedNode(id, stage, createPlugin) {
2169
2169
  function createPreparedNodes(options) {
2170
2170
  const preparedNodes = [];
2171
2171
  const userPlugins = normalizeUserPlugins(_optionalChain([options, 'access', _72 => _72.postcssOptions, 'optionalAccess', _73 => _73.plugins]));
2172
+ const presetEnvOptions = options.cssPresetEnv;
2172
2173
  userPlugins.forEach((plugin, index) => {
2173
2174
  preparedNodes.push(createPreparedNode(`pre:user-${index}`, "pre", () => plugin));
2174
2175
  });
2175
2176
  preparedNodes.push(createPreparedNode("pre:core", "pre", () => postcssWeappTailwindcssPrePlugin(options)));
2176
- preparedNodes.push(createPreparedNode("normal:preset-env", "normal", () => _postcsspresetenv2.default.call(void 0, options.cssPresetEnv)));
2177
+ preparedNodes.push(createPreparedNode("normal:preset-env", "normal", () => _postcsspresetenv2.default.call(void 0, presetEnvOptions)));
2177
2178
  preparedNodes.push(createPreparedNode("normal:color-functional-fallback", "normal", () => createColorFunctionalFallback()));
2178
2179
  const unitsToPxPlugin = getUnitsToPxPlugin(options);
2179
2180
  if (unitsToPxPlugin) {
package/dist/index.mjs CHANGED
@@ -2169,11 +2169,12 @@ function createPreparedNode(id, stage, createPlugin) {
2169
2169
  function createPreparedNodes(options) {
2170
2170
  const preparedNodes = [];
2171
2171
  const userPlugins = normalizeUserPlugins(options.postcssOptions?.plugins);
2172
+ const presetEnvOptions = options.cssPresetEnv;
2172
2173
  userPlugins.forEach((plugin, index) => {
2173
2174
  preparedNodes.push(createPreparedNode(`pre:user-${index}`, "pre", () => plugin));
2174
2175
  });
2175
2176
  preparedNodes.push(createPreparedNode("pre:core", "pre", () => postcssWeappTailwindcssPrePlugin(options)));
2176
- preparedNodes.push(createPreparedNode("normal:preset-env", "normal", () => postcssPresetEnv(options.cssPresetEnv)));
2177
+ preparedNodes.push(createPreparedNode("normal:preset-env", "normal", () => postcssPresetEnv(presetEnvOptions)));
2177
2178
  preparedNodes.push(createPreparedNode("normal:color-functional-fallback", "normal", () => createColorFunctionalFallback()));
2178
2179
  const unitsToPxPlugin = getUnitsToPxPlugin(options);
2179
2180
  if (unitsToPxPlugin) {
@@ -1,7 +1,6 @@
1
1
  import { PostCssCalcOptions } from '@weapp-tailwindcss/postcss-calc';
2
2
  import { AcceptedPlugin, Result as Result$1 } from 'postcss';
3
3
  import { Result } from 'postcss-load-config';
4
- import { pluginOptions } from 'postcss-preset-env';
5
4
  import { PxTransformOptions } from 'postcss-pxtrans';
6
5
  import { UserDefinedOptions } from 'postcss-rem-to-responsive-pixel';
7
6
  import { UserDefinedOptions as UserDefinedOptions$1 } from 'postcss-units-to-px';
@@ -58,6 +57,21 @@ type IContext = ReturnType<typeof createContext>;
58
57
  type InjectPreflight = () => IPropValue[];
59
58
  declare function createInjectPreflight(options?: CssPreflightOptions): InjectPreflight;
60
59
 
60
+ interface PresetEnvOptions {
61
+ stage?: false | 0 | 1 | 2 | 3 | 4;
62
+ minimumVendorImplementations?: number;
63
+ browsers?: string | string[];
64
+ features?: Record<string, boolean | Record<string, unknown>>;
65
+ insertBefore?: Record<string, unknown>;
66
+ insertAfter?: Record<string, unknown>;
67
+ debug?: boolean;
68
+ logical?: {
69
+ inlineDirection?: 'top-to-bottom' | 'bottom-to-top' | 'right-to-left' | 'left-to-right';
70
+ blockDirection?: 'top-to-bottom' | 'bottom-to-top' | 'right-to-left' | 'left-to-right';
71
+ };
72
+ [key: string]: unknown;
73
+ }
74
+
61
75
  type LoadedPostcssOptions = Partial<Omit<Result, 'file'>>;
62
76
  interface IPropValue {
63
77
  prop: string;
@@ -86,7 +100,7 @@ type IStyleHandlerOptions = {
86
100
  postcssOptions?: LoadedPostcssOptions;
87
101
  cssRemoveProperty?: boolean;
88
102
  cssRemoveHoverPseudoClass?: boolean;
89
- cssPresetEnv?: pluginOptions;
103
+ cssPresetEnv?: PresetEnvOptions;
90
104
  cssCalc?: boolean | CssCalcOptions | (string | RegExp)[];
91
105
  atRules?: {
92
106
  property?: boolean;
@@ -100,7 +114,7 @@ interface UserDefinedPostcssOptions {
100
114
  cssPreflight?: CssPreflightOptions;
101
115
  cssPreflightRange?: 'all';
102
116
  cssChildCombinatorReplaceValue?: string | string[];
103
- cssPresetEnv?: pluginOptions;
117
+ cssPresetEnv?: PresetEnvOptions;
104
118
  injectAdditionalCssVarScope?: boolean;
105
119
  cssSelectorReplacement?: {
106
120
  root?: string | string[] | false;
@@ -120,4 +134,4 @@ interface StyleHandler {
120
134
  getPipeline: (opt?: Partial<IStyleHandlerOptions>) => StyleProcessingPipeline;
121
135
  }
122
136
 
123
- export { type CssCalcOptions as C, type IStyleHandlerOptions as I, type LoadedPostcssOptions as L, type PipelineNodeContext as P, type RequiredStyleHandlerOptions as R, type StyleHandler as S, type UserDefinedPostcssOptions as U, type InternalCssSelectorReplacerOptions as a, type CssPreflightOptions as b, type IPropValue as c, type PipelineNodeCursor as d, type PipelineStage as e, type ResolvedPipelineNode as f, type StyleProcessingPipeline as g, createInjectPreflight as h, createStylePipeline as i };
137
+ export { type CssCalcOptions as C, type IStyleHandlerOptions as I, type LoadedPostcssOptions as L, type PipelineNodeContext as P, type RequiredStyleHandlerOptions as R, type StyleHandler as S, type UserDefinedPostcssOptions as U, type InternalCssSelectorReplacerOptions as a, type CssPreflightOptions as b, type IPropValue as c, type PipelineNodeCursor as d, type PipelineStage as e, type PresetEnvOptions as f, type ResolvedPipelineNode as g, type StyleProcessingPipeline as h, createInjectPreflight as i, createStylePipeline as j };
@@ -1,7 +1,6 @@
1
1
  import { PostCssCalcOptions } from '@weapp-tailwindcss/postcss-calc';
2
2
  import { AcceptedPlugin, Result as Result$1 } from 'postcss';
3
3
  import { Result } from 'postcss-load-config';
4
- import { pluginOptions } from 'postcss-preset-env';
5
4
  import { PxTransformOptions } from 'postcss-pxtrans';
6
5
  import { UserDefinedOptions } from 'postcss-rem-to-responsive-pixel';
7
6
  import { UserDefinedOptions as UserDefinedOptions$1 } from 'postcss-units-to-px';
@@ -58,6 +57,21 @@ type IContext = ReturnType<typeof createContext>;
58
57
  type InjectPreflight = () => IPropValue[];
59
58
  declare function createInjectPreflight(options?: CssPreflightOptions): InjectPreflight;
60
59
 
60
+ interface PresetEnvOptions {
61
+ stage?: false | 0 | 1 | 2 | 3 | 4;
62
+ minimumVendorImplementations?: number;
63
+ browsers?: string | string[];
64
+ features?: Record<string, boolean | Record<string, unknown>>;
65
+ insertBefore?: Record<string, unknown>;
66
+ insertAfter?: Record<string, unknown>;
67
+ debug?: boolean;
68
+ logical?: {
69
+ inlineDirection?: 'top-to-bottom' | 'bottom-to-top' | 'right-to-left' | 'left-to-right';
70
+ blockDirection?: 'top-to-bottom' | 'bottom-to-top' | 'right-to-left' | 'left-to-right';
71
+ };
72
+ [key: string]: unknown;
73
+ }
74
+
61
75
  type LoadedPostcssOptions = Partial<Omit<Result, 'file'>>;
62
76
  interface IPropValue {
63
77
  prop: string;
@@ -86,7 +100,7 @@ type IStyleHandlerOptions = {
86
100
  postcssOptions?: LoadedPostcssOptions;
87
101
  cssRemoveProperty?: boolean;
88
102
  cssRemoveHoverPseudoClass?: boolean;
89
- cssPresetEnv?: pluginOptions;
103
+ cssPresetEnv?: PresetEnvOptions;
90
104
  cssCalc?: boolean | CssCalcOptions | (string | RegExp)[];
91
105
  atRules?: {
92
106
  property?: boolean;
@@ -100,7 +114,7 @@ interface UserDefinedPostcssOptions {
100
114
  cssPreflight?: CssPreflightOptions;
101
115
  cssPreflightRange?: 'all';
102
116
  cssChildCombinatorReplaceValue?: string | string[];
103
- cssPresetEnv?: pluginOptions;
117
+ cssPresetEnv?: PresetEnvOptions;
104
118
  injectAdditionalCssVarScope?: boolean;
105
119
  cssSelectorReplacement?: {
106
120
  root?: string | string[] | false;
@@ -120,4 +134,4 @@ interface StyleHandler {
120
134
  getPipeline: (opt?: Partial<IStyleHandlerOptions>) => StyleProcessingPipeline;
121
135
  }
122
136
 
123
- export { type CssCalcOptions as C, type IStyleHandlerOptions as I, type LoadedPostcssOptions as L, type PipelineNodeContext as P, type RequiredStyleHandlerOptions as R, type StyleHandler as S, type UserDefinedPostcssOptions as U, type InternalCssSelectorReplacerOptions as a, type CssPreflightOptions as b, type IPropValue as c, type PipelineNodeCursor as d, type PipelineStage as e, type ResolvedPipelineNode as f, type StyleProcessingPipeline as g, createInjectPreflight as h, createStylePipeline as i };
137
+ export { type CssCalcOptions as C, type IStyleHandlerOptions as I, type LoadedPostcssOptions as L, type PipelineNodeContext as P, type RequiredStyleHandlerOptions as R, type StyleHandler as S, type UserDefinedPostcssOptions as U, type InternalCssSelectorReplacerOptions as a, type CssPreflightOptions as b, type IPropValue as c, type PipelineNodeCursor as d, type PipelineStage as e, type PresetEnvOptions as f, type ResolvedPipelineNode as g, type StyleProcessingPipeline as h, createInjectPreflight as i, createStylePipeline as j };
package/dist/types.d.mts CHANGED
@@ -1,8 +1,7 @@
1
1
  import '@weapp-tailwindcss/postcss-calc';
2
2
  import 'postcss';
3
3
  import 'postcss-load-config';
4
- export { pluginOptions as PresetEnvOptions } from 'postcss-preset-env';
5
4
  export { PxTransformOptions as Px2rpxOptions } from 'postcss-pxtrans';
6
5
  export { UserDefinedOptions as Rem2rpxOptions } from 'postcss-rem-to-responsive-pixel';
7
6
  export { UserDefinedOptions as UnitsToPxOptions } from 'postcss-units-to-px';
8
- export { C as CssCalcOptions, b as CssPreflightOptions, c as IPropValue, I as IStyleHandlerOptions, a as InternalCssSelectorReplacerOptions, L as LoadedPostcssOptions, R as RequiredStyleHandlerOptions, S as StyleHandler, U as UserDefinedPostcssOptions } from './types-BUB5jCYX.mjs';
7
+ export { C as CssCalcOptions, b as CssPreflightOptions, c as IPropValue, I as IStyleHandlerOptions, a as InternalCssSelectorReplacerOptions, L as LoadedPostcssOptions, f as PresetEnvOptions, R as RequiredStyleHandlerOptions, S as StyleHandler, U as UserDefinedPostcssOptions } from './types-CsRGpZ_r.mjs';
package/dist/types.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  import '@weapp-tailwindcss/postcss-calc';
2
2
  import 'postcss';
3
3
  import 'postcss-load-config';
4
- export { pluginOptions as PresetEnvOptions } from 'postcss-preset-env';
5
4
  export { PxTransformOptions as Px2rpxOptions } from 'postcss-pxtrans';
6
5
  export { UserDefinedOptions as Rem2rpxOptions } from 'postcss-rem-to-responsive-pixel';
7
6
  export { UserDefinedOptions as UnitsToPxOptions } from 'postcss-units-to-px';
8
- export { C as CssCalcOptions, b as CssPreflightOptions, c as IPropValue, I as IStyleHandlerOptions, a as InternalCssSelectorReplacerOptions, L as LoadedPostcssOptions, R as RequiredStyleHandlerOptions, S as StyleHandler, U as UserDefinedPostcssOptions } from './types-BUB5jCYX.js';
7
+ export { C as CssCalcOptions, b as CssPreflightOptions, c as IPropValue, I as IStyleHandlerOptions, a as InternalCssSelectorReplacerOptions, L as LoadedPostcssOptions, f as PresetEnvOptions, R as RequiredStyleHandlerOptions, S as StyleHandler, U as UserDefinedPostcssOptions } from './types-CsRGpZ_r.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weapp-tailwindcss/postcss",
3
- "version": "2.1.6-alpha.0",
3
+ "version": "2.1.6-alpha.1",
4
4
  "description": "@weapp-tailwindcss/postcss",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",
@@ -35,6 +35,20 @@
35
35
  "main": "./dist/index.js",
36
36
  "module": "./dist/index.mjs",
37
37
  "types": "./dist/index.d.ts",
38
+ "typesVersions": {
39
+ "*": {
40
+ "html-transform": [
41
+ "./dist/html-transform.d.ts"
42
+ ],
43
+ "types": [
44
+ "./dist/types.d.ts"
45
+ ],
46
+ "*": [
47
+ "./dist/*",
48
+ "./dist/index.d.ts"
49
+ ]
50
+ }
51
+ },
38
52
  "files": [
39
53
  "dist"
40
54
  ],
@@ -51,7 +65,7 @@
51
65
  "postcss-selector-parser": "~7.1.1",
52
66
  "postcss-units-to-px": "^0.2.0",
53
67
  "postcss-value-parser": "^4.2.0",
54
- "@weapp-tailwindcss/shared": "1.1.3-alpha.0"
68
+ "@weapp-tailwindcss/shared": "1.1.3-alpha.1"
55
69
  },
56
70
  "devDependencies": {
57
71
  "@csstools/postcss-is-pseudo-class": "^6.0.0",