@unocss/preset-attributify 0.45.30 → 0.46.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 +12 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -198,6 +198,18 @@ declare global {
|
|
|
198
198
|
}
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
+
### Preact
|
|
202
|
+
|
|
203
|
+
```ts
|
|
204
|
+
import type { AttributifyAttributes } from '@unocss/preset-attributify'
|
|
205
|
+
|
|
206
|
+
declare module 'preact' {
|
|
207
|
+
namespace JSX {
|
|
208
|
+
interface HTMLAttributes extends AttributifyAttributes {}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
201
213
|
### Attributify with Prefix
|
|
202
214
|
|
|
203
215
|
```ts
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const core = require('@unocss/core');
|
|
6
6
|
|
|
7
|
-
const variantsRE = /^(
|
|
7
|
+
const variantsRE = /^(?!.*\[(?:[^:]+):(?:.+)\]$)((?:.+:)?!?)?(.*)$/;
|
|
8
8
|
const variantAttributify = (options = {}) => {
|
|
9
9
|
const prefix = options.prefix ?? "un-";
|
|
10
10
|
const prefixedOnly = options.prefixedOnly ?? false;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isAttributifySelector, isValidSelector, extractorSplit } from '@unocss/core';
|
|
2
2
|
|
|
3
|
-
const variantsRE = /^(
|
|
3
|
+
const variantsRE = /^(?!.*\[(?:[^:]+):(?:.+)\]$)((?:.+:)?!?)?(.*)$/;
|
|
4
4
|
const variantAttributify = (options = {}) => {
|
|
5
5
|
const prefix = options.prefix ?? "un-";
|
|
6
6
|
const prefixedOnly = options.prefixedOnly ?? false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-attributify",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.1",
|
|
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.
|
|
36
|
+
"@unocss/core": "0.46.1"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "unbuild",
|