@celljs/ta-web 4.34.0 → 4.36.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/assistant-thread.js +2 -2
- package/esm/browser/assistant/call-keeper.d.ts +2 -5
- package/esm/browser/assistant/call-keeper.js +7 -11
- package/esm/browser/assistant/mic-capture.d.ts +34 -0
- package/esm/browser/assistant/mic-capture.js +87 -0
- package/esm/browser/assistant/realtime-voice.d.ts +2 -2
- package/esm/browser/assistant/realtime-voice.js +6 -15
- 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/board.d.ts +2 -2
- package/esm/browser/components/board.js +2 -2
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/composer-box-hooks.d.ts +12 -0
- package/esm/browser/components/composer-box-hooks.js +12 -0
- package/esm/browser/components/composer-box-protocol.d.ts +12 -1
- package/esm/browser/components/composer-box.js +14 -11
- package/esm/browser/components/composer.js +69 -3
- package/esm/browser/components/extension-settings.d.ts +7 -0
- package/esm/browser/components/extension-settings.js +32 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/message-list.js +3 -3
- package/esm/browser/components/message-steps.js +3 -3
- package/esm/browser/components/phone-shell.d.ts +2 -2
- package/esm/browser/components/request-error.d.ts +9 -0
- package/esm/browser/components/request-error.js +21 -0
- package/esm/browser/components/settings-more.js +13 -24
- package/esm/browser/components/storage-settings.d.ts +17 -0
- package/esm/browser/components/storage-settings.js +145 -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-contributions.d.ts +6 -7
- 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 +225 -0
- package/esm/browser/extension/web-api-targets.d.ts +11 -0
- package/esm/browser/extension/web-api-targets.js +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +11 -1
- package/esm/browser/extension/web-extension-context.d.ts +3 -2
- package/esm/browser/extension/web-extension-context.js +22 -17
- package/esm/browser/extension/web-extension-run.d.ts +8 -1
- package/esm/browser/extension/web-extension-run.js +37 -0
- package/esm/browser/extension/web-extensions-running.d.ts +20 -1
- package/esm/browser/extension/web-extensions-running.js +107 -9
- package/esm/browser/extension/web-extensions.js +1 -0
- package/esm/browser/extension/web-pages.d.ts +5 -0
- package/esm/browser/extension/web-pages.js +3 -0
- package/esm/browser/game/game-control.d.ts +6 -0
- package/esm/browser/game/game-control.js +28 -0
- package/esm/browser/game/game-host.d.ts +9 -2
- package/esm/browser/game/game-host.js +5 -1
- package/esm/browser/game/game-protocol.d.ts +8 -0
- package/esm/browser/game/game-runner.d.ts +7 -1
- package/esm/browser/game/game-runner.js +24 -2
- package/esm/browser/game/game-target.d.ts +22 -0
- package/esm/browser/game/game-target.js +84 -0
- package/esm/browser/game/game-util.d.ts +2 -0
- package/esm/browser/game/game-util.js +2 -0
- package/esm/browser/game/game-view.d.ts +5 -2
- package/esm/browser/game/game-view.js +4 -4
- package/esm/browser/game/game3d-protocol.d.ts +3 -1
- package/esm/browser/game/game3d-runner.d.ts +6 -1
- package/esm/browser/game/game3d-runner.js +26 -2
- package/esm/browser/i18n/en/chat.d.ts +4 -0
- package/esm/browser/i18n/en/chat.js +4 -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 +43 -0
- package/esm/browser/i18n/en/settings.js +43 -0
- package/esm/browser/i18n/ja/chat.js +4 -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 +43 -0
- package/esm/browser/i18n/locales.d.ts +60 -3
- package/esm/browser/i18n/messages.d.ts +59 -2
- package/esm/browser/i18n/zh/chat.js +4 -0
- 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 +43 -0
- package/esm/browser/i18n/zh-tw/chat.js +4 -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 +43 -0
- package/esm/browser/index.d.ts +3 -0
- package/esm/browser/index.js +3 -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 +57 -0
- package/esm/browser/sandbox/remote/remote-copy.js +318 -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/agent-settings.js +5 -1
- package/esm/browser/settings/settings-protocol.d.ts +2 -0
- package/esm/browser/settings/settings-protocol.js +2 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +2 -0
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +4 -0
- package/esm/browser/style/tints.d.ts +2 -0
- package/esm/browser/style/tints.js +10 -0
- package/esm/browser/targets/targets-protocol.d.ts +54 -0
- package/esm/browser/targets/targets-protocol.js +34 -0
- package/esm/browser/targets/targets.d.ts +13 -0
- package/esm/browser/targets/targets.js +64 -0
- package/esm/browser/util/composer.d.ts +4 -2
- package/esm/browser/util/composer.js +7 -1
- package/esm/browser/util/desktop.d.ts +31 -1
- package/esm/browser/util/desktop.js +20 -0
- package/esm/browser/util/message.d.ts +6 -0
- package/esm/browser/util/message.js +21 -0
- package/esm/browser/util/process.d.ts +1 -0
- package/esm/browser/util/process.js +6 -1
- package/esm/browser/util/progress.d.ts +2 -1
- package/esm/browser/util/progress.js +2 -11
- 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/assistant-thread.js +2 -2
- package/lib/browser/assistant/call-keeper.d.ts +2 -5
- package/lib/browser/assistant/call-keeper.js +6 -10
- package/lib/browser/assistant/mic-capture.d.ts +35 -0
- package/lib/browser/assistant/mic-capture.js +91 -0
- package/lib/browser/assistant/realtime-voice.d.ts +2 -2
- package/lib/browser/assistant/realtime-voice.js +6 -15
- 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/board.d.ts +2 -2
- package/lib/browser/components/board.js +2 -2
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/composer-box-hooks.d.ts +12 -0
- package/lib/browser/components/composer-box-hooks.js +13 -0
- package/lib/browser/components/composer-box-protocol.d.ts +12 -1
- package/lib/browser/components/composer-box.js +13 -10
- package/lib/browser/components/composer.js +69 -3
- package/lib/browser/components/extension-settings.d.ts +8 -0
- package/lib/browser/components/extension-settings.js +69 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/message-list.js +3 -3
- package/lib/browser/components/message-steps.js +3 -3
- package/lib/browser/components/phone-shell.d.ts +2 -2
- package/lib/browser/components/request-error.d.ts +10 -0
- package/lib/browser/components/request-error.js +57 -0
- package/lib/browser/components/settings-more.js +12 -23
- package/lib/browser/components/storage-settings.d.ts +18 -0
- package/lib/browser/components/storage-settings.js +182 -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-contributions.d.ts +6 -7
- 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 +228 -0
- package/lib/browser/extension/web-api-targets.d.ts +12 -0
- package/lib/browser/extension/web-api-targets.js +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +11 -1
- package/lib/browser/extension/web-extension-context.d.ts +3 -2
- package/lib/browser/extension/web-extension-context.js +22 -17
- package/lib/browser/extension/web-extension-run.d.ts +8 -1
- package/lib/browser/extension/web-extension-run.js +37 -0
- package/lib/browser/extension/web-extensions-running.d.ts +20 -1
- package/lib/browser/extension/web-extensions-running.js +107 -9
- package/lib/browser/extension/web-extensions.js +1 -0
- package/lib/browser/extension/web-pages.d.ts +5 -0
- package/lib/browser/extension/web-pages.js +3 -0
- package/lib/browser/game/game-control.d.ts +6 -0
- package/lib/browser/game/game-control.js +28 -0
- package/lib/browser/game/game-host.d.ts +9 -2
- package/lib/browser/game/game-host.js +5 -1
- package/lib/browser/game/game-protocol.d.ts +8 -0
- package/lib/browser/game/game-runner.d.ts +7 -1
- package/lib/browser/game/game-runner.js +24 -2
- package/lib/browser/game/game-target.d.ts +23 -0
- package/lib/browser/game/game-target.js +87 -0
- package/lib/browser/game/game-util.d.ts +2 -0
- package/lib/browser/game/game-util.js +2 -0
- package/lib/browser/game/game-view.d.ts +5 -2
- package/lib/browser/game/game-view.js +4 -4
- package/lib/browser/game/game3d-protocol.d.ts +3 -1
- package/lib/browser/game/game3d-runner.d.ts +6 -1
- package/lib/browser/game/game3d-runner.js +26 -2
- package/lib/browser/i18n/en/chat.d.ts +4 -0
- package/lib/browser/i18n/en/chat.js +4 -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 +43 -0
- package/lib/browser/i18n/en/settings.js +43 -0
- package/lib/browser/i18n/ja/chat.js +4 -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 +43 -0
- package/lib/browser/i18n/locales.d.ts +60 -3
- package/lib/browser/i18n/messages.d.ts +59 -2
- package/lib/browser/i18n/zh/chat.js +4 -0
- 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 +43 -0
- package/lib/browser/i18n/zh-tw/chat.js +4 -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 +43 -0
- package/lib/browser/index.d.ts +3 -0
- package/lib/browser/index.js +3 -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 +58 -0
- package/lib/browser/sandbox/remote/remote-copy.js +322 -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/agent-settings.js +5 -1
- package/lib/browser/settings/settings-protocol.d.ts +2 -0
- package/lib/browser/settings/settings-protocol.js +2 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +2 -0
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +4 -0
- package/lib/browser/style/tints.d.ts +2 -0
- package/lib/browser/style/tints.js +10 -0
- package/lib/browser/targets/targets-protocol.d.ts +55 -0
- package/lib/browser/targets/targets-protocol.js +37 -0
- package/lib/browser/targets/targets.d.ts +14 -0
- package/lib/browser/targets/targets.js +67 -0
- package/lib/browser/util/composer.d.ts +4 -2
- package/lib/browser/util/composer.js +7 -1
- package/lib/browser/util/desktop.d.ts +31 -1
- package/lib/browser/util/desktop.js +20 -0
- package/lib/browser/util/message.d.ts +6 -0
- package/lib/browser/util/message.js +21 -0
- package/lib/browser/util/process.d.ts +1 -0
- package/lib/browser/util/process.js +6 -1
- package/lib/browser/util/progress.d.ts +2 -1
- package/lib/browser/util/progress.js +2 -11
- package/lib/browser/view.js +2 -2
- package/package.json +8 -8
|
@@ -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
|
|
@@ -37,7 +37,6 @@ exports.AssistantThread = void 0;
|
|
|
37
37
|
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
38
38
|
const lucide_react_1 = require("lucide-react");
|
|
39
39
|
const React = __importStar(require("react"));
|
|
40
|
-
const callout_1 = require("../components/callout");
|
|
41
40
|
const context_line_1 = require("../components/context-line");
|
|
42
41
|
const conversation_scroll_util_1 = require("../components/conversation-scroll-util");
|
|
43
42
|
const icon_1 = require("../components/icon");
|
|
@@ -47,6 +46,7 @@ const message_list_1 = require("../components/message-list");
|
|
|
47
46
|
const message_menu_1 = require("../components/message-menu");
|
|
48
47
|
const message_steps_1 = require("../components/message-steps");
|
|
49
48
|
const message_user_1 = require("../components/message-user");
|
|
49
|
+
const request_error_1 = require("../components/request-error");
|
|
50
50
|
const run_status_1 = require("../components/run-status");
|
|
51
51
|
const extension_view_1 = require("../extension/extension-view");
|
|
52
52
|
const web_tasks_1 = require("../extension/web-tasks");
|
|
@@ -93,7 +93,7 @@ function DoubleRowView({ item, tools, mood, status, latest, started, onTask, t }
|
|
|
93
93
|
React.createElement(message_steps_1.Process, { steps: item.steps, active: item.active, results: results, tools: tools, leading: React.createElement(message_list_1.TurnAvatar, { mood: mood }), status: status }),
|
|
94
94
|
React.createElement(task_views_1.TaskCards, { tasks: started }),
|
|
95
95
|
item.reply.map((text, index) => (React.createElement(markdown_1.Markdown, { key: index, text: text, streaming: item.active && index === item.reply.length - 1 }))),
|
|
96
|
-
!item.active && stopReason === 'error' && errorMessage && React.createElement(
|
|
96
|
+
!item.active && stopReason === 'error' && errorMessage && React.createElement(request_error_1.RequestError, { error: errorMessage })));
|
|
97
97
|
}
|
|
98
98
|
const { role } = item.message;
|
|
99
99
|
if (role === 'custom') {
|
|
@@ -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,35 @@
|
|
|
1
|
+
/** No sound from the microphone this long while it should hear: it no longer does (the audio was interrupted). */
|
|
2
|
+
export declare const STALL_MS = 4000;
|
|
3
|
+
/** Muted by the system (a phone call) this long: it no longer hears, though no sound stopped coming. */
|
|
4
|
+
export declare const MUTED_MS = 1000;
|
|
5
|
+
/** How often it looks. */
|
|
6
|
+
export declare const CHECK_MS = 1000;
|
|
7
|
+
/**
|
|
8
|
+
* The microphone heard through an audio context: its samples go to `heard`, and `lost` is told once as it stops
|
|
9
|
+
* hearing without a word from the recognizer, which would otherwise wait for sound that never comes: the track ended
|
|
10
|
+
* (unplugged, taken), the system muted it (a phone call) or no sound came for STALL_MS (the context was interrupted or
|
|
11
|
+
* suspended). Asleep meanwhile (a page in the background whose timers stopped), it does not count the time.
|
|
12
|
+
*/
|
|
13
|
+
export declare class MicCapture {
|
|
14
|
+
protected readonly stream: MediaStream;
|
|
15
|
+
protected readonly lost: (error: string) => void;
|
|
16
|
+
protected readonly now: () => number;
|
|
17
|
+
protected processor?: ScriptProcessorNode;
|
|
18
|
+
protected soundAt: number;
|
|
19
|
+
protected checkedAt: number;
|
|
20
|
+
protected mutedAt?: number;
|
|
21
|
+
protected timer?: ReturnType<typeof setInterval>;
|
|
22
|
+
protected done: boolean;
|
|
23
|
+
protected readonly ended: () => void;
|
|
24
|
+
protected readonly muted: () => void;
|
|
25
|
+
protected readonly unmuted: () => void;
|
|
26
|
+
constructor(stream: MediaStream, lost: (error: string) => void, now?: () => number);
|
|
27
|
+
/** Hears it through `context`, from now on watched. */
|
|
28
|
+
hear(context: AudioContext, heard: (samples: Float32Array) => void): void;
|
|
29
|
+
/** Looks whether it still hears. */
|
|
30
|
+
check(): void;
|
|
31
|
+
/** Lets go of the microphone. */
|
|
32
|
+
stop(): void;
|
|
33
|
+
protected lose(error: string): void;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=mic-capture.d.ts.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MicCapture = exports.CHECK_MS = exports.MUTED_MS = exports.STALL_MS = void 0;
|
|
4
|
+
/** No sound from the microphone this long while it should hear: it no longer does (the audio was interrupted). */
|
|
5
|
+
exports.STALL_MS = 4000;
|
|
6
|
+
/** Muted by the system (a phone call) this long: it no longer hears, though no sound stopped coming. */
|
|
7
|
+
exports.MUTED_MS = 1000;
|
|
8
|
+
/** How often it looks. */
|
|
9
|
+
exports.CHECK_MS = 1000;
|
|
10
|
+
/**
|
|
11
|
+
* The microphone heard through an audio context: its samples go to `heard`, and `lost` is told once as it stops
|
|
12
|
+
* hearing without a word from the recognizer, which would otherwise wait for sound that never comes: the track ended
|
|
13
|
+
* (unplugged, taken), the system muted it (a phone call) or no sound came for STALL_MS (the context was interrupted or
|
|
14
|
+
* suspended). Asleep meanwhile (a page in the background whose timers stopped), it does not count the time.
|
|
15
|
+
*/
|
|
16
|
+
class MicCapture {
|
|
17
|
+
constructor(stream, lost, now = Date.now) {
|
|
18
|
+
this.stream = stream;
|
|
19
|
+
this.lost = lost;
|
|
20
|
+
this.now = now;
|
|
21
|
+
this.soundAt = 0;
|
|
22
|
+
this.checkedAt = 0;
|
|
23
|
+
this.done = false;
|
|
24
|
+
this.ended = () => this.lose('audio-capture');
|
|
25
|
+
this.muted = () => {
|
|
26
|
+
this.mutedAt = this.now();
|
|
27
|
+
};
|
|
28
|
+
this.unmuted = () => {
|
|
29
|
+
this.mutedAt = undefined;
|
|
30
|
+
};
|
|
31
|
+
for (const track of stream.getAudioTracks()) {
|
|
32
|
+
track.addEventListener('ended', this.ended);
|
|
33
|
+
track.addEventListener('mute', this.muted);
|
|
34
|
+
track.addEventListener('unmute', this.unmuted);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/** Hears it through `context`, from now on watched. */
|
|
38
|
+
hear(context, heard) {
|
|
39
|
+
const source = context.createMediaStreamSource(this.stream);
|
|
40
|
+
this.processor = context.createScriptProcessor(4096, 1, 1);
|
|
41
|
+
this.processor.onaudioprocess = event => {
|
|
42
|
+
this.soundAt = this.now();
|
|
43
|
+
heard(event.inputBuffer.getChannelData(0));
|
|
44
|
+
};
|
|
45
|
+
source.connect(this.processor);
|
|
46
|
+
// Connected so that it runs; it writes nothing, its output is silence.
|
|
47
|
+
this.processor.connect(context.destination);
|
|
48
|
+
this.soundAt = this.checkedAt = this.now();
|
|
49
|
+
this.timer = setInterval(() => this.check(), exports.CHECK_MS);
|
|
50
|
+
}
|
|
51
|
+
/** Looks whether it still hears. */
|
|
52
|
+
check() {
|
|
53
|
+
const now = this.now();
|
|
54
|
+
if (now - this.checkedAt > exports.CHECK_MS * 3) {
|
|
55
|
+
// It slept: what it missed meanwhile is not the microphone's doing.
|
|
56
|
+
this.soundAt = now;
|
|
57
|
+
this.mutedAt = this.mutedAt === undefined ? undefined : now;
|
|
58
|
+
}
|
|
59
|
+
this.checkedAt = now;
|
|
60
|
+
if (this.mutedAt !== undefined && now - this.mutedAt >= exports.MUTED_MS) {
|
|
61
|
+
this.lose('interrupted');
|
|
62
|
+
}
|
|
63
|
+
else if (now - this.soundAt >= exports.STALL_MS) {
|
|
64
|
+
this.lose('audio-capture');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** Lets go of the microphone. */
|
|
68
|
+
stop() {
|
|
69
|
+
this.done = true;
|
|
70
|
+
clearInterval(this.timer);
|
|
71
|
+
if (this.processor) {
|
|
72
|
+
this.processor.onaudioprocess = null;
|
|
73
|
+
this.processor.disconnect();
|
|
74
|
+
}
|
|
75
|
+
for (const track of this.stream.getTracks()) {
|
|
76
|
+
track.removeEventListener('ended', this.ended);
|
|
77
|
+
track.removeEventListener('mute', this.muted);
|
|
78
|
+
track.removeEventListener('unmute', this.unmuted);
|
|
79
|
+
track.stop();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
lose(error) {
|
|
83
|
+
if (!this.done) {
|
|
84
|
+
this.done = true;
|
|
85
|
+
clearInterval(this.timer);
|
|
86
|
+
this.lost(error);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.MicCapture = MicCapture;
|
|
91
|
+
//# sourceMappingURL=mic-capture.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TaBargeIn, type TaVoiceBrainRef, type TaVoiceEvent, type TaVoiceSession } from '@celljs/ta-protocol';
|
|
2
2
|
import { Voice } from '../util/voice';
|
|
3
|
+
import { MicCapture } from './mic-capture';
|
|
3
4
|
import { MicSense } from './mic-sense';
|
|
4
5
|
import { MicFilter } from './noise-gate';
|
|
5
6
|
import { type Doubt, type Hearing, type Reading, type RealtimeVoiceHost, Talking } from './realtime-voice-protocol';
|
|
@@ -20,8 +21,7 @@ export declare class RealtimeVoice implements CallVoice {
|
|
|
20
21
|
/** How loud what plays is, after the lowering: what the microphone may hear back of it. */
|
|
21
22
|
protected played?: AnalyserNode;
|
|
22
23
|
protected doubt?: Doubt;
|
|
23
|
-
protected
|
|
24
|
-
protected processor?: ScriptProcessorNode;
|
|
24
|
+
protected capture?: MicCapture;
|
|
25
25
|
protected offEvents?: () => void;
|
|
26
26
|
protected hearing?: Hearing;
|
|
27
27
|
protected reading?: Reading;
|
|
@@ -4,6 +4,7 @@ exports.RealtimeVoice = void 0;
|
|
|
4
4
|
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
5
5
|
const turn_end_1 = require("../util/turn-end");
|
|
6
6
|
const voice_1 = require("../util/voice");
|
|
7
|
+
const mic_capture_1 = require("./mic-capture");
|
|
7
8
|
const mic_sense_1 = require("./mic-sense");
|
|
8
9
|
const noise_gate_1 = require("./noise-gate");
|
|
9
10
|
const pcm_util_1 = require("./pcm-util");
|
|
@@ -60,18 +61,15 @@ class RealtimeVoice {
|
|
|
60
61
|
await this.context.resume().catch(() => undefined);
|
|
61
62
|
return this;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
+
const stream = await navigator.mediaDevices.getUserMedia({
|
|
64
65
|
audio: { echoCancellation: true, noiseSuppression: true, autoGainControl: true, channelCount: 1 },
|
|
65
66
|
});
|
|
67
|
+
// Taken from it (a phone call, unplugged, the audio interrupted), it is gone: it would wait for sound in vain.
|
|
68
|
+
this.capture = new mic_capture_1.MicCapture(stream, error => this.lose(error));
|
|
66
69
|
this.context = new Context();
|
|
67
70
|
this.output(this.context);
|
|
68
71
|
await this.context.resume().catch(() => undefined);
|
|
69
|
-
|
|
70
|
-
this.processor = this.context.createScriptProcessor(4096, 1, 1);
|
|
71
|
-
this.processor.onaudioprocess = event => this.captured(event.inputBuffer.getChannelData(0));
|
|
72
|
-
source.connect(this.processor);
|
|
73
|
-
// Connected so that it runs; it writes nothing, its output is silence.
|
|
74
|
-
this.processor.connect(this.context.destination);
|
|
72
|
+
this.capture.hear(this.context, samples => this.captured(samples));
|
|
75
73
|
return this;
|
|
76
74
|
}
|
|
77
75
|
catch (error) {
|
|
@@ -169,7 +167,6 @@ class RealtimeVoice {
|
|
|
169
167
|
}
|
|
170
168
|
stop() {
|
|
171
169
|
var _a, _b, _c, _d;
|
|
172
|
-
var _e;
|
|
173
170
|
if (this.stopped)
|
|
174
171
|
return;
|
|
175
172
|
const gone = this.closed;
|
|
@@ -180,13 +177,7 @@ class RealtimeVoice {
|
|
|
180
177
|
this.clearDoubt();
|
|
181
178
|
(_a = this.offEvents) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
182
179
|
(_b = this.offState) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
183
|
-
|
|
184
|
-
this.processor.onaudioprocess = null;
|
|
185
|
-
this.processor.disconnect();
|
|
186
|
-
}
|
|
187
|
-
for (const track of (_e = (_c = this.stream) === null || _c === void 0 ? void 0 : _c.getTracks()) !== null && _e !== void 0 ? _e : []) {
|
|
188
|
-
track.stop();
|
|
189
|
-
}
|
|
180
|
+
(_c = this.capture) === null || _c === void 0 ? void 0 : _c.stop();
|
|
190
181
|
void ((_d = this.context) === null || _d === void 0 ? void 0 : _d.close().catch(() => undefined));
|
|
191
182
|
if (this.session && !gone) {
|
|
192
183
|
void this.host.voice.closeVoice(this.session.voiceId).catch(() => undefined);
|
|
@@ -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
|