@weapp-tailwindcss/merge 1.0.0-alpha.3 → 1.0.0-alpha.5
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/{chunk-VR7IWN2Z.cjs → chunk-D36KUYOC.cjs} +13 -12
- package/dist/{chunk-YR5LCHCZ.js → chunk-YLSVCIIK.js} +13 -12
- package/dist/cva.cjs +2 -2
- package/dist/cva.js +1 -1
- package/dist/index.cjs +31 -4
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +32 -5
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/@weapp-core+escape@
|
|
2
|
-
var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/@weapp-core+escape@4.0.0/node_modules/@weapp-core/escape/dist/index.mjs
|
|
2
|
+
var ComplexMappingChars2String = {
|
|
3
3
|
"[": "_bl_",
|
|
4
4
|
"]": "_br_",
|
|
5
5
|
"(": "_pl_",
|
|
@@ -34,14 +34,15 @@ var MappingChars2String = {
|
|
|
34
34
|
"$": "_do_"
|
|
35
35
|
// _: '_u_'
|
|
36
36
|
};
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var ComplexMappingChars2StringEntries = Object.entries(ComplexMappingChars2String);
|
|
38
|
+
var MappingChars2String = {
|
|
39
39
|
"[": "_",
|
|
40
40
|
"]": "_",
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
41
|
+
// for tailwindcss v4
|
|
42
|
+
"(": "y",
|
|
43
|
+
")": "y",
|
|
44
|
+
"{": "z",
|
|
45
|
+
"}": "z",
|
|
45
46
|
"+": "a",
|
|
46
47
|
",": "b",
|
|
47
48
|
":": "c",
|
|
@@ -67,7 +68,7 @@ var SimpleMappingChars2String = {
|
|
|
67
68
|
"\\": "w",
|
|
68
69
|
'"': "x"
|
|
69
70
|
};
|
|
70
|
-
var
|
|
71
|
+
var MappingChars2StringEntries = Object.entries(MappingChars2String);
|
|
71
72
|
var MAX_ASCII_CHAR_CODE = 127;
|
|
72
73
|
function isPlainObject(value) {
|
|
73
74
|
if (value === null || typeof value !== "object") {
|
|
@@ -146,7 +147,7 @@ function escape(selectors, options) {
|
|
|
146
147
|
return "";
|
|
147
148
|
}
|
|
148
149
|
const { map, ignoreHead } = defu(options, {
|
|
149
|
-
map:
|
|
150
|
+
map: MappingChars2String,
|
|
150
151
|
ignoreHead: false
|
|
151
152
|
});
|
|
152
153
|
const sb = [];
|
|
@@ -171,10 +172,10 @@ function escape(selectors, options) {
|
|
|
171
172
|
return sb.join("");
|
|
172
173
|
}
|
|
173
174
|
|
|
174
|
-
// ../weapp-tailwindcss/dist/chunk-
|
|
175
|
+
// ../weapp-tailwindcss/dist/chunk-PCBSAFQF.mjs
|
|
175
176
|
function replaceWxml(original, options = {
|
|
176
177
|
keepEOL: false,
|
|
177
|
-
escapeMap:
|
|
178
|
+
escapeMap: MappingChars2String
|
|
178
179
|
}) {
|
|
179
180
|
const { keepEOL, escapeMap, mangleContext, ignoreHead } = options;
|
|
180
181
|
let res = original;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// ../../node_modules/.pnpm/@weapp-core+escape@
|
|
2
|
-
var
|
|
1
|
+
// ../../node_modules/.pnpm/@weapp-core+escape@4.0.0/node_modules/@weapp-core/escape/dist/index.mjs
|
|
2
|
+
var ComplexMappingChars2String = {
|
|
3
3
|
"[": "_bl_",
|
|
4
4
|
"]": "_br_",
|
|
5
5
|
"(": "_pl_",
|
|
@@ -34,14 +34,15 @@ var MappingChars2String = {
|
|
|
34
34
|
"$": "_do_"
|
|
35
35
|
// _: '_u_'
|
|
36
36
|
};
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var ComplexMappingChars2StringEntries = Object.entries(ComplexMappingChars2String);
|
|
38
|
+
var MappingChars2String = {
|
|
39
39
|
"[": "_",
|
|
40
40
|
"]": "_",
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
41
|
+
// for tailwindcss v4
|
|
42
|
+
"(": "y",
|
|
43
|
+
")": "y",
|
|
44
|
+
"{": "z",
|
|
45
|
+
"}": "z",
|
|
45
46
|
"+": "a",
|
|
46
47
|
",": "b",
|
|
47
48
|
":": "c",
|
|
@@ -67,7 +68,7 @@ var SimpleMappingChars2String = {
|
|
|
67
68
|
"\\": "w",
|
|
68
69
|
'"': "x"
|
|
69
70
|
};
|
|
70
|
-
var
|
|
71
|
+
var MappingChars2StringEntries = Object.entries(MappingChars2String);
|
|
71
72
|
var MAX_ASCII_CHAR_CODE = 127;
|
|
72
73
|
function isPlainObject(value) {
|
|
73
74
|
if (value === null || typeof value !== "object") {
|
|
@@ -146,7 +147,7 @@ function escape(selectors, options) {
|
|
|
146
147
|
return "";
|
|
147
148
|
}
|
|
148
149
|
const { map, ignoreHead } = defu(options, {
|
|
149
|
-
map:
|
|
150
|
+
map: MappingChars2String,
|
|
150
151
|
ignoreHead: false
|
|
151
152
|
});
|
|
152
153
|
const sb = [];
|
|
@@ -171,10 +172,10 @@ function escape(selectors, options) {
|
|
|
171
172
|
return sb.join("");
|
|
172
173
|
}
|
|
173
174
|
|
|
174
|
-
// ../weapp-tailwindcss/dist/chunk-
|
|
175
|
+
// ../weapp-tailwindcss/dist/chunk-PCBSAFQF.mjs
|
|
175
176
|
function replaceWxml(original, options = {
|
|
176
177
|
keepEOL: false,
|
|
177
|
-
escapeMap:
|
|
178
|
+
escapeMap: MappingChars2String
|
|
178
179
|
}) {
|
|
179
180
|
const { keepEOL, escapeMap, mangleContext, ignoreHead } = options;
|
|
180
181
|
let res = original;
|
package/dist/cva.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkD36KUYOCcjs = require('./chunk-D36KUYOC.cjs');
|
|
4
4
|
|
|
5
5
|
// src/cva.ts
|
|
6
6
|
var _classvarianceauthority = require('class-variance-authority');
|
|
7
7
|
function cva(...inputs) {
|
|
8
8
|
const fn = _classvarianceauthority.cva.call(void 0, ...inputs);
|
|
9
9
|
return (...props) => {
|
|
10
|
-
return
|
|
10
|
+
return _chunkD36KUYOCcjs.replaceWxml.call(void 0, fn(...props));
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
|
package/dist/cva.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,15 +1,42 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkD36KUYOCcjs = require('./chunk-D36KUYOC.cjs');
|
|
5
5
|
|
|
6
6
|
// src/index.ts
|
|
7
7
|
var _clsx = require('clsx');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
8
15
|
var _tailwindmerge = require('tailwind-merge');
|
|
9
|
-
function
|
|
10
|
-
return
|
|
16
|
+
function twMerge(...inputs) {
|
|
17
|
+
return _chunkD36KUYOCcjs.replaceWxml.call(void 0, _tailwindmerge.twMerge.call(void 0, _clsx.clsx.call(void 0, inputs)));
|
|
11
18
|
}
|
|
19
|
+
function twJoin(...inputs) {
|
|
20
|
+
return _chunkD36KUYOCcjs.replaceWxml.call(void 0, _tailwindmerge.twJoin.call(void 0, _clsx.clsx.call(void 0, inputs)));
|
|
21
|
+
}
|
|
22
|
+
var extendTailwindMerge = (...args) => {
|
|
23
|
+
const customTwMerge = _tailwindmerge.extendTailwindMerge.call(void 0, ...args);
|
|
24
|
+
return function cn(...inputs) {
|
|
25
|
+
return _chunkD36KUYOCcjs.replaceWxml.call(void 0, customTwMerge(_clsx.clsx.call(void 0, inputs)));
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
var createTailwindMerge = (...args) => {
|
|
29
|
+
const customTwMerge = _tailwindmerge.createTailwindMerge.call(void 0, ...args);
|
|
30
|
+
return function cn(...inputs) {
|
|
31
|
+
return _chunkD36KUYOCcjs.replaceWxml.call(void 0, customTwMerge(_clsx.clsx.call(void 0, inputs)));
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
12
39
|
|
|
13
40
|
|
|
14
41
|
|
|
15
|
-
exports.
|
|
42
|
+
exports.createTailwindMerge = createTailwindMerge; exports.extendTailwindMerge = extendTailwindMerge; exports.getDefaultConfig = _tailwindmerge.getDefaultConfig; exports.mergeConfigs = _tailwindmerge.mergeConfigs; exports.twJoin = twJoin; exports.twMerge = twMerge; exports.weappTwIgnore = _chunkD36KUYOCcjs.weappTwIgnore;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
|
+
export { ClassValue } from 'clsx';
|
|
3
|
+
import { extendTailwindMerge as extendTailwindMerge$1, createTailwindMerge as createTailwindMerge$1 } from 'tailwind-merge';
|
|
4
|
+
export { getDefaultConfig, mergeConfigs } from 'tailwind-merge';
|
|
2
5
|
export { weappTwIgnore } from 'weapp-tailwindcss/escape';
|
|
3
6
|
|
|
4
|
-
declare function
|
|
7
|
+
declare function twMerge(...inputs: ClassValue[]): string;
|
|
8
|
+
declare function twJoin(...inputs: ClassValue[]): string;
|
|
9
|
+
declare const extendTailwindMerge: typeof extendTailwindMerge$1;
|
|
10
|
+
declare const createTailwindMerge: typeof createTailwindMerge$1;
|
|
5
11
|
|
|
6
|
-
export {
|
|
12
|
+
export { createTailwindMerge, extendTailwindMerge, twJoin, twMerge };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
|
+
export { ClassValue } from 'clsx';
|
|
3
|
+
import { extendTailwindMerge as extendTailwindMerge$1, createTailwindMerge as createTailwindMerge$1 } from 'tailwind-merge';
|
|
4
|
+
export { getDefaultConfig, mergeConfigs } from 'tailwind-merge';
|
|
2
5
|
export { weappTwIgnore } from 'weapp-tailwindcss/escape';
|
|
3
6
|
|
|
4
|
-
declare function
|
|
7
|
+
declare function twMerge(...inputs: ClassValue[]): string;
|
|
8
|
+
declare function twJoin(...inputs: ClassValue[]): string;
|
|
9
|
+
declare const extendTailwindMerge: typeof extendTailwindMerge$1;
|
|
10
|
+
declare const createTailwindMerge: typeof createTailwindMerge$1;
|
|
5
11
|
|
|
6
|
-
export {
|
|
12
|
+
export { createTailwindMerge, extendTailwindMerge, twJoin, twMerge };
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,42 @@
|
|
|
1
1
|
import {
|
|
2
2
|
replaceWxml,
|
|
3
3
|
weappTwIgnore
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YLSVCIIK.js";
|
|
5
5
|
|
|
6
6
|
// src/index.ts
|
|
7
7
|
import { clsx } from "clsx";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import {
|
|
9
|
+
createTailwindMerge as _createTailwindMerge,
|
|
10
|
+
extendTailwindMerge as _extendTailwindMerge,
|
|
11
|
+
twJoin as _twJoin,
|
|
12
|
+
twMerge as _twMerge,
|
|
13
|
+
getDefaultConfig,
|
|
14
|
+
mergeConfigs
|
|
15
|
+
} from "tailwind-merge";
|
|
16
|
+
function twMerge(...inputs) {
|
|
17
|
+
return replaceWxml(_twMerge(clsx(inputs)));
|
|
18
|
+
}
|
|
19
|
+
function twJoin(...inputs) {
|
|
20
|
+
return replaceWxml(_twJoin(clsx(inputs)));
|
|
11
21
|
}
|
|
22
|
+
var extendTailwindMerge = (...args) => {
|
|
23
|
+
const customTwMerge = _extendTailwindMerge(...args);
|
|
24
|
+
return function cn(...inputs) {
|
|
25
|
+
return replaceWxml(customTwMerge(clsx(inputs)));
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
var createTailwindMerge = (...args) => {
|
|
29
|
+
const customTwMerge = _createTailwindMerge(...args);
|
|
30
|
+
return function cn(...inputs) {
|
|
31
|
+
return replaceWxml(customTwMerge(clsx(inputs)));
|
|
32
|
+
};
|
|
33
|
+
};
|
|
12
34
|
export {
|
|
13
|
-
|
|
35
|
+
createTailwindMerge,
|
|
36
|
+
extendTailwindMerge,
|
|
37
|
+
getDefaultConfig,
|
|
38
|
+
mergeConfigs,
|
|
39
|
+
twJoin,
|
|
40
|
+
twMerge,
|
|
14
41
|
weappTwIgnore
|
|
15
42
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/merge",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.5",
|
|
5
5
|
"description": "weapp-tailwindcss",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"class-variance-authority": "^0.7.1",
|
|
35
35
|
"clsx": "^2.1.1",
|
|
36
|
-
"tailwind-merge": "^
|
|
36
|
+
"tailwind-merge": "^3.0.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"weapp-tailwindcss": "4.0.0-alpha.
|
|
39
|
+
"weapp-tailwindcss": "4.0.0-alpha.10"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"dev": "tsup --watch --sourcemap",
|