@chat-js/cli 0.6.1 → 0.6.3

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 (154) hide show
  1. package/dist/index.js +17065 -16667
  2. package/package.json +1 -1
  3. package/templates/chat-app/app/(auth)/login/page.tsx +3 -3
  4. package/templates/chat-app/app/(chat)/api/chat/route.ts +4 -60
  5. package/templates/chat-app/app/not-found.tsx +2 -2
  6. package/templates/chat-app/chat.config.ts +3 -0
  7. package/templates/chat-app/components/ai-elements/actions.tsx +44 -44
  8. package/templates/chat-app/components/ai-elements/artifact.tsx +92 -92
  9. package/templates/chat-app/components/ai-elements/code-block.tsx +143 -143
  10. package/templates/chat-app/components/ai-elements/context.tsx +313 -313
  11. package/templates/chat-app/components/ai-elements/conversation.tsx +65 -65
  12. package/templates/chat-app/components/ai-elements/extra/conversation-content-scroll-area.tsx +29 -29
  13. package/templates/chat-app/components/ai-elements/extra/mcp-tool-header.tsx +27 -27
  14. package/templates/chat-app/components/ai-elements/message.tsx +341 -344
  15. package/templates/chat-app/components/ai-elements/parseIncompleteMarkdown.tsx +122 -122
  16. package/templates/chat-app/components/ai-elements/prompt-input.tsx +1059 -1059
  17. package/templates/chat-app/components/ai-elements/reasoning.tsx +131 -131
  18. package/templates/chat-app/components/ai-elements/response.tsx +15 -12
  19. package/templates/chat-app/components/ai-elements/sandbox.tsx +84 -84
  20. package/templates/chat-app/components/ai-elements/shimmer.tsx +47 -47
  21. package/templates/chat-app/components/ai-elements/suggestion.tsx +33 -33
  22. package/templates/chat-app/components/ai-elements/tool.tsx +118 -118
  23. package/templates/chat-app/components/app-sidebar-history-conditional.tsx +3 -3
  24. package/templates/chat-app/components/app-sidebar.tsx +3 -3
  25. package/templates/chat-app/components/connectors-dropdown.tsx +6 -3
  26. package/templates/chat-app/components/deep-research-progress.tsx +1 -1
  27. package/templates/chat-app/components/header-breadcrumb.tsx +14 -11
  28. package/templates/chat-app/components/internal-link.tsx +73 -0
  29. package/templates/chat-app/components/login-form.tsx +5 -5
  30. package/templates/chat-app/components/message-parts.tsx +1 -71
  31. package/templates/chat-app/components/model-selector.tsx +3 -3
  32. package/templates/chat-app/components/new-chat-button.tsx +4 -4
  33. package/templates/chat-app/components/part/document-common.tsx +3 -3
  34. package/templates/chat-app/components/part/document-tool.tsx +3 -3
  35. package/templates/chat-app/components/part/message-annotations.tsx +2 -2
  36. package/templates/chat-app/components/part/tool-part.tsx +92 -0
  37. package/templates/chat-app/components/project-chat-item.tsx +2 -2
  38. package/templates/chat-app/components/research-progress.tsx +2 -2
  39. package/templates/chat-app/components/research-task.tsx +1 -1
  40. package/templates/chat-app/components/research-tasks.tsx +1 -1
  41. package/templates/chat-app/components/settings/connectors-settings.tsx +4 -4
  42. package/templates/chat-app/components/settings/mcp-details-page.tsx +5 -5
  43. package/templates/chat-app/components/settings/settings-nav.tsx +3 -3
  44. package/templates/chat-app/components/sidebar-chat-item.tsx +4 -12
  45. package/templates/chat-app/components/sidebar-project-item.tsx +4 -11
  46. package/templates/chat-app/components/sidebar-top-row.tsx +7 -7
  47. package/templates/chat-app/components/sidebar-user-nav.tsx +3 -3
  48. package/templates/chat-app/components/signup-form.tsx +8 -5
  49. package/templates/chat-app/components/source-badge.tsx +3 -9
  50. package/templates/chat-app/components/sources.tsx +1 -1
  51. package/templates/chat-app/components/ui/accordion.tsx +32 -32
  52. package/templates/chat-app/components/ui/alert-dialog.tsx +103 -103
  53. package/templates/chat-app/components/ui/alert.tsx +36 -36
  54. package/templates/chat-app/components/ui/avatar.tsx +28 -28
  55. package/templates/chat-app/components/ui/badge.tsx +22 -22
  56. package/templates/chat-app/components/ui/breadcrumb.tsx +72 -72
  57. package/templates/chat-app/components/ui/button-group.tsx +58 -58
  58. package/templates/chat-app/components/ui/button.tsx +45 -45
  59. package/templates/chat-app/components/ui/card.tsx +65 -65
  60. package/templates/chat-app/components/ui/checkbox.tsx +16 -16
  61. package/templates/chat-app/components/ui/collapsible.tsx +1 -1
  62. package/templates/chat-app/components/ui/command.tsx +137 -137
  63. package/templates/chat-app/components/ui/dialog.tsx +94 -94
  64. package/templates/chat-app/components/ui/drawer.tsx +68 -68
  65. package/templates/chat-app/components/ui/dropdown-menu.tsx +184 -184
  66. package/templates/chat-app/components/ui/empty.tsx +76 -76
  67. package/templates/chat-app/components/ui/extra/action-container.tsx +3 -3
  68. package/templates/chat-app/components/ui/extra/scroll-area-viewport-ref.tsx +24 -24
  69. package/templates/chat-app/components/ui/form.tsx +112 -112
  70. package/templates/chat-app/components/ui/hover-card.tsx +25 -25
  71. package/templates/chat-app/components/ui/input-group.tsx +126 -126
  72. package/templates/chat-app/components/ui/input.tsx +13 -13
  73. package/templates/chat-app/components/ui/label.tsx +12 -12
  74. package/templates/chat-app/components/ui/popover.tsx +25 -25
  75. package/templates/chat-app/components/ui/progress.tsx +19 -19
  76. package/templates/chat-app/components/ui/resizable.tsx +27 -27
  77. package/templates/chat-app/components/ui/scroll-area.tsx +30 -30
  78. package/templates/chat-app/components/ui/select.tsx +108 -108
  79. package/templates/chat-app/components/ui/separator.tsx +16 -16
  80. package/templates/chat-app/components/ui/sheet.tsx +91 -91
  81. package/templates/chat-app/components/ui/sidebar.tsx +615 -615
  82. package/templates/chat-app/components/ui/skeleton.tsx +7 -7
  83. package/templates/chat-app/components/ui/slider.tsx +50 -50
  84. package/templates/chat-app/components/ui/spinner.tsx +8 -8
  85. package/templates/chat-app/components/ui/switch.tsx +16 -16
  86. package/templates/chat-app/components/ui/table.tsx +71 -71
  87. package/templates/chat-app/components/ui/tabs.tsx +31 -31
  88. package/templates/chat-app/components/ui/textarea.tsx +10 -10
  89. package/templates/chat-app/components/ui/toggle.tsx +31 -31
  90. package/templates/chat-app/components/ui/tooltip.tsx +48 -48
  91. package/templates/chat-app/components/upgrade-cta/limit-display.tsx +7 -7
  92. package/templates/chat-app/components/upgrade-cta/login-cta-banner.tsx +3 -3
  93. package/templates/chat-app/components/upgrade-cta/login-prompt.tsx +3 -3
  94. package/templates/chat-app/hooks/use-mobile.ts +13 -13
  95. package/templates/chat-app/lib/ai/core-chat-agent.ts +25 -14
  96. package/templates/chat-app/lib/ai/eval-agent.ts +4 -5
  97. package/templates/chat-app/lib/ai/gateway-model-defaults.ts +24 -0
  98. package/templates/chat-app/lib/ai/installed-tools.ts +12 -0
  99. package/templates/chat-app/lib/ai/mcp/mcp-client.ts +2 -2
  100. package/templates/chat-app/lib/ai/models.generated.ts +4236 -4585
  101. package/templates/chat-app/lib/ai/tool-renderer-registry.ts +31 -0
  102. package/templates/chat-app/lib/ai/types.ts +15 -20
  103. package/templates/chat-app/lib/config-requirements.ts +11 -6
  104. package/templates/chat-app/lib/config-schema.ts +24 -0
  105. package/templates/chat-app/lib/stores/hooks-message-parts.ts +1 -1
  106. package/templates/chat-app/lib/utils.ts +157 -157
  107. package/templates/chat-app/package.json +1 -1
  108. package/templates/chat-app/scripts/check-env.ts +229 -2
  109. package/templates/chat-app/tools/chatjs/_shared/lib/tool-part.ts +5 -0
  110. package/templates/chat-app/{components/part/weather.tsx → tools/chatjs/get-weather/renderer.tsx} +24 -38
  111. package/templates/chat-app/{components/part/retrieve-url.tsx → tools/chatjs/retrieve-url/renderer.tsx} +20 -15
  112. package/templates/chat-app/{lib/ai/tools/retrieve-url.ts → tools/chatjs/retrieve-url/tool.ts} +46 -7
  113. package/templates/chat-app/tools/chatjs/tools.ts +16 -0
  114. package/templates/chat-app/tools/chatjs/ui.ts +17 -0
  115. package/templates/chat-app/tools/chatjs/word-count/renderer.tsx +50 -0
  116. package/templates/chat-app/tools/chatjs/word-count/tool.ts +30 -0
  117. package/templates/chat-app/{lib/ai/tools → tools/platform}/code-execution.ts +3 -5
  118. package/templates/chat-app/{lib/ai/tools → tools/platform}/deep-research/deep-research.ts +2 -3
  119. package/templates/chat-app/{lib/ai/tools → tools/platform}/deep-research/pipeline.ts +1 -1
  120. package/templates/chat-app/{lib/ai/tools → tools/platform}/deep-research/types.ts +1 -1
  121. package/templates/chat-app/{lib/ai/tools → tools/platform}/deep-research/utils.ts +7 -7
  122. package/templates/chat-app/{lib/ai/tools → tools/platform}/documents/types.ts +1 -1
  123. package/templates/chat-app/{lib/ai/tools → tools/platform}/generate-video.ts +4 -6
  124. package/templates/chat-app/{lib/ai/tools → tools/platform}/read-document.ts +2 -2
  125. package/templates/chat-app/{lib/ai/tools → tools/platform}/steps/multi-query-web-search.ts +1 -1
  126. package/templates/chat-app/{lib/ai/tools → tools/platform}/steps/web-search.ts +1 -1
  127. package/templates/chat-app/{lib/ai/tools → tools/platform}/tools.ts +54 -30
  128. package/templates/chat-app/{lib/ai/tools → tools/platform}/web-search.ts +7 -5
  129. package/templates/electron/CHANGELOG.md +16 -2
  130. package/templates/electron/package.json +1 -1
  131. package/templates/chat-app/lib/ai/tools/tools-definitions.ts +0 -83
  132. /package/templates/chat-app/{lib/ai/tools/get-weather.ts → tools/chatjs/get-weather/tool.ts} +0 -0
  133. /package/templates/chat-app/{lib/ai/tools → tools/platform}/code-execution.javascript.ts +0 -0
  134. /package/templates/chat-app/{lib/ai/tools → tools/platform}/code-execution.python.ts +0 -0
  135. /package/templates/chat-app/{lib/ai/tools → tools/platform}/code-execution.shared.test.ts +0 -0
  136. /package/templates/chat-app/{lib/ai/tools → tools/platform}/code-execution.shared.ts +0 -0
  137. /package/templates/chat-app/{lib/ai/tools → tools/platform}/code-execution.types.ts +0 -0
  138. /package/templates/chat-app/{lib/ai/tools → tools/platform}/deep-research/configuration.ts +0 -0
  139. /package/templates/chat-app/{lib/ai/tools → tools/platform}/deep-research/prompts.ts +0 -0
  140. /package/templates/chat-app/{lib/ai/tools → tools/platform}/deep-research/researcher-agent.ts +0 -0
  141. /package/templates/chat-app/{lib/ai/tools → tools/platform}/deep-research/supervisor-agent.ts +0 -0
  142. /package/templates/chat-app/{lib/ai/tools → tools/platform}/documents/code-guidelines.ts +0 -0
  143. /package/templates/chat-app/{lib/ai/tools → tools/platform}/documents/create-code-document.ts +0 -0
  144. /package/templates/chat-app/{lib/ai/tools → tools/platform}/documents/create-sheet-document.ts +0 -0
  145. /package/templates/chat-app/{lib/ai/tools → tools/platform}/documents/create-text-document.ts +0 -0
  146. /package/templates/chat-app/{lib/ai/tools → tools/platform}/documents/edit-code-document.ts +0 -0
  147. /package/templates/chat-app/{lib/ai/tools → tools/platform}/documents/edit-sheet-document.ts +0 -0
  148. /package/templates/chat-app/{lib/ai/tools → tools/platform}/documents/edit-text-document.ts +0 -0
  149. /package/templates/chat-app/{lib/ai/tools → tools/platform}/documents/sheet-guidelines.ts +0 -0
  150. /package/templates/chat-app/{lib/ai/tools → tools/platform}/documents/text-guidelines.ts +0 -0
  151. /package/templates/chat-app/{lib/ai/tools → tools/platform}/generate-image.ts +0 -0
  152. /package/templates/chat-app/{lib/ai/tools → tools/platform}/research-updates-schema.ts +0 -0
  153. /package/templates/chat-app/{lib/ai/tools → tools/platform}/steps/search-utils.ts +0 -0
  154. /package/templates/chat-app/{lib/ai/tools → tools/platform}/types.ts +0 -0
