@unocss/transformer-directives 0.55.1 → 0.55.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/dist/index.cjs +1 -1
- package/dist/index.d.cts +41 -0
- package/dist/index.d.mts +41 -0
- package/dist/index.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -218,5 +218,5 @@ async function transformDirectives(code, uno, options, filename, originalCode, o
|
|
|
218
218
|
await Promise.all(stack);
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
exports
|
|
221
|
+
exports.default = transformerDirectives;
|
|
222
222
|
exports.transformDirectives = transformDirectives;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SourceCodeTransformer, UnoGenerator } from '@unocss/core';
|
|
2
|
+
import MagicString from 'magic-string';
|
|
3
|
+
|
|
4
|
+
interface TransformerDirectivesOptions {
|
|
5
|
+
enforce?: SourceCodeTransformer['enforce'];
|
|
6
|
+
/**
|
|
7
|
+
* Throw an error if utils or themes are not found.
|
|
8
|
+
*
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
throwOnMissing?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Treat CSS variables as @apply directives for CSS syntax compatible.
|
|
14
|
+
*
|
|
15
|
+
* Pass `false` to disable.
|
|
16
|
+
*
|
|
17
|
+
* @default ['--at-apply', '--uno-apply', '--uno']
|
|
18
|
+
*/
|
|
19
|
+
applyVariable?: false | string | string[];
|
|
20
|
+
/**
|
|
21
|
+
* Treat CSS variables as directives for CSS syntax compatible.
|
|
22
|
+
*
|
|
23
|
+
* Pass `false` to disable, or a string to use as a prefix.
|
|
24
|
+
*
|
|
25
|
+
* @deprecated use `applyVariable` to specify the full var name instead.
|
|
26
|
+
* @default '--at-'
|
|
27
|
+
*/
|
|
28
|
+
varStyle?: false | string;
|
|
29
|
+
}
|
|
30
|
+
interface TransformerDirectivesContext {
|
|
31
|
+
code: MagicString;
|
|
32
|
+
uno: UnoGenerator;
|
|
33
|
+
options: TransformerDirectivesOptions;
|
|
34
|
+
applyVariable: string[];
|
|
35
|
+
offset?: number;
|
|
36
|
+
filename?: string;
|
|
37
|
+
}
|
|
38
|
+
declare function transformerDirectives(options?: TransformerDirectivesOptions): SourceCodeTransformer;
|
|
39
|
+
declare function transformDirectives(code: MagicString, uno: UnoGenerator, options: TransformerDirectivesOptions, filename?: string, originalCode?: string, offset?: number): Promise<void>;
|
|
40
|
+
|
|
41
|
+
export { type TransformerDirectivesContext, type TransformerDirectivesOptions, transformerDirectives as default, transformDirectives };
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SourceCodeTransformer, UnoGenerator } from '@unocss/core';
|
|
2
|
+
import MagicString from 'magic-string';
|
|
3
|
+
|
|
4
|
+
interface TransformerDirectivesOptions {
|
|
5
|
+
enforce?: SourceCodeTransformer['enforce'];
|
|
6
|
+
/**
|
|
7
|
+
* Throw an error if utils or themes are not found.
|
|
8
|
+
*
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
throwOnMissing?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Treat CSS variables as @apply directives for CSS syntax compatible.
|
|
14
|
+
*
|
|
15
|
+
* Pass `false` to disable.
|
|
16
|
+
*
|
|
17
|
+
* @default ['--at-apply', '--uno-apply', '--uno']
|
|
18
|
+
*/
|
|
19
|
+
applyVariable?: false | string | string[];
|
|
20
|
+
/**
|
|
21
|
+
* Treat CSS variables as directives for CSS syntax compatible.
|
|
22
|
+
*
|
|
23
|
+
* Pass `false` to disable, or a string to use as a prefix.
|
|
24
|
+
*
|
|
25
|
+
* @deprecated use `applyVariable` to specify the full var name instead.
|
|
26
|
+
* @default '--at-'
|
|
27
|
+
*/
|
|
28
|
+
varStyle?: false | string;
|
|
29
|
+
}
|
|
30
|
+
interface TransformerDirectivesContext {
|
|
31
|
+
code: MagicString;
|
|
32
|
+
uno: UnoGenerator;
|
|
33
|
+
options: TransformerDirectivesOptions;
|
|
34
|
+
applyVariable: string[];
|
|
35
|
+
offset?: number;
|
|
36
|
+
filename?: string;
|
|
37
|
+
}
|
|
38
|
+
declare function transformerDirectives(options?: TransformerDirectivesOptions): SourceCodeTransformer;
|
|
39
|
+
declare function transformDirectives(code: MagicString, uno: UnoGenerator, options: TransformerDirectivesOptions, filename?: string, originalCode?: string, offset?: number): Promise<void>;
|
|
40
|
+
|
|
41
|
+
export { type TransformerDirectivesContext, type TransformerDirectivesOptions, transformerDirectives as default, transformDirectives };
|
package/dist/index.d.ts
CHANGED
|
@@ -38,4 +38,4 @@ interface TransformerDirectivesContext {
|
|
|
38
38
|
declare function transformerDirectives(options?: TransformerDirectivesOptions): SourceCodeTransformer;
|
|
39
39
|
declare function transformDirectives(code: MagicString, uno: UnoGenerator, options: TransformerDirectivesOptions, filename?: string, originalCode?: string, offset?: number): Promise<void>;
|
|
40
40
|
|
|
41
|
-
export { TransformerDirectivesContext, TransformerDirectivesOptions, transformerDirectives as default, transformDirectives };
|
|
41
|
+
export { type TransformerDirectivesContext, type TransformerDirectivesOptions, transformerDirectives as default, transformDirectives };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/transformer-directives",
|
|
3
|
-
"version": "0.55.
|
|
3
|
+
"version": "0.55.3",
|
|
4
4
|
"description": "UnoCSS transformer for `@apply` directive",
|
|
5
5
|
"author": "hannoeru <me@hanlee.co>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"css-tree": "^2.3.1",
|
|
36
|
-
"@unocss/core": "0.55.
|
|
36
|
+
"@unocss/core": "0.55.3"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"magic-string": "^0.30.
|
|
39
|
+
"magic-string": "^0.30.3"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "unbuild",
|