@tailwindcss-mangle/config 6.1.4-alpha.0 → 7.0.0-alpha.1

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/index.cjs CHANGED
@@ -49,30 +49,34 @@ var CONFIG_NAME = "tailwindcss-mangle";
49
49
 
50
50
  // src/defaults.ts
51
51
  var import_node_process = __toESM(require("process"), 1);
52
- var import_shared = require("@tailwindcss-mangle/shared");
53
52
  var import_is_css_request = require("is-css-request");
54
53
  var defaultPipelineInclude = [
55
54
  /\.(html|js|cjs|mjs|ts|cts|mts|jsx|tsx|vue|svelte|astro|elm|php|phtml|mdx|md)(?:$|\?)/,
56
55
  import_is_css_request.CSS_LANGS_RE
57
56
  ];
58
57
  var defaultPipelineExclude = [];
58
+ var preservedClassNames = /* @__PURE__ */ new Set([
59
+ "ease-out",
60
+ "ease-linear",
61
+ "ease-in",
62
+ "ease-in-out"
63
+ ]);
64
+ function defaultMangleClassFilter(className) {
65
+ if (preservedClassNames.has(className)) {
66
+ return false;
67
+ }
68
+ return /[:-]/.test(className);
69
+ }
59
70
  function getDefaultRegistryConfig() {
60
71
  return {
61
72
  extract: {
62
73
  file: ".tw-patch/tw-class-list.json"
63
- },
64
- output: {
65
- file: ".tw-patch/tw-class-list.json",
66
- stripUniversalSelector: true,
67
- pretty: true
68
- },
69
- tailwindcss: {},
70
- tailwind: {}
74
+ }
71
75
  };
72
76
  }
73
77
  function getDefaultTransformerConfig() {
74
78
  return {
75
- filter: import_shared.defaultMangleClassFilter,
79
+ filter: defaultMangleClassFilter,
76
80
  sources: {
77
81
  include: defaultPipelineInclude,
78
82
  exclude: defaultPipelineExclude
@@ -128,7 +132,6 @@ export default defineConfig({
128
132
  extract: {
129
133
  file: '.tw-patch/tw-class-list.json',
130
134
  },
131
- tailwindcss: {},
132
135
  },
133
136
  transformer: {
134
137
  registry: {
package/dist/index.d.cts CHANGED
@@ -79,26 +79,13 @@ interface RegistryCacheOptions {
79
79
  interface TailwindTargetOptions {
80
80
  version?: 2 | 3 | 4;
81
81
  packageName?: string;
82
- /** @deprecated Use `packageName` instead. */
83
- package?: string;
84
82
  resolve?: PackageResolvingOptions;
85
83
  v2?: TailwindLocatorOptions;
86
84
  v3?: TailwindLocatorOptions;
87
85
  v4?: TailwindNextOptions;
88
- /** @deprecated Use `v2` instead. */
89
- legacy?: TailwindLocatorOptions;
90
- /** @deprecated Use `v3` instead. */
91
- classic?: TailwindLocatorOptions;
92
- /** @deprecated Use `v4` instead. */
93
- next?: TailwindNextOptions;
94
86
  cwd?: string;
95
87
  config?: string;
96
88
  }
97
- interface RegistryOutputOptions {
98
- file?: string;
99
- pretty?: boolean | number;
100
- stripUniversalSelector?: boolean;
101
- }
102
89
  interface RegistryOptions {
103
90
  projectRoot?: string;
104
91
  tailwindcss?: TailwindTargetOptions;
@@ -106,10 +93,6 @@ interface RegistryOptions {
106
93
  extract?: RegistryExtractOptions;
107
94
  cache?: RegistryCacheOptions;
108
95
  filter?: (className: string) => boolean;
109
- /** @deprecated Use `extract` instead. */
110
- output?: RegistryOutputOptions;
111
- /** @deprecated Use `tailwindcss` instead. */
112
- tailwind?: TailwindTargetOptions;
113
96
  }
114
97
  interface TailwindcssMangleConfig {
115
98
  registry?: RegistryOptions;
@@ -128,4 +111,4 @@ declare function getDefaultRegistryConfig(): RegistryOptions;
128
111
  declare function getDefaultTransformerConfig(): TransformerOptions;
129
112
  declare function getDefaultUserConfig(): TailwindcssMangleConfig;
130
113
 
131
- export { CONFIG_NAME, type RegistryApplyOptions, type RegistryCacheOptions, type RegistryExposeContextOptions, type RegistryExtendLengthUnitsOptions, type RegistryExtractOptions, type RegistryOptions, type RegistryOutputOptions, type TailwindLocatorOptions, type TailwindNextOptions, type TailwindTargetOptions, type TailwindcssMangleConfig, type TransformerMappingConfig, type TransformerMappingEntry, type TransformerMappingOption, type TransformerOptions, type TransformerPreserveOptions, type TransformerRegistryOptions, type TransformerSourceOptions, type UserConfig, defineConfig, getConfig, getDefaultRegistryConfig, getDefaultTransformerConfig, getDefaultUserConfig, initConfig };
114
+ export { CONFIG_NAME, type RegistryApplyOptions, type RegistryCacheOptions, type RegistryExposeContextOptions, type RegistryExtendLengthUnitsOptions, type RegistryExtractOptions, type RegistryOptions, type TailwindLocatorOptions, type TailwindNextOptions, type TailwindTargetOptions, type TailwindcssMangleConfig, type TransformerMappingConfig, type TransformerMappingEntry, type TransformerMappingOption, type TransformerOptions, type TransformerPreserveOptions, type TransformerRegistryOptions, type TransformerSourceOptions, type UserConfig, defineConfig, getConfig, getDefaultRegistryConfig, getDefaultTransformerConfig, getDefaultUserConfig, initConfig };
package/dist/index.d.ts CHANGED
@@ -79,26 +79,13 @@ interface RegistryCacheOptions {
79
79
  interface TailwindTargetOptions {
80
80
  version?: 2 | 3 | 4;
81
81
  packageName?: string;
82
- /** @deprecated Use `packageName` instead. */
83
- package?: string;
84
82
  resolve?: PackageResolvingOptions;
85
83
  v2?: TailwindLocatorOptions;
86
84
  v3?: TailwindLocatorOptions;
87
85
  v4?: TailwindNextOptions;
88
- /** @deprecated Use `v2` instead. */
89
- legacy?: TailwindLocatorOptions;
90
- /** @deprecated Use `v3` instead. */
91
- classic?: TailwindLocatorOptions;
92
- /** @deprecated Use `v4` instead. */
93
- next?: TailwindNextOptions;
94
86
  cwd?: string;
95
87
  config?: string;
96
88
  }
97
- interface RegistryOutputOptions {
98
- file?: string;
99
- pretty?: boolean | number;
100
- stripUniversalSelector?: boolean;
101
- }
102
89
  interface RegistryOptions {
103
90
  projectRoot?: string;
104
91
  tailwindcss?: TailwindTargetOptions;
@@ -106,10 +93,6 @@ interface RegistryOptions {
106
93
  extract?: RegistryExtractOptions;
107
94
  cache?: RegistryCacheOptions;
108
95
  filter?: (className: string) => boolean;
109
- /** @deprecated Use `extract` instead. */
110
- output?: RegistryOutputOptions;
111
- /** @deprecated Use `tailwindcss` instead. */
112
- tailwind?: TailwindTargetOptions;
113
96
  }
114
97
  interface TailwindcssMangleConfig {
115
98
  registry?: RegistryOptions;
@@ -128,4 +111,4 @@ declare function getDefaultRegistryConfig(): RegistryOptions;
128
111
  declare function getDefaultTransformerConfig(): TransformerOptions;
129
112
  declare function getDefaultUserConfig(): TailwindcssMangleConfig;
130
113
 
131
- export { CONFIG_NAME, type RegistryApplyOptions, type RegistryCacheOptions, type RegistryExposeContextOptions, type RegistryExtendLengthUnitsOptions, type RegistryExtractOptions, type RegistryOptions, type RegistryOutputOptions, type TailwindLocatorOptions, type TailwindNextOptions, type TailwindTargetOptions, type TailwindcssMangleConfig, type TransformerMappingConfig, type TransformerMappingEntry, type TransformerMappingOption, type TransformerOptions, type TransformerPreserveOptions, type TransformerRegistryOptions, type TransformerSourceOptions, type UserConfig, defineConfig, getConfig, getDefaultRegistryConfig, getDefaultTransformerConfig, getDefaultUserConfig, initConfig };
114
+ export { CONFIG_NAME, type RegistryApplyOptions, type RegistryCacheOptions, type RegistryExposeContextOptions, type RegistryExtendLengthUnitsOptions, type RegistryExtractOptions, type RegistryOptions, type TailwindLocatorOptions, type TailwindNextOptions, type TailwindTargetOptions, type TailwindcssMangleConfig, type TransformerMappingConfig, type TransformerMappingEntry, type TransformerMappingOption, type TransformerOptions, type TransformerPreserveOptions, type TransformerRegistryOptions, type TransformerSourceOptions, type UserConfig, defineConfig, getConfig, getDefaultRegistryConfig, getDefaultTransformerConfig, getDefaultUserConfig, initConfig };
package/dist/index.js CHANGED
@@ -7,25 +7,29 @@ var CONFIG_NAME = "tailwindcss-mangle";
7
7
 
8
8
  // src/defaults.ts
9
9
  import process from "process";
10
- import { defaultMangleClassFilter } from "@tailwindcss-mangle/shared";
11
10
  import { CSS_LANGS_RE } from "is-css-request";
12
11
  var defaultPipelineInclude = [
13
12
  /\.(html|js|cjs|mjs|ts|cts|mts|jsx|tsx|vue|svelte|astro|elm|php|phtml|mdx|md)(?:$|\?)/,
14
13
  CSS_LANGS_RE
15
14
  ];
16
15
  var defaultPipelineExclude = [];
16
+ var preservedClassNames = /* @__PURE__ */ new Set([
17
+ "ease-out",
18
+ "ease-linear",
19
+ "ease-in",
20
+ "ease-in-out"
21
+ ]);
22
+ function defaultMangleClassFilter(className) {
23
+ if (preservedClassNames.has(className)) {
24
+ return false;
25
+ }
26
+ return /[:-]/.test(className);
27
+ }
17
28
  function getDefaultRegistryConfig() {
18
29
  return {
19
30
  extract: {
20
31
  file: ".tw-patch/tw-class-list.json"
21
- },
22
- output: {
23
- file: ".tw-patch/tw-class-list.json",
24
- stripUniversalSelector: true,
25
- pretty: true
26
- },
27
- tailwindcss: {},
28
- tailwind: {}
32
+ }
29
33
  };
30
34
  }
31
35
  function getDefaultTransformerConfig() {
@@ -86,7 +90,6 @@ export default defineConfig({
86
90
  extract: {
87
91
  file: '.tw-patch/tw-class-list.json',
88
92
  },
89
- tailwindcss: {},
90
93
  },
91
94
  transformer: {
92
95
  registry: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tailwindcss-mangle/config",
3
3
  "type": "module",
4
- "version": "6.1.4-alpha.0",
4
+ "version": "7.0.0-alpha.1",
5
5
  "description": "The config and load function of tailwindcss-mangle",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -53,7 +53,7 @@
53
53
  "fs-extra": "^11.3.4",
54
54
  "is-css-request": "^1.0.1",
55
55
  "pathe": "^2.0.3",
56
- "@tailwindcss-mangle/shared": "^4.1.3"
56
+ "@tailwindcss-mangle/shared": "^4.1.4-alpha.0"
57
57
  },
58
58
  "scripts": {
59
59
  "dev": "tsup --watch --sourcemap",