@@ -13,148 +13,148 @@ const SelectGroup = SelectPrimitive.Group;
13
13
  const SelectValue = SelectPrimitive.Value;
14
14
 
15
15
  const SelectTrigger = React.forwardRef<
16
- React.ElementRef<typeof SelectPrimitive.Trigger>,
17
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
16
+ React.ElementRef<typeof SelectPrimitive.Trigger>,
17
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>
18
18
  >(({ className, children, ...props }, ref) => (
19
- <SelectPrimitive.Trigger
20
- className={cn(
21
- "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1",
22
- className
23
- )}
24
- ref={ref}
25
- {...props}
26
- >
27
- {children}
28
- <SelectPrimitive.Icon asChild>
29
- <ChevronDown className="h-4 w-4 opacity-50" />
30
- </SelectPrimitive.Icon>
31
- </SelectPrimitive.Trigger>
19
+ <SelectPrimitive.Trigger
20
+ className={cn(
21
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground [&>span]:line-clamp-1",
22
+ className,
23
+ )}
24
+ ref={ref}
25
+ {...props}
26
+ >
27
+ {children}
28
+ <SelectPrimitive.Icon asChild>
29
+ <ChevronDown className="h-4 w-4 opacity-50" />
30
+ </SelectPrimitive.Icon>
31
+ </SelectPrimitive.Trigger>
32
32
  ));
