create-disposabl-app 0.9.1 → 0.10.1

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 (90) hide show
  1. package/dist/disposabl.js +1 -1
  2. package/dist/index.js +2 -2
  3. package/dist/templates/default/.github/workflows/pipeline.yml +1 -1
  4. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.api-keys.tsx +1 -1
  5. package/dist/templates/default/bun.lock +77 -1397
  6. package/dist/templates/default/package.json +1 -2
  7. package/dist/templates/default/packages/backend/README.md +3 -1
  8. package/dist/templates/default/packages/backend/convex/_generated/api.d.ts +6 -0
  9. package/dist/templates/default/packages/backend/convex/_generated/server.d.ts +0 -2
  10. package/dist/templates/default/packages/backend/convex/auth.config.ts +2 -10
  11. package/dist/templates/default/packages/backend/convex/convex.config.ts +3 -14
  12. package/dist/templates/default/packages/backend/convex/mcpEnterprise/README.md +42 -0
  13. package/dist/templates/default/packages/backend/convex/mcpEnterprise/internal.ts +153 -0
  14. package/dist/templates/default/packages/backend/convex/mcpEnterprise/provision.ts +102 -0
  15. package/dist/templates/default/packages/backend/convex/mcpEnterprise/validator.ts +35 -0
  16. package/dist/templates/default/packages/backend/convex/schema.ts +18 -0
  17. package/dist/templates/default/packages/backend/package.json +0 -1
  18. package/dist/templates/default/packages/cli/README.md +9 -24
  19. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +1 -1
  20. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +1 -1
  21. package/dist/templates/default/packages/disposabl-kit/client/routes/consent.tsx +71 -13
  22. package/dist/templates/default/packages/disposabl-kit/package.json +4 -14
  23. package/dist/templates/default/packages/disposabl-kit/server/http.ts +19 -12
  24. package/dist/templates/default/packages/disposabl-kit/server/lib/functions.ts +12 -0
  25. package/dist/templates/default/packages/disposabl-kit/server/mcp/enterprise.ts +267 -0
  26. package/dist/templates/default/packages/disposabl-kit/server/mcp/identity.ts +33 -0
  27. package/dist/templates/default/vendor/README.md +30 -0
  28. package/dist/templates/default/vendor/convex-auth-6c0ebf3f.tgz +0 -0
  29. package/package.json +1 -1
  30. package/dist/templates/default/apps/web/src/components/connections/expo-connection.tsx +0 -97
  31. package/dist/templates/default/apps/web/src/components/connections/provider-logo.tsx +0 -44
  32. package/dist/templates/default/apps/web/src/components/connections/use-connection-setup.ts +0 -169
  33. package/dist/templates/default/packages/disposabl-kit/client/components/ui/accordion.tsx +0 -77
  34. package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert-dialog.tsx +0 -185
  35. package/dist/templates/default/packages/disposabl-kit/client/components/ui/alert.tsx +0 -75
  36. package/dist/templates/default/packages/disposabl-kit/client/components/ui/aspect-ratio.tsx +0 -22
  37. package/dist/templates/default/packages/disposabl-kit/client/components/ui/attachment.tsx +0 -207
  38. package/dist/templates/default/packages/disposabl-kit/client/components/ui/avatar.tsx +0 -106
  39. package/dist/templates/default/packages/disposabl-kit/client/components/ui/badge.tsx +0 -51
  40. package/dist/templates/default/packages/disposabl-kit/client/components/ui/breadcrumb.tsx +0 -121
  41. package/dist/templates/default/packages/disposabl-kit/client/components/ui/bubble.tsx +0 -127
  42. package/dist/templates/default/packages/disposabl-kit/client/components/ui/button-group.tsx +0 -87
  43. package/dist/templates/default/packages/disposabl-kit/client/components/ui/calendar.tsx +0 -241
  44. package/dist/templates/default/packages/disposabl-kit/client/components/ui/carousel.tsx +0 -239
  45. package/dist/templates/default/packages/disposabl-kit/client/components/ui/chart.tsx +0 -368
  46. package/dist/templates/default/packages/disposabl-kit/client/components/ui/checkbox.tsx +0 -27
  47. package/dist/templates/default/packages/disposabl-kit/client/components/ui/code-block.tsx +0 -243
  48. package/dist/templates/default/packages/disposabl-kit/client/components/ui/collapsible.tsx +0 -19
  49. package/dist/templates/default/packages/disposabl-kit/client/components/ui/combobox.tsx +0 -300
  50. package/dist/templates/default/packages/disposabl-kit/client/components/ui/command.tsx +0 -194
  51. package/dist/templates/default/packages/disposabl-kit/client/components/ui/context-menu.tsx +0 -271
  52. package/dist/templates/default/packages/disposabl-kit/client/components/ui/dialog.tsx +0 -156
  53. package/dist/templates/default/packages/disposabl-kit/client/components/ui/direction.tsx +0 -4
  54. package/dist/templates/default/packages/disposabl-kit/client/components/ui/drawer.tsx +0 -224
  55. package/dist/templates/default/packages/disposabl-kit/client/components/ui/dropdown-menu.tsx +0 -269
  56. package/dist/templates/default/packages/disposabl-kit/client/components/ui/empty.tsx +0 -103
  57. package/dist/templates/default/packages/disposabl-kit/client/components/ui/hover-card.tsx +0 -50
  58. package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-group.tsx +0 -158
  59. package/dist/templates/default/packages/disposabl-kit/client/components/ui/input-otp.tsx +0 -83
  60. package/dist/templates/default/packages/disposabl-kit/client/components/ui/item.tsx +0 -201
  61. package/dist/templates/default/packages/disposabl-kit/client/components/ui/kbd.tsx +0 -26
  62. package/dist/templates/default/packages/disposabl-kit/client/components/ui/marker.tsx +0 -70
  63. package/dist/templates/default/packages/disposabl-kit/client/components/ui/menubar.tsx +0 -284
  64. package/dist/templates/default/packages/disposabl-kit/client/components/ui/message-scroller.tsx +0 -128
  65. package/dist/templates/default/packages/disposabl-kit/client/components/ui/message.tsx +0 -91
  66. package/dist/templates/default/packages/disposabl-kit/client/components/ui/native-select.tsx +0 -64
  67. package/dist/templates/default/packages/disposabl-kit/client/components/ui/navigation-menu.tsx +0 -170
  68. package/dist/templates/default/packages/disposabl-kit/client/components/ui/pagination.tsx +0 -133
  69. package/dist/templates/default/packages/disposabl-kit/client/components/ui/popover.tsx +0 -87
  70. package/dist/templates/default/packages/disposabl-kit/client/components/ui/progress.tsx +0 -82
  71. package/dist/templates/default/packages/disposabl-kit/client/components/ui/questionnaire.tsx +0 -330
  72. package/dist/templates/default/packages/disposabl-kit/client/components/ui/radio-group.tsx +0 -35
  73. package/dist/templates/default/packages/disposabl-kit/client/components/ui/resizable.tsx +0 -49
  74. package/dist/templates/default/packages/disposabl-kit/client/components/ui/scroll-area.tsx +0 -51
  75. package/dist/templates/default/packages/disposabl-kit/client/components/ui/select.tsx +0 -201
  76. package/dist/templates/default/packages/disposabl-kit/client/components/ui/sheet.tsx +0 -132
  77. package/dist/templates/default/packages/disposabl-kit/client/components/ui/sidebar.tsx +0 -723
  78. package/dist/templates/default/packages/disposabl-kit/client/components/ui/skeleton.tsx +0 -13
  79. package/dist/templates/default/packages/disposabl-kit/client/components/ui/slider.tsx +0 -51
  80. package/dist/templates/default/packages/disposabl-kit/client/components/ui/switch.tsx +0 -31
  81. package/dist/templates/default/packages/disposabl-kit/client/components/ui/table.tsx +0 -113
  82. package/dist/templates/default/packages/disposabl-kit/client/components/ui/tabs.tsx +0 -81
  83. package/dist/templates/default/packages/disposabl-kit/client/components/ui/textarea.tsx +0 -17
  84. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toast.tsx +0 -229
  85. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle-group.tsx +0 -87
  86. package/dist/templates/default/packages/disposabl-kit/client/components/ui/toggle.tsx +0 -42
  87. package/dist/templates/default/packages/disposabl-kit/client/components/ui/tooltip.tsx +0 -65
  88. package/dist/templates/default/packages/disposabl-kit/client/components/ui/trace.tsx +0 -161
  89. package/dist/templates/default/packages/disposabl-kit/client/hooks/use-mobile.ts +0 -21
  90. package/dist/templates/default/patches/@convex-dev%2Fauth@2.0.0-beta.0.patch +0 -310
