mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(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:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user