33
33
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
34
34
 
35
35
  const SelectScrollUpButton = React.forwardRef<
36
- React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
37
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
36
+ React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
37
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
38
38
  >(({ className, ...props }, ref) => (
39
- <SelectPrimitive.ScrollUpButton
40
- className={cn(
41
- "flex cursor-default items-center justify-center py-1",
42
- className
43
- )}
44
- ref={ref}
45
- {...props}
46
- >
47
- <ChevronUp className="h-4 w-4" />
48
- </SelectPrimitive.ScrollUpButton>
39
+ <SelectPrimitive.ScrollUpButton
40
+ className={cn(
41
+ "flex cursor-default items-center justify-center py-1",
42
+ className,
43
+ )}
44
+ ref={ref}
45
+ {...props}
46
+ >
47
+ <ChevronUp className="h-4 w-4" />
48
+ </SelectPrimitive.ScrollUpButton>
49
49
  ));
50
50
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
51
51
 
52
52
  const SelectScrollDownButton = React.forwardRef<
53
- React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
54
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
53
+ React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
54
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
55
55
  >(({ className, ...props }, ref) => (
56
- <SelectPrimitive.ScrollDownButton
57
- className={cn(
58
- "flex cursor-default items-center justify-center py-1",
59
- className
60
- )}
61
- ref={ref}
62
- {...props}
63
- >
64
- <ChevronDown className="h-4 w-4" />
65
- </SelectPrimitive.ScrollDownButton>
56
+ <SelectPrimitive.ScrollDownButton
57
+ className={cn(
58
+ "flex cursor-default items-center justify-center py-1",
59
+ className,
60
+ )}
61
+ ref={ref}
62
+ {...props}
63
+ >
64
+ <ChevronDown className="h-4 w-4" />
65
+ </SelectPrimitive.ScrollDownButton>
66
66
  ));
