@eclipse-docks/extension-pwa 0.7.126 → 0.7.130

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.
@@ -0,0 +1,11 @@
1
+ //#region src/i18n.de.json
2
+ var EXT_PWA_NAME = "PWA";
3
+ var EXT_PWA_DESC = "Service-Worker-Update-Anzeige in der Haupt-Symbolleiste und Installationshinweis in der mittleren Symbolleiste, wenn der Browser das unterstützt.";
4
+ var i18n_de_default = {
5
+ EXT_PWA_NAME: "PWA",
6
+ EXT_PWA_DESC
7
+ };
8
+ //#endregion
9
+ export { EXT_PWA_DESC, EXT_PWA_NAME, i18n_de_default as default };
10
+
11
+ //# sourceMappingURL=i18n.de-BdUe4ejD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.de-BdUe4ejD.js","names":[],"sources":["../src/i18n.de.json"],"sourcesContent":["{\n \"EXT_PWA_NAME\": \"PWA\",\n \"EXT_PWA_DESC\": \"Service-Worker-Update-Anzeige in der Haupt-Symbolleiste und Installationshinweis in der mittleren Symbolleiste, wenn der Browser das unterstützt.\"\n}\n"],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  //#region src/i18n.en.json
2
2
  var EXT_PWA_NAME = "PWA";
3
- var EXT_PWA_DESC = "Service worker update control and install prompt in the main center toolbar when the browser supports them.";
3
+ var EXT_PWA_DESC = "Service worker update indicator on the main toolbar and install prompt in the center toolbar when the browser supports them.";
4
4
  var i18n_en_default = {
5
5
  EXT_PWA_NAME: "PWA",
6
6
  EXT_PWA_DESC
@@ -8,4 +8,4 @@ var i18n_en_default = {
8
8
  //#endregion
9
9
  export { EXT_PWA_DESC, EXT_PWA_NAME, i18n_en_default as default };
10
10
 
11
- //# sourceMappingURL=i18n.en-BjSrybGY.js.map
11
+ //# sourceMappingURL=i18n.en-MEDwd_6p.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.en-MEDwd_6p.js","names":[],"sources":["../src/i18n.en.json"],"sourcesContent":["{\n \"EXT_PWA_NAME\": \"PWA\",\n \"EXT_PWA_DESC\": \"Service worker update indicator on the main toolbar and install prompt in the center toolbar when the browser supports them.\"\n}\n"],"mappings":""}
package/dist/index.js CHANGED
@@ -3,14 +3,14 @@ import { extensionRegistry, i18n } from "@eclipse-docks/core";
3
3
  import pkg from "../package.json";
4
4
  //#region src/index.ts
5
5
  var t = await i18n(/* @__PURE__ */ Object.assign({
6
- "./i18n.de.json": () => import("./i18n.de-CorheGJa.js"),
7
- "./i18n.en.json": () => import("./i18n.en-BjSrybGY.js")
6
+ "./i18n.de.json": () => import("./i18n.de-BdUe4ejD.js"),
7
+ "./i18n.en.json": () => import("./i18n.en-MEDwd_6p.js")
8
8
  }), true);
9
9
  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-BaUCo7Mu.js"),
13
+ loader: () => import("./pwa-extension-CosYVIHA.js"),
14
14
  icon: "download"
15
15
  });
16
16
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { n as clearInstallPromptCapture, r as peekInstallPrompt, t as PWA_INSTALL_PROMPT_AVAILABLE } from "./install-prompt-capture-fZikSCg3.js";
2
- import { DocksElement, TOOLBAR_MAIN_CENTER, contributionRegistry } from "@eclipse-docks/core";
2
+ import { DocksElement, TOOLBAR_MAIN, TOOLBAR_MAIN_CENTER, contributionRegistry } from "@eclipse-docks/core";
3
3
  import { html } from "lit";
4
4
  import { customElement, state } from "lit/decorators.js";
5
5
  import _decorate from "@oxc-project/runtime/helpers/decorate";
@@ -178,27 +178,14 @@ var DocksSwUpdateIndicator = class DocksSwUpdateIndicator extends DocksElement {
178
178
  }
179
179
  if (!this.updateAvailable) return html``;
180
180
  return html`
181
- <wa-animation
182
- style="display: inline-flex; align-items: center;"
183
- name="zoomIn"
184
- duration="1400"
185
- easing="ease-out"
186
- iterations="Infinity"
187
- ?play=${true}
181
+ <wa-button
182
+ variant="brand"
183
+ title="A new version is available. Click to update."
184
+ aria-label="Update available. Click to reload with the latest version."
185
+ @click=${this.onActivateClick}
188
186
  >
189
- <wa-button
190
- appearance="plain"
191
- title="A new version is available. Click to reload."
192
- aria-label="A new version is available. Reload to update."
193
- @click=${this.onActivateClick}
194
- >
195
- <wa-icon
196
- name="arrows-rotate"
197
- label=""
198
- style="color: var(--wa-color-success-fill-loud)"
199
- ></wa-icon>
200
- </wa-button>
201
- </wa-animation>
187
+ Update Available
188
+ </wa-button>
202
189
  `;
