betterstart-cli 0.0.110 → 0.0.111

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.
Files changed (56) hide show
  1. package/dist/assets/adapters/next/templates/init/components/shared/dev-mode-integrate.tsx +2 -2
  2. package/dist/assets/adapters/next/templates/init/components/shared/entity-filters-bar.tsx +1 -1
  3. package/dist/assets/adapters/next/templates/init/components/shared/entity-versions/entity-versions-drawer.tsx +1 -1
  4. package/dist/assets/adapters/next/templates/init/components/shared/media/media-filters-bar.tsx +2 -2
  5. package/dist/assets/adapters/next/templates/init/components/shared/media/media-gallery-dialog.tsx +1 -1
  6. package/dist/assets/adapters/next/templates/init/components/shared/media/media-preview.tsx +1 -1
  7. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-color-highlight.ts +1 -3
  8. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-media-insertion.ts +1 -3
  9. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor.ts +2 -6
  10. package/dist/assets/adapters/next/templates/init/pages/account-shell.tsx +1 -1
  11. package/dist/assets/adapters/next/templates/init/pages/auth-gate.tsx +1 -1
  12. package/dist/assets/adapters/next/templates/init/pages/forgot-password-form.tsx +4 -4
  13. package/dist/assets/adapters/next/templates/init/pages/forgot-password-page-skeleton.tsx +3 -3
  14. package/dist/assets/adapters/next/templates/init/pages/forgot-password-page.tsx +2 -2
  15. package/dist/assets/adapters/next/templates/init/pages/login-form.tsx +4 -4
  16. package/dist/assets/adapters/next/templates/init/pages/login-page-skeleton.tsx +3 -3
  17. package/dist/assets/adapters/next/templates/init/pages/login-page.tsx +2 -2
  18. package/dist/assets/adapters/next/templates/init/pages/media/media-page-content.tsx +1 -1
  19. package/dist/assets/adapters/next/templates/init/pages/reset-password-form.tsx +8 -8
  20. package/dist/assets/adapters/next/templates/init/pages/reset-password-page-skeleton.tsx +3 -3
  21. package/dist/assets/adapters/next/templates/init/pages/reset-password-page.tsx +2 -2
  22. package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-detail-drawer.tsx +1 -1
  23. package/dist/assets/adapters/next/templates/init/pages/settings/audit-log/audit-log-page.tsx +1 -1
  24. package/dist/assets/adapters/next/templates/init/pages/settings/forms/form-notifications-drawer.tsx +1 -1
  25. package/dist/assets/adapters/next/templates/init/pages/settings/forms/forms-settings-page.tsx +1 -1
  26. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/delete-webhook-dialog.tsx +1 -1
  27. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhook-endpoint-dialog.tsx +1 -1
  28. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-logs-page.tsx +1 -1
  29. package/dist/assets/adapters/next/templates/init/pages/settings/webhooks/webhooks-page.tsx +1 -1
  30. package/dist/assets/adapters/next/templates/init/pages/users/change-password-dialog.tsx +1 -1
  31. package/dist/assets/adapters/next/templates/init/pages/users/create-user-dialog.tsx +1 -1
  32. package/dist/assets/adapters/next/templates/init/pages/users/edit-role-dialog.tsx +1 -1
  33. package/dist/assets/shared-assets/react-admin/custom/content-editor/index.tsx +5 -30
  34. package/dist/assets/shared-assets/react-admin/custom/content-editor/main-toolbar-content.tsx +6 -28
  35. package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-node/removable-image-node/removable-image-node.tsx +1 -1
  36. package/dist/assets/shared-assets/react-admin/custom/gallery-field.tsx +3 -3
  37. package/dist/assets/shared-assets/react-admin/ui/alert-dialog.tsx +6 -6
  38. package/dist/assets/shared-assets/react-admin/ui/alert.tsx +1 -1
  39. package/dist/assets/shared-assets/react-admin/ui/breadcrumb.tsx +1 -1
  40. package/dist/assets/shared-assets/react-admin/ui/calendar.tsx +1 -1
  41. package/dist/assets/shared-assets/react-admin/ui/card.tsx +1 -1
  42. package/dist/assets/shared-assets/react-admin/ui/dialog.tsx +2 -2
  43. package/dist/assets/shared-assets/react-admin/ui/drawer.tsx +2 -2
  44. package/dist/assets/shared-assets/react-admin/ui/field.tsx +2 -4
  45. package/dist/assets/shared-assets/react-admin/ui/input.tsx +1 -1
  46. package/dist/assets/shared-assets/react-admin/ui/pagination.tsx +2 -2
  47. package/dist/assets/shared-assets/react-admin/ui/sheet.tsx +1 -1
  48. package/dist/assets/shared-assets/react-admin/ui/sidebar.tsx +13 -63
  49. package/dist/assets/shared-assets/react-admin/ui/textarea.tsx +1 -1
  50. package/dist/cli.js +45 -113
  51. package/dist/cli.js.map +1 -1
  52. package/package.json +1 -1
  53. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-mobile-toolbar.ts +0 -17
  54. package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-is-breakpoint.ts +0 -24
  55. package/dist/assets/adapters/next/templates/init/hooks/use-mobile.ts +0 -19
  56. package/dist/assets/shared-assets/react-admin/custom/content-editor/mobile-toolbar-content.tsx +0 -56
