@vantageos/mosaic-blocks 0.2.2-alpha → 0.2.3-alpha

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.
package/dist/index.cjs CHANGED
@@ -2718,6 +2718,18 @@ var STATUS_CLASSES = {
2718
2718
  completed: "bg-blue-500/10 text-blue-600 border border-blue-500/20 dark:text-blue-400",
2719
2719
  archived: "bg-gray-500/10 text-gray-600 border border-gray-500/20 dark:text-gray-400"
2720
2720
  };
2721
+ var STATUS_FALLBACK = "bg-gray-500/10 text-gray-600 border border-gray-500/20 dark:text-gray-400";
2722
+ function getStatusClass(status) {
2723
+ return STATUS_CLASSES[status] ?? STATUS_FALLBACK;
2724
+ }
2725
+ function participantLabel(p) {
2726
+ if (typeof p === "string") return p;
2727
+ return p.actor ?? "";
2728
+ }
2729
+ function formatTimestamp(ts) {
2730
+ if (typeof ts === "string") return ts;
2731
+ return new Date(ts).toLocaleString();
2732
+ }
2721
2733
  function ClockIcon2() {
2722
2734
  return /* @__PURE__ */ jsxRuntime.jsxs(
2723
2735
  "svg",
@@ -2774,20 +2786,24 @@ function MosaicActivityItem({ activity, icon, className }) {
2774
2786
  /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "truncate text-sm font-medium text-foreground", children: activity.title }),
2775
2787
  activity.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-sm text-muted-foreground line-clamp-1", children: activity.description }),
2776
2788
  activity.participants && activity.participants.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-2 flex items-center gap-2", children: [
2777
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex -space-x-2", children: activity.participants.slice(0, 3).map((p) => /* @__PURE__ */ jsxRuntime.jsx(
2778
- "div",
2779
- {
2780
- "aria-label": p,
2781
- className: "flex h-6 w-6 items-center justify-center rounded-full border-2 border-background bg-muted text-[10px] font-medium text-muted-foreground",
2782
- children: p.slice(0, 2).toUpperCase()
2783
- },
2784
- p
2785
- )) }),
2789
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex -space-x-2", children: activity.participants.slice(0, 3).map((p) => {
2790
+ const label = participantLabel(p);
2791
+ return /* @__PURE__ */ jsxRuntime.jsx(
2792
+ "div",
2793
+ {
2794
+ "aria-label": label,
2795
+ className: "flex h-6 w-6 items-center justify-center rounded-full border-2 border-background bg-muted text-[10px] font-medium text-muted-foreground",
2796
+ children: label.slice(0, 2).toUpperCase()
2797
+ },
2798
+ label
2799
+ );
2800
+ }) }),
2786
2801
  activity.messages !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground", children: [
2787
2802
  activity.messages,
2788
2803
  " messages"
2789
2804
  ] })
2790
- ] })
2805
+ ] }),
2806
+ activity.excerpt && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-xs text-muted-foreground line-clamp-1", children: activity.excerpt })
2791
2807
  ] }),
2792
2808
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 flex-col items-end gap-1.5", children: [
2793
2809
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -2795,12 +2811,12 @@ function MosaicActivityItem({ activity, icon, className }) {
2795
2811
  {
2796
2812
  className: cn29(
2797
2813
  "rounded-full px-2 py-0.5 text-xs font-medium",
2798
- STATUS_CLASSES[activity.status]
2814
+ getStatusClass(activity.status)
2799
2815
  ),
2800
2816
  children: activity.status
2801
2817
  }
2802
2818
  ),
2803
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: activity.timestamp })
2819
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: formatTimestamp(activity.timestamp) })
2804
2820
  ] })
2805
2821
  ] }) })
2806
2822
  ]
