@celljs/ta-web 4.11.0 → 4.12.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/assistant/assistant-view.js +5 -2
- package/esm/browser/chat/chat-view.js +6 -5
- package/esm/browser/components/app-view.js +8 -4
- package/esm/browser/components/composer-box.d.ts +1 -0
- package/esm/browser/components/composer-box.js +50 -28
- package/esm/browser/components/composer.d.ts +3 -0
- package/esm/browser/components/composer.js +28 -2
- package/esm/browser/components/conversation-scroll-hooks.d.ts +16 -0
- package/esm/browser/components/conversation-scroll-hooks.js +98 -0
- package/esm/browser/components/conversation-scroll-util.d.ts +30 -0
- package/esm/browser/components/conversation-scroll-util.js +56 -0
- package/esm/browser/components/conversation-scroll.d.ts +45 -31
- package/esm/browser/components/conversation-scroll.js +125 -123
- package/esm/browser/components/face.d.ts +24 -0
- package/esm/browser/components/face.js +42 -0
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/media.js +59 -10
- package/esm/browser/components/message-actions.js +1 -0
- package/esm/browser/components/message-footer.d.ts +2 -0
- package/esm/browser/components/message-list.d.ts +3 -1
- package/esm/browser/components/message-list.js +55 -23
- package/esm/browser/components/phone-shell.js +2 -0
- package/esm/browser/components/session-view.d.ts +3 -1
- package/esm/browser/components/session-view.js +7 -3
- package/esm/browser/components/stop-times.d.ts +47 -0
- package/esm/browser/components/stop-times.js +81 -0
- package/esm/browser/components/use-stop-times.d.ts +3 -0
- package/esm/browser/components/use-stop-times.js +17 -0
- package/esm/browser/device/photo-picker.d.ts +14 -0
- package/esm/browser/device/photo-picker.js +48 -0
- package/esm/browser/device/row-swipe.d.ts +2 -0
- package/esm/browser/device/row-swipe.js +8 -2
- package/esm/browser/device/sheet-swipe.d.ts +1 -1
- package/esm/browser/device/sheet-swipe.js +17 -3
- package/esm/browser/extension/icons.js +2 -1
- package/esm/browser/extension/web-api-components.d.ts +18 -0
- package/esm/browser/extension/web-api-contributions.d.ts +9 -0
- package/esm/browser/extension/web-extension-api.d.ts +22 -2
- package/esm/browser/extension/web-extension-context.js +9 -1
- package/esm/browser/extension/web-extension-protocol.d.ts +13 -1
- package/esm/browser/extension/web-extension-protocol.js +1 -0
- package/esm/browser/extension/web-extensions.js +3 -0
- package/esm/browser/i18n/locales.d.ts +11 -1
- package/esm/browser/i18n/messages.d.ts +10 -0
- package/esm/browser/i18n/messages.js +20 -0
- package/esm/browser/links/links-protocol.d.ts +2 -0
- package/esm/browser/links/links.d.ts +7 -2
- package/esm/browser/links/links.js +16 -9
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +2 -0
- package/esm/browser/style/layout.d.ts +1 -1
- package/esm/browser/style/layout.js +3 -0
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +3 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +2 -0
- package/esm/browser/style/surfaces.d.ts +1 -1
- package/esm/browser/style/surfaces.js +19 -0
- package/esm/browser/util/frame.d.ts +2 -0
- package/esm/browser/util/frame.js +2 -0
- package/esm/browser/util/process.d.ts +43 -1
- package/esm/browser/util/process.js +84 -3
- package/lib/browser/assistant/assistant-view.js +5 -2
- package/lib/browser/chat/chat-view.js +6 -5
- package/lib/browser/components/app-view.js +8 -4
- package/lib/browser/components/composer-box.d.ts +1 -0
- package/lib/browser/components/composer-box.js +48 -26
- package/lib/browser/components/composer.d.ts +3 -0
- package/lib/browser/components/composer.js +28 -2
- package/lib/browser/components/conversation-scroll-hooks.d.ts +17 -0
- package/lib/browser/components/conversation-scroll-hooks.js +135 -0
- package/lib/browser/components/conversation-scroll-util.d.ts +31 -0
- package/lib/browser/components/conversation-scroll-util.js +60 -0
- package/lib/browser/components/conversation-scroll.d.ts +45 -31
- package/lib/browser/components/conversation-scroll.js +126 -158
- package/lib/browser/components/face.d.ts +25 -0
- package/lib/browser/components/face.js +79 -0
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/media.js +59 -10
- package/lib/browser/components/message-actions.js +1 -0
- package/lib/browser/components/message-footer.d.ts +2 -0
- package/lib/browser/components/message-list.d.ts +3 -1
- package/lib/browser/components/message-list.js +53 -21
- package/lib/browser/components/phone-shell.js +2 -0
- package/lib/browser/components/session-view.d.ts +3 -1
- package/lib/browser/components/session-view.js +8 -4
- package/lib/browser/components/stop-times.d.ts +48 -0
- package/lib/browser/components/stop-times.js +85 -0
- package/lib/browser/components/use-stop-times.d.ts +4 -0
- package/lib/browser/components/use-stop-times.js +53 -0
- package/lib/browser/device/photo-picker.d.ts +15 -0
- package/lib/browser/device/photo-picker.js +51 -0
- package/lib/browser/device/row-swipe.d.ts +2 -0
- package/lib/browser/device/row-swipe.js +8 -2
- package/lib/browser/device/sheet-swipe.d.ts +1 -1
- package/lib/browser/device/sheet-swipe.js +17 -3
- package/lib/browser/extension/icons.js +1 -0
- package/lib/browser/extension/web-api-components.d.ts +18 -0
- package/lib/browser/extension/web-api-contributions.d.ts +9 -0
- package/lib/browser/extension/web-extension-api.d.ts +22 -2
- package/lib/browser/extension/web-extension-context.js +10 -2
- package/lib/browser/extension/web-extension-protocol.d.ts +13 -1
- package/lib/browser/extension/web-extension-protocol.js +1 -0
- package/lib/browser/extension/web-extensions.js +3 -0
- package/lib/browser/i18n/locales.d.ts +11 -1
- package/lib/browser/i18n/messages.d.ts +10 -0
- package/lib/browser/i18n/messages.js +20 -0
- package/lib/browser/links/links-protocol.d.ts +2 -0
- package/lib/browser/links/links.d.ts +7 -2
- package/lib/browser/links/links.js +16 -9
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +2 -0
- package/lib/browser/style/layout.d.ts +1 -1
- package/lib/browser/style/layout.js +3 -0
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +3 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +2 -0
- package/lib/browser/style/surfaces.d.ts +1 -1
- package/lib/browser/style/surfaces.js +19 -0
- package/lib/browser/util/frame.d.ts +2 -0
- package/lib/browser/util/frame.js +2 -0
- package/lib/browser/util/process.d.ts +43 -1
- package/lib/browser/util/process.js +86 -4
- package/package.json +7 -7
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { type FrameScheduler } from '../util/frame';
|
|
2
|
+
import { type ScrollRow } from './conversation-scroll-util';
|
|
2
3
|
/** A message of the user in the thread: where the view goes when one is sent. */
|
|
3
4
|
export declare const ASK_CLASS = "ta-thread-ask";
|
|
4
5
|
/** A row of the thread under which earlier rows come in (what says they load): the row read is the one after it. */
|
|
5
6
|
export declare const SCROLL_SKIP: {
|
|
6
7
|
readonly 'data-scroll-skip': '';
|
|
7
8
|
};
|
|
9
|
+
/** The thread while the mouse holds the scroll bar: what grows past its height is clipped, and no row shrinks for it. */
|
|
10
|
+
export declare const HELD_CLASS = "ta-scroll-held";
|
|
11
|
+
/** Whether motion is reduced in the settings: scrolls go at once. */
|
|
12
|
+
export declare function calm(): boolean;
|
|
8
13
|
/** What the scrolling of a conversation reads of its view. */
|
|
9
14
|
export interface ScrollView {
|
|
10
15
|
scrollTop: number;
|
|
@@ -15,23 +20,16 @@ export interface ScrollView {
|
|
|
15
20
|
top: number;
|
|
16
21
|
};
|
|
17
22
|
}
|
|
18
|
-
/** A row of the thread. */
|
|
19
|
-
export interface ScrollRow {
|
|
20
|
-
/** From the top of the thread. */
|
|
21
|
-
readonly offsetTop: number;
|
|
22
|
-
readonly offsetHeight: number;
|
|
23
|
-
readonly isConnected: boolean;
|
|
24
|
-
/** `scrollSkip`: SCROLL_SKIP. */
|
|
25
|
-
readonly dataset?: {
|
|
26
|
-
readonly scrollSkip?: string;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
23
|
/** The thread in the view: its rows (HTML elements: ScrollRow), and the room under them for the answer to a message sent. */
|
|
30
24
|
export interface ScrollThread {
|
|
31
25
|
readonly children: ArrayLike<object>;
|
|
32
26
|
readonly offsetHeight: number;
|
|
33
27
|
readonly style: {
|
|
34
28
|
paddingBottom: string;
|
|
29
|
+
height: string;
|
|
30
|
+
};
|
|
31
|
+
readonly classList: {
|
|
32
|
+
toggle(token: string, force?: boolean): boolean;
|
|
35
33
|
};
|
|
36
34
|
}
|
|
37
35
|
/**
|
|
@@ -39,7 +37,9 @@ export interface ScrollThread {
|
|
|
39
37
|
* holds a row for each message.
|
|
40
38
|
*
|
|
41
39
|
* - At the bottom, the view follows what comes in, after layout, on a change of the size of the thread or of
|
|
42
|
-
* the view.
|
|
40
|
+
* the view. What grew in sight glides into the view (GLIDE_MS); what grew above it moves the view with it at once,
|
|
41
|
+
* so that no row in sight moves for it; the view changing its height (the message box, the keyboard) goes at once.
|
|
42
|
+
* The user scrolling up, by however little, leaves it where they took it: a wheel, a finger, a key,
|
|
43
43
|
* the scroll bar, whatever else moved the view up. Back down near the bottom, it follows again.
|
|
44
44
|
* - Away from the bottom, what the user reads stays where it is: the row at the top of the view keeps its place
|
|
45
45
|
* as rows above it change their height (earlier messages coming in, pictures, rows laid out as they come into
|
|
@@ -47,7 +47,8 @@ export interface ScrollThread {
|
|
|
47
47
|
* keyboard of a phone), as in a chat app.
|
|
48
48
|
* - A part of a message opened or closed by a click (what has `aria-expanded`, a `summary`) stays where it was
|
|
49
49
|
* clicked; opened past the bottom, the view stops following, for the user to read it.
|
|
50
|
-
* - While the user holds the view (a finger on it, the mouse on its scroll bar), nothing moves it under them
|
|
50
|
+
* - While the user holds the view (a finger on it, the mouse on its scroll bar), nothing moves it under them; the
|
|
51
|
+
* thread keeps its height while the scroll bar is held (`HELD_CLASS`), so that the thumb does not move under the mouse.
|
|
51
52
|
* - A message the user sends goes to the top of the view, and the answer comes in under it: the thread keeps
|
|
52
53
|
* the room for that until the answer fills it (`send`), and the message keeps to the top as rows above it
|
|
53
54
|
* change their height (the turn it was sent into folding its steps).
|
|
@@ -69,7 +70,15 @@ export declare class ConversationScroller {
|
|
|
69
70
|
/** Where the view was when it last moved, and how high it was. */
|
|
70
71
|
private top;
|
|
71
72
|
private height;
|
|
73
|
+
/** How high the thread was when the view last moved or it changed its size: a move up as it changes is the browser's. */
|
|
74
|
+
private extent;
|
|
72
75
|
private held;
|
|
76
|
+
/**
|
|
77
|
+
* The mouse holds the scroll bar: the thread keeps its height until let go. The browser puts the view where
|
|
78
|
+
* the thumb is at each move of the mouse, by the height of the thread: a reply growing under it would move
|
|
79
|
+
* the view back and forth, and the thumb with it.
|
|
80
|
+
*/
|
|
81
|
+
private frozen;
|
|
73
82
|
/** When the user last moved the view by hand (HAND_MS). */
|
|
74
83
|
private handAt;
|
|
75
84
|
private touchY;
|
|
@@ -86,7 +95,11 @@ export declare class ConversationScroller {
|
|
|
86
95
|
/** The `scrollend` of a browser without one (SCROLL_END_MS). */
|
|
87
96
|
private endTimer;
|
|
88
97
|
private readonly nativeEnd;
|
|
89
|
-
|
|
98
|
+
/** The view on its way to the bottom (`attach`, or given frames); without it the view goes there at once. */
|
|
99
|
+
private glider;
|
|
100
|
+
/** The row at the top of the view when it last followed, and how far it started below the top of the view. */
|
|
101
|
+
private seen;
|
|
102
|
+
constructor(view: ScrollView, thread: ScrollThread, now?: () => number, frames?: FrameScheduler);
|
|
90
103
|
/** Whether the view follows what comes in. */
|
|
91
104
|
get atLatest(): boolean;
|
|
92
105
|
/** Listens to `view` (the view of this scroller) and its thread; returns what stops it. */
|
|
@@ -106,20 +119,36 @@ export declare class ConversationScroller {
|
|
|
106
119
|
key(key: string, shift: boolean): void;
|
|
107
120
|
touchStart(y: number | undefined): void;
|
|
108
121
|
touchMove(y: number | undefined, target: EventTarget | null): void;
|
|
109
|
-
|
|
122
|
+
/** `bar`: the mouse on the scroll bar, rather than a finger on the view. */
|
|
123
|
+
hold(bar?: boolean): void;
|
|
110
124
|
/** Let go: what came in meanwhile shows, if the view follows. */
|
|
111
125
|
release(): void;
|
|
112
126
|
clicked(target: EventTarget | null): void;
|
|
113
127
|
/** The thread or the view changed its size. */
|
|
114
128
|
resized(): void;
|
|
129
|
+
/**
|
|
130
|
+
* The row of the message sent, while it is there. Rows are drawn by the place of their message: one coming in
|
|
131
|
+
* before it (what an extension adds to the turn) gives its row to that one, which may show nothing, and the
|
|
132
|
+
* message to the next row; the view would else go to the top of the thread.
|
|
133
|
+
*/
|
|
134
|
+
private sentRow;
|
|
115
135
|
/** Where the view goes for the message sent to be at its top, with the room under the thread for that. */
|
|
116
136
|
private place;
|
|
137
|
+
private freeze;
|
|
117
138
|
private makeRoom;
|
|
118
139
|
private arrive;
|
|
119
140
|
/** The user moves the view: a smooth scroll on its way is theirs now, the message sent no longer holds the top. */
|
|
120
141
|
private byUser;
|
|
121
142
|
/** The user moves the view up: it stops following before the scroll comes, which a follow would undo. */
|
|
122
143
|
private leave;
|
|
144
|
+
/**
|
|
145
|
+
* To the bottom, following what grew: at once when `now` (the view changed its height) or the view cannot glide;
|
|
146
|
+
* else the row at the top of the view keeps its place (what grew above it is out of sight), and the rest glides.
|
|
147
|
+
*/
|
|
148
|
+
private follow;
|
|
149
|
+
private glide;
|
|
150
|
+
/** The row at the top of the view now (`seen`). */
|
|
151
|
+
private see;
|
|
123
152
|
private toBottomNow;
|
|
124
153
|
private moveTo;
|
|
125
154
|
/** The first row in the view, while it does not follow. */
|
|
@@ -128,19 +157,4 @@ export declare class ConversationScroller {
|
|
|
128
157
|
/** Whether what `element` opened goes on past the bottom of the view. */
|
|
129
158
|
private past;
|
|
130
159
|
}
|
|
131
|
-
export interface ConversationScrollOptions {
|
|
132
|
-
/** Where a message sent goes: to the top of the view with its answer under it (a conversation), or to the bottom (a group chat). */
|
|
133
|
-
sentTo?: 'top' | 'bottom';
|
|
134
|
-
/** Another key (another chat in the same view) goes to the bottom. */
|
|
135
|
-
key?: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* The scrolling of a conversation (ConversationScroller), whose thread is the first child of the element of the
|
|
139
|
-
* returned ref. Opened, and when messages of the user go (a rewind), the view goes to the bottom.
|
|
140
|
-
*
|
|
141
|
-
* `asked`: how many messages of the user there are; the thread marks them with ASK_CLASS.
|
|
142
|
-
*/
|
|
143
|
-
export declare function useConversationScroll(asked: number, options?: ConversationScrollOptions): React.RefObject<HTMLDivElement | null>;
|
|
144
|
-
/** Whether the conversation of `ref` is scrolled up from its latest, and a way back to it. */
|
|
145
|
-
export declare function useAwayFromBottom(ref: React.RefObject<HTMLDivElement | null>): [boolean, () => void];
|
|
146
160
|
//# sourceMappingURL=conversation-scroll.d.ts.map
|
|
@@ -1,43 +1,9 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.ConversationScroller = exports.SCROLL_SKIP = exports.ASK_CLASS = void 0;
|
|
37
|
-
exports.
|
|
38
|
-
exports.useAwayFromBottom = useAwayFromBottom;
|
|
39
|
-
const React = __importStar(require("react"));
|
|
3
|
+
exports.ConversationScroller = exports.HELD_CLASS = exports.SCROLL_SKIP = exports.ASK_CLASS = void 0;
|
|
4
|
+
exports.calm = calm;
|
|
40
5
|
const frame_1 = require("../util/frame");
|
|
6
|
+
const conversation_scroll_util_1 = require("./conversation-scroll-util");
|
|
41
7
|
/** A message of the user in the thread: where the view goes when one is sent. */
|
|
42
8
|
exports.ASK_CLASS = 'ta-thread-ask';
|
|
43
9
|
/** How long a part of a message opened or closed by a click keeps its place (a motion of its height). */
|
|
@@ -62,11 +28,16 @@ const TOGGLE = '[aria-expanded], summary';
|
|
|
62
28
|
* follow its answer.
|
|
63
29
|
*/
|
|
64
30
|
const SCROLL_END_MS = 150;
|
|
31
|
+
/** At most this share of the view is left to glide: more coming at once (a block, what came while away) jumps the rest. */
|
|
32
|
+
const GLIDE_MAX = 0.5;
|
|
65
33
|
function hasScrollEnd() {
|
|
66
34
|
return typeof window !== 'undefined' && 'onscrollend' in window;
|
|
67
35
|
}
|
|
68
36
|
/** A row of the thread under which earlier rows come in (what says they load): the row read is the one after it. */
|
|
69
37
|
exports.SCROLL_SKIP = { 'data-scroll-skip': '' };
|
|
38
|
+
/** The thread while the mouse holds the scroll bar: what grows past its height is clipped, and no row shrinks for it. */
|
|
39
|
+
exports.HELD_CLASS = 'ta-scroll-held';
|
|
40
|
+
/** Whether motion is reduced in the settings: scrolls go at once. */
|
|
70
41
|
function calm() {
|
|
71
42
|
return typeof document !== 'undefined' && document.documentElement.hasAttribute('data-reduce-motion');
|
|
72
43
|
}
|
|
@@ -90,7 +61,9 @@ function scrollsInside(target, view, up) {
|
|
|
90
61
|
* holds a row for each message.
|
|
91
62
|
*
|
|
92
63
|
* - At the bottom, the view follows what comes in, after layout, on a change of the size of the thread or of
|
|
93
|
-
* the view.
|
|
64
|
+
* the view. What grew in sight glides into the view (GLIDE_MS); what grew above it moves the view with it at once,
|
|
65
|
+
* so that no row in sight moves for it; the view changing its height (the message box, the keyboard) goes at once.
|
|
66
|
+
* The user scrolling up, by however little, leaves it where they took it: a wheel, a finger, a key,
|
|
94
67
|
* the scroll bar, whatever else moved the view up. Back down near the bottom, it follows again.
|
|
95
68
|
* - Away from the bottom, what the user reads stays where it is: the row at the top of the view keeps its place
|
|
96
69
|
* as rows above it change their height (earlier messages coming in, pictures, rows laid out as they come into
|
|
@@ -98,7 +71,8 @@ function scrollsInside(target, view, up) {
|
|
|
98
71
|
* keyboard of a phone), as in a chat app.
|
|
99
72
|
* - A part of a message opened or closed by a click (what has `aria-expanded`, a `summary`) stays where it was
|
|
100
73
|
* clicked; opened past the bottom, the view stops following, for the user to read it.
|
|
101
|
-
* - While the user holds the view (a finger on it, the mouse on its scroll bar), nothing moves it under them
|
|
74
|
+
* - While the user holds the view (a finger on it, the mouse on its scroll bar), nothing moves it under them; the
|
|
75
|
+
* thread keeps its height while the scroll bar is held (`HELD_CLASS`), so that the thumb does not move under the mouse.
|
|
102
76
|
* - A message the user sends goes to the top of the view, and the answer comes in under it: the thread keeps
|
|
103
77
|
* the room for that until the answer fills it (`send`), and the message keeps to the top as rows above it
|
|
104
78
|
* change their height (the turn it was sent into folding its steps).
|
|
@@ -108,7 +82,7 @@ class ConversationScroller {
|
|
|
108
82
|
static of(view) {
|
|
109
83
|
return ConversationScroller.views.get(view);
|
|
110
84
|
}
|
|
111
|
-
constructor(view, thread, now = () => performance.now()) {
|
|
85
|
+
constructor(view, thread, now = () => performance.now(), frames) {
|
|
112
86
|
this.view = view;
|
|
113
87
|
this.thread = thread;
|
|
114
88
|
this.now = now;
|
|
@@ -116,6 +90,12 @@ class ConversationScroller {
|
|
|
116
90
|
/** On a smooth way to the bottom (`toBottom`): what comes in meanwhile moves the end of the way. */
|
|
117
91
|
this.chasing = false;
|
|
118
92
|
this.held = false;
|
|
93
|
+
/**
|
|
94
|
+
* The mouse holds the scroll bar: the thread keeps its height until let go. The browser puts the view where
|
|
95
|
+
* the thumb is at each move of the mouse, by the height of the thread: a reply growing under it would move
|
|
96
|
+
* the view back and forth, and the thumb with it.
|
|
97
|
+
*/
|
|
98
|
+
this.frozen = false;
|
|
119
99
|
/** When the user last moved the view by hand (HAND_MS). */
|
|
120
100
|
this.handAt = Number.NEGATIVE_INFINITY;
|
|
121
101
|
/**
|
|
@@ -125,8 +105,10 @@ class ConversationScroller {
|
|
|
125
105
|
this.room = 0;
|
|
126
106
|
this.padding = 0;
|
|
127
107
|
this.nativeEnd = hasScrollEnd();
|
|
108
|
+
this.glider = frames && new conversation_scroll_util_1.ScrollGlide(frames, now);
|
|
128
109
|
this.top = view.scrollTop;
|
|
129
110
|
this.height = view.clientHeight;
|
|
111
|
+
this.extent = view.scrollHeight;
|
|
130
112
|
}
|
|
131
113
|
/** Whether the view follows what comes in. */
|
|
132
114
|
get atLatest() {
|
|
@@ -134,7 +116,9 @@ class ConversationScroller {
|
|
|
134
116
|
}
|
|
135
117
|
/** Listens to `view` (the view of this scroller) and its thread; returns what stops it. */
|
|
136
118
|
attach(view, thread) {
|
|
119
|
+
var _a;
|
|
137
120
|
ConversationScroller.views.set(view, this);
|
|
121
|
+
(_a = this.glider) !== null && _a !== void 0 ? _a : (this.glider = new conversation_scroll_util_1.ScrollGlide(frame_1.FrameUtil.animation, this.now));
|
|
138
122
|
thread.style.paddingBottom = '';
|
|
139
123
|
this.padding = Number.parseFloat(getComputedStyle(thread).paddingBottom) || 0;
|
|
140
124
|
const onScroll = () => {
|
|
@@ -161,10 +145,16 @@ class ConversationScroller {
|
|
|
161
145
|
// The mouse on the scroll bar (or beside the thread): the view itself is the target.
|
|
162
146
|
const onPointerDown = (event) => {
|
|
163
147
|
if (event.pointerType === 'mouse' && event.button === 0 && event.target === view) {
|
|
164
|
-
this.hold();
|
|
148
|
+
this.hold(true);
|
|
165
149
|
}
|
|
166
150
|
};
|
|
167
151
|
const onPointerUp = () => this.release();
|
|
152
|
+
// Let go outside the window, where no pointerup may come: the mouse moves with no button held.
|
|
153
|
+
const onPointerMove = (event) => {
|
|
154
|
+
if (this.frozen && event.buttons === 0) {
|
|
155
|
+
this.release();
|
|
156
|
+
}
|
|
157
|
+
};
|
|
168
158
|
// Captured: before the click opens or closes what it is on (React handles it after, on the root).
|
|
169
159
|
const onClick = (event) => this.clicked(event.target);
|
|
170
160
|
const passive = { passive: true };
|
|
@@ -180,11 +170,15 @@ class ConversationScroller {
|
|
|
180
170
|
view.addEventListener('click', onClick, true);
|
|
181
171
|
window.addEventListener('pointerup', onPointerUp, passive);
|
|
182
172
|
window.addEventListener('pointercancel', onPointerUp, passive);
|
|
173
|
+
window.addEventListener('pointermove', onPointerMove, passive);
|
|
183
174
|
const observer = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(() => this.resized()) : undefined;
|
|
184
175
|
observer === null || observer === void 0 ? void 0 : observer.observe(thread);
|
|
185
176
|
// The view itself changes its height under what is around it (the message box, the keyboard of a phone).
|
|
186
177
|
observer === null || observer === void 0 ? void 0 : observer.observe(view);
|
|
187
178
|
return () => {
|
|
179
|
+
var _a;
|
|
180
|
+
this.freeze(false);
|
|
181
|
+
(_a = this.glider) === null || _a === void 0 ? void 0 : _a.stop();
|
|
188
182
|
ConversationScroller.views.delete(view);
|
|
189
183
|
view.removeEventListener('scroll', onScroll);
|
|
190
184
|
view.removeEventListener('scrollend', onScrollEnd);
|
|
@@ -199,11 +193,13 @@ class ConversationScroller {
|
|
|
199
193
|
view.removeEventListener('click', onClick, true);
|
|
200
194
|
window.removeEventListener('pointerup', onPointerUp);
|
|
201
195
|
window.removeEventListener('pointercancel', onPointerUp);
|
|
196
|
+
window.removeEventListener('pointermove', onPointerMove);
|
|
202
197
|
observer === null || observer === void 0 ? void 0 : observer.disconnect();
|
|
203
198
|
};
|
|
204
199
|
}
|
|
205
200
|
/** To the bottom at once, following from there: a conversation opened, loaded again or rewound. */
|
|
206
201
|
reset() {
|
|
202
|
+
this.freeze(false);
|
|
207
203
|
this.makeRoom(0);
|
|
208
204
|
this.sent = undefined;
|
|
209
205
|
this.heading = undefined;
|
|
@@ -256,10 +252,13 @@ class ConversationScroller {
|
|
|
256
252
|
return;
|
|
257
253
|
}
|
|
258
254
|
const distance = view.scrollHeight - top - view.clientHeight;
|
|
255
|
+
// More than a screen up with the thread as it was: a search in the page. As it changed, the browser's: in
|
|
256
|
+
// WebKit the view put back to the top while the steps of a turn fold into its reply, the event after.
|
|
257
|
+
const searched = -moved > view.clientHeight && view.scrollHeight === this.extent;
|
|
259
258
|
if (distance < 1) {
|
|
260
259
|
this.following = true;
|
|
261
260
|
}
|
|
262
|
-
else if (moved <= -1 && (this.held || this.now() - this.handAt < HAND_MS ||
|
|
261
|
+
else if (moved <= -1 && (this.held || this.now() - this.handAt < HAND_MS || searched)) {
|
|
263
262
|
// Up, by the user (the scroll bar dragged, a fling), or by more than a screen for them (a search in the
|
|
264
263
|
// page, which goes to what is out of sight): the view stays where it was taken.
|
|
265
264
|
this.following = false;
|
|
@@ -321,8 +320,12 @@ class ConversationScroller {
|
|
|
321
320
|
}
|
|
322
321
|
this.touchY = y;
|
|
323
322
|
}
|
|
324
|
-
|
|
323
|
+
/** `bar`: the mouse on the scroll bar, rather than a finger on the view. */
|
|
324
|
+
hold(bar = false) {
|
|
325
325
|
this.held = true;
|
|
326
|
+
if (bar) {
|
|
327
|
+
this.freeze(true);
|
|
328
|
+
}
|
|
326
329
|
this.byUser();
|
|
327
330
|
}
|
|
328
331
|
/** Let go: what came in meanwhile shows, if the view follows. */
|
|
@@ -331,6 +334,7 @@ class ConversationScroller {
|
|
|
331
334
|
return;
|
|
332
335
|
}
|
|
333
336
|
this.held = false;
|
|
337
|
+
this.freeze(false);
|
|
334
338
|
this.touchY = undefined;
|
|
335
339
|
if (this.following && this.heading === undefined && !this.chasing) {
|
|
336
340
|
this.toBottomNow();
|
|
@@ -345,11 +349,12 @@ class ConversationScroller {
|
|
|
345
349
|
/** The thread or the view changed its size. */
|
|
346
350
|
resized() {
|
|
347
351
|
const { view } = this;
|
|
352
|
+
this.extent = view.scrollHeight;
|
|
348
353
|
const height = view.clientHeight;
|
|
349
354
|
const shrunk = this.height - height;
|
|
350
355
|
this.height = height;
|
|
351
|
-
const sent = this.
|
|
352
|
-
if (sent
|
|
356
|
+
const sent = this.sentRow();
|
|
357
|
+
if (sent) {
|
|
353
358
|
const top = this.place(sent);
|
|
354
359
|
if (this.heading !== undefined && Math.abs(top - this.heading) >= 1) {
|
|
355
360
|
this.heading = top;
|
|
@@ -374,7 +379,7 @@ class ConversationScroller {
|
|
|
374
379
|
view.scrollTo({ top: view.scrollHeight - view.clientHeight, behavior: 'smooth' });
|
|
375
380
|
}
|
|
376
381
|
else if (!this.held) {
|
|
377
|
-
this.
|
|
382
|
+
this.follow(shrunk !== 0);
|
|
378
383
|
}
|
|
379
384
|
return;
|
|
380
385
|
}
|
|
@@ -384,6 +389,26 @@ class ConversationScroller {
|
|
|
384
389
|
this.moveTo(((anchor === null || anchor === void 0 ? void 0 : anchor.row.isConnected) ? anchor.row.offsetTop - anchor.offset : this.top) + shrunk);
|
|
385
390
|
this.remember();
|
|
386
391
|
}
|
|
392
|
+
/**
|
|
393
|
+
* The row of the message sent, while it is there. Rows are drawn by the place of their message: one coming in
|
|
394
|
+
* before it (what an extension adds to the turn) gives its row to that one, which may show nothing, and the
|
|
395
|
+
* message to the next row; the view would else go to the top of the thread.
|
|
396
|
+
*/
|
|
397
|
+
sentRow() {
|
|
398
|
+
var _a;
|
|
399
|
+
const sent = this.sent;
|
|
400
|
+
if (!(sent === null || sent === void 0 ? void 0 : sent.isConnected) || sent.classList.contains(exports.ASK_CLASS)) {
|
|
401
|
+
return (sent === null || sent === void 0 ? void 0 : sent.isConnected) ? sent : undefined;
|
|
402
|
+
}
|
|
403
|
+
const rows = this.thread.children;
|
|
404
|
+
for (let index = rows.length - 1; index >= 0; index--) {
|
|
405
|
+
if ((_a = rows[index].classList) === null || _a === void 0 ? void 0 : _a.contains(exports.ASK_CLASS)) {
|
|
406
|
+
this.sent = rows[index];
|
|
407
|
+
return rows[index];
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
return undefined;
|
|
411
|
+
}
|
|
387
412
|
/** Where the view goes for the message sent to be at its top, with the room under the thread for that. */
|
|
388
413
|
place(message) {
|
|
389
414
|
// offsetTop: from the thread; the transform of the message coming in does not count.
|
|
@@ -391,6 +416,14 @@ class ConversationScroller {
|
|
|
391
416
|
this.makeRoom(room);
|
|
392
417
|
return top;
|
|
393
418
|
}
|
|
419
|
+
freeze(on) {
|
|
420
|
+
if (on === this.frozen) {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
this.frozen = on;
|
|
424
|
+
this.thread.style.height = on ? `${this.thread.offsetHeight}px` : '';
|
|
425
|
+
this.thread.classList.toggle(exports.HELD_CLASS, on);
|
|
426
|
+
}
|
|
394
427
|
makeRoom(room) {
|
|
395
428
|
if (room !== this.room) {
|
|
396
429
|
this.room = room;
|
|
@@ -401,6 +434,7 @@ class ConversationScroller {
|
|
|
401
434
|
this.heading = undefined;
|
|
402
435
|
this.following = true;
|
|
403
436
|
this.top = this.view.scrollTop;
|
|
437
|
+
this.see();
|
|
404
438
|
}
|
|
405
439
|
/** The user moves the view: a smooth scroll on its way is theirs now, the message sent no longer holds the top. */
|
|
406
440
|
byUser() {
|
|
@@ -420,7 +454,49 @@ class ConversationScroller {
|
|
|
420
454
|
this.remember();
|
|
421
455
|
}
|
|
422
456
|
}
|
|
457
|
+
/**
|
|
458
|
+
* To the bottom, following what grew: at once when `now` (the view changed its height) or the view cannot glide;
|
|
459
|
+
* else the row at the top of the view keeps its place (what grew above it is out of sight), and the rest glides.
|
|
460
|
+
*/
|
|
461
|
+
follow(now) {
|
|
462
|
+
const { view } = this;
|
|
463
|
+
const seen = this.seen;
|
|
464
|
+
if (now || !this.glider || calm() || !(seen === null || seen === void 0 ? void 0 : seen.row.isConnected)) {
|
|
465
|
+
this.toBottomNow();
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
468
|
+
const bottom = view.scrollHeight - view.clientHeight;
|
|
469
|
+
// Never up: a move up of more than a screen would count as the user's (a search in the page).
|
|
470
|
+
const top = Math.max(seen.row.offsetTop - seen.offset, view.scrollTop, bottom - view.clientHeight * GLIDE_MAX);
|
|
471
|
+
this.moveTo(top);
|
|
472
|
+
this.see();
|
|
473
|
+
if (bottom - view.scrollTop >= 1) {
|
|
474
|
+
this.glide();
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
glide() {
|
|
478
|
+
var _a;
|
|
479
|
+
(_a = this.glider) === null || _a === void 0 ? void 0 : _a.start(share => {
|
|
480
|
+
const { view } = this;
|
|
481
|
+
const behind = view.scrollHeight - view.clientHeight - view.scrollTop;
|
|
482
|
+
if (!this.following || this.held || this.chasing || this.heading !== undefined || behind < 1) {
|
|
483
|
+
return false;
|
|
484
|
+
}
|
|
485
|
+
// The last pixel of the way at once: the view lands on the bottom, not short of it.
|
|
486
|
+
const move = Math.max(1, behind * share);
|
|
487
|
+
this.moveTo(behind - move < 1 ? view.scrollHeight - view.clientHeight : view.scrollTop + move);
|
|
488
|
+
this.see();
|
|
489
|
+
return true;
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
/** The row at the top of the view now (`seen`). */
|
|
493
|
+
see() {
|
|
494
|
+
const row = conversation_scroll_util_1.ScrollUtil.firstRow(this.thread.children, this.view.scrollTop);
|
|
495
|
+
this.seen = row ? { row, offset: row.offsetTop - this.view.scrollTop } : undefined;
|
|
496
|
+
}
|
|
423
497
|
toBottomNow() {
|
|
498
|
+
var _a;
|
|
499
|
+
(_a = this.glider) === null || _a === void 0 ? void 0 : _a.stop();
|
|
424
500
|
const { view } = this;
|
|
425
501
|
const bottom = view.scrollHeight - view.clientHeight;
|
|
426
502
|
if (bottom - view.scrollTop >= 1) {
|
|
@@ -428,6 +504,7 @@ class ConversationScroller {
|
|
|
428
504
|
}
|
|
429
505
|
this.top = view.scrollTop;
|
|
430
506
|
this.anchor = undefined;
|
|
507
|
+
this.see();
|
|
431
508
|
}
|
|
432
509
|
moveTo(top) {
|
|
433
510
|
const { view } = this;
|
|
@@ -439,27 +516,13 @@ class ConversationScroller {
|
|
|
439
516
|
}
|
|
440
517
|
/** The first row in the view, while it does not follow. */
|
|
441
518
|
remember() {
|
|
442
|
-
var _a, _b;
|
|
443
519
|
if (this.following) {
|
|
444
520
|
this.anchor = undefined;
|
|
521
|
+
this.see();
|
|
445
522
|
return;
|
|
446
523
|
}
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
let low = 0;
|
|
450
|
-
let high = rows.length - 1;
|
|
451
|
-
while (low < high) {
|
|
452
|
-
const middle = (low + high) >> 1;
|
|
453
|
-
const row = rows[middle];
|
|
454
|
-
if (row.offsetTop + row.offsetHeight > top) {
|
|
455
|
-
high = middle;
|
|
456
|
-
}
|
|
457
|
-
else {
|
|
458
|
-
low = middle + 1;
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
const row = ((_b = (_a = rows[low]) === null || _a === void 0 ? void 0 : _a.dataset) === null || _b === void 0 ? void 0 : _b.scrollSkip) !== undefined && low + 1 < rows.length ? rows[low + 1] : rows[low];
|
|
462
|
-
this.anchor = row ? { row, offset: row.offsetTop - top } : undefined;
|
|
524
|
+
const row = conversation_scroll_util_1.ScrollUtil.firstRow(this.thread.children, this.view.scrollTop);
|
|
525
|
+
this.anchor = row ? { row, offset: row.offsetTop - this.view.scrollTop } : undefined;
|
|
463
526
|
}
|
|
464
527
|
offsetOf(element) {
|
|
465
528
|
return element.getBoundingClientRect().top - this.view.getBoundingClientRect().top;
|
|
@@ -473,99 +536,4 @@ class ConversationScroller {
|
|
|
473
536
|
}
|
|
474
537
|
exports.ConversationScroller = ConversationScroller;
|
|
475
538
|
ConversationScroller.views = new WeakMap();
|
|
476
|
-
/**
|
|
477
|
-
* The scrolling of a conversation (ConversationScroller), whose thread is the first child of the element of the
|
|
478
|
-
* returned ref. Opened, and when messages of the user go (a rewind), the view goes to the bottom.
|
|
479
|
-
*
|
|
480
|
-
* `asked`: how many messages of the user there are; the thread marks them with ASK_CLASS.
|
|
481
|
-
*/
|
|
482
|
-
function useConversationScroll(asked, options = {}) {
|
|
483
|
-
const { sentTo = 'top', key } = options;
|
|
484
|
-
const ref = React.useRef(null);
|
|
485
|
-
const attached = React.useRef(undefined);
|
|
486
|
-
const before = React.useRef(undefined);
|
|
487
|
-
// After each render, the view may only now be there (a page that shows it once its data came).
|
|
488
|
-
React.useLayoutEffect(() => {
|
|
489
|
-
var _a, _b;
|
|
490
|
-
const view = ref.current;
|
|
491
|
-
const thread = view === null || view === void 0 ? void 0 : view.firstElementChild;
|
|
492
|
-
if (((_a = attached.current) === null || _a === void 0 ? void 0 : _a.view) === view) {
|
|
493
|
-
return;
|
|
494
|
-
}
|
|
495
|
-
(_b = attached.current) === null || _b === void 0 ? void 0 : _b.detach();
|
|
496
|
-
attached.current = undefined;
|
|
497
|
-
if (view && thread instanceof HTMLElement) {
|
|
498
|
-
const scroller = new ConversationScroller(view, thread);
|
|
499
|
-
attached.current = { view, scroller, detach: scroller.attach(view, thread) };
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
React.useLayoutEffect(() => () => {
|
|
503
|
-
var _a;
|
|
504
|
-
(_a = attached.current) === null || _a === void 0 ? void 0 : _a.detach();
|
|
505
|
-
attached.current = undefined;
|
|
506
|
-
}, []);
|
|
507
|
-
React.useLayoutEffect(() => {
|
|
508
|
-
var _a, _b;
|
|
509
|
-
const previous = before.current;
|
|
510
|
-
before.current = { asked, key };
|
|
511
|
-
const current = (_a = attached.current) === null || _a === void 0 ? void 0 : _a.scroller;
|
|
512
|
-
const thread = (_b = ref.current) === null || _b === void 0 ? void 0 : _b.firstElementChild;
|
|
513
|
-
if (!current || !thread) {
|
|
514
|
-
return;
|
|
515
|
-
}
|
|
516
|
-
// One more: sent now. More at once is the conversation loaded again, which opens at its bottom.
|
|
517
|
-
const sent = previous !== undefined && previous.key === key && asked === previous.asked + 1;
|
|
518
|
-
const asks = sent && sentTo === 'top' ? thread.getElementsByClassName(exports.ASK_CLASS) : undefined;
|
|
519
|
-
const message = asks === null || asks === void 0 ? void 0 : asks[asks.length - 1];
|
|
520
|
-
if (message) {
|
|
521
|
-
current.send(message);
|
|
522
|
-
}
|
|
523
|
-
else {
|
|
524
|
-
current.reset();
|
|
525
|
-
}
|
|
526
|
-
}, [asked, key, sentTo]);
|
|
527
|
-
return ref;
|
|
528
|
-
}
|
|
529
|
-
/** Away from the bottom by more than half of the view: the button back to the latest shows. */
|
|
530
|
-
const AWAY_SHARE = 0.5;
|
|
531
|
-
/** Lower than this (a phone held sideways, its keyboard open) the view has no room for the button. */
|
|
532
|
-
const AWAY_MIN_PX = 240;
|
|
533
|
-
/** Whether the conversation of `ref` is scrolled up from its latest, and a way back to it. */
|
|
534
|
-
function useAwayFromBottom(ref) {
|
|
535
|
-
const [away, setAway] = React.useState(false);
|
|
536
|
-
React.useEffect(() => {
|
|
537
|
-
const element = ref.current;
|
|
538
|
-
if (!element) {
|
|
539
|
-
return;
|
|
540
|
-
}
|
|
541
|
-
let frame = 0;
|
|
542
|
-
const measure = () => {
|
|
543
|
-
cancelAnimationFrame(frame);
|
|
544
|
-
frame = requestAnimationFrame(() => {
|
|
545
|
-
const { scrollHeight, scrollTop, clientHeight } = element;
|
|
546
|
-
setAway(clientHeight >= AWAY_MIN_PX && scrollHeight - scrollTop - clientHeight > clientHeight * AWAY_SHARE);
|
|
547
|
-
});
|
|
548
|
-
};
|
|
549
|
-
element.addEventListener('scroll', measure, { passive: true });
|
|
550
|
-
// The keyboard and a turn of the phone change the height of the view, not where it is.
|
|
551
|
-
const observer = typeof ResizeObserver !== 'undefined' ? new ResizeObserver(measure) : undefined;
|
|
552
|
-
observer === null || observer === void 0 ? void 0 : observer.observe(element);
|
|
553
|
-
return () => {
|
|
554
|
-
cancelAnimationFrame(frame);
|
|
555
|
-
observer === null || observer === void 0 ? void 0 : observer.disconnect();
|
|
556
|
-
element.removeEventListener('scroll', measure);
|
|
557
|
-
};
|
|
558
|
-
}, [ref]);
|
|
559
|
-
const back = React.useCallback(() => {
|
|
560
|
-
const element = ref.current;
|
|
561
|
-
const scroller = element ? ConversationScroller.of(element) : undefined;
|
|
562
|
-
if (scroller) {
|
|
563
|
-
scroller.toBottom();
|
|
564
|
-
}
|
|
565
|
-
else {
|
|
566
|
-
element === null || element === void 0 ? void 0 : element.scrollTo({ top: element.scrollHeight, behavior: calm() ? 'auto' : 'smooth' });
|
|
567
|
-
}
|
|
568
|
-
}, [ref]);
|
|
569
|
-
return [away, back];
|
|
570
|
-
}
|
|
571
539
|
//# sourceMappingURL=conversation-scroll.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface FaceProps {
|
|
3
|
+
/** One of the 16 faces; else the face of `seed`. */
|
|
4
|
+
face?: number;
|
|
5
|
+
seed?: string;
|
|
6
|
+
size: number;
|
|
7
|
+
/** At work: the eyes look about. */
|
|
8
|
+
working?: boolean;
|
|
9
|
+
/** A dot at its corner: green online, grey not; none without. */
|
|
10
|
+
online?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** One face; the eyes, cheeks and mouth are the same on every shape. */
|
|
13
|
+
export declare function Face({ face: given, seed, size, working, online }: FaceProps): React.JSX.Element;
|
|
14
|
+
export interface GroupFaceProps {
|
|
15
|
+
/** Those of the group, the one in front first: their faces, or their ids (`seed` of {@link Face}). */
|
|
16
|
+
members: readonly {
|
|
17
|
+
face?: number;
|
|
18
|
+
seed?: string;
|
|
19
|
+
working?: boolean;
|
|
20
|
+
}[];
|
|
21
|
+
size: number;
|
|
22
|
+
}
|
|
23
|
+
/** A group, as a channel is drawn: the first in front, the next behind; one alone is drawn whole. */
|
|
24
|
+
export declare function GroupFace({ members, size }: GroupFaceProps): React.JSX.Element;
|
|
25
|
+
//# sourceMappingURL=face.d.ts.map
|