@weapp-tailwindcss/postcss 1.0.0-alpha.1 → 1.0.0-alpha.2

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.
@@ -0,0 +1 @@
1
+ "use strict";
File without changes
package/dist/index.d.mts CHANGED
@@ -1,13 +1,13 @@
1
- import { I as InternalCssSelectorReplacerOptions, a as IStyleHandlerOptions } from './types-DxWi_8fe.mjs';
2
- export { c as createInjectPreflight } from './types-DxWi_8fe.mjs';
1
+ import { I as IStyleHandlerOptions, a as InternalCssSelectorReplacerOptions } from './types-BlpvjUzB.mjs';
2
+ export { d as CssPreflightOptions, C as CustomRuleCallback, b as IPropValue, L as LoadedPostcssOptions, R as RequiredStyleHandlerOptions, U as UserDefinedPostcssOptions, c as createInjectPreflight } from './types-BlpvjUzB.mjs';
3
3
  import postcss from 'postcss';
4
4
  import '@weapp-tailwindcss/mangle/types';
5
5
  import 'postcss-load-config';
6
6
  import 'postcss-rem-to-responsive-pixel';
7
7
 
8
- declare function internalCssSelectorReplacer(selectors: string, options?: InternalCssSelectorReplacerOptions): string;
9
-
10
8
  declare function styleHandler(rawSource: string, options: IStyleHandlerOptions): Promise<postcss.Result<postcss.Document | postcss.Root>>;
11
9
  declare function createStyleHandler(options: Partial<IStyleHandlerOptions>): (rawSource: string, opt?: Partial<IStyleHandlerOptions>) => Promise<postcss.Result<postcss.Document | postcss.Root>>;
12
10
 
13
- export { createStyleHandler, internalCssSelectorReplacer, styleHandler };
11
+ declare function internalCssSelectorReplacer(selectors: string, options?: InternalCssSelectorReplacerOptions): string;
12
+
13
+ export { IStyleHandlerOptions, InternalCssSelectorReplacerOptions, createStyleHandler, internalCssSelectorReplacer, styleHandler };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import { I as InternalCssSelectorReplacerOptions, a as IStyleHandlerOptions } from './types-DxWi_8fe.js';
2
- export { c as createInjectPreflight } from './types-DxWi_8fe.js';
1
+ import { I as IStyleHandlerOptions, a as InternalCssSelectorReplacerOptions } from './types-BlpvjUzB.js';
2
+ export { d as CssPreflightOptions, C as CustomRuleCallback, b as IPropValue, L as LoadedPostcssOptions, R as RequiredStyleHandlerOptions, U as UserDefinedPostcssOptions, c as createInjectPreflight } from './types-BlpvjUzB.js';
3
3
  import postcss from 'postcss';
4
4
  import '@weapp-tailwindcss/mangle/types';
5
5
  import 'postcss-load-config';
6
6
  import 'postcss-rem-to-responsive-pixel';
7
7
 
8
- declare function internalCssSelectorReplacer(selectors: string, options?: InternalCssSelectorReplacerOptions): string;
9
-
10
8
  declare function styleHandler(rawSource: string, options: IStyleHandlerOptions): Promise<postcss.Result<postcss.Document | postcss.Root>>;
11
9
  declare function createStyleHandler(options: Partial<IStyleHandlerOptions>): (rawSource: string, opt?: Partial<IStyleHandlerOptions>) => Promise<postcss.Result<postcss.Document | postcss.Root>>;
12
10
 
13
- export { createStyleHandler, internalCssSelectorReplacer, styleHandler };
11
+ declare function internalCssSelectorReplacer(selectors: string, options?: InternalCssSelectorReplacerOptions): string;
12
+
13
+ export { IStyleHandlerOptions, InternalCssSelectorReplacerOptions, createStyleHandler, internalCssSelectorReplacer, styleHandler };
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/index.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('./chunk-GGNOJ77I.js');
2
+
3
+ // src/handler.ts
2
4
  var _shared = require('@weapp-tailwindcss/shared');
