@unocss/preset-attributify 0.44.1 → 0.44.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/dist/index.cjs CHANGED
@@ -119,8 +119,9 @@ const strippedPrefixes = [
119
119
  const splitterRE = /[\s'"`;]+/g;
120
120
  const elementRE = /<\w(?=.*>)[\w:\.$-]*\s((?:['"`\{].*?['"`\}]|.*?)*?)>/gs;
121
121
  const valuedAttributeRE = /([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-]+)(?:=(["'])([^\2]*?)\2)?/g;
122
+ const defaultIgnoreAttributes = ["placeholder"];
122
123
  const extractorAttributify = (options) => {
123
- const ignoreAttributes = options?.ignoreAttributes ?? [];
124
+ const ignoreAttributes = options?.ignoreAttributes ?? defaultIgnoreAttributes;
124
125
  const nonValuedAttribute = options?.nonValuedAttribute ?? true;
125
126
  const trueToNonValued = options?.trueToNonValued ?? false;
126
127
  return {
@@ -160,7 +161,7 @@ const preset = (options = {}) => {
160
161
  options.prefix = options.prefix ?? "un-";
161
162
  options.prefixedOnly = options.prefixedOnly ?? false;
162
163
  options.nonValuedAttribute = options.nonValuedAttribute ?? true;
163
- options.ignoreAttributes = options.ignoreAttributes ?? [];
164
+ options.ignoreAttributes = options.ignoreAttributes ?? defaultIgnoreAttributes;
164
165
  const variants = [
165
166
  variantAttributify(options)
166
167
  ];
@@ -185,6 +186,7 @@ const preset = (options = {}) => {
185
186
 
186
187
  exports.autocompleteExtractorAttributify = autocompleteExtractorAttributify;
187
188
  exports["default"] = preset;
189
+ exports.defaultIgnoreAttributes = defaultIgnoreAttributes;
188
190
  exports.extractorAttributify = extractorAttributify;
189
191
  exports.variantAttributify = variantAttributify;
190
192
  exports.variantsRE = variantsRE;
package/dist/index.d.ts CHANGED
@@ -44,6 +44,7 @@ interface AttributifyOptions extends PresetOptions {
44
44
 
45
45
  declare const autocompleteExtractorAttributify: AutoCompleteExtractor;
46
46
 
47
+ declare const defaultIgnoreAttributes: string[];
47
48
  declare const extractorAttributify: (options?: AttributifyOptions) => Extractor;
48
49
 
49
50
  declare const variantsRE: RegExp;
@@ -57,4 +58,4 @@ interface AttributifyAttributes extends Partial<Record<AttributifyNames, string
57
58
 
58
59
  declare const preset: (options?: AttributifyOptions) => Preset;
59
60
 
60
- export { AttributifyAttributes, AttributifyNames, AttributifyOptions, UtilityNames, VariantNames, autocompleteExtractorAttributify, preset as default, extractorAttributify, variantAttributify, variantsRE };
61
+ export { AttributifyAttributes, AttributifyNames, AttributifyOptions, UtilityNames, VariantNames, autocompleteExtractorAttributify, preset as default, defaultIgnoreAttributes, extractorAttributify, variantAttributify, variantsRE };
package/dist/index.mjs CHANGED
@@ -115,8 +115,9 @@ const strippedPrefixes = [
115
115
  const splitterRE = /[\s'"`;]+/g;
116
116
  const elementRE = /<\w(?=.*>)[\w:\.$-]*\s((?:['"`\{].*?['"`\}]|.*?)*?)>/gs;
117
117
  const valuedAttributeRE = /([?]|(?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-]+)(?:=(["'])([^\2]*?)\2)?/g;
118
+ const defaultIgnoreAttributes = ["placeholder"];
118
119
  const extractorAttributify = (options) => {
119
- const ignoreAttributes = options?.ignoreAttributes ?? [];
120
+ const ignoreAttributes = options?.ignoreAttributes ?? defaultIgnoreAttributes;
120
121
  const nonValuedAttribute = options?.nonValuedAttribute ?? true;
121
122
  const trueToNonValued = options?.trueToNonValued ?? false;
122
123
  return {
@@ -156,7 +157,7 @@ const preset = (options = {}) => {
156
157
  options.prefix = options.prefix ?? "un-";
157
158
  options.prefixedOnly = options.prefixedOnly ?? false;
158
159
  options.nonValuedAttribute = options.nonValuedAttribute ?? true;
159
- options.ignoreAttributes = options.ignoreAttributes ?? [];
160
+ options.ignoreAttributes = options.ignoreAttributes ?? defaultIgnoreAttributes;
160
161
  const variants = [
161
162
  variantAttributify(options)
162
163
  ];
@@ -179,4 +180,4 @@ const preset = (options = {}) => {
179
180
  };
180
181
  };
181
182
 
182
- export { autocompleteExtractorAttributify, preset as default, extractorAttributify, variantAttributify, variantsRE };
183
+ export { autocompleteExtractorAttributify, preset as default, defaultIgnoreAttributes, extractorAttributify, variantAttributify, variantsRE };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-attributify",
3
- "version": "0.44.1",
3
+ "version": "0.44.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.44.1"
36
+ "@unocss/core": "0.44.4"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "unbuild",