@ixo/editor 2.16.2 → 2.17.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.
@@ -16744,27 +16744,14 @@ var DomainCreatorSignTemplateView = ({ editor, block }) => {
16744
16744
  };
16745
16745
 
16746
16746
  // src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
16747
- import React185, { useCallback as useCallback47, useMemo as useMemo56, useEffect as useEffect47, useState as useState65 } from "react";
16747
+ import React185, { useCallback as useCallback47, useMemo as useMemo56, useEffect as useEffect47 } from "react";
16748
16748
  import { ActionIcon as ActionIcon27, Badge as Badge28, Group as Group59, Stack as Stack122, Text as Text96, Tooltip as Tooltip18 } from "@mantine/core";
16749
16749
  import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
16750
16750
 
16751
16751
  // src/mantine/blocks/domainCreatorSign/flow/SignPanel.tsx
16752
- import React184, { useCallback as useCallback46, useState as useState64 } from "react";
16753
16752
  import { Alert as Alert24, Button as Button32, CloseButton as CloseButton13, Group as Group58, Loader as Loader24, Stack as Stack121, Text as Text95, Title as Title16 } from "@mantine/core";
16754
16753
  import { IconAlertCircle as IconAlertCircle11, IconCheck as IconCheck5, IconSignature } from "@tabler/icons-react";
