@vinicunca/unocss-preset 1.46.0 → 1.47.0

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.
@@ -1,5 +1,4 @@
1
- import { i as compressCSS, t as DEFAULT_AKAR_OPTIONS } from "./constants-CD9LkNQP.mjs";
2
- import { defu } from "defu";
1
+ import { i as compressCSS, s as defu, t as DEFAULT_AKAR_OPTIONS } from "./constants-X7mmwX-F.mjs";
3
2
  import { isObjectType, isString } from "@vinicunca/perkakas";
4
3
  import { theme } from "unocss/preset-wind4";
5
4
  //#region src/presets/akar/akar.drawer-preflights.ts
@@ -1,5 +1,5 @@
1
1
  import { n as layerMeta } from "./meta-BWU-BFPZ.mjs";
2
- import { h } from "@unocss/preset-mini/utils";
2
+ import { n as h } from "./utils-BtCNpQqm-BMsPT3mH.mjs";
3
3
  //#region src/presets/animation/animation.entity.ts
4
4
  const CSS_VARIABLE_PREFIX = "--vin";
5
5
  const ENTER_ANIMATION_NAME = "vin-in";
@@ -0,0 +1,15 @@
1
+ import { createRequire } from "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __defProp = Object.defineProperty;
4
+ var __exportAll = (all, no_symbols) => {
5
+ let target = {};
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
11
+ return target;
12
+ };
13
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
14
+ //#endregion
15
+ export { __require as n, __exportAll as t };
@@ -1,3 +1,31 @@
1
+ //#region node_modules/.pnpm/defu@6.1.7/node_modules/defu/dist/defu.mjs
2
+ function isPlainObject(value) {
3
+ if (value === null || typeof value !== "object") return false;
4
+ const prototype = Object.getPrototypeOf(value);
5
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
6
+ if (Symbol.iterator in value) return false;
7
+ if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]";
8
+ return true;
9
+ }
10
+ function _defu(baseObject, defaults, namespace = ".", merger) {
11
+ if (!isPlainObject(defaults)) return _defu(baseObject, {}, namespace, merger);
12
+ const object = { ...defaults };
13
+ for (const key of Object.keys(baseObject)) {
14
+ if (key === "__proto__" || key === "constructor") continue;
15
+ const value = baseObject[key];
16
+ if (value === null || value === void 0) continue;
17
+ if (merger && merger(object, key, value, namespace)) continue;
18
+ if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
19
+ else if (isPlainObject(value) && isPlainObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
20
+ else object[key] = value;
21
+ }
22
+ return object;
23
+ }
24
+ function createDefu(merger) {
25
+ return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
26
+ }
27
+ const defu = createDefu();
28
+ //#endregion
1
29
  //#region src/utils.ts
2
30
  const RE_ANIMATION = /^([a-z-]+)\s+([0-9.]+m?s?|var\([^)]+\)|[*+])?\s?([a-z-]+(?:\([^)]+\))?|[*+])?\s*([a-z0-9-]+|var\([^)]+\)|[*+])?$/i;
