@vxrn/color-scheme 1.25.5 → 1.25.6
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/cjs/index.cjs +121 -0
- package/dist/cjs/index.native.js +96 -0
- package/dist/cjs/index.native.js.map +1 -0
- package/dist/cjs/safeStorage.cjs +40 -0
- package/dist/cjs/safeStorage.native.js +43 -0
- package/dist/cjs/safeStorage.native.js.map +1 -0
- package/dist/cjs/safeStorage.test.cjs +49 -0
- package/dist/cjs/safeStorage.test.native.js +66 -0
- package/dist/cjs/safeStorage.test.native.js.map +1 -0
- package/dist/cjs/systemScheme.cjs +44 -0
- package/dist/cjs/systemScheme.native.js +64 -0
- package/dist/cjs/systemScheme.native.js.map +1 -0
- package/dist/cjs/userScheme.cjs +156 -0
- package/dist/cjs/userScheme.native.js +171 -0
- package/dist/cjs/userScheme.native.js.map +1 -0
- package/dist/cjs/userSchemeAppearance.cjs +35 -0
- package/dist/cjs/userSchemeAppearance.native.js +42 -0
- package/dist/cjs/userSchemeAppearance.native.js.map +1 -0
- package/dist/esm/index.js +88 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index.mjs +88 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/index.native.js +58 -0
- package/dist/esm/index.native.js.map +1 -0
- package/dist/esm/safeStorage.mjs +14 -0
- package/dist/esm/safeStorage.mjs.map +1 -0
- package/dist/esm/safeStorage.native.js +14 -0
- package/dist/esm/safeStorage.native.js.map +1 -0
- package/dist/esm/safeStorage.test.mjs +50 -0
- package/dist/esm/safeStorage.test.mjs.map +1 -0
- package/dist/esm/safeStorage.test.native.js +64 -0
- package/dist/esm/safeStorage.test.native.js.map +1 -0
- package/dist/esm/systemScheme.mjs +18 -0
- package/dist/esm/systemScheme.mjs.map +1 -0
- package/dist/esm/systemScheme.native.js +35 -0
- package/dist/esm/systemScheme.native.js.map +1 -0
- package/dist/esm/userScheme.mjs +125 -0
- package/dist/esm/userScheme.mjs.map +1 -0
- package/dist/esm/userScheme.native.js +137 -0
- package/dist/esm/userScheme.native.js.map +1 -0
- package/dist/esm/userSchemeAppearance.mjs +8 -0
- package/dist/esm/userSchemeAppearance.mjs.map +1 -0
- package/dist/esm/userSchemeAppearance.native.js +12 -0
- package/dist/esm/userSchemeAppearance.native.js.map +1 -0
- package/package.json +2 -2
- package/types/index.d.ts.map +1 -0
- package/types/safeStorage.d.ts.map +1 -0
- package/types/safeStorage.test.d.ts.map +1 -0
- package/types/systemScheme.d.ts.map +1 -0
- package/types/systemScheme.native.d.ts.map +1 -0
- package/types/userScheme.d.ts.map +1 -0
- package/types/userSchemeAppearance.d.ts.map +1 -0
- package/types/userSchemeAppearance.native.d.ts.map +1 -0
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var index_exports = {};
|
|
24
|
+
__export(index_exports, {
|
|
25
|
+
MetaTheme: () => MetaTheme,
|
|
26
|
+
SchemeProvider: () => SchemeProvider,
|
|
27
|
+
getSystemScheme: () => import_systemScheme.getSystemScheme,
|
|
28
|
+
getUserScheme: () => import_userScheme2.getUserScheme,
|
|
29
|
+
onUserSchemeChange: () => import_userScheme2.onUserSchemeChange,
|
|
30
|
+
setUserScheme: () => import_userScheme2.setUserScheme,
|
|
31
|
+
useSystemScheme: () => import_systemScheme.useSystemScheme,
|
|
32
|
+
useUserScheme: () => import_userScheme2.useUserScheme
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(index_exports);
|
|
35
|
+
var import_use_isomorphic_layout_effect = require("@vxrn/use-isomorphic-layout-effect");
|
|
36
|
+
var import_safeStorage = require("./safeStorage.cjs");
|
|
37
|
+
var import_userScheme = require("./userScheme.cjs");
|
|
38
|
+
var import_systemScheme = require("./systemScheme.cjs");
|
|
39
|
+
var import_userScheme2 = require("./userScheme.cjs");
|
|
40
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
+
const storageKey = "vxrn-scheme";
|
|
42
|
+
function SchemeProvider({
|
|
43
|
+
children,
|
|
44
|
+
getClassName = name => `t_${name}`,
|
|
45
|
+
defaultScheme,
|
|
46
|
+
forceScheme
|
|
47
|
+
}) {
|
|
48
|
+
(0, import_userScheme.setForceScheme)(forceScheme ?? null);
|
|
49
|
+
const {
|
|
50
|
+
value
|
|
51
|
+
} = (0, import_userScheme.useUserScheme)();
|
|
52
|
+
const resolvedValue = forceScheme ?? value;
|
|
53
|
+
(0, import_use_isomorphic_layout_effect.useIsomorphicLayoutEffect)(() => {
|
|
54
|
+
if (!forceScheme && defaultScheme) {
|
|
55
|
+
if (!(0, import_safeStorage.getStorageItem)(storageKey)) (0, import_userScheme.setUserScheme)(defaultScheme);
|
|
56
|
+
}
|
|
57
|
+
}, [defaultScheme, forceScheme]);
|
|
58
|
+
(0, import_use_isomorphic_layout_effect.useIsomorphicLayoutEffect)(() => {
|
|
59
|
+
const toAdd = getClassName(resolvedValue);
|
|
60
|
+
const toRemove = getClassName(resolvedValue === "light" ? "dark" : "light");
|
|
61
|
+
const {
|
|
62
|
+
classList
|
|
63
|
+
} = document.documentElement;
|
|
64
|
+
classList.remove(toRemove);
|
|
65
|
+
if (!classList.contains(toAdd)) classList.add(toAdd);
|
|
66
|
+
}, [getClassName, resolvedValue]);
|
|
67
|
+
let scriptContent;
|
|
68
|
+
if (forceScheme) scriptContent = `let d = document.documentElement.classList
|
|
69
|
+
d.remove('${getClassName("light")}')
|
|
70
|
+
d.remove('${getClassName("dark")}')
|
|
71
|
+
d.add('${getClassName(forceScheme)}')`;else {
|
|
72
|
+
const fallback = defaultScheme ? `'${defaultScheme}' === 'dark'` : `window.matchMedia('(prefers-color-scheme: dark)').matches`;
|
|
73
|
+
const seedStorage = defaultScheme ? `;if(!e){localStorage.setItem('${storageKey}','${defaultScheme}')}` : "";
|
|
74
|
+
scriptContent = `let d = document.documentElement.classList
|
|
75
|
+
d.remove('${getClassName("light")}')
|
|
76
|
+
d.remove('${getClassName("dark")}')
|
|
77
|
+
let e = null
|
|
78
|
+
try { e = localStorage.getItem('${storageKey}')${seedStorage} } catch (_e) {}
|
|
79
|
+
let t = 'system' === e || !e
|
|
80
|
+
? ${fallback}
|
|
81
|
+
: e === 'dark'
|
|
82
|
+
t ? d.add('${getClassName("dark")}') : d.add('${getClassName("light")}')`;
|
|
83
|
+
}
|
|
84
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
85
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)("script", {
|
|
86
|
+
suppressHydrationWarning: true,
|
|
87
|
+
dangerouslySetInnerHTML: {
|
|
88
|
+
__html: scriptContent
|
|
89
|
+
}
|
|
90
|
+
}), children]
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function MetaTheme({
|
|
94
|
+
color,
|
|
95
|
+
darkColor,
|
|
96
|
+
lightColor
|
|
97
|
+
}) {
|
|
98
|
+
const {
|
|
99
|
+
value
|
|
100
|
+
} = (0, import_userScheme.useUserScheme)();
|
|
101
|
+
const forced = (0, import_userScheme.getForceScheme)();
|
|
102
|
+
const scriptContent = forced ? `document.getElementById('vxrn-theme-color').setAttribute('content','${forced === "dark" ? darkColor : lightColor}')` : `let dc = document.getElementById('vxrn-theme-color')
|
|
103
|
+
let e1 = null
|
|
104
|
+
try { e1 = localStorage.getItem('${storageKey}') } catch (_e) {}
|
|
105
|
+
let isD = 'system' === e1 || !e1 ? window.matchMedia('(prefers-color-scheme: dark)').matches : e1 === 'dark'
|
|
106
|
+
dc.setAttribute('content', isD ? '${darkColor}' : '${lightColor}')`;
|
|
107
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
108
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)("meta", {
|
|
109
|
+
suppressHydrationWarning: true,
|
|
110
|
+
id: "vxrn-theme-color",
|
|
111
|
+
name: "theme-color",
|
|
112
|
+
content: color ?? (value === "dark" ? darkColor : lightColor)
|
|
113
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)("script", {
|
|
114
|
+
suppressHydrationWarning: true,
|
|
115
|
+
id: "meta-theme-hydrate",
|
|
116
|
+
dangerouslySetInnerHTML: {
|
|
117
|
+
__html: scriptContent
|
|
118
|
+
}
|
|
119
|
+
})]
|
|
120
|
+
});
|
|
121
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var index_exports = {};
|
|
26
|
+
__export(index_exports, {
|
|
27
|
+
MetaTheme: () => MetaTheme,
|
|
28
|
+
SchemeProvider: () => SchemeProvider,
|
|
29
|
+
getSystemScheme: () => import_systemScheme.getSystemScheme,
|
|
30
|
+
getUserScheme: () => import_userScheme2.getUserScheme,
|
|
31
|
+
onUserSchemeChange: () => import_userScheme2.onUserSchemeChange,
|
|
32
|
+
setUserScheme: () => import_userScheme2.setUserScheme,
|
|
33
|
+
useSystemScheme: () => import_systemScheme.useSystemScheme,
|
|
34
|
+
useUserScheme: () => import_userScheme2.useUserScheme
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
+
require("@vxrn/use-isomorphic-layout-effect");
|
|
39
|
+
require("./safeStorage.native.js");
|
|
40
|
+
var import_userScheme = require("./userScheme.native.js");
|
|
41
|
+
var import_systemScheme = require("./systemScheme.native.js");
|
|
42
|
+
var import_userScheme2 = require("./userScheme.native.js");
|
|
43
|
+
var storageKey = "vxrn-scheme";
|
|
44
|
+
function SchemeProvider(param) {
|
|
45
|
+
var {
|
|
46
|
+
children,
|
|
47
|
+
getClassName = function (name) {
|
|
48
|
+
return `t_${name}`;
|
|
49
|
+
},
|
|
50
|
+
defaultScheme,
|
|
51
|
+
forceScheme
|
|
52
|
+
} = param;
|
|
53
|
+
(0, import_userScheme.setForceScheme)(forceScheme !== null && forceScheme !== void 0 ? forceScheme : null);
|
|
54
|
+
var {
|
|
55
|
+
value
|
|
56
|
+
} = (0, import_userScheme.useUserScheme)();
|
|
57
|
+
if (forceScheme) `${getClassName("light")}${getClassName("dark")}${getClassName(forceScheme)}`;else {
|
|
58
|
+
var fallback = defaultScheme ? `'${defaultScheme}' === 'dark'` : `window.matchMedia('(prefers-color-scheme: dark)').matches`;
|
|
59
|
+
var seedStorage = defaultScheme ? `;if(!e){localStorage.setItem('${storageKey}','${defaultScheme}')}` : "";
|
|
60
|
+
`${getClassName("light")}${getClassName("dark")}${storageKey}${seedStorage}${fallback}${getClassName("dark")}${getClassName("light")}`;
|
|
61
|
+
}
|
|
62
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
63
|
+
children: [null, children]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function MetaTheme(param) {
|
|
67
|
+
var {
|
|
68
|
+
color,
|
|
69
|
+
darkColor,
|
|
70
|
+
lightColor
|
|
71
|
+
} = param;
|
|
72
|
+
var {
|
|
73
|
+
value
|
|
74
|
+
} = (0, import_userScheme.useUserScheme)();
|
|
75
|
+
var forced = (0, import_userScheme.getForceScheme)();
|
|
76
|
+
var scriptContent = forced ? `document.getElementById('vxrn-theme-color').setAttribute('content','${forced === "dark" ? darkColor : lightColor}')` : `let dc = document.getElementById('vxrn-theme-color')
|
|
77
|
+
let e1 = null
|
|
78
|
+
try { e1 = localStorage.getItem('${storageKey}') } catch (_e) {}
|
|
79
|
+
let isD = 'system' === e1 || !e1 ? window.matchMedia('(prefers-color-scheme: dark)').matches : e1 === 'dark'
|
|
80
|
+
dc.setAttribute('content', isD ? '${darkColor}' : '${lightColor}')`;
|
|
81
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
82
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)("meta", {
|
|
83
|
+
suppressHydrationWarning: true,
|
|
84
|
+
id: "vxrn-theme-color",
|
|
85
|
+
name: "theme-color",
|
|
86
|
+
content: color !== null && color !== void 0 ? color : value === "dark" ? darkColor : lightColor
|
|
87
|
+
}), /* @__PURE__ */(0, import_jsx_runtime.jsx)("script", {
|
|
88
|
+
suppressHydrationWarning: true,
|
|
89
|
+
id: "meta-theme-hydrate",
|
|
90
|
+
dangerouslySetInnerHTML: {
|
|
91
|
+
__html: scriptContent
|
|
92
|
+
}
|
|
93
|
+
})]
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["to","__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","MetaTheme","SchemeProvider","getSystemScheme","import_systemScheme","getUserScheme","import_userScheme2","onUserSchemeChange","setUserScheme","useSystemScheme","useUserScheme","module","exports","import_jsx_runtime","require","import_userScheme","storageKey","param","children","getClassName","name","defaultScheme","forceScheme","setForceScheme","fallback","seedStorage","jsxs","Fragment","color","darkColor","lightColor","forced","getForceScheme","scriptContent","jsx","suppressHydrationWarning","id","content","dangerouslySetInnerHTML","__html"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;EAAA;EAAA,OAAAA,EAAA;AAAA;AAAA,IAAAC,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,SAAA,EAAAA,CAAA,KAAAA,SAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA,cAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAC,mBAAA,CAAAD,eAAA;EAAAE,aAAA,EAAAA,CAAA,KAAAC,kBAAA,CAAAD,aAAA;EAAAE,kBAAA,EAAAA,CAAA,KAAAD,kBAAA,CAAAC,kBAAA;EAAAC,aAAA,EAAAA,CAAA,KAAAF,kBAAA,CAAAE,aAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAL,mBAA0C,CAAAK,eAAA;EAC1CC,aAAA,EAAAA,CAAA,KAAAJ,kBAA+B,CAAAI;AAE/B;AAYAC,MAAA,CAAAC,OAAA,GAAAlB,YAAiD,CAAAK,aAAA;AACjD,IAAAc,kBAAA,GAKOC,OAAA;AA2EHA,OAAA;AAzEJA,OAAM,0BAAa;AAEZ,IAAAC,iBAAS,GAAeD,OAAA;AAAA,IAC7BV,mBAAA,GAAAU,OAAA;AAAA,IACAR,kBAAgB,GAAAQ,OAAc,yBAAI;AAAA,IAClCE,UAAA;AAAA,SACAd,eAAAe,KAAA;EACF,IAOG;IAAAC,QAAA;IAAAC,YAAA,YAAAA,CAAAC,IAAA;MAED,YAAAA,IAAA;IAEA;IAAAC,aAAc;IAAAC;EAAI,IAAAL,KAAA;EAClB,IAAAF,iBAAM,CAAAQ,cAAgB,EAAeD,WAAA,aAAAA,WAAA,cAAAA,WAAA;EAErC;IAAIxB;EAAA,CAAQ,IAAI,GAAAiB,iBAAmB,CAAAL,aAAU;EAE3C,IAAAY,WAAA,KAAAH,YAAA,YAAAA,YAAA,WAAAA,YAAgC,CAAAG,WAAA,SAC9B;IACE,IAAAE,QAAI,GAACH,aAAA,OAAAA,aAAA,cAAyB,GAAG;IAC/B,IAAAI,WAAA,GAAAJ,aAAA,oCAA2BL,UAAA,MAAAK,aAAA;IAAA,GAAAF,YAC7B,YAAAA,YAAA,WAAAH,UAAA,GAAAS,WAAA,GAAAD,QAAA,GAAAL,YAAA,WAAAA,YAAA;EAAA;EACF,OACE,eAAe,IAAAN,kBAAY,CAAAa,IAAA,EAAAb,kBAAA,CAAAc,QAAA;IAAAT,QAAA,SAAAA,QAAA;EAAA;AAE/B;AACE,SAAAjB,SAAMA,CAAAgB,KAAQ;EACd;IAAAW,KAAM;IAAAC,SAAW;IAAAC;EAAa,IAAAb,KAAA;EAC9B;IAAAnB;EAAM,CAAE,OAAAiB,iBAAuB,CAAAL,aAAA;EAC/B,IAAAqB,MAAA,KAAU,EAAAhB,iBAAe,CAAAiB,cAAA;EACzB,IAAAC,aAAK,GAAUF,MAAA,GAAS,uEAAQA,MAAA,cAAAF,SAAA,GAAAC,UAAA;AAC9B;AAAmB,mCACrBd,UAAA;AAAA;AAC8B,oCAClCa,SAAA,QAAAC,UAAA;EAEA,OAAI,mBAAAjB,kBAAA,CAAAa,IAAA,EAAAb,kBAAA,CAAAc,QAAA;IAAAT,QAAA,sBAAAL,kBAAA,CAAAqB,GAAA;MAEJC,wBAAiB;MAEfC,EAAA,oBAAgB;MAAAhB,IAAA,eACR;MAAqBiB,OAAA,EAAAT,KACrB,SAAa,IAAAA,KAAO,cAAAA,KAAA,GAAA9B,KAAA,cAAA+B,SAAA,GAAAC;IAAA,mBACvB,CAAa,GAAAjB,kBAAY,CAAAqB,GAAA;MAChCC,wBAAO;MACLC,EAAA,sBAAiB;MAIjBE,uBAAoB;QAAAC,MAAA,EAAAN;MAChB;IAKJ;EAAA;AAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var safeStorage_exports = {};
|
|
24
|
+
__export(safeStorage_exports, {
|
|
25
|
+
getStorageItem: () => getStorageItem,
|
|
26
|
+
setStorageItem: () => setStorageItem
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(safeStorage_exports);
|
|
29
|
+
function getStorageItem(key) {
|
|
30
|
+
try {
|
|
31
|
+
return localStorage.getItem(key);
|
|
32
|
+
} catch {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function setStorageItem(key, value) {
|
|
37
|
+
try {
|
|
38
|
+
localStorage.setItem(key, value);
|
|
39
|
+
} catch {}
|
|
40
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var safeStorage_exports = {};
|
|
26
|
+
__export(safeStorage_exports, {
|
|
27
|
+
getStorageItem: () => getStorageItem,
|
|
28
|
+
setStorageItem: () => setStorageItem
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(safeStorage_exports);
|
|
31
|
+
function getStorageItem(key) {
|
|
32
|
+
try {
|
|
33
|
+
return localStorage.getItem(key);
|
|
34
|
+
} catch (unused) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function setStorageItem(key, value) {
|
|
39
|
+
try {
|
|
40
|
+
localStorage.setItem(key, value);
|
|
41
|
+
} catch (unused) {}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=safeStorage.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","safeStorage_exports","__export","getStorageItem","setStorageItem","module","exports","key","localStorage","getItem","unused","setItem"],"sources":["../../src/safeStorage.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,cAAA,EAAAA,CAAA,KAAAA,cAAA;EAAAC,cAAA,EAAAA,CAAA,KAAAA;AAAA;AAOOC,MAAA,CAAAC,OAAS,GAAAV,YAA2C,CAAAK,mBAAA;AACzD,SAAIE,eAAAI,GAAA;EACF;IACF,OAAQC,YAAA,CAAAC,OAAA,CAAAF,GAAA;EACN,SAAOG,MAAA;IACT;EACF;AAEO;AACL,SAAIN,eAAAG,GAAA,EAAAP,KAAA;EACF;IACFQ,YAAQ,CAAAG,OAAA,CAAAJ,GAAA,EAAAP,KAAA;EAAC,SAAAU,MAAA,GACX","ignoreList":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var import_vitest = require("vitest");
|
|
2
|
+
var import_safeStorage = require("./safeStorage.cjs");
|
|
3
|
+
(0, import_vitest.afterEach)(() => {
|
|
4
|
+
delete globalThis.localStorage;
|
|
5
|
+
});
|
|
6
|
+
function defineLocalStorage(descriptor) {
|
|
7
|
+
Object.defineProperty(globalThis, "localStorage", {
|
|
8
|
+
configurable: true,
|
|
9
|
+
...descriptor
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
(0, import_vitest.describe)("safeStorage", () => {
|
|
13
|
+
(0, import_vitest.it)("reads and writes through to a working localStorage", () => {
|
|
14
|
+
const store = /* @__PURE__ */new Map();
|
|
15
|
+
defineLocalStorage({
|
|
16
|
+
value: {
|
|
17
|
+
getItem: k => store.has(k) ? store.get(k) : null,
|
|
18
|
+
setItem: (k, v) => void store.set(k, v)
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
(0, import_safeStorage.setStorageItem)("vxrn-scheme", "dark");
|
|
22
|
+
(0, import_vitest.expect)((0, import_safeStorage.getStorageItem)("vxrn-scheme")).toBe("dark");
|
|
23
|
+
});
|
|
24
|
+
(0, import_vitest.it)("returns null instead of throwing when the localStorage getter throws", () => {
|
|
25
|
+
defineLocalStorage({
|
|
26
|
+
get() {
|
|
27
|
+
throw new Error('Failed to read the "localStorage" property: Access is denied.');
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
(0, import_vitest.expect)(() => (0, import_safeStorage.getStorageItem)("vxrn-scheme")).not.toThrow();
|
|
31
|
+
(0, import_vitest.expect)((0, import_safeStorage.getStorageItem)("vxrn-scheme")).toBeNull();
|
|
32
|
+
(0, import_vitest.expect)(() => (0, import_safeStorage.setStorageItem)("vxrn-scheme", "dark")).not.toThrow();
|
|
33
|
+
});
|
|
34
|
+
(0, import_vitest.it)("swallows errors when setItem throws (quota / blocked)", () => {
|
|
35
|
+
defineLocalStorage({
|
|
36
|
+
value: {
|
|
37
|
+
getItem: () => null,
|
|
38
|
+
setItem: () => {
|
|
39
|
+
throw new Error("QuotaExceededError");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
(0, import_vitest.expect)(() => (0, import_safeStorage.setStorageItem)("vxrn-scheme", "dark")).not.toThrow();
|
|
44
|
+
});
|
|
45
|
+
(0, import_vitest.it)("returns null when localStorage is undefined (native)", () => {
|
|
46
|
+
(0, import_vitest.expect)((0, import_safeStorage.getStorageItem)("vxrn-scheme")).toBeNull();
|
|
47
|
+
(0, import_vitest.expect)(() => (0, import_safeStorage.setStorageItem)("vxrn-scheme", "dark")).not.toThrow();
|
|
48
|
+
});
|
|
49
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var import_vitest = require("vitest");
|
|
4
|
+
var import_safeStorage = require("./safeStorage.native.js");
|
|
5
|
+
(0, import_vitest.afterEach)(function () {
|
|
6
|
+
delete globalThis.localStorage;
|
|
7
|
+
});
|
|
8
|
+
function defineLocalStorage(descriptor) {
|
|
9
|
+
Object.defineProperty(globalThis, "localStorage", {
|
|
10
|
+
configurable: true,
|
|
11
|
+
...descriptor
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
(0, import_vitest.describe)("safeStorage", function () {
|
|
15
|
+
(0, import_vitest.it)("reads and writes through to a working localStorage", function () {
|
|
16
|
+
var store = /* @__PURE__ */new Map();
|
|
17
|
+
defineLocalStorage({
|
|
18
|
+
value: {
|
|
19
|
+
getItem: function (k) {
|
|
20
|
+
return store.has(k) ? store.get(k) : null;
|
|
21
|
+
},
|
|
22
|
+
setItem: function (k, v) {
|
|
23
|
+
return void store.set(k, v);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
(0, import_safeStorage.setStorageItem)("vxrn-scheme", "dark");
|
|
28
|
+
(0, import_vitest.expect)((0, import_safeStorage.getStorageItem)("vxrn-scheme")).toBe("dark");
|
|
29
|
+
});
|
|
30
|
+
(0, import_vitest.it)("returns null instead of throwing when the localStorage getter throws", function () {
|
|
31
|
+
defineLocalStorage({
|
|
32
|
+
get() {
|
|
33
|
+
throw new Error('Failed to read the "localStorage" property: Access is denied.');
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
(0, import_vitest.expect)(function () {
|
|
37
|
+
return (0, import_safeStorage.getStorageItem)("vxrn-scheme");
|
|
38
|
+
}).not.toThrow();
|
|
39
|
+
(0, import_vitest.expect)((0, import_safeStorage.getStorageItem)("vxrn-scheme")).toBeNull();
|
|
40
|
+
(0, import_vitest.expect)(function () {
|
|
41
|
+
return (0, import_safeStorage.setStorageItem)("vxrn-scheme", "dark");
|
|
42
|
+
}).not.toThrow();
|
|
43
|
+
});
|
|
44
|
+
(0, import_vitest.it)("swallows errors when setItem throws (quota / blocked)", function () {
|
|
45
|
+
defineLocalStorage({
|
|
46
|
+
value: {
|
|
47
|
+
getItem: function () {
|
|
48
|
+
return null;
|
|
49
|
+
},
|
|
50
|
+
setItem: function () {
|
|
51
|
+
throw new Error("QuotaExceededError");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
(0, import_vitest.expect)(function () {
|
|
56
|
+
return (0, import_safeStorage.setStorageItem)("vxrn-scheme", "dark");
|
|
57
|
+
}).not.toThrow();
|
|
58
|
+
});
|
|
59
|
+
(0, import_vitest.it)("returns null when localStorage is undefined (native)", function () {
|
|
60
|
+
(0, import_vitest.expect)((0, import_safeStorage.getStorageItem)("vxrn-scheme")).toBeNull();
|
|
61
|
+
(0, import_vitest.expect)(function () {
|
|
62
|
+
return (0, import_safeStorage.setStorageItem)("vxrn-scheme", "dark");
|
|
63
|
+
}).not.toThrow();
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=safeStorage.test.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["import_vitest","require","import_safeStorage","afterEach","globalThis","localStorage","defineLocalStorage","descriptor","Object","defineProperty","configurable","describe","it","store","Map","value","getItem","k","has","get","setItem","v","set","setStorageItem","expect","getStorageItem","toBe","Error","not","toThrow","toBeNull"],"sources":["../../src/safeStorage.test.ts"],"sourcesContent":[null],"mappings":"AAAA;;AACA,IAAAA,aAAA,GAAAC,OAA+C;AAAA,IAI/CC,kBAAA,GAAAD,OAAU,0BAAM;AACd,IAAAD,aAAQ,CAAAG,SAAmB;EAC5B,OAAAC,UAAA,CAAAC,YAAA;AAED;AACE,SAAOC,kBAAeA,CAAAC,UAAY;EAAgBC,MAChD,CAAAC,cAAc,CAAAL,UAAA;IACdM,YAAG;IACJ,GAAAH;EACH;AAAA;AAGE,IAAAP,aAAA,CAAAW,QAAG;EACD,IAAAX,aAAc,CAAAY,EAAA,sDAAwB;IACtC,IAAAC,KAAA,kBAAmB,IAAAC,GAAA;IAAAR,kBACV;MAAAS,KACL;QACAC,OAAA,EAAS,SAAAA,CAAYC,CAAc;UACrC,OAAAJ,KAAA,CAAAK,GAAA,CAAAD,CAAA,IAAAJ,KAAA,CAAAM,GAAA,CAAAF,CAAA;QACD;QAEDG,OAAA,WAAAA,CAAAH,CAAA,EAAAI,CAAA;UACA,YAAAR,KAAA,CAAAS,GAAA,CAAAL,CAAA,EAAOI,CAAA;QACR;MAKD;IACE;IAAmB,EACjB,EAAAnB,kBAAM,CAAAqB,cAAA;IACJ,IAAAvB,aAAU,CAAAwB,MAAM,MAAAtB,kBAAA,CAAAuB,cAAA,kBAAAC,IAA+D;EAAA;EACjF,EACF,EAAC1B,aAAA,CAAAY,EAAA;IAEDN,kBAAA;MACAa,IAAA;QACA,UAAAQ,KAAA,gEAA4B;MAC7B;IAED;IACE,IAAA3B,aAAA,CAAAwB,MAAmB;MACjB,OAAO,IAAAtB,kBAAA,CAAAuB,cAAA;IAAA,GAAAG,GACL,CAAAC,OAAS;IAAM,IACf7B,aAAS,CAAAwB,MAAM,MAAAtB,kBAAA,CAAAuB,cAAA,kBAAAK,QAAA;IACb,IAAA9B,aAAU,CAAAwB,MAAM;MAAoB,OACtC,IAAAtB,kBAAA,CAAAqB,cAAA;IAAA,EACF,CAAAK,GAAA,CAAAC,OAAA;EAAA,EACF;EAEA,IAAA7B,aAAA,CAAAY,EAAA,yDAA4B,cAAe;IAC5CN,kBAAA;MAEDS,KAAA;QACEC,OAAA,WAAAA,CAAA;UACA;QACD;QACFI,OAAA,WAAAA,CAAA","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var systemScheme_exports = {};
|
|
24
|
+
__export(systemScheme_exports, {
|
|
25
|
+
getSystemScheme: () => getSystemScheme,
|
|
26
|
+
useSystemScheme: () => useSystemScheme
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(systemScheme_exports);
|
|
29
|
+
var import_use_isomorphic_layout_effect = require("@vxrn/use-isomorphic-layout-effect");
|
|
30
|
+
var import_react = require("react");
|
|
31
|
+
const media = typeof window !== "undefined" && window.matchMedia ? window.matchMedia("(prefers-color-scheme: dark)") : null;
|
|
32
|
+
function getSystemScheme() {
|
|
33
|
+
return media?.matches ? "dark" : "light";
|
|
34
|
+
}
|
|
35
|
+
function useSystemScheme() {
|
|
36
|
+
const [scheme, setScheme] = (0, import_react.useState)("light");
|
|
37
|
+
(0, import_use_isomorphic_layout_effect.useIsomorphicLayoutEffect)(() => {
|
|
38
|
+
setScheme(getSystemScheme());
|
|
39
|
+
const onChange = () => setScheme(getSystemScheme());
|
|
40
|
+
media?.addEventListener("change", onChange);
|
|
41
|
+
return () => media?.removeEventListener("change", onChange);
|
|
42
|
+
}, []);
|
|
43
|
+
return scheme;
|
|
44
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var systemScheme_native_exports = {};
|
|
26
|
+
__export(systemScheme_native_exports, {
|
|
27
|
+
getSystemScheme: () => getSystemScheme,
|
|
28
|
+
useSystemScheme: () => useSystemScheme
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(systemScheme_native_exports);
|
|
31
|
+
var import_react = require("react");
|
|
32
|
+
var import_react_native = require("react-native");
|
|
33
|
+
function toScheme(colorScheme) {
|
|
34
|
+
return colorScheme === "dark" ? "dark" : "light";
|
|
35
|
+
}
|
|
36
|
+
function getSystemScheme() {
|
|
37
|
+
return toScheme(import_react_native.Appearance.getColorScheme());
|
|
38
|
+
}
|
|
39
|
+
function useSystemScheme() {
|
|
40
|
+
var [scheme, setScheme] = (0, import_react.useState)(getSystemScheme);
|
|
41
|
+
(0, import_react.useEffect)(function () {
|
|
42
|
+
var appearanceSubscription = import_react_native.Appearance.addChangeListener(function (param) {
|
|
43
|
+
var {
|
|
44
|
+
colorScheme
|
|
45
|
+
} = param;
|
|
46
|
+
setScheme(toScheme(colorScheme));
|
|
47
|
+
});
|
|
48
|
+
var handleAppStateChange = function (nextAppState) {
|
|
49
|
+
if (nextAppState === "active") {
|
|
50
|
+
var currentScheme = getSystemScheme();
|
|
51
|
+
setScheme(function (prev) {
|
|
52
|
+
return prev !== currentScheme ? currentScheme : prev;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var appStateSubscription = import_react_native.AppState.addEventListener("change", handleAppStateChange);
|
|
57
|
+
return function () {
|
|
58
|
+
appearanceSubscription.remove();
|
|
59
|
+
appStateSubscription.remove();
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
return scheme;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=systemScheme.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["systemScheme_native_exports","__export","getSystemScheme","useSystemScheme","module","exports","__toCommonJS","import_react","require","import_react_native","toScheme","colorScheme","Appearance","getColorScheme","scheme","setScheme","useState","useEffect","appearanceSubscription","addChangeListener","param","handleAppStateChange","nextAppState","currentScheme","prev","appStateSubscription","AppState","addEventListener","remove"],"sources":["../../src/systemScheme.native.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,2BAAA;AAAAC,QAAA,CAAAD,2BAAA;EAAAE,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAC,YAAA,CAAAN,2BAAA;AAAA,IAAAO,YAAA,GAAoCC,OAAA;AACpC,IAAAC,mBAAA,GAAqCD,OAAA;AACrC,SAASE,SAASC,WAAA,EAAa;EAC3B,OAAOA,WAAA,KAAgB,SAAS,SAAS;AAC7C;AACO,SAAST,gBAAA,EAAkB;EAC9B,OAAOQ,QAAA,CAASD,mBAAA,CAAAG,UAAA,CAAWC,cAAA,CAAe,CAAC;AAC/C;AACO,SAASV,gBAAA,EAAkB;EAC9B,IAAI,CAACW,MAAA,EAAQC,SAAS,QAAIR,YAAA,CAAAS,QAAA,EAASd,eAAe;EAClD,IAAAK,YAAA,CAAAU,SAAA,EAAU,YAAW;IAEjB,IAAIC,sBAAA,GAAyBT,mBAAA,CAAAG,UAAA,CAAWO,iBAAA,CAAkB,UAASC,KAAA,EAAO;MACtE,IAAI;QAAET;MAAY,IAAIS,KAAA;MACtBL,SAAA,CAAUL,QAAA,CAASC,WAAW,CAAC;IACnC,CAAC;IAGD,IAAIU,oBAAA,GAAuB,SAAAA,CAASC,YAAA,EAAc;MAC9C,IAAIA,YAAA,KAAiB,UAAU;QAC3B,IAAIC,aAAA,GAAgBrB,eAAA,CAAgB;QACpCa,SAAA,CAAU,UAASS,IAAA,EAAM;UACrB,OAAOA,IAAA,KAASD,aAAA,GAAgBA,aAAA,GAAgBC,IAAA;QACpD,CAAC;MACL;IACJ;IACA,IAAIC,oBAAA,GAAuBhB,mBAAA,CAAAiB,QAAA,CAASC,gBAAA,CAAiB,UAAUN,oBAAoB;IACnF,OAAO,YAAW;MACdH,sBAAA,CAAuBU,MAAA,CAAO;MAC9BH,oBAAA,CAAqBG,MAAA,CAAO;IAChC;EACJ,GAAG,EAAE;EACL,OAAOd,MAAA;AACX","ignoreList":[]}
|