@bpinternal/integration-hub 0.6.0 → 0.6.1

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.
@@ -4,7 +4,7 @@ import { useState as H, useEffect as L, useCallback as D, useRef as ee, useMemo
4
4
  import { motion as ft } from "framer-motion";
5
5
  import { clsx as ht } from "clsx";
6
6
  import { twMerge as bt } from "tailwind-merge";
7
- import { Menu as S } from "@base-ui/react/menu";
7
+ import { Menu as E } from "@base-ui/react/menu";
8
8
  const pt = [
9
9
  { name: "Popular", icon: Ge, description: "Most used integrations" },
10
10
  { name: "Communication & Channels", icon: _e, description: "Chat, email, SMS, and more" },
@@ -74,7 +74,7 @@ const pt = [
74
74
  focusCategoryButton: R,
75
75
  renderNoResults: K
76
76
  }) => {
77
- var G, B;
77
+ var G, S;
78
78
  const [q, z] = H(/* @__PURE__ */ new Set());
79
79
  L(() => {
80
80
  z(/* @__PURE__ */ new Set());
@@ -142,7 +142,7 @@ const pt = [
142
142
  /* @__PURE__ */ r("div", { className: "flex items-center h-full gap-6", children: [
143
143
  /* @__PURE__ */ r("div", { className: "flex flex-col justify-between h-full flex-1 min-w-0", children: [
144
144
  /* @__PURE__ */ e("h2", { className: "text-2xl font-semibold text-white leading-snug", children: (G = g[f]) == null ? void 0 : G.title }),
145
- /* @__PURE__ */ e("p", { className: "text-sm text-white/80", children: ((B = g[f]) == null ? void 0 : B.subtitle) ?? "" }),
145
+ /* @__PURE__ */ e("p", { className: "text-sm text-white/80", children: ((S = g[f]) == null ? void 0 : S.subtitle) ?? "" }),
146
146
  d && /* @__PURE__ */ e(
147
147
  "button",
148
148
  {
@@ -460,10 +460,10 @@ const pt = [
460
460
  renderIntegrationDetails: z,
461
461
  noResultsContent: O
462
462
  }) => {
463
- const G = l ?? a, B = I(() => {
463
+ const G = l ?? a, S = I(() => {
464
464
  var j;
465
465
  return ((j = b[0]) == null ? void 0 : j.name) ?? "Popular";
466
- }, [b]), [h, C] = H(i ?? B), k = ee(i), A = ee(!1), P = D(
466
+ }, [b]), [h, C] = H(i ?? S), k = ee(i), A = ee(!1), P = D(
467
467
  (j) => {
468
468
  C((me) => {
469
469
  const te = typeof j == "function" ? j(me) : j;
@@ -475,9 +475,9 @@ const pt = [
475
475
  integrationsByCategory: M,
476
476
  visibleCategories: T,
477
477
  sidebarCategories: U,
478
- visibleCategoryNames: Se,
479
- sidebarCategoryNames: Ee,
480
- installedCategoryOrder: Be
478
+ visibleCategoryNames: Ee,
479
+ sidebarCategoryNames: Be,
480
+ installedCategoryOrder: Se
481
481
  } = Ct({
482
482
  hubIntegrations: g,
483
483
  sidebarIntegrations: m,
@@ -485,8 +485,8 @@ const pt = [
485
485
  }), { categoryScrollContainerRef: Ae, focusFirstCardInCategory: Te, scrollToCategorySection: X, focusCategoryButton: je } = wt({
486
486
  view: n,
487
487
  isHubLoading: f,
488
- sidebarCategoryNames: Ee,
489
- visibleCategoryNames: Se,
488
+ sidebarCategoryNames: Be,
489
+ visibleCategoryNames: Ee,
490
490
  setSelectedCategory: P
491
491
  }), { currentSlide: De, goToPreviousSlide: Re, goToNextSlide: Pe, goToSlide: Fe } = Nt({
492
492
  isOpen: t,
@@ -536,7 +536,7 @@ const pt = [
536
536
  isInstalledLoading: u,
537
537
  installedIntegrations: d,
538
538
  effectiveSearchTerm: G,
539
- installedCategoryOrder: Be,
539
+ installedCategoryOrder: Se,
540
540
  renderInstalledIntegrations: q
541
541
  }
542
542
  ) : /* @__PURE__ */ e(
@@ -565,28 +565,28 @@ const pt = [
565
565
  renderNoResults: Oe
566
566
  }
567
567
  );
568
- }, E = "flex items-center gap-2 px-3 py-2 text-sm text-[var(--gray-11)] rounded-md cursor-pointer hover:bg-[var(--gray-a3)] outline-none", re = "bg-[var(--gray-2)] border border-[var(--gray-a4)] rounded-lg p-1 shadow-lg min-w-[160px]", ne = "flex items-center gap-1.5 mt-2 px-2 py-1 rounded-md bg-[var(--gray-a3)] text-xs text-[var(--gray-11)] whitespace-nowrap hover:bg-[var(--gray-a4)] cursor-pointer focus-visible:ring-2 focus-visible:ring-[var(--accent-9)]", kt = (t) => /* @__PURE__ */ e(S.Root, { ...t }), It = (t) => /* @__PURE__ */ e(S.Trigger, { ...t }), Ie = ({
568
+ }, B = "flex items-center gap-2 px-3 py-2 text-sm text-[var(--gray-11)] rounded-md cursor-pointer hover:bg-[var(--gray-a3)] outline-none", re = "bg-[var(--gray-2)] border border-[var(--gray-a4)] rounded-lg p-1 shadow-lg min-w-[160px]", ne = "flex items-center gap-1.5 mt-2 px-2 py-1 rounded-md bg-[var(--gray-a3)] text-xs text-[var(--gray-11)] whitespace-nowrap hover:bg-[var(--gray-a4)] cursor-pointer focus-visible:ring-2 focus-visible:ring-[var(--accent-9)]", kt = (t) => /* @__PURE__ */ e(E.Root, { ...t }), It = (t) => /* @__PURE__ */ e(E.Trigger, { ...t }), Ie = ({
569
569
  align: t = "start",
570
570
  alignOffset: n = 0,
571
571
  side: a = "bottom",
572
572
  sideOffset: l = 4,
573
573
  className: s,
574
574
  ...i
575
- }) => /* @__PURE__ */ e(S.Portal, { children: /* @__PURE__ */ e(
576
- S.Positioner,
575
+ }) => /* @__PURE__ */ e(E.Portal, { children: /* @__PURE__ */ e(
576
+ E.Positioner,
577
577
  {
578
578
  className: "isolate z-50 outline-none",
579
579
  align: t,
580
580
  alignOffset: n,
581
581
  side: a,
582
582
  sideOffset: l,
583
- children: /* @__PURE__ */ e(S.Popup, { className: x(s), ...i })
583
+ children: /* @__PURE__ */ e(E.Popup, { className: x(s), ...i })
584
584
  }
585
- ) }), ie = (t) => /* @__PURE__ */ e(S.SubmenuRoot, { ...t }), se = ({
585
+ ) }), ie = (t) => /* @__PURE__ */ e(E.SubmenuRoot, { ...t }), se = ({
586
586
  className: t,
587
587
  children: n,
588
588
  ...a
589
- }) => /* @__PURE__ */ r(S.SubmenuTrigger, { className: x(t), ...a, children: [
589
+ }) => /* @__PURE__ */ r(E.SubmenuTrigger, { className: x(t), ...a, children: [
590
590
  n,
591
591
  /* @__PURE__ */ e(ye, { className: "ml-auto w-4 h-4" })
592
592
  ] }), oe = ({
@@ -606,7 +606,7 @@ const pt = [
606
606
  sideOffset: l,
607
607
  ...i
608
608
  }
609
- ), _ = (t) => /* @__PURE__ */ e(S.Item, { ...t }), Ht = ({
609
+ ), _ = (t) => /* @__PURE__ */ e(E.Item, { ...t }), Ht = ({
610
610
  visibility: t,
611
611
  verification: n,
612
612
  sortMethod: a,
@@ -655,13 +655,13 @@ const pt = [
655
655
  className: "bg-[var(--gray-2)] border border-[var(--gray-a4)] rounded-lg p-1 shadow-lg min-w-[180px]",
656
656
  children: [
657
657
  /* @__PURE__ */ r(ie, { children: [
658
- /* @__PURE__ */ e(se, { className: E, children: g.visibilityGroup }),
658
+ /* @__PURE__ */ e(se, { className: B, children: g.visibilityGroup }),
659
659
  /* @__PURE__ */ r(oe, { className: re, children: [
660
660
  /* @__PURE__ */ r(
661
661
  _,
662
662
  {
663
- className: x(E, t === "private" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
664
- onSelect: () => f("private"),
663
+ className: x(B, t === "private" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
664
+ onClick: () => f("private"),
665
665
  "aria-checked": t === "private",
666
666
  children: [
667
667
  /* @__PURE__ */ e(W, { className: "w-4 h-4" }),
@@ -673,8 +673,8 @@ const pt = [
673
673
  /* @__PURE__ */ r(
674
674
  _,
675
675
  {
676
- className: x(E, t === "public" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
677
- onSelect: () => f("public"),
676
+ className: x(B, t === "public" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
677
+ onClick: () => f("public"),
678
678
  "aria-checked": t === "public",
679
679
  children: [
680
680
  /* @__PURE__ */ e(ue, { className: "w-4 h-4" }),
@@ -686,16 +686,16 @@ const pt = [
686
686
  ] })
687
687
  ] }),
688
688
  /* @__PURE__ */ r(ie, { children: [
689
- /* @__PURE__ */ e(se, { className: E, children: g.verificationGroup }),
689
+ /* @__PURE__ */ e(se, { className: B, children: g.verificationGroup }),
690
690
  /* @__PURE__ */ r(oe, { className: `${re} min-w-[180px]`, children: [
691
691
  /* @__PURE__ */ r(
692
692
  _,
693
693
  {
694
694
  className: x(
695
- E,
695
+ B,
696
696
  c.includes("official") && "bg-[var(--gray-a3)] text-[var(--gray-12)]"
697
697
  ),
698
- onSelect: () => m("official"),
698
+ onClick: () => m("official"),
699
699
  "aria-checked": c.includes("official"),
700
700
  children: [
701
701
  /* @__PURE__ */ e(J, { className: "w-4 h-4 text-blue-500" }),
@@ -708,10 +708,10 @@ const pt = [
708
708
  _,
709
709
  {
710
710
  className: x(
711
- E,
711
+ B,
712
712
  c.includes("verified") && "bg-[var(--gray-a3)] text-[var(--gray-12)]"
713
713
  ),
714
- onSelect: () => m("verified"),
714
+ onClick: () => m("verified"),
715
715
  "aria-checked": c.includes("verified"),
716
716
  children: [
717
717
  /* @__PURE__ */ e(Q, { className: "w-4 h-4 text-green-500" }),
@@ -723,13 +723,13 @@ const pt = [
723
723
  ] })
724
724
  ] }),
725
725
  /* @__PURE__ */ r(ie, { children: [
726
- /* @__PURE__ */ e(se, { className: E, children: g.sortGroup }),
726
+ /* @__PURE__ */ e(se, { className: B, children: g.sortGroup }),
727
727
  /* @__PURE__ */ r(oe, { className: re, children: [
728
728
  /* @__PURE__ */ r(
729
729
  _,
730
730
  {
731
- className: x(E, a === "asc" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
732
- onSelect: () => o("asc"),
731
+ className: x(B, a === "asc" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
732
+ onClick: () => o("asc"),
733
733
  "aria-checked": a === "asc",
734
734
  children: [
735
735
  g.sort.asc,
@@ -740,8 +740,8 @@ const pt = [
740
740
  /* @__PURE__ */ r(
741
741
  _,
742
742
  {
743
- className: x(E, a === "desc" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
744
- onSelect: () => o("desc"),
743
+ className: x(B, a === "desc" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
744
+ onClick: () => o("desc"),
745
745
  "aria-checked": a === "desc",
746
746
  children: [
747
747
  g.sort.desc,
@@ -752,8 +752,8 @@ const pt = [
752
752
  /* @__PURE__ */ r(
753
753
  _,
754
754
  {
755
- className: x(E, a === "newest" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
756
- onSelect: () => o("newest"),
755
+ className: x(B, a === "newest" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
756
+ onClick: () => o("newest"),
757
757
  "aria-checked": a === "newest",
758
758
  children: [
759
759
  g.sort.newest,
@@ -764,8 +764,8 @@ const pt = [
764
764
  /* @__PURE__ */ r(
765
765
  _,
766
766
  {
767
- className: x(E, a === "oldest" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
768
- onSelect: () => o("oldest"),
767
+ className: x(B, a === "oldest" && "bg-[var(--gray-a3)] text-[var(--gray-12)]"),
768
+ onClick: () => o("oldest"),
769
769
  "aria-checked": a === "oldest",
770
770
  children: [
771
771
  g.sort.oldest,
@@ -874,12 +874,12 @@ const pt = [
874
874
  ] })
875
875
  }
876
876
  );
877
- }, St = (t) => t.title || t.name || "", qt = ({
877
+ }, Et = (t) => t.title || t.name || "", qt = ({
878
878
  integrations: t,
879
879
  searchTerm: n,
880
880
  categoryOrder: a,
881
881
  onSelectIntegration: l,
882
- getDisplayName: s = St,
882
+ getDisplayName: s = Et,
883
883
  actionLabel: i = "Manage"
884
884
  }) => {
885
885
  const o = I(
@@ -975,13 +975,13 @@ const pt = [
975
975
  onBackToSetup: z,
976
976
  notifications: O,
977
977
  children: G,
978
- selectedDetailPanel: B,
978
+ selectedDetailPanel: S,
979
979
  onDismissSelectedDetailPanel: h
980
980
  }) => {
981
- const [C, k] = H(!!B), A = !!B && C;
981
+ const [C, k] = H(!!S), A = !!S && C;
982
982
  L(() => {
983
- k(!!B);
984
- }, [B]);
983
+ k(!!S);
984
+ }, [S]);
985
985
  const P = D(() => {
986
986
  if (h) {
987
987
  h();
@@ -1123,18 +1123,18 @@ const pt = [
1123
1123
  "div",
1124
1124
  {
1125
1125
  className: "fixed top-3 right-3 bottom-3 w-[500px] z-50 bg-[var(--gray-2)] border border-[var(--gray-6)] rounded-xl shadow-lg overflow-y-auto",
1126
- children: B
1126
+ children: S
1127
1127
  }
1128
1128
  )
1129
1129
  ] })
1130
1130
  ] });
1131
- }, Et = (t) => t.startsWith("http") ? t : `https://${t}`, Bt = (t) => "Source Code", At = (t) => "Documentation", Wt = ({
1131
+ }, Bt = (t) => t.startsWith("http") ? t : `https://${t}`, St = (t) => "Source Code", At = (t) => "Documentation", Wt = ({
1132
1132
  version: t,
1133
1133
  githubUrl: n,
1134
1134
  guideUrl: a,
1135
1135
  onAboutClick: l,
1136
1136
  aboutLabel: s = "About Integration",
1137
- formatGithubLabel: i = Bt,
1137
+ formatGithubLabel: i = St,
1138
1138
  formatGuideLabel: o = At
1139
1139
  }) => /* @__PURE__ */ r("div", { className: "flex items-start gap-12 px-6 py-4 rounded-lg border border-[var(--gray-a4)] bg-[var(--gray-a2)]", children: [
1140
1140
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
@@ -1146,7 +1146,7 @@ const pt = [
1146
1146
  /* @__PURE__ */ r(
1147
1147
  "a",
1148
1148
  {
1149
- href: Et(n),
1149
+ href: Bt(n),
1150
1150
  target: "_blank",
1151
1151
  rel: "noopener noreferrer",
1152
1152
  className: "inline-flex w-fit items-center gap-1 text-sm font-medium text-[var(--blue-11)] hover:underline",
@@ -1381,9 +1381,9 @@ const pt = [
1381
1381
  if (t.length <= 1)
1382
1382
  return null;
1383
1383
  const s = ((i = t.find((o) => o.value === n)) == null ? void 0 : i.label) ?? String(n ?? "");
1384
- return /* @__PURE__ */ r(S.Root, { children: [
1384
+ return /* @__PURE__ */ r(E.Root, { children: [
1385
1385
  /* @__PURE__ */ r(
1386
- S.Trigger,
1386
+ E.Trigger,
1387
1387
  {
1388
1388
  disabled: l,
1389
1389
  className: "flex items-center gap-2 px-4 py-2 rounded-lg bg-[var(--gray-a3)] text-sm text-[var(--gray-12)] hover:bg-[var(--gray-a4)] cursor-pointer border-none outline-none w-[165px] disabled:opacity-60 disabled:cursor-not-allowed",
@@ -1393,13 +1393,13 @@ const pt = [
1393
1393
  ]
1394
1394
  }
1395
1395
  ),
1396
- /* @__PURE__ */ e(S.Portal, { children: /* @__PURE__ */ e(S.Positioner, { className: "isolate z-50 outline-none", align: "end", side: "bottom", sideOffset: 6, children: /* @__PURE__ */ e(
1397
- S.Popup,
1396
+ /* @__PURE__ */ e(E.Portal, { children: /* @__PURE__ */ e(E.Positioner, { className: "isolate z-50 outline-none", align: "end", side: "bottom", sideOffset: 6, children: /* @__PURE__ */ e(
1397
+ E.Popup,
1398
1398
  {
1399
1399
  role: "menu",
1400
1400
  className: "bg-[var(--gray-2)] rounded-lg p-1 shadow-lg w-(--anchor-width) overflow-hidden",
1401
1401
  children: t.map((o) => /* @__PURE__ */ e(
1402
- S.Item,
1402
+ E.Item,
1403
1403
  {
1404
1404
  onClick: () => a(o.value),
1405
1405
  className: x(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bpinternal/integration-hub",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Reusable Integration Hub for Botpress-style integration catalogs",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",