@blocknote/shadcn 0.44.0 → 0.44.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ import { ChevronRightIcon as de, CheckIcon as j, ChevronDownIcon as q, ChevronUp
14
14
  import * as ue from "@radix-ui/react-label";
15
15
  import * as B from "@radix-ui/react-popover";
16
16
  import * as x from "@radix-ui/react-select";
17
- import * as T from "@radix-ui/react-tabs";
17
+ import * as S from "@radix-ui/react-tabs";
18
18
  import * as me from "@radix-ui/react-toggle";
19
19
  import * as N from "@radix-ui/react-tooltip";
20
20
  function d(...e) {
@@ -165,7 +165,7 @@ function Ne({
165
165
  }) {
166
166
  return /* @__PURE__ */ o(w.Root, { "data-slot": "dropdown-menu", ...e });
167
167
  }
168
- function Se({
168
+ function Te({
169
169
  ...e
170
170
  }) {
171
171
  return /* @__PURE__ */ o(
@@ -176,7 +176,7 @@ function Se({
176
176
  }
177
177
  );
178
178
  }
179
- function Te({
179
+ function Se({
180
180
  className: e,
181
181
  sideOffset: t = 4,
182
182
  ...n
@@ -518,7 +518,7 @@ function He({
518
518
  ...t
519
519
  }) {
520
520
  return /* @__PURE__ */ o(
521
- T.Root,
521
+ S.Root,
522
522
  {
523
523
  "data-slot": "tabs",
524
524
  className: d("flex flex-col gap-2", e),
@@ -531,7 +531,7 @@ function Ke({
531
531
  ...t
532
532
  }) {
533
533
  return /* @__PURE__ */ o(
534
- T.List,
534
+ S.List,
535
535
  {
536
536
  "data-slot": "tabs-list",
537
537
  className: d(
@@ -547,7 +547,7 @@ function Qe({
547
547
  ...t
548
548
  }) {
549
549
  return /* @__PURE__ */ o(
550
- T.Trigger,
550
+ S.Trigger,
551
551
  {
552
552
  "data-slot": "tabs-trigger",
553
553
  className: d(
@@ -563,7 +563,7 @@ function We({
563
563
  ...t
564
564
  }) {
565
565
  return /* @__PURE__ */ o(
566
- T.Content,
566
+ S.Content,
567
567
  {
568
568
  "data-slot": "tabs-content",
569
569
  className: d("flex-1 outline-none", e),
@@ -671,14 +671,14 @@ const tt = {
671
671
  DropdownMenu: {
672
672
  DropdownMenu: Ne,
673
673
  DropdownMenuCheckboxItem: ke,
674
- DropdownMenuContent: Te,
674
+ DropdownMenuContent: Se,
675
675
  DropdownMenuItem: ye,
676
676
  DropdownMenuLabel: Me,
677
677
  DropdownMenuSeparator: ze,
678
678
  DropdownMenuSub: De,
679
679
  DropdownMenuSubContent: Be,
680
680
  DropdownMenuSubTrigger: Ie,
681
- DropdownMenuTrigger: Se
681
+ DropdownMenuTrigger: Te
682
682
  },
683
683
  Form: {
684
684
  Form: _e
@@ -743,7 +743,7 @@ const nt = (e) => {
743
743
  onKeyDown: b,
744
744
  onChange: h,
745
745
  onSubmit: C,
746
- autoComplete: S,
746
+ autoComplete: T,
747
747
  rightSection: y,
748
748
  // TODO: add rightSection
749
749
  ...O
@@ -1111,7 +1111,7 @@ const nt = (e) => {
1111
1111
  children: a
1112
1112
  }
1113
1113
  );
1114
- }), St = p((e, t) => {
1114
+ }), Tt = p((e, t) => {
1115
1115
  const { className: n, children: a, ...r } = e;
1116
1116
  return m(r), /* @__PURE__ */ o(
1117
1117
  "div",
@@ -1126,7 +1126,7 @@ const nt = (e) => {
1126
1126
  children: /* @__PURE__ */ o("div", { children: a })
1127
1127
  }
1128
1128
  );
1129
- }), Tt = p((e, t) => {
1129
+ }), St = p((e, t) => {
1130
1130
  const n = f(), { className: a, item: r, isSelected: s, onClick: i, id: c, ...u } = e;
1131
1131
  m(u);
1132
1132
  const l = E(null);
@@ -1135,8 +1135,7 @@ const nt = (e) => {
1135
1135
  return;
1136
1136
  const g = _(
1137
1137
  l.current,
1138
- document.querySelector(".bn-suggestion-menu, #ai-suggestion-menu")
1139
- // TODO
1138
+ l.current.closest(".bn-suggestion-menu, #ai-suggestion-menu")
1140
1139
  );
1141
1140
  g === "top" ? l.current.scrollIntoView(!0) : g === "bottom" && l.current.scrollIntoView(!1);
1142
1141
  }, [s]), /* @__PURE__ */ v(
@@ -1315,7 +1314,7 @@ const nt = (e) => {
1315
1314
  ...h
1316
1315
  } = e;
1317
1316
  m(h, !1);
1318
- const C = f(), S = c === void 0 ? /* @__PURE__ */ v(
1317
+ const C = f(), T = c === void 0 ? /* @__PURE__ */ v(
1319
1318
  C.Button.Button,
1320
1319
  {
1321
1320
  className: d(
@@ -1358,7 +1357,7 @@ const nt = (e) => {
1358
1357
  }
1359
1358
  );
1360
1359
  return /* @__PURE__ */ v(C.Tooltip.Tooltip, { children: [
1361
- /* @__PURE__ */ o(C.Tooltip.TooltipTrigger, { asChild: !0, children: S }),
1360
+ /* @__PURE__ */ o(C.Tooltip.TooltipTrigger, { asChild: !0, children: T }),
1362
1361
  /* @__PURE__ */ v(
1363
1362
  C.Tooltip.TooltipContent,
1364
1363
  {
@@ -1513,7 +1512,7 @@ const nt = (e) => {
1513
1512
  ...g
1514
1513
  } = e;
1515
1514
  m(g);
1516
- const [b, h] = oe(!1), { focused: C, ref: S } = K(), y = i && (a === !0 || a === void 0 || a === "hover" && b || C);
1515
+ const [b, h] = oe(!1), { focused: C, ref: T } = K(), y = i && (a === !0 || a === void 0 || a === "hover" && b || C);
1517
1516
  return /* @__PURE__ */ v(
1518
1517
  "div",
1519
1518
  {
@@ -1522,7 +1521,7 @@ const nt = (e) => {
1522
1521
  onMouseEnter: () => h(!0),
1523
1522
  onMouseLeave: () => h(!1),
1524
1523
  children: [
1525
- y ? /* @__PURE__ */ o("div", { className: "absolute right-0 top-0 z-10", ref: S, children: i }) : null,
1524
+ y ? /* @__PURE__ */ o("div", { className: "absolute right-0 top-0 z-10", ref: T, children: i }) : null,
1526
1525
  /* @__PURE__ */ o(Pt, { ...e }),
1527
1526
  l
1528
1527
  ]
@@ -1656,7 +1655,7 @@ const nt = (e) => {
1656
1655
  return;
1657
1656
  const l = _(
1658
1657
  u.current,
1659
- document.querySelector(".bn-grid-suggestion-menu")
1658
+ u.current.closest(".bn-grid-suggestion-menu")
1660
1659
  );
1661
1660
  l === "top" ? u.current.scrollIntoView(!0) : l === "bottom" && u.current.scrollIntoView(!1);
1662
1661
  }, [a]), /* @__PURE__ */ o(
@@ -1718,8 +1717,8 @@ const nt = (e) => {
1718
1717
  },
1719
1718
  SuggestionMenu: {
1720
1719
  Root: Nt,
1721
- Item: Tt,
1722
- EmptyItem: St,
1720
+ Item: St,
1721
+ EmptyItem: Tt,
1723
1722
  Label: yt,
1724
1723
  Loader: kt
1725
1724
  },