@alpaca-editor/core 1.0.4114 → 1.0.4120
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/components/FilterInput.js +3 -7
- package/dist/components/FilterInput.js.map +1 -1
- package/dist/components/ui/input.js +3 -1
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/textarea.js +3 -1
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/config/config.js +1 -1
- package/dist/editor/AspectRatioSelector.js +3 -3
- package/dist/editor/AspectRatioSelector.js.map +1 -1
- package/dist/editor/ContentTree.js +52 -4
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/ContextMenu.d.ts +2 -0
- package/dist/editor/ContextMenu.js +9 -7
- package/dist/editor/ContextMenu.js.map +1 -1
- package/dist/editor/EditorWarning.js +2 -2
- package/dist/editor/EditorWarning.js.map +1 -1
- package/dist/editor/FieldEditorPopup.js +7 -6
- package/dist/editor/FieldEditorPopup.js.map +1 -1
- package/dist/editor/FieldHistory.js +2 -1
- package/dist/editor/FieldHistory.js.map +1 -1
- package/dist/editor/FieldListField.js +1 -1
- package/dist/editor/LinkEditorDialog.d.ts +3 -1
- package/dist/editor/LinkEditorDialog.js +7 -3
- package/dist/editor/LinkEditorDialog.js.map +1 -1
- package/dist/editor/MainLayout.js +3 -3
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/PictureCropper.js +3 -3
- package/dist/editor/PictureCropper.js.map +1 -1
- package/dist/editor/PictureEditor.d.ts +2 -1
- package/dist/editor/PictureEditor.js +2 -2
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/PictureEditorDialog.js +55 -50
- package/dist/editor/PictureEditorDialog.js.map +1 -1
- package/dist/editor/Terminal.js +4 -4
- package/dist/editor/Terminal.js.map +1 -1
- package/dist/editor/ai/AgentTerminal.js +298 -53
- package/dist/editor/ai/AgentTerminal.js.map +1 -1
- package/dist/editor/ai/Agents.js +2 -2
- package/dist/editor/ai/Agents.js.map +1 -1
- package/dist/editor/ai/ContextInfoBar.js +2 -2
- package/dist/editor/ai/ContextInfoBar.js.map +1 -1
- package/dist/editor/client/EditorShell.js +3 -0
- package/dist/editor/client/EditorShell.js.map +1 -1
- package/dist/editor/client/GenericDialog.js +3 -3
- package/dist/editor/client/GenericDialog.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +2 -1
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/ui/EditorChrome.js +8 -2
- package/dist/editor/client/ui/EditorChrome.js.map +1 -1
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js +9 -7
- package/dist/editor/commands/localizeItem/LocalizeItemDialog.js.map +1 -1
- package/dist/editor/context-menu/CopyMoveMenu.js +3 -3
- package/dist/editor/context-menu/CopyMoveMenu.js.map +1 -1
- package/dist/editor/control-center/IndexOverview.js +39 -17
- package/dist/editor/control-center/IndexOverview.js.map +1 -1
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.js +9 -6
- package/dist/editor/control-center/setup-steps/SettingsSetupStep.js.map +1 -1
- package/dist/editor/field-types/CheckboxEditor.js +2 -2
- package/dist/editor/field-types/CheckboxEditor.js.map +1 -1
- package/dist/editor/field-types/DateFieldEditor.js +2 -2
- package/dist/editor/field-types/DateFieldEditor.js.map +1 -1
- package/dist/editor/field-types/DateTimeFieldEditor.js.map +1 -1
- package/dist/editor/field-types/ImageFieldEditor.js +2 -2
- package/dist/editor/field-types/ImageFieldEditor.js.map +1 -1
- package/dist/editor/field-types/InternalLinkFieldEditor.js +2 -2
- package/dist/editor/field-types/InternalLinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/LinkFieldEditor.js +8 -3
- package/dist/editor/field-types/LinkFieldEditor.js.map +1 -1
- package/dist/editor/field-types/MultiLineText.js +2 -2
- package/dist/editor/field-types/MultiLineText.js.map +1 -1
- package/dist/editor/field-types/PictureFieldEditor.js +3 -2
- package/dist/editor/field-types/PictureFieldEditor.js.map +1 -1
- package/dist/editor/field-types/RawEditor.js +2 -2
- package/dist/editor/field-types/RawEditor.js.map +1 -1
- package/dist/editor/field-types/SingleLineText.js +2 -2
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/field-types/richtext/components/ReactSlate.js +2 -2
- package/dist/editor/field-types/richtext/components/ReactSlate.js.map +1 -1
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js +2 -2
- package/dist/editor/field-types/richtext/components/SimpleRichTextEditor.js.map +1 -1
- package/dist/editor/fieldTypes.d.ts +1 -0
- package/dist/editor/media-selector/AiImageSearch.js +5 -4
- package/dist/editor/media-selector/AiImageSearch.js.map +1 -1
- package/dist/editor/media-selector/MediaFolderBrowser.js +8 -8
- package/dist/editor/media-selector/MediaFolderBrowser.js.map +1 -1
- package/dist/editor/media-selector/Thumbnails.js +2 -2
- package/dist/editor/media-selector/Thumbnails.js.map +1 -1
- package/dist/editor/media-selector/TreeSelector.js +2 -2
- package/dist/editor/media-selector/TreeSelector.js.map +1 -1
- package/dist/editor/media-selector/UploadZone.js +2 -2
- package/dist/editor/media-selector/UploadZone.js.map +1 -1
- package/dist/editor/menubar/NavButtons.js +3 -5
- package/dist/editor/menubar/NavButtons.js.map +1 -1
- package/dist/editor/menubar/Separator.js +2 -2
- package/dist/editor/menubar/Separator.js.map +1 -1
- package/dist/editor/menubar/SiteInfo.js +9 -9
- package/dist/editor/menubar/SiteInfo.js.map +1 -1
- package/dist/editor/page-editor-chrome/CommentHighlighting.js +2 -2
- package/dist/editor/page-editor-chrome/CommentHighlighting.js.map +1 -1
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js +2 -2
- package/dist/editor/page-editor-chrome/FieldActionIndicator.js.map +1 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js +6 -1
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js +34 -1
- package/dist/editor/page-editor-chrome/PictureEditorOverlay.js.map +1 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js +6 -1
- package/dist/editor/page-editor-chrome/PlaceholderDropZone.js.map +1 -1
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.js +2 -2
- package/dist/editor/page-editor-chrome/SuggestionHighlighting.js.map +1 -1
- package/dist/editor/page-viewer/DeviceToolbar.js +3 -3
- package/dist/editor/page-viewer/DeviceToolbar.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +20 -4
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/reviews/Reviews.js +55 -54
- package/dist/editor/reviews/Reviews.js.map +1 -1
- package/dist/editor/services/agentService.d.ts +4 -3
- package/dist/editor/services/agentService.js.map +1 -1
- package/dist/editor/services/aiService.js +5 -5
- package/dist/editor/services/aiService.js.map +1 -1
- package/dist/editor/sidebar/ComponentPalette.js +3 -3
- package/dist/editor/sidebar/ComponentPalette.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +14 -10
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/DictionaryEditor.js +9 -9
- package/dist/editor/sidebar/DictionaryEditor.js.map +1 -1
- package/dist/editor/sidebar/EditHistory.js +4 -3
- package/dist/editor/sidebar/EditHistory.js.map +1 -1
- package/dist/editor/sidebar/SEOInfo.js +3 -2
- package/dist/editor/sidebar/SEOInfo.js.map +1 -1
- package/dist/editor/sidebar/SidebarView.js +5 -6
- package/dist/editor/sidebar/SidebarView.js.map +1 -1
- package/dist/editor/sidebar/Translations.js +5 -2
- package/dist/editor/sidebar/Translations.js.map +1 -1
- package/dist/editor/sidebar/Validation.js +2 -2
- package/dist/editor/sidebar/Validation.js.map +1 -1
- package/dist/editor/sidebar/ViewSelector.js +22 -5
- package/dist/editor/sidebar/ViewSelector.js.map +1 -1
- package/dist/editor/sidebar/Workbox.js +14 -13
- package/dist/editor/sidebar/Workbox.js.map +1 -1
- package/dist/editor/ui/DragPreview.d.ts +3 -2
- package/dist/editor/ui/DragPreview.js +4 -6
- package/dist/editor/ui/DragPreview.js.map +1 -1
- package/dist/editor/ui/ItemNameDialogNew.js +2 -2
- package/dist/editor/ui/ItemNameDialogNew.js.map +1 -1
- package/dist/editor/ui/PerfectTree.d.ts +4 -2
- package/dist/editor/ui/PerfectTree.js +6 -6
- package/dist/editor/ui/PerfectTree.js.map +1 -1
- package/dist/editor/ui/Section.js +3 -3
- package/dist/editor/ui/Section.js.map +1 -1
- package/dist/editor/ui/SimpleTable.js +3 -3
- package/dist/editor/ui/SimpleTable.js.map +1 -1
- package/dist/editor/ui/Splitter.js +8 -5
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/editor/views/ItemEditor.js +1 -1
- package/dist/editor/views/ItemEditor.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/page-wizard/WizardSteps.js +2 -3
- package/dist/page-wizard/WizardSteps.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/ContentStep.js +3 -4
- package/dist/page-wizard/steps/ContentStep.js.map +1 -1
- package/dist/page-wizard/steps/Generate.js +2 -2
- package/dist/page-wizard/steps/Generate.js.map +1 -1
- package/dist/page-wizard/steps/ImagesStep.js +17 -15
- package/dist/page-wizard/steps/ImagesStep.js.map +1 -1
- package/dist/page-wizard/steps/MetaDataStep.js +2 -2
- package/dist/page-wizard/steps/MetaDataStep.js.map +1 -1
- package/dist/page-wizard/steps/SelectStep.js +5 -5
- package/dist/page-wizard/steps/SelectStep.js.map +1 -1
- package/dist/page-wizard/steps/StructureStep.js +3 -3
- package/dist/page-wizard/steps/StructureStep.js.map +1 -1
- package/dist/page-wizard/steps/TranslateStep.js +2 -2
- package/dist/page-wizard/steps/TranslateStep.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/SectionHeadline.js +2 -2
- package/dist/splash-screen/SectionHeadline.js.map +1 -1
- package/dist/styles.css +52 -26
- package/package.json +1 -1
- package/src/components/FilterInput.tsx +13 -16
- package/src/components/ui/input.tsx +3 -2
- package/src/components/ui/textarea.tsx +3 -1
- package/src/config/config.tsx +1 -1
- package/src/editor/AspectRatioSelector.tsx +3 -3
- package/src/editor/ContentTree.tsx +51 -2
- package/src/editor/ContextMenu.tsx +30 -8
- package/src/editor/EditorWarning.tsx +6 -6
- package/src/editor/FieldEditorPopup.tsx +36 -26
- package/src/editor/FieldHistory.tsx +2 -1
- package/src/editor/FieldListField.tsx +2 -2
- package/src/editor/LinkEditorDialog.tsx +20 -0
- package/src/editor/MainLayout.tsx +3 -3
- package/src/editor/PictureCropper.tsx +3 -3
- package/src/editor/PictureEditor.tsx +3 -0
- package/src/editor/PictureEditorDialog.tsx +167 -145
- package/src/editor/Terminal.tsx +5 -6
- package/src/editor/ai/AgentTerminal.tsx +410 -87
- package/src/editor/ai/Agents.tsx +2 -2
- package/src/editor/ai/ContextInfoBar.tsx +15 -7
- package/src/editor/client/EditorShell.tsx +3 -0
- package/src/editor/client/GenericDialog.tsx +13 -9
- package/src/editor/client/editContext.ts +2 -1
- package/src/editor/client/ui/EditorChrome.tsx +8 -4
- package/src/editor/commands/localizeItem/LocalizeItemDialog.tsx +30 -11
- package/src/editor/context-menu/CopyMoveMenu.tsx +5 -3
- package/src/editor/control-center/IndexOverview.tsx +63 -34
- package/src/editor/control-center/setup-steps/SettingsSetupStep.tsx +11 -6
- package/src/editor/field-types/CheckboxEditor.tsx +2 -2
- package/src/editor/field-types/DateFieldEditor.tsx +2 -2
- package/src/editor/field-types/DateTimeFieldEditor.tsx +0 -1
- package/src/editor/field-types/ImageFieldEditor.tsx +3 -4
- package/src/editor/field-types/InternalLinkFieldEditor.tsx +2 -2
- package/src/editor/field-types/LinkFieldEditor.tsx +8 -2
- package/src/editor/field-types/MultiLineText.tsx +4 -5
- package/src/editor/field-types/PictureFieldEditor.tsx +5 -5
- package/src/editor/field-types/RawEditor.tsx +4 -5
- package/src/editor/field-types/SingleLineText.tsx +4 -6
- package/src/editor/field-types/richtext/components/ReactSlate.tsx +2 -2
- package/src/editor/field-types/richtext/components/SimpleRichTextEditor.tsx +2 -2
- package/src/editor/fieldTypes.ts +1 -0
- package/src/editor/media-selector/AiImageSearch.tsx +11 -14
- package/src/editor/media-selector/MediaFolderBrowser.tsx +42 -35
- package/src/editor/media-selector/Thumbnails.tsx +3 -3
- package/src/editor/media-selector/TreeSelector.tsx +2 -2
- package/src/editor/media-selector/UploadZone.tsx +2 -2
- package/src/editor/menubar/NavButtons.tsx +12 -14
- package/src/editor/menubar/Separator.tsx +2 -2
- package/src/editor/menubar/SiteInfo.tsx +29 -23
- package/src/editor/page-editor-chrome/CommentHighlighting.tsx +2 -2
- package/src/editor/page-editor-chrome/FieldActionIndicator.tsx +2 -2
- package/src/editor/page-editor-chrome/FrameMenu.tsx +6 -1
- package/src/editor/page-editor-chrome/PictureEditorOverlay.tsx +46 -0
- package/src/editor/page-editor-chrome/PlaceholderDropZone.tsx +6 -1
- package/src/editor/page-editor-chrome/SuggestionHighlighting.tsx +2 -2
- package/src/editor/page-viewer/DeviceToolbar.tsx +4 -3
- package/src/editor/page-viewer/PageViewerFrame.tsx +19 -3
- package/src/editor/reviews/Reviews.tsx +116 -106
- package/src/editor/services/agentService.ts +8 -3
- package/src/editor/services/aiService.ts +5 -5
- package/src/editor/sidebar/ComponentPalette.tsx +3 -3
- package/src/editor/sidebar/ComponentTree.tsx +19 -10
- package/src/editor/sidebar/DictionaryEditor.tsx +12 -13
- package/src/editor/sidebar/EditHistory.tsx +4 -3
- package/src/editor/sidebar/SEOInfo.tsx +9 -7
- package/src/editor/sidebar/SidebarView.tsx +8 -6
- package/src/editor/sidebar/Translations.tsx +9 -5
- package/src/editor/sidebar/Validation.tsx +2 -2
- package/src/editor/sidebar/ViewSelector.tsx +32 -6
- package/src/editor/sidebar/Workbox.tsx +81 -63
- package/src/editor/ui/DragPreview.tsx +10 -5
- package/src/editor/ui/ItemNameDialogNew.tsx +2 -2
- package/src/editor/ui/PerfectTree.tsx +14 -6
- package/src/editor/ui/Section.tsx +4 -4
- package/src/editor/ui/SimpleTable.tsx +3 -3
- package/src/editor/ui/Splitter.tsx +11 -5
- package/src/editor/views/ItemEditor.tsx +1 -1
- package/src/index.ts +6 -0
- package/src/page-wizard/WizardSteps.tsx +2 -3
- package/src/page-wizard/steps/CollectStep.tsx +3 -3
- package/src/page-wizard/steps/ContentStep.tsx +4 -5
- package/src/page-wizard/steps/Generate.tsx +2 -2
- package/src/page-wizard/steps/ImagesStep.tsx +43 -24
- package/src/page-wizard/steps/MetaDataStep.tsx +5 -5
- package/src/page-wizard/steps/SelectStep.tsx +8 -6
- package/src/page-wizard/steps/StructureStep.tsx +9 -8
- package/src/page-wizard/steps/TranslateStep.tsx +5 -3
- package/src/revision.ts +2 -2
- package/src/splash-screen/NewPage.tsx +2 -2
- package/src/splash-screen/SectionHeadline.tsx +4 -4
- package/dist/editor/component-designer/ComponentDesigner.d.ts +0 -1
- package/dist/editor/component-designer/ComponentDesigner.js +0 -51
- package/dist/editor/component-designer/ComponentDesigner.js.map +0 -1
- package/dist/editor/component-designer/ComponentDesignerMenu.d.ts +0 -1
- package/dist/editor/component-designer/ComponentDesignerMenu.js +0 -65
- package/dist/editor/component-designer/ComponentDesignerMenu.js.map +0 -1
- package/dist/editor/component-designer/ComponentEditor.d.ts +0 -4
- package/dist/editor/component-designer/ComponentEditor.js +0 -55
- package/dist/editor/component-designer/ComponentEditor.js.map +0 -1
- package/dist/editor/component-designer/ComponentRenderingCodeEditor.d.ts +0 -5
- package/dist/editor/component-designer/ComponentRenderingCodeEditor.js +0 -11
- package/dist/editor/component-designer/ComponentRenderingCodeEditor.js.map +0 -1
- package/dist/editor/component-designer/ComponentRenderingEditor.d.ts +0 -1
- package/dist/editor/component-designer/ComponentRenderingEditor.js +0 -69
- package/dist/editor/component-designer/ComponentRenderingEditor.js.map +0 -1
- package/dist/editor/component-designer/ComponentsDropdown.d.ts +0 -4
- package/dist/editor/component-designer/ComponentsDropdown.js +0 -20
- package/dist/editor/component-designer/ComponentsDropdown.js.map +0 -1
- package/dist/editor/component-designer/PlaceholdersEditor.d.ts +0 -4
- package/dist/editor/component-designer/PlaceholdersEditor.js +0 -63
- package/dist/editor/component-designer/PlaceholdersEditor.js.map +0 -1
- package/dist/editor/component-designer/RenderingsDropdown.d.ts +0 -1
- package/dist/editor/component-designer/RenderingsDropdown.js +0 -23
- package/dist/editor/component-designer/RenderingsDropdown.js.map +0 -1
- package/dist/editor/component-designer/TemplateEditor.d.ts +0 -1
- package/dist/editor/component-designer/TemplateEditor.js +0 -142
- package/dist/editor/component-designer/TemplateEditor.js.map +0 -1
- package/dist/editor/component-designer/aiContext.d.ts +0 -5
- package/dist/editor/component-designer/aiContext.js +0 -14
- package/dist/editor/component-designer/aiContext.js.map +0 -1
- package/src/editor/component-designer/ComponentDesigner.tsx +0 -66
- package/src/editor/component-designer/ComponentDesignerMenu.tsx +0 -91
- package/src/editor/component-designer/ComponentEditor.tsx +0 -95
- package/src/editor/component-designer/ComponentRenderingCodeEditor.tsx +0 -31
- package/src/editor/component-designer/ComponentRenderingEditor.tsx +0 -104
- package/src/editor/component-designer/ComponentsDropdown.tsx +0 -39
- package/src/editor/component-designer/PlaceholdersEditor.tsx +0 -179
- package/src/editor/component-designer/RenderingsDropdown.tsx +0 -36
- package/src/editor/component-designer/TemplateEditor.tsx +0 -236
- package/src/editor/component-designer/aiContext.ts +0 -21
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useState } from "react";
|
|
2
|
-
import { Button } from "
|
|
2
|
+
import { Button } from "../../components/ui/button";
|
|
3
|
+
import { Search } from "lucide-react";
|
|
3
4
|
import { Divider } from "primereact/divider";
|
|
4
5
|
import { useEditContext } from "../client/editContext";
|
|
5
6
|
import { toast } from "sonner";
|
|
@@ -193,13 +194,14 @@ Focus on actionable insights for improving search engine visibility.`;
|
|
|
193
194
|
<div className="space-y-4 p-4">
|
|
194
195
|
{/* Analysis Button */}
|
|
195
196
|
<Button
|
|
196
|
-
|
|
197
|
-
icon="pi pi-search"
|
|
197
|
+
size="sm"
|
|
198
198
|
onClick={runSEOAnalysis}
|
|
199
|
-
|
|
200
|
-
className="w-full"
|
|
201
|
-
|
|
202
|
-
|
|
199
|
+
disabled={isAnalyzing}
|
|
200
|
+
className="w-full bg-green-600 text-white hover:bg-green-700"
|
|
201
|
+
>
|
|
202
|
+
<Search className="mr-2 h-4 w-4" />
|
|
203
|
+
Run SEO Analysis
|
|
204
|
+
</Button>
|
|
203
205
|
|
|
204
206
|
<Divider />
|
|
205
207
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { EditContextType } from "../client/editContext";
|
|
2
|
-
import {
|
|
2
|
+
import { cn } from "../../lib/utils";
|
|
3
3
|
import { Sidebar } from "../../config/types";
|
|
4
4
|
import { Splitter, SplitterPanel } from "../ui/Splitter";
|
|
5
|
-
import { cn } from "../../lib/utils";
|
|
6
5
|
import { SimpleIconButton } from "../ui/SimpleIconButton";
|
|
7
6
|
import { X } from "lucide-react";
|
|
8
7
|
|
|
@@ -35,7 +34,7 @@ export function SidebarView({
|
|
|
35
34
|
<div className="border-gray-3 relative flex items-center border-b p-2 text-xs text-gray-500 uppercase">
|
|
36
35
|
{panel.icon &&
|
|
37
36
|
(typeof panel.icon === "string" ? (
|
|
38
|
-
<i className={
|
|
37
|
+
<i className={cn(panel.icon, "pi mr-1.5")}></i>
|
|
39
38
|
) : (
|
|
40
39
|
<div className="mr-2">{panel.icon}</div>
|
|
41
40
|
))}
|
|
@@ -77,7 +76,7 @@ export function SidebarView({
|
|
|
77
76
|
{getHeader(panel, 0)}
|
|
78
77
|
<div className="relative flex-1 overflow-hidden">
|
|
79
78
|
<div
|
|
80
|
-
className={
|
|
79
|
+
className={cn(
|
|
81
80
|
"absolute inset-0",
|
|
82
81
|
panel.noOverflow ? "" : "overflow-y-auto",
|
|
83
82
|
)}
|
|
@@ -102,7 +101,7 @@ export function SidebarView({
|
|
|
102
101
|
{getHeader(panel, index)}
|
|
103
102
|
<div className="relative flex-1 overflow-hidden">
|
|
104
103
|
<div
|
|
105
|
-
className={
|
|
104
|
+
className={cn(
|
|
106
105
|
"absolute inset-0",
|
|
107
106
|
panel.noOverflow ? "" : "overflow-y-auto",
|
|
108
107
|
)}
|
|
@@ -123,7 +122,10 @@ export function SidebarView({
|
|
|
123
122
|
localStorageKey={`sidebar-${editContext.viewName}-${splitterPanels
|
|
124
123
|
.map((p) => p.name)
|
|
125
124
|
.join("-")}`}
|
|
126
|
-
className={cn(
|
|
125
|
+
className={cn(
|
|
126
|
+
detached ? "p-2" : "border-gray-3 border-r",
|
|
127
|
+
!active ? "hidden" : "",
|
|
128
|
+
)}
|
|
127
129
|
/>
|
|
128
130
|
);
|
|
129
131
|
}
|
|
@@ -13,7 +13,7 @@ import { TranslationStatus } from "../../config/types";
|
|
|
13
13
|
import { ProgressBar } from "primereact/progressbar";
|
|
14
14
|
import { Checkbox } from "primereact/checkbox";
|
|
15
15
|
import { confirmCreateVersion } from "../utils/itemutils";
|
|
16
|
-
import {
|
|
16
|
+
import { Select } from "../../components/ui/select";
|
|
17
17
|
|
|
18
18
|
export function Translation() {
|
|
19
19
|
const editContext = useEditContext();
|
|
@@ -182,10 +182,14 @@ export function Translation() {
|
|
|
182
182
|
return (
|
|
183
183
|
<div className="flex h-full flex-col gap-2">
|
|
184
184
|
<div className="flex w-full flex-wrap items-center justify-end gap-2 bg-gray-50 p-3">
|
|
185
|
-
<
|
|
186
|
-
options={translationProviders || []
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
<Select
|
|
186
|
+
options={(translationProviders || []).map((provider) => ({
|
|
187
|
+
value: provider,
|
|
188
|
+
label: provider,
|
|
189
|
+
}))}
|
|
190
|
+
onValueChange={(value) => setTranslationProvider(value)}
|
|
191
|
+
value={translationProvider || undefined}
|
|
192
|
+
placeholder="Select translation provider"
|
|
189
193
|
/>
|
|
190
194
|
{item && (
|
|
191
195
|
<Button
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Loader2 } from "lucide-react";
|
|
2
2
|
import { SingleValidatorResult } from "../../types";
|
|
3
3
|
import { useEditContext, useFieldsEditContext } from "../client/editContext";
|
|
4
4
|
import { SimpleTable } from "../ui/SimpleTable";
|
|
@@ -66,7 +66,7 @@ export function Validation() {
|
|
|
66
66
|
<div>
|
|
67
67
|
{editContext?.validating && (
|
|
68
68
|
<div className="p-3 text-center">
|
|
69
|
-
<
|
|
69
|
+
<Loader2 className="h-5 w-5 animate-spin" />
|
|
70
70
|
</div>
|
|
71
71
|
)}
|
|
72
72
|
{!editContext?.validating && (
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
|
|
1
|
+
import React, {
|
|
2
|
+
useState,
|
|
3
|
+
useMemo,
|
|
4
|
+
useCallback,
|
|
5
|
+
useRef,
|
|
6
|
+
useEffect,
|
|
7
|
+
} from "react";
|
|
8
|
+
import { cn } from "../../lib/utils";
|
|
3
9
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4
|
-
|
|
5
10
|
import { useEditContext } from "../client/editContext";
|
|
6
|
-
import { cn } from "../../lib/utils";
|
|
7
11
|
import { VerticalDotsIcon, ViewToggleIcon } from "../ui/Icons";
|
|
8
12
|
import {
|
|
9
13
|
Popover,
|
|
@@ -59,6 +63,17 @@ function ViewSelectorComponent() {
|
|
|
59
63
|
|
|
60
64
|
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
|
61
65
|
const [isDragging, setIsDragging] = useState(false);
|
|
66
|
+
const [disableMoreViewsTooltip, setDisableMoreViewsTooltip] = useState(false);
|
|
67
|
+
const tooltipReenableTimer = useRef<number | null>(null);
|
|
68
|
+
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
return () => {
|
|
71
|
+
if (tooltipReenableTimer.current) {
|
|
72
|
+
window.clearTimeout(tooltipReenableTimer.current);
|
|
73
|
+
tooltipReenableTimer.current = null;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}, []);
|
|
62
77
|
|
|
63
78
|
const views = useMemo(() => {
|
|
64
79
|
return (
|
|
@@ -138,6 +153,14 @@ function ViewSelectorComponent() {
|
|
|
138
153
|
const handleViewClickAndClosePopover = useCallback(
|
|
139
154
|
(viewName: string) => {
|
|
140
155
|
contextValues.switchView?.(viewName);
|
|
156
|
+
if (tooltipReenableTimer.current) {
|
|
157
|
+
window.clearTimeout(tooltipReenableTimer.current);
|
|
158
|
+
}
|
|
159
|
+
setDisableMoreViewsTooltip(true);
|
|
160
|
+
tooltipReenableTimer.current = window.setTimeout(() => {
|
|
161
|
+
setDisableMoreViewsTooltip(false);
|
|
162
|
+
tooltipReenableTimer.current = null;
|
|
163
|
+
}, 800);
|
|
141
164
|
setIsPopoverOpen(false);
|
|
142
165
|
},
|
|
143
166
|
[contextValues.switchView],
|
|
@@ -229,7 +252,7 @@ function ViewSelectorComponent() {
|
|
|
229
252
|
<ContextMenuTrigger asChild>
|
|
230
253
|
<TooltipTrigger asChild>
|
|
231
254
|
<div
|
|
232
|
-
className={
|
|
255
|
+
className={cn(
|
|
233
256
|
contextValues.viewName === view.name
|
|
234
257
|
? "active bg-theme-secondary-light text-theme-secondary rounded-sm"
|
|
235
258
|
: "text-dark hover:bg-gray-5",
|
|
@@ -282,7 +305,10 @@ function ViewSelectorComponent() {
|
|
|
282
305
|
{views.length > 0 && (
|
|
283
306
|
<Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen}>
|
|
284
307
|
{!isPopoverOpen ? (
|
|
285
|
-
<Tooltip
|
|
308
|
+
<Tooltip
|
|
309
|
+
delayDuration={disableMoreViewsTooltip ? 100000 : 500}
|
|
310
|
+
open={disableMoreViewsTooltip ? false : undefined}
|
|
311
|
+
>
|
|
286
312
|
<TooltipTrigger asChild>
|
|
287
313
|
<PopoverTrigger asChild>
|
|
288
314
|
<Button
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import { useEditContext } from "../client/editContext";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Tooltip,
|
|
4
|
+
TooltipContent,
|
|
5
|
+
TooltipTrigger,
|
|
6
|
+
} from "../../components/ui/tooltip";
|
|
7
|
+
import { Button } from "../../components/ui/button";
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
Popover,
|
|
12
|
+
PopoverContent,
|
|
13
|
+
PopoverTrigger,
|
|
14
|
+
} from "../../components/ui/popover";
|
|
15
|
+
import { cn } from "../../lib/utils";
|
|
16
|
+
import { Check } from "lucide-react";
|
|
8
17
|
|
|
9
18
|
import { SimpleTable } from "../ui/SimpleTable";
|
|
10
19
|
import { WorkboxItem } from "../../types";
|
|
@@ -12,6 +21,7 @@ import { WorkboxItem } from "../../types";
|
|
|
12
21
|
export function Workbox() {
|
|
13
22
|
const [validationOverlayItem, setValidationOverlayItem] =
|
|
14
23
|
useState<WorkboxItem>();
|
|
24
|
+
const [isValidationOpen, setIsValidationOpen] = useState(false);
|
|
15
25
|
|
|
16
26
|
const editContext = useEditContext();
|
|
17
27
|
|
|
@@ -19,12 +29,10 @@ export function Workbox() {
|
|
|
19
29
|
|
|
20
30
|
if (!editContext) return null;
|
|
21
31
|
|
|
22
|
-
const validationOverlay = useRef<OverlayPanel>(null);
|
|
23
|
-
|
|
24
32
|
const nameBodyTemplate = (wbItem: WorkboxItem) => {
|
|
25
33
|
const id = wbItem.item.id + wbItem.item.language + wbItem.item.version;
|
|
26
34
|
return (
|
|
27
|
-
<div className="flex gap-2
|
|
35
|
+
<div className="flex items-center gap-2">
|
|
28
36
|
{/* {(wbItem.lockedBy || wbItem.hasLock) && (
|
|
29
37
|
<>
|
|
30
38
|
<i
|
|
@@ -52,16 +60,20 @@ export function Workbox() {
|
|
|
52
60
|
/>
|
|
53
61
|
)} */}
|
|
54
62
|
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
<Tooltip>
|
|
64
|
+
<TooltipTrigger asChild>
|
|
65
|
+
<span
|
|
66
|
+
className="cursor-help break-all"
|
|
67
|
+
style={{ position: "relative" }}
|
|
68
|
+
>
|
|
69
|
+
{wbItem.name}{" "}
|
|
70
|
+
<span className="text-gray-500">
|
|
71
|
+
({wbItem.item.language}, {wbItem.item.version})
|
|
72
|
+
</span>
|
|
73
|
+
</span>
|
|
74
|
+
</TooltipTrigger>
|
|
75
|
+
<TooltipContent>{wbItem.path}</TooltipContent>
|
|
76
|
+
</Tooltip>
|
|
65
77
|
</div>
|
|
66
78
|
);
|
|
67
79
|
};
|
|
@@ -90,16 +102,17 @@ export function Workbox() {
|
|
|
90
102
|
return (
|
|
91
103
|
<Button
|
|
92
104
|
key={action.id}
|
|
93
|
-
|
|
94
|
-
className="text-xs p-1"
|
|
105
|
+
className="p-1 text-xs"
|
|
95
106
|
onClick={() =>
|
|
96
107
|
editContext.operations.executeWorkflowCommand(
|
|
97
108
|
item.item,
|
|
98
|
-
action.id
|
|
109
|
+
action.id,
|
|
99
110
|
)
|
|
100
111
|
}
|
|
101
|
-
size="
|
|
102
|
-
|
|
112
|
+
size="sm"
|
|
113
|
+
>
|
|
114
|
+
{action.name}
|
|
115
|
+
</Button>
|
|
103
116
|
);
|
|
104
117
|
})}
|
|
105
118
|
</div>
|
|
@@ -111,23 +124,23 @@ export function Workbox() {
|
|
|
111
124
|
(x) =>
|
|
112
125
|
x.item.id === item.item.id &&
|
|
113
126
|
x.item.language === item.item.language &&
|
|
114
|
-
x.item.version === item.item.version
|
|
127
|
+
x.item.version === item.item.version,
|
|
115
128
|
);
|
|
116
129
|
if (!validator || !validator.results.length) return null;
|
|
117
130
|
return (
|
|
118
131
|
<div
|
|
119
|
-
className={
|
|
132
|
+
className={cn(
|
|
120
133
|
"cursor-pointer",
|
|
121
134
|
getValidationErrorLevelClass(
|
|
122
135
|
validator.results.reduce(
|
|
123
136
|
(prev, curr) => Math.max(prev, curr.result),
|
|
124
|
-
0
|
|
125
|
-
)
|
|
126
|
-
)
|
|
137
|
+
0,
|
|
138
|
+
),
|
|
139
|
+
),
|
|
127
140
|
)}
|
|
128
|
-
onClick={(
|
|
141
|
+
onClick={() => {
|
|
129
142
|
setValidationOverlayItem(item);
|
|
130
|
-
|
|
143
|
+
setIsValidationOpen(true);
|
|
131
144
|
}}
|
|
132
145
|
>
|
|
133
146
|
{validator.results.length}
|
|
@@ -141,7 +154,7 @@ export function Workbox() {
|
|
|
141
154
|
(x) =>
|
|
142
155
|
x.item.id === validationOverlayItem?.item.id &&
|
|
143
156
|
x.item.language === validationOverlayItem?.item.language &&
|
|
144
|
-
x.item.version === validationOverlayItem?.item.version
|
|
157
|
+
x.item.version === validationOverlayItem?.item.version,
|
|
145
158
|
);
|
|
146
159
|
|
|
147
160
|
const getValidationErrorLevelClass = (level: number) => {
|
|
@@ -167,43 +180,48 @@ export function Workbox() {
|
|
|
167
180
|
{
|
|
168
181
|
body: validationTemplate,
|
|
169
182
|
align: "center",
|
|
170
|
-
header: <
|
|
183
|
+
header: <Check className="h-4 w-4" />,
|
|
171
184
|
},
|
|
172
185
|
];
|
|
173
186
|
|
|
174
187
|
return (
|
|
175
188
|
<>
|
|
176
189
|
<SimpleTable items={editContext.workboxItems} columns={columns} />
|
|
177
|
-
<
|
|
178
|
-
<
|
|
179
|
-
<
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
<
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
190
|
+
<Popover open={isValidationOpen} onOpenChange={setIsValidationOpen}>
|
|
191
|
+
<PopoverTrigger asChild>
|
|
192
|
+
<div style={{ display: "none" }} />
|
|
193
|
+
</PopoverTrigger>
|
|
194
|
+
<PopoverContent className="w-auto p-0">
|
|
195
|
+
<table className="m-3 border-separate border-spacing-1 text-xs">
|
|
196
|
+
<thead>
|
|
197
|
+
<tr>
|
|
198
|
+
<th className="text-left">Item</th>
|
|
199
|
+
<th className="text-left">Field</th>
|
|
200
|
+
<th className="text-left">Validator</th>
|
|
201
|
+
<th className="text-left">Message</th>
|
|
202
|
+
</tr>
|
|
203
|
+
</thead>
|
|
204
|
+
<tbody>
|
|
205
|
+
{overlayResult &&
|
|
206
|
+
overlayResult.results.map((x) => (
|
|
207
|
+
<tr key={x.fieldId + x.itemId}>
|
|
208
|
+
<td>{x.itemName}</td>
|
|
209
|
+
<td>{x.fieldName}</td>
|
|
210
|
+
<td>{x.validator}</td>
|
|
211
|
+
<td
|
|
212
|
+
className={cn(
|
|
213
|
+
"max-w-48 text-xs break-all",
|
|
214
|
+
getValidationErrorLevelClass(x.result),
|
|
215
|
+
)}
|
|
216
|
+
>
|
|
217
|
+
{x.message}
|
|
218
|
+
</td>
|
|
219
|
+
</tr>
|
|
220
|
+
))}
|
|
221
|
+
</tbody>
|
|
222
|
+
</table>
|
|
223
|
+
</PopoverContent>
|
|
224
|
+
</Popover>
|
|
207
225
|
</>
|
|
208
226
|
);
|
|
209
227
|
}
|
|
@@ -4,12 +4,18 @@ import React from "react";
|
|
|
4
4
|
* Lightweight React component for consistent multi-select drag previews.
|
|
5
5
|
* Use with renderToString or by creating a DOM node and setting innerHTML.
|
|
6
6
|
*/
|
|
7
|
-
export function DragMultiSelectPreview({
|
|
7
|
+
export function DragMultiSelectPreview({
|
|
8
|
+
count,
|
|
9
|
+
noun = "items",
|
|
10
|
+
}: {
|
|
11
|
+
count: number;
|
|
12
|
+
noun?: string;
|
|
13
|
+
}) {
|
|
8
14
|
return (
|
|
9
15
|
<div className="rounded-md border border-gray-300 bg-white px-4 py-2 pl-8 text-sm shadow-md">
|
|
10
16
|
<div className="flex items-center">
|
|
11
17
|
<span className="mr-1 font-bold">{count}</span>
|
|
12
|
-
<span>
|
|
18
|
+
<span>{noun}</span>
|
|
13
19
|
</div>
|
|
14
20
|
</div>
|
|
15
21
|
);
|
|
@@ -22,16 +28,15 @@ export function DragMultiSelectPreview({ count }: { count: number }) {
|
|
|
22
28
|
export function setMultiDragImage(
|
|
23
29
|
event: React.DragEvent<any>,
|
|
24
30
|
count: number,
|
|
31
|
+
noun: string = "items",
|
|
25
32
|
): () => void {
|
|
26
33
|
const temp = document.createElement("div");
|
|
27
34
|
temp.className =
|
|
28
35
|
"bg-white shadow-md rounded-md border border-gray-300 px-4 pl-8 py-2 text-sm absolute top-[-1000px] left-[-1000px]";
|
|
29
|
-
temp.innerHTML = `<div class="flex items-center"><span class="font-bold mr-1">${count}</span>
|
|
36
|
+
temp.innerHTML = `<div class="flex items-center"><span class="font-bold mr-1">${count}</span> ${noun}</div>`;
|
|
30
37
|
document.body.appendChild(temp);
|
|
31
38
|
try {
|
|
32
39
|
event.dataTransfer.setDragImage(temp, 15, 15);
|
|
33
|
-
event.dataTransfer.dropEffect = "move";
|
|
34
|
-
event.dataTransfer.effectAllowed = "move";
|
|
35
40
|
} catch {}
|
|
36
41
|
const cleanup = () => {
|
|
37
42
|
try {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import { useEffect, useRef, useState } from "react";
|
|
9
9
|
import DialogButtons from "./DialogButtons";
|
|
10
10
|
import { Button } from "../../components/ui/button";
|
|
11
|
-
import {
|
|
11
|
+
import { Input } from "../../components/ui/input";
|
|
12
12
|
import { DialogProps } from "../client/editContext";
|
|
13
13
|
import { ItemDescriptor } from "../pageModel";
|
|
14
14
|
import { useEditContext } from "../client/editContext";
|
|
@@ -117,7 +117,7 @@ export function ItemNameDialog(
|
|
|
117
117
|
<div className="my-2 text-sm">
|
|
118
118
|
{props.message || "Enter a name for the new item:"}
|
|
119
119
|
</div>
|
|
120
|
-
<
|
|
120
|
+
<Input
|
|
121
121
|
ref={nameRef}
|
|
122
122
|
value={name}
|
|
123
123
|
className="bg-gray-5 w-full text-sm"
|
|
@@ -7,7 +7,7 @@ import React, {
|
|
|
7
7
|
useState,
|
|
8
8
|
} from "react";
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { Loader2 } from "lucide-react";
|
|
11
11
|
import { ChevronRight } from "lucide-react";
|
|
12
12
|
import { setMultiDragImage } from "../ui/DragPreview";
|
|
13
13
|
export interface TreeNode<T = any> {
|
|
@@ -86,6 +86,8 @@ export interface TreeProps<T = any> {
|
|
|
86
86
|
searchClearDelay?: number;
|
|
87
87
|
/** Whether to disable automatic selection when expanding nodes (even during search) */
|
|
88
88
|
disableAutoSelectOnExpand?: boolean;
|
|
89
|
+
/** Noun used in multi-select drag preview (e.g., "items", "components"). Default: "items" */
|
|
90
|
+
multiDragNoun?: string;
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
/**
|
|
@@ -363,6 +365,7 @@ const NodeContent = memo(
|
|
|
363
365
|
selectedKeys,
|
|
364
366
|
isDragging,
|
|
365
367
|
searchTerm = "",
|
|
368
|
+
multiDragNoun,
|
|
366
369
|
}: {
|
|
367
370
|
node: TreeNode<any>;
|
|
368
371
|
isExpanded: boolean;
|
|
@@ -392,6 +395,7 @@ const NodeContent = memo(
|
|
|
392
395
|
selectedKeys?: string[];
|
|
393
396
|
isDragging: boolean;
|
|
394
397
|
searchTerm?: string;
|
|
398
|
+
multiDragNoun?: string;
|
|
395
399
|
}) => {
|
|
396
400
|
const [isDragOver, setIsDragOver] = React.useState(false);
|
|
397
401
|
|
|
@@ -407,7 +411,12 @@ const NodeContent = memo(
|
|
|
407
411
|
isSelected && selectedKeys && selectedKeys.length > 1;
|
|
408
412
|
|
|
409
413
|
// Set drag preview for multiple items if applicable
|
|
410
|
-
if (isMultiSelect)
|
|
414
|
+
if (isMultiSelect)
|
|
415
|
+
setMultiDragImage(
|
|
416
|
+
event,
|
|
417
|
+
selectedKeys.length,
|
|
418
|
+
multiDragNoun || "items",
|
|
419
|
+
);
|
|
411
420
|
if (onStartDrag) {
|
|
412
421
|
onStartDrag({ node, event, isMultiSelect: isMultiSelect ?? false });
|
|
413
422
|
}
|
|
@@ -485,10 +494,7 @@ const NodeContent = memo(
|
|
|
485
494
|
if (node.hasChildren && node.children === null) {
|
|
486
495
|
return (
|
|
487
496
|
<div className="flex h-[23px] w-[24px] items-center justify-center">
|
|
488
|
-
<
|
|
489
|
-
style={{ width: "16px", height: "16px" }}
|
|
490
|
-
className="text-gray-500"
|
|
491
|
-
/>
|
|
497
|
+
<Loader2 className="h-4 w-4 animate-spin text-gray-500" />
|
|
492
498
|
</div>
|
|
493
499
|
);
|
|
494
500
|
}
|
|
@@ -573,6 +579,7 @@ export const PerfectTree = <T,>({
|
|
|
573
579
|
enableKeyboardSearch = false,
|
|
574
580
|
searchClearDelay = 1500,
|
|
575
581
|
disableAutoSelectOnExpand = false,
|
|
582
|
+
multiDragNoun = "items",
|
|
576
583
|
}: TreeProps<T>) => {
|
|
577
584
|
const [searchTerm, setSearchTerm] = useState("");
|
|
578
585
|
const [isFocused, setIsFocused] = useState(false);
|
|
@@ -905,6 +912,7 @@ export const PerfectTree = <T,>({
|
|
|
905
912
|
selectedKeys={selectedKeys}
|
|
906
913
|
isDragging={isDragging}
|
|
907
914
|
searchTerm={searchTerm}
|
|
915
|
+
multiDragNoun={multiDragNoun}
|
|
908
916
|
/>
|
|
909
917
|
{isExpanded && (
|
|
910
918
|
<>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn } from "../../lib/utils";
|
|
2
2
|
import { useCollapsedSections } from "../utils";
|
|
3
3
|
import { ChevronDown } from "lucide-react";
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ export function Section({
|
|
|
15
15
|
return (
|
|
16
16
|
<div>
|
|
17
17
|
<div
|
|
18
|
-
className={
|
|
18
|
+
className={cn(
|
|
19
19
|
open
|
|
20
20
|
? "border-blue-500 bg-gray-600"
|
|
21
21
|
: "border-gray-400 bg-gray-400 hover:border-gray-300 hover:bg-gray-500",
|
|
@@ -25,14 +25,14 @@ export function Section({
|
|
|
25
25
|
>
|
|
26
26
|
{title}
|
|
27
27
|
<ChevronDown
|
|
28
|
-
className={
|
|
28
|
+
className={cn(
|
|
29
29
|
"size-4 transition-transform duration-200 ease-in-out",
|
|
30
30
|
open ? "rotate-180" : "",
|
|
31
31
|
)}
|
|
32
32
|
/>
|
|
33
33
|
</div>
|
|
34
34
|
<div
|
|
35
|
-
className={
|
|
35
|
+
className={cn(
|
|
36
36
|
"grid overflow-hidden transition-[grid-template-rows] duration-300 ease-out",
|
|
37
37
|
open ? "grid-rows-[1fr]" : "grid-rows-[0fr]",
|
|
38
38
|
)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn } from "../../lib/utils";
|
|
2
2
|
|
|
3
3
|
export function SimpleTable<T>({
|
|
4
4
|
items,
|
|
@@ -35,7 +35,7 @@ export function SimpleTable<T>({
|
|
|
35
35
|
<tbody>
|
|
36
36
|
{items.map((item, index) => (
|
|
37
37
|
<tr
|
|
38
|
-
className={
|
|
38
|
+
className={cn(
|
|
39
39
|
"border-b border-neutral-200",
|
|
40
40
|
onRowClick ? "cursor-pointer hover:bg-neutral-100" : "",
|
|
41
41
|
rowClassName ? rowClassName(item) : "",
|
|
@@ -48,7 +48,7 @@ export function SimpleTable<T>({
|
|
|
48
48
|
key={index}
|
|
49
49
|
>
|
|
50
50
|
{columns.map((col, index) => (
|
|
51
|
-
<td className={
|
|
51
|
+
<td className={cn("p-2", col.className)} key={index}>
|
|
52
52
|
{col.body(item)}
|
|
53
53
|
</td>
|
|
54
54
|
))}
|
|
@@ -284,15 +284,21 @@ export const Splitter: React.FC<SplitterProps> = ({
|
|
|
284
284
|
|
|
285
285
|
const getFlexGrow = (index: number): number => {
|
|
286
286
|
const panelName = panels[index]!.name;
|
|
287
|
-
|
|
287
|
+
|
|
288
|
+
// Preserve explicit collapse behavior for the last collapsible panel
|
|
289
|
+
const isCollapsedLastPanel =
|
|
288
290
|
index === panels.length - 1 &&
|
|
289
291
|
isLastPanelCollapsed &&
|
|
290
|
-
lastPanelCollapsible
|
|
291
|
-
|
|
292
|
-
|
|
292
|
+
lastPanelCollapsible;
|
|
293
|
+
if (isCollapsedLastPanel) return 0;
|
|
294
|
+
|
|
295
|
+
const raw = panelSizes?.[panelName] ?? panels[index]!.defaultSize;
|
|
293
296
|
|
|
294
297
|
if (raw === "auto") return 1;
|
|
295
|
-
|
|
298
|
+
|
|
299
|
+
// Guard against invalid or zero stored sizes that could hide panels
|
|
300
|
+
if (typeof raw === "number") return Math.max(1, raw);
|
|
301
|
+
|
|
296
302
|
return 1;
|
|
297
303
|
};
|
|
298
304
|
|
package/src/index.ts
CHANGED
|
@@ -25,6 +25,12 @@ export { defaultTranslateAll } from "./editor/commands/localizeItem/LocalizeItem
|
|
|
25
25
|
|
|
26
26
|
export { Card } from "./components/ui/card";
|
|
27
27
|
export { Button } from "./components/ui/button";
|
|
28
|
+
export {
|
|
29
|
+
Dialog,
|
|
30
|
+
DialogContent,
|
|
31
|
+
DialogHeader,
|
|
32
|
+
DialogTitle,
|
|
33
|
+
} from "./components/ui/dialog";
|
|
28
34
|
|
|
29
35
|
export {
|
|
30
36
|
getFilteredInputData,
|