weapp-tailwindcss 3.3.2 → 3.3.4-alpha.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/babel/index.d.ts +13 -2
- package/dist/bundlers/gulp/index.d.ts +2 -1
- package/dist/bundlers/vite/index.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v4.d.ts +1 -1
- package/dist/bundlers/webpack/BaseUnifiedPlugin/v5.d.ts +1 -1
- package/dist/cache/index.d.ts +1 -0
- package/dist/cli.js +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/css-macro/index.d.ts +1 -1
- package/dist/gulp.js +2 -2
- package/dist/gulp.mjs +2 -2
- package/dist/{index-CaB13TS1.js → index-CzTwkO1i.js} +1 -1
- package/dist/{index-DpII6RJo.mjs → index-DZAayQkp.mjs} +1 -1
- package/dist/{index-C1HZVhiY.mjs → index-fnkBzr0E.mjs} +1 -1
- package/dist/{index-DRT-eOAe.js → index-kBvY5Jba.js} +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/dist/js/handlers.d.ts +1 -1
- package/dist/js/index.d.ts +1 -1
- package/dist/mangle/index.d.ts +2 -2
- package/dist/{options-BknKvI1z.mjs → options-623pQbPS.mjs} +17 -5
- package/dist/{options-CWTucIUE.js → options-B7DqzgQ8.js} +18 -5
- package/dist/postcss/index.d.ts +1 -1
- package/dist/postcss/mp.d.ts +1 -1
- package/dist/postcss/plugins/index.d.ts +1 -1
- package/dist/postcss/plugins/post.d.ts +1 -1
- package/dist/postcss/plugins/pre.d.ts +1 -1
- package/dist/postcss/preflight.d.ts +1 -1
- package/dist/postcss/selectorParser.d.ts +1 -1
- package/dist/postcss/shared.d.ts +1 -1
- package/dist/tailwindcss/patcher.d.ts +3 -4
- package/dist/tailwindcss/supportCustomUnit.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.ts +3 -3
- package/dist/{v5-DAH0FUHq.js → v5-B_M1SQUm.js} +1 -1
- package/dist/{v5-DOhHWLjR.mjs → v5-C4BtnBDn.mjs} +1 -1
- package/dist/vite.js +2 -2
- package/dist/vite.mjs +2 -2
- package/dist/webpack.js +2 -2
- package/dist/webpack.mjs +2 -2
- package/dist/webpack4.js +1 -1
- package/dist/webpack4.mjs +1 -1
- package/dist/wxml/shared.d.ts +1 -1
- package/dist/wxml/utils.d.ts +3 -3
- package/package.json +1 -1
package/dist/babel/index.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import _babelGenerate from '@babel/generator';
|
|
2
|
-
import _babelTraverse from '@babel/traverse';
|
|
3
2
|
export { parse, parseExpression } from '@babel/parser';
|
|
4
3
|
export declare const generate: typeof _babelGenerate;
|
|
5
|
-
export declare const traverse:
|
|
4
|
+
export declare const traverse: {
|
|
5
|
+
<S>(parent: import("@babel/types").Node, opts: import("@babel/traverse").TraverseOptions<S>, scope: import("@babel/traverse").Scope | undefined, state: S, parentPath?: import("@babel/traverse").NodePath<import("@babel/types").Node> | undefined): void;
|
|
6
|
+
(parent: import("@babel/types").Node, opts?: import("@babel/traverse").TraverseOptions<import("@babel/types").Node> | undefined, scope?: import("@babel/traverse").Scope | undefined, state?: any, parentPath?: import("@babel/traverse").NodePath<import("@babel/types").Node> | undefined): void;
|
|
7
|
+
visitors: typeof import("@babel/traverse").visitors;
|
|
8
|
+
verify: typeof import("@babel/traverse").visitors.verify;
|
|
9
|
+
explode: typeof import("@babel/traverse").visitors.explode;
|
|
10
|
+
cheap: (node: import("@babel/types").Node, enter: (node: import("@babel/types").Node) => void) => void;
|
|
11
|
+
node: (node: import("@babel/types").Node, opts: import("@babel/traverse").TraverseOptions<import("@babel/types").Node>, scope?: import("@babel/traverse").Scope | undefined, state?: any, path?: import("@babel/traverse").NodePath<import("@babel/types").Node> | undefined, skipKeys?: Record<string, boolean> | undefined) => void;
|
|
12
|
+
clearNode: (node: import("@babel/types").Node, opts?: import("@babel/types").RemovePropertiesOptions | undefined) => void;
|
|
13
|
+
removeProperties: (tree: import("@babel/types").Node, opts?: import("@babel/types").RemovePropertiesOptions | undefined) => import("@babel/types").Node;
|
|
14
|
+
hasType: (tree: import("@babel/types").Node, type: "AnyTypeAnnotation" | "ArgumentPlaceholder" | "ArrayExpression" | "ArrayPattern" | "ArrayTypeAnnotation" | "ArrowFunctionExpression" | "AssignmentExpression" | "AssignmentPattern" | "AwaitExpression" | "BigIntLiteral" | "BinaryExpression" | "BindExpression" | "BlockStatement" | "BooleanLiteral" | "BooleanLiteralTypeAnnotation" | "BooleanTypeAnnotation" | "BreakStatement" | "CallExpression" | "CatchClause" | "ClassAccessorProperty" | "ClassBody" | "ClassDeclaration" | "ClassExpression" | "ClassImplements" | "ClassMethod" | "ClassPrivateMethod" | "ClassPrivateProperty" | "ClassProperty" | "ConditionalExpression" | "ContinueStatement" | "DebuggerStatement" | "DecimalLiteral" | "DeclareClass" | "DeclareExportAllDeclaration" | "DeclareExportDeclaration" | "DeclareFunction" | "DeclareInterface" | "DeclareModule" | "DeclareModuleExports" | "DeclareOpaqueType" | "DeclareTypeAlias" | "DeclareVariable" | "DeclaredPredicate" | "Decorator" | "Directive" | "DirectiveLiteral" | "DoExpression" | "DoWhileStatement" | "EmptyStatement" | "EmptyTypeAnnotation" | "EnumBooleanBody" | "EnumBooleanMember" | "EnumDeclaration" | "EnumDefaultedMember" | "EnumNumberBody" | "EnumNumberMember" | "EnumStringBody" | "EnumStringMember" | "EnumSymbolBody" | "ExistsTypeAnnotation" | "ExportAllDeclaration" | "ExportDefaultDeclaration" | "ExportDefaultSpecifier" | "ExportNamedDeclaration" | "ExportNamespaceSpecifier" | "ExportSpecifier" | "ExpressionStatement" | "File" | "ForInStatement" | "ForOfStatement" | "ForStatement" | "FunctionDeclaration" | "FunctionExpression" | "FunctionTypeAnnotation" | "FunctionTypeParam" | "GenericTypeAnnotation" | "Identifier" | "IfStatement" | "Import" | "ImportAttribute" | "ImportDeclaration" | "ImportDefaultSpecifier" | "ImportExpression" | "ImportNamespaceSpecifier" | "ImportSpecifier" | "IndexedAccessType" | "InferredPredicate" | "InterfaceDeclaration" | "InterfaceExtends" | "InterfaceTypeAnnotation" | "InterpreterDirective" | "IntersectionTypeAnnotation" | "JSXAttribute" | "JSXClosingElement" | "JSXClosingFragment" | "JSXElement" | "JSXEmptyExpression" | "JSXExpressionContainer" | "JSXFragment" | "JSXIdentifier" | "JSXMemberExpression" | "JSXNamespacedName" | "JSXOpeningElement" | "JSXOpeningFragment" | "JSXSpreadAttribute" | "JSXSpreadChild" | "JSXText" | "LabeledStatement" | "LogicalExpression" | "MemberExpression" | "MetaProperty" | "MixedTypeAnnotation" | "ModuleExpression" | "NewExpression" | "Noop" | "NullLiteral" | "NullLiteralTypeAnnotation" | "NullableTypeAnnotation" | "NumberLiteral" | "NumberLiteralTypeAnnotation" | "NumberTypeAnnotation" | "NumericLiteral" | "ObjectExpression" | "ObjectMethod" | "ObjectPattern" | "ObjectProperty" | "ObjectTypeAnnotation" | "ObjectTypeCallProperty" | "ObjectTypeIndexer" | "ObjectTypeInternalSlot" | "ObjectTypeProperty" | "ObjectTypeSpreadProperty" | "OpaqueType" | "OptionalCallExpression" | "OptionalIndexedAccessType" | "OptionalMemberExpression" | "ParenthesizedExpression" | "PipelineBareFunction" | "PipelinePrimaryTopicReference" | "PipelineTopicExpression" | "Placeholder" | "PrivateName" | "Program" | "QualifiedTypeIdentifier" | "RecordExpression" | "RegExpLiteral" | "RegexLiteral" | "RestElement" | "RestProperty" | "ReturnStatement" | "SequenceExpression" | "SpreadElement" | "SpreadProperty" | "StaticBlock" | "StringLiteral" | "StringLiteralTypeAnnotation" | "StringTypeAnnotation" | "Super" | "SwitchCase" | "SwitchStatement" | "SymbolTypeAnnotation" | "TSAnyKeyword" | "TSArrayType" | "TSAsExpression" | "TSBigIntKeyword" | "TSBooleanKeyword" | "TSCallSignatureDeclaration" | "TSConditionalType" | "TSConstructSignatureDeclaration" | "TSConstructorType" | "TSDeclareFunction" | "TSDeclareMethod" | "TSEnumDeclaration" | "TSEnumMember" | "TSExportAssignment" | "TSExpressionWithTypeArguments" | "TSExternalModuleReference" | "TSFunctionType" | "TSImportEqualsDeclaration" | "TSImportType" | "TSIndexSignature" | "TSIndexedAccessType" | "TSInferType" | "TSInstantiationExpression" | "TSInterfaceBody" | "TSInterfaceDeclaration" | "TSIntersectionType" | "TSIntrinsicKeyword" | "TSLiteralType" | "TSMappedType" | "TSMethodSignature" | "TSModuleBlock" | "TSModuleDeclaration" | "TSNamedTupleMember" | "TSNamespaceExportDeclaration" | "TSNeverKeyword" | "TSNonNullExpression" | "TSNullKeyword" | "TSNumberKeyword" | "TSObjectKeyword" | "TSOptionalType" | "TSParameterProperty" | "TSParenthesizedType" | "TSPropertySignature" | "TSQualifiedName" | "TSRestType" | "TSSatisfiesExpression" | "TSStringKeyword" | "TSSymbolKeyword" | "TSThisType" | "TSTupleType" | "TSTypeAliasDeclaration" | "TSTypeAnnotation" | "TSTypeAssertion" | "TSTypeLiteral" | "TSTypeOperator" | "TSTypeParameter" | "TSTypeParameterDeclaration" | "TSTypeParameterInstantiation" | "TSTypePredicate" | "TSTypeQuery" | "TSTypeReference" | "TSUndefinedKeyword" | "TSUnionType" | "TSUnknownKeyword" | "TSVoidKeyword" | "TaggedTemplateExpression" | "TemplateElement" | "TemplateLiteral" | "ThisExpression" | "ThisTypeAnnotation" | "ThrowStatement" | "TopicReference" | "TryStatement" | "TupleExpression" | "TupleTypeAnnotation" | "TypeAlias" | "TypeAnnotation" | "TypeCastExpression" | "TypeParameter" | "TypeParameterDeclaration" | "TypeParameterInstantiation" | "TypeofTypeAnnotation" | "UnaryExpression" | "UnionTypeAnnotation" | "UpdateExpression" | "V8IntrinsicIdentifier" | "VariableDeclaration" | "VariableDeclarator" | "Variance" | "VoidTypeAnnotation" | "WhileStatement" | "WithStatement" | "YieldExpression", denylistTypes?: string[] | undefined) => boolean;
|
|
15
|
+
cache: typeof import("@babel/traverse").cache;
|
|
16
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import stream from 'node:stream';
|
|
2
|
-
import type { CreateJsHandlerOptions, IStyleHandlerOptions, ITemplateHandlerOptions, UserDefinedOptions } from
|
|
3
|
+
import type { CreateJsHandlerOptions, IStyleHandlerOptions, ITemplateHandlerOptions, UserDefinedOptions } from "../../types";
|
|
3
4
|
export declare function createPlugins(options?: UserDefinedOptions): {
|
|
4
5
|
transformWxss: (options?: Partial<IStyleHandlerOptions>) => stream.Transform;
|
|
5
6
|
transformWxml: (options?: Partial<ITemplateHandlerOptions>) => stream.Transform;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Compiler } from 'webpack4';
|
|
2
|
-
import type { AppType, IBaseWebpackPlugin, InternalUserDefinedOptions, UserDefinedOptions } from
|
|
2
|
+
import type { AppType, IBaseWebpackPlugin, InternalUserDefinedOptions, UserDefinedOptions } from "../../../types";
|
|
3
3
|
export declare class UnifiedWebpackPluginV4 implements IBaseWebpackPlugin {
|
|
4
4
|
options: InternalUserDefinedOptions;
|
|
5
5
|
appType?: AppType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Compiler } from 'webpack';
|
|
2
|
-
import type { AppType, IBaseWebpackPlugin, InternalUserDefinedOptions, UserDefinedOptions } from
|
|
2
|
+
import type { AppType, IBaseWebpackPlugin, InternalUserDefinedOptions, UserDefinedOptions } from "../../../types";
|
|
3
3
|
export declare class UnifiedWebpackPluginV5 implements IBaseWebpackPlugin {
|
|
4
4
|
options: InternalUserDefinedOptions;
|
|
5
5
|
appType?: AppType;
|
package/dist/cache/index.d.ts
CHANGED
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var process = require('node:process');
|
|
4
4
|
var semver = require('semver');
|
|
5
|
-
var options = require('./options-
|
|
5
|
+
var options = require('./options-B7DqzgQ8.js');
|
|
6
6
|
var index = require('./index-DwZHOkK3.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import process from 'node:process';
|
|
2
2
|
import semver from 'semver';
|
|
3
|
-
import { g as getOptions } from './options-
|
|
3
|
+
import { g as getOptions } from './options-623pQbPS.mjs';
|
|
4
4
|
import { W as WEAPP_TW_REQUIRED_NODE_VERSION } from './index-BPzIdybK.mjs';
|
|
5
5
|
import 'magic-string';
|
|
6
6
|
import './replace.mjs';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UserDefinedOptions } from
|
|
1
|
+
import type { UserDefinedOptions } from "./types";
|
|
2
2
|
export declare function createContext(options?: UserDefinedOptions): {
|
|
3
3
|
transformWxss: (rawCss: string) => Promise<string>;
|
|
4
4
|
transformWxml: (rawWxml: string) => Promise<string>;
|
package/dist/core.js
CHANGED
package/dist/core.mjs
CHANGED
|
@@ -8,7 +8,7 @@ export interface Options {
|
|
|
8
8
|
declare const _default: {
|
|
9
9
|
(options: Options): {
|
|
10
10
|
handler: import("tailwindcss/types/config").PluginCreator;
|
|
11
|
-
config?: Partial<import("tailwindcss/types/config").Config
|
|
11
|
+
config?: Partial<import("tailwindcss/types/config").Config> | undefined;
|
|
12
12
|
};
|
|
13
13
|
__isOptionsFunction: true;
|
|
14
14
|
};
|
package/dist/gulp.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
require('./options-
|
|
5
|
+
var index = require('./index-CzTwkO1i.js');
|
|
6
|
+
require('./options-B7DqzgQ8.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
|
9
9
|
require('@weapp-core/escape');
|
package/dist/gulp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { c as createPlugins } from './index-
|
|
2
|
-
import './options-
|
|
1
|
+
export { c as createPlugins } from './index-fnkBzr0E.mjs';
|
|
2
|
+
import './options-623pQbPS.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import './replace.mjs';
|
|
5
5
|
import '@weapp-core/escape';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, _ as __awaiter } from './options-623pQbPS.mjs';
|
|
2
2
|
import { v as vitePluginName } from './index-BPzIdybK.mjs';
|
|
3
3
|
import { g as getGroupedEntries } from './defaults-DUZZvtdg.mjs';
|
|
4
4
|
import { c as createDebug } from './index-BEIjgKpF.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getOptions, _ as __awaiter } from './options-
|
|
1
|
+
import { g as getOptions, _ as __awaiter } from './options-623pQbPS.mjs';
|
|
2
2
|
import stream from 'node:stream';
|
|
3
3
|
import { Buffer } from 'node:buffer';
|
|
4
4
|
import { c as createDebug } from './index-BEIjgKpF.mjs';
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var v5 = require('./v5-
|
|
6
|
-
var index = require('./index-
|
|
7
|
-
var index$1 = require('./index-
|
|
8
|
-
require('./options-
|
|
5
|
+
var v5 = require('./v5-B_M1SQUm.js');
|
|
6
|
+
var index = require('./index-kBvY5Jba.js');
|
|
7
|
+
var index$1 = require('./index-CzTwkO1i.js');
|
|
8
|
+
require('./options-B7DqzgQ8.js');
|
|
9
9
|
require('magic-string');
|
|
10
10
|
require('./replace.js');
|
|
11
11
|
require('@weapp-core/escape');
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { U as UnifiedWebpackPluginV5 } from './v5-
|
|
2
|
-
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-
|
|
3
|
-
export { c as createPlugins } from './index-
|
|
4
|
-
import './options-
|
|
1
|
+
export { U as UnifiedWebpackPluginV5 } from './v5-C4BtnBDn.mjs';
|
|
2
|
+
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-DZAayQkp.mjs';
|
|
3
|
+
export { c as createPlugins } from './index-fnkBzr0E.mjs';
|
|
4
|
+
import './options-623pQbPS.mjs';
|
|
5
5
|
import 'magic-string';
|
|
6
6
|
import './replace.mjs';
|
|
7
7
|
import '@weapp-core/escape';
|
package/dist/js/handlers.d.ts
CHANGED
package/dist/js/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreateJsHandlerOptions, IJsHandlerOptions, JsHandlerResult } from
|
|
1
|
+
import type { CreateJsHandlerOptions, IJsHandlerOptions, JsHandlerResult } from "../types";
|
|
2
2
|
export declare function jsHandler(rawSource: string, options: IJsHandlerOptions): JsHandlerResult;
|
|
3
3
|
export declare function jsHandlerAsync(rawSource: string, options: IJsHandlerOptions): Promise<JsHandlerResult>;
|
|
4
4
|
export declare function createJsHandler(options: CreateJsHandlerOptions): (rawSource: string, set: Set<string>, options?: CreateJsHandlerOptions) => JsHandlerResult | Promise<JsHandlerResult>;
|
package/dist/mangle/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IMangleScopeContext, UserDefinedOptions } from
|
|
1
|
+
import type { IMangleScopeContext, UserDefinedOptions } from "../types";
|
|
2
2
|
export declare const defaultMangleContext: IMangleScopeContext;
|
|
3
3
|
export declare function useMangleStore(): {
|
|
4
4
|
mangleContext: IMangleScopeContext;
|
|
5
5
|
resetMangle: () => IMangleScopeContext;
|
|
6
|
-
initMangle: (options: UserDefinedOptions[
|
|
6
|
+
initMangle: (options: UserDefinedOptions['mangle']) => void;
|
|
7
7
|
setMangleRuntimeSet: (runtimeSet: Set<string>) => void;
|
|
8
8
|
};
|
|
@@ -13,7 +13,7 @@ import postcss from 'postcss';
|
|
|
13
13
|
import { g as getPlugins } from './index-BPzIdybK.mjs';
|
|
14
14
|
import path from 'node:path';
|
|
15
15
|
import fs from 'node:fs';
|
|
16
|
-
import 'node:process';
|
|
16
|
+
import process from 'node:process';
|
|
17
17
|
import { gte } from 'semver';
|
|
18
18
|
import { TailwindcssPatcher, requireResolve } from 'tailwindcss-patch';
|
|
19
19
|
import { ClassGenerator, defaultMangleClassFilter } from '@tailwindcss-mangle/shared';
|
|
@@ -599,9 +599,21 @@ function internalPatch(pkgJsonPath, options) {
|
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
function createTailwindcssPatcher(basedir) {
|
|
602
|
+
function createTailwindcssPatcher(basedir, cacheDir) {
|
|
603
|
+
const cache = {};
|
|
604
|
+
if (cacheDir) {
|
|
605
|
+
if (path.isAbsolute(cacheDir)) {
|
|
606
|
+
cache.dir = cacheDir;
|
|
607
|
+
}
|
|
608
|
+
else if (basedir) {
|
|
609
|
+
cache.dir = path.resolve(basedir, cacheDir);
|
|
610
|
+
}
|
|
611
|
+
else {
|
|
612
|
+
cache.dir = path.resolve(process.cwd(), cacheDir);
|
|
613
|
+
}
|
|
614
|
+
}
|
|
603
615
|
return new TailwindcssPatcher({
|
|
604
|
-
cache
|
|
616
|
+
cache,
|
|
605
617
|
patch: {
|
|
606
618
|
basedir,
|
|
607
619
|
},
|
|
@@ -751,7 +763,7 @@ function createCache(options) {
|
|
|
751
763
|
function getOptions(opts) {
|
|
752
764
|
const result = defuOverrideArray(opts, defaultOptions, {});
|
|
753
765
|
result.escapeMap = result.customReplaceDictionary;
|
|
754
|
-
const { cssPreflight, customRuleCallback, cssPreflightRange, customAttributes, supportCustomLengthUnitsPatch, arbitraryValues, cssChildCombinatorReplaceValue, inlineWxs, injectAdditionalCssVarScope, jsPreserveClass, disabledDefaultTemplateHandler, cssSelectorReplacement, rem2rpx, cache, jsAstTool, babelParserOptions, postcssOptions, cssRemoveHoverPseudoClass, escapeMap, mangle, tailwindcssBasedir, } = result;
|
|
766
|
+
const { cssPreflight, customRuleCallback, cssPreflightRange, customAttributes, supportCustomLengthUnitsPatch, arbitraryValues, cssChildCombinatorReplaceValue, inlineWxs, injectAdditionalCssVarScope, jsPreserveClass, disabledDefaultTemplateHandler, cssSelectorReplacement, rem2rpx, cache, jsAstTool, babelParserOptions, postcssOptions, cssRemoveHoverPseudoClass, escapeMap, mangle, tailwindcssBasedir, appType, } = result;
|
|
755
767
|
const cssInjectPreflight = createInjectPreflight(cssPreflight);
|
|
756
768
|
const customAttributesEntities = isMap(customAttributes)
|
|
757
769
|
? [...customAttributes.entries()]
|
|
@@ -791,7 +803,7 @@ function getOptions(opts) {
|
|
|
791
803
|
result.styleHandler = styleHandler;
|
|
792
804
|
result.jsHandler = jsHandler;
|
|
793
805
|
result.templateHandler = templateHandler;
|
|
794
|
-
const twPatcher = createTailwindcssPatcher(tailwindcssBasedir);
|
|
806
|
+
const twPatcher = createTailwindcssPatcher(tailwindcssBasedir, appType === 'mpx' ? 'node_modules/tailwindcss-patch/.cache' : undefined);
|
|
795
807
|
result.patch = () => {
|
|
796
808
|
createPatch(supportCustomLengthUnitsPatch)();
|
|
797
809
|
twPatcher.patch();
|
|
@@ -15,7 +15,7 @@ var postcss = require('postcss');
|
|
|
15
15
|
var index = require('./index-DwZHOkK3.js');
|
|
16
16
|
var path = require('node:path');
|
|
17
17
|
var fs = require('node:fs');
|
|
18
|
-
require('node:process');
|
|
18
|
+
var process = require('node:process');
|
|
19
19
|
var semver = require('semver');
|
|
20
20
|
var tailwindcssPatch = require('tailwindcss-patch');
|
|
21
21
|
var shared = require('@tailwindcss-mangle/shared');
|
|
@@ -49,6 +49,7 @@ var t__namespace = /*#__PURE__*/_interopNamespaceCompat(t);
|
|
|
49
49
|
var postcss__default = /*#__PURE__*/_interopDefaultCompat(postcss);
|
|
50
50
|
var path__default = /*#__PURE__*/_interopDefaultCompat(path);
|
|
51
51
|
var fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
52
|
+
var process__default = /*#__PURE__*/_interopDefaultCompat(process);
|
|
52
53
|
var md5__default = /*#__PURE__*/_interopDefaultCompat(md5);
|
|
53
54
|
|
|
54
55
|
/******************************************************************************
|
|
@@ -630,9 +631,21 @@ function internalPatch(pkgJsonPath, options) {
|
|
|
630
631
|
}
|
|
631
632
|
}
|
|
632
633
|
}
|
|
633
|
-
function createTailwindcssPatcher(basedir) {
|
|
634
|
+
function createTailwindcssPatcher(basedir, cacheDir) {
|
|
635
|
+
const cache = {};
|
|
636
|
+
if (cacheDir) {
|
|
637
|
+
if (path__default["default"].isAbsolute(cacheDir)) {
|
|
638
|
+
cache.dir = cacheDir;
|
|
639
|
+
}
|
|
640
|
+
else if (basedir) {
|
|
641
|
+
cache.dir = path__default["default"].resolve(basedir, cacheDir);
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
cache.dir = path__default["default"].resolve(process__default["default"].cwd(), cacheDir);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
634
647
|
return new tailwindcssPatch.TailwindcssPatcher({
|
|
635
|
-
cache
|
|
648
|
+
cache,
|
|
636
649
|
patch: {
|
|
637
650
|
basedir,
|
|
638
651
|
},
|
|
@@ -782,7 +795,7 @@ function createCache(options) {
|
|
|
782
795
|
function getOptions(opts) {
|
|
783
796
|
const result = defaults.defuOverrideArray(opts, defaults.defaultOptions, {});
|
|
784
797
|
result.escapeMap = result.customReplaceDictionary;
|
|
785
|
-
const { cssPreflight, customRuleCallback, cssPreflightRange, customAttributes, supportCustomLengthUnitsPatch, arbitraryValues, cssChildCombinatorReplaceValue, inlineWxs, injectAdditionalCssVarScope, jsPreserveClass, disabledDefaultTemplateHandler, cssSelectorReplacement, rem2rpx, cache, jsAstTool, babelParserOptions, postcssOptions, cssRemoveHoverPseudoClass, escapeMap, mangle, tailwindcssBasedir, } = result;
|
|
798
|
+
const { cssPreflight, customRuleCallback, cssPreflightRange, customAttributes, supportCustomLengthUnitsPatch, arbitraryValues, cssChildCombinatorReplaceValue, inlineWxs, injectAdditionalCssVarScope, jsPreserveClass, disabledDefaultTemplateHandler, cssSelectorReplacement, rem2rpx, cache, jsAstTool, babelParserOptions, postcssOptions, cssRemoveHoverPseudoClass, escapeMap, mangle, tailwindcssBasedir, appType, } = result;
|
|
786
799
|
const cssInjectPreflight = createInjectPreflight(cssPreflight);
|
|
787
800
|
const customAttributesEntities = defaults.isMap(customAttributes)
|
|
788
801
|
? [...customAttributes.entries()]
|
|
@@ -822,7 +835,7 @@ function getOptions(opts) {
|
|
|
822
835
|
result.styleHandler = styleHandler;
|
|
823
836
|
result.jsHandler = jsHandler;
|
|
824
837
|
result.templateHandler = templateHandler;
|
|
825
|
-
const twPatcher = createTailwindcssPatcher(tailwindcssBasedir);
|
|
838
|
+
const twPatcher = createTailwindcssPatcher(tailwindcssBasedir, appType === 'mpx' ? 'node_modules/tailwindcss-patch/.cache' : undefined);
|
|
826
839
|
result.patch = () => {
|
|
827
840
|
createPatch(supportCustomLengthUnitsPatch)();
|
|
828
841
|
twPatcher.patch();
|
package/dist/postcss/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { IStyleHandlerOptions } from
|
|
1
|
+
import type { IStyleHandlerOptions } from "../types";
|
|
2
2
|
export declare function styleHandler(rawSource: string, options: IStyleHandlerOptions): Promise<string>;
|
|
3
3
|
export declare function createStyleHandler(options: Partial<IStyleHandlerOptions>): (rawSource: string, opt?: Partial<IStyleHandlerOptions>) => Promise<string>;
|
package/dist/postcss/mp.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Rule } from 'postcss';
|
|
2
|
-
import type { IStyleHandlerOptions } from
|
|
2
|
+
import type { IStyleHandlerOptions } from "../types";
|
|
3
3
|
export declare function testIfVariablesScope(node: Rule, count?: number): boolean;
|
|
4
4
|
export declare function testIfTwBackdrop(node: Rule, count?: number): boolean;
|
|
5
5
|
export declare function makePseudoVarRule(): Rule;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AcceptedPlugin } from 'postcss';
|
|
2
|
-
import type { IStyleHandlerOptions } from
|
|
2
|
+
import type { IStyleHandlerOptions } from "../../types";
|
|
3
3
|
export declare function getPlugins(options: IStyleHandlerOptions): AcceptedPlugin[];
|
|
4
4
|
export { postcssWeappTailwindcssPostPlugin } from './post';
|
|
5
5
|
export { postcssWeappTailwindcssPrePlugin } from './pre';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PluginCreator } from 'postcss';
|
|
2
|
-
import type { IStyleHandlerOptions } from
|
|
2
|
+
import type { IStyleHandlerOptions } from "../../types";
|
|
3
3
|
export type PostcssWeappTailwindcssRenamePlugin = PluginCreator<IStyleHandlerOptions>;
|
|
4
4
|
declare const postcssWeappTailwindcssPostPlugin: PostcssWeappTailwindcssRenamePlugin;
|
|
5
5
|
export { postcssWeappTailwindcssPostPlugin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PluginCreator } from 'postcss';
|
|
2
|
-
import type { IStyleHandlerOptions } from
|
|
2
|
+
import type { IStyleHandlerOptions } from "../../types";
|
|
3
3
|
export type PostcssWeappTailwindcssRenamePlugin = PluginCreator<IStyleHandlerOptions>;
|
|
4
4
|
declare const postcssWeappTailwindcssPrePlugin: PostcssWeappTailwindcssRenamePlugin;
|
|
5
5
|
export { postcssWeappTailwindcssPrePlugin };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { CssPreflightOptions, IPropValue } from
|
|
1
|
+
import type { CssPreflightOptions, IPropValue } from "../types";
|
|
2
2
|
export type InjectPreflight = () => IPropValue[];
|
|
3
3
|
export declare function createInjectPreflight(options?: CssPreflightOptions): InjectPreflight;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import selectorParser from 'postcss-selector-parser';
|
|
2
2
|
import type { Rule } from 'postcss';
|
|
3
|
-
import type { IStyleHandlerOptions } from
|
|
3
|
+
import type { IStyleHandlerOptions } from "../types";
|
|
4
4
|
export declare function ruleTransformSync(rule: Rule, options: IStyleHandlerOptions): void;
|
|
5
5
|
export declare function isOnlyBeforeAndAfterPseudoElement(node: Rule): boolean;
|
|
6
6
|
export declare const fallbackRemove: selectorParser.Processor<void, selectorParser.Selectors>;
|
package/dist/postcss/shared.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { InternalCssSelectorReplacerOptions } from
|
|
1
|
+
import type { InternalCssSelectorReplacerOptions } from "../types";
|
|
2
2
|
export declare function internalCssSelectorReplacer(selectors: string, options?: InternalCssSelectorReplacerOptions): string;
|
|
3
3
|
export declare function composeIsPseudo(strs: string | string[]): string;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { TailwindcssPatcher } from 'tailwindcss-patch';
|
|
2
|
-
import type { ILengthUnitsPatchOptions, InternalPatchResult } from
|
|
3
|
-
import { noop } from
|
|
2
|
+
import type { ILengthUnitsPatchOptions, InternalPatchResult } from "../types";
|
|
3
|
+
import { noop } from "../utils";
|
|
4
4
|
export declare function getInstalledPkgJsonPath(options: ILengthUnitsPatchOptions): string | undefined;
|
|
5
5
|
export declare function createPatch(options: false | ILengthUnitsPatchOptions): typeof noop;
|
|
6
6
|
export declare function monkeyPatchForSupportingCustomUnit(rootDir: string, options: ILengthUnitsPatchOptions): string | undefined;
|
|
7
7
|
export declare function internalPatch(pkgJsonPath: string | undefined, options: ILengthUnitsPatchOptions): InternalPatchResult | undefined;
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function createTailwindcssPatcher(basedir?: string): TailwindcssPatcher;
|
|
8
|
+
export declare function createTailwindcssPatcher(basedir?: string, cacheDir?: string): TailwindcssPatcher;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as t from '@babel/types';
|
|
2
|
-
import type { ILengthUnitsPatchOptions } from
|
|
2
|
+
import type { ILengthUnitsPatchOptions } from "../types";
|
|
3
3
|
export declare function findAstNode(content: string, options: ILengthUnitsPatchOptions): {
|
|
4
4
|
arrayRef: t.ArrayExpression | undefined;
|
|
5
5
|
changed: boolean;
|
package/dist/types.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import type { Result } from 'postcss-load-config';
|
|
|
8
8
|
import type { TailwindcssPatcher } from 'tailwindcss-patch';
|
|
9
9
|
import type { InjectPreflight } from './postcss/preflight';
|
|
10
10
|
import type { IContext as PostcssContext } from './postcss/plugins/ctx';
|
|
11
|
-
import type { ICreateCacheReturnType } from
|
|
11
|
+
import type { ICreateCacheReturnType } from "./cache";
|
|
12
12
|
type PostcssOptions = Partial<Omit<Result, 'file'>>;
|
|
13
13
|
export type ItemOrItemArray<T> = T | T[];
|
|
14
14
|
export type AppType = 'uni-app' | 'uni-app-vite' | 'taro' | 'remax' | 'rax' | 'native' | 'kbone' | 'mpx';
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InternalUserDefinedOptions } from
|
|
1
|
+
import type { InternalUserDefinedOptions } from "./types";
|
|
2
2
|
export declare function isRegexp(value: unknown): boolean;
|
|
3
3
|
export declare function isMap(value: unknown): boolean;
|
|
4
4
|
export declare function regExpTest(arr: (string | RegExp)[] | undefined, str: string): boolean;
|
|
@@ -11,8 +11,8 @@ export declare const defuOverrideArray: <Source extends {
|
|
|
11
11
|
[x: string]: any;
|
|
12
12
|
[x: number]: any;
|
|
13
13
|
[x: symbol]: any;
|
|
14
|
-
}, Defaults extends
|
|
14
|
+
}, Defaults extends ({
|
|
15
15
|
[x: string]: any;
|
|
16
16
|
[x: number]: any;
|
|
17
17
|
[x: symbol]: any;
|
|
18
|
-
} | (number | boolean | any[] | Record<never, any> | null | undefined)
|
|
18
|
+
} | (number | boolean | any[] | Record<never, any> | null | undefined))[]>(source: Source, ...defaults: Defaults) => import("defu").Defu<Source, Defaults>;
|
package/dist/vite.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
6
|
-
require('./options-
|
|
5
|
+
var index = require('./index-kBvY5Jba.js');
|
|
6
|
+
require('./options-B7DqzgQ8.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
|
9
9
|
require('@weapp-core/escape');
|
package/dist/vite.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-
|
|
2
|
-
import './options-
|
|
1
|
+
export { U as UnifiedViteWeappTailwindcssPlugin } from './index-DZAayQkp.mjs';
|
|
2
|
+
import './options-623pQbPS.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import './replace.mjs';
|
|
5
5
|
import '@weapp-core/escape';
|
package/dist/webpack.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var v5 = require('./v5-
|
|
6
|
-
require('./options-
|
|
5
|
+
var v5 = require('./v5-B_M1SQUm.js');
|
|
6
|
+
require('./options-B7DqzgQ8.js');
|
|
7
7
|
require('magic-string');
|
|
8
8
|
require('./replace.js');
|
|
9
9
|
require('@weapp-core/escape');
|
package/dist/webpack.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { U as UnifiedWebpackPluginV5 } from './v5-
|
|
2
|
-
import './options-
|
|
1
|
+
export { U as UnifiedWebpackPluginV5 } from './v5-C4BtnBDn.mjs';
|
|
2
|
+
import './options-623pQbPS.mjs';
|
|
3
3
|
import 'magic-string';
|
|
4
4
|
import './replace.mjs';
|
|
5
5
|
import '@weapp-core/escape';
|
package/dist/webpack4.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var options = require('./options-
|
|
5
|
+
var options = require('./options-B7DqzgQ8.js');
|
|
6
6
|
var path = require('node:path');
|
|
7
7
|
var fs = require('node:fs');
|
|
8
8
|
var webpackSources = require('webpack-sources');
|
package/dist/webpack4.mjs
CHANGED
package/dist/wxml/shared.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ITemplateHandlerOptions } from
|
|
1
|
+
import type { ITemplateHandlerOptions } from "../types";
|
|
2
2
|
export declare function replaceWxml(original: string, options?: ITemplateHandlerOptions): string;
|
package/dist/wxml/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ItemOrItemArray } from
|
|
2
|
-
import type { ITemplateHandlerOptions, RawSource } from
|
|
1
|
+
import type { ItemOrItemArray } from "../reg";
|
|
2
|
+
import type { ITemplateHandlerOptions, RawSource } from "../types";
|
|
3
3
|
export declare function generateCode(match: string, options?: ITemplateHandlerOptions): string;
|
|
4
4
|
export declare function extractSource(original: string): RawSource[];
|
|
5
5
|
export declare function templateReplacer(original: string, options?: ITemplateHandlerOptions): string;
|
|
6
6
|
export declare function isPropsMatch(props: ItemOrItemArray<string | RegExp>, attr: string): boolean;
|
|
7
7
|
export declare function customTemplateHandler(rawSource: string, options: Required<ITemplateHandlerOptions>): Promise<string>;
|
|
8
|
-
export declare function createTemplateHandler(options?: Omit<ITemplateHandlerOptions, 'runtimeSet'>): (rawSource: string, opt?: Pick<ITemplateHandlerOptions,
|
|
8
|
+
export declare function createTemplateHandler(options?: Omit<ITemplateHandlerOptions, 'runtimeSet'>): (rawSource: string, opt?: Pick<ITemplateHandlerOptions, 'runtimeSet'>) => Promise<string>;
|
package/package.json
CHANGED