@blocknote/shadcn 0.24.1 → 0.25.0

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.
@@ -1,28 +1,62 @@
1
- import { jsx as a, jsxs as v, Fragment as me } from "react/jsx-runtime";
2
- import { assertEmpty as c, mergeCSSClasses as ue } from "@blocknote/core";
3
- import { elementOverflow as F, mergeRefs as B, ComponentsContext as pe, BlockNoteViewRaw as fe } from "@blocknote/react";
4
- import * as l from "react";
5
- import { createContext as ge, useContext as he, forwardRef as p, useMemo as k, useRef as L, useEffect as z } from "react";
6
- import { FormProvider as ve, useFormContext as Ne, useForm as xe } from "react-hook-form";
7
- import { cva as T } from "class-variance-authority";
8
- import { clsx as we } from "clsx";
9
- import { extendTailwindMerge as Ce } from "tailwind-merge";
10
- import { Slot as V } from "@radix-ui/react-slot";
11
- import * as h from "@radix-ui/react-dropdown-menu";
12
- import { ChevronRight as E, Check as j, Circle as ye, ChevronDown as $, ChevronUp as Se } from "lucide-react";
1
+ import { jsx as a, jsxs as g, Fragment as he } from "react/jsx-runtime";
2
+ import { assertEmpty as c, mergeCSSClasses as ve } from "@blocknote/core";
3
+ import { elementOverflow as B, mergeRefs as P, useFocusWithin as Ne, FormattingToolbarController as xe, getFormattingToolbarItems as we, FormattingToolbar as Ce, ComponentsContext as ye, BlockNoteViewRaw as Se } from "@blocknote/react";
4
+ import * as b from "react";
5
+ import { createContext as Te, useContext as Ie, forwardRef as p, useMemo as L, useRef as z, useEffect as V, useState as Me } from "react";
6
+ import { FormProvider as De, useFormContext as Re, useForm as ke } from "react-hook-form";
7
+ import * as S from "@radix-ui/react-avatar";
8
+ import { clsx as Fe } from "clsx";
9
+ import { extendTailwindMerge as Be } from "tailwind-merge";
10
+ import { cva as I } from "class-variance-authority";
11
+ import { Slot as E } from "@radix-ui/react-slot";
12
+ import * as N from "@radix-ui/react-dropdown-menu";
13
+ import { ChevronRight as A, Check as $, Circle as Pe, ChevronDown as j, ChevronUp as Le } from "lucide-react";
13
14
  import * as G from "@radix-ui/react-label";
14
15
  import * as M from "@radix-ui/react-popover";
15
- import * as N from "@radix-ui/react-select";
16
- import * as C from "@radix-ui/react-tabs";
16
+ import * as x from "@radix-ui/react-select";
17
+ import * as y from "@radix-ui/react-tabs";
17
18
  import * as U from "@radix-ui/react-toggle";
18
- import * as S from "@radix-ui/react-tooltip";
19
- const Te = Ce({
19
+ import * as T from "@radix-ui/react-tooltip";
20
+ const ze = Be({
20
21
  prefix: "bn-"
21
22
  });
22
- function d(...t) {
23
- return Te(we(t));
23
+ function i(...n) {
24
+ return ze(Fe(n));
24
25
  }
25
- const Me = T(
26
+ const H = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
27
+ S.Root,
28
+ {
29
+ ref: e,
30
+ className: i(
31
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
32
+ n
33
+ ),
34
+ ...t
35
+ }
36
+ ));
37
+ H.displayName = S.Root.displayName;
38
+ const O = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
39
+ S.Image,
40
+ {
41
+ ref: e,
42
+ className: i("aspect-square h-full w-full", n),
43
+ ...t
44
+ }
45
+ ));
46
+ O.displayName = S.Image.displayName;
47
+ const q = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
48
+ S.Fallback,
49
+ {
50
+ ref: e,
51
+ className: i(
52
+ "flex h-full w-full items-center justify-center rounded-full bg-muted",
53
+ n
54
+ ),
55
+ ...t
56
+ }
57
+ ));
58
+ q.displayName = S.Fallback.displayName;
59
+ const Ve = I(
26
60
  "bn-inline-flex bn-items-center bn-rounded-full bn-border bn-px-2.5 bn-py-0.5 bn-text-xs bn-font-semibold bn-transition-colors focus:bn-outline-none focus:bn-ring-2 focus:bn-ring-ring focus:bn-ring-offset-2",
27
61
  {
28
62
  variants: {
@@ -38,10 +72,10 @@ const Me = T(
38
72
  }
39
73
  }
40
74
  );
41
- function Ie({ className: t, variant: n, ...e }) {
42
- return /* @__PURE__ */ a("div", { className: d(Me({ variant: n }), t), ...e });
75
+ function Ee({ className: n, variant: t, ...e }) {
76
+ return /* @__PURE__ */ a("div", { className: i(Ve({ variant: t }), n), ...e });
43
77
  }
44
- const De = T(
78
+ const Ae = I(
45
79
  "bn-inline-flex bn-items-center bn-justify-center bn-whitespace-nowrap bn-rounded-md bn-text-sm bn-font-medium bn-ring-offset-background bn-transition-colors focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-pointer-events-none disabled:bn-opacity-50",
46
80
  {
47
81
  variants: {
@@ -65,450 +99,462 @@ const De = T(
65
99
  size: "default"
66
100
  }
67
101
  }
68
- ), O = l.forwardRef(
69
- ({ className: t, variant: n, size: e, asChild: o = !1, ...r }, s) => /* @__PURE__ */ a(
70
- o ? V : "button",
102
+ ), K = b.forwardRef(
103
+ ({ className: n, variant: t, size: e, asChild: o = !1, ...r }, s) => /* @__PURE__ */ a(
104
+ o ? E : "button",
71
105
  {
72
- className: d(De({ variant: n, size: e, className: t })),
106
+ className: i(Ae({ variant: t, size: e, className: n })),
73
107
  ref: s,
74
108
  type: "button",
75
109
  ...r
76
110
  }
77
111
  )
78
112
  );
79
- O.displayName = "Button";
80
- const H = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
113
+ K.displayName = "Button";
114
+ const W = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
81
115
  "div",
82
116
  {
83
117
  ref: e,
84
- className: d(
118
+ className: i(
85
119
  "bn-rounded-lg bn-border bn-bg-card bn-text-card-foreground bn-shadow-sm",
86
- t
120
+ n
87
121
  ),
88
- ...n
122
+ ...t
89
123
  }
90
124
  ));
91
- H.displayName = "Card";
92
- const Re = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
125
+ W.displayName = "Card";
126
+ const $e = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
93
127
  "div",
94
128
  {
95
129
  ref: e,
96
- className: d("bn-flex bn-flex-col bn-space-y-1.5 bn-p-6", t),
97
- ...n
130
+ className: i("bn-flex bn-flex-col bn-space-y-1.5 bn-p-6", n),
131
+ ...t
98
132
  }
99
133
  ));
100
- Re.displayName = "CardHeader";
101
- const Pe = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
134
+ $e.displayName = "CardHeader";
135
+ const je = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
102
136
  "h3",
103
137
  {
104
138
  ref: e,
105
- className: d(
139
+ className: i(
106
140
  "bn-text-2xl bn-font-semibold bn-leading-none bn-tracking-tight",
107
- t
141
+ n
108
142
  ),
109
- ...n
143
+ ...t
110
144
  }
111
145
  ));
112
- Pe.displayName = "CardTitle";
113
- const Fe = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
146
+ je.displayName = "CardTitle";
147
+ const Ge = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
114
148
  "p",
115
149
  {
116
150
  ref: e,
117
- className: d("bn-text-sm bn-text-muted-foreground", t),
118
- ...n
151
+ className: i("bn-text-sm bn-text-muted-foreground", n),
152
+ ...t
119
153
  }
120
154
  ));
121
- Fe.displayName = "CardDescription";
122
- const K = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a("div", { ref: e, className: d("bn-p-6 bn-pt-0", t), ...n }));
123
- K.displayName = "CardContent";
124
- const Be = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
155
+ Ge.displayName = "CardDescription";
156
+ const _ = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a("div", { ref: e, className: i("bn-p-6 bn-pt-0", n), ...t }));
157
+ _.displayName = "CardContent";
158
+ const Ue = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
125
159
  "div",
126
160
  {
127
161
  ref: e,
128
- className: d("bn-flex bn-items-center bn-p-6 bn-pt-0", t),
129
- ...n
162
+ className: i("bn-flex bn-items-center bn-p-6 bn-pt-0", n),
163
+ ...t
130
164
  }
131
165
  ));
