@vokril/ui-solid 0.37.1 → 0.39.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 +33 -0
- package/dist/{AttributeGrid-tjVwSI4h.js → AttributeGrid-3O2W3ypv.js} +4 -4
- package/dist/{AttributeGrid-BNQaSpfE.cjs → AttributeGrid-qffaa5uv.cjs} +1 -1
- package/dist/{Button-D5Ihf90u.cjs → Button-CjjrlIug.cjs} +1 -1
- package/dist/{Button-DDkZzT-k.js → Button-CoxxUtMl.js} +1 -1
- package/dist/{CommandPalette-CGfXynfl.js → CommandPalette-BPDQPwyo.js} +48 -49
- package/dist/CommandPalette-CScLgfJA.cjs +2 -0
- package/dist/{CopyButton-gHxA-WL_.js → CopyButton-BaqPB0w9.js} +1 -1
- package/dist/{CopyButton-Hb6c_Oq1.cjs → CopyButton-Dd1ySSdc.cjs} +1 -1
- package/dist/{DateRangePicker-EEcp-IbM.cjs → DateRangePicker-D_MkyBuB.cjs} +1 -1
- package/dist/{DateRangePicker-B36NSGMS.js → DateRangePicker-Dovq_H9v.js} +5 -5
- package/dist/{GuidedTour-DicNwdq3.cjs → GuidedTour-D5M-Cuiu.cjs} +1 -1
- package/dist/{GuidedTour-bcaKpXPX.js → GuidedTour-_7EdPe59.js} +4 -4
- package/dist/{HostPortal-DsVQEH2q.js → HostPortal-CemXpUw0.js} +1 -1
- package/dist/{HostPortal-C1xTPZYj.cjs → HostPortal-d3C82uoY.cjs} +1 -1
- package/dist/{IconPicker-D60txter.cjs → IconPicker-B7u2Oirr.cjs} +1 -1
- package/dist/{IconPicker-7sF4n6vD.js → IconPicker-Cs9aZbov.js} +5 -5
- package/dist/{Input-agpwYeJd.js → Input-B-u9iAeF.js} +1 -1
- package/dist/{Input-DTm6v0fK.cjs → Input-B8JpqQm8.cjs} +1 -1
- package/dist/Modal-D7VNY7qc.cjs +1 -0
- package/dist/Modal-DFl9kHgo.js +771 -0
- package/dist/{PageSkeleton-XNfK8xoY.js → PageSkeleton-DXw1bN_s.js} +4 -4
- package/dist/{PageSkeleton-jljSUpu1.cjs → PageSkeleton-DfGcl7by.cjs} +1 -1
- package/dist/{SearchableSelect-DFdGGNR6.js → SearchableSelect-C8yQ-rOw.js} +3 -3
- package/dist/{SearchableSelect-CXPSoFqf.cjs → SearchableSelect-CEW9xqrV.cjs} +1 -1
- package/dist/{StatusBarNotificationBell-CnmMzXzD.js → StatusBarNotificationBell-0ZAKX6Pm.js} +90 -89
- package/dist/{StatusBarNotificationBell-MXX_K48w.cjs → StatusBarNotificationBell-p5z1utb0.cjs} +17 -17
- package/dist/{Stepper-D0rrrtAN.js → Stepper-BajLVWIf.js} +1 -1
- package/dist/{Stepper-BLKD4ub3.cjs → Stepper-D0oLl7n5.cjs} +1 -1
- package/dist/{Textarea-CKJDNOaL.js → Textarea-DDBLgvqI.js} +1 -1
- package/dist/{Textarea-Ds3bMrq9.cjs → Textarea-DwoGhZ2o.cjs} +1 -1
- package/dist/{TimeSeriesChart-DBARL8HG.js → TimeSeriesChart-BHpO2mgd.js} +1 -1
- package/dist/{TimeSeriesChart-B9cqfs1M.cjs → TimeSeriesChart-Cz_aDLuL.cjs} +1 -1
- package/dist/ToggleButton-DD7P-ygT.js +2230 -0
- package/dist/ToggleButton-QvGzJEMX.cjs +1 -0
- package/dist/_internal/platform/settings/registry/fieldSpec.d.cts +20 -0
- package/dist/_internal/platform/settings/registry/fieldSpec.d.ts +20 -0
- package/dist/{server/appThemeDerivation--Nybjbd2.js → appThemeDerivation-CpLVZ6pd.js} +87 -83
- package/dist/appThemeDerivation-SYga-7OU.cjs +1 -0
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/createDialogShellFocus-CWUvggZT.cjs +1 -0
- package/dist/createDialogShellFocus-DGywzFLf.js +108 -0
- package/dist/createResizableSidebar-DaKeauOW.cjs +1 -0
- package/dist/createResizableSidebar-aJsKEsWW.js +1131 -0
- package/dist/de-0s2sq5fV.cjs +1 -0
- package/dist/{de-CSWSMGCG.js → de-CwV1LVg7.js} +67 -57
- package/dist/{defineSettings-Di1sG81q.js → defineSettings-CDbllpYi.js} +97 -97
- package/dist/defineSettings-D2AaV355.cjs +1 -0
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +3 -3
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +21 -22
- package/dist/forms/NumberInput.d.cts +6 -0
- package/dist/forms/NumberInput.d.ts +6 -0
- package/dist/forms/RadioGroup.d.cts +5 -0
- package/dist/forms/RadioGroup.d.ts +5 -0
- package/dist/forms/Slider.d.cts +11 -0
- package/dist/forms/Slider.d.ts +11 -0
- package/dist/forms/index.cjs +1 -1
- package/dist/forms/index.js +32 -31
- package/dist/grid/index.cjs +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/{server/headerIconOverrides-Dh2PaOcO.js → headerIconOverrides-C91HoTIu.js} +1 -1
- package/dist/{headerIconOverrides-Bn1QuODq.cjs → headerIconOverrides-DldzXQvu.cjs} +1 -1
- package/dist/host/index.cjs +1 -1
- package/dist/host/index.js +1 -1
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/messageKeys.d.cts +1 -1
- package/dist/i18n/messageKeys.d.ts +1 -1
- package/dist/{i18n-DrmazJQC.cjs → i18n-CMATMGUq.cjs} +1 -1
- package/dist/{i18n-BJiKwNyr.js → i18n-Sl2PGRJm.js} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +473 -469
- package/dist/layout/SettingsCard.d.cts +50 -4
- package/dist/layout/SettingsCard.d.ts +50 -4
- package/dist/layout/SettingsPageHeader.d.cts +26 -0
- package/dist/layout/SettingsPageHeader.d.ts +26 -0
- package/dist/layout/SettingsSaveBar.d.cts +27 -0
- package/dist/layout/SettingsSaveBar.d.ts +27 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.d.cts +2 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.js +19 -16
- package/dist/mainRealmDom-DPOYak2f.js +241 -0
- package/dist/mainRealmDom-DR-EKDyJ.cjs +1 -0
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.js +2 -2
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.js +81 -81
- package/dist/{rowSource-BWm-kZHe.cjs → rowSource-Dp03nFHg.cjs} +1 -1
- package/dist/{rowSource-DEulMv5F.js → rowSource-DzBH734K.js} +1 -1
- package/dist/server/{AttributeGrid-fT5-b9ZJ.cjs → AttributeGrid-BPyB5H_H.cjs} +1 -1
- package/dist/server/{AttributeGrid-BmS2U5Gz.js → AttributeGrid-D0HdnQwA.js} +4 -4
- package/dist/server/{Button-lNnNp0um.cjs → Button-BYua2a1G.cjs} +1 -1
- package/dist/server/{Button-XL9Os1pR.js → Button-Dm6WTzyZ.js} +1 -1
- package/dist/server/{CommandPalette-CgTnmrYx.js → CommandPalette-1riKvsQ7.js} +58 -59
- package/dist/server/CommandPalette-C3vIL_Xy.cjs +1 -0
- package/dist/server/{CopyButton-BpbGM72h.cjs → CopyButton-C8X9_i2U.cjs} +1 -1
- package/dist/server/{CopyButton-BdU_8aZB.js → CopyButton-CiIn4JgO.js} +1 -1
- package/dist/server/{DateRangePicker-ClJHlO9g.cjs → DateRangePicker-C__y0HCf.cjs} +1 -1
- package/dist/server/{DateRangePicker-DGXmbyCR.js → DateRangePicker-Dcf63rgk.js} +5 -5
- package/dist/server/{GuidedTour-CCkg6Paz.js → GuidedTour-C2qj1eJV.js} +4 -4
- package/dist/server/{GuidedTour-PETCExHX.cjs → GuidedTour-dHkVCPDa.cjs} +1 -1
- package/dist/server/{HostPortal-BNGZ8nw4.cjs → HostPortal-Cer0ZWuN.cjs} +1 -1
- package/dist/server/{HostPortal-CdhnKAWT.js → HostPortal-DrWkfjom.js} +1 -1
- package/dist/server/IconPicker-CVKAPry2.cjs +1 -0
- package/dist/server/IconPicker-DFdvzkBa.js +177 -0
- package/dist/server/{Input-DFAn8kou.js → Input-CZRn0xEu.js} +1 -1
- package/dist/server/{Input-DOTXKwhw.cjs → Input-D-AsptC1.cjs} +1 -1
- package/dist/server/Modal-C0XgZxFM.js +666 -0
- package/dist/server/Modal-Z2GKE_pB.cjs +1 -0
- package/dist/server/{PageSkeleton--ssP7Di9.cjs → PageSkeleton-CAOjFqLX.cjs} +1 -1
- package/dist/server/{PageSkeleton-DRPIcDHU.js → PageSkeleton-mUvFZjuO.js} +4 -4
- package/dist/server/{SearchableSelect-y0Fr7cPS.js → SearchableSelect-B_YzkqQ1.js} +3 -3
- package/dist/server/{SearchableSelect-DsHkuiTW.cjs → SearchableSelect-D7D8wc41.cjs} +1 -1
- package/dist/server/{StatusBarNotificationBell-CY16bTyI.js → StatusBarNotificationBell-BSf6AYup.js} +93 -92
- package/dist/server/{StatusBarNotificationBell-BrHZ2r3X.cjs → StatusBarNotificationBell-CXy6l96T.cjs} +16 -16
- package/dist/server/{Stepper-BOVzsqcG.cjs → Stepper-M6pNQENY.cjs} +1 -1
- package/dist/server/{Stepper-DC34G5fk.js → Stepper-NOcT2PUr.js} +1 -1
- package/dist/server/{Textarea-D43xOjAJ.cjs → Textarea-BbNqLhyF.cjs} +1 -1
- package/dist/server/{Textarea-CL2wYpW7.js → Textarea-oZhm52Ze.js} +1 -1
- package/dist/server/{TimeSeriesChart-CP-2M3R7.js → TimeSeriesChart-BnQVcl3k.js} +1 -1
- package/dist/server/{TimeSeriesChart-CL1GjjV5.cjs → TimeSeriesChart-e1SNJn0I.cjs} +1 -1
- package/dist/server/ToggleButton-0RDr232S.js +1409 -0
- package/dist/server/ToggleButton-DlmABUC0.cjs +1 -0
- package/dist/server/VpRefresh-CtYYafTv.cjs +1 -0
- package/dist/server/{VpRefresh-Dlqsm9Va.js → VpRefresh-D5QKuisA.js} +21 -7
- package/dist/server/{VpUpload-_n-qdj9q.js → VpUpload-CSRCHUzX.js} +13 -27
- package/dist/server/VpUpload-D6fJ79Sq.cjs +1 -0
- package/dist/{appThemeDerivation--Nybjbd2.js → server/appThemeDerivation-CpLVZ6pd.js} +87 -83
- package/dist/server/appThemeDerivation-SYga-7OU.cjs +1 -0
- package/dist/server/charts/index.cjs +1 -1
- package/dist/server/charts/index.js +1 -1
- package/dist/server/createDialogShellFocus-Bi1WKkUj.cjs +1 -0
- package/dist/server/createDialogShellFocus-ak-XCTsF.js +130 -0
- package/dist/server/createResizableSidebar-BEKgedv0.js +826 -0
- package/dist/server/createResizableSidebar-Ccg1QdCD.cjs +1 -0
- package/dist/server/de-0s2sq5fV.cjs +1 -0
- package/dist/server/{de-CSWSMGCG.js → de-CwV1LVg7.js} +67 -57
- package/dist/server/{defineSettings-Di1sG81q.js → defineSettings-CDbllpYi.js} +97 -97
- package/dist/server/defineSettings-D2AaV355.cjs +1 -0
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +3 -3
- package/dist/server/feedback/index.cjs +1 -1
- package/dist/server/feedback/index.js +21 -22
- package/dist/server/forms/index.cjs +1 -1
- package/dist/server/forms/index.js +32 -31
- package/dist/server/grid/index.cjs +1 -1
- package/dist/server/grid/index.js +1 -1
- package/dist/{headerIconOverrides-Dh2PaOcO.js → server/headerIconOverrides-C91HoTIu.js} +1 -1
- package/dist/server/{headerIconOverrides-Bn1QuODq.cjs → headerIconOverrides-DldzXQvu.cjs} +1 -1
- package/dist/server/host/index.cjs +1 -1
- package/dist/server/host/index.js +1 -1
- package/dist/server/i18n/index.cjs +1 -1
- package/dist/server/i18n/index.js +1 -1
- package/dist/server/{i18n-DrmazJQC.cjs → i18n-CMATMGUq.cjs} +1 -1
- package/dist/server/{i18n-BJiKwNyr.js → i18n-Sl2PGRJm.js} +2 -2
- package/dist/server/index-BvvCpxSh.cjs +1 -0
- package/dist/server/{index-vTHpJ130.js → index-DlDNpxRq.js} +3878 -3890
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +360 -356
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +19 -16
- package/dist/server/mainRealmDom-Cq0tErb0.cjs +1 -0
- package/dist/server/mainRealmDom-D514acmj.js +208 -0
- 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 +2 -2
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +88 -88
- package/dist/server/{rowSource-BOt_vVGY.cjs → rowSource-DmvigIWa.cjs} +1 -1
- package/dist/server/{rowSource-WElLH5Tb.js → rowSource-YeumsqcV.js} +1 -1
- package/dist/server/settings/index.cjs +1 -1
- package/dist/server/settings/index.js +3 -3
- package/dist/server/tokens/index.cjs +1 -1
- package/dist/server/tokens/index.js +1 -1
- package/dist/server/tr-BX8BaTSw.cjs +1 -0
- package/dist/{tr-BL1soeyr.js → server/tr-LIF9No7k.js} +66 -56
- package/dist/server/tree/index.cjs +1 -1
- package/dist/server/tree/index.js +1 -1
- package/dist/{useSettingsSubscription-DLEk4k4j.js → server/useSettingsSubscription-CRRJdYJ-.js} +1 -1
- package/dist/{useSettingsSubscription-DKjCwmRd.cjs → server/useSettingsSubscription-DGo_GObq.cjs} +1 -1
- package/dist/settings/index.cjs +1 -1
- package/dist/settings/index.js +3 -3
- package/dist/solid/_internal/platform/settings/registry/defineSettings.js +6 -0
- package/dist/solid/forms/NumberInput.jsx +15 -7
- package/dist/solid/forms/RadioGroup.jsx +6 -1
- package/dist/solid/forms/RadioGroup.module.css.js +2 -0
- package/dist/solid/forms/Slider.jsx +19 -2
- package/dist/solid/forms/Slider.module.css.js +3 -1
- package/dist/solid/forms/TagInput.module.css.js +1 -1
- package/dist/solid/i18n/locales/de.json +9 -1
- package/dist/solid/i18n/locales/tr.json +9 -1
- package/dist/solid/layout/SettingsCard.jsx +57 -5
- package/dist/solid/layout/SettingsCard.module.css.js +10 -1
- package/dist/solid/layout/SettingsPageHeader.jsx +34 -0
- package/dist/solid/layout/SettingsSaveBar.jsx +27 -0
- package/dist/solid/layout/SettingsSaveBar.module.css.js +8 -0
- package/dist/solid/layout/SettingsSubpageHeader.module.css.js +3 -0
- package/dist/solid/layout/index.js +2 -0
- package/dist/solid/tokens/palette/accessiblePalette.js +1 -1
- package/dist/solid/tokens/palette/palettes.js +2 -2
- package/dist/solid/widgets/SettingsField.module.css.js +2 -2
- package/dist/style.css +26 -20
- package/dist/theme.css +25 -19
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/palette/accessiblePalette.d.cts +4 -0
- package/dist/tokens/palette/accessiblePalette.d.ts +4 -0
- package/dist/tokens/tokens.css +25 -19
- package/dist/tr-BX8BaTSw.cjs +1 -0
- package/dist/{server/tr-BL1soeyr.js → tr-LIF9No7k.js} +66 -56
- package/dist/tree/index.cjs +1 -1
- package/dist/tree/index.js +1 -1
- package/dist/ui.css +1 -1
- package/dist/{server/useSettingsSubscription-DLEk4k4j.js → useSettingsSubscription-CRRJdYJ-.js} +1 -1
- package/dist/{server/useSettingsSubscription-DKjCwmRd.cjs → useSettingsSubscription-DGo_GObq.cjs} +1 -1
- package/package.json +1 -1
- package/dist/CommandPalette-CdiIycaW.cjs +0 -2
- package/dist/Kbd-BDZklpw9.cjs +0 -1
- package/dist/Kbd-DF6Tvp8V.js +0 -191
- package/dist/Modal-C1vp7z7l.cjs +0 -1
- package/dist/Modal-aKptl9ig.js +0 -599
- package/dist/ToggleButton-DaDfg2cC.js +0 -2186
- package/dist/ToggleButton-WoM2S_S4.cjs +0 -1
- package/dist/appThemeDerivation-Cgg74S4e.cjs +0 -1
- package/dist/createDialogShellFocus-C2FKc2rv.cjs +0 -1
- package/dist/createDialogShellFocus-CgjiySLA.js +0 -282
- package/dist/createResizableSidebar-BqW3Ozgd.cjs +0 -1
- package/dist/createResizableSidebar-CKbN032u.js +0 -853
- package/dist/de-BQbrl0SL.cjs +0 -1
- package/dist/defineSettings-D0CSMcyy.cjs +0 -1
- package/dist/mainRealmDom-BcPuVvcy.cjs +0 -1
- package/dist/mainRealmDom-DydRT2Us.js +0 -54
- package/dist/server/CommandPalette-C0MbWZHM.cjs +0 -1
- package/dist/server/IconPicker-B5lUuCxR.js +0 -162
- package/dist/server/IconPicker-BfRZtScr.cjs +0 -1
- package/dist/server/Kbd-BPlUnyiy.cjs +0 -1
- package/dist/server/Kbd-BTbz_c_e.js +0 -170
- package/dist/server/Modal-BI3FtG-d.cjs +0 -1
- package/dist/server/Modal-Cbmikig8.js +0 -426
- package/dist/server/ToggleButton-BmvcLm_6.cjs +0 -1
- package/dist/server/ToggleButton-oDCxuzfp.js +0 -1375
- package/dist/server/VpRefresh-CEyHVNo-.cjs +0 -1
- package/dist/server/VpUpload-Bzy0ViGU.cjs +0 -1
- package/dist/server/appThemeDerivation-Cgg74S4e.cjs +0 -1
- package/dist/server/createDialogShellFocus-BXCNQyU9.js +0 -370
- package/dist/server/createDialogShellFocus-CKsZl9Uz.cjs +0 -1
- package/dist/server/createResizableSidebar-B8zMo4jJ.js +0 -599
- package/dist/server/createResizableSidebar-DXFKY01F.cjs +0 -1
- package/dist/server/de-BQbrl0SL.cjs +0 -1
- package/dist/server/defineSettings-D0CSMcyy.cjs +0 -1
- package/dist/server/index-CME-IDQX.cjs +0 -1
- package/dist/server/mainRealmDom-BuGEeM_r.cjs +0 -1
- package/dist/server/mainRealmDom-CzckS_ss.js +0 -42
- package/dist/server/tr-sOAsJS3P.cjs +0 -1
- package/dist/tr-sOAsJS3P.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { createComponent as
|
|
2
|
-
import { createSignal as _, onCleanup as
|
|
3
|
-
import { B as
|
|
1
|
+
import { createComponent as ln, isDev as gn } from "solid-js/web";
|
|
2
|
+
import { createSignal as _, onCleanup as yn, createMemo as G, createEffect as mn, useContext as bn, createContext as Fn } from "solid-js";
|
|
3
|
+
import { B as Q } from "./bugIndicatingError-h3J5qkL6.js";
|
|
4
4
|
const w = [
|
|
5
5
|
{
|
|
6
6
|
id: "viper-dark",
|
|
@@ -8,7 +8,7 @@ const w = [
|
|
|
8
8
|
type: "dark",
|
|
9
9
|
design: "viper",
|
|
10
10
|
palette: {
|
|
11
|
-
surface: "#
|
|
11
|
+
surface: "#1A1A1E",
|
|
12
12
|
surfaceAlt: "#07080B",
|
|
13
13
|
surfaceElevated: "#1E1F23",
|
|
14
14
|
brand: "#808AE5",
|
|
@@ -16,7 +16,7 @@ const w = [
|
|
|
16
16
|
content: "#F1F1F4",
|
|
17
17
|
contentSecondary: "#B9BAC0",
|
|
18
18
|
border: "#232428",
|
|
19
|
-
input: "#
|
|
19
|
+
input: "#1E1F23",
|
|
20
20
|
inputBorder: "#232428",
|
|
21
21
|
success: "#4FB772",
|
|
22
22
|
error: "#E05D5A",
|
|
@@ -168,16 +168,16 @@ const w = [
|
|
|
168
168
|
syntaxComment: "#404040"
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
],
|
|
171
|
+
], Z = {
|
|
172
172
|
viper: { dark: "viper-dark", light: "viper-light" },
|
|
173
173
|
vokril: { dark: "vokril-dark", light: "vokril-light" }
|
|
174
|
-
},
|
|
174
|
+
}, hn = "viper-dark", pn = {
|
|
175
175
|
darcula: "viper-dark",
|
|
176
176
|
light: "viper-light"
|
|
177
|
-
},
|
|
177
|
+
}, nn = (n) => pn[n] ?? n;
|
|
178
178
|
let D = "viper";
|
|
179
179
|
function nr(n) {
|
|
180
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
180
|
+
if (!Object.prototype.hasOwnProperty.call(Z, n))
|
|
181
181
|
throw new Error(`Unknown theme design: ${String(n)}`);
|
|
182
182
|
D = n;
|
|
183
183
|
}
|
|
@@ -185,7 +185,7 @@ function rr() {
|
|
|
185
185
|
return D;
|
|
186
186
|
}
|
|
187
187
|
function p(n = "dark") {
|
|
188
|
-
return
|
|
188
|
+
return Z[D][n];
|
|
189
189
|
}
|
|
190
190
|
const v = [];
|
|
191
191
|
function er(n) {
|
|
@@ -196,27 +196,27 @@ function er(n) {
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
199
|
+
function rn(n) {
|
|
200
200
|
for (const r of v) {
|
|
201
201
|
const e = r.byId(n);
|
|
202
202
|
if (e !== null) return e;
|
|
203
203
|
}
|
|
204
204
|
return null;
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const en = (n) => n.design === void 0 || n.design === D, S = (n) => w.find((r) => r.id === n);
|
|
207
207
|
function E(n) {
|
|
208
|
-
const r =
|
|
209
|
-
return e && !
|
|
208
|
+
const r = nn(n), e = S(r);
|
|
209
|
+
return e && !en(e) ? S(p(e.type)) : e ?? rn(r) ?? S(p());
|
|
210
210
|
}
|
|
211
|
-
function
|
|
212
|
-
return [...w.filter(
|
|
211
|
+
function kn() {
|
|
212
|
+
return [...w.filter(en), ...v.flatMap((n) => n.options())];
|
|
213
213
|
}
|
|
214
214
|
function tr(n) {
|
|
215
|
-
const r =
|
|
216
|
-
return S(r) !== void 0 ||
|
|
215
|
+
const r = nn(n);
|
|
216
|
+
return S(r) !== void 0 || rn(r) !== null;
|
|
217
217
|
}
|
|
218
|
-
const I = 4.5,
|
|
219
|
-
function
|
|
218
|
+
const I = 4.5, xn = 3;
|
|
219
|
+
function vn(n) {
|
|
220
220
|
const r = n.trim().replace(/^#/, ""), e = r.length === 3 ? r.split("").map((t) => t + t).join("") : r;
|
|
221
221
|
return e.length !== 6 || /[^0-9a-fA-F]/.test(e) ? null : {
|
|
222
222
|
r: Number.parseInt(e.slice(0, 2), 16),
|
|
@@ -224,14 +224,14 @@ function xn(n) {
|
|
|
224
224
|
b: Number.parseInt(e.slice(4, 6), 16)
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function An({ r: n, g: r, b: e }) {
|
|
228
228
|
const t = (o) => Math.max(0, Math.min(255, Math.round(o))).toString(16).padStart(2, "0");
|
|
229
229
|
return `#${t(n)}${t(r)}${t(e)}`;
|
|
230
230
|
}
|
|
231
231
|
function H(n) {
|
|
232
|
-
const r =
|
|
232
|
+
const r = vn(n);
|
|
233
233
|
if (!r)
|
|
234
|
-
throw new
|
|
234
|
+
throw new Q(
|
|
235
235
|
`contrast: expected #rgb/#rrggbb, got ${JSON.stringify(n)}. Resolve var()/transparent/color-mix to a literal hex before measuring.`
|
|
236
236
|
);
|
|
237
237
|
return r;
|
|
@@ -248,9 +248,9 @@ function m(n, r) {
|
|
|
248
248
|
const e = A(n), t = A(r), [o, s] = e > t ? [e, t] : [t, e];
|
|
249
249
|
return (o + 0.05) / (s + 0.05);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function En(n, r, e) {
|
|
252
252
|
const t = H(n), o = H(r), s = Math.max(0, Math.min(1, e));
|
|
253
|
-
return
|
|
253
|
+
return An({
|
|
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)
|
|
@@ -259,18 +259,18 @@ function An(n, r, e) {
|
|
|
259
259
|
function k(n, r) {
|
|
260
260
|
return n + 1e-9 >= r;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function Tn(n) {
|
|
263
263
|
const r = A(n);
|
|
264
264
|
return 116 * (r > (6 / 29) ** 3 ? Math.cbrt(r) : r / (3 * (6 / 29) ** 2) + 4 / 29) - 16;
|
|
265
265
|
}
|
|
266
266
|
const N = (n) => {
|
|
267
267
|
const r = n / 255;
|
|
268
268
|
return r <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
|
|
269
|
-
},
|
|
270
|
-
function
|
|
269
|
+
}, Bn = (n) => (n <= 31308e-7 ? 12.92 * n : 1.055 * Math.pow(n, 0.4166666666666667) - 0.055) * 255;
|
|
270
|
+
function Sn(n) {
|
|
271
271
|
const r = n.trim().replace(/^#/, ""), e = r.length === 3 ? r.split("").map((t) => t + t).join("") : r;
|
|
272
272
|
if (e.length !== 6 || /[^0-9a-fA-F]/.test(e))
|
|
273
|
-
throw new
|
|
273
|
+
throw new Q(
|
|
274
274
|
`oklch: expected #rgb/#rrggbb, got ${JSON.stringify(n)}`
|
|
275
275
|
);
|
|
276
276
|
return {
|
|
@@ -279,8 +279,8 @@ function Bn(n) {
|
|
|
279
279
|
b: Number.parseInt(e.slice(4, 6), 16)
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
|
-
function
|
|
283
|
-
const { r, g: e, b: t } =
|
|
282
|
+
function Cn(n) {
|
|
283
|
+
const { r, g: e, b: t } = Sn(n), o = N(r), s = N(e), 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
286
|
function K({ l: n, c: r, h: e }) {
|
|
@@ -291,22 +291,22 @@ function K({ l: n, c: r, h: e }) {
|
|
|
291
291
|
b: -0.0041960863 * c - 0.7034186147 * u + 1.707614701 * i
|
|
292
292
|
};
|
|
293
293
|
}
|
|
294
|
-
const h = 1e-4,
|
|
295
|
-
function
|
|
296
|
-
if (
|
|
294
|
+
const h = 1e-4, W = ({ r: n, g: r, b: e }) => n >= -h && n <= 1 + h && r >= -h && r <= 1 + h && e >= -h && e <= 1 + h;
|
|
295
|
+
function wn({ l: n, c: r, h: e }) {
|
|
296
|
+
if (W(K({ l: n, c: r, h: e }))) return r;
|
|
297
297
|
let t = 0, o = r;
|
|
298
298
|
for (let s = 0; s < 24; s++) {
|
|
299
299
|
const c = (t + o) / 2;
|
|
300
|
-
|
|
300
|
+
W(K({ l: n, c, h: e })) ? t = c : o = c;
|
|
301
301
|
}
|
|
302
302
|
return t;
|
|
303
303
|
}
|
|
304
304
|
function O(n) {
|
|
305
|
-
const r =
|
|
305
|
+
const r = wn(n), e = K({ ...n, c: r }), t = (o) => Math.max(0, Math.min(255, Math.round(Bn(o)))).toString(16).padStart(2, "0");
|
|
306
306
|
return `#${t(e.r)}${t(e.g)}${t(e.b)}`;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
const o =
|
|
308
|
+
function q(n, r, e, t) {
|
|
309
|
+
const o = Cn(n), s = t === "lighter" ? 1 : 0, c = O({ ...o, l: s });
|
|
310
310
|
if (!k(m(c, r), e)) return c;
|
|
311
311
|
let u = o.l, i = s;
|
|
312
312
|
for (let d = 0; d < 24; d++) {
|
|
@@ -315,16 +315,16 @@ function U(n, r, e, t) {
|
|
|
315
315
|
}
|
|
316
316
|
return O({ ...o, l: i });
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function tn(n, r, e) {
|
|
319
319
|
if (k(m(n, r), e)) return n;
|
|
320
|
-
const t = A(n) < A(r), o =
|
|
320
|
+
const t = A(n) < A(r), o = q(
|
|
321
321
|
n,
|
|
322
322
|
r,
|
|
323
323
|
e,
|
|
324
324
|
t ? "darker" : "lighter"
|
|
325
325
|
);
|
|
326
326
|
if (k(m(o, r), e)) return o;
|
|
327
|
-
const s =
|
|
327
|
+
const s = q(
|
|
328
328
|
n,
|
|
329
329
|
r,
|
|
330
330
|
e,
|
|
@@ -332,12 +332,12 @@ function $(n, r, e) {
|
|
|
332
332
|
);
|
|
333
333
|
return m(s, r) > m(o, r) ? s : o;
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function on(n, r, e) {
|
|
336
336
|
let t = n;
|
|
337
337
|
for (let o = 0; o < 8; o++) {
|
|
338
338
|
let s = !1;
|
|
339
339
|
for (const c of r) {
|
|
340
|
-
const u =
|
|
340
|
+
const u = tn(t, c, e);
|
|
341
341
|
u !== t && (t = u, s = !0);
|
|
342
342
|
}
|
|
343
343
|
if (!s) break;
|
|
@@ -353,9 +353,13 @@ function In(n, r, e) {
|
|
|
353
353
|
}
|
|
354
354
|
return t;
|
|
355
355
|
}
|
|
356
|
-
const Dn = "#131417", Mn = "#0A0B0E",
|
|
356
|
+
const Dn = "#131417", Mn = "#0A0B0E", sn = 0.25, or = sn;
|
|
357
357
|
function _n(n) {
|
|
358
|
-
return
|
|
358
|
+
return on(
|
|
359
|
+
n.inputBorder,
|
|
360
|
+
[n.input, n.surfaceElevated],
|
|
361
|
+
xn
|
|
362
|
+
);
|
|
359
363
|
}
|
|
360
364
|
function Ln(n, r, e) {
|
|
361
365
|
const t = [
|
|
@@ -365,11 +369,11 @@ function Ln(n, r, e) {
|
|
|
365
369
|
];
|
|
366
370
|
return e === "dark" && t.push(Dn, Mn), t.flatMap((o) => [
|
|
367
371
|
o,
|
|
368
|
-
|
|
372
|
+
En(n, o, sn)
|
|
369
373
|
]);
|
|
370
374
|
}
|
|
371
375
|
function Nn(n, r, e) {
|
|
372
|
-
return
|
|
376
|
+
return on(
|
|
373
377
|
n,
|
|
374
378
|
Ln(n, r, e),
|
|
375
379
|
I
|
|
@@ -383,7 +387,7 @@ const sr = [
|
|
|
383
387
|
"info"
|
|
384
388
|
], On = 60;
|
|
385
389
|
function T(n) {
|
|
386
|
-
return k(m("#ffffff", n), I) ||
|
|
390
|
+
return k(m("#ffffff", n), I) || Tn(n) >= On ? n : tn(n, "#ffffff", I);
|
|
387
391
|
}
|
|
388
392
|
function Hn(n, r) {
|
|
389
393
|
return In(
|
|
@@ -401,7 +405,7 @@ const cr = ["brand", "error", "success", "warning"], Kn = "#D76CB7", Pn = "data-
|
|
|
401
405
|
warning: "#e69f00",
|
|
402
406
|
/** Sky blue. */
|
|
403
407
|
info: "#56b4e9"
|
|
404
|
-
},
|
|
408
|
+
}, U = {
|
|
405
409
|
added: P.success,
|
|
406
410
|
deleted: P.error
|
|
407
411
|
};
|
|
@@ -450,8 +454,8 @@ function $n(n, r, e) {
|
|
|
450
454
|
"--color-on-success": i(c),
|
|
451
455
|
"--color-on-warning": i(u),
|
|
452
456
|
// The diff gutter rides on the same signal (added/deleted ≡ success/error).
|
|
453
|
-
"--color-diff-added": e ?
|
|
454
|
-
"--color-diff-deleted": e ?
|
|
457
|
+
"--color-diff-added": e ? U.added : "",
|
|
458
|
+
"--color-diff-deleted": e ? U.deleted : "",
|
|
455
459
|
"--color-syntax-keyword": n.syntaxKeyword,
|
|
456
460
|
"--color-syntax-string": n.syntaxString,
|
|
457
461
|
"--color-syntax-function": n.syntaxFunction,
|
|
@@ -460,23 +464,23 @@ function $n(n, r, e) {
|
|
|
460
464
|
"--color-syntax-type": n.syntaxType
|
|
461
465
|
};
|
|
462
466
|
}
|
|
463
|
-
const
|
|
464
|
-
function
|
|
467
|
+
const j = "data-colorblind-safe", X = "data-design";
|
|
468
|
+
function cn(n, r = !1) {
|
|
465
469
|
return E(n === "system" ? p(r ? "light" : "dark") : n === "dark" ? p("dark") : n === "light" ? p("light") : n);
|
|
466
470
|
}
|
|
467
471
|
function Vn(n, r = {}) {
|
|
468
472
|
var u, i;
|
|
469
|
-
const e = typeof n == "string" ?
|
|
473
|
+
const e = typeof n == "string" ? cn(n) : n, t = r.document ?? (typeof document < "u" ? document : void 0);
|
|
470
474
|
if (!t) return e;
|
|
471
475
|
const o = t.documentElement, s = r.colorVisionSafe ?? !1;
|
|
472
|
-
s ? o.setAttribute(
|
|
476
|
+
s ? o.setAttribute(j, "") : o.removeAttribute(j);
|
|
473
477
|
const c = s ? Rn(e.palette) : e.palette;
|
|
474
478
|
for (const [d, l] of Object.entries($n(c, e.type, s)))
|
|
475
479
|
o.style.setProperty(d, l);
|
|
476
|
-
return (u = t.body) == null || u.classList.remove("light", "dark"), (i = t.body) == null || i.classList.add(e.type), o.classList.remove("light", "dark"), o.classList.add(e.type), o.style.colorScheme = e.type, o.setAttribute("data-app-theme", e.id), e.design ? o.setAttribute(
|
|
480
|
+
return (u = t.body) == null || u.classList.remove("light", "dark"), (i = t.body) == null || i.classList.add(e.type), o.classList.remove("light", "dark"), o.classList.add(e.type), o.style.colorScheme = e.type, o.setAttribute("data-app-theme", e.id), e.design ? o.setAttribute(X, e.design) : o.removeAttribute(X), e;
|
|
477
481
|
}
|
|
478
482
|
function ar() {
|
|
479
|
-
return
|
|
483
|
+
return kn();
|
|
480
484
|
}
|
|
481
485
|
const Gn = "vokril-ui-theme", Wn = "(prefers-color-scheme: light)";
|
|
482
486
|
function qn() {
|
|
@@ -486,8 +490,8 @@ function qn() {
|
|
|
486
490
|
return null;
|
|
487
491
|
}
|
|
488
492
|
}
|
|
489
|
-
const
|
|
490
|
-
var V
|
|
493
|
+
const an = Fn(), ur = (n) => {
|
|
494
|
+
var $, V;
|
|
491
495
|
const r = n.storageKey === void 0 ? Gn : n.storageKey, e = n.storage === void 0 ? qn() : n.storage, t = () => {
|
|
492
496
|
if (!e || !r) return null;
|
|
493
497
|
try {
|
|
@@ -495,25 +499,25 @@ const cn = bn(), ur = (n) => {
|
|
|
495
499
|
} catch {
|
|
496
500
|
return null;
|
|
497
501
|
}
|
|
498
|
-
}, o = ((
|
|
502
|
+
}, o = (($ = n.document) == null ? void 0 : $.defaultView) ?? (typeof window > "u" ? void 0 : window), s = (V = o == null ? void 0 : o.matchMedia) == null ? void 0 : V.call(o, Wn), [c, u] = _(t() ?? n.defaultTheme ?? "dark"), [i, d] = _((s == null ? void 0 : s.matches) ?? !1), [l, y] = _(n.colorVisionSafe ?? !1);
|
|
499
503
|
if (s) {
|
|
500
|
-
const x = (
|
|
501
|
-
s.addEventListener("change", x),
|
|
504
|
+
const x = (fn) => d(fn.matches);
|
|
505
|
+
s.addEventListener("change", x), yn(() => s.removeEventListener("change", x));
|
|
502
506
|
}
|
|
503
|
-
const f =
|
|
507
|
+
const f = G(() => cn(c(), i())), g = G(() => f().type), b = (x) => {
|
|
504
508
|
if (u(x), !(!e || !r))
|
|
505
509
|
try {
|
|
506
510
|
e.setItem(r, x);
|
|
507
511
|
} catch {
|
|
508
512
|
}
|
|
509
513
|
}, M = () => b(g() === "dark" ? "light" : "dark");
|
|
510
|
-
|
|
514
|
+
mn(() => {
|
|
511
515
|
Vn(f(), {
|
|
512
516
|
colorVisionSafe: l(),
|
|
513
517
|
document: n.document
|
|
514
518
|
});
|
|
515
519
|
});
|
|
516
|
-
const
|
|
520
|
+
const dn = {
|
|
517
521
|
theme: c,
|
|
518
522
|
resolvedTheme: g,
|
|
519
523
|
themeId: () => f().id,
|
|
@@ -522,17 +526,17 @@ const cn = bn(), ur = (n) => {
|
|
|
522
526
|
colorVisionSafe: l,
|
|
523
527
|
setColorVisionSafe: y
|
|
524
528
|
};
|
|
525
|
-
return
|
|
526
|
-
value:
|
|
529
|
+
return ln(an.Provider, {
|
|
530
|
+
value: dn,
|
|
527
531
|
get children() {
|
|
528
532
|
return n.children;
|
|
529
533
|
}
|
|
530
534
|
});
|
|
531
535
|
};
|
|
532
|
-
let
|
|
536
|
+
let Y = !1;
|
|
533
537
|
function dr() {
|
|
534
|
-
const n =
|
|
535
|
-
return n || (
|
|
538
|
+
const n = bn(an);
|
|
539
|
+
return n || (gn && !Y && (Y = !0, console.warn("@vokril/ui-solid: useTheme() was called outside <ThemeProvider>; it reports the design's dark theme and ignores setTheme.")), {
|
|
536
540
|
theme: () => "dark",
|
|
537
541
|
resolvedTheme: () => "dark",
|
|
538
542
|
themeId: () => p(),
|
|
@@ -545,8 +549,8 @@ function dr() {
|
|
|
545
549
|
}
|
|
546
550
|
});
|
|
547
551
|
}
|
|
548
|
-
var
|
|
549
|
-
const
|
|
552
|
+
var J;
|
|
553
|
+
const z = ((J = w.find((n) => n.id === hn)) == null ? void 0 : J.palette) ?? w[0].palette;
|
|
550
554
|
function Un(n) {
|
|
551
555
|
return Math.max(0, Math.min(255, Math.round(n)));
|
|
552
556
|
}
|
|
@@ -579,21 +583,21 @@ function F(n, r, e) {
|
|
|
579
583
|
});
|
|
580
584
|
}
|
|
581
585
|
const jn = "#ffffff", Xn = "#000000";
|
|
582
|
-
function
|
|
586
|
+
function un(n, r) {
|
|
583
587
|
return F(n, jn, r);
|
|
584
588
|
}
|
|
585
589
|
function Yn(n, r) {
|
|
586
590
|
return F(n, Xn, r);
|
|
587
591
|
}
|
|
588
592
|
function zn(n, r, e) {
|
|
589
|
-
return r === "dark" ?
|
|
593
|
+
return r === "dark" ? un(n, e) : Yn(n, e);
|
|
590
594
|
}
|
|
591
595
|
function B(n, r) {
|
|
592
596
|
return `${a(n)}${r}`;
|
|
593
597
|
}
|
|
594
598
|
function fr() {
|
|
595
|
-
if (typeof document > "u") return
|
|
596
|
-
const n = getComputedStyle(document.documentElement), r = (t, o) => n.getPropertyValue(t).trim() || o, e =
|
|
599
|
+
if (typeof document > "u") return z;
|
|
600
|
+
const n = getComputedStyle(document.documentElement), r = (t, o) => n.getPropertyValue(t).trim() || o, e = z;
|
|
597
601
|
return {
|
|
598
602
|
surface: r("--color-surface", e.surface),
|
|
599
603
|
surfaceAlt: r("--color-surface-alt", e.surfaceAlt),
|
|
@@ -706,7 +710,7 @@ function mr(n, r) {
|
|
|
706
710
|
brightBlue: f(c),
|
|
707
711
|
brightMagenta: f(y),
|
|
708
712
|
brightCyan: f(l),
|
|
709
|
-
brightWhite: r === "dark" ?
|
|
713
|
+
brightWhite: r === "dark" ? un(o, 0.25) : o
|
|
710
714
|
};
|
|
711
715
|
return {
|
|
712
716
|
background: e,
|
|
@@ -719,15 +723,15 @@ function mr(n, r) {
|
|
|
719
723
|
export {
|
|
720
724
|
Rn as A,
|
|
721
725
|
dr as B,
|
|
722
|
-
|
|
726
|
+
hn as D,
|
|
723
727
|
cr as I,
|
|
724
|
-
|
|
728
|
+
pn as L,
|
|
725
729
|
or as M,
|
|
726
|
-
|
|
730
|
+
U as O,
|
|
727
731
|
sr as T,
|
|
728
732
|
Kn as U,
|
|
729
733
|
Mn as W,
|
|
730
|
-
|
|
734
|
+
Z as a,
|
|
731
735
|
ur as b,
|
|
732
736
|
Dn as c,
|
|
733
737
|
T as d,
|
|
@@ -741,7 +745,7 @@ export {
|
|
|
741
745
|
p as l,
|
|
742
746
|
E as m,
|
|
743
747
|
rr as n,
|
|
744
|
-
|
|
748
|
+
kn as o,
|
|
745
749
|
ar as p,
|
|
746
750
|
ir as q,
|
|
747
751
|
tr as r,
|
|
@@ -749,7 +753,7 @@ export {
|
|
|
749
753
|
gr as t,
|
|
750
754
|
lr as u,
|
|
751
755
|
er as v,
|
|
752
|
-
|
|
756
|
+
cn as w,
|
|
753
757
|
nr as x,
|
|
754
758
|
Ln as y,
|
|
755
759
|
w as z
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const Z=require("solid-js/web"),y=require("solid-js"),ee=require("./bugIndicatingError-D2X5Hfgg.cjs"),S=[{id:"viper-dark",label:"Viper Dark",type:"dark",design:"viper",palette:{surface:"#1A1A1E",surfaceAlt:"#07080B",surfaceElevated:"#1E1F23",brand:"#808AE5",brandHover:"#707AD0",content:"#F1F1F4",contentSecondary:"#B9BAC0",border:"#232428",input:"#1E1F23",inputBorder:"#232428",success:"#4FB772",error:"#E05D5A",warning:"#F0A945",info:"#55A8DB",syntaxKeyword:"#BC97E8",syntaxString:"#92C487",syntaxFunction:"#F0C77C",syntaxNumber:"#6FBCE3",syntaxType:"#76CDC5",syntaxComment:"#8F939F"}},{id:"viper-light",label:"Viper Light",type:"light",design:"viper",palette:{surface:"#FFFFFF",surfaceAlt:"#F3F4F8",surfaceElevated:"#FFFFFF",brand:"#5355D0",brandHover:"#4545B6",content:"#1C1E24",contentSecondary:"#5F636F",border:"#DFE1E7",input:"#FFFFFF",inputBorder:"#D0D2D9",success:"#048A45",error:"#C72C34",warning:"#C27400",info:"#007AB0",syntaxKeyword:"#7D3AB7",syntaxString:"#357426",syntaxFunction:"#895709",syntaxNumber:"#006A9D",syntaxType:"#007973",syntaxComment:"#696D79"}},{id:"vokril-dark",label:"Vokril Dark",type:"dark",design:"vokril",palette:{surface:"#121018",surfaceAlt:"#1C1925",surfaceElevated:"#121018",brand:"#8C75F2",brandHover:"#A593F6",content:"#F0EDF7",contentSecondary:"#A8A1B8",border:"#2C2838",input:"#1C1925",inputBorder:"#2C2838",success:"#4FB772",error:"#FF8A80",warning:"#F0A945",info:"#55A8DB",syntaxKeyword:"#BC97E8",syntaxString:"#92C487",syntaxFunction:"#F0C77C",syntaxNumber:"#6FBCE3",syntaxType:"#76CDC5",syntaxComment:"#8F939F"}},{id:"vokril-light",label:"Vokril Light",type:"light",design:"vokril",palette:{surface:"#FFFFFF",surfaceAlt:"#F3F1F7",surfaceElevated:"#FFFFFF",brand:"#593BD8",brandHover:"#4227B4",content:"#24212D",contentSecondary:"#5E596B",border:"#DEDBE5",input:"#FFFFFF",inputBorder:"#DEDBE5",success:"#048A45",error:"#B42318",warning:"#C27400",info:"#007AB0",syntaxKeyword:"#7D3AB7",syntaxString:"#357426",syntaxFunction:"#895709",syntaxNumber:"#006A9D",syntaxType:"#007973",syntaxComment:"#696D79"}},{id:"high-contrast-dark",label:"High Contrast Dark",type:"dark",palette:{surface:"#000000",surfaceAlt:"#000000",surfaceElevated:"#121212",brand:"#66B2FF",brandHover:"#99CCFF",content:"#FFFFFF",contentSecondary:"#E6E6E6",border:"#FFFFFF",input:"#000000",inputBorder:"#FFFFFF",success:"#57E389",error:"#FF7B72",warning:"#F0B429",info:"#66B2FF",syntaxKeyword:"#FF9999",syntaxString:"#99E699",syntaxFunction:"#FFE066",syntaxNumber:"#99CCFF",syntaxType:"#FFCC80",syntaxComment:"#B0B0B0"}},{id:"high-contrast-light",label:"High Contrast Light",type:"light",palette:{surface:"#FFFFFF",surfaceAlt:"#FFFFFF",surfaceElevated:"#FFFFFF",brand:"#0047BA",brandHover:"#003080",content:"#000000",contentSecondary:"#262626",border:"#000000",input:"#FFFFFF",inputBorder:"#000000",success:"#006622",error:"#B30000",warning:"#8C4600",info:"#0047BA",syntaxKeyword:"#8C0000",syntaxString:"#005C1F",syntaxFunction:"#4D2600",syntaxNumber:"#0047BA",syntaxType:"#0047BA",syntaxComment:"#404040"}}],$={viper:{dark:"viper-dark",light:"viper-light"},vokril:{dark:"vokril-dark",light:"vokril-light"}},ne="viper-dark",re={darcula:"viper-dark",light:"viper-light"},te=e=>re[e]??e;let D="viper";function Ae(e){if(!Object.prototype.hasOwnProperty.call($,e))throw new Error(`Unknown theme design: ${String(e)}`);D=e}function ve(){return D}function b(e="dark"){return $[D][e]}const v=[];function Se(e){return v.push(e),{dispose:()=>{const n=v.indexOf(e);n!==-1&&v.splice(n,1)}}}function oe(e){for(const n of v){const r=n.byId(e);if(r!==null)return r}return null}const ce=e=>e.design===void 0||e.design===D,w=e=>S.find(n=>n.id===e);function T(e){const n=te(e),r=w(n);return r&&!ce(r)?w(b(r.type)):r??oe(n)??w(b())}function se(){return[...S.filter(ce),...v.flatMap(e=>e.options())]}function Be(e){const n=te(e);return w(n)!==void 0||oe(n)!==null}const _=4.5,Ce=3;function we(e){const n=e.trim().replace(/^#/,""),r=n.length===3?n.split("").map(t=>t+t).join(""):n;return r.length!==6||/[^0-9a-fA-F]/.test(r)?null:{r:Number.parseInt(r.slice(0,2),16),g:Number.parseInt(r.slice(2,4),16),b:Number.parseInt(r.slice(4,6),16)}}function Ie({r:e,g:n,b:r}){const t=o=>Math.max(0,Math.min(255,Math.round(o))).toString(16).padStart(2,"0");return`#${t(e)}${t(n)}${t(r)}`}function P(e){const n=we(e);if(!n)throw new ee.BugIndicatingError(`contrast: expected #rgb/#rrggbb, got ${JSON.stringify(e)}. Resolve var()/transparent/color-mix to a literal hex before measuring.`);return n}function L(e){const n=e/255;return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function B(e){const{r:n,g:r,b:t}=P(e);return .2126*L(n)+.7152*L(r)+.0722*L(t)}function h(e,n){const r=B(e),t=B(n),[o,c]=r>t?[r,t]:[t,r];return(o+.05)/(c+.05)}function _e(e,n,r){const t=P(e),o=P(n),c=Math.max(0,Math.min(1,r));return Ie({r:t.r+(o.r-t.r)*(1-c),g:t.g+(o.g-t.g)*(1-c),b:t.b+(o.b-t.b)*(1-c)})}function x(e,n){return e+1e-9>=n}function De(e){const n=B(e);return 116*(n>(6/29)**3?Math.cbrt(n):n/(3*(6/29)**2)+4/29)-16}const N=e=>{const n=e/255;return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)},Me=e=>(e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055)*255;function Le(e){const n=e.trim().replace(/^#/,""),r=n.length===3?n.split("").map(t=>t+t).join(""):n;if(r.length!==6||/[^0-9a-fA-F]/.test(r))throw new ee.BugIndicatingError(`oklch: expected #rgb/#rrggbb, got ${JSON.stringify(e)}`);return{r:Number.parseInt(r.slice(0,2),16),g:Number.parseInt(r.slice(2,4),16),b:Number.parseInt(r.slice(4,6),16)}}function Ne(e){const{r:n,g:r,b:t}=Le(e),o=N(n),c=N(r),s=N(t),u=Math.cbrt(.4122214708*o+.5363325363*c+.0514459929*s),i=Math.cbrt(.2119034982*o+.6806995451*c+.1073969566*s),d=Math.cbrt(.0883024619*o+.2817188376*c+.6299787005*s),f=.2104542553*u+.793617785*i-.0040720468*d,m=1.9779984951*u-2.428592205*i+.4505937099*d,l=.0259040371*u+.7827717662*i-.808675766*d,g=Math.atan2(l,m)*180/Math.PI;return{l:f,c:Math.hypot(m,l),h:g<0?g+360:g}}function H({l:e,c:n,h:r}){const t=r*Math.PI/180,o=n*Math.cos(t),c=n*Math.sin(t),s=(e+.3963377774*o+.2158037573*c)**3,u=(e-.1055613458*o-.0638541728*c)**3,i=(e-.0894841775*o-1.291485548*c)**3;return{r:4.0767416621*s-3.3077115913*u+.2309699292*i,g:-1.2684380046*s+2.6097574011*u-.3413193965*i,b:-.0041960863*s-.7034186147*u+1.707614701*i}}const k=1e-4,U=({r:e,g:n,b:r})=>e>=-k&&e<=1+k&&n>=-k&&n<=1+k&&r>=-k&&r<=1+k;function Oe({l:e,c:n,h:r}){if(U(H({l:e,c:n,h:r})))return n;let t=0,o=n;for(let c=0;c<24;c++){const s=(t+o)/2;U(H({l:e,c:s,h:r}))?t=s:o=s}return t}function O(e){const n=Oe(e),r=H({...e,c:n}),t=o=>Math.max(0,Math.min(255,Math.round(Me(o)))).toString(16).padStart(2,"0");return`#${t(r.r)}${t(r.g)}${t(r.b)}`}function X(e,n,r,t){const o=Ne(e),c=t==="lighter"?1:0,s=O({...o,l:c});if(!x(h(s,n),r))return s;let u=o.l,i=c;for(let d=0;d<24;d++){const f=(u+i)/2;x(h(O({...o,l:f}),n),r)?i=f:u=f}return O({...o,l:i})}function ie(e,n,r){if(x(h(e,n),r))return e;const t=B(e)<B(n),o=X(e,n,r,t?"darker":"lighter");if(x(h(o,n),r))return o;const c=X(e,n,r,t?"lighter":"darker");return h(c,n)>h(o,n)?c:o}function ae(e,n,r){let t=e;for(let o=0;o<8;o++){let c=!1;for(const s of n){const u=ie(t,s,r);u!==t&&(t=u,c=!0)}if(!c)break}return t}function Pe(e,n,r){let t=n[0]??"#ffffff",o=-1;for(const c of n){const s=h(c,e);if(x(s,r))return c;s>o&&(o=s,t=c)}return t}const ue="#131417",de="#0A0B0E",le=.25,He=le;function fe(e){return ae(e.inputBorder,[e.input,e.surfaceElevated],Ce)}function ge(e,n,r){const t=[n.surface,n.surfaceAlt,n.surfaceElevated];return r==="dark"&&t.push(ue,de),t.flatMap(o=>[o,_e(e,o,le)])}function me(e,n,r){return ae(e,ge(e,n,r),_)}const Ke=["error","brand","success","warning","info"],Re=60;function A(e){return x(h("#ffffff",e),_)||De(e)>=Re?e:ie(e,"#ffffff",_)}function ye(e,n){return Pe(e,["#ffffff",n.surfaceAlt,"#000000"],_)}const Ve=["brand","error","success","warning"],he="#D76CB7",$e="data-colorblind-safe",K={success:"#009e73",error:"#d55e00",warning:"#e69f00",info:"#56b4e9"},R={added:K.success,deleted:K.error};function Fe(e){return{...e,...K}}function Ge(){return typeof document>"u"?!1:document.documentElement.hasAttribute($e)}function be(e,n,r){const t=d=>me(d,e,n),o=A(e.brand),c=A(e.error),s=A(e.success),u=A(e.warning),i=d=>ye(d,e);return{"--color-surface":e.surface,"--color-surface-alt":e.surfaceAlt,"--color-surface-elevated":e.surfaceElevated,"--color-brand":e.brand,"--color-brand-hover":e.brandHover,"--color-content":e.content,"--color-content-secondary":e.contentSecondary,"--color-border":e.border,"--color-input":e.input,"--color-input-border":fe(e),"--color-success":e.success,"--color-error":e.error,"--color-warning":e.warning,"--color-info":e.info,"--color-success-text":t(e.success),"--color-error-text":t(e.error),"--color-warning-text":t(e.warning),"--color-info-text":t(e.info),"--color-brand-text":t(e.brand),"--color-unique-text":t(he),"--color-brand-surface":o,"--color-error-surface":c,"--color-success-surface":s,"--color-warning-surface":u,"--color-on-brand":i(o),"--color-on-error":i(c),"--color-on-success":i(s),"--color-on-warning":i(u),"--color-diff-added":r?R.added:"","--color-diff-deleted":r?R.deleted:"","--color-syntax-keyword":e.syntaxKeyword,"--color-syntax-string":e.syntaxString,"--color-syntax-function":e.syntaxFunction,"--color-syntax-comment":e.syntaxComment,"--color-syntax-number":e.syntaxNumber,"--color-syntax-type":e.syntaxType}}const Y="data-colorblind-safe",j="data-design";function G(e,n=!1){return T(e==="system"?b(n?"light":"dark"):e==="dark"?b("dark"):e==="light"?b("light"):e)}function pe(e,n={}){var u,i;const r=typeof e=="string"?G(e):e,t=n.document??(typeof document<"u"?document:void 0);if(!t)return r;const o=t.documentElement,c=n.colorVisionSafe??!1;c?o.setAttribute(Y,""):o.removeAttribute(Y);const s=c?Fe(r.palette):r.palette;for(const[d,f]of Object.entries(be(s,r.type,c)))o.style.setProperty(d,f);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(j,r.design):o.removeAttribute(j),r}function We(){return se()}const qe="vokril-ui-theme",Ue="(prefers-color-scheme: light)";function Xe(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}const ke=y.createContext(),Ye=e=>{var W,q;const n=e.storageKey===void 0?qe:e.storageKey,r=e.storage===void 0?Xe():e.storage,t=()=>{if(!r||!n)return null;try{return r.getItem(n)}catch{return null}},o=((W=e.document)==null?void 0:W.defaultView)??(typeof window>"u"?void 0:window),c=(q=o==null?void 0:o.matchMedia)==null?void 0:q.call(o,Ue),[s,u]=y.createSignal(t()??e.defaultTheme??"dark"),[i,d]=y.createSignal((c==null?void 0:c.matches)??!1),[f,m]=y.createSignal(e.colorVisionSafe??!1);if(c){const E=Te=>d(Te.matches);c.addEventListener("change",E),y.onCleanup(()=>c.removeEventListener("change",E))}const l=y.createMemo(()=>G(s(),i())),g=y.createMemo(()=>l().type),F=E=>{if(u(E),!(!r||!n))try{r.setItem(n,E)}catch{}},M=()=>F(g()==="dark"?"light":"dark");y.createEffect(()=>{pe(l(),{colorVisionSafe:f(),document:e.document})});const Ee={theme:s,resolvedTheme:g,themeId:()=>l().id,setTheme:F,toggleTheme:M,colorVisionSafe:f,setColorVisionSafe:m};return Z.createComponent(ke.Provider,{value:Ee,get children(){return e.children}})};let J=!1;function je(){const e=y.useContext(ke);return e||(Z.isDev&&!J&&(J=!0,console.warn("@vokril/ui-solid: useTheme() was called outside <ThemeProvider>; it reports the design's dark theme and ignores setTheme.")),{theme:()=>"dark",resolvedTheme:()=>"dark",themeId:()=>b(),setTheme:()=>{},toggleTheme:()=>{},colorVisionSafe:()=>!1,setColorVisionSafe:()=>{}})}var Q;const z=((Q=S.find(e=>e.id===ne))==null?void 0:Q.palette)??S[0].palette;function Je(e){return Math.max(0,Math.min(255,Math.round(e)))}function V(e){const n=e.trim().replace(/^#/,""),r=n.length===3?n.split("").map(t=>t+t).join(""):n;return r.length!==6||/[^0-9a-fA-F]/.test(r)?null:{r:Number.parseInt(r.slice(0,2),16),g:Number.parseInt(r.slice(2,4),16),b:Number.parseInt(r.slice(4,6),16)}}function I({r:e,g:n,b:r}){const t=o=>Je(o).toString(16).padStart(2,"0");return`#${t(e)}${t(n)}${t(r)}`}function a(e,n="#000000"){const r=V(e);return r?I(r):n}function p(e,n,r){const t=V(e),o=V(n);if(!t&&!o)return"#000000";if(!t)return I(o);if(!o)return I(t);const c=Math.max(0,Math.min(1,r));return I({r:t.r+(o.r-t.r)*c,g:t.g+(o.g-t.g)*c,b:t.b+(o.b-t.b)*c})}const ze="#ffffff",Qe="#000000";function xe(e,n){return p(e,ze,n)}function Ze(e,n){return p(e,Qe,n)}function en(e,n,r){return n==="dark"?xe(e,r):Ze(e,r)}function C(e,n){return`${a(e)}${n}`}function nn(){if(typeof document>"u")return z;const e=getComputedStyle(document.documentElement),n=(t,o)=>e.getPropertyValue(t).trim()||o,r=z;return{surface:n("--color-surface",r.surface),surfaceAlt:n("--color-surface-alt",r.surfaceAlt),surfaceElevated:n("--color-surface-elevated",r.surfaceElevated),brand:n("--color-brand",r.brand),brandHover:n("--color-brand-hover",r.brandHover),content:n("--color-content",r.content),contentSecondary:n("--color-content-secondary",r.contentSecondary),border:n("--color-border",r.border),input:n("--color-input",r.input),inputBorder:n("--color-input-border",r.inputBorder),success:n("--color-success",r.success),error:n("--color-error",r.error),warning:n("--color-warning",r.warning),info:n("--color-info",r.info),syntaxKeyword:n("--color-syntax-keyword",r.syntaxKeyword),syntaxString:n("--color-syntax-string",r.syntaxString),syntaxFunction:n("--color-syntax-function",r.syntaxFunction),syntaxComment:n("--color-syntax-comment",r.syntaxComment),syntaxNumber:n("--color-syntax-number",r.syntaxNumber),syntaxType:n("--color-syntax-type",r.syntaxType)}}function rn(){return typeof document>"u"?"dark":document.body.classList.contains("light")?"light":"dark"}function tn(){return typeof document>"u"?"":document.documentElement.getAttribute("data-app-theme")??""}function on(e,n){const r=a(e.syntaxKeyword),t=a(e.syntaxString),o=a(e.syntaxFunction),c=a(e.syntaxComment),s=a(e.syntaxNumber),u=a(e.syntaxType),i=a(e.content),d=a(e.brand),f=a(e.error),m=[{token:"",foreground:i.slice(1)},{token:"comment",foreground:c.slice(1),fontStyle:"italic"},{token:"comment.quote",foreground:c.slice(1),fontStyle:"italic"},{token:"keyword",foreground:r.slice(1)},{token:"keyword.sql",foreground:r.slice(1)},{token:"operator",foreground:r.slice(1)},{token:"operator.sql",foreground:r.slice(1)},{token:"string",foreground:t.slice(1)},{token:"string.sql",foreground:t.slice(1)},{token:"string.escape",foreground:r.slice(1)},{token:"number",foreground:s.slice(1)},{token:"number.float",foreground:s.slice(1)},{token:"number.hex",foreground:s.slice(1)},{token:"constant",foreground:s.slice(1)},{token:"type",foreground:u.slice(1)},{token:"type.identifier",foreground:u.slice(1)},{token:"predefined",foreground:o.slice(1)},{token:"predefined.sql",foreground:o.slice(1)},{token:"function",foreground:o.slice(1)},{token:"identifier",foreground:i.slice(1)},{token:"identifier.quote",foreground:t.slice(1)},{token:"variable",foreground:i.slice(1)},{token:"delimiter",foreground:i.slice(1)},{token:"tag",foreground:r.slice(1)},{token:"attribute.name",foreground:o.slice(1)},{token:"attribute.value",foreground:t.slice(1)},{token:"annotation",foreground:e.warning.replace(/^#/,"")},{token:"regexp",foreground:f.slice(1)}],l=a(e.surfaceAlt),g=a(e.surface),F=a(e.surfaceElevated),M={"editor.background":l,"editor.foreground":i,"editorLineNumber.foreground":a(e.contentSecondary),"editorLineNumber.activeForeground":i,"editorCursor.foreground":d,"editor.selectionBackground":p(g,d,.32),"editor.inactiveSelectionBackground":p(g,d,.18),"editor.lineHighlightBackground":p(l,g,.55),"editorWidget.background":F,"editorWidget.foreground":i,"editorWidget.border":a(e.border),"editorWidget.resizeBorder":d,"input.background":a(e.input),"input.foreground":i,"input.border":a(e.inputBorder),"input.placeholderForeground":a(e.contentSecondary),"inputOption.activeBackground":C(d,"40"),"inputOption.activeBorder":d,"inputOption.activeForeground":i,focusBorder:d,"editor.findMatchBackground":C(a(e.warning),"80"),"editor.findMatchHighlightBackground":C(a(e.warning),"40"),"editor.findRangeHighlightBackground":C(F,"60")};return{base:n==="dark"?"vs-dark":"vs",inherit:!0,rules:m,colors:M}}function cn(e,n){const r=a(e.surface),t=a(e.surfaceElevated),o=a(e.content),c=a(e.contentSecondary),s=a(e.brand),u=a(e.error),i=a(e.success),d=a(e.warning),f=a(e.info),m=a(e.syntaxKeyword),l=F=>en(F,n,.22),g={black:t,red:u,green:i,yellow:d,blue:s,magenta:m,cyan:f,white:c,brightBlack:p(t,o,.4),brightRed:l(u),brightGreen:l(i),brightYellow:l(d),brightBlue:l(s),brightMagenta:l(m),brightCyan:l(f),brightWhite:n==="dark"?xe(o,.25):o};return{background:r,foreground:o,cursor:s,selectionBackground:p(t,s,.2),...g}}exports.DEFAULT_THEME_ID=ne;exports.DESIGN_THEMES=$;exports.INK_ROLE_KEYS=Ve;exports.LEGACY_THEME_IDS=re;exports.MAX_TEXT_TINT_ALPHA=He;exports.OKABE_ITO_DIFF=R;exports.TEXT_ROLE_KEYS=Ke;exports.ThemeProvider=Ye;exports.UNIQUE_ACCENT=he;exports.WELD_BG=de;exports.WELD_SURFACE=ue;exports.accessibleFillSurface=A;exports.accessibleInputBorder=fe;exports.accessibleOnFillInk=ye;exports.accessibleTextColor=me;exports.applyAppTheme=pe;exports.derivePaletteProperties=be;exports.generateMonacoThemeFromPalette=on;exports.generateTerminalPaletteFromPalette=cn;exports.getDefaultThemeId=b;exports.getThemeById=T;exports.getThemeDesign=ve;exports.getThemeOptions=se;exports.getThemes=We;exports.isColorVisionSafeActive=Ge;exports.isKnownThemeId=Be;exports.readActiveAppPalette=nn;exports.readActiveAppThemeId=tn;exports.readActiveAppThemeType=rn;exports.registerThemeSource=Se;exports.resolveThemeOption=G;exports.setThemeDesign=Ae;exports.textGroundsFor=ge;exports.themeOptions=S;exports.toColorVisionSafePalette=Fe;exports.useTheme=je;
|
package/dist/charts/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../TimeSeriesChart-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../TimeSeriesChart-Cz_aDLuL.cjs");exports.TimeSeriesChart=e.TimeSeriesChart;exports.clampInterval=e.clampInterval;exports.seriesSegments=e.seriesSegments;exports.valueDomain=e.valueDomain;
|
package/dist/charts/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("solid-js/web"),y=require("./Input-B8JpqQm8.cjs"),v=require("solid-js"),L=require("./prefersReducedMotion-DYR56SKZ.cjs"),C=require("./dialogFocusRestore-DP5b1bDo.cjs"),D=require("./Modal-D7VNY7qc.cjs"),q="vk_root_w-T1s",A="vk_disabled_kl1Jx",B="vk_box_mOCAD",S="vk_checked_YZgPy",N="vk_control_748Lw",T="vk_input_Ysj9i",E="vk_indicator_lYKVu",I="vk_label_jB-PM",d={root:q,disabled:A,box:B,checked:S,control:N,input:T,indicator:E,label:I};function x(t,l,r,c,s,...a){const o=[];t&&o.push(t),c&&l&&o.push(l),s&&r&&o.push(r);for(const b of a)b!==void 0&&b!==""&&o.push(b);return o.join(" ")}var M=n.template("<span>"),R=n.template("<label><span><input type=checkbox><span aria-hidden=true><span>");function j(t){const l=v.createMemo(()=>!!t.indeterminate),r=y.useFormFieldAria();return(()=>{var c=R(),s=c.firstChild,a=s.firstChild,o=a.nextSibling,b=o.firstChild;return a.addEventListener("change",e=>{const i=e.currentTarget;t.onChange(i.checked),i.indeterminate=l()}),n.use(e=>v.createRenderEffect(()=>{e.indeterminate=l()}),a),n.insert(c,n.createComponent(v.Show,{get when(){return t.children!==void 0},get children(){var e=M();return n.insert(e,()=>t.children),n.effect(()=>n.className(e,d.label)),e}}),null),n.effect(e=>{var i=x(d.root,d.checked,d.disabled,t.checked||l(),!!t.disabled,t.class),f=d.control,u=t.id,h=`${d.input} ${t.inputClass??""}`,m=t.disabled,k=r==null?void 0:r.describedBy(),_=t.ariaLabel,F=y.nativeControlLabelledBy(r,{ariaLabel:t.ariaLabel,ariaLabelledBy:t.ariaLabelledBy}),g=`${d.box} ${t.boxClass??""}`,w=d.indicator;return i!==e.e&&n.className(c,e.e=i),f!==e.t&&n.className(s,e.t=f),u!==e.a&&n.setAttribute(a,"id",e.a=u),h!==e.o&&n.className(a,e.o=h),m!==e.i&&(a.disabled=e.i=m),k!==e.n&&n.setAttribute(a,"aria-describedby",e.n=k),_!==e.s&&n.setAttribute(a,"aria-label",e.s=_),F!==e.h&&n.setAttribute(a,"aria-labelledby",e.h=F),g!==e.r&&n.className(o,e.r=g),w!==e.d&&n.className(b,e.d=w),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0}),n.effect(()=>a.checked=t.checked),c})()}function K(t){let l=null,r=null,c=null,s=null;const a=()=>{var i;s!==null&&((i=t.ownerDocument().defaultView)==null||i.cancelAnimationFrame(s),s=null)},o=()=>{a(),c==null||c(),c=null},b=i=>{l=i,r??(r=t.ownerDocument().activeElement)};v.createEffect(v.on(()=>t.open(),(i,f)=>{if(i){l!==null&&c===null&&(c=L.neutralizeBackground(l)),a();const u=t.ownerDocument().defaultView;l!==null&&u!==null&&(s=u.requestAnimationFrame(()=>{s=null,t.open()&&(l==null||l.focus())}));return}f===!0&&(o(),C.restoreFocusTo(r),r=null,l=null)}));const e=i=>{var u;const f=D.resolveDialogShellKeyIntent(i.key,{confirmOnEnter:!1});if(f==="dismiss"){if(((u=t.dismissDisabled)==null?void 0:u.call(t))===!0)return;i.stopPropagation(),t.onDismiss();return}f==="trap"&&l!==null&&D.trapTabFocusWithin(l,i)};return v.onCleanup(()=>{o(),C.restoreFocusTo(r),r=null,l=null}),{captureDialog:b,handleKeyDown:e}}exports.Checkbox=j;exports.buildSelectionItemClass=x;exports.createDialogShellFocus=K;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { use as L, insert as x, createComponent as B, effect as b, className as m, setAttribute as v, template as F } from "solid-js/web";
|
|
2
|
+
import { u as S, n as T } from "./Input-B-u9iAeF.js";
|
|
3
|
+
import { createMemo as A, createRenderEffect as E, Show as j, createEffect as K, on as P, onCleanup as V } from "solid-js";
|
|
4
|
+
import { n as Y } from "./prefersReducedMotion-qcGrKv14.js";
|
|
5
|
+
import { r as D } from "./dialogFocusRestore-BhxVTSiP.js";
|
|
6
|
+
import { r as I, t as M } from "./Modal-DFl9kHgo.js";
|
|
7
|
+
const O = "vk_root_w-T1s", R = "vk_disabled_kl1Jx", $ = "vk_box_mOCAD", q = "vk_checked_YZgPy", z = "vk_control_748Lw", J = "vk_input_Ysj9i", N = "vk_indicator_lYKVu", W = "vk_label_jB-PM", d = {
|
|
8
|
+
root: O,
|
|
9
|
+
disabled: R,
|
|
10
|
+
box: $,
|
|
11
|
+
checked: q,
|
|
12
|
+
control: z,
|
|
13
|
+
input: J,
|
|
14
|
+
indicator: N,
|
|
15
|
+
label: W
|
|
16
|
+
};
|
|
17
|
+
function Z(n, t, a, r, c, ...i) {
|
|
18
|
+
const o = [];
|
|
19
|
+
n && o.push(n), r && t && o.push(t), c && a && o.push(a);
|
|
20
|
+
for (const s of i)
|
|
21
|
+
s !== void 0 && s !== "" && o.push(s);
|
|
22
|
+
return o.join(" ");
|
|
23
|
+
}
|
|
24
|
+
var G = /* @__PURE__ */ F("<span>"), H = /* @__PURE__ */ F("<label><span><input type=checkbox><span aria-hidden=true><span>");
|
|
25
|
+
function te(n) {
|
|
26
|
+
const t = A(() => !!n.indeterminate), a = S();
|
|
27
|
+
return (() => {
|
|
28
|
+
var r = H(), c = r.firstChild, i = c.firstChild, o = i.nextSibling, s = o.firstChild;
|
|
29
|
+
return i.addEventListener("change", (e) => {
|
|
30
|
+
const l = e.currentTarget;
|
|
31
|
+
n.onChange(l.checked), l.indeterminate = t();
|
|
32
|
+
}), L((e) => E(() => {
|
|
33
|
+
e.indeterminate = t();
|
|
34
|
+
}), i), x(r, B(j, {
|
|
35
|
+
get when() {
|
|
36
|
+
return n.children !== void 0;
|
|
37
|
+
},
|
|
38
|
+
get children() {
|
|
39
|
+
var e = G();
|
|
40
|
+
return x(e, () => n.children), b(() => m(e, d.label)), e;
|
|
41
|
+
}
|
|
42
|
+
}), null), b((e) => {
|
|
43
|
+
var l = Z(d.root, d.checked, d.disabled, n.checked || t(), !!n.disabled, n.class), f = d.control, u = n.id, h = `${d.input} ${n.inputClass ?? ""}`, k = n.disabled, _ = a == null ? void 0 : a.describedBy(), y = n.ariaLabel, w = T(a, {
|
|
44
|
+
ariaLabel: n.ariaLabel,
|
|
45
|
+
ariaLabelledBy: n.ariaLabelledBy
|
|
46
|
+
}), C = `${d.box} ${n.boxClass ?? ""}`, g = d.indicator;
|
|
47
|
+
return l !== e.e && m(r, e.e = l), f !== e.t && m(c, e.t = f), u !== e.a && v(i, "id", e.a = u), h !== e.o && m(i, e.o = h), k !== e.i && (i.disabled = e.i = k), _ !== e.n && v(i, "aria-describedby", e.n = _), y !== e.s && v(i, "aria-label", e.s = y), w !== e.h && v(i, "aria-labelledby", e.h = w), C !== e.r && m(o, e.r = C), g !== e.d && m(s, e.d = g), e;
|
|
48
|
+
}, {
|
|
49
|
+
e: void 0,
|
|
50
|
+
t: void 0,
|
|
51
|
+
a: void 0,
|
|
52
|
+
o: void 0,
|
|
53
|
+
i: void 0,
|
|
54
|
+
n: void 0,
|
|
55
|
+
s: void 0,
|
|
56
|
+
h: void 0,
|
|
57
|
+
r: void 0,
|
|
58
|
+
d: void 0
|
|
59
|
+
}), b(() => i.checked = n.checked), r;
|
|
60
|
+
})();
|
|
61
|
+
}
|
|
62
|
+
function le(n) {
|
|
63
|
+
let t = null, a = null, r = null, c = null;
|
|
64
|
+
const i = () => {
|
|
65
|
+
var l;
|
|
66
|
+
c !== null && ((l = n.ownerDocument().defaultView) == null || l.cancelAnimationFrame(c), c = null);
|
|
67
|
+
}, o = () => {
|
|
68
|
+
i(), r == null || r(), r = null;
|
|
69
|
+
}, s = (l) => {
|
|
70
|
+
t = l, a ?? (a = n.ownerDocument().activeElement);
|
|
71
|
+
};
|
|
72
|
+
K(
|
|
73
|
+
P(
|
|
74
|
+
() => n.open(),
|
|
75
|
+
(l, f) => {
|
|
76
|
+
if (l) {
|
|
77
|
+
t !== null && r === null && (r = Y(t)), i();
|
|
78
|
+
const u = n.ownerDocument().defaultView;
|
|
79
|
+
t !== null && u !== null && (c = u.requestAnimationFrame(() => {
|
|
80
|
+
c = null, n.open() && (t == null || t.focus());
|
|
81
|
+
}));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
f === !0 && (o(), D(a), a = null, t = null);
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
);
|
|
88
|
+
const e = (l) => {
|
|
89
|
+
var u;
|
|
90
|
+
const f = I(l.key, {
|
|
91
|
+
confirmOnEnter: !1
|
|
92
|
+
});
|
|
93
|
+
if (f === "dismiss") {
|
|
94
|
+
if (((u = n.dismissDisabled) == null ? void 0 : u.call(n)) === !0) return;
|
|
95
|
+
l.stopPropagation(), n.onDismiss();
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
f === "trap" && t !== null && M(t, l);
|
|
99
|
+
};
|
|
100
|
+
return V(() => {
|
|
101
|
+
o(), D(a), a = null, t = null;
|
|
102
|
+
}), { captureDialog: s, handleKeyDown: e };
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
te as C,
|
|
106
|
+
Z as b,
|
|
107
|
+
le as c
|
|
108
|
+
};
|