@celljs/ta-web 4.34.0 → 4.35.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/README.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/apps/app-icon.d.ts +23 -0
- package/esm/browser/apps/app-icon.js +98 -0
- package/esm/browser/apps/app-settings.d.ts +6 -0
- package/esm/browser/apps/app-settings.js +67 -0
- package/esm/browser/apps/app-window-util.d.ts +23 -0
- package/esm/browser/apps/app-window-util.js +27 -0
- package/esm/browser/apps/app-window.d.ts +9 -0
- package/esm/browser/apps/app-window.js +90 -0
- package/esm/browser/apps/web-apps.d.ts +29 -0
- package/esm/browser/apps/web-apps.js +57 -0
- package/esm/browser/assistant/call-keeper.d.ts +2 -5
- package/esm/browser/assistant/call-keeper.js +7 -11
- package/esm/browser/components/access-settings.d.ts +6 -0
- package/esm/browser/components/access-settings.js +52 -0
- package/esm/browser/components/app-root.d.ts +6 -0
- package/esm/browser/components/app-root.js +34 -0
- package/esm/browser/components/app-view.d.ts +8 -2
- package/esm/browser/components/app-view.js +1 -25
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/settings-more.js +6 -0
- package/esm/browser/device/screen-awake.d.ts +16 -0
- package/esm/browser/device/screen-awake.js +37 -0
- package/esm/browser/device/sheet-swipe.js +4 -0
- package/esm/browser/extension/icons.js +2 -1
- package/esm/browser/extension/web-access.d.ts +16 -0
- package/esm/browser/extension/web-access.js +75 -0
- package/esm/browser/extension/web-api-desktop.d.ts +23 -0
- package/esm/browser/extension/web-api-spec.d.ts +70 -0
- package/esm/browser/extension/web-api-spec.js +223 -0
- package/esm/browser/extension/web-extension-api.d.ts +6 -0
- package/esm/browser/extension/web-extension-context.js +11 -2
- package/esm/browser/extension/web-extension-run.d.ts +6 -1
- package/esm/browser/extension/web-extension-run.js +25 -0
- package/esm/browser/extension/web-extensions-running.d.ts +18 -1
- package/esm/browser/extension/web-extensions-running.js +102 -9
- package/esm/browser/extension/web-pages.d.ts +5 -0
- package/esm/browser/extension/web-pages.js +3 -0
- package/esm/browser/i18n/en/common.d.ts +1 -0
- package/esm/browser/i18n/en/common.js +1 -0
- package/esm/browser/i18n/en/discover.d.ts +11 -0
- package/esm/browser/i18n/en/discover.js +11 -0
- package/esm/browser/i18n/en/settings.d.ts +28 -0
- package/esm/browser/i18n/en/settings.js +28 -0
- package/esm/browser/i18n/ja/common.js +1 -0
- package/esm/browser/i18n/ja/discover.js +11 -0
- package/esm/browser/i18n/ja/settings.js +28 -0
- package/esm/browser/i18n/locales.d.ts +41 -3
- package/esm/browser/i18n/messages.d.ts +40 -2
- package/esm/browser/i18n/zh/common.js +1 -0
- package/esm/browser/i18n/zh/discover.js +11 -0
- package/esm/browser/i18n/zh/settings.js +28 -0
- package/esm/browser/i18n/zh-tw/common.js +1 -0
- package/esm/browser/i18n/zh-tw/discover.js +11 -0
- package/esm/browser/i18n/zh-tw/settings.js +28 -0
- package/esm/browser/index.d.ts +1 -0
- package/esm/browser/index.js +1 -0
- package/esm/browser/notices/notices.js +1 -0
- package/esm/browser/sandbox/channel/channel.d.ts +56 -0
- package/esm/browser/sandbox/channel/channel.js +124 -0
- package/esm/browser/sandbox/channel/codec.d.ts +80 -0
- package/esm/browser/sandbox/channel/codec.js +251 -0
- package/esm/browser/sandbox/hook-host.d.ts +23 -0
- package/esm/browser/sandbox/hook-host.js +61 -0
- package/esm/browser/sandbox/isolated-host.d.ts +105 -0
- package/esm/browser/sandbox/isolated-host.js +395 -0
- package/esm/browser/sandbox/remote/remote-copy.d.ts +56 -0
- package/esm/browser/sandbox/remote/remote-copy.js +302 -0
- package/esm/browser/sandbox/remote/remote-mirror.d.ts +61 -0
- package/esm/browser/sandbox/remote/remote-mirror.js +341 -0
- package/esm/browser/sandbox/remote/remote-protocol.d.ts +79 -0
- package/esm/browser/sandbox/remote/remote-protocol.js +54 -0
- package/esm/browser/sandbox/remote/remote-styles.d.ts +10 -0
- package/esm/browser/sandbox/remote/remote-styles.js +113 -0
- package/esm/browser/sandbox/remote-root.d.ts +11 -0
- package/esm/browser/sandbox/remote-root.js +81 -0
- package/esm/browser/sandbox/runtime/frame-api.d.ts +28 -0
- package/esm/browser/sandbox/runtime/frame-api.js +147 -0
- package/esm/browser/sandbox/runtime/frame-features.d.ts +6 -0
- package/esm/browser/sandbox/runtime/frame-features.js +50 -0
- package/esm/browser/sandbox/runtime/frame-parts.d.ts +36 -0
- package/esm/browser/sandbox/runtime/frame-parts.js +69 -0
- package/esm/browser/sandbox/runtime/frame-roots.d.ts +26 -0
- package/esm/browser/sandbox/runtime/frame-roots.js +76 -0
- package/esm/browser/sandbox/runtime/frame-store.d.ts +9 -0
- package/esm/browser/sandbox/runtime/frame-store.js +18 -0
- package/esm/browser/sandbox/runtime/sandbox-runtime.d.ts +11 -0
- package/esm/browser/sandbox/runtime/sandbox-runtime.js +45 -0
- package/esm/browser/sandbox/sandbox-features.d.ts +25 -0
- package/esm/browser/sandbox/sandbox-features.js +32 -0
- package/esm/browser/sandbox/sandbox-frame.d.ts +21 -0
- package/esm/browser/sandbox/sandbox-frame.js +75 -0
- package/esm/browser/sandbox/sandbox-guards.d.ts +19 -0
- package/esm/browser/sandbox/sandbox-guards.js +74 -0
- package/esm/browser/sandbox/sandbox-protocol.d.ts +57 -0
- package/esm/browser/sandbox/sandbox-protocol.js +49 -0
- package/esm/browser/sandbox/sandbox-runtime-code.d.ts +1 -0
- package/esm/browser/sandbox/sandbox-runtime-code.js +3 -0
- package/esm/browser/sandbox/web-sandbox.d.ts +28 -0
- package/esm/browser/sandbox/web-sandbox.js +44 -0
- package/esm/browser/settings/settings-protocol.d.ts +2 -0
- package/esm/browser/settings/settings-protocol.js +2 -0
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +5 -0
- package/esm/browser/style/tints.d.ts +2 -0
- package/esm/browser/style/tints.js +10 -0
- package/esm/browser/util/desktop.d.ts +31 -1
- package/esm/browser/util/desktop.js +20 -0
- package/esm/browser/view.js +1 -1
- package/lib/browser/apps/app-icon.d.ts +24 -0
- package/lib/browser/apps/app-icon.js +134 -0
- package/lib/browser/apps/app-settings.d.ts +7 -0
- package/lib/browser/apps/app-settings.js +103 -0
- package/lib/browser/apps/app-window-util.d.ts +24 -0
- package/lib/browser/apps/app-window-util.js +30 -0
- package/lib/browser/apps/app-window.d.ts +10 -0
- package/lib/browser/apps/app-window.js +126 -0
- package/lib/browser/apps/web-apps.d.ts +30 -0
- package/lib/browser/apps/web-apps.js +61 -0
- package/lib/browser/assistant/call-keeper.d.ts +2 -5
- package/lib/browser/assistant/call-keeper.js +6 -10
- package/lib/browser/components/access-settings.d.ts +7 -0
- package/lib/browser/components/access-settings.js +88 -0
- package/lib/browser/components/app-root.d.ts +7 -0
- package/lib/browser/components/app-root.js +70 -0
- package/lib/browser/components/app-view.d.ts +8 -2
- package/lib/browser/components/app-view.js +1 -25
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/settings-more.js +6 -0
- package/lib/browser/device/screen-awake.d.ts +16 -0
- package/lib/browser/device/screen-awake.js +39 -1
- package/lib/browser/device/sheet-swipe.js +4 -0
- package/lib/browser/extension/icons.js +1 -0
- package/lib/browser/extension/web-access.d.ts +17 -0
- package/lib/browser/extension/web-access.js +78 -0
- package/lib/browser/extension/web-api-desktop.d.ts +23 -0
- package/lib/browser/extension/web-api-spec.d.ts +71 -0
- package/lib/browser/extension/web-api-spec.js +226 -0
- package/lib/browser/extension/web-extension-api.d.ts +6 -0
- package/lib/browser/extension/web-extension-context.js +11 -2
- package/lib/browser/extension/web-extension-run.d.ts +6 -1
- package/lib/browser/extension/web-extension-run.js +25 -0
- package/lib/browser/extension/web-extensions-running.d.ts +18 -1
- package/lib/browser/extension/web-extensions-running.js +102 -9
- package/lib/browser/extension/web-pages.d.ts +5 -0
- package/lib/browser/extension/web-pages.js +3 -0
- package/lib/browser/i18n/en/common.d.ts +1 -0
- package/lib/browser/i18n/en/common.js +1 -0
- package/lib/browser/i18n/en/discover.d.ts +11 -0
- package/lib/browser/i18n/en/discover.js +11 -0
- package/lib/browser/i18n/en/settings.d.ts +28 -0
- package/lib/browser/i18n/en/settings.js +28 -0
- package/lib/browser/i18n/ja/common.js +1 -0
- package/lib/browser/i18n/ja/discover.js +11 -0
- package/lib/browser/i18n/ja/settings.js +28 -0
- package/lib/browser/i18n/locales.d.ts +41 -3
- package/lib/browser/i18n/messages.d.ts +40 -2
- package/lib/browser/i18n/zh/common.js +1 -0
- package/lib/browser/i18n/zh/discover.js +11 -0
- package/lib/browser/i18n/zh/settings.js +28 -0
- package/lib/browser/i18n/zh-tw/common.js +1 -0
- package/lib/browser/i18n/zh-tw/discover.js +11 -0
- package/lib/browser/i18n/zh-tw/settings.js +28 -0
- package/lib/browser/index.d.ts +1 -0
- package/lib/browser/index.js +1 -0
- package/lib/browser/notices/notices.js +1 -0
- package/lib/browser/sandbox/channel/channel.d.ts +57 -0
- package/lib/browser/sandbox/channel/channel.js +128 -0
- package/lib/browser/sandbox/channel/codec.d.ts +81 -0
- package/lib/browser/sandbox/channel/codec.js +256 -0
- package/lib/browser/sandbox/hook-host.d.ts +24 -0
- package/lib/browser/sandbox/hook-host.js +98 -0
- package/lib/browser/sandbox/isolated-host.d.ts +106 -0
- package/lib/browser/sandbox/isolated-host.js +432 -0
- package/lib/browser/sandbox/remote/remote-copy.d.ts +57 -0
- package/lib/browser/sandbox/remote/remote-copy.js +306 -0
- package/lib/browser/sandbox/remote/remote-mirror.d.ts +62 -0
- package/lib/browser/sandbox/remote/remote-mirror.js +345 -0
- package/lib/browser/sandbox/remote/remote-protocol.d.ts +80 -0
- package/lib/browser/sandbox/remote/remote-protocol.js +57 -0
- package/lib/browser/sandbox/remote/remote-styles.d.ts +11 -0
- package/lib/browser/sandbox/remote/remote-styles.js +116 -0
- package/lib/browser/sandbox/remote-root.d.ts +12 -0
- package/lib/browser/sandbox/remote-root.js +117 -0
- package/lib/browser/sandbox/runtime/frame-api.d.ts +29 -0
- package/lib/browser/sandbox/runtime/frame-api.js +183 -0
- package/lib/browser/sandbox/runtime/frame-features.d.ts +7 -0
- package/lib/browser/sandbox/runtime/frame-features.js +53 -0
- package/lib/browser/sandbox/runtime/frame-parts.d.ts +37 -0
- package/lib/browser/sandbox/runtime/frame-parts.js +106 -0
- package/lib/browser/sandbox/runtime/frame-roots.d.ts +27 -0
- package/lib/browser/sandbox/runtime/frame-roots.js +113 -0
- package/lib/browser/sandbox/runtime/frame-store.d.ts +10 -0
- package/lib/browser/sandbox/runtime/frame-store.js +22 -0
- package/lib/browser/sandbox/runtime/sandbox-runtime.d.ts +12 -0
- package/lib/browser/sandbox/runtime/sandbox-runtime.js +47 -0
- package/lib/browser/sandbox/sandbox-features.d.ts +26 -0
- package/lib/browser/sandbox/sandbox-features.js +35 -0
- package/lib/browser/sandbox/sandbox-frame.d.ts +22 -0
- package/lib/browser/sandbox/sandbox-frame.js +79 -0
- package/lib/browser/sandbox/sandbox-guards.d.ts +20 -0
- package/lib/browser/sandbox/sandbox-guards.js +77 -0
- package/lib/browser/sandbox/sandbox-protocol.d.ts +58 -0
- package/lib/browser/sandbox/sandbox-protocol.js +52 -0
- package/lib/browser/sandbox/sandbox-runtime-code.d.ts +2 -0
- package/lib/browser/sandbox/sandbox-runtime-code.js +6 -0
- package/lib/browser/sandbox/web-sandbox.d.ts +29 -0
- package/lib/browser/sandbox/web-sandbox.js +47 -0
- package/lib/browser/settings/settings-protocol.d.ts +2 -0
- package/lib/browser/settings/settings-protocol.js +2 -0
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +5 -0
- package/lib/browser/style/tints.d.ts +2 -0
- package/lib/browser/style/tints.js +10 -0
- package/lib/browser/util/desktop.d.ts +31 -1
- package/lib/browser/util/desktop.js +20 -0
- package/lib/browser/view.js +2 -2
- package/package.json +8 -8
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The window of a page installed as an app (docs/design/ta-install-as-app.md 2): the web client connected as in the main
|
|
4
|
+
* window, with its extensions loaded, showing that page alone; the notices, dialogs and sharing of the page over it. No
|
|
5
|
+
* conversation, no navigation: what the page opens of those opens in the main window.
|
|
6
|
+
*/
|
|
7
|
+
export declare function AppWindow({ id }: {
|
|
8
|
+
id: string;
|
|
9
|
+
}): React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=app-window.d.ts.map
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.AppWindow = AppWindow;
|
|
37
|
+
const react_1 = require("@celljs/react");
|
|
38
|
+
const React = __importStar(require("react"));
|
|
39
|
+
const app_contexts_1 = require("../components/app-contexts");
|
|
40
|
+
const app_nav_1 = require("../components/app-nav");
|
|
41
|
+
const app_shell_hooks_1 = require("../components/app-shell-hooks");
|
|
42
|
+
const custom_host_1 = require("../components/custom-host");
|
|
43
|
+
const empty_state_1 = require("../components/empty-state");
|
|
44
|
+
const link_dialog_1 = require("../components/link-dialog");
|
|
45
|
+
const loading_1 = require("../components/loading");
|
|
46
|
+
const notice_center_1 = require("../components/notice-center");
|
|
47
|
+
const remote_prompts_1 = require("../components/remote-prompts");
|
|
48
|
+
const share_dialog_1 = require("../components/share-dialog");
|
|
49
|
+
const workbench_view_1 = require("../components/workbench-view");
|
|
50
|
+
const files_protocol_1 = require("../files/files-protocol");
|
|
51
|
+
const hooks_1 = require("../hooks");
|
|
52
|
+
const use_t_1 = require("../i18n/use-t");
|
|
53
|
+
const desktop_1 = require("../util/desktop");
|
|
54
|
+
const thumbnail_1 = require("../util/thumbnail");
|
|
55
|
+
const app_window_util_1 = require("./app-window-util");
|
|
56
|
+
/**
|
|
57
|
+
* The window of a page installed as an app (docs/design/ta-install-as-app.md 2): the web client connected as in the main
|
|
58
|
+
* window, with its extensions loaded, showing that page alone; the notices, dialogs and sharing of the page over it. No
|
|
59
|
+
* conversation, no navigation: what the page opens of those opens in the main window.
|
|
60
|
+
*/
|
|
61
|
+
function AppWindow({ id }) {
|
|
62
|
+
const t = (0, use_t_1.useT)();
|
|
63
|
+
const [workbench, bench] = (0, hooks_1.useWorkbench)();
|
|
64
|
+
const [extensions, host] = (0, hooks_1.useWebExtensions)();
|
|
65
|
+
const [{ theme }] = (0, hooks_1.useSettings)();
|
|
66
|
+
const files = (0, react_1.useInject)(files_protocol_1.TaFiles);
|
|
67
|
+
const fileUrl = React.useCallback(async (path, box) => files.loadable(thumbnail_1.ThumbnailUtil.boxed(await bench.workspace.fileUrl(path), box)), [bench, files]);
|
|
68
|
+
const openLink = (0, hooks_1.useOpenLink)(undefined);
|
|
69
|
+
const online = workbench.status === 'online';
|
|
70
|
+
// Offline, its extension starts from the code this device kept, as in the main window.
|
|
71
|
+
const reachable = online || workbench.status === 'offline';
|
|
72
|
+
(0, workbench_view_1.useDocument)();
|
|
73
|
+
(0, app_shell_hooks_1.useRefresh)(online);
|
|
74
|
+
(0, app_shell_hooks_1.useTitlebarColor)(workbench.status !== 'signed-out', theme);
|
|
75
|
+
React.useEffect(() => {
|
|
76
|
+
void bench.start();
|
|
77
|
+
}, [bench]);
|
|
78
|
+
// The list of extensions read once: the page is there, or on its way, or gone.
|
|
79
|
+
const [listed, setListed] = React.useState(false);
|
|
80
|
+
React.useEffect(() => {
|
|
81
|
+
if (!reachable) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
let live = true;
|
|
85
|
+
void host
|
|
86
|
+
.refresh()
|
|
87
|
+
.catch(() => undefined)
|
|
88
|
+
.then(() => live && setListed(true));
|
|
89
|
+
return () => {
|
|
90
|
+
live = false;
|
|
91
|
+
};
|
|
92
|
+
}, [reachable, host]);
|
|
93
|
+
const page = extensions.page;
|
|
94
|
+
// Its page alone (one of its extension, for an id that is the extension's name), never what the tab showed before.
|
|
95
|
+
const ours = app_window_util_1.AppWindowUtil.shows(id, page);
|
|
96
|
+
const known = app_window_util_1.AppWindowUtil.known(id, extensions.views, extensions.onOpen);
|
|
97
|
+
React.useEffect(() => {
|
|
98
|
+
if (listed && known && !ours) {
|
|
99
|
+
void host.showView(id);
|
|
100
|
+
}
|
|
101
|
+
}, [listed, known, ours, host, id]);
|
|
102
|
+
const [late, setLate] = React.useState(false);
|
|
103
|
+
React.useEffect(() => {
|
|
104
|
+
if (!listed) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const timer = setTimeout(() => setLate(true), app_window_util_1.AppWindowUtil.START_MS);
|
|
108
|
+
return () => clearTimeout(timer);
|
|
109
|
+
}, [listed]);
|
|
110
|
+
const gone = listed && !known && (late || !app_window_util_1.AppWindowUtil.starting(id, extensions.extensions));
|
|
111
|
+
if (workbench.status === 'signed-out') {
|
|
112
|
+
return workbench.leaving ? React.createElement("div", { className: "ta-signin" }) : React.createElement(workbench_view_1.SignIn, { error: workbench.error });
|
|
113
|
+
}
|
|
114
|
+
const view = ours ? extensions.views.find(candidate => candidate.id === page && candidate.location === 'page') : undefined;
|
|
115
|
+
const remove = () => { var _a; return void ((_a = desktop_1.DesktopUtil.apps()) === null || _a === void 0 ? void 0 : _a.remove(id)); };
|
|
116
|
+
return (React.createElement(app_contexts_1.AppContexts, { fileUrl: fileUrl, openLink: openLink },
|
|
117
|
+
React.createElement("div", { className: "ta-app ta-app-alone" },
|
|
118
|
+
React.createElement("main", { className: "ta-main" }, view ? (React.createElement(app_nav_1.PageView, { view: view })) : gone ? (React.createElement(empty_state_1.EmptyState, { title: t('ta.apps.gone'), hint: t('ta.apps.goneHint') },
|
|
119
|
+
React.createElement("button", { type: "button", className: "ta-button", onClick: remove }, t('ta.apps.remove')))) : (React.createElement(loading_1.Loading, null))),
|
|
120
|
+
React.createElement(notice_center_1.NoticeCenter, null),
|
|
121
|
+
React.createElement(link_dialog_1.LinkDialog, null),
|
|
122
|
+
React.createElement(remote_prompts_1.RemotePrompts, null),
|
|
123
|
+
React.createElement(share_dialog_1.ShareHost, null),
|
|
124
|
+
React.createElement(custom_host_1.CustomHost, null))));
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=app-window.js.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { WebApps, WebIcon, WebInstalledApp } from '../extension/web-extension-api';
|
|
2
|
+
import type { WebPageInfo } from '../extension/web-pages';
|
|
3
|
+
import type { TaNotices } from '../notices/notices-protocol';
|
|
4
|
+
import type { TaSettings } from '../settings/settings-protocol';
|
|
5
|
+
import { type DesktopApps } from '../util/desktop';
|
|
6
|
+
/** What installing a page reads of the page: its pages as the launcher lists them, the settings, where it tells. */
|
|
7
|
+
export interface WebAppsHost {
|
|
8
|
+
pages(): readonly WebPageInfo[];
|
|
9
|
+
readonly settings: TaSettings;
|
|
10
|
+
readonly notices: TaNotices;
|
|
11
|
+
/** Drawn for a page without a glyph of its own, or one a sandbox draws. */
|
|
12
|
+
readonly fallbackIcon: WebIcon;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* `ui.apps` (docs/design/ta-install-as-app.md 2): a page installed with the title and the tile the launcher shows it
|
|
16
|
+
* with, through Ta Desktop (DesktopUtil.apps), which knows pages by id, name and icon alone.
|
|
17
|
+
*/
|
|
18
|
+
export declare class TaWebApps implements WebApps {
|
|
19
|
+
protected readonly desktop: DesktopApps;
|
|
20
|
+
protected readonly host: WebAppsHost;
|
|
21
|
+
constructor(desktop: DesktopApps, host: WebAppsHost);
|
|
22
|
+
/** Where Ta Desktop installs pages as apps; none elsewhere. */
|
|
23
|
+
static of(host: WebAppsHost): TaWebApps | undefined;
|
|
24
|
+
get installable(): boolean;
|
|
25
|
+
list(): Promise<WebInstalledApp[]>;
|
|
26
|
+
install(id: string): Promise<void>;
|
|
27
|
+
remove(id: string): Promise<void>;
|
|
28
|
+
open(id: string): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=web-apps.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaWebApps = void 0;
|
|
4
|
+
const use_t_1 = require("../i18n/use-t");
|
|
5
|
+
const tints_1 = require("../style/tints");
|
|
6
|
+
const desktop_1 = require("../util/desktop");
|
|
7
|
+
const app_icon_1 = require("./app-icon");
|
|
8
|
+
/**
|
|
9
|
+
* `ui.apps` (docs/design/ta-install-as-app.md 2): a page installed with the title and the tile the launcher shows it
|
|
10
|
+
* with, through Ta Desktop (DesktopUtil.apps), which knows pages by id, name and icon alone.
|
|
11
|
+
*/
|
|
12
|
+
class TaWebApps {
|
|
13
|
+
constructor(desktop, host) {
|
|
14
|
+
this.desktop = desktop;
|
|
15
|
+
this.host = host;
|
|
16
|
+
}
|
|
17
|
+
/** Where Ta Desktop installs pages as apps; none elsewhere. */
|
|
18
|
+
static of(host) {
|
|
19
|
+
const desktop = desktop_1.DesktopUtil.apps();
|
|
20
|
+
return desktop ? new TaWebApps(desktop, host) : undefined;
|
|
21
|
+
}
|
|
22
|
+
get installable() {
|
|
23
|
+
return this.host.settings.state.settings.installApps;
|
|
24
|
+
}
|
|
25
|
+
async list() {
|
|
26
|
+
return (await this.desktop.list()).map(({ id, name, installedAt }) => ({ id, name, installedAt }));
|
|
27
|
+
}
|
|
28
|
+
async install(id) {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
const say = (0, use_t_1.translator)(this.host.settings.state.language);
|
|
31
|
+
if (!this.installable) {
|
|
32
|
+
throw new Error(say('ta.apps.off'));
|
|
33
|
+
}
|
|
34
|
+
const page = this.host.pages().find(candidate => candidate.id === id);
|
|
35
|
+
if (!page) {
|
|
36
|
+
throw new Error(say('ta.apps.gone'));
|
|
37
|
+
}
|
|
38
|
+
const tint = (_a = page.tint) !== null && _a !== void 0 ? _a : tints_1.TintUtil.of(page.extension);
|
|
39
|
+
const glyph = (_b = page.icon) !== null && _b !== void 0 ? _b : this.host.fallbackIcon;
|
|
40
|
+
const [png, small] = await Promise.all([
|
|
41
|
+
app_icon_1.AppIcon.draw(glyph, this.host.fallbackIcon, tint, app_icon_1.AppIcon.SIZE),
|
|
42
|
+
app_icon_1.AppIcon.draw(glyph, this.host.fallbackIcon, tint, app_icon_1.AppIcon.SMALL),
|
|
43
|
+
]);
|
|
44
|
+
const installed = await this.desktop.install({ id, name: page.title, png, small });
|
|
45
|
+
await this.desktop.open(id);
|
|
46
|
+
if (installed.problem) {
|
|
47
|
+
this.host.notices.notify(say('ta.apps.noEntry', { name: page.title }), { level: 'warning', detail: installed.problem });
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
this.host.notices.notify(say('ta.apps.installed', { name: page.title }));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
remove(id) {
|
|
54
|
+
return this.desktop.remove(id);
|
|
55
|
+
}
|
|
56
|
+
open(id) {
|
|
57
|
+
return this.desktop.open(id);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.TaWebApps = TaWebApps;
|
|
61
|
+
//# sourceMappingURL=web-apps.js.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ScreenAwake } from '../device/screen-awake';
|
|
2
1
|
import { type StateSpec, TaState } from '../state/state-protocol';
|
|
3
2
|
import type { VoiceCall } from './voice-call';
|
|
4
3
|
import type { CallPhase } from './voice-call-protocol';
|
|
@@ -139,10 +138,8 @@ export declare class TaCallKeeperImpl implements TaCallKeeper {
|
|
|
139
138
|
/** Follows the call shared: another page asked this one's to hang up, or one went on or ended elsewhere. */
|
|
140
139
|
protected follow(): void;
|
|
141
140
|
protected drop(): void;
|
|
142
|
-
/**
|
|
143
|
-
protected
|
|
144
|
-
/** The screen stays on while a call goes on: locked, the device stops hearing the user. */
|
|
145
|
-
protected readonly awake: ScreenAwake;
|
|
141
|
+
/** Held while a call goes on: the screen stays on (locked, the device stops hearing the user), Ta Desktop awake. */
|
|
142
|
+
protected letAwakeGo?: () => void;
|
|
146
143
|
protected changed(): void;
|
|
147
144
|
}
|
|
148
145
|
//# sourceMappingURL=call-keeper.d.ts.map
|
|
@@ -14,7 +14,6 @@ const core_1 = require("@celljs/core");
|
|
|
14
14
|
const device_protocol_1 = require("../device/device-protocol");
|
|
15
15
|
const screen_awake_1 = require("../device/screen-awake");
|
|
16
16
|
const state_protocol_1 = require("../state/state-protocol");
|
|
17
|
-
const desktop_1 = require("../util/desktop");
|
|
18
17
|
const call_window_1 = require("../video-call/call-window");
|
|
19
18
|
exports.TaCallKeeper = Symbol('TaCallKeeper');
|
|
20
19
|
var CallKeeperUtil;
|
|
@@ -93,10 +92,6 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
|
|
|
93
92
|
/** This page, as the call it shares says (SharedCall.page). */
|
|
94
93
|
this.page = Math.random().toString(36).slice(2, 10);
|
|
95
94
|
this.sharedAt = 0;
|
|
96
|
-
/** What Ta Desktop was told last: whether a call goes on. */
|
|
97
|
-
this.told = false;
|
|
98
|
-
/** The screen stays on while a call goes on: locked, the device stops hearing the user. */
|
|
99
|
-
this.awake = new screen_awake_1.ScreenAwake();
|
|
100
95
|
}
|
|
101
96
|
get kept() {
|
|
102
97
|
return this.current;
|
|
@@ -295,12 +290,13 @@ let TaCallKeeperImpl = class TaCallKeeperImpl {
|
|
|
295
290
|
this.viewless = false;
|
|
296
291
|
}
|
|
297
292
|
changed() {
|
|
298
|
-
var _a;
|
|
299
293
|
const calling = this.current !== undefined;
|
|
300
|
-
if (calling
|
|
301
|
-
this.
|
|
302
|
-
|
|
303
|
-
|
|
294
|
+
if (calling && !this.letAwakeGo) {
|
|
295
|
+
this.letAwakeGo = screen_awake_1.KeepAwake.shared.hold();
|
|
296
|
+
}
|
|
297
|
+
else if (!calling && this.letAwakeGo) {
|
|
298
|
+
this.letAwakeGo();
|
|
299
|
+
this.letAwakeGo = undefined;
|
|
304
300
|
}
|
|
305
301
|
for (const listener of [...this.listeners]) {
|
|
306
302
|
listener();
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type RowEntry } from './settings-controls';
|
|
2
|
+
/**
|
|
3
|
+
* The rows of Settings, Extensions, for extensions others made (docs/design/ta-extension-access.md 3.6): how far
|
|
4
|
+
* they are trusted, kept by ta serve for every device; and the sandbox of this device, each feature a switch.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useAccessRows(): RowEntry[];
|
|
7
|
+
//# sourceMappingURL=access-settings.d.ts.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.useAccessRows = useAccessRows;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
const hooks_1 = require("../hooks");
|
|
39
|
+
const use_t_1 = require("../i18n/use-t");
|
|
40
|
+
const sandbox_protocol_1 = require("../sandbox/sandbox-protocol");
|
|
41
|
+
const settings_controls_1 = require("./settings-controls");
|
|
42
|
+
const TRUSTS = ['off', 'browser', 'ask', 'all'];
|
|
43
|
+
/** How far packages of others are trusted, read from ta serve: undefined until read. */
|
|
44
|
+
function useTrust() {
|
|
45
|
+
const [workbench, bench] = (0, hooks_1.useWorkbench)();
|
|
46
|
+
const [trust, setTrust] = React.useState();
|
|
47
|
+
const [, notices] = (0, hooks_1.useNotices)();
|
|
48
|
+
React.useEffect(() => {
|
|
49
|
+
if (workbench.status === 'online') {
|
|
50
|
+
bench.packages.getAccessTrust().then(setTrust, () => undefined);
|
|
51
|
+
}
|
|
52
|
+
}, [workbench.status, bench]);
|
|
53
|
+
const set = React.useCallback((next) => {
|
|
54
|
+
setTrust(next);
|
|
55
|
+
bench.packages
|
|
56
|
+
.setAccessTrust(next)
|
|
57
|
+
.then(() => bench.packages.listWebExtensions())
|
|
58
|
+
.catch(error => {
|
|
59
|
+
// One let in without the switch of the team (extensions.trust): told why, with a way to ask for it.
|
|
60
|
+
notices.error(error);
|
|
61
|
+
bench.packages.getAccessTrust().then(setTrust, () => undefined);
|
|
62
|
+
});
|
|
63
|
+
}, [bench, notices]);
|
|
64
|
+
return [trust, set];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The rows of Settings, Extensions, for extensions others made (docs/design/ta-extension-access.md 3.6): how far
|
|
68
|
+
* they are trusted, kept by ta serve for every device; and the sandbox of this device, each feature a switch.
|
|
69
|
+
*/
|
|
70
|
+
function useAccessRows() {
|
|
71
|
+
const t = (0, use_t_1.useT)();
|
|
72
|
+
const [trust, setTrust] = useTrust();
|
|
73
|
+
const [options, setOptions] = (0, hooks_1.usePersisted)(sandbox_protocol_1.SandboxOptionsUtil.SPEC);
|
|
74
|
+
const option = (key, label, description) => (0, settings_controls_1.row)(`sandbox-${key}`, [label, description], React.createElement(settings_controls_1.Row, { label: label, description: description },
|
|
75
|
+
React.createElement(settings_controls_1.Switch, { label: label, checked: options[key], onChange: checked => setOptions({ ...options, [key]: checked }) })));
|
|
76
|
+
return [
|
|
77
|
+
(0, settings_controls_1.row)('access-trust', [t('ta.settings.trust'), t('ta.settings.trustDescription')], React.createElement(settings_controls_1.Row, { label: t('ta.settings.trust'), description: t(`ta.settings.trust.${trust !== null && trust !== void 0 ? trust : 'ask'}Hint`), stacked: true },
|
|
78
|
+
React.createElement(settings_controls_1.Segmented, { label: t('ta.settings.trust'), value: trust !== null && trust !== void 0 ? trust : '', choices: TRUSTS.map(value => ({ value, label: t(`ta.settings.trust.${value}`) })), onChange: value => setTrust(value) }))),
|
|
79
|
+
option('isolate', t('ta.settings.sandbox'), t('ta.settings.sandboxDescription')),
|
|
80
|
+
...(options.isolate
|
|
81
|
+
? [
|
|
82
|
+
option('local', t('ta.settings.sandboxLocal'), t('ta.settings.sandboxLocalDescription')),
|
|
83
|
+
option('parts', t('ta.settings.sandboxParts'), t('ta.settings.sandboxPartsDescription')),
|
|
84
|
+
]
|
|
85
|
+
: []),
|
|
86
|
+
];
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=access-settings.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The app, with the look the user picked for the double (every ta below draws it) and the picker of that look; or what
|
|
4
|
+
* the address asks for in its place: a shared conversation, the sign-in of a device, a page installed as an app.
|
|
5
|
+
*/
|
|
6
|
+
export declare function AppView(): React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=app-root.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.AppView = AppView;
|
|
37
|
+
const React = __importStar(require("react"));
|
|
38
|
+
const app_window_1 = require("../apps/app-window");
|
|
39
|
+
const app_window_util_1 = require("../apps/app-window-util");
|
|
40
|
+
const device_page_1 = require("../cloud/device-page");
|
|
41
|
+
const launch_screen_1 = require("../device/launch-screen");
|
|
42
|
+
const shared_link_1 = require("../share/shared-link");
|
|
43
|
+
const shared_page_1 = require("../share/shared-page");
|
|
44
|
+
const app_view_1 = require("./app-view");
|
|
45
|
+
const device_sign_in_page_1 = require("./device-sign-in-page");
|
|
46
|
+
const dino_look_1 = require("./dino-look");
|
|
47
|
+
/**
|
|
48
|
+
* The app, with the look the user picked for the double (every ta below draws it) and the picker of that look; or what
|
|
49
|
+
* the address asks for in its place: a shared conversation, the sign-in of a device, a page installed as an app.
|
|
50
|
+
*/
|
|
51
|
+
function AppView() {
|
|
52
|
+
// A conversation shared by a link, opened in a browser: drawn as Ta does, with nothing signed in behind it.
|
|
53
|
+
const [shared] = React.useState(() => shared_link_1.SharedPageUtil.link());
|
|
54
|
+
// A device asked to sign in here (TA_DEVICE_SIGN_IN_PATH): the page where the user lets it in, whoever this browser is.
|
|
55
|
+
const [device] = React.useState(() => (shared ? undefined : device_page_1.DevicePageUtil.take()));
|
|
56
|
+
// A page installed as an app, in a window of Ta Desktop of its own (docs/design/ta-install-as-app.md).
|
|
57
|
+
const [app] = React.useState(() => (shared || device ? undefined : app_window_util_1.AppWindowUtil.id()));
|
|
58
|
+
// The launch picture of the app of a phone goes once the page is whole.
|
|
59
|
+
React.useEffect(() => launch_screen_1.LaunchScreenUtil.start(), []);
|
|
60
|
+
if (shared) {
|
|
61
|
+
return React.createElement(shared_page_1.SharedPage, { link: shared });
|
|
62
|
+
}
|
|
63
|
+
if (device) {
|
|
64
|
+
return React.createElement(device_sign_in_page_1.DeviceSignInPage, { code: device.code, outcome: device.outcome, from: device.from });
|
|
65
|
+
}
|
|
66
|
+
return (React.createElement(dino_look_1.LooksProvider, null,
|
|
67
|
+
app ? React.createElement(app_window_1.AppWindow, { id: app }) : React.createElement(app_view_1.AppShell, null),
|
|
68
|
+
React.createElement(dino_look_1.DinoLookHost, null)));
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=app-root.js.map
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* ta on the web, laid out as an IDE: the navigation, a sidebar (the chats, or a sidebar view of a web
|
|
4
|
+
* extension), the conversation or a page, the workbench (the tools of web extensions and the tabs they
|
|
5
|
+
* open), and the panel of their cards.
|
|
6
|
+
* The sidebar, the tabs and the panel can be resized and collapsed; on narrow screens they open over
|
|
7
|
+
* the conversation instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare function AppShell(): React.JSX.Element;
|
|
4
10
|
//# sourceMappingURL=app-view.d.ts.map
|
|
@@ -33,19 +33,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
36
|
+
exports.AppShell = AppShell;
|
|
37
37
|
const lucide_react_1 = require("lucide-react");
|
|
38
38
|
const React = __importStar(require("react"));
|
|
39
39
|
const assistant_chat_list_1 = require("../assistant/assistant-chat-list");
|
|
40
40
|
const chat_view_1 = require("../chat/chat-view");
|
|
41
|
-
const device_page_1 = require("../cloud/device-page");
|
|
42
41
|
const device_protocol_1 = require("../device/device-protocol");
|
|
43
|
-
const launch_screen_1 = require("../device/launch-screen");
|
|
44
42
|
const web_extension_protocol_1 = require("../extension/web-extension-protocol");
|
|
45
43
|
const hooks_1 = require("../hooks");
|
|
46
44
|
const notices_1 = require("../notices/notices");
|
|
47
|
-
const shared_link_1 = require("../share/shared-link");
|
|
48
|
-
const shared_page_1 = require("../share/shared-page");
|
|
49
45
|
const app_contexts_1 = require("./app-contexts");
|
|
50
46
|
const app_nav_1 = require("./app-nav");
|
|
51
47
|
const app_shell_hooks_1 = require("./app-shell-hooks");
|
|
@@ -58,8 +54,6 @@ const chat_seen_1 = require("./chat-seen");
|
|
|
58
54
|
const chats_dot_1 = require("./chats-dot");
|
|
59
55
|
const connection_bar_1 = require("./connection-bar");
|
|
60
56
|
const custom_host_1 = require("./custom-host");
|
|
61
|
-
const device_sign_in_page_1 = require("./device-sign-in-page");
|
|
62
|
-
const dino_look_1 = require("./dino-look");
|
|
63
57
|
const discover_view_1 = require("./discover-view");
|
|
64
58
|
const editor_area_1 = require("./editor-area");
|
|
65
59
|
const entry_holds_1 = require("./entry-holds");
|
|
@@ -420,22 +414,4 @@ function PhoneHome({ pushable, busy, onBusy, busyList, children, }) {
|
|
|
420
414
|
}
|
|
421
415
|
return React.createElement(phone_shell_1.PhoneStack, { base: children, top: (busy || drawn) && busyList(), open: busy, onClose: () => onBusy(false) });
|
|
422
416
|
}
|
|
423
|
-
/** The app, with the look the user picked for the double (every ta below draws it) and the picker of that look. */
|
|
424
|
-
function AppView() {
|
|
425
|
-
// A conversation shared by a link, opened in a browser: drawn as Ta does, with nothing signed in behind it.
|
|
426
|
-
const [shared] = React.useState(() => shared_link_1.SharedPageUtil.link());
|
|
427
|
-
// A device asked to sign in here (TA_DEVICE_SIGN_IN_PATH): the page where the user lets it in, whoever this browser is.
|
|
428
|
-
const [device] = React.useState(() => (shared ? undefined : device_page_1.DevicePageUtil.take()));
|
|
429
|
-
// The launch picture of the app of a phone goes once the page is whole.
|
|
430
|
-
React.useEffect(() => launch_screen_1.LaunchScreenUtil.start(), []);
|
|
431
|
-
if (shared) {
|
|
432
|
-
return React.createElement(shared_page_1.SharedPage, { link: shared });
|
|
433
|
-
}
|
|
434
|
-
if (device) {
|
|
435
|
-
return React.createElement(device_sign_in_page_1.DeviceSignInPage, { code: device.code, outcome: device.outcome, from: device.from });
|
|
436
|
-
}
|
|
437
|
-
return (React.createElement(dino_look_1.LooksProvider, null,
|
|
438
|
-
React.createElement(AppShell, null),
|
|
439
|
-
React.createElement(dino_look_1.DinoLookHost, null)));
|
|
440
|
-
}
|
|
441
417
|
//# sourceMappingURL=app-view.js.map
|