betterstart-cli 0.0.110 → 0.0.112

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 (57) 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 +327 -466
  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
  57. package/dist/assets/shared-assets/react-admin/ui/command.tsx +0 -180
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "betterstart-cli",
3
- "version": "0.0.110",
3
+ "version": "0.0.112",
4
4
  "description": "A production ready dashboard,tailored for you in 5 Minutes.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,17 +0,0 @@
1
- 'use client'
2
-
3
- import * as React from 'react'
4
- import { useIsMobile } from '../use-mobile'
5
-
6
- export type ContentEditorMobileToolbarView = 'main' | 'highlighter' | 'link' | 'math'
7
-
8
- export function useContentEditorMobileToolbar() {
9
- const isMobile = useIsMobile()
10
- const [mobileViewState, setMobileView] = React.useState<ContentEditorMobileToolbarView>('main')
11
-
12
- return {
13
- isMobile,
14
- mobileView: isMobile ? mobileViewState : 'main',
15
- setMobileView
16
- }
17
- }
@@ -1,24 +0,0 @@
1
- 'use client'
2
-
3
- import { useEffect, useState } from 'react'
4
-
5
- type BreakpointMode = 'min' | 'max'
6
-
7
- export function useIsBreakpoint(mode: BreakpointMode = 'max', breakpoint = 768) {
8
- const [matches, setMatches] = useState<boolean | undefined>(undefined)
9
-
10
- useEffect(() => {
11
- const query =
12
- mode === 'min' ? `(min-width: ${breakpoint}px)` : `(max-width: ${breakpoint - 1}px)`
13
-
14
- const mql = window.matchMedia(query)
15
- const onChange = (e: MediaQueryListEvent) => setMatches(e.matches)
16
-
17
- setMatches(mql.matches)
18
-
19
- mql.addEventListener('change', onChange)
20
- return () => mql.removeEventListener('change', onChange)
21
- }, [mode, breakpoint])
22
-
23
- return !!matches
24
- }
@@ -1,19 +0,0 @@
1
- import * as React from 'react'
2
-
3
- const MOBILE_BREAKPOINT = 768
4
-
5
- export function useIsMobile() {
6
- const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)
7
-
8
- React.useEffect(() => {
9
- const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)
10
- const onChange = () => {
11
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
12
- }
13
- mql.addEventListener('change', onChange)
14
- setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)
15
- return () => mql.removeEventListener('change', onChange)
16
- }, [])
17
-
18
- return !!isMobile
19
- }
@@ -1,56 +0,0 @@
1
- import { ColorHighlightPopoverContent } from '@admin/components/custom/content-editor/tiptap-ui/color-highlight-popover'
2
- import { LinkContent } from '@admin/components/custom/content-editor/tiptap-ui/link-popover'
3
- import { Button } from '@admin/components/ui/button'
4
- import { Separator } from '@admin/components/ui/separator'
5
- import { useTiptapEditor } from '@admin/hooks/content-editor/use-tiptap-editor'
6
- import { insertContentEditorMath } from '@admin/utils/editor/insert-content-editor-math'
7
- import { ArrowLeftIcon, HighlighterIcon, LinkIcon, SigmaIcon } from 'lucide-react'
8
- import { MathEditorControls } from './math-popover'
9
-
10
- export function MobileToolbarContent({
11
- type,
12
- onBack
13
- }: {
14
- type: 'highlighter' | 'link' | 'math'
15
- onBack: () => void
16
- }) {
17
- const { editor } = useTiptapEditor()
18
-
19
- return (
20
- <>
21
- <div className="flex items-center gap-0.5">
22
- <Button
23
- type="button"
24
- variant="ghost"
25
- size="icon-sm"
26
- onClick={onBack}
27
- aria-label="Back to formatting toolbar"
28
- title="Back"
29
- >
30
- <ArrowLeftIcon />
31
- {type === 'highlighter' ? (
32
- <HighlighterIcon />
33
- ) : type === 'math' ? (
34
- <SigmaIcon />
35
- ) : (
36
- <LinkIcon />
37
- )}
38
- </Button>
39
- </div>
40
-
41
- <Separator orientation="vertical" className="mx-1 my-auto h-[65%] self-center" />
42
-
43
- {type === 'highlighter' ? (
44
- <ColorHighlightPopoverContent />
45
- ) : type === 'math' ? (
46
- <MathEditorControls
47
- disabled={!editor?.isEditable}
48
- onApply={(value) => insertContentEditorMath(editor, value)}
49
- onComplete={onBack}
50
- />
51
- ) : (
52
- <LinkContent />
53
- )}
54
- </>
55
- )
56
- }
@@ -1,180 +0,0 @@
1
- 'use client'
2
-
3
- import * as React from 'react'
4
- import {
5
- Dialog,
6
- DialogContent,
7
- DialogDescription,
8
- DialogHeader,
9
- DialogTitle
10
- } from '@admin/components/ui/dialog'
11
- import { InputGroup, InputGroupAddon } from '@admin/components/ui/input-group'
12
- import { cn } from '@admin/utils/shared/cn'
13
- import { Command as CommandPrimitive } from 'cmdk'
14
- import { CheckIcon, SearchIcon } from 'lucide-react'
15
-
16
- function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>) {
17
- return (
18
- <CommandPrimitive
19
- data-slot="command"
20
- className={cn(
21
- 'flex size-full flex-col overflow-hidden rounded-4xl bg-popover p-1 text-popover-foreground',
22
- className
23
- )}
24
- {...props}
25
- />
26
- )
27
- }
28
-
29
- function CommandDialog({
30
- title = 'Command Palette',
31
- description = 'Search for a command to run...',
32
- children,
33
- className,
34
- showCloseButton = false,
35
- ...props
36
- }: Omit<React.ComponentProps<typeof Dialog>, 'children'> & {
37
- title?: string
38
- description?: string
39
- className?: string
40
- showCloseButton?: boolean
41
- children: React.ReactNode
42
- }) {
43
- return (
44
- <Dialog {...props}>
45
- <DialogHeader className="sr-only">
46
- <DialogTitle>{title}</DialogTitle>
47
- <DialogDescription>{description}</DialogDescription>
48
- </DialogHeader>
49
- <DialogContent
50
- className={cn('top-1/3 translate-y-0 overflow-hidden rounded-4xl! p-0', className)}
51
- showCloseButton={showCloseButton}
52
- >
53
- {children}
54
- </DialogContent>
55
- </Dialog>
56
- )
57
- }
58
-
59
- function CommandInput({
60
- className,
61
- ...props
62
- }: React.ComponentProps<typeof CommandPrimitive.Input>) {
63
- return (
64
- <div data-slot="command-input-wrapper" className="p-1 pb-0">
65
- <InputGroup className="h-9 bg-input/30">
66
- <CommandPrimitive.Input
67
- data-slot="command-input"
68
- className={cn(
69
- 'w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
70
- className
71
- )}
72
- {...props}
73
- />
74
- <InputGroupAddon>
75
- <SearchIcon className="size-4 shrink-0 opacity-50" />
76
- </InputGroupAddon>
77
- </InputGroup>
78
- </div>
79
- )
80
- }
81
-
82
- function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {
83
- return (
84
- <CommandPrimitive.List
85
- data-slot="command-list"
86
- className={cn(
87
- 'no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none',
88
- className
89
- )}
90
- {...props}
91
- />
92
- )
93
- }
94
-
95
- function CommandEmpty({
96
- className,
97
- ...props
98
- }: React.ComponentProps<typeof CommandPrimitive.Empty>) {
99
- return (
100
- <CommandPrimitive.Empty
101
- data-slot="command-empty"
102
- className={cn('py-6 text-center text-sm', className)}
103
- {...props}
104
- />
105
- )
106
- }
107
-
108
- function CommandGroup({
109
- className,
110
- ...props
111
- }: React.ComponentProps<typeof CommandPrimitive.Group>) {
112
- return (
113
- <CommandPrimitive.Group
114
- data-slot="command-group"
115
- className={cn(
116
- 'overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-3 **:[[cmdk-group-heading]]:py-2 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground',
117
- className
118
- )}
119
- {...props}
120
- />
121
- )
122
- }
123
-
124
- function CommandSeparator({
125
- className,
126
- ...props
127
- }: React.ComponentProps<typeof CommandPrimitive.Separator>) {
128
- return (
129
- <CommandPrimitive.Separator
130
- data-slot="command-separator"
131
- className={cn('my-1 h-px bg-border/50', className)}
132
- {...props}
133
- />
134
- )
135
- }
136
-
137
- function CommandItem({
138
- className,
139
- children,
140
- ...props
141
- }: React.ComponentProps<typeof CommandPrimitive.Item>) {
142
- return (
143
- <CommandPrimitive.Item
144
- data-slot="command-item"
145
- className={cn(
146
- "group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-3 py-2 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-2xl data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
147
- className
148
- )}
149
- {...props}
150
- >
151
- {children}
152
- <CheckIcon className="ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" />
153
- </CommandPrimitive.Item>
154
- )
155
- }
156
-
157
- function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>) {
158
- return (
159
- <span
160
- data-slot="command-shortcut"
161
- className={cn(
162
- 'ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground',
163
- className
164
- )}
165
- {...props}
166
- />
167
- )
168
- }
169
-
170
- export {
171
- Command,
172
- CommandDialog,
173
- CommandInput,
174
- CommandList,
175
- CommandEmpty,
176
- CommandGroup,
177
- CommandItem,
178
- CommandShortcut,
179
- CommandSeparator
180
- }