@@ -8754,7 +8770,11 @@ var clerkAppearance = {
8754
8770
  function MosaicSignInLayout({
8755
8771
  clerkSignIn: ClerkSignIn,
8756
8772
  signUpUrl = "/sign-up",
8773
+ signInUrl,
8757
8774
  afterSignInUrl = "/",
8775
+ forceRedirectUrl,
8776
+ routing,
8777
+ path,
8758
8778
  headline,
8759
8779
  subheadline,
8760
8780
  className
@@ -8778,7 +8798,11 @@ function MosaicSignInLayout({
8778
8798
  {
8779
8799
  appearance: clerkAppearance,
8780
8800
  signUpUrl,
8781
- fallbackRedirectUrl: afterSignInUrl
8801
+ ...signInUrl !== void 0 && { signInUrl },
8802
+ fallbackRedirectUrl: afterSignInUrl,
8803
+ ...forceRedirectUrl !== void 0 && { forceRedirectUrl },
8804
+ ...routing !== void 0 && { routing },
8805
+ ...path !== void 0 && { path }
8782
8806
  }
8783
8807
  ) })
8784
8808
  ]
@@ -8813,7 +8837,11 @@ var clerkAppearance2 = {
8813
8837
  function MosaicSignUpLayout({
8814
8838
  clerkSignUp: ClerkSignUp,
8815
8839
  signInUrl = "/sign-in",
8840
+ signUpUrl,
8816
8841
  afterSignUpUrl = "/",
8842
+ forceRedirectUrl,
8843
+ routing,
8844
+ path,
8817
8845
  headline,
8818
8846
  subheadline,
8819
8847
  className
@@ -8837,7 +8865,11 @@ function MosaicSignUpLayout({
8837
8865
  {
8838
8866
  appearance: clerkAppearance2,
8839
8867
  signInUrl,
8840
- fallbackRedirectUrl: afterSignUpUrl
8868
+ ...signUpUrl !== void 0 && { signUpUrl },
8869
+ fallbackRedirectUrl: afterSignUpUrl,
8870
+ ...forceRedirectUrl !== void 0 && { forceRedirectUrl },
8871
+ ...routing !== void 0 && { routing },
8872
+ ...path !== void 0 && { path }
8841
8873
  }
8842
8874
  ) })
8843
8875
  ]
@@ -8866,20 +8898,31 @@ function MosaicClerkOrgSwitcher({
8866
8898
  clerkOrgSwitcher: ClerkOrgSwitcher,
8867
8899
  afterCreateOrganizationUrl = "/",
8868
8900
  afterSelectOrganizationUrl = "/",
8901
+ afterSelectPersonalUrl,
8869
8902
  afterLeaveOrganizationUrl = "/",
8870
8903
  hidePersonal = false,
8904
+ "data-testid": dataTestId,
8871
8905
  className
8872
8906
  }) {
8873
- return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "clerk-org-switcher", className, children: /* @__PURE__ */ jsxRuntime.jsx(
8874
- ClerkOrgSwitcher,
8907
+ return /* @__PURE__ */ jsxRuntime.jsx(
8908
+ "div",
8875
8909
  {
8876
- appearance: clerkAppearance3,
8877
- afterCreateOrganizationUrl,
8878
- afterSelectOrganizationUrl,
8879
- afterLeaveOrganizationUrl,
8880
- hidePersonal
8910
+ "data-slot": "clerk-org-switcher",
8911
+ ...dataTestId !== void 0 && { "data-testid": dataTestId },
8912
+ className,
8913
+ children: /* @__PURE__ */ jsxRuntime.jsx(
8914
+ ClerkOrgSwitcher,
8915
+ {
8916
+ appearance: clerkAppearance3,
8917
+ afterCreateOrganizationUrl,
8918
+ afterSelectOrganizationUrl,
8919
+ ...afterSelectPersonalUrl !== void 0 && { afterSelectPersonalUrl },
8920
+ afterLeaveOrganizationUrl,
8921
+ hidePersonal
8922
+ }
8923
+ )
8881
8924
  }
8882
- ) });
8925
+ );
8883
8926
  }
8884
8927
  MosaicClerkOrgSwitcher.displayName = "MosaicClerkOrgSwitcher";
8885
8928
  var clerkAppearance4 = {