winui-svelte 0.0.6 → 0.0.8
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/API.md +955 -22
- package/README.md +25 -5
- package/dist/app/activate.d.ts.map +1 -1
- package/dist/app/activate.js +3 -0
- package/dist/app/activate.js.map +1 -1
- package/dist/app/activation/index.d.ts +3 -0
- package/dist/app/activation/index.d.ts.map +1 -1
- package/dist/app/activation/index.js +2 -0
- package/dist/app/activation/index.js.map +1 -1
- package/dist/app/activation/login.d.ts +2 -1
- package/dist/app/activation/login.d.ts.map +1 -1
- package/dist/app/activation/login.js +2 -1
- package/dist/app/activation/login.js.map +1 -1
- package/dist/app/activation/native.js +1 -2
- package/dist/app/activation/native.js.map +1 -1
- package/dist/app/activation/packaged.d.ts +49 -0
- package/dist/app/activation/packaged.d.ts.map +1 -0
- package/dist/app/activation/packaged.js +90 -0
- package/dist/app/activation/packaged.js.map +1 -0
- package/dist/app/activation/receive.d.ts +11 -2
- package/dist/app/activation/receive.d.ts.map +1 -1
- package/dist/app/activation/receive.js +11 -4
- package/dist/app/activation/receive.js.map +1 -1
- package/dist/app/activation/registration.d.ts +3 -3
- package/dist/app/activation/registration.js +7 -7
- package/dist/app/activation/registration.js.map +1 -1
- package/dist/app/activation/scheme.d.ts +10 -0
- package/dist/app/activation/scheme.d.ts.map +1 -1
- package/dist/app/activation/scheme.js +17 -0
- package/dist/app/activation/scheme.js.map +1 -1
- package/dist/app/index.d.ts +4 -2
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +3 -1
- package/dist/app/index.js.map +1 -1
- package/dist/app/instance-running.d.ts +15 -0
- package/dist/app/instance-running.d.ts.map +1 -0
- package/dist/app/instance-running.js +20 -0
- package/dist/app/instance-running.js.map +1 -0
- package/dist/app/jump-list/native.d.ts.map +1 -1
- package/dist/app/jump-list/native.js +1 -2
- package/dist/app/jump-list/native.js.map +1 -1
- package/dist/app/launch-command.d.ts +11 -6
- package/dist/app/launch-command.d.ts.map +1 -1
- package/dist/app/launch-command.js +16 -5
- package/dist/app/launch-command.js.map +1 -1
- package/dist/app/native-messaging/browsers.d.ts +19 -0
- package/dist/app/native-messaging/browsers.d.ts.map +1 -0
- package/dist/app/native-messaging/browsers.js +17 -0
- package/dist/app/native-messaging/browsers.js.map +1 -0
- package/dist/app/native-messaging/index.d.ts +41 -0
- package/dist/app/native-messaging/index.d.ts.map +1 -0
- package/dist/app/native-messaging/index.js +84 -0
- package/dist/app/native-messaging/index.js.map +1 -0
- package/dist/app/native.d.ts +0 -6
- package/dist/app/native.d.ts.map +1 -1
- package/dist/app/native.js +1 -24
- package/dist/app/native.js.map +1 -1
- package/dist/app/notification-source.d.ts.map +1 -1
- package/dist/app/notification-source.js +1 -2
- package/dist/app/notification-source.js.map +1 -1
- package/dist/app/shell/native.js +1 -2
- package/dist/app/shell/native.js.map +1 -1
- package/dist/app/single-instance.d.ts +27 -1
- package/dist/app/single-instance.d.ts.map +1 -1
- package/dist/app/single-instance.js +32 -10
- package/dist/app/single-instance.js.map +1 -1
- package/dist/app/tray-instance.d.ts +4 -3
- package/dist/app/tray-instance.d.ts.map +1 -1
- package/dist/app/tray-instance.js +7 -5
- package/dist/app/tray-instance.js.map +1 -1
- package/dist/automation/backend.d.ts +51 -0
- package/dist/automation/backend.d.ts.map +1 -0
- package/dist/automation/backend.js +5 -0
- package/dist/automation/backend.js.map +1 -0
- package/dist/automation/client.d.ts +97 -0
- package/dist/automation/client.d.ts.map +1 -0
- package/dist/automation/client.js +203 -0
- package/dist/automation/client.js.map +1 -0
- package/dist/automation/ids.d.ts +90 -0
- package/dist/automation/ids.d.ts.map +1 -0
- package/dist/automation/ids.js +84 -0
- package/dist/automation/ids.js.map +1 -0
- package/dist/automation/index.d.ts +13 -0
- package/dist/automation/index.d.ts.map +1 -0
- package/dist/automation/index.js +8 -0
- package/dist/automation/index.js.map +1 -0
- package/dist/automation/native.d.ts +11 -0
- package/dist/automation/native.d.ts.map +1 -0
- package/dist/automation/native.js +594 -0
- package/dist/automation/native.js.map +1 -0
- package/dist/automation/text.d.ts +50 -0
- package/dist/automation/text.d.ts.map +1 -0
- package/dist/automation/text.js +110 -0
- package/dist/automation/text.js.map +1 -0
- package/dist/automation/with-client.d.ts +13 -0
- package/dist/automation/with-client.d.ts.map +1 -0
- package/dist/automation/with-client.js +19 -0
- package/dist/automation/with-client.js.map +1 -0
- package/dist/automation/worker-job.d.ts +32 -0
- package/dist/automation/worker-job.d.ts.map +1 -0
- package/dist/automation/worker-job.js +69 -0
- package/dist/automation/worker-job.js.map +1 -0
- package/dist/automation/worker.d.ts +44 -0
- package/dist/automation/worker.d.ts.map +1 -0
- package/dist/automation/worker.js +70 -0
- package/dist/automation/worker.js.map +1 -0
- package/dist/bindings/.dynwinrt-js-types +198 -0
- package/dist/bindings/.dynwinrt-managed +1 -1
- package/dist/bindings/index.d.ts +15 -0
- package/dist/bindings/index.js +20 -0
- package/dist/bindings/index.mjs +2902 -2882
- package/dist/bindings/index.proxy.js +10 -0
- package/dist/bindings/windows/application-model/activation/ActivationKind.d.ts +49 -0
- package/dist/bindings/windows/application-model/activation/ActivationKind.js +50 -0
- package/dist/bindings/windows/application-model/activation/ApplicationExecutionState.d.ts +9 -0
- package/dist/bindings/windows/application-model/activation/ApplicationExecutionState.js +10 -0
- package/dist/bindings/windows/application-model/activation/IActivatedEventArgs.d.ts +36 -0
- package/dist/bindings/windows/application-model/activation/IActivatedEventArgs.js +149 -0
- package/dist/bindings/windows/application-model/activation/IActivatedEventArgsWithUser.d.ts +28 -0
- package/dist/bindings/windows/application-model/activation/IActivatedEventArgsWithUser.js +119 -0
- package/dist/bindings/windows/application-model/activation/IApplicationViewActivatedEventArgs.d.ts +27 -0
- package/dist/bindings/windows/application-model/activation/IApplicationViewActivatedEventArgs.js +116 -0
- package/dist/bindings/windows/application-model/activation/IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData.d.ts +31 -0
- package/dist/bindings/windows/application-model/activation/IProtocolActivatedEventArgsWithCallerPackageFamilyNameAndData.js +131 -0
- package/dist/bindings/windows/application-model/activation/IViewSwitcherProvider.d.ts +28 -0
- package/dist/bindings/windows/application-model/activation/IViewSwitcherProvider.js +119 -0
- package/dist/bindings/windows/application-model/activation/ProtocolActivatedEventArgs.d.ts +25 -0
- package/dist/bindings/windows/application-model/activation/ProtocolActivatedEventArgs.js +166 -0
- package/dist/bindings/windows/application-model/activation/SplashScreen.d.ts +35 -0
- package/dist/bindings/windows/application-model/activation/SplashScreen.js +105 -0
- package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelActivationSplashScreen_Object_g7a7dbfa699cd28ff.d.ts +7 -0
- package/dist/bindings/windows/foundation/TypedEventHandler_WindowsApplicationModelActivationSplashScreen_Object_g7a7dbfa699cd28ff.js +7 -0
- package/dist/bindings/windows/ui/view-management/ActivationViewSwitcher.d.ts +12 -0
- package/dist/bindings/windows/ui/view-management/ActivationViewSwitcher.js +96 -0
- package/dist/chrome/context-menus/context-menu-schema.d.ts +4 -4
- package/dist/chrome/context-menus/context-menu-schema.d.ts.map +1 -1
- package/dist/chrome/context-menus/context-menu-schema.js +1 -7
- package/dist/chrome/context-menus/context-menu-schema.js.map +1 -1
- package/dist/chrome/notifications/notification-schema.d.ts +2 -2
- package/dist/chrome/parse-or-throw.d.ts +7 -0
- package/dist/chrome/parse-or-throw.d.ts.map +1 -0
- package/dist/chrome/parse-or-throw.js +9 -0
- package/dist/chrome/parse-or-throw.js.map +1 -0
- package/dist/chrome/permissions/permission-schema.d.ts.map +1 -1
- package/dist/chrome/permissions/permission-schema.js +1 -7
- package/dist/chrome/permissions/permission-schema.js.map +1 -1
- package/dist/chrome/windows/chrome-windows.d.ts.map +1 -1
- package/dist/chrome/windows/chrome-windows.js +1 -7
- package/dist/chrome/windows/chrome-windows.js.map +1 -1
- package/dist/components/hand-written/Window.svelte +2 -0
- package/dist/components/hand-written/items/keyed-rows.svelte.d.ts.map +1 -1
- package/dist/components/hand-written/items/keyed-rows.svelte.js +6 -0
- package/dist/components/hand-written/items/keyed-rows.svelte.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/runtime.svelte.d.ts.map +1 -1
- package/dist/components/runtime.svelte.js +7 -0
- package/dist/components/runtime.svelte.js.map +1 -1
- package/dist/components/window-context.d.ts +14 -0
- package/dist/components/window-context.d.ts.map +1 -0
- package/dist/components/window-context.js +20 -0
- package/dist/components/window-context.js.map +1 -0
- package/dist/composition/expression.d.ts +1 -1
- package/dist/css/runtime/containers.d.ts.map +1 -1
- package/dist/css/runtime/containers.js +1 -17
- package/dist/css/runtime/containers.js.map +1 -1
- package/dist/css/runtime/native.d.ts.map +1 -1
- package/dist/css/runtime/native.js +40 -20
- package/dist/css/runtime/native.js.map +1 -1
- package/dist/css/translate/property-kit.d.ts +9 -0
- package/dist/css/translate/property-kit.d.ts.map +1 -1
- package/dist/css/translate/property-kit.js.map +1 -1
- package/dist/css/translate/transition-properties.d.ts +1 -1
- package/dist/css/translate/transition-properties.d.ts.map +1 -1
- package/dist/css/translate/transition-properties.js +32 -5
- package/dist/css/translate/transition-properties.js.map +1 -1
- package/dist/data-transfer/data-transfer.d.ts +3 -3
- package/dist/data-transfer/data-transfer.d.ts.map +1 -1
- package/dist/data-transfer/data-transfer.js.map +1 -1
- package/dist/data-transfer/drag-effects.d.ts +25 -2
- package/dist/data-transfer/drag-effects.d.ts.map +1 -1
- package/dist/data-transfer/drag-effects.js +27 -2
- package/dist/data-transfer/drag-effects.js.map +1 -1
- package/dist/data-transfer/drag-helper.d.ts +50 -0
- package/dist/data-transfer/drag-helper.d.ts.map +1 -0
- package/dist/data-transfer/drag-helper.js +156 -0
- package/dist/data-transfer/drag-helper.js.map +1 -0
- package/dist/data-transfer/drop-target.d.ts +6 -5
- package/dist/data-transfer/drop-target.d.ts.map +1 -1
- package/dist/data-transfer/drop-target.js +68 -20
- package/dist/data-transfer/drop-target.js.map +1 -1
- package/dist/data-transfer/index.d.ts +1 -0
- package/dist/data-transfer/index.d.ts.map +1 -1
- package/dist/data-transfer/index.js.map +1 -1
- package/dist/data-transfer/launcher.d.ts +4 -3
- package/dist/data-transfer/launcher.d.ts.map +1 -1
- package/dist/data-transfer/launcher.js +58 -9
- package/dist/data-transfer/launcher.js.map +1 -1
- package/dist/data-transfer/native.d.ts +66 -0
- package/dist/data-transfer/native.d.ts.map +1 -0
- package/dist/data-transfer/native.js +148 -0
- package/dist/data-transfer/native.js.map +1 -0
- package/dist/data-transfer/ole-data-object.d.ts +62 -0
- package/dist/data-transfer/ole-data-object.d.ts.map +1 -0
- package/dist/data-transfer/ole-data-object.js +162 -0
- package/dist/data-transfer/ole-data-object.js.map +1 -0
- package/dist/data-transfer/ole-drop-target.d.ts +54 -0
- package/dist/data-transfer/ole-drop-target.d.ts.map +1 -0
- package/dist/data-transfer/ole-drop-target.js +192 -0
- package/dist/data-transfer/ole-drop-target.js.map +1 -0
- package/dist/data-transfer/share-interop.d.ts.map +1 -1
- package/dist/data-transfer/share-interop.js +1 -1
- package/dist/data-transfer/share-interop.js.map +1 -1
- package/dist/data-transfer/shell-items.d.ts +10 -0
- package/dist/data-transfer/shell-items.d.ts.map +1 -0
- package/dist/data-transfer/shell-items.js +67 -0
- package/dist/data-transfer/shell-items.js.map +1 -0
- package/dist/data-transfer/window-drop.d.ts +35 -0
- package/dist/data-transfer/window-drop.d.ts.map +1 -0
- package/dist/data-transfer/window-drop.js +311 -0
- package/dist/data-transfer/window-drop.js.map +1 -0
- package/dist/devices/native.js +1 -2
- package/dist/devices/native.js.map +1 -1
- package/dist/downloads/chrome-downloads.d.ts +8 -0
- package/dist/downloads/chrome-downloads.d.ts.map +1 -1
- package/dist/downloads/chrome-downloads.js +35 -6
- package/dist/downloads/chrome-downloads.js.map +1 -1
- package/dist/downloads/download-record.d.ts +3 -2
- package/dist/downloads/download-record.d.ts.map +1 -1
- package/dist/downloads/download-record.js.map +1 -1
- package/dist/downloads/download-transfer.d.ts.map +1 -1
- package/dist/downloads/download-transfer.js +3 -3
- package/dist/downloads/download-transfer.js.map +1 -1
- package/dist/downloads/download-types.d.ts +3 -1
- package/dist/downloads/download-types.d.ts.map +1 -1
- package/dist/downloads/download-types.js.map +1 -1
- package/dist/downloads/fetch-to-file.d.ts +11 -6
- package/dist/downloads/fetch-to-file.d.ts.map +1 -1
- package/dist/downloads/fetch-to-file.js +45 -16
- package/dist/downloads/fetch-to-file.js.map +1 -1
- package/dist/downloads/taskbar-progress.d.ts +3 -18
- package/dist/downloads/taskbar-progress.d.ts.map +1 -1
- package/dist/downloads/taskbar-progress.js +1 -38
- package/dist/downloads/taskbar-progress.js.map +1 -1
- package/dist/enums.d.ts +4 -0
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js +4 -0
- package/dist/enums.js.map +1 -1
- package/dist/forms/form-field-props.d.ts +2 -2
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.d.ts.map +1 -1
- package/dist/input/index.js +1 -0
- package/dist/input/index.js.map +1 -1
- package/dist/input/modifier-keys.d.ts +24 -0
- package/dist/input/modifier-keys.d.ts.map +1 -0
- package/dist/input/modifier-keys.js +20 -0
- package/dist/input/modifier-keys.js.map +1 -0
- package/dist/media/pixel-buffer.d.ts.map +1 -1
- package/dist/media/pixel-buffer.js +1 -1
- package/dist/media/pixel-buffer.js.map +1 -1
- package/dist/messaging/web-view2/core.d.ts +56 -0
- package/dist/messaging/web-view2/core.d.ts.map +1 -1
- package/dist/messaging/web-view2/core.js +6 -0
- package/dist/messaging/web-view2/core.js.map +1 -1
- package/dist/messaging/web-view2/environment.d.ts +41 -0
- package/dist/messaging/web-view2/environment.d.ts.map +1 -0
- package/dist/messaging/web-view2/environment.js +91 -0
- package/dist/messaging/web-view2/environment.js.map +1 -0
- package/dist/messaging/web-view2/index.d.ts +9 -1
- package/dist/messaging/web-view2/index.d.ts.map +1 -1
- package/dist/messaging/web-view2/index.js +5 -0
- package/dist/messaging/web-view2/index.js.map +1 -1
- package/dist/messaging/web-view2/input.d.ts +68 -0
- package/dist/messaging/web-view2/input.d.ts.map +1 -0
- package/dist/messaging/web-view2/input.js +108 -0
- package/dist/messaging/web-view2/input.js.map +1 -0
- package/dist/messaging/web-view2/protocol.d.ts +24 -0
- package/dist/messaging/web-view2/protocol.d.ts.map +1 -0
- package/dist/messaging/web-view2/protocol.js +31 -0
- package/dist/messaging/web-view2/protocol.js.map +1 -0
- package/dist/messaging/web-view2/recovery.d.ts +65 -0
- package/dist/messaging/web-view2/recovery.d.ts.map +1 -0
- package/dist/messaging/web-view2/recovery.js +138 -0
- package/dist/messaging/web-view2/recovery.js.map +1 -0
- package/dist/messaging/web-view2/requests.d.ts +88 -0
- package/dist/messaging/web-view2/requests.d.ts.map +1 -0
- package/dist/messaging/web-view2/requests.js +169 -0
- package/dist/messaging/web-view2/requests.js.map +1 -0
- package/dist/messaging/web-view2/transport.d.ts.map +1 -1
- package/dist/messaging/web-view2/transport.js +1 -4
- package/dist/messaging/web-view2/transport.js.map +1 -1
- package/dist/native-identity.d.ts +10 -0
- package/dist/native-identity.d.ts.map +1 -0
- package/dist/native-identity.js +20 -0
- package/dist/native-identity.js.map +1 -0
- package/dist/progress/TaskbarProgress.d.svelte.ts +6 -0
- package/dist/progress/TaskbarProgress.svelte +32 -0
- package/dist/progress/aggregate.d.ts +23 -0
- package/dist/progress/aggregate.d.ts.map +1 -0
- package/dist/progress/aggregate.js +59 -0
- package/dist/progress/aggregate.js.map +1 -0
- package/dist/progress/core.d.ts +14 -0
- package/dist/progress/core.d.ts.map +1 -0
- package/dist/progress/core.js +8 -0
- package/dist/progress/core.js.map +1 -0
- package/dist/progress/index.d.ts +5 -0
- package/dist/progress/index.d.ts.map +1 -0
- package/dist/progress/index.js +4 -0
- package/dist/progress/index.js.map +1 -0
- package/dist/progress/progress-event.d.ts +18 -0
- package/dist/progress/progress-event.d.ts.map +1 -0
- package/dist/progress/progress-event.js +19 -0
- package/dist/progress/progress-event.js.map +1 -0
- package/dist/progress/progress-operation.d.ts +163 -0
- package/dist/progress/progress-operation.d.ts.map +1 -0
- package/dist/progress/progress-operation.js +356 -0
- package/dist/progress/progress-operation.js.map +1 -0
- package/dist/progress/progress-registry.d.ts +89 -0
- package/dist/progress/progress-registry.d.ts.map +1 -0
- package/dist/progress/progress-registry.js +187 -0
- package/dist/progress/progress-registry.js.map +1 -0
- package/dist/progress/progress-source.d.ts +46 -0
- package/dist/progress/progress-source.d.ts.map +1 -0
- package/dist/progress/progress-source.js +31 -0
- package/dist/progress/progress-source.js.map +1 -0
- package/dist/progress/progress-state.d.ts +54 -0
- package/dist/progress/progress-state.d.ts.map +1 -0
- package/dist/progress/progress-state.js +35 -0
- package/dist/progress/progress-state.js.map +1 -0
- package/dist/progress/progress-text.d.ts +10 -0
- package/dist/progress/progress-text.d.ts.map +1 -0
- package/dist/progress/progress-text.js +23 -0
- package/dist/progress/progress-text.js.map +1 -0
- package/dist/progress/scoped-source.d.ts +31 -0
- package/dist/progress/scoped-source.d.ts.map +1 -0
- package/dist/progress/scoped-source.js +46 -0
- package/dist/progress/scoped-source.js.map +1 -0
- package/dist/progress/taskbar-progress-props.d.ts +15 -0
- package/dist/progress/taskbar-progress-props.d.ts.map +1 -0
- package/dist/progress/taskbar-progress-props.js +2 -0
- package/dist/progress/taskbar-progress-props.js.map +1 -0
- package/dist/progress/taskbar-progress.d.ts +44 -0
- package/dist/progress/taskbar-progress.d.ts.map +1 -0
- package/dist/progress/taskbar-progress.js +62 -0
- package/dist/progress/taskbar-progress.js.map +1 -0
- package/dist/progress/track-operation.d.ts +36 -0
- package/dist/progress/track-operation.d.ts.map +1 -0
- package/dist/progress/track-operation.js +53 -0
- package/dist/progress/track-operation.js.map +1 -0
- package/dist/renderer/host/host.d.ts.map +1 -1
- package/dist/renderer/host/host.js +33 -16
- package/dist/renderer/host/host.js.map +1 -1
- package/dist/renderer/host/structure-sync.d.ts +9 -0
- package/dist/renderer/host/structure-sync.d.ts.map +1 -0
- package/dist/renderer/host/structure-sync.js +24 -0
- package/dist/renderer/host/structure-sync.js.map +1 -0
- package/dist/security/data-protection-error.d.ts +14 -0
- package/dist/security/data-protection-error.d.ts.map +1 -0
- package/dist/security/data-protection-error.js +15 -0
- package/dist/security/data-protection-error.js.map +1 -0
- package/dist/security/index.d.ts +48 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +32 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/native.d.ts +43 -0
- package/dist/security/native.d.ts.map +1 -0
- package/dist/security/native.js +170 -0
- package/dist/security/native.js.map +1 -0
- package/dist/security/protection-scope.d.ts +13 -0
- package/dist/security/protection-scope.d.ts.map +1 -0
- package/dist/security/protection-scope.js +11 -0
- package/dist/security/protection-scope.js.map +1 -0
- package/dist/store/states.d.ts +2 -2
- package/dist/store/windows-identity.d.ts +2 -6
- package/dist/store/windows-identity.d.ts.map +1 -1
- package/dist/store/windows-identity.js +2 -29
- package/dist/store/windows-identity.js.map +1 -1
- package/dist/store/windows-packages.d.ts +2 -2
- package/dist/store/windows-store.d.ts +2 -2
- package/dist/tray/click-detector.d.ts.map +1 -1
- package/dist/tray/click-detector.js.map +1 -1
- package/dist/tray/flyout-model.d.ts +4 -3
- package/dist/tray/flyout-model.d.ts.map +1 -1
- package/dist/tray/flyout-model.js +12 -2
- package/dist/tray/flyout-model.js.map +1 -1
- package/dist/tray/menu/icon.d.ts +17 -0
- package/dist/tray/menu/icon.d.ts.map +1 -0
- package/dist/tray/menu/icon.js +31 -0
- package/dist/tray/menu/icon.js.map +1 -0
- package/dist/tray/menu/index.d.ts +1 -1
- package/dist/tray/menu/index.d.ts.map +1 -1
- package/dist/tray/menu/index.js.map +1 -1
- package/dist/tray/menu/types.d.ts +23 -6
- package/dist/tray/menu/types.d.ts.map +1 -1
- package/dist/tray/menu/types.js.map +1 -1
- package/dist/tray/menu-svelte/TrayMenuOperations.d.svelte.ts +6 -0
- package/dist/tray/menu-svelte/TrayMenuOperations.svelte +33 -0
- package/dist/tray/menu-svelte/TrayMenuProgress.d.svelte.ts +6 -0
- package/dist/tray/menu-svelte/TrayMenuProgress.svelte +28 -0
- package/dist/tray/menu-svelte/index.d.ts +3 -1
- package/dist/tray/menu-svelte/index.d.ts.map +1 -1
- package/dist/tray/menu-svelte/index.js +2 -0
- package/dist/tray/menu-svelte/index.js.map +1 -1
- package/dist/tray/menu-svelte/menu-node.d.ts +9 -9
- package/dist/tray/menu-svelte/menu-props.d.ts +16 -0
- package/dist/tray/menu-svelte/menu-props.d.ts.map +1 -1
- package/dist/tray/menu-svelte/operation-ids.d.ts +8 -0
- package/dist/tray/menu-svelte/operation-ids.d.ts.map +1 -0
- package/dist/tray/menu-svelte/operation-ids.js +20 -0
- package/dist/tray/menu-svelte/operation-ids.js.map +1 -0
- package/dist/tray/native.d.ts +15 -5
- package/dist/tray/native.d.ts.map +1 -1
- package/dist/tray/native.js +27 -45
- package/dist/tray/native.js.map +1 -1
- package/dist/tray/personalize.d.ts +18 -0
- package/dist/tray/personalize.d.ts.map +1 -0
- package/dist/tray/personalize.js +42 -0
- package/dist/tray/personalize.js.map +1 -0
- package/dist/tray/pointer-share.d.ts +27 -0
- package/dist/tray/pointer-share.d.ts.map +1 -0
- package/dist/tray/pointer-share.js +61 -0
- package/dist/tray/pointer-share.js.map +1 -0
- package/dist/tray/standalone/icon-raster.d.ts +72 -0
- package/dist/tray/standalone/icon-raster.d.ts.map +1 -0
- package/dist/tray/standalone/icon-raster.js +161 -0
- package/dist/tray/standalone/icon-raster.js.map +1 -0
- package/dist/tray/standalone/index.d.ts +4 -2
- package/dist/tray/standalone/index.d.ts.map +1 -1
- package/dist/tray/standalone/index.js +2 -0
- package/dist/tray/standalone/index.js.map +1 -1
- package/dist/tray/standalone/menu-icons.d.ts +9 -0
- package/dist/tray/standalone/menu-icons.d.ts.map +1 -0
- package/dist/tray/standalone/menu-icons.js +280 -0
- package/dist/tray/standalone/menu-icons.js.map +1 -0
- package/dist/tray/standalone/menu-theme.d.ts +38 -0
- package/dist/tray/standalone/menu-theme.d.ts.map +1 -0
- package/dist/tray/standalone/menu-theme.js +74 -0
- package/dist/tray/standalone/menu-theme.js.map +1 -0
- package/dist/tray/standalone/native.d.ts +24 -7
- package/dist/tray/standalone/native.d.ts.map +1 -1
- package/dist/tray/standalone/native.js +63 -16
- package/dist/tray/standalone/native.js.map +1 -1
- package/dist/tray/standalone/standalone-tray.d.ts +17 -2
- package/dist/tray/standalone/standalone-tray.d.ts.map +1 -1
- package/dist/tray/standalone/standalone-tray.js +34 -2
- package/dist/tray/standalone/standalone-tray.js.map +1 -1
- package/dist/tray/themed-icon.d.ts.map +1 -1
- package/dist/tray/themed-icon.js +4 -28
- package/dist/tray/themed-icon.js.map +1 -1
- package/dist/tray/tray-core.d.ts.map +1 -1
- package/dist/tray/tray-core.js +6 -1
- package/dist/tray/tray-core.js.map +1 -1
- package/dist/tray/tray-extras.d.ts +26 -2
- package/dist/tray/tray-extras.d.ts.map +1 -1
- package/dist/tray/tray-manifest.d.ts +44 -4
- package/dist/tray/tray-manifest.d.ts.map +1 -1
- package/dist/tray/tray-manifest.js +48 -4
- package/dist/tray/tray-manifest.js.map +1 -1
- package/dist/vite/entrypoints/build-tray.d.ts +3 -1
- package/dist/vite/entrypoints/build-tray.d.ts.map +1 -1
- package/dist/vite/entrypoints/build-tray.js +22 -16
- package/dist/vite/entrypoints/build-tray.js.map +1 -1
- package/dist/vite/entrypoints/extract-tray.d.ts +7 -6
- package/dist/vite/entrypoints/extract-tray.d.ts.map +1 -1
- package/dist/vite/entrypoints/extract-tray.js +35 -15
- package/dist/vite/entrypoints/extract-tray.js.map +1 -1
- package/dist/vite/entrypoints/tray-module.d.ts +2 -1
- package/dist/vite/entrypoints/tray-module.d.ts.map +1 -1
- package/dist/vite/entrypoints/tray-module.js +8 -4
- package/dist/vite/entrypoints/tray-module.js.map +1 -1
- package/dist/web-apis/eye-dropper.d.ts.map +1 -1
- package/dist/web-apis/eye-dropper.js +8 -5
- package/dist/web-apis/eye-dropper.js.map +1 -1
- package/dist/web-apis/file-read.d.ts +14 -0
- package/dist/web-apis/file-read.d.ts.map +1 -0
- package/dist/web-apis/file-read.js +37 -0
- package/dist/web-apis/file-read.js.map +1 -0
- package/dist/web-apis/file-system.d.ts +9 -0
- package/dist/web-apis/file-system.d.ts.map +1 -1
- package/dist/web-apis/file-system.js +24 -0
- package/dist/web-apis/file-system.js.map +1 -1
- package/dist/web-apis/media-devices-source.d.ts +1 -1
- package/dist/web-apis/native.d.ts +0 -7
- package/dist/web-apis/native.d.ts.map +1 -1
- package/dist/web-apis/native.js +0 -19
- package/dist/web-apis/native.js.map +1 -1
- package/dist/win2d/activation-failure.d.ts +10 -0
- package/dist/win2d/activation-failure.d.ts.map +1 -0
- package/dist/win2d/activation-failure.js +30 -0
- package/dist/win2d/activation-failure.js.map +1 -0
- package/dist/win2d/element-lifecycle.d.ts.map +1 -1
- package/dist/win2d/element-lifecycle.js +6 -1
- package/dist/win2d/element-lifecycle.js.map +1 -1
- package/dist/win2d/manifest.d.ts +29 -0
- package/dist/win2d/manifest.d.ts.map +1 -0
- package/dist/win2d/manifest.js +67 -0
- package/dist/win2d/manifest.js.map +1 -0
- package/dist/win32/index.d.ts +3 -0
- package/dist/win32/index.d.ts.map +1 -0
- package/dist/win32/index.js +11 -0
- package/dist/win32/index.js.map +1 -0
- package/dist/win32-calls.d.ts +6 -0
- package/dist/win32-calls.d.ts.map +1 -1
- package/dist/win32-calls.js +6 -1
- package/dist/win32-calls.js.map +1 -1
- package/dist/win32-foreground.d.ts +34 -0
- package/dist/win32-foreground.d.ts.map +1 -0
- package/dist/win32-foreground.js +91 -0
- package/dist/win32-foreground.js.map +1 -0
- package/dist/win32-icons.d.ts.map +1 -1
- package/dist/win32-icons.js +1 -2
- package/dist/win32-icons.js.map +1 -1
- package/dist/win32-key-state.d.ts +31 -0
- package/dist/win32-key-state.d.ts.map +1 -0
- package/dist/win32-key-state.js +41 -0
- package/dist/win32-key-state.js.map +1 -0
- package/dist/window/anchor.d.ts +15 -0
- package/dist/window/anchor.d.ts.map +1 -1
- package/dist/window/anchor.js +23 -0
- package/dist/window/anchor.js.map +1 -1
- package/dist/window/apply-frame.d.ts +4 -2
- package/dist/window/apply-frame.d.ts.map +1 -1
- package/dist/window/apply-frame.js +2 -3
- package/dist/window/apply-frame.js.map +1 -1
- package/dist/window/bootstrap-core.d.ts +69 -0
- package/dist/window/bootstrap-core.d.ts.map +1 -0
- package/dist/window/bootstrap-core.js +93 -0
- package/dist/window/bootstrap-core.js.map +1 -0
- package/dist/window/bootstrap-mode.d.ts +21 -0
- package/dist/window/bootstrap-mode.d.ts.map +1 -0
- package/dist/window/bootstrap-mode.js +17 -0
- package/dist/window/bootstrap-mode.js.map +1 -0
- package/dist/window/bootstrap.d.ts +12 -28
- package/dist/window/bootstrap.d.ts.map +1 -1
- package/dist/window/bootstrap.js +18 -66
- package/dist/window/bootstrap.js.map +1 -1
- package/dist/window/cover.d.ts +43 -0
- package/dist/window/cover.d.ts.map +1 -0
- package/dist/window/cover.js +64 -0
- package/dist/window/cover.js.map +1 -0
- package/dist/window/create-window.d.ts +1 -1
- package/dist/window/create-window.d.ts.map +1 -1
- package/dist/window/create-window.js +2 -0
- package/dist/window/create-window.js.map +1 -1
- package/dist/window/dpi-awareness.d.ts +71 -0
- package/dist/window/dpi-awareness.d.ts.map +1 -0
- package/dist/window/dpi-awareness.js +127 -0
- package/dist/window/dpi-awareness.js.map +1 -0
- package/dist/window/foreground-filter.d.ts +71 -0
- package/dist/window/foreground-filter.d.ts.map +1 -0
- package/dist/window/foreground-filter.js +108 -0
- package/dist/window/foreground-filter.js.map +1 -0
- package/dist/window/foreground-native.d.ts +25 -0
- package/dist/window/foreground-native.d.ts.map +1 -0
- package/dist/window/foreground-native.js +86 -0
- package/dist/window/foreground-native.js.map +1 -0
- package/dist/window/foreground.d.ts +49 -0
- package/dist/window/foreground.d.ts.map +1 -0
- package/dist/window/foreground.js +78 -0
- package/dist/window/foreground.js.map +1 -0
- package/dist/window/index.d.ts +2 -0
- package/dist/window/index.d.ts.map +1 -1
- package/dist/window/index.js +1 -0
- package/dist/window/index.js.map +1 -1
- package/dist/window/native.d.ts.map +1 -1
- package/dist/window/native.js +1 -2
- package/dist/window/native.js.map +1 -1
- package/dist/window/package-identity.d.ts +17 -0
- package/dist/window/package-identity.d.ts.map +1 -0
- package/dist/window/package-identity.js +97 -0
- package/dist/window/package-identity.js.map +1 -0
- package/dist/window/system-dispatcher-queue.d.ts.map +1 -1
- package/dist/window/system-dispatcher-queue.js +1 -2
- package/dist/window/system-dispatcher-queue.js.map +1 -1
- package/dist/window/taskbar-calls.d.ts +1 -1
- package/dist/window/taskbar-native.d.ts.map +1 -1
- package/dist/window/taskbar-native.js +1 -2
- package/dist/window/taskbar-native.js.map +1 -1
- package/dist/window/window-handle.d.ts +25 -1
- package/dist/window/window-handle.d.ts.map +1 -1
- package/dist/window/window-handle.js +27 -1
- package/dist/window/window-handle.js.map +1 -1
- package/dist/window/window-host.svelte.d.ts +11 -2
- package/dist/window/window-host.svelte.d.ts.map +1 -1
- package/dist/window/window-host.svelte.js +38 -4
- package/dist/window/window-host.svelte.js.map +1 -1
- package/package.json +43 -4
- package/src/app/activate.ts +3 -0
- package/src/app/activation/index.ts +3 -0
- package/src/app/activation/login.ts +2 -1
- package/src/app/activation/native.ts +1 -1
- package/src/app/activation/packaged.ts +118 -0
- package/src/app/activation/receive.ts +24 -4
- package/src/app/activation/registration.ts +7 -7
- package/src/app/activation/scheme.ts +19 -0
- package/src/app/index.ts +4 -2
- package/src/app/instance-running.ts +22 -0
- package/src/app/jump-list/native.ts +1 -2
- package/src/app/launch-command.ts +19 -5
- package/src/app/native-messaging/browsers.ts +21 -0
- package/src/app/native-messaging/index.ts +124 -0
- package/src/app/native.ts +1 -32
- package/src/app/notification-source.ts +1 -3
- package/src/app/shell/native.ts +1 -1
- package/src/app/single-instance.ts +34 -10
- package/src/app/tray-instance.ts +7 -5
- package/src/automation/backend.ts +56 -0
- package/src/automation/client.ts +327 -0
- package/src/automation/ids.ts +97 -0
- package/src/automation/index.ts +23 -0
- package/src/automation/native.ts +688 -0
- package/src/automation/text.ts +174 -0
- package/src/automation/with-client.ts +20 -0
- package/src/automation/worker-job.ts +97 -0
- package/src/automation/worker.ts +116 -0
- package/src/chrome/context-menus/context-menu-schema.ts +1 -12
- package/src/chrome/parse-or-throw.ts +14 -0
- package/src/chrome/permissions/permission-schema.ts +1 -12
- package/src/chrome/windows/chrome-windows.ts +1 -13
- package/src/components/hand-written/items/keyed-rows.svelte.ts +6 -0
- package/src/components/index.ts +1 -0
- package/src/components/runtime.svelte.ts +8 -0
- package/src/components/window-context.ts +23 -0
- package/src/css/runtime/containers.ts +1 -20
- package/src/css/runtime/native.ts +46 -21
- package/src/css/translate/property-kit.ts +9 -0
- package/src/css/translate/transition-properties.ts +44 -10
- package/src/data-transfer/data-transfer.ts +3 -3
- package/src/data-transfer/drag-effects.ts +48 -4
- package/src/data-transfer/drag-helper.ts +216 -0
- package/src/data-transfer/drop-target.ts +90 -26
- package/src/data-transfer/index.ts +1 -0
- package/src/data-transfer/launcher.ts +65 -9
- package/src/data-transfer/native.ts +184 -0
- package/src/data-transfer/ole-data-object.ts +200 -0
- package/src/data-transfer/ole-drop-target.ts +263 -0
- package/src/data-transfer/share-interop.ts +1 -1
- package/src/data-transfer/shell-items.ts +81 -0
- package/src/data-transfer/window-drop.ts +411 -0
- package/src/devices/native.ts +1 -1
- package/src/downloads/chrome-downloads.ts +46 -6
- package/src/downloads/download-record.ts +3 -2
- package/src/downloads/download-transfer.ts +3 -3
- package/src/downloads/download-types.ts +3 -0
- package/src/downloads/fetch-to-file.ts +47 -17
- package/src/downloads/taskbar-progress.ts +3 -49
- package/src/enums.ts +4 -0
- package/src/input/index.ts +2 -0
- package/src/input/modifier-keys.ts +30 -0
- package/src/media/pixel-buffer.ts +1 -1
- package/src/messaging/web-view2/core.ts +64 -0
- package/src/messaging/web-view2/environment.ts +131 -0
- package/src/messaging/web-view2/index.ts +11 -0
- package/src/messaging/web-view2/input.ts +154 -0
- package/src/messaging/web-view2/protocol.ts +41 -0
- package/src/messaging/web-view2/recovery.ts +177 -0
- package/src/messaging/web-view2/requests.ts +238 -0
- package/src/messaging/web-view2/transport.ts +1 -5
- package/src/native-identity.ts +22 -0
- package/src/progress/TaskbarProgress.d.svelte.ts +6 -0
- package/src/progress/aggregate.ts +68 -0
- package/src/progress/core.ts +13 -0
- package/src/progress/index.ts +4 -0
- package/src/progress/progress-event.ts +25 -0
- package/src/progress/progress-operation.ts +469 -0
- package/src/progress/progress-registry.ts +224 -0
- package/src/progress/progress-source.ts +66 -0
- package/src/progress/progress-state.ts +72 -0
- package/src/progress/progress-text.ts +27 -0
- package/src/progress/scoped-source.ts +56 -0
- package/src/progress/taskbar-progress-props.ts +18 -0
- package/src/progress/taskbar-progress.ts +80 -0
- package/src/progress/track-operation.ts +81 -0
- package/src/renderer/host/host.ts +39 -17
- package/src/renderer/host/structure-sync.ts +25 -0
- package/src/security/data-protection-error.ts +18 -0
- package/src/security/index.ts +57 -0
- package/src/security/native.ts +234 -0
- package/src/security/protection-scope.ts +13 -0
- package/src/store/windows-identity.ts +3 -35
- package/src/tray/click-detector.ts +6 -7
- package/src/tray/flyout-model.ts +14 -3
- package/src/tray/menu/icon.ts +40 -0
- package/src/tray/menu/index.ts +3 -0
- package/src/tray/menu/types.ts +27 -6
- package/src/tray/menu-svelte/TrayMenuOperations.d.svelte.ts +6 -0
- package/src/tray/menu-svelte/TrayMenuProgress.d.svelte.ts +6 -0
- package/src/tray/menu-svelte/index.ts +4 -0
- package/src/tray/menu-svelte/menu-props.ts +20 -0
- package/src/tray/menu-svelte/operation-ids.ts +21 -0
- package/src/tray/native.ts +44 -49
- package/src/tray/personalize.ts +57 -0
- package/src/tray/pointer-share.ts +71 -0
- package/src/tray/standalone/icon-raster.ts +208 -0
- package/src/tray/standalone/index.ts +5 -1
- package/src/tray/standalone/menu-icons.ts +317 -0
- package/src/tray/standalone/menu-theme.ts +90 -0
- package/src/tray/standalone/native.ts +83 -16
- package/src/tray/standalone/standalone-tray.ts +68 -5
- package/src/tray/themed-icon.ts +4 -36
- package/src/tray/tray-core.ts +7 -1
- package/src/tray/tray-extras.ts +31 -2
- package/src/tray/tray-manifest.ts +53 -4
- package/src/vite/entrypoints/build-tray.ts +23 -16
- package/src/vite/entrypoints/extract-tray.ts +41 -15
- package/src/vite/entrypoints/tray-module.ts +8 -4
- package/src/web-apis/eye-dropper.ts +9 -5
- package/src/web-apis/file-read.ts +43 -0
- package/src/web-apis/file-system.ts +33 -0
- package/src/web-apis/native.ts +0 -20
- package/src/win2d/activation-failure.ts +35 -0
- package/src/win2d/element-lifecycle.ts +6 -1
- package/src/win2d/manifest.ts +78 -0
- package/src/win32/index.ts +19 -0
- package/src/win32-calls.ts +8 -1
- package/src/win32-foreground.ts +100 -0
- package/src/win32-icons.ts +7 -2
- package/src/win32-key-state.ts +48 -0
- package/src/window/anchor.ts +28 -0
- package/src/window/apply-frame.ts +6 -4
- package/src/window/bootstrap-core.ts +165 -0
- package/src/window/bootstrap-mode.ts +23 -0
- package/src/window/bootstrap.ts +20 -103
- package/src/window/cover.ts +100 -0
- package/src/window/create-window.ts +4 -0
- package/src/window/dpi-awareness.ts +162 -0
- package/src/window/foreground-filter.ts +167 -0
- package/src/window/foreground-native.ts +91 -0
- package/src/window/foreground.ts +106 -0
- package/src/window/index.ts +2 -0
- package/src/window/native.ts +1 -1
- package/src/window/package-identity.ts +112 -0
- package/src/window/system-dispatcher-queue.ts +7 -2
- package/src/window/taskbar-native.ts +1 -2
- package/src/window/window-handle.ts +29 -1
- package/src/window/window-host.svelte.ts +59 -6
- package/web-types.json +11 -3
package/README.md
CHANGED
|
@@ -65,7 +65,8 @@ signature
|
|
|
65
65
|
- **Overlays:** `sizeToContent` and `anchor` on `<Window>` size a window to its
|
|
66
66
|
content with one corner pinned (a bottom-right pill grows upward),
|
|
67
67
|
`isActivatable` can change while the window is open, and `handle.dock()`
|
|
68
|
-
puts a window against a corner of the active display's work area
|
|
68
|
+
puts a window against a corner of the active display's work area,
|
|
69
|
+
`handle.cover()` puts it over a whole display or a region of one; the window's
|
|
69
70
|
own `outerWidth`, `screenX`, `resizeTo` and `moveBy` are on `handle.geometry`
|
|
70
71
|
([API.md](https://github.com/avi12/winui-svelte/blob/main/API.md))
|
|
71
72
|
- **Window place:** `stateKey` on `<Window>` saves its bounds, maximized state
|
|
@@ -854,24 +855,27 @@ conditions on `exports`), which your Vite compiles (`winuiSvelte()`)
|
|
|
854
855
|
| `winui-svelte/components` | every control as a component, and its props type; `xamlOf`, `goToState`, `installXaml` |
|
|
855
856
|
| `winui-svelte/enums` | every closed set a prop or option takes (`HorizontalAlignment`, `Backdrop`, `ThemeBrush`...), each a value and a type of one name ([`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#closed-sets-winui-svelteenums)) |
|
|
856
857
|
| `winui-svelte/win2d`, `/win2d/context-2d` | `Canvas` and the Win2D helpers; `createCanvas2D` and `Canvas2D`, a `CanvasRenderingContext2D` over Win2D (both opt-in) |
|
|
858
|
+
| `winui-svelte/win2d/manifest` | `win2dActivatableClasses`, the `AppxManifest.xml` fragment that lets a packaged app activate Win2D (a build-time helper) |
|
|
857
859
|
| `winui-svelte/state` | the window's side of host state |
|
|
858
860
|
| `winui-svelte/state/host` | a JavaScript host's side: `diff`, transports, message types |
|
|
859
861
|
| `winui-svelte/messaging` | `defineMessaging`: typed request and response messages over a transport, loadable in plain Node |
|
|
860
|
-
| `winui-svelte/messaging/web-view2`, `/messaging/page` | `webView2Transport` and the `WebView2` helpers (scripts, cookies, downloads, permissions); the web page's end of the link, free of WinUI (both opt-in) |
|
|
861
|
-
| `winui-svelte/messaging/web-view2`, `/messaging/page` | `webView2Transport` and the `WebView2` helpers (scripts, cookies, downloads, permissions); the web page's end of the link, free of WinUI (both opt-in) |
|
|
862
|
+
| `winui-svelte/messaging/web-view2`, `/messaging/page` | `webView2Transport` and the `WebView2` helpers (scripts, cookies, downloads, permissions, request filters, the DevTools protocol, trusted input, an environment and profile folder per control, recovery from a browser crash); the web page's end of the link, free of WinUI (both opt-in) |
|
|
863
|
+
| `winui-svelte/messaging/web-view2`, `/messaging/page` | `webView2Transport` and the `WebView2` helpers (scripts, cookies, downloads, permissions, request filters, the DevTools protocol, trusted input, an environment and profile folder per control, recovery from a browser crash); the web page's end of the link, free of WinUI (both opt-in) |
|
|
862
864
|
| `winui-svelte/vite` | `winuiSvelte()` for `vite.config.ts`; `startModuleServer()` for hot reload; `buildApp()` for the production bundle |
|
|
863
865
|
| `winui-svelte/dev` | `startDev()`, one call that opens a component in a window and keeps it live as the files are saved |
|
|
864
866
|
| `winui-svelte/runner` | `createWindowModuleRunner()`, the window thread's side of the module server |
|
|
865
867
|
| `winui-svelte/window` | `runWindow`, `createWindow`, `startTimer`, `exitApplication`, `systemSettings` |
|
|
866
868
|
| `winui-svelte/thread` | `runOnUiThread`, the first call of the UI thread's worker |
|
|
867
|
-
| `winui-svelte/bootstrap` | `initWindowsAppSdk`, for the host's main thread |
|
|
869
|
+
| `winui-svelte/bootstrap` | `initWindowsAppSdk` (which also makes the process per-monitor DPI aware, and skips the bootstrapper in a packaged app that declares the runtime), `hasPackageIdentity`, `BootstrapMode`, `processDpiAwareness`, for the host's main thread |
|
|
868
870
|
| `winui-svelte/testing` | Node module hooks that run `.svelte` files from source, for tests |
|
|
869
871
|
| `winui-svelte/compile`, `/host`, `/keyed-list` | the compiler hook, the renderer, a keyed collection sync |
|
|
870
872
|
| `winui-svelte/element-animation` | `enableElementAnimation` (the Vite plugin calls it for you; Svelte's `transition:` and `animate:` run on WinUI) |
|
|
871
873
|
| `winui-svelte/attached-owners` | `preloadAttachedOwners` (the Vite plugin calls it for a component that names `canvasLeft`, `gridRow` and the like, so a placed control has its place at its first layout; a prop named nowhere needs the call by hand) |
|
|
872
874
|
| `winui-svelte/element-effects` | `enableElementEffects` (the Vite plugin calls it from a component that imports `blur` or `draw`): the blur transition blurs for real and `draw` measures a `path`, with Composition and Win2D |
|
|
873
875
|
| `winui-svelte/app` | single-instance handling over a named pipe, app notifications, `activateOrLaunch` to signal or start the app from another process, `startTray` to start the built `tray.js` once, `relaunch` and restart after a crash |
|
|
874
|
-
| `winui-svelte/app/activation` | `navigator.registerProtocolHandler`, `registerFileTypes`, `launchAtLogin` for the current user, and every start (link, file, sign-in, a later copy) as one typed `ActivationEvent` (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#activation-winui-svelteappactivation)) |
|
|
876
|
+
| `winui-svelte/app/activation` | `navigator.registerProtocolHandler`, `registerFileTypes`, `launchAtLogin` for the current user, and every start (link, file, sign-in, a later copy) as one typed `ActivationEvent`, in a package too (`packagedActivation`: a protocol address or a startup task, with the manifest snippets in the Packaged apps part of the API reference) (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#activation-winui-svelteappactivation)) |
|
|
877
|
+
| `winui-svelte/app/native-messaging` | `registerNativeMessagingHost` for Chrome, Edge, Brave and Chromium in the current user's registry, and `isInstanceRunning` in `winui-svelte/app` for a host to ask whether the app runs (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#native-messaging-host-winui-svelteappnative-messaging)) |
|
|
878
|
+
| `winui-svelte/win32` | A thin, unstable escape hatch for calling a Win32 function WinRT lacks: `bindDll`, `bind`, `hasPackageIdentity` and the memory helpers (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#win32-seam-winui-sveltewin32)) |
|
|
875
879
|
| `winui-svelte/app/jump-list` | Tasks in the taskbar button's right-click menu; a chosen task reaches `startActivation` as a `jumpList` event (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#jump-list-tasks-winui-svelteappjump-list)) |
|
|
876
880
|
| `winui-svelte/app/shell` | `trash` (Recycle Bin), `openWith`, `createShortcut`, `readShortcut`, `registerAppPath`; reveal and open stay in `winui-svelte/data-transfer` (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#shell-verbs-winui-svelteappshell)) |
|
|
877
881
|
| `winui-svelte/bindings/*` | Every bound WinRT and Windows App SDK class as it is named there, for the as-is kind (`winui-svelte/bindings/windows/storage/StorageFolder`) |
|
|
@@ -882,6 +886,9 @@ conditions on `exports`), which your Vite compiles (`winuiSvelte()`)
|
|
|
882
886
|
| `winui-svelte/chrome/permissions` | `ChromePermissions`: `chrome.permissions` (`getAll`, `contains`, `request`, `remove`, `onAdded`, `onRemoved`) over the Permissions API providers and the OS consent; the grants are saved in the app's data folder (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#chromepermissions-winui-sveltechromepermissions)) |
|
|
883
887
|
| `winui-svelte/chrome/context-menus` | `ChromeContextMenus`: `chrome.contextMenus` (`create`, `update`, `remove`, `removeAll`, `onClicked`; normal, checkbox, radio and separator items, `contexts`, `parentId`) drawn by the tray menu model, for the tray icon and a window's context flyout (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#chromecontextmenus-winui-sveltechromecontext-menus)) |
|
|
884
888
|
| `winui-svelte/downloads` | `Downloads`: `chrome.downloads` with the same names and shapes, and `fetchToFile` for `showSaveFilePicker` handles; streamed, resumable, with the Mark of the Web and optional taskbar progress (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#downloads-winui-sveltedownloads)) |
|
|
889
|
+
| `winui-svelte/security` | `protectData`, `unprotectData`, `wipe`: Windows DPAPI with no native addon, the same blobs as .NET `ProtectedData`, for API keys and sessions kept on disk (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#security-winui-sveltesecurity)) |
|
|
890
|
+
| `winui-svelte/progress/core` | The registry, `ProgressOperation`, `trackOperation` and `progressText` of `winui-svelte/progress` without `<TaskbarProgress />`: no Svelte component and no window code, for a tray-only process (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#trays-and-windows-are-independent)) |
|
|
891
|
+
| `winui-svelte/progress` | `ProgressOperation` (a promise, an `EventTarget` with `progress` and `loadend`, and reactive `value`), `ProgressRegistry`, `<TaskbarProgress />`, `trackOperation`; downloads, file reads and your own work report through it, scoped by group per window or tray icon (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#progress-winui-svelteprogress)) |
|
|
885
892
|
| `winui-svelte/chrome/runtime` | `Runtime`: `chrome.runtime` for a native app (manifest, messages and ports between the app's contexts, native messaging hosts, `onInstalled`, `onStartup`, `onSuspend`) (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#chrome-runtime-winui-sveltechromeruntime)) |
|
|
886
893
|
| `winui-svelte/chrome/notifications` | `ChromeNotifications`: `chrome.notifications` (`create`, `update`, `clear`, `getAll`, `getPermissionLevel`, `onClicked`, `onButtonClicked`, `onClosed`; basic, image, list and progress templates, buttons) over the web `Notification`, one notification pipeline (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#chrome-notifications-winui-sveltechromenotifications)) |
|
|
887
894
|
| `winui-svelte/chrome/commands` | `ChromeCommands`: `chrome.commands` (`getAll`, `onCommand`) with `suggested_key` shortcuts as global hotkeys (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#chrome-commands-winui-sveltechromecommands)) |
|
|
@@ -900,9 +907,11 @@ conditions on `exports`), which your Vite compiles (`winuiSvelte()`)
|
|
|
900
907
|
| `winui-svelte/tray/standalone` | `createStandaloneTray`: a notification-area icon and a native popup menu, the model of `winui-svelte/tray/menu` (levels and a user profile when you pass `resolve: resolveMenu`; balloons, `bounds` and a light and dark icon pair when you pass `balloons`, `bounds` and `themedIcon` in `extras`), in a plain Node process, with no window, no WinUI and no components, that starts or signals the full app; `defineTray` for `entrypoints/tray.ts`, or the menu as markup in `entrypoints/tray.svelte`, lowered at build with no Svelte runtime: a tray the build bundles apart so the app never imports it (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#tray-with-no-window-winui-sveltetraystandalone), [entrypoint](https://github.com/avi12/winui-svelte/blob/main/API.md#tray-as-an-entrypoint-entrypointstrayts)) |
|
|
901
908
|
| `winui-svelte/notice` | `showNotice`: a message box with no window or app, for a check that ends a run before it starts (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#notice-with-no-app-winui-sveltenotice)) |
|
|
902
909
|
| `winui-svelte/window/taskbar` | `handle.taskbar`: a progress bar, an overlay icon or badge, flashing and the thumbnail's tooltip and clip on the window's taskbar button, and the unpackaged `setAppBadge` fallback (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#taskbar-button-winui-sveltewindowtaskbar)) |
|
|
910
|
+
| `winui-svelte/window/foreground` | `trackForeground`: which app is in front, event driven, ignoring the shell and the app's own windows, and `bringWindowToFront` for another app's window (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#following-the-foreground-app-winui-sveltewindowforeground)) |
|
|
903
911
|
| `winui-svelte/forms` | `Form`, `FormField` and the attachments that join a control to a form by name, with HTML's constraint validation and zod (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#forms-winui-svelteforms)) |
|
|
904
912
|
| `winui-svelte/store` | `getAppLicense`, `watchLicense`, `checkForUpdates`, `watchPackages`, `getStartupTask`: the Store licence, updates, package events and startup task, answering `hasPackage: false` outside a package (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#store-and-package-winui-sveltestore)) |
|
|
905
913
|
| `winui-svelte/accessibility`, `/accessibility/audit` | `announce` and `liveRegion` say a change to a screen reader (`aria-live`, `role="alert"`) over UI Automation notifications; `auditAccessibility` checks a window for unnamed buttons, unlabeled inputs, duplicate access keys and low contrast (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#accessibility-winui-svelteaccessibility)) |
|
|
914
|
+
| `winui-svelte/automation` | `createUiaWorker` and `withUiaClient` read the exact text and headings of another window over UI Automation (a worker with a hard deadline, so a hung app cannot stall yours); [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#ui-automation-client-winui-svelteautomation) |
|
|
906
915
|
| `winui-svelte/devices`, `/devices/enumeration`, `/devices/input`, `/devices/bluetooth`, `/devices/printers`, `/devices/power`, `/devices/network`, `/devices/audio`, `/devices/display`, `/devices/gamepad`, `/devices/sensors` | device enumeration, input devices, Bluetooth, printers, power, network, displays, audio, gamepads, sensors: Windows' own device APIs as runes (opt-in; [`API.md`](https://github.com/avi12/winui-svelte/blob/main/API.md#windows-devices-winui-sveltedevices)) |
|
|
907
916
|
| `winui-svelte/implicit-layout-animation` | `implicitLayoutAnimation`, `LayoutEasing`: the children of a panel slide to their new places when the layout moves them |
|
|
908
917
|
| `winui-svelte/settings` | `SettingsCard`, `SettingsExpander`: Fluent settings cards after the Community Toolkit's |
|
|
@@ -958,6 +967,11 @@ Stated plainly, so nobody finds them by surprise:
|
|
|
958
967
|
the supported platforms; no entry point does work when imported
|
|
959
968
|
The
|
|
960
969
|
Windows App SDK runtime must be installed; the package does not install it
|
|
970
|
+
- **A window nobody sees is `<Window isParked>`, not `isHidden`.** A hidden
|
|
971
|
+
window is a hidden page: Chromium throttles its timers and audio
|
|
972
|
+
`isParked` shows the window left of the virtual screen as a tool window that
|
|
973
|
+
is never activated, so its page runs at full speed; the position is chosen
|
|
974
|
+
when the window opens, so a display layout change later is not followed
|
|
961
975
|
- **Drag and drop has gaps WinUI leaves.** The `drag` event on a source is
|
|
962
976
|
emulated by a 50 ms timer that reads the cursor (WinUI has none), `setDragImage`
|
|
963
977
|
is accepted but WinUI draws its own preview of the data, `relatedTarget` is
|
|
@@ -1043,6 +1057,12 @@ Stated plainly, so nobody finds them by surprise:
|
|
|
1043
1057
|
- **`WebView2` needs an ordinary desktop session.** A process a sandbox or a
|
|
1044
1058
|
service started cannot launch the browser (error 0x8007139F), and a `data:`
|
|
1045
1059
|
URL cannot be the top frame
|
|
1060
|
+
- **One process folder, unless a control brings its own.** `WebView2` starts in
|
|
1061
|
+
the folder `initWindowsAppSdk` sets through `WEBVIEW2_USER_DATA_FOLDER`, with
|
|
1062
|
+
no Chromium switches; two profiles or switches in one process need
|
|
1063
|
+
`createWebView2Environment` and `startWebView2` first, and the app must start
|
|
1064
|
+
with `webViewUserDataFolder: false`, since the variable overrides the folder
|
|
1065
|
+
of an environment
|
|
1046
1066
|
- **Win2D effects on an element are built, not seen.** `applyEffect` puts a
|
|
1047
1067
|
Win2D effect on an element as a Composition effect brush, but nothing reads
|
|
1048
1068
|
pixels back from Composition without a screen capture, so only the drawing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activate.d.ts","sourceRoot":"","sources":["../../src/app/activate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"activate.d.ts","sourceRoot":"","sources":["../../src/app/activate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAOhD,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,qBAAqB;IACrB,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAEvC,yDAAyD;IACzD,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CACpC;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,IAAS,EAAE,gBAAgC,EAAE,EAAE,aAAa,QAU3G;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE;IACpD,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,UAAU,CAAC;CACxB,oBAcA;AAED;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE;IAClE,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,UAAU,CAAC;IACvB,MAAM,EAAE,aAAa,CAAC;CACvB,oBAWA"}
|
package/dist/app/activate.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { currentUserSid, pipeNameFor } from "./instance-pipe.js";
|
|
2
2
|
import { encodeRedirect } from "./redirect.js";
|
|
3
|
+
import { allowForeground } from "../win32-foreground.js";
|
|
3
4
|
import { spawn } from "node:child_process";
|
|
4
5
|
import net from "node:net";
|
|
5
6
|
const CONNECT_TIMEOUT_MILLISECONDS = 2000;
|
|
@@ -10,6 +11,7 @@ const CONNECT_TIMEOUT_MILLISECONDS = 2000;
|
|
|
10
11
|
* @param options - The program, its arguments and its folder.
|
|
11
12
|
*/
|
|
12
13
|
export function launchApp({ command, arguments: args = [], workingDirectory = process.cwd() }) {
|
|
14
|
+
allowForeground();
|
|
13
15
|
const child = spawn(command, args, {
|
|
14
16
|
cwd: workingDirectory,
|
|
15
17
|
detached: true,
|
|
@@ -29,6 +31,7 @@ export function launchApp({ command, arguments: args = [], workingDirectory = pr
|
|
|
29
31
|
* @returns True when a running copy took it, false when none runs.
|
|
30
32
|
*/
|
|
31
33
|
export function activateInstance({ key, activation }) {
|
|
34
|
+
allowForeground();
|
|
32
35
|
const line = encodeRedirect(activation);
|
|
33
36
|
const pipeName = pipeNameFor({
|
|
34
37
|
key,
|
package/dist/app/activate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activate.js","sourceRoot":"","sources":["../../src/app/activate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,GAAG,MAAM,UAAU,CAAC;AAE3B,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAc1C;;;;;GAKG;AACH,MAAM,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,EAGjD;IACC,eAAe,EAAE,CAAC;IAClB,MAAM,IAAI,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,WAAW,CAAC;QAC3B,GAAG;QACH,GAAG,EAAE,cAAc,EAAE;KACtB,CAAC,CAAC;IACH,OAAO,IAAI,OAAO,CAAU,OAAO,CAAC,EAAE;QACpC,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QACrC,MAAM,CAAC,UAAU,CAAC,4BAA4B,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QACxE,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC;QACpD,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QACzC,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,EAI/D;IACC,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC;QACvC,GAAG;QACH,UAAU;KACX,CAAC,CAAC;IACH,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,MAAM,CAAC,CAAC;IAClB,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -8,4 +8,7 @@ export { getLaunchAtLogin, launchAtLogin, registerFileTypes, unregisterFileTypes
|
|
|
8
8
|
export { installProtocolHandlers } from "./protocol-handlers.js";
|
|
9
9
|
export type { ActivationOptions } from "./receive.js";
|
|
10
10
|
export { startActivation } from "./receive.js";
|
|
11
|
+
export type { PackagedActivation } from "./packaged.js";
|
|
12
|
+
export { packagedActivation } from "./packaged.js";
|
|
13
|
+
export { createWindowsRegistry } from "./native.js";
|
|
11
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app/activation/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpL,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/app/activation/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpL,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -2,4 +2,6 @@ export { ActivationKind } from "./kinds.js";
|
|
|
2
2
|
export { getLaunchAtLogin, launchAtLogin, registerFileTypes, unregisterFileTypes } from "./login.js";
|
|
3
3
|
export { installProtocolHandlers } from "./protocol-handlers.js";
|
|
4
4
|
export { startActivation } from "./receive.js";
|
|
5
|
+
export { packagedActivation } from "./packaged.js";
|
|
6
|
+
export { createWindowsRegistry } from "./native.js";
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/activation/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAK5C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/app/activation/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAK5C,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -31,7 +31,8 @@ export declare function unregisterFileTypes(options: Pick<RegistrationOptions, "
|
|
|
31
31
|
* per-user Run key; Windows lists it under Settings, Apps, Startup. The start
|
|
32
32
|
* reaches the app as a `startup` activation.
|
|
33
33
|
*
|
|
34
|
-
* @param options - A name for the entry (letters, digits, `.`, `_`, `-`
|
|
34
|
+
* @param options - A name for the entry (letters, digits, `.`, `_`, `-` and spaces
|
|
35
|
+
* inside, such as `Cyber Journeys`),
|
|
35
36
|
* whether it should exist, extra arguments, and the registry and command
|
|
36
37
|
* for a test or a bundled app.
|
|
37
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/app/activation/login.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAUxD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,GAAG;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,QAKA;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,GAAG;IACnF,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,YAKA;AAED
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../src/app/activation/login.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAUxD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,GAAG;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,QAKA;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,GAAG;IACnF,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,YAKA;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,mBAAmB,GAAG;IAC3D,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC/B,QAaA;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;;;EAK/F"}
|
|
@@ -36,7 +36,8 @@ export function unregisterFileTypes(options) {
|
|
|
36
36
|
* per-user Run key; Windows lists it under Settings, Apps, Startup. The start
|
|
37
37
|
* reaches the app as a `startup` activation.
|
|
38
38
|
*
|
|
39
|
-
* @param options - A name for the entry (letters, digits, `.`, `_`, `-`
|
|
39
|
+
* @param options - A name for the entry (letters, digits, `.`, `_`, `-` and spaces
|
|
40
|
+
* inside, such as `Cyber Journeys`),
|
|
40
41
|
* whether it should exist, extra arguments, and the registry and command
|
|
41
42
|
* for a test or a bundled app.
|
|
42
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/app/activation/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAIjC;IACC,YAAY,CAAC;QACX,GAAG,OAAO;QACV,GAAG,SAAS,CAAC,OAAO,CAAC;KACtB,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAGnC;IACC,OAAO,eAAe,CAAC;QACrB,GAAG,OAAO;QACV,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,qBAAqB,EAAE;KACtD,CAAC,CAAC;AACL,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/app/activation/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAIjC;IACC,YAAY,CAAC;QACX,GAAG,OAAO;QACV,GAAG,SAAS,CAAC,OAAO,CAAC;KACtB,CAAC,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAGnC;IACC,OAAO,eAAe,CAAC;QACrB,GAAG,OAAO;QACV,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,qBAAqB,EAAE;KACtD,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,OAI7B;IACC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QACvB,oBAAoB,CAAC;YACnB,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,qBAAqB,EAAE;SACtD,CAAC,CAAC;QACH,OAAO;IACT,CAAC;IAED,mBAAmB,CAAC;QAClB,GAAG,OAAO;QACV,GAAG,SAAS,CAAC,OAAO,CAAC;KACtB,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAA+D;IAC9F,OAAO,iBAAiB,CAAC;QACvB,GAAG,OAAO;QACV,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,qBAAqB,EAAE;KACtD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DynWin32, DynWin32Unsafe } from "@microsoft/dynwinrt/win32/unsafe";
|
|
2
|
-
import { bind, numberOf, pointerOf, WIDE_CHAR_BYTES, wideMemory, withMemory } from "../../win32-calls.js";
|
|
2
|
+
import { bind, DWORD_BYTES, numberOf, pointerOf, WIDE_CHAR_BYTES, wideMemory, withMemory } from "../../win32-calls.js";
|
|
3
3
|
// The per-user registry hive (HKEY_CURRENT_USER) as the activation
|
|
4
4
|
// registrations use it. The hive is fixed here: nothing in the package can
|
|
5
5
|
// reach HKEY_LOCAL_MACHINE, which would need an administrator and change the
|
|
@@ -12,7 +12,6 @@ const KEY_READ = 0x2_0019;
|
|
|
12
12
|
const ERROR_SUCCESS = 0;
|
|
13
13
|
const ERROR_FILE_NOT_FOUND = 2;
|
|
14
14
|
const MAX_VALUE_BYTES = 65_536;
|
|
15
|
-
const DWORD_BYTES = 4;
|
|
16
15
|
const HANDLE_BYTES = 8;
|
|
17
16
|
const DATA_OFFSET = 8;
|
|
18
17
|
const QUERY_INFO_PARAMETERS = 12;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.js","sourceRoot":"","sources":["../../../src/app/activation/native.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,EACL,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,EACX,MAAM,qBAAqB,CAAC;AAE7B,mEAAmE;AACnE,2EAA2E;AAC3E,6EAA6E;AAC7E,0BAA0B;AAE1B,kFAAkF;AAClF,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,MAAM,GAAG,CAAC,CAAC;AACjB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAC1B,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,eAAe,GAAG,MAAM,CAAC;AAC/B,MAAM,
|
|
1
|
+
{"version":3,"file":"native.js","sourceRoot":"","sources":["../../../src/app/activation/native.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAE5E,OAAO,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,EACX,MAAM,qBAAqB,CAAC;AAE7B,mEAAmE;AACnE,2EAA2E;AAC3E,6EAA6E;AAC7E,0BAA0B;AAE1B,kFAAkF;AAClF,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAC9C,MAAM,MAAM,GAAG,CAAC,CAAC;AACjB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,QAAQ,GAAG,QAAQ,CAAC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AAgB;iBAC5B,CAAC;aACH,CAAC,CAAC;QACL,CAAC;QACD,WAAW,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE;YACvB,QAAQ,CAAC;gBACP,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC;oBACtB,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC;oBACtB,GAAG,EAAE,SAAS,CAAC,EAAE,CAAC,uBAAuB,CAAC;wBACxC,IAAI,EAAE,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;wBAC7D,SAAS,EAAE,oBAAoB;qBAChC,CAAC;iBACH,CAAC;aACH,CAAC,CAAC;QACL,CAAC;QACD,gBAAgB,CAAC,GAAG;YAClB,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;YAC/B,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,OAAO,KAAK,CAAC;YACf,CAAC;YAED,QAAQ,CAAC;gBACP,IAAI,EAAE,GAAG;gBACT,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC,cAAc,CAAC;oBAC5B,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;oBAChD,SAAS,EAAE,eAAe;iBAC3B,CAAC;aACH,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;QACd,CAAC;KACwB,CAAC;AAC9B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ActivationKind } from "./kinds.js";
|
|
2
|
+
/** How Windows started this packaged process. */
|
|
3
|
+
export interface PackagedActivation {
|
|
4
|
+
/** `protocol` or `startup`: the only two the Windows App SDK reports that this package turns into an event. */
|
|
5
|
+
readonly kind: typeof ActivationKind.protocol | typeof ActivationKind.startup;
|
|
6
|
+
/** The address, for a `protocol` activation. */
|
|
7
|
+
readonly uri?: string;
|
|
8
|
+
}
|
|
9
|
+
/** What `AppInstance.getActivatedEventArgs()` answers: its `kind` and `data`. */
|
|
10
|
+
export interface ActivationArgumentsSource {
|
|
11
|
+
readonly kind: number;
|
|
12
|
+
readonly data: unknown;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Reads how Windows started this packaged process from the Windows App SDK's
|
|
16
|
+
* activation arguments: the address of a protocol activation, or that a
|
|
17
|
+
* startup task started it (a startup task passes no command line argument).
|
|
18
|
+
* Anything else, a `data` that is not a protocol payload and any failure give
|
|
19
|
+
* `undefined`; it never throws.
|
|
20
|
+
*
|
|
21
|
+
* @param options - Where the activation arguments come from; the process's own
|
|
22
|
+
* `AppInstance` when omitted. It is not called without a package identity.
|
|
23
|
+
* @returns The activation, or `undefined` outside a package, for a plain
|
|
24
|
+
* launch and when it cannot be read.
|
|
25
|
+
*/
|
|
26
|
+
export declare function packagedActivation({ read }?: {
|
|
27
|
+
read?: () => ActivationArgumentsSource | undefined;
|
|
28
|
+
}): {
|
|
29
|
+
kind: "startup";
|
|
30
|
+
uri?: never;
|
|
31
|
+
} | {
|
|
32
|
+
kind: "protocol";
|
|
33
|
+
uri: string;
|
|
34
|
+
} | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Adds what the packaged start carried to the command line the first copy
|
|
37
|
+
* received, so one classifier reads both: a startup task becomes the marker
|
|
38
|
+
* argument, and an address is appended unless the command line already holds
|
|
39
|
+
* it (a manifest `Parameters=""%1""` puts it there), so the
|
|
40
|
+
* command line's own address always wins.
|
|
41
|
+
*
|
|
42
|
+
* @param options - The command line and the packaged activation.
|
|
43
|
+
* @returns The command line to classify.
|
|
44
|
+
*/
|
|
45
|
+
export declare function withPackagedActivation({ values, packaged }: {
|
|
46
|
+
values: readonly string[];
|
|
47
|
+
packaged: PackagedActivation | undefined;
|
|
48
|
+
}): readonly string[];
|
|
49
|
+
//# sourceMappingURL=packaged.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packaged.d.ts","sourceRoot":"","sources":["../../../src/app/activation/packaged.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAsB5C,iDAAiD;AACjD,MAAM,WAAW,kBAAkB;IACjC,+GAA+G;IAC/G,QAAQ,CAAC,IAAI,EAAE,OAAO,cAAc,CAAC,QAAQ,GAAG,OAAO,cAAc,CAAC,OAAO,CAAC;IAE9E,gDAAgD;IAChD,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,iFAAiF;AACjF,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB;AAmBD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,IAAuB,EAAE,GAAE;IAC9D,IAAI,CAAC,EAAE,MAAM,yBAAyB,GAAG,SAAS,CAAC;CAC/C;;;;;;cAqBL;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE;IAC3D,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,kBAAkB,GAAG,SAAS,CAAC;CAC1C,qBAaA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ActivationKind } from "./kinds.js";
|
|
2
|
+
import { STARTUP_ARGUMENT } from "./registration.js";
|
|
3
|
+
import { roInitialize } from "@microsoft/dynwinrt";
|
|
4
|
+
import { call } from "../../renderer/host/reflect.js";
|
|
5
|
+
import { hasPackageIdentity } from "../../window/package-identity.js";
|
|
6
|
+
import { AppInstance } from "#winui/microsoft/windows/app-lifecycle/AppInstance";
|
|
7
|
+
import { ExtendedActivationKind } from "#winui/microsoft/windows/app-lifecycle/ExtendedActivationKind";
|
|
8
|
+
import { ProtocolActivatedEventArgs } from "#winui/windows/application-model/activation/ProtocolActivatedEventArgs";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
// `ExtendedActivationKind` of the Windows App SDK to the one kind of this
|
|
11
|
+
// package it stands for; every other value is not an activation this package
|
|
12
|
+
// reports.
|
|
13
|
+
const kindsByExtendedKind = new Map([
|
|
14
|
+
[ExtendedActivationKind.Protocol, ActivationKind.protocol],
|
|
15
|
+
[ExtendedActivationKind.StartupTask, ActivationKind.startup]
|
|
16
|
+
]);
|
|
17
|
+
// The one field of ProtocolActivatedEventArgs this package reads: its Uri's
|
|
18
|
+
// original text, as the caller wrote it.
|
|
19
|
+
const protocolDataSchema = z.object({ uri: z.object({ rawUri: z.string() }) });
|
|
20
|
+
// What `projectAs` calls on the class: `data` is a bare WinRT object, whatever the activation kind.
|
|
21
|
+
const PROJECT_DATA = "_fromNativeBorrowed";
|
|
22
|
+
function readOwnArguments() {
|
|
23
|
+
if (!hasPackageIdentity()) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
roInitialize();
|
|
27
|
+
const { kind, data } = AppInstance.getCurrent().getActivatedEventArgs();
|
|
28
|
+
const isProtocol = kind === ExtendedActivationKind.Protocol && data !== null;
|
|
29
|
+
return {
|
|
30
|
+
kind,
|
|
31
|
+
data: isProtocol ? call(ProtocolActivatedEventArgs, PROJECT_DATA, data) : data
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Reads how Windows started this packaged process from the Windows App SDK's
|
|
36
|
+
* activation arguments: the address of a protocol activation, or that a
|
|
37
|
+
* startup task started it (a startup task passes no command line argument).
|
|
38
|
+
* Anything else, a `data` that is not a protocol payload and any failure give
|
|
39
|
+
* `undefined`; it never throws.
|
|
40
|
+
*
|
|
41
|
+
* @param options - Where the activation arguments come from; the process's own
|
|
42
|
+
* `AppInstance` when omitted. It is not called without a package identity.
|
|
43
|
+
* @returns The activation, or `undefined` outside a package, for a plain
|
|
44
|
+
* launch and when it cannot be read.
|
|
45
|
+
*/
|
|
46
|
+
export function packagedActivation({ read = readOwnArguments } = {}) {
|
|
47
|
+
try {
|
|
48
|
+
const source = read();
|
|
49
|
+
const kind = source === undefined ? undefined : kindsByExtendedKind.get(source.kind);
|
|
50
|
+
const isStartup = kind === ActivationKind.startup;
|
|
51
|
+
if (isStartup) {
|
|
52
|
+
return { kind };
|
|
53
|
+
}
|
|
54
|
+
const isProtocol = source !== undefined && kind === ActivationKind.protocol;
|
|
55
|
+
const parsed = isProtocol ? protocolDataSchema.safeParse(source.data) : undefined;
|
|
56
|
+
const hasUri = parsed?.success === true;
|
|
57
|
+
return hasUri
|
|
58
|
+
? {
|
|
59
|
+
kind: ActivationKind.protocol,
|
|
60
|
+
uri: parsed.data.uri.rawUri
|
|
61
|
+
}
|
|
62
|
+
: undefined;
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Adds what the packaged start carried to the command line the first copy
|
|
70
|
+
* received, so one classifier reads both: a startup task becomes the marker
|
|
71
|
+
* argument, and an address is appended unless the command line already holds
|
|
72
|
+
* it (a manifest `Parameters=""%1""` puts it there), so the
|
|
73
|
+
* command line's own address always wins.
|
|
74
|
+
*
|
|
75
|
+
* @param options - The command line and the packaged activation.
|
|
76
|
+
* @returns The command line to classify.
|
|
77
|
+
*/
|
|
78
|
+
export function withPackagedActivation({ values, packaged }) {
|
|
79
|
+
const isPackaged = packaged !== undefined;
|
|
80
|
+
if (!isPackaged) {
|
|
81
|
+
return values;
|
|
82
|
+
}
|
|
83
|
+
const isStartup = packaged.kind === ActivationKind.startup;
|
|
84
|
+
if (isStartup) {
|
|
85
|
+
return [...values, STARTUP_ARGUMENT];
|
|
86
|
+
}
|
|
87
|
+
const isNew = packaged.uri !== undefined && !values.includes(packaged.uri);
|
|
88
|
+
return isNew ? [...values, packaged.uri] : values;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=packaged.js.map
|
|
@@ -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AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,sBAAsB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAGxD;IACC,MAAM,UAAU,GAAG,QAAQ,KAAK,SAAS,CAAC;IAC1C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,SAAS,GAAG,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO,CAAC;IAC3D,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CAAC,GAAG,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC3E,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;AACpD,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ActivationEvent } from "./kinds.js";
|
|
2
|
+
import type { PackagedActivation } from "./packaged.js";
|
|
2
3
|
import type { Activation, SingleInstance, SingleInstanceOptions } from "../single-instance.js";
|
|
3
4
|
/** What `startActivation` takes. */
|
|
4
5
|
export interface ActivationOptions {
|
|
@@ -25,6 +26,11 @@ export interface ActivationOptions {
|
|
|
25
26
|
readonly onError?: (error: unknown) => void;
|
|
26
27
|
/** This copy's own command line without the program; `process.argv` minus the first two entries by default. */
|
|
27
28
|
readonly initialArguments?: readonly string[];
|
|
29
|
+
/**
|
|
30
|
+
* How Windows started this packaged process, read once for this copy's own
|
|
31
|
+
* start (see `packagedActivation`); the Windows App SDK's by default.
|
|
32
|
+
*/
|
|
33
|
+
readonly packaged?: () => PackagedActivation | undefined;
|
|
28
34
|
/** Stands in for `ensureSingleInstance`; the tests give one. */
|
|
29
35
|
readonly claim?: (options: SingleInstanceOptions) => SingleInstance;
|
|
30
36
|
}
|
|
@@ -36,8 +42,11 @@ export interface ActivationOptions {
|
|
|
36
42
|
* `isPrimary` is false) and gets no event; the first copy gets one for it.
|
|
37
43
|
* An `alarm` activation also reaches the `onAlarm` listeners and a `startup`
|
|
38
44
|
* one the `onStartup` listeners of `winui-svelte/app/schedule`, before
|
|
39
|
-
* `onActivation`.
|
|
40
|
-
*
|
|
45
|
+
* `onActivation`. In a packaged app this copy's own start also reads the Windows
|
|
46
|
+
* App SDK's activation: a protocol address the command line lacks, and a
|
|
47
|
+
* startup task (which passes no argument), become the same events. Events
|
|
48
|
+
* arrive in order, one at a time. Nothing is registered with Windows here;
|
|
49
|
+
* see `installProtocolHandlers`, `registerFileTypes` and `launchAtLogin`.
|
|
41
50
|
*
|
|
42
51
|
* @param options - The key, the listener and what to bring along.
|
|
43
52
|
* @returns Whether this copy is the first one, and how to stop listening.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receive.d.ts","sourceRoot":"","sources":["../../../src/app/activation/receive.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"receive.d.ts","sourceRoot":"","sources":["../../../src/app/activation/receive.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAGxD,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAErG,oCAAoC;AACpC,MAAM,WAAW,iBAAiB;IAChC,mEAAmE;IACnE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAErB,iGAAiG;IACjG,QAAQ,CAAC,YAAY,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,OAAO,CAAC;IAE3D,0FAA0F;IAC1F,QAAQ,CAAC,MAAM,CAAC,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IAElD;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAExC;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE;QACrB,iBAAiB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC;KACpD,CAAC;IAEF,gGAAgG;IAChG,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAE5C,+GAA+G;IAC/G,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAE9C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,kBAAkB,GAAG,SAAS,CAAC;IAEzD,gEAAgE;IAChE,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,qBAAqB,KAAK,cAAc,CAAC;CACrE;AAaD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,kBA4DzD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { classifyActivation } from "./classify.js";
|
|
2
2
|
import { ActivationKind } from "./kinds.js";
|
|
3
|
+
import { packagedActivation, withPackagedActivation } from "./packaged.js";
|
|
3
4
|
import { dispatchAlarm, dispatchStartup } from "../schedule/events.js";
|
|
4
5
|
import { ensureSingleInstance } from "../single-instance.js";
|
|
5
6
|
function extensionSetOf(extensions) {
|
|
@@ -19,14 +20,17 @@ function rethrowLater(error) {
|
|
|
19
20
|
* `isPrimary` is false) and gets no event; the first copy gets one for it.
|
|
20
21
|
* An `alarm` activation also reaches the `onAlarm` listeners and a `startup`
|
|
21
22
|
* one the `onStartup` listeners of `winui-svelte/app/schedule`, before
|
|
22
|
-
* `onActivation`.
|
|
23
|
-
*
|
|
23
|
+
* `onActivation`. In a packaged app this copy's own start also reads the Windows
|
|
24
|
+
* App SDK's activation: a protocol address the command line lacks, and a
|
|
25
|
+
* startup task (which passes no argument), become the same events. Events
|
|
26
|
+
* arrive in order, one at a time. Nothing is registered with Windows here;
|
|
27
|
+
* see `installProtocolHandlers`, `registerFileTypes` and `launchAtLogin`.
|
|
24
28
|
*
|
|
25
29
|
* @param options - The key, the listener and what to bring along.
|
|
26
30
|
* @returns Whether this copy is the first one, and how to stop listening.
|
|
27
31
|
*/
|
|
28
32
|
export function startActivation(options) {
|
|
29
|
-
const { onActivation, launchQueue, onError = rethrowLater, claim = ensureSingleInstance } = options;
|
|
33
|
+
const { onActivation, launchQueue, onError = rethrowLater, claim = ensureSingleInstance, packaged = packagedActivation } = options;
|
|
30
34
|
const extensions = extensionSetOf(options.extensions);
|
|
31
35
|
let tail = Promise.resolve();
|
|
32
36
|
function deliver({ activation, isRedirect }) {
|
|
@@ -61,7 +65,10 @@ export function startActivation(options) {
|
|
|
61
65
|
if (single.isPrimary) {
|
|
62
66
|
deliver({
|
|
63
67
|
activation: {
|
|
64
|
-
arguments: [...
|
|
68
|
+
arguments: [...withPackagedActivation({
|
|
69
|
+
values: options.initialArguments ?? process.argv.slice(2),
|
|
70
|
+
packaged: packaged()
|
|
71
|
+
})],
|
|
65
72
|
workingDirectory: process.cwd()
|
|
66
73
|
},
|
|
67
74
|
isRedirect: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receive.js","sourceRoot":"","sources":["../../../src/app/activation/receive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"receive.js","sourceRoot":"","sources":["../../../src/app/activation/receive.ts"],"names":[],"mappings":"AAAA,OAAO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C;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -87,7 +87,7 @@ export declare function removeFileTypes({ id, extensions, registry }: Pick<Regis
|
|
|
87
87
|
* can tell a start at sign-in from a start by hand.
|
|
88
88
|
*
|
|
89
89
|
* @param options - The entry's name, extra arguments and the registry and command.
|
|
90
|
-
* @throws {TypeError} For an `id` that is not
|
|
90
|
+
* @throws {TypeError} For an `id` that is not a startup name.
|
|
91
91
|
*/
|
|
92
92
|
export declare function enableLaunchAtLogin({ id, arguments: extra, registry, command }: RegistrationContext & {
|
|
93
93
|
id: string;
|
|
@@ -97,7 +97,7 @@ export declare function enableLaunchAtLogin({ id, arguments: extra, registry, co
|
|
|
97
97
|
* Removes the app's entry from the per-user Run key.
|
|
98
98
|
*
|
|
99
99
|
* @param options - The entry's name and the registry.
|
|
100
|
-
* @throws {TypeError} For an `id` that is not
|
|
100
|
+
* @throws {TypeError} For an `id` that is not a startup name.
|
|
101
101
|
*/
|
|
102
102
|
export declare function disableLaunchAtLogin({ id, registry }: Pick<RegistrationContext, "registry"> & {
|
|
103
103
|
id: string;
|
|
@@ -107,7 +107,7 @@ export declare function disableLaunchAtLogin({ id, registry }: Pick<Registration
|
|
|
107
107
|
*
|
|
108
108
|
* @param options - The entry's name and the registry.
|
|
109
109
|
* @returns Whether it exists and what it runs.
|
|
110
|
-
* @throws {TypeError} For an `id` that is not
|
|
110
|
+
* @throws {TypeError} For an `id` that is not a startup name.
|
|
111
111
|
*/
|
|
112
112
|
export declare function readLaunchAtLogin({ id, registry }: Pick<RegistrationContext, "registry"> & {
|
|
113
113
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { commandLineOf } from "./command.js";
|
|
2
|
-
import { normalizeExtension, normalizeScheme, requireIdentifier } from "./scheme.js";
|
|
2
|
+
import { normalizeExtension, normalizeScheme, requireIdentifier, requireStartupName } from "./scheme.js";
|
|
3
3
|
import { DomErrorName, domException } from "../../web-apis/dom-exception.js";
|
|
4
4
|
// What the package writes under HKEY_CURRENT_USER so that Windows starts the
|
|
5
5
|
// app: the protocol and file type classes, and the startup entry. Every key
|
|
@@ -204,12 +204,12 @@ export function removeFileTypes({ id, extensions, registry }) {
|
|
|
204
204
|
* can tell a start at sign-in from a start by hand.
|
|
205
205
|
*
|
|
206
206
|
* @param options - The entry's name, extra arguments and the registry and command.
|
|
207
|
-
* @throws {TypeError} For an `id` that is not
|
|
207
|
+
* @throws {TypeError} For an `id` that is not a startup name.
|
|
208
208
|
*/
|
|
209
209
|
export function enableLaunchAtLogin({ id, arguments: extra = [], registry, command }) {
|
|
210
210
|
registry.setString({
|
|
211
211
|
key: RUN_KEY,
|
|
212
|
-
name:
|
|
212
|
+
name: requireStartupName(id),
|
|
213
213
|
value: commandLineOf({
|
|
214
214
|
command,
|
|
215
215
|
extra: [STARTUP_ARGUMENT, ...extra]
|
|
@@ -220,12 +220,12 @@ export function enableLaunchAtLogin({ id, arguments: extra = [], registry, comma
|
|
|
220
220
|
* Removes the app's entry from the per-user Run key.
|
|
221
221
|
*
|
|
222
222
|
* @param options - The entry's name and the registry.
|
|
223
|
-
* @throws {TypeError} For an `id` that is not
|
|
223
|
+
* @throws {TypeError} For an `id` that is not a startup name.
|
|
224
224
|
*/
|
|
225
225
|
export function disableLaunchAtLogin({ id, registry }) {
|
|
226
226
|
registry.deleteValue({
|
|
227
227
|
key: RUN_KEY,
|
|
228
|
-
name:
|
|
228
|
+
name: requireStartupName(id)
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
/**
|
|
@@ -233,12 +233,12 @@ export function disableLaunchAtLogin({ id, registry }) {
|
|
|
233
233
|
*
|
|
234
234
|
* @param options - The entry's name and the registry.
|
|
235
235
|
* @returns Whether it exists and what it runs.
|
|
236
|
-
* @throws {TypeError} For an `id` that is not
|
|
236
|
+
* @throws {TypeError} For an `id` that is not a startup name.
|
|
237
237
|
*/
|
|
238
238
|
export function readLaunchAtLogin({ id, registry }) {
|
|
239
239
|
const commandLine = registry.readString({
|
|
240
240
|
key: RUN_KEY,
|
|
241
|
-
name:
|
|
241
|
+
name: requireStartupName(id)
|
|
242
242
|
});
|
|
243
243
|
return {
|
|
244
244
|
isEnabled: commandLine !== undefined,
|