unplugin-stylex 0.6.1 → 0.6.3
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 +12 -0
- package/README.md +143 -73
- package/dist/astro.cjs +24 -19
- package/dist/astro.d.ts +38 -16
- package/dist/astro.d.ts.map +1 -0
- package/dist/astro.js +15 -10
- package/dist/{chunk-IU3ZVEOU.cjs → chunk-45JWH4GZ.cjs} +57 -38
- package/dist/{chunk-F2LYIKCV.js → chunk-5RGNKABP.js} +1 -1
- package/dist/{chunk-B3OIQQRZ.js → chunk-SSMUIUHR.js} +41 -22
- package/dist/{chunk-7LU6DGX6.cjs → chunk-WDYGV6FU.cjs} +2 -2
- package/dist/core/build.d.ts +5 -0
- package/dist/core/build.d.ts.map +1 -0
- package/dist/core/options.d.ts +5 -0
- package/dist/core/options.d.ts.map +1 -0
- package/dist/core/plugins.d.ts +2 -0
- package/dist/core/plugins.d.ts.map +1 -0
- package/dist/core/transformers/astro.d.ts +3 -0
- package/dist/core/transformers/astro.d.ts.map +1 -0
- package/dist/core/transformers/default.d.ts +3 -0
- package/dist/core/transformers/default.d.ts.map +1 -0
- package/dist/core/transformers/index.d.ts +3 -0
- package/dist/core/transformers/index.d.ts.map +1 -0
- package/dist/core/transformers/svelte.d.ts +3 -0
- package/dist/core/transformers/svelte.d.ts.map +1 -0
- package/dist/esbuild.cjs +2 -2
- package/dist/esbuild.d.ts +18 -8
- package/dist/esbuild.d.ts.map +1 -0
- package/dist/esbuild.js +1 -1
- package/dist/farm.cjs +2 -2
- package/dist/farm.d.ts +19 -6
- package/dist/farm.d.ts.map +1 -0
- package/dist/farm.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +7 -11
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/rolldown.cjs +2 -2
- package/dist/rolldown.d.ts +20 -8
- package/dist/rolldown.d.ts.map +1 -0
- package/dist/rolldown.js +1 -1
- package/dist/rollup.cjs +2 -2
- package/dist/rollup.d.ts +17 -8
- package/dist/rollup.d.ts.map +1 -0
- package/dist/rollup.js +1 -1
- package/dist/rspack.cjs +2 -2
- package/dist/rspack.d.ts +17 -8
- package/dist/rspack.d.ts.map +1 -0
- package/dist/rspack.js +1 -1
- package/dist/types.d.ts +16 -10
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/constants.d.ts +4 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/get-aliases.d.ts +4 -0
- package/dist/utils/get-aliases.d.ts.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/store.d.ts +4 -0
- package/dist/utils/store.d.ts.map +1 -0
- package/dist/utils/stylex-path.d.ts +4 -0
- package/dist/utils/stylex-path.d.ts.map +1 -0
- package/dist/vite.cjs +3 -3
- package/dist/vite.d.ts +18 -8
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +2 -2
- package/dist/webpack.cjs +2 -2
- package/dist/webpack.d.ts +17 -8
- package/dist/webpack.d.ts.map +1 -0
- package/dist/webpack.js +1 -1
- package/jsr.json +1 -1
- package/package.json +19 -12
- package/tsconfig.json +3 -6
- package/turbo.json +23 -0
- package/dist/astro.d.cts +0 -39
- package/dist/esbuild.d.cts +0 -14
- package/dist/farm.d.cts +0 -11
- package/dist/index.d.cts +0 -20
- package/dist/rolldown.d.cts +0 -14
- package/dist/rollup.d.cts +0 -14
- package/dist/rspack.d.cts +0 -15
- package/dist/types.d.cts +0 -41
- package/dist/vite.d.cts +0 -14
- package/dist/webpack.d.cts +0 -14
package/dist/index.d.cts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { UnpluginInstance, UnpluginFactory } from 'unplugin';
|
|
2
|
-
import { UnpluginStylexOptions } from './types.cjs';
|
|
3
|
-
export { BabelConfig, StylexOptions, UnpluginStylexInstance, UnpluginStylexTransformer } from './types.cjs';
|
|
4
|
-
import '@babel/core';
|
|
5
|
-
import '@stylexjs/babel-plugin';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* This entry file is for main unplugin.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @module
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* The main unplugin factory.
|
|
16
|
-
*/
|
|
17
|
-
declare const unpluginFactory: UnpluginFactory<UnpluginStylexOptions | undefined>;
|
|
18
|
-
declare const unplugin: UnpluginInstance<UnpluginStylexOptions | undefined, boolean>;
|
|
19
|
-
|
|
20
|
-
export { UnpluginStylexOptions, unplugin as default, unplugin, unpluginFactory };
|
package/dist/rolldown.d.cts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RolldownPlugin } from 'unplugin';
|
|
2
|
-
import { UnpluginStylexInstance } from './types.cjs';
|
|
3
|
-
import '@babel/core';
|
|
4
|
-
import '@stylexjs/babel-plugin';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* This entry file is for rolldown plugin.
|
|
8
|
-
*
|
|
9
|
-
* @module
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
declare const rolldownPlugin: UnpluginStylexInstance<RolldownPlugin | RolldownPlugin[]>;
|
|
13
|
-
|
|
14
|
-
export { rolldownPlugin as default };
|
package/dist/rollup.d.cts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { RollupPlugin } from 'unplugin';
|
|
2
|
-
import { UnpluginStylexInstance } from './types.cjs';
|
|
3
|
-
import '@babel/core';
|
|
4
|
-
import '@stylexjs/babel-plugin';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* This entry file is for Rollup plugin.
|
|
8
|
-
*
|
|
9
|
-
* @module
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
declare const rollupPlugin: UnpluginStylexInstance<RollupPlugin | RollupPlugin[]>;
|
|
13
|
-
|
|
14
|
-
export { rollupPlugin as default };
|
package/dist/rspack.d.cts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { RspackPluginInstance } from 'unplugin';
|
|
2
|
-
import { UnpluginStylexInstance } from './types.cjs';
|
|
3
|
-
import '@babel/core';
|
|
4
|
-
import '@stylexjs/babel-plugin';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* This entry file is for Rspack plugin.
|
|
8
|
-
*
|
|
9
|
-
* @module
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
type RspackPluginType = UnpluginStylexInstance<RspackPluginInstance>;
|
|
13
|
-
declare const rspackPlugin: RspackPluginType;
|
|
14
|
-
|
|
15
|
-
export { rspackPlugin as default };
|
package/dist/types.d.cts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { SourceMap } from '@babel/core';
|
|
2
|
-
import { Rule } from '@stylexjs/babel-plugin';
|
|
3
|
-
|
|
4
|
-
type BabelConfig = {
|
|
5
|
-
plugins: unknown[];
|
|
6
|
-
presets: unknown[];
|
|
7
|
-
babelrc: boolean;
|
|
8
|
-
};
|
|
9
|
-
type StylexOptions = {
|
|
10
|
-
filename?: string;
|
|
11
|
-
aliases?: Record<string, string | string[]>;
|
|
12
|
-
stylexImports?: string[];
|
|
13
|
-
classNamePrefix?: string;
|
|
14
|
-
unstable_moduleResolution?: {
|
|
15
|
-
type: 'commonJS' | 'haste';
|
|
16
|
-
rootDir: string;
|
|
17
|
-
};
|
|
18
|
-
babelConfig?: BabelConfig;
|
|
19
|
-
useCSSLayers?: boolean;
|
|
20
|
-
genConditionalClasses?: boolean;
|
|
21
|
-
treeshakeCompensation?: boolean;
|
|
22
|
-
runtimeInjection?: boolean;
|
|
23
|
-
};
|
|
24
|
-
type UnpluginStylexOptions = {
|
|
25
|
-
validExts?: RegExp | string[];
|
|
26
|
-
dev?: boolean;
|
|
27
|
-
stylex?: StylexOptions;
|
|
28
|
-
};
|
|
29
|
-
type UnpluginStylexInstance<T> = (options?: UnpluginStylexOptions) => T;
|
|
30
|
-
type UnpluginStylexTransformer = (context: {
|
|
31
|
-
inputCode: string;
|
|
32
|
-
id: string;
|
|
33
|
-
options: UnpluginStylexOptions;
|
|
34
|
-
pluginContext: unknown;
|
|
35
|
-
}) => Promise<{
|
|
36
|
-
code: string;
|
|
37
|
-
map?: SourceMap | null;
|
|
38
|
-
stylexRules: Record<string, Rule[]>;
|
|
39
|
-
}>;
|
|
40
|
-
|
|
41
|
-
export type { BabelConfig, StylexOptions, UnpluginStylexInstance, UnpluginStylexOptions, UnpluginStylexTransformer };
|
package/dist/vite.d.cts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { VitePlugin } from 'unplugin';
|
|
2
|
-
import { UnpluginStylexInstance } from './types.cjs';
|
|
3
|
-
import '@babel/core';
|
|
4
|
-
import '@stylexjs/babel-plugin';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* This entry file is for Vite plugin.
|
|
8
|
-
*
|
|
9
|
-
* @module
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
declare const vitePlugin: UnpluginStylexInstance<VitePlugin | VitePlugin[]>;
|
|
13
|
-
|
|
14
|
-
export { vitePlugin as default };
|
package/dist/webpack.d.cts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { WebpackPluginInstance } from 'unplugin';
|
|
2
|
-
import { UnpluginStylexInstance } from './types.cjs';
|
|
3
|
-
import '@babel/core';
|
|
4
|
-
import '@stylexjs/babel-plugin';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* This entry file is for Webpack plugin.
|
|
8
|
-
*
|
|
9
|
-
* @module
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
declare const webpackPlugin: UnpluginStylexInstance<WebpackPluginInstance>;
|
|
13
|
-
|
|
14
|
-
export { webpackPlugin as default };
|