@alpaca-editor/core 1.0.4061 → 1.0.4064
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/config/config.js +3 -21
- package/dist/config/config.js.map +1 -1
- package/dist/editor/ConfirmationDialog.js +1 -1
- package/dist/editor/ConfirmationDialog.js.map +1 -1
- package/dist/editor/ContextMenu.js +1 -0
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/FieldListField.js +2 -2
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/FieldListFieldWithFallbacks.js +1 -1
- package/dist/editor/FieldListFieldWithFallbacks.js.map +1 -1
- package/dist/editor/MainLayout.d.ts +2 -0
- package/dist/editor/MainLayout.js +8 -0
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/ScrollingContentTree.js +9 -4
- package/dist/editor/ScrollingContentTree.js.map +1 -1
- package/dist/editor/ai/AgentTerminal.js +382 -3
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/Agents.js +44 -3
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/client/EditorClient.js +54 -16
- package/dist/editor/client/EditorClient.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +4 -2
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/control-center/IndexOverview.js +6 -9
- package/dist/editor/control-center/IndexOverview.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +1 -1
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/menubar/VersionSelector.js +1 -1
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +2 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/page-viewer/EditorForm.js +7 -0
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +2 -1
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/reviews/Comment.js +57 -9
- package/dist/editor/reviews/Comment.js.map +1 -1
- package/dist/editor/reviews/CommentDisplayPopover.js +20 -1
- package/dist/editor/reviews/CommentDisplayPopover.js.map +1 -1
- package/dist/editor/reviews/CommentEditor.js +2 -2
- package/dist/editor/reviews/CommentEditor.js.map +1 -1
- package/dist/editor/reviews/CommentPopover.js +21 -1
- package/dist/editor/reviews/CommentPopover.js.map +1 -1
- package/dist/editor/reviews/CommentView.js +5 -5
- package/dist/editor/reviews/CommentView.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +41 -0
- package/dist/editor/services/agentService.js +10 -0
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/indexService.d.ts +2 -1
- package/dist/editor/services/indexService.js +4 -0
- package/dist/editor/services/indexService.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +3 -2
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/SidebarView.d.ts +2 -1
- package/dist/editor/sidebar/SidebarView.js +2 -2
- package/dist/editor/sidebar/SidebarView.js.map +1 -1
- package/dist/editor/sidebar/ViewSelector.js +16 -1
- package/dist/editor/sidebar/ViewSelector.js.map +1 -1
- package/dist/editor/ui/ItemSearch.js +6 -2
- package/dist/editor/ui/ItemSearch.js.map +1 -1
- package/dist/editor/ui/PerfectTree.js +1 -1
- package/dist/editor/ui/PerfectTree.js.map +1 -1
- package/dist/editor/ui/SimpleIconButton.js +1 -1
- package/dist/editor/ui/SimpleIconButton.js.map +1 -1
- package/dist/editor/ui/SimpleTabs.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/NewPage.js +2 -2
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/styles.css +9 -0
- package/dist/types.d.ts +8 -1
- package/package.json +1 -1
- package/src/config/config.tsx +5 -20
- package/src/editor/ConfirmationDialog.tsx +4 -1
- package/src/editor/ContextMenu.tsx +1 -0
- package/src/editor/FieldListField.tsx +13 -11
- package/src/editor/FieldListFieldWithFallbacks.tsx +1 -0
- package/src/editor/MainLayout.tsx +11 -0
- package/src/editor/ScrollingContentTree.tsx +10 -5
- package/src/editor/ai/AgentTerminal.tsx +555 -1
- package/src/editor/ai/Agents.tsx +64 -8
- package/src/editor/client/EditorClient.tsx +98 -29
- package/src/editor/client/editContext.ts +5 -2
- package/src/editor/control-center/IndexOverview.tsx +8 -13
- package/src/editor/media-selector/TreeSelector.tsx +1 -0
- package/src/editor/menubar/VersionSelector.tsx +4 -1
- package/src/editor/menubar/toolbar-sections/UtilityControls.tsx +15 -2
- package/src/editor/page-viewer/EditorForm.tsx +13 -0
- package/src/editor/page-viewer/PageViewerFrame.tsx +2 -1
- package/src/editor/reviews/Comment.tsx +65 -9
- package/src/editor/reviews/CommentDisplayPopover.tsx +30 -1
- package/src/editor/reviews/CommentEditor.tsx +8 -1
- package/src/editor/reviews/CommentPopover.tsx +26 -3
- package/src/editor/reviews/CommentView.tsx +24 -3
- package/src/editor/services/agentService.ts +58 -0
- package/src/editor/services/indexService.ts +8 -0
- package/src/editor/sidebar/ComponentTree.tsx +6 -2
- package/src/editor/sidebar/SidebarView.tsx +8 -7
- package/src/editor/sidebar/ViewSelector.tsx +52 -19
- package/src/editor/ui/ItemSearch.tsx +8 -6
- package/src/editor/ui/PerfectTree.tsx +2 -1
- package/src/editor/ui/SimpleIconButton.tsx +1 -1
- package/src/editor/ui/SimpleTabs.tsx +1 -1
- package/src/index.ts +0 -2
- package/src/revision.ts +2 -2
- package/src/splash-screen/NewPage.tsx +2 -2
- package/src/types.ts +9 -1
- package/styles.css +0 -2
- package/dist/fonts/index.d.ts +0 -4
- package/dist/fonts/index.js +0 -9
- package/dist/fonts/index.js.map +0 -1
- package/src/fonts/Geist-Black.woff2 +0 -0
- package/src/fonts/Geist-Bold.woff2 +0 -0
- package/src/fonts/Geist-ExtraBold.woff2 +0 -0
- package/src/fonts/Geist-ExtraLight.woff2 +0 -0
- package/src/fonts/Geist-Light.woff2 +0 -0
- package/src/fonts/Geist-Medium.woff2 +0 -0
- package/src/fonts/Geist-Regular.woff2 +0 -0
- package/src/fonts/Geist-SemiBold.woff2 +0 -0
- package/src/fonts/Geist-Thin.woff2 +0 -0
- package/src/fonts/Geist[wght].woff2 +0 -0
- package/src/fonts/index.ts +0 -10
|
@@ -36,6 +36,7 @@ export function CommentPopover({
|
|
|
36
36
|
>([]);
|
|
37
37
|
const contextFromHook = useEditContext();
|
|
38
38
|
const editContext = externalEditContext || contextFromHook;
|
|
39
|
+
const contentRef = React.useRef<HTMLDivElement | null>(null);
|
|
39
40
|
|
|
40
41
|
useEffect(() => {
|
|
41
42
|
if (position) setIsOpen(true);
|
|
@@ -174,12 +175,34 @@ export function CommentPopover({
|
|
|
174
175
|
</PopoverTrigger>
|
|
175
176
|
)}
|
|
176
177
|
<PopoverContent
|
|
178
|
+
ref={contentRef}
|
|
179
|
+
tabIndex={-1}
|
|
177
180
|
className="w-96 p-4"
|
|
181
|
+
data-testid="add-comment-popover"
|
|
178
182
|
side="bottom"
|
|
179
183
|
align="start"
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
184
|
+
onOpenAutoFocus={(e) => {
|
|
185
|
+
e.preventDefault();
|
|
186
|
+
contentRef.current?.focus();
|
|
187
|
+
}}
|
|
188
|
+
onInteractOutside={(e) => {
|
|
189
|
+
const target = e.target as HTMLElement | null;
|
|
190
|
+
if (target && target.closest('[data-slot="tooltip-content"]')) {
|
|
191
|
+
e.preventDefault();
|
|
192
|
+
}
|
|
193
|
+
}}
|
|
194
|
+
onPointerDownOutside={(e) => {
|
|
195
|
+
const target = e.target as HTMLElement | null;
|
|
196
|
+
if (target && target.closest('[data-slot="tooltip-content"]')) {
|
|
197
|
+
e.preventDefault();
|
|
198
|
+
}
|
|
199
|
+
}}
|
|
200
|
+
onFocusOutside={(e) => {
|
|
201
|
+
const target = e.target as HTMLElement | null;
|
|
202
|
+
if (target && target.closest('[data-slot="tooltip-content"]')) {
|
|
203
|
+
e.preventDefault();
|
|
204
|
+
}
|
|
205
|
+
}}
|
|
183
206
|
onMouseDown={(e) => e.stopPropagation()}
|
|
184
207
|
onClick={(e) => e.stopPropagation()}
|
|
185
208
|
>
|
|
@@ -81,15 +81,26 @@ export function CommentView({
|
|
|
81
81
|
return (
|
|
82
82
|
<div
|
|
83
83
|
className={`${compact ? "mt-2" : "mt-3"} flex items-center border-t pt-${compact ? "2" : "3"} text-xs`}
|
|
84
|
+
data-testid="comment-context-info"
|
|
84
85
|
>
|
|
85
86
|
{showItemName && (
|
|
86
|
-
<div
|
|
87
|
+
<div
|
|
88
|
+
className="text-2xs text-gray-500"
|
|
89
|
+
data-testid="comment-item-name"
|
|
90
|
+
>
|
|
91
|
+
{comment.itemName}
|
|
92
|
+
</div>
|
|
87
93
|
)}
|
|
88
94
|
{showFieldName && showItemName && (
|
|
89
95
|
<div className="text-2xs mx-2 text-gray-500">></div>
|
|
90
96
|
)}
|
|
91
97
|
{showFieldName && (
|
|
92
|
-
<div
|
|
98
|
+
<div
|
|
99
|
+
className="text-2xs text-gray-500"
|
|
100
|
+
data-testid="comment-field-name"
|
|
101
|
+
>
|
|
102
|
+
{comment.fieldName}
|
|
103
|
+
</div>
|
|
93
104
|
)}
|
|
94
105
|
</div>
|
|
95
106
|
);
|
|
@@ -118,6 +129,7 @@ export function CommentView({
|
|
|
118
129
|
<SimpleIconButton
|
|
119
130
|
icon={<Edit className="h-3.5 w-3.5" strokeWidth={1} />}
|
|
120
131
|
label="Edit"
|
|
132
|
+
data-testid="comment-action-edit"
|
|
121
133
|
onClick={onEdit}
|
|
122
134
|
/>
|
|
123
135
|
)}
|
|
@@ -130,11 +142,16 @@ export function CommentView({
|
|
|
130
142
|
<button
|
|
131
143
|
className="hover:bg-gray-5 cursor-pointer rounded-full p-[6px]"
|
|
132
144
|
title="Delete"
|
|
145
|
+
data-testid="comment-action-delete"
|
|
133
146
|
>
|
|
134
147
|
<Trash2 className="h-3.5 w-3.5" strokeWidth={1} />
|
|
135
148
|
</button>
|
|
136
149
|
</PopoverTrigger>
|
|
137
|
-
<PopoverContent
|
|
150
|
+
<PopoverContent
|
|
151
|
+
className="w-auto p-2"
|
|
152
|
+
align="end"
|
|
153
|
+
data-testid="comment-delete-popover"
|
|
154
|
+
>
|
|
138
155
|
<Button
|
|
139
156
|
variant="outline"
|
|
140
157
|
size="sm"
|
|
@@ -152,6 +169,7 @@ export function CommentView({
|
|
|
152
169
|
<SimpleIconButton
|
|
153
170
|
icon={<Check className="h-3.5 w-3.5" strokeWidth={1} />}
|
|
154
171
|
label="Resolve"
|
|
172
|
+
data-testid="comment-action-resolve"
|
|
155
173
|
onClick={onResolve}
|
|
156
174
|
/>
|
|
157
175
|
)}
|
|
@@ -170,6 +188,7 @@ export function CommentView({
|
|
|
170
188
|
formatDate(new Date(comment.resolvedDate!)) +
|
|
171
189
|
")"
|
|
172
190
|
}
|
|
191
|
+
data-testid="comment-resolved-indicator"
|
|
173
192
|
>
|
|
174
193
|
<Check
|
|
175
194
|
className="h-3.5 w-3.5 text-green-500"
|
|
@@ -195,6 +214,7 @@ export function CommentView({
|
|
|
195
214
|
<SimpleIconButton
|
|
196
215
|
icon={<Sparkles className="h-3.5 w-3.5" strokeWidth={1} />}
|
|
197
216
|
label="AI"
|
|
217
|
+
data-testid="comment-action-ai"
|
|
198
218
|
onClick={onAiAction}
|
|
199
219
|
/>
|
|
200
220
|
)}
|
|
@@ -205,6 +225,7 @@ export function CommentView({
|
|
|
205
225
|
{/* Comment Text */}
|
|
206
226
|
<div
|
|
207
227
|
className={`${compact ? "text-sm" : "text-sm"} whitespace-pre-wrap text-gray-700`}
|
|
228
|
+
data-testid="comment-text"
|
|
208
229
|
>
|
|
209
230
|
{comment.text}
|
|
210
231
|
</div>
|
|
@@ -80,6 +80,43 @@ export type AgentDetails = Agent & {
|
|
|
80
80
|
messages?: AgentChatMessage[];
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
// Metadata shape stored on the agent. Server accepts a flexible JSON object; keep it permissive.
|
|
84
|
+
export type AgentMetadata = {
|
|
85
|
+
selection?: string[];
|
|
86
|
+
selectedText?: string;
|
|
87
|
+
allowedFunctions?: string[];
|
|
88
|
+
addContextContent?: boolean;
|
|
89
|
+
addAllContent?: boolean;
|
|
90
|
+
addSelectedComponents?: boolean;
|
|
91
|
+
profile?: string;
|
|
92
|
+
additionalData?: Record<string, any>;
|
|
93
|
+
context?: {
|
|
94
|
+
pages?: Array<{
|
|
95
|
+
id: string;
|
|
96
|
+
language: string;
|
|
97
|
+
version: number;
|
|
98
|
+
path?: string;
|
|
99
|
+
name?: string;
|
|
100
|
+
}>;
|
|
101
|
+
componentIds?: string[];
|
|
102
|
+
field?: {
|
|
103
|
+
fieldId: string;
|
|
104
|
+
itemId: string;
|
|
105
|
+
name?: string;
|
|
106
|
+
};
|
|
107
|
+
comment?: {
|
|
108
|
+
id: string;
|
|
109
|
+
text?: string;
|
|
110
|
+
fieldName?: string;
|
|
111
|
+
itemName?: string;
|
|
112
|
+
author?: string;
|
|
113
|
+
selectedText?: string;
|
|
114
|
+
rangeStart?: number;
|
|
115
|
+
rangeEnd?: number;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
|
|
83
120
|
export interface AgentChatMessage {
|
|
84
121
|
id: string;
|
|
85
122
|
agentId: string;
|
|
@@ -445,6 +482,27 @@ export async function closeAgent(agentId: string): Promise<any> {
|
|
|
445
482
|
return result.data;
|
|
446
483
|
}
|
|
447
484
|
|
|
485
|
+
/**
|
|
486
|
+
* Updates the metadata (context) for an agent chat
|
|
487
|
+
*/
|
|
488
|
+
export async function updateAgentMetadata(
|
|
489
|
+
agentId: string,
|
|
490
|
+
metadata: AgentMetadata,
|
|
491
|
+
): Promise<{ success: boolean }> {
|
|
492
|
+
const result = await post<{ success: boolean }>(
|
|
493
|
+
AGENT_BASE_URL + "/updateMetadata",
|
|
494
|
+
{ agentId, metadata },
|
|
495
|
+
);
|
|
496
|
+
|
|
497
|
+
if (result.type !== "success") {
|
|
498
|
+
throw new Error(
|
|
499
|
+
`Failed to update agent metadata: ${result.summary || "Unknown error"} ${result.details || ""}`,
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
return result.data ?? { success: true };
|
|
504
|
+
}
|
|
505
|
+
|
|
448
506
|
/**
|
|
449
507
|
* Checks if an agent exists and returns its current state with messages
|
|
450
508
|
*/
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
SubmitStagedResult,
|
|
6
6
|
ImportStatus,
|
|
7
7
|
CentroidsStatus,
|
|
8
|
+
CombinedIndexStatus,
|
|
8
9
|
} from "../../types";
|
|
9
10
|
import { get, post } from "./serviceHelper";
|
|
10
11
|
|
|
@@ -13,6 +14,13 @@ export async function getIndexStatus() {
|
|
|
13
14
|
return result.data;
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
export async function getCombinedIndexStatus() {
|
|
18
|
+
const result = await get<CombinedIndexStatus>(
|
|
19
|
+
"/alpaca/editor/index/combinedstatus",
|
|
20
|
+
);
|
|
21
|
+
return result.data;
|
|
22
|
+
}
|
|
23
|
+
|
|
16
24
|
export async function rebuildIndex() {
|
|
17
25
|
await post("/alpaca/editor/index/rebuild", {});
|
|
18
26
|
}
|
|
@@ -282,6 +282,7 @@ export function ComponentTree({}) {
|
|
|
282
282
|
),
|
|
283
283
|
data: c,
|
|
284
284
|
parent: parent,
|
|
285
|
+
isDraggable: true,
|
|
285
286
|
tags: [],
|
|
286
287
|
className:
|
|
287
288
|
c.isRemovedFromMasterLanguage || !c.editable ? "text-gray-400" : "",
|
|
@@ -658,7 +659,7 @@ export function ComponentTree({}) {
|
|
|
658
659
|
</div>
|
|
659
660
|
|
|
660
661
|
{/* Tree content */}
|
|
661
|
-
<div className="flex-1 p-2" ref={treeRef}>
|
|
662
|
+
<div className="flex-1 p-2" ref={treeRef} data-testid="component-tree">
|
|
662
663
|
<PerfectTree
|
|
663
664
|
nodes={rootNodes}
|
|
664
665
|
isDragging={!!editContext?.dragObject}
|
|
@@ -719,7 +720,10 @@ export function ComponentTree({}) {
|
|
|
719
720
|
|
|
720
721
|
function renderNode(node: CustomTreeNode) {
|
|
721
722
|
return (
|
|
722
|
-
<div
|
|
723
|
+
<div
|
|
724
|
+
className={`component-tree-node ${node.type ? `component-tree-${node.type}` : ""}`}
|
|
725
|
+
data-component-node={node.type === "component" ? "true" : undefined}
|
|
726
|
+
>
|
|
723
727
|
<div className="flex items-center gap-2 text-[12px] text-gray-600">
|
|
724
728
|
{typeof node.icon === "string" ? (
|
|
725
729
|
<i className={node.icon}></i>
|
|
@@ -12,12 +12,14 @@ export function SidebarView({
|
|
|
12
12
|
active,
|
|
13
13
|
onClose,
|
|
14
14
|
detached,
|
|
15
|
+
paddingRight,
|
|
15
16
|
}: {
|
|
16
17
|
sidebar: Sidebar;
|
|
17
18
|
editContext: EditContextType;
|
|
18
19
|
active: boolean;
|
|
19
20
|
onClose: () => void;
|
|
20
21
|
detached?: boolean;
|
|
22
|
+
paddingRight?: boolean;
|
|
21
23
|
}) {
|
|
22
24
|
const resolvedPanels = sidebar.panels.map((x) => {
|
|
23
25
|
if (typeof x === "function") {
|
|
@@ -60,9 +62,10 @@ export function SidebarView({
|
|
|
60
62
|
return (
|
|
61
63
|
<div
|
|
62
64
|
className={cn(
|
|
63
|
-
"h-full",
|
|
65
|
+
"h-full",
|
|
64
66
|
detached ? "p-2" : "border-gray-3 border-r",
|
|
65
|
-
!active ? "hidden" : ""
|
|
67
|
+
!active ? "hidden" : "",
|
|
68
|
+
paddingRight ? "pr-2" : "pr-0",
|
|
66
69
|
)}
|
|
67
70
|
>
|
|
68
71
|
<div
|
|
@@ -111,11 +114,9 @@ export function SidebarView({
|
|
|
111
114
|
);
|
|
112
115
|
|
|
113
116
|
return (
|
|
114
|
-
<div
|
|
115
|
-
"h-full",
|
|
116
|
-
|
|
117
|
-
!active ? "hidden" : ""
|
|
118
|
-
)}>
|
|
117
|
+
<div
|
|
118
|
+
className={cn("h-full", detached ? "p-2" : "", !active ? "hidden" : "")}
|
|
119
|
+
>
|
|
119
120
|
<Splitter
|
|
120
121
|
panels={splitterPanels}
|
|
121
122
|
direction="vertical"
|
|
@@ -165,29 +165,62 @@ function ViewSelectorComponent() {
|
|
|
165
165
|
{/* Three dots menu for non-selected views */}
|
|
166
166
|
{views.length > 0 && (
|
|
167
167
|
<Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen}>
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
<
|
|
171
|
-
<
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
168
|
+
{!isPopoverOpen ? (
|
|
169
|
+
<Tooltip delayDuration={500}>
|
|
170
|
+
<TooltipTrigger asChild>
|
|
171
|
+
<PopoverTrigger asChild>
|
|
172
|
+
<Button
|
|
173
|
+
variant="ghost"
|
|
174
|
+
size="icon"
|
|
175
|
+
data-testid="more-views-button"
|
|
176
|
+
className={cn(
|
|
177
|
+
"p-1.5 text-neutral-500 hover:text-gray-900",
|
|
178
|
+
contextValues.isMobile ? "flex-shrink-0" : "",
|
|
179
|
+
)}
|
|
180
|
+
>
|
|
181
|
+
<VerticalDotsIcon />
|
|
182
|
+
</Button>
|
|
183
|
+
</PopoverTrigger>
|
|
184
|
+
</TooltipTrigger>
|
|
185
|
+
<TooltipContent side="right">More views</TooltipContent>
|
|
186
|
+
</Tooltip>
|
|
187
|
+
) : (
|
|
188
|
+
<PopoverTrigger asChild>
|
|
189
|
+
<Button
|
|
190
|
+
variant="ghost"
|
|
191
|
+
size="icon"
|
|
192
|
+
data-testid="more-views-button"
|
|
193
|
+
className={cn(
|
|
194
|
+
"p-1.5 text-neutral-500 hover:text-gray-900",
|
|
195
|
+
contextValues.isMobile ? "flex-shrink-0" : "",
|
|
196
|
+
)}
|
|
197
|
+
>
|
|
198
|
+
<VerticalDotsIcon />
|
|
199
|
+
</Button>
|
|
200
|
+
</PopoverTrigger>
|
|
201
|
+
)}
|
|
186
202
|
<PopoverContent
|
|
187
203
|
className="w-56 p-2"
|
|
188
204
|
side={contextValues.isMobile ? "bottom" : "right"}
|
|
189
205
|
align="start"
|
|
190
|
-
|
|
206
|
+
onInteractOutside={(e) => {
|
|
207
|
+
const target = e.target as HTMLElement | null;
|
|
208
|
+
if (target && target.closest('[data-slot="tooltip-content"]')) {
|
|
209
|
+
e.preventDefault();
|
|
210
|
+
}
|
|
211
|
+
}}
|
|
212
|
+
onPointerDownOutside={(e) => {
|
|
213
|
+
const target = e.target as HTMLElement | null;
|
|
214
|
+
if (target && target.closest('[data-slot="tooltip-content"]')) {
|
|
215
|
+
e.preventDefault();
|
|
216
|
+
}
|
|
217
|
+
}}
|
|
218
|
+
onFocusOutside={(e) => {
|
|
219
|
+
const target = e.target as HTMLElement | null;
|
|
220
|
+
if (target && target.closest('[data-slot="tooltip-content"]')) {
|
|
221
|
+
e.preventDefault();
|
|
222
|
+
}
|
|
223
|
+
}}
|
|
191
224
|
>
|
|
192
225
|
<div className="space-y-1">
|
|
193
226
|
<div className="px-2 py-1 text-xs font-medium tracking-wider text-gray-600 uppercase">
|
|
@@ -3,9 +3,7 @@ import { useEditContext } from "../client/editContext";
|
|
|
3
3
|
import { executeSearch } from "../services/searchService";
|
|
4
4
|
import { toast } from "sonner";
|
|
5
5
|
import { useDebouncedCallback } from "use-debounce";
|
|
6
|
-
import { ProgressSpinner } from "primereact/progressspinner";
|
|
7
6
|
import { ItemDescriptor } from "../pageModel";
|
|
8
|
-
import { getItemDescriptor } from "../utils";
|
|
9
7
|
import { ItemList } from "./ItemList";
|
|
10
8
|
import { FilterInput } from "../../components/FilterInput";
|
|
11
9
|
|
|
@@ -85,7 +83,7 @@ export const ItemSearch: React.FC<SearchProps> = ({
|
|
|
85
83
|
query: searchPrompt,
|
|
86
84
|
editContext,
|
|
87
85
|
rootItemIds,
|
|
88
|
-
maxResults:
|
|
86
|
+
maxResults: 15,
|
|
89
87
|
});
|
|
90
88
|
|
|
91
89
|
if (query === currentQuery) {
|
|
@@ -131,9 +129,13 @@ export const ItemSearch: React.FC<SearchProps> = ({
|
|
|
131
129
|
<ItemList
|
|
132
130
|
items={results}
|
|
133
131
|
onItemHover={setHoveredItem}
|
|
134
|
-
onItemClick={
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
onItemClick={(item) => {
|
|
133
|
+
itemSelected(item);
|
|
134
|
+
setResults([]);
|
|
135
|
+
setQuery("");
|
|
136
|
+
}}
|
|
137
|
+
maxItems={15}
|
|
138
|
+
className={`mt-1 ${resultClassName} max-h-[200px] overflow-y-auto`}
|
|
137
139
|
/>
|
|
138
140
|
)}
|
|
139
141
|
{results.length === 0 && !loading && query && (
|
|
@@ -533,7 +533,7 @@ const NodeContent = memo(
|
|
|
533
533
|
|
|
534
534
|
return (
|
|
535
535
|
<div
|
|
536
|
-
className=
|
|
536
|
+
className={`tree-node ${(node as any)?.type ? `tree-node-${(node as any).type}` : ""} mb-0.5 flex cursor-pointer items-center`}
|
|
537
537
|
draggable={enableDragAndDrop && !!node.isDraggable}
|
|
538
538
|
onClick={handleSelect}
|
|
539
539
|
onDragStart={(event) => handleDragStart(event)}
|
|
@@ -546,6 +546,7 @@ const NodeContent = memo(
|
|
|
546
546
|
onContextMenu={handleContextMenu}
|
|
547
547
|
data-node-key={node.key}
|
|
548
548
|
data-selected={isSelected}
|
|
549
|
+
data-node-type={(node as any)?.type}
|
|
549
550
|
>
|
|
550
551
|
{/* Render toggle arrow only if the node is expandable */}
|
|
551
552
|
{node.hasChildren || node.children?.length ? (
|
|
@@ -51,7 +51,7 @@ export function SimpleTabs({
|
|
|
51
51
|
style={{
|
|
52
52
|
fontWeight: index === activeTab ? "medium" : "normal",
|
|
53
53
|
borderBottom: index === activeTab ? "3px solid black" : "none",
|
|
54
|
-
marginBottom: index === activeTab ? "0" : "
|
|
54
|
+
marginBottom: index === activeTab ? "0" : "2px",
|
|
55
55
|
color: index === activeTab ? "black" : "gray",
|
|
56
56
|
}}
|
|
57
57
|
>
|
package/src/index.ts
CHANGED
|
@@ -23,8 +23,6 @@ export { requestTranslation } from "./editor/services/translationService";
|
|
|
23
23
|
|
|
24
24
|
export { defaultTranslateAll } from "./editor/commands/localizeItem/LocalizeItemUtils";
|
|
25
25
|
|
|
26
|
-
export * from "./fonts";
|
|
27
|
-
|
|
28
26
|
export { Card } from "./components/ui/card";
|
|
29
27
|
export { Button } from "./components/ui/button";
|
|
30
28
|
|
package/src/revision.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = "1.0.
|
|
2
|
-
export const buildDate = "2025-08-
|
|
1
|
+
export const version = "1.0.4064";
|
|
2
|
+
export const buildDate = "2025-08-25 01:54:20";
|
|
@@ -14,7 +14,6 @@ import { getAbsoluteIconUrl, getItemDescriptor } from "../editor/utils";
|
|
|
14
14
|
import { classNames } from "primereact/utils";
|
|
15
15
|
import { useEditContext } from "../client-components";
|
|
16
16
|
|
|
17
|
-
import { SectionHeadline } from "./SectionHeadline";
|
|
18
17
|
import { ItemDescriptor } from "../editor/pageModel";
|
|
19
18
|
import { useDebouncedCallback } from "use-debounce";
|
|
20
19
|
import { getWizards } from "../page-wizard/service";
|
|
@@ -111,7 +110,7 @@ export function NewPage({ selectedItemId }: { selectedItemId?: string }) {
|
|
|
111
110
|
if (valid) setValidationMessage(null);
|
|
112
111
|
|
|
113
112
|
setIsValid(valid);
|
|
114
|
-
},
|
|
113
|
+
}, 200);
|
|
115
114
|
|
|
116
115
|
useEffect(() => {
|
|
117
116
|
isValidDebounced();
|
|
@@ -181,6 +180,7 @@ export function NewPage({ selectedItemId }: { selectedItemId?: string }) {
|
|
|
181
180
|
<div className="flex flex-1 flex-col md:flex-row">
|
|
182
181
|
{" "}
|
|
183
182
|
<div
|
|
183
|
+
data-testid="new-page-pick-location-tree"
|
|
184
184
|
className={`tour-pick-location w-full md:w-1/2 ${
|
|
185
185
|
selectedItem ? "h-full md:h-full" : ""
|
|
186
186
|
}`}
|
package/src/types.ts
CHANGED
|
@@ -167,7 +167,8 @@ export type User = {
|
|
|
167
167
|
export type UserPreferences = {
|
|
168
168
|
pinnedViews?: string[];
|
|
169
169
|
showViewNames?: boolean;
|
|
170
|
-
|
|
170
|
+
showComponentNavigator?: boolean;
|
|
171
|
+
showAgentsPanel?: boolean;
|
|
171
172
|
hideNonEditableComponents?: boolean;
|
|
172
173
|
};
|
|
173
174
|
|
|
@@ -310,6 +311,13 @@ export type CentroidsStatus = {
|
|
|
310
311
|
startedAt?: string;
|
|
311
312
|
};
|
|
312
313
|
|
|
314
|
+
export type CombinedIndexStatus = {
|
|
315
|
+
indexStatus: IndexStatus | null;
|
|
316
|
+
stagingStatus: StagingStatus | null;
|
|
317
|
+
importStatus: ImportStatus | null;
|
|
318
|
+
centroidsStatus: CentroidsStatus | null;
|
|
319
|
+
};
|
|
320
|
+
|
|
313
321
|
export type Error = {
|
|
314
322
|
message: string;
|
|
315
323
|
details: string;
|
package/styles.css
CHANGED
package/dist/fonts/index.d.ts
DELETED
package/dist/fonts/index.js
DELETED
package/dist/fonts/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fonts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC;IACzB,OAAO,EAAE,CAAC,OAAO,CAAC;IAClB,QAAQ,EAAE,cAAc;CACzB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,KAAK;CACN,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|