mirror of
https://github.com/outline/outline.git
synced 2026-12-03 10:00:13 +03:00
* Expanding drag handle to all root level block nodes * wip * looking good * wip * fix, drag video nodes * fix mermaid * Hide drag handle when printing, adjust heading actions for handle gutter Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * rtl * Passive scroll listener, avoid dispatch on teardown * Guard drag handle from re-showing mid-drag, use semantic button * Align drag handle to first line, hide on layout images, tidy heading controls * Fix stale drag handle target and drag data, rebuild Mermaid in moved containers, remove unused styles * Extract drag handle target resolution into DragTarget class * Move drag handle styles from inline to global CSS * Use EditorStyleHelper class names and named constants in drag handle, translate its label * Hide drag handle on a table that holds the selection * Remove opacity transition from drag handle * Move heading anchor into drag handle slot when read-only * Move drop cursor class name to EditorStyleHelper * Add empty line above comments, document the rule in AGENTS.md * drag handle --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
39 lines
1.5 KiB
TypeScript
39 lines
1.5 KiB
TypeScript
import type { AnyExtensionClass } from "@shared/editor/lib/types";
|
|
import BlockMenuExtension from "~/editor/extensions/BlockMenu";
|
|
import ClipboardTextSerializer from "~/editor/extensions/ClipboardTextSerializer";
|
|
import CommentGutterExtension from "~/editor/extensions/CommentGutter";
|
|
import DiagramsExtension from "@shared/editor/extensions/Diagrams";
|
|
import DocumentMenuExtension from "~/editor/extensions/DocumentMenu";
|
|
import DragHandle from "~/editor/extensions/DragHandle";
|
|
import EmojiMenuExtension from "~/editor/extensions/EmojiMenu";
|
|
import FindAndReplaceExtension from "~/editor/extensions/FindAndReplace";
|
|
import HoverPreviewsExtension from "~/editor/extensions/HoverPreviews";
|
|
import Keys from "~/editor/extensions/Keys";
|
|
import MentionMenuExtension from "~/editor/extensions/MentionMenu";
|
|
import PasteHandler from "~/editor/extensions/PasteHandler";
|
|
import PreventTab from "~/editor/extensions/PreventTab";
|
|
import SelectionToolbarExtension from "~/editor/extensions/SelectionToolbar";
|
|
import SmartText from "~/editor/extensions/SmartText";
|
|
|
|
type Nodes = AnyExtensionClass[];
|
|
|
|
export const withUIExtensions = (nodes: Nodes) => [
|
|
...nodes,
|
|
SmartText,
|
|
PasteHandler,
|
|
ClipboardTextSerializer,
|
|
BlockMenuExtension,
|
|
EmojiMenuExtension,
|
|
MentionMenuExtension,
|
|
DocumentMenuExtension,
|
|
FindAndReplaceExtension,
|
|
HoverPreviewsExtension,
|
|
SelectionToolbarExtension,
|
|
CommentGutterExtension,
|
|
DiagramsExtension,
|
|
DragHandle,
|
|
// Order these default key handlers last
|
|
PreventTab,
|
|
Keys,
|
|
];
|