(core) Implement AI Assistant UI V2

Summary:
Implements the latest design of the Formula AI Assistant.

Also switches out brace to the latest build of ace.

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Subscribers: jarek

Differential Revision: https://phab.getgrist.com/D3949
This commit is contained in:
George Gevoian
2023-07-13 10:00:56 -04:00
parent 8581492912
commit ea8a59c5e9
23 changed files with 983 additions and 641 deletions

View File

@@ -29,6 +29,7 @@ export function documentCursor(type: 'ns-resize' | 'grabbing'): IDisposable {
export function movable<T>(options: {
onMove: (dx: number, dy: number, state: T) => void,
onStart: () => T,
onEnd?: () => void,
}) {
return (el: HTMLElement) => {
// Remember the initial position of the mouse.
@@ -53,6 +54,7 @@ export function movable<T>(options: {
options.onMove(dx, dy, state);
}));
owner.autoDispose(dom.onElem(document, 'mouseup', () => {
options.onEnd?.();
holder.clear();
}));
owner.autoDispose(documentCursor('ns-resize'));