67
67
  SelectScrollDownButton.displayName =
68
- SelectPrimitive.ScrollDownButton.displayName;
68
+ SelectPrimitive.ScrollDownButton.displayName;
69
69
 
70
70
  const SelectContent = React.forwardRef<
71
- React.ElementRef<typeof SelectPrimitive.Content>,
72
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
71
+ React.ElementRef<typeof SelectPrimitive.Content>,
72
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>
73
73
  >(({ className, children, position = "popper", ...props }, ref) => (
74
- <SelectPrimitive.Portal>
75
- <SelectPrimitive.Content
76
- className={cn(
77
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
78
- position === "popper" &&
79
- "data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",
80
- className
81
- )}
82
- position={position}
83
- ref={ref}
84
- {...props}
85
- >
86
- <SelectScrollUpButton />
87
- <SelectPrimitive.Viewport
88
- className={cn(
89
- "p-1",
90
- position === "popper" &&
91
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
92
- )}
93
- >
94
- {children}
95
- </SelectPrimitive.Viewport>
96
- <SelectScrollDownButton />
97
- </SelectPrimitive.Content>
98
- </SelectPrimitive.Portal>
74
+ <SelectPrimitive.Portal>
75
+ <SelectPrimitive.Content
76
+ className={cn(
77
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 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 relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] origin-[--radix-select-content-transform-origin] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
78
+ position === "popper" &&
79
+ "data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",
80
+ className,
81
+ )}
82
+ position={position}
83
+ ref={ref}
84
+ {...props}
85
+ >
86
+ <SelectScrollUpButton />
87
+ <SelectPrimitive.Viewport
88
+ className={cn(
89
+ "p-1",
90
+ position === "popper" &&
91
+ "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
92
+ )}
93
+ >
94
+ {children}
95
+ </SelectPrimitive.Viewport>
96
+ <SelectScrollDownButton />
97
+ </SelectPrimitive.Content>
98
+ </SelectPrimitive.Portal>
99
99
  ));
