@noldova/desktop.electron 0.0.0-stage → 0.0.2
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/LICENSE +21 -0
- package/README.md +55 -2
- package/api/index.d.ts +11138 -0
- package/api/index.js +144 -0
- package/api/index.js.map +1 -0
- package/enums/file-save-outcome.js +14 -0
- package/enums/file-save-outcome.js.map +1 -0
- package/enums/main-process-failure-kind.js +13 -0
- package/enums/main-process-failure-kind.js.map +1 -0
- package/enums/menu-bar-row-type.js +14 -0
- package/enums/menu-bar-row-type.js.map +1 -0
- package/enums/menu-check.js +14 -0
- package/enums/menu-check.js.map +1 -0
- package/enums/path-command-outcome.js +16 -0
- package/enums/path-command-outcome.js.map +1 -0
- package/enums/quit-choice.js +14 -0
- package/enums/quit-choice.js.map +1 -0
- package/enums/quit-outcome.js +14 -0
- package/enums/quit-outcome.js.map +1 -0
- package/enums/startup-state-kind.js +19 -0
- package/enums/startup-state-kind.js.map +1 -0
- package/enums/tray-icon-state.js +16 -0
- package/enums/tray-icon-state.js.map +1 -0
- package/enums/update-state-kind.js +18 -0
- package/enums/update-state-kind.js.map +1 -0
- package/enums/web-address-kind.js +16 -0
- package/enums/web-address-kind.js.map +1 -0
- package/enums/window-error-admission.js +14 -0
- package/enums/window-error-admission.js.map +1 -0
- package/exceptions/app-image-folder-unwritable.exception.js +18 -0
- package/exceptions/app-image-folder-unwritable.exception.js.map +1 -0
- package/exceptions/app-image-leftover-not-removed.exception.js +17 -0
- package/exceptions/app-image-leftover-not-removed.exception.js.map +1 -0
- package/exceptions/app-image-not-replaced.exception.js +18 -0
- package/exceptions/app-image-not-replaced.exception.js.map +1 -0
- package/exceptions/app-image-unreadable.exception.js +18 -0
- package/exceptions/app-image-unreadable.exception.js.map +1 -0
- package/exceptions/databases-not-backed-up.exception.js +18 -0
- package/exceptions/databases-not-backed-up.exception.js.map +1 -0
- package/exceptions/debian-installer-missing.exception.js +15 -0
- package/exceptions/debian-installer-missing.exception.js.map +1 -0
- package/exceptions/debian-package-not-installed.exception.js +18 -0
- package/exceptions/debian-package-not-installed.exception.js.map +1 -0
- package/exceptions/device-identity.exception.js +17 -0
- package/exceptions/device-identity.exception.js.map +1 -0
- package/exceptions/electron.exception.js +14 -0
- package/exceptions/electron.exception.js.map +1 -0
- package/exceptions/installer-not-copied.exception.js +15 -0
- package/exceptions/installer-not-copied.exception.js.map +1 -0
- package/exceptions/installer-not-held.exception.js +17 -0
- package/exceptions/installer-not-held.exception.js.map +1 -0
- package/exceptions/installer-not-started.exception.js +18 -0
- package/exceptions/installer-not-started.exception.js.map +1 -0
- package/exceptions/installer-unsigned.exception.js +19 -0
- package/exceptions/installer-unsigned.exception.js.map +1 -0
- package/exceptions/not-an-app-image.exception.js +15 -0
- package/exceptions/not-an-app-image.exception.js.map +1 -0
- package/exceptions/path-command.exception.js +18 -0
- package/exceptions/path-command.exception.js.map +1 -0
- package/exceptions/processes-not-exited.exception.js +19 -0
- package/exceptions/processes-not-exited.exception.js.map +1 -0
- package/exceptions/program.exception.js +18 -0
- package/exceptions/program.exception.js.map +1 -0
- package/exceptions/restart-arguments-not-written.exception.js +15 -0
- package/exceptions/restart-arguments-not-written.exception.js.map +1 -0
- package/exceptions/runtime-starter-ended.exception.js +15 -0
- package/exceptions/runtime-starter-ended.exception.js.map +1 -0
- package/exceptions/runtime-starter-failed.exception.js +17 -0
- package/exceptions/runtime-starter-failed.exception.js.map +1 -0
- package/exceptions/ship-it-not-found.exception.js +15 -0
- package/exceptions/ship-it-not-found.exception.js.map +1 -0
- package/exceptions/ship-it-not-removed.exception.js +16 -0
- package/exceptions/ship-it-not-removed.exception.js.map +1 -0
- package/exceptions/ship-it-unreadable.exception.js +16 -0
- package/exceptions/ship-it-unreadable.exception.js.map +1 -0
- package/exceptions/stale-update.exception.js +14 -0
- package/exceptions/stale-update.exception.js.map +1 -0
- package/exceptions/unusable-folder.exception.js +18 -0
- package/exceptions/unusable-folder.exception.js.map +1 -0
- package/exceptions/update-changed-before-handoff.exception.js +15 -0
- package/exceptions/update-changed-before-handoff.exception.js.map +1 -0
- package/exceptions/update-checker-unknown.exception.js +15 -0
- package/exceptions/update-checker-unknown.exception.js.map +1 -0
- package/exceptions/update-download-interrupted.exception.js +15 -0
- package/exceptions/update-download-interrupted.exception.js.map +1 -0
- package/exceptions/update-download-mismatch.exception.js +15 -0
- package/exceptions/update-download-mismatch.exception.js.map +1 -0
- package/exceptions/update-failed-unexpectedly.exception.js +15 -0
- package/exceptions/update-failed-unexpectedly.exception.js.map +1 -0
- package/exceptions/update-feed-redirected.exception.js +15 -0
- package/exceptions/update-feed-redirected.exception.js.map +1 -0
- package/exceptions/update-feed-refused.exception.js +17 -0
- package/exceptions/update-feed-refused.exception.js.map +1 -0
- package/exceptions/update-feed-unreachable.exception.js +15 -0
- package/exceptions/update-feed-unreachable.exception.js.map +1 -0
- package/exceptions/update-handoff.exception.js +14 -0
- package/exceptions/update-handoff.exception.js.map +1 -0
- package/exceptions/update-holder-not-found.exception.js +15 -0
- package/exceptions/update-holder-not-found.exception.js.map +1 -0
- package/exceptions/update-info-invalid.exception.js +15 -0
- package/exceptions/update-info-invalid.exception.js.map +1 -0
- package/exceptions/update-no-longer-offered.exception.js +17 -0
- package/exceptions/update-no-longer-offered.exception.js.map +1 -0
- package/exceptions/update-not-signed.exception.js +15 -0
- package/exceptions/update-not-signed.exception.js.map +1 -0
- package/exceptions/update-not-staged-in-time.exception.js +15 -0
- package/exceptions/update-not-staged-in-time.exception.js.map +1 -0
- package/exceptions/update-not-staged.exception.js +15 -0
- package/exceptions/update-not-staged.exception.js.map +1 -0
- package/exceptions/update-refused.exception.js +19 -0
- package/exceptions/update-refused.exception.js.map +1 -0
- package/exceptions/update-runtime-not-found.exception.js +17 -0
- package/exceptions/update-runtime-not-found.exception.js.map +1 -0
- package/exceptions/update-runtime-not-reached.exception.js +17 -0
- package/exceptions/update-runtime-not-reached.exception.js.map +1 -0
- package/exceptions/update-runtime-still-starting.exception.js +17 -0
- package/exceptions/update-runtime-still-starting.exception.js.map +1 -0
- package/exceptions/update-stop-failed-unexpectedly.exception.js +15 -0
- package/exceptions/update-stop-failed-unexpectedly.exception.js.map +1 -0
- package/exceptions/update-stop.exception.js +14 -0
- package/exceptions/update-stop.exception.js.map +1 -0
- package/exceptions/update-under-way.exception.js +15 -0
- package/exceptions/update-under-way.exception.js.map +1 -0
- package/exceptions/update-unsaved.exception.js +19 -0
- package/exceptions/update-unsaved.exception.js.map +1 -0
- package/exceptions/update.exception.js +14 -0
- package/exceptions/update.exception.js.map +1 -0
- package/exceptions/window-state-not-connected.exception.js +15 -0
- package/exceptions/window-state-not-connected.exception.js.map +1 -0
- package/exceptions/window-state-refused.exception.js +19 -0
- package/exceptions/window-state-refused.exception.js.map +1 -0
- package/exceptions/window-state-runtime-unreachable.exception.js +15 -0
- package/exceptions/window-state-runtime-unreachable.exception.js.map +1 -0
- package/exceptions/window-state-unavailable.exception.js +14 -0
- package/exceptions/window-state-unavailable.exception.js.map +1 -0
- package/exceptions/window-state.exception.js +14 -0
- package/exceptions/window-state.exception.js.map +1 -0
- package/exceptions/work-started-meanwhile.exception.js +17 -0
- package/exceptions/work-started-meanwhile.exception.js.map +1 -0
- package/interfaces/i-app-updater.js +9 -0
- package/interfaces/i-app-updater.js.map +1 -0
- package/interfaces/i-application-host.js +9 -0
- package/interfaces/i-application-host.js.map +1 -0
- package/interfaces/i-checked-path.js +9 -0
- package/interfaces/i-checked-path.js.map +1 -0
- package/interfaces/i-clipboard-host.js +9 -0
- package/interfaces/i-clipboard-host.js.map +1 -0
- package/interfaces/i-close-guard.js +9 -0
- package/interfaces/i-close-guard.js.map +1 -0
- package/interfaces/i-command-line-host.js +9 -0
- package/interfaces/i-command-line-host.js.map +1 -0
- package/interfaces/i-context-menu-params.js +9 -0
- package/interfaces/i-context-menu-params.js.map +1 -0
- package/interfaces/i-created-updater.js +9 -0
- package/interfaces/i-created-updater.js.map +1 -0
- package/interfaces/i-device-file-store.js +9 -0
- package/interfaces/i-device-file-store.js.map +1 -0
- package/interfaces/i-dialog-host.js +9 -0
- package/interfaces/i-dialog-host.js.map +1 -0
- package/interfaces/i-display-host.js +9 -0
- package/interfaces/i-display-host.js.map +1 -0
- package/interfaces/i-dock-host.js +9 -0
- package/interfaces/i-dock-host.js.map +1 -0
- package/interfaces/i-electron.js +9 -0
- package/interfaces/i-electron.js.map +1 -0
- package/interfaces/i-feed-net-session.js +9 -0
- package/interfaces/i-feed-net-session.js.map +1 -0
- package/interfaces/i-feed-response.js +9 -0
- package/interfaces/i-feed-response.js.map +1 -0
- package/interfaces/i-feed-runtime-options.js +9 -0
- package/interfaces/i-feed-runtime-options.js.map +1 -0
- package/interfaces/i-feed-web-request.js +9 -0
- package/interfaces/i-feed-web-request.js.map +1 -0
- package/interfaces/i-ipc-event.js +9 -0
- package/interfaces/i-ipc-event.js.map +1 -0
- package/interfaces/i-ipc-host.js +9 -0
- package/interfaces/i-ipc-host.js.map +1 -0
- package/interfaces/i-ipc-owners.js +9 -0
- package/interfaces/i-ipc-owners.js.map +1 -0
- package/interfaces/i-main-process-environment.js +9 -0
- package/interfaces/i-main-process-environment.js.map +1 -0
- package/interfaces/i-main-process-log.js +9 -0
- package/interfaces/i-main-process-log.js.map +1 -0
- package/interfaces/i-main-process-options.js +9 -0
- package/interfaces/i-main-process-options.js.map +1 -0
- package/interfaces/i-main-process-tray-parts.js +9 -0
- package/interfaces/i-main-process-tray-parts.js.map +1 -0
- package/interfaces/i-main-process-update-parts.js +9 -0
- package/interfaces/i-main-process-update-parts.js.map +1 -0
- package/interfaces/i-main-process-window.js +9 -0
- package/interfaces/i-main-process-window.js.map +1 -0
- package/interfaces/i-menu-host.js +9 -0
- package/interfaces/i-menu-host.js.map +1 -0
- package/interfaces/i-native-updater.js +9 -0
- package/interfaces/i-native-updater.js.map +1 -0
- package/interfaces/i-notification-host.js +9 -0
- package/interfaces/i-notification-host.js.map +1 -0
- package/interfaces/i-parent-port.js +9 -0
- package/interfaces/i-parent-port.js.map +1 -0
- package/interfaces/i-path-command-files.js +9 -0
- package/interfaces/i-path-command-files.js.map +1 -0
- package/interfaces/i-permission-host.js +9 -0
- package/interfaces/i-permission-host.js.map +1 -0
- package/interfaces/i-preload-channels.js +9 -0
- package/interfaces/i-preload-channels.js.map +1 -0
- package/interfaces/i-preload-settings.js +9 -0
- package/interfaces/i-preload-settings.js.map +1 -0
- package/interfaces/i-preventable-event.js +9 -0
- package/interfaces/i-preventable-event.js.map +1 -0
- package/interfaces/i-program-host.js +9 -0
- package/interfaces/i-program-host.js.map +1 -0
- package/interfaces/i-protocol-host.js +9 -0
- package/interfaces/i-protocol-host.js.map +1 -0
- package/interfaces/i-quit-control-parts.js +9 -0
- package/interfaces/i-quit-control-parts.js.map +1 -0
- package/interfaces/i-quit-host.js +9 -0
- package/interfaces/i-quit-host.js.map +1 -0
- package/interfaces/i-quit-prompt.js +9 -0
- package/interfaces/i-quit-prompt.js.map +1 -0
- package/interfaces/i-runtime-connection.js +9 -0
- package/interfaces/i-runtime-connection.js.map +1 -0
- package/interfaces/i-runtime-event-owners.js +9 -0
- package/interfaces/i-runtime-event-owners.js.map +1 -0
- package/interfaces/i-runtime-launcher.js +9 -0
- package/interfaces/i-runtime-launcher.js.map +1 -0
- package/interfaces/i-scheme-registry.js +9 -0
- package/interfaces/i-scheme-registry.js.map +1 -0
- package/interfaces/i-secret-storage-host.js +9 -0
- package/interfaces/i-secret-storage-host.js.map +1 -0
- package/interfaces/i-sender-frame.js +9 -0
- package/interfaces/i-sender-frame.js.map +1 -0
- package/interfaces/i-session-host.js +9 -0
- package/interfaces/i-session-host.js.map +1 -0
- package/interfaces/i-shell-host.js +9 -0
- package/interfaces/i-shell-host.js.map +1 -0
- package/interfaces/i-ship-it-process.js +9 -0
- package/interfaces/i-ship-it-process.js.map +1 -0
- package/interfaces/i-shortcut-host.js +9 -0
- package/interfaces/i-shortcut-host.js.map +1 -0
- package/interfaces/i-shown-path-files.js +9 -0
- package/interfaces/i-shown-path-files.js.map +1 -0
- package/interfaces/i-shown-path-status.js +9 -0
- package/interfaces/i-shown-path-status.js.map +1 -0
- package/interfaces/i-spell-check-host.js +9 -0
- package/interfaces/i-spell-check-host.js.map +1 -0
- package/interfaces/i-split-path.js +9 -0
- package/interfaces/i-split-path.js.map +1 -0
- package/interfaces/i-system-notification.js +9 -0
- package/interfaces/i-system-notification.js.map +1 -0
- package/interfaces/i-theme-host.js +9 -0
- package/interfaces/i-theme-host.js.map +1 -0
- package/interfaces/i-tray-actions.js +9 -0
- package/interfaces/i-tray-actions.js.map +1 -0
- package/interfaces/i-tray-host.js +9 -0
- package/interfaces/i-tray-host.js.map +1 -0
- package/interfaces/i-tray.js +9 -0
- package/interfaces/i-tray.js.map +1 -0
- package/interfaces/i-update-check-lock.js +9 -0
- package/interfaces/i-update-check-lock.js.map +1 -0
- package/interfaces/i-update-handoff.js +9 -0
- package/interfaces/i-update-handoff.js.map +1 -0
- package/interfaces/i-update-host.js +9 -0
- package/interfaces/i-update-host.js.map +1 -0
- package/interfaces/i-update-setup.js +9 -0
- package/interfaces/i-update-setup.js.map +1 -0
- package/interfaces/i-update-target.js +9 -0
- package/interfaces/i-update-target.js.map +1 -0
- package/interfaces/i-updater.js +9 -0
- package/interfaces/i-updater.js.map +1 -0
- package/interfaces/i-utility-process-host.js +9 -0
- package/interfaces/i-utility-process-host.js.map +1 -0
- package/interfaces/i-utility-process.js +9 -0
- package/interfaces/i-utility-process.js.map +1 -0
- package/interfaces/i-web-view-attach-params.js +9 -0
- package/interfaces/i-web-view-attach-params.js.map +1 -0
- package/interfaces/i-web-view-attach-preferences.js +9 -0
- package/interfaces/i-web-view-attach-preferences.js.map +1 -0
- package/interfaces/i-web-view-contents.js +9 -0
- package/interfaces/i-web-view-contents.js.map +1 -0
- package/interfaces/i-web-view-debugger.js +9 -0
- package/interfaces/i-web-view-debugger.js.map +1 -0
- package/interfaces/i-web-view-engine.js +9 -0
- package/interfaces/i-web-view-engine.js.map +1 -0
- package/interfaces/i-web-view-guest.js +9 -0
- package/interfaces/i-web-view-guest.js.map +1 -0
- package/interfaces/i-web-view-input-event.js +9 -0
- package/interfaces/i-web-view-input-event.js.map +1 -0
- package/interfaces/i-web-view-input.js +9 -0
- package/interfaces/i-web-view-input.js.map +1 -0
- package/interfaces/i-web-view-key-event.js +9 -0
- package/interfaces/i-web-view-key-event.js.map +1 -0
- package/interfaces/i-web-view-redirect.js +9 -0
- package/interfaces/i-web-view-redirect.js.map +1 -0
- package/interfaces/i-web-view-request.js +9 -0
- package/interfaces/i-web-view-request.js.map +1 -0
- package/interfaces/i-web-view-session.js +9 -0
- package/interfaces/i-web-view-session.js.map +1 -0
- package/interfaces/i-window-contents.js +9 -0
- package/interfaces/i-window-contents.js.map +1 -0
- package/interfaces/i-window-navigation.js +9 -0
- package/interfaces/i-window-navigation.js.map +1 -0
- package/interfaces/i-window-open-details.js +9 -0
- package/interfaces/i-window-open-details.js.map +1 -0
- package/interfaces/i-window-session.js +9 -0
- package/interfaces/i-window-session.js.map +1 -0
- package/interfaces/i-window-state-store.js +9 -0
- package/interfaces/i-window-state-store.js.map +1 -0
- package/main.js +160 -0
- package/main.js.map +1 -0
- package/models/caught-failure.js +15 -0
- package/models/caught-failure.js.map +1 -0
- package/models/detached-start-reply.js +51 -0
- package/models/detached-start-reply.js.map +1 -0
- package/models/detached-start-request.js +45 -0
- package/models/detached-start-request.js.map +1 -0
- package/models/error-code.js +22 -0
- package/models/error-code.js.map +1 -0
- package/models/feed-source.js +32 -0
- package/models/feed-source.js.map +1 -0
- package/models/file-grant-request.js +35 -0
- package/models/file-grant-request.js.map +1 -0
- package/models/file-path-choice.js +38 -0
- package/models/file-path-choice.js.map +1 -0
- package/models/issued-files.js +21 -0
- package/models/issued-files.js.map +1 -0
- package/models/known-device.js +32 -0
- package/models/known-device.js.map +1 -0
- package/models/longest-text.js +35 -0
- package/models/longest-text.js.map +1 -0
- package/models/main-process-phase.js +13 -0
- package/models/main-process-phase.js.map +1 -0
- package/models/main-process-settings.js +34 -0
- package/models/main-process-settings.js.map +1 -0
- package/models/menu-bar-menu.js +25 -0
- package/models/menu-bar-menu.js.map +1 -0
- package/models/menu-bar-row.js +49 -0
- package/models/menu-bar-row.js.map +1 -0
- package/models/menu-bar.js +20 -0
- package/models/menu-bar.js.map +1 -0
- package/models/offered-file.js +50 -0
- package/models/offered-file.js.map +1 -0
- package/models/pending-quit.js +26 -0
- package/models/pending-quit.js.map +1 -0
- package/models/preload-settings.js +21 -0
- package/models/preload-settings.js.map +1 -0
- package/models/quit-question.js +22 -0
- package/models/quit-question.js.map +1 -0
- package/models/screen-area.js +31 -0
- package/models/screen-area.js.map +1 -0
- package/models/sender-info.js +18 -0
- package/models/sender-info.js.map +1 -0
- package/models/started-program.js +17 -0
- package/models/started-program.js.map +1 -0
- package/models/startup-state.js +45 -0
- package/models/startup-state.js.map +1 -0
- package/models/taskbar-identity.js +48 -0
- package/models/taskbar-identity.js.map +1 -0
- package/models/update-ready-record.js +37 -0
- package/models/update-ready-record.js.map +1 -0
- package/models/update-status.js +40 -0
- package/models/update-status.js.map +1 -0
- package/models/update-stop-result.js +22 -0
- package/models/update-stop-result.js.map +1 -0
- package/models/update-version.js +43 -0
- package/models/update-version.js.map +1 -0
- package/models/web-view-history.js +19 -0
- package/models/web-view-history.js.map +1 -0
- package/models/window-appearance.js +52 -0
- package/models/window-appearance.js.map +1 -0
- package/models/window-page.js +23 -0
- package/models/window-page.js.map +1 -0
- package/models/window-registry.js +85 -0
- package/models/window-registry.js.map +1 -0
- package/models/window-state.js +93 -0
- package/models/window-state.js.map +1 -0
- package/package.json +78 -3
- package/preload.cjs +186 -0
- package/preload.cjs.map +1 -0
- package/resources.js +1549 -0
- package/resources.js.map +1 -0
- package/services/agent-controller.js +61 -0
- package/services/agent-controller.js.map +1 -0
- package/services/app-icons.js +49 -0
- package/services/app-icons.js.map +1 -0
- package/services/app-image-environment.js +34 -0
- package/services/app-image-environment.js.map +1 -0
- package/services/app-image-handoff.js +33 -0
- package/services/app-image-handoff.js.map +1 -0
- package/services/app-image-replacement.js +82 -0
- package/services/app-image-replacement.js.map +1 -0
- package/services/app-image-restart.js +71 -0
- package/services/app-image-restart.js.map +1 -0
- package/services/app-surface-feed.js +114 -0
- package/services/app-surface-feed.js.map +1 -0
- package/services/appearance-keeper.js +67 -0
- package/services/appearance-keeper.js.map +1 -0
- package/services/application-menu.js +14 -0
- package/services/application-menu.js.map +1 -0
- package/services/child-program-host.js +59 -0
- package/services/child-program-host.js.map +1 -0
- package/services/clipboard-copier.js +82 -0
- package/services/clipboard-copier.js.map +1 -0
- package/services/close-coordinator.js +47 -0
- package/services/close-coordinator.js.map +1 -0
- package/services/command-installer.js +58 -0
- package/services/command-installer.js.map +1 -0
- package/services/daily-check-mark.js +61 -0
- package/services/daily-check-mark.js.map +1 -0
- package/services/debian-handoff.js +41 -0
- package/services/debian-handoff.js.map +1 -0
- package/services/debian-package.js +24 -0
- package/services/debian-package.js.map +1 -0
- package/services/detached-start.js +27 -0
- package/services/detached-start.js.map +1 -0
- package/services/device-file-store.js +45 -0
- package/services/device-file-store.js.map +1 -0
- package/services/device-identity.js +39 -0
- package/services/device-identity.js.map +1 -0
- package/services/device-setting-follower.js +61 -0
- package/services/device-setting-follower.js.map +1 -0
- package/services/device-state.js +51 -0
- package/services/device-state.js.map +1 -0
- package/services/electron-web-view-contents.js +96 -0
- package/services/electron-web-view-contents.js.map +1 -0
- package/services/electron-web-view-engine.js +42 -0
- package/services/electron-web-view-engine.js.map +1 -0
- package/services/electron-web-view-session.js +47 -0
- package/services/electron-web-view-session.js.map +1 -0
- package/services/feed-provider.js +84 -0
- package/services/feed-provider.js.map +1 -0
- package/services/feed-request-guard.js +63 -0
- package/services/feed-request-guard.js.map +1 -0
- package/services/feed-session.js +30 -0
- package/services/feed-session.js.map +1 -0
- package/services/feed-updater.js +119 -0
- package/services/feed-updater.js.map +1 -0
- package/services/file-dialogs.js +180 -0
- package/services/file-dialogs.js.map +1 -0
- package/services/file-grant-issuer.js +119 -0
- package/services/file-grant-issuer.js.map +1 -0
- package/services/file-presence.js +14 -0
- package/services/file-presence.js.map +1 -0
- package/services/installer-handoff.js +75 -0
- package/services/installer-handoff.js.map +1 -0
- package/services/installer-start.js +35 -0
- package/services/installer-start.js.map +1 -0
- package/services/ipc-router.js +114 -0
- package/services/ipc-router.js.map +1 -0
- package/services/layout-keeper.js +52 -0
- package/services/layout-keeper.js.map +1 -0
- package/services/local-window-state-store.js +38 -0
- package/services/local-window-state-store.js.map +1 -0
- package/services/main-process-log.js +81 -0
- package/services/main-process-log.js.map +1 -0
- package/services/main-process-record.js +19 -0
- package/services/main-process-record.js.map +1 -0
- package/services/main-process-recovery.js +98 -0
- package/services/main-process-recovery.js.map +1 -0
- package/services/main-process-services.js +34 -0
- package/services/main-process-services.js.map +1 -0
- package/services/main-process-tray.js +64 -0
- package/services/main-process-tray.js.map +1 -0
- package/services/main-process-updates.js +69 -0
- package/services/main-process-updates.js.map +1 -0
- package/services/main-process.js +530 -0
- package/services/main-process.js.map +1 -0
- package/services/menu-bar-template.js +78 -0
- package/services/menu-bar-template.js.map +1 -0
- package/services/mirrored-window-state-store.js +26 -0
- package/services/mirrored-window-state-store.js.map +1 -0
- package/services/open-web-view.js +784 -0
- package/services/open-web-view.js.map +1 -0
- package/services/open-web-view.resources.js +13 -0
- package/services/open-web-view.resources.js.map +1 -0
- package/services/open-window.js +155 -0
- package/services/open-window.js.map +1 -0
- package/services/opened-file-policy.js +46 -0
- package/services/opened-file-policy.js.map +1 -0
- package/services/path-command.js +78 -0
- package/services/path-command.js.map +1 -0
- package/services/product-app-adapter.js +30 -0
- package/services/product-app-adapter.js.map +1 -0
- package/services/publisher-check.js +78 -0
- package/services/publisher-check.js.map +1 -0
- package/services/quit-control.js +78 -0
- package/services/quit-control.js.map +1 -0
- package/services/quit-coordinator.js +98 -0
- package/services/quit-coordinator.js.map +1 -0
- package/services/quit-flow.js +59 -0
- package/services/quit-flow.js.map +1 -0
- package/services/restart-arguments.js +58 -0
- package/services/restart-arguments.js.map +1 -0
- package/services/runtime-caller.js +31 -0
- package/services/runtime-caller.js.map +1 -0
- package/services/runtime-events.js +100 -0
- package/services/runtime-events.js.map +1 -0
- package/services/runtime-requests.js +92 -0
- package/services/runtime-requests.js.map +1 -0
- package/services/runtime-startup.js +228 -0
- package/services/runtime-startup.js.map +1 -0
- package/services/runtime-window-state-store.js +50 -0
- package/services/runtime-window-state-store.js.map +1 -0
- package/services/secret-answerer.js +57 -0
- package/services/secret-answerer.js.map +1 -0
- package/services/sender-policy.js +24 -0
- package/services/sender-policy.js.map +1 -0
- package/services/shared-file-server.js +71 -0
- package/services/shared-file-server.js.map +1 -0
- package/services/shell-opener.js +88 -0
- package/services/shell-opener.js.map +1 -0
- package/services/ship-it-process.js +54 -0
- package/services/ship-it-process.js.map +1 -0
- package/services/shown-file-policy.js +95 -0
- package/services/shown-file-policy.js.map +1 -0
- package/services/spell-checker.js +62 -0
- package/services/spell-checker.js.map +1 -0
- package/services/spelling-dictionaries.js +58 -0
- package/services/spelling-dictionaries.js.map +1 -0
- package/services/squirrel-handoff.js +98 -0
- package/services/squirrel-handoff.js.map +1 -0
- package/services/stop-key-controller.js +97 -0
- package/services/stop-key-controller.js.map +1 -0
- package/services/system-notifier.js +103 -0
- package/services/system-notifier.js.map +1 -0
- package/services/terminal-relaunch.js +52 -0
- package/services/terminal-relaunch.js.map +1 -0
- package/services/tray-controller.js +164 -0
- package/services/tray-controller.js.map +1 -0
- package/services/tray-host-watcher.js +86 -0
- package/services/tray-host-watcher.js.map +1 -0
- package/services/tray-menu-template.js +42 -0
- package/services/tray-menu-template.js.map +1 -0
- package/services/tray-notices.js +76 -0
- package/services/tray-notices.js.map +1 -0
- package/services/tray-refresher.js +72 -0
- package/services/tray-refresher.js.map +1 -0
- package/services/update-barrier-gate.js +78 -0
- package/services/update-barrier-gate.js.map +1 -0
- package/services/update-barrier-watch.js +83 -0
- package/services/update-barrier-watch.js.map +1 -0
- package/services/update-bridge.js +86 -0
- package/services/update-bridge.js.map +1 -0
- package/services/update-check-lock.js +120 -0
- package/services/update-check-lock.js.map +1 -0
- package/services/update-controller.js +325 -0
- package/services/update-controller.js.map +1 -0
- package/services/update-restart.js +139 -0
- package/services/update-restart.js.map +1 -0
- package/services/update-save-coordinator.js +48 -0
- package/services/update-save-coordinator.js.map +1 -0
- package/services/update-stop.js +222 -0
- package/services/update-stop.js.map +1 -0
- package/services/update-target-connector.js +84 -0
- package/services/update-target-connector.js.map +1 -0
- package/services/update-work-question.js +84 -0
- package/services/update-work-question.js.map +1 -0
- package/services/utility-process-starter.js +47 -0
- package/services/utility-process-starter.js.map +1 -0
- package/services/web-view-attach-guard.js +41 -0
- package/services/web-view-attach-guard.js.map +1 -0
- package/services/web-view-bridge.js +55 -0
- package/services/web-view-bridge.js.map +1 -0
- package/services/web-view-event-backlog.js +38 -0
- package/services/web-view-event-backlog.js.map +1 -0
- package/services/web-view-event-cut.js +42 -0
- package/services/web-view-event-cut.js.map +1 -0
- package/services/web-view-host.js +340 -0
- package/services/web-view-host.js.map +1 -0
- package/services/web-view-key-input.js +37 -0
- package/services/web-view-key-input.js.map +1 -0
- package/services/web-view-origin-check.js +150 -0
- package/services/web-view-origin-check.js.map +1 -0
- package/services/web-view-origin-check.resources.js +46 -0
- package/services/web-view-origin-check.resources.js.map +1 -0
- package/services/window-bounds-keeper.js +145 -0
- package/services/window-bounds-keeper.js.map +1 -0
- package/services/window-controls.js +97 -0
- package/services/window-controls.js.map +1 -0
- package/services/window-error-limit.js +32 -0
- package/services/window-error-limit.js.map +1 -0
- package/services/window-factory.js +87 -0
- package/services/window-factory.js.map +1 -0
- package/services/window-placement.js +67 -0
- package/services/window-placement.js.map +1 -0
- package/services/window-recovery.js +138 -0
- package/services/window-recovery.js.map +1 -0
- package/services/window-text-log.js +37 -0
- package/services/window-text-log.js.map +1 -0
- package/utility-entry.js +11 -0
- package/utility-entry.js.map +1 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
export class ScreenArea {
|
|
9
|
+
x;
|
|
10
|
+
y;
|
|
11
|
+
width;
|
|
12
|
+
height;
|
|
13
|
+
constructor(x, y, width, height) {
|
|
14
|
+
this.x = x;
|
|
15
|
+
this.y = y;
|
|
16
|
+
this.width = width;
|
|
17
|
+
this.height = height;
|
|
18
|
+
}
|
|
19
|
+
static of(rectangle) {
|
|
20
|
+
return new ScreenArea(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
|
|
21
|
+
}
|
|
22
|
+
overlapArea(x, y, width, height) {
|
|
23
|
+
const across = Math.min(x + width, this.x + this.width) - Math.max(x, this.x);
|
|
24
|
+
const down = Math.min(y + height, this.y + this.height) - Math.max(y, this.y);
|
|
25
|
+
return across > 0 && down > 0 ? across * down : 0;
|
|
26
|
+
}
|
|
27
|
+
fits(width, height) {
|
|
28
|
+
return width <= this.width && height <= this.height;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=screen-area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen-area.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/screen-area.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,UAAU;IACL,CAAC,CAAS;IACV,CAAC,CAAS;IACV,KAAK,CAAS;IACd,MAAM,CAAS;IAE/B,YAAmB,CAAS,EAAE,CAAS,EAAE,KAAa,EAAE,MAAc;QACpE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEM,MAAM,CAAC,EAAE,CAAC,SAAsG;QACrH,OAAO,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACrF,CAAC;IAEM,WAAW,CAAC,CAAS,EAAE,CAAS,EAAE,KAAa,EAAE,MAAc;QACpE,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC9E,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QAC9E,OAAO,MAAM,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IAEM,IAAI,CAAC,KAAa,EAAE,MAAc;QACvC,OAAO,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC;IACtD,CAAC;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
export class SenderInfo {
|
|
9
|
+
frameUrl;
|
|
10
|
+
isTopLevel;
|
|
11
|
+
contentsId;
|
|
12
|
+
constructor(frameUrl, isTopLevel, contentsId) {
|
|
13
|
+
this.frameUrl = frameUrl;
|
|
14
|
+
this.isTopLevel = isTopLevel;
|
|
15
|
+
this.contentsId = contentsId;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=sender-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sender-info.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/sender-info.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,UAAU;IACL,QAAQ,CAAS;IACjB,UAAU,CAAU;IACpB,UAAU,CAAS;IAEnC,YAAmB,QAAgB,EAAE,UAAmB,EAAE,UAAkB;QAC1E,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
export class StartedProgram {
|
|
9
|
+
end;
|
|
10
|
+
constructor(end) {
|
|
11
|
+
this.end = end;
|
|
12
|
+
}
|
|
13
|
+
stop() {
|
|
14
|
+
this.end();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=started-program.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"started-program.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/started-program.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,cAAc;IACR,GAAG,CAAa;IAEjC,YAAmB,GAAe;QAChC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAEM,IAAI;QACT,IAAI,CAAC,GAAG,EAAE,CAAC;IACb,CAAC;CACF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { StartupStateKind } from "../enums/startup-state-kind.js";
|
|
9
|
+
import { Resources } from "../resources.js";
|
|
10
|
+
export class StartupState {
|
|
11
|
+
kind;
|
|
12
|
+
details;
|
|
13
|
+
constructor(kind, details) {
|
|
14
|
+
this.kind = kind;
|
|
15
|
+
this.details = [...details];
|
|
16
|
+
}
|
|
17
|
+
static connecting() {
|
|
18
|
+
return new StartupState(StartupStateKind.Connecting, []);
|
|
19
|
+
}
|
|
20
|
+
static preShellData(location) {
|
|
21
|
+
return new StartupState(StartupStateKind.PreShellData, [location]);
|
|
22
|
+
}
|
|
23
|
+
static workInProgress(descriptions) {
|
|
24
|
+
return new StartupState(StartupStateKind.WorkInProgress, descriptions);
|
|
25
|
+
}
|
|
26
|
+
static waitingForWork(descriptions) {
|
|
27
|
+
return new StartupState(StartupStateKind.WaitingForWork, descriptions);
|
|
28
|
+
}
|
|
29
|
+
static newerBuild(version) {
|
|
30
|
+
return new StartupState(StartupStateKind.NewerBuild, [version]);
|
|
31
|
+
}
|
|
32
|
+
static failed(message) {
|
|
33
|
+
return new StartupState(StartupStateKind.Failed, [message]);
|
|
34
|
+
}
|
|
35
|
+
static updating(version) {
|
|
36
|
+
return new StartupState(StartupStateKind.Updating, [version]);
|
|
37
|
+
}
|
|
38
|
+
static ready() {
|
|
39
|
+
return new StartupState(StartupStateKind.Ready, []);
|
|
40
|
+
}
|
|
41
|
+
toJson() {
|
|
42
|
+
return { [Resources.kindField]: this.kind, [Resources.detailsField]: [...this.details] };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=startup-state.js.map
|
|
@@ -0,0 +1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,CAAC,OAAe;QACpC,OAAO,IAAI,YAAY,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAChE,CAAC;IAEM,MAAM,CAAC,KAAK;QACjB,OAAO,IAAI,YAAY,CAAC,gBAAgB,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtD,CAAC;IAEM,MAAM;QACX,OAAO,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;IAC3F,CAAC;CACF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { createHash } from "node:crypto";
|
|
9
|
+
import { realpath } from "node:fs/promises";
|
|
10
|
+
import path from "node:path";
|
|
11
|
+
import { ArgumentException } from "@noldova/context.exceptions";
|
|
12
|
+
import { Resources } from "../resources.js";
|
|
13
|
+
export class TaskbarIdentity {
|
|
14
|
+
appId;
|
|
15
|
+
iconPath;
|
|
16
|
+
relaunchCommand;
|
|
17
|
+
constructor(appId, iconPath, relaunchCommand) {
|
|
18
|
+
ArgumentException.throwIfNullOrWhitespace(appId, Resources.appIdParameter);
|
|
19
|
+
ArgumentException.throwIfNullOrWhitespace(iconPath, Resources.iconPathParameter);
|
|
20
|
+
ArgumentException.throwIfNullOrWhitespace(relaunchCommand, Resources.relaunchCommandParameter);
|
|
21
|
+
this.appId = appId;
|
|
22
|
+
this.iconPath = iconPath;
|
|
23
|
+
this.relaunchCommand = relaunchCommand;
|
|
24
|
+
}
|
|
25
|
+
static async createAsync(isPackaged, executablePath, iconFile, mainScript, argv, workingDirectory) {
|
|
26
|
+
const kept = argv.flatMap(t => Resources.relaunchArgumentPrefixes
|
|
27
|
+
.filter(prefix => t.startsWith(prefix))
|
|
28
|
+
.map(prefix => `${prefix}${path.resolve(workingDirectory, t.slice(prefix.length))}`));
|
|
29
|
+
const checkout = path.resolve(path.dirname(path.resolve(workingDirectory, mainScript)), ...Resources.repositoryRootSegments);
|
|
30
|
+
const parts = isPackaged ? [executablePath, ...kept] : [executablePath, path.join(checkout, ...Resources.developmentPackageSegments), ...kept];
|
|
31
|
+
return new TaskbarIdentity(isPackaged ? Resources.appUserModelId : await TaskbarIdentity.identifyCheckoutAsync(checkout), isPackaged ? executablePath : iconFile, parts.map(t => Resources.formatQuotedArgument(t)).join(Resources.argumentSeparator));
|
|
32
|
+
}
|
|
33
|
+
toAppDetails() {
|
|
34
|
+
return {
|
|
35
|
+
appId: this.appId,
|
|
36
|
+
appIconPath: this.iconPath,
|
|
37
|
+
appIconIndex: 0,
|
|
38
|
+
relaunchCommand: this.relaunchCommand,
|
|
39
|
+
relaunchDisplayName: Resources.applicationName
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static async identifyCheckoutAsync(checkout) {
|
|
43
|
+
const folder = await realpath(checkout).catch(() => checkout);
|
|
44
|
+
const hash = createHash(Resources.checkoutHashAlgorithm).update(folder).digest(Resources.hexEncoding).slice(0, Resources.checkoutHashLength);
|
|
45
|
+
return `${Resources.developmentAppUserModelId}${Resources.idSeparator}${hash}`;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=taskbar-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taskbar-identity.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/taskbar-identity.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MA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AS,CAAC,yBAAyB,GAAG,SAAS,CAAC,WAAW,GAAG,IAAI,EAAE,CAAC;IACjF,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { JsonReader } from "@noldova/context.json";
|
|
9
|
+
import { Resources } from "../resources.js";
|
|
10
|
+
export class UpdateReadyRecord {
|
|
11
|
+
version;
|
|
12
|
+
file;
|
|
13
|
+
sha512;
|
|
14
|
+
isNotified;
|
|
15
|
+
constructor(version, file, sha512, isNotified) {
|
|
16
|
+
this.version = version;
|
|
17
|
+
this.file = file;
|
|
18
|
+
this.sha512 = sha512;
|
|
19
|
+
this.isNotified = isNotified;
|
|
20
|
+
}
|
|
21
|
+
static fromJson(value) {
|
|
22
|
+
const reader = JsonReader.fromValue(value);
|
|
23
|
+
return new UpdateReadyRecord(reader.readNonBlankString(Resources.updateVersionField), reader.readNonBlankString(Resources.updateFileField), reader.readNonBlankString(Resources.updateSha512Field), reader.readBoolean(Resources.updateNotifiedField));
|
|
24
|
+
}
|
|
25
|
+
notified() {
|
|
26
|
+
return new UpdateReadyRecord(this.version, this.file, this.sha512, true);
|
|
27
|
+
}
|
|
28
|
+
toJson() {
|
|
29
|
+
return {
|
|
30
|
+
[Resources.updateVersionField]: this.version,
|
|
31
|
+
[Resources.updateFileField]: this.file,
|
|
32
|
+
[Resources.updateSha512Field]: this.sha512,
|
|
33
|
+
[Resources.updateNotifiedField]: this.isNotified
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=update-ready-record.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-ready-record.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/update-ready-record.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SAAS,CAAC,mBAAmB,CAAC,EAAE,IAAI,CAAC,UAAU;SACjD,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { UpdateStateKind } from "../enums/update-state-kind.js";
|
|
9
|
+
import { Resources } from "../resources.js";
|
|
10
|
+
export class UpdateStatus {
|
|
11
|
+
static off = new UpdateStatus(UpdateStateKind.Off, null, null, null, null, false);
|
|
12
|
+
kind;
|
|
13
|
+
version;
|
|
14
|
+
progress;
|
|
15
|
+
checkedAt;
|
|
16
|
+
reason;
|
|
17
|
+
mustMove;
|
|
18
|
+
constructor(kind, version, progress, checkedAt, reason, mustMove) {
|
|
19
|
+
this.kind = kind;
|
|
20
|
+
this.version = version;
|
|
21
|
+
this.progress = progress;
|
|
22
|
+
this.checkedAt = checkedAt;
|
|
23
|
+
this.reason = reason;
|
|
24
|
+
this.mustMove = mustMove;
|
|
25
|
+
}
|
|
26
|
+
get isBusy() {
|
|
27
|
+
return [UpdateStateKind.Checking, UpdateStateKind.Downloading, UpdateStateKind.Ready].includes(this.kind);
|
|
28
|
+
}
|
|
29
|
+
toJson() {
|
|
30
|
+
return {
|
|
31
|
+
[Resources.kindField]: this.kind,
|
|
32
|
+
[Resources.updateVersionField]: this.version,
|
|
33
|
+
[Resources.updateProgressField]: this.progress,
|
|
34
|
+
[Resources.updateCheckedAtField]: this.checkedAt,
|
|
35
|
+
[Resources.updateReasonField]: this.reason,
|
|
36
|
+
[Resources.updateMustMoveField]: this.mustMove
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=update-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-status.js","sourceRoot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AAC,EAAE,IAAI,CAAC,SAAS;YAChD,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,MAAM;YAC1C,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,IAAI,CAAC,QAAQ;SAC/C,CAAC;IACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
export class UpdateStopResult {
|
|
9
|
+
isHandedOff;
|
|
10
|
+
isHandoffRecorded;
|
|
11
|
+
constructor(isHandedOff, isHandoffRecorded) {
|
|
12
|
+
this.isHandedOff = isHandedOff;
|
|
13
|
+
this.isHandoffRecorded = isHandoffRecorded;
|
|
14
|
+
}
|
|
15
|
+
static cancelled() {
|
|
16
|
+
return new UpdateStopResult(false, false);
|
|
17
|
+
}
|
|
18
|
+
static handedOff(isHandoffRecorded) {
|
|
19
|
+
return new UpdateStopResult(true, isHandoffRecorded);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=update-stop-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-stop-result.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/update-stop-result.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,gBAAgB;IACX,WAAW,CAAU;IACrB,iBAAiB,CAAU;IAE3C,YAAoB,WAAoB,EAAE,iBAA0B;QAClE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC7C,CAAC;IAEM,MAAM,CAAC,SAAS;QACrB,OAAO,IAAI,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,iBAA0B;QAChD,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import "@noldova/context.core";
|
|
9
|
+
import { Resources } from "../resources.js";
|
|
10
|
+
export class UpdateVersion {
|
|
11
|
+
parts;
|
|
12
|
+
internal;
|
|
13
|
+
constructor(parts, internal) {
|
|
14
|
+
this.parts = parts;
|
|
15
|
+
this.internal = internal;
|
|
16
|
+
}
|
|
17
|
+
static parse(text) {
|
|
18
|
+
const match = Resources.updateVersionPattern.exec(text);
|
|
19
|
+
if (Object.isNull(match))
|
|
20
|
+
return null;
|
|
21
|
+
const [, major, minor, patch, internal] = match;
|
|
22
|
+
return new UpdateVersion([major, minor, patch].map(Number), Object.isUndefined(internal) ? null : Number(internal));
|
|
23
|
+
}
|
|
24
|
+
static isOffered(text) {
|
|
25
|
+
return !Object.isNull(UpdateVersion.parse(text));
|
|
26
|
+
}
|
|
27
|
+
static isNewer(text, current) {
|
|
28
|
+
const next = UpdateVersion.parse(text);
|
|
29
|
+
const installed = UpdateVersion.parse(current);
|
|
30
|
+
return !Object.isNull(next) && !Object.isNull(installed) && next.compareTo(installed) > 0;
|
|
31
|
+
}
|
|
32
|
+
compareTo(other) {
|
|
33
|
+
const index = this.parts.findIndex((t, i) => t !== other.parts[i]);
|
|
34
|
+
if (index >= 0)
|
|
35
|
+
return Number(this.parts[index]) - Number(other.parts[index]);
|
|
36
|
+
if (this.internal === other.internal)
|
|
37
|
+
return 0;
|
|
38
|
+
if (Object.isNull(this.internal))
|
|
39
|
+
return 1;
|
|
40
|
+
return Object.isNull(other.internal) ? -1 : this.internal - other.internal;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=update-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-version.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/update-version.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,MAAM,OAAO,aAAa;IACP,KAAK,CAAoB;IACzB,QAAQ,CAAgB;IAEzC,YAAoB,KAAwB,EAAE,QAAuB;QACnE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,IAAY;QAC9B,MAAM,KAAK,GAAG,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxD,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC;QAChD,OAAO,IAAI,aAAa,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtH,CAAC;IAEM,MAAM,CAAC,SAAS,CAAC,IAAY;QAClC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,CAAC;IAEM,MAAM,CAAC,OAAO,CAAC,IAAY,EAAE,OAAe;QACjD,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,SAAS,GAAG,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC/C,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IAC5F,CAAC;IAEO,SAAS,CAAC,KAAoB;QACpC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACnE,IAAI,KAAK,IAAI,CAAC;YACZ,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAChE,IAAI,IAAI,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;YAClC,OAAO,CAAC,CAAC;QACX,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;YAC9B,OAAO,CAAC,CAAC;QACX,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;IAC7E,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
export class WebViewHistory {
|
|
9
|
+
entries;
|
|
10
|
+
index;
|
|
11
|
+
constructor(entries, index) {
|
|
12
|
+
this.entries = [...entries];
|
|
13
|
+
this.index = index;
|
|
14
|
+
}
|
|
15
|
+
get currentUrl() {
|
|
16
|
+
return this.entries[this.index]?.url ?? null;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=web-view-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-view-history.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/web-view-history.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAO,cAAc;IACT,OAAO,CAA6B;IACpC,KAAK,CAAS;IAE9B,YAAmB,OAAmC,EAAE,KAAa;QACnE,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { ArgumentException, ArgumentOutOfRangeException, ExceptionOptions } from "@noldova/context.exceptions";
|
|
9
|
+
import { JsonException, JsonReader } from "@noldova/context.json";
|
|
10
|
+
import { Resources } from "../resources.js";
|
|
11
|
+
export class WindowAppearance {
|
|
12
|
+
background;
|
|
13
|
+
titleBar;
|
|
14
|
+
titleBarText;
|
|
15
|
+
titleBarHeight;
|
|
16
|
+
constructor(background, titleBar, titleBarText, titleBarHeight) {
|
|
17
|
+
WindowAppearance.requireColor(background, Resources.backgroundField);
|
|
18
|
+
WindowAppearance.requireColor(titleBar, Resources.titleBarField);
|
|
19
|
+
WindowAppearance.requireColor(titleBarText, Resources.titleBarTextField);
|
|
20
|
+
ArgumentOutOfRangeException.throwIfNotPositiveInteger(titleBarHeight, Resources.titleBarHeightField);
|
|
21
|
+
this.background = background;
|
|
22
|
+
this.titleBar = titleBar;
|
|
23
|
+
this.titleBarText = titleBarText;
|
|
24
|
+
this.titleBarHeight = titleBarHeight;
|
|
25
|
+
}
|
|
26
|
+
static fromJson(value) {
|
|
27
|
+
const json = JsonReader.fromValue(value);
|
|
28
|
+
const background = json.readString(Resources.backgroundField);
|
|
29
|
+
const titleBar = json.readString(Resources.titleBarField);
|
|
30
|
+
const titleBarText = json.readString(Resources.titleBarTextField);
|
|
31
|
+
const titleBarHeight = json.readInteger(Resources.titleBarHeightField);
|
|
32
|
+
try {
|
|
33
|
+
return new WindowAppearance(background, titleBar, titleBarText, titleBarHeight);
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
throw new JsonException(Resources.invalidAppearance, json.path, new ExceptionOptions(error));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
toJson() {
|
|
40
|
+
return {
|
|
41
|
+
[Resources.backgroundField]: this.background,
|
|
42
|
+
[Resources.titleBarField]: this.titleBar,
|
|
43
|
+
[Resources.titleBarTextField]: this.titleBarText,
|
|
44
|
+
[Resources.titleBarHeightField]: this.titleBarHeight
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static requireColor(value, name) {
|
|
48
|
+
if (!Resources.colorPattern.test(value))
|
|
49
|
+
throw new ArgumentException(Resources.invalidColor, name);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=window-appearance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-appearance.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/window-appearance.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,MA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H,OAAO,IAAI,gBAAgB,CAAC,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;QAClF,CAAC;QACD,OAAO,KAAK,EAAE,CAAC;YACb,MAAM,IAAI,aAAa,CAAC,SAAS,CAAC,iBAAiB,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC/F,CAAC;IACH,CAAC;IAEM,MAAM;QACX,OAAO;YACL,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC,UAAU;YAC5C,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,IAAI,CAAC,QAAQ;YACxC,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,IAAI,CAAC,YAAY;YAChD,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,IAAI,CAAC,cAAc;SACrD,CAAC;IACJ,CAAC;IAEO,MAAM,CAAC,YAAY,CAAC,KAAa,EAAE,IAAY;QACrD,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;YACrC,MAAM,IAAI,iBAAiB,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAC9D,CAAC;CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
export class WindowPage {
|
|
9
|
+
controller = new AbortController();
|
|
10
|
+
id;
|
|
11
|
+
serial;
|
|
12
|
+
constructor(id, serial) {
|
|
13
|
+
this.id = id;
|
|
14
|
+
this.serial = serial;
|
|
15
|
+
}
|
|
16
|
+
get signal() {
|
|
17
|
+
return this.controller.signal;
|
|
18
|
+
}
|
|
19
|
+
end() {
|
|
20
|
+
this.controller.abort();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=window-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-page.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/window-page.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,OAAO,UAAU;IACJ,UAAU,GAAoB,IAAI,eAAe,EAAE,CAAC;IAErD,EAAE,CAAgB;IAClB,MAAM,CAAS;IAE/B,YAAmB,EAAiB,EAAE,MAAc;QAClD,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IAChC,CAAC;IAEM,GAAG;QACR,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;CACF"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import "@noldova/context.core";
|
|
9
|
+
import { SenderInfo } from "./sender-info.js";
|
|
10
|
+
import { WindowPage } from "./window-page.js";
|
|
11
|
+
export class WindowRegistry {
|
|
12
|
+
policy;
|
|
13
|
+
windows = new Map();
|
|
14
|
+
pages = new Map();
|
|
15
|
+
nextPage = 1;
|
|
16
|
+
constructor(policy) {
|
|
17
|
+
this.policy = policy;
|
|
18
|
+
}
|
|
19
|
+
get size() {
|
|
20
|
+
return this.windows.size;
|
|
21
|
+
}
|
|
22
|
+
get all() {
|
|
23
|
+
return [...this.windows.values()];
|
|
24
|
+
}
|
|
25
|
+
get first() {
|
|
26
|
+
const [open] = this.windows.values();
|
|
27
|
+
return open ?? null;
|
|
28
|
+
}
|
|
29
|
+
get isAnyFocused() {
|
|
30
|
+
return this.all.some(t => !t.window.isDestroyed() && t.window.isFocused());
|
|
31
|
+
}
|
|
32
|
+
add(contentsId, open) {
|
|
33
|
+
this.windows.set(contentsId, open);
|
|
34
|
+
}
|
|
35
|
+
remove(contentsId) {
|
|
36
|
+
this.windows.delete(contentsId);
|
|
37
|
+
}
|
|
38
|
+
find(contentsId) {
|
|
39
|
+
return this.windows.get(contentsId) ?? null;
|
|
40
|
+
}
|
|
41
|
+
findTrusted(event) {
|
|
42
|
+
const frame = event.senderFrame;
|
|
43
|
+
if (Object.isNull(frame) || !this.policy.isTrusted(new SenderInfo(frame.url, Object.isNull(frame.parent), event.sender.id)))
|
|
44
|
+
return null;
|
|
45
|
+
return this.find(event.sender.id);
|
|
46
|
+
}
|
|
47
|
+
isLast(prompt) {
|
|
48
|
+
return this.all.every(t => t === prompt);
|
|
49
|
+
}
|
|
50
|
+
sendToAll(channel, ...values) {
|
|
51
|
+
for (const open of this.windows.values())
|
|
52
|
+
if (!open.window.isDestroyed())
|
|
53
|
+
open.window.webContents.send(channel, ...values);
|
|
54
|
+
}
|
|
55
|
+
sendTo(contentsId, channel, ...values) {
|
|
56
|
+
const open = this.windows.get(contentsId);
|
|
57
|
+
if (!Object.isUndefined(open) && !open.window.isDestroyed())
|
|
58
|
+
open.window.webContents.send(channel, ...values);
|
|
59
|
+
}
|
|
60
|
+
startPage(contentsId, id) {
|
|
61
|
+
const ended = this.pages.get(contentsId);
|
|
62
|
+
if (ended?.id === id)
|
|
63
|
+
return null;
|
|
64
|
+
this.pages.set(contentsId, new WindowPage(id, this.nextPage++));
|
|
65
|
+
ended?.end();
|
|
66
|
+
return ended ?? null;
|
|
67
|
+
}
|
|
68
|
+
endPage(contentsId) {
|
|
69
|
+
this.pages.get(contentsId)?.end();
|
|
70
|
+
this.pages.delete(contentsId);
|
|
71
|
+
}
|
|
72
|
+
findPage(contentsId) {
|
|
73
|
+
return this.pages.get(contentsId) ?? null;
|
|
74
|
+
}
|
|
75
|
+
pageOf(contentsId, page) {
|
|
76
|
+
const id = Object.isString(page) ? page : null;
|
|
77
|
+
const current = this.pages.get(contentsId);
|
|
78
|
+
if (!Object.isUndefined(current))
|
|
79
|
+
return current.id === id ? current : null;
|
|
80
|
+
const started = new WindowPage(id, this.nextPage++);
|
|
81
|
+
this.pages.set(contentsId, started);
|
|
82
|
+
return started;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=window-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-registry.js","sourceRoot":"","sources":["../../../../src/noldova.desktop.electron/src/models/window-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAM/B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,OAAO,cAAc;IACR,MAAM,CAAe;IACrB,OAAO,GAA4B,IAAI,GAAG,EAAE,CAAC;IAC7C,KAAK,GAA4B,IAAI,GAAG,EAAE,CAAC;IACpD,QAAQ,GAAW,CAAC,CAAC;IAE7B,YAAmB,MAAoB;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,IAAW,GAAG;QACZ,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACpC,CAAC;IAED,IAAW,KAAK;QACd,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;QACrC,OAAO,IAAI,IAAI,IAAI,CAAC;IACtB,CAAC;IAED,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAA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