3
31
  /**
@@ -283,4 +311,4 @@ const DEFAULT_PRESET_OPTIONS = {
283
311
  akar: DEFAULT_AKAR_OPTIONS
284
312
  };
285
313
  //#endregion
286
- export { cssObj2StrSync as a, compressCSS as i, DEFAULT_OPTIONS as n, resolveAnimation as o, DEFAULT_PRESET_OPTIONS as r, DEFAULT_AKAR_OPTIONS as t };
314
+ export { cssObj2StrSync as a, compressCSS as i, DEFAULT_OPTIONS as n, resolveAnimation as o, DEFAULT_PRESET_OPTIONS as r, defu as s, DEFAULT_AKAR_OPTIONS as t };
@@ -0,0 +1,110 @@
1
+ //#region node_modules/.pnpm/@unocss+core@66.7.0/node_modules/@unocss/core/dist/index.mjs
2
+ const LAYER_IMPORTS = "imports";
3
+ function toArray(value = []) {
4
+ return Array.isArray(value) ? value : [value];
5
+ }
6
+ function isString(s) {
7
+ return typeof s === "string";
8
+ }
9
+ function escapeRegExp(string) {
10
+ return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
11
+ }
12
+ /**
13
+ * CSS Selector Escape
14
+ */
15
+ function escapeSelector(str) {
16
+ const length = str.length;
17
+ let index = -1;
18
+ let codeUnit;
19
+ let result = "";
20
+ const firstCodeUnit = str.charCodeAt(0);
21
+ while (++index < length) {
22
+ codeUnit = str.charCodeAt(index);
23
+ if (codeUnit === 0) {
24
+ result += "�";
25
+ continue;
26
+ }
27
+ if (codeUnit === 37) {
28
+ result += "\\%";
29
+ continue;
30
+ }
31
+ if (codeUnit === 44) {
32
+ result += "\\,";
33
+ continue;
34
+ }
35
+ if (codeUnit >= 1 && codeUnit <= 31 || codeUnit === 127 || index === 0 && codeUnit >= 48 && codeUnit <= 57 || index === 1 && codeUnit >= 48 && codeUnit <= 57 && firstCodeUnit === 45) {
36
+ result += `\\${codeUnit.toString(16)} `;
37
+ continue;
38
+ }
39
+ if (index === 0 && length === 1 && codeUnit === 45) {
40
+ result += `\\${str.charAt(index)}`;
41
+ continue;
42
+ }
43
+ if (codeUnit >= 128 || codeUnit === 45 || codeUnit === 95 || codeUnit >= 48 && codeUnit <= 57 || codeUnit >= 65 && codeUnit <= 90 || codeUnit >= 97 && codeUnit <= 122) {
44
+ result += str.charAt(index);
45
+ continue;
46
+ }
47
+ result += `\\${str.charAt(index)}`;
48
+ }
49
+ return result;
50
+ }
51
+ function isObject(item) {
52
+ return item && typeof item === "object" && !Array.isArray(item);
53
+ }
54
+ /**
55
+ * Deep merge two objects
56
+ */
57
+ function mergeDeep(original, patch, mergeArray = false) {
58
+ const o = original;
59
+ const p = patch;
60
+ if (Array.isArray(p)) if (mergeArray && Array.isArray(p)) return [...o, ...p];
61
+ else return [...p];
62
+ const output = { ...o };
63
+ if (isObject(o) && isObject(p)) Object.keys(p).forEach((key) => {
64
+ if (isObject(o[key]) && isObject(p[key]) || Array.isArray(o[key]) && Array.isArray(p[key])) output[key] = mergeDeep(o[key], p[key], mergeArray);
65
+ else Object.assign(output, { [key]: p[key] });
66
+ });
67
+ return output;
68
+ }
69
+ function clone(val) {
70
+ let k, out, tmp;
71
+ if (Array.isArray(val)) {
72
+ out = Array.from({ length: k = val.length });
73
+ while (k--) out[k] = (tmp = val[k]) && typeof tmp === "object" ? clone(tmp) : tmp;
74
+ return out;
75
+ }
76
+ if (Object.prototype.toString.call(val) === "[object Object]") {
77
+ out = {};
78
+ for (k in val) if (k === "__proto__") Object.defineProperty(out, k, {
79
+ value: clone(val[k]),
80
+ configurable: true,
81
+ enumerable: true,
82
+ writable: true
83
+ });
84
+ else out[k] = (tmp = val[k]) && typeof tmp === "object" ? clone(tmp) : tmp;
85
+ return out;
86
+ }
87
+ return val;
88
+ }
89
+ const warned = /* @__PURE__ */ new Set();
90
+ function warnOnce(msg) {
91
+ if (warned.has(msg)) return;
92
+ console.warn("[unocss]", msg);
93
+ warned.add(msg);
94
+ }
95
+ function definePreset(preset) {
96
+ return preset;
97
+ }
98
+ const symbols = {
99
+ shortcutsNoMerge: "$$symbol-shortcut-no-merge",
100
+ noMerge: "$$symbol-no-merge",
101
+ noScope: "$$symbol-no-scope",
102
+ variants: "$$symbol-variants",
103
+ parent: "$$symbol-parent",
104
+ selector: "$$symbol-selector",
105
+ layer: "$$symbol-layer",
106
+ sort: "$$symbol-sort",
107
+ body: "$$symbol-body"
108
+ };
109
+ //#endregion
110
+ export { escapeSelector as a, symbols as c, escapeRegExp as i, toArray as l, clone as n, isString as o, definePreset as r, mergeDeep as s, LAYER_IMPORTS as t, warnOnce as u };