@ixo/editor 2.27.0 → 2.27.1

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.
@@ -18707,9 +18707,9 @@ var EmailTemplateView = ({ editor, block }) => {
18707
18707
  };
18708
18708
 
18709
18709
  // src/mantine/blocks/email/flow/FlowView.tsx
18710
- import React177 from "react";
18711
- import { Alert as Alert25, Badge as Badge27, Button as Button33, Group as Group58, Loader as Loader23, Stack as Stack123, Text as Text97, Tooltip as Tooltip17 } from "@mantine/core";
18712
- import { IconMail as IconMail4, IconSend as IconSend4, IconAlertCircle as IconAlertCircle10, IconCheck as IconCheck8, IconRefresh as IconRefresh7 } from "@tabler/icons-react";
18710
+ import React177, { useMemo as useMemo56 } from "react";
18711
+ import { Group as Group58, Stack as Stack123, Text as Text97, ActionIcon as ActionIcon29, Tooltip as Tooltip17, Button as Button33, Badge as Badge27, Alert as Alert25, Loader as Loader23, Divider as Divider16 } from "@mantine/core";
18712
+ import { IconSend as IconSend4, IconCheck as IconCheck8, IconX as IconX10 } from "@tabler/icons-react";
18713
18713
 
18714
18714
  // src/mantine/blocks/email/flow/hooks/useEmailActions.ts
18715
18715
  import { useState as useState65, useCallback as useCallback49 } from "react";
@@ -18810,61 +18810,68 @@ function useEmailActions({ block, editor }) {
18810
18810
  }
18811
18811
 
18812
18812
  // src/mantine/blocks/email/flow/FlowView.tsx
