@csszyx/unplugin 0.8.0 → 0.9.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/README.md +16 -7
- package/dist/css-mangler.cjs +4 -4
- package/dist/css-mangler.mjs +4 -4
- package/dist/index.cjs +23 -1
- package/dist/index.d.cts +100 -5
- package/dist/index.d.mts +99 -3
- package/dist/index.mjs +7 -1
- package/dist/next-prebuild.cjs +148 -0
- package/dist/next-prebuild.d.cts +66 -0
- package/dist/next-prebuild.d.mts +66 -0
- package/dist/next-prebuild.mjs +131 -0
- package/dist/next-turbo-loader.cjs +210 -0
- package/dist/next-turbo-loader.d.cts +68 -0
- package/dist/next-turbo-loader.d.mts +66 -0
- package/dist/next-turbo-loader.mjs +190 -0
- package/dist/next-watcher.cjs +237 -0
- package/dist/next-watcher.d.cts +106 -0
- package/dist/next-watcher.d.mts +106 -0
- package/dist/next-watcher.mjs +219 -0
- package/dist/shared/unplugin.8er8o6rn.mjs +276 -0
- package/dist/shared/unplugin.B_U4rZvG.cjs +281 -0
- package/dist/shared/unplugin.BbtspS8t.mjs +3271 -0
- package/dist/shared/unplugin.BceVw1eW.mjs +184 -0
- package/dist/shared/unplugin.BtQzlC2C.mjs +567 -0
- package/dist/shared/unplugin.CFp386gH.cjs +3321 -0
- package/dist/shared/unplugin.CPEWNSA0.d.cts +77 -0
- package/dist/shared/unplugin.CPEWNSA0.d.mts +77 -0
- package/dist/shared/unplugin.CScQRdTp.d.cts +15 -0
- package/dist/shared/unplugin.CScQRdTp.d.mts +15 -0
- package/dist/shared/unplugin.CdZxp0x-.d.mts +16 -0
- package/dist/shared/unplugin.DLrBgECN.d.cts +282 -0
- package/dist/shared/unplugin.DLrBgECN.d.mts +282 -0
- package/dist/shared/unplugin.DUxdYaSG.cjs +205 -0
- package/dist/shared/unplugin.s62yJbu1.cjs +591 -0
- package/dist/shared/unplugin.xeED_qwh.d.cts +16 -0
- package/dist/vite.cjs +7 -1
- package/dist/vite.d.cts +2 -1
- package/dist/vite.d.mts +2 -1
- package/dist/vite.mjs +7 -1
- package/dist/webpack.cjs +7 -1
- package/dist/webpack.d.cts +2 -1
- package/dist/webpack.d.mts +2 -1
- package/dist/webpack.mjs +7 -1
- package/package.json +41 -8
- package/dist/shared/unplugin.BNsv2szs.cjs +0 -1753
- package/dist/shared/unplugin.DCv0RtVZ.mjs +0 -1722
- package/dist/shared/unplugin.DUbr5w-N.d.cts +0 -49
- package/dist/shared/unplugin.DUbr5w-N.d.mts +0 -49
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { PartialCsszyxConfig } from '@csszyx/types';
|
|
2
|
-
import { Plugin } from 'esbuild';
|
|
3
|
-
import { InputPluginOption } from 'rollup';
|
|
4
|
-
import { UnpluginInstance, WebpackPluginInstance } from 'unplugin';
|
|
5
|
-
import { PluginOption } from 'vite';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Mangles class strings in bundled code (JS/HTML assets) using the given mangle map.
|
|
9
|
-
*
|
|
10
|
-
* Exported for unit testing; the plugin calls this via the thin private wrapper that
|
|
11
|
-
* supplies state.mangleMap.
|
|
12
|
-
*
|
|
13
|
-
* Pass 1: Direct `className="..."` / `class="..."` static strings
|
|
14
|
-
* Pass 1.5: Template literal quasi (static) segments in `className:\`...\``
|
|
15
|
-
* Pass 2: `className:EXPR` patterns with ternary operators containing quoted strings
|
|
16
|
-
* Pass 3: Quoted string arguments to csszyx runtime helpers (_szMerge, _szIf, etc.)
|
|
17
|
-
*
|
|
18
|
-
* @param code bundled source code
|
|
19
|
-
* @param mangleMap class-name → mangled-token mapping
|
|
20
|
-
* @returns code with mangled class names
|
|
21
|
-
*/
|
|
22
|
-
declare function mangleCodeClassesSync(code: string, mangleMap: Record<string, string>): string;
|
|
23
|
-
declare const unplugin: UnpluginInstance<PartialCsszyxConfig, boolean>;
|
|
24
|
-
/**
|
|
25
|
-
* Creates a Vite plugin array with both pre-transform and post-mangle plugins.
|
|
26
|
-
* @param options - csszyx configuration options
|
|
27
|
-
* @returns array of Vite plugins for pre-transform and post-mangle phases
|
|
28
|
-
*/
|
|
29
|
-
declare const vitePlugin: (options?: PartialCsszyxConfig) => PluginOption[];
|
|
30
|
-
/**
|
|
31
|
-
* Creates a combined Webpack plugin that applies both pre-transform and post-mangle phases.
|
|
32
|
-
* @param options - csszyx configuration options
|
|
33
|
-
* @returns a Webpack plugin instance combining both phases
|
|
34
|
-
*/
|
|
35
|
-
declare const webpackPlugin: (options?: PartialCsszyxConfig) => WebpackPluginInstance;
|
|
36
|
-
/**
|
|
37
|
-
* Creates a Rollup plugin array with both pre-transform and post-mangle plugins.
|
|
38
|
-
* @param options - csszyx configuration options
|
|
39
|
-
* @returns array of Rollup plugins for pre-transform and post-mangle phases
|
|
40
|
-
*/
|
|
41
|
-
declare const rollupPlugin: (options?: PartialCsszyxConfig) => InputPluginOption[];
|
|
42
|
-
/**
|
|
43
|
-
* Creates an esbuild plugin that delegates setup to both pre-transform and post-mangle plugins.
|
|
44
|
-
* @param options - csszyx configuration options
|
|
45
|
-
* @returns an esbuild plugin combining both pre-transform and post-mangle phases
|
|
46
|
-
*/
|
|
47
|
-
declare const esbuildPlugin: (options?: PartialCsszyxConfig) => Plugin;
|
|
48
|
-
|
|
49
|
-
export { esbuildPlugin as e, mangleCodeClassesSync as m, rollupPlugin as r, unplugin as u, vitePlugin as v, webpackPlugin as w };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { PartialCsszyxConfig } from '@csszyx/types';
|
|
2
|
-
import { Plugin } from 'esbuild';
|
|
3
|
-
import { InputPluginOption } from 'rollup';
|
|
4
|
-
import { UnpluginInstance, WebpackPluginInstance } from 'unplugin';
|
|
5
|
-
import { PluginOption } from 'vite';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Mangles class strings in bundled code (JS/HTML assets) using the given mangle map.
|
|
9
|
-
*
|
|
10
|
-
* Exported for unit testing; the plugin calls this via the thin private wrapper that
|
|
11
|
-
* supplies state.mangleMap.
|
|
12
|
-
*
|
|
13
|
-
* Pass 1: Direct `className="..."` / `class="..."` static strings
|
|
14
|
-
* Pass 1.5: Template literal quasi (static) segments in `className:\`...\``
|
|
15
|
-
* Pass 2: `className:EXPR` patterns with ternary operators containing quoted strings
|
|
16
|
-
* Pass 3: Quoted string arguments to csszyx runtime helpers (_szMerge, _szIf, etc.)
|
|
17
|
-
*
|
|
18
|
-
* @param code bundled source code
|
|
19
|
-
* @param mangleMap class-name → mangled-token mapping
|
|
20
|
-
* @returns code with mangled class names
|
|
21
|
-
*/
|
|
22
|
-
declare function mangleCodeClassesSync(code: string, mangleMap: Record<string, string>): string;
|
|
23
|
-
declare const unplugin: UnpluginInstance<PartialCsszyxConfig, boolean>;
|
|
24
|
-
/**
|
|
25
|
-
* Creates a Vite plugin array with both pre-transform and post-mangle plugins.
|
|
26
|
-
* @param options - csszyx configuration options
|
|
27
|
-
* @returns array of Vite plugins for pre-transform and post-mangle phases
|
|
28
|
-
*/
|
|
29
|
-
declare const vitePlugin: (options?: PartialCsszyxConfig) => PluginOption[];
|
|
30
|
-
/**
|
|
31
|
-
* Creates a combined Webpack plugin that applies both pre-transform and post-mangle phases.
|
|
32
|
-
* @param options - csszyx configuration options
|
|
33
|
-
* @returns a Webpack plugin instance combining both phases
|
|
34
|
-
*/
|
|
35
|
-
declare const webpackPlugin: (options?: PartialCsszyxConfig) => WebpackPluginInstance;
|
|
36
|
-
/**
|
|
37
|
-
* Creates a Rollup plugin array with both pre-transform and post-mangle plugins.
|
|
38
|
-
* @param options - csszyx configuration options
|
|
39
|
-
* @returns array of Rollup plugins for pre-transform and post-mangle phases
|
|
40
|
-
*/
|
|
41
|
-
declare const rollupPlugin: (options?: PartialCsszyxConfig) => InputPluginOption[];
|
|
42
|
-
/**
|
|
43
|
-
* Creates an esbuild plugin that delegates setup to both pre-transform and post-mangle plugins.
|
|
44
|
-
* @param options - csszyx configuration options
|
|
45
|
-
* @returns an esbuild plugin combining both pre-transform and post-mangle phases
|
|
46
|
-
*/
|
|
47
|
-
declare const esbuildPlugin: (options?: PartialCsszyxConfig) => Plugin;
|
|
48
|
-
|
|
49
|
-
export { esbuildPlugin as e, mangleCodeClassesSync as m, rollupPlugin as r, unplugin as u, vitePlugin as v, webpackPlugin as w };
|