@unocss/preset-attributify 0.58.4 → 0.58.6
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.d.cts +21 -2
- package/dist/index.d.mts +21 -2
- package/dist/index.d.ts +21 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -52,19 +52,38 @@ declare const variantsRE: RegExp;
|
|
|
52
52
|
declare function variantAttributify(options?: AttributifyOptions): VariantObject;
|
|
53
53
|
|
|
54
54
|
type TwoStringsCompositionPrefix = 'm' | 'p';
|
|
55
|
-
type TwoStringsCompositionSuffix = 'r' | 'b' | 'l' | 't' | 'a';
|
|
55
|
+
type TwoStringsCompositionSuffix = 'r' | 'b' | 'l' | 't' | 'a' | 'x' | 'y';
|
|
56
56
|
/** Some words can compose with two strings to become a complete unocss rule such as ha, mr, mb */
|
|
57
57
|
type TwoStringsComposition = `${TwoStringsCompositionPrefix}${TwoStringsCompositionSuffix}` | 'ha' | 'wa';
|
|
58
58
|
/** Some words can be a complete unocss rule by itself */
|
|
59
59
|
type SpecialSingleWord = 'container' | 'flex' | 'block' | 'inline' | 'table' | 'isolate' | 'absolute' | 'relative' | 'fixed' | 'sticky' | 'static' | 'visible' | 'invisible' | 'grow' | 'shrink' | 'antialiased' | 'italic' | 'ordinal' | 'overline' | 'underline' | 'uppercase' | 'lowercase' | 'capitalize' | 'truncate' | 'border' | 'rounded' | 'outline' | 'ring' | 'shadow' | 'blur' | 'grayscale' | 'invert' | 'sepia' | 'transition' | 'resize' | 'transform' | 'filter';
|
|
60
60
|
type PseudoPrefix = 'active' | 'before' | 'after' | 'dark' | 'light' | 'first' | 'last' | 'focus' | 'hover' | 'link' | 'root' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'enabled' | 'disabled' | 'all' | 'children';
|
|
61
61
|
/** Some words can be used to separate utilities, such as font="mono light", text="sm white" */
|
|
62
|
-
type SeparateEnabled = 'align' | 'animate' | 'backdrop' | 'bg' | 'blend' | 'border' | 'box' | 'container' | 'content' | 'cursor' | 'display' | 'divide' | 'filter' | 'flex' | 'font' | 'fw' | 'gap' | 'gradient' | 'grid' | 'h' | 'icon' | 'items' | 'justify' | 'list' | 'm' | 'op' | 'opacity' | 'order' | 'outline' | 'overflow' | 'p' | 'place' | 'pos' | 'position' | 'ring' | 'select' | 'shadow' | 'space' | 'table' | 'text' | 'transform' | 'transition' | 'underline' | 'w' | 'z' | PseudoPrefix;
|
|
62
|
+
type SeparateEnabled = 'align' | 'animate' | 'backdrop' | 'bg' | 'blend' | 'border' | 'box' | 'container' | 'content' | 'cursor' | 'display' | 'divide' | 'filter' | 'flex' | 'font' | 'fw' | 'gap' | 'gradient' | 'grid' | 'h' | 'icon' | 'items' | 'justify' | 'list' | 'm' | 'op' | 'opacity' | 'order' | 'outline' | 'overflow' | 'p' | 'place' | 'pos' | 'position' | 'ring' | 'select' | 'shadow' | 'size' | 'space' | 'table' | 'text' | 'transform' | 'transition' | 'underline' | 'w' | 'z' | PseudoPrefix;
|
|
63
63
|
type BasicAttributes = SpecialSingleWord | TwoStringsComposition | SeparateEnabled;
|
|
64
64
|
type AttributifyNames<Prefix extends string = ''> = `${Prefix}${BasicAttributes}` | `${Prefix}${PseudoPrefix}:${BasicAttributes}`;
|
|
65
65
|
interface AttributifyAttributes extends Partial<Record<AttributifyNames, string | boolean>> {
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* This enables the attributify mode for other presets.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
*
|
|
73
|
+
* ```html
|
|
74
|
+
* <button
|
|
75
|
+
* bg="blue-400 hover:blue-500 dark:blue-500 dark:hover:blue-600"
|
|
76
|
+
* text="sm white"
|
|
77
|
+
* font="mono light"
|
|
78
|
+
* p="y-2 x-4"
|
|
79
|
+
* border="2 rounded blue-200"
|
|
80
|
+
* >
|
|
81
|
+
* Button
|
|
82
|
+
* </button>
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* @see https://unocss.dev/presets/attributify
|
|
86
|
+
*/
|
|
68
87
|
declare const presetAttributify: _unocss_core.PresetFactory<object, AttributifyOptions>;
|
|
69
88
|
|
|
70
89
|
export { type AttributifyAttributes, type AttributifyNames, type AttributifyOptions, type BasicAttributes, type PseudoPrefix, type SeparateEnabled, type SpecialSingleWord, type TwoStringsComposition, type TwoStringsCompositionPrefix, type TwoStringsCompositionSuffix, autocompleteExtractorAttributify, presetAttributify as default, defaultIgnoreAttributes, extractorAttributify, presetAttributify, variantAttributify, variantsRE };
|
package/dist/index.d.mts
CHANGED
|
@@ -52,19 +52,38 @@ declare const variantsRE: RegExp;
|
|
|
52
52
|
declare function variantAttributify(options?: AttributifyOptions): VariantObject;
|
|
53
53
|
|
|
54
54
|
type TwoStringsCompositionPrefix = 'm' | 'p';
|
|
55
|
-
type TwoStringsCompositionSuffix = 'r' | 'b' | 'l' | 't' | 'a';
|
|
55
|
+
type TwoStringsCompositionSuffix = 'r' | 'b' | 'l' | 't' | 'a' | 'x' | 'y';
|
|
56
56
|
/** Some words can compose with two strings to become a complete unocss rule such as ha, mr, mb */
|
|
57
57
|
type TwoStringsComposition = `${TwoStringsCompositionPrefix}${TwoStringsCompositionSuffix}` | 'ha' | 'wa';
|
|
58
58
|
/** Some words can be a complete unocss rule by itself */
|
|
59
59
|
type SpecialSingleWord = 'container' | 'flex' | 'block' | 'inline' | 'table' | 'isolate' | 'absolute' | 'relative' | 'fixed' | 'sticky' | 'static' | 'visible' | 'invisible' | 'grow' | 'shrink' | 'antialiased' | 'italic' | 'ordinal' | 'overline' | 'underline' | 'uppercase' | 'lowercase' | 'capitalize' | 'truncate' | 'border' | 'rounded' | 'outline' | 'ring' | 'shadow' | 'blur' | 'grayscale' | 'invert' | 'sepia' | 'transition' | 'resize' | 'transform' | 'filter';
|
|
60
60
|
type PseudoPrefix = 'active' | 'before' | 'after' | 'dark' | 'light' | 'first' | 'last' | 'focus' | 'hover' | 'link' | 'root' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'enabled' | 'disabled' | 'all' | 'children';
|
|
61
61
|
/** Some words can be used to separate utilities, such as font="mono light", text="sm white" */
|
|
62
|
-
type SeparateEnabled = 'align' | 'animate' | 'backdrop' | 'bg' | 'blend' | 'border' | 'box' | 'container' | 'content' | 'cursor' | 'display' | 'divide' | 'filter' | 'flex' | 'font' | 'fw' | 'gap' | 'gradient' | 'grid' | 'h' | 'icon' | 'items' | 'justify' | 'list' | 'm' | 'op' | 'opacity' | 'order' | 'outline' | 'overflow' | 'p' | 'place' | 'pos' | 'position' | 'ring' | 'select' | 'shadow' | 'space' | 'table' | 'text' | 'transform' | 'transition' | 'underline' | 'w' | 'z' | PseudoPrefix;
|
|
62
|
+
type SeparateEnabled = 'align' | 'animate' | 'backdrop' | 'bg' | 'blend' | 'border' | 'box' | 'container' | 'content' | 'cursor' | 'display' | 'divide' | 'filter' | 'flex' | 'font' | 'fw' | 'gap' | 'gradient' | 'grid' | 'h' | 'icon' | 'items' | 'justify' | 'list' | 'm' | 'op' | 'opacity' | 'order' | 'outline' | 'overflow' | 'p' | 'place' | 'pos' | 'position' | 'ring' | 'select' | 'shadow' | 'size' | 'space' | 'table' | 'text' | 'transform' | 'transition' | 'underline' | 'w' | 'z' | PseudoPrefix;
|
|
63
63
|
type BasicAttributes = SpecialSingleWord | TwoStringsComposition | SeparateEnabled;
|
|
64
64
|
type AttributifyNames<Prefix extends string = ''> = `${Prefix}${BasicAttributes}` | `${Prefix}${PseudoPrefix}:${BasicAttributes}`;
|
|
65
65
|
interface AttributifyAttributes extends Partial<Record<AttributifyNames, string | boolean>> {
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* This enables the attributify mode for other presets.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
*
|
|
73
|
+
* ```html
|
|
74
|
+
* <button
|
|
75
|
+
* bg="blue-400 hover:blue-500 dark:blue-500 dark:hover:blue-600"
|
|
76
|
+
* text="sm white"
|
|
77
|
+
* font="mono light"
|
|
78
|
+
* p="y-2 x-4"
|
|
79
|
+
* border="2 rounded blue-200"
|
|
80
|
+
* >
|
|
81
|
+
* Button
|
|
82
|
+
* </button>
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* @see https://unocss.dev/presets/attributify
|
|
86
|
+
*/
|
|
68
87
|
declare const presetAttributify: _unocss_core.PresetFactory<object, AttributifyOptions>;
|
|
69
88
|
|
|
70
89
|
export { type AttributifyAttributes, type AttributifyNames, type AttributifyOptions, type BasicAttributes, type PseudoPrefix, type SeparateEnabled, type SpecialSingleWord, type TwoStringsComposition, type TwoStringsCompositionPrefix, type TwoStringsCompositionSuffix, autocompleteExtractorAttributify, presetAttributify as default, defaultIgnoreAttributes, extractorAttributify, presetAttributify, variantAttributify, variantsRE };
|
package/dist/index.d.ts
CHANGED
|
@@ -52,19 +52,38 @@ declare const variantsRE: RegExp;
|
|
|
52
52
|
declare function variantAttributify(options?: AttributifyOptions): VariantObject;
|
|
53
53
|
|
|
54
54
|
type TwoStringsCompositionPrefix = 'm' | 'p';
|
|
55
|
-
type TwoStringsCompositionSuffix = 'r' | 'b' | 'l' | 't' | 'a';
|
|
55
|
+
type TwoStringsCompositionSuffix = 'r' | 'b' | 'l' | 't' | 'a' | 'x' | 'y';
|
|
56
56
|
/** Some words can compose with two strings to become a complete unocss rule such as ha, mr, mb */
|
|
57
57
|
type TwoStringsComposition = `${TwoStringsCompositionPrefix}${TwoStringsCompositionSuffix}` | 'ha' | 'wa';
|
|
58
58
|
/** Some words can be a complete unocss rule by itself */
|
|
59
59
|
type SpecialSingleWord = 'container' | 'flex' | 'block' | 'inline' | 'table' | 'isolate' | 'absolute' | 'relative' | 'fixed' | 'sticky' | 'static' | 'visible' | 'invisible' | 'grow' | 'shrink' | 'antialiased' | 'italic' | 'ordinal' | 'overline' | 'underline' | 'uppercase' | 'lowercase' | 'capitalize' | 'truncate' | 'border' | 'rounded' | 'outline' | 'ring' | 'shadow' | 'blur' | 'grayscale' | 'invert' | 'sepia' | 'transition' | 'resize' | 'transform' | 'filter';
|
|
60
60
|
type PseudoPrefix = 'active' | 'before' | 'after' | 'dark' | 'light' | 'first' | 'last' | 'focus' | 'hover' | 'link' | 'root' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'enabled' | 'disabled' | 'all' | 'children';
|
|
61
61
|
/** Some words can be used to separate utilities, such as font="mono light", text="sm white" */
|
|
62
|
-
type SeparateEnabled = 'align' | 'animate' | 'backdrop' | 'bg' | 'blend' | 'border' | 'box' | 'container' | 'content' | 'cursor' | 'display' | 'divide' | 'filter' | 'flex' | 'font' | 'fw' | 'gap' | 'gradient' | 'grid' | 'h' | 'icon' | 'items' | 'justify' | 'list' | 'm' | 'op' | 'opacity' | 'order' | 'outline' | 'overflow' | 'p' | 'place' | 'pos' | 'position' | 'ring' | 'select' | 'shadow' | 'space' | 'table' | 'text' | 'transform' | 'transition' | 'underline' | 'w' | 'z' | PseudoPrefix;
|
|
62
|
+
type SeparateEnabled = 'align' | 'animate' | 'backdrop' | 'bg' | 'blend' | 'border' | 'box' | 'container' | 'content' | 'cursor' | 'display' | 'divide' | 'filter' | 'flex' | 'font' | 'fw' | 'gap' | 'gradient' | 'grid' | 'h' | 'icon' | 'items' | 'justify' | 'list' | 'm' | 'op' | 'opacity' | 'order' | 'outline' | 'overflow' | 'p' | 'place' | 'pos' | 'position' | 'ring' | 'select' | 'shadow' | 'size' | 'space' | 'table' | 'text' | 'transform' | 'transition' | 'underline' | 'w' | 'z' | PseudoPrefix;
|
|
63
63
|
type BasicAttributes = SpecialSingleWord | TwoStringsComposition | SeparateEnabled;
|
|
64
64
|
type AttributifyNames<Prefix extends string = ''> = `${Prefix}${BasicAttributes}` | `${Prefix}${PseudoPrefix}:${BasicAttributes}`;
|
|
65
65
|
interface AttributifyAttributes extends Partial<Record<AttributifyNames, string | boolean>> {
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/**
|
|
69
|
+
* This enables the attributify mode for other presets.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
*
|
|
73
|
+
* ```html
|
|
74
|
+
* <button
|
|
75
|
+
* bg="blue-400 hover:blue-500 dark:blue-500 dark:hover:blue-600"
|
|
76
|
+
* text="sm white"
|
|
77
|
+
* font="mono light"
|
|
78
|
+
* p="y-2 x-4"
|
|
79
|
+
* border="2 rounded blue-200"
|
|
80
|
+
* >
|
|
81
|
+
* Button
|
|
82
|
+
* </button>
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* @see https://unocss.dev/presets/attributify
|
|
86
|
+
*/
|
|
68
87
|
declare const presetAttributify: _unocss_core.PresetFactory<object, AttributifyOptions>;
|
|
69
88
|
|
|
70
89
|
export { type AttributifyAttributes, type AttributifyNames, type AttributifyOptions, type BasicAttributes, type PseudoPrefix, type SeparateEnabled, type SpecialSingleWord, type TwoStringsComposition, type TwoStringsCompositionPrefix, type TwoStringsCompositionSuffix, autocompleteExtractorAttributify, presetAttributify as default, defaultIgnoreAttributes, extractorAttributify, presetAttributify, variantAttributify, variantsRE };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-attributify",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.6",
|
|
4
4
|
"description": "Attributify preset for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dist"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@unocss/core": "0.58.
|
|
36
|
+
"@unocss/core": "0.58.6"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "unbuild",
|