@celljs/ta-web 4.20.0 → 4.22.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/esm/browser/account/device-account.d.ts +65 -1
- package/esm/browser/account/device-account.js +206 -6
- package/esm/browser/assistant/assistant-chat-list.js +5 -1
- package/esm/browser/assistant/call-turn-end.d.ts +55 -0
- package/esm/browser/assistant/call-turn-end.js +68 -0
- package/esm/browser/assistant/realtime-voice.js +3 -3
- package/esm/browser/assistant/voice-call.d.ts +19 -28
- package/esm/browser/assistant/voice-call.js +64 -51
- package/esm/browser/components/account-menu.d.ts +9 -4
- package/esm/browser/components/account-menu.js +59 -22
- package/esm/browser/components/account-view.d.ts +33 -7
- package/esm/browser/components/account-view.js +140 -79
- package/esm/browser/components/chat-home-util.d.ts +13 -2
- package/esm/browser/components/chat-home-util.js +29 -0
- package/esm/browser/components/chat-home.d.ts +16 -4
- package/esm/browser/components/chat-home.js +9 -2
- package/esm/browser/components/chat-list.js +4 -2
- package/esm/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/esm/browser/components/cloud-sign-in-view.js +4 -1
- package/esm/browser/components/host-view.d.ts +15 -8
- package/esm/browser/components/host-view.js +23 -70
- package/esm/browser/components/me-view.d.ts +2 -2
- package/esm/browser/components/me-view.js +7 -6
- package/esm/browser/components/partner-row.d.ts +17 -0
- package/esm/browser/components/partner-row.js +48 -0
- package/esm/browser/components/profile-view.d.ts +11 -0
- package/esm/browser/components/profile-view.js +85 -0
- package/esm/browser/components/workbench-view.js +42 -7
- package/esm/browser/extension/web-api-components.d.ts +2 -2
- package/esm/browser/extension/web-api-home.d.ts +1 -0
- package/esm/browser/extension/web-api-partners.d.ts +95 -0
- package/esm/browser/extension/web-api-partners.js +2 -0
- package/esm/browser/extension/web-extension-api.d.ts +3 -3
- package/esm/browser/extension/web-extension-context.js +2 -2
- package/esm/browser/extension/web-extension-protocol.d.ts +8 -2
- package/esm/browser/extension/web-extension-run.d.ts +2 -1
- package/esm/browser/extension/web-extension-run.js +1 -0
- package/esm/browser/extension/web-extensions-running.d.ts +2 -0
- package/esm/browser/extension/web-extensions-running.js +3 -0
- package/esm/browser/extension/web-extensions.d.ts +1 -1
- package/esm/browser/extension/web-home.d.ts +11 -19
- package/esm/browser/extension/web-home.js +15 -68
- package/esm/browser/extension/web-partners.d.ts +8 -0
- package/esm/browser/extension/web-partners.js +13 -0
- package/esm/browser/extension/web-row-board.d.ts +38 -0
- package/esm/browser/extension/web-row-board.js +79 -0
- package/esm/browser/i18n/locales.d.ts +31 -1
- package/esm/browser/i18n/messages-ja.js +34 -4
- package/esm/browser/i18n/messages-zh-tw.js +34 -4
- package/esm/browser/i18n/messages.d.ts +30 -0
- package/esm/browser/i18n/messages.js +68 -8
- package/esm/browser/index.d.ts +4 -0
- package/esm/browser/index.js +4 -0
- package/esm/browser/partners/group-picker.d.ts +18 -0
- package/esm/browser/partners/group-picker.js +81 -0
- package/esm/browser/partners/partners-extension.d.ts +14 -0
- package/esm/browser/partners/partners-extension.js +61 -0
- package/esm/browser/partners/partners-util.d.ts +32 -0
- package/esm/browser/partners/partners-util.js +68 -0
- package/esm/browser/partners/partners-view.d.ts +32 -0
- package/esm/browser/partners/partners-view.js +103 -0
- package/esm/browser/style/chat-list.d.ts +1 -1
- package/esm/browser/style/chat-list.js +18 -0
- package/esm/browser/style/conversation-column.d.ts +1 -1
- package/esm/browser/style/conversation-column.js +2 -1
- package/esm/browser/style/dialogs.d.ts +1 -1
- package/esm/browser/style/dialogs.js +6 -0
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +1 -1
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +6 -0
- package/esm/browser/util/turn-end.d.ts +8 -0
- package/esm/browser/util/turn-end.js +78 -35
- package/esm/browser/workbench-hosts.d.ts +4 -1
- package/esm/browser/workbench-hosts.js +17 -0
- package/esm/browser/workbench-protocol.d.ts +8 -0
- package/lib/browser/account/device-account.d.ts +65 -1
- package/lib/browser/account/device-account.js +206 -6
- package/lib/browser/assistant/assistant-chat-list.js +5 -1
- package/lib/browser/assistant/call-turn-end.d.ts +56 -0
- package/lib/browser/assistant/call-turn-end.js +72 -0
- package/lib/browser/assistant/realtime-voice.js +3 -3
- package/lib/browser/assistant/voice-call.d.ts +19 -28
- package/lib/browser/assistant/voice-call.js +67 -54
- package/lib/browser/components/account-menu.d.ts +9 -4
- package/lib/browser/components/account-menu.js +57 -20
- package/lib/browser/components/account-view.d.ts +33 -7
- package/lib/browser/components/account-view.js +142 -77
- package/lib/browser/components/chat-home-util.d.ts +13 -2
- package/lib/browser/components/chat-home-util.js +29 -0
- package/lib/browser/components/chat-home.d.ts +16 -4
- package/lib/browser/components/chat-home.js +9 -1
- package/lib/browser/components/chat-list.js +4 -2
- package/lib/browser/components/cloud-sign-in-view.d.ts +1 -1
- package/lib/browser/components/cloud-sign-in-view.js +4 -1
- package/lib/browser/components/host-view.d.ts +15 -8
- package/lib/browser/components/host-view.js +22 -68
- package/lib/browser/components/me-view.d.ts +2 -2
- package/lib/browser/components/me-view.js +7 -6
- package/lib/browser/components/partner-row.d.ts +18 -0
- package/lib/browser/components/partner-row.js +84 -0
- package/lib/browser/components/profile-view.d.ts +12 -0
- package/lib/browser/components/profile-view.js +123 -0
- package/lib/browser/components/workbench-view.js +39 -4
- package/lib/browser/extension/web-api-components.d.ts +2 -2
- package/lib/browser/extension/web-api-home.d.ts +1 -0
- package/lib/browser/extension/web-api-partners.d.ts +96 -0
- package/lib/browser/extension/web-api-partners.js +3 -0
- package/lib/browser/extension/web-extension-api.d.ts +3 -3
- package/lib/browser/extension/web-extension-context.js +2 -2
- package/lib/browser/extension/web-extension-protocol.d.ts +8 -2
- package/lib/browser/extension/web-extension-run.d.ts +2 -1
- package/lib/browser/extension/web-extension-run.js +1 -0
- package/lib/browser/extension/web-extensions-running.d.ts +2 -0
- package/lib/browser/extension/web-extensions-running.js +3 -0
- package/lib/browser/extension/web-extensions.d.ts +1 -1
- package/lib/browser/extension/web-home.d.ts +11 -19
- package/lib/browser/extension/web-home.js +15 -68
- package/lib/browser/extension/web-partners.d.ts +9 -0
- package/lib/browser/extension/web-partners.js +17 -0
- package/lib/browser/extension/web-row-board.d.ts +39 -0
- package/lib/browser/extension/web-row-board.js +83 -0
- package/lib/browser/i18n/locales.d.ts +31 -1
- package/lib/browser/i18n/messages-ja.js +34 -4
- package/lib/browser/i18n/messages-zh-tw.js +34 -4
- package/lib/browser/i18n/messages.d.ts +30 -0
- package/lib/browser/i18n/messages.js +68 -8
- package/lib/browser/index.d.ts +4 -0
- package/lib/browser/index.js +4 -0
- package/lib/browser/partners/group-picker.d.ts +19 -0
- package/lib/browser/partners/group-picker.js +119 -0
- package/lib/browser/partners/partners-extension.d.ts +15 -0
- package/lib/browser/partners/partners-extension.js +97 -0
- package/lib/browser/partners/partners-util.d.ts +33 -0
- package/lib/browser/partners/partners-util.js +71 -0
- package/lib/browser/partners/partners-view.d.ts +33 -0
- package/lib/browser/partners/partners-view.js +144 -0
- package/lib/browser/style/chat-list.d.ts +1 -1
- package/lib/browser/style/chat-list.js +18 -0
- package/lib/browser/style/conversation-column.d.ts +1 -1
- package/lib/browser/style/conversation-column.js +2 -1
- package/lib/browser/style/dialogs.d.ts +1 -1
- package/lib/browser/style/dialogs.js +6 -0
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +1 -1
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +6 -0
- package/lib/browser/util/turn-end.d.ts +8 -0
- package/lib/browser/util/turn-end.js +78 -35
- package/lib/browser/workbench-hosts.d.ts +4 -1
- package/lib/browser/workbench-hosts.js +17 -0
- package/lib/browser/workbench-protocol.d.ts +8 -0
- package/package.json +7 -7
package/lib/browser/index.d.ts
CHANGED
|
@@ -69,6 +69,10 @@ export * from './notices/session-notices';
|
|
|
69
69
|
export * from './offline/device-values';
|
|
70
70
|
export * from './offline/kept-chats';
|
|
71
71
|
export * from './offline/kept-chats-protocol';
|
|
72
|
+
export * from './partners/group-picker';
|
|
73
|
+
export * from './partners/partners-extension';
|
|
74
|
+
export * from './partners/partners-util';
|
|
75
|
+
export * from './partners/partners-view';
|
|
72
76
|
export * from './pwa/pwa';
|
|
73
77
|
export * from './pwa/pwa-protocol';
|
|
74
78
|
export * from './screen/screen';
|
package/lib/browser/index.js
CHANGED
|
@@ -85,6 +85,10 @@ __exportStar(require("./notices/session-notices"), exports);
|
|
|
85
85
|
__exportStar(require("./offline/device-values"), exports);
|
|
86
86
|
__exportStar(require("./offline/kept-chats"), exports);
|
|
87
87
|
__exportStar(require("./offline/kept-chats-protocol"), exports);
|
|
88
|
+
__exportStar(require("./partners/group-picker"), exports);
|
|
89
|
+
__exportStar(require("./partners/partners-extension"), exports);
|
|
90
|
+
__exportStar(require("./partners/partners-util"), exports);
|
|
91
|
+
__exportStar(require("./partners/partners-view"), exports);
|
|
88
92
|
__exportStar(require("./pwa/pwa"), exports);
|
|
89
93
|
__exportStar(require("./pwa/pwa-protocol"), exports);
|
|
90
94
|
__exportStar(require("./screen/screen"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { WebPartnerEntry } from '../extension/web-api-partners';
|
|
3
|
+
import type { TaWebExtensions } from '../extension/web-extension-protocol';
|
|
4
|
+
/**
|
|
5
|
+
* Starts a chat as a messenger does (docs/design/ta-partners.md): the user picks among their agents and friends; one is
|
|
6
|
+
* the conversation with them, two or more a group chat, made by the first extension that makes one of them (the
|
|
7
|
+
* user's own agents alone, a group chat of their own; with friends, one on the relay). From a chat with one, they are
|
|
8
|
+
* picked already, and one more makes a new group chat: there is no group chat of two.
|
|
9
|
+
*/
|
|
10
|
+
export declare function GroupPicker({ host, with: fixed, close }: {
|
|
11
|
+
host: TaWebExtensions;
|
|
12
|
+
with?: WebPartnerEntry;
|
|
13
|
+
close(): void;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
/** The built-in extension of the partners (partners-extension.ts): the picker shows as its own. */
|
|
16
|
+
export declare const PARTNERS_EXTENSION = "partners";
|
|
17
|
+
/** Opens the picker over the page; `with`, the partner of the chat it starts from. */
|
|
18
|
+
export declare function openGroupPicker(host: TaWebExtensions, partner?: WebPartnerEntry): void;
|
|
19
|
+
//# sourceMappingURL=group-picker.d.ts.map
|
|
@@ -0,0 +1,119 @@
|
|
|
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.PARTNERS_EXTENSION = void 0;
|
|
37
|
+
exports.GroupPicker = GroupPicker;
|
|
38
|
+
exports.openGroupPicker = openGroupPicker;
|
|
39
|
+
const lucide_react_1 = require("lucide-react");
|
|
40
|
+
const React = __importStar(require("react"));
|
|
41
|
+
const web_dialog_1 = require("../components/web-dialog");
|
|
42
|
+
const use_t_1 = require("../i18n/use-t");
|
|
43
|
+
const partners_util_1 = require("./partners-util");
|
|
44
|
+
const partners_view_1 = require("./partners-view");
|
|
45
|
+
/**
|
|
46
|
+
* Starts a chat as a messenger does (docs/design/ta-partners.md): the user picks among their agents and friends; one is
|
|
47
|
+
* the conversation with them, two or more a group chat, made by the first extension that makes one of them (the
|
|
48
|
+
* user's own agents alone, a group chat of their own; with friends, one on the relay). From a chat with one, they are
|
|
49
|
+
* picked already, and one more makes a new group chat: there is no group chat of two.
|
|
50
|
+
*/
|
|
51
|
+
function GroupPicker({ host, with: fixed, close }) {
|
|
52
|
+
const t = (0, use_t_1.useT)();
|
|
53
|
+
const list = partners_util_1.PartnersUtil.pickable((0, partners_view_1.usePartners)(host));
|
|
54
|
+
const [chosen, setChosen] = React.useState(fixed ? [fixed.key] : []);
|
|
55
|
+
const [busy, setBusy] = React.useState(false);
|
|
56
|
+
const [error, setError] = React.useState();
|
|
57
|
+
const picked = list.filter(partner => chosen.includes(partner.key));
|
|
58
|
+
const alone = !fixed && picked.length === 1;
|
|
59
|
+
const enough = picked.length >= (fixed ? 2 : 1);
|
|
60
|
+
const toggle = (key) => {
|
|
61
|
+
if (key !== (fixed === null || fixed === void 0 ? void 0 : fixed.key)) {
|
|
62
|
+
setChosen(before => (before.includes(key) ? before.filter(each => each !== key) : [...before, key]));
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const done = async () => {
|
|
66
|
+
var _a;
|
|
67
|
+
if (alone) {
|
|
68
|
+
close();
|
|
69
|
+
await host.openHome(picked[0]);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
setBusy(true);
|
|
73
|
+
setError(undefined);
|
|
74
|
+
try {
|
|
75
|
+
for (const { source } of host.partners.sourceList()) {
|
|
76
|
+
if (await ((_a = source.group) === null || _a === void 0 ? void 0 : _a.call(source, picked))) {
|
|
77
|
+
close();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
setError(t('ta.partners.pickCannot'));
|
|
82
|
+
}
|
|
83
|
+
catch (failure) {
|
|
84
|
+
setError(failure instanceof Error ? failure.message : String(failure));
|
|
85
|
+
}
|
|
86
|
+
setBusy(false);
|
|
87
|
+
};
|
|
88
|
+
return (React.createElement(web_dialog_1.WebDialog, { title: t('ta.partners.newGroup'), onClose: close },
|
|
89
|
+
React.createElement("div", { className: "ta-partner-pick" },
|
|
90
|
+
React.createElement("p", { className: "ta-partner-pick-lead" }, fixed ? t('ta.partners.pickLeadWith', { name: fixed.name }) : t('ta.partners.pickLead')),
|
|
91
|
+
list.length === 0 ? (React.createElement("p", { className: "ta-partner-pick-lead" }, t('ta.partners.pickNone'))) : (React.createElement("ul", { className: "ta-partner-pick-list" }, list.map(partner => {
|
|
92
|
+
const on = chosen.includes(partner.key);
|
|
93
|
+
const Own = partner.face;
|
|
94
|
+
const Glyph = partner.icon;
|
|
95
|
+
return (React.createElement("li", { key: partner.key },
|
|
96
|
+
React.createElement("button", { type: "button", className: "ta-partner-pick-row", "aria-pressed": on, disabled: busy || partner.key === (fixed === null || fixed === void 0 ? void 0 : fixed.key), onClick: () => toggle(partner.key) },
|
|
97
|
+
React.createElement("span", { className: `ta-partner-pick-box${on ? ' ta-on' : ''}`, "aria-hidden": "true" }, on && React.createElement(lucide_react_1.Check, { size: 12, strokeWidth: 2.6 })),
|
|
98
|
+
Own ? (React.createElement("span", { className: "ta-chat-face", style: { width: 34, height: 34 }, "aria-hidden": "true" },
|
|
99
|
+
React.createElement(Own, { size: 34 }))) : (React.createElement("span", { className: "ta-chat-avatar ta-chat-icon", style: {
|
|
100
|
+
background: `var(--ta-tint-${partner.tone})`,
|
|
101
|
+
color: `var(--ta-tint-ink-${partner.tone})`,
|
|
102
|
+
width: 34,
|
|
103
|
+
height: 34,
|
|
104
|
+
}, "aria-hidden": "true" },
|
|
105
|
+
React.createElement(Glyph, { size: 16, strokeWidth: 1.8 }))),
|
|
106
|
+
React.createElement("span", { className: "ta-partner-pick-name" }, partner.name),
|
|
107
|
+
React.createElement("span", { className: "ta-partner-pick-kind" }, t(partner.kind === 'agent' ? 'ta.partners.agents' : 'ta.partners.friends')))));
|
|
108
|
+
}))),
|
|
109
|
+
error && React.createElement("p", { className: "ta-partner-pick-error" }, error),
|
|
110
|
+
React.createElement("div", { className: "ta-partner-pick-foot" },
|
|
111
|
+
React.createElement("button", { type: "button", className: "ta-button ta-primary", disabled: busy || !enough, onClick: () => void done() }, busy ? React.createElement("span", { className: "ta-spinner" }) : alone ? t('ta.partners.pickChat') : t('ta.partners.pickDone', { count: picked.length + 1 }))))));
|
|
112
|
+
}
|
|
113
|
+
/** The built-in extension of the partners (partners-extension.ts): the picker shows as its own. */
|
|
114
|
+
exports.PARTNERS_EXTENSION = 'partners';
|
|
115
|
+
/** Opens the picker over the page; `with`, the partner of the chat it starts from. */
|
|
116
|
+
function openGroupPicker(host, partner) {
|
|
117
|
+
host.showCustom(`builtin:${exports.PARTNERS_EXTENSION}`, ({ close }) => React.createElement(GroupPicker, { host: host, with: partner, close: close }));
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=group-picker.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WebExtensionAPI } from '../extension/web-extension-api';
|
|
2
|
+
import { BuiltinWebExtension, TaWebExtensions } from '../extension/web-extension-protocol';
|
|
3
|
+
/**
|
|
4
|
+
* The partners (docs/design/ta-partners.md), as a built-in web extension: a list of the sidebar, after the double's,
|
|
5
|
+
* of those the user works with that every extension gives (registerPartners), drawn the same for all.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PartnersWebExtension implements BuiltinWebExtension {
|
|
8
|
+
readonly name = "partners";
|
|
9
|
+
readonly title = "ta.builtin.partners";
|
|
10
|
+
readonly description = "ta.builtin.partnersHint";
|
|
11
|
+
readonly icon: import("lucide-react").LucideIcon;
|
|
12
|
+
protected readonly extensions: TaWebExtensions;
|
|
13
|
+
readonly activate: (pi: WebExtensionAPI) => undefined;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=partners-extension.d.ts.map
|
|
@@ -0,0 +1,97 @@
|
|
|
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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.PartnersWebExtension = void 0;
|
|
46
|
+
const core_1 = require("@celljs/core");
|
|
47
|
+
const lucide_react_1 = require("lucide-react");
|
|
48
|
+
const React = __importStar(require("react"));
|
|
49
|
+
const web_extension_protocol_1 = require("../extension/web-extension-protocol");
|
|
50
|
+
const messages_1 = require("../i18n/messages");
|
|
51
|
+
const group_picker_1 = require("./group-picker");
|
|
52
|
+
const partners_view_1 = require("./partners-view");
|
|
53
|
+
/**
|
|
54
|
+
* The partners (docs/design/ta-partners.md), as a built-in web extension: a list of the sidebar, after the double's,
|
|
55
|
+
* of those the user works with that every extension gives (registerPartners), drawn the same for all.
|
|
56
|
+
*/
|
|
57
|
+
let PartnersWebExtension = class PartnersWebExtension {
|
|
58
|
+
constructor() {
|
|
59
|
+
this.name = group_picker_1.PARTNERS_EXTENSION;
|
|
60
|
+
this.title = 'ta.builtin.partners';
|
|
61
|
+
this.description = 'ta.builtin.partnersHint';
|
|
62
|
+
this.icon = lucide_react_1.Users;
|
|
63
|
+
this.activate = (pi) => {
|
|
64
|
+
const host = this.extensions;
|
|
65
|
+
const context = {
|
|
66
|
+
host,
|
|
67
|
+
query: new partners_view_1.PartnersQuery(),
|
|
68
|
+
useShownFile: () => {
|
|
69
|
+
var _a;
|
|
70
|
+
const shown = pi.ui.useSessionId();
|
|
71
|
+
const sessions = pi.ui.useSessions();
|
|
72
|
+
const read = () => !!host.state.page && !host.state.pageHidden;
|
|
73
|
+
const paged = React.useSyncExternalStore(listener => host.subscribe(() => listener()), read, read);
|
|
74
|
+
return paged || !shown ? undefined : (_a = sessions.find(session => session.sessionId === shown)) === null || _a === void 0 ? void 0 : _a.sessionFile;
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
pi.registerView(group_picker_1.PARTNERS_EXTENSION, {
|
|
78
|
+
title: () => (0, messages_1.message)(pi.ui.language, 'ta.builtin.partners'),
|
|
79
|
+
icon: lucide_react_1.Users,
|
|
80
|
+
head: () => React.createElement(partners_view_1.PartnersHead, { context }),
|
|
81
|
+
render: () => React.createElement(partners_view_1.PartnersList, { context }),
|
|
82
|
+
location: 'sidebar',
|
|
83
|
+
order: 80,
|
|
84
|
+
});
|
|
85
|
+
return undefined;
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.PartnersWebExtension = PartnersWebExtension;
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, core_1.Autowired)({ id: web_extension_protocol_1.TaWebExtensions, detached: true }),
|
|
92
|
+
__metadata("design:type", Object)
|
|
93
|
+
], PartnersWebExtension.prototype, "extensions", void 0);
|
|
94
|
+
exports.PartnersWebExtension = PartnersWebExtension = __decorate([
|
|
95
|
+
(0, core_1.Component)(web_extension_protocol_1.BuiltinWebExtension)
|
|
96
|
+
], PartnersWebExtension);
|
|
97
|
+
//# sourceMappingURL=partners-extension.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { WebPartnerEntry, WebPartnerKind } from '../extension/web-api-partners';
|
|
2
|
+
/** The kinds in the order the partners list them (docs/design/ta-partners.md). */
|
|
3
|
+
export declare const PARTNER_KINDS: readonly WebPartnerKind[];
|
|
4
|
+
/** A section of the page of the partners: those of a kind. */
|
|
5
|
+
export interface PartnerSection {
|
|
6
|
+
kind: WebPartnerKind;
|
|
7
|
+
partners: WebPartnerEntry[];
|
|
8
|
+
}
|
|
9
|
+
export declare namespace PartnersUtil {
|
|
10
|
+
/** Whether one is a partner already, not one asking, invited or waiting. */
|
|
11
|
+
function is(partner: Pick<WebPartnerEntry, 'status'>): boolean;
|
|
12
|
+
/** When something was last said with it, or 0. */
|
|
13
|
+
function at(partner: Pick<WebPartnerEntry, 'chat'>): number;
|
|
14
|
+
/** Whether it has the query (any case) in its name, what it is or what was said last; all match an empty one. */
|
|
15
|
+
function matches(partner: WebPartnerEntry, query: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The sections of the page, each kind once, in the order of {@link PARTNER_KINDS}, none empty: those that ask or
|
|
18
|
+
* are invited first, then by what was said last, the latest first, then by name.
|
|
19
|
+
*/
|
|
20
|
+
function sections(partners: readonly WebPartnerEntry[], query?: string): PartnerSection[];
|
|
21
|
+
/**
|
|
22
|
+
* The conversations with partners that are none of pi (a chat of two, a group chat): rows of the double's list by
|
|
23
|
+
* their time, as the conversations of pi are. Those of pi are there already; those not partners yet have none.
|
|
24
|
+
*/
|
|
25
|
+
function chats(partners: readonly WebPartnerEntry[]): WebPartnerEntry[];
|
|
26
|
+
/** Those the user may start a chat or a group chat with: their agents and friends. */
|
|
27
|
+
function pickable(partners: readonly WebPartnerEntry[]): WebPartnerEntry[];
|
|
28
|
+
/** The line under its name: what was said last, else what it is. */
|
|
29
|
+
function line(partner: WebPartnerEntry, waiting: string): string;
|
|
30
|
+
/** It wants the user to look: one asks or invites them, or something was said they have not seen. */
|
|
31
|
+
function unseen(partner: WebPartnerEntry): boolean;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=partners-util.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PartnersUtil = exports.PARTNER_KINDS = void 0;
|
|
4
|
+
/** The kinds in the order the partners list them (docs/design/ta-partners.md). */
|
|
5
|
+
exports.PARTNER_KINDS = ['agent', 'friend', 'group'];
|
|
6
|
+
var PartnersUtil;
|
|
7
|
+
(function (PartnersUtil) {
|
|
8
|
+
/** Whether one is a partner already, not one asking, invited or waiting. */
|
|
9
|
+
function is(partner) {
|
|
10
|
+
return !partner.status;
|
|
11
|
+
}
|
|
12
|
+
PartnersUtil.is = is;
|
|
13
|
+
/** When something was last said with it, or 0. */
|
|
14
|
+
function at(partner) {
|
|
15
|
+
var _a;
|
|
16
|
+
var _b;
|
|
17
|
+
return (_b = (_a = partner.chat) === null || _a === void 0 ? void 0 : _a.at) !== null && _b !== void 0 ? _b : 0;
|
|
18
|
+
}
|
|
19
|
+
PartnersUtil.at = at;
|
|
20
|
+
/** Whether it has the query (any case) in its name, what it is or what was said last; all match an empty one. */
|
|
21
|
+
function matches(partner, query) {
|
|
22
|
+
var _a;
|
|
23
|
+
const needle = query.trim().toLowerCase();
|
|
24
|
+
return !needle || [partner.name, partner.about, (_a = partner.chat) === null || _a === void 0 ? void 0 : _a.last].some(text => !!text && text.toLowerCase().includes(needle));
|
|
25
|
+
}
|
|
26
|
+
PartnersUtil.matches = matches;
|
|
27
|
+
/**
|
|
28
|
+
* The sections of the page, each kind once, in the order of {@link PARTNER_KINDS}, none empty: those that ask or
|
|
29
|
+
* are invited first, then by what was said last, the latest first, then by name.
|
|
30
|
+
*/
|
|
31
|
+
function sections(partners, query = '') {
|
|
32
|
+
const order = (partner) => (partner.status === 'asking' || partner.status === 'invited' ? 0 : 1);
|
|
33
|
+
return exports.PARTNER_KINDS.map(kind => ({
|
|
34
|
+
kind,
|
|
35
|
+
partners: partners
|
|
36
|
+
.filter(partner => partner.kind === kind && matches(partner, query))
|
|
37
|
+
.sort((a, b) => order(a) - order(b) || at(b) - at(a) || a.name.localeCompare(b.name)),
|
|
38
|
+
})).filter(section => section.partners.length > 0);
|
|
39
|
+
}
|
|
40
|
+
PartnersUtil.sections = sections;
|
|
41
|
+
/**
|
|
42
|
+
* The conversations with partners that are none of pi (a chat of two, a group chat): rows of the double's list by
|
|
43
|
+
* their time, as the conversations of pi are. Those of pi are there already; those not partners yet have none.
|
|
44
|
+
*/
|
|
45
|
+
function chats(partners) {
|
|
46
|
+
return partners.filter(partner => is(partner) && !!partner.chat && !partner.chat.sessionFile && partner.chat.at !== undefined);
|
|
47
|
+
}
|
|
48
|
+
PartnersUtil.chats = chats;
|
|
49
|
+
/** Those the user may start a chat or a group chat with: their agents and friends. */
|
|
50
|
+
function pickable(partners) {
|
|
51
|
+
return partners.filter(partner => is(partner) && (partner.kind === 'agent' || partner.kind === 'friend'));
|
|
52
|
+
}
|
|
53
|
+
PartnersUtil.pickable = pickable;
|
|
54
|
+
/** The line under its name: what was said last, else what it is. */
|
|
55
|
+
function line(partner, waiting) {
|
|
56
|
+
var _a;
|
|
57
|
+
var _b, _c, _d, _e;
|
|
58
|
+
if (partner.status === 'waiting') {
|
|
59
|
+
return (_b = partner.about) !== null && _b !== void 0 ? _b : waiting;
|
|
60
|
+
}
|
|
61
|
+
return partner.status ? ((_c = partner.about) !== null && _c !== void 0 ? _c : '') : ((_e = (_d = (_a = partner.chat) === null || _a === void 0 ? void 0 : _a.last) !== null && _d !== void 0 ? _d : partner.about) !== null && _e !== void 0 ? _e : '');
|
|
62
|
+
}
|
|
63
|
+
PartnersUtil.line = line;
|
|
64
|
+
/** It wants the user to look: one asks or invites them, or something was said they have not seen. */
|
|
65
|
+
function unseen(partner) {
|
|
66
|
+
var _a;
|
|
67
|
+
return partner.status === 'asking' || partner.status === 'invited' || (!partner.status && !!((_a = partner.chat) === null || _a === void 0 ? void 0 : _a.unseen));
|
|
68
|
+
}
|
|
69
|
+
PartnersUtil.unseen = unseen;
|
|
70
|
+
})(PartnersUtil || (exports.PartnersUtil = PartnersUtil = {}));
|
|
71
|
+
//# sourceMappingURL=partners-util.js.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { WebPartnerEntry } from '../extension/web-api-partners';
|
|
3
|
+
import type { TaWebExtensions } from '../extension/web-extension-protocol';
|
|
4
|
+
/** What the head and the list of the partners share: the search. */
|
|
5
|
+
export declare class PartnersQuery {
|
|
6
|
+
protected current: string;
|
|
7
|
+
protected readonly listeners: Set<() => void>;
|
|
8
|
+
readonly get: () => string;
|
|
9
|
+
readonly subscribe: (listener: () => void) => (() => void);
|
|
10
|
+
set(query: string): void;
|
|
11
|
+
}
|
|
12
|
+
/** What the page of the partners reads of the page: the partners, what is in front, how one opens. */
|
|
13
|
+
export interface PartnersContext {
|
|
14
|
+
host: TaWebExtensions;
|
|
15
|
+
query: PartnersQuery;
|
|
16
|
+
/** The file of the conversation shown, while it is in front. */
|
|
17
|
+
useShownFile(): string | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare function usePartners(host: TaWebExtensions): readonly WebPartnerEntry[];
|
|
20
|
+
/** Whether a partner's conversation is what the user looks at: its page from it, or its conversation of pi. */
|
|
21
|
+
export declare function partnerShown(partner: WebPartnerEntry, shownKey: string | undefined, shownFile: string | undefined): boolean;
|
|
22
|
+
/** The search of the partners and their +: a group chat, then what each extension adds (an agent, a friend). */
|
|
23
|
+
export declare function PartnersHead({ context }: {
|
|
24
|
+
context: PartnersContext;
|
|
25
|
+
}): React.JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* The partners (docs/design/ta-partners.md): those the user works with, as a messenger's contacts, in three sections,
|
|
28
|
+
* agents, friends and group chats, each the same row as its conversation in the double's list; one that asks first.
|
|
29
|
+
*/
|
|
30
|
+
export declare function PartnersList({ context }: {
|
|
31
|
+
context: PartnersContext;
|
|
32
|
+
}): React.JSX.Element;
|
|
33
|
+
//# sourceMappingURL=partners-view.d.ts.map
|
|
@@ -0,0 +1,144 @@
|
|
|
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.PartnersQuery = void 0;
|
|
37
|
+
exports.usePartners = usePartners;
|
|
38
|
+
exports.partnerShown = partnerShown;
|
|
39
|
+
exports.PartnersHead = PartnersHead;
|
|
40
|
+
exports.PartnersList = PartnersList;
|
|
41
|
+
const lucide_react_1 = require("lucide-react");
|
|
42
|
+
const React = __importStar(require("react"));
|
|
43
|
+
const chat_list_util_1 = require("../components/chat-list-util");
|
|
44
|
+
const context_menu_1 = require("../components/context-menu");
|
|
45
|
+
const empty_state_1 = require("../components/empty-state");
|
|
46
|
+
const icon_1 = require("../components/icon");
|
|
47
|
+
const partner_row_1 = require("../components/partner-row");
|
|
48
|
+
const web_home_1 = require("../extension/web-home");
|
|
49
|
+
const use_t_1 = require("../i18n/use-t");
|
|
50
|
+
const group_picker_1 = require("./group-picker");
|
|
51
|
+
const partners_util_1 = require("./partners-util");
|
|
52
|
+
const SECTION_TITLES = {
|
|
53
|
+
agent: 'ta.partners.agents',
|
|
54
|
+
friend: 'ta.partners.friends',
|
|
55
|
+
group: 'ta.partners.groups',
|
|
56
|
+
};
|
|
57
|
+
/** What the head and the list of the partners share: the search. */
|
|
58
|
+
class PartnersQuery {
|
|
59
|
+
constructor() {
|
|
60
|
+
this.current = '';
|
|
61
|
+
this.listeners = new Set();
|
|
62
|
+
this.get = () => this.current;
|
|
63
|
+
this.subscribe = (listener) => {
|
|
64
|
+
this.listeners.add(listener);
|
|
65
|
+
return () => this.listeners.delete(listener);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
set(query) {
|
|
69
|
+
this.current = query;
|
|
70
|
+
for (const listener of this.listeners) {
|
|
71
|
+
listener();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.PartnersQuery = PartnersQuery;
|
|
76
|
+
function usePartners(host) {
|
|
77
|
+
return React.useSyncExternalStore(host.partners.subscribe, host.partners.partners, host.partners.partners);
|
|
78
|
+
}
|
|
79
|
+
/** The key of the row (of the home, or a partner) whose page is in front. */
|
|
80
|
+
function useShownKey(host) {
|
|
81
|
+
const read = () => web_home_1.WebHomeUtil.shown(host.state);
|
|
82
|
+
return React.useSyncExternalStore(listener => host.subscribe(() => listener()), read, read);
|
|
83
|
+
}
|
|
84
|
+
/** Whether a partner's conversation is what the user looks at: its page from it, or its conversation of pi. */
|
|
85
|
+
function partnerShown(partner, shownKey, shownFile) {
|
|
86
|
+
var _a;
|
|
87
|
+
return shownKey ? shownKey === partner.key : !!((_a = partner.chat) === null || _a === void 0 ? void 0 : _a.sessionFile) && partner.chat.sessionFile === shownFile;
|
|
88
|
+
}
|
|
89
|
+
/** The search of the partners and their +: a group chat, then what each extension adds (an agent, a friend). */
|
|
90
|
+
function PartnersHead({ context }) {
|
|
91
|
+
const t = (0, use_t_1.useT)();
|
|
92
|
+
const { host, query } = context;
|
|
93
|
+
const value = React.useSyncExternalStore(query.subscribe, query.get, query.get);
|
|
94
|
+
const [menu, openMenu] = (0, context_menu_1.useContextMenu)();
|
|
95
|
+
const items = () => {
|
|
96
|
+
const added = host.partners.sourceList().flatMap(({ extension, source }) => {
|
|
97
|
+
var _a;
|
|
98
|
+
var _b;
|
|
99
|
+
try {
|
|
100
|
+
return (_b = (_a = source.add) === null || _a === void 0 ? void 0 : _a.call(source)) !== null && _b !== void 0 ? _b : [];
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
console.error(`The partners of the web extension ${extension} failed:`, error);
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
return [
|
|
108
|
+
{ label: t('ta.partners.newGroup'), run: () => (0, group_picker_1.openGroupPicker)(host) },
|
|
109
|
+
...(added.length ? ['-'] : []),
|
|
110
|
+
...added.map(item => ({ label: item.label, run: item.run, disabled: item.disabled, danger: item.danger })),
|
|
111
|
+
];
|
|
112
|
+
};
|
|
113
|
+
return (React.createElement(React.Fragment, null,
|
|
114
|
+
React.createElement("label", { className: "ta-chats-search" },
|
|
115
|
+
React.createElement(icon_1.Icon, { icon: lucide_react_1.Search, size: 15 }),
|
|
116
|
+
React.createElement("input", { value: value, placeholder: t('ta.partners.search'), "aria-label": t('ta.partners.search'), onChange: event => query.set(event.target.value) }),
|
|
117
|
+
value && React.createElement(icon_1.IconButton, { className: "ta-chats-clear", icon: lucide_react_1.X, label: t('ta.partners.clear'), onClick: () => query.set('') })),
|
|
118
|
+
React.createElement(icon_1.IconButton, { className: "ta-chats-add", icon: lucide_react_1.Plus, label: t('ta.partners.add'), "aria-haspopup": "menu", onClick: event => openMenu(event, items()) }),
|
|
119
|
+
menu));
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The partners (docs/design/ta-partners.md): those the user works with, as a messenger's contacts, in three sections,
|
|
123
|
+
* agents, friends and group chats, each the same row as its conversation in the double's list; one that asks first.
|
|
124
|
+
*/
|
|
125
|
+
function PartnersList({ context }) {
|
|
126
|
+
const t = (0, use_t_1.useT)();
|
|
127
|
+
const { host, query } = context;
|
|
128
|
+
const partners = usePartners(host);
|
|
129
|
+
const value = React.useSyncExternalStore(query.subscribe, query.get, query.get);
|
|
130
|
+
const shownKey = useShownKey(host);
|
|
131
|
+
const shownFile = context.useShownFile();
|
|
132
|
+
const sections = React.useMemo(() => partners_util_1.PartnersUtil.sections(partners, value), [partners, value]);
|
|
133
|
+
const now = Date.now();
|
|
134
|
+
const open = (partner) => host.openHome(partner);
|
|
135
|
+
return (React.createElement("div", { className: "ta-side-scroll ta-partners" },
|
|
136
|
+
partners.length === 0 && React.createElement(empty_state_1.EmptyState, { title: t('ta.partners.empty'), hint: t('ta.partners.emptyHint') }),
|
|
137
|
+
partners.length > 0 && sections.length === 0 && React.createElement(empty_state_1.EmptyState, { compact: true, title: t('ta.partners.noMatch') }),
|
|
138
|
+
sections.map(section => (React.createElement("section", { key: section.kind, className: "ta-chat-group", "aria-label": t(SECTION_TITLES[section.kind]) },
|
|
139
|
+
React.createElement("div", { className: "ta-chat-section-title" },
|
|
140
|
+
t(SECTION_TITLES[section.kind]),
|
|
141
|
+
React.createElement("span", { className: "ta-chat-group-count" }, section.partners.length)),
|
|
142
|
+
React.createElement("ul", { className: "ta-side-list" }, section.partners.map(partner => { var _a; return (React.createElement(partner_row_1.PartnerRow, { key: partner.key, partner: partner, time: ((_a = partner.chat) === null || _a === void 0 ? void 0 : _a.at) && !partner.status ? chat_list_util_1.ChatListUtil.clock(partner.chat.at, now) : '', selected: partnerShown(partner, shownKey, shownFile), open: open })); })))))));
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=partners-view.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** The list of chats: its search, its rows, the letters and faces of their groups. */
|
|
2
|
-
export declare const CHAT_LIST_STYLE = "\n/* The list of chats: a search, then the chats by directory (a line each under the head of its group) or by day (each with the avatar of its directory) */\n.ta-chats { gap: 8px; }\n/* On a phone a folder opened is pushed over the list (PhoneStack): the same ground and spacing as the list. */\n.ta-chats > .ta-phone-stack > .ta-phone-stack-base, .ta-chats > .ta-phone-stack > .ta-phone-stack-top { gap: 8px; }\n.ta-chats > .ta-phone-stack > .ta-phone-stack-top { background: var(--ta-side); }\n.ta-chats-head { gap: 4px; padding: 0; margin-bottom: 0; }\n.ta-chats-search { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 11px; border-radius: 10px; background: var(--ta-raised); color: var(--ta-muted); border: 1px solid transparent; transition: border-color 120ms, background 120ms; }\n.ta-chats-search:focus-within { border-color: var(--ta-border-field); background: var(--ta-input); }\n.ta-chats-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ta-text); padding: 0; font-size: calc(13.5px * var(--ta-font-scale)); }\n.ta-chats-search input::placeholder { color: var(--ta-muted); }\n.ta-chats-clear { width: 24px; height: 24px; }\n.ta-chips { display: flex; gap: 6px; flex: none; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; padding: 0 8px 2px; }\n.ta-chips::-webkit-scrollbar { display: none; }\n.ta-chip-filter { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--ta-border); background: transparent; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; transition: background 120ms, color 120ms, border-color 120ms; }\n.ta-chip-filter:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-chip-filter[aria-selected='true'] { background: var(--ta-selected); border-color: transparent; color: var(--ta-text); font-weight: 500; }\n.ta-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone-ink); }\n.ta-chip-count { color: var(--ta-muted); font-variant-numeric: tabular-nums; font-weight: 400; }\n.ta-chat-section + .ta-chat-section { margin-top: 6px; }\n.ta-chats-view { width: 26px; height: 26px; border-radius: 7px; color: var(--ta-muted); }\n.ta-chats-view[aria-pressed='true'] { color: var(--ta-text); background: var(--ta-hover-strong); }\n.ta-chat-group + .ta-chat-group { margin-top: 4px; }\n.ta-chat-group-head { position: relative; display: flex; align-items: center; }\n.ta-chat-group-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 40px 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; text-align: left; }\n.ta-chat-group-toggle:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-chat-group-avatar { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--tone-tint); color: var(--tone-ink); font-size: 11px; font-weight: 600; }\n.ta-chat-group-toggle .ta-host-tag { margin-right: -3px; }\n.ta-chat-group-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-group-count { flex: none; color: var(--ta-muted); font-weight: 400; font-variant-numeric: tabular-nums; }\n.ta-chat-group-chevron { flex: none; color: var(--ta-muted); transition: transform 150ms ease; }\n.ta-chat-group-toggle[aria-expanded='true'] .ta-chat-group-chevron { transform: rotate(90deg); }\n.ta-chat-group-add { position: absolute; right: 6px; top: 50%; width: 26px; height: 26px; transform: translateY(-50%); opacity: 0; }\n.ta-chat-group-head:hover .ta-chat-group-add, .ta-chat-group-add:focus-visible { opacity: 1; }\n.ta-chat-group-toggle .ta-chat-icon, .ta-chat-folder-head .ta-chat-icon { flex: none; border-radius: 6px; }\n.ta-chat-folder-head { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 2px; border-bottom: 1px solid var(--ta-border); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-chat-folder-back { width: 30px; height: 30px; flex: none; }\n.ta-chat-folder-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-item.ta-compact { min-height: 34px; padding: 7px 10px 7px 38px; border-radius: 10px; }\n.ta-chat-row:has(.ta-chat-item.ta-compact) { border-radius: 10px; }\n.ta-compact .ta-chat-title { font-weight: 400; color: var(--ta-body); }\n.ta-chat-section-title { padding: 8px 10px 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-chat-fold { display: flex; align-items: center; gap: 4px; width: 100%; margin-top: 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }\n.ta-chat-fold:hover { color: var(--ta-text); }\n.ta-chat-fold svg { transition: transform 0.15s ease; }\n.ta-chat-fold[aria-expanded=\"true\"] svg { transform: rotate(90deg); }\n.ta-chat-removed .ta-chat-item { opacity: 0.72; }\n.ta-chat-group .ta-chat-fold { margin-top: 0; padding-left: 14px; }\n.ta-chat-more { height: 1px; }\n/* Rows out of view are not laid out or painted (their menu opens in a portal, their actions within them). */\n.ta-chat-row { position: relative; border-radius: 12px; content-visibility: auto; contain-intrinsic-size: auto 60px; }\n.ta-chat-row:has(.ta-compact) { contain-intrinsic-size: auto 36px; }\n.ta-chat-row:hover { background: var(--ta-hover); }\n.ta-chat-row.ta-selected { background: var(--ta-selected); }\n.ta-chat-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: inherit; }\n.ta-chat-avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--tone-tint); color: var(--tone-ink); font-size: 15px; font-weight: 600; }\n.ta-chat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-chat-line { display: flex; align-items: center; gap: 8px; min-width: 0; }\n.ta-chat-title { flex: 1; min-width: 0; font-size: calc(14px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-time { flex: none; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n.ta-chat-sub { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-line .ta-spinner { width: 12px; height: 12px; }\n/* Someone to talk to: the double's face, or the face an extension draws for its agent, in place of a letter. */\n.ta-chat-face { flex: none; display: inline-grid; place-items: center; }\n/* A conversation of an extension that is no one to talk to (a brief, a question): its icon on a tile of its tint. */\n.ta-chat-icon { background: var(--ta-tile); color: var(--ta-tile-ink); }\n/* In a row of one line, in the room left of its title, under the letter of its group: the title stays where the others are. */\n.ta-compact .ta-chat-face { margin-left: -28px; }\n/* What goes on in it, at the end of a line: answering (a spinner, on the line under the title), a task that failed or was stopped. */\n.ta-chat-state { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); white-space: nowrap; }\n.ta-chat-state .ta-status { width: 8px; }\n.ta-chat-state.ta-failed { color: color-mix(in srgb, var(--ta-red) 85%, var(--ta-muted)); }\n/* Under the title, as a messaging app: the last thing said, or its directory; how a task ended, before it, as WeChat's [Draft]. */\n.ta-chat-dir { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: top; }\n.ta-chat-dir > svg { flex: none; }\n.ta-chat-flag { margin-right: 3px; }\n.ta-chat-flag.ta-replying { color: var(--ta-secondary); }\n.ta-chat-line > .ta-people { margin-left: 4px; }\n/* Out of the way of the button that takes a row out, as its words are. */\n.ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-line > .ta-people:last-child { margin-right: 28px; }\n.ta-chat-line .ta-people-face { box-shadow: none; background: none; }\n.ta-chat-line .ta-people-face + .ta-people-face { margin-left: -3px; }\n.ta-chat-flag.ta-failed { color: color-mix(in srgb, var(--ta-red) 85%, var(--ta-muted)); }\n.ta-chat-flag.ta-draft { color: var(--ta-red); }\n.ta-chat-flag.ta-waiting, .ta-chat-state.ta-waiting { color: color-mix(in srgb, var(--ta-blue) 85%, var(--ta-muted)); }\n/* Its directory, in place of its time while the pointer is on it. */\n.ta-chat-place { display: none; flex: 0 1 auto; align-items: center; gap: 4px; min-width: 0; max-width: 45%; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-chat-place > svg { flex: none; }\n.ta-chat-place > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n@media (hover: hover) {\n .ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-place { display: inline-flex; }\n .ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-time { display: none; }\n}\n.ta-chats-add { width: 36px; height: 36px; border-radius: 10px; background: var(--ta-raised); }\n/* On the line under the title, at its end; in the middle of a row of one line. */\n.ta-chat-delete { position: absolute; bottom: 7px; right: 8px; width: 26px; height: 26px; opacity: 0; }\n.ta-chat-row:has(.ta-compact) .ta-chat-delete { bottom: auto; top: 50%; width: 30px; height: 30px; transform: translateY(-50%); }\n.ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-sub { padding-right: 28px; }\n.ta-chat-delete:hover:not(:disabled) { color: var(--ta-red); }\n.ta-chat-row:hover .ta-chat-delete, .ta-chat-delete:focus-visible { opacity: 1; }\n/* Taken out, while ta serve closes it: its button stays, turning. */\n.ta-chat-row .ta-chat-delete.ta-icon-button.ta-busy { display: inline-grid; opacity: 1; }\n.ta-chat-row:hover .ta-compact .ta-chat-time, .ta-chat-row:hover .ta-chat-state { visibility: hidden; }\n/*\n * Unseen, as a messenger's unread: an amber dot on the corner of the avatar (before the time in a row of one line), as\n * the agents of the side bar have; it grows in and shrinks away. Cut out of the avatar by the color of the row.\n */\n.ta-chat-avatar-box { position: relative; display: inline-flex; flex: none; }\n.ta-chat-row { --ta-chat-bg: var(--ta-side); }\n.ta-chat-row:hover { --ta-chat-bg: var(--ta-hover); }\n.ta-chat-row.ta-selected { --ta-chat-bg: var(--ta-selected); }\n.ta-chat-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ta-yellow); transform: scale(0); opacity: 0; transition: transform 0.24s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.18s ease; }\n.ta-chat-line > .ta-chat-dot:not(.ta-on) { width: 0; margin-left: -8px; }\n.ta-chat-avatar-box > .ta-chat-dot { position: absolute; right: -2px; bottom: -2px; z-index: 1; width: 12px; height: 12px; box-sizing: border-box; border: 2px solid var(--ta-chat-bg); }\n.ta-chat-dot.ta-on { transform: none; opacity: 1; }\n/* A conversation that waits for the user to decide: a blue ? in place of the amber dot, which seeing it does not take away. */\n.ta-chat-dot.ta-asks { display: grid; place-items: center; background: var(--ta-blue); color: #fff; font-size: 9px; font-weight: 700; line-height: 1; }\n.ta-chat-line > .ta-chat-dot.ta-asks { width: 13px; height: 13px; }\n.ta-chat-avatar-box > .ta-chat-dot.ta-asks { right: -3px; bottom: -3px; width: 17px; height: 17px; font-size: 10px; }\n/* Only those going on (the row of the double opened the list): a chip that clears it, its count beside its label. */\n.ta-chat-filter { display: flex; padding: 0 2px 2px; }\n.ta-chat-filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 11px; border: 0; border-radius: 14px; background: var(--ta-chip); color: var(--ta-text); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; transition: background 120ms; }\n.ta-chat-filter-chip:hover { background: var(--ta-selected); }\n.ta-chat-filter-chip > svg { color: var(--ta-muted); }\n.ta-chat-filter-count { font-variant-numeric: tabular-nums; color: var(--ta-secondary); }\n/* How many wait for the user to decide, on the entry of the chats: over the corner of its icon. */\n.ta-asks-badge { position: absolute; top: 3px; right: 1px; z-index: 1; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--ta-blue); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; pointer-events: none; box-shadow: 0 0 0 2px var(--ta-side); }\n.ta-tabbar-icon > .ta-asks-badge { top: -5px; right: -11px; }\n@media (prefers-reduced-motion: reduce) { .ta-chat-dot { transition: opacity 0.18s ease; } }\n/* What came unseen reads as unread: in the color of the text, not muted. */\n.ta-chat-sub.ta-unseen { color: var(--ta-text); }\n/* Above the box: where a new conversation will work (ComposerBox's head), a pill of its directory. */\n.ta-console-head { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 0 6px; }\n.ta-console-head .ta-cwd-chip { max-width: min(100%, 360px); height: 26px; padding: 0 8px 0 7px; background: transparent; }\n.ta-console-head .ta-cwd-chip:hover { background: var(--ta-hover); }\n.ta-console-head .ta-cwd-chip .ta-ellipsis { flex: 0 1 auto; min-width: 0; max-width: none; }\n.ta-cwd-chip { display: inline-flex; align-items: center; gap: 5px; flex: none; max-width: 180px; overflow: hidden; height: 30px; padding: 0 9px 0 10px; border: 0; border-radius: 15px; background: var(--ta-hover); color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); transition: background 120ms, color 120ms; }\n.ta-cwd-chip:hover { background: var(--ta-hover-strong); color: var(--ta-text); }\n.ta-cwd-chip svg { flex: none; }\n@media (max-width: 600px) { .ta-cwd-chip { max-width: 120px; } }\n/* The letters of the list in hues of the agents' faces (yellow, blue, orange, green, violet, pink), drawn as tints of the theme (--ta-tint-<n>, style/tints.ts). */\n.ta-tone-0 { --tone-tint: var(--ta-tint-2); --tone-ink: var(--ta-tint-ink-2); }\n.ta-tone-1 { --tone-tint: var(--ta-tint-0); --tone-ink: var(--ta-tint-ink-0); }\n.ta-tone-2 { --tone-tint: var(--ta-tint-4); --tone-ink: var(--ta-tint-ink-4); }\n.ta-tone-3 { --tone-tint: var(--ta-tint-3); --tone-ink: var(--ta-tint-ink-3); }\n.ta-tone-4 { --tone-tint: var(--ta-tint-5); --tone-ink: var(--ta-tint-ink-5); }\n.ta-tone-5 { --tone-tint: var(--ta-tint-7); --tone-ink: var(--ta-tint-ink-7); }\n";
|
|
2
|
+
export declare const CHAT_LIST_STYLE = "\n/* The list of chats: a search, then the chats by directory (a line each under the head of its group) or by day (each with the avatar of its directory) */\n.ta-chats { gap: 8px; }\n/* On a phone a folder opened is pushed over the list (PhoneStack): the same ground and spacing as the list. */\n.ta-chats > .ta-phone-stack > .ta-phone-stack-base, .ta-chats > .ta-phone-stack > .ta-phone-stack-top { gap: 8px; }\n.ta-chats > .ta-phone-stack > .ta-phone-stack-top { background: var(--ta-side); }\n.ta-chats-head { gap: 4px; padding: 0; margin-bottom: 0; }\n.ta-chats-search { flex: 1; min-width: 0; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 4px 0 11px; border-radius: 10px; background: var(--ta-raised); color: var(--ta-muted); border: 1px solid transparent; transition: border-color 120ms, background 120ms; }\n.ta-chats-search:focus-within { border-color: var(--ta-border-field); background: var(--ta-input); }\n.ta-chats-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ta-text); padding: 0; font-size: calc(13.5px * var(--ta-font-scale)); }\n.ta-chats-search input::placeholder { color: var(--ta-muted); }\n.ta-chats-clear { width: 24px; height: 24px; }\n.ta-chips { display: flex; gap: 6px; flex: none; overflow-x: auto; scrollbar-width: none; margin: 0 -8px; padding: 0 8px 2px; }\n.ta-chips::-webkit-scrollbar { display: none; }\n.ta-chip-filter { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid var(--ta-border); background: transparent; color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); white-space: nowrap; transition: background 120ms, color 120ms, border-color 120ms; }\n.ta-chip-filter:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-chip-filter[aria-selected='true'] { background: var(--ta-selected); border-color: transparent; color: var(--ta-text); font-weight: 500; }\n.ta-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone-ink); }\n.ta-chip-count { color: var(--ta-muted); font-variant-numeric: tabular-nums; font-weight: 400; }\n.ta-chat-section + .ta-chat-section { margin-top: 6px; }\n.ta-chats-view { width: 26px; height: 26px; border-radius: 7px; color: var(--ta-muted); }\n.ta-chats-view[aria-pressed='true'] { color: var(--ta-text); background: var(--ta-hover-strong); }\n.ta-chat-group + .ta-chat-group { margin-top: 4px; }\n.ta-chat-group-head { position: relative; display: flex; align-items: center; }\n.ta-chat-group-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 40px 0 10px; border: 0; border-radius: 10px; background: transparent; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); font-weight: 500; text-align: left; }\n.ta-chat-group-toggle:hover { background: var(--ta-hover); color: var(--ta-text); }\n.ta-chat-group-avatar { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--tone-tint); color: var(--tone-ink); font-size: 11px; font-weight: 600; }\n.ta-chat-group-toggle .ta-host-tag { margin-right: -3px; }\n.ta-chat-group-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-group-count { flex: none; color: var(--ta-muted); font-weight: 400; font-variant-numeric: tabular-nums; }\n.ta-chat-group-chevron { flex: none; color: var(--ta-muted); transition: transform 150ms ease; }\n.ta-chat-group-toggle[aria-expanded='true'] .ta-chat-group-chevron { transform: rotate(90deg); }\n.ta-chat-group-add { position: absolute; right: 6px; top: 50%; width: 26px; height: 26px; transform: translateY(-50%); opacity: 0; }\n.ta-chat-group-head:hover .ta-chat-group-add, .ta-chat-group-add:focus-visible { opacity: 1; }\n.ta-chat-group-toggle .ta-chat-icon, .ta-chat-folder-head .ta-chat-icon { flex: none; border-radius: 6px; }\n.ta-chat-folder-head { flex: none; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 2px; border-bottom: 1px solid var(--ta-border); color: var(--ta-text); font-size: calc(14px * var(--ta-font-scale)); font-weight: 600; }\n.ta-chat-folder-back { width: 30px; height: 30px; flex: none; }\n.ta-chat-folder-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-item.ta-compact { min-height: 34px; padding: 7px 10px 7px 38px; border-radius: 10px; }\n.ta-chat-row:has(.ta-chat-item.ta-compact) { border-radius: 10px; }\n.ta-compact .ta-chat-title { font-weight: 400; color: var(--ta-body); }\n.ta-chat-section-title { padding: 8px 10px 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-chat-fold { display: flex; align-items: center; gap: 4px; width: 100%; margin-top: 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }\n.ta-chat-fold:hover { color: var(--ta-text); }\n.ta-chat-fold svg { transition: transform 0.15s ease; }\n.ta-chat-fold[aria-expanded=\"true\"] svg { transform: rotate(90deg); }\n.ta-chat-removed .ta-chat-item { opacity: 0.72; }\n.ta-chat-group .ta-chat-fold { margin-top: 0; padding-left: 14px; }\n.ta-chat-more { height: 1px; }\n/* Rows out of view are not laid out or painted (their menu opens in a portal, their actions within them). */\n.ta-chat-row { position: relative; border-radius: 12px; content-visibility: auto; contain-intrinsic-size: auto 60px; }\n.ta-chat-row:has(.ta-compact) { contain-intrinsic-size: auto 36px; }\n.ta-chat-row:hover { background: var(--ta-hover); }\n.ta-chat-row.ta-selected { background: var(--ta-selected); }\n.ta-chat-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 9px 10px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: inherit; }\n.ta-chat-avatar { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--tone-tint); color: var(--tone-ink); font-size: 15px; font-weight: 600; }\n.ta-chat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }\n.ta-chat-line { display: flex; align-items: center; gap: 8px; min-width: 0; }\n.ta-chat-title { flex: 1; min-width: 0; font-size: calc(14px * var(--ta-font-scale)); font-weight: 500; color: var(--ta-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-time { flex: none; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); font-variant-numeric: tabular-nums; }\n.ta-chat-sub { flex: 1; min-width: 0; font-size: calc(12.5px * var(--ta-font-scale)); color: var(--ta-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-chat-line .ta-spinner { width: 12px; height: 12px; }\n/* Someone to talk to: the double's face, or the face an extension draws for its agent, in place of a letter. */\n.ta-chat-face { flex: none; display: inline-grid; place-items: center; }\n/* A conversation of an extension that is no one to talk to (a brief, a question): its icon on a tile of its tint. */\n.ta-chat-icon { background: var(--ta-tile); color: var(--ta-tile-ink); }\n/* In a row of one line, in the room left of its title, under the letter of its group: the title stays where the others are. */\n.ta-compact .ta-chat-face { margin-left: -28px; }\n/* What goes on in it, at the end of a line: answering (a spinner, on the line under the title), a task that failed or was stopped. */\n.ta-chat-state { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); white-space: nowrap; }\n.ta-chat-state .ta-status { width: 8px; }\n.ta-chat-state.ta-failed { color: color-mix(in srgb, var(--ta-red) 85%, var(--ta-muted)); }\n/* Under the title, as a messaging app: the last thing said, or its directory; how a task ended, before it, as WeChat's [Draft]. */\n.ta-chat-dir { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: top; }\n.ta-chat-dir > svg { flex: none; }\n.ta-chat-flag { margin-right: 3px; }\n.ta-chat-flag.ta-replying { color: var(--ta-secondary); }\n.ta-chat-line > .ta-people { margin-left: 4px; }\n/* Out of the way of the button that takes a row out, as its words are. */\n.ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-line > .ta-people:last-child { margin-right: 28px; }\n.ta-chat-line .ta-people-face { box-shadow: none; background: none; }\n.ta-chat-line .ta-people-face + .ta-people-face { margin-left: -3px; }\n.ta-chat-flag.ta-failed { color: color-mix(in srgb, var(--ta-red) 85%, var(--ta-muted)); }\n.ta-chat-flag.ta-draft { color: var(--ta-red); }\n.ta-chat-flag.ta-waiting, .ta-chat-state.ta-waiting { color: color-mix(in srgb, var(--ta-blue) 85%, var(--ta-muted)); }\n/* Its directory, in place of its time while the pointer is on it. */\n.ta-chat-place { display: none; flex: 0 1 auto; align-items: center; gap: 4px; min-width: 0; max-width: 45%; font-size: calc(12px * var(--ta-font-scale)); color: var(--ta-muted); }\n.ta-chat-place > svg { flex: none; }\n.ta-chat-place > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n@media (hover: hover) {\n .ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-place { display: inline-flex; }\n .ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-time { display: none; }\n}\n.ta-chats-add { width: 36px; height: 36px; border-radius: 10px; background: var(--ta-raised); }\n/* On the line under the title, at its end; in the middle of a row of one line. */\n.ta-chat-delete { position: absolute; bottom: 7px; right: 8px; width: 26px; height: 26px; opacity: 0; }\n.ta-chat-row:has(.ta-compact) .ta-chat-delete { bottom: auto; top: 50%; width: 30px; height: 30px; transform: translateY(-50%); }\n.ta-chat-row:hover .ta-chat-item:not(.ta-compact) .ta-chat-sub { padding-right: 28px; }\n.ta-chat-delete:hover:not(:disabled) { color: var(--ta-red); }\n.ta-chat-row:hover .ta-chat-delete, .ta-chat-delete:focus-visible { opacity: 1; }\n/* Taken out, while ta serve closes it: its button stays, turning. */\n.ta-chat-row .ta-chat-delete.ta-icon-button.ta-busy { display: inline-grid; opacity: 1; }\n.ta-chat-row:hover .ta-compact .ta-chat-time, .ta-chat-row:hover .ta-chat-state { visibility: hidden; }\n/*\n * Unseen, as a messenger's unread: an amber dot on the corner of the avatar (before the time in a row of one line), as\n * the agents of the side bar have; it grows in and shrinks away. Cut out of the avatar by the color of the row.\n */\n.ta-chat-avatar-box { position: relative; display: inline-flex; flex: none; }\n.ta-chat-row { --ta-chat-bg: var(--ta-side); }\n.ta-chat-row:hover { --ta-chat-bg: var(--ta-hover); }\n.ta-chat-row.ta-selected { --ta-chat-bg: var(--ta-selected); }\n.ta-chat-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ta-yellow); transform: scale(0); opacity: 0; transition: transform 0.24s cubic-bezier(0.3, 1.5, 0.5, 1), opacity 0.18s ease; }\n.ta-chat-line > .ta-chat-dot:not(.ta-on) { width: 0; margin-left: -8px; }\n.ta-chat-avatar-box > .ta-chat-dot { position: absolute; right: -2px; bottom: -2px; z-index: 1; width: 12px; height: 12px; box-sizing: border-box; border: 2px solid var(--ta-chat-bg); }\n.ta-chat-dot.ta-on { transform: none; opacity: 1; }\n/* A conversation that waits for the user to decide: a blue ? in place of the amber dot, which seeing it does not take away. */\n.ta-chat-dot.ta-asks { display: grid; place-items: center; background: var(--ta-blue); color: #fff; font-size: 9px; font-weight: 700; line-height: 1; }\n.ta-chat-line > .ta-chat-dot.ta-asks { width: 13px; height: 13px; }\n.ta-chat-avatar-box > .ta-chat-dot.ta-asks { right: -3px; bottom: -3px; width: 17px; height: 17px; font-size: 10px; }\n/* Only those going on (the row of the double opened the list): a chip that clears it, its count beside its label. */\n.ta-chat-filter { display: flex; padding: 0 2px 2px; }\n.ta-chat-filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 11px; border: 0; border-radius: 14px; background: var(--ta-chip); color: var(--ta-text); font: inherit; font-size: calc(12.5px * var(--ta-font-scale)); cursor: pointer; transition: background 120ms; }\n.ta-chat-filter-chip:hover { background: var(--ta-selected); }\n.ta-chat-filter-chip > svg { color: var(--ta-muted); }\n.ta-chat-filter-count { font-variant-numeric: tabular-nums; color: var(--ta-secondary); }\n/* How many wait for the user to decide, on the entry of the chats: over the corner of its icon. */\n.ta-asks-badge { position: absolute; top: 3px; right: 1px; z-index: 1; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--ta-blue); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; pointer-events: none; box-shadow: 0 0 0 2px var(--ta-side); }\n.ta-tabbar-icon > .ta-asks-badge { top: -5px; right: -11px; }\n@media (prefers-reduced-motion: reduce) { .ta-chat-dot { transition: opacity 0.18s ease; } }\n/* What came unseen reads as unread: in the color of the text, not muted. */\n.ta-chat-sub.ta-unseen { color: var(--ta-text); }\n/* Above the box: where a new conversation will work (ComposerBox's head), a pill of its directory. */\n.ta-console-head { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 0 6px; }\n.ta-console-head .ta-cwd-chip { max-width: min(100%, 360px); height: 26px; padding: 0 8px 0 7px; background: transparent; }\n.ta-console-head .ta-cwd-chip:hover { background: var(--ta-hover); }\n.ta-console-head .ta-cwd-chip .ta-ellipsis { flex: 0 1 auto; min-width: 0; max-width: none; }\n.ta-cwd-chip { display: inline-flex; align-items: center; gap: 5px; flex: none; max-width: 180px; overflow: hidden; height: 30px; padding: 0 9px 0 10px; border: 0; border-radius: 15px; background: var(--ta-hover); color: var(--ta-secondary); font-size: calc(12.5px * var(--ta-font-scale)); transition: background 120ms, color 120ms; }\n.ta-cwd-chip:hover { background: var(--ta-hover-strong); color: var(--ta-text); }\n.ta-cwd-chip svg { flex: none; }\n@media (max-width: 600px) { .ta-cwd-chip { max-width: 120px; } }\n/* The letters of the list in hues of the agents' faces (yellow, blue, orange, green, violet, pink), drawn as tints of the theme (--ta-tint-<n>, style/tints.ts). */\n.ta-tone-0 { --tone-tint: var(--ta-tint-2); --tone-ink: var(--ta-tint-ink-2); }\n.ta-tone-1 { --tone-tint: var(--ta-tint-0); --tone-ink: var(--ta-tint-ink-0); }\n.ta-tone-2 { --tone-tint: var(--ta-tint-4); --tone-ink: var(--ta-tint-ink-4); }\n.ta-tone-3 { --tone-tint: var(--ta-tint-3); --tone-ink: var(--ta-tint-ink-3); }\n.ta-tone-4 { --tone-tint: var(--ta-tint-5); --tone-ink: var(--ta-tint-ink-5); }\n.ta-tone-5 { --tone-tint: var(--ta-tint-7); --tone-ink: var(--ta-tint-ink-7); }\n/* The partners (PartnersList): agents, friends and group chats, each a section under a small title, rows as the chats. */\n.ta-partners .ta-chat-section-title { display: flex; align-items: center; gap: 6px; }\n.ta-partners .ta-chat-group + .ta-chat-group { margin-top: 6px; }\n.ta-partner-online { position: absolute; left: -1px; bottom: -1px; z-index: 1; width: 10px; height: 10px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--ta-chat-bg); background: var(--ta-green); }\n/* Starting a chat (GroupPicker): agents and friends to tick, the one of a chat it starts from ticked already. */\n.ta-partner-pick { display: flex; flex-direction: column; gap: 10px; min-height: 0; }\n.ta-partner-pick-lead { margin: 0; color: var(--ta-secondary); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-partner-pick-list { display: flex; flex-direction: column; gap: 2px; min-height: 0; max-height: min(56vh, 420px); margin: 0; padding: 0; overflow-y: auto; list-style: none; }\n.ta-partner-pick-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: none; border-radius: 10px; background: transparent; color: var(--ta-text); font: inherit; text-align: left; cursor: pointer; }\n.ta-partner-pick-row:hover:not(:disabled) { background: var(--ta-hover); }\n.ta-partner-pick-row:disabled { cursor: default; }\n.ta-partner-pick-box { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; box-sizing: border-box; border: 1.5px solid var(--ta-border-field); border-radius: 50%; color: #fff; transition: background 0.12s, border-color 0.12s; }\n.ta-partner-pick-box.ta-on { border-color: var(--ta-green); background: var(--ta-green); }\n.ta-partner-pick-row:disabled .ta-partner-pick-box.ta-on { opacity: 0.5; }\n.ta-partner-pick-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ta-partner-pick-kind { flex: none; color: var(--ta-muted); font-size: calc(12px * var(--ta-font-scale)); }\n.ta-partner-pick-error { margin: 0; color: var(--ta-red); font-size: calc(13px * var(--ta-font-scale)); }\n.ta-partner-pick-foot { display: flex; justify-content: flex-end; }\n";
|
|
3
3
|
//# sourceMappingURL=chat-list.d.ts.map
|