@alpaca-editor/core 1.0.3955 → 1.0.3959
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/build.css +1 -1
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +23 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/button.js +3 -3
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/command.js +35 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +15 -0
- package/dist/components/ui/dialog.js +37 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/dropdown-menu.js +52 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/input.js +7 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +26 -0
- package/dist/components/ui/menubar.js +55 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/popover.d.ts +9 -0
- package/dist/components/ui/popover.js +63 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +9 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +18 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/config/config.js +79 -63
- package/dist/config/config.js.map +1 -1
- package/dist/config/types.d.ts +3 -3
- package/dist/editor/ContentTree.js +1 -1
- package/dist/editor/ContentTree.js.map +1 -1
- package/dist/editor/Editor.js +6 -2
- package/dist/editor/Editor.js.map +1 -1
- package/dist/editor/FieldList.js +1 -1
- package/dist/editor/FieldList.js.map +1 -1
- package/dist/editor/FieldListField.js +1 -1
- package/dist/editor/FieldListField.js.map +1 -1
- package/dist/editor/ImageEditor.js +16 -6
- package/dist/editor/ImageEditor.js.map +1 -1
- package/dist/editor/MainLayout.js +4 -4
- package/dist/editor/MainLayout.js.map +1 -1
- package/dist/editor/MobileLayout.js +3 -3
- package/dist/editor/MobileLayout.js.map +1 -1
- package/dist/editor/PictureEditor.js +29 -15
- package/dist/editor/PictureEditor.js.map +1 -1
- package/dist/editor/Titlebar.js +6 -11
- package/dist/editor/Titlebar.js.map +1 -1
- package/dist/editor/ai/GhostWriter.js +1 -1
- package/dist/editor/ai/GhostWriter.js.map +1 -1
- package/dist/editor/client/EditorClient.d.ts +4 -2
- package/dist/editor/client/EditorClient.js +32 -11
- package/dist/editor/client/EditorClient.js.map +1 -1
- package/dist/editor/client/editContext.d.ts +4 -1
- package/dist/editor/client/editContext.js.map +1 -1
- package/dist/editor/client/operations.js +2 -2
- package/dist/editor/client/pageModelBuilder.js +3 -6
- package/dist/editor/client/pageModelBuilder.js.map +1 -1
- package/dist/editor/commands/itemCommands.d.ts +2 -0
- package/dist/editor/commands/itemCommands.js +180 -0
- package/dist/editor/commands/itemCommands.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/SingleLineText.js +1 -1
- package/dist/editor/field-types/SingleLineText.js.map +1 -1
- package/dist/editor/menubar/ActiveUsers.js +98 -4
- package/dist/editor/menubar/ActiveUsers.js.map +1 -1
- package/dist/editor/menubar/{ActionsMenu.d.ts → ItemActionsMenu.d.ts} +1 -1
- package/dist/editor/menubar/ItemActionsMenu.js +23 -0
- package/dist/editor/menubar/ItemActionsMenu.js.map +1 -0
- package/dist/editor/menubar/ItemLanguageVersion.js +2 -2
- package/dist/editor/menubar/ItemLanguageVersion.js.map +1 -1
- package/dist/editor/menubar/LanguageSelector.d.ts +1 -2
- package/dist/editor/menubar/LanguageSelector.js +23 -23
- package/dist/editor/menubar/LanguageSelector.js.map +1 -1
- package/dist/editor/menubar/PageSelector.js +7 -8
- package/dist/editor/menubar/PageSelector.js.map +1 -1
- package/dist/editor/menubar/PageViewerControls.js +22 -19
- package/dist/editor/menubar/PageViewerControls.js.map +1 -1
- package/dist/editor/menubar/PreviewSecondaryControls.js +2 -3
- package/dist/editor/menubar/PreviewSecondaryControls.js.map +1 -1
- package/dist/editor/menubar/User.js +1 -1
- package/dist/editor/menubar/User.js.map +1 -1
- package/dist/editor/menubar/VersionSelector.js +36 -31
- package/dist/editor/menubar/VersionSelector.js.map +1 -1
- package/dist/editor/menubar/WorkflowButton.d.ts +1 -0
- package/dist/editor/menubar/WorkflowButton.js +41 -0
- package/dist/editor/menubar/WorkflowButton.js.map +1 -0
- package/dist/editor/page-editor-chrome/FrameMenu.js +5 -5
- package/dist/editor/page-editor-chrome/FrameMenu.js.map +1 -1
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js +2 -2
- package/dist/editor/page-editor-chrome/SuggestionHighlightings.js.map +1 -1
- package/dist/editor/page-viewer/EditorForm.d.ts +2 -1
- package/dist/editor/page-viewer/EditorForm.js +61 -49
- package/dist/editor/page-viewer/EditorForm.js.map +1 -1
- package/dist/editor/page-viewer/PageViewer.d.ts +2 -1
- package/dist/editor/page-viewer/PageViewer.js +28 -44
- package/dist/editor/page-viewer/PageViewer.js.map +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js +1 -1
- package/dist/editor/page-viewer/PageViewerFrame.js.map +1 -1
- package/dist/editor/reviews/Comments.js +9 -9
- package/dist/editor/reviews/Comments.js.map +1 -1
- package/dist/editor/reviews/SuggestedEdit.js +3 -3
- package/dist/editor/services/contentService.d.ts +18 -0
- package/dist/editor/services/contentService.js +6 -0
- package/dist/editor/services/contentService.js.map +1 -1
- package/dist/editor/services/editService.d.ts +5 -0
- package/dist/editor/services/editService.js +4 -0
- package/dist/editor/services/editService.js.map +1 -1
- package/dist/editor/services/systemService.d.ts +2 -1
- package/dist/editor/services/systemService.js +4 -1
- package/dist/editor/services/systemService.js.map +1 -1
- package/dist/editor/sidebar/ComponentTree.js +26 -10
- package/dist/editor/sidebar/ComponentTree.js.map +1 -1
- package/dist/editor/sidebar/Divider.d.ts +6 -0
- package/dist/editor/sidebar/Divider.js +6 -0
- package/dist/editor/sidebar/Divider.js.map +1 -0
- package/dist/editor/sidebar/LeftToolbar.d.ts +1 -0
- package/dist/editor/sidebar/LeftToolbar.js +16 -0
- package/dist/editor/sidebar/LeftToolbar.js.map +1 -0
- package/dist/editor/sidebar/SEOInfo.d.ts +1 -0
- package/dist/editor/sidebar/SEOInfo.js +169 -0
- package/dist/editor/sidebar/SEOInfo.js.map +1 -0
- package/dist/editor/sidebar/Sidebar.js +1 -1
- package/dist/editor/sidebar/Sidebar.js.map +1 -1
- package/dist/editor/sidebar/SidebarView.d.ts +3 -2
- package/dist/editor/sidebar/SidebarView.js +22 -60
- package/dist/editor/sidebar/SidebarView.js.map +1 -1
- package/dist/editor/sidebar/ViewSelector.js +66 -20
- package/dist/editor/sidebar/ViewSelector.js.map +1 -1
- package/dist/editor/ui/Icons.d.ts +4 -0
- package/dist/editor/ui/Icons.js +15 -3
- package/dist/editor/ui/Icons.js.map +1 -1
- package/dist/editor/ui/Section.js +1 -1
- package/dist/editor/ui/Section.js.map +1 -1
- package/dist/editor/ui/SimpleIconButton.d.ts +1 -2
- package/dist/editor/ui/SimpleIconButton.js +8 -13
- package/dist/editor/ui/SimpleIconButton.js.map +1 -1
- package/dist/editor/ui/SimpleTabs.js +2 -2
- package/dist/editor/ui/SimpleTabs.js.map +1 -1
- package/dist/editor/ui/SimpleToolbar.js +1 -1
- package/dist/editor/ui/SimpleToolbar.js.map +1 -1
- package/dist/editor/ui/Splitter.d.ts +4 -0
- package/dist/editor/ui/Splitter.js +6 -7
- package/dist/editor/ui/Splitter.js.map +1 -1
- package/dist/editor/views/CompareView.js +16 -4
- package/dist/editor/views/CompareView.js.map +1 -1
- package/dist/editor/views/SingleEditView.d.ts +2 -1
- package/dist/editor/views/SingleEditView.js +2 -2
- package/dist/editor/views/SingleEditView.js.map +1 -1
- package/dist/page-wizard/steps/ContentStep.js +1 -1
- package/dist/page-wizard/steps/ContentStep.js.map +1 -1
- package/dist/revision.d.ts +2 -2
- package/dist/revision.js +2 -2
- package/dist/splash-screen/NewPage.js +8 -6
- package/dist/splash-screen/NewPage.js.map +1 -1
- package/dist/splash-screen/RecentPages.js +3 -8
- package/dist/splash-screen/RecentPages.js.map +1 -1
- package/dist/styles.css +1519 -543
- package/dist/tour/Tour.js +79 -10
- package/dist/tour/Tour.js.map +1 -1
- package/dist/tour/default-tour.js +55 -45
- package/dist/tour/default-tour.js.map +1 -1
- package/dist/types.d.ts +19 -1
- package/package.json +13 -5
- package/src/components/ui/badge.tsx +46 -0
- package/src/components/ui/button.tsx +3 -3
- package/src/components/ui/command.tsx +184 -0
- package/src/components/ui/dialog.tsx +143 -0
- package/src/components/ui/dropdown-menu.tsx +257 -0
- package/src/components/ui/input.tsx +21 -0
- package/src/components/ui/menubar.tsx +276 -0
- package/src/components/ui/popover.tsx +113 -0
- package/src/components/ui/switch.tsx +31 -0
- package/src/components/ui/tooltip.tsx +61 -0
- package/src/config/config.tsx +102 -65
- package/src/config/types.ts +3 -3
- package/src/editor/ContentTree.tsx +1 -1
- package/src/editor/Editor.tsx +8 -2
- package/src/editor/FieldList.tsx +2 -2
- package/src/editor/FieldListField.tsx +1 -1
- package/src/editor/ImageEditor.tsx +44 -21
- package/src/editor/MainLayout.tsx +21 -16
- package/src/editor/MobileLayout.tsx +3 -2
- package/src/editor/PictureEditor.tsx +74 -45
- package/src/editor/Titlebar.tsx +12 -24
- package/src/editor/ai/GhostWriter.tsx +1 -1
- package/src/editor/client/EditorClient.tsx +55 -13
- package/src/editor/client/editContext.ts +5 -0
- package/src/editor/client/operations.ts +2 -2
- package/src/editor/client/pageModelBuilder.ts +3 -7
- package/src/editor/commands/itemCommands.tsx +272 -0
- package/src/editor/field-types/MultiLineText.tsx +1 -1
- package/src/editor/field-types/SingleLineText.tsx +1 -1
- package/src/editor/menubar/ActiveUsers.tsx +271 -5
- package/src/editor/menubar/ItemActionsMenu.tsx +89 -0
- package/src/editor/menubar/ItemLanguageVersion.tsx +7 -5
- package/src/editor/menubar/LanguageSelector.tsx +105 -134
- package/src/editor/menubar/PageSelector.tsx +25 -27
- package/src/editor/menubar/PageViewerControls.tsx +126 -78
- package/src/editor/menubar/PreviewSecondaryControls.tsx +0 -2
- package/src/editor/menubar/User.tsx +2 -2
- package/src/editor/menubar/VersionSelector.tsx +124 -99
- package/src/editor/menubar/WorkflowButton.tsx +115 -0
- package/src/editor/page-editor-chrome/FrameMenu.tsx +5 -5
- package/src/editor/page-editor-chrome/SuggestionHighlightings.tsx +2 -2
- package/src/editor/page-viewer/EditorForm.tsx +112 -87
- package/src/editor/page-viewer/PageViewer.tsx +75 -92
- package/src/editor/page-viewer/PageViewerFrame.tsx +1 -1
- package/src/editor/reviews/Comments.tsx +19 -20
- package/src/editor/reviews/SuggestedEdit.tsx +3 -3
- package/src/editor/services/contentService.ts +28 -0
- package/src/editor/services/editService.ts +12 -0
- package/src/editor/services/systemService.ts +5 -2
- package/src/editor/sidebar/ComponentTree.tsx +34 -12
- package/src/editor/sidebar/Divider.tsx +22 -0
- package/src/editor/sidebar/LeftToolbar.tsx +36 -0
- package/src/editor/sidebar/SEOInfo.tsx +265 -0
- package/src/editor/sidebar/Sidebar.tsx +1 -0
- package/src/editor/sidebar/SidebarView.tsx +77 -111
- package/src/editor/sidebar/ViewSelector.tsx +211 -43
- package/src/editor/ui/Icons.tsx +155 -10
- package/src/editor/ui/Section.tsx +1 -1
- package/src/editor/ui/SimpleIconButton.tsx +30 -28
- package/src/editor/ui/SimpleTabs.tsx +3 -3
- package/src/editor/ui/SimpleToolbar.tsx +1 -1
- package/src/editor/ui/Splitter.tsx +14 -7
- package/src/editor/views/CompareView.tsx +23 -11
- package/src/editor/views/SingleEditView.tsx +3 -0
- package/src/page-wizard/steps/ContentStep.tsx +0 -1
- package/src/revision.ts +2 -2
- package/src/splash-screen/NewPage.tsx +18 -13
- package/src/splash-screen/RecentPages.tsx +4 -10
- package/src/tour/Tour.tsx +125 -34
- package/src/tour/default-tour.tsx +55 -45
- package/src/types.ts +21 -1
- package/styles.css +301 -1
- package/dist/editor/menubar/ActionsMenu.js +0 -49
- package/dist/editor/menubar/ActionsMenu.js.map +0 -1
- package/dist/editor/menubar/SecondaryControls.d.ts +0 -1
- package/dist/editor/menubar/SecondaryControls.js +0 -17
- package/dist/editor/menubar/SecondaryControls.js.map +0 -1
- package/src/editor/menubar/ActionsMenu.tsx +0 -94
- package/src/editor/menubar/SecondaryControls.tsx +0 -45
package/src/editor/ui/Icons.tsx
CHANGED
|
@@ -23,6 +23,7 @@ export function EditIcon({ className }: { className?: string }) {
|
|
|
23
23
|
viewBox="0 0 24 24"
|
|
24
24
|
fill="none"
|
|
25
25
|
stroke="currentColor"
|
|
26
|
+
strokeWidth={1}
|
|
26
27
|
xmlns="http://www.w3.org/2000/svg"
|
|
27
28
|
className={className}
|
|
28
29
|
>
|
|
@@ -407,14 +408,41 @@ export function RotateDeviceIcon({ className }: { className?: string }) {
|
|
|
407
408
|
export function CompareIcon({ className }: { className?: string }) {
|
|
408
409
|
return (
|
|
409
410
|
<svg
|
|
410
|
-
|
|
411
|
+
width="20"
|
|
412
|
+
height="20"
|
|
413
|
+
viewBox="0 0 20 20"
|
|
414
|
+
fill="none"
|
|
411
415
|
xmlns="http://www.w3.org/2000/svg"
|
|
412
416
|
className={className}
|
|
413
|
-
stroke="currentColor"
|
|
414
|
-
fill="currentColor"
|
|
415
417
|
>
|
|
416
|
-
<
|
|
417
|
-
|
|
418
|
+
<rect
|
|
419
|
+
x="1"
|
|
420
|
+
y="0.5"
|
|
421
|
+
width="10"
|
|
422
|
+
height="17"
|
|
423
|
+
rx="1"
|
|
424
|
+
stroke="currentColor"
|
|
425
|
+
strokeWidth="1"
|
|
426
|
+
/>
|
|
427
|
+
<path
|
|
428
|
+
d="M11 2.5L18 2.5C18.5523 2.5 19 2.94772 19 3.5L19 18.5C19 19.0523 18.5523 19.5 18 19.5L10 19.5C9.44772 19.5 9 19.0523 9 18.5L9 17.5"
|
|
429
|
+
stroke="currentColor"
|
|
430
|
+
strokeWidth="1"
|
|
431
|
+
/>
|
|
432
|
+
<path
|
|
433
|
+
d="M1 9H8M8 9L5.375 6.5M8 9L5.375 11.5"
|
|
434
|
+
stroke="currentColor"
|
|
435
|
+
strokeWidth="1"
|
|
436
|
+
strokeLinecap="round"
|
|
437
|
+
strokeLinejoin="round"
|
|
438
|
+
/>
|
|
439
|
+
<path
|
|
440
|
+
d="M19 11L12 11M12 11L14.625 13.5M12 11L14.625 8.5"
|
|
441
|
+
stroke="currentColor"
|
|
442
|
+
strokeWidth="1"
|
|
443
|
+
strokeLinecap="round"
|
|
444
|
+
strokeLinejoin="round"
|
|
445
|
+
/>
|
|
418
446
|
</svg>
|
|
419
447
|
);
|
|
420
448
|
}
|
|
@@ -690,20 +718,137 @@ export function Logo({ className }: { className?: string }) {
|
|
|
690
718
|
export function MagicEditIcon() {
|
|
691
719
|
return (
|
|
692
720
|
<svg
|
|
693
|
-
width="
|
|
694
|
-
height="
|
|
695
|
-
viewBox="0 0
|
|
721
|
+
width="15"
|
|
722
|
+
height="15"
|
|
723
|
+
viewBox="0 0 15 15"
|
|
696
724
|
fill="none"
|
|
725
|
+
strokeWidth={1}
|
|
697
726
|
xmlns="http://www.w3.org/2000/svg"
|
|
698
727
|
>
|
|
699
728
|
<path
|
|
700
|
-
d="
|
|
729
|
+
d="M9.49999 13.915H14M5 13.915H5.83727C6.08186 13.915 6.20416 13.915 6.31925 13.886C6.42128 13.8602 6.51883 13.8178 6.6083 13.7601C6.70922 13.6951 6.79569 13.6042 6.96865 13.4224L13.25 6.81862C13.6642 6.38315 13.6642 5.67711 13.25 5.24164C12.8358 4.80617 12.1642 4.80617 11.75 5.24164L5.46863 11.8454C5.29568 12.0272 5.2092 12.1181 5.14736 12.2242C5.09253 12.3183 5.05213 12.4208 5.02763 12.5281C5 12.6491 5 12.7777 5 13.0348V13.915Z"
|
|
730
|
+
stroke="#111111"
|
|
731
|
+
stroke-linecap="round"
|
|
732
|
+
stroke-linejoin="round"
|
|
733
|
+
/>
|
|
734
|
+
<path
|
|
735
|
+
d="M5.00263 1.58197C5.09983 1.55818 5.18914 1.5344 5.27846 1.51061C5.38616 1.48153 5.4965 1.45774 5.60158 1.42074C6.00876 1.26744 6.2662 0.976686 6.37653 0.556422C6.41594 0.403118 6.45534 0.249814 6.49475 0.0991534C6.49475 0.093867 6.49475 0.0912238 6.50263 0.0859375C6.51051 0.112369 6.51576 0.138801 6.52364 0.165233C6.56567 0.326466 6.59982 0.4877 6.65236 0.64629C6.79422 1.0692 7.08581 1.34144 7.51401 1.46039C7.66637 1.50268 7.82137 1.53968 7.97373 1.58197C7.98161 1.58197 7.98687 1.58462 8 1.5899C7.94221 1.60576 7.88967 1.61898 7.8345 1.63219C7.69264 1.67184 7.54816 1.70092 7.40893 1.74849C7.00438 1.89387 6.74431 2.18197 6.62872 2.59959C6.58406 2.76083 6.54466 2.92206 6.49737 3.08594C6.49737 3.07801 6.49212 3.07008 6.48949 3.06215C6.44746 2.89827 6.41068 2.7344 6.36077 2.57316C6.22679 2.12647 5.93257 1.83836 5.48336 1.71413C5.331 1.67184 5.17863 1.63484 5.02627 1.59519C5.01839 1.59519 5.01313 1.59255 5 1.58726L5.00263 1.58197Z"
|
|
736
|
+
fill="#111111"
|
|
737
|
+
/>
|
|
738
|
+
<path
|
|
739
|
+
d="M0 4.58209C0.224654 4.52309 0.43399 4.46923 0.643326 4.4128C0.896061 4.34354 1.1539 4.29224 1.39898 4.20246C2.34865 3.84849 2.95113 3.16875 3.21152 2.18634C3.30598 1.8298 3.39788 1.47326 3.48979 1.11672C3.49234 1.10646 3.49489 1.0962 3.50766 1.08594C3.52298 1.1475 3.54085 1.20906 3.55616 1.26806C3.65317 1.64255 3.73231 2.02218 3.85485 2.38898C4.18673 3.37909 4.86579 4.01009 5.86652 4.28711C6.22392 4.38458 6.58388 4.47436 6.94128 4.56926C6.9566 4.57439 6.97192 4.57696 7 4.58722C6.86214 4.62313 6.73961 4.65391 6.61452 4.68726C6.28264 4.77703 5.94311 4.84372 5.62144 4.96172C4.67433 5.30287 4.06929 5.97491 3.80124 6.94962C3.69657 7.32668 3.60467 7.70375 3.49745 8.08594C3.49234 8.06798 3.48724 8.05003 3.48213 8.02951C3.38257 7.64732 3.29832 7.26256 3.18344 6.8855C2.86944 5.84153 2.18016 5.17205 1.13348 4.8822C0.778629 4.78473 0.421225 4.69495 0.063822 4.60261C0.0485047 4.59748 0.0331875 4.59491 0 4.58465L0 4.58209Z"
|
|
740
|
+
fill="#111111"
|
|
741
|
+
/>
|
|
742
|
+
</svg>
|
|
743
|
+
);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
export function DashboardIcon() {
|
|
747
|
+
return (
|
|
748
|
+
<svg
|
|
749
|
+
width="32"
|
|
750
|
+
height="32"
|
|
751
|
+
viewBox="0 0 32 32"
|
|
752
|
+
fill="none"
|
|
753
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
754
|
+
>
|
|
755
|
+
<rect
|
|
756
|
+
width="32"
|
|
757
|
+
height="32"
|
|
758
|
+
rx="4"
|
|
759
|
+
fill="url(#paint0_linear_2065_8293)"
|
|
760
|
+
/>
|
|
761
|
+
<path
|
|
762
|
+
fillRule="evenodd"
|
|
763
|
+
clipRule="evenodd"
|
|
764
|
+
d="M13.5332 17.2568C13.7982 17.2831 14.0499 17.3868 14.2559 17.5557L14.3545 17.6455L14.4443 17.7441C14.6412 17.9843 14.7499 18.2864 14.75 18.5996V24.4004L14.7432 24.5332C14.7125 24.8423 14.5761 25.1329 14.3545 25.3545C14.1329 25.5761 13.8423 25.7125 13.5332 25.7432L13.4004 25.75H7.59961C7.24171 25.7499 6.89859 25.6076 6.64551 25.3545C6.39243 25.1014 6.2501 24.7583 6.25 24.4004V18.5996C6.2501 18.2417 6.39243 17.8986 6.64551 17.6455L6.74414 17.5557C6.98429 17.3588 7.2864 17.2501 7.59961 17.25H13.4004L13.5332 17.2568ZM7.75 24.25H13.25V18.75H7.75V24.25Z"
|
|
701
765
|
fill="white"
|
|
702
766
|
/>
|
|
703
767
|
<path
|
|
704
|
-
|
|
768
|
+
fillRule="evenodd"
|
|
769
|
+
clipRule="evenodd"
|
|
770
|
+
d="M24.5332 17.2568C24.7982 17.2831 25.0499 17.3868 25.2559 17.5557L25.3545 17.6455L25.4443 17.7441C25.6412 17.9843 25.7499 18.2864 25.75 18.5996V24.4004L25.7432 24.5332C25.7125 24.8423 25.5761 25.1329 25.3545 25.3545C25.1329 25.5761 24.8423 25.7125 24.5332 25.7432L24.4004 25.75H18.5996C18.2417 25.7499 17.8986 25.6076 17.6455 25.3545C17.4239 25.1329 17.2875 24.8423 17.2568 24.5332L17.25 24.4004V18.5996C17.2501 18.2417 17.3924 17.8986 17.6455 17.6455L17.7441 17.5557C17.9843 17.3588 18.2864 17.2501 18.5996 17.25H24.4004L24.5332 17.2568ZM18.75 24.25H24.25V18.75H18.75V24.25Z"
|
|
705
771
|
fill="white"
|
|
706
772
|
/>
|
|
773
|
+
<path
|
|
774
|
+
fillRule="evenodd"
|
|
775
|
+
clipRule="evenodd"
|
|
776
|
+
d="M13.5332 6.25684C13.7982 6.28311 14.0499 6.38684 14.2559 6.55566L14.3545 6.64551L14.4443 6.74414C14.6412 6.98429 14.7499 7.2864 14.75 7.59961V13.4004L14.7432 13.5332C14.7125 13.8423 14.5761 14.1329 14.3545 14.3545C14.1014 14.6076 13.7583 14.7499 13.4004 14.75H7.59961C7.24171 14.7499 6.89859 14.6076 6.64551 14.3545C6.39243 14.1014 6.2501 13.7583 6.25 13.4004V7.59961C6.2501 7.24171 6.39243 6.89859 6.64551 6.64551L6.74414 6.55566C6.98429 6.35884 7.2864 6.25009 7.59961 6.25H13.4004L13.5332 6.25684ZM7.75 13.25H13.25V7.75H7.75V13.25Z"
|
|
777
|
+
fill="white"
|
|
778
|
+
/>
|
|
779
|
+
<path
|
|
780
|
+
fillRule="evenodd"
|
|
781
|
+
clipRule="evenodd"
|
|
782
|
+
d="M24.5332 6.25684C24.7982 6.28311 25.0499 6.38684 25.2559 6.55566L25.3545 6.64551L25.4443 6.74414C25.6412 6.98429 25.7499 7.2864 25.75 7.59961V13.4004L25.7432 13.5332C25.7125 13.8423 25.5761 14.1329 25.3545 14.3545C25.1014 14.6076 24.7583 14.7499 24.4004 14.75H18.5996C18.2417 14.7499 17.8986 14.6076 17.6455 14.3545C17.4239 14.1329 17.2875 13.8423 17.2568 13.5332L17.25 13.4004V7.59961C17.2501 7.24171 17.3924 6.89859 17.6455 6.64551L17.7441 6.55566C17.9843 6.35884 18.2864 6.25009 18.5996 6.25H24.4004L24.5332 6.25684ZM18.75 13.25H24.25V7.75H18.75V13.25Z"
|
|
783
|
+
fill="white"
|
|
784
|
+
/>
|
|
785
|
+
</svg>
|
|
786
|
+
);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
export function VerticalDotsIcon() {
|
|
790
|
+
return (
|
|
791
|
+
<svg
|
|
792
|
+
width="4"
|
|
793
|
+
height="12"
|
|
794
|
+
viewBox="0 0 4 12"
|
|
795
|
+
fill="none"
|
|
796
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
797
|
+
strokeWidth={1}
|
|
798
|
+
>
|
|
799
|
+
<path
|
|
800
|
+
d="M2.0013 3.33332C2.73464 3.33332 3.33464 2.73332 3.33464 1.99999C3.33464 1.26666 2.73464 0.666656 2.0013 0.666656C1.26797 0.666656 0.667969 1.26666 0.667969 1.99999C0.667969 2.73332 1.26797 3.33332 2.0013 3.33332ZM2.0013 4.66666C1.26797 4.66666 0.667969 5.26666 0.667969 5.99999C0.667969 6.73332 1.26797 7.33332 2.0013 7.33332C2.73464 7.33332 3.33464 6.73332 3.33464 5.99999C3.33464 5.26666 2.73464 4.66666 2.0013 4.66666ZM2.0013 8.66666C1.26797 8.66666 0.667969 9.26666 0.667969 9.99999C0.667969 10.7333 1.26797 11.3333 2.0013 11.3333C2.73464 11.3333 3.33464 10.7333 3.33464 9.99999C3.33464 9.26666 2.73464 8.66666 2.0013 8.66666Z"
|
|
801
|
+
fill="#111111"
|
|
802
|
+
/>
|
|
803
|
+
</svg>
|
|
804
|
+
);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
export function MessagesIcon() {
|
|
808
|
+
return (
|
|
809
|
+
<svg
|
|
810
|
+
width="22"
|
|
811
|
+
height="22"
|
|
812
|
+
viewBox="0 0 22 22"
|
|
813
|
+
fill="none"
|
|
814
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
815
|
+
>
|
|
816
|
+
<path
|
|
817
|
+
d="M9 14L5.92474 17.1137C5.49579 17.548 5.28131 17.7652 5.09695 17.7805C4.93701 17.7938 4.78042 17.7295 4.67596 17.6076C4.55556 17.4672 4.55556 17.162 4.55556 16.5515V14.9916C4.55556 14.444 4.10707 14.0477 3.5652 13.9683V13.9683C2.25374 13.7762 1.22378 12.7463 1.03168 11.4348C1 11.2186 1 10.9605 1 10.4444V5.8C1 4.11984 1 3.27976 1.32698 2.63803C1.6146 2.07354 2.07354 1.6146 2.63803 1.32698C3.27976 1 4.11984 1 5.8 1H13.2C14.8802 1 15.7202 1 16.362 1.32698C16.9265 1.6146 17.3854 2.07354 17.673 2.63803C18 3.27976 18 4.11984 18 5.8V10M18 21L15.8236 19.4869C15.5177 19.2742 15.3647 19.1678 15.1982 19.0924C15.0504 19.0255 14.8951 18.9768 14.7356 18.9474C14.5558 18.9143 14.3695 18.9143 13.9969 18.9143H12.2C11.0799 18.9143 10.5198 18.9143 10.092 18.6963C9.71569 18.5046 9.40973 18.1986 9.21799 17.8223C9 17.3944 9 16.8344 9 15.7143V13.2C9 12.0799 9 11.5198 9.21799 11.092C9.40973 10.7157 9.71569 10.4097 10.092 10.218C10.5198 10 11.0799 10 12.2 10H17.8C18.9201 10 19.4802 10 19.908 10.218C20.2843 10.4097 20.5903 10.7157 20.782 11.092C21 11.5198 21 12.0799 21 13.2V15.9143C21 16.8462 21 17.3121 20.8478 17.6797C20.6448 18.1697 20.2554 18.5591 19.7654 18.762C19.3978 18.9143 18.9319 18.9143 18 18.9143V21Z"
|
|
818
|
+
stroke="#111111"
|
|
819
|
+
stroke-linecap="round"
|
|
820
|
+
stroke-linejoin="round"
|
|
821
|
+
/>
|
|
822
|
+
</svg>
|
|
823
|
+
);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
export function ViewToggleIcon() {
|
|
827
|
+
return (
|
|
828
|
+
<svg
|
|
829
|
+
width="24"
|
|
830
|
+
height="24"
|
|
831
|
+
viewBox="0 0 24 24"
|
|
832
|
+
fill="none"
|
|
833
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
834
|
+
>
|
|
835
|
+
<rect
|
|
836
|
+
x="20.5"
|
|
837
|
+
y="18.5"
|
|
838
|
+
width="17"
|
|
839
|
+
height="12"
|
|
840
|
+
rx="1.5"
|
|
841
|
+
transform="rotate(-180 20.5 18.5)"
|
|
842
|
+
stroke="#111111"
|
|
843
|
+
/>
|
|
844
|
+
<rect
|
|
845
|
+
x="8"
|
|
846
|
+
y="18"
|
|
847
|
+
width="1"
|
|
848
|
+
height="11"
|
|
849
|
+
transform="rotate(-180 8 18)"
|
|
850
|
+
fill="#111111"
|
|
851
|
+
/>
|
|
707
852
|
</svg>
|
|
708
853
|
);
|
|
709
854
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Tooltip,
|
|
3
|
+
TooltipContent,
|
|
4
|
+
TooltipProvider,
|
|
5
|
+
TooltipTrigger,
|
|
6
|
+
} from "../../components/ui/tooltip";
|
|
1
7
|
import { classNames } from "primereact/utils";
|
|
2
8
|
import { MouseEventHandler } from "react";
|
|
3
9
|
|
|
@@ -10,7 +16,6 @@ export function SimpleIconButton({
|
|
|
10
16
|
size,
|
|
11
17
|
id,
|
|
12
18
|
selected,
|
|
13
|
-
dark = false,
|
|
14
19
|
}: {
|
|
15
20
|
onClick: MouseEventHandler;
|
|
16
21
|
className?: string;
|
|
@@ -20,35 +25,32 @@ export function SimpleIconButton({
|
|
|
20
25
|
id?: string;
|
|
21
26
|
size?: "large" | "small";
|
|
22
27
|
selected?: boolean;
|
|
23
|
-
dark?: boolean;
|
|
24
28
|
}) {
|
|
25
|
-
const color = disabled
|
|
26
|
-
? "text-gray-300"
|
|
27
|
-
: dark
|
|
28
|
-
? "text-gray-400"
|
|
29
|
-
: "text-gray-600";
|
|
29
|
+
const color = disabled ? "text-gray-300" : "text-dark";
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
32
|
+
<Tooltip>
|
|
33
|
+
<TooltipTrigger asChild>
|
|
34
|
+
<button
|
|
35
|
+
id={id}
|
|
36
|
+
disabled={disabled}
|
|
37
|
+
className={classNames(
|
|
38
|
+
typeof icon === "string" ? icon + " p-[6px]" : "p-[4px]",
|
|
39
|
+
"rounded-full",
|
|
40
|
+
color,
|
|
41
|
+
disabled ? "cursor-none" : "hover:bg-gray-5 cursor-pointer",
|
|
42
|
+
className,
|
|
43
|
+
size === "large" ? "text-lg" : "text-xs",
|
|
44
|
+
selected ? "bg-theme-secondary-light text-theme-secondary" : "",
|
|
45
|
+
)}
|
|
46
|
+
onClick={(ev) => {
|
|
47
|
+
if (!disabled) onClick(ev);
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
{typeof icon !== "string" && icon}
|
|
51
|
+
</button>
|
|
52
|
+
</TooltipTrigger>
|
|
53
|
+
<TooltipContent>{label}</TooltipContent>
|
|
54
|
+
</Tooltip>
|
|
53
55
|
);
|
|
54
56
|
}
|
|
@@ -31,19 +31,19 @@ export function SimpleTabs({
|
|
|
31
31
|
|
|
32
32
|
return (
|
|
33
33
|
<>
|
|
34
|
-
<div className={twMerge("flex gap-4
|
|
34
|
+
<div className={twMerge("flex gap-4", className)}>
|
|
35
35
|
{tabs.map((tab, index) => (
|
|
36
36
|
<button
|
|
37
37
|
id={tab.id}
|
|
38
38
|
className={twMerge(
|
|
39
|
-
"flex cursor-pointer items-center gap-2",
|
|
39
|
+
"flex cursor-pointer items-center gap-2 px-6 pb-2",
|
|
40
40
|
activeTab === index ? "active-tab" : "",
|
|
41
41
|
)}
|
|
42
42
|
key={tab.id}
|
|
43
43
|
data-testid={tab.testId}
|
|
44
44
|
onClick={() => setActiveTab(index)}
|
|
45
45
|
style={{
|
|
46
|
-
fontWeight: index === activeTab ? "
|
|
46
|
+
fontWeight: index === activeTab ? "medium" : "normal",
|
|
47
47
|
borderBottom: index === activeTab ? "3px solid black" : "none",
|
|
48
48
|
marginBottom: index === activeTab ? "0" : "3px",
|
|
49
49
|
color: index === activeTab ? "black" : "gray",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export function SimpleToolbar({ children }: { children: React.ReactNode }) {
|
|
2
2
|
return (
|
|
3
|
-
<div className="
|
|
3
|
+
<div className="items-centerrounded-md border-gray-3 flex gap-2 border-b p-2 text-sm text-gray-500">
|
|
4
4
|
{children}
|
|
5
5
|
</div>
|
|
6
6
|
);
|
|
@@ -7,6 +7,7 @@ export type SplitterPanel = {
|
|
|
7
7
|
content: React.ReactNode;
|
|
8
8
|
collapsible?: boolean;
|
|
9
9
|
hidden?: boolean;
|
|
10
|
+
className?: string;
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
interface SplitterProps {
|
|
@@ -15,6 +16,9 @@ interface SplitterProps {
|
|
|
15
16
|
expandLabel?: React.ReactNode;
|
|
16
17
|
growablePanelIndex?: number; // Index of the panel that grows/shrinks
|
|
17
18
|
direction?: "horizontal" | "vertical"; // New prop for direction
|
|
19
|
+
className?: string;
|
|
20
|
+
splitterClassName?: string;
|
|
21
|
+
expandButtonClassName?: string;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
type StoredSizes = { panels: PanelSizes; lastCollapsed: boolean };
|
|
@@ -25,6 +29,9 @@ export const Splitter: React.FC<SplitterProps> = ({
|
|
|
25
29
|
localStorageKey = "splitter-sizes",
|
|
26
30
|
expandLabel = "Expand",
|
|
27
31
|
direction = "horizontal", // Default to horizontal for backward compatibility
|
|
32
|
+
className,
|
|
33
|
+
splitterClassName,
|
|
34
|
+
expandButtonClassName,
|
|
28
35
|
}) => {
|
|
29
36
|
const totalPanels = panels.length;
|
|
30
37
|
|
|
@@ -205,7 +212,7 @@ export const Splitter: React.FC<SplitterProps> = ({
|
|
|
205
212
|
return (
|
|
206
213
|
<div
|
|
207
214
|
onClick={!isResizing ? toggleLastPanelCollapse : undefined}
|
|
208
|
-
className=
|
|
215
|
+
className={`flex cursor-pointer items-center justify-center bg-gray-200 p-1 text-gray-500 select-none hover:bg-blue-700 hover:text-white ${expandButtonClassName || ""}`}
|
|
209
216
|
style={{
|
|
210
217
|
writingMode: isHorizontal ? "vertical-rl" : "horizontal-tb",
|
|
211
218
|
userSelect: "none",
|
|
@@ -341,12 +348,12 @@ export const Splitter: React.FC<SplitterProps> = ({
|
|
|
341
348
|
<div
|
|
342
349
|
className={`relative flex ${
|
|
343
350
|
isHorizontal
|
|
344
|
-
? "h-full w-[12px] cursor-ew-resize md:w-[
|
|
345
|
-
: "h-[12px] w-full cursor-ns-resize md:h-[
|
|
346
|
-
} shrink-0 items-center justify-center
|
|
351
|
+
? "h-full w-[12px] cursor-ew-resize md:w-[4px]"
|
|
352
|
+
: "h-[12px] w-full cursor-ns-resize md:h-[4px]"
|
|
353
|
+
} bg-gray-4 hover:bg-gray-3 shrink-0 items-center justify-center select-none ${splitterClassName || ""}`}
|
|
347
354
|
style={{
|
|
348
355
|
touchAction: "none",
|
|
349
|
-
|
|
356
|
+
|
|
350
357
|
minWidth: isHorizontal ? "4px" : undefined,
|
|
351
358
|
boxSizing: "border-box",
|
|
352
359
|
userSelect: "none",
|
|
@@ -428,7 +435,7 @@ export const Splitter: React.FC<SplitterProps> = ({
|
|
|
428
435
|
|
|
429
436
|
return (
|
|
430
437
|
<div
|
|
431
|
-
className={`flex ${direction === "horizontal" ? "flex-row" : "flex-col"} h-full w-full overflow-hidden`}
|
|
438
|
+
className={`flex ${direction === "horizontal" ? "flex-row" : "flex-col"} h-full w-full overflow-hidden ${className || ""}`}
|
|
432
439
|
ref={splitterRef}
|
|
433
440
|
>
|
|
434
441
|
{panels.map((panel, index) => (
|
|
@@ -437,7 +444,7 @@ export const Splitter: React.FC<SplitterProps> = ({
|
|
|
437
444
|
ref={(el) => {
|
|
438
445
|
panelRefs.current[index] = el;
|
|
439
446
|
}}
|
|
440
|
-
className=
|
|
447
|
+
className={`relative ${panel.className || ""}`}
|
|
441
448
|
style={{
|
|
442
449
|
flex: `${panel.defaultSize === "auto" ? 1 : 0} 1 ${getFlexBasis(
|
|
443
450
|
index,
|
|
@@ -8,7 +8,7 @@ import { useSearchParams } from "next/navigation";
|
|
|
8
8
|
import { useRouter } from "next/navigation";
|
|
9
9
|
import { SingleEditView } from "./SingleEditView";
|
|
10
10
|
import { getLanguagesAndVersions } from "../services/contentService";
|
|
11
|
-
import {
|
|
11
|
+
import { Splitter, SplitterPanel } from "../ui/Splitter";
|
|
12
12
|
import { ItemEditor } from "./ItemEditor";
|
|
13
13
|
|
|
14
14
|
export function CompareView() {
|
|
@@ -115,11 +115,10 @@ export function CompareView() {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
const originalSelector = (
|
|
118
|
-
<div className="flex flex-1 flex-shrink-0 items-center justify-center border-b
|
|
118
|
+
<div className="flex flex-1 flex-shrink-0 items-center justify-center border-b p-1 text-sm text-gray-600">
|
|
119
119
|
<LanguageSelector
|
|
120
120
|
selectedLanguage={editContext.contentEditorItem?.descriptor?.language}
|
|
121
121
|
showAllLanguagesSwitch={false}
|
|
122
|
-
darkMode
|
|
123
122
|
onLanguageSelected={(language) => {
|
|
124
123
|
if (!editContext.contentEditorItem) return;
|
|
125
124
|
editContext.loadItem({
|
|
@@ -154,7 +153,6 @@ export function CompareView() {
|
|
|
154
153
|
<LanguageSelector
|
|
155
154
|
selectedLanguage={compareTo?.language}
|
|
156
155
|
showAllLanguagesSwitch={false}
|
|
157
|
-
darkMode
|
|
158
156
|
onLanguageSelected={(language) => {
|
|
159
157
|
if (!compareTo?.id) return;
|
|
160
158
|
updateCompareTo({
|
|
@@ -205,9 +203,11 @@ export function CompareView() {
|
|
|
205
203
|
</div>
|
|
206
204
|
);
|
|
207
205
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
206
|
+
const panels: SplitterPanel[] = [
|
|
207
|
+
{
|
|
208
|
+
defaultSize: "auto",
|
|
209
|
+
name: "original",
|
|
210
|
+
content: (
|
|
211
211
|
<div className="flex h-full w-full flex-col items-stretch">
|
|
212
212
|
{originalSelector}
|
|
213
213
|
<SingleEditView
|
|
@@ -218,8 +218,12 @@ export function CompareView() {
|
|
|
218
218
|
itemDescriptor={editContext.contentEditorItem?.descriptor}
|
|
219
219
|
/>
|
|
220
220
|
</div>
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
),
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
defaultSize: "auto",
|
|
225
|
+
name: "compareTo",
|
|
226
|
+
content: (
|
|
223
227
|
<div className="flex h-full w-full flex-col items-stretch">
|
|
224
228
|
{compareToSelector}
|
|
225
229
|
{compareTo?.language && (
|
|
@@ -239,7 +243,15 @@ export function CompareView() {
|
|
|
239
243
|
</div>
|
|
240
244
|
)}
|
|
241
245
|
</div>
|
|
242
|
-
|
|
243
|
-
|
|
246
|
+
),
|
|
247
|
+
},
|
|
248
|
+
];
|
|
249
|
+
|
|
250
|
+
return (
|
|
251
|
+
<Splitter
|
|
252
|
+
panels={panels}
|
|
253
|
+
localStorageKey="compare-view-splitter"
|
|
254
|
+
className="flex h-full w-full"
|
|
255
|
+
/>
|
|
244
256
|
);
|
|
245
257
|
}
|
|
@@ -12,11 +12,13 @@ export function SingleEditView({
|
|
|
12
12
|
itemDescriptor,
|
|
13
13
|
compareView,
|
|
14
14
|
name,
|
|
15
|
+
className,
|
|
15
16
|
}: {
|
|
16
17
|
pageViewContext: PageViewContext;
|
|
17
18
|
itemDescriptor?: ItemDescriptor;
|
|
18
19
|
compareView: boolean;
|
|
19
20
|
name: string;
|
|
21
|
+
className?: string;
|
|
20
22
|
}) {
|
|
21
23
|
const editContext = useEditContext();
|
|
22
24
|
const [item, setItem] = useState<FullItem | undefined>(undefined);
|
|
@@ -52,6 +54,7 @@ export function SingleEditView({
|
|
|
52
54
|
compareView={compareView}
|
|
53
55
|
name={name}
|
|
54
56
|
followEditsDefault={true}
|
|
57
|
+
className={className}
|
|
55
58
|
/>
|
|
56
59
|
);
|
|
57
60
|
}
|
package/src/revision.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = "1.0.
|
|
2
|
-
export const buildDate = "2025-06-
|
|
1
|
+
export const version = "1.0.3959";
|
|
2
|
+
export const buildDate = "2025-06-22 17:51:55";
|
|
@@ -167,21 +167,26 @@ export function NewPage({ selectedItemId }: { selectedItemId?: string }) {
|
|
|
167
167
|
Open Existing
|
|
168
168
|
</ActionButton>
|
|
169
169
|
</div>
|
|
170
|
-
</div>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<div className="tour-pick-location flex-1">
|
|
175
|
-
<Card
|
|
170
|
+
</div>
|
|
171
|
+
<div className="flex flex-1 flex-col md:flex-row"> <div className={`tour-pick-location w-full md:w-1/2 ${
|
|
172
|
+
selectedItem ? 'h-full md:h-full' : ''
|
|
173
|
+
}`}><Card
|
|
176
174
|
icon={<i className="pi pi-map-marker text-sm"></i>}
|
|
177
175
|
title="Pick Location"
|
|
178
176
|
description="Select where to create your new page"
|
|
179
177
|
noPadding
|
|
180
|
-
className=
|
|
178
|
+
className={selectedItem ? 'h-full' : 'h-auto'}
|
|
181
179
|
>
|
|
182
|
-
<div className=
|
|
183
|
-
|
|
184
|
-
|
|
180
|
+
<div className={`px-4 pb-4 md:px-6 ${
|
|
181
|
+
selectedItem ? 'h-full' : ''
|
|
182
|
+
}`}>
|
|
183
|
+
<div className={`relative ${
|
|
184
|
+
selectedItem ? 'h-full' : ''
|
|
185
|
+
}`}> <div className={`overflow-auto ${
|
|
186
|
+
selectedItem
|
|
187
|
+
? 'absolute inset-0'
|
|
188
|
+
: 'min-h-[300px] md:min-h-[400px]'
|
|
189
|
+
}`}>
|
|
185
190
|
<ScrollingContentTree
|
|
186
191
|
selectedItemId={selectedItem?.id || selectedItemId}
|
|
187
192
|
onSelectionChange={(selection) => {
|
|
@@ -200,7 +205,7 @@ export function NewPage({ selectedItemId }: { selectedItemId?: string }) {
|
|
|
200
205
|
|
|
201
206
|
{/* Second card - only visible when location is selected */}
|
|
202
207
|
{selectedItem && (
|
|
203
|
-
<div className="flex
|
|
208
|
+
<div className="flex w-full flex-col h-auto md:w-1/2">
|
|
204
209
|
<Card
|
|
205
210
|
icon={<Palette className="h-4 w-4" />}
|
|
206
211
|
title="Choose Template or Wizard"
|
|
@@ -223,10 +228,10 @@ export function NewPage({ selectedItemId }: { selectedItemId?: string }) {
|
|
|
223
228
|
? "bg-theme-secondary-light border-theme-secondary"
|
|
224
229
|
: "bg-white",
|
|
225
230
|
)}
|
|
226
|
-
>
|
|
227
|
-
{
|
|
231
|
+
> {
|
|
228
232
|
<img
|
|
229
233
|
src={getAbsoluteIconUrl(option.icon)}
|
|
234
|
+
alt={option.name}
|
|
230
235
|
width="32"
|
|
231
236
|
height="32"
|
|
232
237
|
></img>
|
|
@@ -7,26 +7,20 @@ import { ItemDescriptor, FullItem } from "../editor/pageModel";
|
|
|
7
7
|
import { Card } from "../components/ui/card";
|
|
8
8
|
|
|
9
9
|
export function RecentPages() {
|
|
10
|
-
const savedHistory =
|
|
11
|
-
typeof window !== "undefined"
|
|
12
|
-
? localStorage.getItem("editor.browseHistory")
|
|
13
|
-
: null;
|
|
14
|
-
|
|
15
10
|
const editContext = useEditContext();
|
|
16
|
-
const recentPages: HistoryEntry[] = savedHistory
|
|
17
|
-
? JSON.parse(savedHistory)
|
|
18
|
-
: [];
|
|
19
11
|
|
|
20
12
|
const [history, setHistory] = useState<FullItem[]>();
|
|
21
13
|
const [selectedPage, setSelectedPage] = useState<HistoryEntry | null>(null);
|
|
22
14
|
|
|
15
|
+
const recentPages = editContext?.browseHistory || [];
|
|
16
|
+
|
|
23
17
|
useEffect(() => {
|
|
24
18
|
const fetchItems = async () => {
|
|
25
19
|
const pages = await editContext?.itemsRepository.getItems(recentPages);
|
|
26
20
|
setHistory(pages);
|
|
27
21
|
};
|
|
28
22
|
fetchItems();
|
|
29
|
-
}, [editContext?.itemsRepository]);
|
|
23
|
+
}, [editContext?.itemsRepository, recentPages]);
|
|
30
24
|
|
|
31
25
|
const handlePageSelect = (page: HistoryEntry) => {
|
|
32
26
|
setSelectedPage(page);
|
|
@@ -60,7 +54,7 @@ export function RecentPages() {
|
|
|
60
54
|
return (
|
|
61
55
|
<Card
|
|
62
56
|
icon={<i className="pi pi-history text-sm"></i>}
|
|
63
|
-
title="Recent Pages"
|
|
57
|
+
title="Recent Pages/Items"
|
|
64
58
|
description="Quick access to your recently viewed pages"
|
|
65
59
|
className="flex h-full flex-col"
|
|
66
60
|
>
|