@unocss/preset-attributify 0.58.5 → 0.58.7

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 CHANGED
@@ -136,7 +136,7 @@ const strippedPrefixes = [
136
136
  ":"
137
137
  ];
138
138
  const splitterRE = /[\s'"`;]+/g;
139
- const elementRE = /<[^>\s]*\s((?:'.*?'|".*?"|`.*?`|\{.*?\}|[^>]*?)*)/g;
139
+ const elementRE = /<[^>\s]*\s((?:'.*?'|".*?"|`.*?`|\{.*?\}|=>|[^>]*?)*)/g;
140
140
  const valuedAttributeRE = /([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.~<]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms;
141
141
  const defaultIgnoreAttributes = ["placeholder", "fill", "opacity", "stroke-opacity"];
142
142
  function extractorAttributify(options) {
package/dist/index.d.cts CHANGED
@@ -65,6 +65,25 @@ type AttributifyNames<Prefix extends string = ''> = `${Prefix}${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
@@ -65,6 +65,25 @@ type AttributifyNames<Prefix extends string = ''> = `${Prefix}${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
@@ -65,6 +65,25 @@ type AttributifyNames<Prefix extends string = ''> = `${Prefix}${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.mjs CHANGED
@@ -132,7 +132,7 @@ const strippedPrefixes = [
132
132
  ":"
133
133
  ];
134
134
  const splitterRE = /[\s'"`;]+/g;
135
- const elementRE = /<[^>\s]*\s((?:'.*?'|".*?"|`.*?`|\{.*?\}|[^>]*?)*)/g;
135
+ const elementRE = /<[^>\s]*\s((?:'.*?'|".*?"|`.*?`|\{.*?\}|=>|[^>]*?)*)/g;
136
136
  const valuedAttributeRE = /([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.~<]+)=?(?:["]([^"]*)["]|[']([^']*)[']|[{]([^}]*)[}])?/gms;
137
137
  const defaultIgnoreAttributes = ["placeholder", "fill", "opacity", "stroke-opacity"];
138
138
  function extractorAttributify(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-attributify",
3
- "version": "0.58.5",
3
+ "version": "0.58.7",
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.5"
36
+ "@unocss/core": "0.58.7"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "unbuild",