@joai/core 4.7.0 → 4.8.0

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.d.mts CHANGED
@@ -428,6 +428,7 @@ type Contact = {
428
428
  birthday: string | null;
429
429
  website: string | null;
430
430
  location: string | null;
431
+ avatar: string | null;
431
432
  socials: Record<string, string> | null;
432
433
  notes: string | null;
433
434
  tags: string[] | null;
@@ -476,6 +477,7 @@ type ContactFormData = {
476
477
  };
477
478
  nextFollowUpAt?: string | null;
478
479
  followUpNote?: string | null;
480
+ avatar?: string[];
479
481
  };
480
482
  type ContactCreatePayload = ContactFormData & {
481
483
  name: string;
@@ -3901,6 +3903,7 @@ type Campaign = {
3901
3903
  failedCount: number;
3902
3904
  skippedCount: number;
3903
3905
  skipReasons?: CampaignSkipReasons;
3906
+ archivedAt?: string | null;
3904
3907
  createdAt: string;
3905
3908
  updatedAt: string;
3906
3909
  };
@@ -700,23 +700,28 @@ function ContentToolbar({ className, labels = {}, confirmPublish }) {
700
700
  }
701
701
  //#endregion
702
702
  //#region src/react/content/content-editor.tsx
703
+ function EditorPanel({ title }) {
704
+ const { canEdit } = useContent();
705
+ if (!canEdit) return null;
706
+ return /* @__PURE__ */ jsxs("div", {
707
+ className: "fixed right-4 bottom-4 z-[1000] w-[min(24rem,calc(100vw-2rem))] rounded-xl border border-slate-200 bg-white p-3 text-slate-950 shadow-xl",
708
+ children: [/* @__PURE__ */ jsx("strong", {
709
+ className: "mb-2 block text-sm font-semibold",
710
+ children: title
711
+ }), /* @__PURE__ */ jsx(ContentToolbar, { labels: {
712
+ edit: "Edit",
713
+ save: "Save draft",
714
+ publish: "Publish",
715
+ cancel: "Cancel"
716
+ } })]
717
+ });
718
+ }
703
719
  function ContentEditor({ children, title = "JoAi Content", ...provider }) {
704
720
  return /* @__PURE__ */ jsx(ContentProvider, {
705
721
  ...provider,
706
722
  children: /* @__PURE__ */ jsxs("div", {
707
723
  "data-joai-content-editor": "true",
708
- children: [/* @__PURE__ */ jsxs("div", {
709
- className: "fixed right-4 bottom-4 z-[1000] w-[min(24rem,calc(100vw-2rem))] rounded-xl border border-slate-200 bg-white p-3 text-slate-950 shadow-xl",
710
- children: [/* @__PURE__ */ jsx("strong", {
711
- className: "mb-2 block text-sm font-semibold",
712
- children: title
713
- }), /* @__PURE__ */ jsx(ContentToolbar, { labels: {
714
- edit: "Edit",
715
- save: "Save draft",
716
- publish: "Publish",
717
- cancel: "Cancel"
718
- } })]
719
- }), children]
724
+ children: [/* @__PURE__ */ jsx(EditorPanel, { title }), children]
720
725
  })
721
726
  });
722
727
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/core",
3
- "version": "4.7.0",
3
+ "version": "4.8.0",
4
4
  "description": "JoAi shared types, HTTP service, and config",
5
5
  "license": "MIT",
6
6
  "type": "module",