@duxweb/dvha-pro 0.0.5
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/app.cjs +1 -0
- package/dist/cjs/component.cjs +1 -0
- package/dist/cjs/components/card/card.cjs +1 -0
- package/dist/cjs/components/carousel/carousel.cjs +1 -0
- package/dist/cjs/components/dashboard/hello.cjs +1 -0
- package/dist/cjs/components/dashboard/helloBig.cjs +1 -0
- package/dist/cjs/components/dashboard/quick.cjs +1 -0
- package/dist/cjs/components/dialog/dialog.cjs +1 -0
- package/dist/cjs/components/draw/drawApps.cjs +1 -0
- package/dist/cjs/components/draw/drawAuth.cjs +1 -0
- package/dist/cjs/components/draw/drawEmpty.cjs +1 -0
- package/dist/cjs/components/draw/drawEmptyForm.cjs +1 -0
- package/dist/cjs/components/draw/drawError.cjs +1 -0
- package/dist/cjs/components/drawer/drawer.cjs +1 -0
- package/dist/cjs/components/drawer/drawerPage.cjs +1 -0
- package/dist/cjs/components/form/formItem.cjs +1 -0
- package/dist/cjs/components/form/formLayout.cjs +1 -0
- package/dist/cjs/components/form/modalForm.cjs +1 -0
- package/dist/cjs/components/form/pageForm.cjs +1 -0
- package/dist/cjs/components/form/settingForm.cjs +1 -0
- package/dist/cjs/components/layout/filter.cjs +1 -0
- package/dist/cjs/components/layout/list.cjs +1 -0
- package/dist/cjs/components/layout/table.cjs +1 -0
- package/dist/cjs/components/layout/tools.cjs +1 -0
- package/dist/cjs/components/list/card.cjs +1 -0
- package/dist/cjs/components/list/list.cjs +1 -0
- package/dist/cjs/components/media/media.cjs +1 -0
- package/dist/cjs/components/modal/modal.cjs +1 -0
- package/dist/cjs/components/modal/modalPage.cjs +1 -0
- package/dist/cjs/components/modal/modalTab.cjs +1 -0
- package/dist/cjs/components/panel/alert.cjs +1 -0
- package/dist/cjs/components/panel/setting.cjs +1 -0
- package/dist/cjs/components/status/blockEmpty.cjs +1 -0
- package/dist/cjs/components/table/tablePage.cjs +1 -0
- package/dist/cjs/components/widget/connect.cjs +1 -0
- package/dist/cjs/config/uno.cjs +1 -0
- package/dist/cjs/config/validate.cjs +1 -0
- package/dist/cjs/dvha-pro.css +1 -0
- package/dist/cjs/hooks/action.cjs +1 -0
- package/dist/cjs/hooks/dialog.cjs +1 -0
- package/dist/cjs/hooks/drawer.cjs +1 -0
- package/dist/cjs/hooks/modal.cjs +1 -0
- package/dist/cjs/hooks/table/column.cjs +1 -0
- package/dist/cjs/hooks/table/copy.cjs +1 -0
- package/dist/cjs/hooks/table/hidden.cjs +1 -0
- package/dist/cjs/hooks/table/image.cjs +1 -0
- package/dist/cjs/hooks/table/input.cjs +1 -0
- package/dist/cjs/hooks/table/map.cjs +1 -0
- package/dist/cjs/hooks/table/media.cjs +1 -0
- package/dist/cjs/hooks/table/status.cjs +1 -0
- package/dist/cjs/hooks/table/switch.cjs +1 -0
- package/dist/cjs/hooks/table.cjs +1 -0
- package/dist/cjs/hooks/ui.cjs +1 -0
- package/dist/cjs/index.cjs +1 -0
- package/dist/cjs/langs/en-US.json.cjs +1 -0
- package/dist/cjs/langs/zh-CN.json.cjs +1 -0
- package/dist/cjs/main.cjs +1 -0
- package/dist/cjs/node_modules/@iconify-json/tabler/icons.json.cjs +1 -0
- package/dist/cjs/node_modules/@overlastic/core/dist/index.cjs +1 -0
- package/dist/cjs/node_modules/@overlastic/vue/dist/index.cjs +1 -0
- package/dist/cjs/node_modules/@vee-validate/i18n/dist/locale/en.json.cjs +1 -0
- package/dist/cjs/node_modules/@vee-validate/i18n/dist/locale/zh_CN.json.cjs +1 -0
- package/dist/cjs/node_modules/@vueuse/integrations/useFocusTrap.cjs +1 -0
- package/dist/cjs/node_modules/@vueuse/shared/index.cjs +1 -0
- package/dist/cjs/node_modules/colorizr/dist/index.cjs +1 -0
- package/dist/cjs/node_modules/focus-trap/dist/focus-trap.esm.cjs +5 -0
- package/dist/cjs/node_modules/lower-case/dist.es2015/index.cjs +1 -0
- package/dist/cjs/node_modules/no-case/dist.es2015/index.cjs +1 -0
- package/dist/cjs/node_modules/pascal-case/dist.es2015/index.cjs +1 -0
- package/dist/cjs/node_modules/tabbable/dist/index.esm.cjs +4 -0
- package/dist/cjs/node_modules/tslib/tslib.es6.cjs +1 -0
- package/dist/cjs/pages/authLayout.cjs +1 -0
- package/dist/cjs/pages/layout/global.cjs +1 -0
- package/dist/cjs/pages/layout/page.cjs +1 -0
- package/dist/cjs/pages/layout/tab.cjs +1 -0
- package/dist/cjs/pages/layout.cjs +1 -0
- package/dist/cjs/pages/loading.cjs +1 -0
- package/dist/cjs/pages/login.cjs +1 -0
- package/dist/cjs/pages/menu/avatar.cjs +1 -0
- package/dist/cjs/pages/menu/button.cjs +1 -0
- package/dist/cjs/pages/menu/cmd.cjs +1 -0
- package/dist/cjs/pages/menu/main.cjs +1 -0
- package/dist/cjs/pages/menu/mobile.cjs +1 -0
- package/dist/cjs/pages/page.cjs +1 -0
- package/dist/cjs/pages/page403.cjs +1 -0
- package/dist/cjs/pages/page404.cjs +1 -0
- package/dist/cjs/pages/page500.cjs +1 -0
- package/dist/cjs/pages/pageEmpty.cjs +1 -0
- package/dist/cjs/pages/pageLoading.cjs +1 -0
- package/dist/cjs/pages/pageStatus.cjs +1 -0
- package/dist/cjs/static/images/placeholder.png.cjs +1 -0
- package/dist/cjs/stores/ui.cjs +1 -0
- package/dist/cjs/theme/naiveTheme.cjs +1 -0
- package/dist/cjs/theme/presetTheme.cjs +1 -0
- package/dist/cjs/theme/uno.css.cjs +1285 -0
- package/dist/esm/app.js +20 -0
- package/dist/esm/component.js +59 -0
- package/dist/esm/components/card/card.js +114 -0
- package/dist/esm/components/carousel/carousel.js +37 -0
- package/dist/esm/components/dashboard/hello.js +40 -0
- package/dist/esm/components/dashboard/helloBig.js +344 -0
- package/dist/esm/components/dashboard/quick.js +59 -0
- package/dist/esm/components/dialog/dialog.js +118 -0
- package/dist/esm/components/draw/drawApps.js +145 -0
- package/dist/esm/components/draw/drawAuth.js +50 -0
- package/dist/esm/components/draw/drawEmpty.js +92 -0
- package/dist/esm/components/draw/drawEmptyForm.js +128 -0
- package/dist/esm/components/draw/drawError.js +242 -0
- package/dist/esm/components/drawer/drawer.js +73 -0
- package/dist/esm/components/drawer/drawerPage.js +28 -0
- package/dist/esm/components/form/formItem.js +77 -0
- package/dist/esm/components/form/formLayout.js +38 -0
- package/dist/esm/components/form/modalForm.js +108 -0
- package/dist/esm/components/form/pageForm.js +94 -0
- package/dist/esm/components/form/settingForm.js +104 -0
- package/dist/esm/components/layout/filter.js +27 -0
- package/dist/esm/components/layout/list.js +333 -0
- package/dist/esm/components/layout/table.js +292 -0
- package/dist/esm/components/layout/tools.js +78 -0
- package/dist/esm/components/list/card.js +78 -0
- package/dist/esm/components/list/list.js +38 -0
- package/dist/esm/components/media/media.js +77 -0
- package/dist/esm/components/modal/modal.js +116 -0
- package/dist/esm/components/modal/modalPage.js +56 -0
- package/dist/esm/components/modal/modalTab.js +70 -0
- package/dist/esm/components/panel/alert.js +57 -0
- package/dist/esm/components/panel/setting.js +49 -0
- package/dist/esm/components/status/blockEmpty.js +78 -0
- package/dist/esm/components/table/tablePage.js +41 -0
- package/dist/esm/components/widget/connect.js +119 -0
- package/dist/esm/config/uno.js +32 -0
- package/dist/esm/config/validate.js +15 -0
- package/dist/esm/dvha-pro.css +1 -0
- package/dist/esm/hooks/action.js +213 -0
- package/dist/esm/hooks/dialog.js +32 -0
- package/dist/esm/hooks/drawer.js +25 -0
- package/dist/esm/hooks/modal.js +14 -0
- package/dist/esm/hooks/table/column.js +31 -0
- package/dist/esm/hooks/table/copy.js +27 -0
- package/dist/esm/hooks/table/hidden.js +48 -0
- package/dist/esm/hooks/table/image.js +24 -0
- package/dist/esm/hooks/table/input.js +81 -0
- package/dist/esm/hooks/table/map.js +21 -0
- package/dist/esm/hooks/table/media.js +34 -0
- package/dist/esm/hooks/table/status.js +32 -0
- package/dist/esm/hooks/table/switch.js +33 -0
- package/dist/esm/hooks/table.js +74 -0
- package/dist/esm/hooks/ui.js +16 -0
- package/dist/esm/index.js +139 -0
- package/dist/esm/langs/en-US.json.js +11 -0
- package/dist/esm/langs/zh-CN.json.js +11 -0
- package/dist/esm/main.js +18 -0
- package/dist/esm/node_modules/@iconify-json/tabler/icons.json.js +17 -0
- package/dist/esm/node_modules/@overlastic/core/dist/index.js +76 -0
- package/dist/esm/node_modules/@overlastic/vue/dist/index.js +122 -0
- package/dist/esm/node_modules/@vee-validate/i18n/dist/locale/en.json.js +9 -0
- package/dist/esm/node_modules/@vee-validate/i18n/dist/locale/zh_CN.json.js +9 -0
- package/dist/esm/node_modules/@vueuse/integrations/useFocusTrap.js +43 -0
- package/dist/esm/node_modules/@vueuse/shared/index.js +6 -0
- package/dist/esm/node_modules/colorizr/dist/index.js +318 -0
- package/dist/esm/node_modules/focus-trap/dist/focus-trap.esm.js +473 -0
- package/dist/esm/node_modules/lower-case/dist.es2015/index.js +6 -0
- package/dist/esm/node_modules/no-case/dist.es2015/index.js +18 -0
- package/dist/esm/node_modules/pascal-case/dist.es2015/index.js +13 -0
- package/dist/esm/node_modules/tabbable/dist/index.esm.js +202 -0
- package/dist/esm/node_modules/tslib/tslib.es6.js +12 -0
- package/dist/esm/pages/authLayout.js +38 -0
- package/dist/esm/pages/layout/global.js +51 -0
- package/dist/esm/pages/layout/page.js +54 -0
- package/dist/esm/pages/layout/tab.js +110 -0
- package/dist/esm/pages/layout.js +14 -0
- package/dist/esm/pages/loading.js +14 -0
- package/dist/esm/pages/login.js +143 -0
- package/dist/esm/pages/menu/avatar.js +205 -0
- package/dist/esm/pages/menu/button.js +60 -0
- package/dist/esm/pages/menu/cmd.js +156 -0
- package/dist/esm/pages/menu/main.js +101 -0
- package/dist/esm/pages/menu/mobile.js +38 -0
- package/dist/esm/pages/page.js +47 -0
- package/dist/esm/pages/page403.js +46 -0
- package/dist/esm/pages/page404.js +57 -0
- package/dist/esm/pages/page500.js +45 -0
- package/dist/esm/pages/pageEmpty.js +25 -0
- package/dist/esm/pages/pageLoading.js +22 -0
- package/dist/esm/pages/pageStatus.js +50 -0
- package/dist/esm/static/images/placeholder.png.js +4 -0
- package/dist/esm/stores/ui.js +34 -0
- package/dist/esm/theme/naiveTheme.js +97 -0
- package/dist/esm/theme/presetTheme.js +12 -0
- package/dist/esm/theme/uno.css.js +1288 -0
- package/dist/types/app.d.ts +1 -0
- package/dist/types/component.d.ts +5 -0
- package/dist/types/components/card/card.d.ts +140 -0
- package/dist/types/components/card/index.d.ts +1 -0
- package/dist/types/components/carousel/carousel.d.ts +20 -0
- package/dist/types/components/carousel/index.d.ts +1 -0
- package/dist/types/components/dashboard/hello.d.ts +16 -0
- package/dist/types/components/dashboard/helloBig.d.ts +19 -0
- package/dist/types/components/dashboard/index.d.ts +3 -0
- package/dist/types/components/dashboard/quick.d.ts +33 -0
- package/dist/types/components/dialog/dialog.d.ts +35 -0
- package/dist/types/components/dialog/index.d.ts +1 -0
- package/dist/types/components/draw/drawApps.d.ts +1 -0
- package/dist/types/components/draw/drawAuth.d.ts +1 -0
- package/dist/types/components/draw/drawEmpty.d.ts +1 -0
- package/dist/types/components/draw/drawEmptyForm.d.ts +1 -0
- package/dist/types/components/draw/drawError.d.ts +1 -0
- package/dist/types/components/draw/index.d.ts +5 -0
- package/dist/types/components/drawer/drawer.d.ts +19 -0
- package/dist/types/components/drawer/drawerPage.d.ts +1 -0
- package/dist/types/components/drawer/index.d.ts +2 -0
- package/dist/types/components/form/formItem.d.ts +27 -0
- package/dist/types/components/form/formLayout.d.ts +38 -0
- package/dist/types/components/form/index.d.ts +5 -0
- package/dist/types/components/form/modalForm.d.ts +89 -0
- package/dist/types/components/form/pageForm.d.ts +51 -0
- package/dist/types/components/form/settingForm.d.ts +69 -0
- package/dist/types/components/index.d.ts +14 -0
- package/dist/types/components/layout/filter.d.ts +13 -0
- package/dist/types/components/layout/index.d.ts +4 -0
- package/dist/types/components/layout/list.d.ts +85 -0
- package/dist/types/components/layout/table.d.ts +72 -0
- package/dist/types/components/layout/tools.d.ts +37 -0
- package/dist/types/components/list/card.d.ts +117 -0
- package/dist/types/components/list/index.d.ts +2 -0
- package/dist/types/components/list/list.d.ts +87 -0
- package/dist/types/components/media/index.d.ts +1 -0
- package/dist/types/components/media/media.d.ts +95 -0
- package/dist/types/components/modal/index.d.ts +3 -0
- package/dist/types/components/modal/modal.d.ts +66 -0
- package/dist/types/components/modal/modalPage.d.ts +42 -0
- package/dist/types/components/modal/modalTab.d.ts +42 -0
- package/dist/types/components/panel/alert.d.ts +32 -0
- package/dist/types/components/panel/index.d.ts +2 -0
- package/dist/types/components/panel/setting.d.ts +29 -0
- package/dist/types/components/status/blockEmpty.d.ts +25 -0
- package/dist/types/components/status/index.d.ts +1 -0
- package/dist/types/components/table/index.d.ts +1 -0
- package/dist/types/components/table/tablePage.d.ts +73 -0
- package/dist/types/components/widget/connect.d.ts +11 -0
- package/dist/types/components/widget/index.d.ts +1 -0
- package/dist/types/config/index.d.ts +2 -0
- package/dist/types/config/uno.d.ts +2 -0
- package/dist/types/config/validate.d.ts +1 -0
- package/dist/types/hooks/action.d.ts +17 -0
- package/dist/types/hooks/dialog.d.ts +17 -0
- package/dist/types/hooks/drawer.d.ts +11 -0
- package/dist/types/hooks/index.d.ts +6 -0
- package/dist/types/hooks/modal.d.ts +9 -0
- package/dist/types/hooks/table/column.d.ts +14 -0
- package/dist/types/hooks/table/copy.d.ts +6 -0
- package/dist/types/hooks/table/hidden.d.ts +7 -0
- package/dist/types/hooks/table/image.d.ts +8 -0
- package/dist/types/hooks/table/index.d.ts +7 -0
- package/dist/types/hooks/table/input.d.ts +9 -0
- package/dist/types/hooks/table/map.d.ts +13 -0
- package/dist/types/hooks/table/media.d.ts +12 -0
- package/dist/types/hooks/table/status.d.ts +12 -0
- package/dist/types/hooks/table/switch.d.ts +7 -0
- package/dist/types/hooks/table/types.d.ts +74 -0
- package/dist/types/hooks/table.d.ts +2 -0
- package/dist/types/hooks/ui.d.ts +8 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/langs/index.d.ts +3 -0
- package/dist/types/main.d.ts +5 -0
- package/dist/types/pages/authLayout.d.ts +1 -0
- package/dist/types/pages/index.d.ts +12 -0
- package/dist/types/pages/layout/global.d.ts +1 -0
- package/dist/types/pages/layout/index.d.ts +3 -0
- package/dist/types/pages/layout/page.d.ts +1 -0
- package/dist/types/pages/layout/tab.d.ts +1 -0
- package/dist/types/pages/layout.d.ts +1 -0
- package/dist/types/pages/loading.d.ts +1 -0
- package/dist/types/pages/login.d.ts +1 -0
- package/dist/types/pages/menu/avatar.d.ts +14 -0
- package/dist/types/pages/menu/button.d.ts +41 -0
- package/dist/types/pages/menu/cmd.d.ts +7 -0
- package/dist/types/pages/menu/index.d.ts +4 -0
- package/dist/types/pages/menu/main.d.ts +13 -0
- package/dist/types/pages/menu/mobile.d.ts +1 -0
- package/dist/types/pages/page.d.ts +42 -0
- package/dist/types/pages/page403.d.ts +1 -0
- package/dist/types/pages/page404.d.ts +1 -0
- package/dist/types/pages/page500.d.ts +1 -0
- package/dist/types/pages/pageEmpty.d.ts +7 -0
- package/dist/types/pages/pageLoading.d.ts +1 -0
- package/dist/types/pages/pageStatus.d.ts +7 -0
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/ui.d.ts +28 -0
- package/dist/types/theme/index.d.ts +2 -0
- package/dist/types/theme/naiveTheme.d.ts +5 -0
- package/dist/types/theme/presetTheme.d.ts +7 -0
- package/package.json +73 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var p = "unified-overlay";
|
|
2
|
+
function b(e = "", n = document.body) {
|
|
3
|
+
const t = document.createElement("div");
|
|
4
|
+
return e && (t.id = e), n !== !1 && n.appendChild(t), t;
|
|
5
|
+
}
|
|
6
|
+
var i = {
|
|
7
|
+
position: null,
|
|
8
|
+
spaces: {}
|
|
9
|
+
};
|
|
10
|
+
function h(e = p, n = !0) {
|
|
11
|
+
return i.spaces[e] || (i.spaces[e] = 0), n ? `${e}--${++i.spaces[e]}` : e;
|
|
12
|
+
}
|
|
13
|
+
function C(e = p) {
|
|
14
|
+
return i.spaces[e] || 0;
|
|
15
|
+
}
|
|
16
|
+
function E() {
|
|
17
|
+
let e, n;
|
|
18
|
+
const t = new Promise((r, s) => {
|
|
19
|
+
e = r, n = s;
|
|
20
|
+
});
|
|
21
|
+
return t.resolve = (r) => (e(r), t), t.reject = n, t;
|
|
22
|
+
}
|
|
23
|
+
function P() {
|
|
24
|
+
typeof window > "u" && typeof document > "u" || document.addEventListener("click", (e) => {
|
|
25
|
+
if (e.target instanceof Element) {
|
|
26
|
+
const { left: n, top: t, width: r, height: s } = e.target.getBoundingClientRect();
|
|
27
|
+
n > 0 || t > 0 ? i.position = { x: n + r / 2, y: t + s / 2 } : i.position = null;
|
|
28
|
+
} else
|
|
29
|
+
i.position = null;
|
|
30
|
+
setTimeout(() => i.position = null, 64);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function j(e, n = {}) {
|
|
34
|
+
const { container: t } = n;
|
|
35
|
+
function r(d, a) {
|
|
36
|
+
function f(c, o) {
|
|
37
|
+
const u = E(), m = h(o.id, o.autoIncrement), g = C(o.id), w = t ? o.root : document.body, x = b(m, w);
|
|
38
|
+
return e(d, c, Object.assign(o, {
|
|
39
|
+
position: i.position,
|
|
40
|
+
id: m,
|
|
41
|
+
deferred: u,
|
|
42
|
+
index: g,
|
|
43
|
+
container: x
|
|
44
|
+
})), u;
|
|
45
|
+
}
|
|
46
|
+
let l;
|
|
47
|
+
function y(c, o) {
|
|
48
|
+
return l || (l = f(c, o), l.finally(() => l = void 0)), l;
|
|
49
|
+
}
|
|
50
|
+
function v(c, o) {
|
|
51
|
+
const u = { ...a, ...o };
|
|
52
|
+
return u.only ? y(c, u) : f(c, u);
|
|
53
|
+
}
|
|
54
|
+
return v;
|
|
55
|
+
}
|
|
56
|
+
function s(d, a, f) {
|
|
57
|
+
return r(d, f)(a);
|
|
58
|
+
}
|
|
59
|
+
return { define: r, render: s };
|
|
60
|
+
}
|
|
61
|
+
P();
|
|
62
|
+
function I() {
|
|
63
|
+
}
|
|
64
|
+
function k(e) {
|
|
65
|
+
return new Promise((n) => setTimeout(n, e));
|
|
66
|
+
}
|
|
67
|
+
export {
|
|
68
|
+
p as UnifiedOverlayProviderID,
|
|
69
|
+
j as createConstructor,
|
|
70
|
+
E as createDeferred,
|
|
71
|
+
b as defineGlobalElement,
|
|
72
|
+
h as defineName,
|
|
73
|
+
k as delay,
|
|
74
|
+
C as getIndex,
|
|
75
|
+
I as noop
|
|
76
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { defineComponent as f, h as u, ref as p, provide as m, Fragment as g, markRaw as x, inject as h, onMounted as I, getCurrentInstance as O, createApp as P } from "vue";
|
|
2
|
+
import { useVModel as C } from "@vueuse/core";
|
|
3
|
+
import { createConstructor as y, noop as S, delay as w } from "../../core/dist/index.js";
|
|
4
|
+
import { pascalCase as j } from "../../../pascal-case/dist.es2015/index.js";
|
|
5
|
+
var E = {
|
|
6
|
+
appContext: null
|
|
7
|
+
}, d = Symbol("OverlayScripts"), _ = Symbol("OverlayInstances");
|
|
8
|
+
function D(e = {}) {
|
|
9
|
+
const { duration: t = 0, immediate: n = !0, model: o = "visible", automatic: i = !0 } = e, r = h(d, k(o, e)), s = Reflect.get(r, "in_dec"), { visible: c, deferred: a, vanish: l } = r;
|
|
10
|
+
async function v() {
|
|
11
|
+
return c.value = !1, await w(t), l == null || l(), Promise.resolve();
|
|
12
|
+
}
|
|
13
|
+
return !s && i && (a == null || a.then(v).catch(v)), !s && n && I(() => c.value = !0), m(d, null), r;
|
|
14
|
+
}
|
|
15
|
+
function k(e, t = {}) {
|
|
16
|
+
const { reject: n = "reject", resolve: o = "resolve" } = t.events || {}, i = O();
|
|
17
|
+
if (!i)
|
|
18
|
+
throw new Error("Please use useExtendOverlay in component setup");
|
|
19
|
+
const r = C(i.props, e, i.emit, { passive: !0 });
|
|
20
|
+
return {
|
|
21
|
+
reject: (a) => {
|
|
22
|
+
i == null || i.emit(n, a), r.value = !1;
|
|
23
|
+
},
|
|
24
|
+
resolve: (a) => {
|
|
25
|
+
i == null || i.emit(o, a), r.value = !1;
|
|
26
|
+
},
|
|
27
|
+
vanish: S,
|
|
28
|
+
visible: r,
|
|
29
|
+
in_dec: !0
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function b(e) {
|
|
33
|
+
const { reject: t } = e.deferred || {}, { vanish: n } = e, o = p(!1);
|
|
34
|
+
function i() {
|
|
35
|
+
n == null || n(), t == null || t();
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
resolve: e.deferred.resolve,
|
|
39
|
+
reject: e.deferred.reject,
|
|
40
|
+
deferred: e.deferred,
|
|
41
|
+
visible: o,
|
|
42
|
+
vanish: i
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
var { define: F } = y((e, t, n) => {
|
|
46
|
+
const { id: o, deferred: i, render: r, vanish: s } = n, c = f({
|
|
47
|
+
name: j(o),
|
|
48
|
+
setup: () => {
|
|
49
|
+
const l = b({ vanish: a, deferred: i });
|
|
50
|
+
m(d, l);
|
|
51
|
+
},
|
|
52
|
+
render: () => u(e, t)
|
|
53
|
+
});
|
|
54
|
+
function a() {
|
|
55
|
+
s(c);
|
|
56
|
+
}
|
|
57
|
+
r(c, t);
|
|
58
|
+
}, { container: !1 });
|
|
59
|
+
function N(e) {
|
|
60
|
+
const { render: t, vanish: n } = h(_);
|
|
61
|
+
return F(e, { render: t, vanish: n });
|
|
62
|
+
}
|
|
63
|
+
function K(e, t) {
|
|
64
|
+
var n;
|
|
65
|
+
const o = (t == null ? void 0 : t.app) || ((n = E.appContext) == null ? void 0 : n.app);
|
|
66
|
+
o && (e.config.globalProperties = o.config.globalProperties, Object.assign(e._context, o._context));
|
|
67
|
+
}
|
|
68
|
+
y((e, t, n) => {
|
|
69
|
+
const { container: o, id: i, deferred: r, appContext: s } = n;
|
|
70
|
+
function c() {
|
|
71
|
+
l.unmount(), o.remove();
|
|
72
|
+
}
|
|
73
|
+
const a = f({
|
|
74
|
+
name: j(i),
|
|
75
|
+
setup: () => {
|
|
76
|
+
const v = b({
|
|
77
|
+
vanish: c,
|
|
78
|
+
deferred: r
|
|
79
|
+
});
|
|
80
|
+
m(d, v);
|
|
81
|
+
},
|
|
82
|
+
render: () => u(e, t)
|
|
83
|
+
}), l = P(a);
|
|
84
|
+
return K(l, s), l.mount(o), c;
|
|
85
|
+
});
|
|
86
|
+
f({
|
|
87
|
+
name: "Field",
|
|
88
|
+
props: {
|
|
89
|
+
is: {
|
|
90
|
+
type: [String, Number, Object],
|
|
91
|
+
default: ""
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
setup(e) {
|
|
95
|
+
return () => typeof e.is == "string" || typeof e.is == "number" ? e.is : e.is ? u(e.is) : null;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
var V = f({
|
|
99
|
+
setup(e, { slots: t }) {
|
|
100
|
+
const n = p([]);
|
|
101
|
+
function o(r, s) {
|
|
102
|
+
console.log({ Instance: r, props: s }), n.value.push({ Instance: x(r), props: s });
|
|
103
|
+
}
|
|
104
|
+
function i(r) {
|
|
105
|
+
n.value = n.value.filter(({ Instance: s }) => s !== r);
|
|
106
|
+
}
|
|
107
|
+
return m(_, { render: o, vanish: i }), () => {
|
|
108
|
+
var r;
|
|
109
|
+
return u(g, [
|
|
110
|
+
...n.value.map(
|
|
111
|
+
({ Instance: s, props: c }, a) => u(s, { ...c, key: a })
|
|
112
|
+
),
|
|
113
|
+
(r = t.default) == null ? void 0 : r.call(t)
|
|
114
|
+
]);
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
export {
|
|
119
|
+
V as OverlaysProvider,
|
|
120
|
+
D as useExtendOverlay,
|
|
121
|
+
N as useOverlayInject
|
|
122
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const e = "en", i = { _default: "The {field} is not valid", alpha: "The {field} field may only contain alphabetic characters", alpha_num: "The {field} field may only contain alpha-numeric characters", alpha_dash: "The {field} field may contain alpha-numeric characters as well as dashes and underscores", alpha_spaces: "The {field} field may only contain alphabetic characters as well as spaces", between: "The {field} field must be between 0:{min} and 1:{max}", confirmed: "The {field} field confirmation does not match", digits: "The {field} field must be numeric and exactly contain 0:{length} digits", dimensions: "The {field} field must be 0:{width} pixels by 1:{height} pixels", email: "The {field} field must be a valid email", not_one_of: "The {field} field is not a valid value", ext: "The {field} field is not a valid file", image: "The {field} field must be an image", integer: "The {field} field must be an integer", length: "The {field} field must be 0:{length} long", max_value: "The {field} field must be 0:{max} or less", max: "The {field} field may not be greater than 0:{length} characters", mimes: "The {field} field must have a valid file type", min_value: "The {field} field must be 0:{min} or more", min: "The {field} field must be at least 0:{length} characters", numeric: "The {field} field may only contain numeric characters", one_of: "The {field} field is not a valid value", regex: "The {field} field format is invalid", required_if: "The {field} field is required", required: "The {field} field is required", size: "The {field} field size must be less than 0:{size}KB", url: "The {field} field is not a valid URL" }, l = {
|
|
2
|
+
code: e,
|
|
3
|
+
messages: i
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
e as code,
|
|
7
|
+
l as default,
|
|
8
|
+
i as messages
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const e = "zh_CN", i = { _default: "{field}不是一个有效值", alpha: "{field}只能包含字母字符", alpha_dash: "{field}能够包含字母数字字符、破折号和下划线", alpha_num: "{field}只能包含字母数字字符", alpha_spaces: "{field}只能包含字母字符和空格", between: "{field}必须在0:{min}与1:{max}之间", confirmed: "{field}不能和0:{target}匹配", digits: "{field}必须是数字,且精确到0:{length}位数", dimensions: "{field}必须在0:{width}像素与1:{height}像素之间", email: "{field}不是一个有效的邮箱", not_one_of: "{field}不是一个有效值", ext: "{field}不是一个有效的文件", image: "{field}不是一张有效的图片", one_of: "{field}不是一个有效值", integer: "{field}必须是整数", length: "{field}长度必须为0:{length}", max: "{field}不能超过0:{length}个字符", max_value: "{field}必须小于或等于0:{max}", mimes: "{field}不是一个有效的文件类型", min: "{field}必须至少有0:{length}个字符", min_value: "{field}必须大于或等于0:{min}", numeric: "{field}只能包含数字字符", regex: "{field}格式无效", required: "{field}是必须的", required_if: "{field}是必须的", size: "{field}必须小于0:{size}KB", url: "{field}不是一个有效的URL" }, l = {
|
|
2
|
+
code: e,
|
|
3
|
+
messages: i
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
e as code,
|
|
7
|
+
l as default,
|
|
8
|
+
i as messages
|
|
9
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { toArray as g, unrefElement as A, tryOnScopeDispose as D } from "@vueuse/core";
|
|
2
|
+
import { notNullish as y } from "../shared/index.js";
|
|
3
|
+
import { createFocusTrap as F } from "../../focus-trap/dist/focus-trap.esm.js";
|
|
4
|
+
import { shallowRef as n, computed as T, toValue as i, watch as w } from "vue";
|
|
5
|
+
function N(f, a = {}) {
|
|
6
|
+
let t;
|
|
7
|
+
const { immediate: l, ...p } = a, o = n(!1), r = n(!1), c = (e) => t && t.activate(e), u = (e) => t && t.deactivate(e), v = () => {
|
|
8
|
+
t && (t.pause(), r.value = !0);
|
|
9
|
+
}, m = () => {
|
|
10
|
+
t && (t.unpause(), r.value = !1);
|
|
11
|
+
}, h = T(() => {
|
|
12
|
+
const e = i(f);
|
|
13
|
+
return g(e).map((d) => {
|
|
14
|
+
const s = i(d);
|
|
15
|
+
return typeof s == "string" ? s : A(s);
|
|
16
|
+
}).filter(y);
|
|
17
|
+
});
|
|
18
|
+
return w(
|
|
19
|
+
h,
|
|
20
|
+
(e) => {
|
|
21
|
+
e.length && (t = F(e, {
|
|
22
|
+
...p,
|
|
23
|
+
onActivate() {
|
|
24
|
+
o.value = !0, a.onActivate && a.onActivate();
|
|
25
|
+
},
|
|
26
|
+
onDeactivate() {
|
|
27
|
+
o.value = !1, a.onDeactivate && a.onDeactivate();
|
|
28
|
+
}
|
|
29
|
+
}), l && c());
|
|
30
|
+
},
|
|
31
|
+
{ flush: "post" }
|
|
32
|
+
), D(() => u()), {
|
|
33
|
+
hasFocus: o,
|
|
34
|
+
isPaused: r,
|
|
35
|
+
activate: c,
|
|
36
|
+
deactivate: u,
|
|
37
|
+
pause: v,
|
|
38
|
+
unpause: m
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
N as useFocusTrap
|
|
43
|
+
};
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
var V = Object.defineProperty, z = (r, t) => {
|
|
2
|
+
for (var n in t)
|
|
3
|
+
V(r, n, { get: t[n], enumerable: !0 });
|
|
4
|
+
}, k = {
|
|
5
|
+
hsl: ["h", "s", "l"],
|
|
6
|
+
oklab: ["l", "a", "b"],
|
|
7
|
+
oklch: ["l", "c", "h"],
|
|
8
|
+
rgb: ["r", "g", "b"]
|
|
9
|
+
}, K = ["hsl", "oklab", "oklch", "rgb"], q = Math.PI / 180, M = {
|
|
10
|
+
l: [0.3963377773761749, 0.2158037573099136],
|
|
11
|
+
m: [-0.1055613458156586, -0.0638541728258133],
|
|
12
|
+
s: [-0.0894841775298119, -1.2914855480194092]
|
|
13
|
+
}, f = {
|
|
14
|
+
l: [0.4122214708, 0.5363325363, 0.0514459929],
|
|
15
|
+
m: [0.2119034982, 0.6806995451, 0.1073969566],
|
|
16
|
+
s: [0.0883024619, 0.2817188376, 0.6299787005]
|
|
17
|
+
}, g = {
|
|
18
|
+
l: [0.2104542553, 0.793617785, 0.0040720468],
|
|
19
|
+
a: [1.9779984951, 2.428592205, 0.4505937099],
|
|
20
|
+
b: [0.0259040371, 0.7827717662, 0.808675766]
|
|
21
|
+
}, d = {
|
|
22
|
+
r: [4.076741636075958, -3.307711539258063, 0.2309699031821043],
|
|
23
|
+
g: [-1.2684379732850315, 2.609757349287688, -0.341319376002657],
|
|
24
|
+
b: [-0.0041960761386756, -0.7034186179359362, 1.7076146940746117]
|
|
25
|
+
}, C = 5, Y = 180 / Math.PI, L = {
|
|
26
|
+
inputHex: "input is required and must be a hex",
|
|
27
|
+
invalid: "invalid input"
|
|
28
|
+
};
|
|
29
|
+
function h(r, t) {
|
|
30
|
+
if (r)
|
|
31
|
+
return;
|
|
32
|
+
if (process.env.NODE_ENV !== "production" && t === void 0)
|
|
33
|
+
throw new Error("invariant requires an error message argument");
|
|
34
|
+
const n = t ? new Error(t) : new Error(
|
|
35
|
+
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
36
|
+
);
|
|
37
|
+
throw n.name = "colorizr", n;
|
|
38
|
+
}
|
|
39
|
+
function O(r) {
|
|
40
|
+
return W(r) ? /^#([\da-f]{3,4}|[\da-f]{6,8})$/i.test(r) : !1;
|
|
41
|
+
}
|
|
42
|
+
function p(r) {
|
|
43
|
+
if (!_(r))
|
|
44
|
+
return !1;
|
|
45
|
+
const t = Object.entries(r);
|
|
46
|
+
return !!t.length && t.every(([n, e]) => n === "h" ? e >= 0 && e <= 360 : n === "alpha" ? e >= 0 && e <= 1 : k.hsl.includes(n) && e >= 0 && e <= 100);
|
|
47
|
+
}
|
|
48
|
+
function J(r) {
|
|
49
|
+
if (!_(r))
|
|
50
|
+
return !1;
|
|
51
|
+
const t = Object.entries(r);
|
|
52
|
+
return !!t.length && t.every(([n, e]) => n === "l" ? e >= 0 && e <= 100 : n === "alpha" ? e >= 0 && e <= 1 : k.oklab.includes(n) && e >= -1 && e <= 1);
|
|
53
|
+
}
|
|
54
|
+
function Q(r) {
|
|
55
|
+
if (!_(r))
|
|
56
|
+
return !1;
|
|
57
|
+
const t = Object.entries(r);
|
|
58
|
+
return !!t.length && t.every(([n, e]) => n === "l" ? e >= 0 && e <= 100 : n === "alpha" ? e >= 0 && e <= 1 : k.oklch.includes(n) && e >= 0 && e <= (n === "h" ? 360 : 1));
|
|
59
|
+
}
|
|
60
|
+
function A(r) {
|
|
61
|
+
return typeof r == "number" && !Number.isNaN(r);
|
|
62
|
+
}
|
|
63
|
+
function _(r) {
|
|
64
|
+
if (!r)
|
|
65
|
+
return !1;
|
|
66
|
+
const { toString: t } = Object.prototype, n = Object.getPrototypeOf(r);
|
|
67
|
+
return t.call(r) === "[object Object]" && (n === null || n === Object.getPrototypeOf({}));
|
|
68
|
+
}
|
|
69
|
+
function U(r) {
|
|
70
|
+
if (!_(r))
|
|
71
|
+
return !1;
|
|
72
|
+
const t = Object.entries(r);
|
|
73
|
+
return !!t.length && t.every(([n, e]) => n === "alpha" ? e >= 0 && e <= 1 : k.rgb.includes(n) && e >= 0 && e <= 255);
|
|
74
|
+
}
|
|
75
|
+
function W(r, t = !0) {
|
|
76
|
+
const n = typeof r == "string";
|
|
77
|
+
return t ? n && !!r.trim().length : n;
|
|
78
|
+
}
|
|
79
|
+
function m(r, t = 0, n = 100) {
|
|
80
|
+
return Math.min(Math.max(r, t), n);
|
|
81
|
+
}
|
|
82
|
+
function H(r, t, n) {
|
|
83
|
+
switch (h(A(r), "Input is not a number"), h(K.includes(t), `Invalid model${`: ${t}`}`), h(k[t].includes(n), `Invalid key${n ? `: ${n}` : ""}`), t) {
|
|
84
|
+
case "hsl":
|
|
85
|
+
return h(k.hsl.includes(n), "Invalid key"), ["l", "s"].includes(n) ? m(r) : m(r, 0, 360);
|
|
86
|
+
case "rgb":
|
|
87
|
+
return h(k.rgb.includes(n), "Invalid key"), m(r, 0, 255);
|
|
88
|
+
/* c8 ignore next 3 */
|
|
89
|
+
default:
|
|
90
|
+
throw new Error("Invalid inputs");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function i(r, t) {
|
|
94
|
+
const n = k[t], e = {
|
|
95
|
+
hsl: p,
|
|
96
|
+
oklab: J,
|
|
97
|
+
oklch: Q,
|
|
98
|
+
rgb: U
|
|
99
|
+
};
|
|
100
|
+
h(_(r) || Array.isArray(r), L.invalid);
|
|
101
|
+
const o = Array.isArray(r) ? { [n[0]]: r[0], [n[1]]: r[1], [n[2]]: r[2] } : r;
|
|
102
|
+
return h(e[t](o), `invalid ${t} color`), o;
|
|
103
|
+
}
|
|
104
|
+
function j(r, t = C, n = !0) {
|
|
105
|
+
const e = new Map(Object.entries(r));
|
|
106
|
+
for (const [o, l] of e.entries())
|
|
107
|
+
e.set(o, b(l, t, n));
|
|
108
|
+
return Object.fromEntries(e);
|
|
109
|
+
}
|
|
110
|
+
function b(r, t = 2, n = !0) {
|
|
111
|
+
if (!A(r) || r === 0)
|
|
112
|
+
return 0;
|
|
113
|
+
if (n) {
|
|
114
|
+
const c = 10 ** t;
|
|
115
|
+
return Math.round(r * c) / c;
|
|
116
|
+
}
|
|
117
|
+
const e = Math.abs(r);
|
|
118
|
+
let o = Math.abs(Math.ceil(Math.log(e) / Math.LN10));
|
|
119
|
+
o === 0 ? o = 2 : o > t && (o = t);
|
|
120
|
+
let l = t - (o < 0 ? 0 : o);
|
|
121
|
+
l <= 1 && t > 1 ? l = 2 : (l > t || l === 0) && (l = t);
|
|
122
|
+
const s = 10 ** l;
|
|
123
|
+
return Math.round(r * s) / s;
|
|
124
|
+
}
|
|
125
|
+
var X = {};
|
|
126
|
+
z(X, {
|
|
127
|
+
hex2hsl: () => rr,
|
|
128
|
+
hex2oklab: () => nr,
|
|
129
|
+
hex2oklch: () => lr,
|
|
130
|
+
hex2rgb: () => E,
|
|
131
|
+
hsl2hex: () => sr,
|
|
132
|
+
hsl2oklab: () => cr,
|
|
133
|
+
hsl2oklch: () => ar,
|
|
134
|
+
hsl2rgb: () => N,
|
|
135
|
+
oklab2hex: () => hr,
|
|
136
|
+
oklab2hsl: () => ur,
|
|
137
|
+
oklab2oklch: () => T,
|
|
138
|
+
oklab2rgb: () => $,
|
|
139
|
+
oklch2hex: () => gr,
|
|
140
|
+
oklch2hsl: () => dr,
|
|
141
|
+
oklch2oklab: () => F,
|
|
142
|
+
oklch2rgb: () => G,
|
|
143
|
+
rgb2hex: () => w,
|
|
144
|
+
rgb2hsl: () => I,
|
|
145
|
+
rgb2oklab: () => S,
|
|
146
|
+
rgb2oklch: () => D
|
|
147
|
+
});
|
|
148
|
+
function Z(r) {
|
|
149
|
+
h(O(r), L.inputHex);
|
|
150
|
+
let t = r.replace("#", "");
|
|
151
|
+
if (t.length === 3 || t.length === 4) {
|
|
152
|
+
const e = [...t];
|
|
153
|
+
t = "", e.forEach((o) => {
|
|
154
|
+
t += `${o}${o}`;
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
const n = `#${t}`;
|
|
158
|
+
return h(O(n), "invalid hex"), n;
|
|
159
|
+
}
|
|
160
|
+
function E(r) {
|
|
161
|
+
h(O(r), L.inputHex);
|
|
162
|
+
const t = Z(r).slice(1);
|
|
163
|
+
return {
|
|
164
|
+
r: parseInt(t.charAt(0) + t.charAt(1), 16),
|
|
165
|
+
g: parseInt(t.charAt(2) + t.charAt(3), 16),
|
|
166
|
+
b: parseInt(t.charAt(4) + t.charAt(5), 16)
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function I(r) {
|
|
170
|
+
const t = i(r, "rgb"), n = H(t.r, "rgb", "r") / 255, e = H(t.g, "rgb", "g") / 255, o = H(t.b, "rgb", "b") / 255, l = Math.min(n, e, o), s = Math.max(n, e, o), c = s - l;
|
|
171
|
+
let a = 0, u;
|
|
172
|
+
const x = (s + l) / 2;
|
|
173
|
+
let v;
|
|
174
|
+
switch (s) {
|
|
175
|
+
case n:
|
|
176
|
+
v = c ? (e - o) / c : 0, a = 60 * v;
|
|
177
|
+
break;
|
|
178
|
+
case e:
|
|
179
|
+
v = (o - n) / c, a = 60 * v + 120;
|
|
180
|
+
break;
|
|
181
|
+
case o:
|
|
182
|
+
v = (n - e) / c, a = 60 * v + 240;
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
return a < 0 && (a = 360 + a), l === s ? u = 0 : u = x < 0.5 ? c / (2 * x) : c / (2 - 2 * x), {
|
|
186
|
+
h: Math.abs(+(a % 360).toFixed(2)),
|
|
187
|
+
s: +(u * 100).toFixed(2),
|
|
188
|
+
l: +(x * 100).toFixed(2)
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function rr(r) {
|
|
192
|
+
return h(O(r), L.inputHex), I(E(r));
|
|
193
|
+
}
|
|
194
|
+
var { cbrt: P, sign: tr } = Math;
|
|
195
|
+
function R(r) {
|
|
196
|
+
const t = Math.abs(r);
|
|
197
|
+
return t < 0.04045 ? r / 12.92 : (tr(r) || 1) * ((t + 0.055) / 1.055) ** 2.4;
|
|
198
|
+
}
|
|
199
|
+
function S(r, t = C) {
|
|
200
|
+
const n = i(r, "rgb"), [e, o, l] = [R(n.r / 255), R(n.g / 255), R(n.b / 255)], s = P(f.l[0] * e + f.l[1] * o + f.l[2] * l), c = P(f.m[0] * e + f.m[1] * o + f.m[2] * l), a = P(f.s[0] * e + f.s[1] * o + f.s[2] * l), u = {
|
|
201
|
+
l: g.l[0] * s + g.l[1] * c - g.l[2] * a,
|
|
202
|
+
a: g.a[0] * s - g.a[1] * c + g.a[2] * a,
|
|
203
|
+
b: g.b[0] * s + g.b[1] * c - g.b[2] * a
|
|
204
|
+
};
|
|
205
|
+
return j(u, t);
|
|
206
|
+
}
|
|
207
|
+
function nr(r, t) {
|
|
208
|
+
return h(O(r), L.inputHex), S(E(r), t);
|
|
209
|
+
}
|
|
210
|
+
var { atan2: er, sqrt: or } = Math;
|
|
211
|
+
function T(r, t) {
|
|
212
|
+
const { l: n, a: e, b: o } = j(i(r, "oklab")), l = or(e ** 2 + o ** 2);
|
|
213
|
+
let s = (er(o, e) * Y + 360) % 360;
|
|
214
|
+
return b(l * 1e4) === 0 && (s = 0), j({ l: n, c: l, h: s }, t);
|
|
215
|
+
}
|
|
216
|
+
function D(r, t) {
|
|
217
|
+
const n = i(r, "rgb");
|
|
218
|
+
return T(S(n, t), t);
|
|
219
|
+
}
|
|
220
|
+
function lr(r, t) {
|
|
221
|
+
return h(O(r), L.inputHex), D(E(r), t);
|
|
222
|
+
}
|
|
223
|
+
function y(r, t, n) {
|
|
224
|
+
h(A(r) && A(t) && A(n), "point, chroma and h are required");
|
|
225
|
+
let e = n;
|
|
226
|
+
return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? b(r + (t - r) * 6 * e, 4) : e < 1 / 2 ? b(t, 4) : e < 2 / 3 ? b(r + (t - r) * (2 / 3 - e) * 6, 4) : b(r, 4);
|
|
227
|
+
}
|
|
228
|
+
function N(r) {
|
|
229
|
+
const t = i(r, "hsl"), n = b(t.h) / 360, e = b(t.s) / 100, o = b(t.l) / 100;
|
|
230
|
+
let l, s, c, a, u;
|
|
231
|
+
return e === 0 ? (l = o, s = o, c = o) : (u = o < 0.5 ? o * (1 + e) : o + e - o * e, a = 2 * o - u, l = y(a, u, n + 1 / 3), s = y(a, u, n), c = y(a, u, n - 1 / 3)), {
|
|
232
|
+
r: Math.round(l * 255),
|
|
233
|
+
g: Math.round(s * 255),
|
|
234
|
+
b: Math.round(c * 255)
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
function w(r) {
|
|
238
|
+
const t = i(r, "rgb");
|
|
239
|
+
return `#${Object.values(t).map((n) => `0${Math.floor(n).toString(16)}`.slice(-2)).join("")}`;
|
|
240
|
+
}
|
|
241
|
+
function sr(r) {
|
|
242
|
+
const t = i(r, "hsl");
|
|
243
|
+
return w(N(t));
|
|
244
|
+
}
|
|
245
|
+
function cr(r, t) {
|
|
246
|
+
const n = i(r, "hsl");
|
|
247
|
+
return S(N(n), t);
|
|
248
|
+
}
|
|
249
|
+
function ar(r, t) {
|
|
250
|
+
const n = i(r, "hsl");
|
|
251
|
+
return D(N(n), t);
|
|
252
|
+
}
|
|
253
|
+
var { abs: ir } = Math;
|
|
254
|
+
function B(r) {
|
|
255
|
+
const t = ir(r), n = r < 0 ? -1 : 1;
|
|
256
|
+
return t > 31308e-7 ? n * (t ** (1 / 2.4) * 1.055 - 0.055) : r * 12.92;
|
|
257
|
+
}
|
|
258
|
+
function $(r, t = 0) {
|
|
259
|
+
const { l: n, a: e, b: o } = i(r, "oklab"), l = (n + M.l[0] * e + M.l[1] * o) ** 3, s = (n + M.m[0] * e + M.m[1] * o) ** 3, c = (n + M.s[0] * e + M.s[1] * o) ** 3, a = 255 * B(d.r[0] * l + d.r[1] * s + d.r[2] * c), u = 255 * B(d.g[0] * l + d.g[1] * s + d.g[2] * c), x = 255 * B(d.b[0] * l + d.b[1] * s + d.b[2] * c);
|
|
260
|
+
return {
|
|
261
|
+
r: m(b(a, t), 0, 255),
|
|
262
|
+
g: m(b(u, t), 0, 255),
|
|
263
|
+
b: m(b(x, t), 0, 255)
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function hr(r) {
|
|
267
|
+
const t = i(r, "oklab");
|
|
268
|
+
return w($(t));
|
|
269
|
+
}
|
|
270
|
+
function ur(r) {
|
|
271
|
+
const t = i(r, "oklab");
|
|
272
|
+
return I($(t));
|
|
273
|
+
}
|
|
274
|
+
var { sin: br, cos: fr } = Math;
|
|
275
|
+
function F(r, t) {
|
|
276
|
+
let { l: n, c: e, h: o } = i(r, "oklch");
|
|
277
|
+
return (Number.isNaN(o) || o < 0) && (o = 0), j({ l: n, a: e * fr(o * q), b: e * br(o * q) }, t);
|
|
278
|
+
}
|
|
279
|
+
function G(r, t = 0) {
|
|
280
|
+
const n = i(r, "oklch");
|
|
281
|
+
return $(F(n), t);
|
|
282
|
+
}
|
|
283
|
+
function gr(r) {
|
|
284
|
+
const t = i(r, "oklch");
|
|
285
|
+
return w(G(t));
|
|
286
|
+
}
|
|
287
|
+
function dr(r) {
|
|
288
|
+
const t = i(r, "oklch");
|
|
289
|
+
return I(G(t));
|
|
290
|
+
}
|
|
291
|
+
export {
|
|
292
|
+
Z as formatHex,
|
|
293
|
+
rr as hex2hsl,
|
|
294
|
+
nr as hex2oklab,
|
|
295
|
+
lr as hex2oklch,
|
|
296
|
+
E as hex2rgb,
|
|
297
|
+
sr as hsl2hex,
|
|
298
|
+
cr as hsl2oklab,
|
|
299
|
+
ar as hsl2oklch,
|
|
300
|
+
N as hsl2rgb,
|
|
301
|
+
p as isHSL,
|
|
302
|
+
O as isHex,
|
|
303
|
+
J as isLAB,
|
|
304
|
+
Q as isLCH,
|
|
305
|
+
U as isRGB,
|
|
306
|
+
hr as oklab2hex,
|
|
307
|
+
ur as oklab2hsl,
|
|
308
|
+
T as oklab2oklch,
|
|
309
|
+
$ as oklab2rgb,
|
|
310
|
+
gr as oklch2hex,
|
|
311
|
+
dr as oklch2hsl,
|
|
312
|
+
F as oklch2oklab,
|
|
313
|
+
G as oklch2rgb,
|
|
314
|
+
w as rgb2hex,
|
|
315
|
+
I as rgb2hsl,
|
|
316
|
+
S as rgb2oklab,
|
|
317
|
+
D as rgb2oklch
|
|
318
|
+
};
|