@unocss/preset-attributify 0.48.3 → 0.48.5
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 +4 -6
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ npm i -D @unocss/preset-attributify
|
|
|
11
11
|
```ts
|
|
12
12
|
import presetAttributify from '@unocss/preset-attributify'
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
UnoCSS({
|
|
15
15
|
presets: [
|
|
16
16
|
presetAttributify({ /* options */ }),
|
|
17
17
|
// ...other presets
|
|
@@ -177,12 +177,10 @@ declare module 'solid-js' {
|
|
|
177
177
|
### Svelte & SvelteKit
|
|
178
178
|
|
|
179
179
|
```ts
|
|
180
|
-
|
|
180
|
+
declare namespace svelteHTML {
|
|
181
|
+
import type { AttributifyAttributes } from '@unocss/preset-attributify'
|
|
181
182
|
|
|
182
|
-
|
|
183
|
-
namespace svelte.JSX {
|
|
184
|
-
interface HTMLAttributes<T> extends AttributifyAttributes {}
|
|
185
|
-
}
|
|
183
|
+
type HTMLAttributes = AttributifyAttributes
|
|
186
184
|
}
|
|
187
185
|
```
|
|
188
186
|
|
package/dist/index.cjs
CHANGED
|
@@ -152,7 +152,7 @@ const extractorAttributify = (options) => {
|
|
|
152
152
|
if (options?.prefixedOnly && options.prefix && !name.startsWith(options.prefix))
|
|
153
153
|
return [];
|
|
154
154
|
const extractTernary = Array.from(content.matchAll(/(?:[\?:].*?)(["'])([^\1]*?)\1/gms)).map(([, , v]) => v.split(splitterRE)).flat();
|
|
155
|
-
return (extractTernary.length ? extractTernary : content.split(splitterRE)).filter(Boolean).map((v) => `[${name}~="${v}"]`);
|
|
155
|
+
return (extractTernary.length ? extractTernary : content.split(splitterRE)).filter((v) => Boolean(v) && v !== ":").map((v) => `[${name}~="${v}"]`);
|
|
156
156
|
}
|
|
157
157
|
});
|
|
158
158
|
return new Set(result);
|
package/dist/index.mjs
CHANGED
|
@@ -148,7 +148,7 @@ const extractorAttributify = (options) => {
|
|
|
148
148
|
if (options?.prefixedOnly && options.prefix && !name.startsWith(options.prefix))
|
|
149
149
|
return [];
|
|
150
150
|
const extractTernary = Array.from(content.matchAll(/(?:[\?:].*?)(["'])([^\1]*?)\1/gms)).map(([, , v]) => v.split(splitterRE)).flat();
|
|
151
|
-
return (extractTernary.length ? extractTernary : content.split(splitterRE)).filter(Boolean).map((v) => `[${name}~="${v}"]`);
|
|
151
|
+
return (extractTernary.length ? extractTernary : content.split(splitterRE)).filter((v) => Boolean(v) && v !== ":").map((v) => `[${name}~="${v}"]`);
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
154
|
return new Set(result);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-attributify",
|
|
3
|
-
"version": "0.48.
|
|
3
|
+
"version": "0.48.5",
|
|
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.48.
|
|
36
|
+
"@unocss/core": "0.48.5"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "unbuild",
|