@tryghost/activitypub 2.0.3 → 2.0.4

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.
@@ -21895,7 +21895,7 @@ const L3 = P(({ className: e, ...t }, n) => /* @__PURE__ */ A.jsx(
21895
21895
  }
21896
21896
  ));
21897
21897
  L3.displayName = I9.displayName;
21898
- const lV = Iz(() => import("./index-CZXmkP7P.mjs")), Ud = (e) => /* @__PURE__ */ A.jsx(Pz, { fallback: /* @__PURE__ */ A.jsx("div", {}), children: /* @__PURE__ */ A.jsx(lV, { ...e }) }), P2 = P(({ className: e, ...t }, n) => /* @__PURE__ */ A.jsx(
21898
+ const lV = Iz(() => import("./index-DYgca7jf.mjs")), Ud = (e) => /* @__PURE__ */ A.jsx(Pz, { fallback: /* @__PURE__ */ A.jsx("div", {}), children: /* @__PURE__ */ A.jsx(lV, { ...e }) }), P2 = P(({ className: e, ...t }, n) => /* @__PURE__ */ A.jsx(
21899
21899
  AO,
21900
21900
  {
21901
21901
  ref: n,
@@ -25951,11 +25951,11 @@ const qg = wn(
25951
25951
  variant: {
25952
25952
  segmented: "h-7 rounded-md text-sm font-medium data-[state=active]:shadow-md",
25953
25953
  "segmented-sm": "h-[26px] rounded-md text-xs font-medium data-[state=active]:shadow-md",
25954
- button: "h-[34px] gap-1.5 rounded-md py-2 text-sm font-normal hover:bg-muted data-[state=active]:bg-muted-foreground/15 data-[state=active]:font-medium",
25955
- "button-sm": "font-regular h-6 gap-1.5 rounded-md p-2 text-xs text-gray-800 hover:bg-muted data-[state=active]:bg-muted-foreground/15 data-[state=active]:font-medium data-[state=active]:text-foreground",
25954
+ button: "h-[34px] gap-1.5 rounded-md py-2 text-sm font-normal hover:bg-muted data-[state=active]:bg-muted-foreground/10 data-[state=active]:font-medium",
25955
+ "button-sm": "h-6 gap-1.5 rounded-md p-2 text-xs font-normal text-gray-800 hover:bg-muted data-[state=active]:bg-muted-foreground/10 data-[state=active]:font-medium data-[state=active]:text-foreground",
25956
25956
  underline: 'relative h-[36px] px-0 text-md font-semibold text-gray-700 after:absolute after:inset-x-0 after:bottom-[-1px] after:h-0.5 after:bg-foreground after:opacity-0 after:content-[""] hover:after:opacity-10 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:after:!opacity-100',
25957
25957
  navbar: 'relative h-[52px] px-px text-md font-semibold text-muted-foreground after:absolute after:inset-x-0 after:-bottom-px after:h-0.5 after:bg-foreground after:opacity-0 after:content-[""] hover:text-foreground data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:after:!opacity-100',
25958
- pill: "relative h-[30px] rounded-md px-3 text-md font-medium text-gray-800 hover:text-foreground data-[state=active]:bg-muted-foreground/15 data-[state=active]:font-semibold data-[state=active]:text-foreground dark:text-gray-500 dark:data-[state=active]:text-foreground",
25958
+ pill: "relative h-[30px] rounded-md px-3 text-md font-medium text-gray-800 hover:text-foreground data-[state=active]:bg-muted-foreground/10 data-[state=active]:font-semibold data-[state=active]:text-foreground dark:text-gray-500 dark:data-[state=active]:text-foreground",
25959
25959
  kpis: 'relative rounded-none border-border bg-transparent px-6 py-5 text-foreground ring-0 transition-all after:absolute after:inset-x-0 after:-bottom-px after:h-0.5 after:bg-foreground after:opacity-0 after:content-[""] first:rounded-tl-md last:rounded-tr-md hover:bg-accent/50 data-[state=active]:bg-transparent data-[state=active]:after:opacity-100 [&:not(:last-child)]:border-r [&[data-state=active]_[data-type="value"]]:text-foreground'
25960
25960
  }
25961
25961
  },
@@ -28165,15 +28165,16 @@ async function Z4(e) {
28165
28165
  const t = await A1();
28166
28166
  return s1("index", t).upload(e);
28167
28167
  }
28168
- function B_(e) {
28169
- const t = s0(async () => await A1(), []), n = s0(async () => {
28170
- const o = await t();
28171
- return s1(e, o);
28172
- }, [e, t]);
28168
+ function B_(e, t = !0) {
28169
+ const n = s0(async () => await A1(), []), o = s0(async () => {
28170
+ const r = await n();
28171
+ return s1(e, r);
28172
+ }, [e, n]);
28173
28173
  return qn({
28174
28174
  queryKey: r0.notificationsCount(e),
28175
+ enabled: t,
28175
28176
  async queryFn() {
28176
- return (await (await n()).getNotificationsCount()).count;
28177
+ return (await (await o()).getNotificationsCount()).count;
28177
28178
  }
28178
28179
  });
28179
28180
  }
@@ -32603,7 +32604,11 @@ const ne0 = ({ account: e, update: t, onOpenChange: n }) => {
32603
32604
  },
32604
32605
  o.id
32605
32606
  )) }) : null, re0 = ({ onOpenChange: e, query: t, setQuery: n }) => {
32606
- const o = T(null), [r] = um(t, 300), s = t.length >= 2, { searchQuery: a, updateAccountSearchResult: c } = M_("index", s ? r : ""), { data: i, isFetching: p, isFetched: l } = a, M = (i == null ? void 0 : i.accounts) || [], b = p && s, z = !p && l && M.length === 0 && s && r === t, O = t.length < 2, f = s && M.length > 0 && !b;
32607
+ const o = T(null), [r] = um(t, 300), s = t.length >= 2, { searchQuery: a, updateAccountSearchResult: c } = M_("index", s ? r : ""), { data: i, isFetching: p, isFetched: l } = a, [M, b] = H([]);
32608
+ X(() => {
32609
+ i != null && i.accounts && i.accounts.length > 0 ? b(i.accounts) : !p && s && b([]);
32610
+ }, [i == null ? void 0 : i.accounts, p, s]);
32611
+ const z = p && s, O = !p && l && M.length === 0 && s && r === t, f = t.length < 2 || z && M.length === 0, u = s && M.length > 0;
32607
32612
  return X(() => {
32608
32613
  o.current && o.current.focus();
32609
32614
  }, []), /* @__PURE__ */ A.jsxs(A.Fragment, { children: [
@@ -32619,17 +32624,17 @@ const ne0 = ({ account: e, update: t, onOpenChange: n }) => {
32619
32624
  title: "Search",
32620
32625
  type: "text",
32621
32626
  value: t,
32622
- onChange: (u) => n(u.target.value)
32627
+ onChange: (h) => n(h.target.value)
32623
32628
  }
32624
32629
  ),
32625
- b && /* @__PURE__ */ A.jsx(_1, { className: "!absolute right-0 mr-0.5 shrink-0", size: "sm" })
32630
+ z && /* @__PURE__ */ A.jsx(_1, { className: "!absolute right-0 mr-0.5 shrink-0", size: "sm" })
32626
32631
  ] }),
32627
32632
  /* @__PURE__ */ A.jsxs("div", { className: "h-full", children: [
32628
- z && /* @__PURE__ */ A.jsx("div", { className: "flex h-full items-center justify-center pb-14", children: /* @__PURE__ */ A.jsxs(co, { children: [
32633
+ O && /* @__PURE__ */ A.jsx("div", { className: "flex h-full items-center justify-center pb-14", children: /* @__PURE__ */ A.jsxs(co, { children: [
32629
32634
  /* @__PURE__ */ A.jsx(io, { children: /* @__PURE__ */ A.jsx(nM, {}) }),
32630
32635
  "No users matching this handle or account URL"
32631
32636
  ] }) }),
32632
- f && /* @__PURE__ */ A.jsx(
32637
+ u && /* @__PURE__ */ A.jsx(
32633
32638
  oe0,
32634
32639
  {
32635
32640
  results: M,
@@ -32637,7 +32642,7 @@ const ne0 = ({ account: e, update: t, onOpenChange: n }) => {
32637
32642
  onUpdate: c
32638
32643
  }
32639
32644
  ),
32640
- O && /* @__PURE__ */ A.jsxs(A.Fragment, { children: [
32645
+ f && /* @__PURE__ */ A.jsxs(A.Fragment, { children: [
32641
32646
  /* @__PURE__ */ A.jsx(l2, { children: "More people to follow" }),
32642
32647
  /* @__PURE__ */ A.jsx(
32643
32648
  $20,
@@ -45982,4 +45987,4 @@ export {
45982
45987
  T as u,
45983
45988
  Xz as v
45984
45989
  };
45985
- //# sourceMappingURL=index-BFaQbNbx.mjs.map
45990
+ //# sourceMappingURL=index-B7f2h5XA.mjs.map