@talismn/util 0.0.0-pr920-20230713051537 → 0.0.0-pr920-20230714024531

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/CHANGELOG.md CHANGED
@@ -1,12 +1,16 @@
1
1
  # @talismn/util
2
2
 
3
- ## 0.0.0-pr920-20230713051537
3
+ ## 0.0.0-pr920-20230714024531
4
4
 
5
5
  ### Minor Changes
6
6
 
7
7
  - b920ab98: Added GPL licence
8
8
  - 7573864f: chore: remove dead code
9
9
 
10
+ ### Patch Changes
11
+
12
+ - 8664539c: fix: non-conflict tw class merging for classNames via twMerge
13
+
10
14
  ## 0.1.9
11
15
 
12
16
  ### Patch Changes
@@ -1,3 +1 @@
1
- type ClassName = string | false | undefined | null;
2
- export declare const classNames: (...args: ClassName[]) => string | undefined;
3
- export {};
1
+ export declare const classNames: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var util = require('@polkadot/util');
6
6
  var utilCrypto = require('@polkadot/util-crypto');
7
+ var tailwindMerge = require('tailwind-merge');
7
8
  var keyring = require('@polkadot/keyring');
8
9
  var BigNumber = require('bignumber.js');
9
10
 
@@ -43,9 +44,7 @@ function blake2Concat(input) {
43
44
  return util.u8aToHex(util.u8aConcat(utilCrypto.blake2AsU8a(input, bitLength$1), util.u8aToU8a(input)));
44
45
  }
45
46
 
46
- const classNames = (...args) => {
47
- return args.filter(Boolean).join(" ") || undefined;
48
- };
47
+ const classNames = tailwindMerge.twMerge;
49
48
 
50
49
  function decodeAnyAddress(encoded, ignoreChecksum, ss58Format) {
51
50
  try {
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var util = require('@polkadot/util');
6
6
  var utilCrypto = require('@polkadot/util-crypto');
7
+ var tailwindMerge = require('tailwind-merge');
7
8
  var keyring = require('@polkadot/keyring');
8
9
  var BigNumber = require('bignumber.js');
9
10
 
@@ -43,9 +44,7 @@ function blake2Concat(input) {
43
44
  return util.u8aToHex(util.u8aConcat(utilCrypto.blake2AsU8a(input, bitLength$1), util.u8aToU8a(input)));
44
45
  }
45
46
 
46
- const classNames = (...args) => {
47
- return args.filter(Boolean).join(" ") || undefined;
48
- };
47
+ const classNames = tailwindMerge.twMerge;
49
48
 
50
49
  function decodeAnyAddress(encoded, ignoreChecksum, ss58Format) {
51
50
  try {
@@ -1,5 +1,6 @@
1
1
  import { u8aToHex, u8aConcat, u8aToU8a, hexToU8a } from '@polkadot/util';
2
2
  import { blake2AsU8a, isEthereumAddress as isEthereumAddress$1, ethereumEncode, xxhashAsU8a } from '@polkadot/util-crypto';
3
+ import { twMerge } from 'tailwind-merge';
3
4
  import { decodeAddress, encodeAddress } from '@polkadot/keyring';
4
5
  import BigNumber from 'bignumber.js';
5
6
 
@@ -35,9 +36,7 @@ function blake2Concat(input) {
35
36
  return u8aToHex(u8aConcat(blake2AsU8a(input, bitLength$1), u8aToU8a(input)));
36
37
  }
37
38
 
38
- const classNames = (...args) => {
39
- return args.filter(Boolean).join(" ") || undefined;
40
- };
39
+ const classNames = twMerge;
41
40
 
42
41
  function decodeAnyAddress(encoded, ignoreChecksum, ss58Format) {
43
42
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talismn/util",
3
- "version": "0.0.0-pr920-20230713051537",
3
+ "version": "0.0.0-pr920-20230714024531",
4
4
  "author": "Talisman",
5
5
  "homepage": "https://talisman.xyz",
6
6
  "license": "GPL-3.0-or-later",
@@ -26,7 +26,8 @@
26
26
  "clean": "rm -rf dist && rm -rf .turbo rm -rf node_modules"
27
27
  },
28
28
  "dependencies": {
29
- "bignumber.js": "^9.1.1"
29
+ "bignumber.js": "^9.1.1",
30
+ "tailwind-merge": "^1.13.2"
30
31
  },
31
32
  "devDependencies": {
32
33
  "@polkadot/keyring": "^12.2.1",