3
5
  var _postcss = require('postcss'); var _postcss2 = _interopRequireDefault(_postcss);
4
6
 
@@ -543,6 +545,24 @@ function getPlugins(options) {
543
545
  return plugins;
544
546
  }
545
547
 
548
+ // src/handler.ts
549
+ function styleHandler(rawSource, options) {
550
+ return _postcss2.default.call(void 0, getPlugins(options)).process(
551
+ rawSource,
552
+ _nullishCoalesce(_optionalChain([options, 'access', _18 => _18.postcssOptions, 'optionalAccess', _19 => _19.options]), () => ( {
553
+ from: void 0
554
+ }))
555
+ ).async();
556
+ }
557
+ function createStyleHandler(options) {
558
+ return (rawSource, opt) => {
559
+ return styleHandler(
560
+ rawSource,
561
+ _shared.defuOverrideArray.call(void 0, opt, options)
562
+ );
563
+ };
564
+ }
565
+
546
566
  // src/preflight.ts
547
567
  function createInjectPreflight(options) {
548
568
  const result = [];
@@ -562,24 +582,6 @@ function createInjectPreflight(options) {
562
582
  };
563
583
  }
564
584
 
565
- // src/index.ts
566
- function styleHandler(rawSource, options) {
567
- return _postcss2.default.call(void 0, getPlugins(options)).process(
568
- rawSource,
569
- _nullishCoalesce(_optionalChain([options, 'access', _18 => _18.postcssOptions, 'optionalAccess', _19 => _19.options]), () => ( {
570
- from: void 0
571
- }))
572
- ).async();
573
- }
574
- function createStyleHandler(options) {
575
- return (rawSource, opt) => {
576
- return styleHandler(
577
- rawSource,
578
- _shared.defuOverrideArray.call(void 0, opt, options)
579
- );
580
- };
581
- }
582
-
583
585
 
584
586
 
585
587
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,6 @@
1
- // src/index.ts
1
+ import "./chunk-WAXGOBY2.mjs";
2
+
3
+ // src/handler.ts
2
4
  import { defuOverrideArray } from "@weapp-tailwindcss/shared";
3
5
  import postcss from "postcss";
4
6
 
@@ -543,6 +545,24 @@ function getPlugins(options) {
543
545
  return plugins;
544
546
  }
545
547
 
548
+ // src/handler.ts
549
+ function styleHandler(rawSource, options) {
550
+ return postcss(getPlugins(options)).process(
551
+ rawSource,
552
+ options.postcssOptions?.options ?? {
553
+ from: void 0
554
+ }
555
+ ).async();
556
+ }
557
+ function createStyleHandler(options) {
558
+ return (rawSource, opt) => {
559
+ return styleHandler(
560
+ rawSource,
561
+ defuOverrideArray(opt, options)
562
+ );
563
+ };
564
+ }
565
+
546
566
  // src/preflight.ts
547
567
  function createInjectPreflight(options) {
548
568
  const result = [];
@@ -561,24 +581,6 @@ function createInjectPreflight(options) {
561
581
  return result;
562
582
  };
563
583
  }
