betterstart-cli 0.0.6 → 0.0.8
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/components/shared/dev-mode/copyable-code-block.tsx +2 -2
- package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/dev-mode-code-mirror.tsx +5 -11
- package/dist/assets/adapters/next/templates/init/components/shared/page-header.tsx +17 -20
- package/dist/assets/adapters/next/templates/init/lib/actions/media/types.ts +1 -9
- package/dist/assets/adapters/next/templates/init/pages/admin-layout.tsx +1 -1
- package/dist/assets/adapters/next/templates/init/types/index.ts +0 -2
- package/dist/cli.js +2 -5
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/copyable-code-block.tsx
CHANGED
|
@@ -66,7 +66,7 @@ export function CopyableCodeBlock({ label, code, language, tabs }: CopyableCodeB
|
|
|
66
66
|
|
|
67
67
|
{codeTabs.map((tab) => (
|
|
68
68
|
<TabsContent key={tab.id} value={tab.id} className="min-h-0 overflow-auto">
|
|
69
|
-
<CardContent className="p-0 overflow-auto
|
|
69
|
+
<CardContent className="p-0 overflow-auto">
|
|
70
70
|
<React.Suspense fallback={<PlainCodeFallback code={tab.code} />}>
|
|
71
71
|
<LazyCodeMirror code={tab.code} language={tab.language} theme={codeTheme} />
|
|
72
72
|
</React.Suspense>
|
|
@@ -92,7 +92,7 @@ export function CopyableCodeBlock({ label, code, language, tabs }: CopyableCodeB
|
|
|
92
92
|
{isCopied ? <Check /> : <Copy />}
|
|
93
93
|
</Button>
|
|
94
94
|
</CardHeader>
|
|
95
|
-
<CardContent className="p-0 overflow-auto
|
|
95
|
+
<CardContent className="p-0 overflow-auto">
|
|
96
96
|
<React.Suspense fallback={<PlainCodeFallback code={code} />}>
|
|
97
97
|
<LazyCodeMirror code={code} language={language} theme={codeTheme} />
|
|
98
98
|
</React.Suspense>
|
package/dist/assets/adapters/next/templates/init/components/shared/dev-mode/dev-mode-code-mirror.tsx
CHANGED
|
@@ -19,20 +19,10 @@ const compactCodeTheme = EditorView.theme({
|
|
|
19
19
|
'&': {
|
|
20
20
|
fontSize: '12px'
|
|
21
21
|
},
|
|
22
|
-
'.cm-editor': {
|
|
23
|
-
userSelect: 'text'
|
|
24
|
-
},
|
|
25
22
|
'.cm-content': {
|
|
26
|
-
userSelect: 'text',
|
|
27
23
|
padding: '10px 0 14px'
|
|
28
24
|
},
|
|
29
|
-
'.cm-scroller': {
|
|
30
|
-
userSelect: 'text',
|
|
31
|
-
fontFamily:
|
|
32
|
-
'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace'
|
|
33
|
-
},
|
|
34
25
|
'.cm-gutters': {
|
|
35
|
-
userSelect: 'none',
|
|
36
26
|
padding: '0 0 14px'
|
|
37
27
|
},
|
|
38
28
|
'.cm-content, .cm-gutters': {
|
|
@@ -43,6 +33,10 @@ const compactCodeTheme = EditorView.theme({
|
|
|
43
33
|
},
|
|
44
34
|
'.cm-line': {
|
|
45
35
|
padding: '0 16px'
|
|
36
|
+
},
|
|
37
|
+
'.cm-scroller': {
|
|
38
|
+
fontFamily:
|
|
39
|
+
'ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace'
|
|
46
40
|
}
|
|
47
41
|
})
|
|
48
42
|
|
|
@@ -64,8 +58,8 @@ export default function DevModeCodeMirror({ code, language, theme }: DevModeCode
|
|
|
64
58
|
return (
|
|
65
59
|
<CodeMirror
|
|
66
60
|
value={code}
|
|
61
|
+
editable={false}
|
|
67
62
|
readOnly
|
|
68
|
-
className="select-text"
|
|
69
63
|
basicSetup={codeMirrorSetup}
|
|
70
64
|
extensions={extensions}
|
|
71
65
|
theme={theme === 'dark' ? githubDark : githubLight}
|
|
@@ -22,25 +22,22 @@ export function PageHeader({
|
|
|
22
22
|
const router = useRouter()
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
|
-
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</header>
|
|
43
|
-
<div className="h-14 shrink-0" aria-hidden="true" />
|
|
44
|
-
</>
|
|
25
|
+
<header className="sticky top-0 border-t right-0 left-(--admin-shell-content-left) z-20 grid h-14 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center border-b border-border/80 px-4 bg-sidebar transition-[left] duration-200 ease-linear">
|
|
26
|
+
<div className="flex w-full items-center justify-start gap-2">
|
|
27
|
+
{hasBackButton && (
|
|
28
|
+
<Button variant="ghost" size="icon" onClick={() => router.back()}>
|
|
29
|
+
<ChevronLeft className="size-4" />
|
|
30
|
+
</Button>
|
|
31
|
+
)}
|
|
32
|
+
</div>
|
|
33
|
+
<div className="flex min-w-0 items-center justify-center gap-2">
|
|
34
|
+
<h2 className="truncate text-sm font-medium tracking-tight">{title}</h2>
|
|
35
|
+
</div>
|
|
36
|
+
<div className="flex w-full min-w-0 items-center justify-end gap-2">
|
|
37
|
+
{children && children}
|
|
38
|
+
{search && search}
|
|
39
|
+
{actions && actions}
|
|
40
|
+
</div>
|
|
41
|
+
</header>
|
|
45
42
|
)
|
|
46
43
|
}
|
|
@@ -2,15 +2,7 @@ import type { AdminMedia } from '@admin/types'
|
|
|
2
2
|
|
|
3
3
|
export type CreateMediaInput = Omit<
|
|
4
4
|
AdminMedia,
|
|
5
|
-
| '
|
|
6
|
-
| 'createdAt'
|
|
7
|
-
| 'updatedAt'
|
|
8
|
-
| 'createdAtFormatted'
|
|
9
|
-
| 'updatedAtFormatted'
|
|
10
|
-
| 'createdBy'
|
|
11
|
-
| 'updatedBy'
|
|
12
|
-
| 'createdByUser'
|
|
13
|
-
| 'updatedByUser'
|
|
5
|
+
'id' | 'createdAt' | 'updatedAt' | 'createdBy' | 'updatedBy' | 'createdByUser' | 'updatedByUser'
|
|
14
6
|
>
|
|
15
7
|
|
|
16
8
|
export interface CreateMediaResult {
|
|
@@ -11,7 +11,7 @@ export default function AdminLayout({ children }: { children: React.ReactNode })
|
|
|
11
11
|
<AdminProviders>
|
|
12
12
|
<div
|
|
13
13
|
className={cn(
|
|
14
|
-
'admin-root
|
|
14
|
+
'admin-root size-screen antialiased mt-px',
|
|
15
15
|
GeistSans.variable,
|
|
16
16
|
GeistMono.variable
|
|
17
17
|
)}
|
package/dist/cli.js
CHANGED
|
@@ -15113,7 +15113,7 @@ ${filtersActionsContent}
|
|
|
15113
15113
|
<div className="flex items-center justify-end">
|
|
15114
15114
|
${filtersActionsContent}
|
|
15115
15115
|
</div>`}
|
|
15116
|
-
<main className="space-y-4 px-4 pb-4
|
|
15116
|
+
<main className="space-y-4 px-4 pb-4 flex-1">
|
|
15117
15117
|
<${Plural}Table ${tableProps} />${sortOrderDialog}
|
|
15118
15118
|
</main>
|
|
15119
15119
|
</React.Fragment>
|
|
@@ -15327,10 +15327,7 @@ ${hasEdit ? " const router = useRouter()\n" : ""} const [{
|
|
|
15327
15327
|
|
|
15328
15328
|
return (
|
|
15329
15329
|
<div
|
|
15330
|
-
className={cn("flex flex-col gap-6 pt-px pb-2",
|
|
15331
|
-
"min-h-[calc(100svh-128px)]": !shouldShowPagination,
|
|
15332
|
-
"min-h-[calc(100svh-180px)]": shouldShowPagination
|
|
15333
|
-
}, className)}
|
|
15330
|
+
className={cn("flex flex-col gap-6 pt-px pb-2 h-full", className)}
|
|
15334
15331
|
>
|
|
15335
15332
|
<Card className="min-h-0 flex-1 p-0">
|
|
15336
15333
|
<CardContent ref={tableContainerRef} className="flex min-h-0 flex-1 flex-col p-0">
|