@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.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
function escapeRegExp(string) {
|
|
6
4
|
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
7
5
|
}
|
|
@@ -21,11 +19,19 @@ function escapeSelector(str) {
|
|
|
21
19
|
result += "\\,";
|
|
22
20
|
continue;
|
|
23
21
|
}
|
|
24
|
-
if (
|
|
22
|
+
if (
|
|
23
|
+
// If the character is in the range [\1-\1F] (U+0001 to U+001F) or is
|
|
24
|
+
// U+007F, […]
|
|
25
|
+
codeUnit >= 1 && codeUnit <= 31 || codeUnit === 127 || index === 0 && codeUnit >= 48 && codeUnit <= 57 || index === 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit === 45
|
|
26
|
+
) {
|
|
25
27
|
result += `\\${codeUnit.toString(16)} `;
|
|
26
28
|
continue;
|
|
27
29
|
}
|
|
28
|
-
if (
|
|
30
|
+
if (
|
|
31
|
+
// If the character is the first character and is a `-` (U+002D), and
|
|
32
|
+
// there is no second character, […]
|
|
33
|
+
index === 0 && length === 1 && codeUnit === 45
|
|
34
|
+
) {
|
|
29
35
|
result += `\\${str.charAt(index)}`;
|
|
30
36
|
continue;
|
|
31
37
|
}
|
|
@@ -158,9 +164,15 @@ function notNull(value) {
|
|
|
158
164
|
function noop() {
|
|
159
165
|
}
|
|
160
166
|
|
|
167
|
+
var __defProp$2 = Object.defineProperty;
|
|
168
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
169
|
+
var __publicField$2 = (obj, key, value) => {
|
|
170
|
+
__defNormalProp$2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
171
|
+
return value;
|
|
172
|
+
};
|
|
161
173
|
class TwoKeyMap {
|
|
162
174
|
constructor() {
|
|
163
|
-
this
|
|
175
|
+
__publicField$2(this, "_map", /* @__PURE__ */ new Map());
|
|
164
176
|
}
|
|
165
177
|
get(key1, key2) {
|
|
166
178
|
const m2 = this._map.get(key1);
|
|
@@ -213,9 +225,16 @@ class BetterMap extends Map {
|
|
|
213
225
|
}
|
|
214
226
|
}
|
|
215
227
|
|
|
228
|
+
var __defProp$1 = Object.defineProperty;
|
|
229
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
230
|
+
var __publicField$1 = (obj, key, value) => {
|
|
231
|
+
__defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
232
|
+
return value;
|
|
233
|
+
};
|
|
216
234
|
class CountableSet extends Set {
|
|
217
235
|
constructor(values) {
|
|
218
236
|
super(values);
|
|
237
|
+
__publicField$1(this, "_map");
|
|
219
238
|
this._map ?? (this._map = /* @__PURE__ */ new Map());
|
|
220
239
|
}
|
|
221
240
|
add(key) {
|
|
@@ -325,6 +344,7 @@ function parseVariantGroup(str, separators = ["-", ":"], depth = 5) {
|
|
|
325
344
|
prefixes: Array.from(prefixes),
|
|
326
345
|
hasChanged,
|
|
327
346
|
groupsByOffset,
|
|
347
|
+
// Computed lazily because MagicString's toString does a lot of work
|
|
328
348
|
get expanded() {
|
|
329
349
|
return expanded.toString();
|
|
330
350
|
}
|
|
@@ -597,17 +617,24 @@ function mergeAutocompleteShorthands(shorthands) {
|
|
|
597
617
|
);
|
|
598
618
|
}
|
|
599
619
|
|
|
600
|
-
const version = "0.55.
|
|
620
|
+
const version = "0.55.2";
|
|
601
621
|
|
|
622
|
+
var __defProp = Object.defineProperty;
|
|
623
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
624
|
+
var __publicField = (obj, key, value) => {
|
|
625
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
626
|
+
return value;
|
|
627
|
+
};
|
|
602
628
|
class UnoGenerator {
|
|
603
629
|
constructor(userConfig = {}, defaults = {}) {
|
|
604
630
|
this.userConfig = userConfig;
|
|
605
631
|
this.defaults = defaults;
|
|
606
|
-
this
|
|
607
|
-
this
|
|
608
|
-
this
|
|
609
|
-
this
|
|
610
|
-
this
|
|
632
|
+
__publicField(this, "version", version);
|
|
633
|
+
__publicField(this, "_cache", /* @__PURE__ */ new Map());
|
|
634
|
+
__publicField(this, "config");
|
|
635
|
+
__publicField(this, "blocked", /* @__PURE__ */ new Set());
|
|
636
|
+
__publicField(this, "parentOrders", /* @__PURE__ */ new Map());
|
|
637
|
+
__publicField(this, "events", createNanoEvents());
|
|
611
638
|
this.config = resolveConfig(userConfig, defaults);
|
|
612
639
|
this.events.emit("config", this.config);
|
|
613
640
|
}
|