@tulip-systems/core 0.5.0 → 0.5.2
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/client.d.mts +2 -2
- package/dist/components/client.mjs +2 -2
- package/dist/components/common/icons.d.mts +52 -52
- package/dist/components/common/status.d.mts +3 -3
- package/dist/components/editor/components/content.client.d.mts +2 -2
- package/dist/components/editor/components/editor.client.d.mts +3 -3
- package/dist/components/editor/components/editor.client.d.mts.map +1 -1
- package/dist/components/editor/components/{block-dropdown.mjs → menu-nodes.client.mjs} +7 -11
- package/dist/components/editor/components/menu-nodes.client.mjs.map +1 -0
- package/dist/components/editor/components/menu.client.d.mts +10 -0
- package/dist/components/editor/components/menu.client.d.mts.map +1 -0
- package/dist/components/editor/components/menu.client.mjs +166 -0
- package/dist/components/editor/components/menu.client.mjs.map +1 -0
- package/dist/components/editor/lib/extensions.d.mts +3 -0
- package/dist/components/editor/lib/extensions.d.mts.map +1 -1
- package/dist/components/editor/lib/extensions.mjs.map +1 -1
- package/dist/components/header/back-button.client.d.mts +2 -2
- package/dist/components/header/bottom-bar.client.d.mts +3 -3
- package/dist/components/header/breadcrumbs.client.d.mts +7 -7
- package/dist/components/header/header.client.d.mts +2 -2
- package/dist/components/header/mobile-nav-switcher.client.d.mts +2 -2
- package/dist/components/header/top-bar.client.d.mts +4 -4
- package/dist/components/layouts/admin-content.client.d.mts +2 -2
- package/dist/components/layouts/admin-layout.d.mts +2 -2
- package/dist/components/layouts/admin-layout.d.mts.map +1 -1
- package/dist/components/layouts/admin-loading.d.mts +2 -2
- package/dist/components/layouts/empty-page.d.mts +4 -4
- package/dist/components/layouts/list-layout.d.mts +2 -2
- package/dist/components/layouts/not-found-page.d.mts +3 -3
- package/dist/components/layouts/providers.client.d.mts +2 -2
- package/dist/components/layouts/root-layout.server.d.mts +2 -2
- package/dist/components/layouts/root-layout.server.d.mts.map +1 -1
- package/dist/components/layouts/root-loading.d.mts +2 -2
- package/dist/components/layouts/tab-layout.d.mts +2 -2
- package/dist/components/lists/data-list.d.mts +5 -5
- package/dist/components/lists/data-stack.d.mts +8 -8
- package/dist/components/navigation/admin-sidebar-paths.client.d.mts +10 -10
- package/dist/components/ui/accordion.d.mts +5 -5
- package/dist/components/ui/accordion.d.mts.map +1 -1
- package/dist/components/ui/alert-dialog.d.mts +12 -12
- package/dist/components/ui/alert-dialog.d.mts.map +1 -1
- package/dist/components/ui/alert.d.mts +4 -4
- package/dist/components/ui/alert.d.mts.map +1 -1
- package/dist/components/ui/aspect-ratio.d.mts +2 -2
- package/dist/components/ui/aspect-ratio.d.mts.map +1 -1
- package/dist/components/ui/avatar.client.d.mts +4 -4
- package/dist/components/ui/badge.d.mts +2 -2
- package/dist/components/ui/badge.d.mts.map +1 -1
- package/dist/components/ui/breadcrumb.d.mts +8 -8
- package/dist/components/ui/breadcrumb.d.mts.map +1 -1
- package/dist/components/ui/button.d.mts +2 -2
- package/dist/components/ui/button.d.mts.map +1 -1
- package/dist/components/ui/calendar.d.mts +3 -3
- package/dist/components/ui/calendar.d.mts.map +1 -1
- package/dist/components/ui/card.d.mts +7 -7
- package/dist/components/ui/card.d.mts.map +1 -1
- package/dist/components/ui/carousel.d.mts +6 -6
- package/dist/components/ui/carousel.d.mts.map +1 -1
- package/dist/components/ui/chart.client.d.mts +5 -5
- package/dist/components/ui/checkbox.d.mts +2 -2
- package/dist/components/ui/checkbox.d.mts.map +1 -1
- package/dist/components/ui/collapsible.client.d.mts +4 -4
- package/dist/components/ui/color-picker.client.d.mts +2 -2
- package/dist/components/ui/combobox-dropdown.client.d.mts +2 -2
- package/dist/components/ui/combobox.client.d.mts +2 -2
- package/dist/components/ui/command.d.mts +10 -10
- package/dist/components/ui/command.d.mts.map +1 -1
- package/dist/components/ui/context-menu.d.mts +16 -16
- package/dist/components/ui/context-menu.d.mts.map +1 -1
- package/dist/components/ui/date-picker.client.d.mts +2 -2
- package/dist/components/ui/dialog.client.d.mts +11 -11
- package/dist/components/ui/drawer.client.d.mts +11 -11
- package/dist/components/ui/dropdown-menu.d.mts +16 -16
- package/dist/components/ui/form.client.d.mts +7 -7
- package/dist/components/ui/hover-card.client.d.mts +4 -4
- package/dist/components/ui/input-recipient.d.mts +2 -2
- package/dist/components/ui/input.d.mts +2 -2
- package/dist/components/ui/label.d.mts +2 -2
- package/dist/components/ui/navigation-menu.d.mts +9 -9
- package/dist/components/ui/pagination.d.mts +8 -8
- package/dist/components/ui/popover.d.mts +5 -5
- package/dist/components/ui/progress.client.d.mts +2 -2
- package/dist/components/ui/radio-group.d.mts +3 -3
- package/dist/components/ui/resizable.client.d.mts +4 -4
- package/dist/components/ui/scroll-area.d.mts +3 -3
- package/dist/components/ui/select.client.d.mts +11 -11
- package/dist/components/ui/separator.d.mts +2 -2
- package/dist/components/ui/sheet.client.d.mts +9 -9
- package/dist/components/ui/sidebar.client.d.mts +24 -24
- package/dist/components/ui/skeleton.d.mts +2 -2
- package/dist/components/ui/slider.d.mts +2 -2
- package/dist/components/ui/sonner.client.d.mts +2 -2
- package/dist/components/ui/switch.d.mts +2 -2
- package/dist/components/ui/tabs.d.mts +5 -5
- package/dist/components/ui/textarea.d.mts +2 -2
- package/dist/components/ui/time-input.client.d.mts +2 -2
- package/dist/components/ui/toggle-group.client.d.mts +3 -3
- package/dist/components/ui/toggle.d.mts +2 -2
- package/dist/components/ui/tooltip.client.d.mts +5 -5
- package/dist/lib/hooks/use-action.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts +2 -2
- package/dist/lib/hooks/use-indicator.d.mts.map +1 -1
- package/dist/modules/auth/components/allowed.client.d.mts +2 -2
- package/dist/modules/auth/components/allowed.client.d.mts.map +1 -1
- package/dist/modules/auth/components/auth-layout.server.d.mts +2 -2
- package/dist/modules/auth/components/auth-layout.server.d.mts.map +1 -1
- package/dist/modules/auth/components/auth-loading.d.mts +2 -2
- package/dist/modules/auth/components/create-first-user-page.client.d.mts +2 -2
- package/dist/modules/auth/components/create-first-user-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/forget-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/forget-password-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/guard-first-user.server.d.mts +2 -2
- package/dist/modules/auth/components/guard-first-user.server.d.mts.map +1 -1
- package/dist/modules/auth/components/guard.server.d.mts +2 -2
- package/dist/modules/auth/components/guard.server.d.mts.map +1 -1
- package/dist/modules/auth/components/login-page.client.d.mts +2 -2
- package/dist/modules/auth/components/login-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/reset-password-page.client.d.mts +2 -2
- package/dist/modules/auth/components/reset-password-page.client.d.mts.map +1 -1
- package/dist/modules/auth/components/update-password-command.d.mts +2 -2
- package/dist/modules/auth/components/update-password-command.d.mts.map +1 -1
- package/dist/modules/auth/db/schema.d.mts +73 -73
- package/dist/modules/auth/db/schema.d.mts.map +1 -1
- package/dist/modules/auth/hooks/use-permission.d.mts +2 -2
- package/dist/modules/auth/lib/validators.d.mts +2 -2
- package/dist/modules/auth/lib/validators.d.mts.map +1 -1
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts +10 -10
- package/dist/modules/commands/components/alert-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/click-command.client.d.mts +2 -2
- package/dist/modules/commands/components/click-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/command-trigger.client.d.mts +6 -6
- package/dist/modules/commands/components/command-trigger.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dialog-command.client.d.mts +8 -8
- package/dist/modules/commands/components/dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/dropdown-command.client.d.mts +5 -5
- package/dist/modules/commands/components/dropdown-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/empty-command.client.d.mts +2 -2
- package/dist/modules/commands/components/empty-command.client.d.mts.map +1 -1
- package/dist/modules/commands/components/form-dialog-command.client.d.mts +11 -11
- package/dist/modules/commands/components/form-dialog-command.client.d.mts.map +1 -1
- package/dist/modules/commands/hooks/use-command-mutation.client.d.mts +2 -2
- package/dist/modules/commands/menus/context-menu.client.d.mts +2 -2
- package/dist/modules/commands/menus/context-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/dropdown-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/inline-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/inline-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/menus/responsive-menu.client.d.mts +3 -3
- package/dist/modules/commands/menus/responsive-menu.client.d.mts.map +1 -1
- package/dist/modules/commands/utils/archive-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/archive-command.client.d.mts.map +1 -1
- package/dist/modules/commands/utils/delete-command.client.d.mts +3 -3
- package/dist/modules/commands/utils/delete-command.client.d.mts.map +1 -1
- package/dist/modules/config/db/helpers.d.mts +5 -5
- package/dist/modules/config/db/helpers.d.mts.map +1 -1
- package/dist/modules/data-tables/components/cell/common.client.d.mts +5 -5
- package/dist/modules/data-tables/components/column-header.d.mts +2 -2
- package/dist/modules/data-tables/components/column-header.d.mts.map +1 -1
- package/dist/modules/data-tables/components/filters/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/components/filters/slider.client.d.mts +2 -2
- package/dist/modules/data-tables/components/header.d.mts +4 -4
- package/dist/modules/data-tables/components/header.d.mts.map +1 -1
- package/dist/modules/data-tables/components/layout.d.mts +2 -2
- package/dist/modules/data-tables/components/layout.d.mts.map +1 -1
- package/dist/modules/data-tables/components/search-input.client.d.mts +2 -2
- package/dist/modules/data-tables/components/skeleton.d.mts +2 -2
- package/dist/modules/data-tables/components/skeleton.d.mts.map +1 -1
- package/dist/modules/data-tables/components/table.d.mts +7 -7
- package/dist/modules/data-tables/components/table.d.mts.map +1 -1
- package/dist/modules/data-tables/components/toolbar.d.mts +3 -3
- package/dist/modules/data-tables/components/toolbar.d.mts.map +1 -1
- package/dist/modules/data-tables/hooks/use-context.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/data-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/common.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/cells/drag-handle.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/advanced-select.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/combobox.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/input.client.d.mts +3 -3
- package/dist/modules/data-tables/tables/inline-table/components/inputs/read-only.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/inputs/select.client.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +2 -2
- package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox-dropdown.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/combobox.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/date-input.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/date-picker.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/deprecated-editor.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/editor.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-recipient.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input-toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/input.client.d.mts +4 -4
- package/dist/modules/inline-edit/components/select.client.d.mts +6 -6
- package/dist/modules/inline-edit/components/switch.client.d.mts +2 -2
- package/dist/modules/inline-edit/components/toggle.client.d.mts +2 -2
- package/dist/modules/inline-edit/hooks/context.client.d.mts +2 -2
- package/dist/modules/inline-edit/lib/variants.d.mts +1 -1
- package/dist/modules/router/lib/query-client.server.d.mts +2 -2
- package/dist/modules/router/lib/query-client.server.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone-context.client.d.mts +2 -2
- package/dist/modules/storage/components/dropzone-context.client.d.mts.map +1 -1
- package/dist/modules/storage/components/dropzone.client.d.mts +5 -5
- package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
- package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.d.mts +5 -3
- package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
- package/dist/modules/storage/components/upload-zone.client.mjs +6 -4
- package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
- package/dist/modules/storage/config/filters.d.mts +1 -0
- package/dist/modules/storage/config/filters.d.mts.map +1 -1
- package/dist/modules/storage/config/filters.mjs +2 -1
- package/dist/modules/storage/config/filters.mjs.map +1 -1
- package/dist/modules/storage/lib/helpers.d.mts +2 -2
- package/dist/modules/storage/lib/helpers.d.mts.map +1 -1
- package/dist/modules/storage/lib/helpers.mjs +1 -0
- package/dist/modules/storage/lib/helpers.mjs.map +1 -1
- package/dist/modules/storage/lib/router.server.d.mts +3205 -2227
- package/dist/modules/storage/lib/router.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/router.server.mjs +1 -0
- package/dist/modules/storage/lib/router.server.mjs.map +1 -1
- package/dist/modules/storage/lib/schema.d.mts +122 -88
- package/dist/modules/storage/lib/schema.d.mts.map +1 -1
- package/dist/modules/storage/lib/schema.mjs +1 -0
- package/dist/modules/storage/lib/schema.mjs.map +1 -1
- package/dist/modules/storage/lib/service.server.d.mts +48 -21
- package/dist/modules/storage/lib/service.server.d.mts.map +1 -1
- package/dist/modules/storage/lib/service.server.mjs +15 -8
- package/dist/modules/storage/lib/service.server.mjs.map +1 -1
- package/dist/modules/storage/lib/validators.d.mts +215 -134
- package/dist/modules/storage/lib/validators.d.mts.map +1 -1
- package/dist/modules/storage/lib/validators.mjs +14 -24
- package/dist/modules/storage/lib/validators.mjs.map +1 -1
- package/dist/storage.d.mts +2 -2
- package/dist/storage.mjs +2 -2
- package/package.json +3 -3
- package/src/components/editor/components/{block-dropdown.tsx → menu-nodes.client.tsx} +24 -29
- package/src/components/editor/components/menu.client.tsx +214 -0
- package/src/components/editor/lib/extensions.ts +3 -3
- package/src/components/entry.client.ts +1 -1
- package/src/modules/storage/components/upload-zone.client.tsx +5 -2
- package/src/modules/storage/config/filters.ts +1 -0
- package/src/modules/storage/lib/helpers.ts +3 -2
- package/src/modules/storage/lib/router.server.ts +6 -0
- package/src/modules/storage/lib/schema.ts +1 -0
- package/src/modules/storage/lib/service.server.ts +25 -4
- package/src/modules/storage/lib/validators.ts +20 -31
- package/dist/components/editor/components/block-dropdown.mjs.map +0 -1
- package/dist/components/editor/components/menu-fixed.client.d.mts +0 -7
- package/dist/components/editor/components/menu-fixed.client.d.mts.map +0 -1
- package/dist/components/editor/components/menu-fixed.client.mjs +0 -128
- package/dist/components/editor/components/menu-fixed.client.mjs.map +0 -1
- package/src/components/editor/components/menu-fixed.client.tsx +0 -165
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditorContent } from "./editor/components/content.client.mjs";
|
|
2
2
|
import { Editor, EditorContext, EditorProps, editorVariants } from "./editor/components/editor.client.mjs";
|
|
3
|
-
import { EditorMenuFixed } from "./editor/components/menu
|
|
3
|
+
import { EditorMenuBubble, EditorMenuFixed } from "./editor/components/menu.client.mjs";
|
|
4
4
|
import { HeaderTopbarBackButton } from "./header/back-button.client.mjs";
|
|
5
5
|
import { BottomBar, BottomBarLink, BottomBarLinks, BottomBarLinksProps, BottomBarProps } from "./header/bottom-bar.client.mjs";
|
|
6
6
|
import { HeaderBreadcrumb, HeaderBreadcrumbProps, HeaderBreadcrumbSeparator, HeaderBreadcrumbs, HeaderBreadcrumbsDesktopList, HeaderBreadcrumbsDropdownMenu, HeaderBreadcrumbsDropdownMenuItem, HeaderBreadcrumbsLink, HeaderBreadcrumbsMobileList } from "./header/breadcrumbs.client.mjs";
|
|
@@ -31,4 +31,4 @@ import { Toaster, toast } from "./ui/sonner.client.mjs";
|
|
|
31
31
|
import { TimeInput } from "./ui/time-input.client.mjs";
|
|
32
32
|
import { TimePickerInput, TimePickerInputProps } from "./ui/time-picker-input.client.mjs";
|
|
33
33
|
import { ToggleGroup, ToggleGroupItem } from "./ui/toggle-group.client.mjs";
|
|
34
|
-
export { AdminContent, Avatar, AvatarFallback, AvatarImage, BottomBar, BottomBarLink, BottomBarLinks, BottomBarLinksProps, BottomBarProps, ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, ComboboxDropdown, ComboboxDropdownItem, ComboboxDropdownProps, ComboboxItem, ComboboxProps, DatePicker, DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Editor, EditorContent, EditorContext, EditorMenuFixed, EditorProps, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Header, HeaderBreadcrumb, HeaderBreadcrumbProps, HeaderBreadcrumbSeparator, HeaderBreadcrumbs, HeaderBreadcrumbsDesktopList, HeaderBreadcrumbsDropdownMenu, HeaderBreadcrumbsDropdownMenuItem, HeaderBreadcrumbsLink, HeaderBreadcrumbsMobileList, HeaderTopbarBackButton, HeaderTopbarMobileNavSwitcher, HoverCard, HoverCardContent, HoverCardTrigger, Path, PathGroup, PathGroupItems, PathGroupTitle, PathItems, PathLink, PathSubItem, PathSubItemLink, Paths, Progress, Providers, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, TimeInput, TimePickerInput, TimePickerInputProps, Toaster, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Topbar, TopbarProps, TopbarTitle, TopbarTitleProps, TopbarTools, TopbarToolsProps, editorVariants, toast, useFormField, useSidebar };
|
|
34
|
+
export { AdminContent, Avatar, AvatarFallback, AvatarImage, BottomBar, BottomBarLink, BottomBarLinks, BottomBarLinksProps, BottomBarProps, ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, ComboboxDropdown, ComboboxDropdownItem, ComboboxDropdownProps, ComboboxItem, ComboboxProps, DatePicker, DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Editor, EditorContent, EditorContext, EditorMenuBubble, EditorMenuFixed, EditorProps, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Header, HeaderBreadcrumb, HeaderBreadcrumbProps, HeaderBreadcrumbSeparator, HeaderBreadcrumbs, HeaderBreadcrumbsDesktopList, HeaderBreadcrumbsDropdownMenu, HeaderBreadcrumbsDropdownMenuItem, HeaderBreadcrumbsLink, HeaderBreadcrumbsMobileList, HeaderTopbarBackButton, HeaderTopbarMobileNavSwitcher, HoverCard, HoverCardContent, HoverCardTrigger, Path, PathGroup, PathGroupItems, PathGroupTitle, PathItems, PathLink, PathSubItem, PathSubItemLink, Paths, Progress, Providers, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, TimeInput, TimePickerInput, TimePickerInputProps, Toaster, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Topbar, TopbarProps, TopbarTitle, TopbarTitleProps, TopbarTools, TopbarToolsProps, editorVariants, toast, useFormField, useSidebar };
|
|
@@ -4,7 +4,7 @@ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./ui/t
|
|
|
4
4
|
import { Editor, EditorContext, editorVariants } from "./editor/components/editor.client.mjs";
|
|
5
5
|
import { EditorContent } from "./editor/components/content.client.mjs";
|
|
6
6
|
import { ColorPicker } from "./ui/color-picker.client.mjs";
|
|
7
|
-
import { EditorMenuFixed } from "./editor/components/menu
|
|
7
|
+
import { EditorMenuBubble, EditorMenuFixed } from "./editor/components/menu.client.mjs";
|
|
8
8
|
import { HeaderTopbarBackButton } from "./header/back-button.client.mjs";
|
|
9
9
|
import { BottomBar, BottomBarLinks } from "./header/bottom-bar.client.mjs";
|
|
10
10
|
import { HeaderBreadcrumbSeparator, HeaderBreadcrumbs, HeaderBreadcrumbsDesktopList, HeaderBreadcrumbsDropdownMenu, HeaderBreadcrumbsDropdownMenuItem, HeaderBreadcrumbsLink, HeaderBreadcrumbsMobileList } from "./header/breadcrumbs.client.mjs";
|
|
@@ -32,4 +32,4 @@ import { TimePickerInput } from "./ui/time-picker-input.client.mjs";
|
|
|
32
32
|
import { TimeInput } from "./ui/time-input.client.mjs";
|
|
33
33
|
import { ToggleGroup, ToggleGroupItem } from "./ui/toggle-group.client.mjs";
|
|
34
34
|
|
|
35
|
-
export { AdminContent, Avatar, AvatarFallback, AvatarImage, BottomBar, BottomBarLinks, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, ComboboxDropdown, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Editor, EditorContent, EditorContext, EditorMenuFixed, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Header, HeaderBreadcrumbSeparator, HeaderBreadcrumbs, HeaderBreadcrumbsDesktopList, HeaderBreadcrumbsDropdownMenu, HeaderBreadcrumbsDropdownMenuItem, HeaderBreadcrumbsLink, HeaderBreadcrumbsMobileList, HeaderTopbarBackButton, HeaderTopbarMobileNavSwitcher, HoverCard, HoverCardContent, HoverCardTrigger, Path, PathGroup, PathGroupItems, PathGroupTitle, PathItems, PathLink, PathSubItem, PathSubItemLink, Paths, Progress, Providers, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, TimeInput, TimePickerInput, Toaster, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Topbar, TopbarTitle, TopbarTools, editorVariants, toast, useFormField, useSidebar };
|
|
35
|
+
export { AdminContent, Avatar, AvatarFallback, AvatarImage, BottomBar, BottomBarLinks, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Combobox, ComboboxDropdown, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Editor, EditorContent, EditorContext, EditorMenuBubble, EditorMenuFixed, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Header, HeaderBreadcrumbSeparator, HeaderBreadcrumbs, HeaderBreadcrumbsDesktopList, HeaderBreadcrumbsDropdownMenu, HeaderBreadcrumbsDropdownMenuItem, HeaderBreadcrumbsLink, HeaderBreadcrumbsMobileList, HeaderTopbarBackButton, HeaderTopbarMobileNavSwitcher, HoverCard, HoverCardContent, HoverCardTrigger, Path, PathGroup, PathGroupItems, PathGroupTitle, PathItems, PathLink, PathSubItem, PathSubItemLink, Paths, Progress, Providers, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, TimeInput, TimePickerInput, Toaster, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Topbar, TopbarTitle, TopbarTools, editorVariants, toast, useFormField, useSidebar };
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import { LucideIcon, LucideProps } from "lucide-react";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime13 from "react/jsx-runtime";
|
|
3
|
+
import * as react0 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/common/icons.d.ts
|
|
6
6
|
type Icon = LucideIcon;
|
|
7
7
|
declare const Icons: {
|
|
8
|
-
close:
|
|
9
|
-
save:
|
|
10
|
-
spinner:
|
|
11
|
-
chevronLeft:
|
|
12
|
-
chevronRight:
|
|
13
|
-
chevronDown:
|
|
14
|
-
chevronUp:
|
|
15
|
-
trash:
|
|
16
|
-
post:
|
|
17
|
-
page:
|
|
18
|
-
media:
|
|
19
|
-
download:
|
|
20
|
-
settings:
|
|
21
|
-
billing:
|
|
22
|
-
ellipsis:
|
|
23
|
-
add:
|
|
24
|
-
edit:
|
|
25
|
-
warning:
|
|
26
|
-
user:
|
|
27
|
-
users:
|
|
28
|
-
arrowUp:
|
|
29
|
-
arrowDown:
|
|
30
|
-
arrowRight:
|
|
31
|
-
arrowLeft:
|
|
32
|
-
moveLeft:
|
|
33
|
-
moveRight:
|
|
34
|
-
help:
|
|
35
|
-
pizza:
|
|
36
|
-
check:
|
|
37
|
-
copy:
|
|
38
|
-
copyDone:
|
|
39
|
-
refresh:
|
|
40
|
-
preview:
|
|
41
|
-
externalLink:
|
|
42
|
-
sun:
|
|
43
|
-
lock:
|
|
44
|
-
unLock:
|
|
45
|
-
moon:
|
|
46
|
-
search:
|
|
47
|
-
laptop:
|
|
48
|
-
active:
|
|
49
|
-
draft:
|
|
50
|
-
archive:
|
|
51
|
-
restore:
|
|
52
|
-
dashboard:
|
|
53
|
-
regulations:
|
|
54
|
-
home:
|
|
55
|
-
mail:
|
|
56
|
-
building:
|
|
57
|
-
logo: (props: LucideProps) =>
|
|
8
|
+
close: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
9
|
+
save: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
10
|
+
spinner: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
11
|
+
chevronLeft: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
12
|
+
chevronRight: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
13
|
+
chevronDown: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
14
|
+
chevronUp: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
15
|
+
trash: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
16
|
+
post: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
17
|
+
page: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
18
|
+
media: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
19
|
+
download: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
20
|
+
settings: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
21
|
+
billing: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
22
|
+
ellipsis: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
23
|
+
add: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
24
|
+
edit: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
25
|
+
warning: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
26
|
+
user: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
27
|
+
users: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
28
|
+
arrowUp: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
29
|
+
arrowDown: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
30
|
+
arrowRight: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
31
|
+
arrowLeft: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
32
|
+
moveLeft: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
33
|
+
moveRight: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
34
|
+
help: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
35
|
+
pizza: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
36
|
+
check: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
37
|
+
copy: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
38
|
+
copyDone: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
39
|
+
refresh: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
40
|
+
preview: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
41
|
+
externalLink: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
42
|
+
sun: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
43
|
+
lock: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
44
|
+
unLock: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
45
|
+
moon: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
46
|
+
search: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
47
|
+
laptop: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
48
|
+
active: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
49
|
+
draft: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
50
|
+
archive: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
51
|
+
restore: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
52
|
+
dashboard: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
53
|
+
regulations: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
54
|
+
home: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
55
|
+
mail: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
56
|
+
building: react0.ForwardRefExoticComponent<Omit<LucideProps, "ref"> & react0.RefAttributes<SVGSVGElement>>;
|
|
57
|
+
logo: (props: LucideProps) => react_jsx_runtime13.JSX.Element;
|
|
58
58
|
};
|
|
59
59
|
//#endregion
|
|
60
60
|
export { Icon, Icons };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigWithIcon } from "../../lib/types/config.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime14 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/common/status.d.ts
|
|
5
5
|
/**
|
|
@@ -43,11 +43,11 @@ type StatusComponentProps<TStatus extends string> = {
|
|
|
43
43
|
/**
|
|
44
44
|
* Status column
|
|
45
45
|
*/
|
|
46
|
-
declare function StatusField<TStatus extends string>(props: StatusComponentProps<TStatus>):
|
|
46
|
+
declare function StatusField<TStatus extends string>(props: StatusComponentProps<TStatus>): react_jsx_runtime14.JSX.Element;
|
|
47
47
|
/**
|
|
48
48
|
* Status badge
|
|
49
49
|
*/
|
|
50
|
-
declare function StatusBadge<TStatus extends string>(props: StatusComponentProps<TStatus>):
|
|
50
|
+
declare function StatusBadge<TStatus extends string>(props: StatusComponentProps<TStatus>): react_jsx_runtime14.JSX.Element;
|
|
51
51
|
//#endregion
|
|
52
52
|
export { CreateStatusComponentProps, StatusBadge, StatusField, createStatusConfig, createStatusVariants, findStatus };
|
|
53
53
|
//# sourceMappingURL=status.d.mts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime260 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/editor/components/content.client.d.ts
|
|
4
|
-
declare function EditorContent():
|
|
4
|
+
declare function EditorContent(): react_jsx_runtime260.JSX.Element;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { EditorContent };
|
|
7
7
|
//# sourceMappingURL=content.client.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EditorExtensionsConfig, EditorExtensionsConfigResult } from "../lib/extensions.mjs";
|
|
2
2
|
import { EditorJSONContent } from "../lib/types.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react_jsx_runtime261 from "react/jsx-runtime";
|
|
4
4
|
import { VariantProps } from "class-variance-authority";
|
|
5
5
|
import * as react105 from "react";
|
|
6
6
|
import { PropsWithChildren } from "react";
|
|
@@ -20,7 +20,7 @@ declare const EditorContext: react105.Context<EditorContextValue>;
|
|
|
20
20
|
* Editor variants
|
|
21
21
|
*/
|
|
22
22
|
declare const editorVariants: (props?: ({
|
|
23
|
-
variant?: "
|
|
23
|
+
variant?: "default" | "table" | "preview" | null | undefined;
|
|
24
24
|
} & class_variance_authority_types4.ClassProp) | undefined) => string;
|
|
25
25
|
/**
|
|
26
26
|
* Editor context provider
|
|
@@ -42,7 +42,7 @@ declare function Editor$1({
|
|
|
42
42
|
variant,
|
|
43
43
|
className,
|
|
44
44
|
children
|
|
45
|
-
}: EditorProps):
|
|
45
|
+
}: EditorProps): react_jsx_runtime261.JSX.Element | null;
|
|
46
46
|
//#endregion
|
|
47
47
|
export { Editor$1 as Editor, EditorContext, EditorProps, editorVariants };
|
|
48
48
|
//# sourceMappingURL=editor.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.client.d.mts","names":[],"sources":["../../../../src/components/editor/components/editor.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAkBK,kBAAA;UACK;EADL,UAAA,EAES,4BADJ;AAIV,CAAA;AAKa,cALA,aAkBX,EAlBwB,QAAA,CAAA,OAkBxB,CAlBwB,kBAkBxB,CAAA;AAKF;;;AAEY,cApBC,cAoBD,EAAA,CAAA,KACK,CADL,EAAA,CAAA;EACa,OAAA,CAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"editor.client.d.mts","names":[],"sources":["../../../../src/components/editor/components/editor.client.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;KAkBK,kBAAA;UACK;EADL,UAAA,EAES,4BADJ;AAIV,CAAA;AAKa,cALA,aAkBX,EAlBwB,QAAA,CAAA,OAkBxB,CAlBwB,kBAkBxB,CAAA;AAKF;;;AAEY,cApBC,cAoBD,EAAA,CAAA,KACK,CADL,EAAA,CAAA;EACa,OAAA,CAAA,EAAA,SAAA,GAAA,OAAA,GAAA,SAAA,GAAA,IAAA,GAAA,SAAA;CAAR,GARf,+BAAA,CAAA,SAQe,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;;;;AAFE,KADP,WAAA,GAAc,YACP,CAAA,OAD2B,cAC3B,CAAA,GAAjB,iBAAiB,CAAA;EASH,KAAA,CAAA,EARJ,OAQU;EACpB,UAAA,CAAA,EARe,OAQf,CARuB,sBAQvB,CAAA;EACA,QAAA,CAAA,EAAA,CAAA,KAAA,EARqB,iBAQrB,EAAA,GAAA,IAAA;EACA,MAAA,CAAA,EAAA,CAAA,KAAA,EARmB,iBAQnB,EAAA,GAAA,IAAA;EACA,QAAA,CAAA,EAAA,OAAA;EACA,SAAA,CAAA,EAAA,MAAA;CACA,CAAA;AACA,iBAPc,QAAA,CAOd;EAAA,KAAA;EAAA,UAAA;EAAA,QAAA;EAAA,MAAA;EAAA,QAAA;EAAA,OAAA;EAAA,SAAA;EAAA;AAAA,CAAA,EAEC,WAFD,CAAA,EAEY,oBAAA,CAAA,GAAA,CAAA,OAAA,GAFZ,IAAA"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Button } from "../../ui/button.mjs";
|
|
2
2
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../../ui/dropdown-menu.mjs";
|
|
3
|
-
import { Separator } from "../../ui/separator.mjs";
|
|
4
3
|
import { EditorContext } from "./editor.client.mjs";
|
|
5
4
|
import { ChevronDown, Heading1Icon, Heading2Icon, Heading3Icon, Heading4Icon, Heading5Icon, ListIcon, ListOrderedIcon, TextIcon } from "lucide-react";
|
|
6
|
-
import {
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { useContext } from "react";
|
|
8
7
|
|
|
9
|
-
//#region src/components/editor/components/
|
|
8
|
+
//#region src/components/editor/components/menu-nodes.client.tsx
|
|
10
9
|
const blocks = [
|
|
11
10
|
{
|
|
12
11
|
label: "Paragraaf",
|
|
@@ -65,13 +64,13 @@ const blocks = [
|
|
|
65
64
|
hidden: (extensions) => !extensions.bulletList
|
|
66
65
|
}
|
|
67
66
|
];
|
|
68
|
-
function
|
|
67
|
+
function EditorMenuNodes() {
|
|
69
68
|
const { editor, extensions } = useContext(EditorContext);
|
|
70
69
|
const selectedBlock = blocks.find((block) => block.selected(editor));
|
|
71
70
|
const Icon = selectedBlock?.icon;
|
|
72
71
|
const filteredBlocks = blocks.filter((block) => !block.hidden(extensions));
|
|
73
72
|
if (filteredBlocks.length === 0) return null;
|
|
74
|
-
return /* @__PURE__ */ jsxs(
|
|
73
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
75
74
|
asChild: true,
|
|
76
75
|
children: /* @__PURE__ */ jsxs(Button, {
|
|
77
76
|
variant: "outline",
|
|
@@ -86,12 +85,9 @@ function BlockDropdown() {
|
|
|
86
85
|
onClick: () => handler(editor),
|
|
87
86
|
className: "flex items-center gap-2",
|
|
88
87
|
children: [Icon$1 && /* @__PURE__ */ jsx(Icon$1, { className: "size-3.5" }), label]
|
|
89
|
-
}, index)) })] })
|
|
90
|
-
orientation: "vertical",
|
|
91
|
-
className: "h-8"
|
|
92
|
-
})] });
|
|
88
|
+
}, index)) })] });
|
|
93
89
|
}
|
|
94
90
|
|
|
95
91
|
//#endregion
|
|
96
|
-
export {
|
|
97
|
-
//# sourceMappingURL=
|
|
92
|
+
export { EditorMenuNodes };
|
|
93
|
+
//# sourceMappingURL=menu-nodes.client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-nodes.client.mjs","names":["Icon"],"sources":["../../../../src/components/editor/components/menu-nodes.client.tsx"],"sourcesContent":["import { Button } from \"@/components/ui/button\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { Editor } from \"@tiptap/react\";\nimport {\n ChevronDown,\n Heading1Icon,\n Heading2Icon,\n Heading3Icon,\n Heading4Icon,\n Heading5Icon,\n ListIcon,\n ListOrderedIcon,\n TextIcon,\n} from \"lucide-react\";\nimport { useContext } from \"react\";\nimport { EditorExtensionsConfigResult } from \"../lib/extensions\";\nimport { EditorContext } from \"./editor.client\";\n\nconst blocks = [\n {\n label: \"Paragraaf\",\n icon: TextIcon,\n selected: (editor: Editor) => editor.isActive(\"paragraph\"),\n handler: (editor: Editor) => editor.commands.setParagraph(),\n hidden: (extensions: EditorExtensionsConfigResult) => !extensions.paragraph,\n },\n {\n label: \"Titel 1\",\n icon: Heading1Icon,\n selected: (editor: Editor) => editor.isActive(\"heading\", { level: 1 }),\n handler: (editor: Editor) => editor.commands.setHeading({ level: 1 }),\n hidden: (extensions: EditorExtensionsConfigResult) => !extensions.heading,\n },\n {\n label: \"Titel 2\",\n icon: Heading2Icon,\n selected: (editor: Editor) => editor.isActive(\"heading\", { level: 2 }),\n handler: (editor: Editor) => editor.commands.setHeading({ level: 2 }),\n hidden: (extensions: EditorExtensionsConfigResult) => !extensions.heading,\n },\n {\n label: \"Titel 3\",\n icon: Heading3Icon,\n selected: (editor: Editor) => editor.isActive(\"heading\", { level: 3 }),\n handler: (editor: Editor) => editor.commands.setHeading({ level: 3 }),\n hidden: (extensions: EditorExtensionsConfigResult) => !extensions.heading,\n },\n {\n label: \"Titel 4\",\n icon: Heading4Icon,\n selected: (editor: Editor) => editor.isActive(\"heading\", { level: 4 }),\n handler: (editor: Editor) => editor.commands.setHeading({ level: 4 }),\n hidden: (extensions: EditorExtensionsConfigResult) => !extensions.heading,\n },\n {\n label: \"Titel 5\",\n icon: Heading5Icon,\n selected: (editor: Editor) => editor.isActive(\"heading\", { level: 5 }),\n handler: (editor: Editor) => editor.commands.setHeading({ level: 5 }),\n hidden: (extensions: EditorExtensionsConfigResult) => !extensions.heading,\n },\n {\n label: \"Numbered List\",\n icon: ListOrderedIcon,\n selected: (editor: Editor) => editor.isActive(\"orderedList\"),\n handler: (editor: Editor) => editor.commands.toggleOrderedList(),\n hidden: (extensions: EditorExtensionsConfigResult) => !extensions.orderedList,\n },\n {\n label: \"Bulleted List\",\n icon: ListIcon,\n selected: (editor: Editor) => editor.isActive(\"bulletList\"),\n handler: (editor: Editor) => editor.commands.toggleBulletList(),\n hidden: (extensions: EditorExtensionsConfigResult) => !extensions.bulletList,\n },\n];\n\nexport function EditorMenuNodes() {\n const { editor, extensions } = useContext(EditorContext);\n\n const selectedBlock = blocks.find((block) => block.selected(editor));\n const Icon = selectedBlock?.icon;\n\n const filteredBlocks = blocks.filter((block) => !block.hidden(extensions));\n\n if (filteredBlocks.length === 0) return null;\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"outline\" size=\"sm\" className=\"flex items-center gap-8 p-2\">\n <span className=\"flex items-center gap-2\">\n {Icon && <Icon className=\"size-3.5\" />}\n {selectedBlock?.label ?? \"Select a block\"}\n </span>\n\n <ChevronDown className=\"size-3.5\" />\n </Button>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent>\n {filteredBlocks.map(({ label, icon: Icon, handler }, index) => (\n <DropdownMenuItem\n key={index}\n onClick={() => handler(editor)}\n className=\"flex items-center gap-2\"\n >\n {Icon && <Icon className=\"size-3.5\" />}\n {label}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"mappings":";;;;;;;;AAuBA,MAAM,SAAS;CACb;EACE,OAAO;EACP,MAAM;EACN,WAAW,WAAmB,OAAO,SAAS,YAAY;EAC1D,UAAU,WAAmB,OAAO,SAAS,cAAc;EAC3D,SAAS,eAA6C,CAAC,WAAW;EACnE;CACD;EACE,OAAO;EACP,MAAM;EACN,WAAW,WAAmB,OAAO,SAAS,WAAW,EAAE,OAAO,GAAG,CAAC;EACtE,UAAU,WAAmB,OAAO,SAAS,WAAW,EAAE,OAAO,GAAG,CAAC;EACrE,SAAS,eAA6C,CAAC,WAAW;EACnE;CACD;EACE,OAAO;EACP,MAAM;EACN,WAAW,WAAmB,OAAO,SAAS,WAAW,EAAE,OAAO,GAAG,CAAC;EACtE,UAAU,WAAmB,OAAO,SAAS,WAAW,EAAE,OAAO,GAAG,CAAC;EACrE,SAAS,eAA6C,CAAC,WAAW;EACnE;CACD;EACE,OAAO;EACP,MAAM;EACN,WAAW,WAAmB,OAAO,SAAS,WAAW,EAAE,OAAO,GAAG,CAAC;EACtE,UAAU,WAAmB,OAAO,SAAS,WAAW,EAAE,OAAO,GAAG,CAAC;EACrE,SAAS,eAA6C,CAAC,WAAW;EACnE;CACD;EACE,OAAO;EACP,MAAM;EACN,WAAW,WAAmB,OAAO,SAAS,WAAW,EAAE,OAAO,GAAG,CAAC;EACtE,UAAU,WAAmB,OAAO,SAAS,WAAW,EAAE,OAAO,GAAG,CAAC;EACrE,SAAS,eAA6C,CAAC,WAAW;EACnE;CACD;EACE,OAAO;EACP,MAAM;EACN,WAAW,WAAmB,OAAO,SAAS,WAAW,EAAE,OAAO,GAAG,CAAC;EACtE,UAAU,WAAmB,OAAO,SAAS,WAAW,EAAE,OAAO,GAAG,CAAC;EACrE,SAAS,eAA6C,CAAC,WAAW;EACnE;CACD;EACE,OAAO;EACP,MAAM;EACN,WAAW,WAAmB,OAAO,SAAS,cAAc;EAC5D,UAAU,WAAmB,OAAO,SAAS,mBAAmB;EAChE,SAAS,eAA6C,CAAC,WAAW;EACnE;CACD;EACE,OAAO;EACP,MAAM;EACN,WAAW,WAAmB,OAAO,SAAS,aAAa;EAC3D,UAAU,WAAmB,OAAO,SAAS,kBAAkB;EAC/D,SAAS,eAA6C,CAAC,WAAW;EACnE;CACF;AAED,SAAgB,kBAAkB;CAChC,MAAM,EAAE,QAAQ,eAAe,WAAW,cAAc;CAExD,MAAM,gBAAgB,OAAO,MAAM,UAAU,MAAM,SAAS,OAAO,CAAC;CACpE,MAAM,OAAO,eAAe;CAE5B,MAAM,iBAAiB,OAAO,QAAQ,UAAU,CAAC,MAAM,OAAO,WAAW,CAAC;AAE1E,KAAI,eAAe,WAAW,EAAG,QAAO;AAExC,QACE,qBAAC,2BACC,oBAAC;EAAoB;YACnB,qBAAC;GAAO,SAAQ;GAAU,MAAK;GAAK,WAAU;cAC5C,qBAAC;IAAK,WAAU;eACb,QAAQ,oBAAC,QAAK,WAAU,aAAa,EACrC,eAAe,SAAS;KACpB,EAEP,oBAAC,eAAY,WAAU,aAAa;IAC7B;GACW,EAEtB,oBAAC,iCACE,eAAe,KAAK,EAAE,OAAO,MAAMA,QAAM,WAAW,UACnD,qBAAC;EAEC,eAAe,QAAQ,OAAO;EAC9B,WAAU;aAETA,UAAQ,oBAACA,UAAK,WAAU,aAAa,EACrC;IALI,MAMY,CACnB,GACkB,IACT"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime262 from "react/jsx-runtime";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { BubbleMenu } from "@tiptap/react/menus";
|
|
4
|
+
|
|
5
|
+
//#region src/components/editor/components/menu.client.d.ts
|
|
6
|
+
declare function EditorMenuFixed(props: React.ComponentProps<"div">): react_jsx_runtime262.JSX.Element;
|
|
7
|
+
declare function EditorMenuBubble(props: ComponentProps<typeof BubbleMenu>): react_jsx_runtime262.JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { EditorMenuBubble, EditorMenuFixed };
|
|
10
|
+
//# sourceMappingURL=menu.client.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.client.d.mts","names":[],"sources":["../../../../src/components/editor/components/menu.client.tsx"],"sourcesContent":[],"mappings":";;;;;iBAoBgB,eAAA,QAAuB,KAAA,CAAM,wBAAqB,oBAAA,CAAA,GAAA,CAAA;iBAgBlD,gBAAA,QAAwB,sBAAsB,cAAW,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { cn } from "../../../lib/utils/cn.mjs";
|
|
2
|
+
import { Button } from "../../ui/button.mjs";
|
|
3
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.mjs";
|
|
4
|
+
import { EditorContext } from "./editor.client.mjs";
|
|
5
|
+
import { ColorPicker } from "../../ui/color-picker.client.mjs";
|
|
6
|
+
import { EditorMenuNodes } from "./menu-nodes.client.mjs";
|
|
7
|
+
import { BaselineIcon, BoldIcon, EraserIcon, ItalicIcon, PaintBucketIcon, RedoIcon, StrikethroughIcon, UnderlineIcon, UndoIcon } from "lucide-react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { useContext } from "react";
|
|
10
|
+
import { BubbleMenu } from "@tiptap/react/menus";
|
|
11
|
+
|
|
12
|
+
//#region src/components/editor/components/menu.client.tsx
|
|
13
|
+
function EditorMenuFixed(props) {
|
|
14
|
+
return /* @__PURE__ */ jsx("div", {
|
|
15
|
+
...props,
|
|
16
|
+
className: cn("border-input bg-muted/30 z-10 overflow-auto border-b p-2", props.className),
|
|
17
|
+
children: /* @__PURE__ */ jsxs(EditorMenuContent, { children: [
|
|
18
|
+
/* @__PURE__ */ jsx(EditorMenuUndoRedo, {}),
|
|
19
|
+
/* @__PURE__ */ jsx(EditorMenuNodes, {}),
|
|
20
|
+
/* @__PURE__ */ jsx(EditorMenuMarks, {}),
|
|
21
|
+
/* @__PURE__ */ jsx(EditorMenuColor, {})
|
|
22
|
+
] })
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function EditorMenuBubble(props) {
|
|
26
|
+
const { editor } = useContext(EditorContext);
|
|
27
|
+
return /* @__PURE__ */ jsx(BubbleMenu, {
|
|
28
|
+
...props,
|
|
29
|
+
editor,
|
|
30
|
+
options: {
|
|
31
|
+
...props.options,
|
|
32
|
+
strategy: "fixed"
|
|
33
|
+
},
|
|
34
|
+
className: cn("border-input bg-muted z-10 rounded-lg border p-2", props.className),
|
|
35
|
+
children: /* @__PURE__ */ jsx(EditorMenuContent, { children: /* @__PURE__ */ jsx(EditorMenuMarks, {}) })
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function EditorMenuContent(props) {
|
|
39
|
+
return /* @__PURE__ */ jsx("div", {
|
|
40
|
+
className: "flex items-center gap-6",
|
|
41
|
+
children: props.children
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Editor menu undo/redo
|
|
46
|
+
*/
|
|
47
|
+
function EditorMenuUndoRedo() {
|
|
48
|
+
const { editor, extensions } = useContext(EditorContext);
|
|
49
|
+
if (!extensions.undoRedo) return null;
|
|
50
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
className: "flex items-center gap-1",
|
|
52
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
53
|
+
onClick: () => editor.commands.undo(),
|
|
54
|
+
disabled: !editor?.can().undo(),
|
|
55
|
+
type: "button",
|
|
56
|
+
"aria-label": "Undo",
|
|
57
|
+
size: "icon",
|
|
58
|
+
className: "p-2",
|
|
59
|
+
variant: "outline",
|
|
60
|
+
children: /* @__PURE__ */ jsx(UndoIcon, { className: "size-3.5" })
|
|
61
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
62
|
+
onClick: () => editor.commands.redo(),
|
|
63
|
+
disabled: !editor?.can().redo(),
|
|
64
|
+
type: "button",
|
|
65
|
+
"aria-label": "Redo",
|
|
66
|
+
size: "icon",
|
|
67
|
+
className: "p-2",
|
|
68
|
+
variant: "outline",
|
|
69
|
+
children: /* @__PURE__ */ jsx(RedoIcon, { className: "size-3.5" })
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Editor menu marks
|
|
75
|
+
*/
|
|
76
|
+
function EditorMenuMarks() {
|
|
77
|
+
const { editor, extensions } = useContext(EditorContext);
|
|
78
|
+
if (!extensions.bold && !extensions.italic && !extensions.underline && !extensions.strike) return null;
|
|
79
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
80
|
+
className: "flex items-center gap-1",
|
|
81
|
+
children: [
|
|
82
|
+
extensions.bold && /* @__PURE__ */ jsx(Button, {
|
|
83
|
+
type: "button",
|
|
84
|
+
size: "icon",
|
|
85
|
+
variant: editor?.isActive("bold") ? "secondary" : "outline",
|
|
86
|
+
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
87
|
+
className: "border",
|
|
88
|
+
children: /* @__PURE__ */ jsx(BoldIcon, { className: "h-3.5 w-3.5" })
|
|
89
|
+
}),
|
|
90
|
+
extensions.italic && /* @__PURE__ */ jsx(Button, {
|
|
91
|
+
type: "button",
|
|
92
|
+
size: "icon",
|
|
93
|
+
variant: editor?.isActive("italic") ? "secondary" : "outline",
|
|
94
|
+
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
95
|
+
className: "border",
|
|
96
|
+
children: /* @__PURE__ */ jsx(ItalicIcon, { className: "size-3.5" })
|
|
97
|
+
}),
|
|
98
|
+
extensions.underline && /* @__PURE__ */ jsx(Button, {
|
|
99
|
+
type: "button",
|
|
100
|
+
size: "icon",
|
|
101
|
+
variant: editor?.isActive("underline") ? "secondary" : "outline",
|
|
102
|
+
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
103
|
+
className: "border",
|
|
104
|
+
children: /* @__PURE__ */ jsx(UnderlineIcon, { className: "size-3.5" })
|
|
105
|
+
}),
|
|
106
|
+
extensions.strike && /* @__PURE__ */ jsx(Button, {
|
|
107
|
+
type: "button",
|
|
108
|
+
size: "icon",
|
|
109
|
+
variant: editor?.isActive("strike") ? "secondary" : "outline",
|
|
110
|
+
onClick: () => editor.chain().focus().toggleStrike().run(),
|
|
111
|
+
className: "border",
|
|
112
|
+
children: /* @__PURE__ */ jsx(StrikethroughIcon, { className: "size-3.5" })
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Editor menu alignment
|
|
119
|
+
*/
|
|
120
|
+
function EditorMenuColor() {
|
|
121
|
+
const { editor, extensions } = useContext(EditorContext);
|
|
122
|
+
if (!extensions.color && !extensions.highlight) return null;
|
|
123
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
124
|
+
className: "flex items-center gap-1",
|
|
125
|
+
children: [
|
|
126
|
+
extensions.color && /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
127
|
+
asChild: true,
|
|
128
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
129
|
+
size: "icon",
|
|
130
|
+
variant: "outline",
|
|
131
|
+
children: /* @__PURE__ */ jsx(BaselineIcon, { className: "size-3.5" })
|
|
132
|
+
})
|
|
133
|
+
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
134
|
+
className: "w-fit p-0",
|
|
135
|
+
children: /* @__PURE__ */ jsx(ColorPicker, { onValueChange: (color) => editor.chain().focus().setColor(color).run() })
|
|
136
|
+
})] }),
|
|
137
|
+
extensions.highlight && /* @__PURE__ */ jsxs(Popover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
138
|
+
asChild: true,
|
|
139
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
140
|
+
size: "icon",
|
|
141
|
+
variant: "outline",
|
|
142
|
+
disabled: !editor?.can().setHighlight(),
|
|
143
|
+
children: /* @__PURE__ */ jsx(PaintBucketIcon, { className: "size-3.5" })
|
|
144
|
+
})
|
|
145
|
+
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
146
|
+
className: "w-fit p-0",
|
|
147
|
+
children: /* @__PURE__ */ jsx(ColorPicker, { onValueChange: (color) => editor.chain().focus().setHighlight({ color }).run() })
|
|
148
|
+
})] }),
|
|
149
|
+
/* @__PURE__ */ jsx(Button, {
|
|
150
|
+
type: "button",
|
|
151
|
+
size: "icon",
|
|
152
|
+
variant: "outline",
|
|
153
|
+
className: "border",
|
|
154
|
+
onClick: () => {
|
|
155
|
+
editor.commands.unsetColor();
|
|
156
|
+
editor.commands.unsetHighlight();
|
|
157
|
+
},
|
|
158
|
+
children: /* @__PURE__ */ jsx(EraserIcon, { className: "h-4 w-4" })
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
//#endregion
|
|
165
|
+
export { EditorMenuBubble, EditorMenuFixed };
|
|
166
|
+
//# sourceMappingURL=menu.client.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.client.mjs","names":[],"sources":["../../../../src/components/editor/components/menu.client.tsx"],"sourcesContent":["import { Button } from \"@/components/ui/button\";\nimport { ColorPicker } from \"@/components/ui/color-picker.client\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/ui/popover\";\nimport { cn } from \"@/lib/entry\";\nimport { BubbleMenu } from \"@tiptap/react/menus\";\nimport {\n BaselineIcon,\n BoldIcon,\n EraserIcon,\n ItalicIcon,\n PaintBucketIcon,\n RedoIcon,\n StrikethroughIcon,\n UnderlineIcon,\n UndoIcon,\n} from \"lucide-react\";\nimport { ComponentProps, PropsWithChildren, useContext } from \"react\";\nimport { EditorContext } from \"./editor.client\";\nimport { EditorMenuNodes } from \"./menu-nodes.client\";\n\nexport function EditorMenuFixed(props: React.ComponentProps<\"div\">) {\n return (\n <div\n {...props}\n className={cn(\"border-input bg-muted/30 z-10 overflow-auto border-b p-2\", props.className)}\n >\n <EditorMenuContent>\n <EditorMenuUndoRedo />\n <EditorMenuNodes />\n <EditorMenuMarks />\n <EditorMenuColor />\n </EditorMenuContent>\n </div>\n );\n}\n\nexport function EditorMenuBubble(props: ComponentProps<typeof BubbleMenu>) {\n const { editor } = useContext(EditorContext);\n\n return (\n <BubbleMenu\n {...props}\n editor={editor}\n options={{ ...props.options, strategy: \"fixed\" }}\n className={cn(\"border-input bg-muted z-10 rounded-lg border p-2\", props.className)}\n >\n <EditorMenuContent>\n <EditorMenuMarks />\n </EditorMenuContent>\n </BubbleMenu>\n );\n}\n\nfunction EditorMenuContent(props: PropsWithChildren) {\n return <div className=\"flex items-center gap-6\">{props.children}</div>;\n}\n\n/**\n * Editor menu undo/redo\n */\nfunction EditorMenuUndoRedo() {\n const { editor, extensions } = useContext(EditorContext);\n\n if (!extensions.undoRedo) return null;\n\n return (\n <div className=\"flex items-center gap-1\">\n <Button\n onClick={() => editor.commands.undo()}\n disabled={!editor?.can().undo()}\n type=\"button\"\n aria-label=\"Undo\"\n size=\"icon\"\n className=\"p-2\"\n variant=\"outline\"\n >\n <UndoIcon className=\"size-3.5\" />\n </Button>\n\n <Button\n onClick={() => editor.commands.redo()}\n disabled={!editor?.can().redo()}\n type=\"button\"\n aria-label=\"Redo\"\n size=\"icon\"\n className=\"p-2\"\n variant=\"outline\"\n >\n <RedoIcon className=\"size-3.5\" />\n </Button>\n </div>\n );\n}\n\n/**\n * Editor menu marks\n */\nfunction EditorMenuMarks() {\n const { editor, extensions } = useContext(EditorContext);\n\n if (!extensions.bold && !extensions.italic && !extensions.underline && !extensions.strike) {\n return null;\n }\n\n return (\n <div className=\"flex items-center gap-1\">\n {extensions.bold && (\n <Button\n type=\"button\"\n size=\"icon\"\n variant={editor?.isActive(\"bold\") ? \"secondary\" : \"outline\"}\n onClick={() => editor.chain().focus().toggleBold().run()}\n className=\"border\"\n >\n <BoldIcon className=\"h-3.5 w-3.5\" />\n </Button>\n )}\n\n {extensions.italic && (\n <Button\n type=\"button\"\n size=\"icon\"\n variant={editor?.isActive(\"italic\") ? \"secondary\" : \"outline\"}\n onClick={() => editor.chain().focus().toggleItalic().run()}\n className=\"border\"\n >\n <ItalicIcon className=\"size-3.5\" />\n </Button>\n )}\n\n {extensions.underline && (\n <Button\n type=\"button\"\n size=\"icon\"\n variant={editor?.isActive(\"underline\") ? \"secondary\" : \"outline\"}\n onClick={() => editor.chain().focus().toggleUnderline().run()}\n className=\"border\"\n >\n <UnderlineIcon className=\"size-3.5\" />\n </Button>\n )}\n\n {extensions.strike && (\n <Button\n type=\"button\"\n size=\"icon\"\n variant={editor?.isActive(\"strike\") ? \"secondary\" : \"outline\"}\n onClick={() => editor.chain().focus().toggleStrike().run()}\n className=\"border\"\n >\n <StrikethroughIcon className=\"size-3.5\" />\n </Button>\n )}\n </div>\n );\n}\n\n/**\n * Editor menu alignment\n */\nfunction EditorMenuColor() {\n const { editor, extensions } = useContext(EditorContext);\n\n if (!extensions.color && !extensions.highlight) {\n return null;\n }\n\n return (\n <div className=\"flex items-center gap-1\">\n {extensions.color && (\n <Popover>\n <PopoverTrigger asChild>\n <Button size=\"icon\" variant=\"outline\">\n <BaselineIcon className=\"size-3.5\" />\n </Button>\n </PopoverTrigger>\n\n <PopoverContent className=\"w-fit p-0\">\n <ColorPicker onValueChange={(color) => editor.chain().focus().setColor(color).run()} />\n </PopoverContent>\n </Popover>\n )}\n\n {extensions.highlight && (\n <Popover>\n <PopoverTrigger asChild>\n <Button size=\"icon\" variant=\"outline\" disabled={!editor?.can().setHighlight()}>\n <PaintBucketIcon className=\"size-3.5\" />\n </Button>\n </PopoverTrigger>\n\n <PopoverContent className=\"w-fit p-0\">\n <ColorPicker\n onValueChange={(color) => editor.chain().focus().setHighlight({ color }).run()}\n />\n </PopoverContent>\n </Popover>\n )}\n\n <Button\n type=\"button\"\n size=\"icon\"\n variant=\"outline\"\n className=\"border\"\n onClick={() => {\n editor.commands.unsetColor();\n editor.commands.unsetHighlight();\n }}\n >\n <EraserIcon className=\"h-4 w-4\" />\n </Button>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAoBA,SAAgB,gBAAgB,OAAoC;AAClE,QACE,oBAAC;EACC,GAAI;EACJ,WAAW,GAAG,4DAA4D,MAAM,UAAU;YAE1F,qBAAC;GACC,oBAAC,uBAAqB;GACtB,oBAAC,oBAAkB;GACnB,oBAAC,oBAAkB;GACnB,oBAAC,oBAAkB;MACD;GAChB;;AAIV,SAAgB,iBAAiB,OAA0C;CACzE,MAAM,EAAE,WAAW,WAAW,cAAc;AAE5C,QACE,oBAAC;EACC,GAAI;EACI;EACR,SAAS;GAAE,GAAG,MAAM;GAAS,UAAU;GAAS;EAChD,WAAW,GAAG,oDAAoD,MAAM,UAAU;YAElF,oBAAC,+BACC,oBAAC,oBAAkB,GACD;GACT;;AAIjB,SAAS,kBAAkB,OAA0B;AACnD,QAAO,oBAAC;EAAI,WAAU;YAA2B,MAAM;GAAe;;;;;AAMxE,SAAS,qBAAqB;CAC5B,MAAM,EAAE,QAAQ,eAAe,WAAW,cAAc;AAExD,KAAI,CAAC,WAAW,SAAU,QAAO;AAEjC,QACE,qBAAC;EAAI,WAAU;aACb,oBAAC;GACC,eAAe,OAAO,SAAS,MAAM;GACrC,UAAU,CAAC,QAAQ,KAAK,CAAC,MAAM;GAC/B,MAAK;GACL,cAAW;GACX,MAAK;GACL,WAAU;GACV,SAAQ;aAER,oBAAC,YAAS,WAAU,aAAa;IAC1B,EAET,oBAAC;GACC,eAAe,OAAO,SAAS,MAAM;GACrC,UAAU,CAAC,QAAQ,KAAK,CAAC,MAAM;GAC/B,MAAK;GACL,cAAW;GACX,MAAK;GACL,WAAU;GACV,SAAQ;aAER,oBAAC,YAAS,WAAU,aAAa;IAC1B;GACL;;;;;AAOV,SAAS,kBAAkB;CACzB,MAAM,EAAE,QAAQ,eAAe,WAAW,cAAc;AAExD,KAAI,CAAC,WAAW,QAAQ,CAAC,WAAW,UAAU,CAAC,WAAW,aAAa,CAAC,WAAW,OACjF,QAAO;AAGT,QACE,qBAAC;EAAI,WAAU;;GACZ,WAAW,QACV,oBAAC;IACC,MAAK;IACL,MAAK;IACL,SAAS,QAAQ,SAAS,OAAO,GAAG,cAAc;IAClD,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,KAAK;IACxD,WAAU;cAEV,oBAAC,YAAS,WAAU,gBAAgB;KAC7B;GAGV,WAAW,UACV,oBAAC;IACC,MAAK;IACL,MAAK;IACL,SAAS,QAAQ,SAAS,SAAS,GAAG,cAAc;IACpD,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK;IAC1D,WAAU;cAEV,oBAAC,cAAW,WAAU,aAAa;KAC5B;GAGV,WAAW,aACV,oBAAC;IACC,MAAK;IACL,MAAK;IACL,SAAS,QAAQ,SAAS,YAAY,GAAG,cAAc;IACvD,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,KAAK;IAC7D,WAAU;cAEV,oBAAC,iBAAc,WAAU,aAAa;KAC/B;GAGV,WAAW,UACV,oBAAC;IACC,MAAK;IACL,MAAK;IACL,SAAS,QAAQ,SAAS,SAAS,GAAG,cAAc;IACpD,eAAe,OAAO,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,KAAK;IAC1D,WAAU;cAEV,oBAAC,qBAAkB,WAAU,aAAa;KACnC;;GAEP;;;;;AAOV,SAAS,kBAAkB;CACzB,MAAM,EAAE,QAAQ,eAAe,WAAW,cAAc;AAExD,KAAI,CAAC,WAAW,SAAS,CAAC,WAAW,UACnC,QAAO;AAGT,QACE,qBAAC;EAAI,WAAU;;GACZ,WAAW,SACV,qBAAC,sBACC,oBAAC;IAAe;cACd,oBAAC;KAAO,MAAK;KAAO,SAAQ;eAC1B,oBAAC,gBAAa,WAAU,aAAa;MAC9B;KACM,EAEjB,oBAAC;IAAe,WAAU;cACxB,oBAAC,eAAY,gBAAgB,UAAU,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,MAAM,CAAC,KAAK,GAAI;KACxE,IACT;GAGX,WAAW,aACV,qBAAC,sBACC,oBAAC;IAAe;cACd,oBAAC;KAAO,MAAK;KAAO,SAAQ;KAAU,UAAU,CAAC,QAAQ,KAAK,CAAC,cAAc;eAC3E,oBAAC,mBAAgB,WAAU,aAAa;MACjC;KACM,EAEjB,oBAAC;IAAe,WAAU;cACxB,oBAAC,eACC,gBAAgB,UAAU,OAAO,OAAO,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,KAAK,GAC9E;KACa,IACT;GAGZ,oBAAC;IACC,MAAK;IACL,MAAK;IACL,SAAQ;IACR,WAAU;IACV,eAAe;AACb,YAAO,SAAS,YAAY;AAC5B,YAAO,SAAS,gBAAgB;;cAGlC,oBAAC,cAAW,WAAU,YAAY;KAC3B;;GACL"}
|
|
@@ -39,6 +39,9 @@ type EditorExtensionsConfig = {
|
|
|
39
39
|
paragraph: Partial<ParagraphOptions> | boolean;
|
|
40
40
|
text: Partial<TextStyleOptions> | boolean;
|
|
41
41
|
image: Partial<ImageOptions> | boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Marks
|
|
44
|
+
*/
|
|
42
45
|
bold: Partial<BoldOptions> | boolean;
|
|
43
46
|
italic: Partial<ItalicOptions> | boolean;
|
|
44
47
|
link: Partial<LinkOptions> | boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.d.mts","names":[],"sources":["../../../../src/components/editor/lib/extensions.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmCA;;;;AAKc,KALF,sBAAA,GAKE;EAEO;;;EACV,UAAA,EAJG,OAIH,CAJW,iBAIX,CAAA,GAAA,OAAA;EACe,UAAA,EAJZ,OAIY,CAJJ,iBAII,CAAA,GAAA,OAAA;EAAR,QAAA,EAAA,OAAA;EACE,SAAA,EAHP,OAGO,CAHC,gBAGD,CAAA,GAAA,OAAA;EAAR,OAAA,EAFD,OAEC,CAFO,cAEP,CAAA,GAAA,OAAA;EACW,cAAA,EAFL,OAEK,CAFG,qBAEH,CAAA,GAAA,OAAA;EAAR,QAAA,EADH,OACG,CADK,eACL,CAAA,GAAA,OAAA;EACM,WAAA,EADN,OACM,CADE,kBACF,CAAA,GAAA,OAAA;EAAR,SAAA,EAAA,OAAA,CAAQ,gBAAR,CAAA,GAAA,OAAA;EACG,IAAA,EAAR,OAAQ,CAAA,gBAAA,CAAA,GAAA,OAAA;EAAR,KAAA,EACC,OADD,CACS,YADT,CAAA,GAAA,OAAA;EACS,IAAA,
|
|
1
|
+
{"version":3,"file":"extensions.d.mts","names":[],"sources":["../../../../src/components/editor/lib/extensions.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmCA;;;;AAKc,KALF,sBAAA,GAKE;EAEO;;;EACV,UAAA,EAJG,OAIH,CAJW,iBAIX,CAAA,GAAA,OAAA;EACe,UAAA,EAJZ,OAIY,CAJJ,iBAII,CAAA,GAAA,OAAA;EAAR,QAAA,EAAA,OAAA;EACE,SAAA,EAHP,OAGO,CAHC,gBAGD,CAAA,GAAA,OAAA;EAAR,OAAA,EAFD,OAEC,CAFO,cAEP,CAAA,GAAA,OAAA;EACW,cAAA,EAFL,OAEK,CAFG,qBAEH,CAAA,GAAA,OAAA;EAAR,QAAA,EADH,OACG,CADK,eACL,CAAA,GAAA,OAAA;EACM,WAAA,EADN,OACM,CADE,kBACF,CAAA,GAAA,OAAA;EAAR,SAAA,EAAA,OAAA,CAAQ,gBAAR,CAAA,GAAA,OAAA;EACG,IAAA,EAAR,OAAQ,CAAA,gBAAA,CAAA,GAAA,OAAA;EAAR,KAAA,EACC,OADD,CACS,YADT,CAAA,GAAA,OAAA;EACS;;;EAIT,IAAA,EAAA,OAAA,CAAQ,WAAR,CAAA,GAAA,OAAA;EACU,MAAA,EAAR,OAAQ,CAAA,aAAA,CAAA,GAAA,OAAA;EAAR,IAAA,EACF,OADE,CACM,WADN,CAAA,GAAA,OAAA;EACM,MAAA,EACN,OADM,CACE,aADF,CAAA,GAAA,OAAA;EAAR,SAAA,EAEK,OAFL,CAEa,gBAFb,CAAA,GAAA,OAAA;EACU,SAAA,EAEL,OAFK,CAEG,gBAFH,CAAA,GAAA,OAAA;EAAR;;;EAEW,UAAA,EAIP,OAJO,CAIC,iBAJD,CAAA,GAAA,OAAA;EAAR,SAAA,EAAA,OAAA;EAIS,QAAA,EAEV,OAFU,CAEF,eAFE,CAAA,GAAA,OAAA;EAAR,UAAA,EAGA,OAHA,CAGQ,iBAHR,CAAA,GAAA,OAAA;EAEM,YAAA,EAEJ,OAFI,CAEI,mBAFJ,CAAA,GAAA,OAAA;EAAR,SAAA,EAGC,OAHD,CAGS,gBAHT,CAAA,GAAA,OAAA;EACU,KAAA,EAGb,OAHa,CAGL,YAHK,CAAA,GAAA,OAAA;CAAR;KA2EF,4BAAA,GAA+B,aAAa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.mjs","names":[],"sources":["../../../../src/components/editor/lib/extensions.ts"],"sourcesContent":["import { BlockquoteOptions } from \"@tiptap/extension-blockquote\";\nimport { BoldOptions } from \"@tiptap/extension-bold\";\nimport { HardBreakOptions } from \"@tiptap/extension-hard-break\";\nimport { HeadingOptions } from \"@tiptap/extension-heading\";\nimport { HighlightOptions } from \"@tiptap/extension-highlight\";\nimport { HorizontalRuleOptions } from \"@tiptap/extension-horizontal-rule\";\nimport { ImageOptions } from \"@tiptap/extension-image\";\nimport { ItalicOptions } from \"@tiptap/extension-italic\";\nimport { LinkOptions } from \"@tiptap/extension-link\";\nimport {\n BulletListOptions,\n ListItemOptions,\n ListKeymapOptions,\n OrderedListOptions,\n} from \"@tiptap/extension-list\";\nimport { ParagraphOptions } from \"@tiptap/extension-paragraph\";\nimport { StrikeOptions } from \"@tiptap/extension-strike\";\nimport { ColorOptions, TextStyleOptions } from \"@tiptap/extension-text-style\";\nimport { UnderlineOptions } from \"@tiptap/extension-underline\";\nimport { DropcursorOptions, TrailingNodeOptions, UndoRedoOptions } from \"@tiptap/extensions\";\nimport { Extension } from \"@tiptap/react\";\nimport deepmerge from \"deepmerge\";\nimport {\n EDITOR_EXTENSIONS,\n EDITOR_EXTENSIONS_CONFIG,\n EDITOR_EXTENSIONS_KEYS,\n EditorExtensions,\n} from \"./constants\";\n\n/**\n * Editor extensions defaults\n */\n/**\n * Editor extensions map\n */\nexport type EditorExtensionsConfig = {\n /**\n * Nodes\n */\n blockquote: Partial<BlockquoteOptions> | boolean;\n bulletList: Partial<BulletListOptions> | boolean;\n document: boolean;\n hardBreak: Partial<HardBreakOptions> | boolean;\n heading: Partial<HeadingOptions> | boolean;\n horizontalRule: Partial<HorizontalRuleOptions> | boolean;\n listItem: Partial<ListItemOptions> | boolean;\n orderedList: Partial<OrderedListOptions> | boolean;\n paragraph: Partial<ParagraphOptions> | boolean;\n text: Partial<TextStyleOptions> | boolean;\n image: Partial<ImageOptions> | boolean;\n
|
|
1
|
+
{"version":3,"file":"extensions.mjs","names":[],"sources":["../../../../src/components/editor/lib/extensions.ts"],"sourcesContent":["import { BlockquoteOptions } from \"@tiptap/extension-blockquote\";\nimport { BoldOptions } from \"@tiptap/extension-bold\";\nimport { HardBreakOptions } from \"@tiptap/extension-hard-break\";\nimport { HeadingOptions } from \"@tiptap/extension-heading\";\nimport { HighlightOptions } from \"@tiptap/extension-highlight\";\nimport { HorizontalRuleOptions } from \"@tiptap/extension-horizontal-rule\";\nimport { ImageOptions } from \"@tiptap/extension-image\";\nimport { ItalicOptions } from \"@tiptap/extension-italic\";\nimport { LinkOptions } from \"@tiptap/extension-link\";\nimport {\n BulletListOptions,\n ListItemOptions,\n ListKeymapOptions,\n OrderedListOptions,\n} from \"@tiptap/extension-list\";\nimport { ParagraphOptions } from \"@tiptap/extension-paragraph\";\nimport { StrikeOptions } from \"@tiptap/extension-strike\";\nimport { ColorOptions, TextStyleOptions } from \"@tiptap/extension-text-style\";\nimport { UnderlineOptions } from \"@tiptap/extension-underline\";\nimport { DropcursorOptions, TrailingNodeOptions, UndoRedoOptions } from \"@tiptap/extensions\";\nimport { Extension } from \"@tiptap/react\";\nimport deepmerge from \"deepmerge\";\nimport {\n EDITOR_EXTENSIONS,\n EDITOR_EXTENSIONS_CONFIG,\n EDITOR_EXTENSIONS_KEYS,\n EditorExtensions,\n} from \"./constants\";\n\n/**\n * Editor extensions defaults\n */\n/**\n * Editor extensions map\n */\nexport type EditorExtensionsConfig = {\n /**\n * Nodes\n */\n blockquote: Partial<BlockquoteOptions> | boolean;\n bulletList: Partial<BulletListOptions> | boolean;\n document: boolean;\n hardBreak: Partial<HardBreakOptions> | boolean;\n heading: Partial<HeadingOptions> | boolean;\n horizontalRule: Partial<HorizontalRuleOptions> | boolean;\n listItem: Partial<ListItemOptions> | boolean;\n orderedList: Partial<OrderedListOptions> | boolean;\n paragraph: Partial<ParagraphOptions> | boolean;\n text: Partial<TextStyleOptions> | boolean;\n image: Partial<ImageOptions> | boolean;\n /**\n * Marks\n */\n bold: Partial<BoldOptions> | boolean;\n italic: Partial<ItalicOptions> | boolean;\n link: Partial<LinkOptions> | boolean;\n strike: Partial<StrikeOptions> | boolean;\n underline: Partial<UnderlineOptions> | boolean;\n highlight: Partial<HighlightOptions> | boolean;\n /**\n * Extensions\n */\n dropcursor: Partial<DropcursorOptions> | boolean;\n gapcursor: boolean;\n undoRedo: Partial<UndoRedoOptions> | boolean;\n listKeymap: Partial<ListKeymapOptions> | boolean;\n trailingNode: Partial<TrailingNodeOptions> | boolean;\n textStyle: Partial<TextStyleOptions> | boolean;\n color: Partial<ColorOptions> | boolean;\n};\n\n/**\n * Create extension config\n * @param name\n * @param defaultOptions\n * @returns\n */\nexport function createExtensionConfig<TName extends keyof EditorExtensionsConfig>(\n name: TName,\n defaultOptions: Partial<Exclude<EditorExtensionsConfig[TName], boolean>> = {},\n) {\n return {\n name,\n configure: (options: EditorExtensionsConfig[TName]) => {\n // Get extension\n const extension = EDITOR_EXTENSIONS[name];\n\n // If no options or no extension, return undefined\n if (!options || !extension) return undefined;\n\n // If no options are provided, return extension\n if (typeof options === \"boolean\") return extension.configure(defaultOptions);\n\n const extensionOptions = deepmerge(defaultOptions, options as object);\n\n // If no options are provided, return extension else configure\n return extension.configure(extensionOptions);\n },\n };\n}\n\n/**\n * Editor extensions config to extensions\n */\nexport function editorExtensionsConfigToExtensions(extensions?: Partial<EditorExtensionsConfig>) {\n return EDITOR_EXTENSIONS_CONFIG.flatMap(({ name, configure }) => {\n // Get the extension config\n const value = extensions?.[name];\n\n // if no value is provided, return extension\n if (value === undefined) return configure(true) as Extension;\n\n // If value is boolean, return extension\n return configure(value as any) as Extension;\n });\n}\n\n/**\n * Editor extensions config result\n */\nexport function flattenEditorExtensionsConfig(\n extensions?: Partial<EditorExtensionsConfig>,\n): EditorExtensionsConfigResult {\n return EDITOR_EXTENSIONS_KEYS.reduce((acc, key) => {\n const value = extensions?.[key as keyof EditorExtensionsConfig];\n\n if (value === undefined) {\n return {\n ...acc,\n [key]: true,\n };\n }\n\n return {\n ...acc,\n [key]: typeof value === \"boolean\" ? value : true,\n };\n }, {} as EditorExtensionsConfigResult);\n}\n\nexport type EditorExtensionsConfigResult = Record<keyof EditorExtensions, boolean>;\n\n// const { uploadImage } = useUploadEditor();\n// StarterKit,\n// Underline,\n// Link,\n// TextStyle,\n// Color,\n// Highlight.configure({ multicolor: true }),\n// Image.configure({\n// allowBase64: false,\n// }),\n// FileHandler.configure({\n// allowedMimeTypes: [\"image/png\", \"image/jpeg\", \"image/gif\", \"image/webp\"],\n// onDrop: (currentEditor, files, pos) => {\n// files.forEach((file) => {\n// const fileReader = new FileReader();\n\n// fileReader.readAsArrayBuffer(file);\n// fileReader.onload = async () => {\n// const response = await uploadImage(file);\n// if (!response) return;\n\n// currentEditor\n// .chain()\n// .insertContentAt(pos, {\n// type: \"image\",\n// attrs: { src: response.url },\n// })\n// .focus()\n// .run();\n// };\n// });\n// },\n// onPaste: (currentEditor, files) => {\n// files.forEach((file) => {\n// const fileReader = new FileReader();\n\n// fileReader.readAsArrayBuffer(file);\n// fileReader.onload = async () => {\n// const response = await uploadImage(file);\n// if (!response) return;\n\n// currentEditor\n// .chain()\n// .insertContentAt(currentEditor.state.selection.anchor, {\n// type: \"image\",\n// attrs: { src: response.url },\n// })\n// .focus()\n// .run();\n// };\n// });\n// },\n// }),\n"],"mappings":";;;;;;;;;;AA6EA,SAAgB,sBACd,MACA,iBAA2E,EAAE,EAC7E;AACA,QAAO;EACL;EACA,YAAY,YAA2C;GAErD,MAAM,YAAY,kBAAkB;AAGpC,OAAI,CAAC,WAAW,CAAC,UAAW,QAAO;AAGnC,OAAI,OAAO,YAAY,UAAW,QAAO,UAAU,UAAU,eAAe;GAE5E,MAAM,mBAAmB,UAAU,gBAAgB,QAAkB;AAGrE,UAAO,UAAU,UAAU,iBAAiB;;EAE/C;;;;;AAMH,SAAgB,mCAAmC,YAA8C;AAC/F,QAAO,yBAAyB,SAAS,EAAE,MAAM,gBAAgB;EAE/D,MAAM,QAAQ,aAAa;AAG3B,MAAI,UAAU,OAAW,QAAO,UAAU,KAAK;AAG/C,SAAO,UAAU,MAAa;GAC9B;;;;;AAMJ,SAAgB,8BACd,YAC8B;AAC9B,QAAO,uBAAuB,QAAQ,KAAK,QAAQ;EACjD,MAAM,QAAQ,aAAa;AAE3B,MAAI,UAAU,OACZ,QAAO;GACL,GAAG;IACF,MAAM;GACR;AAGH,SAAO;GACL,GAAG;IACF,MAAM,OAAO,UAAU,YAAY,QAAQ;GAC7C;IACA,EAAE,CAAiC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime264 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/header/back-button.client.d.ts
|
|
4
4
|
declare function HeaderTopbarBackButton({
|
|
5
5
|
className,
|
|
6
6
|
...props
|
|
7
|
-
}: React.HtmlHTMLAttributes<HTMLButtonElement>):
|
|
7
|
+
}: React.HtmlHTMLAttributes<HTMLButtonElement>): react_jsx_runtime264.JSX.Element;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { HeaderTopbarBackButton };
|
|
10
10
|
//# sourceMappingURL=back-button.client.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Path } from "../../modules/config/paths/types.mjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime265 from "react/jsx-runtime";
|
|
3
3
|
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/header/bottom-bar.client.d.ts
|
|
@@ -11,7 +11,7 @@ type BottomBarProps = {
|
|
|
11
11
|
};
|
|
12
12
|
declare function BottomBar({
|
|
13
13
|
children
|
|
14
|
-
}: BottomBarProps):
|
|
14
|
+
}: BottomBarProps): react_jsx_runtime265.JSX.Element;
|
|
15
15
|
/**
|
|
16
16
|
* Bottombar link component
|
|
17
17
|
*/
|
|
@@ -23,7 +23,7 @@ declare function BottomBarLinks({
|
|
|
23
23
|
paths,
|
|
24
24
|
className,
|
|
25
25
|
...props
|
|
26
|
-
}: BottomBarLinksProps):
|
|
26
|
+
}: BottomBarLinksProps): react_jsx_runtime265.JSX.Element;
|
|
27
27
|
//#endregion
|
|
28
28
|
export { BottomBar, BottomBarLink, BottomBarLinks, BottomBarLinksProps, BottomBarProps };
|
|
29
29
|
//# sourceMappingURL=bottom-bar.client.d.mts.map
|