100
100
  SelectContent.displayName = SelectPrimitive.Content.displayName;
101
101
 
102
102
  const SelectLabel = React.forwardRef<
103
- React.ElementRef<typeof SelectPrimitive.Label>,
104
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
103
+ React.ElementRef<typeof SelectPrimitive.Label>,
104
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
105
105
  >(({ className, ...props }, ref) => (
106
- <SelectPrimitive.Label
107
- className={cn("py-1.5 pr-2 pl-8 font-semibold text-sm", className)}
108
- ref={ref}
109
- {...props}
110
- />
106
+ <SelectPrimitive.Label
107
+ className={cn("py-1.5 pr-2 pl-8 font-semibold text-sm", className)}
108
+ ref={ref}
109
+ {...props}
110
+ />
111
111
  ));
112
112
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
113
113
 
114
114
  const SelectItem = React.forwardRef<
115
- React.ElementRef<typeof SelectPrimitive.Item>,
116
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
115
+ React.ElementRef<typeof SelectPrimitive.Item>,
116
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>
117
117
  >(({ className, children, ...props }, ref) => (
118
- <SelectPrimitive.Item
119
- className={cn(
120
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
121
- className
122
- )}
123
- ref={ref}
124
- {...props}
125
- >
126
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
127
- <SelectPrimitive.ItemIndicator>
128
- <Check className="h-4 w-4" />
129
- </SelectPrimitive.ItemIndicator>
130
- </span>
118
+ <SelectPrimitive.Item
119
+ className={cn(
120
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-2 pl-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
121
+ className,
122
+ )}
123
+ ref={ref}
124
+ {...props}
125
+ >
126
+ <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
127
+ <SelectPrimitive.ItemIndicator>
128
+ <Check className="h-4 w-4" />
129
+ </SelectPrimitive.ItemIndicator>
130
+ </span>
131
131
 
132
- <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
133
- </SelectPrimitive.Item>
132
+ <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
133
+ </SelectPrimitive.Item>
134
134
  ));
135
135
  SelectItem.displayName = SelectPrimitive.Item.displayName;
136
136
 
137
137
  const SelectSeparator = React.forwardRef<
