@gperezmz/bb-plugin-thread-glance 0.1.2

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 (98) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +20 -0
  3. package/THIRD_PARTY_NOTICES.md +230 -0
  4. package/app.tsx +12 -0
  5. package/components/ui/alert-dialog.tsx +142 -0
  6. package/components/ui/button.tsx +59 -0
  7. package/components/ui/card.tsx +83 -0
  8. package/components/ui/coarse-pointer-sizing.ts +66 -0
  9. package/components/ui/context-menu.tsx +355 -0
  10. package/components/ui/dialog.tsx +416 -0
  11. package/components/ui/dropdown-menu.tsx +640 -0
  12. package/components/ui/hooks/use-compact-viewport.tsx +37 -0
  13. package/components/ui/hooks/use-media-query.ts +70 -0
  14. package/components/ui/hooks/use-pointer-coarse.ts +7 -0
  15. package/components/ui/hover-card.tsx +36 -0
  16. package/components/ui/icon-extended.tsx +333 -0
  17. package/components/ui/icon-registry.ts +189 -0
  18. package/components/ui/icon.tsx +444 -0
  19. package/components/ui/input.tsx +30 -0
  20. package/components/ui/menu-item-hover.tsx +93 -0
  21. package/components/ui/motion.ts +4 -0
  22. package/components/ui/overlay-trigger.ts +84 -0
  23. package/components/ui/popover.tsx +223 -0
  24. package/components/ui/responsive-overlay.tsx +823 -0
  25. package/components/ui/tooltip.tsx +63 -0
  26. package/dist/app.css +2 -0
  27. package/dist/app.js +66 -0
  28. package/dist/app.meta.json +11 -0
  29. package/dist/server.js +71 -0
  30. package/dist/server.js.map +6 -0
  31. package/dist/server.meta.json +11 -0
  32. package/features/thread-list/components/Dialogs.tsx +299 -0
  33. package/features/thread-list/components/FoldRows.tsx +147 -0
  34. package/features/thread-list/components/GroupSection.tsx +370 -0
  35. package/features/thread-list/components/ProviderBadge.tsx +57 -0
  36. package/features/thread-list/components/PullRequestBadge.tsx +50 -0
  37. package/features/thread-list/components/Rails.tsx +28 -0
  38. package/features/thread-list/components/RenameEditor.tsx +118 -0
  39. package/features/thread-list/components/RowMenu.tsx +168 -0
  40. package/features/thread-list/components/SplitMiniMap.tsx +55 -0
  41. package/features/thread-list/components/ThreadDetails.tsx +138 -0
  42. package/features/thread-list/components/ThreadList.tsx +855 -0
  43. package/features/thread-list/components/ThreadRowView.tsx +631 -0
  44. package/features/thread-list/components/Toolbar.tsx +296 -0
  45. package/features/thread-list/components/controller.ts +64 -0
  46. package/features/thread-list/components/glyphs.tsx +129 -0
  47. package/features/thread-list/components/row-card.ts +127 -0
  48. package/features/thread-list/data/storage.ts +18 -0
  49. package/features/thread-list/data/useAutoExpand.ts +53 -0
  50. package/features/thread-list/data/useClientPreferences.ts +20 -0
  51. package/features/thread-list/data/useNotes.ts +41 -0
  52. package/features/thread-list/data/useNow.ts +19 -0
  53. package/features/thread-list/data/usePreferences.ts +126 -0
  54. package/features/thread-list/data/useScheduled.ts +43 -0
  55. package/features/thread-list/data/useStamps.ts +68 -0
  56. package/features/thread-list/icons.ts +44 -0
  57. package/features/thread-list/index.ts +2 -0
  58. package/features/thread-list/model/attention.ts +89 -0
  59. package/features/thread-list/model/counters.ts +67 -0
  60. package/features/thread-list/model/details.ts +79 -0
  61. package/features/thread-list/model/drag.ts +104 -0
  62. package/features/thread-list/model/expansion.ts +71 -0
  63. package/features/thread-list/model/families.ts +297 -0
  64. package/features/thread-list/model/groups.ts +263 -0
  65. package/features/thread-list/model/labels.ts +50 -0
  66. package/features/thread-list/model/layout.ts +61 -0
  67. package/features/thread-list/model/menu.ts +78 -0
  68. package/features/thread-list/model/move.ts +46 -0
  69. package/features/thread-list/model/notes.ts +52 -0
  70. package/features/thread-list/model/provider-mark.ts +59 -0
  71. package/features/thread-list/model/share.ts +101 -0
  72. package/features/thread-list/model/sort.ts +78 -0
  73. package/features/thread-list/model/state.ts +330 -0
  74. package/features/thread-list/model/time.ts +107 -0
  75. package/features/thread-list/model/toggles.ts +99 -0
  76. package/features/thread-list/model/view.ts +669 -0
  77. package/features/thread-list/model/windowing.ts +27 -0
  78. package/features/thread-list/testing/fixtures.ts +162 -0
  79. package/hooks/useBrowserDimmingModal.ts +5 -0
  80. package/lib/portal-scope.ts +15 -0
  81. package/lib/utils.ts +17 -0
  82. package/package.json +96 -0
  83. package/server/cli.ts +107 -0
  84. package/server/failures.ts +136 -0
  85. package/server/import.ts +144 -0
  86. package/server/notes.ts +236 -0
  87. package/server/preference-store.ts +96 -0
  88. package/server/scheduled.ts +129 -0
  89. package/server/serial.ts +12 -0
  90. package/server/stamps.ts +142 -0
  91. package/server/startup.ts +121 -0
  92. package/server.ts +126 -0
  93. package/shared/contract.ts +73 -0
  94. package/shared/preferences.ts +241 -0
  95. package/shared/signals.ts +71 -0
  96. package/skills/thread-glance/SKILL.md +69 -0
  97. package/tsconfig.json +36 -0
  98. package/types/global-jsx.d.ts +10 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Guillermo Pérez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # Thread Glance
