@vokril/ui-solid 0.13.0 → 0.17.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 +45 -0
- package/README.md +110 -31
- package/dist/{AttributeGrid-Bg88JYZI.cjs → AttributeGrid-7cLOWtPn.cjs} +1 -1
- package/dist/{AttributeGrid-BypjAajJ.js → AttributeGrid-CVyqzT7-.js} +5 -5
- package/dist/{Button-Db6wMY-3.js → Button-BiKPB3cH.js} +2 -2
- package/dist/{Button-d9jJBibg.cjs → Button-Nx7byQZc.cjs} +1 -1
- package/dist/CommandPalette-BFi0_e3t.cjs +2 -0
- package/dist/CommandPalette-CAH08DGN.js +4013 -0
- package/dist/{CopyButton-C93PFyYK.js → CopyButton-BF7L1TCO.js} +1 -1
- package/dist/{CopyButton-CXaZRU7b.cjs → CopyButton-BtgGbiy9.cjs} +1 -1
- package/dist/DateRangePicker-Ce2tTbJ4.cjs +9 -0
- package/dist/{DateRangePicker-D-5rg3h1.js → DateRangePicker-jSQBwB78.js} +181 -166
- package/dist/GuidedTour-CWDtBRHv.js +483 -0
- package/dist/GuidedTour-CYaR5Ozj.cjs +1 -0
- package/dist/HostPortal-B9Tzk_uN.cjs +1 -0
- package/dist/HostPortal-X1iw719T.js +33 -0
- package/dist/HostWindowContext-B2m0bVra.js +32 -0
- package/dist/HostWindowContext-_VZCt7xE.cjs +1 -0
- package/dist/{IconPicker-DPT-QfsC.cjs → IconPicker-4bdAeGxS.cjs} +1 -1
- package/dist/{IconPicker-C3ZwWkB1.js → IconPicker-Df6uIUpJ.js} +4 -4
- package/dist/{Input-Ca8fLm_s.cjs → Input-CZruORyy.cjs} +1 -1
- package/dist/{Input-gq8EcQao.js → Input-DkPhsdfk.js} +2 -2
- package/dist/Modal-CQG8l4x7.cjs +1 -0
- package/dist/{Modal-C4l_yuY9.js → Modal-CUPe98-o.js} +5 -5
- package/dist/PageSkeleton-C3mo6UGh.cjs +30 -0
- package/dist/{PageSkeleton-C95fXUUk.js → PageSkeleton-CUTLh9Ip.js} +630 -628
- package/dist/{Popover-C24npAQ7.js → Popover-Dht1jFEy.js} +1 -1
- package/dist/{Popover-hhGcYQ-a.cjs → Popover-YfzC0Tjh.cjs} +1 -1
- package/dist/{SearchableSelect-BpOD2_A-.js → SearchableSelect-C01brsF0.js} +5 -5
- package/dist/{SearchableSelect-MN5azo9r.cjs → SearchableSelect-pCaUie2M.cjs} +1 -1
- package/dist/StatusBarNotificationBell-BwqVV09r.js +14266 -0
- package/dist/StatusBarNotificationBell-C5Zc2IvW.cjs +50 -0
- package/dist/{Stepper-BgDx1cPX.js → Stepper-38IAEOyT.js} +3 -3
- package/dist/{Stepper-D7rXGxdg.cjs → Stepper-CtaTpnQu.cjs} +1 -1
- package/dist/{Textarea-BueHsjOk.js → Textarea-B5QqqKnI.js} +1 -1
- package/dist/{Textarea-BltpSavs.cjs → Textarea-CeAGf08O.cjs} +1 -1
- package/dist/{TimeSeriesChart-C3o7NZPh.js → TimeSeriesChart-ByKG4E1G.js} +2 -2
- package/dist/{TimeSeriesChart-DhYtrAgX.cjs → TimeSeriesChart-_NOs_Job.cjs} +1 -1
- package/dist/ToggleButton-Bz3zAtec.cjs +1 -0
- package/dist/{ToggleButton-DCP7f6Uo.js → ToggleButton-D-N0C2Fu.js} +54 -53
- package/dist/_internal/app/keybindings/context/keybindingsContext.d.cts +11 -6
- package/dist/_internal/app/keybindings/context/keybindingsContext.d.ts +11 -6
- package/dist/_internal/app/keybindings/context/useFocusClaim.d.cts +4 -3
- package/dist/_internal/app/keybindings/context/useFocusClaim.d.ts +4 -3
- package/dist/_internal/app/keybindings/context/useListCommands.d.cts +6 -5
- package/dist/_internal/app/keybindings/context/useListCommands.d.ts +6 -5
- package/dist/_internal/app/keybindings/index.d.cts +0 -10
- package/dist/_internal/app/keybindings/index.d.ts +0 -10
- package/dist/_internal/app/keybindings/panelCommandsRegistry.d.cts +14 -9
- package/dist/_internal/app/keybindings/panelCommandsRegistry.d.ts +14 -9
- package/dist/_internal/app/menu/menuFavorites.d.cts +35 -8
- package/dist/_internal/app/menu/menuFavorites.d.ts +35 -8
- package/dist/_internal/app/onboarding/pageTourState.d.cts +75 -22
- package/dist/_internal/app/onboarding/pageTourState.d.ts +75 -22
- package/dist/_internal/app/platform/electronBridge.d.cts +35 -29
- package/dist/_internal/app/platform/electronBridge.d.ts +35 -29
- package/dist/_internal/app/settings/secrets/notificationSecrets.d.cts +8 -4
- package/dist/_internal/app/settings/secrets/notificationSecrets.d.ts +8 -4
- package/dist/_internal/app/windows/window/HostWindowContext.d.cts +8 -14
- package/dist/_internal/app/windows/window/HostWindowContext.d.ts +8 -14
- package/dist/_internal/contract/catalogNotify.d.cts +6 -19
- package/dist/_internal/contract/catalogNotify.d.ts +6 -19
- package/dist/_internal/contract/hostErrorText.d.cts +13 -23
- package/dist/_internal/contract/hostErrorText.d.ts +13 -23
- package/dist/_internal/contract/notificationCatalog.d.cts +16 -5
- package/dist/_internal/contract/notificationCatalog.d.ts +16 -5
- package/dist/_internal/platform/errors/diagnosticReport.d.cts +3 -1
- package/dist/_internal/platform/errors/diagnosticReport.d.ts +3 -1
- package/dist/_internal/platform/logging/consoleLogger.d.cts +7 -0
- package/dist/_internal/platform/logging/consoleLogger.d.ts +7 -0
- package/dist/_internal/platform/settings/registry/defineSettings.d.cts +19 -8
- package/dist/_internal/platform/settings/registry/defineSettings.d.ts +19 -8
- package/dist/_internal/platform/settings/registry/stateDbStore.d.cts +23 -15
- package/dist/_internal/platform/settings/registry/stateDbStore.d.ts +23 -15
- package/dist/_internal/platform/vendorErrors/index.d.cts +7 -17
- package/dist/_internal/platform/vendorErrors/index.d.ts +7 -17
- package/dist/_internal/platform/window/displayOwner.d.cts +35 -14
- package/dist/_internal/platform/window/displayOwner.d.ts +35 -14
- package/dist/a11y/index.cjs +1 -1
- package/dist/a11y/index.js +1 -1
- package/dist/actions-DtaFGwh2.cjs +1 -0
- package/dist/actions-wwAHs3ZU.js +16 -0
- package/dist/{server/appThemeDerivation-BiCyiSuz.js → appThemeDerivation-B7-DjMIM.js} +181 -184
- package/dist/appThemeDerivation-NS3Vws8q.cjs +1 -0
- package/dist/async/createGuardedListLoader.d.cts +3 -0
- package/dist/async/createGuardedListLoader.d.ts +3 -0
- package/dist/charts/index.cjs +1 -1
- package/dist/charts/index.js +1 -1
- package/dist/createDialogShellFocus-BBFu3Z_O.js +282 -0
- package/dist/createDialogShellFocus-CxRqhbRN.cjs +1 -0
- package/dist/createResizableSidebar-CfFxQUny.js +449 -0
- package/dist/createResizableSidebar-q7aC7SAO.cjs +1 -0
- package/dist/{createVirtualScroller-LN-7QFiv.cjs → createVirtualScroller-CL49JE2P.cjs} +1 -1
- package/dist/{server/createVirtualScroller-DBvqT0UW.js → createVirtualScroller-vu-l4rVv.js} +7 -7
- package/dist/defineSettings-D0CSMcyy.cjs +1 -0
- package/dist/defineSettings-Di1sG81q.js +407 -0
- package/dist/descriptor-CaHgh9N_.cjs +1 -0
- package/dist/{descriptor-CrCl515S.js → descriptor-eGtcBtpI.js} +5 -5
- package/dist/desktop/index.cjs +1 -1
- package/dist/desktop/index.js +500 -426
- package/dist/dialogFocusRestore-BrALT8Ew.js +35 -0
- package/dist/dialogFocusRestore-CcEsB50v.cjs +1 -0
- package/dist/electronBridge-BK92fycw.js +235 -0
- package/dist/electronBridge-cT0xww92.cjs +1 -0
- package/dist/errorHandler-BvPGW-Nm.js +373 -0
- package/dist/errorHandler-DoDAPpv2.cjs +3 -0
- package/dist/feedback/Loader.d.cts +6 -1
- package/dist/feedback/Loader.d.ts +6 -1
- package/dist/feedback/createPreference.d.cts +4 -1
- package/dist/feedback/createPreference.d.ts +4 -1
- package/dist/feedback/guidedInstallOutcome.d.cts +15 -2
- package/dist/feedback/guidedInstallOutcome.d.ts +15 -2
- package/dist/feedback/index.cjs +1 -1
- package/dist/feedback/index.js +37 -38
- package/dist/feedback/readFailureText.d.cts +20 -1
- package/dist/feedback/readFailureText.d.ts +20 -1
- package/dist/focusModality-BISb6-yg.cjs +1 -0
- package/dist/focusModality-FoLPWF-_.js +135 -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/{headerIconOverrides-DY3BTuca.cjs → headerIconOverrides-Bn1QuODq.cjs} +1 -1
- package/dist/{server/headerIconOverrides-B7TQUBmD.js → headerIconOverrides-Dh2PaOcO.js} +1 -1
- package/dist/host/index.cjs +1 -1
- package/dist/host/index.d.cts +14 -16
- package/dist/host/index.d.ts +14 -16
- package/dist/host/index.js +53 -90
- package/dist/host/kitHost.d.cts +42 -0
- package/dist/host/kitHost.d.ts +42 -0
- package/dist/host/window.d.cts +3 -11
- package/dist/host/window.d.ts +3 -11
- package/dist/i18n/index.cjs +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/{server/i18n-D9k9xwuD.js → i18n-DW9kcu0G.js} +180 -178
- package/dist/i18n-DZ0JlZal.cjs +4 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +665 -738
- package/dist/isOneOf-9EXOSYJu.cjs +1 -0
- package/dist/isOneOf-Dtomuazg.js +6 -0
- package/dist/{keys-Bfgdfak_.js → keys-B2nlkpqc.js} +6 -9
- package/dist/keys-GMxY2wcl.cjs +1 -0
- package/dist/layout/createResizableSidebar.d.cts +14 -0
- package/dist/layout/createResizableSidebar.d.ts +14 -0
- package/dist/layout/index.cjs +1 -1
- package/dist/layout/index.js +3 -3
- package/dist/layout/sidebarWidthClamp.d.cts +1 -1
- package/dist/layout/sidebarWidthClamp.d.ts +1 -1
- package/dist/mainRealmDom-C12lr9lm.js +171 -0
- package/dist/mainRealmDom-S6teqEr4.cjs +1 -0
- package/dist/navigation/index.cjs +1 -1
- package/dist/navigation/index.js +1 -1
- package/dist/notifications/NotificationHost.d.cts +7 -1
- package/dist/notifications/NotificationHost.d.ts +7 -1
- package/dist/notifications/NotificationItem.d.cts +48 -15
- package/dist/notifications/NotificationItem.d.ts +48 -15
- package/dist/notifications/catalogAdapter.d.cts +28 -6
- package/dist/notifications/catalogAdapter.d.ts +28 -6
- package/dist/notifications/createNotificationPreviewRuntime.d.cts +21 -3
- package/dist/notifications/createNotificationPreviewRuntime.d.ts +21 -3
- package/dist/notifications/customSoundCache.d.cts +24 -24
- package/dist/notifications/customSoundCache.d.ts +24 -24
- package/dist/notifications/emailDigest.d.cts +34 -16
- package/dist/notifications/emailDigest.d.ts +34 -16
- package/dist/notifications/errorActionButtons.d.cts +18 -1
- package/dist/notifications/errorActionButtons.d.ts +18 -1
- package/dist/notifications/fireNotification.d.cts +27 -17
- package/dist/notifications/fireNotification.d.ts +27 -17
- package/dist/notifications/index.cjs +1 -1
- package/dist/notifications/index.d.cts +6 -12
- package/dist/notifications/index.d.ts +6 -12
- package/dist/notifications/index.js +64 -104
- package/dist/notifications/nativeEngine.d.cts +18 -15
- package/dist/notifications/nativeEngine.d.ts +18 -15
- package/dist/notifications/notificationAnalytics.d.cts +11 -6
- package/dist/notifications/notificationAnalytics.d.ts +11 -6
- package/dist/notifications/notificationAudio.d.cts +30 -23
- package/dist/notifications/notificationAudio.d.ts +30 -23
- package/dist/notifications/notificationCardServices.d.cts +23 -0
- package/dist/notifications/notificationCardServices.d.ts +23 -0
- package/dist/notifications/notificationOverlayChannel.d.cts +4 -4
- package/dist/notifications/notificationOverlayChannel.d.ts +4 -4
- package/dist/notifications/notificationOverlaySync.d.cts +7 -2
- package/dist/notifications/notificationOverlaySync.d.ts +7 -2
- package/dist/notifications/notificationService.d.cts +101 -0
- package/dist/notifications/notificationService.d.ts +101 -0
- package/dist/notifications/notificationTimeline.d.cts +47 -49
- package/dist/notifications/notificationTimeline.d.ts +47 -49
- package/dist/notifications/notifications.notifications.d.cts +0 -4
- package/dist/notifications/notifications.notifications.d.ts +0 -4
- package/dist/notifications/toast.d.cts +24 -28
- package/dist/notifications/toast.d.ts +24 -28
- package/dist/notifications/webhookDelivery.d.cts +12 -17
- package/dist/notifications/webhookDelivery.d.ts +12 -17
- package/dist/overlay/ConfirmDialog.d.cts +0 -8
- package/dist/overlay/ConfirmDialog.d.ts +0 -8
- package/dist/overlay/command-palette/unifiedSearch/databaseObjectSearchContributor.d.cts +15 -14
- package/dist/overlay/command-palette/unifiedSearch/databaseObjectSearchContributor.d.ts +15 -14
- package/dist/overlay/command-palette/unifiedSearch/settingsSearchContributor.d.cts +1 -3
- package/dist/overlay/command-palette/unifiedSearch/settingsSearchContributor.d.ts +1 -3
- package/dist/overlay/command-palette/unifiedSearch/unifiedSearchTypes.d.cts +1 -1
- package/dist/overlay/command-palette/unifiedSearch/unifiedSearchTypes.d.ts +1 -1
- package/dist/overlay/index.cjs +1 -1
- package/dist/overlay/index.d.cts +2 -3
- package/dist/overlay/index.d.ts +2 -3
- package/dist/overlay/index.js +110 -115
- package/dist/pageTourState-BcBF8w89.js +516 -0
- package/dist/pageTourState-CrbEU7QW.cjs +5 -0
- package/dist/server/{AttributeGrid-UJtHTip2.js → AttributeGrid-B2s_rp00.js} +3 -3
- package/dist/server/{AttributeGrid-CyMsR4GC.cjs → AttributeGrid-C7aWbIe5.cjs} +1 -1
- package/dist/server/{Button-BesBg6eW.js → Button-Ck03cbUs.js} +1 -1
- package/dist/server/{Button-PZulLru4.cjs → Button-DWFMF5y0.cjs} +1 -1
- package/dist/server/CommandPalette-2UppyMxU.js +3271 -0
- package/dist/server/CommandPalette-DwpZyhO6.cjs +1 -0
- package/dist/server/{CopyButton-D_sN2Ggp.cjs → CopyButton-BOmAUQD4.cjs} +1 -1
- package/dist/server/{CopyButton-I5xsXV07.js → CopyButton-UvtFwOtA.js} +1 -1
- package/dist/server/DateRangePicker-BJteKzOY.cjs +9 -0
- package/dist/server/{DateRangePicker-DGUl2aE3.js → DateRangePicker-Cr58DczM.js} +158 -143
- package/dist/server/GuidedTour-C4msn-Ag.js +400 -0
- package/dist/server/GuidedTour-Rlsp8rOe.cjs +1 -0
- package/dist/server/HostPortal-B9Tzk_uN.cjs +1 -0
- package/dist/server/HostPortal-X1iw719T.js +33 -0
- package/dist/server/HostWindowContext-B2m0bVra.js +32 -0
- package/dist/server/HostWindowContext-_VZCt7xE.cjs +1 -0
- package/dist/server/{IconPicker-BlD0VBca.cjs → IconPicker-9DfOxql6.cjs} +1 -1
- package/dist/server/{IconPicker-o8hUxjYU.js → IconPicker-N0wub1Aj.js} +4 -4
- package/dist/server/Modal-D__GTo-n.cjs +1 -0
- package/dist/server/{Modal-DmF6CwfY.js → Modal-DeQjfpkG.js} +3 -3
- package/dist/server/{PageSkeleton-BigztY5i.js → PageSkeleton-C41pXOcr.js} +460 -458
- package/dist/server/PageSkeleton-D4i-UcnI.cjs +30 -0
- package/dist/server/{SearchableSelect-Dn-cssWx.js → SearchableSelect-CEcuBnge.js} +2 -2
- package/dist/server/{SearchableSelect-R0Dwz9rz.cjs → SearchableSelect-Ca9g8ztu.cjs} +1 -1
- package/dist/server/StatusBarNotificationBell-BotYny7q.cjs +49 -0
- package/dist/server/StatusBarNotificationBell-DyEQF2W7.js +13968 -0
- package/dist/server/{Stepper-dBm8YaCw.cjs → Stepper--pusyxso.cjs} +1 -1
- package/dist/server/{Stepper-BaQ6Kexj.js → Stepper-B_eL85hK.js} +1 -1
- package/dist/server/{TimeSeriesChart-BbbfDyeA.js → TimeSeriesChart-aSHquoBv.js} +1 -1
- package/dist/server/{TimeSeriesChart-qPgMkkaW.cjs → TimeSeriesChart-nZeB5jtN.cjs} +1 -1
- package/dist/server/ToggleButton-57_0SA-V.cjs +1 -0
- package/dist/server/{ToggleButton-C0_QpslP.js → ToggleButton-DjlWwgLJ.js} +4 -4
- package/dist/server/VpTrash-D49oUUJh.cjs +1 -0
- package/dist/server/VpTrash-Dlq8o6Uv.js +298 -0
- package/dist/server/a11y/index.cjs +1 -1
- package/dist/server/a11y/index.js +1 -1
- package/dist/server/actions-DtaFGwh2.cjs +1 -0
- package/dist/server/actions-wwAHs3ZU.js +16 -0
- package/dist/{appThemeDerivation-BiCyiSuz.js → server/appThemeDerivation-B7-DjMIM.js} +181 -184
- package/dist/server/appThemeDerivation-NS3Vws8q.cjs +1 -0
- package/dist/server/charts/index.cjs +1 -1
- package/dist/server/charts/index.js +1 -1
- package/dist/server/{format-CYCi8g4r.js → createDialogShellFocus-DNjzmcGj.js} +110 -126
- package/dist/server/createDialogShellFocus-PRRfMli-.cjs +1 -0
- package/dist/server/createResizableSidebar-CZtGmUnA.cjs +1 -0
- package/dist/server/createResizableSidebar-DdWdAB9l.js +287 -0
- package/dist/server/{createVirtualScroller-LN-7QFiv.cjs → createVirtualScroller-CL49JE2P.cjs} +1 -1
- package/dist/{createVirtualScroller-DBvqT0UW.js → server/createVirtualScroller-vu-l4rVv.js} +7 -7
- package/dist/server/defineSettings-D0CSMcyy.cjs +1 -0
- package/dist/server/defineSettings-Di1sG81q.js +407 -0
- package/dist/server/descriptor-CEGvvJZh.cjs +1 -0
- package/dist/server/{descriptor-DtZDXBe6.js → descriptor-GLoKPx6x.js} +4 -4
- package/dist/server/desktop/index.cjs +1 -1
- package/dist/server/desktop/index.js +389 -315
- package/dist/server/dialogFocusRestore-BrALT8Ew.js +35 -0
- package/dist/server/dialogFocusRestore-CcEsB50v.cjs +1 -0
- package/dist/server/electronBridge-BK92fycw.js +235 -0
- package/dist/server/electronBridge-cT0xww92.cjs +1 -0
- package/dist/server/errorHandler-BvPGW-Nm.js +373 -0
- package/dist/server/errorHandler-DoDAPpv2.cjs +3 -0
- package/dist/server/feedback/index.cjs +1 -1
- package/dist/server/feedback/index.js +37 -38
- package/dist/server/focusModality-D-nxv8Er.cjs +1 -0
- package/dist/server/{focusModality-BCX5GH0P.js → focusModality-nWNVX3JG.js} +41 -41
- 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/{headerIconOverrides-DY3BTuca.cjs → headerIconOverrides-Bn1QuODq.cjs} +1 -1
- package/dist/{headerIconOverrides-B7TQUBmD.js → server/headerIconOverrides-Dh2PaOcO.js} +1 -1
- package/dist/server/host/index.cjs +1 -1
- package/dist/server/host/index.js +53 -90
- package/dist/server/i18n/index.cjs +1 -1
- package/dist/server/i18n/index.js +1 -1
- package/dist/{i18n-D9k9xwuD.js → server/i18n-DW9kcu0G.js} +180 -178
- package/dist/server/i18n-DZ0JlZal.cjs +4 -0
- package/dist/server/{index-B4epvfiq.js → index-BNYr6EIW.js} +89 -90
- package/dist/server/index-Cqod09d_.cjs +1 -0
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +810 -883
- package/dist/server/layout/index.cjs +1 -1
- package/dist/server/layout/index.js +3 -3
- package/dist/server/mainRealmDom-DPNaDWtw.js +121 -0
- package/dist/server/mainRealmDom-DwZVMPnO.cjs +1 -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 +63 -103
- package/dist/server/overlay/index.cjs +1 -1
- package/dist/server/overlay/index.js +104 -109
- package/dist/server/pageTourState-BcBF8w89.js +516 -0
- package/dist/server/pageTourState-CrbEU7QW.cjs +5 -0
- package/dist/server/settings/index.cjs +1 -1
- package/dist/server/settings/index.js +23 -24
- package/dist/server/stateDbStore-CThsVch-.cjs +1 -0
- package/dist/server/stateDbStore-DHZFUIEt.js +57 -0
- package/dist/server/tokens/index.cjs +1 -1
- package/dist/server/tokens/index.js +19 -20
- package/dist/server/tree/index.cjs +1 -1
- package/dist/server/tree/index.js +1 -1
- package/dist/server/useListCommands-BO_XrRHj.js +38 -0
- package/dist/server/useListCommands-Dnm4ktP1.cjs +1 -0
- package/dist/server/useSettingsSubscription-DKjCwmRd.cjs +1 -0
- package/dist/server/{notification-CpDYN_iu.js → useSettingsSubscription-DLEk4k4j.js} +41 -32
- package/dist/server/window-CUK6x8Pj.js +36 -0
- package/dist/server/window-_BfSgFGO.cjs +1 -0
- package/dist/server/windowRegistry-CxXtP-iY.cjs +1 -0
- package/dist/server/windowRegistry-DeGmXt6W.js +20 -0
- package/dist/settings/index.cjs +1 -1
- package/dist/settings/index.d.cts +1 -1
- package/dist/settings/index.d.ts +1 -1
- package/dist/settings/index.js +23 -24
- package/dist/solid/_internal/app/keybindings/context/useFocusClaim.js +3 -10
- package/dist/solid/_internal/app/keybindings/context/useListCommands.js +1 -2
- package/dist/solid/_internal/app/keybindings/panelCommandsRegistry.js +8 -1
- package/dist/solid/_internal/app/menu/menuFavorites.js +45 -40
- package/dist/solid/_internal/app/onboarding/PageTourHost.jsx +22 -22
- package/dist/solid/_internal/app/onboarding/pageTourState.js +94 -92
- package/dist/solid/_internal/app/platform/electronBridge.js +15 -49
- package/dist/solid/_internal/app/settings/secrets/notificationSecrets.js +0 -10
- package/dist/solid/_internal/app/windows/window/HostWindowContext.jsx +4 -13
- package/dist/solid/_internal/contract/catalogNotify.js +1 -24
- package/dist/solid/_internal/contract/hostErrorText.js +1 -14
- package/dist/solid/_internal/contract/notificationCatalog.js +1 -1
- package/dist/solid/_internal/platform/errors/diagnosticReport.js +2 -3
- package/dist/solid/_internal/platform/logging/consoleLogger.js +6 -0
- package/dist/solid/_internal/platform/settings/registry/defineSettings.js +48 -20
- package/dist/solid/_internal/platform/settings/registry/stateDbStore.js +29 -19
- package/dist/solid/_internal/platform/vendorErrors/index.js +4 -17
- package/dist/solid/_internal/platform/window/displayOwner.js +105 -114
- package/dist/solid/a11y/AriaAnnouncer.jsx +2 -3
- package/dist/solid/async/createGuardedListLoader.js +1 -1
- package/dist/solid/desktop/menu/MenuPanel.jsx +7 -7
- package/dist/solid/feedback/ErrorBoundary.jsx +7 -4
- package/dist/solid/feedback/Loader.jsx +1 -2
- package/dist/solid/feedback/createPreference.js +3 -2
- package/dist/solid/feedback/guidedInstallOutcome.js +1 -2
- package/dist/solid/feedback/preference.notifications.js +1 -2
- package/dist/solid/feedback/readFailureText.js +1 -2
- package/dist/solid/host/index.js +8 -16
- package/dist/solid/host/window.js +15 -22
- package/dist/solid/i18n/i18n.js +5 -6
- package/dist/solid/index.js +0 -1
- package/dist/solid/layout/createResizableSidebar.js +15 -23
- package/dist/solid/notifications/NotificationHost.jsx +21 -29
- package/dist/solid/notifications/NotificationItem.jsx +28 -104
- package/dist/solid/notifications/NotificationPanel.jsx +33 -44
- package/dist/solid/notifications/NotificationsCenter.jsx +22 -20
- package/dist/solid/notifications/StatusBarNotificationBell.jsx +4 -3
- package/dist/solid/notifications/catalogAdapter.js +61 -62
- package/dist/solid/notifications/createNotificationPreviewRuntime.js +29 -19
- package/dist/solid/notifications/customSoundCache.js +26 -21
- package/dist/solid/notifications/emailDigest.js +74 -86
- package/dist/solid/notifications/errorActionButtons.js +6 -11
- package/dist/solid/notifications/fireNotification.js +14 -19
- package/dist/solid/notifications/index.js +3 -12
- package/dist/solid/notifications/nativeEngine.js +6 -19
- package/dist/solid/notifications/notificationAnalytics.js +32 -38
- package/dist/solid/notifications/notificationAudio.js +77 -74
- package/dist/solid/notifications/notificationCardServices.js +34 -0
- package/dist/solid/notifications/notificationOverlayChannel.js +3 -3
- package/dist/solid/notifications/notificationOverlaySync.js +18 -23
- package/dist/solid/notifications/notificationService.js +135 -0
- package/dist/solid/notifications/notificationTimeline.js +117 -124
- package/dist/solid/notifications/notifications.notifications.js +3 -22
- package/dist/solid/notifications/toast.js +168 -213
- package/dist/solid/notifications/webhookDelivery.js +27 -53
- package/dist/solid/overlay/ConfirmDialog.jsx +1 -33
- package/dist/solid/overlay/command-palette/CommandPalette.jsx +3 -1
- package/dist/solid/overlay/command-palette/unifiedSearch/databaseObjectSearchContributor.js +26 -25
- package/dist/solid/overlay/command-palette/unifiedSearch/settingsSearchContributor.js +2 -7
- package/dist/solid/overlay/index.js +0 -3
- package/dist/solid/settings/index.js +1 -1
- package/dist/solid/tokens/index.js +1 -1
- package/dist/solid/tokens/palette/themeRegistry.js +20 -22
- package/dist/stateDbStore-CThsVch-.cjs +1 -0
- package/dist/stateDbStore-DHZFUIEt.js +57 -0
- package/dist/style.css +1 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +1 -1
- package/dist/tokens/index.d.ts +1 -1
- package/dist/tokens/index.js +19 -20
- package/dist/tokens/palette/themeRegistry.d.cts +17 -22
- package/dist/tokens/palette/themeRegistry.d.ts +17 -22
- package/dist/{tooltipCoordinator-Zim5pWzk.js → tooltipCoordinator-BzxEyKhA.js} +2 -2
- package/dist/tooltipCoordinator-DslqMlsI.cjs +1 -0
- package/dist/tree/index.cjs +1 -1
- package/dist/tree/index.js +1 -1
- package/dist/ui.css +1 -1
- package/dist/{useFloatingDropdown-CfPEYRut.js → useFloatingDropdown-BN4J092P.js} +1 -1
- package/dist/{useFloatingDropdown-DcU7ozDg.cjs → useFloatingDropdown-D9OvEFAp.cjs} +1 -1
- package/dist/useListCommands-BO_XrRHj.js +38 -0
- package/dist/useListCommands-Dnm4ktP1.cjs +1 -0
- package/dist/useSettingsSubscription-DKjCwmRd.cjs +1 -0
- package/dist/{notification-CpDYN_iu.js → useSettingsSubscription-DLEk4k4j.js} +41 -32
- package/dist/window-CUK6x8Pj.js +36 -0
- package/dist/window-_BfSgFGO.cjs +1 -0
- package/dist/windowRegistry-CxXtP-iY.cjs +1 -0
- package/dist/windowRegistry-DeGmXt6W.js +20 -0
- package/package.json +1 -1
- package/dist/CommandPalette-DeEImZ8D.cjs +0 -2
- package/dist/CommandPalette-yqvM9AuU.js +0 -3897
- package/dist/DateRangePicker-7t4JKCp1.cjs +0 -9
- package/dist/GuidedTour-C_Lxe1t_.cjs +0 -21
- package/dist/GuidedTour-lsljVkPL.js +0 -11216
- package/dist/HostWindowContext-DqDeJmBP.cjs +0 -1
- package/dist/HostWindowContext-KL4U1qUv.js +0 -40
- package/dist/Modal-CJhd27dM.cjs +0 -1
- package/dist/PageSkeleton-SYSL4Adl.cjs +0 -30
- package/dist/Progress-B5YmNeyU.js +0 -56
- package/dist/Progress-BNy0wsJl.cjs +0 -1
- package/dist/StatusBarNotificationBell-B1bvE_SO.js +0 -2140
- package/dist/StatusBarNotificationBell-Cqo6cZbO.cjs +0 -4
- package/dist/ToggleButton-BmwDfsn4.cjs +0 -1
- package/dist/_internal/app/contexts/WorkspaceTabsContext.d.cts +0 -20
- package/dist/_internal/app/contexts/WorkspaceTabsContext.d.ts +0 -20
- package/dist/_internal/app/settings/theme/appThemeChange.d.cts +0 -20
- package/dist/_internal/app/settings/theme/appThemeChange.d.ts +0 -20
- package/dist/_internal/app/settings/ui/shell/openSettingsModal.d.cts +0 -6
- package/dist/_internal/app/settings/ui/shell/openSettingsModal.d.ts +0 -6
- package/dist/_internal/base/listenerDispatch.d.cts +0 -14
- package/dist/_internal/base/listenerDispatch.d.ts +0 -14
- package/dist/_internal/contract/appName.d.cts +0 -10
- package/dist/_internal/contract/appName.d.ts +0 -10
- package/dist/_internal/contract/hostText.d.cts +0 -25
- package/dist/_internal/contract/hostText.d.ts +0 -25
- package/dist/_internal/platform/logging/rendererLogging.d.cts +0 -65
- package/dist/_internal/platform/logging/rendererLogging.d.ts +0 -65
- package/dist/_internal/platform/settings/preferencesCache.d.cts +0 -162
- package/dist/_internal/platform/settings/preferencesCache.d.ts +0 -162
- package/dist/appThemeDerivation-DmKbTiFi.cjs +0 -1
- package/dist/catalogNotify-BcY9oqVy.js +0 -1223
- package/dist/catalogNotify-DacJjC-p.cjs +0 -27
- package/dist/createResizableSidebar-BIhyo5zN.cjs +0 -1
- package/dist/createResizableSidebar-Cqv-1IXG.js +0 -461
- package/dist/defineSettings-CcYXt2Jf.js +0 -391
- package/dist/defineSettings-yHQdUwxI.cjs +0 -1
- package/dist/descriptor-Dmch-3AF.cjs +0 -1
- package/dist/dialogFocusRestore-B4ggeVAM.js +0 -64
- package/dist/dialogFocusRestore-BcMPrbig.cjs +0 -1
- package/dist/displayOwner-eYQHHvjt.cjs +0 -1
- package/dist/displayOwner-mT80Oyi-.js +0 -75
- package/dist/feedback/preference.notifications.samples.d.cts +0 -1
- package/dist/feedback/preference.notifications.samples.d.ts +0 -1
- package/dist/focusModality-BNjYldd9.cjs +0 -1
- package/dist/focusModality-DxudpWPs.js +0 -135
- package/dist/format-BS7oDguE.js +0 -298
- package/dist/format-CuANkXXB.cjs +0 -1
- package/dist/i18n-DXXArz-m.cjs +0 -4
- package/dist/keys-BeeC5_RZ.cjs +0 -1
- package/dist/mainRealmDom-CkoRyNhZ.cjs +0 -1
- package/dist/mainRealmDom-kEStLHIY.js +0 -102
- package/dist/menuFavorites-BmdM_qV5.js +0 -69
- package/dist/menuFavorites-DoDFvtlQ.cjs +0 -1
- package/dist/notification-DygvQB_o.cjs +0 -1
- package/dist/notificationSuppressions-DGfo2QKG.cjs +0 -1
- package/dist/notificationSuppressions-ddyK85cB.js +0 -430
- package/dist/notifications/copyToClipboard.d.cts +0 -6
- package/dist/notifications/copyToClipboard.d.ts +0 -6
- package/dist/notifications/createCopyFlash.d.cts +0 -17
- package/dist/notifications/createCopyFlash.d.ts +0 -17
- package/dist/notifications/notificationDisplayOwner.d.cts +0 -27
- package/dist/notifications/notificationDisplayOwner.d.ts +0 -27
- package/dist/notifications/notificationRepeaterEntryFactory.d.cts +0 -36
- package/dist/notifications/notificationRepeaterEntryFactory.d.ts +0 -36
- package/dist/notifications/notifications.notifications.samples.d.cts +0 -1
- package/dist/notifications/notifications.notifications.samples.d.ts +0 -1
- package/dist/notifications/persistWithRollbackOnFailure.d.cts +0 -18
- package/dist/notifications/persistWithRollbackOnFailure.d.ts +0 -18
- package/dist/notifications/startNotificationSchedulers.d.cts +0 -2
- package/dist/notifications/startNotificationSchedulers.d.ts +0 -2
- package/dist/notifications/startNotificationSettingsReactions.d.cts +0 -46
- package/dist/notifications/startNotificationSettingsReactions.d.ts +0 -46
- package/dist/overlay/ToastHost.d.cts +0 -7
- package/dist/overlay/ToastHost.d.ts +0 -7
- package/dist/pageTourState-CIr8ockR.js +0 -92
- package/dist/pageTourState-D8Uapyft.cjs +0 -1
- package/dist/preferencesCache-Bow6TxP1.js +0 -65
- package/dist/preferencesCache-D7mm43_n.cjs +0 -1
- package/dist/rendererLogging-Dt5FZ8mq.cjs +0 -7
- package/dist/rendererLogging-gAhiHWkA.js +0 -822
- package/dist/server/CommandPalette-C8treS8g.cjs +0 -1
- package/dist/server/CommandPalette-Dslsq5Ez.js +0 -3155
- package/dist/server/DateRangePicker-CDKi9BAf.cjs +0 -9
- package/dist/server/GuidedTour-B3T9rAPX.cjs +0 -20
- package/dist/server/GuidedTour-DSoSZZby.js +0 -10983
- package/dist/server/HostWindowContext-DqDeJmBP.cjs +0 -1
- package/dist/server/HostWindowContext-KL4U1qUv.js +0 -40
- package/dist/server/Modal-CCUwQYso.cjs +0 -1
- package/dist/server/PageSkeleton-DdpXfZoC.cjs +0 -30
- package/dist/server/Progress-CRbj6nEy.cjs +0 -1
- package/dist/server/Progress-nsDy6clG.js +0 -41
- package/dist/server/StatusBarNotificationBell-C64Odn2C.js +0 -1974
- package/dist/server/StatusBarNotificationBell-DY0Q27su.cjs +0 -4
- package/dist/server/ToggleButton-1bNYk35x.cjs +0 -1
- package/dist/server/VpTerminal-Bpw-d9wD.js +0 -186
- package/dist/server/VpTerminal-C-U_dN_x.cjs +0 -1
- package/dist/server/VpTrash-CagiU2Uj.cjs +0 -1
- package/dist/server/VpTrash-DVBfts9_.js +0 -116
- package/dist/server/appThemeDerivation-DmKbTiFi.cjs +0 -1
- package/dist/server/catalogNotify-MCW2sa2e.cjs +0 -27
- package/dist/server/catalogNotify-s3YymAe8.js +0 -1261
- package/dist/server/createResizableSidebar-MIzUlfdd.js +0 -299
- package/dist/server/createResizableSidebar-TdxLuiY8.cjs +0 -1
- package/dist/server/defineSettings-CcYXt2Jf.js +0 -391
- package/dist/server/defineSettings-yHQdUwxI.cjs +0 -1
- package/dist/server/descriptor-DAyyoF-I.cjs +0 -1
- package/dist/server/dialogFocusRestore-B4ggeVAM.js +0 -64
- package/dist/server/dialogFocusRestore-BcMPrbig.cjs +0 -1
- package/dist/server/displayOwner-eYQHHvjt.cjs +0 -1
- package/dist/server/displayOwner-mT80Oyi-.js +0 -75
- package/dist/server/focusModality-BKgJWRlC.cjs +0 -1
- package/dist/server/format-WfZycMBL.cjs +0 -1
- package/dist/server/i18n-DXXArz-m.cjs +0 -4
- package/dist/server/index-DlQYWckZ.cjs +0 -1
- package/dist/server/mainRealmDom-BCL1p_q6.cjs +0 -1
- package/dist/server/mainRealmDom-Dk0xb5Gj.js +0 -67
- package/dist/server/menuFavorites-BmdM_qV5.js +0 -69
- package/dist/server/menuFavorites-DoDFvtlQ.cjs +0 -1
- package/dist/server/notification-DygvQB_o.cjs +0 -1
- package/dist/server/notificationSuppressions-B-LKq9ZU.js +0 -391
- package/dist/server/notificationSuppressions-Dcc2WFBZ.cjs +0 -1
- package/dist/server/pageTourState-CIr8ockR.js +0 -92
- package/dist/server/pageTourState-D8Uapyft.cjs +0 -1
- package/dist/server/preferencesCache-Bow6TxP1.js +0 -65
- package/dist/server/preferencesCache-D7mm43_n.cjs +0 -1
- package/dist/server/rendererLogging-Dt5FZ8mq.cjs +0 -7
- package/dist/server/rendererLogging-gAhiHWkA.js +0 -822
- package/dist/server/settingsSearchContributor-CRZsl2Q_.js +0 -199
- package/dist/server/settingsSearchContributor-DH8UFpp2.cjs +0 -1
- package/dist/server/stateDbStore-Ds3zJ4cd.js +0 -47
- package/dist/server/stateDbStore-THFfFGa0.cjs +0 -1
- package/dist/server/useListCommands-Bf7aOTXZ.js +0 -61
- package/dist/server/useListCommands-ucngC3t4.cjs +0 -1
- package/dist/server/useSettingsSubscription-cu943hND.js +0 -11
- package/dist/server/useSettingsSubscription-vlMrNNH9.cjs +0 -1
- package/dist/server/visibleBrowserRegistry-BTfWUlI1.cjs +0 -1
- package/dist/server/visibleBrowserRegistry-Dw2Y4y_I.js +0 -89
- package/dist/server/windowRegistry-Bk5lXIVd.js +0 -62
- package/dist/server/windowRegistry-CGvOBUsw.cjs +0 -1
- package/dist/settingsSearchContributor-DWP5dwn3.js +0 -199
- package/dist/settingsSearchContributor-Dltbs1j_.cjs +0 -1
- package/dist/solid/_internal/app/contexts/WorkspaceTabsContext.js +0 -10
- package/dist/solid/_internal/app/settings/theme/appThemeChange.js +0 -5
- package/dist/solid/_internal/app/settings/ui/shell/openSettingsModal.js +0 -15
- package/dist/solid/_internal/base/listenerDispatch.js +0 -12
- package/dist/solid/_internal/contract/appName.js +0 -7
- package/dist/solid/_internal/contract/hostText.js +0 -15
- package/dist/solid/_internal/platform/logging/rendererLogging.js +0 -42
- package/dist/solid/_internal/platform/settings/preferencesCache.js +0 -329
- package/dist/solid/feedback/preference.notifications.samples.js +0 -5
- package/dist/solid/notifications/copyToClipboard.js +0 -21
- package/dist/solid/notifications/createCopyFlash.js +0 -26
- package/dist/solid/notifications/notificationDisplayOwner.js +0 -1
- package/dist/solid/notifications/notificationRepeaterEntryFactory.js +0 -20
- package/dist/solid/notifications/notifications.notifications.samples.js +0 -14
- package/dist/solid/notifications/persistWithRollbackOnFailure.js +0 -11
- package/dist/solid/notifications/startNotificationSchedulers.js +0 -8
- package/dist/solid/notifications/startNotificationSettingsReactions.js +0 -22
- package/dist/solid/overlay/ToastHost.jsx +0 -1
- package/dist/stateDbStore-Ds3zJ4cd.js +0 -47
- package/dist/stateDbStore-THFfFGa0.cjs +0 -1
- package/dist/tooltipCoordinator-Causlcgt.cjs +0 -1
- package/dist/useListCommands-Bf7aOTXZ.js +0 -61
- package/dist/useListCommands-ucngC3t4.cjs +0 -1
- package/dist/useSettingsSubscription-cu943hND.js +0 -11
- package/dist/useSettingsSubscription-vlMrNNH9.cjs +0 -1
- package/dist/visibleBrowserRegistry-BTfWUlI1.cjs +0 -1
- package/dist/visibleBrowserRegistry-Dw2Y4y_I.js +0 -89
- package/dist/windowRegistry-Bk5lXIVd.js +0 -62
- package/dist/windowRegistry-CGvOBUsw.cjs +0 -1
|
@@ -1,47 +1,52 @@
|
|
|
1
1
|
import { isRegisteredActionId } from '../../platform/menu/actions';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Emitter } from '../../base/event';
|
|
3
|
+
import { onUnexpectedError } from '../../base/errors/errorHandler';
|
|
4
|
+
import { StorageScope, StorageTarget, } from '../../platform/settings/registry/stateDbStore';
|
|
4
5
|
const MAX_FAVORITES = 20;
|
|
5
|
-
const listeners = new Set();
|
|
6
6
|
const STORAGE_KEY = 'menu.favorites';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
export class MenuFavoritesService {
|
|
8
|
+
storage;
|
|
9
|
+
_onDidChange = new Emitter();
|
|
10
|
+
onDidChange = this._onDidChange.event;
|
|
11
|
+
constructor(storage) {
|
|
12
|
+
this.storage = storage;
|
|
13
|
+
}
|
|
14
|
+
list() {
|
|
15
|
+
return this.stored()
|
|
16
|
+
.filter((id) => typeof id === 'string' && isRegisteredActionId(id))
|
|
17
|
+
.slice(0, MAX_FAVORITES);
|
|
18
|
+
}
|
|
19
|
+
has(actionId) {
|
|
20
|
+
return this.list().includes(actionId);
|
|
21
|
+
}
|
|
22
|
+
add(actionId) {
|
|
23
|
+
const current = this.list();
|
|
24
|
+
if (current.includes(actionId) || current.length >= MAX_FAVORITES)
|
|
25
|
+
return;
|
|
26
|
+
this.write([...current, actionId]);
|
|
27
|
+
}
|
|
28
|
+
remove(actionId) {
|
|
29
|
+
this.write(this.list().filter((id) => id !== actionId));
|
|
30
|
+
}
|
|
31
|
+
dispose() {
|
|
32
|
+
this._onDidChange.dispose();
|
|
33
|
+
}
|
|
34
|
+
stored() {
|
|
35
|
+
const raw = this.storage.get(STORAGE_KEY, StorageScope.APPLICATION);
|
|
36
|
+
if (raw === undefined)
|
|
37
|
+
return [];
|
|
38
|
+
let parsed;
|
|
39
|
+
try {
|
|
40
|
+
parsed = JSON.parse(raw);
|
|
41
|
+
}
|
|
42
|
+
catch (cause) {
|
|
43
|
+
onUnexpectedError(new Error(`[menu favourites] the stored list is not JSON`, { cause }));
|
|
44
|
+
return [];
|
|
45
|
+
}
|
|
11
46
|
return Array.isArray(parsed) ? parsed : [];
|
|
12
47
|
}
|
|
13
|
-
|
|
14
|
-
|
|
48
|
+
write(ids) {
|
|
49
|
+
this.storage.store(STORAGE_KEY, JSON.stringify(ids.slice(0, MAX_FAVORITES)), StorageScope.APPLICATION, StorageTarget.USER);
|
|
50
|
+
this._onDidChange.fire();
|
|
15
51
|
}
|
|
16
52
|
}
|
|
17
|
-
function read() {
|
|
18
|
-
return stored()
|
|
19
|
-
.filter((id) => typeof id === 'string' && isRegisteredActionId(id))
|
|
20
|
-
.slice(0, MAX_FAVORITES);
|
|
21
|
-
}
|
|
22
|
-
function write(ids) {
|
|
23
|
-
getSettingsBackend().store(STORAGE_KEY, JSON.stringify(ids.slice(0, MAX_FAVORITES)), StorageScope.APPLICATION, StorageTarget.USER);
|
|
24
|
-
notifyListeners(listeners, 'menuFavorites');
|
|
25
|
-
}
|
|
26
|
-
export function getMenuFavorites() {
|
|
27
|
-
return read();
|
|
28
|
-
}
|
|
29
|
-
export function isMenuFavorite(actionId) {
|
|
30
|
-
return read().includes(actionId);
|
|
31
|
-
}
|
|
32
|
-
export function addMenuFavorite(actionId) {
|
|
33
|
-
const current = read();
|
|
34
|
-
if (current.includes(actionId))
|
|
35
|
-
return;
|
|
36
|
-
if (current.length >= MAX_FAVORITES)
|
|
37
|
-
return;
|
|
38
|
-
write([...current, actionId]);
|
|
39
|
-
}
|
|
40
|
-
export function removeMenuFavorite(actionId) {
|
|
41
|
-
const next = read().filter((id) => id !== actionId);
|
|
42
|
-
write(next);
|
|
43
|
-
}
|
|
44
|
-
export function subscribeMenuFavorites(listener) {
|
|
45
|
-
listeners.add(listener);
|
|
46
|
-
return () => listeners.delete(listener);
|
|
47
|
-
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ToolWindowContext } from '../contexts/toolWindow/ToolWindowContext';
|
|
2
2
|
import { Show, createSignal, onCleanup, onMount, useContext, } from 'solid-js';
|
|
3
3
|
import { GuidedTour } from '../../../overlay/tour/GuidedTour';
|
|
4
|
-
import { getLogger } from '../../platform/logging/rendererLogging';
|
|
5
|
-
import { notifyFromCatalog } from '../../contract/catalogNotify';
|
|
6
4
|
import { PageTourHost_info_1 } from './onboarding.notifications';
|
|
7
|
-
import {
|
|
5
|
+
import { useKitHost } from '../../../host/kitHost';
|
|
8
6
|
import { visibleElement, } from './pageTourTypes';
|
|
9
7
|
export function PageTourHost(props) {
|
|
10
8
|
const layout = useContext(ToolWindowContext);
|
|
9
|
+
const { tours, notifications, log: hostLog } = useKitHost();
|
|
10
|
+
const log = hostLog.withTag('PageTour');
|
|
11
11
|
let marker;
|
|
12
12
|
const [open, setOpen] = createSignal(false);
|
|
13
13
|
const [index, setIndex] = createSignal(0);
|
|
@@ -20,42 +20,42 @@ export function PageTourHost(props) {
|
|
|
20
20
|
const visible = () => visibleElement(root());
|
|
21
21
|
const close = (completed, notify = true) => {
|
|
22
22
|
setOpen(false);
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
tours.release(token);
|
|
24
|
+
tours.setActive(null);
|
|
25
25
|
props.onTourActiveChange?.(false);
|
|
26
26
|
try {
|
|
27
|
-
|
|
27
|
+
tours.writeStatus(props.definition.pageId, completed ? 'completed' : 'skipped');
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
|
-
|
|
30
|
+
log.warn('Could not save tour progress', error);
|
|
31
31
|
}
|
|
32
32
|
if (automatic && notify)
|
|
33
|
-
|
|
33
|
+
notifications.notify(PageTourHost_info_1, {});
|
|
34
34
|
automatic = false;
|
|
35
35
|
};
|
|
36
36
|
const handleNeverShowAgain = () => {
|
|
37
|
-
|
|
37
|
+
tours.setNeverShowAgain(true);
|
|
38
38
|
close(false, false);
|
|
39
39
|
};
|
|
40
40
|
const start = (auto = false) => {
|
|
41
|
-
if (!visible() || !
|
|
41
|
+
if (!visible() || !tours.claim(token))
|
|
42
42
|
return;
|
|
43
43
|
manualRequested = false;
|
|
44
44
|
const available = props.definition.steps.filter((step) => step.available?.() !== false);
|
|
45
45
|
if (!available.length) {
|
|
46
|
-
|
|
46
|
+
tours.release(token);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
setSteps(available);
|
|
50
50
|
setIndex(0);
|
|
51
51
|
automatic = auto;
|
|
52
52
|
try {
|
|
53
|
-
|
|
53
|
+
tours.writeStatus(props.definition.pageId, 'shown');
|
|
54
54
|
}
|
|
55
55
|
catch (error) {
|
|
56
|
-
|
|
56
|
+
log.warn('Could not save tour progress', error);
|
|
57
57
|
}
|
|
58
|
-
|
|
58
|
+
tours.setActive(props.definition.pageId);
|
|
59
59
|
props.onTourActiveChange?.(true);
|
|
60
60
|
setOpen(true);
|
|
61
61
|
};
|
|
@@ -85,7 +85,7 @@ export function PageTourHost(props) {
|
|
|
85
85
|
return;
|
|
86
86
|
if (++readyTicks < 2)
|
|
87
87
|
return;
|
|
88
|
-
if (
|
|
88
|
+
if (tours.consumeRequest(props.definition.pageId))
|
|
89
89
|
manualRequested = true;
|
|
90
90
|
if (manualRequested) {
|
|
91
91
|
start();
|
|
@@ -93,18 +93,18 @@ export function PageTourHost(props) {
|
|
|
93
93
|
}
|
|
94
94
|
if (failed)
|
|
95
95
|
return;
|
|
96
|
-
if (
|
|
96
|
+
if (tours.skipWelcome())
|
|
97
97
|
return;
|
|
98
98
|
try {
|
|
99
|
-
if (!
|
|
99
|
+
if (!tours.readStatus(props.definition.pageId))
|
|
100
100
|
start(true);
|
|
101
101
|
}
|
|
102
102
|
catch (error) {
|
|
103
103
|
failed = true;
|
|
104
|
-
|
|
104
|
+
log.warn('Could not read tour progress', error);
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
-
const unregister =
|
|
107
|
+
const unregister = tours.registerHost({
|
|
108
108
|
page: props.definition.pageId,
|
|
109
109
|
document: () => marker.ownerDocument,
|
|
110
110
|
visible,
|
|
@@ -122,9 +122,9 @@ export function PageTourHost(props) {
|
|
|
122
122
|
onCleanup(() => {
|
|
123
123
|
win.clearInterval(timer);
|
|
124
124
|
unregister();
|
|
125
|
-
|
|
126
|
-
if (
|
|
127
|
-
|
|
125
|
+
tours.release(token);
|
|
126
|
+
if (tours.activePage() === props.definition.pageId) {
|
|
127
|
+
tours.setActive(null);
|
|
128
128
|
props.onTourActiveChange?.(false);
|
|
129
129
|
}
|
|
130
130
|
});
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import { createSignal } from 'solid-js';
|
|
2
2
|
import { getActiveWindow } from '../windows/window/windowRegistry';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
set: (k, v) => getSettingsBackend().store(k, v, StorageScope.APPLICATION, StorageTarget.MACHINE),
|
|
7
|
-
};
|
|
8
|
-
const isStorageDegraded = () => false;
|
|
9
|
-
const seen = new Map();
|
|
10
|
-
const [activeTourPage, setActiveTourPage] = createSignal(null);
|
|
11
|
-
export function getActiveTourPage() {
|
|
12
|
-
return activeTourPage();
|
|
13
|
-
}
|
|
3
|
+
import { isOneOf } from '../../base/isOneOf';
|
|
4
|
+
import { StorageScope, StorageTarget, } from '../../platform/settings/registry/stateDbStore';
|
|
5
|
+
export const TOUR_STATUSES = ['shown', 'skipped', 'completed'];
|
|
14
6
|
export function canonicalTourPageId(page) {
|
|
15
7
|
if (page === 'filesystem')
|
|
16
8
|
return 'file-system';
|
|
@@ -18,92 +10,102 @@ export function canonicalTourPageId(page) {
|
|
|
18
10
|
return 'database-explorer';
|
|
19
11
|
return page;
|
|
20
12
|
}
|
|
21
|
-
|
|
22
|
-
const active = activeTourPage();
|
|
23
|
-
return (active !== null && canonicalTourPageId(active) === canonicalTourPageId(page));
|
|
24
|
-
}
|
|
25
|
-
export function setActiveTour(page) {
|
|
26
|
-
setActiveTourPage(page ? canonicalTourPageId(page) : null);
|
|
27
|
-
}
|
|
28
|
-
const key = (page) => `onboarding:page:${canonicalTourPageId(page)}`;
|
|
13
|
+
const statusKey = (page) => `onboarding:page:${canonicalTourPageId(page)}`;
|
|
29
14
|
const NEVER_SHOW_AGAIN_KEY = 'onboarding:neverShowAgain';
|
|
30
|
-
|
|
31
|
-
export
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
export function setNeverShowToursAgain(never) {
|
|
41
|
-
neverShowAgainCache = never;
|
|
42
|
-
memoryStore.set(NEVER_SHOW_AGAIN_KEY, never ? 'true' : 'false');
|
|
43
|
-
}
|
|
44
|
-
export function readTourStatus(page) {
|
|
45
|
-
if (isStorageDegraded())
|
|
46
|
-
return 'unavailable';
|
|
47
|
-
if (isNeverShowToursAgain())
|
|
48
|
-
return 'skipped';
|
|
49
|
-
const norm = canonicalTourPageId(page);
|
|
50
|
-
return (seen.get(norm) ??
|
|
51
|
-
memoryStore.get(key(norm)));
|
|
52
|
-
}
|
|
53
|
-
export function writeTourStatus(page, status) {
|
|
54
|
-
const norm = canonicalTourPageId(page);
|
|
55
|
-
seen.set(norm, status);
|
|
56
|
-
memoryStore.set(key(norm), status);
|
|
57
|
-
}
|
|
58
|
-
let skipWelcome = false;
|
|
59
|
-
export function setSkipWelcome(value) {
|
|
60
|
-
skipWelcome = value;
|
|
61
|
-
}
|
|
62
|
-
export function shouldSkipWelcome() {
|
|
63
|
-
return skipWelcome;
|
|
64
|
-
}
|
|
65
|
-
const hosts = new Set();
|
|
66
|
-
let owner = null;
|
|
67
|
-
let pending = null;
|
|
68
|
-
export function claimTour(token) {
|
|
69
|
-
if (owner && owner !== token)
|
|
70
|
-
return false;
|
|
71
|
-
owner = token;
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
export function releaseTour(token) {
|
|
75
|
-
if (owner === token)
|
|
76
|
-
owner = null;
|
|
77
|
-
}
|
|
78
|
-
export function registerTourHost(host) {
|
|
79
|
-
hosts.add(host);
|
|
80
|
-
return () => hosts.delete(host);
|
|
81
|
-
}
|
|
82
|
-
export function requestPageTour(page) {
|
|
83
|
-
pending = null;
|
|
84
|
-
const norm = page ? canonicalTourPageId(page) : undefined;
|
|
15
|
+
const REQUEST_TTL_MS = 15000;
|
|
16
|
+
export class PageTourService {
|
|
17
|
+
storage;
|
|
18
|
+
activePage;
|
|
19
|
+
setActivePage;
|
|
20
|
+
seen = new Map();
|
|
21
|
+
neverShowAgainCache = null;
|
|
22
|
+
skipWelcomeFlag = false;
|
|
23
|
+
hosts = new Set();
|
|
85
24
|
owner = null;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
25
|
+
pending = null;
|
|
26
|
+
constructor(storage) {
|
|
27
|
+
this.storage = storage;
|
|
28
|
+
const [activePage, setActivePage] = createSignal(null);
|
|
29
|
+
this.activePage = activePage;
|
|
30
|
+
this.setActivePage = setActivePage;
|
|
90
31
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
32
|
+
isActive(page) {
|
|
33
|
+
const active = this.activePage();
|
|
34
|
+
return active !== null && canonicalTourPageId(active) === canonicalTourPageId(page);
|
|
35
|
+
}
|
|
36
|
+
setActive(page) {
|
|
37
|
+
this.setActivePage(page ? canonicalTourPageId(page) : null);
|
|
38
|
+
}
|
|
39
|
+
readStatus(page) {
|
|
40
|
+
if (this.isNeverShowAgain())
|
|
41
|
+
return 'skipped';
|
|
42
|
+
const norm = canonicalTourPageId(page);
|
|
43
|
+
const known = this.seen.get(norm);
|
|
44
|
+
if (known !== undefined)
|
|
45
|
+
return known;
|
|
46
|
+
const stored = this.storage.get(statusKey(norm), StorageScope.APPLICATION);
|
|
47
|
+
return isOneOf(TOUR_STATUSES, stored) ? stored : undefined;
|
|
48
|
+
}
|
|
49
|
+
writeStatus(page, status) {
|
|
50
|
+
const norm = canonicalTourPageId(page);
|
|
51
|
+
this.seen.set(norm, status);
|
|
52
|
+
this.storage.store(statusKey(norm), status, StorageScope.APPLICATION, StorageTarget.MACHINE);
|
|
53
|
+
}
|
|
54
|
+
isNeverShowAgain() {
|
|
55
|
+
if (this.neverShowAgainCache === null)
|
|
56
|
+
this.neverShowAgainCache =
|
|
57
|
+
this.storage.get(NEVER_SHOW_AGAIN_KEY, StorageScope.APPLICATION) === 'true';
|
|
58
|
+
return this.neverShowAgainCache;
|
|
59
|
+
}
|
|
60
|
+
setNeverShowAgain(never) {
|
|
61
|
+
this.neverShowAgainCache = never;
|
|
62
|
+
this.storage.store(NEVER_SHOW_AGAIN_KEY, never ? 'true' : 'false', StorageScope.APPLICATION, StorageTarget.MACHINE);
|
|
63
|
+
}
|
|
64
|
+
skipWelcome() {
|
|
65
|
+
return this.skipWelcomeFlag;
|
|
66
|
+
}
|
|
67
|
+
setSkipWelcome(skip) {
|
|
68
|
+
this.skipWelcomeFlag = skip;
|
|
69
|
+
}
|
|
70
|
+
claim(token) {
|
|
71
|
+
if (this.owner && this.owner !== token)
|
|
72
|
+
return false;
|
|
73
|
+
this.owner = token;
|
|
95
74
|
return true;
|
|
96
75
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
76
|
+
release(token) {
|
|
77
|
+
if (this.owner === token)
|
|
78
|
+
this.owner = null;
|
|
79
|
+
}
|
|
80
|
+
registerHost(host) {
|
|
81
|
+
this.hosts.add(host);
|
|
82
|
+
return () => this.hosts.delete(host);
|
|
83
|
+
}
|
|
84
|
+
request(page) {
|
|
85
|
+
this.pending = null;
|
|
86
|
+
const norm = page ? canonicalTourPageId(page) : undefined;
|
|
87
|
+
this.owner = null;
|
|
88
|
+
for (const host of this.hosts) {
|
|
89
|
+
if (!norm || canonicalTourPageId(host.page) !== norm)
|
|
90
|
+
host.dismiss?.();
|
|
91
|
+
}
|
|
92
|
+
const candidates = Array.from(this.hosts).filter((host) => host.visible() && (!norm || canonicalTourPageId(host.page) === norm));
|
|
93
|
+
const activeDocument = getActiveWindow().document;
|
|
94
|
+
const selected = candidates.find((host) => host.document() === activeDocument) ?? candidates[0];
|
|
95
|
+
if (selected) {
|
|
96
|
+
selected.start();
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
if (norm)
|
|
100
|
+
this.pending = { page: norm, expires: Date.now() + REQUEST_TTL_MS };
|
|
104
101
|
return false;
|
|
105
102
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
consumeRequest(page) {
|
|
104
|
+
if (!this.pending || canonicalTourPageId(this.pending.page) !== canonicalTourPageId(page)) {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
const valid = this.pending.expires > Date.now();
|
|
108
|
+
this.pending = null;
|
|
109
|
+
return valid;
|
|
110
|
+
}
|
|
109
111
|
}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
const log = getLogger('ElectronBridge');
|
|
3
|
-
let bridge = {};
|
|
4
|
-
export function configureDesktopBridge(next) {
|
|
5
|
-
bridge = next ?? {};
|
|
6
|
-
}
|
|
7
|
-
const RENDERER_ALLOWED_EXTERNAL_PROTOCOLS = new Set([
|
|
1
|
+
const ALLOWED_EXTERNAL_PROTOCOLS = new Set([
|
|
8
2
|
'http:',
|
|
9
3
|
'https:',
|
|
10
4
|
'mailto:',
|
|
11
5
|
]);
|
|
12
|
-
export function
|
|
6
|
+
export function openExternalUrl(desktop, log, url) {
|
|
13
7
|
let protocol;
|
|
14
8
|
try {
|
|
15
9
|
protocol = new URL(url).protocol;
|
|
@@ -18,47 +12,17 @@ export function openExternal(url) {
|
|
|
18
12
|
log.warn('openExternal: unparseable URL refused', { url });
|
|
19
13
|
return;
|
|
20
14
|
}
|
|
21
|
-
if (!
|
|
15
|
+
if (!ALLOWED_EXTERNAL_PROTOCOLS.has(protocol)) {
|
|
22
16
|
log.warn('openExternal: protocol refused', { url, protocol });
|
|
23
17
|
return;
|
|
24
18
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
log.warn('openExternal: host refused', { url, error });
|
|
28
|
-
});
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (typeof window !== 'undefined')
|
|
32
|
-
window.open(url, '_blank', 'noopener,noreferrer');
|
|
33
|
-
}
|
|
34
|
-
export function osNotify(opts) {
|
|
35
|
-
if (!bridge.osNotify)
|
|
36
|
-
return;
|
|
37
|
-
void Promise.resolve(bridge.osNotify(opts)).catch(() => {
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
export function setOsBadgeCount(count) {
|
|
41
|
-
if (!bridge.setBadgeCount)
|
|
42
|
-
return;
|
|
43
|
-
void Promise.resolve(bridge.setBadgeCount(count)).catch(() => {
|
|
19
|
+
void Promise.resolve(desktop.openExternal(url)).catch((error) => {
|
|
20
|
+
log.warn('openExternal: host refused', { url, error });
|
|
44
21
|
});
|
|
45
22
|
}
|
|
46
|
-
export async function readAudioAsDataUrl(filePath) {
|
|
47
|
-
if (!bridge.readAudioAsDataUrl)
|
|
48
|
-
return null;
|
|
49
|
-
try {
|
|
50
|
-
return await bridge.readAudioAsDataUrl(filePath);
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
log.warn('custom sound could not be read', { filePath, error });
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
23
|
const browserFs = {
|
|
58
24
|
showSaveDialog: async (options) => ({ filePath: options?.defaultPath ?? 'export.txt' }),
|
|
59
25
|
writeFile: async (filePath, content) => {
|
|
60
|
-
if (typeof document === 'undefined')
|
|
61
|
-
return;
|
|
62
26
|
const name = filePath.split(/[\\/]/).pop() || 'export.txt';
|
|
63
27
|
const url = URL.createObjectURL(new Blob([content], { type: 'text/plain;charset=utf-8' }));
|
|
64
28
|
const a = document.createElement('a');
|
|
@@ -69,11 +33,13 @@ const browserFs = {
|
|
|
69
33
|
setTimeout(() => URL.revokeObjectURL(url), 0);
|
|
70
34
|
},
|
|
71
35
|
};
|
|
72
|
-
export
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
36
|
+
export const browserDesktopBridge = {
|
|
37
|
+
openExternal: (url) => {
|
|
38
|
+
window.open(url, '_blank', 'noopener,noreferrer');
|
|
39
|
+
},
|
|
40
|
+
osNotify: () => undefined,
|
|
41
|
+
setBadgeCount: () => undefined,
|
|
42
|
+
readAudioAsDataUrl: async () => null,
|
|
43
|
+
fs: browserFs,
|
|
44
|
+
notificationOverlay: () => undefined,
|
|
45
|
+
};
|
|
@@ -1,15 +1,5 @@
|
|
|
1
|
-
import { BugIndicatingError } from '../../../base/errors/bugIndicatingError';
|
|
2
1
|
const SMTP_PASS_KEY = 'notification.emailDigestSmtpPass';
|
|
3
2
|
const WEBHOOK_URL_PREFIX = 'notification.webhook.url.';
|
|
4
|
-
let engineStore = null;
|
|
5
|
-
export function provideNotificationSecretStore(store) {
|
|
6
|
-
engineStore = store;
|
|
7
|
-
}
|
|
8
|
-
export function notificationSecretStore() {
|
|
9
|
-
if (engineStore === null)
|
|
10
|
-
throw new BugIndicatingError('notificationSecretStore: no secret store was bound — call provideNotificationSecretStore() at startup.');
|
|
11
|
-
return engineStore;
|
|
12
|
-
}
|
|
13
3
|
function webhookUrlKey(webhookId) {
|
|
14
4
|
return `${WEBHOOK_URL_PREFIX}${webhookId}`;
|
|
15
5
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext } from 'solid-js';
|
|
2
2
|
import { BugIndicatingError } from '../../../base/errors/bugIndicatingError';
|
|
3
|
-
import { getMainWindow } from './windowRegistry';
|
|
4
3
|
const HostWindowContext = createContext();
|
|
5
|
-
let providerRequired = false;
|
|
6
|
-
export function requireHostWindowProvider(required) {
|
|
7
|
-
providerRequired = required;
|
|
8
|
-
}
|
|
9
4
|
export function HostWindowProvider(props) {
|
|
10
5
|
return (<HostWindowContext.Provider value={props.value}>
|
|
11
6
|
{props.children}
|
|
@@ -13,14 +8,10 @@ export function HostWindowProvider(props) {
|
|
|
13
8
|
}
|
|
14
9
|
export function useHostWindow() {
|
|
15
10
|
const host = useContext(HostWindowContext);
|
|
16
|
-
if (host)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
'<HostWindowProvider value={…}> (the host requires one, so there is no silent ' +
|
|
21
|
-
'main-window fallback).');
|
|
22
|
-
}
|
|
23
|
-
return getMainWindow();
|
|
11
|
+
if (host === undefined)
|
|
12
|
+
throw new BugIndicatingError('useHostWindow: this subtree has no window provider — wrap its mount root in ' +
|
|
13
|
+
'<HostWindowProvider value={…}>.');
|
|
14
|
+
return host;
|
|
24
15
|
}
|
|
25
16
|
export function useHostDocument() {
|
|
26
17
|
return useHostWindow().document;
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { catalogNotificationHost } from '../../notifications/catalogAdapter';
|
|
3
|
-
let host = null;
|
|
4
|
-
export function provideCatalogNotificationHost(surface) {
|
|
5
|
-
host = surface;
|
|
6
|
-
}
|
|
7
|
-
function slot() {
|
|
8
|
-
return host ?? catalogNotificationHost;
|
|
9
|
-
}
|
|
10
|
-
export function notifyFromCatalog(definition, params) {
|
|
11
|
-
return slot().notify(definition, definition.build(params));
|
|
12
|
-
}
|
|
13
|
-
export function progressFromCatalog(definition, params) {
|
|
14
|
-
if (definition.kind !== 'progress') {
|
|
15
|
-
throw new BugIndicatingError('catalogNotify: a message definition cannot be sent with progressFromCatalog.');
|
|
16
|
-
}
|
|
17
|
-
return slot().progress(definition, definition.build(params));
|
|
18
|
-
}
|
|
19
|
-
export function dismissNotificationFromCatalog(id) {
|
|
20
|
-
slot().dismiss?.(id);
|
|
21
|
-
}
|
|
22
|
-
export function resolveNotificationScenario(scenario) {
|
|
23
|
-
return scenario.resolve();
|
|
24
|
-
}
|
|
1
|
+
export {};
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
import { attachedErrorActions } from '../base/errors/errorActions';
|
|
2
2
|
import { toErrorMessage } from '../base/errorMessage';
|
|
3
|
-
const
|
|
3
|
+
export const messageErrorPresenter = {
|
|
4
4
|
text: (error, general) => toErrorMessage(error, general),
|
|
5
5
|
actions: (error) => attachedErrorActions(error),
|
|
6
6
|
};
|
|
7
|
-
let presenter = defaultPresenter;
|
|
8
|
-
export function provideHostErrorPresenter(next) {
|
|
9
|
-
presenter = next ?? defaultPresenter;
|
|
10
|
-
}
|
|
11
|
-
function bound() {
|
|
12
|
-
return presenter;
|
|
13
|
-
}
|
|
14
|
-
export function errorText(error, general) {
|
|
15
|
-
return bound().text(error, general);
|
|
16
|
-
}
|
|
17
|
-
export function errorActions(error) {
|
|
18
|
-
return bound().actions(error);
|
|
19
|
-
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getBreadcrumbs, scrubValue, } from '../../base/errors/breadcrumbs';
|
|
2
2
|
import { scrubSecrets } from '../../base/scrubSecrets';
|
|
3
|
-
import { getAppName } from '../../contract/appName';
|
|
4
3
|
import { toErrorMessage } from '../../base/errorMessage';
|
|
5
4
|
import { bestEffortFailed } from '../../base/bestEffort';
|
|
6
5
|
function formatBytes(bytes) {
|
|
@@ -24,7 +23,7 @@ function formatBreadcrumbRow(crumb) {
|
|
|
24
23
|
}
|
|
25
24
|
return `[${time}] [${cat}] [${lvl}] ${crumb.message}${dataStr}`;
|
|
26
25
|
}
|
|
27
|
-
export function generateDiagnosticReport(error, options
|
|
26
|
+
export function generateDiagnosticReport(error, options) {
|
|
28
27
|
const now = new Date().toISOString();
|
|
29
28
|
const errorMessage = scrubSecrets(toErrorMessage(error, 'Unknown error'));
|
|
30
29
|
let errorName = 'Error';
|
|
@@ -80,7 +79,7 @@ export function generateDiagnosticReport(error, options = {}) {
|
|
|
80
79
|
causeBlock = `\n**Cause:** ${causeMsg}\n`;
|
|
81
80
|
}
|
|
82
81
|
}
|
|
83
|
-
const app =
|
|
82
|
+
const app = options.appName.trim();
|
|
84
83
|
return `## ${app ? `${app} ` : ''}Diagnostic Report
|
|
85
84
|
- **Timestamp:** ${now}
|
|
86
85
|
- **Platform:** ${platform}
|