@domicile-desktop/sdk 0.0.0-alpha-89a0e9c17f7a → 0.0.0-alpha-e89d4b4fa606
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/domicile-host.d.ts +6 -0
- package/dist/fake-host.d.ts +6 -5
- package/dist/fake-host.js +7 -5
- package/package.json +1 -1
package/dist/domicile-host.d.ts
CHANGED
|
@@ -113,6 +113,12 @@ export type DomicileBrowserWindow = {
|
|
|
113
113
|
* private window's new windows are private too.
|
|
114
114
|
*/
|
|
115
115
|
readonly isPrivate: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* Whether this is an app window, opened by `domicile open-app`. Draw it as
|
|
118
|
+
* an application: no address bar. Its page's new windows are browser
|
|
119
|
+
* windows. See docs/architecture/WEB-APPS.md.
|
|
120
|
+
*/
|
|
121
|
+
readonly isApp: boolean;
|
|
116
122
|
};
|
|
117
123
|
/**
|
|
118
124
|
* One thing that was copied, as a row of the clipboard's history.
|
package/dist/fake-host.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DomicileHost, DomicileHostEventMap, DomicileWindow } from "./domicile-host";
|
|
1
|
+
import type { DomicileBrowserWindow, DomicileHost, DomicileHostEventMap, DomicileWindow } from "./domicile-host";
|
|
2
2
|
/** The attributes of the desktop a test sets. */
|
|
3
3
|
export type DomicileState = {
|
|
4
4
|
-readonly [K in keyof DomicileHost as DomicileHost[K] extends (...args: never[]) => unknown ? never : K]: DomicileHost[K];
|
|
@@ -22,11 +22,12 @@ export declare class FakeDomicileHost {
|
|
|
22
22
|
close(appId: string): void;
|
|
23
23
|
/**
|
|
24
24
|
* The engine opened a browser window at `url`, as for `domicile open-url`,
|
|
25
|
-
* `target="_blank"`,
|
|
26
|
-
* `openBrowserWindow` calls this too, and
|
|
27
|
-
* `isPrivate`. Ids count up from `"1"`; the
|
|
25
|
+
* `target="_blank"`, with `popupWindow` an extension's popup window, or with
|
|
26
|
+
* `isApp` `domicile open-app`. `openBrowserWindow` calls this too, and
|
|
27
|
+
* `openPrivateBrowserWindow` with `isPrivate`. Ids count up from `"1"`; the
|
|
28
|
+
* asked-for size is 0.
|
|
28
29
|
*/
|
|
29
|
-
openBrowser(url: string, popupWindow?:
|
|
30
|
+
openBrowser(url: string, { isApp, isPrivate, popupWindow, }?: Partial<Pick<DomicileBrowserWindow, "isApp" | "isPrivate" | "popupWindow">>): void;
|
|
30
31
|
/** The engine closed browser window `id`. `closeBrowserWindow` calls this too. */
|
|
31
32
|
closeBrowser(id: string): void;
|
|
32
33
|
/** Dispatch a moment, such as `shortcut` or `focusrequested`, with its fields. */
|
package/dist/fake-host.js
CHANGED
|
@@ -101,7 +101,7 @@ export class FakeDomicileHost {
|
|
|
101
101
|
else if (name === "openPrivateBrowserWindow") {
|
|
102
102
|
return (url) => {
|
|
103
103
|
calls.push([name, url]);
|
|
104
|
-
this.openBrowser(url,
|
|
104
|
+
this.openBrowser(url, { isPrivate: true });
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
else if (name === "closeBrowserWindow") {
|
|
@@ -155,11 +155,12 @@ export class FakeDomicileHost {
|
|
|
155
155
|
}
|
|
156
156
|
/**
|
|
157
157
|
* The engine opened a browser window at `url`, as for `domicile open-url`,
|
|
158
|
-
* `target="_blank"`,
|
|
159
|
-
* `openBrowserWindow` calls this too, and
|
|
160
|
-
* `isPrivate`. Ids count up from `"1"`; the
|
|
158
|
+
* `target="_blank"`, with `popupWindow` an extension's popup window, or with
|
|
159
|
+
* `isApp` `domicile open-app`. `openBrowserWindow` calls this too, and
|
|
160
|
+
* `openPrivateBrowserWindow` with `isPrivate`. Ids count up from `"1"`; the
|
|
161
|
+
* asked-for size is 0.
|
|
161
162
|
*/
|
|
162
|
-
openBrowser(url, popupWindow = null,
|
|
163
|
+
openBrowser(url, { isApp = false, isPrivate = false, popupWindow = null, } = {}) {
|
|
163
164
|
this.#browsersOpened += 1;
|
|
164
165
|
this.set({
|
|
165
166
|
browserWindows: [
|
|
@@ -167,6 +168,7 @@ export class FakeDomicileHost {
|
|
|
167
168
|
{
|
|
168
169
|
height: 0,
|
|
169
170
|
id: this.#browsersOpened.toString(),
|
|
171
|
+
isApp,
|
|
170
172
|
isPrivate,
|
|
171
173
|
popupWindow,
|
|
172
174
|
title: "",
|
package/package.json
CHANGED