@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.cjs +38 -11
- package/dist/index.d.cts +990 -0
- package/dist/index.d.mts +990 -0
- package/dist/index.mjs +38 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -17,11 +17,19 @@ function escapeSelector(str) {
|
|
|
17
17
|
result += "\\,";
|
|
18
18
|
continue;
|
|
19
19
|
}
|
|
20
|
-
if (
|
|
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 (
|
|
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
|
|
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.
|
|
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
|
|
603
|
-
this
|
|
604
|
-
this
|
|
605
|
-
this
|
|
606
|
-
this
|
|
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
|
}
|