@unocss/core 0.55.0 → 0.55.2

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.mjs CHANGED
@@ -17,11 +17,19 @@ function escapeSelector(str) {
17
17
  result += "\\,";
18
18
  continue;
19
19
  }
20
- if (codeUnit >= 1 && codeUnit <= 31 || codeUnit === 127 || index === 0 && codeUnit >= 48 && codeUnit <= 57 || index === 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit === 45) {
20
+ if (
21
+ // If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
22
+ // U+007F, […]
23
+ codeUnit >= 1 && codeUnit <= 31 || codeUnit === 127 || index === 0 && codeUnit >= 48 && codeUnit <= 57 || index === 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit === 45
24
+ ) {
21
25
  result += `\\${codeUnit.toString(16)} `;
22
26
  continue;
23
27
  }
24
- if (index === 0 && length === 1 && codeUnit === 45) {
28
+ if (
29
+ // If the character is the first character and is a `-` (U+002D), and
30
+ // there is no second character, […]
31
+ index === 0 && length === 1 && codeUnit === 45
32
+ ) {
25
33
  result += `\\${str.charAt(index)}`;
26
34
  continue;
27
35
  }
@@ -154,9 +162,15 @@ function notNull(value) {
154
162
  function noop() {
155
163
  }
156
164
 
165
+ var __defProp$2 = Object.defineProperty;
166
+ var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
167
+ var __publicField$2 = (obj, key, value) => {
168
+ __defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
169
+ return value;
170
+ };
157
171
  class TwoKeyMap {
158
172
  constructor() {
159
- this._map = /* @__PURE__ */ new Map();
173
+ __publicField$2(this, "_map", /* @__PURE__ */ new Map());
160
174
  }
161
175
  get(key1, key2) {
162
176
  const m2 = this._map.get(key1);
@@ -209,12 +223,17 @@ class BetterMap extends Map {
209
223
  }
210
224
  }
211
225
 
226
+ var __defProp$1 = Object.defineProperty;
227
+ var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
228
+ var __publicField$1 = (obj, key, value) => {
229
+ __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
230
+ return value;
231
+ };
212
232
  class CountableSet extends Set {
213
233
  constructor(values) {
214
234
  super(values);
235
+ __publicField$1(this, "_map");
215
236
  this._map ?? (this._map = /* @__PURE__ */ new Map());
216
- for (const value of values ?? [])
217
- this.add(value);
218
237
  }
219
238
  add(key) {
220
239
  this._map ?? (this._map = /* @__PURE__ */ new Map());
@@ -323,6 +342,7 @@ function parseVariantGroup(str, separators = ["-", ":"], depth = 5) {
323
342
  prefixes: Array.from(prefixes),
324
343
  hasChanged,
325
344
  groupsByOffset,
345
+ // Computed lazily because MagicString's toString does a lot of work
326
346
  get expanded() {
327
347
  return expanded.toString();
328
348
  }
@@ -595,17 +615,24 @@ function mergeAutocompleteShorthands(shorthands) {
595
615
  );
596
616
  }
597
617
 
598
- const version = "0.55.0";
618
+ const version = "0.55.2";
599
619
 
620
+ var __defProp = Object.defineProperty;
621
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
622
+ var __publicField = (obj, key, value) => {
623
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
624
+ return value;
625
+ };
600
626
  class UnoGenerator {
601
627
  constructor(userConfig = {}, defaults = {}) {
602
628
  this.userConfig = userConfig;
603
629
  this.defaults = defaults;
604
- this.version = version;
605
- this._cache = /* @__PURE__ */ new Map();
606
- this.blocked = /* @__PURE__ */ new Set();
607
- this.parentOrders = /* @__PURE__ */ new Map();
608
- this.events = createNanoEvents();
630
+ __publicField(this, "version", version);
631
+ __publicField(this, "_cache", /* @__PURE__ */ new Map());
632
+ __publicField(this, "config");
633
+ __publicField(this, "blocked", /* @__PURE__ */ new Set());
634
+ __publicField(this, "parentOrders", /* @__PURE__ */ new Map());
635
+ __publicField(this, "events", createNanoEvents());
609
636
  this.config = resolveConfig(userConfig, defaults);
610
637
  this.events.emit("config", this.config);
611
638
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/core",
3
- "version": "0.55.0",
3
+ "version": "0.55.2",
4
4
  "description": "The instant on-demand Atomic CSS engine.",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",