138
- React.ElementRef<typeof SelectPrimitive.Separator>,
139
- React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
138
+ React.ElementRef<typeof SelectPrimitive.Separator>,
139
+ React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
140
140
  >(({ className, ...props }, ref) => (
141
- <SelectPrimitive.Separator
142
- className={cn("-mx-1 my-1 h-px bg-muted", className)}
143
- ref={ref}
144
- {...props}
145
- />
141
+ <SelectPrimitive.Separator
142
+ className={cn("-mx-1 my-1 h-px bg-muted", className)}
143
+ ref={ref}
144
+ {...props}
145
+ />
146
146
  ));
147
147
  SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
148
148
 
149
149
  export {
150
- Select,
151
- SelectGroup,
152
- SelectValue,
153
- SelectTrigger,
154
- SelectContent,
155
- SelectLabel,
156
- SelectItem,
157
- SelectSeparator,
158
- SelectScrollUpButton,
159
- SelectScrollDownButton,
150
+ Select,
151
+ SelectContent,
152
+ SelectGroup,
153
+ SelectItem,
154
+ SelectLabel,
155
+ SelectScrollDownButton,
156
+ SelectScrollUpButton,
157
+ SelectSeparator,
158
+ SelectTrigger,
159
+ SelectValue,
160
160
  };
@@ -6,23 +6,23 @@ import type * as React from "react";
6
6
  import { cn } from "@/lib/utils";
7
7
 
8
8
  function Separator({
9
- className,
10
- orientation = "horizontal",
11
- decorative = true,
12
- ...props
9
+ className,
10
+ orientation = "horizontal",
11
+ decorative = true,
12
+ ...props
13
13
  }: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
14
- return (
15
- <SeparatorPrimitive.Root
16
- className={cn(
17
- "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",
18
- className
19
- )}
20
- data-slot="separator"
21
- decorative={decorative}
22
- orientation={orientation}
23
- {...props}
24
- />
25
- );
14
+ return (
15
+ <SeparatorPrimitive.Root
16
+ className={cn(
17
+ "shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=vertical]:h-full data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",
18
+ className,
19
+ )}
20
+ data-slot="separator"
21
+ decorative={decorative}
22
+ orientation={orientation}
23
+ {...props}
24
+ />
25
+ );
26
26
  }
27
27
 
28
28
  export { Separator };
@@ -7,133 +7,133 @@ import type * as React from "react";
7
7
  import { cn } from "@/lib/utils";
8
8
 
9
9
  function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {
10
- return <SheetPrimitive.Root data-slot="sheet" {...props} />;
10
+ return <SheetPrimitive.Root data-slot="sheet" {...props} />;
11
11
  }
12
12
 