132
- Be.displayName = "CardFooter";
133
- const ke = h.Root, Le = h.Trigger, ze = h.Sub, q = l.forwardRef(({ className: t, inset: n, children: e, ...o }, r) => /* @__PURE__ */ v(
134
- h.SubTrigger,
166
+ Ue.displayName = "CardFooter";
167
+ const He = N.Root, Oe = N.Trigger, qe = N.Sub, J = b.forwardRef(({ className: n, inset: t, children: e, ...o }, r) => /* @__PURE__ */ g(
168
+ N.SubTrigger,
135
169
  {
136
170
  ref: r,
137
- className: d(
171
+ className: i(
138
172
  "bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none focus:bn-bg-accent data-[state=open]:bn-bg-accent",
139
- n && "bn-pl-8",
140
- t
173
+ t && "bn-pl-8",
174
+ n
141
175
  ),
142
176
  ...o,
143
177
  children: [
144
178
  e,
145
- /* @__PURE__ */ a(E, { className: "bn-ml-auto bn-h-4 bn-w-4" })
179
+ /* @__PURE__ */ a(A, { className: "bn-ml-auto bn-h-4 bn-w-4" })
146
180
  ]
147
181
  }
148
182
  ));
149
- q.displayName = h.SubTrigger.displayName;
150
- const W = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
151
- h.SubContent,
183
+ J.displayName = N.SubTrigger.displayName;
184
+ const Q = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
185
+ N.SubContent,
152
186
  {
153
187
  ref: e,
154
- className: d(
188
+ className: i(
155
189
  "bn-z-50 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-lg data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
156
- t
190
+ n
157
191
  ),
158
- ...n
192
+ ...t
159
193
  }
160
194
  ));
161
- W.displayName = h.SubContent.displayName;
162
- const A = l.forwardRef(({ className: t, sideOffset: n = 4, ...e }, o) => (
195
+ Q.displayName = N.SubContent.displayName;
196
+ const X = b.forwardRef(({ className: n, sideOffset: t = 4, ...e }, o) => (
163
197
  // <DropdownMenuPrimitive.Portal>
164
198
  /* @__PURE__ */ a(
165
- h.Content,
199
+ N.Content,
166
200
  {
167
201
  ref: o,
168
- sideOffset: n,
169
- className: d(
202
+ sideOffset: t,
203
+ className: i(
170
204
  "bn-z-50 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
171
- t
205
+ n
172
206
  ),
173
207
  ...e
174
208
  }
175
209
  )
176
210
  ));
177
- A.displayName = h.Content.displayName;
178
- const J = l.forwardRef(({ className: t, inset: n, ...e }, o) => /* @__PURE__ */ a(
179
- h.Item,
211
+ X.displayName = N.Content.displayName;
212
+ const Y = b.forwardRef(({ className: n, inset: t, ...e }, o) => /* @__PURE__ */ a(
213
+ N.Item,
180
214
  {
181
215
  ref: o,
182
- className: d(
216
+ className: i(
183
217
  "bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
184
- n && "bn-pl-8",
185
- t
218
+ t && "bn-pl-8",
219
+ n
186
220
  ),
187
221
  ...e
188
222
  }
189
223
  ));
190
- J.displayName = h.Item.displayName;
191
- const Q = l.forwardRef(({ className: t, children: n, checked: e, ...o }, r) => /* @__PURE__ */ v(
192
- h.CheckboxItem,
224
+ Y.displayName = N.Item.displayName;
225
+ const Z = b.forwardRef(({ className: n, children: t, checked: e, ...o }, r) => /* @__PURE__ */ g(
226
+ N.CheckboxItem,
193
227
  {
194
228
  ref: r,
195
- className: d(
229
+ className: i(
196
230
  "bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
197
- t
231
+ n
198
232
  ),
199
233
  checked: e,
200
234
  ...o,
201
235
  children: [
202
- /* @__PURE__ */ a("span", { className: "bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center", children: /* @__PURE__ */ a(h.ItemIndicator, { children: /* @__PURE__ */ a(j, { className: "bn-h-4 bn-w-4" }) }) }),
203
- n
236
+ /* @__PURE__ */ a("span", { className: "bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center", children: /* @__PURE__ */ a(N.ItemIndicator, { children: /* @__PURE__ */ a($, { className: "bn-h-4 bn-w-4" }) }) }),
237
+ t
204
238
  ]
205
239
  }
206
240
  ));
207
- Q.displayName = h.CheckboxItem.displayName;
208
- const Ve = l.forwardRef(({ className: t, children: n, ...e }, o) => /* @__PURE__ */ v(
209
- h.RadioItem,
241
+ Z.displayName = N.CheckboxItem.displayName;
242
+ const Ke = b.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
243
+ N.RadioItem,
210
244
  {
211
245
  ref: o,
212
- className: d(
246
+ className: i(
213
247
  "bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
214
- t
248
+ n
215
249
  ),
216
250
  ...e,
217
251
  children: [
218
- /* @__PURE__ */ a("span", { className: "bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center", children: /* @__PURE__ */ a(h.ItemIndicator, { children: /* @__PURE__ */ a(ye, { className: "bn-h-2 bn-w-2 bn-fill-current" }) }) }),
219
- n
252
+ /* @__PURE__ */ a("span", { className: "bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center", children: /* @__PURE__ */ a(N.ItemIndicator, { children: /* @__PURE__ */ a(Pe, { className: "bn-h-2 bn-w-2 bn-fill-current" }) }) }),
253
+ t
220
254
  ]
221
255
  }
222
256
  ));
223
- Ve.displayName = h.RadioItem.displayName;
224
- const X = l.forwardRef(({ className: t, inset: n, ...e }, o) => /* @__PURE__ */ a(
225
- h.Label,
257
+ Ke.displayName = N.RadioItem.displayName;
258
+ const ee = b.forwardRef(({ className: n, inset: t, ...e }, o) => /* @__PURE__ */ a(
259
+ N.Label,
226
260
  {
227
261
  ref: o,
228
- className: d(
262
+ className: i(
229
263
  "bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold",
230
- n && "bn-pl-8",
231
- t
264
+ t && "bn-pl-8",
265
+ n
232
266
  ),
233
267
  ...e
234
268
  }
235
269
  ));
236
- X.displayName = h.Label.displayName;
237
- const Y = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
238
- h.Separator,
270
+ ee.displayName = N.Label.displayName;
271
+ const ne = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
272
+ N.Separator,
239
273
  {
240
274
  ref: e,
241
- className: d("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", t),
242
- ...n
275
+ className: i("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", n),
276
+ ...t
243
277
  }
244
278
  ));
245
- Y.displayName = h.Separator.displayName;
246
- const Ee = T(
279
+ ne.displayName = N.Separator.displayName;
280
+ const We = I(
247
281
  "bn-text-sm bn-font-medium bn-leading-none peer-disabled:bn-cursor-not-allowed peer-disabled:bn-opacity-70"
248
- ), P = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
282
+ ), F = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
249
283
  G.Root,
250
284
  {
251
285
  ref: e,
252
- className: d(Ee(), t),
253
- ...n
286
+ className: i(We(), n),
287
+ ...t
254
288
  }
255
289
  ));
256
- P.displayName = G.Root.displayName;
257
- const je = ve, $e = l.createContext(
290
+ F.displayName = G.Root.displayName;
291
+ const _e = De, Je = b.createContext(
258
292
  {}
259
- ), I = () => {
260
- const t = l.useContext($e), n = l.useContext(Z), { getFieldState: e, formState: o } = Ne(), r = e(t.name, o);
261
- if (!t)
293
+ ), D = () => {
294
+ const n = b.useContext(Je), t = b.useContext(te), { getFieldState: e, formState: o } = Re(), r = e(n.name, o);
295
+ if (!n)
262
296
  throw new Error("useFormField should be used within <FormField>");
263
- const { id: s } = n;
297
+ const { id: s } = t;
264
298
  return {
265
299
  id: s,
266
- name: t.name,
300
+ name: n.name,
267
301
  formItemId: `${s}-form-item`,
268
302
  formDescriptionId: `${s}-form-item-description`,
269
303
  formMessageId: `${s}-form-item-message`,
270
304
  ...r
271
305
  };
272
- }, Z = l.createContext(
306
+ }, te = b.createContext(
273
307
  {}
274
- ), Ge = l.forwardRef(({ className: t, ...n }, e) => {
275
- const o = l.useId();
276
- return /* @__PURE__ */ a(Z.Provider, { value: { id: o }, children: /* @__PURE__ */ a("div", { ref: e, className: d("bn-space-y-2", t), ...n }) });
308
+ ), Qe = b.forwardRef(({ className: n, ...t }, e) => {
309
+ const o = b.useId();
310
+ return /* @__PURE__ */ a(te.Provider, { value: { id: o }, children: /* @__PURE__ */ a("div", { ref: e, className: i("bn-space-y-2", n), ...t }) });
277
311
  });
278
- Ge.displayName = "FormItem";
279
- const Ue = l.forwardRef(({ className: t, ...n }, e) => {
280
- const { error: o, formItemId: r } = I();
312
+ Qe.displayName = "FormItem";
313
+ const Xe = b.forwardRef(({ className: n, ...t }, e) => {
314
+ const { error: o, formItemId: r } = D();
281
315
  return /* @__PURE__ */ a(
282
- P,
316
+ F,
283
317
  {
284
318
  ref: e,
285
- className: d(o && "bn-text-destructive", t),
319
+ className: i(o && "bn-text-destructive", n),
286
320
  htmlFor: r,
287
- ...n
321
+ ...t
288
322
  }
289
323
  );
290
324
  });
291
- Ue.displayName = "FormLabel";
292
- const Oe = l.forwardRef(({ ...t }, n) => {
293
- const { error: e, formItemId: o, formDescriptionId: r, formMessageId: s } = I();
325
+ Xe.displayName = "FormLabel";
326
+ const Ye = b.forwardRef(({ ...n }, t) => {
327
+ const { error: e, formItemId: o, formDescriptionId: r, formMessageId: s } = D();
294
328
  return /* @__PURE__ */ a(
295
- V,
329
+ E,
296
330
  {
297
- ref: n,
331
+ ref: t,
298
332
  id: o,
299
333
  "aria-describedby": e ? `${r} ${s}` : `${r}`,
300
334
  "aria-invalid": !!e,
301
- ...t
335
+ ...n
302
336
  }
303
337
  );
304
338
  });
305
- Oe.displayName = "FormControl";
306
- const He = l.forwardRef(({ className: t, ...n }, e) => {
307
- const { formDescriptionId: o } = I();
339
+ Ye.displayName = "FormControl";
340
+ const Ze = b.forwardRef(({ className: n, ...t }, e) => {
341
+ const { formDescriptionId: o } = D();
308
342
  return /* @__PURE__ */ a(
309
343
  "p",
310
344
  {
311
345
  ref: e,
312
346
  id: o,
313
- className: d("bn-text-sm bn-text-muted-foreground", t),
314
- ...n
347
+ className: i("bn-text-sm bn-text-muted-foreground", n),
348
+ ...t
315
349
  }
316
350
  );
317
351
  });
318
- He.displayName = "FormDescription";
319
- const Ke = l.forwardRef(({ className: t, children: n, ...e }, o) => {
320
- const { error: r, formMessageId: s } = I(), i = r ? String(r == null ? void 0 : r.message) : n;
321
- return i ? /* @__PURE__ */ a(
352
+ Ze.displayName = "FormDescription";
353
+ const en = b.forwardRef(({ className: n, children: t, ...e }, o) => {
354
+ const { error: r, formMessageId: s } = D(), d = r ? String(r == null ? void 0 : r.message) : t;
355
+ return d ? /* @__PURE__ */ a(
322
356
  "p",
323
357
  {
324
358
  ref: o,
325
359
  id: s,
326
- className: d("bn-text-sm bn-font-medium bn-text-destructive", t),
360
+ className: i("bn-text-sm bn-font-medium bn-text-destructive", n),
327
361
  ...e,
328
- children: i
362
+ children: d
329
363
  }
330
364
  ) : null;
331
365
  });
332
- Ke.displayName = "FormMessage";
333
- const _ = l.forwardRef(
334
- ({ className: t, type: n, ...e }, o) => /* @__PURE__ */ a(
366
+ en.displayName = "FormMessage";
367
+ const oe = b.forwardRef(
368
+ ({ className: n, type: t, ...e }, o) => /* @__PURE__ */ a(
335
369
  "input",
336
370
  {
337
- type: n,
338
- className: d(
371
+ type: t,
372
+ className: i(
339
373
  "bn-flex bn-h-10 bn-w-full bn-rounded-md bn-border bn-border-input bn-bg-background bn-px-3 bn-py-2 bn-text-sm bn-ring-offset-background file:bn-border-0 file:bn-bg-transparent file:bn-text-sm file:bn-font-medium placeholder:bn-text-muted-foreground focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-cursor-not-allowed disabled:bn-opacity-50",
340
- t
374
+ n
341
375
  ),
342
376
  ref: o,
343
377
  ...e
344
378
  }
345
379
  )
346
380
  );
347
- _.displayName = "Input";
348
- const qe = M.Root, We = M.Trigger, ee = l.forwardRef(({ className: t, align: n = "center", sideOffset: e = 4, ...o }, r) => (
381
+ oe.displayName = "Input";
382
+ const nn = M.Root, tn = M.Trigger, ae = b.forwardRef(({ className: n, align: t = "center", sideOffset: e = 4, ...o }, r) => (
349
383
  // <PopoverPrimitive.Portal>
350
384
  /* @__PURE__ */ a(
351
385
  M.Content,
352
386
  {
353
387
  ref: r,
354
- align: n,
388
+ align: t,
355
389
  sideOffset: e,
356
- className: d(
390
+ className: i(
357
391
  "bn-z-50 bn-w-72 bn-rounded-md bn-border bn-bg-popover bn-p-4 bn-text-popover-foreground bn-shadow-md bn-outline-none data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
358
- t
392
+ n
359
393
  ),
360
394
  ...o
361
395
  }
362
396
  )
363
397
  ));
364
- ee.displayName = M.Content.displayName;
365
- const Ae = N.Root, Je = N.Value, ne = l.forwardRef(({ className: t, children: n, ...e }, o) => /* @__PURE__ */ v(
366
- N.Trigger,
398
+ ae.displayName = M.Content.displayName;
399
+ const on = x.Root, an = x.Value, re = b.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
400
+ x.Trigger,
367
401
  {
368
402
  ref: o,
369
- className: d(
403
+ className: i(
370
404
  "bn-flex bn-h-10 bn-w-full bn-items-center bn-justify-between bn-rounded-md bn-border bn-border-input bn-bg-background bn-px-3 bn-py-2 bn-text-sm bn-ring-offset-background placeholder:bn-text-muted-foreground focus:bn-outline-none focus:bn-ring-2 focus:bn-ring-ring focus:bn-ring-offset-2 disabled:bn-cursor-not-allowed disabled:bn-opacity-50 [&>span]:bn-line-clamp-1",
371
- t
405
+ n
372
406
  ),
373
407
  ...e,
374
408
  children: [
375
- n,
376
- /* @__PURE__ */ a(N.Icon, { asChild: !0, children: /* @__PURE__ */ a($, { className: "bn-h-4 bn-w-4 bn-opacity-50" }) })
409
+ t,
410
+ /* @__PURE__ */ a(x.Icon, { asChild: !0, children: /* @__PURE__ */ a(j, { className: "bn-h-4 bn-w-4 bn-opacity-50" }) })
377
411
  ]
378
412
  }
379
413
  ));
380
- ne.displayName = N.Trigger.displayName;
381
- const te = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
382
- N.ScrollUpButton,
414
+ re.displayName = x.Trigger.displayName;
415
+ const se = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
416
+ x.ScrollUpButton,
383
417
  {
384
418
  ref: e,
385
- className: d(
419
+ className: i(
386
420
  "bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",
387
- t
421
+ n
388
422
  ),
389
- ...n,
390
- children: /* @__PURE__ */ a(Se, { className: "bn-h-4 bn-w-4" })
423
+ ...t,
424
+ children: /* @__PURE__ */ a(Le, { className: "bn-h-4 bn-w-4" })
391
425
  }
392
426
  ));
393
- te.displayName = N.ScrollUpButton.displayName;
394
- const oe = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
395
- N.ScrollDownButton,
427
+ se.displayName = x.ScrollUpButton.displayName;
428
+ const ie = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
429
+ x.ScrollDownButton,
396
430
  {
397
431
  ref: e,
398
- className: d(
432
+ className: i(
399
433
  "bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",
400
- t
434
+ n
401
435
  ),
402
- ...n,
403
- children: /* @__PURE__ */ a($, { className: "bn-h-4 bn-w-4" })
436
+ ...t,
437
+ children: /* @__PURE__ */ a(j, { className: "bn-h-4 bn-w-4" })
404
438
  }
405
439
  ));
406
- oe.displayName = N.ScrollDownButton.displayName;
407
- const re = l.forwardRef(({ className: t, children: n, position: e = "popper", ...o }, r) => (
440
+ ie.displayName = x.ScrollDownButton.displayName;
441
+ const de = b.forwardRef(({ className: n, children: t, position: e = "popper", ...o }, r) => (
408
442
  // <SelectPrimitive.Portal>
409
- /* @__PURE__ */ v(
410
- N.Content,
443
+ /* @__PURE__ */ g(
444
+ x.Content,
411
445
  {
412
446
  ref: r,
413
- className: d(
447
+ className: i(
414
448
  "bn-relative bn-z-50 bn-max-h-96 bn-min-w-[8rem] bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
415
449
  e === "popper" && "data-[side=bottom]:bn-translate-y-1 data-[side=left]:bn--translate-x-1 data-[side=right]:bn-translate-x-1 data-[side=top]:bn--translate-y-1",
416
- t
450
+ n
417
451
  ),
418
452
  position: e,
419
453
  ...o,
420
454
  children: [
421
- /* @__PURE__ */ a(te, {}),
455
+ /* @__PURE__ */ a(se, {}),
422
456
  /* @__PURE__ */ a(
423
- N.Viewport,
457
+ x.Viewport,
424
458
  {
425
- className: d(
459
+ className: i(
426
460
  "bn-p-1",
427
461
  e === "popper" && "bn-h-[var(--radix-select-trigger-height)] bn-w-full bn-min-w-[var(--radix-select-trigger-width)]"
428
462
  ),
429
- children: n
463
+ children: t
430
464
  }
431
465
  ),
432
- /* @__PURE__ */ a(oe, {})
466
+ /* @__PURE__ */ a(ie, {})
433
467
  ]
434
468
  }
435
469
  )
436
470
  ));
437
- re.displayName = N.Content.displayName;
438
- const Qe = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
439
- N.Label,
471
+ de.displayName = x.Content.displayName;
472
+ const rn = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
473
+ x.Label,
440
474
  {
441
475
  ref: e,
442
- className: d(
476
+ className: i(
443
477
  "bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-font-semibold",
444
- t
478
+ n
445
479
  ),
446
- ...n
480
+ ...t
447
481
  }
448
482
  ));
449
- Qe.displayName = N.Label.displayName;
450
- const ae = l.forwardRef(({ className: t, children: n, ...e }, o) => /* @__PURE__ */ v(
451
- N.Item,
483
+ rn.displayName = x.Label.displayName;
484
+ const le = b.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
485
+ x.Item,
452
486
  {
453
487
  ref: o,
454
- className: d(
488
+ className: i(
455
489
  "bn-relative bn-flex bn-w-full bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-outline-none focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
456
- t
490
+ n
457
491
  ),
458
492
  ...e,
459
493
  children: [
460
- /* @__PURE__ */ a("span", { className: "bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center", children: /* @__PURE__ */ a(N.ItemIndicator, { children: /* @__PURE__ */ a(j, { className: "bn-h-4 bn-w-4" }) }) }),
461
- /* @__PURE__ */ a(N.ItemText, { children: n })
494
+ /* @__PURE__ */ a("span", { className: "bn-absolute bn-left-2 bn-flex bn-h-3.5 bn-w-3.5 bn-items-center bn-justify-center", children: /* @__PURE__ */ a(x.ItemIndicator, { children: /* @__PURE__ */ a($, { className: "bn-h-4 bn-w-4" }) }) }),
495
+ /* @__PURE__ */ a(x.ItemText, { children: t })
462
496
  ]
463
497
  }
464
498
  ));
465
- ae.displayName = N.Item.displayName;
466
- const Xe = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
467
- N.Separator,
499
+ le.displayName = x.Item.displayName;
500
+ const sn = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
501
+ x.Separator,
468
502
  {
469
503
  ref: e,
470
- className: d("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", t),
471
- ...n
504
+ className: i("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", n),
505
+ ...t
472
506
  }
473
507
  ));
474
- Xe.displayName = N.Separator.displayName;
475
- const Ye = C.Root, se = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
476
- C.List,
508
+ sn.displayName = x.Separator.displayName;
509
+ function dn({
510
+ className: n,
511
+ ...t
512
+ }) {
513
+ return /* @__PURE__ */ a(
514
+ "div",
515
+ {
516
+ className: i("animate-pulse rounded-md bg-primary/10", n),
517
+ ...t
518
+ }
519
+ );
520
+ }
521
+ const ln = y.Root, be = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
522
+ y.List,
477
523
  {
478
524
  ref: e,
479
- className: d(
525
+ className: i(
480
526
  "bn-inline-flex bn-h-10 bn-items-center bn-justify-center bn-rounded-md bn-bg-muted bn-p-1 bn-text-muted-foreground",
481
- t
527
+ n
482
528
  ),
483
- ...n
529
+ ...t
484
530
  }
485
531
  ));
486
- se.displayName = C.List.displayName;
487
- const ie = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
488
- C.Trigger,
532
+ be.displayName = y.List.displayName;
533
+ const ce = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
534
+ y.Trigger,
489
535
  {
490
536
  ref: e,
491
- className: d(
537
+ className: i(
492
538
  "bn-inline-flex bn-items-center bn-justify-center bn-whitespace-nowrap bn-rounded-sm bn-px-3 bn-py-1.5 bn-text-sm bn-font-medium bn-ring-offset-background bn-transition-all focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-pointer-events-none disabled:bn-opacity-50 data-[state=active]:bn-bg-background data-[state=active]:bn-text-foreground data-[state=active]:bn-shadow-sm",
493
- t
539
+ n
494
540
  ),
495
- ...n
541
+ ...t
496
542
  }
497
543
  ));
498
- ie.displayName = C.Trigger.displayName;
499
- const de = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
500
- C.Content,
544
+ ce.displayName = y.Trigger.displayName;
545
+ const me = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
546
+ y.Content,
501
547
  {
502
548
  ref: e,
503
- className: d(
549
+ className: i(
504
550
  "bn-mt-2 bn-ring-offset-background focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2",
505
- t
551
+ n
506
552
  ),
507
- ...n
553
+ ...t
508
554
  }
509
555
  ));
510
- de.displayName = C.Content.displayName;
511
- const Ze = T(
556
+ me.displayName = y.Content.displayName;
557
+ const bn = I(
512
558
  "bn-inline-flex bn-items-center bn-justify-center bn-rounded-md bn-text-sm bn-font-medium bn-ring-offset-background bn-transition-colors hover:bn-bg-muted hover:bn-text-muted-foreground focus-visible:bn-outline-none focus-visible:bn-ring-2 focus-visible:bn-ring-ring focus-visible:bn-ring-offset-2 disabled:bn-pointer-events-none disabled:bn-opacity-50 data-[state=on]:bn-bg-accent data-[state=on]:bn-text-accent-foreground",
513
559
  {
514
560
  variants: {
@@ -527,146 +573,154 @@ const Ze = T(
527
573
  size: "default"
528
574
  }
529
575
  }
530
- ), be = l.forwardRef(({ className: t, variant: n, size: e, ...o }, r) => /* @__PURE__ */ a(
576
+ ), ue = b.forwardRef(({ className: n, variant: t, size: e, ...o }, r) => /* @__PURE__ */ a(
531
577
  U.Root,
532
578
  {
533
579
  ref: r,
534
- className: d(Ze({ variant: n, size: e, className: t })),
580
+ className: i(bn({ variant: t, size: e, className: n })),
535
581
  ...o
536
582
  }
537
583
  ));
538
- be.displayName = U.Root.displayName;
539
- const _e = S.Provider, en = S.Root, nn = S.Trigger, le = l.forwardRef(({ className: t, sideOffset: n = 4, ...e }, o) => /* @__PURE__ */ a(
540
- S.Content,
584
+ ue.displayName = U.Root.displayName;
585
+ const cn = T.Provider, mn = T.Root, un = T.Trigger, pe = b.forwardRef(({ className: n, sideOffset: t = 4, ...e }, o) => /* @__PURE__ */ a(
586
+ T.Content,
541
587
  {
542
588
  ref: o,
543
- sideOffset: n,
544
- className: d(
589
+ sideOffset: t,
590
+ className: i(
545
591
  "bn-z-50 bn-overflow-hidden bn-rounded-md bn-border bn-bg-popover bn-px-3 bn-py-1.5 bn-text-sm bn-text-popover-foreground bn-shadow-md bn-animate-in bn-fade-in-0 bn-zoom-in-95 data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=closed]:bn-zoom-out-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
546
- t
592
+ n
547
593
  ),
548
594
  ...e
549
595
  }
550
596
  ));
551
- le.displayName = S.Content.displayName;
552
- const tn = {
597
+ pe.displayName = T.Content.displayName;
598
+ const pn = {
599
+ Avatar: {
600
+ Avatar: H,
601
+ AvatarFallback: q,
602
+ AvatarImage: O
603
+ },
553
604
  Badge: {
554
- Badge: Ie
605
+ Badge: Ee
555
606
  },
556
607
  Button: {
557
- Button: O
608
+ Button: K
558
609
  },
559
610
  Card: {
560
- Card: H,
561
- CardContent: K
611
+ Card: W,
612
+ CardContent: _
562
613
  },
563
614
  DropdownMenu: {
564
- DropdownMenu: ke,
565
- DropdownMenuCheckboxItem: Q,
566
- DropdownMenuContent: A,
567
- DropdownMenuItem: J,
568
- DropdownMenuLabel: X,
569
- DropdownMenuSeparator: Y,
570
- DropdownMenuSub: ze,
571
- DropdownMenuSubContent: W,
572
- DropdownMenuSubTrigger: q,
573
- DropdownMenuTrigger: Le
615
+ DropdownMenu: He,
616
+ DropdownMenuCheckboxItem: Z,
617
+ DropdownMenuContent: X,
618
+ DropdownMenuItem: Y,
619
+ DropdownMenuLabel: ee,
620
+ DropdownMenuSeparator: ne,
621
+ DropdownMenuSub: qe,
622
+ DropdownMenuSubContent: Q,
623
+ DropdownMenuSubTrigger: J,
624
+ DropdownMenuTrigger: Oe
574
625
  },
575
626
  Form: {
576
- Form: je
627
+ Form: _e
577
628
  },
578
629
  Input: {
579
- Input: _
630
+ Input: oe
580
631
  },
581
632
  Label: {
582
- Label: P
633
+ Label: F
583
634
  },
584
635
  Popover: {
585
- Popover: qe,
586
- PopoverContent: ee,
587
- PopoverTrigger: We
636
+ Popover: nn,
637
+ PopoverContent: ae,
638
+ PopoverTrigger: tn
588
639
  },
589
640
  Select: {
590
- Select: Ae,
591
- SelectContent: re,
592
- SelectItem: ae,
593
- SelectTrigger: ne,
594
- SelectValue: Je
641
+ Select: on,
642
+ SelectContent: de,
643
+ SelectItem: le,
644
+ SelectTrigger: re,
645
+ SelectValue: an
646
+ },
647
+ Skeleton: {
648
+ Skeleton: dn
595
649
  },
596
650
  Tabs: {
597
- Tabs: Ye,
598
- TabsContent: de,
599
- TabsList: se,
600
- TabsTrigger: ie
651
+ Tabs: ln,
652
+ TabsContent: me,
653
+ TabsList: be,
654
+ TabsTrigger: ce
601
655
  },
602
656
  Toggle: {
603
- Toggle: be
657
+ Toggle: ue
604
658
  },
605
659
  Tooltip: {
606
- Tooltip: en,
607
- TooltipContent: le,
608
- TooltipProvider: _e,
609
- TooltipTrigger: nn
660
+ Tooltip: mn,
661
+ TooltipContent: pe,
662
+ TooltipProvider: cn,
663
+ TooltipTrigger: un
610
664
  }
611
- }, ce = ge(void 0);
612
- function g() {
613
- return he(ce);
665
+ }, fe = Te(void 0);
666
+ function h() {
667
+ return Ie(fe);
614
668
  }
615
- const on = (t) => {
616
- const { children: n, ...e } = t;
669
+ const fn = (n) => {
670
+ const { children: t, ...e } = n;
617
671
  c(e);
618
- const o = g(), r = xe();
619
- return /* @__PURE__ */ a(o.Form.Form, { ...r, children: n });
620
- }, rn = p((t, n) => {
672
+ const o = h(), r = ke();
673
+ return /* @__PURE__ */ a(o.Form.Form, { ...r, children: t });
674
+ }, gn = p((n, t) => {
621
675
  const {
622
676
  className: e,
623
677
  name: o,
624
678
  label: r,
625
679
  icon: s,
626
680
  // TODO: implement
627
- value: i,
628
- autoFocus: u,
629
- placeholder: m,
630
- onKeyDown: b,
681
+ value: d,
682
+ autoFocus: m,
683
+ placeholder: u,
684
+ onKeyDown: l,
631
685
  onChange: f,
632
- onSubmit: x,
686
+ onSubmit: v,
633
687
  ...w
634
- } = t;
688
+ } = n;
635
689
  c(w);
636
- const y = g();
637
- return r ? /* @__PURE__ */ v("div", { children: [
638
- /* @__PURE__ */ a(y.Label.Label, { htmlFor: r, children: r }),
690
+ const C = h();
691
+ return r ? /* @__PURE__ */ g("div", { children: [
692
+ /* @__PURE__ */ a(C.Label.Label, { htmlFor: r, children: r }),
639
693
  /* @__PURE__ */ a(
640
- y.Input.Input,
694
+ C.Input.Input,
641
695
  {
642
696
  className: e,
643
697
  id: r,
644
698
  name: o,
645
- autoFocus: u,
646
- placeholder: m,
647
- value: i,
648
- onKeyDown: b,
699
+ autoFocus: m,
700
+ placeholder: u,
701
+ value: d,
702
+ onKeyDown: l,
649
703
  onChange: f,
650
- onSubmit: x
704
+ onSubmit: v
651
705
  }
652
706
  )
653
707
  ] }) : /* @__PURE__ */ a(
654
- y.Input.Input,
708
+ C.Input.Input,
655
709
  {
656
710
  "aria-label": o,
657
711
  name: o,
658
- autoFocus: u,
659
- placeholder: m,
660
- value: i,
661
- onKeyDown: b,
712
+ autoFocus: m,
713
+ placeholder: u,
714
+ value: d,
715
+ onKeyDown: l,
662
716
  onChange: f,
663
- onSubmit: x,
664
- ref: n
717
+ onSubmit: v,
718
+ ref: t
665
719
  }
666
720
  );
667
- }), an = (t) => p(
668
- (n, e) => /* @__PURE__ */ a(
669
- t,
721
+ }), hn = (n) => p(
722
+ (t, e) => /* @__PURE__ */ a(
723
+ n,
670
724
  {
671
725
  onPointerDown: (o) => {
672
726
  o.nativeEvent.fakeEvent || (o.ctrlKey = !0);
@@ -675,233 +729,272 @@ const on = (t) => {
675
729
  const r = new PointerEvent("pointerdown", o.nativeEvent);
676
730
  r.fakeEvent = !0, o.target.dispatchEvent(r);
677
731
  },
678
- ...n,
732
+ ...t,
679
733
  ref: e
680
734
  }
681
735
  )
682
- ), sn = (t) => {
736
+ ), vn = (n) => {
683
737
  const {
684
- children: n,
738
+ children: t,
685
739
  onOpenChange: e,
686
740
  position: o,
687
741
  // Unused
688
742
  sub: r,
689
743
  ...s
690
- } = t;
744
+ } = n;
691
745
  c(s);
692
- const i = g();
746
+ const d = h();
693
747
  return r ? /* @__PURE__ */ a(
694
- i.DropdownMenu.DropdownMenuSub,
748
+ d.DropdownMenu.DropdownMenuSub,
695
749
  {
696
750
  onOpenChange: e,
697
- children: n
751
+ children: t
698
752
  }
699
- ) : /* @__PURE__ */ a(i.DropdownMenu.DropdownMenu, { onOpenChange: e, children: n });
700
- }, dn = (t) => {
701
- const { children: n, sub: e, ...o } = t;
753
+ ) : /* @__PURE__ */ a(
754
+ d.DropdownMenu.DropdownMenu,
755
+ {
756
+ modal: !1,
757
+ onOpenChange: e,
758
+ children: t
759
+ }
760
+ );
761
+ }, Nn = (n) => {
762
+ const { children: t, sub: e, ...o } = n;
702
763
  c(o);
703
- const r = g(), s = k(
704
- () => an(
764
+ const r = h(), s = L(
765
+ () => hn(
705
766
  r.DropdownMenu.DropdownMenuTrigger
706
767
  ),
707
768
  [r.DropdownMenu.DropdownMenuTrigger]
708
769
  );
709
- return e ? /* @__PURE__ */ a(r.DropdownMenu.DropdownMenuSubTrigger, { children: n }) : /* @__PURE__ */ a(s, { asChild: !0, ...o, children: n });
710
- }, bn = p((t, n) => {
711
- const { className: e, children: o, sub: r, ...s } = t;
770
+ return e ? /* @__PURE__ */ a(r.DropdownMenu.DropdownMenuSubTrigger, { children: t }) : /* @__PURE__ */ a(s, { asChild: !0, ...o, children: t });
771
+ }, xn = p((n, t) => {
772
+ const { className: e, children: o, sub: r, ...s } = n;
712
773
  c(s);
713
- const i = g();
774
+ const d = h();
714
775
  return r ? /* @__PURE__ */ a(
715
- i.DropdownMenu.DropdownMenuSubContent,
776
+ d.DropdownMenu.DropdownMenuSubContent,
716
777
  {
717
778
  className: e,
718
- ref: n,
779
+ ref: t,
719
780
  children: o
720
781
  }
721
782
  ) : /* @__PURE__ */ a(
722
- i.DropdownMenu.DropdownMenuContent,
783
+ d.DropdownMenu.DropdownMenuContent,
723
784
  {
724
785
  className: e,
725
- ref: n,
786
+ ref: t,
726
787
  children: o
727
788
  }
728
789
  );
729
- }), ln = p((t, n) => {
730
- const { className: e, children: o, icon: r, checked: s, subTrigger: i, onClick: u, ...m } = t;
731
- c(m);
732
- const b = g();
733
- return i ? /* @__PURE__ */ v(me, { children: [
790
+ }), wn = p((n, t) => {
791
+ const { className: e, children: o, icon: r, checked: s, subTrigger: d, onClick: m, ...u } = n;
792
+ c(u);
793
+ const l = h();
794
+ return d ? /* @__PURE__ */ g(he, { children: [
734
795
  r,
735
796
  o
736
- ] }) : s !== void 0 ? /* @__PURE__ */ v(
737
- b.DropdownMenu.DropdownMenuCheckboxItem,
797
+ ] }) : s !== void 0 ? /* @__PURE__ */ g(
798
+ l.DropdownMenu.DropdownMenuCheckboxItem,
738
799
  {
739
- className: d(e, "bn-gap-1"),
740
- ref: n,
800
+ className: i(e, "bn-gap-1", s ? "" : "bn-px-2"),
801
+ ref: t,
741
802
  checked: s,
742
- onClick: u,
743
- ...m,
803
+ onClick: m,
804
+ ...u,
744
805
  children: [
745
806
  r,
746
807
  o
747
808
  ]
748
809
  }
749
- ) : /* @__PURE__ */ v(
750
- b.DropdownMenu.DropdownMenuItem,
810
+ ) : /* @__PURE__ */ g(
811
+ l.DropdownMenu.DropdownMenuItem,
751
812
  {
752
813
  className: e,
753
- ref: n,
754
- onClick: u,
755
- ...m,
814
+ ref: t,
815
+ onClick: m,
816
+ ...u,
756
817
  children: [
757
818
  r,
758
819
  o,
759
- i && /* @__PURE__ */ a(E, { className: "bn-ml-auto bn-h-4 bn-w-4" })
820
+ d && /* @__PURE__ */ a(A, { className: "bn-ml-auto bn-h-4 bn-w-4" })
760
821
  ]
761
822
  }
762
823
  );
763
- }), cn = p((t, n) => {
764
- const { className: e, ...o } = t;
824
+ }), Cn = p((n, t) => {
825
+ const { className: e, ...o } = n;
765
826
  c(o);
766
- const r = g();
827
+ const r = h();
767
828
  return /* @__PURE__ */ a(
768
829
  r.DropdownMenu.DropdownMenuSeparator,
769
830
  {
770
831
  className: e,
771
- ref: n
832
+ ref: t
772
833
  }
773
834
  );
774
- }), mn = p((t, n) => {
775
- const { className: e, children: o, ...r } = t;
835
+ }), yn = p((n, t) => {
836
+ const { className: e, children: o, ...r } = n;
776
837
  c(r);
777
- const s = g();
838
+ const s = h();
778
839
  return /* @__PURE__ */ a(
779
840
  s.DropdownMenu.DropdownMenuLabel,
780
841
  {
781
842
  className: e,
782
- ref: n,
843
+ ref: t,
783
844
  children: o
784
845
  }
785
846
  );
786
- }), un = p((t, n) => {
847
+ }), Sn = p((n, t) => {
848
+ const {
849
+ className: e,
850
+ children: o,
851
+ icon: r,
852
+ onClick: s,
853
+ onDragEnd: d,
854
+ onDragStart: m,
855
+ draggable: u,
856
+ label: l,
857
+ ...f
858
+ } = n;
859
+ c(f, !1);
860
+ const v = h();
861
+ return /* @__PURE__ */ g(
862
+ v.Button.Button,
863
+ {
864
+ variant: "ghost",
865
+ className: i(e, "bn-text-gray-400"),
866
+ ref: t,
867
+ "aria-label": l,
868
+ onClick: s,
869
+ onDragStart: m,
870
+ onDragEnd: d,
871
+ draggable: u,
872
+ ...f,
873
+ children: [
874
+ r,
875
+ o
876
+ ]
877
+ }
878
+ );
879
+ }), Tn = p((n, t) => {
787
880
  const {
788
881
  className: e,
789
882
  tabs: o,
790
883
  defaultOpenTab: r,
791
884
  openTab: s,
792
- setOpenTab: i,
793
- loading: u,
885
+ setOpenTab: d,
886
+ loading: m,
794
887
  // TODO: implement loader
795
- ...m
796
- } = t;
797
- c(m);
798
- const b = g();
799
- return /* @__PURE__ */ v(
800
- b.Tabs.Tabs,
888
+ ...u
889
+ } = n;
890
+ c(u);
891
+ const l = h();
892
+ return /* @__PURE__ */ g(
893
+ l.Tabs.Tabs,
801
894
  {
802
- className: d(e, "bn-bg-popover bn-p-2 bn-rounded-lg"),
803
- ref: n,
895
+ className: i(e, "bn-bg-popover bn-p-2 bn-rounded-lg"),
896
+ ref: t,
804
897
  value: s,
805
898
  defaultValue: r,
806
- onValueChange: i,
899
+ onValueChange: d,
807
900
  children: [
808
- /* @__PURE__ */ a(b.Tabs.TabsList, { children: o.map((f) => /* @__PURE__ */ a(b.Tabs.TabsTrigger, { value: f.name, children: f.name }, f.name)) }),
809
- o.map((f) => /* @__PURE__ */ a(b.Tabs.TabsContent, { value: f.name, children: /* @__PURE__ */ a(b.Card.Card, { children: /* @__PURE__ */ a(b.Card.CardContent, { className: "bn-p-4", children: f.tabPanel }) }) }, f.name))
901
+ /* @__PURE__ */ a(l.Tabs.TabsList, { children: o.map((f) => /* @__PURE__ */ a(l.Tabs.TabsTrigger, { value: f.name, children: f.name }, f.name)) }),
902
+ o.map((f) => /* @__PURE__ */ a(l.Tabs.TabsContent, { value: f.name, children: /* @__PURE__ */ a(l.Card.Card, { children: /* @__PURE__ */ a(l.Card.CardContent, { className: "bn-p-4", children: f.tabPanel }) }) }, f.name))
810
903
  ]
811
904
  }
812
905
  );
813
- }), pn = p((t, n) => {
814
- const { className: e, children: o, ...r } = t;
906
+ }), In = p((n, t) => {
907
+ const { className: e, children: o, ...r } = n;
815
908
  return c(r), /* @__PURE__ */ a(
816
909
  "div",
817
910
  {
818
- className: d(
911
+ className: i(
819
912
  e,
820
913
  "bn-flex bn-flex-col bn-gap-2 bn-items-start bn-justify-center"
821
914
  ),
822
- ref: n,
915
+ ref: t,
823
916
  children: o
824
917
  }
825
918
  );
826
- }), fn = p((t, n) => {
827
- const { className: e, value: o, placeholder: r, onKeyDown: s, onChange: i, ...u } = t;
828
- c(u);
829
- const m = g();
919
+ }), Mn = p((n, t) => {
920
+ const { className: e, value: o, placeholder: r, onKeyDown: s, onChange: d, ...m } = n;
921
+ c(m);
922
+ const u = h();
830
923
  return /* @__PURE__ */ a(
831
- m.Input.Input,
924
+ u.Input.Input,
832
925
  {
833
926
  "data-test": "embed-input",
834
- className: d(e, "bn-w-80"),
835
- ref: n,
927
+ className: i(e, "bn-w-80"),
928
+ ref: t,
836
929
  value: o,
837
930
  placeholder: r,
838
931
  onKeyDown: s,
839
- onChange: i
932
+ onChange: d
840
933
  }
841
934
  );
842
- }), gn = (t) => {
935
+ }), Dn = (n) => {
843
936
  const {
844
- children: n,
937
+ children: t,
845
938
  opened: e,
846
939
  position: o,
847
940
  // unused
848
941
  ...r
849
- } = t;
942
+ } = n;
850
943
  c(r);
851
- const s = g();
852
- return /* @__PURE__ */ a(s.Popover.Popover, { open: e, children: n });
853
- }, hn = p(
854
- (t, n) => {
855
- const { children: e, ...o } = t;
944
+ const s = h();
945
+ return /* @__PURE__ */ a(s.Popover.Popover, { open: e, children: t });
946
+ }, Rn = p(
947
+ (n, t) => {
948
+ const { children: e, ...o } = n;
856
949
  c(o);
857
- const r = g();
858
- return /* @__PURE__ */ a(r.Popover.PopoverTrigger, { ref: n, asChild: !0, children: e });
950
+ const r = h();
951
+ return /* @__PURE__ */ a(r.Popover.PopoverTrigger, { ref: t, asChild: !0, children: e });
859
952
  }
860
- ), vn = p((t, n) => {
861
- const { className: e, variant: o, children: r, ...s } = t;
953
+ ), kn = p((n, t) => {
954
+ const { className: e, variant: o, children: r, ...s } = n;
862
955
  c(s);
863
- const i = g();
956
+ const d = h();
864
957
  return /* @__PURE__ */ a(
865
- i.Popover.PopoverContent,
958
+ d.Popover.PopoverContent,
866
959
  {
867
960
  sideOffset: 8,
868
- className: d(
961
+ className: i(
869
962
  e,
870
963
  "bn-flex bn-flex-col bn-gap-2",
871
964
  o === "panel-popover" ? "bn-p-0 bn-border-none bn-shadow-none bn-max-w-none bn-w-fit" : ""
872
965
  ),
873
- ref: n,
966
+ ref: t,
874
967
  children: r
875
968
  }
876
969
  );
877
- }), Nn = p((t, n) => {
878
- const { className: e, children: o, ...r } = t;
879
- return c(r, !1), /* @__PURE__ */ a("div", { className: e, ref: n, ...r, children: o });
880
- }), xn = p((t, n) => {
970
+ }), Fn = p((n, t) => {
971
+ const { className: e, children: o, ...r } = n;
972
+ return c(r, !1), /* @__PURE__ */ a("div", { className: e, ref: t, ...r, children: o });
973
+ }), Bn = p((n, t) => {
881
974
  const {
882
975
  className: e,
883
976
  children: o,
884
977
  icon: r,
885
978
  onClick: s,
886
- onDragEnd: i,
887
- onDragStart: u,
888
- draggable: m,
889
- label: b,
979
+ onDragEnd: d,
980
+ onDragStart: m,
981
+ draggable: u,
982
+ label: l,
890
983
  ...f
891
- } = t;
984
+ } = n;
892
985
  c(f, !1);
893
- const x = g();
894
- return /* @__PURE__ */ v(
895
- x.Button.Button,
986
+ const v = h();
987
+ return /* @__PURE__ */ g(
988
+ v.Button.Button,
896
989
  {
897
990
  variant: "ghost",
898
- className: d(e, "bn-text-gray-400"),
899
- ref: n,
900
- "aria-label": b,
991
+ className: i(e, "bn-text-gray-400"),
992
+ ref: t,
993
+ "aria-label": l,
901
994
  onClick: s,
902
- onDragStart: u,
903
- onDragEnd: i,
904
- draggable: m,
995
+ onDragStart: m,
996
+ onDragEnd: d,
997
+ draggable: u,
905
998
  ...f,
906
999
  children: [
907
1000
  r,
@@ -909,85 +1002,85 @@ const on = (t) => {
909
1002
  ]
910
1003
  }
911
1004
  );
912
- }), wn = p((t, n) => {
913
- const { className: e, children: o, id: r, columns: s, ...i } = t;
914
- return c(i), /* @__PURE__ */ a(
1005
+ }), Pn = p((n, t) => {
1006
+ const { className: e, children: o, id: r, columns: s, ...d } = n;
1007
+ return c(d), /* @__PURE__ */ a(
915
1008
  "div",
916
1009
  {
917
1010
  className: e,
918
1011
  style: { gridTemplateColumns: `repeat(${s}, 1fr)` },
919
- ref: n,
1012
+ ref: t,
920
1013
  id: r,
921
1014
  role: "grid",
922
1015
  children: o
923
1016
  }
924
1017
  );
925
- }), Cn = p((t, n) => {
926
- const { className: e, children: o, columns: r, ...s } = t;
1018
+ }), Ln = p((n, t) => {
1019
+ const { className: e, children: o, columns: r, ...s } = n;
927
1020
  return c(s), /* @__PURE__ */ a(
928
1021
  "div",
929
1022
  {
930
1023
  className: e,
931
1024
  style: { gridColumn: `1 / ${r + 1}` },
932
- ref: n,
1025
+ ref: t,
933
1026
  children: o
934
1027
  }
935
1028
  );
936
- }), yn = p((t, n) => {
937
- const { className: e, children: o, id: r, ...s } = t;
1029
+ }), zn = p((n, t) => {
1030
+ const { className: e, children: o, id: r, ...s } = n;
938
1031
  return c(s), /* @__PURE__ */ a(
939
1032
  "div",
940
1033
  {
941
1034
  id: r,
942
1035
  role: "listbox",
943
- className: d(
1036
+ className: i(
944
1037
  "bn-z-50 bn-min-w-[8rem] bn-overflow-auto bn-rounded-md bn-border bn-bg-popover bn-p-1 bn-text-popover-foreground bn-shadow-md data-[state=open]:bn-animate-in data-[state=closed]:bn-animate-out data-[state=closed]:bn-fade-out-0 data-[state=open]:bn-fade-in-0 data-[state=closed]:bn-zoom-out-95 data-[state=open]:bn-zoom-in-95 data-[side=bottom]:bn-slide-in-from-top-2 data-[side=left]:bn-slide-in-from-right-2 data-[side=right]:bn-slide-in-from-left-2 data-[side=top]:bn-slide-in-from-bottom-2",
945
1038
  e
946
1039
  ),
947
- ref: n,
1040
+ ref: t,
948
1041
  children: o
949
1042
  }
950
1043
  );
951
- }), Sn = p((t, n) => {
952
- const { className: e, children: o, ...r } = t;
1044
+ }), Vn = p((n, t) => {
1045
+ const { className: e, children: o, ...r } = n;
953
1046
  return c(r), /* @__PURE__ */ a(
954
1047
  "div",
955
1048
  {
956
- className: d(
1049
+ className: i(
957
1050
  "bn-relative bn-flex bn-cursor-default bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
958
1051
  e
959
1052
  ),
960
- ref: n,
1053
+ ref: t,
961
1054
  children: /* @__PURE__ */ a("div", { children: o })
962
1055
  }
963
1056
  );
964
- }), Tn = p((t, n) => {
965
- const e = g(), { className: o, item: r, isSelected: s, onClick: i, id: u, ...m } = t;
966
- c(m);
967
- const b = L(null);
968
- return z(() => {
969
- if (!b.current || !s)
1057
+ }), En = p((n, t) => {
1058
+ const e = h(), { className: o, item: r, isSelected: s, onClick: d, id: m, ...u } = n;
1059
+ c(u);
1060
+ const l = z(null);
1061
+ return V(() => {
1062
+ if (!l.current || !s)
970
1063
  return;
971
- const f = F(
972
- b.current,
1064
+ const f = B(
1065
+ l.current,
973
1066
  document.querySelector(".bn-suggestion-menu")
974
1067
  );
975
- f === "top" ? b.current.scrollIntoView(!0) : f === "bottom" && b.current.scrollIntoView(!1);
976
- }, [s]), /* @__PURE__ */ v(
1068
+ f === "top" ? l.current.scrollIntoView(!0) : f === "bottom" && l.current.scrollIntoView(!1);
1069
+ }, [s]), /* @__PURE__ */ g(
977
1070
  "div",
978
1071
  {
979
- className: d(
1072
+ className: i(
980
1073
  "bn-relative bn-flex bn-cursor-pointer bn-select-none bn-items-center bn-rounded-sm bn-px-2 bn-py-1.5 bn-text-sm bn-outline-none bn-transition-colors focus:bn-bg-accent focus:bn-text-accent-foreground data-[disabled]:bn-pointer-events-none data-[disabled]:bn-opacity-50",
981
1074
  o
982
1075
  ),
983
- ref: B([n, b]),
984
- id: u,
985
- onClick: i,
1076
+ ref: P([t, l]),
1077
+ id: m,
1078
+ onClick: d,
986
1079
  role: "option",
987
1080
  "aria-selected": s || void 0,
988
1081
  children: [
989
1082
  r.icon && /* @__PURE__ */ a("div", { className: "bn-p-3", "data-position": "left", children: r.icon }),
990
- /* @__PURE__ */ v("div", { className: "bn-flex-1", children: [
1083
+ /* @__PURE__ */ g("div", { className: "bn-flex-1", children: [
991
1084
  /* @__PURE__ */ a("div", { className: "bn-text-base", children: r.title }),
992
1085
  /* @__PURE__ */ a("div", { className: "bn-text-xs", children: r.subtext })
993
1086
  ] }),
@@ -995,144 +1088,159 @@ const on = (t) => {
995
1088
  ]
996
1089
  }
997
1090
  );
998
- }), Mn = p((t, n) => {
999
- const { className: e, children: o, ...r } = t;
1091
+ }), An = p((n, t) => {
1092
+ const { className: e, children: o, ...r } = n;
1000
1093
  return c(r), /* @__PURE__ */ a(
1001
1094
  "div",
1002
1095
  {
1003
- className: d("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold", e),
1004
- ref: n,
1096
+ className: i("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold", e),
1097
+ ref: t,
1005
1098
  children: o
1006
1099
  }
1007
1100
  );
1008
- }), In = p((t, n) => {
1009
- const { className: e, children: o, ...r } = t;
1010
- return c(r), /* @__PURE__ */ a("div", { className: e, ref: n, children: o });
1011
- }), Dn = p((t, n) => {
1012
- const { className: e, children: o, onMouseDown: r, onClick: s, ...i } = t;
1013
- c(i, !1);
1014
- const u = g();
1101
+ }), $n = p((n, t) => {
1102
+ const { className: e, children: o, ...r } = n;
1103
+ return c(r), /* @__PURE__ */ a("div", { className: e, ref: t, children: o });
1104
+ }), jn = p((n, t) => {
1105
+ const { className: e, children: o, onMouseDown: r, onClick: s, ...d } = n;
1106
+ c(d, !1);
1107
+ const m = h();
1015
1108
  return /* @__PURE__ */ a(
1016
- u.Button.Button,
1109
+ m.Button.Button,
1017
1110
  {
1018
1111
  variant: "ghost",
1019
- className: d(
1112
+ className: i(
1020
1113
  e,
1021
1114
  "bn-p-0 bn-h-full bn-w-full bn-text-gray-400",
1022
1115
  e != null && e.includes("bn-extend-button-add-remove-columns") ? "bn-ml-1" : "bn-mt-1",
1023
1116
  e != null && e.includes("bn-extend-button-editing") ? "bn-bg-accent bn-text-accent-foreground" : ""
1024
1117
  ),
1025
- ref: n,
1118
+ ref: t,
1026
1119
  onClick: s,
1027
1120
  onMouseDown: r,
1028
- ...i,
1121
+ ...d,
1029
1122
  children: o
1030
1123
  }
1031
1124
  );
1032
- }), Rn = p((t, n) => {
1125
+ }), Gn = p((n, t) => {
1033
1126
  const {
1034
1127
  className: e,
1035
1128
  children: o,
1036
1129
  draggable: r,
1037
1130
  onDragStart: s,
1038
- onDragEnd: i,
1039
- style: u,
1040
- label: m,
1041
- ...b
1042
- } = t;
1043
- c(b, !1);
1044
- const f = g();
1131
+ onDragEnd: d,
1132
+ style: m,
1133
+ label: u,
1134
+ ...l
1135
+ } = n;
1136
+ c(l, !1);
1137
+ const f = h();
1045
1138
  return /* @__PURE__ */ a(
1046
1139
  f.Button.Button,
1047
1140
  {
1048
1141
  variant: "ghost",
1049
- className: d(e, "bn-p-0 bn-h-fit bn-w-fit bn-text-gray-400"),
1050
- ref: n,
1051
- "aria-label": m,
1142
+ className: i(e, "bn-p-0 bn-h-fit bn-w-fit bn-text-gray-400"),
1143
+ ref: t,
1144
+ "aria-label": u,
1052
1145
  draggable: r,
1053
1146
  onDragStart: s,
1054
- onDragEnd: i,
1055
- style: u,
1056
- ...b,
1147
+ onDragEnd: d,
1148
+ style: m,
1149
+ ...l,
1057
1150
  children: o
1058
1151
  }
1059
1152
  );
1060
- }), D = p(
1061
- (t, n) => {
1062
- const { className: e, children: o, onMouseEnter: r, onMouseLeave: s, ...i } = t;
1063
- c(i);
1064
- const u = g();
1153
+ }), R = p(
1154
+ (n, t) => {
1155
+ const {
1156
+ className: e,
1157
+ children: o,
1158
+ onMouseEnter: r,
1159
+ onMouseLeave: s,
1160
+ variant: d,
1161
+ ...m
1162
+ } = n;
1163
+ c(m);
1164
+ const u = h();
1065
1165
  return /* @__PURE__ */ a(u.Tooltip.TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ a(
1066
1166
  "div",
1067
1167
  {
1068
- className: d(
1168
+ className: i(
1069
1169
  e,
1070
- "bn-flex bn-gap-1 bn-p-1 bn-bg-popover bn-text-popover-foreground bn-border bn-rounded-lg bn-shadow-md"
1170
+ "bn-flex bn-gap-1 bn-p-1 bn-bg-popover bn-text-popover-foreground bn-border bn-rounded-lg bn-shadow-md bn-h-fit",
1171
+ d === "action-toolbar" ? "bn-w-fit" : ""
1071
1172
  ),
1072
- ref: n,
1173
+ ref: t,
1073
1174
  onMouseEnter: r,
1074
1175
  onMouseLeave: s,
1075
1176
  children: o
1076
1177
  }
1077
1178
  ) });
1078
1179
  }
1079
- ), R = p(
1080
- (t, n) => {
1180
+ ), k = p(
1181
+ (n, t) => {
1081
1182
  const {
1082
1183
  className: e,
1083
1184
  children: o,
1084
1185
  mainTooltip: r,
1085
1186
  secondaryTooltip: s,
1086
- icon: i,
1087
- isSelected: u,
1088
- isDisabled: m,
1089
- onClick: b,
1187
+ icon: d,
1188
+ isSelected: m,
1189
+ isDisabled: u,
1190
+ onClick: l,
1090
1191
  label: f,
1091
- ...x
1092
- } = t;
1093
- c(x, !1);
1094
- const w = g(), y = u === void 0 ? /* @__PURE__ */ v(
1095
- w.Button.Button,
1192
+ variant: v,
1193
+ ...w
1194
+ } = n;
1195
+ c(w, !1);
1196
+ const C = h(), ge = m === void 0 ? /* @__PURE__ */ g(
1197
+ C.Button.Button,
1096
1198
  {
1097
- className: e,
1199
+ className: i(
1200
+ e,
1201
+ v === "compact" ? "bn-h-6 bn-min-w-6 bn-p-0" : ""
1202
+ ),
1098
1203
  variant: "ghost",
1099
- disabled: m,
1100
- onClick: b,
1101
- ref: n,
1204
+ size: v === "compact" ? "sm" : "default",
1205
+ disabled: u,
1206
+ onClick: l,
1207
+ ref: t,
1102
1208
  "aria-label": f,
1103
- ...x,
1209
+ ...w,
1104
1210
  children: [
1105
- i,
1211
+ d,
1106
1212
  o
1107
1213
  ]
1108
1214
  }
1109
- ) : /* @__PURE__ */ v(
1110
- w.Toggle.Toggle,
1215
+ ) : /* @__PURE__ */ g(
1216
+ C.Toggle.Toggle,
1111
1217
  {
1112
- className: d(
1218
+ className: i(
1113
1219
  e,
1114
- "data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"
1220
+ "data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground",
1221
+ v === "compact" ? "bn-h-6 bn-min-w-6 bn-p-0" : ""
1115
1222
  ),
1223
+ size: v === "compact" ? "sm" : "default",
1116
1224
  "aria-label": f,
1117
- onClick: b,
1118
- pressed: u,
1119
- disabled: m,
1120
- "data-state": u ? "on" : "off",
1121
- "data-disabled": m,
1122
- ref: n,
1123
- ...x,
1225
+ onClick: l,
1226
+ pressed: m,
1227
+ disabled: u,
1228
+ "data-state": m ? "on" : "off",
1229
+ "data-disabled": u,
1230
+ ref: t,
1231
+ ...w,
1124
1232
  children: [
1125
- i,
1233
+ d,
1126
1234
  o
1127
1235
  ]
1128
1236
  }
1129
1237
  );
1130
- return /* @__PURE__ */ v(w.Tooltip.Tooltip, { children: [
1131
- /* @__PURE__ */ a(w.Tooltip.TooltipTrigger, { asChild: !0, children: y }),
1132
- /* @__PURE__ */ v(
1133
- w.Tooltip.TooltipContent,
1238
+ return /* @__PURE__ */ g(C.Tooltip.Tooltip, { children: [
1239
+ /* @__PURE__ */ a(C.Tooltip.TooltipTrigger, { asChild: !0, children: ge }),
1240
+ /* @__PURE__ */ g(
1241
+ C.Tooltip.TooltipContent,
1134
1242
  {
1135
- className: "bn-flex bn-flex-col bn-items-center",
1243
+ className: "bn-flex bn-flex-col bn-items-center bn-whitespace-pre-wrap",
1136
1244
  children: [
1137
1245
  /* @__PURE__ */ a("span", { children: r }),
1138
1246
  s && /* @__PURE__ */ a("span", { children: s })
@@ -1141,184 +1249,396 @@ const on = (t) => {
1141
1249
  )
1142
1250
  ] });
1143
1251
  }
1144
- ), Pn = p((t, n) => {
1145
- const { className: e, items: o, isDisabled: r, ...s } = t;
1252
+ ), Un = p((n, t) => {
1253
+ const { className: e, items: o, isDisabled: r, ...s } = n;
1146
1254
  c(s);
1147
- const i = g(), u = (b) => /* @__PURE__ */ v("div", { className: "bn-flex bn-gap-1 bn-items-center", children: [
1148
- b.icon,
1149
- b.text
1150
- ] }), m = o.filter((b) => b.isSelected)[0];
1151
- return m ? /* @__PURE__ */ v(
1152
- i.Select.Select,
1255
+ const d = h(), m = (l) => /* @__PURE__ */ g("div", { className: "bn-flex bn-gap-1 bn-items-center", children: [
1256
+ l.icon,
1257
+ l.text
1258
+ ] }), u = o.filter((l) => l.isSelected)[0];
1259
+ return u ? /* @__PURE__ */ g(
1260
+ d.Select.Select,
1153
1261
  {
1154
- value: m.text,
1155
- onValueChange: (b) => {
1156
- var f, x;
1157
- return (x = (f = o.find((w) => w.text === b)).onClick) == null ? void 0 : x.call(f);
1262
+ value: u.text,
1263
+ onValueChange: (l) => {
1264
+ var f, v;
1265
+ return (v = (f = o.find((w) => w.text === l)).onClick) == null ? void 0 : v.call(f);
1158
1266
  },
1159
1267
  disabled: r,
1160
1268
  children: [
1161
- /* @__PURE__ */ a(i.Select.SelectTrigger, { className: "bn-border-none", children: /* @__PURE__ */ a(i.Select.SelectValue, {}) }),
1162
- /* @__PURE__ */ a(i.Select.SelectContent, { className: e, ref: n, children: o.map((b) => /* @__PURE__ */ a(
1163
- i.Select.SelectItem,
1269
+ /* @__PURE__ */ a(d.Select.SelectTrigger, { className: "bn-border-none", children: /* @__PURE__ */ a(d.Select.SelectValue, {}) }),
1270
+ /* @__PURE__ */ a(d.Select.SelectContent, { className: e, ref: t, children: o.map((l) => /* @__PURE__ */ a(
1271
+ d.Select.SelectItem,
1164
1272
  {
1165
- disabled: b.isDisabled,
1166
- value: b.text,
1167
- children: /* @__PURE__ */ a(u, { ...b })
1273
+ disabled: l.isDisabled,
1274
+ value: l.text,
1275
+ children: /* @__PURE__ */ a(m, { ...l })
1168
1276
  },
1169
- b.text
1277
+ l.text
1170
1278
  )) })
1171
1279
  ]
1172
1280
  }
1173
1281
  ) : null;
1174
- }), Fn = p((t, n) => {
1175
- const { className: e, children: o, onClick: r, label: s, ...i } = t;
1176
- c(i);
1177
- const u = g();
1282
+ }), Hn = p((n, t) => {
1283
+ const { className: e, children: o, ...r } = n;
1284
+ c(r);
1285
+ const s = h();
1286
+ return /* @__PURE__ */ a(
1287
+ s.Card.Card,
1288
+ {
1289
+ className: i(e, "bn-w-[300px]"),
1290
+ ref: t,
1291
+ children: o
1292
+ }
1293
+ );
1294
+ }), On = p((n, t) => {
1295
+ const { className: e, children: o, ...r } = n;
1296
+ return c(r), /* @__PURE__ */ a(
1297
+ "div",
1298
+ {
1299
+ className: i(
1300
+ e,
1301
+ "bn-p-4",
1302
+ e != null && e.includes("bn-thread-comments") ? "bn-flex bn-flex-col bn-gap-6 bn-border-b" : ""
1303
+ ),
1304
+ ref: t,
1305
+ children: o
1306
+ }
1307
+ );
1308
+ }), qn = p((n, t) => {
1309
+ const { authorInfo: e, timeString: o, ...r } = n;
1310
+ c(r, !1);
1311
+ const s = h();
1312
+ return e === "loading" ? /* @__PURE__ */ g(
1313
+ "div",
1314
+ {
1315
+ className: "bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-4",
1316
+ children: [
1317
+ /* @__PURE__ */ a(
1318
+ s.Skeleton.Skeleton,
1319
+ {
1320
+ className: "bn-size-7 bn-rounded-full bn-bg-neutral-400 bn-animate-pulse"
1321
+ }
1322
+ ),
1323
+ /* @__PURE__ */ a(
1324
+ s.Skeleton.Skeleton,
1325
+ {
1326
+ className: "bn-h-3 bn-w-32 bn-rounded-full bn-bg-neutral-400 bn-animate-pulse"
1327
+ }
1328
+ )
1329
+ ]
1330
+ }
1331
+ ) : /* @__PURE__ */ g(
1332
+ "div",
1333
+ {
1334
+ className: "bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-4",
1335
+ children: [
1336
+ /* @__PURE__ */ g(s.Avatar.Avatar, { children: [
1337
+ /* @__PURE__ */ a(
1338
+ s.Avatar.AvatarImage,
1339
+ {
1340
+ src: e.avatarUrl,
1341
+ alt: e.username,
1342
+ className: "bn-h-7 bn-rounded-full"
1343
+ }
1344
+ ),
1345
+ /* @__PURE__ */ a(s.Avatar.AvatarFallback, { children: e.username[0] })
1346
+ ] }),
1347
+ /* @__PURE__ */ g(
1348
+ "div",
1349
+ {
1350
+ className: "bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-2",
1351
+ children: [
1352
+ /* @__PURE__ */ a("span", { className: "bn-text-sm bn-font-bold", children: e.username }),
1353
+ /* @__PURE__ */ a("span", { className: "bn-text-xs", children: o })
1354
+ ]
1355
+ }
1356
+ )
1357
+ ]
1358
+ }
1359
+ );
1360
+ }), Kn = p((n, t) => {
1361
+ const {
1362
+ className: e,
1363
+ showActions: o,
1364
+ authorInfo: r,
1365
+ timeString: s,
1366
+ actions: d,
1367
+ children: m,
1368
+ ...u
1369
+ } = n;
1370
+ c(u);
1371
+ const [l, f] = Me(!1), { focused: v, ref: w } = Ne(), C = d && (o === !0 || o === void 0 || o === "hover" && l || v);
1372
+ return /* @__PURE__ */ g(
1373
+ "div",
1374
+ {
1375
+ ref: t,
1376
+ className: i(e, "bn-relative bn-flex bn-flex-col bn-gap-2"),
1377
+ onMouseEnter: () => f(!0),
1378
+ onMouseLeave: () => {
1379
+ f(!1);
1380
+ },
1381
+ children: [
1382
+ C ? /* @__PURE__ */ a(
1383
+ "div",
1384
+ {
1385
+ className: "bn-absolute bn-right-0 bn-top-0 bn-z-10",
1386
+ ref: w,
1387
+ children: d
1388
+ }
1389
+ ) : null,
1390
+ /* @__PURE__ */ a(qn, { ...n }),
1391
+ m
1392
+ ]
1393
+ }
1394
+ );
1395
+ }), Wn = p((n, t) => {
1396
+ const { className: e, onFocus: o, onBlur: r, editor: s, editable: d, ...m } = n;
1397
+ return c(m), /* @__PURE__ */ a(
1398
+ tt,
1399
+ {
1400
+ autoFocus: !0,
1401
+ className: i(e, ""),
1402
+ editor: n.editor,
1403
+ sideMenu: !1,
1404
+ slashMenu: !1,
1405
+ tableHandles: !1,
1406
+ filePanel: !1,
1407
+ formattingToolbar: !1,
1408
+ editable: d,
1409
+ ref: t,
1410
+ onFocus: o,
1411
+ onBlur: r,
1412
+ children: /* @__PURE__ */ a(
1413
+ xe,
1414
+ {
1415
+ formattingToolbar: _n
1416
+ }
1417
+ )
1418
+ }
1419
+ );
1420
+ }), _n = () => {
1421
+ const n = we([]).filter(
1422
+ (t) => t.key !== "nestBlockButton" && t.key !== "unnestBlockButton"
1423
+ );
1424
+ return /* @__PURE__ */ a(Ce, { blockTypeSelectItems: [], children: n });
1425
+ }, Jn = p((n, t) => {
1426
+ const {
1427
+ className: e,
1428
+ text: o,
1429
+ icon: r,
1430
+ isSelected: s,
1431
+ mainTooltip: d,
1432
+ secondaryTooltip: m,
1433
+ onClick: u,
1434
+ onMouseEnter: l,
1435
+ ...f
1436
+ } = n;
1437
+ c(f, !1);
1438
+ const v = h(), w = /* @__PURE__ */ g(
1439
+ v.Button.Button,
1440
+ {
1441
+ variant: s ? "secondary" : "outline",
1442
+ className: i(
1443
+ e,
1444
+ "bn-flex bn-items-center bn-gap-1 bn-rounded-full bn-h-7 bn-px-2.5"
1445
+ ),
1446
+ onClick: u,
1447
+ onMouseEnter: l,
1448
+ ref: t,
1449
+ children: [
1450
+ /* @__PURE__ */ a("span", { children: r }),
1451
+ /* @__PURE__ */ a("span", { children: o })
1452
+ ]
1453
+ }
1454
+ );
1455
+ return d ? /* @__PURE__ */ g(v.Tooltip.Tooltip, { children: [
1456
+ /* @__PURE__ */ a(v.Tooltip.TooltipTrigger, { asChild: !0, children: w }),
1457
+ /* @__PURE__ */ g(
1458
+ v.Tooltip.TooltipContent,
1459
+ {
1460
+ className: "bn-flex bn-flex-col bn-items-center bn-whitespace-pre-wrap",
1461
+ children: [
1462
+ /* @__PURE__ */ a("span", { children: d }),
1463
+ m && /* @__PURE__ */ a("span", { children: m })
1464
+ ]
1465
+ }
1466
+ )
1467
+ ] }) : w;
1468
+ }), Qn = p((n, t) => {
1469
+ const { className: e, children: o, ...r } = n;
1470
+ c(r);
1471
+ const s = h();
1472
+ return /* @__PURE__ */ a(s.Tooltip.TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ a(
1473
+ "div",
1474
+ {
1475
+ className: i(
1476
+ e,
1477
+ "bn-flex bn-flex-row bn-flex-wrap bn-gap-1 bn-w-full"
1478
+ ),
1479
+ ref: t,
1480
+ children: o
1481
+ }
1482
+ ) });
1483
+ }), Xn = p((n, t) => {
1484
+ const { className: e, children: o, onClick: r, label: s, ...d } = n;
1485
+ c(d);
1486
+ const m = h();
1178
1487
  return /* @__PURE__ */ a(
1179
- u.Button.Button,
1488
+ m.Button.Button,
1180
1489
  {
1181
1490
  type: "submit",
1182
1491
  className: e,
1183
1492
  "aria-label": s,
1184
- ref: n,
1493
+ ref: t,
1185
1494
  onClick: r,
1186
1495
  children: o
1187
1496
  }
1188
1497
  );
1189
- }), Bn = p((t, n) => {
1190
- const { className: e, accept: o, value: r, placeholder: s, onChange: i, ...u } = t;
1191
- c(u);
1192
- const m = g();
1498
+ }), Yn = p((n, t) => {
1499
+ const { className: e, accept: o, value: r, placeholder: s, onChange: d, ...m } = n;
1500
+ c(m);
1501
+ const u = h();
1193
1502
  return /* @__PURE__ */ a(
1194
- m.Input.Input,
1503
+ u.Input.Input,
1195
1504
  {
1196
1505
  type: "file",
1197
1506
  className: e,
1198
- ref: n,
1507
+ ref: t,
1199
1508
  accept: o,
1200
1509
  value: r ? r.name : void 0,
1201
- onChange: async (b) => i == null ? void 0 : i(b.target.files[0]),
1510
+ onChange: async (l) => d == null ? void 0 : d(l.target.files[0]),
1202
1511
  placeholder: s
1203
1512
  }
1204
1513
  );
1205
- }), kn = p((t, n) => {
1206
- const { className: e, isSelected: o, onClick: r, item: s, id: i, ...u } = t;
1207
- c(u);
1208
- const m = L(null);
1209
- return z(() => {
1210
- if (!m.current || !o)
1514
+ }), Zn = p((n, t) => {
1515
+ const { className: e, isSelected: o, onClick: r, item: s, id: d, ...m } = n;
1516
+ c(m);
1517
+ const u = z(null);
1518
+ return V(() => {
1519
+ if (!u.current || !o)
1211
1520
  return;
1212
- const b = F(
1213
- m.current,
1521
+ const l = B(
1522
+ u.current,
1214
1523
  document.querySelector(".bn-grid-suggestion-menu")
1215
1524
  );
1216
- b === "top" ? m.current.scrollIntoView(!0) : b === "bottom" && m.current.scrollIntoView(!1);
1525
+ l === "top" ? u.current.scrollIntoView(!0) : l === "bottom" && u.current.scrollIntoView(!1);
1217
1526
  }, [o]), /* @__PURE__ */ a(
1218
1527
  "div",
1219
1528
  {
1220
1529
  className: e,
1221
- ref: B([n, m]),
1222
- id: i,
1530
+ ref: P([t, u]),
1531
+ id: d,
1223
1532
  role: "option",
1224
1533
  onClick: r,
1225
1534
  "aria-selected": o || void 0,
1226
1535
  children: s.icon
1227
1536
  }
1228
1537
  );
1229
- }), Ln = p((t, n) => {
1538
+ }), et = p((n, t) => {
1230
1539
  const {
1231
1540
  className: e,
1232
1541
  children: o,
1233
1542
  // unused, using "dots" instead
1234
1543
  columns: r,
1235
1544
  ...s
1236
- } = t;
1545
+ } = n;
1237
1546
  return c(s), /* @__PURE__ */ a(
1238
1547
  "div",
1239
1548
  {
1240
1549
  className: e,
1241
1550
  style: { gridColumn: `1 / ${r + 1}` },
1242
- ref: n,
1551
+ ref: t,
1243
1552
  children: o
1244
1553
  }
1245
1554
  );
1246
- }), zn = {
1555
+ }), nt = {
1247
1556
  FormattingToolbar: {
1248
- Root: D,
1249
- Button: R,
1250
- Select: Pn
1557
+ Root: R,
1558
+ Button: k,
1559
+ Select: Un
1251
1560
  },
1252
1561
  FilePanel: {
1253
- Root: un,
1254
- Button: Fn,
1255
- FileInput: Bn,
1256
- TabPanel: pn,
1257
- TextInput: fn
1562
+ Root: Tn,
1563
+ Button: Xn,
1564
+ FileInput: Yn,
1565
+ TabPanel: In,
1566
+ TextInput: Mn
1258
1567
  },
1259
1568
  LinkToolbar: {
1260
- Root: D,
1261
- Button: R
1569
+ Root: R,
1570
+ Button: k
1262
1571
  },
1263
1572
  SideMenu: {
1264
- Root: Nn,
1265
- Button: xn
1573
+ Root: Fn,
1574
+ Button: Bn
1266
1575
  },
1267
1576
  SuggestionMenu: {
1268
- Root: yn,
1269
- Item: Tn,
1270
- EmptyItem: Sn,
1271
- Label: Mn,
1272
- Loader: In
1577
+ Root: zn,
1578
+ Item: En,
1579
+ EmptyItem: Vn,
1580
+ Label: An,
1581
+ Loader: $n
1273
1582
  },
1274
1583
  GridSuggestionMenu: {
1275
- Root: wn,
1276
- Item: kn,
1277
- EmptyItem: Cn,
1278
- Loader: Ln
1584
+ Root: Pn,
1585
+ Item: Zn,
1586
+ EmptyItem: Ln,
1587
+ Loader: et
1279
1588
  },
1280
1589
  TableHandle: {
1281
- Root: Rn,
1282
- ExtendButton: Dn
1590
+ Root: Gn,
1591
+ ExtendButton: jn
1592
+ },
1593
+ Comments: {
1594
+ Comment: Kn,
1595
+ Editor: Wn,
1596
+ Card: Hn,
1597
+ CardSection: On
1283
1598
  },
1284
1599
  Generic: {
1600
+ Badge: {
1601
+ Root: Jn,
1602
+ Group: Qn
1603
+ },
1285
1604
  Toolbar: {
1286
- Root: D,
1287
- Button: R
1605
+ Root: R,
1606
+ Button: k
1288
1607
  },
1289
1608
  Form: {
1290
- Root: on,
1291
- TextInput: rn
1609
+ Root: fn,
1610
+ TextInput: gn
1292
1611
  },
1293
1612
  Menu: {
1294
- Root: sn,
1295
- Trigger: dn,
1296
- Dropdown: bn,
1297
- Divider: cn,
1298
- Label: mn,
1299
- Item: ln
1613
+ Root: vn,
1614
+ Trigger: Nn,
1615
+ Dropdown: xn,
1616
+ Divider: Cn,
1617
+ Label: yn,
1618
+ Item: wn,
1619
+ Button: Sn
1300
1620
  },
1301
1621
  Popover: {
1302
- Root: gn,
1303
- Trigger: hn,
1304
- Content: vn
1622
+ Root: Dn,
1623
+ Trigger: Rn,
1624
+ Content: kn
1305
1625
  }
1306
1626
  }
1307
- }, Wn = (t) => {
1308
- const { className: n, shadCNComponents: e, ...o } = t, r = k(() => ({
1309
- ...tn,
1627
+ }, tt = (n) => {
1628
+ const { className: t, shadCNComponents: e, ...o } = n, r = L(() => ({
1629
+ ...pn,
1310
1630
  ...e
1311
1631
  }), [e]);
1312
- return /* @__PURE__ */ a(ce.Provider, { value: r, children: /* @__PURE__ */ a(pe.Provider, { value: zn, children: /* @__PURE__ */ a(
1313
- fe,
1632
+ return /* @__PURE__ */ a(fe.Provider, { value: r, children: /* @__PURE__ */ a(ye.Provider, { value: nt, children: /* @__PURE__ */ a(
1633
+ Se,
1314
1634
  {
1315
- className: ue("bn-shadcn", n || ""),
1635
+ className: ve("bn-shadcn", t || ""),
1316
1636
  ...o
1317
1637
  }
1318
1638
  ) }) });
1319
1639
  };
1320
1640
  export {
1321
- Wn as BlockNoteView,
1322
- zn as components
1641
+ tt as BlockNoteView,
1642
+ nt as components
1323
1643
  };
1324
1644
  //# sourceMappingURL=blocknote-shadcn.js.map