18813
- function formatTime2(isoString) {
18814
- try {
18815
- const date = new Date(isoString);
18816
- return date.toLocaleString();
18817
- } catch {
18818
- return isoString;
18819
- }
18820
- }
18821
18813
  var EmailFlowView = ({ editor, block, isDisabled }) => {
18822
18814
  const disabled = isDisabled?.isDisabled === "disable";
18815
+ const { closePanel } = usePanelStore();
18816
+ const assignmentPanelContent = useMemo56(
18817
+ () => /* @__PURE__ */ React177.createElement(BaseRightPanelLayout, { onClose: closePanel, title: "Assignment Tab" }, /* @__PURE__ */ React177.createElement(AssignmentTab, { editor, block })),
18818
+ [editor, block]
18819
+ );
18820
+ const assignmentPanelId = `email-assignment-panel-${block.id}`;
18821
+ const { open: openAssignment } = usePanel(assignmentPanelId, assignmentPanelContent);
18822
+ const detailsPanelContent = useMemo56(() => /* @__PURE__ */ React177.createElement(EmailDetailsPanel, { editor, block, onClose: closePanel }), [editor, block]);
18823
+ const detailsPanelId = `email-details-panel-${block.id}`;
18824
+ const { open: openDetails } = usePanel(detailsPanelId, detailsPanelContent);
18823
18825
  const { sendEmail, resetStatus, loading } = useEmailActions({ block, editor });
18824
18826
  const status = block.props.status || "idle";
18825
18827
  const editorDocument = editor.document || [];
18826
18828
  const toDisplay = resolveReferences(block.props.to, editorDocument);
18827
- const subjectDisplay = resolveReferences(block.props.subject, editorDocument);
18828
- const getStatusColor2 = () => {
18829
- switch (status) {
18830
- case "sending":
18831
- return "blue";
18829
+ const getStatusColor2 = (s) => {
18830
+ switch (s) {
18832
18831
  case "sent":
18833
18832
  return "green";
18834
18833
  case "error":
18835
18834
  return "red";
18836
- default:
18837
- return "gray";
18838
- }
18839
- };
18840
- const getStatusText = () => {
18841
- switch (status) {
18842
- case "sending":
18843
- return "Sending...";
18844
- case "sent":
18845
- return `Sent ${block.props.lastSentAt ? formatTime2(block.props.lastSentAt) : ""}`;
18846
- case "error":
18847
- return "Failed";
18848
- default:
18849
- return "Ready";
18850
- }
18851
- };
18852
- const getStatusIcon = () => {
18853
- switch (status) {
18854
18835
  case "sending":
18855
- return /* @__PURE__ */ React177.createElement(Loader23, { size: 14 });
18856
- case "sent":
18857
- return /* @__PURE__ */ React177.createElement(IconCheck8, { size: 14 });
18858
- case "error":
18859
- return /* @__PURE__ */ React177.createElement(IconAlertCircle10, { size: 14 });
18836
+ return "blue";
18860
18837
  default:
18861
- return /* @__PURE__ */ React177.createElement(IconMail4, { size: 14 });
18838
+ return "gray";
18862
18839
  }
18863
18840
  };
18864
18841
  const canSend = !disabled && !loading && block.props.templateName && block.props.to && block.props.from;
18865
- const sendButton = /* @__PURE__ */ React177.createElement(Button33, { leftSection: loading ? /* @__PURE__ */ React177.createElement(Loader23, { size: "xs", color: "white" }) : /* @__PURE__ */ React177.createElement(IconSend4, { size: 16 }), onClick: sendEmail, disabled: !canSend, loading, size: "sm" }, block.props.buttonLabel || "Send Email");
18866
- return /* @__PURE__ */ React177.createElement(BaseContainer, null, /* @__PURE__ */ React177.createElement(Stack123, { gap: "sm" }, /* @__PURE__ */ React177.createElement(Group58, { justify: "space-between", wrap: "nowrap" }, /* @__PURE__ */ React177.createElement(Group58, { wrap: "nowrap" }, /* @__PURE__ */ React177.createElement(IconMail4, { size: 20, style: { color: "var(--mantine-color-blue-6)" } }), /* @__PURE__ */ React177.createElement(Text97, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Send Email")), /* @__PURE__ */ React177.createElement(Badge27, { color: getStatusColor2(), leftSection: getStatusIcon(), size: "sm" }, getStatusText())), block.props.description && /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description), /* @__PURE__ */ React177.createElement(Stack123, { gap: 4 }, /* @__PURE__ */ React177.createElement(Text97, { size: "xs", contentEditable: false }, /* @__PURE__ */ React177.createElement(Text97, { span: true, fw: 500 }, "To:"), " ", toDisplay || /* @__PURE__ */ React177.createElement(Text97, { span: true, c: "orange" }, "Not configured")), /* @__PURE__ */ React177.createElement(Text97, { size: "xs", contentEditable: false }, /* @__PURE__ */ React177.createElement(Text97, { span: true, fw: 500 }, "Subject:"), " ", subjectDisplay || /* @__PURE__ */ React177.createElement(Text97, { span: true, c: "dimmed" }, "No subject"))), status === "error" && block.props.error && /* @__PURE__ */ React177.createElement(Alert25, { color: "red", icon: /* @__PURE__ */ React177.createElement(IconAlertCircle10, { size: 16 }), py: "xs" }, block.props.error), /* @__PURE__ */ React177.createElement(Group58, { gap: "sm" }, disabled && isDisabled?.message ? /* @__PURE__ */ React177.createElement(Tooltip17, { label: isDisabled.message, position: "top", withArrow: true }, sendButton) : sendButton, status === "error" && /* @__PURE__ */ React177.createElement(Button33, { variant: "light", color: "gray", size: "sm", leftSection: /* @__PURE__ */ React177.createElement(IconRefresh7, { size: 16 }), onClick: resetStatus }, "Reset"), status === "sent" && /* @__PURE__ */ React177.createElement(Button33, { variant: "light", color: "blue", size: "sm", leftSection: /* @__PURE__ */ React177.createElement(IconRefresh7, { size: 16 }), onClick: resetStatus }, "Send Again")), status === "sent" && block.props.lastMessageId && /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: "dimmed", contentEditable: false }, "Message ID: ", block.props.lastMessageId)));
18842
+ const sendButton = /* @__PURE__ */ React177.createElement(
18843
+ Button33,
18844
+ {
18845
+ size: "sm",
18846
+ variant: "light",
18847
+ color: "blue",
18848
+ leftSection: loading ? /* @__PURE__ */ React177.createElement(Loader23, { size: 14 }) : status === "sent" ? /* @__PURE__ */ React177.createElement(IconCheck8, { size: 14 }) : /* @__PURE__ */ React177.createElement(IconSend4, { size: 14 }),
18849
+ onClick: sendEmail,
18850
+ disabled: !canSend,
18851
+ style: { flexShrink: 0 }
18852
+ },
18853
+ loading ? "Sending..." : status === "sent" ? "Sent" : block.props.buttonLabel || "Send"
18854
+ );
18855
+ return /* @__PURE__ */ React177.createElement(BaseContainer, { onClick: openDetails }, /* @__PURE__ */ React177.createElement(Stack123, { gap: "md" }, /* @__PURE__ */ React177.createElement(Group58, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React177.createElement(Group58, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, getIcon("mail", block.props.icon), /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React177.createElement(Group58, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React177.createElement(Badge27, { size: "sm", variant: "filled", color: "blue" }, "EMAIL"), /* @__PURE__ */ React177.createElement(Text97, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Send Email"), status !== "idle" && /* @__PURE__ */ React177.createElement(Badge27, { size: "xs", variant: "dot", color: getStatusColor2(status) }, status)), /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, toDisplay ? `To: ${toDisplay}` : "No recipient configured"), block.props.description && /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React177.createElement(Group58, { gap: "xs", style: { flexShrink: 0 }, onClick: (e) => e.stopPropagation() }, /* @__PURE__ */ React177.createElement(AssignmentDisplay, { block, onClick: openAssignment }), disabled && isDisabled?.message ? /* @__PURE__ */ React177.createElement(Tooltip17, { label: isDisabled.message, position: "left", withArrow: true }, sendButton) : sendButton, status === "sent" && /* @__PURE__ */ React177.createElement(Tooltip17, { label: "Send again", position: "top", withArrow: true }, /* @__PURE__ */ React177.createElement(ActionIcon29, { variant: "light", color: "blue", onClick: resetStatus }, /* @__PURE__ */ React177.createElement(IconSend4, { size: 14 }))))), status === "error" && block.props.error && /* @__PURE__ */ React177.createElement(Alert25, { color: "red", icon: /* @__PURE__ */ React177.createElement(IconX10, { size: 16 }), title: "Failed to send", styles: { message: { fontSize: "12px" } } }, block.props.error)));
18867
18856
  };
18857
+ function EmailDetailsPanel({ editor, block, onClose }) {
18858
+ const editorDocument = editor.document || [];
18859
+ const toDisplay = resolveReferences(block.props.to, editorDocument);
18860
+ const subjectDisplay = resolveReferences(block.props.subject, editorDocument);
18861
+ const fromDisplay = block.props.from ? resolveReferences(block.props.from, editorDocument) : "";
18862
+ const ccDisplay = block.props.cc ? resolveReferences(block.props.cc, editorDocument) : "";
18863
+ const bccDisplay = block.props.bcc ? resolveReferences(block.props.bcc, editorDocument) : "";
18864
+ const replyToDisplay = block.props.replyTo ? resolveReferences(block.props.replyTo, editorDocument) : "";
18865
+ let variables = {};
18866
+ try {
18867
+ variables = JSON.parse(block.props.variables || "{}");
18868
+ } catch {
18869
+ }
18870
+ return /* @__PURE__ */ React177.createElement(BaseRightPanelLayout, { onClose, title: "Email Details" }, /* @__PURE__ */ React177.createElement(Stack123, { gap: "lg", py: "md" }, /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React177.createElement(Text97, { size: "sm", fw: 600 }, "Recipients"), /* @__PURE__ */ React177.createElement(DetailRow, { label: "To", value: toDisplay }), fromDisplay && /* @__PURE__ */ React177.createElement(DetailRow, { label: "From", value: fromDisplay }), ccDisplay && /* @__PURE__ */ React177.createElement(DetailRow, { label: "CC", value: ccDisplay }), bccDisplay && /* @__PURE__ */ React177.createElement(DetailRow, { label: "BCC", value: bccDisplay }), replyToDisplay && /* @__PURE__ */ React177.createElement(DetailRow, { label: "Reply-To", value: replyToDisplay })), /* @__PURE__ */ React177.createElement(Divider16, null), /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React177.createElement(Text97, { size: "sm", fw: 600 }, "Subject"), /* @__PURE__ */ React177.createElement(Text97, { size: "sm", c: subjectDisplay ? void 0 : "dimmed" }, subjectDisplay || "No subject")), /* @__PURE__ */ React177.createElement(Divider16, null), /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React177.createElement(Text97, { size: "sm", fw: 600 }, "Template"), /* @__PURE__ */ React177.createElement(DetailRow, { label: "Name", value: block.props.templateName, placeholder: "Not selected" }), block.props.templateVersion && /* @__PURE__ */ React177.createElement(DetailRow, { label: "Version", value: block.props.templateVersion })), Object.keys(variables).length > 0 && /* @__PURE__ */ React177.createElement(React177.Fragment, null, /* @__PURE__ */ React177.createElement(Divider16, null), /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React177.createElement(Text97, { size: "sm", fw: 600 }, "Variables"), Object.entries(variables).map(([key, value]) => /* @__PURE__ */ React177.createElement(DetailRow, { key, label: key, value: resolveReferences(value, editorDocument) })))), block.props.status && block.props.status !== "idle" && /* @__PURE__ */ React177.createElement(React177.Fragment, null, /* @__PURE__ */ React177.createElement(Divider16, null), /* @__PURE__ */ React177.createElement(Stack123, { gap: "xs" }, /* @__PURE__ */ React177.createElement(Text97, { size: "sm", fw: 600 }, "Status"), /* @__PURE__ */ React177.createElement(DetailRow, { label: "Status", value: block.props.status }), block.props.lastSentAt && /* @__PURE__ */ React177.createElement(DetailRow, { label: "Last sent", value: new Date(block.props.lastSentAt).toLocaleString() }), block.props.lastMessageId && /* @__PURE__ */ React177.createElement(DetailRow, { label: "Message ID", value: block.props.lastMessageId }), block.props.error && /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: "red" }, block.props.error)))));
18871
+ }
18872
+ function DetailRow({ label, value, placeholder }) {
18873
+ return /* @__PURE__ */ React177.createElement(Group58, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React177.createElement(Text97, { size: "xs", fw: 500, c: "dimmed", style: { minWidth: 70 } }, label, ":"), /* @__PURE__ */ React177.createElement(Text97, { size: "xs", c: value ? void 0 : "dimmed", lineClamp: 1, style: { flex: 1 } }, value || placeholder || "\u2014"));
18874
+ }
18868
18875
 
18869
18876
  // src/mantine/blocks/email/EmailBlock.tsx
18870
18877
  function EmailBlock({ editor, block }) {
@@ -18948,19 +18955,19 @@ import { createReactBlockSpec as createReactBlockSpec15 } from "@blocknote/react
18948
18955
  import React186 from "react";
18949
18956
 
18950
18957
  // src/mantine/blocks/protocolSelector/template/TemplateView.tsx
18951
- import React182, { useMemo as useMemo57 } from "react";
18958
+ import React182, { useMemo as useMemo58 } from "react";
18952
18959
 
18953
18960
  // src/mantine/blocks/protocolSelector/template/TemplateConfig.tsx
18954
18961
  import React181, { useCallback as useCallback50 } from "react";
18955
18962
 
18956
18963
  // src/mantine/blocks/protocolSelector/template/GeneralTab.tsx
18957
- import React180, { useEffect as useEffect51, useMemo as useMemo56, useState as useState66 } from "react";
18958
- import { Divider as Divider16, Stack as Stack124, Text as Text98, PillsInput as PillsInput2, Pill as Pill2, Box as Box35 } from "@mantine/core";
18964
+ import React180, { useEffect as useEffect51, useMemo as useMemo57, useState as useState66 } from "react";
18965
+ import { Divider as Divider17, Stack as Stack124, Text as Text98, PillsInput as PillsInput2, Pill as Pill2, Box as Box35 } from "@mantine/core";
18959
18966
  var GeneralTab11 = ({ title, description, protocolDids, onTitleChange, onDescriptionChange, onProtocolDidsChange }) => {
18960
18967
  const [localTitle, setLocalTitle] = useState66(title || "");
18961
18968
  const [localDescription, setLocalDescription] = useState66(description || "");
18962
18969
  const [inputValue, setInputValue] = useState66("");
18963
- const localDids = useMemo56(() => {
18970
+ const localDids = useMemo57(() => {
18964
18971
  try {
18965
18972
  const parsed = JSON.parse(protocolDids || "[]");
18966
18973
  return Array.isArray(parsed) ? parsed : [];
@@ -19010,7 +19017,7 @@ var GeneralTab11 = ({ title, description, protocolDids, onTitleChange, onDescrip
19010
19017
  onDescriptionChange(newDescription);
19011
19018
  }
19012
19019
  }
19013
- )), /* @__PURE__ */ React180.createElement(Divider16, { variant: "dashed" }), /* @__PURE__ */ React180.createElement(Stack124, { gap: "xs" }, /* @__PURE__ */ React180.createElement(Text98, { size: "sm", fw: 600 }, "Protocol DIDs"), /* @__PURE__ */ React180.createElement(Text98, { size: "xs", c: "dimmed" }, "Add the protocol DIDs that users can select from. Enter a DID and press Enter to add it."), /* @__PURE__ */ React180.createElement(PillsInput2, null, /* @__PURE__ */ React180.createElement(Pill2.Group, null, localDids.map((did) => /* @__PURE__ */ React180.createElement(Pill2, { key: did, withRemoveButton: true, onRemove: () => handleRemoveDid(did) }, did.length > 30 ? `${did.slice(0, 15)}...${did.slice(-12)}` : did)), /* @__PURE__ */ React180.createElement(
19020
+ )), /* @__PURE__ */ React180.createElement(Divider17, { variant: "dashed" }), /* @__PURE__ */ React180.createElement(Stack124, { gap: "xs" }, /* @__PURE__ */ React180.createElement(Text98, { size: "sm", fw: 600 }, "Protocol DIDs"), /* @__PURE__ */ React180.createElement(Text98, { size: "xs", c: "dimmed" }, "Add the protocol DIDs that users can select from. Enter a DID and press Enter to add it."), /* @__PURE__ */ React180.createElement(PillsInput2, null, /* @__PURE__ */ React180.createElement(Pill2.Group, null, localDids.map((did) => /* @__PURE__ */ React180.createElement(Pill2, { key: did, withRemoveButton: true, onRemove: () => handleRemoveDid(did) }, did.length > 30 ? `${did.slice(0, 15)}...${did.slice(-12)}` : did)), /* @__PURE__ */ React180.createElement(
19014
19021
  PillsInput2.Field,
19015
19022
  {
19016
19023
  placeholder: localDids.length === 0 ? "Enter protocol DID and press Enter" : "",
@@ -19071,9 +19078,9 @@ import { IconCircleDashed as IconCircleDashed2 } from "@tabler/icons-react";
19071
19078
  var PROTOCOL_SELECTOR_TEMPLATE_PANEL_ID = "protocol-selector-template-panel";
19072
19079
  var ProtocolSelectorTemplateView = ({ editor, block }) => {
19073
19080
  const panelId = `${PROTOCOL_SELECTOR_TEMPLATE_PANEL_ID}-${block.id}`;
19074
- const panelContent = useMemo57(() => /* @__PURE__ */ React182.createElement(TemplateConfig11, { editor, block }), [editor, block]);
19081
+ const panelContent = useMemo58(() => /* @__PURE__ */ React182.createElement(TemplateConfig11, { editor, block }), [editor, block]);
19075
19082
  const { open } = usePanel(panelId, panelContent);
19076
- const protocolDids = useMemo57(() => {
19083
+ const protocolDids = useMemo58(() => {
19077
19084
  try {
19078
19085
  const parsed = JSON.parse(block.props.protocolDids || "[]");
19079
19086
  return Array.isArray(parsed) ? parsed : [];
@@ -19099,12 +19106,12 @@ var ProtocolSelectorTemplateView = ({ editor, block }) => {
19099
19106
  };
19100
19107
 
19101
19108
  // src/mantine/blocks/protocolSelector/flow/FlowView.tsx
19102
- import React185, { useMemo as useMemo59 } from "react";
19109
+ import React185, { useMemo as useMemo60 } from "react";
19103
19110
  import { Badge as Badge28, Box as Box38, Group as Group61, Stack as Stack127, Text as Text101, Tooltip as Tooltip18 } from "@mantine/core";
19104
19111
  import { IconCircleDashed as IconCircleDashed3, IconChecks } from "@tabler/icons-react";
19105
19112
 
19106
19113
  // src/mantine/blocks/protocolSelector/flow/ProtocolSelectionPanel.tsx
19107
- import React184, { useState as useState67, useEffect as useEffect52, useMemo as useMemo58, useCallback as useCallback51 } from "react";
19114
+ import React184, { useState as useState67, useEffect as useEffect52, useMemo as useMemo59, useCallback as useCallback51 } from "react";
19108
19115
  import { Stack as Stack126, Text as Text100, Box as Box37, Group as Group60, Loader as Loader24 } from "@mantine/core";
19109
19116
 
19110
19117
  // src/icons/EntityAvatar.tsx
@@ -19134,7 +19141,7 @@ var EntityAvatar_default = EntityAvatar;
19134
19141
  var ProtocolSelectionPanel = ({ editor, block }) => {
19135
19142
  const { closePanel } = usePanelStore();
19136
19143
  const handlers = useBlocknoteHandlers();
19137
- const protocolDids = useMemo58(() => {
19144
+ const protocolDids = useMemo59(() => {
19138
19145
  try {
19139
19146
  const parsed = JSON.parse(block.props.protocolDids || "[]");
19140
19147
  return Array.isArray(parsed) ? parsed : [];
@@ -19257,7 +19264,7 @@ var ProtocolSelectorFlowView = ({ editor, block, isDisabled }) => {
19257
19264
  const disabled = isDisabled?.isDisabled === "disable";
19258
19265
  const panelId = `${PROTOCOL_SELECTOR_FLOW_PANEL_ID}-${block.id}`;
19259
19266
  const isCompleted = block.props.status === "completed" && block.props.selectedProtocolDid;
19260
- const panelContent = useMemo59(() => /* @__PURE__ */ React185.createElement(ProtocolSelectionPanel, { editor, block }), [editor, block]);
19267
+ const panelContent = useMemo60(() => /* @__PURE__ */ React185.createElement(ProtocolSelectionPanel, { editor, block }), [editor, block]);
19261
19268
  const { open } = usePanel(panelId, panelContent);
19262
19269
  const handleClick = () => {
19263
19270
  if (disabled) return;
@@ -19362,7 +19369,7 @@ import { createReactBlockSpec as createReactBlockSpec16 } from "@blocknote/react
19362
19369
  import React193 from "react";
19363
19370
 
19364
19371
  // src/mantine/blocks/form/template/TemplateView.tsx
19365
- import React190, { useMemo as useMemo60 } from "react";
19372
+ import React190, { useMemo as useMemo61 } from "react";
19366
19373
  import { Badge as Badge29, Group as Group62, Stack as Stack128, Text as Text103 } from "@mantine/core";
19367
19374
 
19368
19375
  // src/mantine/blocks/form/template/TemplateConfig.tsx
@@ -19518,22 +19525,22 @@ var TemplateConfig12 = ({ editor, block }) => {
19518
19525
  var FORM_TEMPLATE_PANEL_ID = "form-template-panel";
19519
19526
  var FormTemplateView = ({ editor, block }) => {
19520
19527
  const panelId = `${FORM_TEMPLATE_PANEL_ID}-${block.id}`;
19521
- const panelContent = useMemo60(() => /* @__PURE__ */ React190.createElement(TemplateConfig12, { editor, block }), [editor, block]);
19528
+ const panelContent = useMemo61(() => /* @__PURE__ */ React190.createElement(TemplateConfig12, { editor, block }), [editor, block]);
19522
19529
  const { open } = usePanel(panelId, panelContent);
19523
19530
  const hasSchema = Boolean(block.props.surveySchema);
19524
19531
  return /* @__PURE__ */ React190.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React190.createElement(Badge29, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React190.createElement(Group62, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React190.createElement(Group62, { wrap: "nowrap", align: "center" }, getIcon("checklist", block.props.icon), /* @__PURE__ */ React190.createElement(Stack128, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React190.createElement(Text103, { fw: 500, size: "sm" }, block.props.title || "Form"), /* @__PURE__ */ React190.createElement(Text103, { size: "xs", c: "dimmed" }, hasSchema ? "Form configured" : "Click to configure form schema")))));
19525
19532
  };
19526
19533
 
19527
19534
  // src/mantine/blocks/form/flow/FlowView.tsx
19528
- import React192, { useMemo as useMemo62, useState as useState69, useCallback as useCallback54 } from "react";
19529
- import { ActionIcon as ActionIcon29, Badge as Badge30, Group as Group63, Stack as Stack129, Text as Text105, Tooltip as Tooltip19 } from "@mantine/core";
19535
+ import React192, { useMemo as useMemo63, useState as useState69, useCallback as useCallback54 } from "react";
19536
+ import { ActionIcon as ActionIcon30, Badge as Badge30, Group as Group63, Stack as Stack129, Text as Text105, Tooltip as Tooltip19 } from "@mantine/core";
19530
19537
  import { IconChevronRight as IconChevronRight7 } from "@tabler/icons-react";
19531
19538
 
19532
19539
  // src/mantine/blocks/form/flow/FormPanel.tsx
19533
- import React191, { useCallback as useCallback53, useEffect as useEffect54, useMemo as useMemo61, useRef as useRef14 } from "react";
19540
+ import React191, { useCallback as useCallback53, useEffect as useEffect54, useMemo as useMemo62, useRef as useRef14 } from "react";
19534
19541
  import { Alert as Alert26, Text as Text104 } from "@mantine/core";
19535
19542
  import { useDebouncedCallback as useDebouncedCallback2 } from "@mantine/hooks";
19536
- import { IconAlertCircle as IconAlertCircle11 } from "@tabler/icons-react";
19543
+ import { IconAlertCircle as IconAlertCircle10 } from "@tabler/icons-react";
19537
19544
  import { Survey as Survey6, SurveyModel as SurveyModel6 } from "@ixo/surveys";
19538
19545
  var SYNC_DEBOUNCE_MS2 = 300;
19539
19546
  function deepEqual2(a, b) {
@@ -19557,7 +19564,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19557
19564
  const { closePanel } = usePanelStore();
19558
19565
  const isUpdatingFromProp = useRef14(false);
19559
19566
  const lastSyncedAnswers = useRef14("");
19560
- const surveySchema = useMemo61(() => {
19567
+ const surveySchema = useMemo62(() => {
19561
19568
  if (!block.props.surveySchema) return null;
19562
19569
  try {
19563
19570
  return JSON.parse(block.props.surveySchema);
@@ -19565,7 +19572,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19565
19572
  return null;
19566
19573
  }
19567
19574
  }, [block.props.surveySchema]);
19568
- const surveyModel = useMemo61(() => {
19575
+ const surveyModel = useMemo62(() => {
19569
19576
  if (!surveySchema) return null;
19570
19577
  const model = new SurveyModel6(surveySchema);
19571
19578
  model.applyTheme(surveyTheme);
@@ -19651,7 +19658,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19651
19658
  closePanel();
19652
19659
  }, [closePanel]);
19653
19660
  if (!surveySchema) {
19654
- return /* @__PURE__ */ React191.createElement(BaseRightPanelLayout, { title: block.props.title || "Form", onClose: handleClose }, /* @__PURE__ */ React191.createElement(Alert26, { icon: /* @__PURE__ */ React191.createElement(IconAlertCircle11, { size: 16 }), title: "Form Not Configured", color: "yellow" }, /* @__PURE__ */ React191.createElement(Text104, { size: "sm" }, "No survey schema has been configured for this form. Please configure it in template mode.")));
19661
+ return /* @__PURE__ */ React191.createElement(BaseRightPanelLayout, { title: block.props.title || "Form", onClose: handleClose }, /* @__PURE__ */ React191.createElement(Alert26, { icon: /* @__PURE__ */ React191.createElement(IconAlertCircle10, { size: 16 }), title: "Form Not Configured", color: "yellow" }, /* @__PURE__ */ React191.createElement(Text104, { size: "sm" }, "No survey schema has been configured for this form. Please configure it in template mode.")));
19655
19662
  }
19656
19663
  return /* @__PURE__ */ React191.createElement(
19657
19664
  BaseRightPanelLayout,
@@ -19680,7 +19687,7 @@ var FormFlowView = ({ editor, block }) => {
19680
19687
  });
19681
19688
  }, [editor, block]);
19682
19689
  const panelId = `${FORM_FLOW_PANEL_ID}-${block.id}`;
19683
- const panelContent = useMemo62(() => /* @__PURE__ */ React192.createElement(FormPanel, { editor, block, onComplete: handleComplete }), [editor, block, handleComplete]);
19690
+ const panelContent = useMemo63(() => /* @__PURE__ */ React192.createElement(FormPanel, { editor, block, onComplete: handleComplete }), [editor, block, handleComplete]);
19684
19691
  const { open } = usePanel(panelId, panelContent);
19685
19692
  const handleOpen = () => {
19686
19693
  setHasOpened(true);
@@ -19717,7 +19724,7 @@ var FormFlowView = ({ editor, block }) => {
19717
19724
  )), /* @__PURE__ */ React192.createElement(Text105, { size: "xs", c: "dimmed", lineClamp: 2 }, isCompleted ? `Completed on ${new Date(block.props.completedAt).toLocaleDateString()}` : (
19718
19725
  // : block.props.description || (hasSchema ? 'Click to fill out the form' : 'Form not configured')}
19719
19726
  hasSchema ? "Click to fill out the form" : "Form not configured"
19720
- )))), /* @__PURE__ */ React192.createElement(Tooltip19, { label: isCompleted ? "View form" : "Fill form", withArrow: true }, /* @__PURE__ */ React192.createElement(ActionIcon29, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React192.createElement(IconChevronRight7, { size: 18 })))));
19727
+ )))), /* @__PURE__ */ React192.createElement(Tooltip19, { label: isCompleted ? "View form" : "Fill form", withArrow: true }, /* @__PURE__ */ React192.createElement(ActionIcon30, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React192.createElement(IconChevronRight7, { size: 18 })))));
19721
19728
  };
19722
19729
 
19723
19730
  // src/mantine/blocks/form/FormBlock.tsx
@@ -19760,7 +19767,7 @@ import { createReactBlockSpec as createReactBlockSpec17 } from "@blocknote/react
19760
19767
  import React201 from "react";
19761
19768
 
19762
19769
  // src/mantine/blocks/domainCreatorSign/template/TemplateView.tsx
19763
- import React197, { useMemo as useMemo63 } from "react";
19770
+ import React197, { useMemo as useMemo64 } from "react";
19764
19771
  import { Badge as Badge31, Group as Group64, Stack as Stack130, Text as Text106 } from "@mantine/core";
19765
19772
 
19766
19773
  // src/mantine/blocks/domainCreatorSign/template/TemplateConfig.tsx
@@ -19860,11 +19867,11 @@ var DOMAIN_CREATOR_SIGN_TEMPLATE_PANEL_ID = "domain-creator-sign-template-panel"
19860
19867
  var DOMAIN_CREATOR_SIGN_TEMPLATE_ASSIGNMENT_PANEL_ID = "domain-creator-sign-template-assignment-panel";
19861
19868
  var DomainCreatorSignTemplateView = ({ editor, block }) => {
19862
19869
  const panelId = `${DOMAIN_CREATOR_SIGN_TEMPLATE_PANEL_ID}-${block.id}`;
19863
- const panelContent = useMemo63(() => /* @__PURE__ */ React197.createElement(TemplateConfig13, { editor, block }), [editor, block]);
19870
+ const panelContent = useMemo64(() => /* @__PURE__ */ React197.createElement(TemplateConfig13, { editor, block }), [editor, block]);
19864
19871
  const { open } = usePanel(panelId, panelContent);
19865
19872
  const { closePanel } = usePanelStore();
19866
19873
  const assignmentPanelId = `${DOMAIN_CREATOR_SIGN_TEMPLATE_ASSIGNMENT_PANEL_ID}-${block.id}`;
19867
- const assignmentPanelContent = useMemo63(
19874
+ const assignmentPanelContent = useMemo64(
19868
19875
  () => /* @__PURE__ */ React197.createElement(BaseRightPanelLayout, { onClose: closePanel, title: "Assignment Tab" }, /* @__PURE__ */ React197.createElement(AssignmentTab, { editor, block })),
19869
19876
  [editor, block, closePanel]
19870
19877
  );
@@ -19873,13 +19880,13 @@ var DomainCreatorSignTemplateView = ({ editor, block }) => {
19873
19880
  };
19874
19881
 
19875
19882
  // src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
19876
- import React200, { useCallback as useCallback57, useMemo as useMemo64, useEffect as useEffect56 } from "react";
19877
- import { ActionIcon as ActionIcon30, Badge as Badge33, Group as Group67, Stack as Stack133, Text as Text109, Tooltip as Tooltip21 } from "@mantine/core";
19883
+ import React200, { useCallback as useCallback57, useMemo as useMemo65, useEffect as useEffect56 } from "react";
19884
+ import { ActionIcon as ActionIcon31, Badge as Badge33, Group as Group67, Stack as Stack133, Text as Text109, Tooltip as Tooltip21 } from "@mantine/core";
19878
19885
  import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
19879
19886
 
19880
19887
  // src/mantine/blocks/domainCreatorSign/flow/SignPanel.tsx
19881
19888
  import { Alert as Alert27, Button as Button34, Group as Group66, Loader as Loader25, Stack as Stack132, Text as Text108 } from "@mantine/core";
19882
- import { IconAlertCircle as IconAlertCircle12, IconCheck as IconCheck9 } from "@tabler/icons-react";
19889
+ import { IconAlertCircle as IconAlertCircle11, IconCheck as IconCheck9 } from "@tabler/icons-react";
19883
19890
  import React199, { useCallback as useCallback56, useState as useState72 } from "react";
19884
19891
 
19885
19892
  // src/mantine/blocks/domainCreatorSign/utils/buildLinkedEntityResource.ts
@@ -20170,7 +20177,7 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
20170
20177
  return /* @__PURE__ */ React199.createElement(BaseRightPanelLayout, { onClose: handleClose, title: block.props.title || "Sign to Create" }, /* @__PURE__ */ React199.createElement(Stack132, { gap: "md" }, /* @__PURE__ */ React199.createElement(Alert27, { icon: /* @__PURE__ */ React199.createElement(IconCheck9, { size: 16 }), title: "Domain Created Successfully", color: "green" }, /* @__PURE__ */ React199.createElement(Stack132, { gap: "xs" }, /* @__PURE__ */ React199.createElement(Text108, { size: "sm" }, "Your domain has been created and the Domain Card credential has been signed and stored."), createdEntityDid && /* @__PURE__ */ React199.createElement(Text108, { size: "xs", c: "dimmed" }, "Entity DID: ", createdEntityDid))), /* @__PURE__ */ React199.createElement(Button34, { onClick: handleVisitEntity }, "Visit Entity")));
20171
20178
  }
20172
20179
  if (flowStep === "error") {
20173
- return /* @__PURE__ */ React199.createElement(BaseRightPanelLayout, { onClose: handleClose, title: block.props.title || "Sign to Create" }, /* @__PURE__ */ React199.createElement(Stack132, { gap: "md" }, /* @__PURE__ */ React199.createElement(Alert27, { icon: /* @__PURE__ */ React199.createElement(IconAlertCircle12, { size: 16 }), title: "Domain Creation Failed", color: "red" }, /* @__PURE__ */ React199.createElement(Text108, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React199.createElement(Group66, null, /* @__PURE__ */ React199.createElement(Button34, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React199.createElement(Button34, { variant: "subtle", onClick: handleClose }, "Close"))));
20180
+ return /* @__PURE__ */ React199.createElement(BaseRightPanelLayout, { onClose: handleClose, title: block.props.title || "Sign to Create" }, /* @__PURE__ */ React199.createElement(Stack132, { gap: "md" }, /* @__PURE__ */ React199.createElement(Alert27, { icon: /* @__PURE__ */ React199.createElement(IconAlertCircle11, { size: 16 }), title: "Domain Creation Failed", color: "red" }, /* @__PURE__ */ React199.createElement(Text108, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React199.createElement(Group66, null, /* @__PURE__ */ React199.createElement(Button34, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React199.createElement(Button34, { variant: "subtle", onClick: handleClose }, "Close"))));
20174
20181
  }
20175
20182
  const domainCardData = getDomainCardData();
20176
20183
  return /* @__PURE__ */ React199.createElement(
@@ -20236,11 +20243,11 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
20236
20243
  [editor, block]
20237
20244
  );
20238
20245
  const panelId = `${DOMAIN_CREATOR_SIGN_FLOW_PANEL_ID}-${block.id}`;
20239
- const panelContent = useMemo64(() => /* @__PURE__ */ React200.createElement(SignPanel, { editor, block, onComplete: handleComplete, onError: handleError }), [editor, block, handleComplete, handleError]);
20246
+ const panelContent = useMemo65(() => /* @__PURE__ */ React200.createElement(SignPanel, { editor, block, onComplete: handleComplete, onError: handleError }), [editor, block, handleComplete, handleError]);
20240
20247
  const { open } = usePanel(panelId, panelContent);
20241
20248
  const { closePanel } = usePanelStore();
20242
20249
  const assignmentPanelId = `domain-creator-sign-assignment-${block.id}`;
20243
- const assignmentPanelContent = useMemo64(
20250
+ const assignmentPanelContent = useMemo65(
20244
20251
  () => /* @__PURE__ */ React200.createElement(BaseRightPanelLayout, { onClose: closePanel, title: "Assignment Tab" }, /* @__PURE__ */ React200.createElement(AssignmentTab, { editor, block })),
20245
20252
  [editor, block, closePanel]
20246
20253
  );
@@ -20280,7 +20287,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
20280
20287
  return "Waiting for domain card data";
20281
20288
  }
20282
20289
  };
20283
- return /* @__PURE__ */ React200.createElement(BaseContainer, { onClick: isClickable ? handleOpen : void 0, style: { opacity: isClickable ? 1 : 0.7, cursor: isClickable ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React200.createElement(Group67, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React200.createElement(Group67, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("feather", block.props.icon), /* @__PURE__ */ React200.createElement(Stack133, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React200.createElement(Group67, { gap: "xs", align: "center" }, /* @__PURE__ */ React200.createElement(Text109, { fw: 600, size: "sm" }, block.props.title || "Sign to Create"), /* @__PURE__ */ React200.createElement(Badge33, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React200.createElement(Text109, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), /* @__PURE__ */ React200.createElement(Group67, null, /* @__PURE__ */ React200.createElement(AssignmentDisplay, { block, onClick: openAssignment }), isClickable && /* @__PURE__ */ React200.createElement(Tooltip21, { label: status === "completed" ? "View details" : "Sign & Create", withArrow: true }, /* @__PURE__ */ React200.createElement(ActionIcon30, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React200.createElement(IconChevronRight8, { size: 18 }))))));
20290
+ return /* @__PURE__ */ React200.createElement(BaseContainer, { onClick: isClickable ? handleOpen : void 0, style: { opacity: isClickable ? 1 : 0.7, cursor: isClickable ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React200.createElement(Group67, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React200.createElement(Group67, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("feather", block.props.icon), /* @__PURE__ */ React200.createElement(Stack133, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React200.createElement(Group67, { gap: "xs", align: "center" }, /* @__PURE__ */ React200.createElement(Text109, { fw: 600, size: "sm" }, block.props.title || "Sign to Create"), /* @__PURE__ */ React200.createElement(Badge33, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React200.createElement(Text109, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), /* @__PURE__ */ React200.createElement(Group67, null, /* @__PURE__ */ React200.createElement(AssignmentDisplay, { block, onClick: openAssignment }), isClickable && /* @__PURE__ */ React200.createElement(Tooltip21, { label: status === "completed" ? "View details" : "Sign & Create", withArrow: true }, /* @__PURE__ */ React200.createElement(ActionIcon31, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React200.createElement(IconChevronRight8, { size: 18 }))))));
20284
20291
  };
20285
20292
 
20286
20293
  // src/mantine/blocks/domainCreatorSign/DomainCreatorSignBlock.tsx
@@ -20340,7 +20347,7 @@ import { createReactBlockSpec as createReactBlockSpec18 } from "@blocknote/react
20340
20347
  import React208 from "react";
20341
20348
 
20342
20349
  // src/mantine/blocks/domainCardViewer/template/TemplateView.tsx
20343
- import React205, { useMemo as useMemo65 } from "react";
20350
+ import React205, { useMemo as useMemo66 } from "react";
20344
20351
  import { Badge as Badge34, Group as Group68, Stack as Stack134, Text as Text110 } from "@mantine/core";
20345
20352
 
20346
20353
  // src/mantine/blocks/domainCardViewer/template/TemplateConfig.tsx
@@ -20465,20 +20472,20 @@ var TemplateConfig14 = ({ editor, block }) => {
20465
20472
  var DOMAIN_CARD_VIEWER_TEMPLATE_PANEL_ID = "domain-card-viewer-template-panel";
20466
20473
  var DomainCardViewerTemplateView = ({ editor, block }) => {
20467
20474
  const panelId = `${DOMAIN_CARD_VIEWER_TEMPLATE_PANEL_ID}-${block.id}`;
20468
- const panelContent = useMemo65(() => /* @__PURE__ */ React205.createElement(TemplateConfig14, { editor, block }), [editor, block]);
20475
+ const panelContent = useMemo66(() => /* @__PURE__ */ React205.createElement(TemplateConfig14, { editor, block }), [editor, block]);
20469
20476
  const { open } = usePanel(panelId, panelContent);
20470
20477
  return /* @__PURE__ */ React205.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React205.createElement(Badge34, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React205.createElement(Group68, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React205.createElement(Group68, { wrap: "nowrap", align: "center" }, getIcon("dots-circle", block.props.icon), /* @__PURE__ */ React205.createElement(Stack134, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React205.createElement(Text110, { fw: 500, size: "sm" }, block.props.title || "Domain Card"), /* @__PURE__ */ React205.createElement(Text110, { size: "xs", c: "dimmed" }, block.props.description || "Preview domain card generated by AI")))));
20471
20478
  };
20472
20479
 
20473
20480
  // src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
20474
- import React207, { useMemo as useMemo67, useCallback as useCallback59, useEffect as useEffect58 } from "react";
20475
- import { ActionIcon as ActionIcon31, Badge as Badge35, Button as Button36, Group as Group69, Stack as Stack136, Text as Text112, Tooltip as Tooltip22 } from "@mantine/core";
20481
+ import React207, { useMemo as useMemo68, useCallback as useCallback59, useEffect as useEffect58 } from "react";
20482
+ import { ActionIcon as ActionIcon32, Badge as Badge35, Button as Button36, Group as Group69, Stack as Stack136, Text as Text112, Tooltip as Tooltip22 } from "@mantine/core";
20476
20483
  import { IconChevronRight as IconChevronRight9, IconLoader, IconTestPipe, IconTrash as IconTrash6 } from "@tabler/icons-react";
20477
20484
 
20478
20485
  // src/mantine/blocks/domainCardViewer/flow/ViewerPanel.tsx
20479
- import React206, { useMemo as useMemo66 } from "react";
20486
+ import React206, { useMemo as useMemo67 } from "react";
20480
20487
  import { Paper as Paper18, CloseButton as CloseButton8, Title as Title11, Stack as Stack135, Text as Text111, Loader as Loader26, Alert as Alert28, Button as Button35, Box as Box40, ScrollArea as ScrollArea7, Code as Code6 } from "@mantine/core";
20481
- import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck10, IconSparkles as IconSparkles3 } from "@tabler/icons-react";
20488
+ import { IconAlertCircle as IconAlertCircle12, IconCheck as IconCheck10, IconSparkles as IconSparkles3 } from "@tabler/icons-react";
20482
20489
  function parsePreviewData(jsonString) {
20483
20490
  if (!jsonString || jsonString === "{}") return null;
20484
20491
  try {
@@ -20496,7 +20503,7 @@ var ViewerPanel = ({ block, onApprove }) => {
20496
20503
  const status = block.props.status || "pending";
20497
20504
  const loadingMessage = block.props.loadingMessage || "Agents is generating your domain data...";
20498
20505
  const errorMessage = block.props.errorMessage || "An error occurred while generating the domain data.";
20499
- const domainPreviewData = useMemo66(() => parsePreviewData(block.props.domainPreviewData || "{}"), [block.props.domainPreviewData]);
20506
+ const domainPreviewData = useMemo67(() => parsePreviewData(block.props.domainPreviewData || "{}"), [block.props.domainPreviewData]);
20500
20507
  const isLoading = status === "loading";
20501
20508
  const isError = status === "error";
20502
20509
  const isReady = status === "ready";
@@ -20527,7 +20534,7 @@ var ViewerPanel = ({ block, onApprove }) => {
20527
20534
  /* @__PURE__ */ React206.createElement(Title11, { order: 5 }, block.props.title || "Domain Card"),
20528
20535
  /* @__PURE__ */ React206.createElement(CloseButton8, { onClick: closePanel })
20529
20536
  ),
20530
- /* @__PURE__ */ React206.createElement(Box40, { style: { flex: 1, overflow: "hidden", display: "flex", flexDirection: "column" } }, isLoading && /* @__PURE__ */ React206.createElement(Stack135, { align: "center", justify: "center", style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React206.createElement(Loader26, { size: "lg", color: "blue" }), /* @__PURE__ */ React206.createElement(Stack135, { align: "center", gap: "xs" }, /* @__PURE__ */ React206.createElement(IconSparkles3, { size: 24, color: "var(--mantine-color-blue-5)" }), /* @__PURE__ */ React206.createElement(Text111, { size: "sm", c: "dimmed", ta: "center" }, loadingMessage))), isError && /* @__PURE__ */ React206.createElement(Stack135, { style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React206.createElement(Alert28, { icon: /* @__PURE__ */ React206.createElement(IconAlertCircle13, { size: 16 }), title: "Error", color: "red", variant: "light" }, errorMessage), /* @__PURE__ */ React206.createElement(Text111, { size: "sm", c: "dimmed", ta: "center" }, "Please ask the oracle to try again.")), (isReady || isApproved) && hasData && /* @__PURE__ */ React206.createElement(Box40, { style: { flex: 1, overflow: "hidden" } }, domainCardRenderer ? (
20537
+ /* @__PURE__ */ React206.createElement(Box40, { style: { flex: 1, overflow: "hidden", display: "flex", flexDirection: "column" } }, isLoading && /* @__PURE__ */ React206.createElement(Stack135, { align: "center", justify: "center", style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React206.createElement(Loader26, { size: "lg", color: "blue" }), /* @__PURE__ */ React206.createElement(Stack135, { align: "center", gap: "xs" }, /* @__PURE__ */ React206.createElement(IconSparkles3, { size: 24, color: "var(--mantine-color-blue-5)" }), /* @__PURE__ */ React206.createElement(Text111, { size: "sm", c: "dimmed", ta: "center" }, loadingMessage))), isError && /* @__PURE__ */ React206.createElement(Stack135, { style: { flex: 1 }, gap: "md" }, /* @__PURE__ */ React206.createElement(Alert28, { icon: /* @__PURE__ */ React206.createElement(IconAlertCircle12, { size: 16 }), title: "Error", color: "red", variant: "light" }, errorMessage), /* @__PURE__ */ React206.createElement(Text111, { size: "sm", c: "dimmed", ta: "center" }, "Please ask the oracle to try again.")), (isReady || isApproved) && hasData && /* @__PURE__ */ React206.createElement(Box40, { style: { flex: 1, overflow: "hidden" } }, domainCardRenderer ? (
20531
20538
  // Use custom renderer from web app
20532
20539
  /* @__PURE__ */ React206.createElement(ScrollArea7, { h: "100%", offsetScrollbars: true }, domainCardRenderer(domainPreviewData))
20533
20540
  ) : (
@@ -20805,7 +20812,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
20805
20812
  });
20806
20813
  }, [editor, block]);
20807
20814
  const panelId = `${DOMAIN_CARD_VIEWER_FLOW_PANEL_ID}-${block.id}`;
20808
- const panelContent = useMemo67(() => /* @__PURE__ */ React207.createElement(ViewerPanel, { editor, block, onApprove: handleApprove }), [editor, block, handleApprove]);
20815
+ const panelContent = useMemo68(() => /* @__PURE__ */ React207.createElement(ViewerPanel, { editor, block, onApprove: handleApprove }), [editor, block, handleApprove]);
20809
20816
  const { open } = usePanel(panelId, panelContent);
20810
20817
  const handleInjectDummyData = useCallback59(
20811
20818
  (e) => {
@@ -20882,7 +20889,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
20882
20889
  }
20883
20890
  };
20884
20891
  const canOpenPanel = status !== "pending";
20885
- return /* @__PURE__ */ React207.createElement(BaseContainer, { onClick: canOpenPanel ? open : void 0, style: { opacity: canOpenPanel ? 1 : 0.7, cursor: canOpenPanel ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React207.createElement(Group69, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React207.createElement(Group69, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("dots-circle", block.props.icon), /* @__PURE__ */ React207.createElement(Stack136, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React207.createElement(Group69, { gap: "xs", align: "center" }, /* @__PURE__ */ React207.createElement(Text112, { fw: 600, size: "sm" }, block.props.title || "Domain Card"), /* @__PURE__ */ React207.createElement(Badge35, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React207.createElement(Text112, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), IS_DEV && status === "pending" && /* @__PURE__ */ React207.createElement(React207.Fragment, null, /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React207.createElement(IconTestPipe, { size: 14 }), onClick: handleInjectDummyData }, "Test Data"), /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "blue", leftSection: /* @__PURE__ */ React207.createElement(IconLoader, { size: 14 }), onClick: handleSetLoading }, "Loading")), IS_DEV && (status === "ready" || status === "approved" || status === "loading") && /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React207.createElement(IconTrash6, { size: 14 }), onClick: handleClearData }, "Clear"), canOpenPanel && /* @__PURE__ */ React207.createElement(Tooltip22, { label: status === "approved" ? "View domain data" : "Review domain data", withArrow: true }, /* @__PURE__ */ React207.createElement(ActionIcon31, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React207.createElement(IconChevronRight9, { size: 18 })))));
20892
+ return /* @__PURE__ */ React207.createElement(BaseContainer, { onClick: canOpenPanel ? open : void 0, style: { opacity: canOpenPanel ? 1 : 0.7, cursor: canOpenPanel ? "pointer" : "not-allowed" } }, /* @__PURE__ */ React207.createElement(Group69, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React207.createElement(Group69, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("dots-circle", block.props.icon), /* @__PURE__ */ React207.createElement(Stack136, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React207.createElement(Group69, { gap: "xs", align: "center" }, /* @__PURE__ */ React207.createElement(Text112, { fw: 600, size: "sm" }, block.props.title || "Domain Card"), /* @__PURE__ */ React207.createElement(Badge35, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React207.createElement(Text112, { size: "xs", c: "dimmed", lineClamp: 2 }, getDescriptionText()))), IS_DEV && status === "pending" && /* @__PURE__ */ React207.createElement(React207.Fragment, null, /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React207.createElement(IconTestPipe, { size: 14 }), onClick: handleInjectDummyData }, "Test Data"), /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "blue", leftSection: /* @__PURE__ */ React207.createElement(IconLoader, { size: 14 }), onClick: handleSetLoading }, "Loading")), IS_DEV && (status === "ready" || status === "approved" || status === "loading") && /* @__PURE__ */ React207.createElement(Button36, { size: "compact-xs", variant: "light", color: "orange", leftSection: /* @__PURE__ */ React207.createElement(IconTrash6, { size: 14 }), onClick: handleClearData }, "Clear"), canOpenPanel && /* @__PURE__ */ React207.createElement(Tooltip22, { label: status === "approved" ? "View domain data" : "Review domain data", withArrow: true }, /* @__PURE__ */ React207.createElement(ActionIcon32, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React207.createElement(IconChevronRight9, { size: 18 })))));
20886
20893
  };
20887
20894
 
20888
20895
  // src/mantine/blocks/domainCardViewer/DomainCardViewerBlock.tsx
@@ -20934,7 +20941,7 @@ import { createReactBlockSpec as createReactBlockSpec19 } from "@blocknote/react
20934
20941
  import React215 from "react";
20935
20942
 
20936
20943
  // src/mantine/blocks/governanceGroup/template/TemplateView.tsx
20937
- import React212, { useMemo as useMemo68 } from "react";
20944
+ import React212, { useMemo as useMemo69 } from "react";
20938
20945
  import { Badge as Badge36, Group as Group70, Stack as Stack138, Text as Text114 } from "@mantine/core";
20939
20946
 
20940
20947
  // src/mantine/blocks/governanceGroup/template/TemplateConfig.tsx
@@ -21849,21 +21856,21 @@ var TemplateConfig15 = ({ editor, block }) => {
21849
21856
  var GOVERNANCE_GROUP_TEMPLATE_PANEL_ID = "governance-group-template-panel";
21850
21857
  var GovernanceGroupTemplateView = ({ editor, block }) => {
21851
21858
  const panelId = `${GOVERNANCE_GROUP_TEMPLATE_PANEL_ID}-${block.id}`;
21852
- const panelContent = useMemo68(() => /* @__PURE__ */ React212.createElement(TemplateConfig15, { editor, block }), [editor, block]);
21859
+ const panelContent = useMemo69(() => /* @__PURE__ */ React212.createElement(TemplateConfig15, { editor, block }), [editor, block]);
21853
21860
  const { open } = usePanel(panelId, panelContent);
21854
21861
  return /* @__PURE__ */ React212.createElement(BaseContainer, { onClick: open }, /* @__PURE__ */ React212.createElement(Badge36, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React212.createElement(Group70, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React212.createElement(Group70, { wrap: "nowrap", align: "center" }, getIcon("users", block.props.icon), /* @__PURE__ */ React212.createElement(Stack138, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React212.createElement(Text114, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Governance Group"), /* @__PURE__ */ React212.createElement(Text114, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Configure the governance group creation flow")))));
21855
21862
  };
21856
21863
 
21857
21864
  // src/mantine/blocks/governanceGroup/flow/FlowView.tsx
21858
- import React214, { useCallback as useCallback62, useEffect as useEffect61, useMemo as useMemo70, useRef as useRef16, useState as useState76 } from "react";
21859
- import { ActionIcon as ActionIcon32, Badge as Badge37, Group as Group72, Stack as Stack140, Text as Text116, Tooltip as Tooltip23 } from "@mantine/core";
21865
+ import React214, { useCallback as useCallback62, useEffect as useEffect61, useMemo as useMemo71, useRef as useRef16, useState as useState76 } from "react";
21866
+ import { ActionIcon as ActionIcon33, Badge as Badge37, Group as Group72, Stack as Stack140, Text as Text116, Tooltip as Tooltip23 } from "@mantine/core";
21860
21867
  import { IconChevronRight as IconChevronRight10 } from "@tabler/icons-react";
21861
21868
 
21862
21869
  // src/mantine/blocks/governanceGroup/flow/GovernanceGroupPanel.tsx
21863
- import React213, { useCallback as useCallback61, useEffect as useEffect60, useMemo as useMemo69, useRef as useRef15, useState as useState75 } from "react";
21870
+ import React213, { useCallback as useCallback61, useEffect as useEffect60, useMemo as useMemo70, useRef as useRef15, useState as useState75 } from "react";
21864
21871
  import { Alert as Alert29, Button as Button37, Card as Card19, Group as Group71, Loader as Loader27, SimpleGrid as SimpleGrid3, Stack as Stack139, Text as Text115, ThemeIcon as ThemeIcon4 } from "@mantine/core";
21865
21872
  import { useDebouncedCallback as useDebouncedCallback3 } from "@mantine/hooks";
21866
- import { IconAlertCircle as IconAlertCircle14, IconCheck as IconCheck11, IconUsers as IconUsers5, IconSignature as IconSignature2, IconPhoto as IconPhoto3, IconCoin as IconCoin2, IconArrowLeft as IconArrowLeft5 } from "@tabler/icons-react";
21873
+ import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck11, IconUsers as IconUsers5, IconSignature as IconSignature2, IconPhoto as IconPhoto3, IconCoin as IconCoin2, IconArrowLeft as IconArrowLeft5 } from "@tabler/icons-react";
21867
21874
  import { Survey as Survey7, SurveyModel as SurveyModel7 } from "@ixo/surveys";
21868
21875
  var SYNC_DEBOUNCE_MS3 = 300;
21869
21876
  function deepEqual3(a, b) {
@@ -21907,7 +21914,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
21907
21914
  const [createdGroupAddress, setCreatedGroupAddress] = useState75(block.props.groupAddress || null);
21908
21915
  const isUpdatingFromProp = useRef15(false);
21909
21916
  const lastSyncedAnswers = useRef15("");
21910
- const surveyModel = useMemo69(() => {
21917
+ const surveyModel = useMemo70(() => {
21911
21918
  if (!selectedGroupType) return null;
21912
21919
  const surveySchema = getSurveyForGroupType(selectedGroupType);
21913
21920
  if (!surveySchema) return null;
@@ -22085,7 +22092,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22085
22092
  return /* @__PURE__ */ React213.createElement(Stack139, { gap: "md", p: "md" }, /* @__PURE__ */ React213.createElement(Alert29, { icon: /* @__PURE__ */ React213.createElement(IconCheck11, { size: 16 }), title: "Group Created Successfully", color: "green" }, /* @__PURE__ */ React213.createElement(Stack139, { gap: "xs" }, /* @__PURE__ */ React213.createElement(Text115, { size: "sm" }, "Your ", groupTypeName, " has been created successfully."), createdCoreAddress && /* @__PURE__ */ React213.createElement(Text115, { size: "xs", c: "dimmed" }, "Core Address: ", createdCoreAddress), createdGroupAddress && /* @__PURE__ */ React213.createElement(Text115, { size: "xs", c: "dimmed" }, "Group Address: ", createdGroupAddress))), /* @__PURE__ */ React213.createElement(Button37, { onClick: handleClose }, "Close"));
22086
22093
  }
22087
22094
  if (flowStep === "error") {
22088
- return /* @__PURE__ */ React213.createElement(Stack139, { gap: "md", p: "md" }, /* @__PURE__ */ React213.createElement(Alert29, { icon: /* @__PURE__ */ React213.createElement(IconAlertCircle14, { size: 16 }), title: "Group Creation Failed", color: "red" }, /* @__PURE__ */ React213.createElement(Text115, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React213.createElement(Group71, null, /* @__PURE__ */ React213.createElement(Button37, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React213.createElement(Button37, { variant: "subtle", onClick: handleClose }, "Close")));
22095
+ return /* @__PURE__ */ React213.createElement(Stack139, { gap: "md", p: "md" }, /* @__PURE__ */ React213.createElement(Alert29, { icon: /* @__PURE__ */ React213.createElement(IconAlertCircle13, { size: 16 }), title: "Group Creation Failed", color: "red" }, /* @__PURE__ */ React213.createElement(Text115, { size: "sm" }, error || "An unexpected error occurred")), /* @__PURE__ */ React213.createElement(Group71, null, /* @__PURE__ */ React213.createElement(Button37, { variant: "outline", onClick: handleRetry }, "Try Again"), /* @__PURE__ */ React213.createElement(Button37, { variant: "subtle", onClick: handleClose }, "Close")));
22089
22096
  }
22090
22097
  if (flowStep === "survey" && surveyModel) {
22091
22098
  const groupTypeName = selectedGroupType ? GROUP_TYPE_CONFIGS.find((c) => c.type === selectedGroupType)?.title || "Group" : "Group";
@@ -22116,7 +22123,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22116
22123
  editorRef.current = editor;
22117
22124
  blockRef.current = block;
22118
22125
  });
22119
- const stableEditor = useMemo70(
22126
+ const stableEditor = useMemo71(
22120
22127
  () => new Proxy(editor, {
22121
22128
  get(_, prop) {
22122
22129
  return editorRef.current[prop];
@@ -22125,7 +22132,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22125
22132
  // eslint-disable-next-line react-hooks/exhaustive-deps
22126
22133
  []
22127
22134
  );
22128
- const stableBlock = useMemo70(
22135
+ const stableBlock = useMemo71(
22129
22136
  () => new Proxy(block, {
22130
22137
  get(_, prop) {
22131
22138
  return blockRef.current[prop];
@@ -22165,7 +22172,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22165
22172
  []
22166
22173
  );
22167
22174
  const panelId = `${GOVERNANCE_GROUP_FLOW_PANEL_ID}-${block.id}`;
22168
- const panelContent = useMemo70(
22175
+ const panelContent = useMemo71(
22169
22176
  () => /* @__PURE__ */ React214.createElement(GovernanceGroupPanel, { editor: stableEditor, block: stableBlock, onComplete: stableHandleComplete }),
22170
22177
  [stableEditor, stableBlock, stableHandleComplete]
22171
22178
  );
@@ -22192,7 +22199,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22192
22199
  const groupTypeName = lastSubmission.groupType ? lastSubmission.groupType.charAt(0).toUpperCase() + lastSubmission.groupType.slice(1).replace(/([A-Z])/g, " $1") : "Group";
22193
22200
  return `${groupTypeName} created: ${lastSubmission.coreAddress?.slice(0, 12)}...`;
22194
22201
  };
22195
- return /* @__PURE__ */ React214.createElement(BaseContainer, { onClick: handleOpen }, /* @__PURE__ */ React214.createElement(Group72, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React214.createElement(Group72, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("users", block.props.icon), /* @__PURE__ */ React214.createElement(Stack140, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React214.createElement(Group72, { gap: "xs", align: "center" }, /* @__PURE__ */ React214.createElement(Text116, { fw: 600, size: "sm", contentEditable: false }, block.props.title || "Governance Group"), /* @__PURE__ */ React214.createElement(Badge37, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React214.createElement(Text116, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 2 }, hasExistingSubmission ? getSubmissionDisplay() : block.props.description || "Open the panel to create a new governance group."))), /* @__PURE__ */ React214.createElement(Tooltip23, { label: hasExistingSubmission ? "View/Edit group" : "Create group", withArrow: true }, /* @__PURE__ */ React214.createElement(ActionIcon32, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React214.createElement(IconChevronRight10, { size: 18 })))));
22202
+ return /* @__PURE__ */ React214.createElement(BaseContainer, { onClick: handleOpen }, /* @__PURE__ */ React214.createElement(Group72, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React214.createElement(Group72, { wrap: "nowrap", align: "center", style: { flex: 1 } }, getIcon("users", block.props.icon), /* @__PURE__ */ React214.createElement(Stack140, { gap: 4, style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React214.createElement(Group72, { gap: "xs", align: "center" }, /* @__PURE__ */ React214.createElement(Text116, { fw: 600, size: "sm", contentEditable: false }, block.props.title || "Governance Group"), /* @__PURE__ */ React214.createElement(Badge37, { size: "xs", variant: "filled", color: badgeProps.color, styles: { root: { backgroundColor: `var(--mantine-color-${badgeProps.color}-6)`, color: "white" } } }, badgeProps.text)), /* @__PURE__ */ React214.createElement(Text116, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 2 }, hasExistingSubmission ? getSubmissionDisplay() : block.props.description || "Open the panel to create a new governance group."))), /* @__PURE__ */ React214.createElement(Tooltip23, { label: hasExistingSubmission ? "View/Edit group" : "Create group", withArrow: true }, /* @__PURE__ */ React214.createElement(ActionIcon33, { variant: "subtle", color: "blue" }, /* @__PURE__ */ React214.createElement(IconChevronRight10, { size: 18 })))));
22196
22203
  };
22197
22204
 
22198
22205
  // src/mantine/blocks/governanceGroup/GovernanceGroupBlock.tsx
@@ -22242,7 +22249,7 @@ import { createReactBlockSpec as createReactBlockSpec20 } from "@blocknote/react
22242
22249
  import React223 from "react";
22243
22250
 
22244
22251
  // src/mantine/blocks/flowLink/template/TemplateView.tsx
22245
- import React220, { useMemo as useMemo72 } from "react";
22252
+ import React220, { useMemo as useMemo73 } from "react";
22246
22253
  import { Group as Group74, Stack as Stack143, Text as Text118 } from "@mantine/core";
22247
22254
 
22248
22255
  // src/mantine/blocks/flowLink/template/TemplateConfig.tsx
@@ -22279,8 +22286,8 @@ var GeneralTab16 = ({ title, description, icon, onTitleChange, onDescriptionChan
22279
22286
  };
22280
22287
 
22281
22288
  // src/mantine/blocks/flowLink/template/LinksTab.tsx
22282
- import React218, { useMemo as useMemo71 } from "react";
22283
- import { Stack as Stack142, Card as Card20, Group as Group73, ActionIcon as ActionIcon33, Text as Text117, Divider as Divider17 } from "@mantine/core";
22289
+ import React218, { useMemo as useMemo72 } from "react";
22290
+ import { Stack as Stack142, Card as Card20, Group as Group73, ActionIcon as ActionIcon34, Text as Text117, Divider as Divider18 } from "@mantine/core";
22284
22291
  import { IconPlus as IconPlus6, IconTrash as IconTrash7, IconGripVertical } from "@tabler/icons-react";
22285
22292
  import { DndContext, PointerSensor, useSensor, useSensors, closestCenter, useDraggable, useDroppable } from "@dnd-kit/core";
22286
22293
 
@@ -22309,7 +22316,7 @@ var DraggableLinkCard = ({ link, index, onRemove, onUpdate }) => {
22309
22316
  opacity: isDragging ? 0.5 : 1,
22310
22317
  border: isOver ? "2px dashed var(--mantine-color-accent-5)" : void 0
22311
22318
  };
22312
- return /* @__PURE__ */ React218.createElement("div", { ref: setDropRef }, /* @__PURE__ */ React218.createElement(Card20, { p: "sm", style }, /* @__PURE__ */ React218.createElement(Stack142, { gap: "xs" }, /* @__PURE__ */ React218.createElement(Group73, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React218.createElement(Group73, { gap: "xs", align: "center" }, /* @__PURE__ */ React218.createElement("div", { ref: setDragRef, ...listeners, ...attributes, style: { cursor: "grab", display: "flex", alignItems: "center" } }, /* @__PURE__ */ React218.createElement(IconGripVertical, { size: 16, color: "gray" })), /* @__PURE__ */ React218.createElement(Text117, { size: "xs", c: "dimmed" }, link.title || `Link ${index + 1}`)), /* @__PURE__ */ React218.createElement(ActionIcon33, { variant: "subtle", color: "red", size: "sm", onClick: () => onRemove(link.id) }, /* @__PURE__ */ React218.createElement(IconTrash7, { size: 14 }))), /* @__PURE__ */ React218.createElement(Divider17, null), /* @__PURE__ */ React218.createElement(BaseTextInput, { label: "Title", placeholder: "Link title", value: link.title, onChange: (e) => onUpdate(link.id, "title", e.currentTarget.value) }), /* @__PURE__ */ React218.createElement(
22319
+ return /* @__PURE__ */ React218.createElement("div", { ref: setDropRef }, /* @__PURE__ */ React218.createElement(Card20, { p: "sm", style }, /* @__PURE__ */ React218.createElement(Stack142, { gap: "xs" }, /* @__PURE__ */ React218.createElement(Group73, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React218.createElement(Group73, { gap: "xs", align: "center" }, /* @__PURE__ */ React218.createElement("div", { ref: setDragRef, ...listeners, ...attributes, style: { cursor: "grab", display: "flex", alignItems: "center" } }, /* @__PURE__ */ React218.createElement(IconGripVertical, { size: 16, color: "gray" })), /* @__PURE__ */ React218.createElement(Text117, { size: "xs", c: "dimmed" }, link.title || `Link ${index + 1}`)), /* @__PURE__ */ React218.createElement(ActionIcon34, { variant: "subtle", color: "red", size: "sm", onClick: () => onRemove(link.id) }, /* @__PURE__ */ React218.createElement(IconTrash7, { size: 14 }))), /* @__PURE__ */ React218.createElement(Divider18, null), /* @__PURE__ */ React218.createElement(BaseTextInput, { label: "Title", placeholder: "Link title", value: link.title, onChange: (e) => onUpdate(link.id, "title", e.currentTarget.value) }), /* @__PURE__ */ React218.createElement(
22313
22320
  BaseTextInput,
22314
22321
  {
22315
22322
  label: "Description",
@@ -22339,7 +22346,7 @@ var DraggableLinkCard = ({ link, index, onRemove, onUpdate }) => {
22339
22346
  };
22340
22347
  var LinksTab = ({ links, onLinksChange }) => {
22341
22348
  const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 8 } }));
22342
- const sortedLinks = useMemo71(() => [...links].sort((a, b) => a.position - b.position), [links]);
22349
+ const sortedLinks = useMemo72(() => [...links].sort((a, b) => a.position - b.position), [links]);
22343
22350
  const handleAddLink = () => {
22344
22351
  const maxPosition = links.length > 0 ? Math.max(...links.map((l) => l.position)) : -1;
22345
22352
  const newLink = {
@@ -22421,7 +22428,7 @@ var TemplateConfig16 = ({ editor, block }) => {
22421
22428
  var FLOW_LINK_TEMPLATE_PANEL_ID = "flow-link-template-panel";
22422
22429
  var FlowLinkTemplateView = ({ editor, block }) => {
22423
22430
  const panelId = `${FLOW_LINK_TEMPLATE_PANEL_ID}-${block.id}`;
22424
- const panelContent = useMemo72(() => /* @__PURE__ */ React220.createElement(TemplateConfig16, { editor, block }), [editor, block]);
22431
+ const panelContent = useMemo73(() => /* @__PURE__ */ React220.createElement(TemplateConfig16, { editor, block }), [editor, block]);
22425
22432
  const { open } = usePanel(panelId, panelContent);
22426
22433
  const links = safeParseJSONArray(block.props.links);
22427
22434
  const linksCount = links.length;
@@ -22429,13 +22436,13 @@ var FlowLinkTemplateView = ({ editor, block }) => {
22429
22436
  };
22430
22437
 
22431
22438
  // src/mantine/blocks/flowLink/flow/FlowView.tsx
22432
- import React222, { useMemo as useMemo73 } from "react";
22439
+ import React222, { useMemo as useMemo74 } from "react";
22433
22440
  import { Badge as Badge39, Group as Group76, Stack as Stack145, Text as Text120, Tooltip as Tooltip25 } from "@mantine/core";
22434
22441
 
22435
22442
  // src/mantine/blocks/flowLink/flow/FlowLinkPanel.tsx
22436
22443
  import React221, { useState as useState77, useEffect as useEffect62, useCallback as useCallback63 } from "react";
22437
- import { Stack as Stack144, Text as Text119, Card as Card21, Group as Group75, Badge as Badge38, ActionIcon as ActionIcon34, Loader as Loader28, Tooltip as Tooltip24 } from "@mantine/core";
22438
- import { IconRefresh as IconRefresh8, IconCheck as IconCheck12, IconClock as IconClock3, IconCircleDashed as IconCircleDashed4 } from "@tabler/icons-react";
22444
+ import { Stack as Stack144, Text as Text119, Card as Card21, Group as Group75, Badge as Badge38, ActionIcon as ActionIcon35, Loader as Loader28, Tooltip as Tooltip24 } from "@mantine/core";
22445
+ import { IconRefresh as IconRefresh7, IconCheck as IconCheck12, IconClock as IconClock3, IconCircleDashed as IconCircleDashed4 } from "@tabler/icons-react";
22439
22446
  var FlowLinkPanel = ({ block }) => {
22440
22447
  const { closePanel } = usePanelStore();
22441
22448
  const handlers = useBlocknoteHandlers();
@@ -22487,7 +22494,7 @@ var FlowLinkPanel = ({ block }) => {
22487
22494
  return /* @__PURE__ */ React221.createElement(Badge38, { display: "inline-block", size: "sm", variant: "light", color: "gray", leftSection: /* @__PURE__ */ React221.createElement(IconCircleDashed4, { size: 12 }) }, "Not Started");
22488
22495
  }
22489
22496
  };
22490
- return /* @__PURE__ */ React221.createElement(BaseRightPanelLayout, { title: block.props.title || "Flow Links", onClose: closePanel }, /* @__PURE__ */ React221.createElement(Stack144, { gap: "md" }, handlers.getFlowStatus && /* @__PURE__ */ React221.createElement(Tooltip24, { label: "Refresh status" }, /* @__PURE__ */ React221.createElement(ActionIcon34, { variant: "subtle", size: "sm", onClick: fetchStatuses }, /* @__PURE__ */ React221.createElement(IconRefresh8, { size: 16 }))), linksWithStatus.length === 0 ? /* @__PURE__ */ React221.createElement(Card21, { withBorder: true, p: "md", bg: "gray.0" }, /* @__PURE__ */ React221.createElement(Text119, { size: "sm", c: "dimmed", ta: "center" }, "No flow links configured.")) : /* @__PURE__ */ React221.createElement(Stack144, { gap: "sm" }, linksWithStatus.map((link) => /* @__PURE__ */ React221.createElement(Stack144, { key: link.id }, link.description && /* @__PURE__ */ React221.createElement(Text119, null, link.description), /* @__PURE__ */ React221.createElement(
22497
+ return /* @__PURE__ */ React221.createElement(BaseRightPanelLayout, { title: block.props.title || "Flow Links", onClose: closePanel }, /* @__PURE__ */ React221.createElement(Stack144, { gap: "md" }, handlers.getFlowStatus && /* @__PURE__ */ React221.createElement(Tooltip24, { label: "Refresh status" }, /* @__PURE__ */ React221.createElement(ActionIcon35, { variant: "subtle", size: "sm", onClick: fetchStatuses }, /* @__PURE__ */ React221.createElement(IconRefresh7, { size: 16 }))), linksWithStatus.length === 0 ? /* @__PURE__ */ React221.createElement(Card21, { withBorder: true, p: "md", bg: "gray.0" }, /* @__PURE__ */ React221.createElement(Text119, { size: "sm", c: "dimmed", ta: "center" }, "No flow links configured.")) : /* @__PURE__ */ React221.createElement(Stack144, { gap: "sm" }, linksWithStatus.map((link) => /* @__PURE__ */ React221.createElement(Stack144, { key: link.id }, link.description && /* @__PURE__ */ React221.createElement(Text119, null, link.description), /* @__PURE__ */ React221.createElement(
22491
22498
  BaseContainer,
22492
22499
  {
22493
22500
  onClick: () => handlers.navigateToFlow && handleNavigate(link.docRoomId),
@@ -22504,7 +22511,7 @@ var FlowLinkFlowView = ({ editor, block, isDisabled }) => {
22504
22511
  const links = safeParseJSONArray(block.props.links);
22505
22512
  const linksCount = links.length;
22506
22513
  const panelId = `${FLOW_LINK_FLOW_PANEL_ID}-${block.id}`;
22507
- const panelContent = useMemo73(() => /* @__PURE__ */ React222.createElement(FlowLinkPanel, { editor, block }), [editor, block]);
22514
+ const panelContent = useMemo74(() => /* @__PURE__ */ React222.createElement(FlowLinkPanel, { editor, block }), [editor, block]);
22508
22515
  const { open } = usePanel(panelId, panelContent);
22509
22516
  const handleClick = () => {
22510
22517
  if (!disabled) {
@@ -22758,10 +22765,10 @@ blockRegistry.register({
22758
22765
  });
22759
22766
 
22760
22767
  // src/mantine/blocks/hooks/useBlockDependencies.ts
22761
- import { useMemo as useMemo74, useEffect as useEffect63, useState as useState78, useCallback as useCallback64 } from "react";
22768
+ import { useMemo as useMemo75, useEffect as useEffect63, useState as useState78, useCallback as useCallback64 } from "react";
22762
22769
 
22763
22770
  // src/mantine/blocks/hooks/useDependsOn.ts
22764
- import { useMemo as useMemo75 } from "react";
22771
+ import { useMemo as useMemo76 } from "react";
22765
22772
 
22766
22773
  // src/mantine/blocks/index.ts
22767
22774
  var blockSpecs = {
@@ -23328,7 +23335,7 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
23328
23335
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
23329
23336
 
23330
23337
  // src/core/hooks/useMatrixProvider.ts
23331
- import { useEffect as useEffect64, useState as useState79, useRef as useRef17, useCallback as useCallback65, useMemo as useMemo76 } from "react";
23338
+ import { useEffect as useEffect64, useState as useState79, useRef as useRef17, useCallback as useCallback65, useMemo as useMemo77 } from "react";
23332
23339
  import { MatrixProvider } from "@ixo/matrix-crdt";
23333
23340
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23334
23341
  const [matrixProvider, setProvider] = useState79(null);
@@ -23336,7 +23343,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23336
23343
  const isMountedRef = useRef17(true);
23337
23344
  const providerRef = useRef17(null);
23338
23345
  const retryTimeoutRef = useRef17(null);
23339
- const providerOptions = useMemo76(
23346
+ const providerOptions = useMemo77(
23340
23347
  () => ({
23341
23348
  translator: {
23342
23349
  updateEventType: "matrix-crdt.doc_update",
@@ -23423,17 +23430,17 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23423
23430
  }
23424
23431
 
23425
23432
  // src/mantine/hooks/useCollaborativeYDoc.ts
23426
- import { useMemo as useMemo77 } from "react";
23433
+ import { useMemo as useMemo78 } from "react";
23427
23434
  import * as Y from "yjs";
23428
23435
  function useCollaborativeYDoc(_options) {
23429
- return useMemo77(() => {
23436
+ return useMemo78(() => {
23430
23437
  const doc = new Y.Doc();
23431
23438
  return doc;
23432
23439
  }, []);
23433
23440
  }
23434
23441
 
23435
23442
  // src/mantine/hooks/useCollaborativeIxoEditor.ts
23436
- import { useMemo as useMemo78, useEffect as useEffect65, useState as useState80 } from "react";
23443
+ import { useMemo as useMemo79, useEffect as useEffect65, useState as useState80 } from "react";
23437
23444
 
23438
23445
  // src/core/lib/matrixMetadata.ts
23439
23446
  var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
@@ -23602,7 +23609,7 @@ function useCreateCollaborativeIxoEditor(options) {
23602
23609
  matrixClient,
23603
23610
  permissions = { write: false }
23604
23611
  } = options || {};
23605
- const memoizedUser = useMemo78(
23612
+ const memoizedUser = useMemo79(
23606
23613
  () => ({
23607
23614
  id: user?.id || "",
23608
23615
  name: user?.name || "",
@@ -23617,13 +23624,13 @@ function useCreateCollaborativeIxoEditor(options) {
23617
23624
  matrixClient,
23618
23625
  roomId: options.roomId
23619
23626
  });
23620
- const metadataManager = useMemo78(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
23627
+ const metadataManager = useMemo79(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
23621
23628
  useEffect65(() => {
23622
23629
  return () => {
23623
23630
  metadataManager.dispose();
23624
23631
  };
23625
23632
  }, [metadataManager]);
23626
- const defaultUploadFile = useMemo78(
23633
+ const defaultUploadFile = useMemo79(
23627
23634
  () => uploadFile || (async (file) => {
23628
23635
  return new Promise((resolve, reject) => {
23629
23636
  const reader = new FileReader();
@@ -23637,7 +23644,7 @@ function useCreateCollaborativeIxoEditor(options) {
23637
23644
  }),
23638
23645
  [uploadFile]
23639
23646
  );
23640
- const schema = useMemo78(
23647
+ const schema = useMemo79(
23641
23648
  () => BlockNoteSchema2.create({
23642
23649
  blockSpecs: {
23643
23650
  ...defaultBlockSpecs2,
@@ -23652,16 +23659,16 @@ function useCreateCollaborativeIxoEditor(options) {
23652
23659
  }),
23653
23660
  []
23654
23661
  );
23655
- const root = useMemo78(() => yDoc.getMap("root"), [yDoc]);
23656
- const documentFragment = useMemo78(() => yDoc.getXmlFragment("document"), [yDoc]);
23657
- const flowArray = useMemo78(() => yDoc.getArray("flow"), [yDoc]);
23658
- const runtimeMap = useMemo78(() => yDoc.getMap("runtime"), [yDoc]);
23659
- const delegationsMap = useMemo78(() => yDoc.getMap("delegations"), [yDoc]);
23660
- const invocationsMap = useMemo78(() => yDoc.getMap("invocations"), [yDoc]);
23661
- const ucanDelegationStore = useMemo78(() => createUcanDelegationStore(delegationsMap), [delegationsMap]);
23662
- const invocationStore = useMemo78(() => createInvocationStore(invocationsMap), [invocationsMap]);
23663
- const userFragment = useMemo78(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
23664
- const collaborationConfig = useMemo78(
23662
+ const root = useMemo79(() => yDoc.getMap("root"), [yDoc]);
23663
+ const documentFragment = useMemo79(() => yDoc.getXmlFragment("document"), [yDoc]);
23664
+ const flowArray = useMemo79(() => yDoc.getArray("flow"), [yDoc]);
23665
+ const runtimeMap = useMemo79(() => yDoc.getMap("runtime"), [yDoc]);
23666
+ const delegationsMap = useMemo79(() => yDoc.getMap("delegations"), [yDoc]);
23667
+ const invocationsMap = useMemo79(() => yDoc.getMap("invocations"), [yDoc]);
23668
+ const ucanDelegationStore = useMemo79(() => createUcanDelegationStore(delegationsMap), [delegationsMap]);
23669
+ const invocationStore = useMemo79(() => createInvocationStore(invocationsMap), [invocationsMap]);
23670
+ const userFragment = useMemo79(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
23671
+ const collaborationConfig = useMemo79(
23665
23672
  () => ({
23666
23673
  provider: matrixProvider,
23667
23674
  fragment: documentFragment,
@@ -23673,7 +23680,7 @@ function useCreateCollaborativeIxoEditor(options) {
23673
23680
  }),
23674
23681
  [matrixProvider, documentFragment, memoizedUser.name, memoizedUser.color]
23675
23682
  );
23676
- const ixoConfig = useMemo78(
23683
+ const ixoConfig = useMemo79(
23677
23684
  () => ({
23678
23685
  theme,
23679
23686
  editable,
@@ -23692,7 +23699,7 @@ function useCreateCollaborativeIxoEditor(options) {
23692
23699
  uploadFile: defaultUploadFile,
23693
23700
  collaboration: collaborationConfig
23694
23701
  });
23695
- const titleText = useMemo78(() => yDoc.getText("title"), [yDoc]);
23702
+ const titleText = useMemo79(() => yDoc.getText("title"), [yDoc]);
23696
23703
  let ixoEditor;
23697
23704
  if (editor) {
23698
23705
  ixoEditor = editor;
@@ -23956,10 +23963,10 @@ function useCreateCollaborativeIxoEditor(options) {
23956
23963
  }
23957
23964
 
23958
23965
  // src/mantine/components/Base/BaseIconPicker.tsx
23959
- import React226, { useState as useState81, useMemo as useMemo79, useEffect as useEffect66 } from "react";
23966
+ import React226, { useState as useState81, useMemo as useMemo80, useEffect as useEffect66 } from "react";
23960
23967
  import { TextInput as TextInput7, Tabs as Tabs5, Box as Box41, Stack as Stack146, UnstyledButton as UnstyledButton2, Text as Text121, Center as Center12, ScrollArea as ScrollArea8, Group as Group77, Popover as Popover4 } from "@mantine/core";
23961
23968
  import * as TablerIcons from "@tabler/icons-react";
23962
- import { IconSearch as IconSearch6, IconX as IconX10, IconChevronLeft, IconChevronRight as IconChevronRight11 } from "@tabler/icons-react";
23969
+ import { IconSearch as IconSearch6, IconX as IconX11, IconChevronLeft, IconChevronRight as IconChevronRight11 } from "@tabler/icons-react";
23963
23970
 
23964
23971
  // src/mantine/components/Base/CoverImageButton.tsx
23965
23972
  import React225, { forwardRef } from "react";
@@ -24017,11 +24024,11 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
24017
24024
  const [searchQuery, setSearchQuery] = useState81("");
24018
24025
  const [activeTab, setActiveTab] = useState81("icons");
24019
24026
  const [currentPage, setCurrentPage] = useState81(1);
24020
- const allIcons = useMemo79(() => {
24027
+ const allIcons = useMemo80(() => {
24021
24028
  const iconEntries = Object.entries(TablerIcons).filter(([name]) => name.startsWith("Icon") && name !== "IconProps");
24022
24029
  return iconEntries;
24023
24030
  }, []);
24024
- const filteredIcons = useMemo79(() => {
24031
+ const filteredIcons = useMemo80(() => {
24025
24032
  if (!searchQuery) return allIcons;
24026
24033
  const query = searchQuery.toLowerCase();
24027
24034
  return allIcons.filter(([name]) => name.toLowerCase().includes(query));
@@ -24029,13 +24036,13 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
24029
24036
  useEffect66(() => {
24030
24037
  setCurrentPage(1);
24031
24038
  }, [searchQuery]);
24032
- const paginatedIcons = useMemo79(() => {
24039
+ const paginatedIcons = useMemo80(() => {
24033
24040
  const startIndex = (currentPage - 1) * ICONS_PER_PAGE;
24034
24041
  const endIndex = startIndex + ICONS_PER_PAGE;
24035
24042
  return filteredIcons.slice(startIndex, endIndex);
24036
24043
  }, [filteredIcons, currentPage]);
24037
24044
  const totalPages = Math.ceil(filteredIcons.length / ICONS_PER_PAGE);
24038
- const recentIcons = useMemo79(() => {
24045
+ const recentIcons = useMemo80(() => {
24039
24046
  const recentIconNames = localStorageService.get(iconsKey);
24040
24047
  if (!recentIconNames || recentIconNames.length === 0) return [];
24041
24048
  return recentIconNames.slice(0, 24).map((iconName) => allIcons.find(([name]) => name === iconName)).filter((entry) => entry !== void 0);
@@ -24113,7 +24120,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
24113
24120
  leftSection: /* @__PURE__ */ React226.createElement(IconSearch6, { size: 18 }),
24114
24121
  value: searchQuery,
24115
24122
  onChange: (e) => setSearchQuery(e.currentTarget.value),
24116
- rightSection: searchQuery && /* @__PURE__ */ React226.createElement(UnstyledButton2, { onClick: () => setSearchQuery("") }, /* @__PURE__ */ React226.createElement(IconX10, { size: 18 })),
24123
+ rightSection: searchQuery && /* @__PURE__ */ React226.createElement(UnstyledButton2, { onClick: () => setSearchQuery("") }, /* @__PURE__ */ React226.createElement(IconX11, { size: 18 })),
24117
24124
  style: { flex: 1 },
24118
24125
  styles: {
24119
24126
  input: {
@@ -24271,12 +24278,12 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
24271
24278
  }
24272
24279
 
24273
24280
  // src/mantine/components/Base/PageIcon.tsx
24274
- import React227, { useMemo as useMemo80 } from "react";
24281
+ import React227, { useMemo as useMemo81 } from "react";
24275
24282
  import { Center as Center13, Box as Box42 } from "@mantine/core";
24276
24283
  import * as TablerIcons2 from "@tabler/icons-react";
24277
24284
  function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
24278
24285
  const isIconName = src && !src.startsWith("http");
24279
- const IconComponent = useMemo80(() => {
24286
+ const IconComponent = useMemo81(() => {
24280
24287
  if (!isIconName || !src) return null;
24281
24288
  const iconComponent = TablerIcons2[src];
24282
24289
  if (iconComponent) {
@@ -25338,7 +25345,7 @@ function IxoEditor({
25338
25345
  // src/mantine/components/EntitySigningSetup.tsx
25339
25346
  import React233, { useState as useState85 } from "react";
25340
25347
  import { Modal as Modal3, Stack as Stack147, Text as Text122, TextInput as TextInput8, Button as Button39, Alert as Alert30, Group as Group79 } from "@mantine/core";
25341
- import { IconAlertCircle as IconAlertCircle15, IconCheck as IconCheck13, IconKey as IconKey2 } from "@tabler/icons-react";
25348
+ import { IconAlertCircle as IconAlertCircle14, IconCheck as IconCheck13, IconKey as IconKey2 } from "@tabler/icons-react";
25342
25349
  var EntitySigningSetup = ({
25343
25350
  opened,
25344
25351
  onClose,
@@ -25419,7 +25426,7 @@ var EntitySigningSetup = ({
25419
25426
  onChange: (e) => setConfirmPin(e.currentTarget.value),
25420
25427
  disabled: loading
25421
25428
  }
25422
- ), error && /* @__PURE__ */ React233.createElement(Alert30, { color: "red", icon: /* @__PURE__ */ React233.createElement(IconAlertCircle15, { size: 16 }) }, error), /* @__PURE__ */ React233.createElement(Group79, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React233.createElement(Button39, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React233.createElement(
25429
+ ), error && /* @__PURE__ */ React233.createElement(Alert30, { color: "red", icon: /* @__PURE__ */ React233.createElement(IconAlertCircle14, { size: 16 }) }, error), /* @__PURE__ */ React233.createElement(Group79, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React233.createElement(Button39, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React233.createElement(
25423
25430
  Button39,
25424
25431
  {
25425
25432
  onClick: handleSetup,
@@ -25432,8 +25439,8 @@ var EntitySigningSetup = ({
25432
25439
  };
25433
25440
 
25434
25441
  // src/mantine/components/FlowPermissionsPanel.tsx
25435
- import React234, { useState as useState86, useEffect as useEffect70, useMemo as useMemo81 } from "react";
25436
- import { Stack as Stack148, Text as Text123, Paper as Paper19, Group as Group80, Badge as Badge40, Button as Button40, ActionIcon as ActionIcon35, Loader as Loader29, Alert as Alert31, Divider as Divider18 } from "@mantine/core";
25442
+ import React234, { useState as useState86, useEffect as useEffect70, useMemo as useMemo82 } from "react";
25443
+ import { Stack as Stack148, Text as Text123, Paper as Paper19, Group as Group80, Badge as Badge40, Button as Button40, ActionIcon as ActionIcon36, Loader as Loader29, Alert as Alert31, Divider as Divider19 } from "@mantine/core";
25437
25444
  import { IconPlus as IconPlus7, IconTrash as IconTrash8, IconShieldCheck as IconShieldCheck2, IconUser as IconUser5, IconRobot as IconRobot4, IconBuilding } from "@tabler/icons-react";
25438
25445
  var FlowPermissionsPanel = ({
25439
25446
  editor,
@@ -25446,7 +25453,7 @@ var FlowPermissionsPanel = ({
25446
25453
  const [delegations, setDelegations] = useState86([]);
25447
25454
  const [loading, setLoading] = useState86(true);
25448
25455
  const [revoking, setRevoking] = useState86(null);
25449
- const rootCapability = useMemo81(() => editor.getRootCapability?.(), [editor]);
25456
+ const rootCapability = useMemo82(() => editor.getRootCapability?.(), [editor]);
25450
25457
  useEffect70(() => {
25451
25458
  const loadDelegations = async () => {
25452
25459
  setLoading(true);
@@ -25509,8 +25516,8 @@ var FlowPermissionsPanel = ({
25509
25516
  if (date < /* @__PURE__ */ new Date()) return "Expired";
25510
25517
  return date.toLocaleDateString();
25511
25518
  };
25512
- return /* @__PURE__ */ React234.createElement(Stack148, { gap: "md" }, /* @__PURE__ */ React234.createElement(Stack148, { gap: "xs" }, /* @__PURE__ */ React234.createElement(Text123, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React234.createElement(Paper19, { p: "sm", withBorder: true }, /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, /* @__PURE__ */ React234.createElement(IconShieldCheck2, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React234.createElement(Stack148, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, rootCapability ? `Granted: ${new Date(rootCapability.issuedAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React234.createElement(Badge40, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React234.createElement(Divider18, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React234.createElement(Group80, { justify: "center", py: "xl" }, /* @__PURE__ */ React234.createElement(Loader29, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React234.createElement(Alert31, { color: "gray", variant: "light" }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React234.createElement(Stack148, { gap: "xs" }, delegations.map(({ capability, displayName, type }) => /* @__PURE__ */ React234.createElement(Paper19, { key: capability.id, p: "sm", withBorder: true }, /* @__PURE__ */ React234.createElement(Group80, { justify: "space-between" }, /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React234.createElement(Stack148, { gap: 2 }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, formatCapabilities(capability.capabilities)), /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(capability.expiration)), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "Granted by: ", capability.issuer === entityDid ? "Entity" : capability.issuer.slice(-8))))), /* @__PURE__ */ React234.createElement(
25513
- ActionIcon35,
25519
+ return /* @__PURE__ */ React234.createElement(Stack148, { gap: "md" }, /* @__PURE__ */ React234.createElement(Stack148, { gap: "xs" }, /* @__PURE__ */ React234.createElement(Text123, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React234.createElement(Paper19, { p: "sm", withBorder: true }, /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, /* @__PURE__ */ React234.createElement(IconShieldCheck2, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React234.createElement(Stack148, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, rootCapability ? `Granted: ${new Date(rootCapability.issuedAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React234.createElement(Badge40, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React234.createElement(Divider19, { label: "Delegated Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React234.createElement(Group80, { justify: "center", py: "xl" }, /* @__PURE__ */ React234.createElement(Loader29, { size: "sm" })) : delegations.length === 0 ? /* @__PURE__ */ React234.createElement(Alert31, { color: "gray", variant: "light" }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm" }, "No permissions have been granted yet.")) : /* @__PURE__ */ React234.createElement(Stack148, { gap: "xs" }, delegations.map(({ capability, displayName, type }) => /* @__PURE__ */ React234.createElement(Paper19, { key: capability.id, p: "sm", withBorder: true }, /* @__PURE__ */ React234.createElement(Group80, { justify: "space-between" }, /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React234.createElement(Stack148, { gap: 2 }, /* @__PURE__ */ React234.createElement(Text123, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, formatCapabilities(capability.capabilities)), /* @__PURE__ */ React234.createElement(Group80, { gap: "xs" }, /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(capability.expiration)), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React234.createElement(Text123, { size: "xs", c: "dimmed" }, "Granted by: ", capability.issuer === entityDid ? "Entity" : capability.issuer.slice(-8))))), /* @__PURE__ */ React234.createElement(
25520
+ ActionIcon36,
25514
25521
  {
25515
25522
  color: "red",
25516
25523
  variant: "subtle",
@@ -25545,11 +25552,11 @@ import {
25545
25552
  Paper as Paper20,
25546
25553
  Loader as Loader30,
25547
25554
  Badge as Badge41,
25548
- ActionIcon as ActionIcon36,
25549
- Divider as Divider19,
25555
+ ActionIcon as ActionIcon37,
25556
+ Divider as Divider20,
25550
25557
  NumberInput as NumberInput3
25551
25558
  } from "@mantine/core";
25552
- import { IconSearch as IconSearch7, IconUser as IconUser6, IconRobot as IconRobot5, IconX as IconX11, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
25559
+ import { IconSearch as IconSearch7, IconUser as IconUser6, IconRobot as IconRobot5, IconX as IconX12, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
25553
25560
  var GrantPermissionModal = ({
25554
25561
  opened,
25555
25562
  onClose,
@@ -25686,7 +25693,7 @@ var GrantPermissionModal = ({
25686
25693
  onChange: (e) => setSearchQuery(e.currentTarget.value),
25687
25694
  onKeyDown: (e) => e.key === "Enter" && handleSearch()
25688
25695
  }
25689
- ), selectedRecipient ? /* @__PURE__ */ React235.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React235.createElement(Group81, { justify: "space-between" }, /* @__PURE__ */ React235.createElement(Group81, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React235.createElement(IconRobot5, { size: 16 }) : /* @__PURE__ */ React235.createElement(IconUser6, { size: 16 }), /* @__PURE__ */ React235.createElement(Text124, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React235.createElement(Badge41, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React235.createElement(ActionIcon36, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React235.createElement(IconX11, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React235.createElement(Paper20, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React235.createElement(Stack149, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React235.createElement(
25696
+ ), selectedRecipient ? /* @__PURE__ */ React235.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React235.createElement(Group81, { justify: "space-between" }, /* @__PURE__ */ React235.createElement(Group81, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React235.createElement(IconRobot5, { size: 16 }) : /* @__PURE__ */ React235.createElement(IconUser6, { size: 16 }), /* @__PURE__ */ React235.createElement(Text124, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React235.createElement(Badge41, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React235.createElement(ActionIcon37, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React235.createElement(IconX12, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React235.createElement(Paper20, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React235.createElement(Stack149, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React235.createElement(
25690
25697
  Button41,
25691
25698
  {
25692
25699
  key: result.did,
@@ -25704,7 +25711,7 @@ var GrantPermissionModal = ({
25704
25711
  value: manualDid,
25705
25712
  onChange: (e) => setManualDid(e.currentTarget.value)
25706
25713
  }
25707
- ), /* @__PURE__ */ React235.createElement(Divider19, null), /* @__PURE__ */ React235.createElement(Stack149, { gap: "xs" }, /* @__PURE__ */ React235.createElement(Text124, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
25714
+ ), /* @__PURE__ */ React235.createElement(Divider20, null), /* @__PURE__ */ React235.createElement(Stack149, { gap: "xs" }, /* @__PURE__ */ React235.createElement(Text124, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
25708
25715
  // Single block mode: show fixed block info
25709
25716
  /* @__PURE__ */ React235.createElement(Paper20, { p: "sm", withBorder: true }, /* @__PURE__ */ React235.createElement(Group81, { gap: "xs" }, /* @__PURE__ */ React235.createElement(Badge41, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React235.createElement(Text124, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React235.createElement(Text124, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
25710
25717
  ) : (
@@ -25724,7 +25731,7 @@ var GrantPermissionModal = ({
25724
25731
  }
25725
25732
  }
25726
25733
  )))))
25727
- )), /* @__PURE__ */ React235.createElement(Divider19, null), /* @__PURE__ */ React235.createElement(Stack149, { gap: "xs" }, /* @__PURE__ */ React235.createElement(
25734
+ )), /* @__PURE__ */ React235.createElement(Divider20, null), /* @__PURE__ */ React235.createElement(Stack149, { gap: "xs" }, /* @__PURE__ */ React235.createElement(
25728
25735
  Checkbox12,
25729
25736
  {
25730
25737
  label: "Set expiration",
@@ -25749,7 +25756,7 @@ var GrantPermissionModal = ({
25749
25756
  checked: canDelegate,
25750
25757
  onChange: (e) => setCanDelegate(e.currentTarget.checked)
25751
25758
  }
25752
- ), /* @__PURE__ */ React235.createElement(Divider19, null), /* @__PURE__ */ React235.createElement(
25759
+ ), /* @__PURE__ */ React235.createElement(Divider20, null), /* @__PURE__ */ React235.createElement(
25753
25760
  TextInput9,
25754
25761
  {
25755
25762
  label: "Enter your PIN to sign this delegation",
@@ -25874,4 +25881,4 @@ export {
25874
25881
  ixoGraphQLClient,
25875
25882
  getEntity
25876
25883
  };
25877
- //# sourceMappingURL=chunk-FLFC7MR5.mjs.map
25884
+ //# sourceMappingURL=chunk-HT2SFUTR.mjs.map