@alpaca-editor/core 1.0.4134 → 1.0.4140
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 +7 -0
- package/dist/config/config.js.map +1 -1
- package/dist/editor/FieldListField.js +3 -4
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/Terminal.js +1 -1
- package/dist/editor/Terminal.js.map +1 -1
- package/dist/editor/Titlebar.js +0 -1
- package/dist/editor/Titlebar.js.map +1 -1
- package/dist/editor/ai/AgentCostDisplay.d.ts +3 -1
- package/dist/editor/ai/AgentCostDisplay.js +26 -2
- package/dist/editor/ai/AgentCostDisplay.js.map +1 -1
- package/dist/editor/ai/AgentStatusBadge.d.ts +26 -0
- package/dist/editor/ai/AgentStatusBadge.js +110 -0
- package/dist/editor/ai/AgentStatusBadge.js.map +1 -0
- package/dist/editor/ai/AgentTerminal.js +289 -198
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/Agents.d.ts +2 -2
- package/dist/editor/ai/Agents.js +115 -19
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/AiResponseMessage.js +259 -45
- package/dist/editor/ai/AiResponseMessage.js.map +1 -1
- package/dist/editor/ai/ContextInfoBar.js +124 -113
- package/dist/editor/ai/ContextInfoBar.js.map +1 -1
- package/dist/editor/ai/ToolCallDisplay.d.ts +1 -0
- package/dist/editor/ai/ToolCallDisplay.js +70 -58
- package/dist/editor/ai/ToolCallDisplay.js.map +1 -1
- package/dist/editor/ai/useAgentStatus.d.ts +13 -0
- package/dist/editor/ai/useAgentStatus.js +101 -0
- package/dist/editor/ai/useAgentStatus.js.map +1 -0
- package/dist/editor/client/EditorShell.js +23 -8
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/itemsRepository.js.map +1 -1
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js +5 -5
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js.map +1 -1
- package/dist/editor/control-center/About.js +1 -1
- package/dist/editor/control-center/About.js.map +1 -1
- package/dist/editor/control-center/AllAgentsPanel.d.ts +5 -0
- package/dist/editor/control-center/AllAgentsPanel.js +126 -0
- package/dist/editor/control-center/AllAgentsPanel.js.map +1 -0
- package/dist/editor/control-center/WebSocketMessages.js +1 -0
- package/dist/editor/control-center/WebSocketMessages.js.map +1 -1
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.js +42 -7
- package/dist/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.js.map +1 -1
- package/dist/editor/media-selector/AiImageSearch.d.ts +1 -1
- package/dist/editor/media-selector/AiImageSearch.js +162 -103
- package/dist/editor/media-selector/AiImageSearch.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +20 -4
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js +5 -2
- package/dist/editor/menubar/toolbar-sections/UtilityControls.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.d.ts +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +7 -5
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js +2 -2
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +18 -11
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +53 -48
- package/dist/editor/services/agentService.js +137 -79
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.d.ts +1 -1
- package/dist/editor/services/editService.js +1 -0
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/sidebar/GraphQL.js +20 -7
- package/dist/editor/sidebar/GraphQL.js.map +1 -1
- package/dist/editor/sidebar/SEOInfo.js +1 -2
- package/dist/editor/sidebar/SEOInfo.js.map +1 -1
- package/dist/editor/sidebar/Translations.js +10 -7
- package/dist/editor/sidebar/Translations.js.map +1 -1
- package/dist/editor/ui/ItemNameDialogNew.js +1 -1
- package/dist/editor/ui/ItemSearch.js +10 -4
- package/dist/editor/ui/ItemSearch.js.map +1 -1
- package/dist/page-wizard/steps/CollectStep.js +2 -2
- package/dist/page-wizard/steps/CollectStep.js.map +1 -1
- package/dist/page-wizard/steps/FieldEditor.js +2 -2
- package/dist/page-wizard/steps/FieldEditor.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/splash-screen/RecentPages.js +1 -1
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/styles.css +167 -22
- package/dist/tour/Tour.js +15 -11
- package/dist/tour/Tour.js.map +1 -1
- package/package.json +1 -1
- package/src/config/config.tsx +7 -0
- package/src/editor/FieldListField.tsx +13 -13
- package/src/editor/Terminal.tsx +1 -1
- package/src/editor/Titlebar.tsx +0 -1
- package/src/editor/ai/AgentCostDisplay.tsx +57 -1
- package/src/editor/ai/AgentStatusBadge.tsx +144 -0
- package/src/editor/ai/AgentTerminal.tsx +345 -219
- package/src/editor/ai/Agents.tsx +179 -30
- package/src/editor/ai/AiResponseMessage.tsx +411 -114
- package/src/editor/ai/ContextInfoBar.tsx +134 -131
- package/src/editor/ai/ToolCallDisplay.tsx +217 -176
- package/src/editor/ai/useAgentStatus.ts +123 -0
- package/src/editor/client/EditorShell.tsx +34 -8
- package/src/editor/client/itemsRepository.ts +1 -2
- package/src/editor/commands/localizeItem/LocalizeItemDialog.tsx +5 -5
- package/src/editor/control-center/About.tsx +0 -14
- package/src/editor/control-center/AllAgentsPanel.tsx +300 -0
- package/src/editor/control-center/WebSocketMessages.tsx +1 -0
- package/src/editor/control-center/setup-steps/AiSetupStep/tools/GenerateToolsSection.tsx +49 -8
- package/src/editor/media-selector/AiImageSearch.tsx +162 -172
- package/src/editor/media-selector/TreeSelector.tsx +137 -116
- package/src/editor/menubar/toolbar-sections/UtilityControls.tsx +9 -1
- package/src/editor/page-editor-chrome/PlaceholderDropZone.tsx +7 -4
- package/src/editor/page-viewer/DeviceToolbar.tsx +15 -11
- package/src/editor/page-viewer/PageViewerFrame.tsx +20 -14
- package/src/editor/services/agentService.ts +217 -129
- package/src/editor/services/aiService.ts +2 -2
- package/src/editor/services/editService.ts +1 -0
- package/src/editor/sidebar/GraphQL.tsx +143 -117
- package/src/editor/sidebar/SEOInfo.tsx +1 -2
- package/src/editor/sidebar/Translations.tsx +14 -12
- package/src/editor/ui/ItemNameDialogNew.tsx +1 -1
- package/src/editor/ui/ItemSearch.tsx +11 -4
- package/src/editor/ui/SimpleTabs.tsx +1 -1
- package/src/page-wizard/steps/CollectStep.tsx +2 -2
- package/src/page-wizard/steps/FieldEditor.tsx +13 -15
- package/src/revision.ts +2 -2
- package/src/splash-screen/NewPage.tsx +2 -2
- package/src/splash-screen/RecentPages.tsx +1 -1
- package/src/tour/Tour.tsx +61 -48
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@uiw/react-textarea-code-editor/dist.css";
|
|
2
2
|
|
|
3
|
-
import { Splitter
|
|
3
|
+
import { Splitter } from "../ui/Splitter";
|
|
4
4
|
import CodeEditor from "@uiw/react-textarea-code-editor";
|
|
5
5
|
import { ActionButton } from "../../components/ActionButton";
|
|
6
6
|
import { useEffect, useState } from "react";
|
|
@@ -218,129 +218,155 @@ export function GraphQL() {
|
|
|
218
218
|
// (moved useEffect for context factory above to ensure hooks order remains stable)
|
|
219
219
|
|
|
220
220
|
return (
|
|
221
|
-
<Splitter
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
221
|
+
<Splitter
|
|
222
|
+
direction="vertical"
|
|
223
|
+
className="h-full"
|
|
224
|
+
panels={[
|
|
225
|
+
{
|
|
226
|
+
name: "query",
|
|
227
|
+
defaultSize: 850,
|
|
228
|
+
className: "flex flex-col min-h-[500px]",
|
|
229
|
+
content: (
|
|
230
|
+
<div className="flex flex-1 flex-col overflow-hidden">
|
|
231
|
+
{aiGeneratedQuery && aiGeneratedQuery !== query && (
|
|
232
|
+
<div className="flex items-center gap-2 border-b border-yellow-200 bg-yellow-50 p-2 text-xs">
|
|
233
|
+
<span className="text-yellow-800">
|
|
234
|
+
AI generated a new query
|
|
235
|
+
</span>
|
|
236
|
+
<ActionButton
|
|
237
|
+
onClick={() => applyQueryToEditor(aiGeneratedQuery)}
|
|
238
|
+
className="p-1 text-xs"
|
|
239
|
+
variant="outline"
|
|
240
|
+
>
|
|
241
|
+
Apply
|
|
242
|
+
</ActionButton>
|
|
243
|
+
<ActionButton
|
|
244
|
+
onClick={() => setAiGeneratedQuery("")}
|
|
245
|
+
className="p-1"
|
|
246
|
+
variant="ghost"
|
|
247
|
+
>
|
|
248
|
+
×
|
|
249
|
+
</ActionButton>
|
|
250
|
+
</div>
|
|
251
|
+
)}
|
|
252
|
+
<div className="flex h-full flex-col">
|
|
253
|
+
{/* GraphQL Query Section */}
|
|
254
|
+
<div className="flex flex-1 flex-col border-b border-gray-300">
|
|
255
|
+
<div className="border-b border-gray-300 bg-gray-100 px-3 py-2 text-sm font-medium text-gray-700">
|
|
256
|
+
GraphQL Query
|
|
257
|
+
</div>
|
|
258
|
+
<div className="relative flex-1">
|
|
259
|
+
<div className="absolute inset-0 overflow-auto">
|
|
260
|
+
<CodeEditor
|
|
261
|
+
value={query}
|
|
262
|
+
language="graphql"
|
|
263
|
+
placeholder="Enter your GraphQL query here..."
|
|
264
|
+
onChange={(evn: any) => setQuery(evn.target.value)}
|
|
265
|
+
padding={15}
|
|
266
|
+
style={{
|
|
267
|
+
fontSize: 12,
|
|
268
|
+
backgroundColor: "#f8f9fa",
|
|
269
|
+
fontFamily:
|
|
270
|
+
"ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace",
|
|
271
|
+
}}
|
|
272
|
+
/>
|
|
273
|
+
</div>
|
|
261
274
|
</div>
|
|
262
275
|
</div>
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
<div className="border-b border-gray-300 bg-gray-50 px-2 py-1 text-xs font-medium">
|
|
276
|
-
JSON Result
|
|
276
|
+
|
|
277
|
+
{/* Run Button Section */}
|
|
278
|
+
<div className="flex items-center justify-center border-b border-gray-300 bg-gray-50 py-3">
|
|
279
|
+
<ActionButton
|
|
280
|
+
onClick={refresh}
|
|
281
|
+
disabled={showSpinner}
|
|
282
|
+
className="px-4 py-2"
|
|
283
|
+
variant="outline"
|
|
284
|
+
>
|
|
285
|
+
<RefreshCw strokeWidth={1.5} className="mr-2 h-4 w-4" />
|
|
286
|
+
Run
|
|
287
|
+
</ActionButton>
|
|
277
288
|
</div>
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
289
|
+
|
|
290
|
+
{/* JSON Result Section */}
|
|
291
|
+
<div className="flex flex-1 flex-col">
|
|
292
|
+
<div className="border-b border-gray-300 bg-gray-100 px-3 py-2 text-sm font-medium text-gray-700">
|
|
293
|
+
JSON Result
|
|
294
|
+
</div>
|
|
295
|
+
<div className="flex-1 overflow-auto p-2">
|
|
296
|
+
<div className="min-w-0 overflow-x-auto">
|
|
297
|
+
<ObjectInspector data={graphqlResult} expandLevel={3} />
|
|
298
|
+
</div>
|
|
281
299
|
</div>
|
|
282
300
|
</div>
|
|
283
301
|
</div>
|
|
284
|
-
</
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
302
|
+
</div>
|
|
303
|
+
),
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: "schema",
|
|
307
|
+
defaultSize: 150,
|
|
308
|
+
className: "flex flex-col text-xs min-h-[150px]",
|
|
309
|
+
content: (
|
|
310
|
+
<div className="flex flex-1 flex-col text-xs">
|
|
311
|
+
<SimpleTabs
|
|
312
|
+
className="border-gray-3 border-b px-2 pt-2"
|
|
313
|
+
tabs={[
|
|
314
|
+
{
|
|
315
|
+
id: "schema",
|
|
316
|
+
label: "Schema",
|
|
317
|
+
content: (
|
|
318
|
+
<div className="relative h-full overflow-hidden">
|
|
319
|
+
<div className="flex items-center gap-2 border-b p-2">
|
|
320
|
+
<ActionButton
|
|
321
|
+
onClick={fetchSchema}
|
|
322
|
+
disabled={showSchemaSpinner}
|
|
323
|
+
variant="outline"
|
|
324
|
+
className="text-sm"
|
|
325
|
+
>
|
|
326
|
+
📥 Fetch Schema
|
|
327
|
+
</ActionButton>
|
|
328
|
+
</div>
|
|
329
|
+
<div className="flex-1 overflow-auto p-2">
|
|
330
|
+
<div className="min-w-0 overflow-x-auto">
|
|
331
|
+
<ObjectInspector
|
|
332
|
+
data={schemaResult}
|
|
333
|
+
expandLevel={3}
|
|
334
|
+
/>
|
|
335
|
+
</div>
|
|
336
|
+
</div>
|
|
311
337
|
</div>
|
|
312
|
-
|
|
313
|
-
</div>
|
|
314
|
-
),
|
|
315
|
-
},
|
|
316
|
-
]}
|
|
317
|
-
activeTab={activeTab}
|
|
318
|
-
setActiveTab={setActiveTab}
|
|
319
|
-
/>
|
|
320
|
-
<div className="border-t border-gray-200 p-2">
|
|
321
|
-
<ActionButton
|
|
322
|
-
variant="outline"
|
|
323
|
-
className="text-xs"
|
|
324
|
-
onClick={() => {
|
|
325
|
-
editContext?.executeCommand?.({
|
|
326
|
-
command: createAgentCommand,
|
|
327
|
-
data: {
|
|
328
|
-
profileName: "GraphQL Assistant",
|
|
329
|
-
contextFactory: "graphql:context:v1",
|
|
330
|
-
initialPrompt:
|
|
331
|
-
"Help with the current GraphQL query and schema.",
|
|
332
|
-
additionalData: {
|
|
333
|
-
source: "GraphQLPanel",
|
|
334
|
-
},
|
|
338
|
+
),
|
|
335
339
|
},
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
340
|
+
]}
|
|
341
|
+
activeTab={activeTab}
|
|
342
|
+
setActiveTab={setActiveTab}
|
|
343
|
+
/>
|
|
344
|
+
<div className="border-t border-gray-200 p-2">
|
|
345
|
+
<ActionButton
|
|
346
|
+
variant="outline"
|
|
347
|
+
className="text-xs"
|
|
348
|
+
onClick={() => {
|
|
349
|
+
editContext?.executeCommand?.({
|
|
350
|
+
command: createAgentCommand,
|
|
351
|
+
data: {
|
|
352
|
+
profileName: "GraphQL Assistant",
|
|
353
|
+
contextFactory: "graphql:context:v1",
|
|
354
|
+
initialPrompt:
|
|
355
|
+
"Help with the current GraphQL query and schema.",
|
|
356
|
+
additionalData: {
|
|
357
|
+
source: "GraphQLPanel",
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
});
|
|
361
|
+
}}
|
|
362
|
+
>
|
|
363
|
+
Start GraphQL Agent
|
|
364
|
+
</ActionButton>
|
|
365
|
+
</div>
|
|
366
|
+
</div>
|
|
367
|
+
),
|
|
368
|
+
},
|
|
369
|
+
]}
|
|
370
|
+
/>
|
|
345
371
|
);
|
|
346
372
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
2
|
import { Button } from "../../components/ui/button";
|
|
3
3
|
import { Search } from "lucide-react";
|
|
4
|
-
import { Divider } from "primereact/divider";
|
|
5
4
|
import { useEditContext } from "../client/editContext";
|
|
6
5
|
import { toast } from "sonner";
|
|
7
6
|
|
|
@@ -203,7 +202,7 @@ Focus on actionable insights for improving search engine visibility.`;
|
|
|
203
202
|
Run SEO Analysis
|
|
204
203
|
</Button>
|
|
205
204
|
|
|
206
|
-
<
|
|
205
|
+
<div className="my-4 border-t border-gray-200" />
|
|
207
206
|
|
|
208
207
|
{/* SEO Information */}
|
|
209
208
|
<div className="space-y-3">
|
|
@@ -10,8 +10,9 @@ import {
|
|
|
10
10
|
import { useEffect, useState } from "react";
|
|
11
11
|
import { TranslationStatus } from "../../config/types";
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
import { Checkbox } from "
|
|
13
|
+
// Custom Progress component using Tailwind CSS
|
|
14
|
+
import { Checkbox } from "../../components/ui/checkbox";
|
|
15
|
+
import { Sparkles, Plus } from "lucide-react";
|
|
15
16
|
import { confirmCreateVersion } from "../utils/itemutils";
|
|
16
17
|
import { Select } from "../../components/ui/select";
|
|
17
18
|
|
|
@@ -216,7 +217,7 @@ export function Translation() {
|
|
|
216
217
|
}}
|
|
217
218
|
disabled={checkedLanguages.length === 0}
|
|
218
219
|
>
|
|
219
|
-
<
|
|
220
|
+
<Sparkles className="h-4 w-4" />
|
|
220
221
|
Translate
|
|
221
222
|
</Button>
|
|
222
223
|
)}
|
|
@@ -228,7 +229,7 @@ export function Translation() {
|
|
|
228
229
|
}}
|
|
229
230
|
disabled={checkedLanguages.length === 0}
|
|
230
231
|
>
|
|
231
|
-
<
|
|
232
|
+
<Plus className="h-4 w-4" />
|
|
232
233
|
Create Versions
|
|
233
234
|
</Button>
|
|
234
235
|
</div>
|
|
@@ -242,9 +243,9 @@ export function Translation() {
|
|
|
242
243
|
<div onClick={(e) => e.stopPropagation()}>
|
|
243
244
|
<Checkbox
|
|
244
245
|
checked={checkedLanguages.includes(x.languageCode)}
|
|
245
|
-
|
|
246
|
+
onCheckedChange={(checked) => {
|
|
246
247
|
setCheckedLanguages(
|
|
247
|
-
|
|
248
|
+
Boolean(checked)
|
|
248
249
|
? [...checkedLanguages, x.languageCode]
|
|
249
250
|
: checkedLanguages.filter(
|
|
250
251
|
(y) => y !== x.languageCode,
|
|
@@ -266,13 +267,14 @@ export function Translation() {
|
|
|
266
267
|
body: (x) => (
|
|
267
268
|
<div className="flex items-center gap-2">
|
|
268
269
|
{x.translationStatus?.status === "In Progress" && (
|
|
269
|
-
<div className="relative w-full">
|
|
270
|
-
<
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
<div className="relative h-5 w-full overflow-hidden rounded-full bg-gray-200">
|
|
271
|
+
<div
|
|
272
|
+
className="h-full bg-blue-500 transition-all duration-300 ease-in-out"
|
|
273
|
+
style={{
|
|
274
|
+
width: `${(x.translationProgress?.progress || 0) * 100}%`,
|
|
275
|
+
}}
|
|
274
276
|
/>
|
|
275
|
-
<div className="absolute inset-0 flex items-center justify-center text-white">
|
|
277
|
+
<div className="absolute inset-0 flex items-center justify-center text-sm font-medium text-white">
|
|
276
278
|
{x.translationProgress?.message}
|
|
277
279
|
</div>
|
|
278
280
|
</div>
|
|
@@ -114,7 +114,7 @@ export function ItemNameDialog(
|
|
|
114
114
|
<DialogTitle>{props?.title ?? "Name"}</DialogTitle>
|
|
115
115
|
</DialogHeader>
|
|
116
116
|
<div className="p-3">
|
|
117
|
-
<div className="
|
|
117
|
+
<div className="mb-2 text-sm">
|
|
118
118
|
{props.message || "Enter a name for the new item:"}
|
|
119
119
|
</div>
|
|
120
120
|
<Input
|
|
@@ -47,13 +47,15 @@ export const ItemSearch: React.FC<SearchProps> = ({
|
|
|
47
47
|
if (!editContext || disabled) return;
|
|
48
48
|
|
|
49
49
|
setLoading(true);
|
|
50
|
+
const trimmedPrompt = searchPrompt.trim();
|
|
50
51
|
const currentQuery = searchPrompt;
|
|
51
52
|
|
|
53
|
+
// Check for GUID pattern
|
|
52
54
|
const guidPattern =
|
|
53
55
|
/^\{?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\}?$/;
|
|
54
|
-
if (guidPattern.test(
|
|
56
|
+
if (guidPattern.test(trimmedPrompt)) {
|
|
55
57
|
const item = await editContext.itemsRepository.getItem({
|
|
56
|
-
id:
|
|
58
|
+
id: trimmedPrompt,
|
|
57
59
|
language: language || "en",
|
|
58
60
|
version: 0,
|
|
59
61
|
});
|
|
@@ -78,12 +80,17 @@ export const ItemSearch: React.FC<SearchProps> = ({
|
|
|
78
80
|
return;
|
|
79
81
|
}
|
|
80
82
|
|
|
83
|
+
// Check for item path pattern (starts with /)
|
|
84
|
+
const isPath = trimmedPrompt.startsWith("/");
|
|
85
|
+
|
|
86
|
+
// If it looks like a path, search with skipValidation to allow exact path matching
|
|
81
87
|
const result = await executeSearch({
|
|
82
88
|
index: "master",
|
|
83
|
-
query:
|
|
89
|
+
query: trimmedPrompt,
|
|
84
90
|
editContext,
|
|
85
91
|
rootItemIds,
|
|
86
|
-
maxResults: 15,
|
|
92
|
+
maxResults: isPath ? 15 : 15,
|
|
93
|
+
skipValidation: isPath,
|
|
87
94
|
});
|
|
88
95
|
|
|
89
96
|
if (query === currentQuery) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Input } from "../../components/ui/input";
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { WizardData } from "../PageWizard";
|
|
4
4
|
|
|
@@ -236,7 +236,7 @@ export function CollectStep({
|
|
|
236
236
|
defaultCollapsed="mobileOnly"
|
|
237
237
|
>
|
|
238
238
|
<div className="flex flex-col gap-2">
|
|
239
|
-
<
|
|
239
|
+
<Input
|
|
240
240
|
type="text"
|
|
241
241
|
className="rounded-md border border-gray-300 px-3 py-2"
|
|
242
242
|
onChange={(e) => setScrapeUrl(e.target.value)}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { useState, useEffect } from "react";
|
|
2
|
+
import { Editor, EditorTextChangeEvent } from "primereact/editor";
|
|
2
3
|
|
|
3
4
|
import { WizardField } from "../PageWizard";
|
|
4
5
|
import { TextField } from "../../editor/fieldTypes";
|
|
5
6
|
|
|
6
|
-
import { Editor } from "primereact/editor";
|
|
7
|
-
|
|
8
7
|
export function FieldEditor({
|
|
9
8
|
field,
|
|
10
9
|
onFieldEdited,
|
|
@@ -24,13 +23,10 @@ export function FieldEditor({
|
|
|
24
23
|
|
|
25
24
|
if (!isEditing) {
|
|
26
25
|
return (
|
|
27
|
-
<div
|
|
28
|
-
onClick={() => setIsEditing(true)}
|
|
29
|
-
className="cursor-pointer mb-2"
|
|
30
|
-
>
|
|
26
|
+
<div onClick={() => setIsEditing(true)} className="mb-2 cursor-pointer">
|
|
31
27
|
<div className="font-bold text-gray-900">{field.name}:</div>
|
|
32
28
|
<div
|
|
33
|
-
className="text-gray-700 [&
|
|
29
|
+
className="text-gray-700 [&_li]:my-1 [&_p]:my-1 [&_ul]:list-disc [&_ul]:pl-5"
|
|
34
30
|
dangerouslySetInnerHTML={{ __html: field.value }}
|
|
35
31
|
></div>
|
|
36
32
|
{/* <SimpleIconButton
|
|
@@ -56,24 +52,26 @@ export function FieldEditor({
|
|
|
56
52
|
};
|
|
57
53
|
|
|
58
54
|
return (
|
|
59
|
-
<div className="fixed inset-0
|
|
60
|
-
<div className="
|
|
61
|
-
<h3 className="text-lg font-medium text-gray-900
|
|
55
|
+
<div className="bg-opacity-50 fixed inset-0 z-1000 flex items-center justify-center bg-black">
|
|
56
|
+
<div className="w-full max-w-lg rounded-lg bg-white p-6 shadow-xl">
|
|
57
|
+
<h3 className="mb-4 text-lg font-medium text-gray-900">
|
|
62
58
|
Edit {field.name || "Field"}
|
|
63
59
|
</h3>
|
|
64
60
|
|
|
65
61
|
{isRichText ? (
|
|
66
62
|
<div className="mb-4">
|
|
67
63
|
<Editor
|
|
68
|
-
className="w-full
|
|
64
|
+
className="h-64 w-full rounded-md border border-gray-300 p-2"
|
|
69
65
|
value={fieldValue}
|
|
70
|
-
onTextChange={(e) =>
|
|
66
|
+
onTextChange={(e: EditorTextChangeEvent) =>
|
|
67
|
+
setFieldValue(e.htmlValue || "")
|
|
68
|
+
}
|
|
71
69
|
/>
|
|
72
70
|
</div>
|
|
73
71
|
) : (
|
|
74
72
|
<div className="mb-4">
|
|
75
73
|
<textarea
|
|
76
|
-
className="w-full
|
|
74
|
+
className="w-full rounded-md border border-gray-300 p-2"
|
|
77
75
|
value={fieldValue}
|
|
78
76
|
onChange={(e) => setFieldValue(e.target.value)}
|
|
79
77
|
/>
|
|
@@ -84,14 +82,14 @@ export function FieldEditor({
|
|
|
84
82
|
<button
|
|
85
83
|
type="button"
|
|
86
84
|
onClick={handleCancel}
|
|
87
|
-
className="inline-flex items-center
|
|
85
|
+
className="inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:outline-none"
|
|
88
86
|
>
|
|
89
87
|
Cancel
|
|
90
88
|
</button>
|
|
91
89
|
<button
|
|
92
90
|
type="button"
|
|
93
91
|
onClick={handleSave}
|
|
94
|
-
className="inline-flex items-center
|
|
92
|
+
className="inline-flex items-center rounded-md border border-transparent bg-blue-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-blue-700 focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:outline-none"
|
|
95
93
|
>
|
|
96
94
|
Save
|
|
97
95
|
</button>
|
package/src/revision.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = "1.0.
|
|
2
|
-
export const buildDate = "2025-10-
|
|
1
|
+
export const version = "1.0.4140";
|
|
2
|
+
export const buildDate = "2025-10-06 11:12:09";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
executeCreateItem,
|
|
10
10
|
loadInsertOptions,
|
|
11
11
|
} from "../editor/services/editService";
|
|
12
|
-
import {
|
|
12
|
+
import { Input } from "../components/ui/input";
|
|
13
13
|
import { getAbsoluteIconUrl, getItemDescriptor } from "../editor/utils";
|
|
14
14
|
import { cn } from "../lib/utils";
|
|
15
15
|
import { useEditContext } from "../client-components";
|
|
@@ -282,7 +282,7 @@ export function NewPage({ selectedItemId }: { selectedItemId?: string }) {
|
|
|
282
282
|
description="Enter a name for your new page"
|
|
283
283
|
>
|
|
284
284
|
<div>
|
|
285
|
-
<
|
|
285
|
+
<Input
|
|
286
286
|
className="w-full rounded p-1.5 text-xs"
|
|
287
287
|
value={name}
|
|
288
288
|
id="new-page-name"
|
|
@@ -68,7 +68,7 @@ export function RecentPages() {
|
|
|
68
68
|
onClick={() => handlePageLoad(page)}
|
|
69
69
|
className="cursor-pointer border-b border-gray-100 hover:bg-gray-50"
|
|
70
70
|
>
|
|
71
|
-
<td className="py-3">
|
|
71
|
+
<td className="px-1.5 py-3">
|
|
72
72
|
<div className="flex items-center gap-2">
|
|
73
73
|
{/* {page.icon && (
|
|
74
74
|
<img
|