@vokril/ui-solid 0.29.0 → 0.31.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.
- package/CHANGELOG.md +71 -0
- package/README.md +27 -0
- package/dist/{AttributeGrid-eND8YDby.cjs → AttributeGrid-Ch1k9v5j.cjs} +1 -1
- package/dist/{AttributeGrid-CASILa4u.js → AttributeGrid-DqFd4gBm.js} +3 -3
- package/dist/Button-4meERfnv.js +300 -0
- package/dist/Button-OyZHrl-t.cjs +1 -0
- package/dist/CommandPalette-CxYZUJtN.cjs +2 -0
- package/dist/{CommandPalette-Cj618AOz.js → CommandPalette-DwOp8y1-.js} +1467 -1466
- package/dist/{CopyButton-B5gS2ft3.cjs → CopyButton-16QNPgz6.cjs} +1 -1
- package/dist/{CopyButton-g-WSiBDZ.js → CopyButton-BVS49lMS.js} +1 -1
- package/dist/{DateRangePicker-CJD9ADgB.js → DateRangePicker-8QvydugY.js} +4 -4
- package/dist/{DateRangePicker-Frc0HVxp.cjs → DateRangePicker-DI-06xWY.cjs} +1 -1
- package/dist/{GuidedTour-B6q7lYhn.cjs → GuidedTour-DUQwdW8n.cjs} +1 -1
- package/dist/{GuidedTour-CFCvRJN4.js → GuidedTour-DXMmHn0o.js} +2 -2
- package/dist/{HostPortal-CXGUUhP8.js → HostPortal-Ba3MD9CG.js} +1 -1
- package/dist/HostPortal-CpWsArs6.cjs +1 -0
- package/dist/{IconPicker-DYqNi5ud.js → IconPicker-D1G8HK92.js} +3 -3
- package/dist/{IconPicker-CIbJb1ei.cjs → IconPicker-Q-ZDtNkd.cjs} +1 -1
- package/dist/Input-Brp5EDhg.cjs +1 -0
- package/dist/Input-CZi8KEfm.js +374 -0
- package/dist/Modal-CBi7Wd2V.cjs +1 -0
- package/dist/Modal-iyY1HUtr.js +588 -0
- package/dist/{PageSkeleton-BPbb28-H.cjs → PageSkeleton-B_-4fz1q.cjs} +1 -1
- package/dist/{PageSkeleton-CLnJO6uD.js → PageSkeleton-zNyjLPlk.js} +3 -3
- package/dist/{Popover-Cttb6NYT.js → Popover-DVi179wu.js} +4 -3
- package/dist/Popover-DXrczbt9.cjs +1 -0
- package/dist/{SearchableSelect-BvCm4enQ.js → SearchableSelect-DtHbWJhR.js} +34 -33
- package/dist/SearchableSelect-yLVqCGFo.cjs +1 -0
- package/dist/StatusBarNotificationBell-DQs5g1K6.cjs +50 -0
- package/dist/{StatusBarNotificationBell-7Izs_msz.js → StatusBarNotificationBell-ZTEhZFmJ.js} +4279 -4002
- package/dist/{Stepper-D9i1Xclm.js → Stepper-CyRgzWlR.js} +1 -1
- package/dist/{Stepper-Ci5JpLbS.cjs → Stepper-u2ZsE5oP.cjs} +1 -1
- package/dist/{Textarea-CeAGf08O.cjs → Textarea-DASNQNoi.cjs} +1 -1
- package/dist/{Textarea-B5QqqKnI.js → Textarea-szHXQahi.js} +1 -1
- package/dist/{TimeSeriesChart-DOwi2lJs.js → TimeSeriesChart-D7lIqolp.js} +1 -1
- package/dist/{TimeSeriesChart-huvheefm.cjs → TimeSeriesChart-DGzM9B--.cjs} +1 -1
- package/dist/{ToggleButton-CFM8P3JY.js → ToggleButton-B22PsCqo.js} +61 -60
- package/dist/ToggleButton-DWslrIBN.cjs +1 -0
- package/dist/_internal/contract/notification.d.cts +9 -0
- package/dist/_internal/contract/notification.d.ts +9 -0
- package/dist/_internal/contract/notificationCatalog.d.cts +2 -0
- package/dist/_internal/contract/notificationCatalog.d.ts +2 -0
- package/dist/_internal/platform/settings/settingsTypes.d.cts +0 -8
- package/dist/_internal/platform/settings/settingsTypes.d.ts +0 -8
- package/dist/anchoredLayout-CBjQ1etD.cjs +1 -0
- package/dist/anchoredLayout-E0mqCWxk.js +233 -0
- package/dist/appThemeDerivation-BylmT80v.cjs +1 -0
- package/dist/{appThemeDerivation-CKoSe4KP.js → appThemeDerivation-DBAOkGl7.js} +260 -231
- package/dist/base.css +2 -2
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/context/DesktopContextMenuContext.d.cts +8 -1
- package/dist/context/DesktopContextMenuContext.d.ts +8 -1
- package/dist/createDialogShellFocus-CQ0VNC2g.cjs +1 -0
- package/dist/{createDialogShellFocus-B4piXDU4.js → createDialogShellFocus-DbiQmLgb.js} +9 -9
- package/dist/createResizableSidebar-COlpGQ7H.cjs +1 -0
- package/dist/createResizableSidebar-cmCKTIg_.js +504 -0
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +3 -3
- package/dist/dialogFocusRestore-BhxVTSiP.js +10 -0
- package/dist/dialogFocusRestore-DP5b1bDo.cjs +1 -0
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +3 -3
- package/dist/forms/Input.d.cts +20 -0
- package/dist/forms/Input.d.ts +20 -0
- package/dist/forms/InputMessage.d.cts +19 -0
- package/dist/forms/InputMessage.d.ts +19 -0
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +9 -9
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +547 -541
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +2 -2
- package/dist/layout/resizeCarry.d.cts +17 -0
- package/dist/layout/resizeCarry.d.ts +17 -0
- package/dist/mainRealmDom-B215swW-.js +166 -0
- package/dist/mainRealmDom-BYGSE-fo.cjs +1 -0
- package/dist/nativeTitleHold-A9jUISgQ.js +170 -0
- package/dist/nativeTitleHold-B7Ou-W9b.cjs +1 -0
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/NotificationItem.d.cts +9 -0
- package/dist/notifications/NotificationItem.d.ts +9 -0
- package/dist/notifications/NotificationsCenter.d.cts +18 -0
- package/dist/notifications/NotificationsCenter.d.ts +18 -0
- package/dist/notifications/RunningProgressCards.d.cts +3 -0
- package/dist/notifications/RunningProgressCards.d.ts +3 -0
- package/dist/notifications/fireNotification.d.cts +35 -16
- package/dist/notifications/fireNotification.d.ts +35 -16
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.d.cts +1 -0
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +55 -52
- package/dist/notifications/nativeEngine.d.cts +4 -3
- package/dist/notifications/nativeEngine.d.ts +4 -3
- package/dist/notifications/notificationEntryList.d.cts +91 -0
- package/dist/notifications/notificationEntryList.d.ts +91 -0
- package/dist/notifications/notificationService.d.cts +23 -2
- package/dist/notifications/notificationService.d.ts +23 -2
- package/dist/notifications/toast.d.cts +3 -0
- package/dist/notifications/toast.d.ts +3 -0
- package/dist/notifications/toastCorner.d.cts +8 -0
- package/dist/notifications/toastCorner.d.ts +8 -0
- package/dist/notifications/toastFilterPolicy.d.cts +33 -1
- package/dist/notifications/toastFilterPolicy.d.ts +33 -1
- package/dist/overlay/Modal.d.cts +6 -0
- package/dist/overlay/Modal.d.ts +6 -0
- package/dist/overlay/backgroundInert.d.cts +6 -2
- package/dist/overlay/backgroundInert.d.ts +6 -2
- package/dist/overlay/command-palette/CommandPalette.d.cts +12 -0
- package/dist/overlay/command-palette/CommandPalette.d.ts +12 -0
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.js +70 -68
- package/dist/overlay/nativeTitleHold.d.cts +24 -0
- package/dist/overlay/nativeTitleHold.d.ts +24 -0
- package/dist/ownerAnimationFrame-DzFcMSmn.js +19 -0
- package/dist/ownerAnimationFrame-T6jf6qYC.cjs +1 -0
- package/dist/server/{AttributeGrid-CMi-UtWb.js → AttributeGrid-Bpjlauuz.js} +2 -2
- package/dist/server/{AttributeGrid-B7sb3btp.cjs → AttributeGrid-DNYdKb8J.cjs} +1 -1
- package/dist/server/CommandPalette-BuVxnqBG.cjs +1 -0
- package/dist/server/{CommandPalette-CozogFlk.js → CommandPalette-Dn3NKXPM.js} +1095 -1069
- package/dist/server/{DateRangePicker-KLZzyuPJ.cjs → DateRangePicker-BFzNjaME.cjs} +1 -1
- package/dist/server/{DateRangePicker-C35q8BTw.js → DateRangePicker-CnYkTgXX.js} +3 -3
- package/dist/server/{GuidedTour-DmLbBttx.js → GuidedTour-BZardPYW.js} +1 -1
- package/dist/server/{GuidedTour-DfV0yzqh.cjs → GuidedTour-yhdZk2SU.cjs} +1 -1
- package/dist/server/{HostPortal-CXGUUhP8.js → HostPortal-C4IrAeWN.js} +1 -1
- package/dist/server/HostPortal-D5ECrJvn.cjs +1 -0
- package/dist/server/{IconPicker-B1soopAp.cjs → IconPicker-C5lAN9pX.cjs} +1 -1
- package/dist/server/{IconPicker-B4aXspLw.js → IconPicker-DDWgB7sm.js} +3 -3
- package/dist/server/Input-AdF-i0O8.js +245 -0
- package/dist/server/Input-XF9Jr0G9.cjs +1 -0
- package/dist/server/{Modal-BheFQLs1.js → Modal-C5dzgcRW.js} +102 -97
- package/dist/server/{Modal-BswxV8Pn.cjs → Modal-nAhBS1L9.cjs} +1 -1
- package/dist/server/Popover-C5avmGWz.cjs +1 -0
- package/dist/server/{Popover-Cg28aPUZ.js → Popover-H3AAYZI0.js} +57 -57
- package/dist/server/{SearchableSelect-09ECcDlB.cjs → SearchableSelect-CZrXDKfC.cjs} +1 -1
- package/dist/server/{SearchableSelect-vjhS4c-H.js → SearchableSelect-DMqed5Er.js} +1 -1
- package/dist/server/StatusBarNotificationBell-CGcMdT4h.cjs +49 -0
- package/dist/server/{StatusBarNotificationBell-D8Jt3PXI.js → StatusBarNotificationBell-DW2l5O9B.js} +4216 -3949
- package/dist/server/{Stepper-DxNrskdq.cjs → Stepper-CpapA_WH.cjs} +1 -1
- package/dist/server/{Stepper-n5f9r-ye.js → Stepper-gGA7JwjV.js} +1 -1
- package/dist/server/{Textarea-BQf2lL59.cjs → Textarea-Bh5LVrBn.cjs} +1 -1
- package/dist/server/{Textarea-BTH48NET.js → Textarea-DVkfGkP0.js} +1 -1
- package/dist/server/{ToggleButton-TE3Xf2yD.cjs → ToggleButton-CA9T-OsI.cjs} +1 -1
- package/dist/server/{ToggleButton-FywO2CCI.js → ToggleButton-CBNKajZa.js} +4 -4
- package/dist/server/{VpTrash-Dlq8o6Uv.js → VpTrash-CZMWCIpF.js} +84 -70
- package/dist/server/VpTrash-DiczWhwm.cjs +1 -0
- package/dist/server/appThemeDerivation-BylmT80v.cjs +1 -0
- package/dist/server/{appThemeDerivation-CKoSe4KP.js → appThemeDerivation-DBAOkGl7.js} +260 -231
- package/dist/server/{createDialogShellFocus-BiBAZOCI.cjs → createDialogShellFocus-CDaLuPg8.cjs} +1 -1
- package/dist/server/{createDialogShellFocus-BFo8awdj.js → createDialogShellFocus-LGDBOVnr.js} +6 -6
- package/dist/server/{createResizableSidebar-BImbKlLe.js → createResizableSidebar-Dvu7iEk1.js} +1 -1
- package/dist/server/{createResizableSidebar-GFgZIj-5.cjs → createResizableSidebar-v40ZOb-Q.cjs} +1 -1
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +3 -3
- package/dist/server/dialogFocusRestore-BhxVTSiP.js +10 -0
- package/dist/server/dialogFocusRestore-DP5b1bDo.cjs +1 -0
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +7 -7
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/server/{index-UIjsx3oJ.js → index-BEARfm54.js} +3604 -3617
- package/dist/server/index-C6rYfWCJ.cjs +1 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +502 -497
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +2 -2
- package/dist/server/navigation/index.cjs +1 -1
- package/dist/server/navigation/index.js +1 -1
- package/dist/server/notifications/index.cjs +1 -1
- package/dist/server/notifications/index.js +55 -52
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +54 -53
- package/dist/server/tokens/index.cjs +1 -1
- package/dist/server/tokens/index.js +30 -28
- package/dist/solid/feedback/Badge.jsx +3 -14
- package/dist/solid/forms/Button.jsx +3 -14
- package/dist/solid/forms/Input.jsx +31 -5
- package/dist/solid/forms/Input.module.css.js +1 -0
- package/dist/solid/forms/InputMessage.jsx +86 -0
- package/dist/solid/forms/PressableSurface.jsx +3 -14
- package/dist/solid/layout/ResizeHandle.jsx +11 -1
- package/dist/solid/layout/resizeCarry.js +31 -0
- package/dist/solid/notifications/NotificationHost.jsx +5 -18
- package/dist/solid/notifications/NotificationItem.jsx +5 -5
- package/dist/solid/notifications/NotificationPanel.jsx +14 -4
- package/dist/solid/notifications/NotificationsCenter.jsx +70 -12
- package/dist/solid/notifications/RunningProgressCards.jsx +1 -1
- package/dist/solid/notifications/StatusBarNotificationBell.jsx +8 -3
- package/dist/solid/notifications/catalogAdapter.js +1 -0
- package/dist/solid/notifications/fireNotification.js +21 -16
- package/dist/solid/notifications/index.js +1 -0
- package/dist/solid/notifications/notificationEntryList.js +168 -0
- package/dist/solid/notifications/notificationService.js +20 -4
- package/dist/solid/notifications/toast.js +54 -7
- package/dist/solid/notifications/toastCorner.js +3 -0
- package/dist/solid/notifications/toastFilterPolicy.js +12 -0
- package/dist/solid/overlay/Drawer.jsx +2 -1
- package/dist/solid/overlay/Modal.jsx +42 -4
- package/dist/solid/overlay/command-palette/CommandPalette.jsx +4 -4
- package/dist/solid/overlay/context-menu/DesktopContextMenu.jsx +8 -7
- package/dist/solid/overlay/nativeTitleHold.js +33 -0
- package/dist/solid/overlay/tooltipDirective.js +3 -11
- package/dist/solid/tokens/index.js +1 -0
- package/dist/solid/tokens/palette/paletteContract.js +27 -0
- package/dist/style.css +2 -2
- package/dist/theme.css +1 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +1 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +30 -28
- package/dist/tokens/palette/paletteContract.d.cts +17 -0
- package/dist/tokens/palette/paletteContract.d.ts +17 -0
- package/dist/tokens/tokens.css +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/Button-Bb68ymNP.cjs +0 -1
- package/dist/Button-D-T0tyGF.js +0 -305
- package/dist/CommandPalette-5FQRgPG9.cjs +0 -2
- package/dist/HostPortal-CgJwxt-f.cjs +0 -1
- package/dist/Input-CZruORyy.cjs +0 -1
- package/dist/Input-DkPhsdfk.js +0 -227
- package/dist/Modal-CY6ePolt.cjs +0 -1
- package/dist/Modal-NzZzHSwb.js +0 -559
- package/dist/Popover-CWrR51eG.cjs +0 -1
- package/dist/SearchableSelect-CVqdVMOC.cjs +0 -1
- package/dist/StatusBarNotificationBell-BJiORN4s.cjs +0 -50
- package/dist/ToggleButton-BFWh1_o5.cjs +0 -1
- package/dist/anchoredLayout-Dstwa5OH.cjs +0 -1
- package/dist/anchoredLayout-FC-qv8xm.js +0 -250
- package/dist/appThemeDerivation-Be_oKljl.cjs +0 -1
- package/dist/createDialogShellFocus-CJaw9-B9.cjs +0 -1
- package/dist/createResizableSidebar-BDUlX9-G.js +0 -472
- package/dist/createResizableSidebar-BVJBU2kP.cjs +0 -1
- package/dist/dialogFocusRestore--dH59ER2.js +0 -35
- package/dist/dialogFocusRestore-CL-ExfAA.cjs +0 -1
- package/dist/mainRealmDom-C12lr9lm.js +0 -171
- package/dist/mainRealmDom-S6teqEr4.cjs +0 -1
- package/dist/server/CommandPalette-DQK6N98N.cjs +0 -1
- package/dist/server/HostPortal-CgJwxt-f.cjs +0 -1
- package/dist/server/Input-CjvD8w18.cjs +0 -1
- package/dist/server/Input-DaEN2JJd.js +0 -127
- package/dist/server/Popover-BsxIKBbl.cjs +0 -1
- package/dist/server/StatusBarNotificationBell-LJHLMT9F.cjs +0 -49
- package/dist/server/VpTrash-D49oUUJh.cjs +0 -1
- package/dist/server/appThemeDerivation-Be_oKljl.cjs +0 -1
- package/dist/server/dialogFocusRestore--dH59ER2.js +0 -35
- package/dist/server/dialogFocusRestore-CL-ExfAA.cjs +0 -1
- package/dist/server/index-2mQPVEDR.cjs +0 -1
- package/dist/tooltipCoordinator-BzxEyKhA.js +0 -144
- package/dist/tooltipCoordinator-DslqMlsI.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createComponent as fn, isDev as ln } from "solid-js/web";
|
|
2
|
-
import { createSignal as
|
|
2
|
+
import { createSignal as M, onCleanup as gn, createMemo as W, createEffect as yn, useContext as mn, createContext as bn } from "solid-js";
|
|
3
3
|
import { B as Z } from "./bugIndicatingError-h3J5qkL6.js";
|
|
4
4
|
const w = [
|
|
5
5
|
{
|
|
@@ -174,208 +174,208 @@ const w = [
|
|
|
174
174
|
}, Fn = "viper-dark", hn = {
|
|
175
175
|
darcula: "viper-dark",
|
|
176
176
|
light: "viper-light"
|
|
177
|
-
},
|
|
177
|
+
}, en = (n) => hn[n] ?? n;
|
|
178
178
|
let I = "viper";
|
|
179
|
-
function
|
|
179
|
+
function re(n) {
|
|
180
180
|
if (!Object.prototype.hasOwnProperty.call(nn, n))
|
|
181
181
|
throw new Error(`Unknown theme design: ${String(n)}`);
|
|
182
182
|
I = n;
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function te() {
|
|
185
185
|
return I;
|
|
186
186
|
}
|
|
187
187
|
function p(n = "dark") {
|
|
188
188
|
return nn[I][n];
|
|
189
189
|
}
|
|
190
|
-
const
|
|
191
|
-
function
|
|
192
|
-
return
|
|
190
|
+
const E = [];
|
|
191
|
+
function oe(n) {
|
|
192
|
+
return E.push(n), {
|
|
193
193
|
dispose: () => {
|
|
194
|
-
const
|
|
195
|
-
|
|
194
|
+
const e = E.indexOf(n);
|
|
195
|
+
e !== -1 && E.splice(e, 1);
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
for (const
|
|
201
|
-
const
|
|
202
|
-
if (
|
|
199
|
+
function rn(n) {
|
|
200
|
+
for (const e of E) {
|
|
201
|
+
const r = e.byId(n);
|
|
202
|
+
if (r !== null) return r;
|
|
203
203
|
}
|
|
204
204
|
return null;
|
|
205
205
|
}
|
|
206
|
-
const tn = (n) => n.design === void 0 || n.design === I, S = (n) => w.find((
|
|
207
|
-
function
|
|
208
|
-
const
|
|
209
|
-
return
|
|
206
|
+
const tn = (n) => n.design === void 0 || n.design === I, S = (n) => w.find((e) => e.id === n);
|
|
207
|
+
function v(n) {
|
|
208
|
+
const e = en(n), r = S(e);
|
|
209
|
+
return r && !tn(r) ? S(p(r.type)) : r ?? rn(e) ?? S(p());
|
|
210
210
|
}
|
|
211
211
|
function pn() {
|
|
212
|
-
return [...w.filter(tn), ...
|
|
213
|
-
}
|
|
214
|
-
function
|
|
215
|
-
const
|
|
216
|
-
return S(
|
|
217
|
-
}
|
|
218
|
-
const D = 4.5,
|
|
219
|
-
function
|
|
220
|
-
const
|
|
221
|
-
return
|
|
222
|
-
r: Number.parseInt(
|
|
223
|
-
g: Number.parseInt(
|
|
224
|
-
b: Number.parseInt(
|
|
212
|
+
return [...w.filter(tn), ...E.flatMap((n) => n.options())];
|
|
213
|
+
}
|
|
214
|
+
function se(n) {
|
|
215
|
+
const e = en(n);
|
|
216
|
+
return S(e) !== void 0 || rn(e) !== null;
|
|
217
|
+
}
|
|
218
|
+
const D = 4.5, xn = 3;
|
|
219
|
+
function kn(n) {
|
|
220
|
+
const e = n.trim().replace(/^#/, ""), r = e.length === 3 ? e.split("").map((t) => t + t).join("") : e;
|
|
221
|
+
return r.length !== 6 || /[^0-9a-fA-F]/.test(r) ? null : {
|
|
222
|
+
r: Number.parseInt(r.slice(0, 2), 16),
|
|
223
|
+
g: Number.parseInt(r.slice(2, 4), 16),
|
|
224
|
+
b: Number.parseInt(r.slice(4, 6), 16)
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function En({ r: n, g: e, b: r }) {
|
|
228
228
|
const t = (o) => Math.max(0, Math.min(255, Math.round(o))).toString(16).padStart(2, "0");
|
|
229
|
-
return `#${t(n)}${t(
|
|
229
|
+
return `#${t(n)}${t(e)}${t(r)}`;
|
|
230
230
|
}
|
|
231
231
|
function H(n) {
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
232
|
+
const e = kn(n);
|
|
233
|
+
if (!e)
|
|
234
234
|
throw new Z(
|
|
235
235
|
`contrast: expected #rgb/#rrggbb, got ${JSON.stringify(n)}. Resolve var()/transparent/color-mix to a literal hex before measuring.`
|
|
236
236
|
);
|
|
237
|
-
return
|
|
237
|
+
return e;
|
|
238
238
|
}
|
|
239
239
|
function L(n) {
|
|
240
|
-
const
|
|
241
|
-
return
|
|
240
|
+
const e = n / 255;
|
|
241
|
+
return e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
|
|
242
242
|
}
|
|
243
243
|
function A(n) {
|
|
244
|
-
const { r, g:
|
|
245
|
-
return 0.2126 * L(
|
|
244
|
+
const { r: e, g: r, b: t } = H(n);
|
|
245
|
+
return 0.2126 * L(e) + 0.7152 * L(r) + 0.0722 * L(t);
|
|
246
246
|
}
|
|
247
|
-
function m(n,
|
|
248
|
-
const
|
|
247
|
+
function m(n, e) {
|
|
248
|
+
const r = A(n), t = A(e), [o, s] = r > t ? [r, t] : [t, r];
|
|
249
249
|
return (o + 0.05) / (s + 0.05);
|
|
250
250
|
}
|
|
251
|
-
function An(n,
|
|
252
|
-
const t = H(n), o = H(
|
|
253
|
-
return
|
|
251
|
+
function An(n, e, r) {
|
|
252
|
+
const t = H(n), o = H(e), s = Math.max(0, Math.min(1, r));
|
|
253
|
+
return En({
|
|
254
254
|
r: t.r + (o.r - t.r) * (1 - s),
|
|
255
255
|
g: t.g + (o.g - t.g) * (1 - s),
|
|
256
256
|
b: t.b + (o.b - t.b) * (1 - s)
|
|
257
257
|
});
|
|
258
258
|
}
|
|
259
|
-
function
|
|
260
|
-
return n + 1e-9 >=
|
|
259
|
+
function x(n, e) {
|
|
260
|
+
return n + 1e-9 >= e;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
263
|
-
const
|
|
264
|
-
return 116 * (
|
|
262
|
+
function vn(n) {
|
|
263
|
+
const e = A(n);
|
|
264
|
+
return 116 * (e > (6 / 29) ** 3 ? Math.cbrt(e) : e / (3 * (6 / 29) ** 2) + 4 / 29) - 16;
|
|
265
265
|
}
|
|
266
266
|
const N = (n) => {
|
|
267
|
-
const
|
|
268
|
-
return
|
|
267
|
+
const e = n / 255;
|
|
268
|
+
return e <= 0.04045 ? e / 12.92 : Math.pow((e + 0.055) / 1.055, 2.4);
|
|
269
269
|
}, Tn = (n) => (n <= 31308e-7 ? 12.92 * n : 1.055 * Math.pow(n, 0.4166666666666667) - 0.055) * 255;
|
|
270
270
|
function Cn(n) {
|
|
271
|
-
const
|
|
272
|
-
if (
|
|
271
|
+
const e = n.trim().replace(/^#/, ""), r = e.length === 3 ? e.split("").map((t) => t + t).join("") : e;
|
|
272
|
+
if (r.length !== 6 || /[^0-9a-fA-F]/.test(r))
|
|
273
273
|
throw new Z(
|
|
274
274
|
`oklch: expected #rgb/#rrggbb, got ${JSON.stringify(n)}`
|
|
275
275
|
);
|
|
276
276
|
return {
|
|
277
|
-
r: Number.parseInt(
|
|
278
|
-
g: Number.parseInt(
|
|
279
|
-
b: Number.parseInt(
|
|
277
|
+
r: Number.parseInt(r.slice(0, 2), 16),
|
|
278
|
+
g: Number.parseInt(r.slice(2, 4), 16),
|
|
279
|
+
b: Number.parseInt(r.slice(4, 6), 16)
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
282
|
function Sn(n) {
|
|
283
|
-
const { r, g:
|
|
283
|
+
const { r: e, g: r, b: t } = Cn(n), o = N(e), s = N(r), c = N(t), u = Math.cbrt(0.4122214708 * o + 0.5363325363 * s + 0.0514459929 * c), i = Math.cbrt(0.2119034982 * o + 0.6806995451 * s + 0.1073969566 * c), d = Math.cbrt(0.0883024619 * o + 0.2817188376 * s + 0.6299787005 * c), l = 0.2104542553 * u + 0.793617785 * i - 0.0040720468 * d, y = 1.9779984951 * u - 2.428592205 * i + 0.4505937099 * d, f = 0.0259040371 * u + 0.7827717662 * i - 0.808675766 * d, g = Math.atan2(f, y) * 180 / Math.PI;
|
|
284
284
|
return { l, c: Math.hypot(y, f), h: g < 0 ? g + 360 : g };
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
const t =
|
|
286
|
+
function P({ l: n, c: e, h: r }) {
|
|
287
|
+
const t = r * Math.PI / 180, o = e * Math.cos(t), s = e * Math.sin(t), c = (n + 0.3963377774 * o + 0.2158037573 * s) ** 3, u = (n - 0.1055613458 * o - 0.0638541728 * s) ** 3, i = (n - 0.0894841775 * o - 1.291485548 * s) ** 3;
|
|
288
288
|
return {
|
|
289
289
|
r: 4.0767416621 * c - 3.3077115913 * u + 0.2309699292 * i,
|
|
290
290
|
g: -1.2684380046 * c + 2.6097574011 * u - 0.3413193965 * i,
|
|
291
291
|
b: -0.0041960863 * c - 0.7034186147 * u + 1.707614701 * i
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
|
-
const h = 1e-4,
|
|
295
|
-
function Bn({ l: n, c:
|
|
296
|
-
if (
|
|
297
|
-
let t = 0, o =
|
|
294
|
+
const h = 1e-4, j = ({ r: n, g: e, b: r }) => n >= -h && n <= 1 + h && e >= -h && e <= 1 + h && r >= -h && r <= 1 + h;
|
|
295
|
+
function Bn({ l: n, c: e, h: r }) {
|
|
296
|
+
if (j(P({ l: n, c: e, h: r }))) return e;
|
|
297
|
+
let t = 0, o = e;
|
|
298
298
|
for (let s = 0; s < 24; s++) {
|
|
299
299
|
const c = (t + o) / 2;
|
|
300
|
-
|
|
300
|
+
j(P({ l: n, c, h: r })) ? t = c : o = c;
|
|
301
301
|
}
|
|
302
302
|
return t;
|
|
303
303
|
}
|
|
304
304
|
function O(n) {
|
|
305
|
-
const
|
|
306
|
-
return `#${t(
|
|
305
|
+
const e = Bn(n), r = P({ ...n, c: e }), t = (o) => Math.max(0, Math.min(255, Math.round(Tn(o)))).toString(16).padStart(2, "0");
|
|
306
|
+
return `#${t(r.r)}${t(r.g)}${t(r.b)}`;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function q(n, e, r, t) {
|
|
309
309
|
const o = Sn(n), s = t === "lighter" ? 1 : 0, c = O({ ...o, l: s });
|
|
310
|
-
if (!
|
|
310
|
+
if (!x(m(c, e), r)) return c;
|
|
311
311
|
let u = o.l, i = s;
|
|
312
312
|
for (let d = 0; d < 24; d++) {
|
|
313
313
|
const l = (u + i) / 2;
|
|
314
|
-
|
|
314
|
+
x(m(O({ ...o, l }), e), r) ? i = l : u = l;
|
|
315
315
|
}
|
|
316
316
|
return O({ ...o, l: i });
|
|
317
317
|
}
|
|
318
|
-
function $(n,
|
|
319
|
-
if (
|
|
320
|
-
const t = A(n) < A(
|
|
318
|
+
function $(n, e, r) {
|
|
319
|
+
if (x(m(n, e), r)) return n;
|
|
320
|
+
const t = A(n) < A(e), o = q(
|
|
321
321
|
n,
|
|
322
|
-
r,
|
|
323
322
|
e,
|
|
323
|
+
r,
|
|
324
324
|
t ? "darker" : "lighter"
|
|
325
325
|
);
|
|
326
|
-
if (
|
|
327
|
-
const s =
|
|
326
|
+
if (x(m(o, e), r)) return o;
|
|
327
|
+
const s = q(
|
|
328
328
|
n,
|
|
329
|
-
r,
|
|
330
329
|
e,
|
|
330
|
+
r,
|
|
331
331
|
t ? "lighter" : "darker"
|
|
332
332
|
);
|
|
333
|
-
return m(s,
|
|
333
|
+
return m(s, e) > m(o, e) ? s : o;
|
|
334
334
|
}
|
|
335
|
-
function wn(n,
|
|
335
|
+
function wn(n, e, r) {
|
|
336
336
|
let t = n;
|
|
337
337
|
for (let o = 0; o < 8; o++) {
|
|
338
338
|
let s = !1;
|
|
339
|
-
for (const c of
|
|
340
|
-
const u = $(t, c,
|
|
339
|
+
for (const c of e) {
|
|
340
|
+
const u = $(t, c, r);
|
|
341
341
|
u !== t && (t = u, s = !0);
|
|
342
342
|
}
|
|
343
343
|
if (!s) break;
|
|
344
344
|
}
|
|
345
345
|
return t;
|
|
346
346
|
}
|
|
347
|
-
function Dn(n,
|
|
348
|
-
let t =
|
|
349
|
-
for (const s of
|
|
347
|
+
function Dn(n, e, r) {
|
|
348
|
+
let t = e[0] ?? "#ffffff", o = -1;
|
|
349
|
+
for (const s of e) {
|
|
350
350
|
const c = m(s, n);
|
|
351
|
-
if (
|
|
351
|
+
if (x(c, r)) return s;
|
|
352
352
|
c > o && (o = c, t = s);
|
|
353
353
|
}
|
|
354
354
|
return t;
|
|
355
355
|
}
|
|
356
|
-
const In = "#2A2C31",
|
|
357
|
-
function
|
|
358
|
-
return $(n.inputBorder, n.input,
|
|
356
|
+
const In = "#2A2C31", _n = "#1C1E23", on = 0.25, ce = on;
|
|
357
|
+
function Mn(n) {
|
|
358
|
+
return $(n.inputBorder, n.input, xn);
|
|
359
359
|
}
|
|
360
|
-
function Ln(n,
|
|
360
|
+
function Ln(n, e, r) {
|
|
361
361
|
const t = [
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
362
|
+
e.surface,
|
|
363
|
+
e.surfaceAlt,
|
|
364
|
+
e.surfaceElevated
|
|
365
365
|
];
|
|
366
|
-
return
|
|
366
|
+
return r === "dark" && t.push(In, _n), t.flatMap((o) => [
|
|
367
367
|
o,
|
|
368
368
|
An(n, o, on)
|
|
369
369
|
]);
|
|
370
370
|
}
|
|
371
|
-
function Nn(n,
|
|
371
|
+
function Nn(n, e, r) {
|
|
372
372
|
return wn(
|
|
373
373
|
n,
|
|
374
|
-
Ln(n,
|
|
374
|
+
Ln(n, e, r),
|
|
375
375
|
D
|
|
376
376
|
);
|
|
377
377
|
}
|
|
378
|
-
const
|
|
378
|
+
const ie = [
|
|
379
379
|
"error",
|
|
380
380
|
"brand",
|
|
381
381
|
"success",
|
|
@@ -383,16 +383,16 @@ const sr = [
|
|
|
383
383
|
"info"
|
|
384
384
|
], On = 60;
|
|
385
385
|
function T(n) {
|
|
386
|
-
return
|
|
386
|
+
return x(m("#ffffff", n), D) || vn(n) >= On ? n : $(n, "#ffffff", D);
|
|
387
387
|
}
|
|
388
|
-
function Hn(n,
|
|
388
|
+
function Hn(n, e) {
|
|
389
389
|
return Dn(
|
|
390
390
|
n,
|
|
391
|
-
["#ffffff",
|
|
391
|
+
["#ffffff", e.surfaceAlt, "#000000"],
|
|
392
392
|
D
|
|
393
393
|
);
|
|
394
394
|
}
|
|
395
|
-
const
|
|
395
|
+
const ae = ["brand", "error", "success", "warning"], Pn = "#D76CB7", Kn = "data-colorblind-safe", K = {
|
|
396
396
|
/** Bluish green. */
|
|
397
397
|
success: "#009e73",
|
|
398
398
|
/** Vermillion. */
|
|
@@ -401,18 +401,18 @@ const cr = ["brand", "error", "success", "warning"], Kn = "#D76CB7", Pn = "data-
|
|
|
401
401
|
warning: "#e69f00",
|
|
402
402
|
/** Sky blue. */
|
|
403
403
|
info: "#56b4e9"
|
|
404
|
-
},
|
|
405
|
-
added:
|
|
406
|
-
deleted:
|
|
404
|
+
}, U = {
|
|
405
|
+
added: K.success,
|
|
406
|
+
deleted: K.error
|
|
407
407
|
};
|
|
408
408
|
function Rn(n) {
|
|
409
|
-
return { ...n, ...
|
|
409
|
+
return { ...n, ...K };
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
return typeof document > "u" ? !1 : document.documentElement.hasAttribute(
|
|
411
|
+
function ue() {
|
|
412
|
+
return typeof document > "u" ? !1 : document.documentElement.hasAttribute(Kn);
|
|
413
413
|
}
|
|
414
|
-
function $n(n,
|
|
415
|
-
const t = (d) => Nn(d, n,
|
|
414
|
+
function $n(n, e, r) {
|
|
415
|
+
const t = (d) => Nn(d, n, e), o = T(n.brand), s = T(n.error), c = T(n.success), u = T(n.warning), i = (d) => Hn(d, n);
|
|
416
416
|
return {
|
|
417
417
|
"--color-surface": n.surface,
|
|
418
418
|
"--color-surface-alt": n.surfaceAlt,
|
|
@@ -428,7 +428,7 @@ function $n(n, r, e) {
|
|
|
428
428
|
// best is 2.52:1), so this cannot be fixed by editing palettes — a theme added tomorrow
|
|
429
429
|
// would bring the same defect back. For a palette that already passes, the derivation is a
|
|
430
430
|
// no-op, and because it moves luminance in OKLCH the border keeps the theme's hue.
|
|
431
|
-
"--color-input-border":
|
|
431
|
+
"--color-input-border": Mn(n),
|
|
432
432
|
"--color-success": n.success,
|
|
433
433
|
"--color-error": n.error,
|
|
434
434
|
"--color-warning": n.warning,
|
|
@@ -440,7 +440,7 @@ function $n(n, r, e) {
|
|
|
440
440
|
"--color-brand-text": t(n.brand),
|
|
441
441
|
// `unique` is a constant, not a palette field — but the backgrounds it sits on are, so its
|
|
442
442
|
// text variant is derived per theme as well.
|
|
443
|
-
"--color-unique-text": t(
|
|
443
|
+
"--color-unique-text": t(Pn),
|
|
444
444
|
"--color-brand-surface": o,
|
|
445
445
|
"--color-error-surface": s,
|
|
446
446
|
"--color-success-surface": c,
|
|
@@ -450,8 +450,8 @@ function $n(n, r, e) {
|
|
|
450
450
|
"--color-on-success": i(c),
|
|
451
451
|
"--color-on-warning": i(u),
|
|
452
452
|
// The diff gutter rides on the same signal (added/deleted ≡ success/error).
|
|
453
|
-
"--color-diff-added":
|
|
454
|
-
"--color-diff-deleted":
|
|
453
|
+
"--color-diff-added": r ? U.added : "",
|
|
454
|
+
"--color-diff-deleted": r ? U.deleted : "",
|
|
455
455
|
"--color-syntax-keyword": n.syntaxKeyword,
|
|
456
456
|
"--color-syntax-string": n.syntaxString,
|
|
457
457
|
"--color-syntax-function": n.syntaxFunction,
|
|
@@ -461,52 +461,52 @@ function $n(n, r, e) {
|
|
|
461
461
|
};
|
|
462
462
|
}
|
|
463
463
|
const X = "data-colorblind-safe", Y = "data-design";
|
|
464
|
-
function sn(n,
|
|
465
|
-
return
|
|
464
|
+
function sn(n, e = !1) {
|
|
465
|
+
return v(n === "system" ? p(e ? "light" : "dark") : n === "dark" ? p("dark") : n === "light" ? p("light") : n);
|
|
466
466
|
}
|
|
467
|
-
function Vn(n,
|
|
467
|
+
function Vn(n, e = {}) {
|
|
468
468
|
var u, i;
|
|
469
|
-
const
|
|
470
|
-
if (!t) return
|
|
471
|
-
const o = t.documentElement, s =
|
|
469
|
+
const r = typeof n == "string" ? sn(n) : n, t = e.document ?? (typeof document < "u" ? document : void 0);
|
|
470
|
+
if (!t) return r;
|
|
471
|
+
const o = t.documentElement, s = e.colorVisionSafe ?? !1;
|
|
472
472
|
s ? o.setAttribute(X, "") : o.removeAttribute(X);
|
|
473
|
-
const c = s ? Rn(
|
|
474
|
-
for (const [d, l] of Object.entries($n(c,
|
|
473
|
+
const c = s ? Rn(r.palette) : r.palette;
|
|
474
|
+
for (const [d, l] of Object.entries($n(c, r.type, s)))
|
|
475
475
|
o.style.setProperty(d, l);
|
|
476
|
-
return (u = t.body) == null || u.classList.remove("light", "dark"), (i = t.body) == null || i.classList.add(
|
|
476
|
+
return (u = t.body) == null || u.classList.remove("light", "dark"), (i = t.body) == null || i.classList.add(r.type), o.classList.remove("light", "dark"), o.classList.add(r.type), o.style.colorScheme = r.type, o.setAttribute("data-app-theme", r.id), r.design ? o.setAttribute(Y, r.design) : o.removeAttribute(Y), r;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function de() {
|
|
479
479
|
return pn();
|
|
480
480
|
}
|
|
481
481
|
const Gn = "vokril-ui-theme", Wn = "(prefers-color-scheme: light)";
|
|
482
|
-
function
|
|
482
|
+
function jn() {
|
|
483
483
|
try {
|
|
484
484
|
return typeof localStorage > "u" ? null : localStorage;
|
|
485
485
|
} catch {
|
|
486
486
|
return null;
|
|
487
487
|
}
|
|
488
488
|
}
|
|
489
|
-
const cn = bn(),
|
|
489
|
+
const cn = bn(), fe = (n) => {
|
|
490
490
|
var V, G;
|
|
491
|
-
const
|
|
492
|
-
if (!
|
|
491
|
+
const e = n.storageKey === void 0 ? Gn : n.storageKey, r = n.storage === void 0 ? jn() : n.storage, t = () => {
|
|
492
|
+
if (!r || !e) return null;
|
|
493
493
|
try {
|
|
494
|
-
return
|
|
494
|
+
return r.getItem(e);
|
|
495
495
|
} catch {
|
|
496
496
|
return null;
|
|
497
497
|
}
|
|
498
|
-
}, o = ((V = n.document) == null ? void 0 : V.defaultView) ?? (typeof window > "u" ? void 0 : window), s = (G = o == null ? void 0 : o.matchMedia) == null ? void 0 : G.call(o, Wn), [c, u] =
|
|
498
|
+
}, o = ((V = n.document) == null ? void 0 : V.defaultView) ?? (typeof window > "u" ? void 0 : window), s = (G = o == null ? void 0 : o.matchMedia) == null ? void 0 : G.call(o, Wn), [c, u] = M(t() ?? n.defaultTheme ?? "dark"), [i, d] = M((s == null ? void 0 : s.matches) ?? !1), [l, y] = M(n.colorVisionSafe ?? !1);
|
|
499
499
|
if (s) {
|
|
500
|
-
const
|
|
501
|
-
s.addEventListener("change",
|
|
500
|
+
const k = (dn) => d(dn.matches);
|
|
501
|
+
s.addEventListener("change", k), gn(() => s.removeEventListener("change", k));
|
|
502
502
|
}
|
|
503
|
-
const f = W(() => sn(c(), i())), g = W(() => f().type), b = (
|
|
504
|
-
if (u(
|
|
503
|
+
const f = W(() => sn(c(), i())), g = W(() => f().type), b = (k) => {
|
|
504
|
+
if (u(k), !(!r || !e))
|
|
505
505
|
try {
|
|
506
|
-
|
|
506
|
+
r.setItem(e, k);
|
|
507
507
|
} catch {
|
|
508
508
|
}
|
|
509
|
-
},
|
|
509
|
+
}, _ = () => b(g() === "dark" ? "light" : "dark");
|
|
510
510
|
yn(() => {
|
|
511
511
|
Vn(f(), {
|
|
512
512
|
colorVisionSafe: l(),
|
|
@@ -518,7 +518,7 @@ const cn = bn(), ur = (n) => {
|
|
|
518
518
|
resolvedTheme: g,
|
|
519
519
|
themeId: () => f().id,
|
|
520
520
|
setTheme: b,
|
|
521
|
-
toggleTheme:
|
|
521
|
+
toggleTheme: _,
|
|
522
522
|
colorVisionSafe: l,
|
|
523
523
|
setColorVisionSafe: y
|
|
524
524
|
};
|
|
@@ -530,7 +530,7 @@ const cn = bn(), ur = (n) => {
|
|
|
530
530
|
});
|
|
531
531
|
};
|
|
532
532
|
let z = !1;
|
|
533
|
-
function
|
|
533
|
+
function le() {
|
|
534
534
|
const n = mn(cn);
|
|
535
535
|
return n || (ln && !z && (z = !0, console.warn("@vokril/ui-solid: useTheme() was called outside <ThemeProvider>; it reports the design's dark theme and ignores setTheme.")), {
|
|
536
536
|
theme: () => "dark",
|
|
@@ -545,86 +545,113 @@ function dr() {
|
|
|
545
545
|
}
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
|
+
const qn = {
|
|
549
|
+
surface: !0,
|
|
550
|
+
surfaceAlt: !0,
|
|
551
|
+
surfaceElevated: !0,
|
|
552
|
+
brand: !0,
|
|
553
|
+
brandHover: !0,
|
|
554
|
+
content: !0,
|
|
555
|
+
contentSecondary: !0,
|
|
556
|
+
border: !0,
|
|
557
|
+
input: !0,
|
|
558
|
+
inputBorder: !0,
|
|
559
|
+
success: !0,
|
|
560
|
+
error: !0,
|
|
561
|
+
warning: !0,
|
|
562
|
+
info: !0,
|
|
563
|
+
syntaxKeyword: !0,
|
|
564
|
+
syntaxString: !0,
|
|
565
|
+
syntaxFunction: !0,
|
|
566
|
+
syntaxComment: !0,
|
|
567
|
+
syntaxNumber: !0,
|
|
568
|
+
syntaxType: !0
|
|
569
|
+
}, ge = Object.freeze(
|
|
570
|
+
Object.keys(qn)
|
|
571
|
+
), Un = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
|
572
|
+
function ye(n) {
|
|
573
|
+
return typeof n == "string" && Un.test(n);
|
|
574
|
+
}
|
|
548
575
|
var Q;
|
|
549
576
|
const J = ((Q = w.find((n) => n.id === Fn)) == null ? void 0 : Q.palette) ?? w[0].palette;
|
|
550
|
-
function
|
|
577
|
+
function Xn(n) {
|
|
551
578
|
return Math.max(0, Math.min(255, Math.round(n)));
|
|
552
579
|
}
|
|
553
580
|
function R(n) {
|
|
554
|
-
const
|
|
555
|
-
return
|
|
556
|
-
r: Number.parseInt(
|
|
557
|
-
g: Number.parseInt(
|
|
558
|
-
b: Number.parseInt(
|
|
581
|
+
const e = n.trim().replace(/^#/, ""), r = e.length === 3 ? e.split("").map((t) => t + t).join("") : e;
|
|
582
|
+
return r.length !== 6 || /[^0-9a-fA-F]/.test(r) ? null : {
|
|
583
|
+
r: Number.parseInt(r.slice(0, 2), 16),
|
|
584
|
+
g: Number.parseInt(r.slice(2, 4), 16),
|
|
585
|
+
b: Number.parseInt(r.slice(4, 6), 16)
|
|
559
586
|
};
|
|
560
587
|
}
|
|
561
|
-
function B({ r: n, g:
|
|
562
|
-
const t = (o) =>
|
|
563
|
-
return `#${t(n)}${t(
|
|
588
|
+
function B({ r: n, g: e, b: r }) {
|
|
589
|
+
const t = (o) => Xn(o).toString(16).padStart(2, "0");
|
|
590
|
+
return `#${t(n)}${t(e)}${t(r)}`;
|
|
564
591
|
}
|
|
565
|
-
function a(n,
|
|
566
|
-
const
|
|
567
|
-
return
|
|
592
|
+
function a(n, e = "#000000") {
|
|
593
|
+
const r = R(n);
|
|
594
|
+
return r ? B(r) : e;
|
|
568
595
|
}
|
|
569
|
-
function F(n,
|
|
570
|
-
const t = R(n), o = R(
|
|
596
|
+
function F(n, e, r) {
|
|
597
|
+
const t = R(n), o = R(e);
|
|
571
598
|
if (!t && !o) return "#000000";
|
|
572
599
|
if (!t) return B(o);
|
|
573
600
|
if (!o) return B(t);
|
|
574
|
-
const s = Math.max(0, Math.min(1,
|
|
601
|
+
const s = Math.max(0, Math.min(1, r));
|
|
575
602
|
return B({
|
|
576
603
|
r: t.r + (o.r - t.r) * s,
|
|
577
604
|
g: t.g + (o.g - t.g) * s,
|
|
578
605
|
b: t.b + (o.b - t.b) * s
|
|
579
606
|
});
|
|
580
607
|
}
|
|
581
|
-
const
|
|
582
|
-
function an(n,
|
|
583
|
-
return F(n,
|
|
608
|
+
const Yn = "#ffffff", zn = "#000000";
|
|
609
|
+
function an(n, e) {
|
|
610
|
+
return F(n, Yn, e);
|
|
584
611
|
}
|
|
585
|
-
function
|
|
586
|
-
return F(n,
|
|
612
|
+
function Jn(n, e) {
|
|
613
|
+
return F(n, zn, e);
|
|
587
614
|
}
|
|
588
|
-
function
|
|
589
|
-
return
|
|
615
|
+
function Qn(n, e, r) {
|
|
616
|
+
return e === "dark" ? an(n, r) : Jn(n, r);
|
|
590
617
|
}
|
|
591
|
-
function C(n,
|
|
592
|
-
return `${a(n)}${
|
|
618
|
+
function C(n, e) {
|
|
619
|
+
return `${a(n)}${e}`;
|
|
593
620
|
}
|
|
594
|
-
function
|
|
621
|
+
function me() {
|
|
595
622
|
if (typeof document > "u") return J;
|
|
596
|
-
const n = getComputedStyle(document.documentElement),
|
|
623
|
+
const n = getComputedStyle(document.documentElement), e = (t, o) => n.getPropertyValue(t).trim() || o, r = J;
|
|
597
624
|
return {
|
|
598
|
-
surface:
|
|
599
|
-
surfaceAlt:
|
|
600
|
-
surfaceElevated:
|
|
601
|
-
brand:
|
|
602
|
-
brandHover:
|
|
603
|
-
content:
|
|
604
|
-
contentSecondary:
|
|
605
|
-
border:
|
|
606
|
-
input:
|
|
607
|
-
inputBorder:
|
|
608
|
-
success:
|
|
609
|
-
error:
|
|
610
|
-
warning:
|
|
611
|
-
info:
|
|
612
|
-
syntaxKeyword:
|
|
613
|
-
syntaxString:
|
|
614
|
-
syntaxFunction:
|
|
615
|
-
syntaxComment:
|
|
616
|
-
syntaxNumber:
|
|
617
|
-
syntaxType:
|
|
625
|
+
surface: e("--color-surface", r.surface),
|
|
626
|
+
surfaceAlt: e("--color-surface-alt", r.surfaceAlt),
|
|
627
|
+
surfaceElevated: e("--color-surface-elevated", r.surfaceElevated),
|
|
628
|
+
brand: e("--color-brand", r.brand),
|
|
629
|
+
brandHover: e("--color-brand-hover", r.brandHover),
|
|
630
|
+
content: e("--color-content", r.content),
|
|
631
|
+
contentSecondary: e("--color-content-secondary", r.contentSecondary),
|
|
632
|
+
border: e("--color-border", r.border),
|
|
633
|
+
input: e("--color-input", r.input),
|
|
634
|
+
inputBorder: e("--color-input-border", r.inputBorder),
|
|
635
|
+
success: e("--color-success", r.success),
|
|
636
|
+
error: e("--color-error", r.error),
|
|
637
|
+
warning: e("--color-warning", r.warning),
|
|
638
|
+
info: e("--color-info", r.info),
|
|
639
|
+
syntaxKeyword: e("--color-syntax-keyword", r.syntaxKeyword),
|
|
640
|
+
syntaxString: e("--color-syntax-string", r.syntaxString),
|
|
641
|
+
syntaxFunction: e("--color-syntax-function", r.syntaxFunction),
|
|
642
|
+
syntaxComment: e("--color-syntax-comment", r.syntaxComment),
|
|
643
|
+
syntaxNumber: e("--color-syntax-number", r.syntaxNumber),
|
|
644
|
+
syntaxType: e("--color-syntax-type", r.syntaxType)
|
|
618
645
|
};
|
|
619
646
|
}
|
|
620
|
-
function
|
|
647
|
+
function be() {
|
|
621
648
|
return typeof document > "u" ? "dark" : document.body.classList.contains("light") ? "light" : "dark";
|
|
622
649
|
}
|
|
623
|
-
function
|
|
650
|
+
function Fe() {
|
|
624
651
|
return typeof document > "u" ? "" : document.documentElement.getAttribute("data-app-theme") ?? "";
|
|
625
652
|
}
|
|
626
|
-
function
|
|
627
|
-
const
|
|
653
|
+
function he(n, e) {
|
|
654
|
+
const r = a(n.syntaxKeyword), t = a(n.syntaxString), o = a(n.syntaxFunction), s = a(n.syntaxComment), c = a(n.syntaxNumber), u = a(n.syntaxType), i = a(n.content), d = a(n.brand), l = a(n.error), y = [
|
|
628
655
|
{ token: "", foreground: i.slice(1) },
|
|
629
656
|
{ token: "comment", foreground: s.slice(1), fontStyle: "italic" },
|
|
630
657
|
{
|
|
@@ -632,13 +659,13 @@ function yr(n, r) {
|
|
|
632
659
|
foreground: s.slice(1),
|
|
633
660
|
fontStyle: "italic"
|
|
634
661
|
},
|
|
635
|
-
{ token: "keyword", foreground:
|
|
636
|
-
{ token: "keyword.sql", foreground:
|
|
637
|
-
{ token: "operator", foreground:
|
|
638
|
-
{ token: "operator.sql", foreground:
|
|
662
|
+
{ token: "keyword", foreground: r.slice(1) },
|
|
663
|
+
{ token: "keyword.sql", foreground: r.slice(1) },
|
|
664
|
+
{ token: "operator", foreground: r.slice(1) },
|
|
665
|
+
{ token: "operator.sql", foreground: r.slice(1) },
|
|
639
666
|
{ token: "string", foreground: t.slice(1) },
|
|
640
667
|
{ token: "string.sql", foreground: t.slice(1) },
|
|
641
|
-
{ token: "string.escape", foreground:
|
|
668
|
+
{ token: "string.escape", foreground: r.slice(1) },
|
|
642
669
|
{ token: "number", foreground: c.slice(1) },
|
|
643
670
|
{ token: "number.float", foreground: c.slice(1) },
|
|
644
671
|
{ token: "number.hex", foreground: c.slice(1) },
|
|
@@ -652,12 +679,12 @@ function yr(n, r) {
|
|
|
652
679
|
{ token: "identifier.quote", foreground: t.slice(1) },
|
|
653
680
|
{ token: "variable", foreground: i.slice(1) },
|
|
654
681
|
{ token: "delimiter", foreground: i.slice(1) },
|
|
655
|
-
{ token: "tag", foreground:
|
|
682
|
+
{ token: "tag", foreground: r.slice(1) },
|
|
656
683
|
{ token: "attribute.name", foreground: o.slice(1) },
|
|
657
684
|
{ token: "attribute.value", foreground: t.slice(1) },
|
|
658
685
|
{ token: "annotation", foreground: n.warning.replace(/^#/, "") },
|
|
659
686
|
{ token: "regexp", foreground: l.slice(1) }
|
|
660
|
-
], f = a(n.surfaceAlt), g = a(n.surface), b = a(n.surfaceElevated),
|
|
687
|
+
], f = a(n.surfaceAlt), g = a(n.surface), b = a(n.surfaceElevated), _ = {
|
|
661
688
|
"editor.background": f,
|
|
662
689
|
"editor.foreground": i,
|
|
663
690
|
"editorLineNumber.foreground": a(n.contentSecondary),
|
|
@@ -683,14 +710,14 @@ function yr(n, r) {
|
|
|
683
710
|
"editor.findRangeHighlightBackground": C(b, "60")
|
|
684
711
|
};
|
|
685
712
|
return {
|
|
686
|
-
base:
|
|
713
|
+
base: e === "dark" ? "vs-dark" : "vs",
|
|
687
714
|
inherit: !0,
|
|
688
715
|
rules: y,
|
|
689
|
-
colors:
|
|
716
|
+
colors: _
|
|
690
717
|
};
|
|
691
718
|
}
|
|
692
|
-
function
|
|
693
|
-
const
|
|
719
|
+
function pe(n, e) {
|
|
720
|
+
const r = a(n.surface), t = a(n.surfaceElevated), o = a(n.content), s = a(n.contentSecondary), c = a(n.brand), u = a(n.error), i = a(n.success), d = a(n.warning), l = a(n.info), y = a(n.syntaxKeyword), f = (b) => Qn(b, e, 0.22), g = {
|
|
694
721
|
black: t,
|
|
695
722
|
red: u,
|
|
696
723
|
green: i,
|
|
@@ -706,10 +733,10 @@ function mr(n, r) {
|
|
|
706
733
|
brightBlue: f(c),
|
|
707
734
|
brightMagenta: f(y),
|
|
708
735
|
brightCyan: f(l),
|
|
709
|
-
brightWhite:
|
|
736
|
+
brightWhite: e === "dark" ? an(o, 0.25) : o
|
|
710
737
|
};
|
|
711
738
|
return {
|
|
712
|
-
background:
|
|
739
|
+
background: r,
|
|
713
740
|
foreground: o,
|
|
714
741
|
cursor: c,
|
|
715
742
|
selectionBackground: F(t, c, 0.2),
|
|
@@ -717,40 +744,42 @@ function mr(n, r) {
|
|
|
717
744
|
};
|
|
718
745
|
}
|
|
719
746
|
export {
|
|
720
|
-
|
|
721
|
-
|
|
747
|
+
Ln as A,
|
|
748
|
+
w as B,
|
|
749
|
+
Rn as C,
|
|
722
750
|
Fn as D,
|
|
723
|
-
|
|
751
|
+
le as E,
|
|
752
|
+
ae as I,
|
|
724
753
|
hn as L,
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
754
|
+
ce as M,
|
|
755
|
+
U as O,
|
|
756
|
+
ie as T,
|
|
757
|
+
Pn as U,
|
|
758
|
+
_n as W,
|
|
730
759
|
nn as a,
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
760
|
+
ge as b,
|
|
761
|
+
fe as c,
|
|
762
|
+
In as d,
|
|
763
|
+
T as e,
|
|
764
|
+
Mn as f,
|
|
765
|
+
Hn as g,
|
|
766
|
+
Nn as h,
|
|
767
|
+
Vn as i,
|
|
768
|
+
$n as j,
|
|
769
|
+
he as k,
|
|
770
|
+
pe as l,
|
|
771
|
+
p as m,
|
|
772
|
+
v as n,
|
|
773
|
+
te as o,
|
|
774
|
+
pn as p,
|
|
775
|
+
de as q,
|
|
776
|
+
ue as r,
|
|
777
|
+
se as s,
|
|
778
|
+
ye as t,
|
|
779
|
+
me as u,
|
|
780
|
+
Fe as v,
|
|
781
|
+
be as w,
|
|
782
|
+
oe as x,
|
|
783
|
+
sn as y,
|
|
784
|
+
re as z
|
|
756
785
|
};
|