@parhelia/core 0.1.12881 → 0.1.12883
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/dist/agents-view/AgentsSidebar.js +1 -1
- package/dist/agents-view/AgentsSidebar.js.map +1 -1
- package/dist/agents-view/AgentsTitlebar.d.ts +1 -1
- package/dist/agents-view/AgentsTitlebar.js +3 -6
- package/dist/agents-view/AgentsTitlebar.js.map +1 -1
- package/dist/agents-view/AgentsView.d.ts +2 -2
- package/dist/agents-view/AgentsView.js +2 -2
- package/dist/agents-view/AgentsView.js.map +1 -1
- package/dist/agents-view/AgentsWorkspaceView.js +1 -12
- package/dist/agents-view/AgentsWorkspaceView.js.map +1 -1
- package/dist/agents-view/CreateAgentView.d.ts +1 -1
- package/dist/agents-view/CreateAgentView.js +1 -1
- package/dist/agents-view/DateAgentsGroup.js +12 -1
- package/dist/agents-view/DateAgentsGroup.js.map +1 -1
- package/dist/agents-view/ProfileAgentsGroup.js +16 -4
- package/dist/agents-view/ProfileAgentsGroup.js.map +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +2 -1
- package/dist/components/ui/context-menu.js +4 -1
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/input.js +2 -2
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/select.js +1 -1
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/config/config.js +92 -14
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +7 -0
- package/dist/config/types.js.map +1 -1
- package/dist/editor/ContextMenu.d.ts +1 -0
- package/dist/editor/ContextMenu.js +4 -4
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/FieldHistory.d.ts +2 -1
- package/dist/editor/FieldHistory.js +13 -12
- package/dist/editor/FieldHistory.js.map +1 -1
- package/dist/editor/FieldListField.js +4 -18
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/LinkEditorDialog.d.ts +9 -2
- package/dist/editor/LinkEditorDialog.js +174 -70
- package/dist/editor/LinkEditorDialog.js.map +1 -1
- package/dist/editor/MainLayout.js +49 -6
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/MobileLayout.js +33 -1
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/PictureCropper.js +45 -28
- package/dist/editor/PictureCropper.js.map +1 -1
- package/dist/editor/ai/AgentProfileSelector.js +7 -7
- package/dist/editor/ai/AgentProfileSelector.js.map +1 -1
- package/dist/editor/ai/Agents.js +19 -5
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/InlineAiDialog.d.ts +1 -0
- package/dist/editor/ai/InlineAiDialog.js +239 -198
- package/dist/editor/ai/InlineAiDialog.js.map +1 -1
- package/dist/editor/ai/InlineAiTextEditTooltip.d.ts +8 -0
- package/dist/editor/ai/InlineAiTextEditTooltip.js +10 -0
- package/dist/editor/ai/InlineAiTextEditTooltip.js.map +1 -0
- package/dist/editor/ai/InlineAiTrigger.js +187 -20
- package/dist/editor/ai/InlineAiTrigger.js.map +1 -1
- package/dist/editor/ai/inlineAiTextEditLabels.d.ts +2 -0
- package/dist/editor/ai/inlineAiTextEditLabels.js +8 -0
- package/dist/editor/ai/inlineAiTextEditLabels.js.map +1 -0
- package/dist/editor/ai/prepareInlineAiTextSelection.d.ts +5 -0
- package/dist/editor/ai/prepareInlineAiTextSelection.js +86 -0
- package/dist/editor/ai/prepareInlineAiTextSelection.js.map +1 -0
- package/dist/editor/ai/terminal/components/AgentSettingsPopover.js +1 -1
- package/dist/editor/ai/terminal/components/AgentSettingsPopover.js.map +1 -1
- package/dist/editor/ai/terminal/components/AiResponseMessage.js +9 -9
- package/dist/editor/ai/terminal/components/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js +3 -1
- package/dist/editor/ai/terminal/components/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/useActiveAgentConversation.d.ts +3 -0
- package/dist/editor/ai/useActiveAgentConversation.js +32 -0
- package/dist/editor/ai/useActiveAgentConversation.js.map +1 -0
- package/dist/editor/ai/useInlineAiPosition.d.ts +9 -1
- package/dist/editor/ai/useInlineAiPosition.js +10 -19
- package/dist/editor/ai/useInlineAiPosition.js.map +1 -1
- package/dist/editor/client/EditorShell.js +23 -4
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +25 -0
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/fieldModificationStore.d.ts +1 -0
- package/dist/editor/client/fieldModificationStore.js +7 -2
- package/dist/editor/client/fieldModificationStore.js.map +1 -1
- package/dist/editor/client/itemsRepository.js +3 -1
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/client/operations.js +26 -4
- package/dist/editor/client/operations.js.map +1 -1
- package/dist/editor/client/ui/EditorChrome.js +1 -1
- package/dist/editor/client/ui/EditorChrome.js.map +1 -1
- package/dist/editor/commands/componentCommands.d.ts +3 -1
- package/dist/editor/commands/componentCommands.js +8 -3
- package/dist/editor/commands/componentCommands.js.map +1 -1
- package/dist/editor/commands/handlers/uiActionHandlers.js +5 -1
- package/dist/editor/commands/handlers/uiActionHandlers.js.map +1 -1
- package/dist/editor/editor-warnings/FinalWorkflowStateReadOnly.js +5 -0
- package/dist/editor/editor-warnings/FinalWorkflowStateReadOnly.js.map +1 -1
- package/dist/editor/editor-warnings/ItemLocked.js +6 -3
- package/dist/editor/editor-warnings/ItemLocked.js.map +1 -1
- package/dist/editor/field-types/DateFieldEditor.js +1 -1
- package/dist/editor/field-types/DateFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js +1 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DropLinkEditor.js +1 -1
- package/dist/editor/field-types/DropLinkEditor.js.map +1 -1
- package/dist/editor/field-types/DropListEditor.js +1 -1
- package/dist/editor/field-types/DropListEditor.js.map +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js +1 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/LinkFieldEditor.js +15 -3
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +1 -1
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/NameValueListEditor.js +1 -1
- package/dist/editor/field-types/NameValueListEditor.js.map +1 -1
- package/dist/editor/field-types/PictureFieldEditor.js +2 -2
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
- package/dist/editor/field-types/RawEditor.js +1 -1
- package/dist/editor/field-types/RawEditor.js.map +1 -1
- package/dist/editor/field-types/RichTextEditorComponent.js +18 -36
- package/dist/editor/field-types/RichTextEditorComponent.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +1 -1
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/TreeListEditor.js +1 -1
- package/dist/editor/field-types/TreeListEditor.js.map +1 -1
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.d.ts +21 -0
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.js +96 -0
- package/dist/editor/field-types/richtext/bridgeRichTextProfile.js.map +1 -0
- package/dist/editor/field-types/richtext/components/ReactSlate.css +44 -6
- package/dist/editor/field-types/richtext/components/ReactSlate.js +185 -36
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.css +5 -2
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js +5 -4
- package/dist/editor/field-types/richtext/components/SimpleToolbar.js.map +1 -1
- package/dist/editor/field-types/richtext/contextMenuFactory.d.ts +2 -14
- package/dist/editor/field-types/richtext/contextMenuFactory.js +4 -232
- package/dist/editor/field-types/richtext/contextMenuFactory.js.map +1 -1
- package/dist/editor/field-types/richtext/richTextToolbarIcons.d.ts +7 -0
- package/dist/editor/field-types/richtext/richTextToolbarIcons.js +49 -0
- package/dist/editor/field-types/richtext/richTextToolbarIcons.js.map +1 -0
- package/dist/editor/field-types/richtext/utils/conversion.js +23 -2
- package/dist/editor/field-types/richtext/utils/conversion.js.map +1 -1
- package/dist/editor/fieldTypes.d.ts +2 -0
- package/dist/editor/media-selector/MediaFolderBrowser.d.ts +2 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js +19 -9
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +15 -9
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/media-selector/UploadZone.d.ts +2 -1
- package/dist/editor/media-selector/UploadZone.js +21 -9
- package/dist/editor/media-selector/UploadZone.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.d.ts +10 -0
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js +607 -85
- package/dist/editor/menubar/toolbar-sections/ManualBrowser.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +3 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.d.ts +3 -1
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js +357 -73
- package/dist/editor/page-editor-chrome/BridgeInlineFormatOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.js +1 -1
- package/dist/editor/page-editor-chrome/PageEditorChrome.js.map +1 -1
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.d.ts +24 -0
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.js +89 -0
- package/dist/editor/page-editor-chrome/bridgeInlineFormatToolbarLayout.js.map +1 -0
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.d.ts +1 -1
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js +7 -1
- package/dist/editor/page-editor-chrome/useBridgeInlineEditing.js.map +1 -1
- package/dist/editor/page-viewer/PageViewer.js +23 -4
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +157 -2
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/reviews/Comment.js +2 -2
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +2 -1
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/CommentEditor.d.ts +1 -0
- package/dist/editor/reviews/CommentEditor.js +3 -2
- package/dist/editor/reviews/CommentEditor.js.map +1 -1
- package/dist/editor/reviews/CommentPopover.js +2 -2
- package/dist/editor/reviews/CommentPopover.js.map +1 -1
- package/dist/editor/reviews/Comments.js +5 -4
- package/dist/editor/reviews/Comments.js.map +1 -1
- package/dist/editor/reviews/FeedbackCard.js +5 -7
- package/dist/editor/reviews/FeedbackCard.js.map +1 -1
- package/dist/editor/reviews/SuggestionCommentThread.js +3 -3
- package/dist/editor/reviews/SuggestionCommentThread.js.map +1 -1
- package/dist/editor/services/contentService.d.ts +1 -0
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/sidebar/Validation.js +4 -1
- package/dist/editor/sidebar/Validation.js.map +1 -1
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js +1 -1
- package/dist/editor/template-wizard/TemplateStructureInlineEditor.js.map +1 -1
- package/dist/editor/ui/SimpleIconButton.js +8 -2
- package/dist/editor/ui/SimpleIconButton.js.map +1 -1
- package/dist/editor/ui/Splitter.d.ts +1 -0
- package/dist/editor/ui/Splitter.js +12 -2
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/editor/ui/animationSettle.d.ts +32 -0
- package/dist/editor/ui/animationSettle.js +85 -0
- package/dist/editor/ui/animationSettle.js.map +1 -0
- package/dist/editor/utils/expandSelectionAtCaret.d.ts +15 -0
- package/dist/editor/utils/expandSelectionAtCaret.js +183 -0
- package/dist/editor/utils/expandSelectionAtCaret.js.map +1 -0
- package/dist/editor/views/MediaFolderEditView.js +1 -1
- package/dist/editor/views/MediaFolderEditView.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/DialogWrappers.js +2 -2
- package/dist/splash-screen/DialogWrappers.js.map +1 -1
- package/dist/task-board/components/TaskDetailPanel.js +2 -1
- package/dist/task-board/components/TaskDetailPanel.js.map +1 -1
- package/dist/task-board/views/DependencyGraphView.d.ts +42 -1
- package/dist/task-board/views/DependencyGraphView.js +94 -0
- package/dist/task-board/views/DependencyGraphView.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/styles.css +59 -12
|
@@ -1,46 +1,87 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { createPortal } from "react-dom";
|
|
4
|
+
import { Sparkles } from "lucide-react";
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipTrigger, } from "../../components/ui/tooltip";
|
|
4
6
|
import { useEditContext } from "../client/editContext";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
import { LinkEditorDialog, } from "../LinkEditorDialog";
|
|
8
|
+
import { generateInternalLinkUrl } from "../field-types/richtext/utils/plugins";
|
|
9
|
+
import { normalizeUrl } from "../utils/urlUtils";
|
|
10
|
+
import { getInlineAiTextEditShortcutLabel, INLINE_AI_TEXT_EDIT_LABEL, } from "../ai/inlineAiTextEditLabels";
|
|
11
|
+
import { calculateDialogPosition } from "../ai/useInlineAiPosition";
|
|
12
|
+
import { getBridgeRichTextProfileGroups, loadParsedRichTextProfile, } from "../field-types/richtext/bridgeRichTextProfile";
|
|
13
|
+
import { SLATE_MARKS } from "../field-types/richtext/types";
|
|
14
|
+
import { getRichTextLinkIcon, getRichTextListIcon, getRichTextMarkIcon, getRichTextStripFormattingIcon, } from "../field-types/richtext/richTextToolbarIcons";
|
|
15
|
+
import { calculateBridgeInlineFormatToolbarLayout, getInlineAiAnchorBelowToolbar, } from "./bridgeInlineFormatToolbarLayout";
|
|
16
|
+
/**
|
|
17
|
+
* Custom event the AI text-edit button dispatches to open the inline AI dialog.
|
|
18
|
+
* InlineAiTrigger listens for this and snapshots the current selection.
|
|
19
|
+
*/
|
|
20
|
+
const INLINE_AI_OPEN_EVENT = "inline-ai-open";
|
|
21
|
+
const LIST_BUTTONS = {
|
|
22
|
+
"ordered-list": {
|
|
23
|
+
id: "ordered-list",
|
|
24
|
+
label: "Numbered list",
|
|
25
|
+
icon: getRichTextListIcon("ordered-list"),
|
|
26
|
+
command: "insertOrderedList",
|
|
11
27
|
},
|
|
12
|
-
{
|
|
13
|
-
id: "
|
|
14
|
-
label: "
|
|
15
|
-
icon: (
|
|
16
|
-
command: "
|
|
28
|
+
"unordered-list": {
|
|
29
|
+
id: "unordered-list",
|
|
30
|
+
label: "Bulleted list",
|
|
31
|
+
icon: getRichTextListIcon("unordered-list"),
|
|
32
|
+
command: "insertUnorderedList",
|
|
17
33
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
};
|
|
35
|
+
const STRIP_FORMATTING_BUTTON = {
|
|
36
|
+
id: "strip-formatting",
|
|
37
|
+
label: "Strip formatting",
|
|
38
|
+
icon: getRichTextStripFormattingIcon(),
|
|
39
|
+
command: "removeFormat",
|
|
40
|
+
};
|
|
41
|
+
const ICON_BUTTON_BASE_CLASS = "text-neutral-grey-100 hover:bg-white inline-flex h-8 w-8 items-center justify-center rounded-[4px] p-0 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-blue-600";
|
|
42
|
+
const INACTIVE_ICON_BUTTON_CLASS = "bg-neutral-grey-5";
|
|
43
|
+
const ACTIVE_ICON_BUTTON_CLASS = "bg-white shadow-sm";
|
|
44
|
+
const TOOL_GROUP_CLASS = "bg-neutral-grey-5 inline-flex items-center gap-px rounded-md p-px";
|
|
45
|
+
const TOOLTIP_SIDE_OFFSET = 8;
|
|
46
|
+
function isMacShortcutPlatform() {
|
|
47
|
+
if (typeof navigator === "undefined")
|
|
48
|
+
return false;
|
|
49
|
+
return /Mac|iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
50
|
+
}
|
|
51
|
+
function formatHotkeyLabel(hotkey) {
|
|
52
|
+
if (!hotkey)
|
|
53
|
+
return undefined;
|
|
54
|
+
const isMac = isMacShortcutPlatform();
|
|
55
|
+
return hotkey
|
|
56
|
+
.split("+")
|
|
57
|
+
.map((part) => {
|
|
58
|
+
const normalized = part.toLowerCase();
|
|
59
|
+
if (normalized === "mod")
|
|
60
|
+
return isMac ? "⌘" : "Ctrl";
|
|
61
|
+
if (normalized === "shift")
|
|
62
|
+
return isMac ? "⇧" : "Shift";
|
|
63
|
+
if (normalized === "alt")
|
|
64
|
+
return isMac ? "⌥" : "Alt";
|
|
65
|
+
return part.length === 1 ? part.toUpperCase() : part;
|
|
66
|
+
})
|
|
67
|
+
.join(isMac ? "" : "+");
|
|
68
|
+
}
|
|
69
|
+
function getToolbarButtonShortcut(button) {
|
|
70
|
+
if (button.id in SLATE_MARKS) {
|
|
71
|
+
const markConfig = SLATE_MARKS[button.id];
|
|
72
|
+
return "hotkey" in markConfig
|
|
73
|
+
? formatHotkeyLabel(markConfig.hotkey)
|
|
74
|
+
: undefined;
|
|
75
|
+
}
|
|
76
|
+
if (button.id === "ai-text-edit") {
|
|
77
|
+
return getInlineAiTextEditShortcutLabel();
|
|
78
|
+
}
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
function ToolbarButtonTooltip({ label, shortcut, children, }) {
|
|
82
|
+
return (_jsxs(Tooltip, { delayDuration: 250, children: [_jsx(TooltipTrigger, { asChild: true, children: children }), _jsx(TooltipContent, { side: "top", sideOffset: TOOLTIP_SIDE_OFFSET, className: "z-[1100] px-2 py-1.5 text-[11px] whitespace-nowrap", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "font-medium", children: label }), shortcut && (_jsx("kbd", { className: "bg-primary-foreground/10 rounded px-1.5 py-0.5 font-mono text-[10px] leading-none font-semibold", children: shortcut }))] }) })] }));
|
|
83
|
+
}
|
|
84
|
+
export function BridgeInlineFormatOverlay({ onCommand, pageViewContext, }) {
|
|
44
85
|
const editContext = useEditContext();
|
|
45
86
|
const selectedRange = editContext?.selectedRange;
|
|
46
87
|
const overlayRef = useRef(null);
|
|
@@ -48,76 +89,319 @@ export function BridgeInlineFormatOverlay({ onCommand, }) {
|
|
|
48
89
|
visible: false,
|
|
49
90
|
left: 0,
|
|
50
91
|
top: 0,
|
|
51
|
-
activeCommandIds: [],
|
|
52
92
|
});
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
93
|
+
const [linkDialogOpen, setLinkDialogOpen] = useState(false);
|
|
94
|
+
const [linkDialogPosition, setLinkDialogPosition] = useState();
|
|
95
|
+
const [toolbarProfile, setToolbarProfile] = useState({
|
|
96
|
+
key: "",
|
|
97
|
+
ready: false,
|
|
98
|
+
groups: [],
|
|
99
|
+
});
|
|
100
|
+
const isRichText = !!(selectedRange?.isRichText && selectedRange?.elementKey);
|
|
101
|
+
const formatting = selectedRange?.formatting;
|
|
102
|
+
const toolbarProfileKey = getToolbarProfileKey(selectedRange);
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
if (!editContext || !pageViewContext || !selectedRange || !isRichText) {
|
|
105
|
+
setToolbarProfile((previous) => previous.key === "" && !previous.ready && previous.groups.length === 0
|
|
106
|
+
? previous
|
|
107
|
+
: { key: "", ready: false, groups: [] });
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (toolbarProfile.key === toolbarProfileKey && toolbarProfile.ready) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
let cancelled = false;
|
|
114
|
+
setToolbarProfile((previous) => previous.key === toolbarProfileKey && !previous.ready
|
|
115
|
+
? previous
|
|
116
|
+
: { key: toolbarProfileKey, ready: false, groups: [] });
|
|
117
|
+
const loadProfile = async () => {
|
|
118
|
+
try {
|
|
119
|
+
const field = await resolveSelectedRangeField(selectedRange, pageViewContext, editContext);
|
|
120
|
+
const profile = field ? await loadParsedRichTextProfile(field) : null;
|
|
121
|
+
if (cancelled)
|
|
122
|
+
return;
|
|
123
|
+
setToolbarProfile({
|
|
124
|
+
key: toolbarProfileKey,
|
|
125
|
+
ready: true,
|
|
126
|
+
groups: getBridgeRichTextProfileGroups(profile),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
console.error("Error loading bridge rich text toolbar profile:", error);
|
|
131
|
+
if (cancelled)
|
|
132
|
+
return;
|
|
133
|
+
setToolbarProfile({
|
|
134
|
+
key: toolbarProfileKey,
|
|
135
|
+
ready: true,
|
|
136
|
+
groups: [],
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
void loadProfile();
|
|
141
|
+
return () => {
|
|
142
|
+
cancelled = true;
|
|
143
|
+
};
|
|
144
|
+
}, [
|
|
145
|
+
editContext,
|
|
146
|
+
isRichText,
|
|
147
|
+
pageViewContext,
|
|
148
|
+
pageViewContext?.bridgeStructure,
|
|
149
|
+
selectedRange,
|
|
150
|
+
toolbarProfile.key,
|
|
151
|
+
toolbarProfile.ready,
|
|
152
|
+
toolbarProfileKey,
|
|
153
|
+
]);
|
|
56
154
|
useEffect(() => {
|
|
155
|
+
// The unified toolbar is shown for any editable text selection in the page
|
|
156
|
+
// host (rich text or plain text). Formatting controls are gated on
|
|
157
|
+
// isRichText below; the AI text-edit button is always shown.
|
|
57
158
|
if (!selectedRange?.text?.trim() ||
|
|
58
159
|
!selectedRange.elementKey ||
|
|
59
|
-
!selectedRange.isRichText ||
|
|
60
160
|
!selectedRange.clientRect ||
|
|
61
161
|
!onCommand ||
|
|
62
162
|
editContext?.readonly ||
|
|
163
|
+
editContext?.currentOverlay === "context-menu" ||
|
|
63
164
|
(editContext?.mode !== "edit" && editContext?.mode !== "suggestions")) {
|
|
64
165
|
setOverlay((previous) => previous.visible ? { ...previous, visible: false } : previous);
|
|
65
166
|
return;
|
|
66
167
|
}
|
|
67
|
-
const overlayWidth = overlayRef.current?.offsetWidth ??
|
|
68
|
-
const overlayHeight = overlayRef.current?.offsetHeight ??
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
let top = rect.top - overlayHeight - selectionGap;
|
|
74
|
-
if (top < viewportPadding) {
|
|
75
|
-
top = rect.bottom + selectionGap + 36;
|
|
76
|
-
}
|
|
77
|
-
top = Math.max(viewportPadding, Math.min(top, window.innerHeight - overlayHeight - viewportPadding));
|
|
78
|
-
const left = Math.max(viewportPadding, Math.min(anchorCenter - overlayWidth / 2, window.innerWidth - overlayWidth - viewportPadding));
|
|
168
|
+
const overlayWidth = overlayRef.current?.offsetWidth ?? 300;
|
|
169
|
+
const overlayHeight = overlayRef.current?.offsetHeight ?? 40;
|
|
170
|
+
const layout = calculateBridgeInlineFormatToolbarLayout(selectedRange.clientRect, {
|
|
171
|
+
toolbarWidth: overlayWidth,
|
|
172
|
+
toolbarHeight: overlayHeight,
|
|
173
|
+
});
|
|
79
174
|
setOverlay({
|
|
80
175
|
visible: true,
|
|
81
|
-
left,
|
|
82
|
-
top,
|
|
83
|
-
activeCommandIds: [],
|
|
176
|
+
left: layout.left,
|
|
177
|
+
top: layout.top,
|
|
84
178
|
});
|
|
85
179
|
}, [
|
|
86
180
|
editContext?.mode,
|
|
181
|
+
editContext?.currentOverlay,
|
|
87
182
|
editContext?.readonly,
|
|
88
183
|
onCommand,
|
|
89
184
|
selectedRange?.clientRect,
|
|
90
185
|
selectedRange?.elementKey,
|
|
91
186
|
selectedRange?.isRichText,
|
|
92
187
|
selectedRange?.text,
|
|
188
|
+
toolbarProfile.groups,
|
|
189
|
+
toolbarProfile.ready,
|
|
93
190
|
]);
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
191
|
+
if (!overlay.visible) {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
const sendCommand = (command, value) => {
|
|
97
195
|
if (!selectedRange?.elementKey || !selectedRange.fieldId || !onCommand) {
|
|
98
196
|
return;
|
|
99
197
|
}
|
|
100
198
|
onCommand({
|
|
101
199
|
elementKey: selectedRange.elementKey,
|
|
102
200
|
fieldId: selectedRange.fieldId,
|
|
103
|
-
command
|
|
201
|
+
command,
|
|
202
|
+
value,
|
|
203
|
+
selectedText: selectedRange.text,
|
|
204
|
+
selectionStartOffset: selectedRange.startOffset,
|
|
205
|
+
selectionEndOffset: selectedRange.endOffset,
|
|
104
206
|
});
|
|
105
207
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
208
|
+
const handleFormatMouseDown = (button) => (event) => {
|
|
209
|
+
event.preventDefault();
|
|
210
|
+
event.stopPropagation();
|
|
211
|
+
sendCommand(button.command);
|
|
212
|
+
};
|
|
213
|
+
const iconButtonClass = (active = false) => `${ICON_BUTTON_BASE_CLASS} ${active ? ACTIVE_ICON_BUTTON_CLASS : INACTIVE_ICON_BUTTON_CLASS}`;
|
|
214
|
+
const isButtonActive = (button) => {
|
|
215
|
+
switch (button.id) {
|
|
216
|
+
case "bold":
|
|
217
|
+
return !!formatting?.bold;
|
|
218
|
+
case "italic":
|
|
219
|
+
return !!formatting?.italic;
|
|
220
|
+
case "underline":
|
|
221
|
+
return !!formatting?.underline;
|
|
222
|
+
case "strikethrough":
|
|
223
|
+
return !!formatting?.strikethrough;
|
|
224
|
+
case "subscript":
|
|
225
|
+
return !!formatting?.subscript;
|
|
226
|
+
case "superscript":
|
|
227
|
+
return !!formatting?.superscript;
|
|
228
|
+
case "ordered-list":
|
|
229
|
+
return !!formatting?.orderedList;
|
|
230
|
+
case "unordered-list":
|
|
231
|
+
return !!formatting?.unorderedList;
|
|
232
|
+
case "link":
|
|
233
|
+
return !!formatting?.link;
|
|
234
|
+
default:
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
const getButtonForProfileOption = (option) => {
|
|
239
|
+
if (option.type === "mark") {
|
|
240
|
+
const markConfig = SLATE_MARKS[option.id];
|
|
241
|
+
const icon = getRichTextMarkIcon(option.id);
|
|
242
|
+
if (!markConfig || !icon)
|
|
243
|
+
return null;
|
|
244
|
+
return {
|
|
245
|
+
id: option.id,
|
|
246
|
+
label: markConfig.label,
|
|
247
|
+
icon,
|
|
248
|
+
command: option.command,
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
if (option.type === "list") {
|
|
252
|
+
return LIST_BUTTONS[option.id];
|
|
253
|
+
}
|
|
254
|
+
return {
|
|
255
|
+
id: "link",
|
|
256
|
+
label: "Link",
|
|
257
|
+
icon: getRichTextLinkIcon(),
|
|
258
|
+
command: "createLink",
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
const getLinkHref = (link) => {
|
|
262
|
+
if (link.type === "internal") {
|
|
263
|
+
return generateInternalLinkUrl(link.itemId, link.targetItemLongId, link.queryString);
|
|
264
|
+
}
|
|
265
|
+
const url = link.url || "#";
|
|
266
|
+
return url.startsWith("mailto:") || url.startsWith("tel:")
|
|
267
|
+
? url
|
|
268
|
+
: normalizeUrl(url);
|
|
269
|
+
};
|
|
270
|
+
const openLinkDialog = (event) => {
|
|
271
|
+
event.preventDefault();
|
|
272
|
+
event.stopPropagation();
|
|
273
|
+
const toolbarRect = overlayRef.current?.getBoundingClientRect();
|
|
274
|
+
const buttonRect = event.currentTarget.getBoundingClientRect();
|
|
275
|
+
const anchor = toolbarRect
|
|
276
|
+
? getInlineAiAnchorBelowToolbar(toolbarRect, buttonRect)
|
|
277
|
+
: {
|
|
278
|
+
x: buttonRect.left,
|
|
279
|
+
y: buttonRect.bottom,
|
|
280
|
+
align: "start",
|
|
281
|
+
origin: "toolbar",
|
|
282
|
+
};
|
|
283
|
+
setLinkDialogPosition(calculateDialogPosition({ x: anchor.x, y: anchor.y }, 486, 592, anchor.align, anchor.origin));
|
|
284
|
+
setLinkDialogOpen(true);
|
|
285
|
+
};
|
|
286
|
+
const openInlineAi = (event) => {
|
|
287
|
+
event.preventDefault();
|
|
288
|
+
event.stopPropagation();
|
|
289
|
+
const toolbarRect = overlayRef.current?.getBoundingClientRect();
|
|
290
|
+
const buttonRect = event.currentTarget.getBoundingClientRect();
|
|
291
|
+
document.dispatchEvent(new CustomEvent(INLINE_AI_OPEN_EVENT, {
|
|
292
|
+
bubbles: true,
|
|
293
|
+
cancelable: true,
|
|
294
|
+
detail: {
|
|
295
|
+
anchor: toolbarRect
|
|
296
|
+
? {
|
|
297
|
+
...getInlineAiAnchorBelowToolbar(toolbarRect),
|
|
298
|
+
x: buttonRect.left,
|
|
299
|
+
}
|
|
300
|
+
: {
|
|
301
|
+
x: buttonRect.left,
|
|
302
|
+
y: buttonRect.bottom,
|
|
303
|
+
align: "start",
|
|
304
|
+
origin: "toolbar",
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
}));
|
|
308
|
+
};
|
|
309
|
+
const content = (_jsxs("div", { ref: overlayRef, "data-bridge-inline-format-toolbar": "true", className: "border-border-default fixed z-[1000] flex items-center gap-1 rounded-md border bg-white p-2 shadow-lg", style: {
|
|
110
310
|
left: overlay.left,
|
|
111
311
|
top: overlay.top,
|
|
112
312
|
}, onMouseDown: (event) => {
|
|
313
|
+
// Preserve the host selection when interacting with the toolbar chrome.
|
|
113
314
|
event.preventDefault();
|
|
114
315
|
event.stopPropagation();
|
|
115
|
-
}, children:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
316
|
+
}, children: [isRichText && (_jsxs(_Fragment, { children: [toolbarProfile.ready &&
|
|
317
|
+
toolbarProfile.groups.map((group) => (_jsx("div", { className: TOOL_GROUP_CLASS, children: group.options.map((option) => {
|
|
318
|
+
const button = getButtonForProfileOption(option);
|
|
319
|
+
if (!button)
|
|
320
|
+
return null;
|
|
321
|
+
if (option.type === "link") {
|
|
322
|
+
return (_jsx(ToolbarButtonTooltip, { label: button.label, shortcut: getToolbarButtonShortcut(button), children: _jsx("button", { type: "button", className: iconButtonClass(isButtonActive(button)), "aria-label": button.label, "aria-haspopup": "dialog", onMouseDown: openLinkDialog, children: button.icon }) }, `${group.id}-${button.id}`));
|
|
323
|
+
}
|
|
324
|
+
return (_jsx(ToolbarButtonTooltip, { label: button.label, shortcut: getToolbarButtonShortcut(button), children: _jsx("button", { type: "button", className: iconButtonClass(isButtonActive(button)), "aria-label": button.label, "aria-pressed": isButtonActive(button), onMouseDown: handleFormatMouseDown(button), children: button.icon }) }, `${group.id}-${button.id}`));
|
|
325
|
+
}) }, group.id))), _jsx("div", { className: TOOL_GROUP_CLASS, children: _jsx(ToolbarButtonTooltip, { label: STRIP_FORMATTING_BUTTON.label, shortcut: getToolbarButtonShortcut(STRIP_FORMATTING_BUTTON), children: _jsx("button", { type: "button", className: iconButtonClass(), "aria-label": STRIP_FORMATTING_BUTTON.label, onMouseDown: handleFormatMouseDown(STRIP_FORMATTING_BUTTON), children: STRIP_FORMATTING_BUTTON.icon }) }) }), _jsx("span", { "aria-hidden": "true", className: "bg-neutral-grey-5 mx-0.5 h-5 w-px" })] })), _jsx(ToolbarButtonTooltip, { label: INLINE_AI_TEXT_EDIT_LABEL, shortcut: getToolbarButtonShortcut({
|
|
326
|
+
id: "ai-text-edit",
|
|
327
|
+
label: INLINE_AI_TEXT_EDIT_LABEL,
|
|
328
|
+
icon: null,
|
|
329
|
+
command: INLINE_AI_OPEN_EVENT,
|
|
330
|
+
}), children: _jsxs("button", { type: "button", "data-bridge-inline-format-ai-button": "true", className: "text-neutral-grey-100 hover:bg-neutral-grey-5 inline-flex h-8 items-center gap-1 rounded-[4px] bg-transparent px-2 text-xs leading-none font-semibold focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-blue-600", "aria-label": INLINE_AI_TEXT_EDIT_LABEL, onMouseDown: openInlineAi, children: [_jsx(Sparkles, { "aria-hidden": "true", className: "h-3 w-3" }), _jsx("span", { children: INLINE_AI_TEXT_EDIT_LABEL })] }) }), linkDialogOpen && (_jsx(LinkEditorDialog, { linkValue: {
|
|
331
|
+
type: "internal",
|
|
332
|
+
url: "",
|
|
333
|
+
target: "_blank",
|
|
334
|
+
}, position: linkDialogPosition, onOk: (link) => {
|
|
335
|
+
sendCommand("createLink", getLinkHref(link));
|
|
336
|
+
setLinkDialogOpen(false);
|
|
337
|
+
setLinkDialogPosition(undefined);
|
|
338
|
+
}, onCancel: () => {
|
|
339
|
+
setLinkDialogOpen(false);
|
|
340
|
+
setLinkDialogPosition(undefined);
|
|
341
|
+
} }))] }));
|
|
121
342
|
return createPortal(content, document.body);
|
|
122
343
|
}
|
|
344
|
+
function getToolbarProfileKey(selectedRange) {
|
|
345
|
+
if (!selectedRange?.isRichText || !selectedRange.elementKey) {
|
|
346
|
+
return "";
|
|
347
|
+
}
|
|
348
|
+
return [
|
|
349
|
+
selectedRange.itemId,
|
|
350
|
+
selectedRange.language,
|
|
351
|
+
selectedRange.version,
|
|
352
|
+
selectedRange.fieldId,
|
|
353
|
+
selectedRange.elementKey,
|
|
354
|
+
].join(":");
|
|
355
|
+
}
|
|
356
|
+
async function resolveSelectedRangeField(selectedRange, pageViewContext, editContext) {
|
|
357
|
+
const descriptor = resolveSelectedRangeFieldDescriptor(selectedRange, pageViewContext);
|
|
358
|
+
if (!descriptor)
|
|
359
|
+
return undefined;
|
|
360
|
+
const item = await editContext.itemsRepository.getItem(descriptor.item);
|
|
361
|
+
return item?.fields.find((field) => fieldKeysMatch(field.id, descriptor.fieldId) ||
|
|
362
|
+
fieldKeysMatch(field.name, descriptor.fieldId) ||
|
|
363
|
+
fieldKeysMatch(field.displayName, descriptor.fieldId));
|
|
364
|
+
}
|
|
365
|
+
function resolveSelectedRangeFieldDescriptor(selectedRange, pageViewContext) {
|
|
366
|
+
if (!selectedRange.fieldId)
|
|
367
|
+
return undefined;
|
|
368
|
+
const structureFields = pageViewContext.bridgeStructure?.fields ?? [];
|
|
369
|
+
const structureField = structureFields.find((field) => selectedRange.elementKey &&
|
|
370
|
+
field.elementKey === selectedRange.elementKey) ??
|
|
371
|
+
structureFields.find((field) => fieldKeysMatch(field.fieldId, selectedRange.fieldId) &&
|
|
372
|
+
fieldKeysMatch(field.item?.id, selectedRange.itemId));
|
|
373
|
+
const fallbackItem = pageViewContext.page?.item ?? pageViewContext.pageItemDescriptor;
|
|
374
|
+
const sourceItem = structureField?.item ?? selectedRange ?? fallbackItem;
|
|
375
|
+
const item = resolveItemDescriptor(sourceItem, fallbackItem);
|
|
376
|
+
const fieldId = structureField?.fieldId ?? selectedRange.fieldId;
|
|
377
|
+
if (!item || !fieldId)
|
|
378
|
+
return undefined;
|
|
379
|
+
return {
|
|
380
|
+
item,
|
|
381
|
+
fieldId,
|
|
382
|
+
};
|
|
383
|
+
}
|
|
384
|
+
function resolveItemDescriptor(source, fallback) {
|
|
385
|
+
const itemId = source?.id ?? source?.itemId ?? fallback?.id;
|
|
386
|
+
const language = source?.language ?? fallback?.language;
|
|
387
|
+
const version = source?.version ?? fallback?.version;
|
|
388
|
+
const database = source?.database ?? fallback?.database;
|
|
389
|
+
if (!itemId || !language || typeof version !== "number") {
|
|
390
|
+
return undefined;
|
|
391
|
+
}
|
|
392
|
+
return {
|
|
393
|
+
id: itemId,
|
|
394
|
+
language,
|
|
395
|
+
version,
|
|
396
|
+
database,
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
function normalizeFieldKey(value) {
|
|
400
|
+
return (value || "").replace(/[{}-]/g, "").toLowerCase();
|
|
401
|
+
}
|
|
402
|
+
function fieldKeysMatch(left, right) {
|
|
403
|
+
const normalizedLeft = normalizeFieldKey(left);
|
|
404
|
+
const normalizedRight = normalizeFieldKey(right);
|
|
405
|
+
return (!!normalizedLeft && !!normalizedRight && normalizedLeft === normalizedRight);
|
|
406
|
+
}
|
|
123
407
|
//# sourceMappingURL=BridgeInlineFormatOverlay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BridgeInlineFormatOverlay.js","sourceRoot":"","sources":["../../../src/editor/page-editor-chrome/BridgeInlineFormatOverlay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAqBvD,MAAM,sBAAsB,GAAgC;IAC1D;QACE,EAAE,EAAE,kBAAkB;QACtB,KAAK,EAAE,MAAM;QACb,IAAI,EAAE,CACJ,eAAM,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,kBAAU,CACvE;QACD,OAAO,EAAE,MAAM;KAChB;IACD;QACE,EAAE,EAAE,oBAAoB;QACxB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,CACJ,eAAM,KAAK,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,kBAAU,CACxE;QACD,OAAO,EAAE,QA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YAClB,GAAG,EAAE,OAAO,CAAC,GAAG;SACjB,EACD,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;YACrB,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1B,CAAC,YAEA,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;YAC5B,MAAM,QAAQ,GAAG,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC5D,OAAO,CACL,iBAEE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,+LACT,QAAQ;oBACN,CAAC,CAAC,gCAAgC;oBAClC,CAAC,CAAC,kEACN,EAAE,EACF,KAAK,EAAE,IAAI,CAAC,KAAK,gBACL,IAAI,CAAC,KAAK,kBACR,QAAQ,EACtB,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,YAEjD,8BACc,MAAM,EAClB,SAAS,EAAC,qEAAqE,YAE9E,IAAI,CAAC,IAAI,GACL,IAjBF,IAAI,CAAC,EAAE,CAkBL,CACV,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;IAEF,OAAO,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC"}
|
|
1
|
+
{"version":3,"file":"BridgeInlineFormatOverlay.js","sourceRoot":"","sources":["../../../src/editor/page-editor-chrome/BridgeInlineFormatOverlay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EACL,OAAO,EACP,cAAc,EACd,cAAc,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE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AAK,eAAe,CAC5E,CAAC;AACJ,CAAC"}
|
|
@@ -25,7 +25,7 @@ export function PageEditorChrome(props) {
|
|
|
25
25
|
}
|
|
26
26
|
function PageEditorChromeContent({ compareView, pageViewContext, editContext, onBridgeRichTextCommand, }) {
|
|
27
27
|
const slotContext = useSlotContext();
|
|
28
|
-
return (_jsxs(_Fragment, { children: [_jsx(FrameMenus, { pageViewContext: pageViewContext, compareView: compareView }), _jsx(BridgeInlineFormatOverlay, { onCommand: onBridgeRichTextCommand }), editContext.mode === "edit" && (_jsxs(_Fragment, { children: [_jsx(PlaceholderDropZones, { size: "large", pageViewContext: pageViewContext }), slotContext?.isActive && _jsx(InsertingIndicator, {})] })), editContext.showComments && (_jsx(CommentHighlightings, { pageViewContext: pageViewContext })), editContext.showSuggestedEdits && (_jsx(SuggestionHighlightings, { pageViewContext: pageViewContext })), _jsx(LockedFieldIndicator, { pageViewContext: pageViewContext }), editContext.mode === "edit" && (_jsx(PictureEditorOverlay, { pageViewContext: pageViewContext })), editContext.showVersionDiffHighlighting && (_jsx(VersionDiffHighlightings, { pageViewContext: pageViewContext })), _jsx(FieldActionsIndicators, { pageViewContext: pageViewContext }), _jsx(FieldEditedIndicators, { pageViewContext: pageViewContext })] }));
|
|
28
|
+
return (_jsxs(_Fragment, { children: [_jsx(FrameMenus, { pageViewContext: pageViewContext, compareView: compareView }), _jsx(BridgeInlineFormatOverlay, { onCommand: onBridgeRichTextCommand, pageViewContext: pageViewContext }), editContext.mode === "edit" && (_jsxs(_Fragment, { children: [_jsx(PlaceholderDropZones, { size: "large", pageViewContext: pageViewContext }), slotContext?.isActive && _jsx(InsertingIndicator, {})] })), editContext.showComments && (_jsx(CommentHighlightings, { pageViewContext: pageViewContext })), editContext.showSuggestedEdits && (_jsx(SuggestionHighlightings, { pageViewContext: pageViewContext })), _jsx(LockedFieldIndicator, { pageViewContext: pageViewContext }), editContext.mode === "edit" && (_jsx(PictureEditorOverlay, { pageViewContext: pageViewContext })), editContext.showVersionDiffHighlighting && (_jsx(VersionDiffHighlightings, { pageViewContext: pageViewContext })), _jsx(FieldActionsIndicators, { pageViewContext: pageViewContext }), _jsx(FieldEditedIndicators, { pageViewContext: pageViewContext })] }));
|
|
29
29
|
}
|
|
30
30
|
function InsertingIndicator() {
|
|
31
31
|
const editContext = useEditContext();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageEditorChrome.js","sourceRoot":"","sources":["../../../src/editor/page-editor-chrome/PageEditorChrome.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EACL,kBAAkB,EAClB,UAAU,GAGX,MAAM,oBAAoB,CAAC;AAU5B,MAAM,UAAU,gBAAgB,CAAC,KAA4B;IAC3D,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,mBAAmB,GACvB,KAAK,CAAC,eAAe,CAAC,WAAW;QACjC,CAAC,CAA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AG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC3C,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { SelectionRange } from "../client/editContext";
|
|
2
|
+
export type InlineAiDialogAnchor = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
align?: "center" | "start";
|
|
6
|
+
origin?: "trigger" | "caret" | "toolbar";
|
|
7
|
+
};
|
|
8
|
+
export type BridgeInlineFormatToolbarRect = {
|
|
9
|
+
left: number;
|
|
10
|
+
top: number;
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
};
|
|
14
|
+
export declare const BRIDGE_INLINE_FORMAT_TOOLBAR_SELECTOR = "[data-bridge-inline-format-toolbar=\"true\"]";
|
|
15
|
+
export declare const BRIDGE_INLINE_FORMAT_AI_BUTTON_SELECTOR = "[data-bridge-inline-format-ai-button=\"true\"]";
|
|
16
|
+
export declare function calculateBridgeInlineFormatToolbarLayout(clientRect: Pick<DOMRect, "left" | "top" | "width" | "height" | "bottom">, options?: {
|
|
17
|
+
toolbarWidth?: number;
|
|
18
|
+
toolbarHeight?: number;
|
|
19
|
+
}): BridgeInlineFormatToolbarRect;
|
|
20
|
+
export declare function getInlineAiAnchorBelowToolbar(toolbarRect: Pick<DOMRect, "left" | "bottom">, aiButtonRect?: Pick<DOMRect, "left"> | null): InlineAiDialogAnchor;
|
|
21
|
+
export declare function getInlineAiAnchorFromBridgeToolbar(selectedRange: SelectionRange | null | undefined, measuredToolbarRect?: DOMRect | null): InlineAiDialogAnchor | undefined;
|
|
22
|
+
export declare function getVisibleBridgeToolbarRect(): DOMRect | undefined;
|
|
23
|
+
export declare function getVisibleBridgeToolbarAiButtonRect(): DOMRect | undefined;
|
|
24
|
+
export declare function waitForVisibleBridgeToolbarRect(maxFrames?: number): Promise<DOMRect | undefined>;
|