203
190
  }
204
191
  };
@@ -273,9 +260,10 @@ DocksPwaInstall = _decorate([customElement("docks-pwa-install")], DocksPwaInstal
273
260
  //#region src/pwa-extension.ts
274
261
  var TOOLBAR_SW_UPDATE = "toolbar.swUpdate";
275
262
  var TOOLBAR_PWA_INSTALL = "toolbar.pwaInstall";
276
- contributionRegistry.registerContribution(TOOLBAR_MAIN_CENTER, {
263
+ contributionRegistry.registerContribution(TOOLBAR_MAIN, {
277
264
  name: TOOLBAR_SW_UPDATE,
278
265
  label: "App update",
266
+ slot: "end",
279
267
  component: `<docks-sw-update-indicator></docks-sw-update-indicator>`
280
268
  });
281
269
  contributionRegistry.registerContribution(TOOLBAR_MAIN_CENTER, {
@@ -285,4 +273,4 @@ contributionRegistry.registerContribution(TOOLBAR_MAIN_CENTER, {
285
273
  });
286
274
  //#endregion
287
275
 
288
- //# sourceMappingURL=pwa-extension-BaUCo7Mu.js.map
276
+ //# sourceMappingURL=pwa-extension-CosYVIHA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pwa-extension-CosYVIHA.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,IAAA,yBAAA,MAAM,+BAA+B,aAAa;;;yBAE7B;wBAED;+BAEO;2BAEJ;uBAEJ;sBACiC;0BACf;sBACJ;sBACf;qBACuB;kCAEI;AAChD,OAAI,CAAC,KAAK,cACR;AAEF,UAAO,SAAS,QAAQ;;iCAGiB,UAA8B;GACvE,MAAM,OAAO,MAAM;AACnB,OAAI,CAAC,QAAQ,KAAK,SAAS,qBACzB;AAEF,OAAI,KAAK,SAAS,EAChB;GAEF,MAAM,QAAQ,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,YAAY,KAAK,MAAM,CAAC;AACnE,QAAK,iBAAiB;AACtB,QAAK,wBAAwB,CAAC,KAAK,mBAAmB,CAAC,KAAK,QAAQ,QAAQ;AAC5E,QAAK,oBAAoB,KAAK,kBAAkB,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rB,sBAAoC;EAClC,MAAM,IAAI,mBAAmB;AAC7B,MAAI,CAAC,EACH;AAEF,OAAK,iBAAiB;AACtB,OAAK,cAAc;;CAGrB,oBAA0B;AACxB,QAAM,mBAAmB;AACzB,MAAI,yBAAyB,CAC3B;AAEF,OAAK,qBAAqB;AAC1B,SAAO,iBAAiB,8BAA8B,KAAK,kBAAkB;AAC7E,SAAO,iBAAiB,gBAAgB,KAAK,eAAe;;CAG9D,uBAA6B;AAC3B,QAAM,sBAAsB;AAC5B,SAAO,oBAAoB,8BAA8B,KAAK,kBAAkB;AAChF,SAAO,oBAAoB,gBAAgB,KAAK,eAAe;;CAGjE,MAAc,iBAAgC;EAC5C,MAAM,cAAc,KAAK;AACzB,MAAI,CAAC,YACH;AAEF,QAAM,YAAY,QAAQ;AAC1B,QAAM,YAAY,WAAW,YAAY,GAAG;AAC5C,6BAA2B;AAC3B,OAAK,iBAAiB;AACtB,OAAK,cAAc;;CAGrB,SAAmB;AACjB,MAAI,CAAC,KAAK,YACR,QAAO,IAAI;AAGb,SAAO,IAAI;;;;;uBAKQ,KAAK,KAAK,gBAAgB,CAAC;;;;;;;WA9D/C,OAAO,CAAA,EAAA,gBAAA,WAAA,eAAA,KAAA,EAAA;6BAFT,cAAc,oBAAoB,CAAA,EAAA,gBAAA;;;AChBnC,IAAM,oBAAoB;AAC1B,IAAM,sBAAsB;AAE5B,qBAAqB,qBAAqB,cAAc;CACtD,MAAM;CACN,OAAO;CACP,MAAM;CACN,WAAW;CACZ,CAAqB;AAEtB,qBAAqB,qBAAqB,qBAAqB;CAC7D,MAAM;CACN,OAAO;CACP,WAAW;CACZ,CAAqB"}
@@ -1,6 +1,7 @@
1
1
  import { DocksElement } from '@eclipse-docks/core';
2
2
  /**
3
- * Shows a toolbar icon when a new service worker is waiting (vite-plugin-pwa injectManifest + SKIP_WAITING message).
3
+ * Shows a toolbar button when a new service worker is waiting (vite-plugin-pwa injectManifest + SKIP_WAITING message).
4
+ * Displays download progress while the worker installs; then a brand "Update Available" button to activate it.
4
5
  * Hidden when there is no update or when service workers are unavailable.
5
6
  *
6
7
  * Safe when the extension loads late: attaches via `getRegistration()`, reads `registration.waiting`,
@@ -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;;;;;;GAMG;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;CAoDjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,2BAA2B,EAAE,sBAAsB,CAAC;KACrD;CACF"}
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;CAuCjB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,2BAA2B,EAAE,sBAAsB,CAAC;KACrD;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eclipse-docks/extension-pwa",
3
- "version": "0.7.126",
3
+ "version": "0.7.130",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "exports": {
@@ -1,11 +0,0 @@
1
- //#region src/i18n.de.json
2
- var EXT_PWA_NAME = "PWA";
3
- var EXT_PWA_DESC = "Service-Worker-Update und Installationshinweis in der mittleren Haupt-Symbolleiste, wenn der Browser das unterstützt.";
4
- var i18n_de_default = {
5
- EXT_PWA_NAME: "PWA",
6
- EXT_PWA_DESC
7
- };
8
- //#endregion
9
- export { EXT_PWA_DESC, EXT_PWA_NAME, i18n_de_default as default };
10
-
11
- //# sourceMappingURL=i18n.de-CorheGJa.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.de-CorheGJa.js","names":[],"sources":["../src/i18n.de.json"],"sourcesContent":["{\n \"EXT_PWA_NAME\": \"PWA\",\n \"EXT_PWA_DESC\": \"Service-Worker-Update und Installationshinweis in der mittleren Haupt-Symbolleiste, wenn der Browser das unterstützt.\"\n}\n"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18n.en-BjSrybGY.js","names":[],"sources":["../src/i18n.en.json"],"sourcesContent":["{\n \"EXT_PWA_NAME\": \"PWA\",\n \"EXT_PWA_DESC\": \"Service worker update control and install prompt in the main center toolbar when the browser supports them.\"\n}\n"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pwa-extension-BaUCo7Mu.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 icon when a new service worker is waiting (vite-plugin-pwa injectManifest + SKIP_WAITING message).\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-animation\n style=\"display: inline-flex; align-items: center;\"\n name=\"zoomIn\"\n duration=\"1400\"\n easing=\"ease-out\"\n iterations=\"Infinity\"\n ?play=${true}\n >\n <wa-button\n appearance=\"plain\"\n title=\"A new version is available. Click to reload.\"\n aria-label=\"A new version is available. Reload to update.\"\n @click=${this.onActivateClick}\n >\n <wa-icon\n name=\"arrows-rotate\"\n label=\"\"\n style=\"color: var(--wa-color-success-fill-loud)\"\n ></wa-icon>\n </wa-button>\n </wa-animation>\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_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_CENTER, {\n name: TOOLBAR_SW_UPDATE,\n label: 'App update',\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":";;;;;;AAqBO,IAAA,yBAAA,MAAM,+BAA+B,aAAa;;;yBAE7B;wBAED;+BAEO;2BAEJ;uBAEJ;sBACiC;0BACf;sBACJ;sBACf;qBACuB;kCAEI;AAChD,OAAI,CAAC,KAAK,cACR;AAEF,UAAO,SAAS,QAAQ;;iCAGiB,UAA8B;GACvE,MAAM,OAAO,MAAM;AACnB,OAAI,CAAC,QAAQ,KAAK,SAAS,qBACzB;AAEF,OAAI,KAAK,SAAS,EAChB;GAEF,MAAM,QAAQ,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,YAAY,KAAK,MAAM,CAAC;AACnE,QAAK,iBAAiB;AACtB,QAAK,wBAAwB,CAAC,KAAK,mBAAmB,CAAC,KAAK,QAAQ,QAAQ;AAC5E,QAAK,oBAAoB,KAAK,kBAAkB,KAAK,YAAY;;6BA8FtB;GAC3C,MAAM,eAAe,KAAK;AAC1B,OAAI,CAAC,aACH;AAIF,QAAK,gBAAgB,aAAa;GAElC,MAAM,aAAa,aAAa;AAChC,OAAI,CAAC,WACH;AAEF,OAAI,UAAU,cAAc,YAAY;AACtC,SAAK,iBAAiB;AACtB,SAAK,wBAAwB;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