@unocss/preset-attributify 0.48.3 → 0.48.4

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 CHANGED
@@ -177,12 +177,10 @@ declare module 'solid-js' {
177
177
  ### Svelte & SvelteKit
178
178
 
179
179
  ```ts
180
- import type { AttributifyAttributes } from '@unocss/preset-attributify'
180
+ declare namespace svelteHTML {
181
+ import type { AttributifyAttributes } from '@unocss/preset-attributify'
181
182
 
182
- declare global {
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",
3
+ "version": "0.48.4",
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.3"
36
+ "@unocss/core": "0.48.4"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "unbuild",