@@ -49,9 +49,9 @@ export function DevModeIntegrateButton({
49
49
  <Drawer swipeDirection="right" onOpenChange={handleOpenChange}>
50
50
  <DrawerTrigger render={<Button type="button" variant="outline" />}>
51
51
  <Code2 />
52
- <span className="hidden sm:inline">Dev Mode</span>
52
+ <span className="inline">Dev Mode</span>
53
53
  </DrawerTrigger>
54
- <DrawerContent className="w-full overflow-hidden data-[swipe-direction=right]:sm:max-w-2xl data-[swipe-direction=right]:lg:max-w-4xl">
54
+ <DrawerContent className="w-full overflow-hidden data-[swipe-direction=right]:max-w-4xl">
55
55
  <DrawerHeader className="pb-4">
56
56
  <DrawerTitle>{integration.schemaLabel}</DrawerTitle>
57
57
  <DrawerDescription>
@@ -64,7 +64,7 @@ export function EntityFiltersBar({
64
64
  return (
65
65
  <div
66
66
  className={cn(
67
- 'sticky top-14 z-10 flex h-16 gap-1 overflow-x-clip bg-background px-4 transition-shadow xl:flex-row xl:items-center xl:justify-between',
67
+ 'sticky top-14 z-10 flex h-16 flex-row items-center justify-between gap-1 overflow-x-clip bg-background px-4 transition-shadow',
68
68
  {
69
69
  'shadow-modal/3': hasScrolled
70
70
  }
@@ -43,7 +43,7 @@ export function EntityVersionsDrawer({
43
43
  }: EntityVersionsDrawerProps) {
44
44
  return (
45
45
  <Drawer swipeDirection="right" open={open} onOpenChange={onOpenChange} modal>
46
- <DrawerContent className="h-full sm:max-w-lg">
46
+ <DrawerContent className="h-full max-w-lg">
47
47
  <DrawerHeader>
48
48
  <DrawerTitle>Versions</DrawerTitle>
49
49
  <DrawerDescription>
@@ -48,7 +48,7 @@ export function MediaFiltersBar({
48
48
  return (
49
49
  <div
50
50
  className={cn(
51
- 'sticky top-14 z-9 flex h-16 flex-col gap-1 overflow-clip bg-background px-4 transition-shadow xl:flex-row xl:items-center xl:justify-between',
51
+ 'sticky top-14 z-9 flex h-16 flex-row items-center justify-between gap-1 overflow-clip bg-background px-4 transition-shadow',
52
52
  {
53
53
  'shadow-modal/3': hasScrolled
54
54
  }
@@ -81,7 +81,7 @@ export function MediaFiltersBar({
81
81
  </ButtonGroup>
82
82
  </div>
83
83
 
84
- <div className="flex items-center gap-1 self-end xl:self-auto">
84
+ <div className="flex items-center gap-1 self-auto">
85
85
  {actions}
86
86
 
87
87
  {selection.isSelectMode ? (
@@ -99,7 +99,7 @@ export function MediaGalleryDialog({
99
99
  onOpenChange(next)
100
100
  }}
101
101
  >
102
- <DialogContent className="flex h-[80svh] max-h-[700px] min-h-0 flex-col gap-0 overflow-hidden sm:max-w-3xl">
102
+ <DialogContent className="flex h-[80svh] max-h-[700px] min-h-0 max-w-3xl flex-col gap-0 overflow-hidden">
103
103
  <DialogHeader>
104
104
  <DialogTitle>Select file</DialogTitle>
105
105
  <DialogDescription>
@@ -26,7 +26,7 @@ export function MediaPreview({ media, isFilled = false, showMetadata = false }:
26
26
  'object-contain': !isFilled
27
27
  })}
28
28
  fill
29
- sizes="(max-width: 640px) 50vw, (max-width: 1024px) 33vw, 200px"
29
+ sizes="200px"
30
30
  unoptimized
31
31
  loading="lazy"
32
32
  decoding="async"
@@ -2,7 +2,6 @@
2
2
 
3
3
  import type { ContentEditorHighlightColorOption } from '@admin/utils/editor/content-editor-highlight-color-option'
4
4
  import type { Editor } from '@tiptap/react'
5
- import { useIsBreakpoint } from '@admin/hooks/content-editor/use-is-breakpoint'
6
5
  import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
7
6
  import { CONTENT_EDITOR_HIGHLIGHT_COLOR_OPTIONS } from '@admin/utils/editor/content-editor-highlight-color-options'
8
7
  import { CONTENT_EDITOR_HIGHLIGHT_COLORS } from '@admin/utils/editor/content-editor-highlight-colors'
@@ -152,7 +151,6 @@ export function useColorHighlight(config: UseColorHighlightConfig) {
152
151
  } = config
153
152
 
154
153
  const { editor } = useTiptapEditor(providedEditor)
155
- const isMobile = useIsBreakpoint()
156
154
  const [isVisible, setIsVisible] = useState<boolean>(true)
157
155
  const canColorHighlightState = canColorHighlight(editor, mode)
158
156
  const actualColor = highlightColor
@@ -222,7 +220,7 @@ export function useColorHighlight(config: UseColorHighlightConfig) {
222
220
  },
223
221
  {
224
222
  enabled: isVisible && canColorHighlightState,
225
- enableOnContentEditable: !isMobile,
223
+ enableOnContentEditable: true,
226
224
  enableOnFormTags: true
227
225
  }
228
226
  )
@@ -2,7 +2,6 @@
2
2
 
3
3
  import * as React from 'react'
4
4
  import type { Editor } from '@tiptap/react'
5
- import { useIsBreakpoint } from '@admin/hooks/content-editor/use-is-breakpoint'
6
5
  import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
7
6
  import { canInsertContentEditorMediaPlaceholder } from '@admin/utils/editor/can-insert-content-editor-media-placeholder'
8
7
  import { CONTENT_EDITOR_MEDIA_SHORTCUT_KEY } from '@admin/utils/editor/content-editor-media-shortcut-key'
@@ -20,7 +19,6 @@ export function useContentEditorMediaInsertion({
20
19
  onInserted
21
20
  }: UseContentEditorMediaInsertionOptions = {}) {
22
21
  const { editor } = useTiptapEditor(providedEditor)
23
- const isMobile = useIsBreakpoint()
24
22
  const canInsert = canInsertContentEditorMediaPlaceholder(editor)
25
23
  const isActive = isContentEditorMediaPlaceholderActive(editor)
26
24
  const isVisible = Boolean(editor?.isEditable)
@@ -41,7 +39,7 @@ export function useContentEditorMediaInsertion({
41
39
  },
42
40
  {
43
41
  enabled: isVisible && canInsert,
44
- enableOnContentEditable: !isMobile,
42
+ enableOnContentEditable: true,
45
43
  enableOnFormTags: true
46
44
  }
47
45
  )
@@ -42,7 +42,6 @@ export interface UseContentEditorOptions {
42
42
  placeholder?: string
43
43
  disabled: boolean
44
44
  defaultMode: ContentEditorMode
45
- onModeToggle?: () => void
46
45
  }
47
46
 
48
47
  export function useContentEditor({
@@ -50,8 +49,7 @@ export function useContentEditor({
50
49
  onChange,
51
50
  placeholder,
52
51
  disabled,
53
- defaultMode,
54
- onModeToggle
52
+ defaultMode
55
53
  }: UseContentEditorOptions) {
56
54
  const [mode, setMode] = React.useState<ContentEditorMode>(defaultMode)
57
55
  const [sourceSelectionRequest, setSourceSelectionRequest] =
@@ -257,8 +255,6 @@ export function useContentEditor({
257
255
  )
258
256
 
259
257
  const handleModeChange = React.useCallback(() => {
260
- onModeToggle?.()
261
-
262
258
  if (mode === 'source') {
263
259
  pendingRichSelectionOffsetRef.current = sourceSelectionRef.current
264
260
  setMode('rich')
@@ -282,7 +278,7 @@ export function useContentEditor({
282
278
  }
283
279
 
284
280
  setMode('source')
285
- }, [editor, mode, onModeToggle])
281
+ }, [editor, mode])
286
282
 
287
283
  return {
288
284
  activeSlashIndex,
@@ -22,7 +22,7 @@ export async function AccountShell({ children }: { children: React.ReactNode })
22
22
  return (
23
23
  <SidebarProvider className="min-h-svh">
24
24
  <AdminSidebar />
25
- <div className="relative flex min-w-0 flex-1 flex-col [--admin-shell-content-left:0px] md:[--admin-shell-content-left:var(--sidebar-width)] md:peer-data-[state=collapsed]:[--admin-shell-content-left:var(--sidebar-width-icon)]">
25
+ <div className="relative flex min-w-0 flex-1 flex-col [--admin-shell-content-left:var(--sidebar-width)] peer-data-[state=collapsed]:[--admin-shell-content-left:var(--sidebar-width-icon)]">
26
26
  {children}
27
27
  </div>
28
28
  </SidebarProvider>
@@ -8,7 +8,7 @@ export async function AuthGate({ children }: { children: React.ReactNode }) {
8
8
  return (
9
9
  <SidebarProvider className="min-h-svh">
10
10
  <AdminSidebar />
11
- <div className="relative flex min-w-0 flex-1 flex-col pb-14 [--admin-shell-content-left:0px] md:[--admin-shell-content-left:var(--sidebar-width)] md:peer-data-[state=collapsed]:[--admin-shell-content-left:var(--sidebar-width-icon)]">
11
+ <div className="relative flex min-w-0 flex-1 flex-col pb-14 [--admin-shell-content-left:var(--sidebar-width)] peer-data-[state=collapsed]:[--admin-shell-content-left:var(--sidebar-width-icon)]">
12
12
  {children}
13
13
  </div>
14
14
  </SidebarProvider>
@@ -66,17 +66,17 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentProps
66
66
  return (
67
67
  <div className={cn('flex flex-col gap-6', className)} {...props}>
68
68
  <Card className="overflow-hidden p-0">
69
- <CardContent className="grid p-0 md:grid-cols-[5fr_7fr]">
70
- <div className="relative hidden bg-muted md:block">
69
+ <CardContent className="grid grid-cols-[5fr_7fr] p-0">
70
+ <div className="relative block bg-muted">
71
71
  <Image
72
72
  src="https://assets.betterstart.dev/assets/placeholder.png"
73
73
  alt=""
74
74
  fill
75
- sizes="(min-width: 768px) 42vw, 0px"
75
+ sizes="42vw"
76
76
  className="object-cover"
77
77
  />
78
78
  </div>
79
- <div className="p-6 md:p-20">
79
+ <div className="p-20">
80
80
  <Form {...form}>
81
81
  <form
82
82
  autoComplete="off"
@@ -1,9 +1,9 @@
1
1
  export function ForgotPasswordPageSkeleton() {
2
2
  return (
3
3
  <div className="overflow-hidden rounded-sm border bg-card">
4
- <div className="grid md:grid-cols-[5fr_7fr]">
5
- <div className="hidden min-h-[460px] bg-muted md:block" />
6
- <div className="flex min-h-[460px] flex-col gap-10 p-6 md:p-20">
4
+ <div className="grid grid-cols-[5fr_7fr]">
5
+ <div className="block min-h-[460px] bg-muted" />
6
+ <div className="flex min-h-[460px] flex-col gap-10 p-20">
7
7
  <div className="space-y-3">
8
8
  <div className="h-6 w-40 animate-pulse rounded-md bg-muted" />
9
9
  <div className="h-4 w-full max-w-72 animate-pulse rounded-md bg-muted" />
@@ -10,8 +10,8 @@ export const metadata: Metadata = {
10
10
 
11
11
  export default function ForgotPasswordPage() {
12
12
  return (
13
- <div className="flex min-h-svh flex-col items-center justify-center bg-background p-6 md:p-10">
14
- <div className="w-full max-w-sm md:max-w-4xl">
13
+ <div className="flex min-h-svh flex-col items-center justify-center bg-background p-10">
14
+ <div className="w-full max-w-4xl">
15
15
  <Suspense fallback={<ForgotPasswordPageSkeleton />}>
16
16
  <ForgotPasswordForm />
17
17
  </Suspense>
@@ -81,13 +81,13 @@ export function LoginForm({ className, ...props }: React.ComponentProps<'div'>)
81
81
  return (
82
82
  <div className={cn('flex flex-col gap-6', className)} {...props}>
83
83
  <Card className="overflow-hidden p-0">
84
- <CardContent className="grid p-0 md:grid-cols-[5fr_7fr]">
85
- <div className="relative hidden bg-muted md:block">
84
+ <CardContent className="grid grid-cols-[5fr_7fr] p-0">
85
+ <div className="relative block bg-muted">
86
86
  <Image
87
87
  src="https://assets.betterstart.dev/assets/placeholder.png"
88
88
  alt=""
89
89
  fill
90
- sizes="(min-width: 768px) 42vw, 0px"
90
+ sizes="42vw"
91
91
  className="object-cover"
92
92
  />
93
93
  </div>
@@ -96,7 +96,7 @@ export function LoginForm({ className, ...props }: React.ComponentProps<'div'>)
96
96
  autoComplete="off"
97
97
  noValidate
98
98
  onSubmit={form.handleSubmit(handleSubmit, handleInvalid)}
99
- className="p-6 md:p-20"
99
+ className="p-20"
100
100
  >
101
101
  <FieldGroup className="gap-10 pb-12">
102
102
  <div className="flex flex-col items-start">
@@ -1,9 +1,9 @@
1
1
  export function LoginPageSkeleton() {
2
2
  return (
3
3
  <div className="overflow-hidden rounded-sm border bg-card">
4
- <div className="grid md:grid-cols-[5fr_7fr]">
5
- <div className="hidden min-h-[540px] bg-muted md:block" />
6
- <div className="flex min-h-[540px] flex-col gap-10 p-6 md:p-20">
4
+ <div className="grid grid-cols-[5fr_7fr]">
5
+ <div className="block min-h-[540px] bg-muted" />
6
+ <div className="flex min-h-[540px] flex-col gap-10 p-20">
7
7
  <div className="space-y-3">
8
8
  <div className="h-6 w-32 animate-pulse rounded-md bg-muted" />
9
9
  <div className="h-4 w-40 animate-pulse rounded-md bg-muted" />
@@ -10,8 +10,8 @@ export const metadata: Metadata = {
10
10
 
11
11
  export default function LoginPage() {
12
12
  return (
13
- <div className="flex min-h-svh flex-col items-center justify-center bg-background p-6 md:p-10">
14
- <div className="w-full max-w-sm md:max-w-4xl">
13
+ <div className="flex min-h-svh flex-col items-center justify-center bg-background p-10">
14
+ <div className="w-full max-w-4xl">
15
15
  <Suspense fallback={<LoginPageSkeleton />}>
16
16
  <LoginPageContent />
17
17
  </Suspense>
@@ -238,7 +238,7 @@ export function MediaPageContent() {
238
238
  selectedIds={selected}
239
239
  isSelectMode={isSelectMode}
240
240
  onItemClick={handleItemClick}
241
- className="px-px pt-px pb-12 lg:grid-cols-12"
241
+ className="grid-cols-12 px-px pt-px pb-12"
242
242
  />
243
243
  {total > DEFAULT_MEDIA_PAGE_SIZE ? (
244
244
  <MediaGridPagination
@@ -53,17 +53,17 @@ export function ResetPasswordForm({ className, ...props }: React.ComponentProps<
53
53
  return (
54
54
  <div className={cn('flex flex-col gap-6', className)} {...props}>
55
55
  <Card className="overflow-hidden p-0">
56
- <CardContent className="grid p-0 md:grid-cols-[5fr_7fr]">
57
- <div className="relative hidden bg-muted md:block">
56
+ <CardContent className="grid grid-cols-[5fr_7fr] p-0">
57
+ <div className="relative block bg-muted">
58
58
  <Image
59
59
  src="https://assets.betterstart.dev/assets/placeholder.png"
60
60
  alt=""
61
61
  fill
62
- sizes="(min-width: 768px) 42vw, 0px"
62
+ sizes="42vw"
63
63
  className="object-cover"
64
64
  />
65
65
  </div>
66
- <div className="p-6 md:p-20">
66
+ <div className="p-20">
67
67
  <FieldGroup className="gap-10 pb-12">
68
68
  <div className="flex flex-col items-start">
69
69
  <h1 className="text-xl font-medium">Invalid reset link</h1>
@@ -112,13 +112,13 @@ export function ResetPasswordForm({ className, ...props }: React.ComponentProps<
112
112
  return (
113
113
  <div className={cn('flex flex-col gap-6', className)} {...props}>
114
114
  <Card className="overflow-hidden p-0">
115
- <CardContent className="grid p-0 md:grid-cols-[5fr_7fr]">
116
- <div className="relative hidden bg-muted md:block">
115
+ <CardContent className="grid grid-cols-[5fr_7fr] p-0">
116
+ <div className="relative block bg-muted">
117
117
  <Image
118
118
  src="https://assets.betterstart.dev/assets/placeholder.png"
119
119
  alt=""
120
120
  fill
121
- sizes="(min-width: 768px) 42vw, 0px"
121
+ sizes="42vw"
122
122
  className="object-cover"
123
123
  />
124
124
  </div>
@@ -127,7 +127,7 @@ export function ResetPasswordForm({ className, ...props }: React.ComponentProps<
127
127
  autoComplete="off"
128
128
  noValidate
129
129
  onSubmit={form.handleSubmit(handleSubmit, handleInvalid)}
130
- className="p-6 md:p-20"
130
+ className="p-20"
131
131
  >
132
132
  <FieldGroup className="gap-10 pb-12">
133
133
  <div className="flex flex-col items-start">
@@ -1,9 +1,9 @@
1
1
  export function ResetPasswordPageSkeleton() {
2
2
  return (
3
3
  <div className="overflow-hidden rounded-sm border bg-card">
4
- <div className="grid md:grid-cols-[5fr_7fr]">
5
- <div className="hidden min-h-[520px] bg-muted md:block" />
6
- <div className="flex min-h-[520px] flex-col gap-10 p-6 md:p-20">
4
+ <div className="grid grid-cols-[5fr_7fr]">
5
+ <div className="block min-h-[520px] bg-muted" />
6
+ <div className="flex min-h-[520px] flex-col gap-10 p-20">
7
7
  <div className="space-y-3">
8
8
  <div className="h-6 w-36 animate-pulse rounded-md bg-muted" />
9
9
  <div className="h-4 w-56 animate-pulse rounded-md bg-muted" />
@@ -10,8 +10,8 @@ export const metadata: Metadata = {
10
10
 
11
11
  export default function ResetPasswordPage() {
12
12
  return (
13
- <div className="flex min-h-svh flex-col items-center justify-center bg-background p-6 md:p-10">
14
- <div className="w-full max-w-sm md:max-w-4xl">
13
+ <div className="flex min-h-svh flex-col items-center justify-center bg-background p-10">
14
+ <div className="w-full max-w-4xl">
15
15
  <Suspense fallback={<ResetPasswordPageSkeleton />}>
16
16
  <ResetPasswordForm />
17
17
  </Suspense>
@@ -37,7 +37,7 @@ function formatMetadata(metadata: Record<string, unknown> | null): string {
37
37
  export function AuditLogDetailDrawer({ auditLog, open, onOpenChange }: AuditLogDetailDrawerProps) {
38
38
  return (
39
39
  <Drawer swipeDirection="right" open={open} onOpenChange={onOpenChange} modal>
40
- <DrawerContent className="h-full sm:max-w-xl">
40
+ <DrawerContent className="h-full max-w-xl">
41
41
  <DrawerHeader>
42
42
  <DrawerTitle>Audit Event</DrawerTitle>
43
43
  <DrawerDescription>
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react'
2
- import { UserRole } from '@admin/auth/middleware'
3
2
  import { RoleGate } from '@admin/components/layouts/role-gate'
3
+ import { UserRole } from '@admin/types/auth'
4
4
  import { AuditLogPageContent } from './audit-log-page-content'
5
5
  import { AuditLogPageSkeleton } from './audit-log-page-skeleton'
6
6
 
@@ -83,7 +83,7 @@ export function FormNotificationsDrawer({
83
83
 
84
84
  return (
85
85
  <Drawer swipeDirection="right" open={open} onOpenChange={onOpenChange} modal>
86
- <DrawerContent className="h-full sm:max-w-xl">
86
+ <DrawerContent className="h-full max-w-xl">
87
87
  <Form {...form}>
88
88
  <form
89
89
  autoComplete="off"
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react'
2
- import { UserRole } from '@admin/auth/middleware'
3
2
  import { RoleGate } from '@admin/components/layouts/role-gate'
3
+ import { UserRole } from '@admin/types/auth'
4
4
  import { FormsSettingsPageContent } from './forms-settings-page-content'
5
5
  import { FormsSettingsPageSkeleton } from './forms-settings-page-skeleton'
6
6
 
@@ -53,7 +53,7 @@ export function DeleteWebhookDialog({ webhook, open, onOpenChange }: DeleteWebho
53
53
 
54
54
  return (
55
55
  <Dialog open={open} onOpenChange={onOpenChange}>
56
- <DialogContent className="sm:max-w-105">
56
+ <DialogContent className="max-w-105">
57
57
  <DialogHeader>
58
58
  <DialogTitle>Delete webhook?</DialogTitle>
59
59
  <DialogDescription>
@@ -194,7 +194,7 @@ export function WebhookEndpointDialog({ webhook, open, onOpenChange }: WebhookEn
194
194
 
195
195
  return (
196
196
  <Dialog open={open} onOpenChange={onOpenChange}>
197
- <DialogContent className="sm:max-w-135">
197
+ <DialogContent className="max-w-135">
198
198
  <Form {...form}>
199
199
  <form
200
200
  autoComplete="off"
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react'
2
- import { UserRole } from '@admin/auth/middleware'
3
2
  import { RoleGate } from '@admin/components/layouts/role-gate'
3
+ import { UserRole } from '@admin/types/auth'
4
4
  import { WebhooksLogsPageContent } from '../webhooks-logs-page-content'
5
5
  import { WebhooksPageSkeleton } from '../webhooks-page-skeleton'
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react'
2
- import { UserRole } from '@admin/auth/middleware'
3
2
  import { RoleGate } from '@admin/components/layouts/role-gate'
3
+ import { UserRole } from '@admin/types/auth'
4
4
  import { WebhooksPageContent } from './webhooks-page-content'
5
5
  import { WebhooksPageSkeleton } from './webhooks-page-skeleton'
6
6
 
@@ -142,7 +142,7 @@ export function ChangePasswordDialog({
142
142
  <KeySquare className="size-4" />
143
143
  Change password
144
144
  </DialogTrigger>
145
- <DialogContent className="sm:max-w-135">
145
+ <DialogContent className="max-w-135">
146
146
  <Form {...form}>
147
147
  <form
148
148
  autoComplete="off"
@@ -109,7 +109,7 @@ export function CreateUserDialog() {
109
109
  return (
110
110
  <Dialog open={open} onOpenChange={handleOpenChange}>
111
111
  <DialogTrigger render={<Button />}>Create User</DialogTrigger>
112
- <DialogContent className="sm:max-w-135">
112
+ <DialogContent className="max-w-135">
113
113
  <Form {...form}>
114
114
  <form
115
115
  autoComplete="off"
@@ -80,7 +80,7 @@ export function EditRoleDialog({ userId, currentRole, userName, children }: Edit
80
80
  return (
81
81
  <Dialog open={open} onOpenChange={handleOpenChange}>
82
82
  <DialogTrigger render={children as React.ReactElement} />
83
- <DialogContent className="sm:max-w-87.5">
83
+ <DialogContent className="max-w-87.5">
84
84
  <Form {...form}>
85
85
  <form autoComplete="off" onSubmit={form.handleSubmit(handleSave)}>
86
86
  <DialogHeader>
@@ -3,14 +3,12 @@
3
3
  import type { ContentEditorMode } from '@admin/utils/editor/content-editor-mode'
4
4
  import { Card, CardContent } from '@admin/components/ui/card'
5
5
  import { useContentEditor } from '@admin/hooks/content-editor/use-content-editor'
6
- import { useContentEditorMobileToolbar } from '@admin/hooks/content-editor/use-content-editor-mobile-toolbar'
7
6
  import { useContentEditorTableAddControls } from '@admin/hooks/content-editor/use-content-editor-table-add-controls'
8
7
  import { cn } from '@admin/utils/shared/cn'
9
8
  import { EditorContent, EditorContext } from '@tiptap/react'
10
9
  import { EditorToolbar } from './editor-toolbar'
11
10
  import { MainToolbarContent } from './main-toolbar-content'
12
11
  import { MathBubbleMenu } from './math-popover'
13
- import { MobileToolbarContent } from './mobile-toolbar-content'
14
12
  import { ModeToggleButton } from './mode-toggle-button'
15
13
  import { SelectionBubbleMenu } from './selection-bubble-menu'
16
14
  import { SlashCommandMenu } from './slash-command-menu'
@@ -35,8 +33,6 @@ export function ContentEditor({
35
33
  className,
36
34
  defaultMode
37
35
  }: ContentEditorProps) {
38
- const { isMobile, mobileView, setMobileView } = useContentEditorMobileToolbar()
39
-
40
36
  const {
41
37
  activeSlashIndex,
42
38
  closeSlashMenu,
@@ -58,8 +54,7 @@ export function ContentEditor({
58
54
  onChange,
59
55
  placeholder,
60
56
  disabled,
61
- defaultMode,
62
- onModeToggle: () => setMobileView('main')
57
+ defaultMode
63
58
  })
64
59
 
65
60
  const isSourceMode = mode === 'source'
@@ -93,33 +88,13 @@ export function ContentEditor({
93
88
  ) : (
94
89
  <>
95
90
  <EditorToolbar ariaLabel="Content editor toolbar" className="shrink-0">
96
- {mobileView === 'main' ? (
97
- <MainToolbarContent
98
- onHighlighterClick={() => setMobileView('highlighter')}
99
- onLinkClick={() => setMobileView('link')}
100
- onMathClick={() => setMobileView('math')}
101
- onModeChange={handleModeChange}
102
- isMobile={isMobile}
103
- editor={editor}
104
- />
105
- ) : (
106
- <MobileToolbarContent
107
- type={
108
- mobileView === 'highlighter'
109
- ? 'highlighter'
110
- : mobileView === 'math'
111
- ? 'math'
112
- : 'link'
113
- }
114
- onBack={() => setMobileView('main')}
115
- />
116
- )}
91
+ <MainToolbarContent onModeChange={handleModeChange} editor={editor} />
117
92
  </EditorToolbar>
118
93
 
119
94
  <div className="relative flex min-h-0 flex-1 flex-col overflow-hidden">
120
- {!isMobile && <SelectionBubbleMenu editor={editor} />}
121
- {!isMobile && <MathBubbleMenu editor={editor} />}
122
- {!isMobile && <TableBubbleMenu editor={editor} />}
95
+ <SelectionBubbleMenu editor={editor} />
96
+ <MathBubbleMenu editor={editor} />
97
+ <TableBubbleMenu editor={editor} />
123
98
  <TableAddControls controls={tableAddControls} />
124
99
 
125
100
  <SlashCommandMenu
@@ -3,15 +3,9 @@
3
3
  import type { Editor } from '@tiptap/core'
4
4
  import { BlockquoteButton } from '@admin/components/custom/content-editor/tiptap-ui/blockquote-button'
5
5
  import { CodeBlockButton } from '@admin/components/custom/content-editor/tiptap-ui/code-block-button'
6
- import {
7
- ColorHighlightPopover,
8
- ColorHighlightPopoverButton
9
- } from '@admin/components/custom/content-editor/tiptap-ui/color-highlight-popover'
6
+ import { ColorHighlightPopover } from '@admin/components/custom/content-editor/tiptap-ui/color-highlight-popover'
10
7
  import { HeadingDropdownMenu } from '@admin/components/custom/content-editor/tiptap-ui/heading-dropdown-menu'
11
- import {
12
- LinkButton,
13
- LinkPopover
14
- } from '@admin/components/custom/content-editor/tiptap-ui/link-popover'
8
+ import { LinkPopover } from '@admin/components/custom/content-editor/tiptap-ui/link-popover'
15
9
  import { ListDropdownMenu } from '@admin/components/custom/content-editor/tiptap-ui/list-dropdown-menu'
16
10
  import { MarkButton } from '@admin/components/custom/content-editor/tiptap-ui/mark-button'
17
11
  import { UndoRedoButton } from '@admin/components/custom/content-editor/tiptap-ui/undo-redo-button'
@@ -20,23 +14,15 @@ import { Separator } from '@admin/components/ui/separator'
20
14
  import { useContentEditorMediaInsertion } from '@admin/hooks/content-editor/use-content-editor-media-insertion'
21
15
  import { ImagePlusIcon } from 'lucide-react'
22
16
  import { HorizontalRuleButton } from './horizontal-rule-button'
23
- import { MathButton, MathPopoverButton } from './math-popover'
17
+ import { MathPopoverButton } from './math-popover'
24
18
  import { ModeToggleButton } from './mode-toggle-button'
25
19
  import { TableButton } from './table-button'
26
20
 
27
21
  export function MainToolbarContent({
28
- onHighlighterClick,
29
- onLinkClick,
30
- onMathClick,
31
22
  onModeChange,
32
- isMobile,
33
23
  editor
34
24
  }: {
35
- onHighlighterClick: () => void
36
- onLinkClick: () => void
37
- onMathClick: () => void
38
25
  onModeChange: () => void
39
- isMobile: boolean
40
26
  editor: Editor | null
41
27
  }) {
42
28
  const mediaInsertion = useContentEditorMediaInsertion({ editor })
@@ -67,12 +53,8 @@ export function MainToolbarContent({
67
53
  <MarkButton type="strike" />
68
54
  <MarkButton type="code" />
69
55
  <MarkButton type="underline" />
70
- {!isMobile ? (
71
- <ColorHighlightPopover />
72
- ) : (
73
- <ColorHighlightPopoverButton onClick={onHighlighterClick} />
74
- )}
75
- {!isMobile ? <LinkPopover /> : <LinkButton onClick={onLinkClick} />}
56
+ <ColorHighlightPopover />
57
+ <LinkPopover />
76
58
  </div>
77
59
 
78
60
  <Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
@@ -80,11 +62,7 @@ export function MainToolbarContent({
80
62
  <div className="flex items-center">
81
63
  <TableButton editor={editor} />
82
64
 
83
- {!isMobile ? (
84
- <MathPopoverButton editor={editor} />
85
- ) : (
86
- <MathButton text="Math" aria-label="Insert math" title="Math" onClick={onMathClick} />
87
- )}
65
+ <MathPopoverButton editor={editor} />
88
66
 
89
67
  {mediaInsertion.isVisible ? (
90
68
  <Button
@@ -118,7 +118,7 @@ export const RemovableImageNode: React.FC<NodeViewProps> = (props) => {
118
118
  alt={alt}
119
119
  title={title || undefined}
120
120
  fill
121
- sizes="(min-width: 1024px) 768px, 100vw"
121
+ sizes="768px"
122
122
  unoptimized
123
123
  className="!m-0 !h-full !w-full !max-w-full object-contain"
124
124
  onLoad={handleImageLoad}