@domicile-desktop/sdk 1.0.0 → 2.2.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/config.schema.json +193 -0
- package/dist/bind-keys.d.ts +7 -2
- package/dist/bind-keys.js +41 -9
- package/dist/config.d.ts +78 -0
- package/dist/desktop/desktop.d.ts +2 -0
- package/dist/desktop/desktop.js +2 -0
- package/dist/desktop/displays.d.ts +6 -3
- package/dist/desktop/displays.js +1 -1
- package/dist/desktop/gestures.d.ts +46 -0
- package/dist/desktop/gestures.js +58 -0
- package/dist/desktop/notifications.js +5 -1
- package/dist/desktop/system-calls.d.ts +7 -5
- package/dist/desktop/system-calls.js +7 -3
- package/dist/domicile-host.d.ts +71 -0
- package/dist/gesture-binding.d.ts +48 -0
- package/dist/gesture-binding.js +164 -0
- package/dist/notification.d.ts +5 -0
- package/dist/own-keybindings.d.ts +8 -4
- package/dist/own-keybindings.js +7 -5
- package/dist/webview-element.d.ts +292 -0
- package/dist/webview-element.js +159 -0
- package/package.json +4 -5
|
@@ -148,6 +148,12 @@ export declare const WEBVIEW_DESCRIPTION_CHANGE_EVENT = "domicile-description-ch
|
|
|
148
148
|
* Bubbles.
|
|
149
149
|
*/
|
|
150
150
|
export declare const WEBVIEW_TARGET_URL_CHANGE_EVENT = "domicile-target-url-change";
|
|
151
|
+
/**
|
|
152
|
+
* Fired when {@link HTMLWebViewElement.tooltip} changes, with
|
|
153
|
+
* {@link HTMLWebViewElement.tooltipX} and `tooltipY`. Carries no payload.
|
|
154
|
+
* Bubbles.
|
|
155
|
+
*/
|
|
156
|
+
export declare const WEBVIEW_TOOLTIP_CHANGE_EVENT = "domicile-tooltip-change";
|
|
151
157
|
/**
|
|
152
158
|
* Fired on Ctrl+wheel over a page that did not handle the wheel.
|
|
153
159
|
*
|
|
@@ -202,6 +208,26 @@ export declare const WEBVIEW_RENDER_PROCESS_CHANGE_EVENT = "domicile-render-proc
|
|
|
202
208
|
*/
|
|
203
209
|
export declare const WEBVIEW_RENDER_PROCESS_GONE_REASONS: readonly ["clean-exit", "abnormal-exit", "killed", "crashed", "oom", "launch-failed", "memory-eviction"];
|
|
204
210
|
export type WebViewRenderProcessGone = (typeof WEBVIEW_RENDER_PROCESS_GONE_REASONS)[number];
|
|
211
|
+
/**
|
|
212
|
+
* Fired when {@link HTMLWebViewElement.pageFailure} or the attributes beside
|
|
213
|
+
* it change: the page failed to load, or a page loaded after one did. Carries
|
|
214
|
+
* no payload. Bubbles.
|
|
215
|
+
*/
|
|
216
|
+
export declare const WEBVIEW_PAGE_FAILURE_CHANGE_EVENT = "domicile-page-failure-change";
|
|
217
|
+
/**
|
|
218
|
+
* Why a `<webview>`'s page failed to load, as
|
|
219
|
+
* {@link HTMLWebViewElement.pageFailure}. The engine draws no error or warning
|
|
220
|
+
* page: the page is blank and the shell draws one.
|
|
221
|
+
*
|
|
222
|
+
* - `network`: it could not be reached (no network, no such host, refused,
|
|
223
|
+
* timed out, blocked); `pageFailureError` says which.
|
|
224
|
+
* - `http`: the server answered `pageFailureHttpStatus` with nothing to show.
|
|
225
|
+
* - `certificate`: the site's certificate is not trusted.
|
|
226
|
+
* - `warning`: the browser warned before loading it (Safe Browsing, a
|
|
227
|
+
* lookalike address, no secure connection under HTTPS-First).
|
|
228
|
+
*/
|
|
229
|
+
export declare const WEBVIEW_PAGE_FAILURES: readonly ["network", "http", "certificate", "warning"];
|
|
230
|
+
export type WebViewPageFailure = (typeof WEBVIEW_PAGE_FAILURES)[number];
|
|
205
231
|
/**
|
|
206
232
|
* Fired when the page needs a file picked: an `<input type="file">` or a
|
|
207
233
|
* download. Bubbles.
|
|
@@ -332,6 +358,118 @@ export declare const WEBVIEW_DIALOG_EVENT = "domicile-dialog";
|
|
|
332
358
|
* afterward throws. Carries no payload. Bubbles.
|
|
333
359
|
*/
|
|
334
360
|
export declare const WEBVIEW_DIALOG_WITHDRAWN_EVENT = "domicile-dialog-withdrawn";
|
|
361
|
+
/**
|
|
362
|
+
* Fired when the page opens a link for an application, such as `zoommtg:` or
|
|
363
|
+
* `mailto:`, that the browser would ask about. Nothing opens until it is
|
|
364
|
+
* answered. Bubbles.
|
|
365
|
+
*
|
|
366
|
+
* The browser draws no dialog. Call `preventDefault()` to handle it, then
|
|
367
|
+
* answer with {@link DomicileExternalAppEvent.open} or
|
|
368
|
+
* {@link DomicileExternalAppEvent.dismiss}. If no listener calls
|
|
369
|
+
* `preventDefault()`, nothing opens. A site the user let open these links
|
|
370
|
+
* without asking, and a blocked scheme, fire nothing.
|
|
371
|
+
*/
|
|
372
|
+
export declare const WEBVIEW_EXTERNAL_APP_EVENT = "domicile-external-app";
|
|
373
|
+
/**
|
|
374
|
+
* Fired when a newer {@link WEBVIEW_EXTERNAL_APP_EVENT} replaces the one still
|
|
375
|
+
* unanswered, which then opens nothing. Answering it afterward throws. Carries
|
|
376
|
+
* no payload. Bubbles.
|
|
377
|
+
*/
|
|
378
|
+
export declare const WEBVIEW_EXTERNAL_APP_WITHDRAWN_EVENT = "domicile-external-app-withdrawn";
|
|
379
|
+
/**
|
|
380
|
+
* Fired when a site or a proxy asks for a user name and password (HTTP
|
|
381
|
+
* authentication). The request waits until it is answered. Bubbles.
|
|
382
|
+
*
|
|
383
|
+
* The browser draws no dialog. Call `preventDefault()` to handle it, then
|
|
384
|
+
* answer with {@link DomicileSignInEvent.signIn} or
|
|
385
|
+
* {@link DomicileSignInEvent.dismiss}. If no listener calls
|
|
386
|
+
* `preventDefault()`, it is canceled and the page shows the site's refusal.
|
|
387
|
+
*/
|
|
388
|
+
export declare const WEBVIEW_SIGN_IN_EVENT = "domicile-sign-in";
|
|
389
|
+
/**
|
|
390
|
+
* Fired when the browser drops the unanswered {@link WEBVIEW_SIGN_IN_EVENT},
|
|
391
|
+
* for example because the page navigated, or a newer one replaces it.
|
|
392
|
+
* Answering it afterward throws. Carries no payload. Bubbles.
|
|
393
|
+
*/
|
|
394
|
+
export declare const WEBVIEW_SIGN_IN_WITHDRAWN_EVENT = "domicile-sign-in-withdrawn";
|
|
395
|
+
/**
|
|
396
|
+
* Fired when the page, or an extension shown in the element, needs the user
|
|
397
|
+
* to answer a question the browser would otherwise ask with a dialog of its
|
|
398
|
+
* own: letting a site view or edit a file, picking a certificate to sign in
|
|
399
|
+
* with, pairing a Bluetooth device, or granting an extension permissions. See
|
|
400
|
+
* {@link WEBVIEW_PROMPT_KINDS}. The request waits until it is answered.
|
|
401
|
+
* Bubbles.
|
|
402
|
+
*
|
|
403
|
+
* The browser draws no dialog. Call `preventDefault()` to handle it, then
|
|
404
|
+
* answer with {@link DomicilePromptEvent.accept} or
|
|
405
|
+
* {@link DomicilePromptEvent.dismiss}. If no listener calls
|
|
406
|
+
* `preventDefault()`, it is answered no.
|
|
407
|
+
*/
|
|
408
|
+
export declare const WEBVIEW_PROMPT_EVENT = "domicile-prompt";
|
|
409
|
+
/**
|
|
410
|
+
* Fired when the browser drops the unanswered {@link WEBVIEW_PROMPT_EVENT},
|
|
411
|
+
* for example because the page navigated, or a newer one replaces it.
|
|
412
|
+
* Answering it afterward throws. Carries no payload. Bubbles.
|
|
413
|
+
*/
|
|
414
|
+
export declare const WEBVIEW_PROMPT_WITHDRAWN_EVENT = "domicile-prompt-withdrawn";
|
|
415
|
+
/**
|
|
416
|
+
* What a {@link WEBVIEW_PROMPT_EVENT} asks, as {@link DomicilePromptEvent.kind}:
|
|
417
|
+
*
|
|
418
|
+
* - `file-view`, `file-edit`: let the site view or edit the file or folder
|
|
419
|
+
* named `subject` (full path in `details[0]`).
|
|
420
|
+
* - `file-restricted`: the site picked a folder that holds system files.
|
|
421
|
+
* Accepting picks another; dismissing gives up.
|
|
422
|
+
* - `file-dangerous`: save `subject` anyway, though it may be harmful.
|
|
423
|
+
* - `client-certificate`: pick one of `details` (each `"name\nissuer"`) to
|
|
424
|
+
* sign in to the site with; pass its index to `accept`. Dismissing continues
|
|
425
|
+
* without one.
|
|
426
|
+
* - `bluetooth-pin`: the device `subject` needs a PIN; pass it as `accept`'s
|
|
427
|
+
* text.
|
|
428
|
+
* - `bluetooth-confirm`: pair with the device `subject`; `pin`, when set, must
|
|
429
|
+
* match the one the device shows.
|
|
430
|
+
* - `extension-install`, `extension-permissions`, `extension-re-enable`: add,
|
|
431
|
+
* grant more permissions to, or turn back on the extension `subject`, with
|
|
432
|
+
* the permissions in `details`.
|
|
433
|
+
* - `resend-form`: reloading the page titled `subject` sends its form again.
|
|
434
|
+
* Accepting resends; dismissing leaves the page as it is.
|
|
435
|
+
* - `unresponsive`: the page titled `subject` stopped responding. Accepting
|
|
436
|
+
* ends it, and the page then shows as crashed; dismissing waits. Withdrawn
|
|
437
|
+
* when it responds again.
|
|
438
|
+
*/
|
|
439
|
+
export declare const WEBVIEW_PROMPT_KINDS: readonly ["file-view", "file-edit", "file-restricted", "file-dangerous", "client-certificate", "bluetooth-pin", "bluetooth-confirm", "extension-permissions", "extension-install", "extension-re-enable", "resend-form", "unresponsive"];
|
|
440
|
+
/** One of {@link WEBVIEW_PROMPT_KINDS}. */
|
|
441
|
+
export type WebViewPromptKind = (typeof WEBVIEW_PROMPT_KINDS)[number];
|
|
442
|
+
/**
|
|
443
|
+
* Fired when a form control in the page opens a picker the browser would
|
|
444
|
+
* otherwise draw itself: a color input, a date or time input, or a text
|
|
445
|
+
* input's `<datalist>`. See {@link WEBVIEW_PICKER_KINDS}. The control waits
|
|
446
|
+
* until it is answered. Bubbles.
|
|
447
|
+
*
|
|
448
|
+
* The browser draws no picker. Call `preventDefault()` to handle it, then
|
|
449
|
+
* answer with {@link DomicilePickerEvent.choose} or
|
|
450
|
+
* {@link DomicilePickerEvent.cancel}. If no listener calls `preventDefault()`,
|
|
451
|
+
* the control keeps its value.
|
|
452
|
+
*/
|
|
453
|
+
export declare const WEBVIEW_PICKER_EVENT = "domicile-picker";
|
|
454
|
+
/**
|
|
455
|
+
* Fired when the page closes the unanswered {@link WEBVIEW_PICKER_EVENT}, for
|
|
456
|
+
* example because the control went away, or a newer one replaces it.
|
|
457
|
+
* Answering it afterward throws. Carries no payload. Bubbles.
|
|
458
|
+
*/
|
|
459
|
+
export declare const WEBVIEW_PICKER_WITHDRAWN_EVENT = "domicile-picker-withdrawn";
|
|
460
|
+
/**
|
|
461
|
+
* What a {@link WEBVIEW_PICKER_EVENT} picks, as {@link DomicilePickerEvent.kind},
|
|
462
|
+
* and the format of its value:
|
|
463
|
+
*
|
|
464
|
+
* - `color`: `"#rrggbb"`.
|
|
465
|
+
* - `date`, `time`, `datetime-local`, `month`, `week`: the input's HTML
|
|
466
|
+
* format, such as `"2026-11-06"`, `"13:45"`, `"2026-11-06T13:45"`,
|
|
467
|
+
* `"2026-11"` and `"2026-W45"`.
|
|
468
|
+
* - `list`: one of `options`, for a text input's `<datalist>`.
|
|
469
|
+
*/
|
|
470
|
+
export declare const WEBVIEW_PICKER_KINDS: readonly ["color", "date", "time", "datetime-local", "month", "week", "list"];
|
|
471
|
+
/** One of {@link WEBVIEW_PICKER_KINDS}. */
|
|
472
|
+
export type WebViewPickerKind = (typeof WEBVIEW_PICKER_KINDS)[number];
|
|
335
473
|
/** The dialogs a page can open, as {@link DomicileDialogEvent.dialogType}. */
|
|
336
474
|
export declare const WEBVIEW_DIALOG_TYPES: readonly ["alert", "confirm", "prompt", "beforeunload"];
|
|
337
475
|
export type WebViewDialogType = (typeof WEBVIEW_DIALOG_TYPES)[number];
|
|
@@ -410,6 +548,19 @@ declare global {
|
|
|
410
548
|
* bubble like Chrome's. Changes fire {@link WEBVIEW_TARGET_URL_CHANGE_EVENT}.
|
|
411
549
|
*/
|
|
412
550
|
readonly targetUrl: string;
|
|
551
|
+
/**
|
|
552
|
+
* The tooltip under the pointer, such as a `title`, or `""` if none. The
|
|
553
|
+
* engine draws no tooltip for the page, so the shell does. `""` while the
|
|
554
|
+
* pointer is outside the page. Changes fire
|
|
555
|
+
* {@link WEBVIEW_TOOLTIP_CHANGE_EVENT}.
|
|
556
|
+
*/
|
|
557
|
+
readonly tooltip: string;
|
|
558
|
+
/**
|
|
559
|
+
* Where the pointer was when {@link HTMLWebViewElement.tooltip} appeared,
|
|
560
|
+
* in the element's CSS pixels from its top left.
|
|
561
|
+
*/
|
|
562
|
+
readonly tooltipX: number;
|
|
563
|
+
readonly tooltipY: number;
|
|
413
564
|
/**
|
|
414
565
|
* Find `text` and select the next match, or the previous one when
|
|
415
566
|
* `backward` is true. Repeating the same text steps through matches; `""`
|
|
@@ -460,6 +611,29 @@ declare global {
|
|
|
460
611
|
* logs; branch on {@link HTMLWebViewElement.renderProcessGone}.
|
|
461
612
|
*/
|
|
462
613
|
readonly renderProcessExitCode: number;
|
|
614
|
+
/**
|
|
615
|
+
* Why the page failed to load, or `""` while it loaded. The page is blank
|
|
616
|
+
* then, for the shell to draw the error over. Changes to it and the
|
|
617
|
+
* attributes below fire {@link WEBVIEW_PAGE_FAILURE_CHANGE_EVENT}.
|
|
618
|
+
*/
|
|
619
|
+
readonly pageFailure: WebViewPageFailure | "";
|
|
620
|
+
/** The address that failed, or `""`. */
|
|
621
|
+
readonly pageFailureUrl: string;
|
|
622
|
+
/** Chromium's name for the error, e.g. `ERR_NAME_NOT_RESOLVED`, or `""`. */
|
|
623
|
+
readonly pageFailureError: string;
|
|
624
|
+
/** The HTTP status for an `http` failure; otherwise 0. */
|
|
625
|
+
readonly pageFailureHttpStatus: number;
|
|
626
|
+
/**
|
|
627
|
+
* Whether {@link HTMLWebViewElement.proceedPastWarning} loads the page
|
|
628
|
+
* anyway: a certificate the user may override, or a warning.
|
|
629
|
+
*/
|
|
630
|
+
readonly pageFailureCanProceed: boolean;
|
|
631
|
+
/**
|
|
632
|
+
* Load the page a certificate or safety warning stopped, as Chrome's
|
|
633
|
+
* "Proceed anyway" does. Does nothing unless
|
|
634
|
+
* {@link HTMLWebViewElement.pageFailureCanProceed}.
|
|
635
|
+
*/
|
|
636
|
+
proceedPastWarning(): void;
|
|
463
637
|
/**
|
|
464
638
|
* Open DevTools for the page in a new browser window. If DevTools is
|
|
465
639
|
* already open, the view showing it fires
|
|
@@ -511,6 +685,14 @@ declare global {
|
|
|
511
685
|
countMatches(selector: string): Promise<number>;
|
|
512
686
|
goBack(): void;
|
|
513
687
|
goForward(): void;
|
|
688
|
+
/**
|
|
689
|
+
* Go back or forward in a new browser window, as a middle click on
|
|
690
|
+
* Chrome's back button does. The window gets a copy of this view's
|
|
691
|
+
* history and this view stays on its page. A private view's window is
|
|
692
|
+
* private. Does nothing with nowhere to go.
|
|
693
|
+
*/
|
|
694
|
+
goBackInNewWindow(): void;
|
|
695
|
+
goForwardInNewWindow(): void;
|
|
514
696
|
stop(): void;
|
|
515
697
|
reload(): void;
|
|
516
698
|
}
|
|
@@ -699,6 +881,112 @@ declare global {
|
|
|
699
881
|
*/
|
|
700
882
|
dismiss(): void;
|
|
701
883
|
}
|
|
884
|
+
/**
|
|
885
|
+
* The {@link WEBVIEW_EXTERNAL_APP_EVENT} event. The engine defines it in
|
|
886
|
+
* `domicile_external_app_event.idl`.
|
|
887
|
+
*/
|
|
888
|
+
interface DomicileExternalAppEvent extends Event {
|
|
889
|
+
/** The link, such as `zoommtg://zoom.us/join?confno=1`. */
|
|
890
|
+
readonly url: string;
|
|
891
|
+
/** The site that opened it, such as `https://zoom.us`, or `""` for none. */
|
|
892
|
+
readonly origin: string;
|
|
893
|
+
/**
|
|
894
|
+
* Whether {@link DomicileExternalAppEvent.open} may remember the choice.
|
|
895
|
+
* Only a secure site may.
|
|
896
|
+
*/
|
|
897
|
+
readonly mayRemember: boolean;
|
|
898
|
+
/**
|
|
899
|
+
* Open the link in its scheme's default application. With `remember` and
|
|
900
|
+
* {@link DomicileExternalAppEvent.mayRemember}, the site opens these links
|
|
901
|
+
* without asking from then on. Answering twice, or after
|
|
902
|
+
* {@link WEBVIEW_EXTERNAL_APP_WITHDRAWN_EVENT}, throws an
|
|
903
|
+
* `InvalidStateError`.
|
|
904
|
+
*/
|
|
905
|
+
open(remember?: boolean): void;
|
|
906
|
+
/** Open nothing. */
|
|
907
|
+
dismiss(): void;
|
|
908
|
+
}
|
|
909
|
+
/**
|
|
910
|
+
* The {@link WEBVIEW_SIGN_IN_EVENT} event. The engine defines it in
|
|
911
|
+
* `domicile_sign_in_event.idl`.
|
|
912
|
+
*/
|
|
913
|
+
interface DomicileSignInEvent extends Event {
|
|
914
|
+
/** The server or proxy that asked, such as `https://example.com/`. */
|
|
915
|
+
readonly url: string;
|
|
916
|
+
/**
|
|
917
|
+
* Its name for what is behind the sign-in, as the server sent it. May be
|
|
918
|
+
* `""`.
|
|
919
|
+
*/
|
|
920
|
+
readonly realm: string;
|
|
921
|
+
/** Whether a proxy asked rather than the site. */
|
|
922
|
+
readonly proxy: boolean;
|
|
923
|
+
/** False when the password would cross the network unencrypted. */
|
|
924
|
+
readonly secure: boolean;
|
|
925
|
+
/**
|
|
926
|
+
* Send the user name and password. Answering twice, or after
|
|
927
|
+
* {@link WEBVIEW_SIGN_IN_WITHDRAWN_EVENT}, throws an `InvalidStateError`.
|
|
928
|
+
*/
|
|
929
|
+
signIn(username: string, password: string): void;
|
|
930
|
+
/** Cancel. */
|
|
931
|
+
dismiss(): void;
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* The {@link WEBVIEW_PROMPT_EVENT} event. The engine defines it in
|
|
935
|
+
* `domicile_prompt_event.idl`.
|
|
936
|
+
*/
|
|
937
|
+
interface DomicilePromptEvent extends Event {
|
|
938
|
+
/** What is asked: one of {@link WEBVIEW_PROMPT_KINDS}. */
|
|
939
|
+
readonly kind: WebViewPromptKind;
|
|
940
|
+
/** The site that asked, such as `https://vscode.dev`, or `""`. */
|
|
941
|
+
readonly origin: string;
|
|
942
|
+
/** A file's, device's or extension's name; `""` for the others. */
|
|
943
|
+
readonly subject: string;
|
|
944
|
+
/**
|
|
945
|
+
* A file's full path, the certificates to pick from, or an extension's
|
|
946
|
+
* permissions.
|
|
947
|
+
*/
|
|
948
|
+
readonly details: readonly string[];
|
|
949
|
+
/** The PIN a Bluetooth device shows, or `""`. */
|
|
950
|
+
readonly pin: string;
|
|
951
|
+
/**
|
|
952
|
+
* Answer yes, with the picked entry of `details` and the typed text where
|
|
953
|
+
* the kind reads them. Answering twice, or after
|
|
954
|
+
* {@link WEBVIEW_PROMPT_WITHDRAWN_EVENT}, throws an `InvalidStateError`.
|
|
955
|
+
*/
|
|
956
|
+
accept(choice?: number, text?: string): void;
|
|
957
|
+
/** Answer no. */
|
|
958
|
+
dismiss(): void;
|
|
959
|
+
}
|
|
960
|
+
/**
|
|
961
|
+
* The {@link WEBVIEW_PICKER_EVENT} event. The engine defines it in
|
|
962
|
+
* `domicile_picker_event.idl`.
|
|
963
|
+
*/
|
|
964
|
+
interface DomicilePickerEvent extends Event {
|
|
965
|
+
/** What to pick: one of {@link WEBVIEW_PICKER_KINDS}. */
|
|
966
|
+
readonly kind: WebViewPickerKind;
|
|
967
|
+
/** The control's value now, or the typed text for `list`. */
|
|
968
|
+
readonly value: string;
|
|
969
|
+
/** The control's `min`, `max` and `step` as written, or `""`. */
|
|
970
|
+
readonly min: string;
|
|
971
|
+
readonly max: string;
|
|
972
|
+
readonly step: string;
|
|
973
|
+
/** Suggestions: a `<datalist>`'s values, or a color input's colors. */
|
|
974
|
+
readonly options: readonly string[];
|
|
975
|
+
/** Each option's label at the same index, or `""` for none. */
|
|
976
|
+
readonly labels: readonly string[];
|
|
977
|
+
/** The control's box in the element's CSS pixels. */
|
|
978
|
+
readonly anchorX: number;
|
|
979
|
+
readonly anchorY: number;
|
|
980
|
+
readonly anchorWidth: number;
|
|
981
|
+
readonly anchorHeight: number;
|
|
982
|
+
/**
|
|
983
|
+
* Pick `value`, in the kind's format. Answering twice, or after
|
|
984
|
+
* {@link WEBVIEW_PICKER_WITHDRAWN_EVENT}, throws an `InvalidStateError`.
|
|
985
|
+
*/
|
|
986
|
+
choose(value: string): void;
|
|
987
|
+
/** Keep the old value. */
|
|
988
|
+
cancel(): void;
|
|
989
|
+
}
|
|
702
990
|
/**
|
|
703
991
|
* The {@link WEBVIEW_WILL_NAVIGATE_EVENT} event. The engine defines it in
|
|
704
992
|
* `domicile_will_navigate_event.idl`.
|
|
@@ -719,6 +1007,10 @@ declare global {
|
|
|
719
1007
|
"domicile-permission-request": DomicilePermissionRequestEvent;
|
|
720
1008
|
"domicile-device-request": DomicileDeviceRequestEvent;
|
|
721
1009
|
"domicile-dialog": DomicileDialogEvent;
|
|
1010
|
+
"domicile-external-app": DomicileExternalAppEvent;
|
|
1011
|
+
"domicile-picker": DomicilePickerEvent;
|
|
1012
|
+
"domicile-prompt": DomicilePromptEvent;
|
|
1013
|
+
"domicile-sign-in": DomicileSignInEvent;
|
|
722
1014
|
"domicile-will-navigate": DomicileWillNavigateEvent;
|
|
723
1015
|
}
|
|
724
1016
|
}
|
package/dist/webview-element.js
CHANGED
|
@@ -158,6 +158,12 @@ export const WEBVIEW_DESCRIPTION_CHANGE_EVENT = "domicile-description-change";
|
|
|
158
158
|
* Bubbles.
|
|
159
159
|
*/
|
|
160
160
|
export const WEBVIEW_TARGET_URL_CHANGE_EVENT = "domicile-target-url-change";
|
|
161
|
+
/**
|
|
162
|
+
* Fired when {@link HTMLWebViewElement.tooltip} changes, with
|
|
163
|
+
* {@link HTMLWebViewElement.tooltipX} and `tooltipY`. Carries no payload.
|
|
164
|
+
* Bubbles.
|
|
165
|
+
*/
|
|
166
|
+
export const WEBVIEW_TOOLTIP_CHANGE_EVENT = "domicile-tooltip-change";
|
|
161
167
|
/**
|
|
162
168
|
* Fired on Ctrl+wheel over a page that did not handle the wheel.
|
|
163
169
|
*
|
|
@@ -219,6 +225,30 @@ export const WEBVIEW_RENDER_PROCESS_GONE_REASONS = [
|
|
|
219
225
|
"launch-failed",
|
|
220
226
|
"memory-eviction",
|
|
221
227
|
];
|
|
228
|
+
/**
|
|
229
|
+
* Fired when {@link HTMLWebViewElement.pageFailure} or the attributes beside
|
|
230
|
+
* it change: the page failed to load, or a page loaded after one did. Carries
|
|
231
|
+
* no payload. Bubbles.
|
|
232
|
+
*/
|
|
233
|
+
export const WEBVIEW_PAGE_FAILURE_CHANGE_EVENT = "domicile-page-failure-change";
|
|
234
|
+
/**
|
|
235
|
+
* Why a `<webview>`'s page failed to load, as
|
|
236
|
+
* {@link HTMLWebViewElement.pageFailure}. The engine draws no error or warning
|
|
237
|
+
* page: the page is blank and the shell draws one.
|
|
238
|
+
*
|
|
239
|
+
* - `network`: it could not be reached (no network, no such host, refused,
|
|
240
|
+
* timed out, blocked); `pageFailureError` says which.
|
|
241
|
+
* - `http`: the server answered `pageFailureHttpStatus` with nothing to show.
|
|
242
|
+
* - `certificate`: the site's certificate is not trusted.
|
|
243
|
+
* - `warning`: the browser warned before loading it (Safe Browsing, a
|
|
244
|
+
* lookalike address, no secure connection under HTTPS-First).
|
|
245
|
+
*/
|
|
246
|
+
export const WEBVIEW_PAGE_FAILURES = [
|
|
247
|
+
"network",
|
|
248
|
+
"http",
|
|
249
|
+
"certificate",
|
|
250
|
+
"warning",
|
|
251
|
+
];
|
|
222
252
|
/**
|
|
223
253
|
* Fired when the page needs a file picked: an `<input type="file">` or a
|
|
224
254
|
* download. Bubbles.
|
|
@@ -384,6 +414,135 @@ export const WEBVIEW_DIALOG_EVENT = "domicile-dialog";
|
|
|
384
414
|
* afterward throws. Carries no payload. Bubbles.
|
|
385
415
|
*/
|
|
386
416
|
export const WEBVIEW_DIALOG_WITHDRAWN_EVENT = "domicile-dialog-withdrawn";
|
|
417
|
+
/**
|
|
418
|
+
* Fired when the page opens a link for an application, such as `zoommtg:` or
|
|
419
|
+
* `mailto:`, that the browser would ask about. Nothing opens until it is
|
|
420
|
+
* answered. Bubbles.
|
|
421
|
+
*
|
|
422
|
+
* The browser draws no dialog. Call `preventDefault()` to handle it, then
|
|
423
|
+
* answer with {@link DomicileExternalAppEvent.open} or
|
|
424
|
+
* {@link DomicileExternalAppEvent.dismiss}. If no listener calls
|
|
425
|
+
* `preventDefault()`, nothing opens. A site the user let open these links
|
|
426
|
+
* without asking, and a blocked scheme, fire nothing.
|
|
427
|
+
*/
|
|
428
|
+
export const WEBVIEW_EXTERNAL_APP_EVENT = "domicile-external-app";
|
|
429
|
+
/**
|
|
430
|
+
* Fired when a newer {@link WEBVIEW_EXTERNAL_APP_EVENT} replaces the one still
|
|
431
|
+
* unanswered, which then opens nothing. Answering it afterward throws. Carries
|
|
432
|
+
* no payload. Bubbles.
|
|
433
|
+
*/
|
|
434
|
+
export const WEBVIEW_EXTERNAL_APP_WITHDRAWN_EVENT = "domicile-external-app-withdrawn";
|
|
435
|
+
/**
|
|
436
|
+
* Fired when a site or a proxy asks for a user name and password (HTTP
|
|
437
|
+
* authentication). The request waits until it is answered. Bubbles.
|
|
438
|
+
*
|
|
439
|
+
* The browser draws no dialog. Call `preventDefault()` to handle it, then
|
|
440
|
+
* answer with {@link DomicileSignInEvent.signIn} or
|
|
441
|
+
* {@link DomicileSignInEvent.dismiss}. If no listener calls
|
|
442
|
+
* `preventDefault()`, it is canceled and the page shows the site's refusal.
|
|
443
|
+
*/
|
|
444
|
+
export const WEBVIEW_SIGN_IN_EVENT = "domicile-sign-in";
|
|
445
|
+
/**
|
|
446
|
+
* Fired when the browser drops the unanswered {@link WEBVIEW_SIGN_IN_EVENT},
|
|
447
|
+
* for example because the page navigated, or a newer one replaces it.
|
|
448
|
+
* Answering it afterward throws. Carries no payload. Bubbles.
|
|
449
|
+
*/
|
|
450
|
+
export const WEBVIEW_SIGN_IN_WITHDRAWN_EVENT = "domicile-sign-in-withdrawn";
|
|
451
|
+
/**
|
|
452
|
+
* Fired when the page, or an extension shown in the element, needs the user
|
|
453
|
+
* to answer a question the browser would otherwise ask with a dialog of its
|
|
454
|
+
* own: letting a site view or edit a file, picking a certificate to sign in
|
|
455
|
+
* with, pairing a Bluetooth device, or granting an extension permissions. See
|
|
456
|
+
* {@link WEBVIEW_PROMPT_KINDS}. The request waits until it is answered.
|
|
457
|
+
* Bubbles.
|
|
458
|
+
*
|
|
459
|
+
* The browser draws no dialog. Call `preventDefault()` to handle it, then
|
|
460
|
+
* answer with {@link DomicilePromptEvent.accept} or
|
|
461
|
+
* {@link DomicilePromptEvent.dismiss}. If no listener calls
|
|
462
|
+
* `preventDefault()`, it is answered no.
|
|
463
|
+
*/
|
|
464
|
+
export const WEBVIEW_PROMPT_EVENT = "domicile-prompt";
|
|
465
|
+
/**
|
|
466
|
+
* Fired when the browser drops the unanswered {@link WEBVIEW_PROMPT_EVENT},
|
|
467
|
+
* for example because the page navigated, or a newer one replaces it.
|
|
468
|
+
* Answering it afterward throws. Carries no payload. Bubbles.
|
|
469
|
+
*/
|
|
470
|
+
export const WEBVIEW_PROMPT_WITHDRAWN_EVENT = "domicile-prompt-withdrawn";
|
|
471
|
+
/**
|
|
472
|
+
* What a {@link WEBVIEW_PROMPT_EVENT} asks, as {@link DomicilePromptEvent.kind}:
|
|
473
|
+
*
|
|
474
|
+
* - `file-view`, `file-edit`: let the site view or edit the file or folder
|
|
475
|
+
* named `subject` (full path in `details[0]`).
|
|
476
|
+
* - `file-restricted`: the site picked a folder that holds system files.
|
|
477
|
+
* Accepting picks another; dismissing gives up.
|
|
478
|
+
* - `file-dangerous`: save `subject` anyway, though it may be harmful.
|
|
479
|
+
* - `client-certificate`: pick one of `details` (each `"name\nissuer"`) to
|
|
480
|
+
* sign in to the site with; pass its index to `accept`. Dismissing continues
|
|
481
|
+
* without one.
|
|
482
|
+
* - `bluetooth-pin`: the device `subject` needs a PIN; pass it as `accept`'s
|
|
483
|
+
* text.
|
|
484
|
+
* - `bluetooth-confirm`: pair with the device `subject`; `pin`, when set, must
|
|
485
|
+
* match the one the device shows.
|
|
486
|
+
* - `extension-install`, `extension-permissions`, `extension-re-enable`: add,
|
|
487
|
+
* grant more permissions to, or turn back on the extension `subject`, with
|
|
488
|
+
* the permissions in `details`.
|
|
489
|
+
* - `resend-form`: reloading the page titled `subject` sends its form again.
|
|
490
|
+
* Accepting resends; dismissing leaves the page as it is.
|
|
491
|
+
* - `unresponsive`: the page titled `subject` stopped responding. Accepting
|
|
492
|
+
* ends it, and the page then shows as crashed; dismissing waits. Withdrawn
|
|
493
|
+
* when it responds again.
|
|
494
|
+
*/
|
|
495
|
+
export const WEBVIEW_PROMPT_KINDS = [
|
|
496
|
+
"file-view",
|
|
497
|
+
"file-edit",
|
|
498
|
+
"file-restricted",
|
|
499
|
+
"file-dangerous",
|
|
500
|
+
"client-certificate",
|
|
501
|
+
"bluetooth-pin",
|
|
502
|
+
"bluetooth-confirm",
|
|
503
|
+
"extension-permissions",
|
|
504
|
+
"extension-install",
|
|
505
|
+
"extension-re-enable",
|
|
506
|
+
"resend-form",
|
|
507
|
+
"unresponsive",
|
|
508
|
+
];
|
|
509
|
+
/**
|
|
510
|
+
* Fired when a form control in the page opens a picker the browser would
|
|
511
|
+
* otherwise draw itself: a color input, a date or time input, or a text
|
|
512
|
+
* input's `<datalist>`. See {@link WEBVIEW_PICKER_KINDS}. The control waits
|
|
513
|
+
* until it is answered. Bubbles.
|
|
514
|
+
*
|
|
515
|
+
* The browser draws no picker. Call `preventDefault()` to handle it, then
|
|
516
|
+
* answer with {@link DomicilePickerEvent.choose} or
|
|
517
|
+
* {@link DomicilePickerEvent.cancel}. If no listener calls `preventDefault()`,
|
|
518
|
+
* the control keeps its value.
|
|
519
|
+
*/
|
|
520
|
+
export const WEBVIEW_PICKER_EVENT = "domicile-picker";
|
|
521
|
+
/**
|
|
522
|
+
* Fired when the page closes the unanswered {@link WEBVIEW_PICKER_EVENT}, for
|
|
523
|
+
* example because the control went away, or a newer one replaces it.
|
|
524
|
+
* Answering it afterward throws. Carries no payload. Bubbles.
|
|
525
|
+
*/
|
|
526
|
+
export const WEBVIEW_PICKER_WITHDRAWN_EVENT = "domicile-picker-withdrawn";
|
|
527
|
+
/**
|
|
528
|
+
* What a {@link WEBVIEW_PICKER_EVENT} picks, as {@link DomicilePickerEvent.kind},
|
|
529
|
+
* and the format of its value:
|
|
530
|
+
*
|
|
531
|
+
* - `color`: `"#rrggbb"`.
|
|
532
|
+
* - `date`, `time`, `datetime-local`, `month`, `week`: the input's HTML
|
|
533
|
+
* format, such as `"2026-11-06"`, `"13:45"`, `"2026-11-06T13:45"`,
|
|
534
|
+
* `"2026-11"` and `"2026-W45"`.
|
|
535
|
+
* - `list`: one of `options`, for a text input's `<datalist>`.
|
|
536
|
+
*/
|
|
537
|
+
export const WEBVIEW_PICKER_KINDS = [
|
|
538
|
+
"color",
|
|
539
|
+
"date",
|
|
540
|
+
"time",
|
|
541
|
+
"datetime-local",
|
|
542
|
+
"month",
|
|
543
|
+
"week",
|
|
544
|
+
"list",
|
|
545
|
+
];
|
|
387
546
|
/** The dialogs a page can open, as {@link DomicileDialogEvent.dialogType}. */
|
|
388
547
|
export const WEBVIEW_DIALOG_TYPES = [
|
|
389
548
|
"alert",
|
package/package.json
CHANGED
|
@@ -6,14 +6,13 @@
|
|
|
6
6
|
"description": "The SDK for writing a Domicile shell: the types of the desktop a shell is handed, the <app> and <webview> elements, keybindings, and the Shell type.",
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"@cprussin/tsconfig": "^5.0.0",
|
|
9
|
-
"@domicile-desktop/check-runner": "0.0.
|
|
10
|
-
"@domicile-desktop/test-support": "0.0.
|
|
9
|
+
"@domicile-desktop/check-runner": "0.0.2",
|
|
10
|
+
"@domicile-desktop/test-support": "0.0.2",
|
|
11
11
|
"@types/bun": "^1.4.2",
|
|
12
12
|
"typescript": "^7.0.2"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
|
-
"bun": ">=1.4.2"
|
|
16
|
-
"node": ">=24"
|
|
15
|
+
"bun": ">=1.4.2"
|
|
17
16
|
},
|
|
18
17
|
"exports": {
|
|
19
18
|
"./app": {
|
|
@@ -242,7 +241,7 @@
|
|
|
242
241
|
"test:unit": "bun test"
|
|
243
242
|
},
|
|
244
243
|
"type": "module",
|
|
245
|
-
"version": "
|
|
244
|
+
"version": "2.2.0",
|
|
246
245
|
"repository": {
|
|
247
246
|
"type": "git",
|
|
248
247
|
"url": "git+https://github.com/cprussin/domicile.git",
|