@unocss/core 0.55.1 → 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,9 +223,16 @@ 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
237
  }
217
238
  add(key) {
@@ -321,6 +342,7 @@ function parseVariantGroup(str, separators = ["-", ":"], depth = 5) {
321
342
  prefixes: Array.from(prefixes),
322
343
  hasChanged,
323
344
  groupsByOffset,
345
+ // Computed lazily because MagicString's toString does a lot of work
324
346
  get expanded() {
325
347
  return expanded.toString();
326
348
  }
@@ -593,17 +615,24 @@ function mergeAutocompleteShorthands(shorthands) {
593
615
  );
594
616
  }
595
617
 
596
- const version = "0.55.1";
618
+ const version = "0.55.2";
597
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
+ };
598
626
  class UnoGenerator {
599
627
  constructor(userConfig = {}, defaults = {}) {
600
628
  this.userConfig = userConfig;
601
629
  this.defaults = defaults;
602
- this.version = version;
603
- this._cache = /* @__PURE__ */ new Map();
604
- this.blocked = /* @__PURE__ */ new Set();
605
- this.parentOrders = /* @__PURE__ */ new Map();
606
- 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());
607
636
  this.config = resolveConfig(userConfig, defaults);
608
637
  this.events.emit("config", this.config);
609
638
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/core",
3
- "version": "0.55.1",
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",