betterstart-cli 0.0.107 → 0.0.108
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/assets/adapters/next/templates/init/admin-globals.css +1 -61
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-header.tsx +2 -19
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-providers.tsx +4 -7
- package/dist/assets/adapters/next/templates/init/components/layouts/admin-sidebar-user-menu.tsx +0 -1
- package/dist/assets/adapters/next/templates/init/components/shared/data-table/data-table-pagination.tsx +3 -1
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/copyable-code-block.tsx +2 -5
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/dev-mode-code-mirror.tsx +4 -5
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/dev-mode-types.ts +0 -1
- package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid-pagination.tsx +3 -1
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor-source-mode.tsx +2 -11
- package/dist/assets/adapters/next/templates/init/hooks/content-editor/use-content-editor.ts +1 -2
- package/dist/assets/adapters/next/templates/init/pages/forgot-password-form.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/pages/login-form.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/pages/reset-password-form.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/custom/content-editor/main-toolbar-content.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/custom/content-editor/mobile-toolbar-content.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/selection-bubble-menu.tsx +1 -5
- package/dist/assets/shared-assets/react-admin/custom/content-editor/source-mode.tsx +3 -15
- package/dist/assets/shared-assets/react-admin/custom/content-editor/table-bubble-menu.tsx +0 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/blockquote-button/blockquote-button.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/code-block-button/code-block-button.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/color-highlight-button/color-highlight-button.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/heading-dropdown-menu/heading-dropdown-menu.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/link-popover/link-control-popover.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/list-dropdown-menu/list-dropdown-menu.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/mark-button/mark-button.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/custom/content-editor/tiptap-ui/undo-redo-button/undo-redo-button.tsx +2 -1
- package/dist/assets/shared-assets/react-admin/ui/avatar.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/badge.tsx +5 -3
- package/dist/assets/shared-assets/react-admin/ui/button.tsx +4 -4
- package/dist/assets/shared-assets/react-admin/ui/calendar.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/chart.tsx +5 -16
- package/dist/assets/shared-assets/react-admin/ui/checkbox.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/combobox.tsx +12 -2
- package/dist/assets/shared-assets/react-admin/ui/context-menu.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/drawer.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/dropdown-menu.tsx +24 -21
- package/dist/assets/shared-assets/react-admin/ui/field.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/input-group.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/input-otp.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/input.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/kbd.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/menubar.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/native-select.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/radio-group.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/select.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/sonner.tsx +2 -5
- package/dist/assets/shared-assets/react-admin/ui/switch.tsx +2 -2
- package/dist/assets/shared-assets/react-admin/ui/tabs.tsx +3 -3
- package/dist/assets/shared-assets/react-admin/ui/textarea.tsx +1 -1
- package/dist/assets/shared-assets/react-admin/ui/toggle.tsx +1 -1
- package/dist/{chunk-OYU73Q2W.js → chunk-PSDUGFMD.js} +2 -2
- package/dist/{chunk-OYU73Q2W.js.map → chunk-PSDUGFMD.js.map} +1 -1
- package/dist/cli.js +32 -27
- package/dist/cli.js.map +1 -1
- package/dist/{read-namespaced-template-EIH2NPDJ.js → read-namespaced-template-TSATYQPP.js} +2 -2
- package/package.json +1 -1
- package/dist/assets/adapters/next/templates/init/hooks/use-admin-theme.tsx +0 -72
- package/dist/assets/adapters/next/templates/init/utils/theme/system.ts +0 -6
- /package/dist/{read-namespaced-template-EIH2NPDJ.js.map → read-namespaced-template-TSATYQPP.js.map} +0 -0
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
@plugin "@tailwindcss/typography";
|
|
7
7
|
|
|
8
|
-
@custom-variant dark (&:is(.dark *));
|
|
9
|
-
|
|
10
8
|
@theme inline {
|
|
11
9
|
--color-background: var(--background);
|
|
12
10
|
--color-foreground: var(--foreground);
|
|
@@ -97,6 +95,7 @@
|
|
|
97
95
|
--accent-foreground: oklch(0.15 0 0);
|
|
98
96
|
--destructive: oklch(0.577 0.245 27.325);
|
|
99
97
|
--warning: oklch(0.625 0.165 57.4);
|
|
98
|
+
--warning-foreground: oklch(0.625 0.165 57.4);
|
|
100
99
|
--border: oklch(0.93 0 0);
|
|
101
100
|
--highlight: oklch(0.9 0.004 286.32);
|
|
102
101
|
--input: oklch(0.994 0 0);
|
|
@@ -174,65 +173,6 @@
|
|
|
174
173
|
--tt-color-highlight-pink-contrast: rgba(225, 136, 179, 0.27);
|
|
175
174
|
}
|
|
176
175
|
|
|
177
|
-
.dark {
|
|
178
|
-
--background: oklch(0.144 0 0);
|
|
179
|
-
--foreground: oklch(0.985 0 0);
|
|
180
|
-
--card: oklch(0.15 0 0);
|
|
181
|
-
--card-foreground: oklch(0.985 0 0);
|
|
182
|
-
--popover: oklch(0.15 0 0);
|
|
183
|
-
--popover-foreground: oklch(0.985 0 0);
|
|
184
|
-
--primary: oklch(0.922 0 0);
|
|
185
|
-
--primary-foreground: oklch(0.15 0 0);
|
|
186
|
-
--secondary: oklch(0.269 0 0);
|
|
187
|
-
--secondary-foreground: oklch(0.985 0 0);
|
|
188
|
-
--muted: oklch(0.269 0 0);
|
|
189
|
-
--muted-foreground: oklch(0.708 0 0);
|
|
190
|
-
--accent: oklch(0.269 0 0);
|
|
191
|
-
--accent-foreground: oklch(0.985 0 0);
|
|
192
|
-
--destructive: oklch(0.704 0.191 22.216);
|
|
193
|
-
--warning: oklch(0.75 0.2 90);
|
|
194
|
-
--warning-foreground: oklch(0.625 0.165 57.4);
|
|
195
|
-
--border: oklch(1 0 0 / 10%);
|
|
196
|
-
--highlight: oklch(1 0 0 / 10%);
|
|
197
|
-
--input: oklch(1 0 0 / 15%);
|
|
198
|
-
--ring: oklch(0.556 0 0);
|
|
199
|
-
--chart-1: oklch(0.845 0.143 164.978);
|
|
200
|
-
--chart-2: oklch(0.696 0.17 162.48);
|
|
201
|
-
--chart-3: oklch(0.596 0.145 163.225);
|
|
202
|
-
--chart-4: oklch(0.508 0.118 165.612);
|
|
203
|
-
--chart-5: oklch(0.432 0.095 166.913);
|
|
204
|
-
--sidebar: oklch(0.15 0 0);
|
|
205
|
-
--sidebar-foreground: oklch(0.985 0 0);
|
|
206
|
-
--sidebar-primary: oklch(0.488 0.243 264.376);
|
|
207
|
-
--sidebar-primary-foreground: oklch(0.985 0 0);
|
|
208
|
-
--sidebar-accent: oklch(0.269 0 0);
|
|
209
|
-
--sidebar-accent-foreground: oklch(0.985 0 0);
|
|
210
|
-
--sidebar-border: oklch(1 0 0 / 10%);
|
|
211
|
-
--sidebar-ring: oklch(0.556 0 0);
|
|
212
|
-
--tt-bg-color: var(--background);
|
|
213
|
-
--tt-bg-color-contrast: var(--border);
|
|
214
|
-
--tt-color-highlight-yellow: #6b6524;
|
|
215
|
-
--tt-color-highlight-green: #509568;
|
|
216
|
-
--tt-color-highlight-blue: #6e92aa;
|
|
217
|
-
--tt-color-highlight-purple: #583e74;
|
|
218
|
-
--tt-color-highlight-red: #743e42;
|
|
219
|
-
--tt-color-highlight-gray: rgb(47, 47, 47);
|
|
220
|
-
--tt-color-highlight-brown: rgb(74, 50, 40);
|
|
221
|
-
--tt-color-highlight-orange: rgb(92, 59, 35);
|
|
222
|
-
--tt-color-highlight-pink: rgb(78, 44, 60);
|
|
223
|
-
--tt-color-highlight-yellow-contrast: #58531e;
|
|
224
|
-
--tt-color-highlight-green-contrast: #47855d;
|
|
225
|
-
--tt-color-highlight-blue-contrast: #5e86a1;
|
|
226
|
-
--tt-color-highlight-purple-contrast: #4c3564;
|
|
227
|
-
--tt-color-highlight-red-contrast: #643539;
|
|
228
|
-
--tt-color-highlight-gray-contrast: rgba(255, 255, 255, 0.094);
|
|
229
|
-
--tt-color-highlight-brown-contrast: rgba(184, 101, 69, 0.25);
|
|
230
|
-
--tt-color-highlight-orange-contrast: rgba(233, 126, 37, 0.2);
|
|
231
|
-
--tt-color-highlight-pink-contrast: rgba(220, 76, 145, 0.22);
|
|
232
|
-
--shadow-small: 0px 1px 2px #00000029;
|
|
233
|
-
--shadow-medium: 0px 2px 2px #00000052, 0px 8px 8px -8px #00000029;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
176
|
@layer base {
|
|
237
177
|
* {
|
|
238
178
|
@apply border-border outline-ring/50;
|
|
@@ -1,31 +1,14 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import { Button } from '@admin/components/ui/button'
|
|
4
3
|
import { SidebarTrigger, useSidebar } from '@admin/components/ui/sidebar'
|
|
5
|
-
import { useTheme } from '@admin/hooks/use-admin-theme'
|
|
6
|
-
import { Moon, Sun } from 'lucide-react'
|
|
7
4
|
|
|
8
5
|
export function AdminHeader() {
|
|
9
|
-
const { theme, setTheme } = useTheme()
|
|
10
6
|
const { state } = useSidebar()
|
|
11
7
|
|
|
12
8
|
return (
|
|
13
9
|
<header className="sticky top-0 z-50 flex h-14 w-full shrink-0 items-center gap-2 border-b border-border">
|
|
14
|
-
<div className="flex w-full flex-1 items-center
|
|
15
|
-
|
|
16
|
-
{state === 'collapsed' && <SidebarTrigger />}
|
|
17
|
-
</div>
|
|
18
|
-
<div className="ml-auto flex items-center gap-2">
|
|
19
|
-
<Button
|
|
20
|
-
variant="ghost"
|
|
21
|
-
size="icon"
|
|
22
|
-
onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}
|
|
23
|
-
>
|
|
24
|
-
<Sun className="size-4 scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90" />
|
|
25
|
-
<Moon className="absolute size-4 scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0" />
|
|
26
|
-
<span className="sr-only">Toggle theme</span>
|
|
27
|
-
</Button>
|
|
28
|
-
</div>
|
|
10
|
+
<div className="flex w-full flex-1 items-center gap-2 px-5">
|
|
11
|
+
{state === 'collapsed' && <SidebarTrigger />}
|
|
29
12
|
</div>
|
|
30
13
|
</header>
|
|
31
14
|
)
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import { Toaster } from '@admin/components/ui/sonner'
|
|
4
4
|
import { TooltipProvider } from '@admin/components/ui/tooltip'
|
|
5
|
-
import { AdminThemeProvider } from '@admin/hooks/use-admin-theme'
|
|
6
5
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
7
6
|
import { useState } from 'react'
|
|
8
7
|
|
|
@@ -22,12 +21,10 @@ export function AdminProviders({ children }: { children: React.ReactNode }) {
|
|
|
22
21
|
|
|
23
22
|
return (
|
|
24
23
|
<QueryClientProvider client={queryClient}>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</TooltipProvider>
|
|
30
|
-
</AdminThemeProvider>
|
|
24
|
+
<TooltipProvider>
|
|
25
|
+
{children}
|
|
26
|
+
<Toaster position="top-right" richColors />
|
|
27
|
+
</TooltipProvider>
|
|
31
28
|
</QueryClientProvider>
|
|
32
29
|
)
|
|
33
30
|
}
|
|
@@ -70,7 +70,9 @@ export function DataTablePagination<TData>(props: DataTablePaginationProps<TData
|
|
|
70
70
|
)
|
|
71
71
|
|
|
72
72
|
const handlePageSizeChange = React.useCallback(
|
|
73
|
-
(value: string) => {
|
|
73
|
+
(value: string | null) => {
|
|
74
|
+
if (value === null) return
|
|
75
|
+
|
|
74
76
|
React.startTransition(() => {
|
|
75
77
|
if (value === 'all') {
|
|
76
78
|
setPageSize(-1)
|
package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/copyable-code-block.tsx
CHANGED
|
@@ -5,7 +5,6 @@ import type { DevModeCodeLanguage, DevModeSnippetCodeTab } from './dev-mode-type
|
|
|
5
5
|
import { Button } from '@admin/components/ui/button'
|
|
6
6
|
import { Card, CardContent, CardHeader } from '@admin/components/ui/card'
|
|
7
7
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@admin/components/ui/tabs'
|
|
8
|
-
import { useTheme } from '@admin/hooks/use-admin-theme'
|
|
9
8
|
import { useCopyToClipboard } from '@admin/hooks/use-copy-to-clipboard'
|
|
10
9
|
import { Check, Copy } from 'lucide-react'
|
|
11
10
|
import { PlainCodeFallback } from './plain-code-fallback'
|
|
@@ -21,8 +20,6 @@ interface CopyableCodeBlockProps {
|
|
|
21
20
|
|
|
22
21
|
export function CopyableCodeBlock({ label, code, language, tabs }: CopyableCodeBlockProps) {
|
|
23
22
|
const [copy, isCopied] = useCopyToClipboard()
|
|
24
|
-
const { resolvedTheme } = useTheme()
|
|
25
|
-
const codeTheme = resolvedTheme === 'dark' ? 'dark' : 'light'
|
|
26
23
|
const fallbackTab: DevModeSnippetCodeTab = {
|
|
27
24
|
id: 'code',
|
|
28
25
|
label,
|
|
@@ -68,7 +65,7 @@ export function CopyableCodeBlock({ label, code, language, tabs }: CopyableCodeB
|
|
|
68
65
|
<TabsContent key={tab.id} value={tab.id} className="min-h-0 overflow-auto">
|
|
69
66
|
<CardContent className="h-full overflow-auto p-0">
|
|
70
67
|
<React.Suspense fallback={<PlainCodeFallback code={tab.code} />}>
|
|
71
|
-
<LazyCodeMirror code={tab.code} language={tab.language}
|
|
68
|
+
<LazyCodeMirror code={tab.code} language={tab.language} />
|
|
72
69
|
</React.Suspense>
|
|
73
70
|
</CardContent>
|
|
74
71
|
</TabsContent>
|
|
@@ -94,7 +91,7 @@ export function CopyableCodeBlock({ label, code, language, tabs }: CopyableCodeB
|
|
|
94
91
|
</CardHeader>
|
|
95
92
|
<CardContent className="overflow-auto p-0">
|
|
96
93
|
<React.Suspense fallback={<PlainCodeFallback code={code} />}>
|
|
97
|
-
<LazyCodeMirror code={code} language={language}
|
|
94
|
+
<LazyCodeMirror code={code} language={language} />
|
|
98
95
|
</React.Suspense>
|
|
99
96
|
</CardContent>
|
|
100
97
|
</>
|
package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/dev-mode-code-mirror.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import * as React from 'react'
|
|
4
|
-
import type { DevModeCodeLanguage
|
|
4
|
+
import type { DevModeCodeLanguage } from './dev-mode-types'
|
|
5
5
|
import { javascript } from '@codemirror/lang-javascript'
|
|
6
6
|
import { json } from '@codemirror/lang-json'
|
|
7
7
|
import { EditorView } from '@codemirror/view'
|
|
8
|
-
import {
|
|
8
|
+
import { githubLight } from '@uiw/codemirror-theme-github'
|
|
9
9
|
import CodeMirror from '@uiw/react-codemirror'
|
|
10
10
|
|
|
11
11
|
const codeMirrorSetup = {
|
|
@@ -43,10 +43,9 @@ const compactCodeTheme = EditorView.theme({
|
|
|
43
43
|
interface DevModeCodeMirrorProps {
|
|
44
44
|
code: string
|
|
45
45
|
language: DevModeCodeLanguage
|
|
46
|
-
theme: DevModeCodeTheme
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
export default function DevModeCodeMirror({ code, language
|
|
48
|
+
export default function DevModeCodeMirror({ code, language }: DevModeCodeMirrorProps) {
|
|
50
49
|
const extensions = React.useMemo(
|
|
51
50
|
() =>
|
|
52
51
|
language === 'json'
|
|
@@ -62,7 +61,7 @@ export default function DevModeCodeMirror({ code, language, theme }: DevModeCode
|
|
|
62
61
|
readOnly
|
|
63
62
|
basicSetup={codeMirrorSetup}
|
|
64
63
|
extensions={extensions}
|
|
65
|
-
theme={
|
|
64
|
+
theme={githubLight}
|
|
66
65
|
className="flex-1 [&>.cm-editor]:h-full"
|
|
67
66
|
/>
|
|
68
67
|
)
|
package/dist/assets/adapters/next/templates/init/components/shared/media/media-grid-pagination.tsx
CHANGED
|
@@ -41,7 +41,9 @@ export function MediaGridPagination({
|
|
|
41
41
|
const perPage = 'Rows per page'
|
|
42
42
|
|
|
43
43
|
const handlePageSizeChange = React.useCallback(
|
|
44
|
-
(value: string) => {
|
|
44
|
+
(value: string | null) => {
|
|
45
|
+
if (value === null) return
|
|
46
|
+
|
|
45
47
|
React.startTransition(() => {
|
|
46
48
|
onPageSizeChange(Number(value))
|
|
47
49
|
onPageChange(1)
|
|
@@ -9,7 +9,6 @@ import type { QueryClient } from '@tanstack/react-query'
|
|
|
9
9
|
import type { ReactCodeMirrorRef } from '@uiw/react-codemirror'
|
|
10
10
|
import type { Root } from 'react-dom/client'
|
|
11
11
|
import { MediaField } from '@admin/components/custom/media-field'
|
|
12
|
-
import { useTheme } from '@admin/hooks/use-admin-theme'
|
|
13
12
|
import { applyCursorChange } from '@admin/utils/editor/apply-cursor-change'
|
|
14
13
|
import { applyCursorChangeIfAvailable } from '@admin/utils/editor/apply-cursor-change-if-available'
|
|
15
14
|
import { createMarkdownTableText } from '@admin/utils/editor/create-markdown-table-text'
|
|
@@ -33,11 +32,12 @@ import { redo, redoDepth, undo, undoDepth } from '@codemirror/commands'
|
|
|
33
32
|
import { markdown } from '@codemirror/lang-markdown'
|
|
34
33
|
import { Decoration, EditorView, WidgetType } from '@codemirror/view'
|
|
35
34
|
import { QueryClientProvider, useQueryClient } from '@tanstack/react-query'
|
|
36
|
-
import {
|
|
35
|
+
import { githubLightInit } from '@uiw/codemirror-theme-github'
|
|
37
36
|
import { NuqsAdapter } from 'nuqs/adapters/react'
|
|
38
37
|
import { createRoot } from 'react-dom/client'
|
|
39
38
|
|
|
40
39
|
const ADMIN_MONO_FONT_FAMILY = 'var(--font-geist-mono), ui-monospace, SFMono-Regular, monospace'
|
|
40
|
+
const editorTheme = githubLightInit({ settings: { fontFamily: ADMIN_MONO_FONT_FAMILY } })
|
|
41
41
|
|
|
42
42
|
type MarkdownMediaGalleryWidgetProps = {
|
|
43
43
|
widgetId: number
|
|
@@ -150,15 +150,6 @@ export function useContentEditorSourceMode({
|
|
|
150
150
|
const [isMarkdownLinkActive, setIsMarkdownLinkActive] = React.useState(false)
|
|
151
151
|
const [canUndoMarkdownChange, setCanUndoMarkdownChange] = React.useState(false)
|
|
152
152
|
const [canRedoMarkdownChange, setCanRedoMarkdownChange] = React.useState(false)
|
|
153
|
-
const { resolvedTheme } = useTheme()
|
|
154
|
-
const editorTheme = React.useMemo(
|
|
155
|
-
() =>
|
|
156
|
-
resolvedTheme === 'dark'
|
|
157
|
-
? githubDarkInit({ settings: { fontFamily: ADMIN_MONO_FONT_FAMILY } })
|
|
158
|
-
: githubLightInit({ settings: { fontFamily: ADMIN_MONO_FONT_FAMILY } }),
|
|
159
|
-
[resolvedTheme]
|
|
160
|
-
)
|
|
161
|
-
|
|
162
153
|
const valueRef = React.useRef(value)
|
|
163
154
|
valueRef.current = value
|
|
164
155
|
const onChangeRef = React.useRef(onChange)
|
|
@@ -99,8 +99,7 @@ export function useContentEditor({
|
|
|
99
99
|
autocomplete: 'off',
|
|
100
100
|
autocorrect: 'off',
|
|
101
101
|
autocapitalize: 'off',
|
|
102
|
-
class:
|
|
103
|
-
'simple-editor content-editor-prose prose prose-sm max-w-none dark:prose-invert focus:outline-none'
|
|
102
|
+
class: 'simple-editor content-editor-prose prose prose-sm max-w-none focus:outline-none'
|
|
104
103
|
},
|
|
105
104
|
handleKeyDown: (_view, event) => handleSlashKeyDown(event)
|
|
106
105
|
},
|
|
@@ -54,7 +54,7 @@ export function ForgotPasswordForm({ className, ...props }: React.ComponentProps
|
|
|
54
54
|
alt=""
|
|
55
55
|
fill
|
|
56
56
|
sizes="(min-width: 768px) 42vw, 0px"
|
|
57
|
-
className="object-cover
|
|
57
|
+
className="object-cover"
|
|
58
58
|
/>
|
|
59
59
|
</div>
|
|
60
60
|
<div className="p-6 md:p-20">
|
|
@@ -60,7 +60,7 @@ export function LoginForm({ className, ...props }: React.ComponentProps<'div'>)
|
|
|
60
60
|
alt=""
|
|
61
61
|
fill
|
|
62
62
|
sizes="(min-width: 768px) 42vw, 0px"
|
|
63
|
-
className="object-cover
|
|
63
|
+
className="object-cover"
|
|
64
64
|
/>
|
|
65
65
|
</div>
|
|
66
66
|
<form onSubmit={handleSubmit} className="p-6 md:p-20">
|
|
@@ -70,7 +70,7 @@ export function LoginForm({ className, ...props }: React.ComponentProps<'div'>)
|
|
|
70
70
|
<p className="text-balance text-muted-foreground">Sign in to your account</p>
|
|
71
71
|
</div>
|
|
72
72
|
{resetSuccess ? (
|
|
73
|
-
<div className="rounded-md bg-emerald-500/10 p-3 text-sm text-emerald-700
|
|
73
|
+
<div className="rounded-md bg-emerald-500/10 p-3 text-sm text-emerald-700">
|
|
74
74
|
Password reset. Sign in with your new password.
|
|
75
75
|
</div>
|
|
76
76
|
) : null}
|
|
@@ -37,7 +37,7 @@ export function ResetPasswordForm({ className, ...props }: React.ComponentProps<
|
|
|
37
37
|
alt=""
|
|
38
38
|
fill
|
|
39
39
|
sizes="(min-width: 768px) 42vw, 0px"
|
|
40
|
-
className="object-cover
|
|
40
|
+
className="object-cover"
|
|
41
41
|
/>
|
|
42
42
|
</div>
|
|
43
43
|
<div className="p-6 md:p-20">
|
|
@@ -104,7 +104,7 @@ export function ResetPasswordForm({ className, ...props }: React.ComponentProps<
|
|
|
104
104
|
alt=""
|
|
105
105
|
fill
|
|
106
106
|
sizes="(min-width: 768px) 42vw, 0px"
|
|
107
|
-
className="object-cover
|
|
107
|
+
className="object-cover"
|
|
108
108
|
/>
|
|
109
109
|
</div>
|
|
110
110
|
<form onSubmit={handleSubmit} className="p-6 md:p-20">
|
package/dist/assets/shared-assets/react-admin/custom/content-editor/main-toolbar-content.tsx
CHANGED
|
@@ -49,7 +49,7 @@ export function MainToolbarContent({
|
|
|
49
49
|
<UndoRedoButton action="redo" />
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
|
-
<Separator orientation="vertical"
|
|
52
|
+
<Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
|
|
53
53
|
|
|
54
54
|
<div className="flex items-center gap-0.5">
|
|
55
55
|
<HeadingDropdownMenu />
|
|
@@ -59,7 +59,7 @@ export function MainToolbarContent({
|
|
|
59
59
|
<HorizontalRuleButton editor={editor} />
|
|
60
60
|
</div>
|
|
61
61
|
|
|
62
|
-
<Separator orientation="vertical"
|
|
62
|
+
<Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
|
|
63
63
|
|
|
64
64
|
<div className="flex items-center gap-0.5">
|
|
65
65
|
<MarkButton type="bold" />
|
|
@@ -75,7 +75,7 @@ export function MainToolbarContent({
|
|
|
75
75
|
{!isMobile ? <LinkPopover /> : <LinkButton onClick={onLinkClick} />}
|
|
76
76
|
</div>
|
|
77
77
|
|
|
78
|
-
<Separator orientation="vertical"
|
|
78
|
+
<Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
|
|
79
79
|
|
|
80
80
|
<div className="flex items-center">
|
|
81
81
|
<TableButton editor={editor} />
|
package/dist/assets/shared-assets/react-admin/custom/content-editor/mobile-toolbar-content.tsx
CHANGED
|
@@ -38,7 +38,7 @@ export function MobileToolbarContent({
|
|
|
38
38
|
</Button>
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
|
-
<Separator orientation="vertical"
|
|
41
|
+
<Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
|
|
42
42
|
|
|
43
43
|
{type === 'highlighter' ? (
|
|
44
44
|
<ColorHighlightPopoverContent />
|
package/dist/assets/shared-assets/react-admin/custom/content-editor/selection-bubble-menu.tsx
CHANGED
|
@@ -117,11 +117,7 @@ export function SelectionBubbleMenu({ editor }: { editor: Editor }) {
|
|
|
117
117
|
/>
|
|
118
118
|
</div>
|
|
119
119
|
|
|
120
|
-
<Separator
|
|
121
|
-
orientation="vertical"
|
|
122
|
-
decorative
|
|
123
|
-
className="mx-1 my-auto h-[65%] self-center"
|
|
124
|
-
/>
|
|
120
|
+
<Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
|
|
125
121
|
|
|
126
122
|
<div className="flex items-center gap-0.5">
|
|
127
123
|
<MarkButton editor={editor} type="bold" />
|
|
@@ -152,11 +152,7 @@ export function SourceMode({
|
|
|
152
152
|
</Button>
|
|
153
153
|
</div>
|
|
154
154
|
|
|
155
|
-
<Separator
|
|
156
|
-
orientation="vertical"
|
|
157
|
-
decorative
|
|
158
|
-
className="mx-1 my-auto h-[65%] self-center"
|
|
159
|
-
/>
|
|
155
|
+
<Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
|
|
160
156
|
|
|
161
157
|
<div className="flex items-center gap-0.5">
|
|
162
158
|
<SourceModeDropdownButton
|
|
@@ -234,11 +230,7 @@ export function SourceMode({
|
|
|
234
230
|
</Button>
|
|
235
231
|
</div>
|
|
236
232
|
|
|
237
|
-
<Separator
|
|
238
|
-
orientation="vertical"
|
|
239
|
-
decorative
|
|
240
|
-
className="mx-1 my-auto h-[65%] self-center"
|
|
241
|
-
/>
|
|
233
|
+
<Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
|
|
242
234
|
|
|
243
235
|
<div className="flex items-center gap-0.5">
|
|
244
236
|
{[
|
|
@@ -300,11 +292,7 @@ export function SourceMode({
|
|
|
300
292
|
/>
|
|
301
293
|
</div>
|
|
302
294
|
|
|
303
|
-
<Separator
|
|
304
|
-
orientation="vertical"
|
|
305
|
-
decorative
|
|
306
|
-
className="mx-1 my-auto h-[65%] self-center"
|
|
307
|
-
/>
|
|
295
|
+
<Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
|
|
308
296
|
|
|
309
297
|
<div className="flex items-center">
|
|
310
298
|
<TableButton disabled={disabled} onInsertTable={insertTable} />
|
|
@@ -230,7 +230,6 @@ export function TableBubbleMenu({ editor }: { editor: Editor }) {
|
|
|
230
230
|
</div>
|
|
231
231
|
<Separator
|
|
232
232
|
orientation="vertical"
|
|
233
|
-
decorative
|
|
234
233
|
className="mx-1 my-auto h-5 w-px self-center bg-border opacity-100"
|
|
235
234
|
/>
|
|
236
235
|
<div className="flex items-center gap-0.5">
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ControlAvailability, ControlShortcut, ControlTooltip } from '../control-options'
|
|
4
4
|
import type { UseBlockquoteConfig } from '@admin/hooks/content-editor/use-blockquote'
|
|
5
|
+
import type { BaseUIEvent } from '@base-ui/react'
|
|
5
6
|
import { Button } from '@admin/components/ui/button'
|
|
6
7
|
import { useBlockquote } from '@admin/hooks/content-editor/use-blockquote'
|
|
7
8
|
import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
|
|
@@ -48,7 +49,7 @@ export function BlockquoteButton({
|
|
|
48
49
|
)
|
|
49
50
|
|
|
50
51
|
const handleClick = useCallback(
|
|
51
|
-
(event: React.MouseEvent<HTMLButtonElement
|
|
52
|
+
(event: BaseUIEvent<React.MouseEvent<HTMLButtonElement>>) => {
|
|
52
53
|
onClick?.(event)
|
|
53
54
|
if (event.defaultPrevented) return
|
|
54
55
|
handleToggle()
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ControlAvailability, ControlShortcut, ControlTooltip } from '../control-options'
|
|
4
4
|
import type { UseCodeBlockConfig } from '@admin/hooks/content-editor/use-code-block'
|
|
5
|
+
import type { BaseUIEvent } from '@base-ui/react'
|
|
5
6
|
import { Button } from '@admin/components/ui/button'
|
|
6
7
|
import { useCodeBlock } from '@admin/hooks/content-editor/use-code-block'
|
|
7
8
|
import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
|
|
@@ -46,7 +47,7 @@ export function CodeBlockButton({
|
|
|
46
47
|
})
|
|
47
48
|
|
|
48
49
|
const handleClick = useCallback(
|
|
49
|
-
(event: React.MouseEvent<HTMLButtonElement
|
|
50
|
+
(event: BaseUIEvent<React.MouseEvent<HTMLButtonElement>>) => {
|
|
50
51
|
onClick?.(event)
|
|
51
52
|
if (event.defaultPrevented) return
|
|
52
53
|
handleToggle()
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ControlAvailability, ControlShortcut, ControlTooltip } from '../control-options'
|
|
4
4
|
import type { UseColorHighlightConfig } from '@admin/hooks/content-editor/use-color-highlight'
|
|
5
|
+
import type { BaseUIEvent } from '@base-ui/react'
|
|
5
6
|
import { Button } from '@admin/components/ui/button'
|
|
6
7
|
import { useColorHighlight } from '@admin/hooks/content-editor/use-color-highlight'
|
|
7
8
|
import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
|
|
@@ -59,7 +60,7 @@ export function ColorHighlightButton({
|
|
|
59
60
|
})
|
|
60
61
|
|
|
61
62
|
const handleClick = useCallback(
|
|
62
|
-
(event: React.MouseEvent<HTMLButtonElement
|
|
63
|
+
(event: BaseUIEvent<React.MouseEvent<HTMLButtonElement>>) => {
|
|
63
64
|
onClick?.(event)
|
|
64
65
|
if (event.defaultPrevented) return
|
|
65
66
|
handleColorHighlight()
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import type * as React from 'react'
|
|
4
4
|
import type { LinkButtonProps } from './link-button'
|
|
5
5
|
import type { LinkMainProps } from './link-main'
|
|
6
|
+
import type { BaseUIEvent } from '@base-ui/react'
|
|
6
7
|
import { Popover, PopoverContent, PopoverTrigger } from '@admin/components/ui/popover'
|
|
7
8
|
import { LinkIcon } from 'lucide-react'
|
|
8
9
|
import { useCallback, useState } from 'react'
|
|
@@ -52,7 +53,7 @@ export function LinkControlPopover({
|
|
|
52
53
|
}, [handleOnOpenChange, setLink])
|
|
53
54
|
|
|
54
55
|
const handleClick = useCallback(
|
|
55
|
-
(event: React.MouseEvent<HTMLButtonElement
|
|
56
|
+
(event: BaseUIEvent<React.MouseEvent<HTMLButtonElement>>) => {
|
|
56
57
|
onClick?.(event)
|
|
57
58
|
if (event.defaultPrevented) return
|
|
58
59
|
handleOnOpenChange(!isOpen)
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ControlAvailability, ControlShortcut, ControlTooltip } from '../control-options'
|
|
4
4
|
import type { UseMarkConfig } from '@admin/hooks/content-editor/use-mark'
|
|
5
|
+
import type { BaseUIEvent } from '@base-ui/react'
|
|
5
6
|
import { Button } from '@admin/components/ui/button'
|
|
6
7
|
import { useMark } from '@admin/hooks/content-editor/use-mark'
|
|
7
8
|
import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
|
|
@@ -48,7 +49,7 @@ export function MarkButton({
|
|
|
48
49
|
})
|
|
49
50
|
|
|
50
51
|
const handleClick = useCallback(
|
|
51
|
-
(event: React.MouseEvent<HTMLButtonElement
|
|
52
|
+
(event: BaseUIEvent<React.MouseEvent<HTMLButtonElement>>) => {
|
|
52
53
|
onClick?.(event)
|
|
53
54
|
if (event.defaultPrevented) return
|
|
54
55
|
handleMark()
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ControlAvailability, ControlShortcut, ControlTooltip } from '../control-options'
|
|
4
4
|
import type { UseUndoRedoConfig } from '@admin/hooks/content-editor/use-undo-redo'
|
|
5
|
+
import type { BaseUIEvent } from '@base-ui/react'
|
|
5
6
|
import { Button } from '@admin/components/ui/button'
|
|
6
7
|
import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
|
|
7
8
|
import { useUndoRedo } from '@admin/hooks/content-editor/use-undo-redo'
|
|
@@ -48,7 +49,7 @@ export function UndoRedoButton({
|
|
|
48
49
|
})
|
|
49
50
|
|
|
50
51
|
const handleClick = useCallback(
|
|
51
|
-
(event: React.MouseEvent<HTMLButtonElement
|
|
52
|
+
(event: BaseUIEvent<React.MouseEvent<HTMLButtonElement>>) => {
|
|
52
53
|
onClick?.(event)
|
|
53
54
|
if (event.defaultPrevented) return
|
|
54
55
|
handleAction()
|
|
@@ -16,7 +16,7 @@ function Avatar({
|
|
|
16
16
|
data-slot="avatar"
|
|
17
17
|
data-size={size}
|
|
18
18
|
className={cn(
|
|
19
|
-
'group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6
|
|
19
|
+
'group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6',
|
|
20
20
|
className
|
|
21
21
|
)}
|
|
22
22
|
{...props}
|
|
@@ -5,17 +5,19 @@ import { useRender } from '@base-ui/react/use-render'
|
|
|
5
5
|
import { cva } from 'class-variance-authority'
|
|
6
6
|
|
|
7
7
|
const badgeVariants = cva(
|
|
8
|
-
'group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20
|
|
8
|
+
'group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 [&>svg]:pointer-events-none [&>svg]:size-3!',
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
12
|
default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80',
|
|
13
13
|
secondary: 'bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80',
|
|
14
14
|
destructive:
|
|
15
|
-
'bg-destructive/10 text-destructive focus-visible:ring-destructive/20
|
|
15
|
+
'bg-destructive/10 text-destructive focus-visible:ring-destructive/20 [a]:hover:bg-destructive/20',
|
|
16
|
+
success:
|
|
17
|
+
'bg-emerald-500/10 text-emerald-700 focus-visible:ring-emerald-500/20 [a]:hover:bg-emerald-500/20',
|
|
16
18
|
outline:
|
|
17
19
|
'border-border bg-input/30 text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground',
|
|
18
|
-
ghost: 'hover:bg-muted hover:text-muted-foreground
|
|
20
|
+
ghost: 'hover:bg-muted hover:text-muted-foreground',
|
|
19
21
|
link: 'text-primary underline-offset-4 hover:underline'
|
|
20
22
|
}
|
|
21
23
|
},
|
|
@@ -4,7 +4,7 @@ import { Button as ButtonPrimitive } from '@base-ui/react/button'
|
|
|
4
4
|
import { cva } from 'class-variance-authority'
|
|
5
5
|
|
|
6
6
|
const buttonVariants = cva(
|
|
7
|
-
"group/button inline-flex shrink-0 items-center justify-center rounded-4xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20
|
|
7
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-4xl border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
@@ -14,11 +14,11 @@ const buttonVariants = cva(
|
|
|
14
14
|
secondary:
|
|
15
15
|
'bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
|
|
16
16
|
ghost:
|
|
17
|
-
'hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground
|
|
17
|
+
'hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground',
|
|
18
18
|
destructive:
|
|
19
|
-
'bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20
|
|
19
|
+
'bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20',
|
|
20
20
|
warning:
|
|
21
|
-
'border-warning/20 bg-warning/10 text-warning hover:bg-warning/15 focus-visible:border-warning/40 focus-visible:ring-warning/15
|
|
21
|
+
'border-warning/20 bg-warning/10 text-warning hover:bg-warning/15 focus-visible:border-warning/40 focus-visible:ring-warning/15 [&_svg]:text-warning',
|
|
22
22
|
link: 'text-primary underline-offset-4 hover:underline'
|
|
23
23
|
},
|
|
24
24
|
size: {
|