@eclipse-docks/extension-pwa 0.7.136 → 0.7.139
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/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ extensionRegistry.registerExtension({
|
|
|
10
10
|
id: pkg.name,
|
|
11
11
|
name: t.EXT_PWA_NAME,
|
|
12
12
|
description: t.EXT_PWA_DESC,
|
|
13
|
-
loader: () => import("./pwa-extension-
|
|
13
|
+
loader: () => import("./pwa-extension-B0y8RpX6.js"),
|
|
14
14
|
icon: "download"
|
|
15
15
|
});
|
|
16
16
|
//#endregion
|
|
@@ -180,6 +180,7 @@ var DocksSwUpdateIndicator = class DocksSwUpdateIndicator extends DocksElement {
|
|
|
180
180
|
return html`
|
|
181
181
|
<wa-button
|
|
182
182
|
variant="brand"
|
|
183
|
+
appearance="plain"
|
|
183
184
|
title="A new version is available. Click to update."
|
|
184
185
|
aria-label="Update available. Click to reload with the latest version."
|
|
185
186
|
@click=${this.onActivateClick}
|
|
@@ -273,4 +274,4 @@ contributionRegistry.registerContribution(TOOLBAR_MAIN_CENTER, {
|
|
|
273
274
|
});
|
|
274
275
|
//#endregion
|
|
275
276
|
|
|
276
|
-
//# sourceMappingURL=pwa-extension-
|
|
277
|
+
//# sourceMappingURL=pwa-extension-B0y8RpX6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pwa-extension-B0y8RpX6.js","names":[],"sources":["../src/sw-update-indicator.ts","../src/pwa-install-button.ts","../src/pwa-extension.ts"],"sourcesContent":["import { html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\n\nimport { DocksElement } from '@eclipse-docks/core';\n\ntype SwUpdateProgressMessage = {\n type: 'SW_UPDATE_PROGRESS';\n completed: number;\n total: number;\n done?: boolean;\n currentFile?: string;\n};\n\n/**\n * Shows a toolbar button when a new service worker is waiting (vite-plugin-pwa injectManifest + SKIP_WAITING message).\n * Displays download progress while the worker installs; then a brand \"Update Available\" button to activate it.\n * Hidden when there is no update or when service workers are unavailable.\n *\n * Safe when the extension loads late: attaches via `getRegistration()`, reads `registration.waiting`,\n * and subscribes to `updatefound` for subsequent updates.\n */\n@customElement('docks-sw-update-indicator')\nexport class DocksSwUpdateIndicator extends DocksElement {\n @state()\n private updateAvailable = false;\n @state()\n private updateProgress = 0;\n @state()\n private updateProgressVisible = false;\n @state()\n private updateCurrentFile = '';\n\n private pendingReload = false;\n private registration: ServiceWorkerRegistration | null = null;\n private periodicInterval: number | null = null;\n private pollInterval: number | null = null;\n private pollAttempts = 0;\n private attachAbort: AbortController | null = null;\n\n private readonly onControllerChange = (): void => {\n if (!this.pendingReload) {\n return;\n }\n window.location.reload();\n };\n\n private readonly onServiceWorkerMessage = (event: MessageEvent): void => {\n const data = event.data as SwUpdateProgressMessage | undefined;\n if (!data || data.type !== 'SW_UPDATE_PROGRESS') {\n return;\n }\n if (data.total <= 0) {\n return;\n }\n const ratio = Math.max(0, Math.min(1, data.completed / data.total));\n this.updateProgress = ratio;\n this.updateProgressVisible = !this.updateAvailable && !data.done && ratio < 1;\n this.updateCurrentFile = this.toDisplayFileName(data.currentFile);\n };\n\n private toDisplayFileName(pathname?: string): string {\n if (!pathname) {\n return '';\n }\n const normalized = pathname.split('?')[0].split('#')[0];\n const raw = normalized.split('/').filter(Boolean).at(-1) ?? normalized;\n if (!raw) {\n return '';\n }\n const decoded = decodeURIComponent(raw);\n if (decoded.length <= 32) {\n return decoded;\n }\n return `${decoded.slice(0, 29)}...`;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (!('serviceWorker' in navigator)) {\n return;\n }\n navigator.serviceWorker.addEventListener('controllerchange', this.onControllerChange);\n navigator.serviceWorker.addEventListener('message', this.onServiceWorkerMessage);\n void this.findOrAttachRegistration();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n navigator.serviceWorker.removeEventListener('controllerchange', this.onControllerChange);\n navigator.serviceWorker.removeEventListener('message', this.onServiceWorkerMessage);\n this.teardownAttachment();\n }\n\n private async findOrAttachRegistration(): Promise<void> {\n const existing = await navigator.serviceWorker.getRegistration();\n if (existing) {\n this.attach(existing);\n return;\n }\n\n this.pollInterval = window.setInterval(async () => {\n this.pollAttempts += 1;\n const reg = await navigator.serviceWorker.getRegistration();\n if (reg) {\n this.clearPoll();\n this.attach(reg);\n return;\n }\n if (this.pollAttempts >= 30) {\n this.clearPoll();\n }\n }, 1000);\n }\n\n private clearPoll(): void {\n if (this.pollInterval !== null) {\n window.clearInterval(this.pollInterval);\n this.pollInterval = null;\n }\n }\n\n private teardownAttachment(): void {\n this.clearPoll();\n if (this.periodicInterval !== null) {\n window.clearInterval(this.periodicInterval);\n this.periodicInterval = null;\n }\n this.attachAbort?.abort();\n this.attachAbort = null;\n this.registration = null;\n this.updateAvailable = false;\n this.updateProgress = 0;\n this.updateProgressVisible = false;\n this.updateCurrentFile = '';\n }\n\n /**\n * Show only when a new worker is waiting and an older version is already controlling\n * the page (real update). Avoid treating the first install as an “update”.\n */\n private syncUpdateState(registration: ServiceWorkerRegistration): void {\n const waiting = Boolean(registration.waiting);\n const hasActiveController = Boolean(navigator.serviceWorker.controller);\n this.updateAvailable = waiting && hasActiveController;\n if (this.updateAvailable) {\n this.updateProgress = 1;\n this.updateProgressVisible = false;\n this.updateCurrentFile = '';\n }\n }\n\n private readonly onUpdateFound = (): void => {\n const registration = this.registration;\n if (!registration) {\n return;\n }\n // Fast installs (common in standalone PWA): worker may already be `waiting` when\n // this runs, with `installing` already null — still an update if a controller exists.\n this.syncUpdateState(registration);\n\n const installing = registration.installing;\n if (!installing) {\n return;\n }\n if (navigator.serviceWorker.controller) {\n this.updateProgress = 0;\n this.updateProgressVisible = true;\n this.updateCurrentFile = '';\n }\n const signal = this.attachAbort?.signal;\n if (!signal) {\n return;\n }\n installing.addEventListener(\n 'statechange',\n () => {\n if (installing.state === 'redundant') {\n this.updateProgress = 0;\n this.updateProgressVisible = false;\n this.updateCurrentFile = '';\n return;\n }\n if (installing.state !== 'installed') {\n return;\n }\n if (!navigator.serviceWorker.controller) {\n return;\n }\n this.syncUpdateState(registration);\n },\n { signal },\n );\n };\n\n private attach(registration: ServiceWorkerRegistration): void {\n if (this.registration === registration) {\n return;\n }\n this.attachAbort?.abort();\n this.attachAbort = new AbortController();\n const signal = this.attachAbort.signal;\n\n this.registration = registration;\n this.syncUpdateState(registration);\n\n registration.addEventListener('updatefound', this.onUpdateFound, { signal });\n\n void registration.update().catch(() => {});\n this.periodicInterval = window.setInterval(() => {\n void registration.update().catch(() => {});\n }, 60 * 60 * 1000);\n\n queueMicrotask(() => {\n if (this.registration !== registration) {\n return;\n }\n this.syncUpdateState(registration);\n });\n }\n\n private onActivateClick(): void {\n const w = this.registration?.waiting;\n if (w) {\n this.pendingReload = true;\n w.postMessage({ type: 'SKIP_WAITING' });\n return;\n }\n window.location.reload();\n }\n\n protected render() {\n if (this.updateProgressVisible && !this.updateAvailable) {\n const percent = Math.round(this.updateProgress * 100);\n return html`\n <div\n style=\"display: inline-flex; align-items: center; gap: 0.5rem; min-width: 210px;\"\n title=\"Downloading the latest update...\"\n aria-label=\"Downloading the latest update\"\n >\n <wa-progress-bar value=${percent}></wa-progress-bar>\n <div style=\"display: inline-flex; flex-direction: column; gap: 0.1rem; max-width: 140px;\">\n <span style=\"font-size: 0.75rem; opacity: 0.8;\">${percent}%</span>\n ${this.updateCurrentFile\n ? html`<span\n style=\"font-size: 0.7rem; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\"\n title=${this.updateCurrentFile}\n >${this.updateCurrentFile}</span\n >`\n : html``}\n </div>\n </div>\n `;\n }\n\n if (!this.updateAvailable) {\n return html``;\n }\n\n return html`\n <wa-button\n variant=\"brand\"\n appearance=\"plain\"\n title=\"A new version is available. Click to update.\"\n aria-label=\"Update available. Click to reload with the latest version.\"\n @click=${this.onActivateClick}\n >\n Update Available\n </wa-button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'docks-sw-update-indicator': DocksSwUpdateIndicator;\n }\n}\n","import { html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\n\nimport { DocksElement } from '@eclipse-docks/core';\n\nimport {\n clearInstallPromptCapture,\n peekInstallPrompt,\n PWA_INSTALL_PROMPT_AVAILABLE,\n type PwaInstallPromptEvent,\n} from './install-prompt-capture';\n\nfunction isRunningAsInstalledPwa(): boolean {\n return (\n window.matchMedia('(display-mode: standalone)').matches ||\n window.matchMedia('(display-mode: window-controls-overlay)').matches ||\n (window.navigator as Navigator & { standalone?: boolean }).standalone === true\n );\n}\n\n@customElement('docks-pwa-install')\nexport class DocksPwaInstall extends DocksElement {\n @state()\n private showInstall = false;\n\n private deferredPrompt: PwaInstallPromptEvent | null = null;\n\n private readonly onPromptAvailable = (): void => {\n this.applyCapturedPrompt();\n };\n\n private readonly onAppInstalled = (): void => {\n clearInstallPromptCapture();\n this.deferredPrompt = null;\n this.showInstall = false;\n };\n\n private applyCapturedPrompt(): void {\n const p = peekInstallPrompt();\n if (!p) {\n return;\n }\n this.deferredPrompt = p;\n this.showInstall = true;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (isRunningAsInstalledPwa()) {\n return;\n }\n this.applyCapturedPrompt();\n window.addEventListener(PWA_INSTALL_PROMPT_AVAILABLE, this.onPromptAvailable);\n window.addEventListener('appinstalled', this.onAppInstalled);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener(PWA_INSTALL_PROMPT_AVAILABLE, this.onPromptAvailable);\n window.removeEventListener('appinstalled', this.onAppInstalled);\n }\n\n private async onInstallClick(): Promise<void> {\n const promptEvent = this.deferredPrompt;\n if (!promptEvent) {\n return;\n }\n await promptEvent.prompt();\n await promptEvent.userChoice.catch(() => {});\n clearInstallPromptCapture();\n this.deferredPrompt = null;\n this.showInstall = false;\n }\n\n protected render() {\n if (!this.showInstall) {\n return html``;\n }\n\n return html`\n <wa-button\n appearance=\"plain\"\n title=\"Install this app on your device\"\n aria-label=\"Install app\"\n @click=${() => void this.onInstallClick()}\n >\n <wa-icon name=\"download\" label=\"\"></wa-icon>\n </wa-button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'docks-pwa-install': DocksPwaInstall;\n }\n}\n","import { contributionRegistry, type HTMLContribution, TOOLBAR_MAIN, TOOLBAR_MAIN_CENTER } from '@eclipse-docks/core';\nimport './sw-update-indicator';\nimport './pwa-install-button';\n\nconst TOOLBAR_SW_UPDATE = 'toolbar.swUpdate';\nconst TOOLBAR_PWA_INSTALL = 'toolbar.pwaInstall';\n\ncontributionRegistry.registerContribution(TOOLBAR_MAIN, {\n name: TOOLBAR_SW_UPDATE,\n label: 'App update',\n slot: 'end',\n component: `<docks-sw-update-indicator></docks-sw-update-indicator>`,\n} as HTMLContribution);\n\ncontributionRegistry.registerContribution(TOOLBAR_MAIN_CENTER, {\n name: TOOLBAR_PWA_INSTALL,\n label: 'Install app',\n component: `<docks-pwa-install></docks-pwa-install>`,\n} as HTMLContribution);\n"],"mappings":";;;;;;AAsBO,IAAM,yBAAN,MAAM,+BAA+B,aAAa;;;EAE7B,KAAA,kBAAA;EAED,KAAA,iBAAA;EAEO,KAAA,wBAAA;EAEJ,KAAA,oBAAA;EAEJ,KAAA,gBAAA;EACiC,KAAA,eAAA;EACf,KAAA,mBAAA;EACJ,KAAA,eAAA;EACf,KAAA,eAAA;EACuB,KAAA,cAAA;EAEI,KAAA,2BAAA;GAChD,IAAI,CAAC,KAAK,eACR;GAEF,OAAO,SAAS,OAAO;EACzB;EAE2C,KAAA,0BAAA,UAA8B;GACvE,MAAM,OAAO,MAAM;GACnB,IAAI,CAAC,QAAQ,KAAK,SAAS,sBACzB;GAEF,IAAI,KAAK,SAAS,GAChB;GAEF,MAAM,QAAQ,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,YAAY,KAAK,KAAK,CAAC;GAClE,KAAK,iBAAiB;GACtB,KAAK,wBAAwB,CAAC,KAAK,m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,IAAM,oBAAoB;AAC1B,IAAM,sBAAsB;AAE5B,qBAAqB,qBAAqB,cAAc;CACtD,MAAM;CACN,OAAO;CACP,MAAM;CACN,WAAW;AACb,CAAqB;AAErB,qBAAqB,qBAAqB,qBAAqB;CAC7D,MAAM;CACN,OAAO;CACP,WAAW;AACb,CAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sw-update-indicator.d.ts","sourceRoot":"","sources":["../src/sw-update-indicator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAUnD;;;;;;;GAOG;AACH,qBACa,sBAAuB,SAAQ,YAAY;IAEtD,OAAO,CAAC,eAAe,CAAS;IAEhC,OAAO,CAAC,cAAc,CAAK;IAE3B,OAAO,CAAC,qBAAqB,CAAS;IAEtC,OAAO,CAAC,iBAAiB,CAAM;IAE/B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,YAAY,CAA0C;IAC9D,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,WAAW,CAAgC;IAEnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAKjC;IAEF,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAYrC;IAEF,OAAO,CAAC,iBAAiB;IAgBzB,iBAAiB,IAAI,IAAI;IAUzB,oBAAoB,IAAI,IAAI;YAOd,wBAAwB;IAqBtC,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,kBAAkB;IAe1B;;;OAGG;IACH,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAyC5B;IAEF,OAAO,CAAC,MAAM;IA0Bd,OAAO,CAAC,eAAe;IAUvB,SAAS,CAAC,MAAM;
|
|
1
|
+
{"version":3,"file":"sw-update-indicator.d.ts","sourceRoot":"","sources":["../src/sw-update-indicator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAUnD;;;;;;;GAOG;AACH,qBACa,sBAAuB,SAAQ,YAAY;IAEtD,OAAO,CAAC,eAAe,CAAS;IAEhC,OAAO,CAAC,cAAc,CAAK;IAE3B,OAAO,CAAC,qBAAqB,CAAS;IAEtC,OAAO,CAAC,iBAAiB,CAAM;IAE/B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,YAAY,CAA0C;IAC9D,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,WAAW,CAAgC;IAEnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAKjC;IAEF,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAYrC;IAEF,OAAO,CAAC,iBAAiB;IAgBzB,iBAAiB,IAAI,IAAI;IAUzB,oBAAoB,IAAI,IAAI;YAOd,wBAAwB;IAqBtC,OAAO,CAAC,SAAS;IAOjB,OAAO,CAAC,kBAAkB;IAe1B;;;OAGG;IACH,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,QAAQ,CAAC,aAAa,CAyC5B;IAEF,OAAO,CAAC,MAAM;IA0Bd,OAAO,CAAC,eAAe;IAUvB,SAAS,CAAC,MAAM;CAwCjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,2BAA2B,EAAE,sBAAsB,CAAC;KACrD;CACF"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pwa-extension-VQuZNJbI.js","names":[],"sources":["../src/sw-update-indicator.ts","../src/pwa-install-button.ts","../src/pwa-extension.ts"],"sourcesContent":["import { html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\n\nimport { DocksElement } from '@eclipse-docks/core';\n\ntype SwUpdateProgressMessage = {\n type: 'SW_UPDATE_PROGRESS';\n completed: number;\n total: number;\n done?: boolean;\n currentFile?: string;\n};\n\n/**\n * Shows a toolbar button when a new service worker is waiting (vite-plugin-pwa injectManifest + SKIP_WAITING message).\n * Displays download progress while the worker installs; then a brand \"Update Available\" button to activate it.\n * Hidden when there is no update or when service workers are unavailable.\n *\n * Safe when the extension loads late: attaches via `getRegistration()`, reads `registration.waiting`,\n * and subscribes to `updatefound` for subsequent updates.\n */\n@customElement('docks-sw-update-indicator')\nexport class DocksSwUpdateIndicator extends DocksElement {\n @state()\n private updateAvailable = false;\n @state()\n private updateProgress = 0;\n @state()\n private updateProgressVisible = false;\n @state()\n private updateCurrentFile = '';\n\n private pendingReload = false;\n private registration: ServiceWorkerRegistration | null = null;\n private periodicInterval: number | null = null;\n private pollInterval: number | null = null;\n private pollAttempts = 0;\n private attachAbort: AbortController | null = null;\n\n private readonly onControllerChange = (): void => {\n if (!this.pendingReload) {\n return;\n }\n window.location.reload();\n };\n\n private readonly onServiceWorkerMessage = (event: MessageEvent): void => {\n const data = event.data as SwUpdateProgressMessage | undefined;\n if (!data || data.type !== 'SW_UPDATE_PROGRESS') {\n return;\n }\n if (data.total <= 0) {\n return;\n }\n const ratio = Math.max(0, Math.min(1, data.completed / data.total));\n this.updateProgress = ratio;\n this.updateProgressVisible = !this.updateAvailable && !data.done && ratio < 1;\n this.updateCurrentFile = this.toDisplayFileName(data.currentFile);\n };\n\n private toDisplayFileName(pathname?: string): string {\n if (!pathname) {\n return '';\n }\n const normalized = pathname.split('?')[0].split('#')[0];\n const raw = normalized.split('/').filter(Boolean).at(-1) ?? normalized;\n if (!raw) {\n return '';\n }\n const decoded = decodeURIComponent(raw);\n if (decoded.length <= 32) {\n return decoded;\n }\n return `${decoded.slice(0, 29)}...`;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (!('serviceWorker' in navigator)) {\n return;\n }\n navigator.serviceWorker.addEventListener('controllerchange', this.onControllerChange);\n navigator.serviceWorker.addEventListener('message', this.onServiceWorkerMessage);\n void this.findOrAttachRegistration();\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n navigator.serviceWorker.removeEventListener('controllerchange', this.onControllerChange);\n navigator.serviceWorker.removeEventListener('message', this.onServiceWorkerMessage);\n this.teardownAttachment();\n }\n\n private async findOrAttachRegistration(): Promise<void> {\n const existing = await navigator.serviceWorker.getRegistration();\n if (existing) {\n this.attach(existing);\n return;\n }\n\n this.pollInterval = window.setInterval(async () => {\n this.pollAttempts += 1;\n const reg = await navigator.serviceWorker.getRegistration();\n if (reg) {\n this.clearPoll();\n this.attach(reg);\n return;\n }\n if (this.pollAttempts >= 30) {\n this.clearPoll();\n }\n }, 1000);\n }\n\n private clearPoll(): void {\n if (this.pollInterval !== null) {\n window.clearInterval(this.pollInterval);\n this.pollInterval = null;\n }\n }\n\n private teardownAttachment(): void {\n this.clearPoll();\n if (this.periodicInterval !== null) {\n window.clearInterval(this.periodicInterval);\n this.periodicInterval = null;\n }\n this.attachAbort?.abort();\n this.attachAbort = null;\n this.registration = null;\n this.updateAvailable = false;\n this.updateProgress = 0;\n this.updateProgressVisible = false;\n this.updateCurrentFile = '';\n }\n\n /**\n * Show only when a new worker is waiting and an older version is already controlling\n * the page (real update). Avoid treating the first install as an “update”.\n */\n private syncUpdateState(registration: ServiceWorkerRegistration): void {\n const waiting = Boolean(registration.waiting);\n const hasActiveController = Boolean(navigator.serviceWorker.controller);\n this.updateAvailable = waiting && hasActiveController;\n if (this.updateAvailable) {\n this.updateProgress = 1;\n this.updateProgressVisible = false;\n this.updateCurrentFile = '';\n }\n }\n\n private readonly onUpdateFound = (): void => {\n const registration = this.registration;\n if (!registration) {\n return;\n }\n // Fast installs (common in standalone PWA): worker may already be `waiting` when\n // this runs, with `installing` already null — still an update if a controller exists.\n this.syncUpdateState(registration);\n\n const installing = registration.installing;\n if (!installing) {\n return;\n }\n if (navigator.serviceWorker.controller) {\n this.updateProgress = 0;\n this.updateProgressVisible = true;\n this.updateCurrentFile = '';\n }\n const signal = this.attachAbort?.signal;\n if (!signal) {\n return;\n }\n installing.addEventListener(\n 'statechange',\n () => {\n if (installing.state === 'redundant') {\n this.updateProgress = 0;\n this.updateProgressVisible = false;\n this.updateCurrentFile = '';\n return;\n }\n if (installing.state !== 'installed') {\n return;\n }\n if (!navigator.serviceWorker.controller) {\n return;\n }\n this.syncUpdateState(registration);\n },\n { signal },\n );\n };\n\n private attach(registration: ServiceWorkerRegistration): void {\n if (this.registration === registration) {\n return;\n }\n this.attachAbort?.abort();\n this.attachAbort = new AbortController();\n const signal = this.attachAbort.signal;\n\n this.registration = registration;\n this.syncUpdateState(registration);\n\n registration.addEventListener('updatefound', this.onUpdateFound, { signal });\n\n void registration.update().catch(() => {});\n this.periodicInterval = window.setInterval(() => {\n void registration.update().catch(() => {});\n }, 60 * 60 * 1000);\n\n queueMicrotask(() => {\n if (this.registration !== registration) {\n return;\n }\n this.syncUpdateState(registration);\n });\n }\n\n private onActivateClick(): void {\n const w = this.registration?.waiting;\n if (w) {\n this.pendingReload = true;\n w.postMessage({ type: 'SKIP_WAITING' });\n return;\n }\n window.location.reload();\n }\n\n protected render() {\n if (this.updateProgressVisible && !this.updateAvailable) {\n const percent = Math.round(this.updateProgress * 100);\n return html`\n <div\n style=\"display: inline-flex; align-items: center; gap: 0.5rem; min-width: 210px;\"\n title=\"Downloading the latest update...\"\n aria-label=\"Downloading the latest update\"\n >\n <wa-progress-bar value=${percent}></wa-progress-bar>\n <div style=\"display: inline-flex; flex-direction: column; gap: 0.1rem; max-width: 140px;\">\n <span style=\"font-size: 0.75rem; opacity: 0.8;\">${percent}%</span>\n ${this.updateCurrentFile\n ? html`<span\n style=\"font-size: 0.7rem; opacity: 0.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\"\n title=${this.updateCurrentFile}\n >${this.updateCurrentFile}</span\n >`\n : html``}\n </div>\n </div>\n `;\n }\n\n if (!this.updateAvailable) {\n return html``;\n }\n\n return html`\n <wa-button\n variant=\"brand\"\n title=\"A new version is available. Click to update.\"\n aria-label=\"Update available. Click to reload with the latest version.\"\n @click=${this.onActivateClick}\n >\n Update Available\n </wa-button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'docks-sw-update-indicator': DocksSwUpdateIndicator;\n }\n}\n","import { html } from 'lit';\nimport { customElement, state } from 'lit/decorators.js';\n\nimport { DocksElement } from '@eclipse-docks/core';\n\nimport {\n clearInstallPromptCapture,\n peekInstallPrompt,\n PWA_INSTALL_PROMPT_AVAILABLE,\n type PwaInstallPromptEvent,\n} from './install-prompt-capture';\n\nfunction isRunningAsInstalledPwa(): boolean {\n return (\n window.matchMedia('(display-mode: standalone)').matches ||\n window.matchMedia('(display-mode: window-controls-overlay)').matches ||\n (window.navigator as Navigator & { standalone?: boolean }).standalone === true\n );\n}\n\n@customElement('docks-pwa-install')\nexport class DocksPwaInstall extends DocksElement {\n @state()\n private showInstall = false;\n\n private deferredPrompt: PwaInstallPromptEvent | null = null;\n\n private readonly onPromptAvailable = (): void => {\n this.applyCapturedPrompt();\n };\n\n private readonly onAppInstalled = (): void => {\n clearInstallPromptCapture();\n this.deferredPrompt = null;\n this.showInstall = false;\n };\n\n private applyCapturedPrompt(): void {\n const p = peekInstallPrompt();\n if (!p) {\n return;\n }\n this.deferredPrompt = p;\n this.showInstall = true;\n }\n\n connectedCallback(): void {\n super.connectedCallback();\n if (isRunningAsInstalledPwa()) {\n return;\n }\n this.applyCapturedPrompt();\n window.addEventListener(PWA_INSTALL_PROMPT_AVAILABLE, this.onPromptAvailable);\n window.addEventListener('appinstalled', this.onAppInstalled);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener(PWA_INSTALL_PROMPT_AVAILABLE, this.onPromptAvailable);\n window.removeEventListener('appinstalled', this.onAppInstalled);\n }\n\n private async onInstallClick(): Promise<void> {\n const promptEvent = this.deferredPrompt;\n if (!promptEvent) {\n return;\n }\n await promptEvent.prompt();\n await promptEvent.userChoice.catch(() => {});\n clearInstallPromptCapture();\n this.deferredPrompt = null;\n this.showInstall = false;\n }\n\n protected render() {\n if (!this.showInstall) {\n return html``;\n }\n\n return html`\n <wa-button\n appearance=\"plain\"\n title=\"Install this app on your device\"\n aria-label=\"Install app\"\n @click=${() => void this.onInstallClick()}\n >\n <wa-icon name=\"download\" label=\"\"></wa-icon>\n </wa-button>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'docks-pwa-install': DocksPwaInstall;\n }\n}\n","import { contributionRegistry, type HTMLContribution, TOOLBAR_MAIN, TOOLBAR_MAIN_CENTER } from '@eclipse-docks/core';\nimport './sw-update-indicator';\nimport './pwa-install-button';\n\nconst TOOLBAR_SW_UPDATE = 'toolbar.swUpdate';\nconst TOOLBAR_PWA_INSTALL = 'toolbar.pwaInstall';\n\ncontributionRegistry.registerContribution(TOOLBAR_MAIN, {\n name: TOOLBAR_SW_UPDATE,\n label: 'App update',\n slot: 'end',\n component: `<docks-sw-update-indicator></docks-sw-update-indicator>`,\n} as HTMLContribution);\n\ncontributionRegistry.registerContribution(TOOLBAR_MAIN_CENTER, {\n name: TOOLBAR_PWA_INSTALL,\n label: 'Install app',\n component: `<docks-pwa-install></docks-pwa-install>`,\n} as HTMLContribution);\n"],"mappings":";;;;;;AAsBO,IAAM,yBAAN,MAAM,+BAA+B,aAAa;;;EAE7B,KAAA,kBAAA;EAED,KAAA,iBAAA;EAEO,KAAA,wBAAA;EAEJ,KAAA,oBAAA;EAEJ,KAAA,gBAAA;EACiC,KAAA,eAAA;EACf,KAAA,mBAAA;EACJ,KAAA,eAAA;EACf,KAAA,eAAA;EACuB,KAAA,cAAA;EAEI,KAAA,2BAAA;GAChD,IAAI,CAAC,KAAK,eACR;GAEF,OAAO,SAAS,OAAO;EACzB;EAE2C,KAAA,0BAAA,UAA8B;GACvE,MAAM,OAAO,MAAM;GACnB,IAAI,CAAC,QAAQ,KAAK,SAAS,sBACzB;GAEF,IAAI,KAAK,SAAS,GAChB;GAEF,MAAM,QAAQ,KAAK,IAAI,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