tailwind-merge 1.12.0 → 1.13.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/README.md CHANGED
@@ -1,9 +1,9 @@
1
+ <!-- This file is autogenerated. If you want to change this content, please do the changes in `./docs/README.md` instead. -->
2
+
1
3
  <div align="center">
2
4
  <br />
3
5
  <a href="https://github.com/dcastil/tailwind-merge">
4
- <!-- AUTOGENERATED VERSION START -->
5
- <img src="https://github.com/dcastil/tailwind-merge/raw/v1.12.0/assets/logo.svg" alt="tailwind-merge" height="150px" />
6
- <!-- AUTOGENERATED END -->
6
+ <img src="https://github.com/dcastil/tailwind-merge/raw/v1.13.0/assets/logo.svg" alt="tailwind-merge" height="150px" />
7
7
  </a>
8
8
  </div>
9
9
 
@@ -25,16 +25,13 @@ twMerge('px-2 py-1 bg-red hover:bg-dark-red', 'p-3 bg-[#B91C1C]')
25
25
 
26
26
  ## Get started
27
27
 
28
- <!-- AUTOGENERATED VERSION START -->
29
-
30
- - [What is it for](https://github.com/dcastil/tailwind-merge/tree/v1.12.0/docs/what-is-it-for.md)
31
- - [Features](https://github.com/dcastil/tailwind-merge/tree/v1.12.0/docs/features.md)
32
- - [Configuration](https://github.com/dcastil/tailwind-merge/tree/v1.12.0/docs/configuration.md)
33
- - [Recipes](https://github.com/dcastil/tailwind-merge/tree/v1.12.0/docs/recipes.md)
34
- - [API reference](https://github.com/dcastil/tailwind-merge/tree/v1.12.0/docs/api-reference.md)
35
- - [Writing plugins](https://github.com/dcastil/tailwind-merge/tree/v1.12.0/docs/writing-plugins.md)
36
- - [Versioning](https://github.com/dcastil/tailwind-merge/tree/v1.12.0/docs/versioning.md)
37
- - [Contributing](https://github.com/dcastil/tailwind-merge/tree/v1.12.0/.github/CONTRIBUTING.md)
38
- - [Similar packages](https://github.com/dcastil/tailwind-merge/tree/v1.12.0/docs/similar-packages.md)
39
-
40
- <!-- AUTOGENERATED END -->
28
+ - [What is it for](https://github.com/dcastil/tailwind-merge/tree/v1.13.0/docs/what-is-it-for.md)
29
+ - [When and how to use it](https://github.com/dcastil/tailwind-merge/tree/v1.13.0/docs/when-and-how-to-use-it.md)
30
+ - [Features](https://github.com/dcastil/tailwind-merge/tree/v1.13.0/docs/features.md)
31
+ - [Configuration](https://github.com/dcastil/tailwind-merge/tree/v1.13.0/docs/configuration.md)
32
+ - [Recipes](https://github.com/dcastil/tailwind-merge/tree/v1.13.0/docs/recipes.md)
33
+ - [API reference](https://github.com/dcastil/tailwind-merge/tree/v1.13.0/docs/api-reference.md)
34
+ - [Writing plugins](https://github.com/dcastil/tailwind-merge/tree/v1.13.0/docs/writing-plugins.md)
35
+ - [Versioning](https://github.com/dcastil/tailwind-merge/tree/v1.13.0/docs/versioning.md)
36
+ - [Contributing](https://github.com/dcastil/tailwind-merge/tree/v1.13.0/docs/contributing.md)
37
+ - [Similar packages](https://github.com/dcastil/tailwind-merge/tree/v1.13.0/docs/similar-packages.md)
package/dist/index.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { twJoin } from './lib/tw-join';
2
- export { twMerge } from './lib/tw-merge';
3
- export { twJoin } from './lib/tw-join';
4
- export { getDefaultConfig } from './lib/default-config';
5
- export { extendTailwindMerge } from './lib/extend-tailwind-merge';
6
- export { createTailwindMerge } from './lib/create-tailwind-merge';
7
- export type { Config } from './lib/types';
8
- export * as validators from './lib/validators';
9
- export { mergeConfigs } from './lib/merge-configs';
10
- export { fromTheme } from './lib/from-theme';
11
- /**
12
- * @deprecated Will be removed in next major version. Use `twJoin` instead.
13
- */
14
- export declare const join: typeof twJoin;
1
+ import { twJoin } from './lib/tw-join';
2
+ export { twMerge } from './lib/tw-merge';
3
+ export { twJoin } from './lib/tw-join';
4
+ export { getDefaultConfig } from './lib/default-config';
5
+ export { extendTailwindMerge } from './lib/extend-tailwind-merge';
6
+ export { createTailwindMerge } from './lib/create-tailwind-merge';
7
+ export type { Config } from './lib/types';
8
+ export * as validators from './lib/validators';
9
+ export { mergeConfigs } from './lib/merge-configs';
10
+ export { fromTheme } from './lib/from-theme';
11
+ /**
12
+ * @deprecated Will be removed in next major version. Use `twJoin` instead.
13
+ */
14
+ export declare const join: typeof twJoin;
@@ -1,19 +1,19 @@
1
- import { ClassGroupId, ClassValidator, Config } from './types';
2
- export interface ClassPartObject {
3
- nextPart: Map<string, ClassPartObject>;
4
- validators: ClassValidatorObject[];
5
- classGroupId?: ClassGroupId;
6
- }
7
- interface ClassValidatorObject {
8
- classGroupId: ClassGroupId;
9
- validator: ClassValidator;
10
- }
11
- export declare function createClassUtils(config: Config): {
12
- getClassGroupId: (className: string) => string | undefined;
13
- getConflictingClassGroupIds: (classGroupId: ClassGroupId, hasPostfixModifier: boolean) => readonly string[];
14
- };
15
- /**
16
- * Exported for testing only
17
- */
18
- export declare function createClassMap(config: Config): ClassPartObject;
19
- export {};
1
+ import { ClassGroupId, ClassValidator, Config } from './types';
2
+ export interface ClassPartObject {
3
+ nextPart: Map<string, ClassPartObject>;
4
+ validators: ClassValidatorObject[];
5
+ classGroupId?: ClassGroupId;
6
+ }
7
+ interface ClassValidatorObject {
8
+ classGroupId: ClassGroupId;
9
+ validator: ClassValidator;
10
+ }
11
+ export declare function createClassUtils(config: Config): {
12
+ getClassGroupId: (className: string) => string | undefined;
13
+ getConflictingClassGroupIds: (classGroupId: ClassGroupId, hasPostfixModifier: boolean) => readonly string[];
14
+ };
15
+ /**
16
+ * Exported for testing only
17
+ */
18
+ export declare function createClassMap(config: Config): ClassPartObject;
19
+ export {};
@@ -54,8 +54,8 @@ function getGroupIdForArbitraryProperty(className) {
54
54
  }
55
55
  }
56
56
  }
57
- /**
58
- * Exported for testing only
57
+ /**
58
+ * Exported for testing only
59
59
  */
60
60
  function createClassMap(config) {
61
61
  var theme = config.theme,
@@ -1,12 +1,13 @@
1
- import { Config } from './types';
2
- export type ConfigUtils = ReturnType<typeof createConfigUtils>;
3
- export declare function createConfigUtils(config: Config): {
4
- getClassGroupId: (className: string) => string | undefined;
5
- getConflictingClassGroupIds: (classGroupId: string) => readonly string[];
6
- cache: import("./lru-cache").LruCache<string, string>;
7
- splitModifiers: (className: string) => {
8
- modifiers: string[];
9
- hasImportantModifier: boolean;
10
- baseClassName: string;
11
- };
12
- };
1
+ import { Config } from './types';
2
+ export type ConfigUtils = ReturnType<typeof createConfigUtils>;
3
+ export declare function createConfigUtils(config: Config): {
4
+ getClassGroupId: (className: string) => string | undefined;
5
+ getConflictingClassGroupIds: (classGroupId: string, hasPostfixModifier: boolean) => readonly string[];
6
+ cache: import("./lru-cache").LruCache<string, string>;
7
+ splitModifiers: (className: string) => {
8
+ modifiers: string[];
9
+ hasImportantModifier: boolean;
10
+ baseClassName: string;
11
+ maybePostfixModifierPosition: number | undefined;
12
+ };
13
+ };
@@ -1,7 +1,7 @@
1
- import { ClassNameValue } from './tw-join';
2
- import { Config } from './types';
3
- type CreateConfigFirst = () => Config;
4
- type CreateConfigSubsequent = (config: Config) => Config;
5
- type TailwindMerge = (...classLists: ClassNameValue[]) => string;
6
- export declare function createTailwindMerge(...createConfig: [CreateConfigFirst, ...CreateConfigSubsequent[]]): TailwindMerge;
7
- export {};
1
+ import { ClassNameValue } from './tw-join';
2
+ import { Config } from './types';
3
+ type CreateConfigFirst = () => Config;
4
+ type CreateConfigSubsequent = (config: Config) => Config;
5
+ type TailwindMerge = (...classLists: ClassNameValue[]) => string;
6
+ export declare function createTailwindMerge(...createConfig: [CreateConfigFirst, ...CreateConfigSubsequent[]]): TailwindMerge;
7
+ export {};