@weapp-tailwindcss/merge 1.0.0-alpha.4 → 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.
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// ../../node_modules/.pnpm/@weapp-core+escape@3.0.2/node_modules/@weapp-core/escape/dist/index.mjs
2
- var MappingChars2String = {
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 MappingChars2StringEntries = Object.entries(MappingChars2String);
38
- var SimpleMappingChars2String = {
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 SimpleMappingChars2StringEntries = Object.entries(SimpleMappingChars2String);
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: SimpleMappingChars2String,
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-U7O2XXYR.mjs
175
+ // ../weapp-tailwindcss/dist/chunk-PCBSAFQF.mjs
175
176
  function replaceWxml(original, options = {
176
177
  keepEOL: false,
177
- escapeMap: SimpleMappingChars2String
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@3.0.2/node_modules/@weapp-core/escape/dist/index.mjs
2
- var MappingChars2String = {
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 MappingChars2StringEntries = Object.entries(MappingChars2String);
38
- var SimpleMappingChars2String = {
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 SimpleMappingChars2StringEntries = Object.entries(SimpleMappingChars2String);
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: SimpleMappingChars2String,
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-U7O2XXYR.mjs
175
+ // ../weapp-tailwindcss/dist/chunk-PCBSAFQF.mjs
175
176
  function replaceWxml(original, options = {
176
177
  keepEOL: false,
177
- escapeMap: SimpleMappingChars2String
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 _chunkVR7IWN2Zcjs = require('./chunk-VR7IWN2Z.cjs');
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 _chunkVR7IWN2Zcjs.replaceWxml.call(void 0, fn(...props));
10
+ return _chunkD36KUYOCcjs.replaceWxml.call(void 0, fn(...props));
11
11
  };
12
12
  }
13
13
 
package/dist/cva.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  replaceWxml
3
- } from "./chunk-YR5LCHCZ.js";
3
+ } from "./chunk-YLSVCIIK.js";
4
4
 
5
5
  // src/cva.ts
6
6
  import { cva as _cva } from "class-variance-authority";
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkVR7IWN2Zcjs = require('./chunk-VR7IWN2Z.cjs');
4
+ var _chunkD36KUYOCcjs = require('./chunk-D36KUYOC.cjs');
5
5
 
6
6
  // src/index.ts
7
7
  var _clsx = require('clsx');
@@ -14,21 +14,21 @@ var _clsx = require('clsx');
14
14
 
15
15
  var _tailwindmerge = require('tailwind-merge');
16
16
  function twMerge(...inputs) {
17
- return _chunkVR7IWN2Zcjs.replaceWxml.call(void 0, _tailwindmerge.twMerge.call(void 0, _clsx.clsx.call(void 0, inputs)));
17
+ return _chunkD36KUYOCcjs.replaceWxml.call(void 0, _tailwindmerge.twMerge.call(void 0, _clsx.clsx.call(void 0, inputs)));
18
18
  }
19
19
  function twJoin(...inputs) {
20
- return _chunkVR7IWN2Zcjs.replaceWxml.call(void 0, _tailwindmerge.twJoin.call(void 0, _clsx.clsx.call(void 0, inputs)));
20
+ return _chunkD36KUYOCcjs.replaceWxml.call(void 0, _tailwindmerge.twJoin.call(void 0, _clsx.clsx.call(void 0, inputs)));
21
21
  }
22
22
  var extendTailwindMerge = (...args) => {
23
23
  const customTwMerge = _tailwindmerge.extendTailwindMerge.call(void 0, ...args);
24
24
  return function cn(...inputs) {
25
- return _chunkVR7IWN2Zcjs.replaceWxml.call(void 0, customTwMerge(_clsx.clsx.call(void 0, inputs)));
25
+ return _chunkD36KUYOCcjs.replaceWxml.call(void 0, customTwMerge(_clsx.clsx.call(void 0, inputs)));
26
26
  };
27
27
  };
28
28
  var createTailwindMerge = (...args) => {
29
29
  const customTwMerge = _tailwindmerge.createTailwindMerge.call(void 0, ...args);
30
30
  return function cn(...inputs) {
31
- return _chunkVR7IWN2Zcjs.replaceWxml.call(void 0, customTwMerge(_clsx.clsx.call(void 0, inputs)));
31
+ return _chunkD36KUYOCcjs.replaceWxml.call(void 0, customTwMerge(_clsx.clsx.call(void 0, inputs)));
32
32
  };
33
33
  };
34
34
 
@@ -39,4 +39,4 @@ var createTailwindMerge = (...args) => {
39
39
 
40
40
 
41
41
 
42
- exports.createTailwindMerge = createTailwindMerge; exports.extendTailwindMerge = extendTailwindMerge; exports.getDefaultConfig = _tailwindmerge.getDefaultConfig; exports.mergeConfigs = _tailwindmerge.mergeConfigs; exports.twJoin = twJoin; exports.twMerge = twMerge; exports.weappTwIgnore = _chunkVR7IWN2Zcjs.weappTwIgnore;
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.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  replaceWxml,
3
3
  weappTwIgnore
4
- } from "./chunk-YR5LCHCZ.js";
4
+ } from "./chunk-YLSVCIIK.js";
5
5
 
6
6
  // src/index.ts
7
7
  import { clsx } from "clsx";
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",
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": "^2.6.0"
36
+ "tailwind-merge": "^3.0.1"
37
37
  },
38
38
  "devDependencies": {
39
- "weapp-tailwindcss": "4.0.0-alpha.8"
39
+ "weapp-tailwindcss": "4.0.0-alpha.10"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "tsup --watch --sourcemap",