2
+
3
+ A sidebar thread list for [bb](https://getbb.app). It keeps everything bb's own list does, and shows at a glance each thread's state, the harness that runs it, and what its child threads are doing, without the child threads taking over the list. A **Needs attention** filter keeps only what you alone can move forward.
4
+
5
+ ```sh
6
+ bb plugin install git:https://github.com/gperezmz/bb-plugins.git@main --plugin thread-glance
7
+ ```
8
+
9
+ Then choose **Thread Glance** under Settings → Appearance → Sidebar.
10
+
11
+ - [First run](../../docs/tutorials/thread-glance-first-run.md)
12
+ - [Switch the sidebar between Thread Glance and bb's list](../../docs/how-to/thread-glance-switch-sidebar.md)
13
+ - [States and glyphs](../../docs/reference/thread-glance-states.md)
14
+ - [Preferences and `bb thread-glance prefs`](../../docs/reference/thread-glance-preferences.md)
15
+ - [What "needs attention" means](../../docs/explanation/thread-glance-attention.md)
16
+ - [Develop](../../docs/how-to/develop-plugins.md)
17
+
18
+ ## Licence
19
+
20
+ MIT, see [`LICENSE`](LICENSE). Bundled third-party code is listed in [`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md).
@@ -0,0 +1,230 @@
1
+ # Third-party notices
2
+
3
+ Thread Glance's built bundles (`dist/app.js`, `dist/server.js`) include the packages below. Packages bb provides at runtime (React, the Radix overlay families, sonner, vaul, clsx, tailwind-merge, class-variance-authority, the bb plugin SDK) are not bundled and are not listed.
4
+
5
+ This file is generated by `npm run notices` (`scripts/third-party-notices.mjs`).
6
+
7
+ | Package | Version | Licence | Bundle | Copyright |
8
+ |---|---|---|---|---|
9
+ | @dnd-kit/accessibility | 3.1.1 | MIT | app | Copyright (c) 2021, Claudéric Demers |
10
+ | @dnd-kit/core | 6.3.1 | MIT | app | Copyright (c) 2021, Claudéric Demers |
11
+ | @dnd-kit/utilities | 3.2.2 | MIT | app | Copyright (c) 2021, Claudéric Demers |
12
+ | @hugeicons/core-free-icons | 4.3.5 | MIT | app | Copyright (c) 2025 Hugeicons |
13
+ | @hugeicons/react | 1.1.10 | MIT | app | Copyright (c) 2025 Hugeicons |
14
+ | @radix-ui/react-compose-refs | 1.1.5 | MIT | app | Copyright (c) 2022 WorkOS |
15
+ | @radix-ui/react-slot | 1.3.3 | MIT | app | Copyright (c) 2022 WorkOS |
16
+ | zod | 4.6.5 | MIT | app, server | Copyright (c) 2025 Colin McDonnell |
17
+
18
+ ## Vendored source
19
+
20
+ `components/ui/`, `lib/utils.ts`, `lib/portal-scope.ts` and `hooks/useBrowserDimmingModal.ts` were copied, as `bb plugin new` and `npx shadcn add` do, from bb's component registry (`packages/plugin-registry` in the `get-bb/bb` repository, pinned to the `desktop-v0.43.4` tag in `components.json`). The registry generates them from bb's own components, which follow shadcn/ui (MIT, Copyright (c) 2023 shadcn). The installed bb 0.43.4 packages state no licence of their own for this source.
21
+
22
+ ## Licence texts
23
+
24
+ ### @dnd-kit/accessibility 3.1.1
25
+
26
+ ```text
27
+ MIT License
28
+
29
+ Copyright (c) 2021, Claudéric Demers
30
+
31
+ Permission is hereby granted, free of charge, to any person obtaining a copy
32
+ of this software and associated documentation files (the "Software"), to deal
33
+ in the Software without restriction, including without limitation the rights
34
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35
+ copies of the Software, and to permit persons to whom the Software is
36
+ furnished to do so, subject to the following conditions:
37
+
38
+ The above copyright notice and this permission notice shall be included in all
39
+ copies or substantial portions of the Software.
40
+
41
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
47
+ SOFTWARE.
48
+ ```
49
+
50
+ ### @dnd-kit/core 6.3.1
51
+
52
+ ```text
53
+ MIT License
54
+
55
+ Copyright (c) 2021, Claudéric Demers
56
+
57
+ Permission is hereby granted, free of charge, to any person obtaining a copy
58
+ of this software and associated documentation files (the "Software"), to deal
59
+ in the Software without restriction, including without limitation the rights
60
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
61
+ copies of the Software, and to permit persons to whom the Software is
62
+ furnished to do so, subject to the following conditions:
63
+
64
+ The above copyright notice and this permission notice shall be included in all
65
+ copies or substantial portions of the Software.
66
+
67
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
68
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
69
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
70
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
71
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
72
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
73
+ SOFTWARE.
74
+ ```
75
+
76
+ ### @dnd-kit/utilities 3.2.2
77
+
78
+ ```text
79
+ MIT License
80
+
81
+ Copyright (c) 2021, Claudéric Demers
82
+
83
+ Permission is hereby granted, free of charge, to any person obtaining a copy
84
+ of this software and associated documentation files (the "Software"), to deal
85
+ in the Software without restriction, including without limitation the rights
86
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
87
+ copies of the Software, and to permit persons to whom the Software is
88
+ furnished to do so, subject to the following conditions:
89
+
90
+ The above copyright notice and this permission notice shall be included in all
91
+ copies or substantial portions of the Software.
92
+
93
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
94
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
95
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
96
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
97
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
98
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
99
+ SOFTWARE.
100
+ ```
101
+
102
+ ### @hugeicons/core-free-icons 4.3.5
103
+
104
+ ```text
105
+ MIT License
106
+
107
+ Copyright (c) 2025 Hugeicons
108
+
109
+ Permission is hereby granted, free of charge, to any person obtaining a copy
110
+ of this software and associated documentation files (the "Software"), to deal
111
+ in the Software without restriction, including without limitation the rights
112
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
113
+ copies of the Software, and to permit persons to whom the Software is
114
+ furnished to do so, subject to the following conditions:
115
+
116
+ The above copyright notice and this permission notice shall be included in all
117
+ copies or substantial portions of the Software.
118
+
119
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
120
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
121
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
122
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
123
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
124
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
125
+ SOFTWARE.
126
+ ```
127
+
128
+ ### @hugeicons/react 1.1.10
129
+
130
+ ```text
131
+ MIT License
132
+
133
+ Copyright (c) 2025 Hugeicons
134
+
135
+ Permission is hereby granted, free of charge, to any person obtaining a copy
136
+ of this software and associated documentation files (the "Software"), to deal
137
+ in the Software without restriction, including without limitation the rights
138
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
139
+ copies of the Software, and to permit persons to whom the Software is
140
+ furnished to do so, subject to the following conditions:
141
+
142
+ The above copyright notice and this permission notice shall be included in all
143
+ copies or substantial portions of the Software.
144
+
145
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
146
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
147
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
148
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
149
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
150
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
151
+ SOFTWARE.
152
+ ```
153
+
154
+ ### @radix-ui/react-compose-refs 1.1.5
155
+
156
+ ```text
157
+ MIT License
158
+
159
+ Copyright (c) 2022 WorkOS
160
+
161
+ Permission is hereby granted, free of charge, to any person obtaining a copy
162
+ of this software and associated documentation files (the "Software"), to deal
163
+ in the Software without restriction, including without limitation the rights
164
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
165
+ copies of the Software, and to permit persons to whom the Software is
166
+ furnished to do so, subject to the following conditions:
167
+
168
+ The above copyright notice and this permission notice shall be included in all
169
+ copies or substantial portions of the Software.
170
+
171
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
172
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
173
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
174
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
175
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
176
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
177
+ SOFTWARE.
178
+ ```
179
+
180
+ ### @radix-ui/react-slot 1.3.3
181
+
182
+ ```text
183
+ MIT License
184
+
185
+ Copyright (c) 2022 WorkOS
186
+
187
+ Permission is hereby granted, free of charge, to any person obtaining a copy
188
+ of this software and associated documentation files (the "Software"), to deal
189
+ in the Software without restriction, including without limitation the rights
190
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
191
+ copies of the Software, and to permit persons to whom the Software is
192
+ furnished to do so, subject to the following conditions:
193
+
194
+ The above copyright notice and this permission notice shall be included in all
195
+ copies or substantial portions of the Software.
196
+
197
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
198
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
199
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
200
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
201
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
202
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
203
+ SOFTWARE.
204
+ ```
205
+
206
+ ### zod 4.6.5
207
+
208
+ ```text
209
+ MIT License
210
+
211
+ Copyright (c) 2025 Colin McDonnell
212
+
213
+ Permission is hereby granted, free of charge, to any person obtaining a copy
214
+ of this software and associated documentation files (the "Software"), to deal
215
+ in the Software without restriction, including without limitation the rights
216
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
217
+ copies of the Software, and to permit persons to whom the Software is
218
+ furnished to do so, subject to the following conditions:
219
+
220
+ The above copyright notice and this permission notice shall be included in all
221
+ copies or substantial portions of the Software.
222
+
223
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
224
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
225
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
226
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
227
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
228
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
229
+ SOFTWARE.
230
+ ```
package/app.tsx ADDED
@@ -0,0 +1,12 @@
1
+ // Thread Glance frontend entry: registers the sidebar thread list.
2
+ import { definePluginApp } from "@get-bb/plugin-sdk/app";
3
+ import { ThreadList } from "@/features/thread-list";
4
+
5
+ export default definePluginApp((app) => {
6
+ app.slots.experimental_threadList({
7
+ id: "thread-glance",
8
+ title: "Thread Glance",
9
+ description: "Every thread's state, harness and child threads at a glance.",
10
+ component: ThreadList,
11
+ });
12
+ });
@@ -0,0 +1,142 @@
1
+ import * as React from "react";
2
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
+
4
+ import { cn } from "../../lib/utils";
5
+ import { usePortalScopeProps } from "../../lib/portal-scope";
6
+ import { buttonVariants } from "../../components/ui/button";
7
+
8
+ const AlertDialog = AlertDialogPrimitive.Root;
9
+
10
+ const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
11
+
12
+ const AlertDialogPortal = AlertDialogPrimitive.Portal;
13
+
14
+ const AlertDialogOverlay = React.forwardRef<
15
+ React.ElementRef<typeof AlertDialogPrimitive.Overlay>,
16
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>
17
+ >(({ className, ...props }, ref) => (
18
+ <AlertDialogPrimitive.Overlay
19
+ className={cn(
20
+ "fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
21
+ className,
22
+ )}
23
+ {...props}
24
+ ref={ref}
25
+ {...usePortalScopeProps()}
26
+ />
27
+ ));
28
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
29
+
30
+ const AlertDialogContent = React.forwardRef<
31
+ React.ElementRef<typeof AlertDialogPrimitive.Content>,
32
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>
33
+ >(({ className, ...props }, ref) => (
34
+ <AlertDialogPortal>
35
+ <AlertDialogOverlay />
36
+ <AlertDialogPrimitive.Content
37
+ ref={ref}
38
+ {...usePortalScopeProps()}
39
+ className={cn(
40
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
41
+ className,
42
+ )}
43
+ {...props}
44
+ />
45
+ </AlertDialogPortal>
46
+ ));
47
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
48
+
49
+ const AlertDialogHeader = ({
50
+ className,
51
+ ...props
52
+ }: React.HTMLAttributes<HTMLDivElement>) => (
53
+ <div
54
+ className={cn(
55
+ "flex flex-col space-y-2 text-center sm:text-left",
56
+ className,
57
+ )}
58
+ {...props}
59
+ />
60
+ );
61
+ AlertDialogHeader.displayName = "AlertDialogHeader";
62
+
63
+ const AlertDialogFooter = ({
64
+ className,
65
+ ...props
66
+ }: React.HTMLAttributes<HTMLDivElement>) => (
67
+ <div
68
+ className={cn(
69
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
70
+ className,
71
+ )}
72
+ {...props}
73
+ />
74
+ );
75
+ AlertDialogFooter.displayName = "AlertDialogFooter";
76
+
77
+ const AlertDialogTitle = React.forwardRef<
78
+ React.ElementRef<typeof AlertDialogPrimitive.Title>,
79
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
80
+ >(({ className, ...props }, ref) => (
81
+ <AlertDialogPrimitive.Title
82
+ ref={ref}
83
+ className={cn("text-lg font-semibold", className)}
84
+ {...props}
85
+ />
86
+ ));
87
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
88
+
89
+ const AlertDialogDescription = React.forwardRef<
90
+ React.ElementRef<typeof AlertDialogPrimitive.Description>,
91
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>
92
+ >(({ className, ...props }, ref) => (
93
+ <AlertDialogPrimitive.Description
94
+ ref={ref}
95
+ className={cn("text-sm text-muted-foreground", className)}
96
+ {...props}
97
+ />
98
+ ));
99
+ AlertDialogDescription.displayName =
100
+ AlertDialogPrimitive.Description.displayName;
101
+
102
+ const AlertDialogAction = React.forwardRef<
103
+ React.ElementRef<typeof AlertDialogPrimitive.Action>,
104
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
105
+ >(({ className, ...props }, ref) => (
106
+ <AlertDialogPrimitive.Action
107
+ ref={ref}
108
+ className={cn(buttonVariants(), className)}
109
+ {...props}
110
+ />
111
+ ));
112
+ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
113
+
114
+ const AlertDialogCancel = React.forwardRef<
115
+ React.ElementRef<typeof AlertDialogPrimitive.Cancel>,
116
+ React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>
117
+ >(({ className, ...props }, ref) => (
118
+ <AlertDialogPrimitive.Cancel
119
+ ref={ref}
120
+ className={cn(
121
+ buttonVariants({ variant: "outline" }),
122
+ "mt-2 sm:mt-0",
123
+ className,
124
+ )}
125
+ {...props}
126
+ />
127
+ ));
128
+ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
129
+
130
+ export {
131
+ AlertDialog,
132
+ AlertDialogPortal,
133
+ AlertDialogOverlay,
134
+ AlertDialogTrigger,
135
+ AlertDialogContent,
136
+ AlertDialogHeader,
137
+ AlertDialogFooter,
138
+ AlertDialogTitle,
139
+ AlertDialogDescription,
140
+ AlertDialogAction,
141
+ AlertDialogCancel,
142
+ };
@@ -0,0 +1,59 @@
1
+ import * as React from "react";
2
+ import { Slot } from "@radix-ui/react-slot";
3
+ import { cva, type VariantProps } from "class-variance-authority";
4
+
5
+ import { cn } from "../../lib/utils";
6
+ import { CONTROL_HOVER_TRANSITION } from "./motion.js";
7
+
8
+ const buttonVariants = cva(
9
+ `inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ${CONTROL_HOVER_TRANSITION} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0`,
10
+ {
11
+ variants: {
12
+ variant: {
13
+ default: "bg-foreground text-background hover:bg-foreground/90",
14
+ destructive:
15
+ "bg-destructive text-destructive-foreground hover:bg-destructive/90",
16
+ outline:
17
+ "border border-input bg-transparent hover:bg-state-hover hover:text-foreground",
18
+ secondary:
19
+ "bg-secondary text-secondary-foreground hover:bg-secondary/80",
20
+ ghost:
21
+ "hover:bg-state-hover hover:text-foreground aria-pressed:bg-state-active aria-pressed:text-foreground aria-pressed:hover:bg-state-active data-[state=open]:bg-state-active data-[state=open]:text-foreground data-[state=open]:hover:bg-state-active",
22
+ link: "text-primary underline-offset-4 hover:underline",
23
+ },
24
+ size: {
25
+ default: "h-9 px-4 py-2",
26
+ sm: "h-8 rounded-md px-3 text-xs",
27
+ lg: "h-10 rounded-md px-8",
28
+ icon: "h-9 w-9",
29
+ },
30
+ },
31
+ defaultVariants: {
32
+ variant: "default",
33
+ size: "default",
34
+ },
35
+ },
36
+ );
37
+
38
+ export interface ButtonProps
39
+ extends
40
+ Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "title">,
41
+ VariantProps<typeof buttonVariants> {
42
+ asChild?: boolean;
43
+ }
44
+
45
+ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
46
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
47
+ const Comp = asChild ? Slot : "button";
48
+ return (
49
+ <Comp
50
+ className={cn(buttonVariants({ variant, size, className }))}
51
+ ref={ref}
52
+ {...props}
53
+ />
54
+ );
55
+ },
56
+ );
57
+ Button.displayName = "Button";
58
+
59
+ export { Button, buttonVariants };
@@ -0,0 +1,83 @@
1
+ import * as React from "react";
2
+
3
+ import { cn } from "../../lib/utils";
4
+
5
+ const Card = React.forwardRef<
6
+ HTMLDivElement,
7
+ React.HTMLAttributes<HTMLDivElement>
8
+ >(({ className, ...props }, ref) => (
9
+ <div
10
+ ref={ref}
11
+ className={cn(
12
+ "rounded-lg border border-border bg-card text-card-foreground",
13
+ className,
14
+ )}
15
+ {...props}
16
+ />
17
+ ));
18
+ Card.displayName = "Card";
19
+
20
+ const CardHeader = React.forwardRef<
21
+ HTMLDivElement,
22
+ React.HTMLAttributes<HTMLDivElement>
23
+ >(({ className, ...props }, ref) => (
24
+ <div
25
+ ref={ref}
26
+ className={cn("flex flex-col space-y-1.5 p-6", className)}
27
+ {...props}
28
+ />
29
+ ));
30
+ CardHeader.displayName = "CardHeader";
31
+
32
+ const CardTitle = React.forwardRef<
33
+ HTMLDivElement,
34
+ React.HTMLAttributes<HTMLDivElement>
35
+ >(({ className, ...props }, ref) => (
36
+ <div
37
+ ref={ref}
38
+ className={cn("font-semibold leading-none tracking-tight", className)}
39
+ {...props}
40
+ />
41
+ ));
42
+ CardTitle.displayName = "CardTitle";
43
+
44
+ const CardDescription = React.forwardRef<
45
+ HTMLDivElement,
46
+ React.HTMLAttributes<HTMLDivElement>
47
+ >(({ className, ...props }, ref) => (
48
+ <div
49
+ ref={ref}
50
+ className={cn("text-sm text-muted-foreground", className)}
51
+ {...props}
52
+ />
53
+ ));
54
+ CardDescription.displayName = "CardDescription";
55
+
56
+ const CardContent = React.forwardRef<
57
+ HTMLDivElement,
58
+ React.HTMLAttributes<HTMLDivElement>
59
+ >(({ className, ...props }, ref) => (
60
+ <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
61
+ ));
62
+ CardContent.displayName = "CardContent";
63
+
64
+ const CardFooter = React.forwardRef<
65
+ HTMLDivElement,
66
+ React.HTMLAttributes<HTMLDivElement>
67
+ >(({ className, ...props }, ref) => (
68
+ <div
69
+ ref={ref}
70
+ className={cn("flex items-center p-6 pt-0", className)}
71
+ {...props}
72
+ />
73
+ ));
74
+ CardFooter.displayName = "CardFooter";
75
+
76
+ export {
77
+ Card,
78
+ CardHeader,
79
+ CardFooter,
80
+ CardTitle,
81
+ CardDescription,
82
+ CardContent,
83
+ };
@@ -0,0 +1,66 @@
1
+ export const COARSE_POINTER_TEXT_BASE_CLASS =
2
+ "text-sm max-md:pointer-coarse:text-base";
3
+
4
+ export const COARSE_POINTER_TEXT_SM_CLASS =
5
+ "text-xs max-md:pointer-coarse:text-sm";
6
+
7
+ export const COARSE_POINTER_ICON_SIZE_CLASS =
8
+ "size-4 max-md:pointer-coarse:size-5";
9
+
10
+ export const COARSE_POINTER_ICON_SIZE_SHRINK_CLASS =
11
+ "size-4 shrink-0 max-md:pointer-coarse:size-5";
12
+
13
+ export const COARSE_POINTER_COMPACT_ICON_SIZE_CLASS =
14
+ "size-3.5 max-md:pointer-coarse:size-5";
15
+
16
+ export const COARSE_POINTER_COMPACT_ICON_SIZE_SHRINK_CLASS =
17
+ "size-3.5 shrink-0 max-md:pointer-coarse:size-5";
18
+
19
+ export const COARSE_POINTER_DOT_SIZE_CLASS =
20
+ "size-1.5 max-md:pointer-coarse:size-2";
21
+
22
+ export const COARSE_POINTER_GLYPH_BOX_CLASS =
23
+ "h-4 w-4 max-md:pointer-coarse:h-5 max-md:pointer-coarse:w-5";
24
+
25
+ export const COARSE_POINTER_CHECK_SLOT_CLASS =
26
+ "h-3.5 w-3.5 max-md:pointer-coarse:h-5 max-md:pointer-coarse:w-5";
27
+
28
+ const HEADER_ICON_BUTTON_BOX_CLASS =
29
+ "h-[28px] w-[28px] rounded-md p-0 max-md:pointer-coarse:h-[36px] max-md:pointer-coarse:w-[36px]";
30
+
31
+ export const COARSE_POINTER_HEADER_ICON_BUTTON_CLASS = `${HEADER_ICON_BUTTON_BOX_CLASS} [&_[data-icon-root]]:size-[16px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[20px]`;
32
+
33
+ export const COARSE_POINTER_HEADER_REDUCED_GLYPH_ICON_BUTTON_CLASS = `${HEADER_ICON_BUTTON_BOX_CLASS} [&_[data-icon-root]]:size-[13px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[16px]`;
34
+
35
+ export const COARSE_POINTER_COMPACT_ICON_BUTTON_CLASS =
36
+ "h-7 w-7 rounded-md p-0 [&_[data-icon-root]]:size-3.5 max-md:pointer-coarse:h-9 max-md:pointer-coarse:w-9 max-md:pointer-coarse:[&_[data-icon-root]]:size-5";
37
+
38
+ export const COARSE_POINTER_CHILD_ICON_BUTTON_CLASS =
39
+ "h-8 w-8 justify-center p-0 [&>[data-icon-root]]:size-4 max-md:pointer-coarse:h-9 max-md:pointer-coarse:w-9 max-md:pointer-coarse:[&>[data-icon-root]]:size-5";
40
+
41
+ export const COARSE_POINTER_TOOLBAR_ACTION_BUTTON_CLASS =
42
+ "h-7 rounded-md border-border bg-transparent px-2 text-xs font-medium text-foreground shadow-none hover:bg-state-hover hover:text-foreground max-md:pointer-coarse:h-9";
43
+
44
+ export const COARSE_POINTER_PROMPT_ACTION_BUTTON_CLASS =
45
+ "h-8 px-2 transition-all max-md:pointer-coarse:h-10 max-md:pointer-coarse:px-2.5";
46
+
47
+ export const COARSE_POINTER_PROMPT_ICON_ACTION_BUTTON_CLASS =
48
+ "size-auto h-8 px-2 transition-all max-md:pointer-coarse:h-10 max-md:pointer-coarse:px-2.5";
49
+
50
+ export const COARSE_POINTER_PROMPT_COMBO_BUTTON_CLASS =
51
+ "h-8 w-8 rounded-l-none border-l border-l-primary-foreground/20 px-0 transition-all hover:border-l-primary-foreground/30 max-md:pointer-coarse:h-10 max-md:pointer-coarse:w-10";
52
+
53
+ export const COARSE_POINTER_INPUT_HEIGHT_CLASS =
54
+ "h-9 max-md:pointer-coarse:h-10";
55
+
56
+ export const COARSE_POINTER_COMPACT_ROW_HEIGHT_CLASS =
57
+ "h-7 max-md:pointer-coarse:h-9";
58
+
59
+ export const COARSE_POINTER_ROW_HEIGHT_CLASS =
60
+ "h-[var(--bb-sidebar-row-height)] max-md:pointer-coarse:h-[var(--bb-sidebar-row-height-coarse)]";
61
+
62
+ export const COARSE_POINTER_PROVIDER_TAB_SIZE_CLASS =
63
+ "h-7 w-6 max-md:pointer-coarse:h-9 max-md:pointer-coarse:w-9";
64
+
65
+ export const COARSE_POINTER_ROW_ACTION_SIZE_CLASS =
66
+ "h-7 w-7 max-md:pointer-coarse:h-9 max-md:pointer-coarse:w-9";