@nivaro/react 0.1.70 → 0.1.71

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16395,9 +16395,7 @@ function Po({
16395
16395
  staleTime: 3e4
16396
16396
  }), E = S ?? [], M = Ce(() => {
16397
16397
  const q = _.map((I) => ({ kind: "comment", at: I.created_at, comment: I })), O = E.map((I) => ({ kind: "related", at: I.created_at, note: I }));
16398
- return [...q, ...O].sort(
16399
- (I, U) => new Date(I.at).getTime() - new Date(U.at).getTime()
16400
- );
16398
+ return [...q, ...O].sort((I, U) => new Date(U.at).getTime() - new Date(I.at).getTime());
16401
16399
  }, [_, E]), T = bt({
16402
16400
  mutationFn: (q) => d.request(ct("/comments", { collection: t, item: n, text: q })),
16403
16401
  onSuccess: () => {
@@ -16459,7 +16457,7 @@ function Po({
16459
16457
  )
16460
16458
  ] }),
16461
16459
  !c && !h && M.length > 0 && (() => {
16462
- const q = M[M.length - 1], O = q.kind === "comment" ? gp(q.comment.user) : q.note.user_name ?? "System", I = (q.kind === "comment" ? q.comment.text : q.note.text).replace(/<[^>]*>/g, " ").replace(/@\[([^\]]+)\]/g, "@$1").replace(/\s+/g, " ").trim();
16460
+ const q = M[0], O = q.kind === "comment" ? gp(q.comment.user) : q.note.user_name ?? "System", I = (q.kind === "comment" ? q.comment.text : q.note.text).replace(/<[^>]*>/g, " ").replace(/@\[([^\]]+)\]/g, "@$1").replace(/\s+/g, " ").trim();
16463
16461
  return I ? /* @__PURE__ */ a("span", { className: "mt-1 w-full truncate pl-6 text-[11.5px] text-slate-400", children: [
16464
16462
  /* @__PURE__ */ a("span", { className: "font-medium text-slate-500 dark:text-slate-400", children: [
16465
16463
  O,
@@ -45286,7 +45284,7 @@ function k_({
45286
45284
  /* @__PURE__ */ e("div", { "data-nf-skeleton-line": !0, style: { width: "30%" } }),
45287
45285
  /* @__PURE__ */ e("div", { "data-nf-skeleton-line": !0, style: { width: "100%" } })
45288
45286
  ] })
45289
- ] }, E)) }) : o.length === 0 ? /* @__PURE__ */ e("p", { "data-nf-empty": !0, children: "No comments yet." }) : /* @__PURE__ */ e("div", { "data-nf-comment-list": !0, children: o.map((E) => {
45287
+ ] }, E)) }) : o.length === 0 ? /* @__PURE__ */ e("p", { "data-nf-empty": !0, children: "No comments yet." }) : /* @__PURE__ */ e("div", { "data-nf-comment-list": !0, children: [...o].reverse().map((E) => {
45290
45288
  const M = g === E.id, T = E.updated_at && E.updated_at !== E.created_at;
45291
45289
  return /* @__PURE__ */ a("div", { "data-nf-comment": !0, children: [
45292
45290
  /* @__PURE__ */ e("div", { "data-nf-avatar": !0, children: g_(E.user) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nivaro/react",
3
- "version": "0.1.70",
3
+ "version": "0.1.71",
4
4
  "description": "React hooks and components for Nivaro CMS forms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",