13
13
  function SheetTrigger({
14
- ...props
14
+ ...props
15
15
  }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {
16
- return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
16
+ return <SheetPrimitive.Trigger data-slot="sheet-trigger" {...props} />;
17
17
  }
18
18
 
19
19
  function SheetClose({
20
- ...props
20
+ ...props
21
21
  }: React.ComponentProps<typeof SheetPrimitive.Close>) {
22
- return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
22
+ return <SheetPrimitive.Close data-slot="sheet-close" {...props} />;
23
23
  }
24
24
 
25
25
  function SheetPortal({
26
- ...props
26
+ ...props
27
27
  }: React.ComponentProps<typeof SheetPrimitive.Portal>) {
28
- return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
28
+ return <SheetPrimitive.Portal data-slot="sheet-portal" {...props} />;
29
29
  }
30
30
 
31
31
  function SheetOverlay({
32
- className,
33
- ...props
32
+ className,
33
+ ...props
34
34
  }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {
35
- return (
36
- <SheetPrimitive.Overlay
37
- className={cn(
38
- "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",
39
- className
40
- )}
41
- data-slot="sheet-overlay"
42
- {...props}
43
- />
44
- );
35
+ return (
36
+ <SheetPrimitive.Overlay
37
+ className={cn(
38
+ "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in",
39
+ className,
40
+ )}
41
+ data-slot="sheet-overlay"
42
+ {...props}
43
+ />
44
+ );
45
45
  }
46
46
 
47
47
  function SheetContent({
48
- className,
49
- children,
50
- side = "right",
51
- ...props
48
+ className,
49
+ children,
50
+ side = "right",
51
+ ...props
52
52
  }: React.ComponentProps<typeof SheetPrimitive.Content> & {
53
- side?: "top" | "right" | "bottom" | "left";
53
+ side?: "top" | "right" | "bottom" | "left";
54
54
  }) {
55
- return (
56
- <SheetPortal>
57
- <SheetOverlay />
58
- <SheetPrimitive.Content
59
- className={cn(
60
- "fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500",
61
- side === "right" &&
62
- "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
63
- side === "left" &&
64
- "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
65
- side === "top" &&
66
- "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
67
- side === "bottom" &&
68
- "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
69
- className
70
- )}
71
- data-slot="sheet-content"
72
- {...props}
73
- >
74
- {children}
75
- <SheetPrimitive.Close className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
76
- <XIcon className="size-4" />
77
- <span className="sr-only">Close</span>
78
- </SheetPrimitive.Close>
79
- </SheetPrimitive.Content>
80
- </SheetPortal>
81
- );
55
+ return (
56
+ <SheetPortal>
57
+ <SheetOverlay />
58
+ <SheetPrimitive.Content
59
+ className={cn(
60
+ "fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:duration-300 data-[state=open]:duration-500",
61
+ side === "right" &&
62
+ "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
63
+ side === "left" &&
64
+ "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
65
+ side === "top" &&
66
+ "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
67
+ side === "bottom" &&
68
+ "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
69
+ className,
70
+ )}
71
+ data-slot="sheet-content"
72
+ {...props}
73
+ >
74
+ {children}
75
+ <SheetPrimitive.Close className="absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary">
76
+ <XIcon className="size-4" />
77
+ <span className="sr-only">Close</span>
78
+ </SheetPrimitive.Close>
79
+ </SheetPrimitive.Content>
80
+ </SheetPortal>
81
+ );
82
82
  }
83
83
 
84
84
  function SheetHeader({ className, ...props }: React.ComponentProps<"div">) {
85
- return (
86
- <div
87
- className={cn("flex flex-col gap-1.5 p-4", className)}
88
- data-slot="sheet-header"
89
- {...props}
90
- />
91
- );
85
+ return (
86
+ <div
87
+ className={cn("flex flex-col gap-1.5 p-4", className)}
88
+ data-slot="sheet-header"
89
+ {...props}
90
+ />
91
+ );
92
92
  }
93
93
 
94
94
  function SheetFooter({ className, ...props }: React.ComponentProps<"div">) {
95
- return (
96
- <div
97
- className={cn("mt-auto flex flex-col gap-2 p-4", className)}
98
- data-slot="sheet-footer"
99
- {...props}
100
- />
101
- );
95
+ return (
96
+ <div
97
+ className={cn("mt-auto flex flex-col gap-2 p-4", className)}
98
+ data-slot="sheet-footer"
99
+ {...props}
100
+ />
101
+ );
102
102
  }
103
103
 
104
104
  function SheetTitle({
105
- className,
106
- ...props
105
+ className,
106
+ ...props
107
107
  }: React.ComponentProps<typeof SheetPrimitive.Title>) {
108
- return (
109
- <SheetPrimitive.Title
110
- className={cn("font-semibold text-foreground", className)}
111
- data-slot="sheet-title"
112
- {...props}
113
- />
114
- );
108
+ return (
109
+ <SheetPrimitive.Title
110
+ className={cn("font-semibold text-foreground", className)}
111
+ data-slot="sheet-title"
112
+ {...props}
113
+ />
114
+ );
115
115
  }
116
116
 
117
117
  function SheetDescription({
118
- className,
119
- ...props
118
+ className,
119
+ ...props
120
120
  }: React.ComponentProps<typeof SheetPrimitive.Description>) {
121
- return (
122
- <SheetPrimitive.Description
123
- className={cn("text-muted-foreground text-sm", className)}
124
- data-slot="sheet-description"
125
- {...props}
126
- />
127
- );
121
+ return (
122
+ <SheetPrimitive.Description
123
+ className={cn("text-muted-foreground text-sm", className)}
124
+ data-slot="sheet-description"
125
+ {...props}
126
+ />
127
+ );
128
128
  }
129
129
 
130
130
  export {
131
- Sheet,
132
- SheetTrigger,
133
- SheetClose,
134
- SheetContent,
135
- SheetHeader,
136
- SheetFooter,
137
- SheetTitle,
138
- SheetDescription,
131
+ Sheet,
132
+ SheetClose,
133
+ SheetContent,
134
+ SheetDescription,
135
+ SheetFooter,
136
+ SheetHeader,
137
+ SheetTitle,
138
+ SheetTrigger,
139
139
  };