16755
- function getDomainCardDataFromViewer(editor) {
16756
- const allBlocks = editor.document;
16757
- for (const docBlock of allBlocks) {
16758
- if (docBlock.type === "domainCardViewer") {
16759
- try {
16760
- return JSON.parse(docBlock.props.domainCardData || "{}");
16761
- } catch {
16762
- return null;
16763
- }
16764
- }
16765
- }
16766
- return null;
16767
- }
16754
+ import React184, { useCallback as useCallback46, useState as useState64 } from "react";
16768
16755
  var SignPanel = ({ editor, block, onComplete, onError }) => {
16769
16756
  const { closePanel } = usePanelStore();
16770
16757
  const { handlers } = useBlocknoteContext();
@@ -16772,8 +16759,17 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
16772
16759
  const [error, setError] = useState64(block.props.errorMessage || null);
16773
16760
  const [createdEntityDid, setCreatedEntityDid] = useState64(block.props.entityDid || null);
16774
16761
  const getDomainCardData = useCallback46(() => {
16775
- return getDomainCardDataFromViewer(editor);
16776
- }, [editor]);
16762
+ try {
16763
+ return JSON.parse(block.props.domainCardData || "{}");
16764
+ } catch {
16765
+ return null;
16766
+ }
16767
+ }, [block.props.domainCardData]);
16768
+ const getDate100YearsFromNow = useCallback46(() => {
16769
+ const date = /* @__PURE__ */ new Date();
16770
+ date.setFullYear(date.getFullYear() + 100);
16771
+ return date.toISOString();
16772
+ }, []);
16777
16773
  const processSignAndCreate = useCallback46(async () => {
16778
16774
  if (!handlers) {
16779
16775
  throw new Error("Handlers not available");
@@ -16791,25 +16787,30 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
16791
16787
  throw new Error("requestPin handler not available");
16792
16788
  }
16793
16789
  const domainCardData2 = getDomainCardData();
16794
- if (!domainCardData2 || !domainCardData2.name) {
16790
+ if (!domainCardData2 || !domainCardData2.credentialSubject?.name) {
16795
16791
  throw new Error("Domain card data is missing or invalid");
16796
16792
  }
16797
- const entityType = block.props.entityType || domainCardData2.type?.[0]?.replace("ixo:", "") || "dao";
16793
+ const extractEntityType = (type) => {
16794
+ return type.replace(/^schema:/i, "").toLowerCase();
16795
+ };
16796
+ const entityType = block.props.entityType || (domainCardData2.credentialSubject?.type?.[0] ? extractEntityType(domainCardData2.credentialSubject.type[0]) : "dao");
16798
16797
  const issuerDid = handlers.getEntityDid?.() || handlers.getCurrentUser?.()?.address;
16799
16798
  if (!issuerDid) {
16800
16799
  throw new Error("Unable to determine issuer DID");
16801
16800
  }
16802
16801
  const entityDid = "did:ixo:entity:pending";
16802
+ const validFrom = domainCardData2.validFrom || (/* @__PURE__ */ new Date()).toISOString();
16803
+ const validUntil = domainCardData2.validUntil || getDate100YearsFromNow();
16803
16804
  const credentialSubject = {
16804
- ...domainCardData2,
16805
+ ...domainCardData2.credentialSubject,
16805
16806
  id: entityDid
16806
16807
  };
16807
16808
  const unsignedCredential = buildVerifiableCredential({
16808
16809
  entityDid,
16809
16810
  issuerDid,
16810
16811
  credentialSubject,
16811
- validFrom: domainCardData2.validFrom || (/* @__PURE__ */ new Date()).toISOString(),
16812
- validUntil: domainCardData2.validUntil
16812
+ validFrom,
16813
+ validUntil
16813
16814
  });
16814
16815
  setFlowStep("signing");
16815
16816
  editor.updateBlock(block, { props: { ...block.props, status: "signing" } });
@@ -16837,22 +16838,23 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
16837
16838
  entityDid,
16838
16839
  cid: uploadResult.cid,
16839
16840
  serviceEndpoint: uploadResult.url,
16840
- description: `Domain Card for ${domainCardData2.name || "Domain"}`
16841
+ description: `Domain Card for ${domainCardData2.credentialSubject?.name || "Domain"}`
16841
16842
  });
16842
16843
  setFlowStep("creating");
16843
16844
  editor.updateBlock(block, { props: { ...block.props, status: "creating" } });
16845
+ const endDate = domainCardData2.endDate || validUntil;
16844
16846
  const { entityDid: newEntityDid, transactionHash } = await handlers.createDomain({
16845
16847
  entityType,
16846
16848
  linkedResource: [domainCardLinkedResource],
16847
- startDate: domainCardData2.validFrom,
16848
- endDate: domainCardData2.validUntil
16849
+ startDate: validFrom,
16850
+ endDate
16849
16851
  });
16850
16852
  return {
16851
16853
  entityDid: newEntityDid,
16852
16854
  entityType,
16853
16855
  transactionHash
16854
16856
  };
16855
- }, [handlers, getDomainCardData, block, editor]);
16857
+ }, [handlers, getDomainCardData, block, editor, getDate100YearsFromNow]);
16856
16858
  const handleSign = useCallback46(async () => {
16857
16859
  try {
16858
16860
  const result = await processSignAndCreate();
@@ -16902,23 +16904,11 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
16902
16904
  return /* @__PURE__ */ React184.createElement(Stack121, { gap: "md", p: "md" }, /* @__PURE__ */ React184.createElement(Group58, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Title16, { order: 5 }, block.props.title || "Sign to Create"), /* @__PURE__ */ React184.createElement(CloseButton13, { onClick: handleClose, title: "Close panel" })), /* @__PURE__ */ React184.createElement(Alert24, { icon: /* @__PURE__ */ React184.createElement(IconAlertCircle11, { size: 16 }), title: "Domain Creation Failed", color: "red" }, /* @__PURE__ */ React184.createElement(Text95, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React184.createElement(Group58, null, /* @__PURE__ */ React184.createElement(Button32, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React184.createElement(Button32, { variant: "subtle", onClick: handleClose }, "Close")));
16903
16905
  }
16904
16906
  const domainCardData = getDomainCardData();
16905
- return /* @__PURE__ */ React184.createElement(Stack121, { gap: "md", p: "md" }, /* @__PURE__ */ React184.createElement(Group58, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Stack121, { gap: 4 }, /* @__PURE__ */ React184.createElement(Title16, { order: 5 }, block.props.title || "Sign to Create"), /* @__PURE__ */ React184.createElement(Text95, { size: "sm", c: "dimmed" }, "Review and sign to create your domain.")), /* @__PURE__ */ React184.createElement(CloseButton13, { onClick: handleClose, title: "Close panel" })), /* @__PURE__ */ React184.createElement(Stack121, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React184.createElement(Text95, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React184.createElement(Group58, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Name:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs" }, domainCardData?.name || "Not set")), /* @__PURE__ */ React184.createElement(Group58, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Type:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs" }, block.props.entityType || domainCardData?.type?.[0] || "dao")), domainCardData?.description && /* @__PURE__ */ React184.createElement(Group58, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Description:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs", lineClamp: 2, style: { flex: 1 } }, domainCardData.description))), /* @__PURE__ */ React184.createElement(Button32, { leftSection: /* @__PURE__ */ React184.createElement(IconSignature, { size: 18 }), onClick: handleSign, fullWidth: true }, "Sign & Create Domain"));
16907
+ return /* @__PURE__ */ React184.createElement(Stack121, { gap: "md", p: "md" }, /* @__PURE__ */ React184.createElement(Group58, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Stack121, { gap: 4 }, /* @__PURE__ */ React184.createElement(Title16, { order: 5 }, block.props.title || "Sign to Create"), /* @__PURE__ */ React184.createElement(Text95, { size: "sm", c: "dimmed" }, "Review and sign to create your domain.")), /* @__PURE__ */ React184.createElement(CloseButton13, { onClick: handleClose, title: "Close panel" })), /* @__PURE__ */ React184.createElement(Stack121, { gap: "xs", p: "md", style: { backgroundColor: "var(--mantine-color-dark-6)", borderRadius: 8 } }, /* @__PURE__ */ React184.createElement(Text95, { fw: 600, size: "sm" }, "Domain Card Summary"), /* @__PURE__ */ React184.createElement(Group58, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Name:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs" }, domainCardData?.credentialSubject?.name || "Not set")), /* @__PURE__ */ React184.createElement(Group58, { gap: "xs" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Type:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs" }, block.props.entityType || (domainCardData?.credentialSubject?.type?.[0]?.replace(/^schema:/i, "").toLowerCase() ?? "dao"))), domainCardData?.credentialSubject?.description && /* @__PURE__ */ React184.createElement(Group58, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React184.createElement(Text95, { size: "xs", c: "dimmed", style: { width: 80 } }, "Description:"), /* @__PURE__ */ React184.createElement(Text95, { size: "xs", lineClamp: 2, style: { flex: 1 } }, domainCardData.credentialSubject.description))), /* @__PURE__ */ React184.createElement(Button32, { leftSection: /* @__PURE__ */ React184.createElement(IconSignature, { size: 18 }), onClick: handleSign, fullWidth: true }, "Sign & Create Domain"));
16906
16908
  };
16907
16909
 
16908
16910
  // src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
16909
16911
  var DOMAIN_CREATOR_SIGN_FLOW_PANEL_ID = "domain-creator-sign-flow-panel";
16910
- function getDomainCardViewerData(editor) {
16911
- const allBlocks = editor.document;
16912
- for (const docBlock of allBlocks) {
16913
- if (docBlock.type === "domainCardViewer") {
16914
- return {
16915
- domainCardData: docBlock.props.domainCardData || "{}",
16916
- isApproved: docBlock.props.status === "approved"
16917
- };
16918
- }
16919
- }
16920
- return { domainCardData: "{}", isApproved: false };
16921
- }
16922
16912
  function isDomainCardDataReady(domainCardData) {
16923
16913
  if (!domainCardData || domainCardData === "{}") return false;
16924
16914
  try {
@@ -16930,27 +16920,8 @@ function isDomainCardDataReady(domainCardData) {
16930
16920
  }
16931
16921
  var DomainCreatorSignFlowView = ({ editor, block }) => {
16932
16922
  const status = block.props.status || "pending";
16933
- const [viewerData, setViewerData] = useState65(() => getDomainCardViewerData(editor));
16934
- useEffect47(() => {
16935
- const updateViewerData = () => {
16936
- const newData = getDomainCardViewerData(editor);
16937
- setViewerData((prev) => {
16938
- if (prev.domainCardData !== newData.domainCardData || prev.isApproved !== newData.isApproved) {
16939
- return newData;
16940
- }
16941
- return prev;
16942
- });
16943
- };
16944
- updateViewerData();
16945
- const unsubscribe = editor.onChange?.(updateViewerData);
16946
- const pollInterval = setInterval(updateViewerData, 1e3);
16947
- return () => {
16948
- unsubscribe?.();
16949
- clearInterval(pollInterval);
16950
- };
16951
- }, [editor]);
16952
- const { domainCardData, isApproved: isViewerApproved } = viewerData;
16953
- const isDataReady = isDomainCardDataReady(domainCardData) && isViewerApproved;
16923
+ const domainCardData = block.props.domainCardData || "{}";
16924
+ const isDataReady = isDomainCardDataReady(domainCardData);
16954
16925
  useEffect47(() => {
16955
16926
  if (status === "pending" && isDataReady) {
16956
16927
  editor.updateBlock(block, {
@@ -16959,13 +16930,6 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
16959
16930
  status: "ready"
16960
16931
  }
16961
16932
  });
16962
- } else if (status === "ready" && !isDataReady) {
16963
- editor.updateBlock(block, {
16964
- props: {
16965
- ...block.props,
16966
- status: "pending"
16967
- }
16968
- });
16969
16933
  }
16970
16934
  }, [isDataReady, status, editor, block]);
16971
16935
  const handleComplete = useCallback47(
@@ -16997,7 +16961,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
16997
16961
  const panelContent = useMemo56(() => /* @__PURE__ */ React185.createElement(SignPanel, { editor, block, onComplete: handleComplete, onError: handleError }), [editor, block, handleComplete, handleError]);
16998
16962
  const { open } = usePanel(panelId, panelContent);
16999
16963
  const handleOpen = () => {
17000
- if (isDataReady || status === "completed" || status === "error") {
16964
+ if (status === "ready" || status === "completed" || status === "error") {
17001
16965
  open();
17002
16966
  }
17003
16967
  };
@@ -17018,7 +16982,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
17018
16982
  }
17019
16983
  };
17020
16984
  const badgeProps = getBadgeProps();
17021
- const isClickable = isDataReady || status === "completed" || status === "error";
16985
+ const isClickable = status === "ready" || status === "completed" || status === "error";
17022
16986
  const getDescriptionText = () => {
17023
16987
  switch (status) {
17024
16988
  case "completed":
@@ -17028,7 +16992,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
17028
16992
  case "ready":
17029
16993
  return "Click to sign and create the domain";
17030
16994
  default:
17031
- return "Waiting for domain data to be approved";
16995
+ return "Waiting for domain card data";
17032
16996
  }
17033
16997
  };
17034
16998
  return /* @__PURE__ */ React185.createElement(BaseContainer, { onClick: isClickable ? handleOpen : void 0, style: { opacity: isClickable ? 1 : 0.7, cursor: isClickable ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React185.createElement(Group59, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React185.createElement(Group59, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("feather", block.props.icon), /* @__PURE__ */ React185.createElement(Stack122, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React185.createElement(Group59, { gap: "xs", align: "center" }, /* @__PURE__ */ React185.createElement(Text96, { fw: 600, size: "sm" }, block.props.title || "Sign to Create"), /* @__PURE__ */ React185.createElement(Badge28, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React185.createElement(Text96, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), isClickable && /* @__PURE__ */ React185.createElement(Tooltip18, { label: status === "completed" ? "View details" : "Sign & Create", withArrow: true }, /* @__PURE__ */ React185.createElement(ActionIcon27, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React185.createElement(IconChevronRight8, { size: 18 })))));
@@ -17051,10 +17015,11 @@ var DomainCreatorSignBlockSpec = createReactBlockSpec16(
17051
17015
  title: { default: "" },
17052
17016
  description: { default: "" },
17053
17017
  icon: { default: "feather" },
17018
+ // JSON string of credential subject data (pushed from domainCardViewer)
17019
+ domainCardData: { default: "{}" },
17054
17020
  // Entity type from protocol selector or oracle
17055
17021
  entityType: { default: "" },
17056
17022
  // Status: pending | ready | signing | uploading | creating | completed | error
17057
- // NOTE: This block reads domainCardData from the domainCardViewer block
17058
17023
  status: { default: "pending" },
17059
17024
  // Created entity DID (after success)
17060
17025
  entityDid: { default: "" },
@@ -17089,11 +17054,11 @@ import React189, { useCallback as useCallback48 } from "react";
17089
17054
  import { Paper as Paper19, CloseButton as CloseButton14, Title as Title17 } from "@mantine/core";
17090
17055
 
17091
17056
  // src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
17092
- import React188, { useEffect as useEffect48, useState as useState66 } from "react";
17057
+ import React188, { useEffect as useEffect48, useState as useState65 } from "react";
17093
17058
  var GeneralTab13 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
17094
- const [localTitle, setLocalTitle] = useState66(title || "");
17095
- const [localDescription, setLocalDescription] = useState66(description || "");
17096
- const [localIcon, setLocalIcon] = useState66(icon || "dots-circle");
17059
+ const [localTitle, setLocalTitle] = useState65(title || "");
17060
+ const [localDescription, setLocalDescription] = useState65(description || "");
17061
+ const [localIcon, setLocalIcon] = useState65(icon || "dots-circle");
17097
17062
  useEffect48(() => setLocalTitle(title || ""), [title]);
17098
17063
  useEffect48(() => setLocalDescription(description || ""), [description]);
17099
17064
  useEffect48(() => setLocalIcon(icon || "dots-circle"), [icon]);
@@ -17527,7 +17492,6 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
17527
17492
  const status = block.props.status || "pending";
17528
17493
  const domainPreviewData = block.props.domainPreviewData || "{}";
17529
17494
  const isDataReady = isPreviewDataReady(domainPreviewData);
17530
- console.log("block.props", block.props);
17531
17495
  useEffect49(() => {
17532
17496
  if (status === "pending" && isDataReady) {
17533
17497
  editor.updateBlock(block, {
@@ -17839,7 +17803,7 @@ blockRegistry.register({
17839
17803
  });
17840
17804
 
17841
17805
  // src/mantine/blocks/hooks/useBlockDependencies.ts
17842
- import { useMemo as useMemo60, useEffect as useEffect50, useState as useState67, useCallback as useCallback50 } from "react";
17806
+ import { useMemo as useMemo60, useEffect as useEffect50, useState as useState66, useCallback as useCallback50 } from "react";
17843
17807
 
17844
17808
  // src/mantine/blocks/hooks/useDependsOn.ts
17845
17809
  import { useMemo as useMemo61 } from "react";
@@ -18195,6 +18159,7 @@ var getExtraSlashMenuItems = (editor) => {
18195
18159
  title: "",
18196
18160
  description: "",
18197
18161
  icon: "feather",
18162
+ domainCardData: "{}",
18198
18163
  entityType: "",
18199
18164
  status: "pending",
18200
18165
  entityDid: "",
@@ -18317,11 +18282,11 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
18317
18282
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
18318
18283
 
18319
18284
  // src/core/hooks/useMatrixProvider.ts
18320
- import { useEffect as useEffect51, useState as useState68, useRef as useRef11, useCallback as useCallback51, useMemo as useMemo62 } from "react";
18285
+ import { useEffect as useEffect51, useState as useState67, useRef as useRef11, useCallback as useCallback51, useMemo as useMemo62 } from "react";
18321
18286
  import { MatrixProvider } from "@ixo/matrix-crdt";
18322
18287
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
18323
- const [matrixProvider, setProvider] = useState68(null);
18324
- const [status, setStatus] = useState68("disconnected");
18288
+ const [matrixProvider, setProvider] = useState67(null);
18289
+ const [status, setStatus] = useState67("disconnected");
18325
18290
  const isMountedRef = useRef11(true);
18326
18291
  const providerRef = useRef11(null);
18327
18292
  const retryTimeoutRef = useRef11(null);
@@ -18866,7 +18831,7 @@ function useCreateCollaborativeIxoEditor(options) {
18866
18831
  }
18867
18832
 
18868
18833
  // src/mantine/components/CoverImage.tsx
18869
- import React196, { useState as useState69, useRef as useRef12, useEffect as useEffect53 } from "react";
18834
+ import React196, { useState as useState68, useRef as useRef12, useEffect as useEffect53 } from "react";
18870
18835
  import { Box as Box35, Group as Group62 } from "@mantine/core";
18871
18836
 
18872
18837
  // src/core/lib/imageTransform.ts
@@ -19026,12 +18991,12 @@ function CoverImageButton({ isActive = false, children, onClick, style }) {
19026
18991
  // src/mantine/components/CoverImage.tsx
19027
18992
  function CoverImage({ coverImageUrl, logoUrl }) {
19028
18993
  const { editor, handlers, editable } = useBlocknoteContext();
19029
- const [isHovering, setIsHovering] = useState69(false);
19030
- const [isRepositioning, setIsRepositioning] = useState69(false);
19031
- const [coverPosition, setCoverPosition] = useState69(50);
18994
+ const [isHovering, setIsHovering] = useState68(false);
18995
+ const [isRepositioning, setIsRepositioning] = useState68(false);
18996
+ const [coverPosition, setCoverPosition] = useState68(50);
19032
18997
  const coverFileInputRef = useRef12(null);
19033
18998
  const logoFileInputRef = useRef12(null);
19034
- const [metadata, setMetadata] = useState69(() => editor?.getPageMetadata?.() || null);
18999
+ const [metadata, setMetadata] = useState68(() => editor?.getPageMetadata?.() || null);
19035
19000
  useEffect53(() => {
19036
19001
  if (!editor?._metadataManager) {
19037
19002
  return;
@@ -19319,7 +19284,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
19319
19284
  }
19320
19285
 
19321
19286
  // src/mantine/components/PageHeader.tsx
19322
- import React197, { useState as useState70, useRef as useRef13, useEffect as useEffect54 } from "react";
19287
+ import React197, { useState as useState69, useRef as useRef13, useEffect as useEffect54 } from "react";
19323
19288
  function PageHeader({
19324
19289
  title = "New page",
19325
19290
  icon,
@@ -19330,7 +19295,7 @@ function PageHeader({
19330
19295
  isFavorited = false,
19331
19296
  menuItems = []
19332
19297
  }) {
19333
- const [isMenuOpen, setIsMenuOpen] = useState70(false);
19298
+ const [isMenuOpen, setIsMenuOpen] = useState69(false);
19334
19299
  const menuRef = useRef13(null);
19335
19300
  useEffect54(() => {
19336
19301
  function handleClickOutside(event) {
@@ -19512,7 +19477,7 @@ var styles = {
19512
19477
  };
19513
19478
 
19514
19479
  // src/mantine/components/ExternalDropZone.tsx
19515
- import React198, { useCallback as useCallback52, useEffect as useEffect55, useRef as useRef14, useState as useState71 } from "react";
19480
+ import React198, { useCallback as useCallback52, useEffect as useEffect55, useRef as useRef14, useState as useState70 } from "react";
19516
19481
  import { Box as Box36 } from "@mantine/core";
19517
19482
  var SCROLL_ZONE_SIZE = 80;
19518
19483
  var SCROLL_SPEED = 12;
@@ -19526,9 +19491,9 @@ var ExternalDropZone = ({
19526
19491
  children
19527
19492
  }) => {
19528
19493
  const containerRef = useRef14(null);
19529
- const [isValidDrag, setIsValidDrag] = useState71(false);
19530
- const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState71(false);
19531
- const [indicatorStyle, setIndicatorStyle] = useState71({});
19494
+ const [isValidDrag, setIsValidDrag] = useState70(false);
19495
+ const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState70(false);
19496
+ const [indicatorStyle, setIndicatorStyle] = useState70({});
19532
19497
  const dropPositionRef = useRef14(null);
19533
19498
  const scrollAnimationRef = useRef14(null);
19534
19499
  const scrollDirectionRef = useRef14(null);
@@ -20050,7 +20015,7 @@ function IxoEditor({
20050
20015
  }
20051
20016
 
20052
20017
  // src/mantine/components/EntitySigningSetup.tsx
20053
- import React201, { useState as useState72 } from "react";
20018
+ import React201, { useState as useState71 } from "react";
20054
20019
  import { Modal as Modal3, Stack as Stack126, Text as Text100, TextInput as TextInput6, Button as Button36, Alert as Alert26, Group as Group63 } from "@mantine/core";
20055
20020
  import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck7, IconKey as IconKey2 } from "@tabler/icons-react";
20056
20021
  var EntitySigningSetup = ({
@@ -20060,11 +20025,11 @@ var EntitySigningSetup = ({
20060
20025
  entityName,
20061
20026
  onSetup
20062
20027
  }) => {
20063
- const [pin, setPin] = useState72("");
20064
- const [confirmPin, setConfirmPin] = useState72("");
20065
- const [loading, setLoading] = useState72(false);
20066
- const [error, setError] = useState72(null);
20067
- const [success, setSuccess] = useState72(false);
20028
+ const [pin, setPin] = useState71("");
20029
+ const [confirmPin, setConfirmPin] = useState71("");
20030
+ const [loading, setLoading] = useState71(false);
20031
+ const [error, setError] = useState71(null);
20032
+ const [success, setSuccess] = useState71(false);
20068
20033
  const handleSetup = async () => {
20069
20034
  if (pin.length < 4) {
20070
20035
  setError("PIN must be at least 4 characters");
@@ -20146,7 +20111,7 @@ var EntitySigningSetup = ({
20146
20111
  };
20147
20112
 
20148
20113
  // src/mantine/components/FlowPermissionsPanel.tsx
20149
- import React202, { useState as useState73, useEffect as useEffect56, useMemo as useMemo65 } from "react";
20114
+ import React202, { useState as useState72, useEffect as useEffect56, useMemo as useMemo65 } from "react";
20150
20115
  import { Stack as Stack127, Text as Text101, Paper as Paper21, Group as Group64, Badge as Badge31, Button as Button37, ActionIcon as ActionIcon29, Loader as Loader26, Alert as Alert27, Divider as Divider12 } from "@mantine/core";
20151
20116
  import { IconPlus as IconPlus5, IconTrash as IconTrash6, IconShieldCheck as IconShieldCheck2, IconUser as IconUser4, IconRobot as IconRobot3, IconBuilding } from "@tabler/icons-react";
20152
20117
  var FlowPermissionsPanel = ({
@@ -20157,9 +20122,9 @@ var FlowPermissionsPanel = ({
20157
20122
  onRevokePermission,
20158
20123
  getUserDisplayName
20159
20124
  }) => {
20160
- const [delegations, setDelegations] = useState73([]);
20161
- const [loading, setLoading] = useState73(true);
20162
- const [revoking, setRevoking] = useState73(null);
20125
+ const [delegations, setDelegations] = useState72([]);
20126
+ const [loading, setLoading] = useState72(true);
20127
+ const [revoking, setRevoking] = useState72(null);
20163
20128
  const rootCapability = useMemo65(() => editor.getRootCapability?.(), [editor]);
20164
20129
  useEffect56(() => {
20165
20130
  const loadDelegations = async () => {
@@ -20245,7 +20210,7 @@ var FlowPermissionsPanel = ({
20245
20210
  };
20246
20211
 
20247
20212
  // src/mantine/components/GrantPermissionModal.tsx
20248
- import React203, { useState as useState74, useCallback as useCallback53 } from "react";
20213
+ import React203, { useState as useState73, useCallback as useCallback53 } from "react";
20249
20214
  import {
20250
20215
  Modal as Modal4,
20251
20216
  Stack as Stack128,
@@ -20277,20 +20242,20 @@ var GrantPermissionModal = ({
20277
20242
  const singleBlockMode = !!targetBlockId || blocks.length === 1;
20278
20243
  const fixedBlockId = targetBlockId || (blocks.length === 1 ? blocks[0].id : null);
20279
20244
  const fixedBlock = fixedBlockId ? blocks.find((b) => b.id === fixedBlockId) || blocks[0] : null;
20280
- const [recipientType, setRecipientType] = useState74("user");
20281
- const [searchQuery, setSearchQuery] = useState74("");
20282
- const [searchResults, setSearchResults] = useState74([]);
20283
- const [searching, setSearching] = useState74(false);
20284
- const [selectedRecipient, setSelectedRecipient] = useState74(null);
20285
- const [manualDid, setManualDid] = useState74("");
20286
- const [scopeType, setScopeType] = useState74("full");
20287
- const [selectedBlocks, setSelectedBlocks] = useState74([]);
20288
- const [expirationEnabled, setExpirationEnabled] = useState74(false);
20289
- const [expirationDays, setExpirationDays] = useState74(30);
20290
- const [canDelegate, setCanDelegate] = useState74(false);
20291
- const [pin, setPin] = useState74("");
20292
- const [loading, setLoading] = useState74(false);
20293
- const [error, setError] = useState74(null);
20245
+ const [recipientType, setRecipientType] = useState73("user");
20246
+ const [searchQuery, setSearchQuery] = useState73("");
20247
+ const [searchResults, setSearchResults] = useState73([]);
20248
+ const [searching, setSearching] = useState73(false);
20249
+ const [selectedRecipient, setSelectedRecipient] = useState73(null);
20250
+ const [manualDid, setManualDid] = useState73("");
20251
+ const [scopeType, setScopeType] = useState73("full");
20252
+ const [selectedBlocks, setSelectedBlocks] = useState73([]);
20253
+ const [expirationEnabled, setExpirationEnabled] = useState73(false);
20254
+ const [expirationDays, setExpirationDays] = useState73(30);
20255
+ const [canDelegate, setCanDelegate] = useState73(false);
20256
+ const [pin, setPin] = useState73("");
20257
+ const [loading, setLoading] = useState73(false);
20258
+ const [error, setError] = useState73(null);
20294
20259
  const handleSearch = useCallback53(async () => {
20295
20260
  if (searchQuery.length < 2) return;
20296
20261
  setSearching(true);
@@ -20578,4 +20543,4 @@ export {
20578
20543
  ixoGraphQLClient,
20579
20544
  getEntity
20580
20545
  };
20581
- //# sourceMappingURL=chunk-3ER6BXWB.mjs.map
20546
+ //# sourceMappingURL=chunk-KWCTPDGD.mjs.map