564
-
565
- // src/index.ts
566
- function styleHandler(rawSource, options) {
567
- return postcss(getPlugins(options)).process(
568
- rawSource,
569
- options.postcssOptions?.options ?? {
570
- from: void 0
571
- }
572
- ).async();
573
- }
574
- function createStyleHandler(options) {
575
- return (rawSource, opt) => {
576
- return styleHandler(
577
- rawSource,
578
- defuOverrideArray(opt, options)
579
- );
580
- };
581
- }
582
584
  export {
583
585
  createInjectPreflight,
584
586
  createStyleHandler,
@@ -180,4 +180,4 @@ interface UserDefinedPostcssOptions {
180
180
  customRuleCallback?: CustomRuleCallback;
181
181
  }
182
182
 
183
- export { type CustomRuleCallback as C, type InternalCssSelectorReplacerOptions as I, type LoadedPostcssOptions as L, type RequiredStyleHandlerOptions as R, type UserDefinedPostcssOptions as U, type IStyleHandlerOptions as a, type IPropValue as b, createInjectPreflight as c, type CssPreflightOptions as d };
183
+ export { type CustomRuleCallback as C, type IStyleHandlerOptions as I, type LoadedPostcssOptions as L, type RequiredStyleHandlerOptions as R, type UserDefinedPostcssOptions as U, type InternalCssSelectorReplacerOptions as a, type IPropValue as b, createInjectPreflight as c, type CssPreflightOptions as d };
@@ -180,4 +180,4 @@ interface UserDefinedPostcssOptions {
180
180
  customRuleCallback?: CustomRuleCallback;
181
181
  }
182
182
 
183
- export { type CustomRuleCallback as C, type InternalCssSelectorReplacerOptions as I, type LoadedPostcssOptions as L, type RequiredStyleHandlerOptions as R, type UserDefinedPostcssOptions as U, type IStyleHandlerOptions as a, type IPropValue as b, createInjectPreflight as c, type CssPreflightOptions as d };
183
+ export { type CustomRuleCallback as C, type IStyleHandlerOptions as I, type LoadedPostcssOptions as L, type RequiredStyleHandlerOptions as R, type UserDefinedPostcssOptions as U, type InternalCssSelectorReplacerOptions as a, type IPropValue as b, createInjectPreflight as c, type CssPreflightOptions as d };
package/dist/types.d.mts CHANGED
@@ -2,4 +2,4 @@ import '@weapp-tailwindcss/mangle/types';
2
2
  import 'postcss';
3
3
  import 'postcss-load-config';
4
4
  import 'postcss-rem-to-responsive-pixel';
5
- export { d as CssPreflightOptions, C as CustomRuleCallback, b as IPropValue, a as IStyleHandlerOptions, I as InternalCssSelectorReplacerOptions, L as LoadedPostcssOptions, R as RequiredStyleHandlerOptions, U as UserDefinedPostcssOptions } from './types-DxWi_8fe.mjs';
5
+ export { d as CssPreflightOptions, C as CustomRuleCallback, b as IPropValue, I as IStyleHandlerOptions, a as InternalCssSelectorReplacerOptions, L as LoadedPostcssOptions, R as RequiredStyleHandlerOptions, U as UserDefinedPostcssOptions } from './types-BlpvjUzB.mjs';
package/dist/types.d.ts CHANGED
@@ -2,4 +2,4 @@ import '@weapp-tailwindcss/mangle/types';
2
2
  import 'postcss';
3
3
  import 'postcss-load-config';
4
4
  import 'postcss-rem-to-responsive-pixel';
5
- export { d as CssPreflightOptions, C as CustomRuleCallback, b as IPropValue, a as IStyleHandlerOptions, I as InternalCssSelectorReplacerOptions, L as LoadedPostcssOptions, R as RequiredStyleHandlerOptions, U as UserDefinedPostcssOptions } from './types-DxWi_8fe.js';
5
+ export { d as CssPreflightOptions, C as CustomRuleCallback, b as IPropValue, I as IStyleHandlerOptions, a as InternalCssSelectorReplacerOptions, L as LoadedPostcssOptions, R as RequiredStyleHandlerOptions, U as UserDefinedPostcssOptions } from './types-BlpvjUzB.js';
package/dist/types.js CHANGED
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";require('./chunk-GGNOJ77I.js');
package/dist/types.mjs CHANGED
@@ -0,0 +1 @@
1
+ import "./chunk-WAXGOBY2.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weapp-tailwindcss/postcss",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.2",
4
4
  "description": "@weapp-tailwindcss/postcss",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "@weapp-tailwindcss/shared": "1.0.0-alpha.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@weapp-tailwindcss/mangle": "1.0.0-alpha.1"
44
+ "@weapp-tailwindcss/mangle": "1.0.0-alpha.2"
45
45
  },
46
46
  "scripts": {
47
47
  "dev": "tsup --watch --sourcemap",