@gravionlabs/helix-desktop 22.5.0 → 22.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/gravionlabs-helix-desktop-tauri.mjs +5 -85
- package/fesm2022/gravionlabs-helix-desktop-tauri.mjs.map +1 -1
- package/fesm2022/gravionlabs-helix-desktop.mjs +179 -416
- package/fesm2022/gravionlabs-helix-desktop.mjs.map +1 -1
- package/package.json +1 -1
- package/styles.css +27 -4
- package/types/gravionlabs-helix-desktop.d.ts +75 -2
|
@@ -96,8 +96,7 @@ var HxStatusAppVersion = class HxStatusAppVersion {
|
|
|
96
96
|
isStandalone: true,
|
|
97
97
|
selector: "hx-status-app-version",
|
|
98
98
|
ngImport: i0,
|
|
99
|
-
template:
|
|
100
|
-
isInline: true,
|
|
99
|
+
template: "<hx-status-version [version]=\"info.version\" [channel]=\"info.channel === 'rc' ? 'RC' : null\" />\n",
|
|
101
100
|
dependencies: [{
|
|
102
101
|
kind: "component",
|
|
103
102
|
type: HxStatusVersion,
|
|
@@ -118,7 +117,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
118
117
|
selector: "hx-status-app-version",
|
|
119
118
|
imports: [HxStatusVersion],
|
|
120
119
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
121
|
-
template:
|
|
120
|
+
template: "<hx-status-version [version]=\"info.version\" [channel]=\"info.channel === 'rc' ? 'RC' : null\" />\n"
|
|
122
121
|
}]
|
|
123
122
|
}]
|
|
124
123
|
});
|
|
@@ -297,47 +296,7 @@ var HxStatusUpdate = class HxStatusUpdate {
|
|
|
297
296
|
}
|
|
298
297
|
},
|
|
299
298
|
ngImport: i0,
|
|
300
|
-
template:
|
|
301
|
-
@if (visible()) {
|
|
302
|
-
<hx-status-item
|
|
303
|
-
kind="button"
|
|
304
|
-
[announce]="true"
|
|
305
|
-
[tone]="tone()"
|
|
306
|
-
[title]="label()"
|
|
307
|
-
[ariaLabel]="label()"
|
|
308
|
-
[(popoverOpen)]="open"
|
|
309
|
-
>
|
|
310
|
-
<span class="hx-update-label">{{ label() }}</span>
|
|
311
|
-
<div hxStatusPopover class="hx-update-details">
|
|
312
|
-
@switch (state().status) {
|
|
313
|
-
@case ('error') {
|
|
314
|
-
<p class="hx-update-message">{{ errorText() }}</p>
|
|
315
|
-
<button type="button" class="hx-update-action" (click)="service.check()">
|
|
316
|
-
{{ retryLabel() }}
|
|
317
|
-
</button>
|
|
318
|
-
}
|
|
319
|
-
@default {
|
|
320
|
-
@if (service.update(); as update) {
|
|
321
|
-
<p class="hx-update-version">{{ update.version }}</p>
|
|
322
|
-
@if (update.notes) {
|
|
323
|
-
<p class="hx-update-notes">{{ update.notes }}</p>
|
|
324
|
-
}
|
|
325
|
-
<button
|
|
326
|
-
type="button"
|
|
327
|
-
class="hx-update-action"
|
|
328
|
-
[disabled]="state().status === 'installing'"
|
|
329
|
-
(click)="service.installAndRestart()"
|
|
330
|
-
>
|
|
331
|
-
{{ installLabel() }}
|
|
332
|
-
</button>
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
</div>
|
|
337
|
-
</hx-status-item>
|
|
338
|
-
}
|
|
339
|
-
`,
|
|
340
|
-
isInline: true,
|
|
299
|
+
template: "@if (visible()) {\n <hx-status-item\n kind=\"button\"\n [announce]=\"true\"\n [tone]=\"tone()\"\n [title]=\"label()\"\n [ariaLabel]=\"label()\"\n [(popoverOpen)]=\"open\"\n >\n <span class=\"hx-update-label\">{{ label() }}</span>\n <div hxStatusPopover class=\"hx-update-details\">\n @switch (state().status) {\n @case ('error') {\n <p class=\"hx-update-message\">{{ errorText() }}</p>\n <button type=\"button\" class=\"hx-update-action\" (click)=\"service.check()\">\n {{ retryLabel() }}\n </button>\n }\n @default {\n @if (service.update(); as update) {\n <p class=\"hx-update-version\">{{ update.version }}</p>\n @if (update.notes) {\n <p class=\"hx-update-notes\">{{ update.notes }}</p>\n }\n <button\n type=\"button\"\n class=\"hx-update-action\"\n [disabled]=\"state().status === 'installing'\"\n (click)=\"service.installAndRestart()\"\n >\n {{ installLabel() }}\n </button>\n }\n }\n }\n </div>\n </hx-status-item>\n}\n",
|
|
341
300
|
dependencies: [{
|
|
342
301
|
kind: "component",
|
|
343
302
|
type: HxStatusItem,
|
|
@@ -351,7 +310,7 @@ var HxStatusUpdate = class HxStatusUpdate {
|
|
|
351
310
|
"announce",
|
|
352
311
|
"popoverOpen"
|
|
353
312
|
],
|
|
354
|
-
outputs: ["popoverOpenChange"]
|
|
313
|
+
outputs: ["popoverOpenChange", "pressed"]
|
|
355
314
|
}, {
|
|
356
315
|
kind: "directive",
|
|
357
316
|
type: HxStatusPopover,
|
|
@@ -371,46 +330,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
371
330
|
selector: "hx-status-update",
|
|
372
331
|
imports: [HxStatusItem, HxStatusPopover],
|
|
373
332
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
374
|
-
template:
|
|
375
|
-
@if (visible()) {
|
|
376
|
-
<hx-status-item
|
|
377
|
-
kind="button"
|
|
378
|
-
[announce]="true"
|
|
379
|
-
[tone]="tone()"
|
|
380
|
-
[title]="label()"
|
|
381
|
-
[ariaLabel]="label()"
|
|
382
|
-
[(popoverOpen)]="open"
|
|
383
|
-
>
|
|
384
|
-
<span class="hx-update-label">{{ label() }}</span>
|
|
385
|
-
<div hxStatusPopover class="hx-update-details">
|
|
386
|
-
@switch (state().status) {
|
|
387
|
-
@case ('error') {
|
|
388
|
-
<p class="hx-update-message">{{ errorText() }}</p>
|
|
389
|
-
<button type="button" class="hx-update-action" (click)="service.check()">
|
|
390
|
-
{{ retryLabel() }}
|
|
391
|
-
</button>
|
|
392
|
-
}
|
|
393
|
-
@default {
|
|
394
|
-
@if (service.update(); as update) {
|
|
395
|
-
<p class="hx-update-version">{{ update.version }}</p>
|
|
396
|
-
@if (update.notes) {
|
|
397
|
-
<p class="hx-update-notes">{{ update.notes }}</p>
|
|
398
|
-
}
|
|
399
|
-
<button
|
|
400
|
-
type="button"
|
|
401
|
-
class="hx-update-action"
|
|
402
|
-
[disabled]="state().status === 'installing'"
|
|
403
|
-
(click)="service.installAndRestart()"
|
|
404
|
-
>
|
|
405
|
-
{{ installLabel() }}
|
|
406
|
-
</button>
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
</div>
|
|
411
|
-
</hx-status-item>
|
|
412
|
-
}
|
|
413
|
-
`
|
|
333
|
+
template: "@if (visible()) {\n <hx-status-item\n kind=\"button\"\n [announce]=\"true\"\n [tone]=\"tone()\"\n [title]=\"label()\"\n [ariaLabel]=\"label()\"\n [(popoverOpen)]=\"open\"\n >\n <span class=\"hx-update-label\">{{ label() }}</span>\n <div hxStatusPopover class=\"hx-update-details\">\n @switch (state().status) {\n @case ('error') {\n <p class=\"hx-update-message\">{{ errorText() }}</p>\n <button type=\"button\" class=\"hx-update-action\" (click)=\"service.check()\">\n {{ retryLabel() }}\n </button>\n }\n @default {\n @if (service.update(); as update) {\n <p class=\"hx-update-version\">{{ update.version }}</p>\n @if (update.notes) {\n <p class=\"hx-update-notes\">{{ update.notes }}</p>\n }\n <button\n type=\"button\"\n class=\"hx-update-action\"\n [disabled]=\"state().status === 'installing'\"\n (click)=\"service.installAndRestart()\"\n >\n {{ installLabel() }}\n </button>\n }\n }\n }\n </div>\n </hx-status-item>\n}\n"
|
|
414
334
|
}]
|
|
415
335
|
}],
|
|
416
336
|
propDecorators: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gravionlabs-helix-desktop-tauri.mjs","names":[],"sources":["../../../projects/desktop/tauri/update-backend.ts","../../../projects/desktop/tauri/app-info.ts","../../../projects/desktop/tauri/platform.ts","../../../projects/desktop/tauri/status-app-version.ts","../../../projects/desktop/tauri/update.service.ts","../../../projects/desktop/tauri/status-update.ts","../../../projects/desktop/tauri/public_api.ts"],"sourcesContent":["/** What the updater found: a newer version. */\nexport interface HxUpdateInfo {\n readonly version: string;\n readonly notes: string | null;\n readonly date: string | null;\n}\n\n/**\n * The plugin calls behind an interface, so tests and web builds need no Tauri. The Tauri implementation\n * is `tauriUpdateBackend()`; outside Tauri the service uses `noopUpdateBackend`.\n */\nexport interface HxUpdateBackend {\n /** `null` when the app is current. */\n check(): Promise<HxUpdateInfo | null>;\n /** Download and install the update found by the last `check()`. */\n install(): Promise<void>;\n /** Restart into the new version. */\n relaunch(): Promise<void>;\n}\n\n/** The backend of a web build: never finds an update, never throws. */\nexport const noopUpdateBackend: HxUpdateBackend = {\n check: () => Promise.resolve(null),\n install: () => Promise.resolve(),\n relaunch: () => Promise.resolve(),\n};\n\n/** True inside a Tauri webview. */\nexport function isTauri(): boolean {\n return typeof window !== 'undefined' && '__TAURI_INTERNALS__' in window;\n}\n\n/** The backend on `@tauri-apps/plugin-updater` and `plugin-process`, loaded on first use. */\nexport function tauriUpdateBackend(): HxUpdateBackend {\n let pending: { downloadAndInstall(): Promise<void> } | null = null;\n return {\n async check() {\n const { check } = await import('@tauri-apps/plugin-updater');\n const update = await check();\n if (!update) {\n pending = null;\n return null;\n }\n pending = update;\n return { version: update.version, notes: update.body ?? null, date: update.date ?? null };\n },\n async install() {\n if (!pending) throw new Error('No update to install');\n await pending.downloadAndInstall();\n },\n async relaunch() {\n const { relaunch } = await import('@tauri-apps/plugin-process');\n await relaunch();\n },\n };\n}\n\n/** The backend for the current environment. */\nexport function defaultUpdateBackend(): HxUpdateBackend {\n return isTauri() ? tauriUpdateBackend() : noopUpdateBackend;\n}\n","import { InjectionToken, type Provider } from '@angular/core';\nimport { isTauri } from './update-backend';\n\n/** `stable`, or `rc` for a release candidate. */\nexport type HxChannel = 'stable' | 'rc';\n\nexport interface HxAppInfo {\n readonly version: string;\n readonly channel: HxChannel;\n}\n\n/** The app version and channel. Without `provideHxAppInfo()` it is an empty stable version. */\nexport const HX_APP_INFO = new InjectionToken<HxAppInfo>('HX_APP_INFO', {\n factory: () => ({ version: '', channel: 'stable' }),\n});\n\n/** `1.4.0-rc.1` is `rc`; everything else is `stable`. */\nexport function channelOfVersion(version: string): HxChannel {\n return /-rc(\\.|\\d|$)/i.test(version) ? 'rc' : 'stable';\n}\n\n/** Provide the version and, when not given, the channel derived from it. */\nexport function provideHxAppInfo(info: { version: string; channel?: HxChannel }): Provider {\n return {\n provide: HX_APP_INFO,\n useValue: { version: info.version, channel: info.channel ?? channelOfVersion(info.version) },\n };\n}\n\n/** Read the version from Tauri (`getVersion`); outside Tauri it resolves to `fallback`. */\nexport async function readTauriVersion(fallback = ''): Promise<string> {\n if (!isTauri()) return fallback;\n try {\n const { getVersion } = await import('@tauri-apps/api/app');\n return await getVersion();\n } catch {\n return fallback;\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { type EnvironmentProviders, inject, provideEnvironmentInitializer } from '@angular/core';\nimport { type HxOs, setHxPlatform } from '@gravionlabs/helix-desktop';\nimport { isTauri } from './update-backend';\n\n/** Detect the operating system from the user agent; `web` outside Tauri. */\nexport function detectHxOs(\n ua: string = typeof navigator === 'undefined' ? '' : navigator.userAgent,\n tauri: boolean = isTauri(),\n): HxOs {\n if (!tauri) return 'web';\n if (/android/i.test(ua)) return 'android';\n if (/iphone|ipad|ipod/i.test(ua)) return 'ios';\n if (/windows/i.test(ua)) return 'windows';\n if (/mac/i.test(ua)) return 'macos';\n if (/linux|x11/i.test(ua)) return 'linux';\n return 'web';\n}\n\n/** Set `data-platform` on the root element at startup: macos, windows, linux, ios, android or web. */\nexport function providePlatform(os?: HxOs): EnvironmentProviders {\n return provideEnvironmentInitializer(() => {\n setHxPlatform(os ?? detectHxOs(), inject(DOCUMENT).documentElement);\n });\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { HxStatusVersion } from '@gravionlabs/helix-desktop';\nimport { HX_APP_INFO } from './app-info';\n\n/** The app version with the `RC` badge on a release candidate; reads `provideHxAppInfo()`. */\n@Component({\n selector: 'hx-status-app-version',\n imports: [HxStatusVersion],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `<hx-status-version [version]=\"info.version\" [channel]=\"info.channel === 'rc' ? 'RC' : null\" />`,\n})\nexport class HxStatusAppVersion {\n protected readonly info = inject(HX_APP_INFO);\n}\n","import { computed, Injectable, InjectionToken, inject, signal } from '@angular/core';\nimport { HX_APP_INFO } from './app-info';\nimport { defaultUpdateBackend, type HxUpdateBackend, type HxUpdateInfo } from './update-backend';\n\n/** The step that failed. */\nexport type HxUpdateStep = 'check' | 'install' | 'relaunch';\n\nexport type HxUpdateState =\n | { readonly status: 'idle' }\n | { readonly status: 'checking' }\n | { readonly status: 'current' }\n | { readonly status: 'available'; readonly update: HxUpdateInfo }\n | { readonly status: 'installing'; readonly update: HxUpdateInfo }\n | { readonly status: 'error'; readonly step: HxUpdateStep; readonly message: string };\n\n/** The backend of the update service; override it in tests. */\nexport const HX_UPDATE_BACKEND = new InjectionToken<HxUpdateBackend>('HX_UPDATE_BACKEND', {\n factory: () => defaultUpdateBackend(),\n});\n\n/**\n * The update state machine: idle, checking, current, available, installing, error (with the failed step).\n * An RC build never checks by itself: `start()` does nothing there, `check()` still works on request.\n */\n@Injectable({ providedIn: 'root' })\nexport class HxUpdateService {\n private readonly backend = inject(HX_UPDATE_BACKEND);\n private readonly info = inject(HX_APP_INFO);\n private readonly _state = signal<HxUpdateState>({ status: 'idle' });\n\n readonly state = this._state.asReadonly();\n readonly version = this.info.version;\n readonly channel = this.info.channel;\n /** The found update, while available or installing. */\n readonly update = computed(() => {\n const s = this._state();\n return s.status === 'available' || s.status === 'installing' ? s.update : null;\n });\n\n /** The automatic check at startup; skipped for an RC build. */\n start(): Promise<void> {\n return this.channel === 'rc' ? Promise.resolve() : this.check();\n }\n\n async check(): Promise<void> {\n const s = this._state().status;\n if (s === 'checking' || s === 'installing') return;\n this._state.set({ status: 'checking' });\n try {\n const update = await this.backend.check();\n this._state.set(update ? { status: 'available', update } : { status: 'current' });\n } catch (e) {\n this.fail('check', e);\n }\n }\n\n /** Download, install and restart. */\n async installAndRestart(): Promise<void> {\n const update = this.update();\n if (this._state().status !== 'available' || !update) return;\n this._state.set({ status: 'installing', update });\n try {\n await this.backend.install();\n } catch (e) {\n this.fail('install', e);\n return;\n }\n try {\n await this.backend.relaunch();\n } catch (e) {\n this.fail('relaunch', e);\n }\n }\n\n private fail(step: HxUpdateStep, e: unknown): void {\n this._state.set({ status: 'error', step, message: e instanceof Error ? e.message : String(e) });\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, signal } from '@angular/core';\nimport {\n getHxPlatform,\n getHxPlatformKind,\n HxStatusItem,\n HxStatusPopover,\n type HxStatusTone,\n} from '@gravionlabs/helix-desktop';\nimport { HxUpdateService } from './update.service';\n\n/**\n * The update state as a status item; the version, the notes and \"Install and restart\" are in its popover.\n * Not rendered on mobile and while there is nothing to show (idle, current).\n */\n@Component({\n selector: 'hx-status-update',\n imports: [HxStatusItem, HxStatusPopover],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (visible()) {\n <hx-status-item\n kind=\"button\"\n [announce]=\"true\"\n [tone]=\"tone()\"\n [title]=\"label()\"\n [ariaLabel]=\"label()\"\n [(popoverOpen)]=\"open\"\n >\n <span class=\"hx-update-label\">{{ label() }}</span>\n <div hxStatusPopover class=\"hx-update-details\">\n @switch (state().status) {\n @case ('error') {\n <p class=\"hx-update-message\">{{ errorText() }}</p>\n <button type=\"button\" class=\"hx-update-action\" (click)=\"service.check()\">\n {{ retryLabel() }}\n </button>\n }\n @default {\n @if (service.update(); as update) {\n <p class=\"hx-update-version\">{{ update.version }}</p>\n @if (update.notes) {\n <p class=\"hx-update-notes\">{{ update.notes }}</p>\n }\n <button\n type=\"button\"\n class=\"hx-update-action\"\n [disabled]=\"state().status === 'installing'\"\n (click)=\"service.installAndRestart()\"\n >\n {{ installLabel() }}\n </button>\n }\n }\n }\n </div>\n </hx-status-item>\n }\n `,\n})\nexport class HxStatusUpdate {\n protected readonly service = inject(HxUpdateService);\n private readonly root = inject(DOCUMENT).documentElement;\n\n readonly checkingLabel = input('Checking for updates');\n readonly availableLabel = input('Update');\n readonly installingLabel = input('Installing update');\n readonly errorLabel = input('Update failed');\n readonly installLabel = input('Install and restart');\n readonly retryLabel = input('Try again');\n\n protected readonly open = signal(false);\n protected readonly state = this.service.state;\n\n protected readonly visible = computed(\n () =>\n getHxPlatformKind(getHxPlatform(this.root)) !== 'mobile' &&\n ['checking', 'available', 'installing', 'error'].includes(this.state().status),\n );\n\n protected readonly label = computed(() => {\n const s = this.state();\n switch (s.status) {\n case 'checking':\n return this.checkingLabel();\n case 'available':\n return `${this.availableLabel()} ${s.update.version}`;\n case 'installing':\n return this.installingLabel();\n case 'error':\n return this.errorLabel();\n default:\n return '';\n }\n });\n\n protected readonly tone = computed<HxStatusTone>(() => {\n const s = this.state().status;\n return s === 'error' ? 'error' : s === 'available' ? 'accent' : 'neutral';\n });\n\n protected readonly errorText = computed(() => {\n const s = this.state();\n return s.status === 'error' ? `${s.step}: ${s.message}` : '';\n });\n}\n","/*\n * Public API Surface of @gravionlabs/helix-desktop/tauri\n *\n * The only entry that may import `@tauri-apps/*` (`pnpm lint:no-tauri`). Those packages are optional peer\n * dependencies, so a consumer of the main entry installs none of them. Outside Tauri every service\n * resolves to a no-op.\n */\n\nexport const HELIX_DESKTOP_TAURI = true;\n\nexport * from './app-info';\nexport * from './platform';\nexport * from './status-app-version';\nexport * from './status-update';\nexport * from './update.service';\nexport * from './update-backend';\n"],"mappings":";;;;AAqBA,MAAa,oBAAqC;CAChD,aAAa,QAAQ,QAAQ,IAAI;CACjC,eAAe,QAAQ,QAAO;CAC9B,gBAAgB,QAAQ,QAAO;AAChC;AAGD,SAAgB,UAAO;CACrB,OAAO,OAAO,WAAW,eAAe,yBAAyB;AACnE;AAGA,SAAgB,qBAAkB;CAChC,IAAI,UAA0D;CAC9D,OAAO;EACL,MAAM,QAAK;GACT,MAAM,EAAE,UAAU,MAAM,OAAO;GAC/B,MA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AAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,YAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,UAAA;EAAA,UAzCf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCT,UAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MAzCS;GAAY,UAAA;GAAA,QAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;GAAA;GAAA,SAAA,CAAA,mBAAA;EAAA,GAAA;GAAA,MAAA;GAAA,MAAE;GAAe,UAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AA2C5B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EA7C1B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,SAAS,CAAC,cAAc,eAAe;GACvC,iBAAiB,wBAAwB;GACzC,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCX,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACnDD,MAAa,sBAAsB"}
|
|
1
|
+
{"version":3,"file":"gravionlabs-helix-desktop-tauri.mjs","names":[],"sources":["../../../projects/desktop/tauri/update-backend.ts","../../../projects/desktop/tauri/app-info.ts","../../../projects/desktop/tauri/platform.ts","../../../projects/desktop/tauri/status-app-version.ts","../../../projects/desktop/tauri/status-app-version.html","../../../projects/desktop/tauri/update.service.ts","../../../projects/desktop/tauri/status-update.ts","../../../projects/desktop/tauri/status-update.html","../../../projects/desktop/tauri/public_api.ts"],"sourcesContent":["/** What the updater found: a newer version. */\nexport interface HxUpdateInfo {\n readonly version: string;\n readonly notes: string | null;\n readonly date: string | null;\n}\n\n/**\n * The plugin calls behind an interface, so tests and web builds need no Tauri. The Tauri implementation\n * is `tauriUpdateBackend()`; outside Tauri the service uses `noopUpdateBackend`.\n */\nexport interface HxUpdateBackend {\n /** `null` when the app is current. */\n check(): Promise<HxUpdateInfo | null>;\n /** Download and install the update found by the last `check()`. */\n install(): Promise<void>;\n /** Restart into the new version. */\n relaunch(): Promise<void>;\n}\n\n/** The backend of a web build: never finds an update, never throws. */\nexport const noopUpdateBackend: HxUpdateBackend = {\n check: () => Promise.resolve(null),\n install: () => Promise.resolve(),\n relaunch: () => Promise.resolve(),\n};\n\n/** True inside a Tauri webview. */\nexport function isTauri(): boolean {\n return typeof window !== 'undefined' && '__TAURI_INTERNALS__' in window;\n}\n\n/** The backend on `@tauri-apps/plugin-updater` and `plugin-process`, loaded on first use. */\nexport function tauriUpdateBackend(): HxUpdateBackend {\n let pending: { downloadAndInstall(): Promise<void> } | null = null;\n return {\n async check() {\n const { check } = await import('@tauri-apps/plugin-updater');\n const update = await check();\n if (!update) {\n pending = null;\n return null;\n }\n pending = update;\n return { version: update.version, notes: update.body ?? null, date: update.date ?? null };\n },\n async install() {\n if (!pending) throw new Error('No update to install');\n await pending.downloadAndInstall();\n },\n async relaunch() {\n const { relaunch } = await import('@tauri-apps/plugin-process');\n await relaunch();\n },\n };\n}\n\n/** The backend for the current environment. */\nexport function defaultUpdateBackend(): HxUpdateBackend {\n return isTauri() ? tauriUpdateBackend() : noopUpdateBackend;\n}\n","import { InjectionToken, type Provider } from '@angular/core';\nimport { isTauri } from './update-backend';\n\n/** `stable`, or `rc` for a release candidate. */\nexport type HxChannel = 'stable' | 'rc';\n\nexport interface HxAppInfo {\n readonly version: string;\n readonly channel: HxChannel;\n}\n\n/** The app version and channel. Without `provideHxAppInfo()` it is an empty stable version. */\nexport const HX_APP_INFO = new InjectionToken<HxAppInfo>('HX_APP_INFO', {\n factory: () => ({ version: '', channel: 'stable' }),\n});\n\n/** `1.4.0-rc.1` is `rc`; everything else is `stable`. */\nexport function channelOfVersion(version: string): HxChannel {\n return /-rc(\\.|\\d|$)/i.test(version) ? 'rc' : 'stable';\n}\n\n/** Provide the version and, when not given, the channel derived from it. */\nexport function provideHxAppInfo(info: { version: string; channel?: HxChannel }): Provider {\n return {\n provide: HX_APP_INFO,\n useValue: { version: info.version, channel: info.channel ?? channelOfVersion(info.version) },\n };\n}\n\n/** Read the version from Tauri (`getVersion`); outside Tauri it resolves to `fallback`. */\nexport async function readTauriVersion(fallback = ''): Promise<string> {\n if (!isTauri()) return fallback;\n try {\n const { getVersion } = await import('@tauri-apps/api/app');\n return await getVersion();\n } catch {\n return fallback;\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { type EnvironmentProviders, inject, provideEnvironmentInitializer } from '@angular/core';\nimport { type HxOs, setHxPlatform } from '@gravionlabs/helix-desktop';\nimport { isTauri } from './update-backend';\n\n/** Detect the operating system from the user agent; `web` outside Tauri. */\nexport function detectHxOs(\n ua: string = typeof navigator === 'undefined' ? '' : navigator.userAgent,\n tauri: boolean = isTauri(),\n): HxOs {\n if (!tauri) return 'web';\n if (/android/i.test(ua)) return 'android';\n if (/iphone|ipad|ipod/i.test(ua)) return 'ios';\n if (/windows/i.test(ua)) return 'windows';\n if (/mac/i.test(ua)) return 'macos';\n if (/linux|x11/i.test(ua)) return 'linux';\n return 'web';\n}\n\n/** Set `data-platform` on the root element at startup: macos, windows, linux, ios, android or web. */\nexport function providePlatform(os?: HxOs): EnvironmentProviders {\n return provideEnvironmentInitializer(() => {\n setHxPlatform(os ?? detectHxOs(), inject(DOCUMENT).documentElement);\n });\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { HxStatusVersion } from '@gravionlabs/helix-desktop';\nimport { HX_APP_INFO } from './app-info';\n\n/** The app version with the `RC` badge on a release candidate; reads `provideHxAppInfo()`. */\n@Component({\n selector: 'hx-status-app-version',\n imports: [HxStatusVersion],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './status-app-version.html',\n})\nexport class HxStatusAppVersion {\n protected readonly info = inject(HX_APP_INFO);\n}\n","<hx-status-version [version]=\"info.version\" [channel]=\"info.channel === 'rc' ? 'RC' : null\" />\n","import { computed, Injectable, InjectionToken, inject, signal } from '@angular/core';\nimport { HX_APP_INFO } from './app-info';\nimport { defaultUpdateBackend, type HxUpdateBackend, type HxUpdateInfo } from './update-backend';\n\n/** The step that failed. */\nexport type HxUpdateStep = 'check' | 'install' | 'relaunch';\n\nexport type HxUpdateState =\n | { readonly status: 'idle' }\n | { readonly status: 'checking' }\n | { readonly status: 'current' }\n | { readonly status: 'available'; readonly update: HxUpdateInfo }\n | { readonly status: 'installing'; readonly update: HxUpdateInfo }\n | { readonly status: 'error'; readonly step: HxUpdateStep; readonly message: string };\n\n/** The backend of the update service; override it in tests. */\nexport const HX_UPDATE_BACKEND = new InjectionToken<HxUpdateBackend>('HX_UPDATE_BACKEND', {\n factory: () => defaultUpdateBackend(),\n});\n\n/**\n * The update state machine: idle, checking, current, available, installing, error (with the failed step).\n * An RC build never checks by itself: `start()` does nothing there, `check()` still works on request.\n */\n@Injectable({ providedIn: 'root' })\nexport class HxUpdateService {\n private readonly backend = inject(HX_UPDATE_BACKEND);\n private readonly info = inject(HX_APP_INFO);\n private readonly _state = signal<HxUpdateState>({ status: 'idle' });\n\n readonly state = this._state.asReadonly();\n readonly version = this.info.version;\n readonly channel = this.info.channel;\n /** The found update, while available or installing. */\n readonly update = computed(() => {\n const s = this._state();\n return s.status === 'available' || s.status === 'installing' ? s.update : null;\n });\n\n /** The automatic check at startup; skipped for an RC build. */\n start(): Promise<void> {\n return this.channel === 'rc' ? Promise.resolve() : this.check();\n }\n\n async check(): Promise<void> {\n const s = this._state().status;\n if (s === 'checking' || s === 'installing') return;\n this._state.set({ status: 'checking' });\n try {\n const update = await this.backend.check();\n this._state.set(update ? { status: 'available', update } : { status: 'current' });\n } catch (e) {\n this.fail('check', e);\n }\n }\n\n /** Download, install and restart. */\n async installAndRestart(): Promise<void> {\n const update = this.update();\n if (this._state().status !== 'available' || !update) return;\n this._state.set({ status: 'installing', update });\n try {\n await this.backend.install();\n } catch (e) {\n this.fail('install', e);\n return;\n }\n try {\n await this.backend.relaunch();\n } catch (e) {\n this.fail('relaunch', e);\n }\n }\n\n private fail(step: HxUpdateStep, e: unknown): void {\n this._state.set({ status: 'error', step, message: e instanceof Error ? e.message : String(e) });\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, signal } from '@angular/core';\nimport {\n getHxPlatform,\n getHxPlatformKind,\n HxStatusItem,\n HxStatusPopover,\n type HxStatusTone,\n} from '@gravionlabs/helix-desktop';\nimport { HxUpdateService } from './update.service';\n\n/**\n * The update state as a status item; the version, the notes and \"Install and restart\" are in its popover.\n * Not rendered on mobile and while there is nothing to show (idle, current).\n */\n@Component({\n selector: 'hx-status-update',\n imports: [HxStatusItem, HxStatusPopover],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './status-update.html',\n})\nexport class HxStatusUpdate {\n protected readonly service = inject(HxUpdateService);\n private readonly root = inject(DOCUMENT).documentElement;\n\n readonly checkingLabel = input('Checking for updates');\n readonly availableLabel = input('Update');\n readonly installingLabel = input('Installing update');\n readonly errorLabel = input('Update failed');\n readonly installLabel = input('Install and restart');\n readonly retryLabel = input('Try again');\n\n protected readonly open = signal(false);\n protected readonly state = this.service.state;\n\n protected readonly visible = computed(\n () =>\n getHxPlatformKind(getHxPlatform(this.root)) !== 'mobile' &&\n ['checking', 'available', 'installing', 'error'].includes(this.state().status),\n );\n\n protected readonly label = computed(() => {\n const s = this.state();\n switch (s.status) {\n case 'checking':\n return this.checkingLabel();\n case 'available':\n return `${this.availableLabel()} ${s.update.version}`;\n case 'installing':\n return this.installingLabel();\n case 'error':\n return this.errorLabel();\n default:\n return '';\n }\n });\n\n protected readonly tone = computed<HxStatusTone>(() => {\n const s = this.state().status;\n return s === 'error' ? 'error' : s === 'available' ? 'accent' : 'neutral';\n });\n\n protected readonly errorText = computed(() => {\n const s = this.state();\n return s.status === 'error' ? `${s.step}: ${s.message}` : '';\n });\n}\n","@if (visible()) {\n <hx-status-item\n kind=\"button\"\n [announce]=\"true\"\n [tone]=\"tone()\"\n [title]=\"label()\"\n [ariaLabel]=\"label()\"\n [(popoverOpen)]=\"open\"\n >\n <span class=\"hx-update-label\">{{ label() }}</span>\n <div hxStatusPopover class=\"hx-update-details\">\n @switch (state().status) {\n @case ('error') {\n <p class=\"hx-update-message\">{{ errorText() }}</p>\n <button type=\"button\" class=\"hx-update-action\" (click)=\"service.check()\">\n {{ retryLabel() }}\n </button>\n }\n @default {\n @if (service.update(); as update) {\n <p class=\"hx-update-version\">{{ update.version }}</p>\n @if (update.notes) {\n <p class=\"hx-update-notes\">{{ update.notes }}</p>\n }\n <button\n type=\"button\"\n class=\"hx-update-action\"\n [disabled]=\"state().status === 'installing'\"\n (click)=\"service.installAndRestart()\"\n >\n {{ installLabel() }}\n </button>\n }\n }\n }\n </div>\n </hx-status-item>\n}\n","/*\n * Public API Surface of @gravionlabs/helix-desktop/tauri\n *\n * The only entry that may import `@tauri-apps/*` (`pnpm lint:no-tauri`). Those packages are optional peer\n * dependencies, so a consumer of the main entry installs none of them. Outside Tauri every service\n * resolves to a no-op.\n */\n\nexport const HELIX_DESKTOP_TAURI = true;\n\nexport * from './app-info';\nexport * from './platform';\nexport * from './status-app-version';\nexport * from './status-update';\nexport * from './update.service';\nexport * from './update-backend';\n"],"mappings":";;;;AAqBA,MAAa,oBAAqC;CAChD,aAAa,QAAQ,QAAQ,IAAI;CACjC,eAAe,QAAQ,QAAO;CAC9B,gBAAgB,QAAQ,QAAO;AAChC;AAGD,SAAgB,UAAO;CACrB,OAAO,OAAO,WAAW,eAAe,yBAAyB;AACnE;AAGA,SAAgB,qBAAkB;CAChC,IAAI,UAA0D;CAC9D,OAAO;EACL,MAAM,QAAK;GACT,MAAM,EAAE,UAAU,MAAM,OAAO;GAC/B,MAAM,SAAS,MAAM,MAAK;GAC1B,IAAI,CAAC,QAAQ;IACX,UAAU;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