@lupinum/ginko-studio 0.0.0-stage → 0.18.0
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/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +50 -2
- package/app/app.vue +22 -0
- package/app/assets/css/tailwind.css +170 -0
- package/app/assets/ui.css +59 -0
- package/app/components/AccountMenu.vue +57 -0
- package/app/components/AllNav.vue +55 -0
- package/app/components/AllShell.vue +37 -0
- package/app/components/AppToast.vue +14 -0
- package/app/components/ChangeDetail.vue +17 -0
- package/app/components/ChangeDiff.vue +190 -0
- package/app/components/ChangeRows.vue +333 -0
- package/app/components/CommandPalette.vue +212 -0
- package/app/components/ConflictPanel.vue +119 -0
- package/app/components/DeleteAccount.vue +62 -0
- package/app/components/DeleteSite.vue +44 -0
- package/app/components/EntryEditor.vue +956 -0
- package/app/components/EntryFields.vue +99 -0
- package/app/components/EntryGoneBanner.vue +45 -0
- package/app/components/EntryPublishPanel.vue +35 -0
- package/app/components/EntryRemoveDialog.vue +57 -0
- package/app/components/FactUses.vue +25 -0
- package/app/components/GinkoMark.vue +7 -0
- package/app/components/GrantsChecklist.vue +40 -0
- package/app/components/LanguageSwitch.vue +34 -0
- package/app/components/LocalDraftList.vue +77 -0
- package/app/components/LocalDraftOffer.vue +24 -0
- package/app/components/NavPlace.vue +56 -0
- package/app/components/NavTree.vue +595 -0
- package/app/components/OwnProposals.vue +96 -0
- package/app/components/PickSheet.vue +80 -0
- package/app/components/PreviewPane.vue +223 -0
- package/app/components/ProposalWithdraw.vue +26 -0
- package/app/components/RemovedList.vue +103 -0
- package/app/components/ReviewDecide.vue +90 -0
- package/app/components/ReviewItem.vue +101 -0
- package/app/components/ReviewPane.vue +93 -0
- package/app/components/ReviewRow.vue +106 -0
- package/app/components/SavedViews.vue +112 -0
- package/app/components/ScheduleField.vue +46 -0
- package/app/components/SignOut.vue +14 -0
- package/app/components/SiteBackup.vue +106 -0
- package/app/components/SiteConnect.vue +46 -0
- package/app/components/SiteDeleting.vue +40 -0
- package/app/components/SiteRail.vue +37 -0
- package/app/components/SiteTabBar.vue +52 -0
- package/app/components/SiteToken.vue +87 -0
- package/app/components/SiteZoneNote.vue +21 -0
- package/app/components/SplitHandle.vue +48 -0
- package/app/components/StorageNotice.vue +54 -0
- package/app/components/StudioPage.vue +28 -0
- package/app/components/TaskSheet.vue +545 -0
- package/app/components/TodayDrafts.vue +82 -0
- package/app/components/TranslationBadges.vue +16 -0
- package/app/components/TranslationList.vue +87 -0
- package/app/components/UsedInList.vue +25 -0
- package/app/components/WhyNotPublic.vue +38 -0
- package/app/components/editor/BlockMenu.vue +176 -0
- package/app/components/editor/ComponentSettings.vue +108 -0
- package/app/components/editor/ComponentView.vue +278 -0
- package/app/components/editor/EditorBubble.vue +64 -0
- package/app/components/editor/EditorToolbar.vue +208 -0
- package/app/components/editor/FactSettings.vue +98 -0
- package/app/components/editor/FindBar.vue +88 -0
- package/app/components/editor/ImageBubble.vue +144 -0
- package/app/components/editor/ImageDialog.vue +165 -0
- package/app/components/editor/InlineComponentView.vue +112 -0
- package/app/components/editor/LinkPopover.vue +119 -0
- package/app/components/editor/LinkTargetList.vue +54 -0
- package/app/components/editor/MarkdownEditor.vue +555 -0
- package/app/components/editor/PropField.vue +185 -0
- package/app/components/editor/SlashMenu.vue +69 -0
- package/app/components/editor/SourceToggle.vue +28 -0
- package/app/components/editor/TableBar.vue +115 -0
- package/app/components/editor/ToolToggle.vue +20 -0
- package/app/components/editor/context.ts +83 -0
- package/app/components/editor/dock.ts +30 -0
- package/app/components/editor/extensions.ts +398 -0
- package/app/components/editor/liveComponents.ts +21 -0
- package/app/components/editor/useImageUploads.ts +111 -0
- package/app/components/fields/FieldFrame.vue +77 -0
- package/app/components/fields/FocusPicker.vue +143 -0
- package/app/components/fields/FrameDialog.vue +28 -0
- package/app/components/fields/GinkoField.vue +205 -0
- package/app/components/fields/GinkoFieldChoice.vue +35 -0
- package/app/components/fields/GinkoFieldChoices.vue +42 -0
- package/app/components/fields/GinkoFieldDate.vue +52 -0
- package/app/components/fields/GinkoFieldDaterange.vue +32 -0
- package/app/components/fields/GinkoFieldFile.vue +97 -0
- package/app/components/fields/GinkoFieldImage.vue +228 -0
- package/app/components/fields/GinkoFieldList.vue +335 -0
- package/app/components/fields/GinkoFieldMoney.vue +67 -0
- package/app/components/fields/GinkoFieldNumber.vue +28 -0
- package/app/components/fields/GinkoFieldRef.vue +98 -0
- package/app/components/fields/ImageFrames.vue +70 -0
- package/app/components/fields/SlugChange.vue +75 -0
- package/app/components/fields/refs.ts +20 -0
- package/app/components/fields/sizes.ts +21 -0
- package/app/components/files/FileGrid.vue +128 -0
- package/app/components/files/FileInfoPanel.vue +172 -0
- package/app/components/files/FileRemoveDialog.vue +45 -0
- package/app/components/files/FilesBrowser.vue +510 -0
- package/app/components/files/FilesSidebar.vue +189 -0
- package/app/components/files/LibraryPicker.vue +30 -0
- package/app/components/files/LibraryPickerBody.vue +89 -0
- package/app/components/files/util.ts +27 -0
- package/app/components/today/TodayArea.vue +121 -0
- package/app/components/today/TodayCard.vue +43 -0
- package/app/components/today/TodayRows.vue +101 -0
- package/app/components/today/TodayVerdict.vue +53 -0
- package/app/components/today/TodayWaiting.vue +67 -0
- package/app/components/today/context.ts +31 -0
- package/app/components/ui/alert/Alert.vue +21 -0
- package/app/components/ui/alert/AlertDescription.vue +17 -0
- package/app/components/ui/alert/AlertTitle.vue +17 -0
- package/app/components/ui/alert/index.ts +24 -0
- package/app/components/ui/badge/Badge.vue +26 -0
- package/app/components/ui/badge/index.ts +31 -0
- package/app/components/ui/button/Button.vue +31 -0
- package/app/components/ui/button/index.ts +40 -0
- package/app/components/ui/calendar/Calendar.vue +162 -0
- package/app/components/ui/calendar/CalendarCell.vue +23 -0
- package/app/components/ui/calendar/CalendarCellTrigger.vue +39 -0
- package/app/components/ui/calendar/CalendarGrid.vue +23 -0
- package/app/components/ui/calendar/CalendarGridBody.vue +15 -0
- package/app/components/ui/calendar/CalendarGridHead.vue +16 -0
- package/app/components/ui/calendar/CalendarGridRow.vue +22 -0
- package/app/components/ui/calendar/CalendarHeadCell.vue +23 -0
- package/app/components/ui/calendar/CalendarHeader.vue +23 -0
- package/app/components/ui/calendar/CalendarHeading.vue +30 -0
- package/app/components/ui/calendar/CalendarNextButton.vue +31 -0
- package/app/components/ui/calendar/CalendarPrevButton.vue +31 -0
- package/app/components/ui/calendar/index.ts +14 -0
- package/app/components/ui/card/Card.vue +22 -0
- package/app/components/ui/card/CardAction.vue +17 -0
- package/app/components/ui/card/CardContent.vue +17 -0
- package/app/components/ui/card/CardDescription.vue +17 -0
- package/app/components/ui/card/CardFooter.vue +17 -0
- package/app/components/ui/card/CardHeader.vue +17 -0
- package/app/components/ui/card/CardTitle.vue +17 -0
- package/app/components/ui/card/index.ts +7 -0
- package/app/components/ui/checkbox/Checkbox.vue +35 -0
- package/app/components/ui/checkbox/index.ts +1 -0
- package/app/components/ui/collapsible/Collapsible.vue +19 -0
- package/app/components/ui/collapsible/CollapsibleContent.vue +15 -0
- package/app/components/ui/collapsible/CollapsibleTrigger.vue +15 -0
- package/app/components/ui/collapsible/index.ts +3 -0
- package/app/components/ui/command/Command.vue +93 -0
- package/app/components/ui/command/CommandDialog.vue +31 -0
- package/app/components/ui/command/CommandEmpty.vue +27 -0
- package/app/components/ui/command/CommandGroup.vue +45 -0
- package/app/components/ui/command/CommandInput.vue +39 -0
- package/app/components/ui/command/CommandItem.vue +76 -0
- package/app/components/ui/command/CommandList.vue +25 -0
- package/app/components/ui/command/CommandSeparator.vue +21 -0
- package/app/components/ui/command/CommandShortcut.vue +17 -0
- package/app/components/ui/command/index.ts +25 -0
- package/app/components/ui/dialog/Dialog.vue +19 -0
- package/app/components/ui/dialog/DialogClose.vue +15 -0
- package/app/components/ui/dialog/DialogContent.vue +55 -0
- package/app/components/ui/dialog/DialogDescription.vue +23 -0
- package/app/components/ui/dialog/DialogFooter.vue +27 -0
- package/app/components/ui/dialog/DialogHeader.vue +17 -0
- package/app/components/ui/dialog/DialogOverlay.vue +21 -0
- package/app/components/ui/dialog/DialogScrollContent.vue +61 -0
- package/app/components/ui/dialog/DialogTitle.vue +23 -0
- package/app/components/ui/dialog/DialogTrigger.vue +15 -0
- package/app/components/ui/dialog/index.ts +10 -0
- package/app/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
- package/app/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -0
- package/app/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/app/components/ui/dropdown-menu/DropdownMenuGroup.vue +15 -0
- package/app/components/ui/dropdown-menu/DropdownMenuItem.vue +31 -0
- package/app/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/app/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/app/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
- package/app/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
- package/app/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/app/components/ui/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/app/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/app/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/app/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/app/components/ui/dropdown-menu/index.ts +16 -0
- package/app/components/ui/input/Input.vue +33 -0
- package/app/components/ui/input/index.ts +1 -0
- package/app/components/ui/label/Label.vue +26 -0
- package/app/components/ui/label/index.ts +1 -0
- package/app/components/ui/native-select/NativeSelect.vue +50 -0
- package/app/components/ui/native-select/NativeSelectOptGroup.vue +12 -0
- package/app/components/ui/native-select/NativeSelectOption.vue +12 -0
- package/app/components/ui/native-select/index.ts +3 -0
- package/app/components/ui/number-field/NumberField.vue +20 -0
- package/app/components/ui/number-field/NumberFieldContent.vue +14 -0
- package/app/components/ui/number-field/NumberFieldDecrement.vue +22 -0
- package/app/components/ui/number-field/NumberFieldIncrement.vue +22 -0
- package/app/components/ui/number-field/NumberFieldInput.vue +16 -0
- package/app/components/ui/number-field/index.ts +5 -0
- package/app/components/ui/popover/Popover.vue +19 -0
- package/app/components/ui/popover/PopoverAnchor.vue +15 -0
- package/app/components/ui/popover/PopoverContent.vue +45 -0
- package/app/components/ui/popover/PopoverTrigger.vue +15 -0
- package/app/components/ui/popover/index.ts +4 -0
- package/app/components/ui/radio-group/RadioGroup.vue +25 -0
- package/app/components/ui/radio-group/RadioGroupItem.vue +40 -0
- package/app/components/ui/radio-group/index.ts +2 -0
- package/app/components/ui/scroll-area/ScrollArea.vue +33 -0
- package/app/components/ui/scroll-area/ScrollBar.vue +32 -0
- package/app/components/ui/scroll-area/index.ts +2 -0
- package/app/components/ui/select/Select.vue +19 -0
- package/app/components/ui/select/SelectContent.vue +51 -0
- package/app/components/ui/select/SelectGroup.vue +15 -0
- package/app/components/ui/select/SelectItem.vue +44 -0
- package/app/components/ui/select/SelectItemText.vue +15 -0
- package/app/components/ui/select/SelectLabel.vue +17 -0
- package/app/components/ui/select/SelectScrollDownButton.vue +26 -0
- package/app/components/ui/select/SelectScrollUpButton.vue +26 -0
- package/app/components/ui/select/SelectSeparator.vue +19 -0
- package/app/components/ui/select/SelectTrigger.vue +33 -0
- package/app/components/ui/select/SelectValue.vue +15 -0
- package/app/components/ui/select/index.ts +11 -0
- package/app/components/ui/separator/Separator.vue +29 -0
- package/app/components/ui/separator/index.ts +1 -0
- package/app/components/ui/sheet/Sheet.vue +19 -0
- package/app/components/ui/sheet/SheetClose.vue +15 -0
- package/app/components/ui/sheet/SheetContent.vue +64 -0
- package/app/components/ui/sheet/SheetDescription.vue +21 -0
- package/app/components/ui/sheet/SheetFooter.vue +16 -0
- package/app/components/ui/sheet/SheetHeader.vue +15 -0
- package/app/components/ui/sheet/SheetOverlay.vue +21 -0
- package/app/components/ui/sheet/SheetTitle.vue +21 -0
- package/app/components/ui/sheet/SheetTrigger.vue +15 -0
- package/app/components/ui/sheet/index.ts +8 -0
- package/app/components/ui/skeleton/Skeleton.vue +17 -0
- package/app/components/ui/skeleton/index.ts +1 -0
- package/app/components/ui/sonner/Sonner.vue +42 -0
- package/app/components/ui/sonner/index.ts +1 -0
- package/app/components/ui/switch/Switch.vue +38 -0
- package/app/components/ui/switch/index.ts +1 -0
- package/app/components/ui/tabs/Tabs.vue +24 -0
- package/app/components/ui/tabs/TabsContent.vue +21 -0
- package/app/components/ui/tabs/TabsList.vue +24 -0
- package/app/components/ui/tabs/TabsTrigger.vue +26 -0
- package/app/components/ui/tabs/index.ts +4 -0
- package/app/components/ui/tags-input/TagsInput.vue +26 -0
- package/app/components/ui/tags-input/TagsInputInput.vue +17 -0
- package/app/components/ui/tags-input/TagsInputItem.vue +20 -0
- package/app/components/ui/tags-input/TagsInputItemDelete.vue +22 -0
- package/app/components/ui/tags-input/TagsInputItemText.vue +19 -0
- package/app/components/ui/tags-input/index.ts +5 -0
- package/app/components/ui/textarea/Textarea.vue +28 -0
- package/app/components/ui/textarea/index.ts +1 -0
- package/app/components/ui/toggle/Toggle.vue +35 -0
- package/app/components/ui/toggle/index.ts +31 -0
- package/app/components/ui/toggle-group/ToggleGroup.vue +49 -0
- package/app/components/ui/toggle-group/ToggleGroupItem.vue +46 -0
- package/app/components/ui/toggle-group/index.ts +2 -0
- package/app/components/ui/tooltip/Tooltip.vue +19 -0
- package/app/components/ui/tooltip/TooltipContent.vue +34 -0
- package/app/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/app/components/ui/tooltip/TooltipTrigger.vue +15 -0
- package/app/components/ui/tooltip/index.ts +4 -0
- package/app/composables/useAll.ts +39 -0
- package/app/composables/useAreaList.ts +18 -0
- package/app/composables/useBottomBar.ts +6 -0
- package/app/composables/useConvexGinkoAssets.ts +35 -0
- package/app/composables/useEntryForm.ts +448 -0
- package/app/composables/useFacts.ts +35 -0
- package/app/composables/useFilesLibrary.ts +201 -0
- package/app/composables/useKeptEntry.ts +15 -0
- package/app/composables/useLocalDraft.ts +173 -0
- package/app/composables/useLocalDraftRows.ts +47 -0
- package/app/composables/useOps.ts +365 -0
- package/app/composables/usePageHeader.ts +59 -0
- package/app/composables/useRecentEntries.ts +46 -0
- package/app/composables/useSignOut.ts +57 -0
- package/app/composables/useSiteData.ts +59 -0
- package/app/composables/useSiteRefs.ts +22 -0
- package/app/composables/useStillRight.ts +30 -0
- package/app/composables/useStudioLocale.ts +40 -0
- package/app/composables/useTextOf.ts +11 -0
- package/app/composables/useToast.ts +38 -0
- package/app/composables/useTodayAreas.ts +398 -0
- package/app/composables/useUpdateSite.ts +27 -0
- package/app/composables/useUpload.ts +59 -0
- package/app/convex-auth.ts +6 -0
- package/app/error.vue +32 -0
- package/app/layouts/default.vue +29 -0
- package/app/layouts/site.vue +222 -0
- package/app/lib/utils.ts +7 -0
- package/app/pages/account.vue +139 -0
- package/app/pages/connect.vue +118 -0
- package/app/pages/index.vue +114 -0
- package/app/pages/invite/[token].vue +92 -0
- package/app/pages/login.vue +106 -0
- package/app/pages/new.vue +114 -0
- package/app/pages/s/[site]/ai/index.vue +197 -0
- package/app/pages/s/[site]/all/[brick]/[entry].vue +86 -0
- package/app/pages/s/[site]/all/[brick]/index.vue +179 -0
- package/app/pages/s/[site]/all/index.vue +112 -0
- package/app/pages/s/[site]/files/index.vue +28 -0
- package/app/pages/s/[site]/history/index.vue +70 -0
- package/app/pages/s/[site]/index.vue +309 -0
- package/app/pages/s/[site]/review/index.vue +206 -0
- package/app/pages/s/[site]/team/index.vue +509 -0
- package/app/utils/backup.ts +51 -0
- package/app/utils/basics.ts +24 -0
- package/app/utils/content.ts +395 -0
- package/app/utils/facts.ts +26 -0
- package/app/utils/frames.ts +26 -0
- package/app/utils/groups.ts +28 -0
- package/app/utils/keys.ts +3 -0
- package/app/utils/labels.ts +37 -0
- package/app/utils/markdownDiff.ts +53 -0
- package/app/utils/messageOf.ts +17 -0
- package/app/utils/origin.ts +9 -0
- package/app/utils/paragraphDiff.ts +35 -0
- package/app/utils/previewPage.ts +49 -0
- package/app/utils/review.ts +9 -0
- package/app/utils/sheetDialog.ts +15 -0
- package/app/utils/shrunk.ts +41 -0
- package/app/utils/siteLinks.ts +16 -0
- package/app/utils/sites.ts +37 -0
- package/app/utils/size.ts +20 -0
- package/app/utils/slugChange.ts +15 -0
- package/app/utils/textOf.ts +65 -0
- package/app/utils/today.ts +118 -0
- package/app/utils/when.ts +86 -0
- package/app/utils/who.ts +30 -0
- package/i18n/de.json +1361 -0
- package/i18n/en.json +1361 -0
- package/i18n/es.json +1361 -0
- package/i18n/fr.json +1361 -0
- package/modules/server-api.ts +16 -0
- package/modules/server-messages.ts +14 -0
- package/nuxt.config.ts +102 -0
- package/package.json +71 -3
- package/server/ginko-platform.ts +13 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# @lupinum/ginko-studio
|
|
2
|
+
|
|
3
|
+
## 0.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#148](https://github.com/lupinum-dev/ginko/pull/148) [`38dd667`](https://github.com/lupinum-dev/ginko/commit/38dd667394ceb1134bcd7d0f627c7004cee08841) Thanks [@Mat4m0](https://github.com/Mat4m0)! - Add `@lupinum/ginko-server`, `@lupinum/ginko-studio` and `@lupinum/ginko-editor` to npm, so people can host the Ginko platform themselves.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`05c6945`](https://github.com/lupinum-dev/ginko/commit/05c69459b076ca87e9fee376098c10f3b15f66f7), [`ab3b70e`](https://github.com/lupinum-dev/ginko/commit/ab3b70e6ceb230f2de490c818553a4cde78d626c), [`ed2eb8e`](https://github.com/lupinum-dev/ginko/commit/ed2eb8ebc757f20bbfee8077fc6a3ecc690c38e5), [`d89413d`](https://github.com/lupinum-dev/ginko/commit/d89413d2b7ab21863e349bd91c3704587f44b808), [`ab3b70e`](https://github.com/lupinum-dev/ginko/commit/ab3b70e6ceb230f2de490c818553a4cde78d626c), [`103d424`](https://github.com/lupinum-dev/ginko/commit/103d4243c63e3ad0e9507a9efb0173eb1b3b4573), [`d89413d`](https://github.com/lupinum-dev/ginko/commit/d89413d2b7ab21863e349bd91c3704587f44b808), [`ab3b70e`](https://github.com/lupinum-dev/ginko/commit/ab3b70e6ceb230f2de490c818553a4cde78d626c), [`d89413d`](https://github.com/lupinum-dev/ginko/commit/d89413d2b7ab21863e349bd91c3704587f44b808), [`d89413d`](https://github.com/lupinum-dev/ginko/commit/d89413d2b7ab21863e349bd91c3704587f44b808), [`38dd667`](https://github.com/lupinum-dev/ginko/commit/38dd667394ceb1134bcd7d0f627c7004cee08841)]:
|
|
12
|
+
- @lupinum/ginko@0.18.0
|
|
13
|
+
- @lupinum/ginko-server@0.18.0
|
|
14
|
+
- @lupinum/ginko-editor@0.18.0
|
|
15
|
+
- @lupinum/ginko-components@0.18.0
|
|
16
|
+
- @lupinum/ginko-i18n@0.18.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Lupinum OG
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,51 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @lupinum/ginko-studio
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
You do not install this package by hand. A platform project from `npm create ginko@latest my-cms -- --platform`
|
|
4
|
+
extends it, and `ginko-platform setup` deploys it to Vercel: the guide [Host the platform](https://ginko.lupinum.com/docs/host-the-platform) has the steps.
|
|
5
|
+
The sections below are the reference for the layer, its environment variables and work on this repository.
|
|
6
|
+
|
|
7
|
+
The Ginko platform UI as a [Nuxt layer](https://nuxt.com/docs/guide/going-further/layers): sign-in,
|
|
8
|
+
quick tasks, full editor, preview and history. It talks to the Convex backend in
|
|
9
|
+
[`@lupinum/ginko-server`](../ginko-server). `apps/platform` is the reference host.
|
|
10
|
+
|
|
11
|
+
## Use
|
|
12
|
+
|
|
13
|
+
`apps/platform` is the host. Its `nuxt.config.ts` only extends the layer:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
export default defineNuxtConfig({
|
|
17
|
+
extends: ['@lupinum/ginko-studio'],
|
|
18
|
+
})
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The layer registers `@lupinum/better-convex-nuxt`, the sign-in client, the styles and the `noindex`
|
|
22
|
+
header. A small module in the layer points `#convex/api` at the generated API that
|
|
23
|
+
`@lupinum/ginko-server` ships in `convex/_generated`, so the host needs no codegen. The host takes over the
|
|
24
|
+
whole app: do not extend a website with this layer. For the Convex side and the deploy steps, see the
|
|
25
|
+
[`ginko-server` README](../ginko-server/README.md).
|
|
26
|
+
|
|
27
|
+
## Environment variables
|
|
28
|
+
|
|
29
|
+
Read at build and start time by the host. In development, `pnpm dev` reads `packages/ginko-server/.env.local`
|
|
30
|
+
(the file that `convex dev` writes). A production build stops when `SITE_URL`, the Convex URL or the Convex site URL
|
|
31
|
+
is missing; development uses the local defaults. On Vercel, set them in the **Production** environment (the build
|
|
32
|
+
reads them too); the production build also needs `CONVEX_DEPLOY_KEY`. Preview builds need their own values for a
|
|
33
|
+
staging deployment, or preview builds turned off. See the
|
|
34
|
+
[`ginko-server` README](../ginko-server/README.md#deploy-the-platform-lupinum-operators).
|
|
35
|
+
|
|
36
|
+
| Name | Purpose |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `NUXT_PUBLIC_CONVEX_URL` (or `CONVEX_URL`) | Convex deployment URL (`https://<deployment>.convex.cloud`). Development default `http://127.0.0.1:3210` (the local backend). |
|
|
39
|
+
| `NUXT_PUBLIC_CONVEX_SITE_URL` (or `CONVEX_SITE_URL`) | Convex HTTP actions URL (`https://<deployment>.convex.site`). Sign-in goes there; `/bundle/**` is proxied to it. Development default `http://127.0.0.1:3211`. |
|
|
40
|
+
| `SITE_URL` | Public origin of this UI. It must equal `SITE_URL` on the Convex deployment. Development default `http://localhost:3100`. |
|
|
41
|
+
| `BCN_AUTH_TRUSTED_CLIENT_IP_HEADER` | Required outside local development. Header that your host sets to the client IP (`x-real-ip` on Vercel). |
|
|
42
|
+
| `BCN_AUTH_PROXY_IP_SECRET` | Required outside local development. The same secret as on the Convex deployment. |
|
|
43
|
+
|
|
44
|
+
Prefer the `NUXT_PUBLIC_*` names on a host; when both names are set, they win.
|
|
45
|
+
|
|
46
|
+
The Studio serves a public discovery document at `/.well-known/ginko-platform`: `{ "backend": <the Convex HTTP
|
|
47
|
+
actions URL>, "version": <this package's version> }`. The `ginko` CLI reads it once per run, so a website's
|
|
48
|
+
`GINKO_PLATFORM` can be the Studio's address; it sends releases to `backend`.
|
|
49
|
+
|
|
50
|
+
`/connect` confirms `ginko connect`: the person types the code from the terminal, picks a site they manage (owner or
|
|
51
|
+
admin) and confirms; the computer then gets a publishing key. The code is never part of the address.
|
package/app/app.vue
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ConfigProvider } from 'reka-ui'
|
|
3
|
+
|
|
4
|
+
// Undo from the message must outlive the sheet that saved (see useOps).
|
|
5
|
+
provideLastingOps()
|
|
6
|
+
// The signed-in person's language setting wins over the browser's (see useAccountLocale).
|
|
7
|
+
useAccountLocale()
|
|
8
|
+
// reka-ui builds its ids with Vue's useId, which depends on the position in the component tree; behind
|
|
9
|
+
// Nuxt's async layout that position differs between server and client (hydration mismatch on every id).
|
|
10
|
+
// A counter per app instance gives the same ids on both sides, in render order.
|
|
11
|
+
let count = 0
|
|
12
|
+
const useStableId = (deterministicId?: string, prefix = 'reka') => deterministicId ?? `${prefix}-${count++}`
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<ConfigProvider :use-id="useStableId">
|
|
17
|
+
<NuxtLayout>
|
|
18
|
+
<NuxtPage />
|
|
19
|
+
</NuxtLayout>
|
|
20
|
+
<AppToast />
|
|
21
|
+
</ConfigProvider>
|
|
22
|
+
</template>
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/* Tailwind v4 and the shadcn tokens of the Studio.
|
|
2
|
+
Token NAMES are the shadcn ones because ginko-components styles the content with them
|
|
3
|
+
(--background, --foreground, --primary, --muted, --border, --radius ...): content then looks right
|
|
4
|
+
inside the Studio. Token VALUES are PrimeVue Aura's default pairing, emerald on zinc. Stock emerald-500
|
|
5
|
+
with white text is 2.5:1, so light mode fills controls with emerald-700 (5.5:1); dark mode keeps
|
|
6
|
+
emerald-400 with dark text. Dark mode switches like ginko-components does: .dark / [data-theme="dark"],
|
|
7
|
+
or the system preference unless [data-theme="light"] is set.
|
|
8
|
+
Surfaces, lowest to highest: --canvas (behind the rail and the framed panel on wide screens), --sidebar (side
|
|
9
|
+
columns inside the panel), --card / --background (the page), --popover. Dark mode lifts each step a little and keeps
|
|
10
|
+
borders one step above the page, so panels read as surfaces instead of outlines (design A, 2026-10-20). */
|
|
11
|
+
@layer theme, base, components, utilities;
|
|
12
|
+
@import 'tailwindcss/theme.css' layer(theme);
|
|
13
|
+
@import 'tailwindcss/preflight.css' layer(base);
|
|
14
|
+
@import 'tailwindcss/utilities.css' layer(utilities);
|
|
15
|
+
@import 'tw-animate-css';
|
|
16
|
+
/* Tailwind scans from the host app's folder; the layer's own files are outside it. */
|
|
17
|
+
@source '../..';
|
|
18
|
+
|
|
19
|
+
@custom-variant dark {
|
|
20
|
+
&:where(.dark, .dark *, [data-theme='dark'], [data-theme='dark'] *) { @slot; }
|
|
21
|
+
@media (prefers-color-scheme: dark) {
|
|
22
|
+
&:where(:root:not([data-theme='light']), :root:not([data-theme='light']) *) { @slot; }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:root {
|
|
27
|
+
--radius: 0.625rem;
|
|
28
|
+
--canvas: #f4f4f5;
|
|
29
|
+
--background: #ffffff;
|
|
30
|
+
--foreground: #27272a;
|
|
31
|
+
--card: #ffffff;
|
|
32
|
+
--card-foreground: #27272a;
|
|
33
|
+
--popover: #ffffff;
|
|
34
|
+
--popover-foreground: #27272a;
|
|
35
|
+
--primary: #047857;
|
|
36
|
+
--primary-foreground: #ffffff;
|
|
37
|
+
--secondary: #f4f4f5;
|
|
38
|
+
--secondary-foreground: #27272a;
|
|
39
|
+
--muted: #f4f4f5;
|
|
40
|
+
--muted-foreground: #6b6b74;
|
|
41
|
+
--accent: #ecfdf5;
|
|
42
|
+
--accent-foreground: #065f46;
|
|
43
|
+
--destructive: #b91c1c;
|
|
44
|
+
--border: #e7e7ea;
|
|
45
|
+
--input: #d4d4d8;
|
|
46
|
+
--ring: #047857;
|
|
47
|
+
--success: #15803d;
|
|
48
|
+
--warning: #854d0e;
|
|
49
|
+
--sidebar: #fafafa;
|
|
50
|
+
--sidebar-foreground: #27272a;
|
|
51
|
+
--sidebar-primary: #047857;
|
|
52
|
+
--sidebar-primary-foreground: #ffffff;
|
|
53
|
+
--sidebar-accent: #f4f4f5;
|
|
54
|
+
--sidebar-accent-foreground: #27272a;
|
|
55
|
+
--sidebar-border: #e4e4e7;
|
|
56
|
+
--sidebar-ring: #10b981;
|
|
57
|
+
color-scheme: light;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@media (prefers-color-scheme: dark) {
|
|
61
|
+
:root:not([data-theme='light']) {
|
|
62
|
+
--canvas: #09090b;
|
|
63
|
+
--background: #131316;
|
|
64
|
+
--foreground: #fafafa;
|
|
65
|
+
--card: #131316;
|
|
66
|
+
--card-foreground: #fafafa;
|
|
67
|
+
--popover: #1a1a1e;
|
|
68
|
+
--popover-foreground: #fafafa;
|
|
69
|
+
--primary: #34d399;
|
|
70
|
+
--primary-foreground: #09090b;
|
|
71
|
+
--secondary: #1f1f24;
|
|
72
|
+
--secondary-foreground: #fafafa;
|
|
73
|
+
--muted: #1c1c20;
|
|
74
|
+
--muted-foreground: #a1a1aa;
|
|
75
|
+
--accent: #10291f;
|
|
76
|
+
--accent-foreground: #6ee7b7;
|
|
77
|
+
--destructive: #f87171;
|
|
78
|
+
--border: #26262c;
|
|
79
|
+
--input: #52525b;
|
|
80
|
+
--ring: #34d399;
|
|
81
|
+
--success: #4ade80;
|
|
82
|
+
--warning: #fbbf24;
|
|
83
|
+
--sidebar: #101012;
|
|
84
|
+
--sidebar-foreground: #fafafa;
|
|
85
|
+
--sidebar-primary: #34d399;
|
|
86
|
+
--sidebar-primary-foreground: #09090b;
|
|
87
|
+
--sidebar-accent: #1f1f24;
|
|
88
|
+
--sidebar-accent-foreground: #fafafa;
|
|
89
|
+
--sidebar-border: #26262c;
|
|
90
|
+
--sidebar-ring: #34d399;
|
|
91
|
+
color-scheme: dark;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.dark,
|
|
96
|
+
[data-theme='dark'] {
|
|
97
|
+
--canvas: #09090b;
|
|
98
|
+
--background: #131316;
|
|
99
|
+
--foreground: #fafafa;
|
|
100
|
+
--card: #131316;
|
|
101
|
+
--card-foreground: #fafafa;
|
|
102
|
+
--popover: #1a1a1e;
|
|
103
|
+
--popover-foreground: #fafafa;
|
|
104
|
+
--primary: #34d399;
|
|
105
|
+
--primary-foreground: #09090b;
|
|
106
|
+
--secondary: #1f1f24;
|
|
107
|
+
--secondary-foreground: #fafafa;
|
|
108
|
+
--muted: #1c1c20;
|
|
109
|
+
--muted-foreground: #a1a1aa;
|
|
110
|
+
--accent: #10291f;
|
|
111
|
+
--accent-foreground: #6ee7b7;
|
|
112
|
+
--destructive: #f87171;
|
|
113
|
+
--border: #26262c;
|
|
114
|
+
--input: #52525b;
|
|
115
|
+
--ring: #34d399;
|
|
116
|
+
--success: #4ade80;
|
|
117
|
+
--warning: #fbbf24;
|
|
118
|
+
--sidebar: #101012;
|
|
119
|
+
--sidebar-foreground: #fafafa;
|
|
120
|
+
--sidebar-primary: #34d399;
|
|
121
|
+
--sidebar-primary-foreground: #09090b;
|
|
122
|
+
--sidebar-accent: #1f1f24;
|
|
123
|
+
--sidebar-accent-foreground: #fafafa;
|
|
124
|
+
--sidebar-border: #26262c;
|
|
125
|
+
--sidebar-ring: #34d399;
|
|
126
|
+
color-scheme: dark;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@theme inline {
|
|
130
|
+
--font-sans: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
131
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
132
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
133
|
+
--radius-lg: var(--radius);
|
|
134
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
135
|
+
--color-canvas: var(--canvas);
|
|
136
|
+
--color-background: var(--background);
|
|
137
|
+
--color-foreground: var(--foreground);
|
|
138
|
+
--color-card: var(--card);
|
|
139
|
+
--color-card-foreground: var(--card-foreground);
|
|
140
|
+
--color-popover: var(--popover);
|
|
141
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
142
|
+
--color-primary: var(--primary);
|
|
143
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
144
|
+
--color-secondary: var(--secondary);
|
|
145
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
146
|
+
--color-muted: var(--muted);
|
|
147
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
148
|
+
--color-accent: var(--accent);
|
|
149
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
150
|
+
--color-destructive: var(--destructive);
|
|
151
|
+
--color-border: var(--border);
|
|
152
|
+
--color-input: var(--input);
|
|
153
|
+
--color-ring: var(--ring);
|
|
154
|
+
--color-success: var(--success);
|
|
155
|
+
--color-warning: var(--warning);
|
|
156
|
+
--color-sidebar: var(--sidebar);
|
|
157
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
158
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
159
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
160
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
161
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
162
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
163
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@layer base {
|
|
167
|
+
* { @apply border-border outline-ring/50; }
|
|
168
|
+
/* Titles and texts are what owners type: a pasted URL or a long compound must wrap instead of widening the page. */
|
|
169
|
+
html { overflow-wrap: anywhere; }
|
|
170
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* Ginko platform UI: a tool, not a brand. Calm, light, readable in daylight on a phone.
|
|
2
|
+
Base element styles on the shadcn tokens in css/tailwind.css; components style themselves with utilities.
|
|
3
|
+
Self-hosted font (no third parties). */
|
|
4
|
+
@import '@fontsource-variable/inter/index.css';
|
|
5
|
+
|
|
6
|
+
:root { accent-color: var(--primary); }
|
|
7
|
+
|
|
8
|
+
@layer components {
|
|
9
|
+
|
|
10
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
11
|
+
/* The sticky site header (about 3.5rem) must not cover what focus or a link scrolls to. */
|
|
12
|
+
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--input) var(--background); scroll-padding-top: 5rem; }
|
|
13
|
+
body {
|
|
14
|
+
margin: 0;
|
|
15
|
+
background: var(--background);
|
|
16
|
+
color: var(--foreground);
|
|
17
|
+
font: 400 1rem/1.5 var(--font-sans);
|
|
18
|
+
caret-color: var(--primary);
|
|
19
|
+
-webkit-font-smoothing: antialiased;
|
|
20
|
+
}
|
|
21
|
+
::selection { background: var(--accent); }
|
|
22
|
+
/* Pages of a site on wide screens: the canvas behind the rail and the framed panel, also in the overscroll area. */
|
|
23
|
+
@media (min-width: 900px) { body.studio-site { background: var(--canvas); } }
|
|
24
|
+
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
|
|
25
|
+
/* Page and section titles: one size each; a utility class on the tag still wins (utilities come after this layer). */
|
|
26
|
+
h1 { font-size: 1.5rem; font-weight: 600; }
|
|
27
|
+
h2 { font-size: 1.25rem; font-weight: 600; }
|
|
28
|
+
p { margin: 0; }
|
|
29
|
+
/* Figures line up in dates and times; running text keeps Inter's normal figures (tabular widens hyphens). */
|
|
30
|
+
time { font-variant-numeric: tabular-nums; }
|
|
31
|
+
a:where(:not([data-slot])) { color: var(--primary); text-underline-offset: 0.18em; }
|
|
32
|
+
button, input, select, textarea { font: inherit; color: inherit; }
|
|
33
|
+
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
|
|
34
|
+
|
|
35
|
+
@media (prefers-reduced-motion: reduce) {
|
|
36
|
+
*, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; }
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Toasts (vue-sonner, unlayered, so these sit outside the layer too): an action and the close button big enough to
|
|
42
|
+
hit on a phone between services. */
|
|
43
|
+
[data-sonner-toast] [data-button] { height: 2rem; padding-inline: 0.75rem; border-radius: var(--radius-md); font-size: 0.875rem; font-weight: 500; }
|
|
44
|
+
[data-sonner-toast] [data-close-button] { width: 1.75rem; height: 1.75rem; }
|
|
45
|
+
@media (pointer: coarse) {
|
|
46
|
+
[data-sonner-toast] [data-button] { height: 2.5rem; }
|
|
47
|
+
[data-sonner-toast] [data-close-button] { width: 2.25rem; height: 2.25rem; }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* The clear button of search fields: the Lucide x in the muted text colour instead of the browser's own. */
|
|
51
|
+
input[type='search']::-webkit-search-cancel-button {
|
|
52
|
+
-webkit-appearance: none;
|
|
53
|
+
appearance: none;
|
|
54
|
+
width: 1rem;
|
|
55
|
+
height: 1rem;
|
|
56
|
+
background: var(--muted-foreground);
|
|
57
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!-- The person's menu at the foot of the rail (and top right on phones): who is signed in, "Update website now"
|
|
2
|
+
for owner and admin, My sites, Account settings, sign out on other devices, sign out. -->
|
|
3
|
+
<script setup lang="ts">
|
|
4
|
+
import { api } from '#convex/api'
|
|
5
|
+
import { LayoutGridIcon, LogOutIcon, MonitorSmartphoneIcon, RefreshCwIcon, UserRoundCogIcon } from '@lucide/vue'
|
|
6
|
+
import { useSignOut } from '../composables/useSignOut'
|
|
7
|
+
|
|
8
|
+
const props = defineProps<{ manager: boolean, lastRefresh?: number | null, updating: boolean, side?: 'top' | 'right' | 'bottom' }>()
|
|
9
|
+
const emit = defineEmits<{ update: [] }>()
|
|
10
|
+
const { user } = useConvexAuth()
|
|
11
|
+
const { t, format } = useI18n()
|
|
12
|
+
// The avatar shows the person: the first letter of the name they gave themselves (Account settings), else of the email.
|
|
13
|
+
// Read in the browser only: a server read defers this menu in the server render, so the reka ids of the menus after
|
|
14
|
+
// it were handed out in another order than in the browser (a hydration mismatch on every site page).
|
|
15
|
+
const { data: settings } = useConvexQuery(api.account.settings, {}, { server: false })
|
|
16
|
+
const name = computed(() => settings.value?.name?.trim() || undefined)
|
|
17
|
+
const initial = computed(() => (name.value ?? user.value?.email ?? '?').charAt(0).toUpperCase())
|
|
18
|
+
const { busy, signOut, signOutOthers } = useSignOut()
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<DropdownMenu>
|
|
23
|
+
<DropdownMenuTrigger as-child>
|
|
24
|
+
<button
|
|
25
|
+
type="button" :aria-label="t('nav.account')" :title="name ?? user?.email ?? undefined"
|
|
26
|
+
class="grid size-9 place-items-center rounded-full border border-primary/25 bg-accent text-sm font-semibold text-accent-foreground outline-none hover:ring-2 hover:ring-primary/30 focus-visible:ring-3 focus-visible:ring-ring/80 pointer-coarse:size-11"
|
|
27
|
+
>{{ initial }}</button>
|
|
28
|
+
</DropdownMenuTrigger>
|
|
29
|
+
<DropdownMenuContent :side="props.side ?? 'right'" align="end" class="w-64">
|
|
30
|
+
<DropdownMenuLabel v-if="user?.email" class="grid gap-0.5 font-normal">
|
|
31
|
+
<span v-if="name" class="truncate font-medium text-foreground">{{ name }}</span>
|
|
32
|
+
<span class="truncate text-muted-foreground">{{ user.email }}</span>
|
|
33
|
+
</DropdownMenuLabel>
|
|
34
|
+
<DropdownMenuSeparator v-if="user?.email" />
|
|
35
|
+
<template v-if="manager">
|
|
36
|
+
<DropdownMenuItem class="min-h-10 gap-2" :disabled="updating" @select="emit('update')">
|
|
37
|
+
<RefreshCwIcon aria-hidden="true" />{{ updating ? t('basics.update.running') : t('basics.update.menu') }}
|
|
38
|
+
</DropdownMenuItem>
|
|
39
|
+
<p v-if="lastRefresh" class="px-2 pb-1.5 text-xs text-muted-foreground">{{ t('basics.update.lastAt', { when: format.relative(lastRefresh) }) }}</p>
|
|
40
|
+
<DropdownMenuSeparator />
|
|
41
|
+
</template>
|
|
42
|
+
<DropdownMenuItem as-child class="min-h-10 gap-2">
|
|
43
|
+
<NuxtLink to="/?all"><LayoutGridIcon aria-hidden="true" />{{ t('nav.mySites') }}</NuxtLink>
|
|
44
|
+
</DropdownMenuItem>
|
|
45
|
+
<DropdownMenuItem as-child class="min-h-10 gap-2">
|
|
46
|
+
<NuxtLink to="/account"><UserRoundCogIcon aria-hidden="true" />{{ t('nav.accountPage') }}</NuxtLink>
|
|
47
|
+
</DropdownMenuItem>
|
|
48
|
+
<DropdownMenuSeparator />
|
|
49
|
+
<DropdownMenuItem class="min-h-10 gap-2" :disabled="busy" @select="signOutOthers">
|
|
50
|
+
<MonitorSmartphoneIcon aria-hidden="true" />{{ t('nav.signOutOthers') }}
|
|
51
|
+
</DropdownMenuItem>
|
|
52
|
+
<DropdownMenuItem class="min-h-10 gap-2" :disabled="busy" @select="signOut">
|
|
53
|
+
<LogOutIcon aria-hidden="true" />{{ t('nav.signOut') }}
|
|
54
|
+
</DropdownMenuItem>
|
|
55
|
+
</DropdownMenuContent>
|
|
56
|
+
</DropdownMenu>
|
|
57
|
+
</template>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<!-- The bricks of the site for Inhalte: the side column on wide screens (with `Overview` first), the list page on phones.
|
|
2
|
+
Each list area shows how many entries it has. After the areas, `Übersetzungen` with the
|
|
3
|
+
number of open translations (only while there are some), and `Papierkorb` when something was removed (UI.md 10.6).
|
|
4
|
+
Counts are aria-hidden: the link names stay the area labels (the e2e tests click them by name). -->
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
import { api } from '#convex/api'
|
|
7
|
+
import type { Brick } from '@lupinum/ginko'
|
|
8
|
+
import { LanguagesIcon, LayoutGridIcon, Trash2Icon } from '@lucide/vue'
|
|
9
|
+
import { useStudioSite } from '../utils/labels'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{ slug: string; bricks: [string, Brick][]; current?: string; removedActive?: boolean; translationsActive?: boolean; overview?: boolean }>()
|
|
12
|
+
const { shown } = useStudioSite()
|
|
13
|
+
const { t, format } = useI18n()
|
|
14
|
+
const route = useRoute()
|
|
15
|
+
|
|
16
|
+
const { data: areas } = useConvexQuery(api.sites.areas, () => ({ site: props.slug }))
|
|
17
|
+
const byBrick = computed(() => new Map((areas.value ?? []).map((a) => [a.brick, a])))
|
|
18
|
+
// Open translations of the areas listed here: one per entry and language with a missing or outdated text.
|
|
19
|
+
const openTranslations = computed(() => props.bricks.reduce((sum, [key]) => sum + (byBrick.value.get(key)?.translations ?? 0), 0))
|
|
20
|
+
// The site row says whether anything is removed; the trash itself is read only on its own page.
|
|
21
|
+
const { data: meta } = useConvexQuery(api.sites.meta, () => ({ site: props.slug }))
|
|
22
|
+
const hasTrash = computed(() => meta.value?.site.hasTrash ?? false)
|
|
23
|
+
const onOverview = computed(() => props.overview && !props.current && !props.removedActive && !props.translationsActive && route.path === `/s/${props.slug}/all`)
|
|
24
|
+
|
|
25
|
+
const row = 'flex min-h-11 items-center gap-2.5 rounded-md px-2.5 py-1.5 text-left text-sm font-medium text-foreground no-underline outline-none hover:bg-foreground/[0.05] focus-visible:ring-3 focus-visible:ring-ring/80 aria-[current=page]:bg-accent aria-[current=page]:text-accent-foreground min-[900px]:min-h-9'
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<nav class="grid gap-px" :aria-label="t('nav.areas')">
|
|
30
|
+
<NuxtLink v-if="overview" :to="`/s/${slug}/all`" :class="row" :aria-current="onOverview ? 'page' : undefined">
|
|
31
|
+
<LayoutGridIcon class="size-4 flex-none text-muted-foreground" aria-hidden="true" />
|
|
32
|
+
<span class="min-w-0 flex-1">{{ t('site.all.overview') }}</span>
|
|
33
|
+
</NuxtLink>
|
|
34
|
+
<p v-if="overview" class="px-2.5 pt-4 pb-1.5 text-xs font-medium text-muted-foreground">{{ t('site.all.areas') }}</p>
|
|
35
|
+
<NuxtLink
|
|
36
|
+
v-for="[key, brick] in bricks" :key="key" :to="`/s/${slug}/all/${key}`" :class="row"
|
|
37
|
+
:aria-current="key === current ? 'page' : undefined"
|
|
38
|
+
>
|
|
39
|
+
<!-- Long labels wrap inside the side list instead of running into the form. -->
|
|
40
|
+
<span class="min-w-0 flex-1">{{ shown(brick.label) }}</span>
|
|
41
|
+
<span v-if="brick.kind === 'collection' && byBrick.get(key)" class="min-w-5 flex-none text-right text-xs font-normal text-muted-foreground tabular-nums" aria-hidden="true">{{ format.number(byBrick.get(key)!.count) }}</span>
|
|
42
|
+
</NuxtLink>
|
|
43
|
+
<div v-if="openTranslations || hasTrash" class="mt-2 grid gap-px border-t pt-2">
|
|
44
|
+
<NuxtLink v-if="openTranslations" :to="`/s/${slug}/all?translations`" :class="row" :aria-current="translationsActive ? 'page' : undefined">
|
|
45
|
+
<LanguagesIcon class="size-4 flex-none text-muted-foreground" aria-hidden="true" />
|
|
46
|
+
<span class="min-w-0 flex-1">{{ t('nav.translations') }}</span>
|
|
47
|
+
<span class="flex-none text-xs font-normal text-warning">{{ t('nav.translationsOpen', { count: openTranslations }) }}</span>
|
|
48
|
+
</NuxtLink>
|
|
49
|
+
<NuxtLink v-if="hasTrash" :to="`/s/${slug}/all?removed`" :class="[row, 'text-muted-foreground']" :aria-current="removedActive ? 'page' : undefined">
|
|
50
|
+
<Trash2Icon class="size-4 flex-none" aria-hidden="true" />
|
|
51
|
+
<span class="min-w-0 flex-1">{{ t('basics.removed.link') }}</span>
|
|
52
|
+
</NuxtLink>
|
|
53
|
+
</div>
|
|
54
|
+
</nav>
|
|
55
|
+
</template>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!-- Inhalte frame (design A): on wide screens the area list is a side column of the panel, full height below the top
|
|
2
|
+
bar; the page sits beside it. While the entry preview is open the column folds away (useAreaList) and the top bar
|
|
3
|
+
gets a button to bring it back. Phones: the page alone, with a back link. -->
|
|
4
|
+
<script setup lang="ts">
|
|
5
|
+
import type { Brick } from '@lupinum/ginko'
|
|
6
|
+
import { PanelLeftIcon } from '@lucide/vue'
|
|
7
|
+
import { useAreaList } from '../composables/useAreaList'
|
|
8
|
+
import { usePanelBar } from '../composables/usePageHeader'
|
|
9
|
+
|
|
10
|
+
defineProps<{ slug: string; bricks: [string, Brick][]; current?: string; removedActive?: boolean; translationsActive?: boolean; back?: { to: string; label: string } }>()
|
|
11
|
+
const { t } = useI18n()
|
|
12
|
+
const { folded, foldable, toggle } = useAreaList()
|
|
13
|
+
const bar = usePanelBar()
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div :class="['min-[900px]:grid min-[900px]:flex-1', folded ? 'min-[900px]:grid-cols-[minmax(0,1fr)]' : 'min-[900px]:grid-cols-[15.5rem_minmax(0,1fr)]']">
|
|
18
|
+
<Teleport v-if="bar && foldable" to="#studio-lead">
|
|
19
|
+
<Button type="button" variant="ghost" size="icon-sm" class="-ml-2 mr-1 text-muted-foreground" :aria-pressed="!folded" :aria-label="t('site.all.areaList')" :title="t('site.all.areaList')" @click="toggle()">
|
|
20
|
+
<PanelLeftIcon aria-hidden="true" />
|
|
21
|
+
</Button>
|
|
22
|
+
</Teleport>
|
|
23
|
+
<!-- The cell stretches to the page height (column colour and line to the bottom); the list inside it sticks. -->
|
|
24
|
+
<aside v-show="!folded" class="hidden border-r bg-sidebar min-[900px]:block">
|
|
25
|
+
<div class="min-[900px]:sticky min-[900px]:top-(--studio-header-height) min-[900px]:max-h-[calc(100dvh-5rem)] min-[900px]:overflow-y-auto min-[900px]:p-3">
|
|
26
|
+
<AllNav :slug="slug" :bricks="bricks" :current="current" :removed-active="removedActive" :translations-active="translationsActive" overview />
|
|
27
|
+
</div>
|
|
28
|
+
</aside>
|
|
29
|
+
<!-- The editor with its preview open lays out its own padding: the preview sits flush with the panel. -->
|
|
30
|
+
<div :class="['min-w-0 px-4 pt-4', foldable ? 'min-[900px]:p-0' : 'min-[900px]:px-8 min-[900px]:pt-7']">
|
|
31
|
+
<Button v-if="back" as-child variant="link" class="mb-1 h-11 gap-1.5 px-0 font-semibold min-[900px]:hidden">
|
|
32
|
+
<NuxtLink :to="back.to"><span aria-hidden="true">←</span> {{ back.label }}</NuxtLink>
|
|
33
|
+
</Button>
|
|
34
|
+
<slot />
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import 'vue-sonner/style.css'
|
|
3
|
+
import { useBottomBar } from '../composables/useBottomBar'
|
|
4
|
+
|
|
5
|
+
const { t } = useI18n()
|
|
6
|
+
// While the entry editor is open, the toast sits 12px above its save bar, so "Gespeichert" and Rückgängig never cover
|
|
7
|
+
// the save status. Elsewhere phones keep it above the tab bar (4.25rem + safe area), so the views stay reachable.
|
|
8
|
+
const bottomBar = useBottomBar()
|
|
9
|
+
const aboveBar = computed(() => (bottomBar.value > 0 ? { bottom: `${bottomBar.value + 12}px` } : undefined))
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<Toaster position="bottom-center" :offset="aboveBar" :mobile-offset="aboveBar ?? { bottom: 'calc(4.75rem + env(safe-area-inset-bottom))' }" theme="system" close-button :container-aria-label="t('entry.toast.region')" :toast-options="{ closeButtonAriaLabel: t('entry.toast.close') }" />
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- The field-by-field diff of one history row (UI.md 10.5), loaded when the row is opened. -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
import { api } from '#convex/api'
|
|
4
|
+
import type { Schema } from '@lupinum/ginko/internal'
|
|
5
|
+
import { opErrorOf } from '../composables/useOps'
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{ site: string; change: string; brick: string; schema: Schema }>()
|
|
8
|
+
const detail = useConvexQuery(api.changes.get, () => ({ site: props.site, change: props.change }))
|
|
9
|
+
const fields = computed(() => (Object.hasOwn(props.schema.bricks, props.brick) ? props.schema.bricks[props.brick]?.fields : undefined))
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div class="w-full">
|
|
14
|
+
<p v-if="detail.error.value" class="font-medium text-destructive" role="alert">{{ opErrorOf(detail.error.value).message }}</p>
|
|
15
|
+
<ChangeDiff v-else-if="detail.data.value" :diff="detail.data.value.diff" :fields="fields" :locale="schema.locales[0]!" :site="site" />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|