@@ -1,201 +0,0 @@
1
- import * as React from "react";
2
- import { mergeProps } from "@base-ui/react/merge-props";
3
- import { useRender } from "@base-ui/react/use-render";
4
- import { cva, type VariantProps } from "class-variance-authority";
5
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
6
-
7
- import { Separator } from "@disposabl/disposabl-kit/client/components/ui/separator";
8
-
9
- function ItemGroup({ className, ...props }: React.ComponentProps<"div">) {
10
- return (
11
- <div
12
- role="list"
13
- data-slot="item-group"
14
- className={cn(
15
- "group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
16
- className,
17
- )}
18
- {...props}
19
- />
20
- );
21
- }
22
-
23
- function ItemSeparator({
24
- className,
25
- ...props
26
- }: React.ComponentProps<typeof Separator>) {
27
- return (
28
- <Separator
29
- data-slot="item-separator"
30
- orientation="horizontal"
31
- className={cn("my-2", className)}
32
- {...props}
33
- />
34
- );
35
- }
36
-
37
- const itemVariants = cva(
38
- "group/item flex w-full flex-wrap items-center rounded-md border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted",
39
- {
40
- variants: {
41
- variant: {
42
- default: "border-transparent",
43
- outline: "border-border",
44
- muted: "border-transparent bg-muted/50",
45
- },
46
- size: {
47
- default: "gap-3.5 px-4 py-3.5",
48
- sm: "gap-2.5 px-3 py-2.5",
49
- xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0",
50
- },
51
- },
52
- defaultVariants: {
53
- variant: "default",
54
- size: "default",
55
- },
56
- },
57
- );
58
-
59
- function Item({
60
- className,
61
- variant = "default",
62
- size = "default",
63
- render,
64
- ...props
65
- }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>) {
66
- return useRender({
67
- defaultTagName: "div",
68
- props: mergeProps<"div">(
69
- {
70
- className: cn(itemVariants({ variant, size, className })),
71
- },
72
- props,
73
- ),
74
- render,
75
- state: {
76
- slot: "item",
77
- variant,
78
- size,
79
- },
80
- });
81
- }
82
-
83
- const itemMediaVariants = cva(
84
- "flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
85
- {
86
- variants: {
87
- variant: {
88
- default: "bg-transparent",
89
- icon: "[&_svg:not([class*='size-'])]:size-4",
90
- image:
91
- "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover",
92
- },
93
- },
94
- defaultVariants: {
95
- variant: "default",
96
- },
97
- },
98
- );
99
-
100
- function ItemMedia({
101
- className,
102
- variant = "default",
103
- ...props
104
- }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>) {
105
- return (
106
- <div
107
- data-slot="item-media"
108
- data-variant={variant}
109
- className={cn(itemMediaVariants({ variant, className }))}
110
- {...props}
111
- />
112
- );
113
- }
114
-
115
- function ItemContent({ className, ...props }: React.ComponentProps<"div">) {
116
- return (
117
- <div
118
- data-slot="item-content"
119
- className={cn(
120
- "flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
121
- className,
122
- )}
123
- {...props}
124
- />
125
- );
126
- }
127
-
128
- function ItemTitle({ className, ...props }: React.ComponentProps<"div">) {
129
- return (
130
- <div
131
- data-slot="item-title"
132
- className={cn(
133
- "line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
134
- className,
135
- )}
136
- {...props}
137
- />
138
- );
139
- }
140
-
141
- function ItemDescription({ className, ...props }: React.ComponentProps<"p">) {
142
- return (
143
- <p
144
- data-slot="item-description"
145
- className={cn(
146
- "line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
147
- className,
148
- )}
149
- {...props}
150
- />
151
- );
152
- }
153
-
154
- function ItemActions({ className, ...props }: React.ComponentProps<"div">) {
155
- return (
156
- <div
157
- data-slot="item-actions"
158
- className={cn("flex items-center gap-2", className)}
159
- {...props}
160
- />
161
- );
162
- }
163
-
164
- function ItemHeader({ className, ...props }: React.ComponentProps<"div">) {
165
- return (
166
- <div
167
- data-slot="item-header"
168
- className={cn(
169
- "flex basis-full items-center justify-between gap-2",
170
- className,
171
- )}
172
- {...props}
173
- />
174
- );
175
- }
176
-
177
- function ItemFooter({ className, ...props }: React.ComponentProps<"div">) {
178
- return (
179
- <div
180
- data-slot="item-footer"
181
- className={cn(
182
- "flex basis-full items-center justify-between gap-2",
183
- className,
184
- )}
185
- {...props}
186
- />
187
- );
188
- }
189
-
190
- export {
191
- Item,
192
- ItemMedia,
193
- ItemContent,
194
- ItemActions,
195
- ItemGroup,
196
- ItemSeparator,
197
- ItemTitle,
198
- ItemDescription,
199
- ItemHeader,
200
- ItemFooter,
201
- };
@@ -1,26 +0,0 @@
1
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
2
-
3
- function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
4
- return (
5
- <kbd
6
- data-slot="kbd"
7
- className={cn(
8
- "pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",
9
- className,
10
- )}
11
- {...props}
12
- />
13
- );
14
- }
15
-
16
- function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {
17
- return (
18
- <kbd
19
- data-slot="kbd-group"
20
- className={cn("inline-flex items-center gap-1", className)}
21
- {...props}
22
- />
23
- );
24
- }
25
-
26
- export { Kbd, KbdGroup };
@@ -1,70 +0,0 @@
1
- import * as React from "react";
2
- import { mergeProps } from "@base-ui/react/merge-props";
3
- import { useRender } from "@base-ui/react/use-render";
4
- import { cva, type VariantProps } from "class-variance-authority";
5
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
6
-
7
- const markerVariants = cva(
8
- "group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground",
9
- {
10
- variants: {
11
- variant: {
12
- default: "",
13
- separator:
14
- "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
15
- border: "border-b border-border pb-2",
16
- },
17
- },
18
- },
19
- );
20
-
21
- function Marker({
22
- className,
23
- variant = "default",
24
- render,
25
- ...props
26
- }: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>) {
27
- return useRender({
28
- defaultTagName: "div",
29
- props: mergeProps<"div">(
30
- {
31
- className: cn(markerVariants({ variant, className })),
32
- },
33
- props,
34
- ),
35
- render,
36
- state: {
37
- slot: "marker",
38
- variant,
39
- },
40
- });
41
- }
42
-
43
- function MarkerIcon({ className, ...props }: React.ComponentProps<"span">) {
44
- return (
45
- <span
46
- data-slot="marker-icon"
47
- aria-hidden="true"
48
- className={cn(
49
- "size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4",
50
- className,
51
- )}
52
- {...props}
53
- />
54
- );
55
- }
56
-
57
- function MarkerContent({ className, ...props }: React.ComponentProps<"span">) {
58
- return (
59
- <span
60
- data-slot="marker-content"
61
- className={cn(
62
- "min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
63
- className,
64
- )}
65
- {...props}
66
- />
67
- );
68
- }
69
-
70
- export { Marker, MarkerIcon, MarkerContent, markerVariants };
@@ -1,284 +0,0 @@
1
- "use client";
2
-
3
- import * as React from "react";
4
- import { Menu as MenuPrimitive } from "@base-ui/react/menu";
5
- import { Menubar as MenubarPrimitive } from "@base-ui/react/menubar";
6
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
7
-
8
- import {
9
- DropdownMenu,
10
- DropdownMenuContent,
11
- DropdownMenuGroup,
12
- DropdownMenuItem,
13
- DropdownMenuLabel,
14
- DropdownMenuPortal,
15
- DropdownMenuRadioGroup,
16
- DropdownMenuSeparator,
17
- DropdownMenuShortcut,
18
- DropdownMenuSub,
19
- DropdownMenuSubContent,
20
- DropdownMenuSubTrigger,
21
- DropdownMenuTrigger,
22
- } from "@disposabl/disposabl-kit/client/components/ui/dropdown-menu";
23
- import { CheckIcon } from "lucide-react";
24
-
25
- function Menubar({ className, ...props }: MenubarPrimitive.Props) {
26
- return (
27
- <MenubarPrimitive
28
- data-slot="menubar"
29
- className={cn(
30
- "flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
31
- className,
32
- )}
33
- {...props}
34
- />
35
- );
36
- }
37
-
38
- function MenubarMenu({ ...props }: React.ComponentProps<typeof DropdownMenu>) {
39
- return <DropdownMenu data-slot="menubar-menu" {...props} />;
40
- }
41
-
42
- function MenubarGroup({
43
- ...props
44
- }: React.ComponentProps<typeof DropdownMenuGroup>) {
45
- return <DropdownMenuGroup data-slot="menubar-group" {...props} />;
46
- }
47
-
48
- function MenubarPortal({
49
- ...props
50
- }: React.ComponentProps<typeof DropdownMenuPortal>) {
51
- return <DropdownMenuPortal data-slot="menubar-portal" {...props} />;
52
- }
53
-
54
- function MenubarTrigger({
55
- className,
56
- ...props
57
- }: React.ComponentProps<typeof DropdownMenuTrigger>) {
58
- return (
59
- <DropdownMenuTrigger
60
- data-slot="menubar-trigger"
61
- className={cn(
62
- "flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted",
63
- className,
64
- )}
65
- {...props}
66
- />
67
- );
68
- }
69
-
70
- function MenubarContent({
71
- className,
72
- align = "start",
73
- alignOffset = -4,
74
- sideOffset = 8,
75
- ...props
76
- }: React.ComponentProps<typeof DropdownMenuContent>) {
77
- return (
78
- <DropdownMenuContent
79
- data-slot="menubar-content"
80
- align={align}
81
- alignOffset={alignOffset}
82
- sideOffset={sideOffset}
83
- className={cn(
84
- "min-w-36 rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
85
- className,
86
- )}
87
- {...props}
88
- />
89
- );
90
- }
91
-
92
- function MenubarItem({
93
- className,
94
- inset,
95
- variant = "default",
96
- ...props
97
- }: React.ComponentProps<typeof DropdownMenuItem>) {
98
- return (
99
- <DropdownMenuItem
100
- data-slot="menubar-item"
101
- data-inset={inset}
102
- data-variant={variant}
103
- className={cn(
104
- "group/menubar-item gap-2 rounded-sm px-2 py-1.5 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!",
105
- className,
106
- )}
107
- {...props}
108
- />
109
- );
110
- }
111
-
112
- function MenubarCheckboxItem({
113
- className,
114
- children,
115
- checked,
116
- inset,
117
- ...props
118
- }: MenuPrimitive.CheckboxItem.Props & {
119
- inset?: boolean;
120
- }) {
121
- return (
122
- <MenuPrimitive.CheckboxItem
123
- data-slot="menubar-checkbox-item"
124
- data-inset={inset}
125
- className={cn(
126
- "relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
127
- className,
128
- )}
129
- checked={checked}
130
- {...props}
131
- >
132
- <span className="pointer-events-none absolute left-2 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
133
- <MenuPrimitive.CheckboxItemIndicator>
134
- <CheckIcon />
135
- </MenuPrimitive.CheckboxItemIndicator>
136
- </span>
137
- {children}
138
- </MenuPrimitive.CheckboxItem>
139
- );
140
- }
141
-
142
- function MenubarRadioGroup({
143
- ...props
144
- }: React.ComponentProps<typeof DropdownMenuRadioGroup>) {
145
- return <DropdownMenuRadioGroup data-slot="menubar-radio-group" {...props} />;
146
- }
147
-
148
- function MenubarRadioItem({
149
- className,
150
- children,
151
- inset,
152
- ...props
153
- }: MenuPrimitive.RadioItem.Props & {
154
- inset?: boolean;
155
- }) {
156
- return (
157
- <MenuPrimitive.RadioItem
158
- data-slot="menubar-radio-item"
159
- data-inset={inset}
160
- className={cn(
161
- "relative flex cursor-default items-center gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
162
- className,
163
- )}
164
- {...props}
165
- >
166
- <span className="pointer-events-none absolute left-2 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4">
167
- <MenuPrimitive.RadioItemIndicator>
168
- <CheckIcon />
169
- </MenuPrimitive.RadioItemIndicator>
170
- </span>
171
- {children}
172
- </MenuPrimitive.RadioItem>
173
- );
174
- }
175
-
176
- function MenubarLabel({
177
- className,
178
- inset,
179
- ...props
180
- }: React.ComponentProps<typeof DropdownMenuLabel> & {
181
- inset?: boolean;
182
- }) {
183
- return (
184
- <DropdownMenuLabel
185
- data-slot="menubar-label"
186
- data-inset={inset}
187
- className={cn(
188
- "px-2 py-1.5 text-sm font-medium data-inset:pl-8",
189
- className,
190
- )}
191
- {...props}
192
- />
193
- );
194
- }
195
-
196
- function MenubarSeparator({
197
- className,
198
- ...props
199
- }: React.ComponentProps<typeof DropdownMenuSeparator>) {
200
- return (
201
- <DropdownMenuSeparator
202
- data-slot="menubar-separator"
203
- className={cn("-mx-1 my-1 h-px bg-border", className)}
204
- {...props}
205
- />
206
- );
207
- }
208
-
209
- function MenubarShortcut({
210
- className,
211
- ...props
212
- }: React.ComponentProps<typeof DropdownMenuShortcut>) {
213
- return (
214
- <DropdownMenuShortcut
215
- data-slot="menubar-shortcut"
216
- className={cn(
217
- "ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground",
218
- className,
219
- )}
220
- {...props}
221
- />
222
- );
223
- }
224
-
225
- function MenubarSub({
226
- ...props
227
- }: React.ComponentProps<typeof DropdownMenuSub>) {
228
- return <DropdownMenuSub data-slot="menubar-sub" {...props} />;
229
- }
230
-
231
- function MenubarSubTrigger({
232
- className,
233
- inset,
234
- ...props
235
- }: React.ComponentProps<typeof DropdownMenuSubTrigger> & {
236
- inset?: boolean;
237
- }) {
238
- return (
239
- <DropdownMenuSubTrigger
240
- data-slot="menubar-sub-trigger"
241
- data-inset={inset}
242
- className={cn(
243
- "gap-2 rounded-sm px-2 py-1.5 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4",
244
- className,
245
- )}
246
- {...props}
247
- />
248
- );
249
- }
250
-
251
- function MenubarSubContent({
252
- className,
253
- ...props
254
- }: React.ComponentProps<typeof DropdownMenuSubContent>) {
255
- return (
256
- <DropdownMenuSubContent
257
- data-slot="menubar-sub-content"
258
- className={cn(
259
- "min-w-32 rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
260
- className,
261
- )}
262
- {...props}
263
- />
264
- );
265
- }
266
-
267
- export {
268
- Menubar,
269
- MenubarPortal,
270
- MenubarMenu,
271
- MenubarTrigger,
272
- MenubarContent,
273
- MenubarGroup,
274
- MenubarSeparator,
275
- MenubarLabel,
276
- MenubarItem,
277
- MenubarShortcut,
278
- MenubarCheckboxItem,
279
- MenubarRadioGroup,
280
- MenubarRadioItem,
281
- MenubarSub,
282
- MenubarSubTrigger,
283
- MenubarSubContent,
284
- };
@@ -1,128 +0,0 @@
1
- import * as React from "react";
2
- import {
3
- MessageScroller as MessageScrollerPrimitive,
4
- useMessageScroller,
5
- useMessageScrollerScrollable,
6
- useMessageScrollerVisibility,
7
- } from "@shadcn/react/message-scroller";
8
- import { cn } from "@disposabl/disposabl-kit/client/lib/utils";
9
-
10
- import { Button } from "@disposabl/disposabl-kit/client/components/ui/button";
11
- import { ArrowDownIcon } from "lucide-react";
12
-
13
- function MessageScrollerProvider(
14
- props: React.ComponentProps<typeof MessageScrollerPrimitive.Provider>,
15
- ) {
16
- return <MessageScrollerPrimitive.Provider {...props} />;
17
- }
18
-
19
- function MessageScroller({
20
- className,
21
- ...props
22
- }: React.ComponentProps<typeof MessageScrollerPrimitive.Root>) {
23
- return (
24
- <MessageScrollerPrimitive.Root
25
- data-slot="message-scroller"
26
- className={cn(
27
- "group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden",
28
- className,
29
- )}
30
- {...props}
31
- />
32
- );
33
- }
34
-
35
- function MessageScrollerViewport({
36
- className,
37
- ...props
38
- }: React.ComponentProps<typeof MessageScrollerPrimitive.Viewport>) {
39
- return (
40
- <MessageScrollerPrimitive.Viewport
41
- data-slot="message-scroller-viewport"
42
- className={cn(
43
- "size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible",
44
- className,
45
- )}
46
- {...props}
47
- />
48
- );
49
- }
50
-
51
- function MessageScrollerContent({
52
- className,
53
- ...props
54
- }: React.ComponentProps<typeof MessageScrollerPrimitive.Content>) {
55
- return (
56
- <MessageScrollerPrimitive.Content
57
- data-slot="message-scroller-content"
58
- className={cn("flex h-max min-h-full flex-col gap-8", className)}
59
- {...props}
60
- />
61
- );
62
- }
63
-
64
- function MessageScrollerItem({
65
- className,
66
- scrollAnchor = false,
67
- ...props
68
- }: React.ComponentProps<typeof MessageScrollerPrimitive.Item>) {
69
- return (
70
- <MessageScrollerPrimitive.Item
71
- data-slot="message-scroller-item"
72
- scrollAnchor={scrollAnchor}
73
- className={cn(
74
- "min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]",
75
- className,
76
- )}
77
- {...props}
78
- />
79
- );
80
- }
81
-
82
- function MessageScrollerButton({
83
- direction = "end",
84
- className,
85
- children,
86
- render,
87
- variant = "secondary",
88
- size = "icon-sm",
89
- ...props
90
- }: React.ComponentProps<typeof MessageScrollerPrimitive.Button> &
91
- Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
92
- return (
93
- <MessageScrollerPrimitive.Button
94
- data-slot="message-scroller-button"
95
- data-direction={direction}
96
- data-variant={variant}
97
- data-size={size}
98
- direction={direction}
99
- className={cn(
100
- "absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180",
101
- className,
102
- )}
103
- render={render ?? <Button variant={variant} size={size} />}
104
- {...props}
105
- >
106
- {children ?? (
107
- <>
108
- <ArrowDownIcon />
109
- <span className="sr-only">
110
- {direction === "end" ? "Scroll to end" : "Scroll to start"}
111
- </span>
112
- </>
113
- )}
114
- </MessageScrollerPrimitive.Button>
115
- );
116
- }
117
-
118
- export {
119
- MessageScrollerProvider,
120
- MessageScroller,
121
- MessageScrollerViewport,
122
- MessageScrollerContent,
123
- MessageScrollerItem,
124
- MessageScrollerButton,
125
- useMessageScroller,
126
- useMessageScrollerScrollable,
127
- useMessageScrollerVisibility,
128
- };