🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

@blocknote/shadcn

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocknote/shadcn - npm Package Compare versions

Comparing version

to
0.25.0

@@ -1,26 +0,60 @@

import { jsx as a, jsxs as v, Fragment as me } from "react/jsx-runtime";
import { assertEmpty as c, mergeCSSClasses as ue } from "@blocknote/core";
import { elementOverflow as F, mergeRefs as B, ComponentsContext as pe, BlockNoteViewRaw as fe } from "@blocknote/react";
import * as l from "react";
import { createContext as ge, useContext as he, forwardRef as p, useMemo as k, useRef as L, useEffect as z } from "react";
import { FormProvider as ve, useFormContext as Ne, useForm as xe } from "react-hook-form";
import { cva as T } from "class-variance-authority";
import { clsx as we } from "clsx";
import { extendTailwindMerge as Ce } from "tailwind-merge";
import { Slot as V } from "@radix-ui/react-slot";
import * as h from "@radix-ui/react-dropdown-menu";
import { ChevronRight as E, Check as j, Circle as ye, ChevronDown as $, ChevronUp as Se } from "lucide-react";
import { jsx as a, jsxs as g, Fragment as he } from "react/jsx-runtime";
import { assertEmpty as c, mergeCSSClasses as ve } from "@blocknote/core";
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";
import * as b from "react";
import { createContext as Te, useContext as Ie, forwardRef as p, useMemo as L, useRef as z, useEffect as V, useState as Me } from "react";
import { FormProvider as De, useFormContext as Re, useForm as ke } from "react-hook-form";
import * as S from "@radix-ui/react-avatar";
import { clsx as Fe } from "clsx";
import { extendTailwindMerge as Be } from "tailwind-merge";
import { cva as I } from "class-variance-authority";
import { Slot as E } from "@radix-ui/react-slot";
import * as N from "@radix-ui/react-dropdown-menu";
import { ChevronRight as A, Check as $, Circle as Pe, ChevronDown as j, ChevronUp as Le } from "lucide-react";
import * as G from "@radix-ui/react-label";
import * as M from "@radix-ui/react-popover";
import * as N from "@radix-ui/react-select";
import * as C from "@radix-ui/react-tabs";
import * as x from "@radix-ui/react-select";
import * as y from "@radix-ui/react-tabs";
import * as U from "@radix-ui/react-toggle";
import * as S from "@radix-ui/react-tooltip";
const Te = Ce({
import * as T from "@radix-ui/react-tooltip";
const ze = Be({
prefix: "bn-"
});
function d(...t) {
return Te(we(t));
function i(...n) {
return ze(Fe(n));
}
const Me = T(
const H = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
S.Root,
{
ref: e,
className: i(
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
n
),
...t
}
));
H.displayName = S.Root.displayName;
const O = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
S.Image,
{
ref: e,
className: i("aspect-square h-full w-full", n),
...t
}
));
O.displayName = S.Image.displayName;
const q = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
S.Fallback,
{
ref: e,
className: i(
"flex h-full w-full items-center justify-center rounded-full bg-muted",
n
),
...t
}
));
q.displayName = S.Fallback.displayName;
const Ve = I(
"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",

@@ -41,6 +75,6 @@ {

);
function Ie({ className: t, variant: n, ...e }) {
return /* @__PURE__ */ a("div", { className: d(Me({ variant: n }), t), ...e });
function Ee({ className: n, variant: t, ...e }) {
return /* @__PURE__ */ a("div", { className: i(Ve({ variant: t }), n), ...e });
}
const De = T(
const Ae = I(
"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",

@@ -69,7 +103,7 @@ {

}
), O = l.forwardRef(
({ className: t, variant: n, size: e, asChild: o = !1, ...r }, s) => /* @__PURE__ */ a(
o ? V : "button",
), K = b.forwardRef(
({ className: n, variant: t, size: e, asChild: o = !1, ...r }, s) => /* @__PURE__ */ a(
o ? E : "button",
{
className: d(De({ variant: n, size: e, className: t })),
className: i(Ae({ variant: t, size: e, className: n })),
ref: s,

@@ -81,64 +115,64 @@ type: "button",

);
O.displayName = "Button";
const H = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
K.displayName = "Button";
const W = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
"div",
{
ref: e,
className: d(
className: i(
"bn-rounded-lg bn-border bn-bg-card bn-text-card-foreground bn-shadow-sm",
t
n
),
...n
...t
}
));
H.displayName = "Card";
const Re = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
W.displayName = "Card";
const $e = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
"div",
{
ref: e,
className: d("bn-flex bn-flex-col bn-space-y-1.5 bn-p-6", t),
...n
className: i("bn-flex bn-flex-col bn-space-y-1.5 bn-p-6", n),
...t
}
));
Re.displayName = "CardHeader";
const Pe = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
$e.displayName = "CardHeader";
const je = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
"h3",
{
ref: e,
className: d(
className: i(
"bn-text-2xl bn-font-semibold bn-leading-none bn-tracking-tight",
t
n
),
...n
...t
}
));
Pe.displayName = "CardTitle";
const Fe = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
je.displayName = "CardTitle";
const Ge = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
"p",
{
ref: e,
className: d("bn-text-sm bn-text-muted-foreground", t),
...n
className: i("bn-text-sm bn-text-muted-foreground", n),
...t
}
));
Fe.displayName = "CardDescription";
const K = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a("div", { ref: e, className: d("bn-p-6 bn-pt-0", t), ...n }));
K.displayName = "CardContent";
const Be = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
Ge.displayName = "CardDescription";
const _ = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a("div", { ref: e, className: i("bn-p-6 bn-pt-0", n), ...t }));
_.displayName = "CardContent";
const Ue = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
"div",
{
ref: e,
className: d("bn-flex bn-items-center bn-p-6 bn-pt-0", t),
...n
className: i("bn-flex bn-items-center bn-p-6 bn-pt-0", n),
...t
}
));
Be.displayName = "CardFooter";
const ke = h.Root, Le = h.Trigger, ze = h.Sub, q = l.forwardRef(({ className: t, inset: n, children: e, ...o }, r) => /* @__PURE__ */ v(
h.SubTrigger,
Ue.displayName = "CardFooter";
const He = N.Root, Oe = N.Trigger, qe = N.Sub, J = b.forwardRef(({ className: n, inset: t, children: e, ...o }, r) => /* @__PURE__ */ g(
N.SubTrigger,
{
ref: r,
className: d(
className: i(
"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",
n && "bn-pl-8",
t
t && "bn-pl-8",
n
),

@@ -148,29 +182,29 @@ ...o,

e,
/* @__PURE__ */ a(E, { className: "bn-ml-auto bn-h-4 bn-w-4" })
/* @__PURE__ */ a(A, { className: "bn-ml-auto bn-h-4 bn-w-4" })
]
}
));
q.displayName = h.SubTrigger.displayName;
const W = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
h.SubContent,
J.displayName = N.SubTrigger.displayName;
const Q = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
N.SubContent,
{
ref: e,
className: d(
className: i(
"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",
t
n
),
...n
...t
}
));
W.displayName = h.SubContent.displayName;
const A = l.forwardRef(({ className: t, sideOffset: n = 4, ...e }, o) => (
Q.displayName = N.SubContent.displayName;
const X = b.forwardRef(({ className: n, sideOffset: t = 4, ...e }, o) => (
// <DropdownMenuPrimitive.Portal>
/* @__PURE__ */ a(
h.Content,
N.Content,
{
ref: o,
sideOffset: n,
className: d(
sideOffset: t,
className: i(
"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",
t
n
),

@@ -181,11 +215,11 @@ ...e

));
A.displayName = h.Content.displayName;
const J = l.forwardRef(({ className: t, inset: n, ...e }, o) => /* @__PURE__ */ a(
h.Item,
X.displayName = N.Content.displayName;
const Y = b.forwardRef(({ className: n, inset: t, ...e }, o) => /* @__PURE__ */ a(
N.Item,
{
ref: o,
className: d(
className: i(
"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",
n && "bn-pl-8",
t
t && "bn-pl-8",
n
),

@@ -195,10 +229,10 @@ ...e

));
J.displayName = h.Item.displayName;
const Q = l.forwardRef(({ className: t, children: n, checked: e, ...o }, r) => /* @__PURE__ */ v(
h.CheckboxItem,
Y.displayName = N.Item.displayName;
const Z = b.forwardRef(({ className: n, children: t, checked: e, ...o }, r) => /* @__PURE__ */ g(
N.CheckboxItem,
{
ref: r,
className: d(
className: i(
"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",
t
n
),

@@ -208,32 +242,32 @@ checked: e,

children: [
/* @__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" }) }) }),
n
/* @__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" }) }) }),
t
]
}
));
Q.displayName = h.CheckboxItem.displayName;
const Ve = l.forwardRef(({ className: t, children: n, ...e }, o) => /* @__PURE__ */ v(
h.RadioItem,
Z.displayName = N.CheckboxItem.displayName;
const Ke = b.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
N.RadioItem,
{
ref: o,
className: d(
className: i(
"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",
t
n
),
...e,
children: [
/* @__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" }) }) }),
n
/* @__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" }) }) }),
t
]
}
));
Ve.displayName = h.RadioItem.displayName;
const X = l.forwardRef(({ className: t, inset: n, ...e }, o) => /* @__PURE__ */ a(
h.Label,
Ke.displayName = N.RadioItem.displayName;
const ee = b.forwardRef(({ className: n, inset: t, ...e }, o) => /* @__PURE__ */ a(
N.Label,
{
ref: o,
className: d(
className: i(
"bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold",
n && "bn-pl-8",
t
t && "bn-pl-8",
n
),

@@ -243,33 +277,33 @@ ...e

));
X.displayName = h.Label.displayName;
const Y = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
h.Separator,
ee.displayName = N.Label.displayName;
const ne = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
N.Separator,
{
ref: e,
className: d("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", t),
...n
className: i("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", n),
...t
}
));
Y.displayName = h.Separator.displayName;
const Ee = T(
ne.displayName = N.Separator.displayName;
const We = I(
"bn-text-sm bn-font-medium bn-leading-none peer-disabled:bn-cursor-not-allowed peer-disabled:bn-opacity-70"
), P = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
), F = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
G.Root,
{
ref: e,
className: d(Ee(), t),
...n
className: i(We(), n),
...t
}
));
P.displayName = G.Root.displayName;
const je = ve, $e = l.createContext(
F.displayName = G.Root.displayName;
const _e = De, Je = b.createContext(
{}
), I = () => {
const t = l.useContext($e), n = l.useContext(Z), { getFieldState: e, formState: o } = Ne(), r = e(t.name, o);
if (!t)
), D = () => {
const n = b.useContext(Je), t = b.useContext(te), { getFieldState: e, formState: o } = Re(), r = e(n.name, o);
if (!n)
throw new Error("useFormField should be used within <FormField>");
const { id: s } = n;
const { id: s } = t;
return {
id: s,
name: t.name,
name: n.name,
formItemId: `${s}-form-item`,

@@ -280,38 +314,38 @@ formDescriptionId: `${s}-form-item-description`,

};
}, Z = l.createContext(
}, te = b.createContext(
{}
), Ge = l.forwardRef(({ className: t, ...n }, e) => {
const o = l.useId();
return /* @__PURE__ */ a(Z.Provider, { value: { id: o }, children: /* @__PURE__ */ a("div", { ref: e, className: d("bn-space-y-2", t), ...n }) });
), Qe = b.forwardRef(({ className: n, ...t }, e) => {
const o = b.useId();
return /* @__PURE__ */ a(te.Provider, { value: { id: o }, children: /* @__PURE__ */ a("div", { ref: e, className: i("bn-space-y-2", n), ...t }) });
});
Ge.displayName = "FormItem";
const Ue = l.forwardRef(({ className: t, ...n }, e) => {
const { error: o, formItemId: r } = I();
Qe.displayName = "FormItem";
const Xe = b.forwardRef(({ className: n, ...t }, e) => {
const { error: o, formItemId: r } = D();
return /* @__PURE__ */ a(
P,
F,
{
ref: e,
className: d(o && "bn-text-destructive", t),
className: i(o && "bn-text-destructive", n),
htmlFor: r,
...n
...t
}
);
});
Ue.displayName = "FormLabel";
const Oe = l.forwardRef(({ ...t }, n) => {
const { error: e, formItemId: o, formDescriptionId: r, formMessageId: s } = I();
Xe.displayName = "FormLabel";
const Ye = b.forwardRef(({ ...n }, t) => {
const { error: e, formItemId: o, formDescriptionId: r, formMessageId: s } = D();
return /* @__PURE__ */ a(
V,
E,
{
ref: n,
ref: t,
id: o,
"aria-describedby": e ? `${r} ${s}` : `${r}`,
"aria-invalid": !!e,
...t
...n
}
);
});
Oe.displayName = "FormControl";
const He = l.forwardRef(({ className: t, ...n }, e) => {
const { formDescriptionId: o } = I();
Ye.displayName = "FormControl";
const Ze = b.forwardRef(({ className: n, ...t }, e) => {
const { formDescriptionId: o } = D();
return /* @__PURE__ */ a(

@@ -322,11 +356,11 @@ "p",

id: o,
className: d("bn-text-sm bn-text-muted-foreground", t),
...n
className: i("bn-text-sm bn-text-muted-foreground", n),
...t
}
);
});
He.displayName = "FormDescription";
const Ke = l.forwardRef(({ className: t, children: n, ...e }, o) => {
const { error: r, formMessageId: s } = I(), i = r ? String(r == null ? void 0 : r.message) : n;
return i ? /* @__PURE__ */ a(
Ze.displayName = "FormDescription";
const en = b.forwardRef(({ className: n, children: t, ...e }, o) => {
const { error: r, formMessageId: s } = D(), d = r ? String(r == null ? void 0 : r.message) : t;
return d ? /* @__PURE__ */ a(
"p",

@@ -336,17 +370,17 @@ {

id: s,
className: d("bn-text-sm bn-font-medium bn-text-destructive", t),
className: i("bn-text-sm bn-font-medium bn-text-destructive", n),
...e,
children: i
children: d
}
) : null;
});
Ke.displayName = "FormMessage";
const _ = l.forwardRef(
({ className: t, type: n, ...e }, o) => /* @__PURE__ */ a(
en.displayName = "FormMessage";
const oe = b.forwardRef(
({ className: n, type: t, ...e }, o) => /* @__PURE__ */ a(
"input",
{
type: n,
className: d(
type: t,
className: i(
"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",
t
n
),

@@ -358,4 +392,4 @@ ref: o,

);
_.displayName = "Input";
const qe = M.Root, We = M.Trigger, ee = l.forwardRef(({ className: t, align: n = "center", sideOffset: e = 4, ...o }, r) => (
oe.displayName = "Input";
const nn = M.Root, tn = M.Trigger, ae = b.forwardRef(({ className: n, align: t = "center", sideOffset: e = 4, ...o }, r) => (
// <PopoverPrimitive.Portal>

@@ -366,7 +400,7 @@ /* @__PURE__ */ a(

ref: r,
align: n,
align: t,
sideOffset: e,
className: d(
className: i(
"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",
t
n
),

@@ -377,55 +411,55 @@ ...o

));
ee.displayName = M.Content.displayName;
const Ae = N.Root, Je = N.Value, ne = l.forwardRef(({ className: t, children: n, ...e }, o) => /* @__PURE__ */ v(
N.Trigger,
ae.displayName = M.Content.displayName;
const on = x.Root, an = x.Value, re = b.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
x.Trigger,
{
ref: o,
className: d(
className: i(
"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",
t
n
),
...e,
children: [
n,
/* @__PURE__ */ a(N.Icon, { asChild: !0, children: /* @__PURE__ */ a($, { className: "bn-h-4 bn-w-4 bn-opacity-50" }) })
t,
/* @__PURE__ */ a(x.Icon, { asChild: !0, children: /* @__PURE__ */ a(j, { className: "bn-h-4 bn-w-4 bn-opacity-50" }) })
]
}
));
ne.displayName = N.Trigger.displayName;
const te = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
N.ScrollUpButton,
re.displayName = x.Trigger.displayName;
const se = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
x.ScrollUpButton,
{
ref: e,
className: d(
className: i(
"bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",
t
n
),
...n,
children: /* @__PURE__ */ a(Se, { className: "bn-h-4 bn-w-4" })
...t,
children: /* @__PURE__ */ a(Le, { className: "bn-h-4 bn-w-4" })
}
));
te.displayName = N.ScrollUpButton.displayName;
const oe = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
N.ScrollDownButton,
se.displayName = x.ScrollUpButton.displayName;
const ie = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
x.ScrollDownButton,
{
ref: e,
className: d(
className: i(
"bn-flex bn-cursor-default bn-items-center bn-justify-center bn-py-1",
t
n
),
...n,
children: /* @__PURE__ */ a($, { className: "bn-h-4 bn-w-4" })
...t,
children: /* @__PURE__ */ a(j, { className: "bn-h-4 bn-w-4" })
}
));
oe.displayName = N.ScrollDownButton.displayName;
const re = l.forwardRef(({ className: t, children: n, position: e = "popper", ...o }, r) => (
ie.displayName = x.ScrollDownButton.displayName;
const de = b.forwardRef(({ className: n, children: t, position: e = "popper", ...o }, r) => (
// <SelectPrimitive.Portal>
/* @__PURE__ */ v(
N.Content,
/* @__PURE__ */ g(
x.Content,
{
ref: r,
className: d(
className: i(
"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",
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",
t
n
),

@@ -435,14 +469,14 @@ position: e,

children: [
/* @__PURE__ */ a(te, {}),
/* @__PURE__ */ a(se, {}),
/* @__PURE__ */ a(
N.Viewport,
x.Viewport,
{
className: d(
className: i(
"bn-p-1",
e === "popper" && "bn-h-[var(--radix-select-trigger-height)] bn-w-full bn-min-w-[var(--radix-select-trigger-width)]"
),
children: n
children: t
}
),
/* @__PURE__ */ a(oe, {})
/* @__PURE__ */ a(ie, {})
]

@@ -452,77 +486,89 @@ }

));
re.displayName = N.Content.displayName;
const Qe = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
N.Label,
de.displayName = x.Content.displayName;
const rn = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
x.Label,
{
ref: e,
className: d(
className: i(
"bn-py-1.5 bn-pl-8 bn-pr-2 bn-text-sm bn-font-semibold",
t
n
),
...n
...t
}
));
Qe.displayName = N.Label.displayName;
const ae = l.forwardRef(({ className: t, children: n, ...e }, o) => /* @__PURE__ */ v(
N.Item,
rn.displayName = x.Label.displayName;
const le = b.forwardRef(({ className: n, children: t, ...e }, o) => /* @__PURE__ */ g(
x.Item,
{
ref: o,
className: d(
className: i(
"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",
t
n
),
...e,
children: [
/* @__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" }) }) }),
/* @__PURE__ */ a(N.ItemText, { children: n })
/* @__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" }) }) }),
/* @__PURE__ */ a(x.ItemText, { children: t })
]
}
));
ae.displayName = N.Item.displayName;
const Xe = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
N.Separator,
le.displayName = x.Item.displayName;
const sn = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
x.Separator,
{
ref: e,
className: d("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", t),
...n
className: i("bn--mx-1 bn-my-1 bn-h-px bn-bg-muted", n),
...t
}
));
Xe.displayName = N.Separator.displayName;
const Ye = C.Root, se = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
C.List,
sn.displayName = x.Separator.displayName;
function dn({
className: n,
...t
}) {
return /* @__PURE__ */ a(
"div",
{
className: i("animate-pulse rounded-md bg-primary/10", n),
...t
}
);
}
const ln = y.Root, be = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
y.List,
{
ref: e,
className: d(
className: i(
"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",
t
n
),
...n
...t
}
));
se.displayName = C.List.displayName;
const ie = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
C.Trigger,
be.displayName = y.List.displayName;
const ce = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
y.Trigger,
{
ref: e,
className: d(
className: i(
"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",
t
n
),
...n
...t
}
));
ie.displayName = C.Trigger.displayName;
const de = l.forwardRef(({ className: t, ...n }, e) => /* @__PURE__ */ a(
C.Content,
ce.displayName = y.Trigger.displayName;
const me = b.forwardRef(({ className: n, ...t }, e) => /* @__PURE__ */ a(
y.Content,
{
ref: e,
className: d(
className: i(
"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",
t
n
),
...n
...t
}
));
de.displayName = C.Content.displayName;
const Ze = T(
me.displayName = y.Content.displayName;
const bn = I(
"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",

@@ -546,19 +592,19 @@ {

}
), be = l.forwardRef(({ className: t, variant: n, size: e, ...o }, r) => /* @__PURE__ */ a(
), ue = b.forwardRef(({ className: n, variant: t, size: e, ...o }, r) => /* @__PURE__ */ a(
U.Root,
{
ref: r,
className: d(Ze({ variant: n, size: e, className: t })),
className: i(bn({ variant: t, size: e, className: n })),
...o
}
));
be.displayName = U.Root.displayName;
const _e = S.Provider, en = S.Root, nn = S.Trigger, le = l.forwardRef(({ className: t, sideOffset: n = 4, ...e }, o) => /* @__PURE__ */ a(
S.Content,
ue.displayName = U.Root.displayName;
const cn = T.Provider, mn = T.Root, un = T.Trigger, pe = b.forwardRef(({ className: n, sideOffset: t = 4, ...e }, o) => /* @__PURE__ */ a(
T.Content,
{
ref: o,
sideOffset: n,
className: d(
sideOffset: t,
className: i(
"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",
t
n
),

@@ -568,72 +614,80 @@ ...e

));
le.displayName = S.Content.displayName;
const tn = {
pe.displayName = T.Content.displayName;
const pn = {
Avatar: {
Avatar: H,
AvatarFallback: q,
AvatarImage: O
},
Badge: {
Badge: Ie
Badge: Ee
},
Button: {
Button: O
Button: K
},
Card: {
Card: H,
CardContent: K
Card: W,
CardContent: _
},
DropdownMenu: {
DropdownMenu: ke,
DropdownMenuCheckboxItem: Q,
DropdownMenuContent: A,
DropdownMenuItem: J,
DropdownMenuLabel: X,
DropdownMenuSeparator: Y,
DropdownMenuSub: ze,
DropdownMenuSubContent: W,
DropdownMenuSubTrigger: q,
DropdownMenuTrigger: Le
DropdownMenu: He,
DropdownMenuCheckboxItem: Z,
DropdownMenuContent: X,
DropdownMenuItem: Y,
DropdownMenuLabel: ee,
DropdownMenuSeparator: ne,
DropdownMenuSub: qe,
DropdownMenuSubContent: Q,
DropdownMenuSubTrigger: J,
DropdownMenuTrigger: Oe
},
Form: {
Form: je
Form: _e
},
Input: {
Input: _
Input: oe
},
Label: {
Label: P
Label: F
},
Popover: {
Popover: qe,
PopoverContent: ee,
PopoverTrigger: We
Popover: nn,
PopoverContent: ae,
PopoverTrigger: tn
},
Select: {
Select: Ae,
SelectContent: re,
SelectItem: ae,
SelectTrigger: ne,
SelectValue: Je
Select: on,
SelectContent: de,
SelectItem: le,
SelectTrigger: re,
SelectValue: an
},
Skeleton: {
Skeleton: dn
},
Tabs: {
Tabs: Ye,
TabsContent: de,
TabsList: se,
TabsTrigger: ie
Tabs: ln,
TabsContent: me,
TabsList: be,
TabsTrigger: ce
},
Toggle: {
Toggle: be
Toggle: ue
},
Tooltip: {
Tooltip: en,
TooltipContent: le,
TooltipProvider: _e,
TooltipTrigger: nn
Tooltip: mn,
TooltipContent: pe,
TooltipProvider: cn,
TooltipTrigger: un
}
}, ce = ge(void 0);
function g() {
return he(ce);
}, fe = Te(void 0);
function h() {
return Ie(fe);
}
const on = (t) => {
const { children: n, ...e } = t;
const fn = (n) => {
const { children: t, ...e } = n;
c(e);
const o = g(), r = xe();
return /* @__PURE__ */ a(o.Form.Form, { ...r, children: n });
}, rn = p((t, n) => {
const o = h(), r = ke();
return /* @__PURE__ */ a(o.Form.Form, { ...r, children: t });
}, gn = p((n, t) => {
const {

@@ -645,16 +699,16 @@ className: e,

// TODO: implement
value: i,
autoFocus: u,
placeholder: m,
onKeyDown: b,
value: d,
autoFocus: m,
placeholder: u,
onKeyDown: l,
onChange: f,
onSubmit: x,
onSubmit: v,
...w
} = t;
} = n;
c(w);
const y = g();
return r ? /* @__PURE__ */ v("div", { children: [
/* @__PURE__ */ a(y.Label.Label, { htmlFor: r, children: r }),
const C = h();
return r ? /* @__PURE__ */ g("div", { children: [
/* @__PURE__ */ a(C.Label.Label, { htmlFor: r, children: r }),
/* @__PURE__ */ a(
y.Input.Input,
C.Input.Input,
{

@@ -664,27 +718,27 @@ className: e,

name: o,
autoFocus: u,
placeholder: m,
value: i,
onKeyDown: b,
autoFocus: m,
placeholder: u,
value: d,
onKeyDown: l,
onChange: f,
onSubmit: x
onSubmit: v
}
)
] }) : /* @__PURE__ */ a(
y.Input.Input,
C.Input.Input,
{
"aria-label": o,
name: o,
autoFocus: u,
placeholder: m,
value: i,
onKeyDown: b,
autoFocus: m,
placeholder: u,
value: d,
onKeyDown: l,
onChange: f,
onSubmit: x,
ref: n
onSubmit: v,
ref: t
}
);
}), an = (t) => p(
(n, e) => /* @__PURE__ */ a(
t,
}), hn = (n) => p(
(t, e) => /* @__PURE__ */ a(
n,
{

@@ -698,9 +752,9 @@ onPointerDown: (o) => {

},
...n,
...t,
ref: e
}
)
), sn = (t) => {
), vn = (n) => {
const {
children: n,
children: t,
onOpenChange: e,

@@ -711,17 +765,24 @@ position: o,

...s
} = t;
} = n;
c(s);
const i = g();
const d = h();
return r ? /* @__PURE__ */ a(
i.DropdownMenu.DropdownMenuSub,
d.DropdownMenu.DropdownMenuSub,
{
onOpenChange: e,
children: n
children: t
}
) : /* @__PURE__ */ a(i.DropdownMenu.DropdownMenu, { onOpenChange: e, children: n });
}, dn = (t) => {
const { children: n, sub: e, ...o } = t;
) : /* @__PURE__ */ a(
d.DropdownMenu.DropdownMenu,
{
modal: !1,
onOpenChange: e,
children: t
}
);
}, Nn = (n) => {
const { children: t, sub: e, ...o } = n;
c(o);
const r = g(), s = k(
() => an(
const r = h(), s = L(
() => hn(
r.DropdownMenu.DropdownMenuTrigger

@@ -731,37 +792,37 @@ ),

);
return e ? /* @__PURE__ */ a(r.DropdownMenu.DropdownMenuSubTrigger, { children: n }) : /* @__PURE__ */ a(s, { asChild: !0, ...o, children: n });
}, bn = p((t, n) => {
const { className: e, children: o, sub: r, ...s } = t;
return e ? /* @__PURE__ */ a(r.DropdownMenu.DropdownMenuSubTrigger, { children: t }) : /* @__PURE__ */ a(s, { asChild: !0, ...o, children: t });
}, xn = p((n, t) => {
const { className: e, children: o, sub: r, ...s } = n;
c(s);
const i = g();
const d = h();
return r ? /* @__PURE__ */ a(
i.DropdownMenu.DropdownMenuSubContent,
d.DropdownMenu.DropdownMenuSubContent,
{
className: e,
ref: n,
ref: t,
children: o
}
) : /* @__PURE__ */ a(
i.DropdownMenu.DropdownMenuContent,
d.DropdownMenu.DropdownMenuContent,
{
className: e,
ref: n,
ref: t,
children: o
}
);
}), ln = p((t, n) => {
const { className: e, children: o, icon: r, checked: s, subTrigger: i, onClick: u, ...m } = t;
c(m);
const b = g();
return i ? /* @__PURE__ */ v(me, { children: [
}), wn = p((n, t) => {
const { className: e, children: o, icon: r, checked: s, subTrigger: d, onClick: m, ...u } = n;
c(u);
const l = h();
return d ? /* @__PURE__ */ g(he, { children: [
r,
o
] }) : s !== void 0 ? /* @__PURE__ */ v(
b.DropdownMenu.DropdownMenuCheckboxItem,
] }) : s !== void 0 ? /* @__PURE__ */ g(
l.DropdownMenu.DropdownMenuCheckboxItem,
{
className: d(e, "bn-gap-1"),
ref: n,
className: i(e, "bn-gap-1", s ? "" : "bn-px-2"),
ref: t,
checked: s,
onClick: u,
...m,
onClick: m,
...u,
children: [

@@ -772,20 +833,20 @@ r,

}
) : /* @__PURE__ */ v(
b.DropdownMenu.DropdownMenuItem,
) : /* @__PURE__ */ g(
l.DropdownMenu.DropdownMenuItem,
{
className: e,
ref: n,
onClick: u,
...m,
ref: t,
onClick: m,
...u,
children: [
r,
o,
i && /* @__PURE__ */ a(E, { className: "bn-ml-auto bn-h-4 bn-w-4" })
d && /* @__PURE__ */ a(A, { className: "bn-ml-auto bn-h-4 bn-w-4" })
]
}
);
}), cn = p((t, n) => {
const { className: e, ...o } = t;
}), Cn = p((n, t) => {
const { className: e, ...o } = n;
c(o);
const r = g();
const r = h();
return /* @__PURE__ */ a(

@@ -795,9 +856,9 @@ r.DropdownMenu.DropdownMenuSeparator,

className: e,
ref: n
ref: t
}
);
}), mn = p((t, n) => {
const { className: e, children: o, ...r } = t;
}), yn = p((n, t) => {
const { className: e, children: o, ...r } = n;
c(r);
const s = g();
const s = h();
return /* @__PURE__ */ a(

@@ -807,65 +868,97 @@ s.DropdownMenu.DropdownMenuLabel,

className: e,
ref: n,
ref: t,
children: o
}
);
}), un = p((t, n) => {
}), Sn = p((n, t) => {
const {
className: e,
children: o,
icon: r,
onClick: s,
onDragEnd: d,
onDragStart: m,
draggable: u,
label: l,
...f
} = n;
c(f, !1);
const v = h();
return /* @__PURE__ */ g(
v.Button.Button,
{
variant: "ghost",
className: i(e, "bn-text-gray-400"),
ref: t,
"aria-label": l,
onClick: s,
onDragStart: m,
onDragEnd: d,
draggable: u,
...f,
children: [
r,
o
]
}
);
}), Tn = p((n, t) => {
const {
className: e,
tabs: o,
defaultOpenTab: r,
openTab: s,
setOpenTab: i,
loading: u,
setOpenTab: d,
loading: m,
// TODO: implement loader
...m
} = t;
c(m);
const b = g();
return /* @__PURE__ */ v(
b.Tabs.Tabs,
...u
} = n;
c(u);
const l = h();
return /* @__PURE__ */ g(
l.Tabs.Tabs,
{
className: d(e, "bn-bg-popover bn-p-2 bn-rounded-lg"),
ref: n,
className: i(e, "bn-bg-popover bn-p-2 bn-rounded-lg"),
ref: t,
value: s,
defaultValue: r,
onValueChange: i,
onValueChange: d,
children: [
/* @__PURE__ */ a(b.Tabs.TabsList, { children: o.map((f) => /* @__PURE__ */ a(b.Tabs.TabsTrigger, { value: f.name, children: f.name }, f.name)) }),
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))
/* @__PURE__ */ a(l.Tabs.TabsList, { children: o.map((f) => /* @__PURE__ */ a(l.Tabs.TabsTrigger, { value: f.name, children: f.name }, f.name)) }),
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))
]
}
);
}), pn = p((t, n) => {
const { className: e, children: o, ...r } = t;
}), In = p((n, t) => {
const { className: e, children: o, ...r } = n;
return c(r), /* @__PURE__ */ a(
"div",
{
className: d(
className: i(
e,
"bn-flex bn-flex-col bn-gap-2 bn-items-start bn-justify-center"
),
ref: n,
ref: t,
children: o
}
);
}), fn = p((t, n) => {
const { className: e, value: o, placeholder: r, onKeyDown: s, onChange: i, ...u } = t;
c(u);
const m = g();
}), Mn = p((n, t) => {
const { className: e, value: o, placeholder: r, onKeyDown: s, onChange: d, ...m } = n;
c(m);
const u = h();
return /* @__PURE__ */ a(
m.Input.Input,
u.Input.Input,
{
"data-test": "embed-input",
className: d(e, "bn-w-80"),
ref: n,
className: i(e, "bn-w-80"),
ref: t,
value: o,
placeholder: r,
onKeyDown: s,
onChange: i
onChange: d
}
);
}), gn = (t) => {
}), Dn = (n) => {
const {
children: n,
children: t,
opened: e,

@@ -875,22 +968,22 @@ position: o,

...r
} = t;
} = n;
c(r);
const s = g();
return /* @__PURE__ */ a(s.Popover.Popover, { open: e, children: n });
}, hn = p(
(t, n) => {
const { children: e, ...o } = t;
const s = h();
return /* @__PURE__ */ a(s.Popover.Popover, { open: e, children: t });
}, Rn = p(
(n, t) => {
const { children: e, ...o } = n;
c(o);
const r = g();
return /* @__PURE__ */ a(r.Popover.PopoverTrigger, { ref: n, asChild: !0, children: e });
const r = h();
return /* @__PURE__ */ a(r.Popover.PopoverTrigger, { ref: t, asChild: !0, children: e });
}
), vn = p((t, n) => {
const { className: e, variant: o, children: r, ...s } = t;
), kn = p((n, t) => {
const { className: e, variant: o, children: r, ...s } = n;
c(s);
const i = g();
const d = h();
return /* @__PURE__ */ a(
i.Popover.PopoverContent,
d.Popover.PopoverContent,
{
sideOffset: 8,
className: d(
className: i(
e,

@@ -900,10 +993,10 @@ "bn-flex bn-flex-col bn-gap-2",

),
ref: n,
ref: t,
children: r
}
);
}), Nn = p((t, n) => {
const { className: e, children: o, ...r } = t;
return c(r, !1), /* @__PURE__ */ a("div", { className: e, ref: n, ...r, children: o });
}), xn = p((t, n) => {
}), Fn = p((n, t) => {
const { className: e, children: o, ...r } = n;
return c(r, !1), /* @__PURE__ */ a("div", { className: e, ref: t, ...r, children: o });
}), Bn = p((n, t) => {
const {

@@ -914,21 +1007,21 @@ className: e,

onClick: s,
onDragEnd: i,
onDragStart: u,
draggable: m,
label: b,
onDragEnd: d,
onDragStart: m,
draggable: u,
label: l,
...f
} = t;
} = n;
c(f, !1);
const x = g();
return /* @__PURE__ */ v(
x.Button.Button,
const v = h();
return /* @__PURE__ */ g(
v.Button.Button,
{
variant: "ghost",
className: d(e, "bn-text-gray-400"),
ref: n,
"aria-label": b,
className: i(e, "bn-text-gray-400"),
ref: t,
"aria-label": l,
onClick: s,
onDragStart: u,
onDragEnd: i,
draggable: m,
onDragStart: m,
onDragEnd: d,
draggable: u,
...f,

@@ -941,5 +1034,5 @@ children: [

);
}), wn = p((t, n) => {
const { className: e, children: o, id: r, columns: s, ...i } = t;
return c(i), /* @__PURE__ */ a(
}), Pn = p((n, t) => {
const { className: e, children: o, id: r, columns: s, ...d } = n;
return c(d), /* @__PURE__ */ a(
"div",

@@ -949,3 +1042,3 @@ {

style: { gridTemplateColumns: `repeat(${s}, 1fr)` },
ref: n,
ref: t,
id: r,

@@ -956,4 +1049,4 @@ role: "grid",

);
}), Cn = p((t, n) => {
const { className: e, children: o, columns: r, ...s } = t;
}), Ln = p((n, t) => {
const { className: e, children: o, columns: r, ...s } = n;
return c(s), /* @__PURE__ */ a(

@@ -964,8 +1057,8 @@ "div",

style: { gridColumn: `1 / ${r + 1}` },
ref: n,
ref: t,
children: o
}
);
}), yn = p((t, n) => {
const { className: e, children: o, id: r, ...s } = t;
}), zn = p((n, t) => {
const { className: e, children: o, id: r, ...s } = n;
return c(s), /* @__PURE__ */ a(

@@ -976,45 +1069,45 @@ "div",

role: "listbox",
className: d(
className: i(
"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",
e
),
ref: n,
ref: t,
children: o
}
);
}), Sn = p((t, n) => {
const { className: e, children: o, ...r } = t;
}), Vn = p((n, t) => {
const { className: e, children: o, ...r } = n;
return c(r), /* @__PURE__ */ a(
"div",
{
className: d(
className: i(
"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",
e
),
ref: n,
ref: t,
children: /* @__PURE__ */ a("div", { children: o })
}
);
}), Tn = p((t, n) => {
const e = g(), { className: o, item: r, isSelected: s, onClick: i, id: u, ...m } = t;
c(m);
const b = L(null);
return z(() => {
if (!b.current || !s)
}), En = p((n, t) => {
const e = h(), { className: o, item: r, isSelected: s, onClick: d, id: m, ...u } = n;
c(u);
const l = z(null);
return V(() => {
if (!l.current || !s)
return;
const f = F(
b.current,
const f = B(
l.current,
document.querySelector(".bn-suggestion-menu")
);
f === "top" ? b.current.scrollIntoView(!0) : f === "bottom" && b.current.scrollIntoView(!1);
}, [s]), /* @__PURE__ */ v(
f === "top" ? l.current.scrollIntoView(!0) : f === "bottom" && l.current.scrollIntoView(!1);
}, [s]), /* @__PURE__ */ g(
"div",
{
className: d(
className: i(
"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",
o
),
ref: B([n, b]),
id: u,
onClick: i,
ref: P([t, l]),
id: m,
onClick: d,
role: "option",

@@ -1024,3 +1117,3 @@ "aria-selected": s || void 0,

r.icon && /* @__PURE__ */ a("div", { className: "bn-p-3", "data-position": "left", children: r.icon }),
/* @__PURE__ */ v("div", { className: "bn-flex-1", children: [
/* @__PURE__ */ g("div", { className: "bn-flex-1", children: [
/* @__PURE__ */ a("div", { className: "bn-text-base", children: r.title }),

@@ -1033,24 +1126,24 @@ /* @__PURE__ */ a("div", { className: "bn-text-xs", children: r.subtext })

);
}), Mn = p((t, n) => {
const { className: e, children: o, ...r } = t;
}), An = p((n, t) => {
const { className: e, children: o, ...r } = n;
return c(r), /* @__PURE__ */ a(
"div",
{
className: d("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold", e),
ref: n,
className: i("bn-px-2 bn-py-1.5 bn-text-sm bn-font-semibold", e),
ref: t,
children: o
}
);
}), In = p((t, n) => {
const { className: e, children: o, ...r } = t;
return c(r), /* @__PURE__ */ a("div", { className: e, ref: n, children: o });
}), Dn = p((t, n) => {
const { className: e, children: o, onMouseDown: r, onClick: s, ...i } = t;
c(i, !1);
const u = g();
}), $n = p((n, t) => {
const { className: e, children: o, ...r } = n;
return c(r), /* @__PURE__ */ a("div", { className: e, ref: t, children: o });
}), jn = p((n, t) => {
const { className: e, children: o, onMouseDown: r, onClick: s, ...d } = n;
c(d, !1);
const m = h();
return /* @__PURE__ */ a(
u.Button.Button,
m.Button.Button,
{
variant: "ghost",
className: d(
className: i(
e,

@@ -1061,10 +1154,10 @@ "bn-p-0 bn-h-full bn-w-full bn-text-gray-400",

),
ref: n,
ref: t,
onClick: s,
onMouseDown: r,
...i,
...d,
children: o
}
);
}), Rn = p((t, n) => {
}), Gn = p((n, t) => {
const {

@@ -1075,9 +1168,9 @@ className: e,

onDragStart: s,
onDragEnd: i,
style: u,
label: m,
...b
} = t;
c(b, !1);
const f = g();
onDragEnd: d,
style: m,
label: u,
...l
} = n;
c(l, !1);
const f = h();
return /* @__PURE__ */ a(

@@ -1087,26 +1180,34 @@ f.Button.Button,

variant: "ghost",
className: d(e, "bn-p-0 bn-h-fit bn-w-fit bn-text-gray-400"),
ref: n,
"aria-label": m,
className: i(e, "bn-p-0 bn-h-fit bn-w-fit bn-text-gray-400"),
ref: t,
"aria-label": u,
draggable: r,
onDragStart: s,
onDragEnd: i,
style: u,
...b,
onDragEnd: d,
style: m,
...l,
children: o
}
);
}), D = p(
(t, n) => {
const { className: e, children: o, onMouseEnter: r, onMouseLeave: s, ...i } = t;
c(i);
const u = g();
}), R = p(
(n, t) => {
const {
className: e,
children: o,
onMouseEnter: r,
onMouseLeave: s,
variant: d,
...m
} = n;
c(m);
const u = h();
return /* @__PURE__ */ a(u.Tooltip.TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ a(
"div",
{
className: d(
className: i(
e,
"bn-flex bn-gap-1 bn-p-1 bn-bg-popover bn-text-popover-foreground bn-border bn-rounded-lg bn-shadow-md"
"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",
d === "action-toolbar" ? "bn-w-fit" : ""
),
ref: n,
ref: t,
onMouseEnter: r,

@@ -1118,4 +1219,4 @@ onMouseLeave: s,

}
), R = p(
(t, n) => {
), k = p(
(n, t) => {
const {

@@ -1126,42 +1227,49 @@ className: e,

secondaryTooltip: s,
icon: i,
isSelected: u,
isDisabled: m,
onClick: b,
icon: d,
isSelected: m,
isDisabled: u,
onClick: l,
label: f,
...x
} = t;
c(x, !1);
const w = g(), y = u === void 0 ? /* @__PURE__ */ v(
w.Button.Button,
variant: v,
...w
} = n;
c(w, !1);
const C = h(), ge = m === void 0 ? /* @__PURE__ */ g(
C.Button.Button,
{
className: e,
className: i(
e,
v === "compact" ? "bn-h-6 bn-min-w-6 bn-p-0" : ""
),
variant: "ghost",
disabled: m,
onClick: b,
ref: n,
size: v === "compact" ? "sm" : "default",
disabled: u,
onClick: l,
ref: t,
"aria-label": f,
...x,
...w,
children: [
i,
d,
o
]
}
) : /* @__PURE__ */ v(
w.Toggle.Toggle,
) : /* @__PURE__ */ g(
C.Toggle.Toggle,
{
className: d(
className: i(
e,
"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground"
"data-[state=open]:bg-accent data-[state=closed]:text-accent-foreground",
v === "compact" ? "bn-h-6 bn-min-w-6 bn-p-0" : ""
),
size: v === "compact" ? "sm" : "default",
"aria-label": f,
onClick: b,
pressed: u,
disabled: m,
"data-state": u ? "on" : "off",
"data-disabled": m,
ref: n,
...x,
onClick: l,
pressed: m,
disabled: u,
"data-state": m ? "on" : "off",
"data-disabled": u,
ref: t,
...w,
children: [
i,
d,
o

@@ -1171,8 +1279,8 @@ ]

);
return /* @__PURE__ */ v(w.Tooltip.Tooltip, { children: [
/* @__PURE__ */ a(w.Tooltip.TooltipTrigger, { asChild: !0, children: y }),
/* @__PURE__ */ v(
w.Tooltip.TooltipContent,
return /* @__PURE__ */ g(C.Tooltip.Tooltip, { children: [
/* @__PURE__ */ a(C.Tooltip.TooltipTrigger, { asChild: !0, children: ge }),
/* @__PURE__ */ g(
C.Tooltip.TooltipContent,
{
className: "bn-flex bn-flex-col bn-items-center",
className: "bn-flex bn-flex-col bn-items-center bn-whitespace-pre-wrap",
children: [

@@ -1186,28 +1294,28 @@ /* @__PURE__ */ a("span", { children: r }),

}
), Pn = p((t, n) => {
const { className: e, items: o, isDisabled: r, ...s } = t;
), Un = p((n, t) => {
const { className: e, items: o, isDisabled: r, ...s } = n;
c(s);
const i = g(), u = (b) => /* @__PURE__ */ v("div", { className: "bn-flex bn-gap-1 bn-items-center", children: [
b.icon,
b.text
] }), m = o.filter((b) => b.isSelected)[0];
return m ? /* @__PURE__ */ v(
i.Select.Select,
const d = h(), m = (l) => /* @__PURE__ */ g("div", { className: "bn-flex bn-gap-1 bn-items-center", children: [
l.icon,
l.text
] }), u = o.filter((l) => l.isSelected)[0];
return u ? /* @__PURE__ */ g(
d.Select.Select,
{
value: m.text,
onValueChange: (b) => {
var f, x;
return (x = (f = o.find((w) => w.text === b)).onClick) == null ? void 0 : x.call(f);
value: u.text,
onValueChange: (l) => {
var f, v;
return (v = (f = o.find((w) => w.text === l)).onClick) == null ? void 0 : v.call(f);
},
disabled: r,
children: [
/* @__PURE__ */ a(i.Select.SelectTrigger, { className: "bn-border-none", children: /* @__PURE__ */ a(i.Select.SelectValue, {}) }),
/* @__PURE__ */ a(i.Select.SelectContent, { className: e, ref: n, children: o.map((b) => /* @__PURE__ */ a(
i.Select.SelectItem,
/* @__PURE__ */ a(d.Select.SelectTrigger, { className: "bn-border-none", children: /* @__PURE__ */ a(d.Select.SelectValue, {}) }),
/* @__PURE__ */ a(d.Select.SelectContent, { className: e, ref: t, children: o.map((l) => /* @__PURE__ */ a(
d.Select.SelectItem,
{
disabled: b.isDisabled,
value: b.text,
children: /* @__PURE__ */ a(u, { ...b })
disabled: l.isDisabled,
value: l.text,
children: /* @__PURE__ */ a(m, { ...l })
},
b.text
l.text
)) })

@@ -1217,13 +1325,214 @@ ]

) : null;
}), Fn = p((t, n) => {
const { className: e, children: o, onClick: r, label: s, ...i } = t;
c(i);
const u = g();
}), Hn = p((n, t) => {
const { className: e, children: o, ...r } = n;
c(r);
const s = h();
return /* @__PURE__ */ a(
u.Button.Button,
s.Card.Card,
{
className: i(e, "bn-w-[300px]"),
ref: t,
children: o
}
);
}), On = p((n, t) => {
const { className: e, children: o, ...r } = n;
return c(r), /* @__PURE__ */ a(
"div",
{
className: i(
e,
"bn-p-4",
e != null && e.includes("bn-thread-comments") ? "bn-flex bn-flex-col bn-gap-6 bn-border-b" : ""
),
ref: t,
children: o
}
);
}), qn = p((n, t) => {
const { authorInfo: e, timeString: o, ...r } = n;
c(r, !1);
const s = h();
return e === "loading" ? /* @__PURE__ */ g(
"div",
{
className: "bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-4",
children: [
/* @__PURE__ */ a(
s.Skeleton.Skeleton,
{
className: "bn-size-7 bn-rounded-full bn-bg-neutral-400 bn-animate-pulse"
}
),
/* @__PURE__ */ a(
s.Skeleton.Skeleton,
{
className: "bn-h-3 bn-w-32 bn-rounded-full bn-bg-neutral-400 bn-animate-pulse"
}
)
]
}
) : /* @__PURE__ */ g(
"div",
{
className: "bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-4",
children: [
/* @__PURE__ */ g(s.Avatar.Avatar, { children: [
/* @__PURE__ */ a(
s.Avatar.AvatarImage,
{
src: e.avatarUrl,
alt: e.username,
className: "bn-h-7 bn-rounded-full"
}
),
/* @__PURE__ */ a(s.Avatar.AvatarFallback, { children: e.username[0] })
] }),
/* @__PURE__ */ g(
"div",
{
className: "bn-flex bn-flex-row bn-flex-nowrap bn-items-center bn-gap-2",
children: [
/* @__PURE__ */ a("span", { className: "bn-text-sm bn-font-bold", children: e.username }),
/* @__PURE__ */ a("span", { className: "bn-text-xs", children: o })
]
}
)
]
}
);
}), Kn = p((n, t) => {
const {
className: e,
showActions: o,
authorInfo: r,
timeString: s,
actions: d,
children: m,
...u
} = n;
c(u);
const [l, f] = Me(!1), { focused: v, ref: w } = Ne(), C = d && (o === !0 || o === void 0 || o === "hover" && l || v);
return /* @__PURE__ */ g(
"div",
{
ref: t,
className: i(e, "bn-relative bn-flex bn-flex-col bn-gap-2"),
onMouseEnter: () => f(!0),
onMouseLeave: () => {
f(!1);
},
children: [
C ? /* @__PURE__ */ a(
"div",
{
className: "bn-absolute bn-right-0 bn-top-0 bn-z-10",
ref: w,
children: d
}
) : null,
/* @__PURE__ */ a(qn, { ...n }),
m
]
}
);
}), Wn = p((n, t) => {
const { className: e, onFocus: o, onBlur: r, editor: s, editable: d, ...m } = n;
return c(m), /* @__PURE__ */ a(
tt,
{
autoFocus: !0,
className: i(e, ""),
editor: n.editor,
sideMenu: !1,
slashMenu: !1,
tableHandles: !1,
filePanel: !1,
formattingToolbar: !1,
editable: d,
ref: t,
onFocus: o,
onBlur: r,
children: /* @__PURE__ */ a(
xe,
{
formattingToolbar: _n
}
)
}
);
}), _n = () => {
const n = we([]).filter(
(t) => t.key !== "nestBlockButton" && t.key !== "unnestBlockButton"
);
return /* @__PURE__ */ a(Ce, { blockTypeSelectItems: [], children: n });
}, Jn = p((n, t) => {
const {
className: e,
text: o,
icon: r,
isSelected: s,
mainTooltip: d,
secondaryTooltip: m,
onClick: u,
onMouseEnter: l,
...f
} = n;
c(f, !1);
const v = h(), w = /* @__PURE__ */ g(
v.Button.Button,
{
variant: s ? "secondary" : "outline",
className: i(
e,
"bn-flex bn-items-center bn-gap-1 bn-rounded-full bn-h-7 bn-px-2.5"
),
onClick: u,
onMouseEnter: l,
ref: t,
children: [
/* @__PURE__ */ a("span", { children: r }),
/* @__PURE__ */ a("span", { children: o })
]
}
);
return d ? /* @__PURE__ */ g(v.Tooltip.Tooltip, { children: [
/* @__PURE__ */ a(v.Tooltip.TooltipTrigger, { asChild: !0, children: w }),
/* @__PURE__ */ g(
v.Tooltip.TooltipContent,
{
className: "bn-flex bn-flex-col bn-items-center bn-whitespace-pre-wrap",
children: [
/* @__PURE__ */ a("span", { children: d }),
m && /* @__PURE__ */ a("span", { children: m })
]
}
)
] }) : w;
}), Qn = p((n, t) => {
const { className: e, children: o, ...r } = n;
c(r);
const s = h();
return /* @__PURE__ */ a(s.Tooltip.TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ a(
"div",
{
className: i(
e,
"bn-flex bn-flex-row bn-flex-wrap bn-gap-1 bn-w-full"
),
ref: t,
children: o
}
) });
}), Xn = p((n, t) => {
const { className: e, children: o, onClick: r, label: s, ...d } = n;
c(d);
const m = h();
return /* @__PURE__ */ a(
m.Button.Button,
{
type: "submit",
className: e,
"aria-label": s,
ref: n,
ref: t,
onClick: r,

@@ -1233,30 +1542,30 @@ children: o

);
}), Bn = p((t, n) => {
const { className: e, accept: o, value: r, placeholder: s, onChange: i, ...u } = t;
c(u);
const m = g();
}), Yn = p((n, t) => {
const { className: e, accept: o, value: r, placeholder: s, onChange: d, ...m } = n;
c(m);
const u = h();
return /* @__PURE__ */ a(
m.Input.Input,
u.Input.Input,
{
type: "file",
className: e,
ref: n,
ref: t,
accept: o,
value: r ? r.name : void 0,
onChange: async (b) => i == null ? void 0 : i(b.target.files[0]),
onChange: async (l) => d == null ? void 0 : d(l.target.files[0]),
placeholder: s
}
);
}), kn = p((t, n) => {
const { className: e, isSelected: o, onClick: r, item: s, id: i, ...u } = t;
c(u);
const m = L(null);
return z(() => {
if (!m.current || !o)
}), Zn = p((n, t) => {
const { className: e, isSelected: o, onClick: r, item: s, id: d, ...m } = n;
c(m);
const u = z(null);
return V(() => {
if (!u.current || !o)
return;
const b = F(
m.current,
const l = B(
u.current,
document.querySelector(".bn-grid-suggestion-menu")
);
b === "top" ? m.current.scrollIntoView(!0) : b === "bottom" && m.current.scrollIntoView(!1);
l === "top" ? u.current.scrollIntoView(!0) : l === "bottom" && u.current.scrollIntoView(!1);
}, [o]), /* @__PURE__ */ a(

@@ -1266,4 +1575,4 @@ "div",

className: e,
ref: B([n, m]),
id: i,
ref: P([t, u]),
id: d,
role: "option",

@@ -1275,3 +1584,3 @@ onClick: r,

);
}), Ln = p((t, n) => {
}), et = p((n, t) => {
const {

@@ -1283,3 +1592,3 @@ className: e,

...s
} = t;
} = n;
return c(s), /* @__PURE__ */ a(

@@ -1290,76 +1599,87 @@ "div",

style: { gridColumn: `1 / ${r + 1}` },
ref: n,
ref: t,
children: o
}
);
}), zn = {
}), nt = {
FormattingToolbar: {
Root: D,
Button: R,
Select: Pn
Root: R,
Button: k,
Select: Un
},
FilePanel: {
Root: un,
Button: Fn,
FileInput: Bn,
TabPanel: pn,
TextInput: fn
Root: Tn,
Button: Xn,
FileInput: Yn,
TabPanel: In,
TextInput: Mn
},
LinkToolbar: {
Root: D,
Button: R
Root: R,
Button: k
},
SideMenu: {
Root: Nn,
Button: xn
Root: Fn,
Button: Bn
},
SuggestionMenu: {
Root: yn,
Item: Tn,
EmptyItem: Sn,
Label: Mn,
Loader: In
Root: zn,
Item: En,
EmptyItem: Vn,
Label: An,
Loader: $n
},
GridSuggestionMenu: {
Root: wn,
Item: kn,
EmptyItem: Cn,
Loader: Ln
Root: Pn,
Item: Zn,
EmptyItem: Ln,
Loader: et
},
TableHandle: {
Root: Rn,
ExtendButton: Dn
Root: Gn,
ExtendButton: jn
},
Comments: {
Comment: Kn,
Editor: Wn,
Card: Hn,
CardSection: On
},
Generic: {
Badge: {
Root: Jn,
Group: Qn
},
Toolbar: {
Root: D,
Button: R
Root: R,
Button: k
},
Form: {
Root: on,
TextInput: rn
Root: fn,
TextInput: gn
},
Menu: {
Root: sn,
Trigger: dn,
Dropdown: bn,
Divider: cn,
Label: mn,
Item: ln
Root: vn,
Trigger: Nn,
Dropdown: xn,
Divider: Cn,
Label: yn,
Item: wn,
Button: Sn
},
Popover: {
Root: gn,
Trigger: hn,
Content: vn
Root: Dn,
Trigger: Rn,
Content: kn
}
}
}, Wn = (t) => {
const { className: n, shadCNComponents: e, ...o } = t, r = k(() => ({
...tn,
}, tt = (n) => {
const { className: t, shadCNComponents: e, ...o } = n, r = L(() => ({
...pn,
...e
}), [e]);
return /* @__PURE__ */ a(ce.Provider, { value: r, children: /* @__PURE__ */ a(pe.Provider, { value: zn, children: /* @__PURE__ */ a(
fe,
return /* @__PURE__ */ a(fe.Provider, { value: r, children: /* @__PURE__ */ a(ye.Provider, { value: nt, children: /* @__PURE__ */ a(
Se,
{
className: ue("bn-shadcn", n || ""),
className: ve("bn-shadcn", t || ""),
...o

@@ -1370,5 +1690,5 @@ }

export {
Wn as BlockNoteView,
zn as components
tt as BlockNoteView,
nt as components
};
//# sourceMappingURL=blocknote-shadcn.js.map

@@ -1,1 +0,1 @@

{"builtAt":1740756869050,"assets":[{"name":"blocknote-shadcn.umd.cjs","size":30146},{"name":"blocknote-shadcn.umd.cjs.map","size":101815}],"chunks":[{"id":"ec22802","entry":true,"initial":true,"files":["blocknote-shadcn.umd.cjs"],"names":["index"]}],"modules":[{"name":"./src/style.css","size":0,"chunks":["ec22802"]},{"name":"./src/lib/utils.ts","size":135,"chunks":["ec22802"]},{"name":"./src/components/ui/badge.tsx","size":922,"chunks":["ec22802"]},{"name":"./src/components/ui/button.tsx","size":1642,"chunks":["ec22802"]},{"name":"./src/components/ui/card.tsx","size":1644,"chunks":["ec22802"]},{"name":"./src/components/ui/dropdown-menu.tsx","size":6141,"chunks":["ec22802"]},{"name":"./src/components/ui/label.tsx","size":449,"chunks":["ec22802"]},{"name":"./src/components/ui/form.tsx","size":2869,"chunks":["ec22802"]},{"name":"./src/components/ui/input.tsx","size":729,"chunks":["ec22802"]},{"name":"./src/components/ui/popover.tsx","size":1042,"chunks":["ec22802"]},{"name":"./src/components/ui/select.tsx","size":5404,"chunks":["ec22802"]},{"name":"./src/components/ui/tabs.tsx","size":1661,"chunks":["ec22802"]},{"name":"./src/components/ui/toggle.tsx","size":1211,"chunks":["ec22802"]},{"name":"./src/components/ui/tooltip.tsx","size":969,"chunks":["ec22802"]},{"name":"./src/ShadCNComponentsContext.tsx","size":1471,"chunks":["ec22802"]},{"name":"./src/form/Form.tsx","size":282,"chunks":["ec22802"]},{"name":"./src/form/TextInput.tsx","size":1043,"chunks":["ec22802"]},{"name":"./src/menu/Menu.tsx","size":3926,"chunks":["ec22802"]},{"name":"./src/panel/Panel.tsx","size":1123,"chunks":["ec22802"]},{"name":"./src/panel/PanelTab.tsx","size":347,"chunks":["ec22802"]},{"name":"./src/panel/PanelTextInput.tsx","size":469,"chunks":["ec22802"]},{"name":"./src/popover/popover.tsx","size":1168,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenu.tsx","size":225,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenuButton.tsx","size":645,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx","size":361,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx","size":322,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenu.tsx","size":821,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuEmptyItem.tsx","size":622,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuItem.tsx","size":1885,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLabel.tsx","size":318,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLoader.tsx","size":221,"chunks":["ec22802"]},{"name":"./src/tableHandle/ExtendButton.tsx","size":714,"chunks":["ec22802"]},{"name":"./src/tableHandle/TableHandle.tsx","size":610,"chunks":["ec22802"]},{"name":"./src/toolbar/Toolbar.tsx","size":3861,"chunks":["ec22802"]},{"name":"./src/panel/PanelButton.tsx","size":408,"chunks":["ec22802"]},{"name":"./src/panel/PanelFileInput.tsx","size":496,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx","size":857,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx","size":373,"chunks":["ec22802"]},{"name":"./src/components.ts","size":1237,"chunks":["ec22802"]},{"name":"./src/BlockNoteView.tsx","size":621,"chunks":["ec22802"]},{"name":"./src/index.tsx","size":0,"chunks":["ec22802"]}]}
{"builtAt":1741102177638,"assets":[{"name":"blocknote-shadcn.cjs","size":34119},{"name":"blocknote-shadcn.cjs.map","size":120024}],"chunks":[{"id":"ec22802","entry":true,"initial":true,"files":["blocknote-shadcn.cjs"],"names":["blocknote-shadcn"]}],"modules":[{"name":"./src/style.css","size":0,"chunks":["ec22802"]},{"name":"./src/lib/utils.ts","size":135,"chunks":["ec22802"]},{"name":"./src/components/ui/avatar.tsx","size":1061,"chunks":["ec22802"]},{"name":"./src/components/ui/badge.tsx","size":924,"chunks":["ec22802"]},{"name":"./src/components/ui/button.tsx","size":1642,"chunks":["ec22802"]},{"name":"./src/components/ui/card.tsx","size":1648,"chunks":["ec22802"]},{"name":"./src/components/ui/dropdown-menu.tsx","size":6141,"chunks":["ec22802"]},{"name":"./src/components/ui/label.tsx","size":449,"chunks":["ec22802"]},{"name":"./src/components/ui/form.tsx","size":2869,"chunks":["ec22802"]},{"name":"./src/components/ui/input.tsx","size":729,"chunks":["ec22802"]},{"name":"./src/components/ui/popover.tsx","size":1042,"chunks":["ec22802"]},{"name":"./src/components/ui/select.tsx","size":5404,"chunks":["ec22802"]},{"name":"./src/components/ui/skeleton.tsx","size":208,"chunks":["ec22802"]},{"name":"./src/components/ui/tabs.tsx","size":1661,"chunks":["ec22802"]},{"name":"./src/components/ui/toggle.tsx","size":1211,"chunks":["ec22802"]},{"name":"./src/components/ui/tooltip.tsx","size":969,"chunks":["ec22802"]},{"name":"./src/ShadCNComponentsContext.tsx","size":1619,"chunks":["ec22802"]},{"name":"./src/form/Form.tsx","size":282,"chunks":["ec22802"]},{"name":"./src/form/TextInput.tsx","size":1043,"chunks":["ec22802"]},{"name":"./src/menu/Menu.tsx","size":4014,"chunks":["ec22802"]},{"name":"./src/menu/Button.tsx","size":641,"chunks":["ec22802"]},{"name":"./src/panel/Panel.tsx","size":1123,"chunks":["ec22802"]},{"name":"./src/panel/PanelTab.tsx","size":347,"chunks":["ec22802"]},{"name":"./src/panel/PanelTextInput.tsx","size":469,"chunks":["ec22802"]},{"name":"./src/popover/popover.tsx","size":1168,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenu.tsx","size":225,"chunks":["ec22802"]},{"name":"./src/sideMenu/SideMenuButton.tsx","size":645,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenu.tsx","size":361,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuEmptyItem.tsx","size":322,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenu.tsx","size":821,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuEmptyItem.tsx","size":622,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuItem.tsx","size":1885,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLabel.tsx","size":318,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/SuggestionMenuLoader.tsx","size":221,"chunks":["ec22802"]},{"name":"./src/tableHandle/ExtendButton.tsx","size":714,"chunks":["ec22802"]},{"name":"./src/tableHandle/TableHandle.tsx","size":610,"chunks":["ec22802"]},{"name":"./src/toolbar/Toolbar.tsx","size":4296,"chunks":["ec22802"]},{"name":"./src/comments/Card.tsx","size":745,"chunks":["ec22802"]},{"name":"./src/comments/Comment.tsx","size":3047,"chunks":["ec22802"]},{"name":"./src/comments/Editor.tsx","size":972,"chunks":["ec22802"]},{"name":"./src/badge/Badge.tsx","size":1937,"chunks":["ec22802"]},{"name":"./src/panel/PanelButton.tsx","size":408,"chunks":["ec22802"]},{"name":"./src/panel/PanelFileInput.tsx","size":496,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuItem.tsx","size":857,"chunks":["ec22802"]},{"name":"./src/suggestionMenu/gridSuggestionMenu/GridSuggestionMenuLoader.tsx","size":373,"chunks":["ec22802"]},{"name":"./src/components.ts","size":1396,"chunks":["ec22802"]},{"name":"./src/BlockNoteView.tsx","size":621,"chunks":["ec22802"]},{"name":"./src/index.tsx","size":0,"chunks":["ec22802"]}]}

@@ -9,3 +9,3 @@ {

"license": "MPL-2.0",
"version": "0.24.2",
"version": "0.25.0",
"files": [

@@ -33,3 +33,3 @@ "dist",

"types": "./types/src/index.d.ts",
"main": "./dist/blocknote-shadcn.umd.cjs",
"main": "./dist/blocknote-shadcn.cjs",
"module": "./dist/blocknote-shadcn.js",

@@ -40,3 +40,3 @@ "exports": {

"import": "./dist/blocknote-shadcn.js",
"require": "./dist/blocknote-shadcn.umd.cjs"
"require": "./dist/blocknote-shadcn.cjs"
},

@@ -56,5 +56,6 @@ "./style.css": {

"dependencies": {
"@blocknote/core": "^0.24.2",
"@blocknote/react": "^0.24.2",
"@blocknote/core": "^0.25.0",
"@blocknote/react": "^0.25.0",
"@hookform/resolvers": "^3.6.0",
"@radix-ui/react-avatar": "^1.1.3",
"@radix-ui/react-dropdown-menu": "^2.0.6",

@@ -107,3 +108,3 @@ "@radix-ui/react-label": "^2.0.2",

},
"gitHead": "129f51b459753139ee0a4c441b4479f83fd7314d"
"gitHead": "2e7e03a8e9ccdb4a169c7436d48205e04021db97"
}

@@ -13,2 +13,3 @@ import { Components } from "@blocknote/react";

} from "./menu/Menu.js";
import { MenuButton } from "./menu/Button.js";
import { Panel } from "./panel/Panel.js";

@@ -30,2 +31,6 @@ import { PanelTab } from "./panel/PanelTab.js";

import { Toolbar, ToolbarButton, ToolbarSelect } from "./toolbar/Toolbar.js";
import { Card, CardSection } from "./comments/Card.js";
import { Comment } from "./comments/Comment.js";
import { Editor } from "./comments/Editor.js";
import { Badge, BadgeGroup } from "./badge/Badge.js";

@@ -76,3 +81,13 @@ import { PanelButton } from "./panel/PanelButton.js";

},
Comments: {
Comment: Comment,
Editor: Editor,
Card: Card,
CardSection: CardSection,
},
Generic: {
Badge: {
Root: Badge,
Group: BadgeGroup,
},
Toolbar: {

@@ -93,2 +108,3 @@ Root: Toolbar,

Item: MenuItem,
Button: MenuButton,
},

@@ -95,0 +111,0 @@ Popover: {

import { type VariantProps } from "class-variance-authority";
import * as React from "react";
declare const buttonVariants: (props?: ({
variant?: "default" | "secondary" | "destructive" | "outline" | "link" | "ghost" | null | undefined;
variant?: "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
size?: "default" | "sm" | "lg" | "icon" | null | undefined;

@@ -6,0 +6,0 @@ } & import("class-variance-authority/dist/types.js").ClassProp) | undefined) => string;

/// <reference types="react" />
import { Badge as ShadCNBadge } from "./components/ui/badge.js";
import { Skeleton as ShadCNSkeleton } from "./components/ui/skeleton.js";
export declare const ShadCNDefaultComponents: {
Avatar: {
Avatar: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-avatar").AvatarProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
AvatarFallback: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-avatar").AvatarFallbackProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
AvatarImage: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-avatar").AvatarImageProps & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
};
Badge: {

@@ -53,2 +59,5 @@ Badge: typeof ShadCNBadge;

};
Skeleton: {
Skeleton: typeof ShadCNSkeleton;
};
Tabs: {

@@ -75,2 +84,7 @@ Tabs: import("react").ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & import("react").RefAttributes<HTMLDivElement>>;

export declare const ShadCNComponentsContext: import("react").Context<{
Avatar: {
Avatar: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-avatar").AvatarProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
AvatarFallback: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-avatar").AvatarFallbackProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
AvatarImage: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-avatar").AvatarImageProps & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
};
Badge: {

@@ -125,2 +139,5 @@ Badge: typeof ShadCNBadge;

};
Skeleton: {
Skeleton: typeof ShadCNSkeleton;
};
Tabs: {

@@ -146,2 +163,7 @@ Tabs: import("react").ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & import("react").RefAttributes<HTMLDivElement>>;

export declare function useShadCNComponentsContext(): {
Avatar: {
Avatar: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-avatar").AvatarProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
AvatarFallback: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-avatar").AvatarFallbackProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
AvatarImage: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-avatar").AvatarImageProps & import("react").RefAttributes<HTMLImageElement>, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
};
Badge: {

@@ -196,2 +218,5 @@ Badge: typeof ShadCNBadge;

};
Skeleton: {
Skeleton: typeof ShadCNSkeleton;
};
Tabs: {

@@ -198,0 +223,0 @@ Tabs: import("react").ForwardRefExoticComponent<import("@radix-ui/react-tabs").TabsProps & import("react").RefAttributes<HTMLDivElement>>;

@@ -7,6 +7,7 @@ /// <reference types="react" />

onMouseLeave?: (() => void) | undefined;
variant?: "default" | "action-toolbar" | undefined;
} & import("react").RefAttributes<HTMLDivElement>>;
export declare const ToolbarButton: import("react").ForwardRefExoticComponent<({
className?: string | undefined;
mainTooltip: string;
mainTooltip?: string | undefined;
secondaryTooltip?: string | undefined;

@@ -17,2 +18,3 @@ icon?: import("react").ReactNode;

isDisabled?: boolean | undefined;
variant?: "default" | "compact" | undefined;
} & ({

@@ -19,0 +21,0 @@ children: import("react").ReactNode;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet