@ixo/editor 2.32.0 → 2.32.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.
@@ -13768,7 +13768,7 @@ var ClaimTemplateView = ({ editor, block }) => {
13768
13768
  };
13769
13769
 
13770
13770
  // src/mantine/blocks/claim/flow/FlowView.tsx
13771
- import React151, { useMemo as useMemo43, useRef as useRef10, useEffect as useEffect44, useCallback as useCallback39 } from "react";
13771
+ import React151, { useMemo as useMemo43, useRef as useRef11, useEffect as useEffect44, useCallback as useCallback40 } from "react";
13772
13772
  import { Stack as Stack113, Text as Text87, Loader as Loader19, Center as Center9, Alert as Alert20, Title as Title6, Flex as Flex27, ActionIcon as ActionIcon26 } from "@mantine/core";
13773
13773
 
13774
13774
  // src/mantine/hooks/useCurrentUser.ts
@@ -14457,7 +14457,7 @@ function useBlockAuthorization({
14457
14457
  }
14458
14458
 
14459
14459
  // src/mantine/blocks/bid/flow/components/BidSurveyPanel.tsx
14460
- import React140, { useMemo as useMemo35, useEffect as useEffect37 } from "react";
14460
+ import React140, { useMemo as useMemo35, useEffect as useEffect37, useRef as useRef9, useCallback as useCallback34 } from "react";
14461
14461
  import { Loader as Loader13, Stack as Stack104, Text as Text78 } from "@mantine/core";
14462
14462
  import { Survey as Survey2 } from "@ixo/surveys";
14463
14463
 
@@ -14581,6 +14581,13 @@ var BidSurveyPanel = ({ deedId, collectionId, role, onSubmitComplete, execution,
14581
14581
  const { closePanel } = usePanelStore();
14582
14582
  const { surveyModel, loading, error, handleSurveyComplete } = useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, executeHookedActions);
14583
14583
  const roleLabel = role === "service_agent" ? "Service Agent" : "Evaluation Agent";
14584
+ const handleSurveyCompleteRef = useRef9(handleSurveyComplete);
14585
+ useEffect37(() => {
14586
+ handleSurveyCompleteRef.current = handleSurveyComplete;
14587
+ }, [handleSurveyComplete]);
14588
+ const stableHandleSurveyComplete = useCallback34((sender) => {
14589
+ handleSurveyCompleteRef.current(sender);
14590
+ }, []);
14584
14591
  const surveyContainerStyle = useMemo35(
14585
14592
  () => ({
14586
14593
  flex: 1,
@@ -14593,18 +14600,18 @@ var BidSurveyPanel = ({ deedId, collectionId, role, onSubmitComplete, execution,
14593
14600
  );
14594
14601
  useEffect37(() => {
14595
14602
  if (surveyModel) {
14596
- surveyModel.onComplete.add(handleSurveyComplete);
14603
+ surveyModel.onComplete.add(stableHandleSurveyComplete);
14597
14604
  return () => {
14598
- surveyModel.onComplete.remove(handleSurveyComplete);
14605
+ surveyModel.onComplete.remove(stableHandleSurveyComplete);
14599
14606
  };
14600
14607
  }
14601
14608
  return void 0;
14602
- }, [surveyModel, handleSurveyComplete]);
14609
+ }, [surveyModel, stableHandleSurveyComplete]);
14603
14610
  return /* @__PURE__ */ React140.createElement(BaseRightPanelLayout, { isTemplate: false, onClose: closePanel, title: `${roleLabel} Application` }, /* @__PURE__ */ React140.createElement("div", { style: surveyContainerStyle }, loading && /* @__PURE__ */ React140.createElement(Stack104, { align: "center", justify: "center", style: { height: "100%" } }, /* @__PURE__ */ React140.createElement(Loader13, { size: "lg" }), /* @__PURE__ */ React140.createElement(Text78, { size: "sm", c: "dimmed" }, "Loading survey template...")), error && /* @__PURE__ */ React140.createElement(Stack104, { align: "center", justify: "center", style: { height: "100%", padding: "1rem" } }, /* @__PURE__ */ React140.createElement(Text78, { size: "sm", c: "red" }, error)), !loading && !error && surveyModel && /* @__PURE__ */ React140.createElement(Survey2, { model: surveyModel })));
14604
14611
  };
14605
14612
 
14606
14613
  // src/mantine/blocks/bid/flow/components/BidsList.tsx
14607
- import React143, { useCallback as useCallback36 } from "react";
14614
+ import React143, { useCallback as useCallback37 } from "react";
14608
14615
  import { Stack as Stack107, Text as Text81, Loader as Loader15, Center as Center6, Alert as Alert18 } from "@mantine/core";
14609
14616
  import { IconAlertCircle as IconAlertCircle3 } from "@tabler/icons-react";
14610
14617
 
@@ -14695,13 +14702,13 @@ function useBidView(bid, deedId) {
14695
14702
  }
14696
14703
 
14697
14704
  // src/mantine/blocks/bid/flow/hooks/useBidActions.ts
14698
- import { useState as useState54, useCallback as useCallback34 } from "react";
14705
+ import { useState as useState54, useCallback as useCallback35 } from "react";
14699
14706
  function useBidActions(bid, deedId, adminAddress, execution, onRefresh, executeHookedActions) {
14700
14707
  const handlers = useBlocknoteHandlers();
14701
14708
  const { closePanel } = usePanelStore();
14702
14709
  const [loading, setLoading] = useState54(false);
14703
14710
  const [error, setError] = useState54(null);
14704
- const approveBid = useCallback34(async () => {
14711
+ const approveBid = useCallback35(async () => {
14705
14712
  try {
14706
14713
  setLoading(true);
14707
14714
  setError(null);
@@ -14769,7 +14776,7 @@ function useBidActions(bid, deedId, adminAddress, execution, onRefresh, executeH
14769
14776
  setLoading(false);
14770
14777
  }
14771
14778
  }, [bid, deedId, adminAddress, handlers, closePanel, onRefresh, execution, executeHookedActions]);
14772
- const rejectBid = useCallback34(
14779
+ const rejectBid = useCallback35(
14773
14780
  async (reason) => {
14774
14781
  if (!reason.trim()) {
14775
14782
  setError("Please provide a reason for rejection");
@@ -14908,13 +14915,13 @@ var BidItem = ({ bid, deedId, adminAddress, onRefresh, execution, executeHookedA
14908
14915
  };
14909
14916
 
14910
14917
  // src/mantine/blocks/bid/flow/hooks/useBids.ts
14911
- import { useState as useState57, useEffect as useEffect40, useCallback as useCallback35 } from "react";
14918
+ import { useState as useState57, useEffect as useEffect40, useCallback as useCallback36 } from "react";
14912
14919
  function useBids(collectionId) {
14913
14920
  const handlers = useBlocknoteHandlers();
14914
14921
  const [bids, setBids] = useState57([]);
14915
14922
  const [loading, setLoading] = useState57(true);
14916
14923
  const [error, setError] = useState57(null);
14917
- const fetchBids = useCallback35(async () => {
14924
+ const fetchBids = useCallback36(async () => {
14918
14925
  if (!collectionId) {
14919
14926
  setLoading(false);
14920
14927
  return;
@@ -14941,7 +14948,7 @@ function useBids(collectionId) {
14941
14948
  var BidsList = ({ collectionId, deedId, adminAddress, onRefresh, execution, executeHookedActions }) => {
14942
14949
  const { closePanel } = usePanelStore();
14943
14950
  const { bids, loading, error, refetch } = useBids(collectionId);
14944
- const handleRefresh = useCallback36(() => {
14951
+ const handleRefresh = useCallback37(() => {
14945
14952
  refetch();
14946
14953
  onRefresh();
14947
14954
  }, [refetch, onRefresh]);
@@ -15012,13 +15019,13 @@ var UserPlus = ({ size = 24, color = "currentColor", style }) => {
15012
15019
  var UserPlus_default = UserPlus;
15013
15020
 
15014
15021
  // src/mantine/blocks/bid/flow/hooks/useUserBid.ts
15015
- import { useState as useState58, useEffect as useEffect41, useCallback as useCallback37 } from "react";
15022
+ import { useState as useState58, useEffect as useEffect41, useCallback as useCallback38 } from "react";
15016
15023
  function useUserBid(collectionId, userDid) {
15017
15024
  const handlers = useBlocknoteHandlers();
15018
15025
  const [userBid, setUserBid] = useState58(null);
15019
15026
  const [loading, setLoading] = useState58(true);
15020
15027
  const [error, setError] = useState58(null);
15021
- const fetchUserBid = useCallback37(async () => {
15028
+ const fetchUserBid = useCallback38(async () => {
15022
15029
  if (!collectionId || !userDid) {
15023
15030
  setLoading(false);
15024
15031
  return;
@@ -15177,11 +15184,11 @@ var BidCollectionItem = ({ collection, deedId, adminAddress, userRole, onRefresh
15177
15184
  };
15178
15185
 
15179
15186
  // src/mantine/blocks/evaluator/flow/EvaluationCollectionItem.tsx
15180
- import React149, { useMemo as useMemo42, useEffect as useEffect43, useRef as useRef9 } from "react";
15187
+ import React149, { useMemo as useMemo42, useEffect as useEffect43, useRef as useRef10 } from "react";
15181
15188
  import { Stack as Stack111, Text as Text85, ActionIcon as ActionIcon25, Tooltip as Tooltip15 } from "@mantine/core";
15182
15189
 
15183
15190
  // src/mantine/blocks/evaluator/flow/ClaimsList.tsx
15184
- import React148, { useState as useState59, useEffect as useEffect42, useCallback as useCallback38, useMemo as useMemo41 } from "react";
15191
+ import React148, { useState as useState59, useEffect as useEffect42, useCallback as useCallback39, useMemo as useMemo41 } from "react";
15185
15192
  import { Paper as Paper14, CloseButton as CloseButton5, Title as Title5, Loader as Loader17, Stack as Stack110, Text as Text84, ActionIcon as ActionIcon24, Alert as Alert19, Badge as Badge23, Group as Group51, Button as Button31, Divider as Divider13, Tabs as Tabs3, ScrollArea as ScrollArea6 } from "@mantine/core";
15186
15193
  import { IconAlertCircle as IconAlertCircle4, IconArrowRight as IconArrowRight4, IconRefresh as IconRefresh3, IconArrowLeft as IconArrowLeft4, IconFileText as IconFileText3, IconRobot as IconRobot3, IconChecklist as IconChecklist3 } from "@tabler/icons-react";
15187
15194
  import { Survey as Survey4, SurveyModel as SurveyModel4 } from "@ixo/surveys";
@@ -15641,7 +15648,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15641
15648
  const [evaluationResult, setEvaluationResult] = useState59(null);
15642
15649
  const [evaluationLoading, setEvaluationLoading] = useState59(false);
15643
15650
  const [activeTab, setActiveTab] = useState59("submission");
15644
- const fetchClaims = useCallback38(async () => {
15651
+ const fetchClaims = useCallback39(async () => {
15645
15652
  try {
15646
15653
  setLoading(true);
15647
15654
  setError(null);
@@ -15659,7 +15666,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15659
15666
  useEffect42(() => {
15660
15667
  fetchClaims();
15661
15668
  }, [fetchClaims]);
15662
- const fetchClaimAndSurvey = useCallback38(
15669
+ const fetchClaimAndSurvey = useCallback39(
15663
15670
  async (claim) => {
15664
15671
  try {
15665
15672
  setSurveyLoading(true);
@@ -15706,7 +15713,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15706
15713
  },
15707
15714
  [collectionId, deedId]
15708
15715
  );
15709
- const handleViewClaim = useCallback38(
15716
+ const handleViewClaim = useCallback39(
15710
15717
  (claim) => {
15711
15718
  setSelectedClaim(claim);
15712
15719
  fetchClaimAndSurvey(claim);
@@ -15714,7 +15721,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15714
15721
  },
15715
15722
  [fetchClaimAndSurvey]
15716
15723
  );
15717
- const handleBackToList = useCallback38(() => {
15724
+ const handleBackToList = useCallback39(() => {
15718
15725
  setViewMode("list");
15719
15726
  setSelectedClaim(null);
15720
15727
  setClaimData(null);
@@ -15749,7 +15756,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15749
15756
  }),
15750
15757
  []
15751
15758
  );
15752
- const handleApprove = useCallback38(async () => {
15759
+ const handleApprove = useCallback39(async () => {
15753
15760
  if (!selectedClaim) return;
15754
15761
  try {
15755
15762
  setEvaluating(true);
@@ -15842,7 +15849,7 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
15842
15849
  setEvaluating(false);
15843
15850
  }
15844
15851
  }, [selectedClaim, handlers, deedId, collectionId, adminAddress, evaluationResult, handleBackToList, onEvaluationComplete, editor]);
15845
- const handleReject = useCallback38(async () => {
15852
+ const handleReject = useCallback39(async () => {
15846
15853
  if (!selectedClaim) return;
15847
15854
  try {
15848
15855
  setEvaluating(true);
@@ -16108,7 +16115,7 @@ var ClaimListItem = ({ claim, onViewClaim }) => {
16108
16115
  import { IconArrowRight as IconArrowRight5 } from "@tabler/icons-react";
16109
16116
  var EvaluationCollectionItem = ({ collection, deedId, adminAddress, userRole, onRefresh }) => {
16110
16117
  const { getCurrentUser } = useBlocknoteHandlers();
16111
- const getCurrentUserRef = useRef9(getCurrentUser);
16118
+ const getCurrentUserRef = useRef10(getCurrentUser);
16112
16119
  useEffect43(() => {
16113
16120
  getCurrentUserRef.current = getCurrentUser;
16114
16121
  }, [getCurrentUser]);
@@ -16253,7 +16260,7 @@ var ClaimFlowView = ({ editor, block }) => {
16253
16260
  }),
16254
16261
  [flowNode, runtime, ucanManager, userAddress, delegationStore, verifySignature, flowOwnerDid, flowUri]
16255
16262
  );
16256
- const executionRef = useRef10(executionValue);
16263
+ const executionRef = useRef11(executionValue);
16257
16264
  useEffect44(() => {
16258
16265
  executionRef.current = executionValue;
16259
16266
  }, [executionValue]);
@@ -16307,11 +16314,11 @@ var ClaimFlowView = ({ editor, block }) => {
16307
16314
  const title = block.props.title || "Submit Claim";
16308
16315
  const adminAddress = block.props.adminAddress || "";
16309
16316
  const { collections, loading, error, refetch } = useCollections(did, selectedCollectionIds, block, editor);
16310
- const refetchRef = useRef10(refetch);
16317
+ const refetchRef = useRef11(refetch);
16311
16318
  useEffect44(() => {
16312
16319
  refetchRef.current = refetch;
16313
16320
  }, [refetch]);
16314
- const stableRefetch = useCallback39(() => {
16321
+ const stableRefetch = useCallback40(() => {
16315
16322
  refetchRef.current();
16316
16323
  }, []);
16317
16324
  if (!did) {
@@ -16399,10 +16406,10 @@ import React156, { useMemo as useMemo45 } from "react";
16399
16406
  import { Group as Group52, Stack as Stack114, Text as Text88 } from "@mantine/core";
16400
16407
 
16401
16408
  // src/mantine/blocks/bid/template/TemplateConfig.tsx
16402
- import React155, { useCallback as useCallback41 } from "react";
16409
+ import React155, { useCallback as useCallback42 } from "react";
16403
16410
 
16404
16411
  // src/mantine/blocks/bid/template/GeneralTab.tsx
16405
- import React154, { useEffect as useEffect45, useState as useState60, useCallback as useCallback40, useMemo as useMemo44 } from "react";
16412
+ import React154, { useEffect as useEffect45, useState as useState60, useCallback as useCallback41, useMemo as useMemo44 } from "react";
16406
16413
  var GeneralTab7 = ({
16407
16414
  title,
16408
16415
  description,
@@ -16430,14 +16437,14 @@ var GeneralTab7 = ({
16430
16437
  return [];
16431
16438
  }
16432
16439
  }, [selectedCollections]);
16433
- const handleCollectionsChange = useCallback40(
16440
+ const handleCollectionsChange = useCallback41(
16434
16441
  (collections) => {
16435
16442
  const stringified = JSON.stringify(collections || []);
16436
16443
  onSelectedCollectionsChange(stringified);
16437
16444
  },
16438
16445
  [onSelectedCollectionsChange]
16439
16446
  );
16440
- const handleAdminAddressChange = useCallback40(
16447
+ const handleAdminAddressChange = useCallback41(
16441
16448
  (adminAddress2) => {
16442
16449
  if (onAdminAddressChange) {
16443
16450
  onAdminAddressChange(adminAddress2);
@@ -16667,7 +16674,7 @@ var bidActions = [
16667
16674
  // src/mantine/blocks/bid/template/TemplateConfig.tsx
16668
16675
  var TemplateConfig7 = ({ editor, block }) => {
16669
16676
  const { closePanel } = usePanelStore();
16670
- const updateProp = useCallback41(
16677
+ const updateProp = useCallback42(
16671
16678
  (key, value) => {
16672
16679
  editor.updateBlock(block, {
16673
16680
  props: {
@@ -16761,7 +16768,7 @@ var BidTemplateView = ({ editor, block }) => {
16761
16768
  };
16762
16769
 
16763
16770
  // src/mantine/blocks/bid/flow/components/FlowView.tsx
16764
- import React157, { useMemo as useMemo46, useRef as useRef11, useEffect as useEffect46, useCallback as useCallback42 } from "react";
16771
+ import React157, { useMemo as useMemo46, useRef as useRef12, useEffect as useEffect46, useCallback as useCallback43 } from "react";
16765
16772
  import { Stack as Stack115, Text as Text89, Loader as Loader20, Center as Center10, Alert as Alert21, Title as Title7, Flex as Flex28, ActionIcon as ActionIcon27 } from "@mantine/core";
16766
16773
  import { IconSettings as IconSettings4, IconRefresh as IconRefresh5, IconAlertCircle as IconAlertCircle6 } from "@tabler/icons-react";
16767
16774
  var BID_FLOW_PANEL_ID = "bid-flow-panel";
@@ -16804,7 +16811,7 @@ var BidFlowView = ({ editor, block }) => {
16804
16811
  }),
16805
16812
  [flowNode, runtime, ucanManager, userAddress, editor, flowUri, delegationStore, verifySignature, flowOwnerDid]
16806
16813
  );
16807
- const executionRef = useRef11(executionValue);
16814
+ const executionRef = useRef12(executionValue);
16808
16815
  useEffect46(() => {
16809
16816
  executionRef.current = executionValue;
16810
16817
  }, [executionValue]);
@@ -16862,11 +16869,11 @@ var BidFlowView = ({ editor, block }) => {
16862
16869
  const title = block.props.title || "Bid Application";
16863
16870
  const { collections, loading, error, refetch } = useCollections(did, selectedCollectionIds, block, editor);
16864
16871
  const { executeHookedActions } = useHookedActions({ block, editor });
16865
- const refetchRef = useRef11(refetch);
16872
+ const refetchRef = useRef12(refetch);
16866
16873
  useEffect46(() => {
16867
16874
  refetchRef.current = refetch;
16868
16875
  }, [refetch]);
16869
- const stableRefetch = useCallback42(() => {
16876
+ const stableRefetch = useCallback43(() => {
16870
16877
  refetchRef.current();
16871
16878
  }, []);
16872
16879
  if (!did) {
@@ -16946,10 +16953,10 @@ import React162, { useMemo as useMemo48 } from "react";
16946
16953
  import { Group as Group53, Stack as Stack116, Text as Text90 } from "@mantine/core";
16947
16954
 
16948
16955
  // src/mantine/blocks/evaluator/template/TemplateConfig.tsx
16949
- import React161, { useCallback as useCallback44 } from "react";
16956
+ import React161, { useCallback as useCallback45 } from "react";
16950
16957
 
16951
16958
  // src/mantine/blocks/evaluator/template/GeneralTab.tsx
16952
- import React160, { useEffect as useEffect47, useState as useState61, useCallback as useCallback43, useMemo as useMemo47 } from "react";
16959
+ import React160, { useEffect as useEffect47, useState as useState61, useCallback as useCallback44, useMemo as useMemo47 } from "react";
16953
16960
  var GeneralTab8 = ({
16954
16961
  title,
16955
16962
  description,
@@ -16977,14 +16984,14 @@ var GeneralTab8 = ({
16977
16984
  return [];
16978
16985
  }
16979
16986
  }, [selectedCollections]);
16980
- const handleCollectionsChange = useCallback43(
16987
+ const handleCollectionsChange = useCallback44(
16981
16988
  (collections) => {
16982
16989
  const stringified = JSON.stringify(collections || []);
16983
16990
  onSelectedCollectionsChange(stringified);
16984
16991
  },
16985
16992
  [onSelectedCollectionsChange]
16986
16993
  );
16987
- const handleAdminAddressChange = useCallback43(
16994
+ const handleAdminAddressChange = useCallback44(
16988
16995
  (adminAddress2) => {
16989
16996
  if (onAdminAddressChange) {
16990
16997
  onAdminAddressChange(adminAddress2);
@@ -17033,7 +17040,7 @@ var GeneralTab8 = ({
17033
17040
  // src/mantine/blocks/evaluator/template/TemplateConfig.tsx
17034
17041
  var TemplateConfig8 = ({ editor, block }) => {
17035
17042
  const { closePanel } = usePanelStore();
17036
- const updateProp = useCallback44(
17043
+ const updateProp = useCallback45(
17037
17044
  (key, value) => {
17038
17045
  editor.updateBlock(block, {
17039
17046
  props: {
@@ -17185,12 +17192,12 @@ import React167 from "react";
17185
17192
  import { createReactBlockSpec as createReactBlockSpec12 } from "@blocknote/react";
17186
17193
 
17187
17194
  // src/mantine/blocks/visualization/VisualizationBlock.tsx
17188
- import React166, { useMemo as useMemo50, useCallback as useCallback45, useRef as useRef12, useState as useState62, useEffect as useEffect48 } from "react";
17195
+ import React166, { useMemo as useMemo50, useCallback as useCallback46, useRef as useRef13, useState as useState62, useEffect as useEffect48 } from "react";
17189
17196
  import { Box as Box34, Stack as Stack118, Text as Text92, Paper as Paper15, Group as Group54 } from "@mantine/core";
17190
17197
  function VisualizationBlock({ block, editor }) {
17191
17198
  const { visualizationRenderer } = useBlocknoteContext();
17192
17199
  const { vizType, config, title, preferences } = block.props;
17193
- const containerRef = useRef12(null);
17200
+ const containerRef = useRef13(null);
17194
17201
  const [hasValidDimensions, setHasValidDimensions] = useState62(false);
17195
17202
  useEffect48(() => {
17196
17203
  const container = containerRef.current;
@@ -17222,7 +17229,7 @@ function VisualizationBlock({ block, editor }) {
17222
17229
  return {};
17223
17230
  }
17224
17231
  }, [preferences]);
17225
- const handlePreferencesChange = useCallback45(
17232
+ const handlePreferencesChange = useCallback46(
17226
17233
  (newPreferences) => {
17227
17234
  if (editor) {
17228
17235
  editor.updateBlock(block, {
@@ -17289,7 +17296,7 @@ import React170, { useMemo as useMemo51 } from "react";
17289
17296
  import { Badge as Badge24, Group as Group55, Stack as Stack119, Text as Text93 } from "@mantine/core";
17290
17297
 
17291
17298
  // src/mantine/blocks/domainCreator/template/TemplateConfig.tsx
17292
- import React169, { useCallback as useCallback46 } from "react";
17299
+ import React169, { useCallback as useCallback47 } from "react";
17293
17300
 
17294
17301
  // src/mantine/blocks/domainCreator/template/GeneralTab.tsx
17295
17302
  import React168, { useEffect as useEffect49, useState as useState63 } from "react";
@@ -17344,7 +17351,7 @@ var GeneralTab9 = ({ title, description, icon, onTitleChange, onDescriptionChang
17344
17351
  // src/mantine/blocks/domainCreator/template/TemplateConfig.tsx
17345
17352
  var TemplateConfig9 = ({ editor, block }) => {
17346
17353
  const { closePanel } = usePanelStore();
17347
- const updateProp = useCallback46(
17354
+ const updateProp = useCallback47(
17348
17355
  (key, value) => {
17349
17356
  editor.updateBlock(block, {
17350
17357
  props: {
@@ -17395,12 +17402,12 @@ var DomainCreatorTemplateView = ({ editor, block }) => {
17395
17402
  };
17396
17403
 
17397
17404
  // src/mantine/blocks/domainCreator/flow/FlowView.tsx
17398
- import React172, { useCallback as useCallback48, useMemo as useMemo53, useState as useState65 } from "react";
17405
+ import React172, { useCallback as useCallback49, useMemo as useMemo53, useState as useState65 } from "react";
17399
17406
  import { ActionIcon as ActionIcon29, Badge as Badge25, Group as Group57, Stack as Stack121, Text as Text95, Tooltip as Tooltip16 } from "@mantine/core";
17400
17407
  import { IconChevronRight as IconChevronRight6, IconCheck as IconCheck6, IconAlertCircle as IconAlertCircle9 } from "@tabler/icons-react";
17401
17408
 
17402
17409
  // src/mantine/blocks/domainCreator/flow/DomainCreatorSurveyPanel.tsx
17403
- import React171, { useCallback as useCallback47, useEffect as useEffect50, useMemo as useMemo52, useRef as useRef13, useState as useState64 } from "react";
17410
+ import React171, { useCallback as useCallback48, useEffect as useEffect50, useMemo as useMemo52, useRef as useRef14, useState as useState64 } from "react";
17404
17411
  import { Alert as Alert23, Button as Button32, Group as Group56, Loader as Loader22, Stack as Stack120, Text as Text94 } from "@mantine/core";
17405
17412
  import { useDebouncedCallback } from "@mantine/hooks";
17406
17413
  import { IconAlertCircle as IconAlertCircle8, IconCheck as IconCheck5 } from "@tabler/icons-react";
@@ -18465,8 +18472,8 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18465
18472
  const [error, setError] = useState64(null);
18466
18473
  const [createdEntityDid, setCreatedEntityDid] = useState64(existingBlockEntityDid || null);
18467
18474
  const [createdEntityType, setCreatedEntityType] = useState64(existingBlockEntityType || null);
18468
- const isUpdatingFromProp = useRef13(false);
18469
- const lastSyncedAnswers = useRef13("");
18475
+ const isUpdatingFromProp = useRef14(false);
18476
+ const lastSyncedAnswers = useRef14("");
18470
18477
  const surveyModel = useMemo52(() => {
18471
18478
  const model = new SurveyModel5(tempDomainCreatorSurvey);
18472
18479
  model.applyTheme(surveyTheme);
@@ -18474,7 +18481,7 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18474
18481
  model.questionsOnPageMode = "singlePage";
18475
18482
  return model;
18476
18483
  }, []);
18477
- const syncPropToSurvey = useCallback47(
18484
+ const syncPropToSurvey = useCallback48(
18478
18485
  (answersJson) => {
18479
18486
  if (!answersJson || answersJson === lastSyncedAnswers.current) return;
18480
18487
  try {
@@ -18544,7 +18551,7 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18544
18551
  });
18545
18552
  }
18546
18553
  }, [editor, block]);
18547
- const processDomainCreation = useCallback47(
18554
+ const processDomainCreation = useCallback48(
18548
18555
  async (data) => {
18549
18556
  if (!handlers) {
18550
18557
  throw new Error("Handlers not available");
@@ -18622,7 +18629,7 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18622
18629
  },
18623
18630
  [handlers, existingEntityDid, issuerDidOverride]
18624
18631
  );
18625
- const handleSurveyComplete = useCallback47(
18632
+ const handleSurveyComplete = useCallback48(
18626
18633
  async (sender) => {
18627
18634
  const data = sender.data || {};
18628
18635
  try {
@@ -18656,15 +18663,15 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
18656
18663
  surveyModel.onComplete.remove(handleSurveyComplete);
18657
18664
  };
18658
18665
  }, [handleSurveyComplete, surveyModel]);
18659
- const handleRetry = useCallback47(() => {
18666
+ const handleRetry = useCallback48(() => {
18660
18667
  setFlowStep("survey");
18661
18668
  setError(null);
18662
18669
  surveyModel.clear();
18663
18670
  }, [surveyModel]);
18664
- const handleClose = useCallback47(() => {
18671
+ const handleClose = useCallback48(() => {
18665
18672
  closePanel();
18666
18673
  }, [closePanel]);
18667
- const handleVisitEntity = useCallback47(() => {
18674
+ const handleVisitEntity = useCallback48(() => {
18668
18675
  if (createdEntityDid && createdEntityType && handlers?.redirectToEntityOverview) {
18669
18676
  handlers.redirectToEntityOverview(createdEntityDid, createdEntityType);
18670
18677
  }
@@ -18701,7 +18708,7 @@ var DomainCreatorFlowView = ({ editor, block }) => {
18701
18708
  const [submissionStatus, setSubmissionStatus] = useState65("idle");
18702
18709
  const lastSubmission = block.props.lastSubmission ? JSON.parse(block.props.lastSubmission) : null;
18703
18710
  const hasExistingSubmission = lastSubmission?.entityDid;
18704
- const handleComplete = useCallback48(
18711
+ const handleComplete = useCallback49(
18705
18712
  (data) => {
18706
18713
  editor.updateBlock(block, {
18707
18714
  props: {
@@ -18787,10 +18794,10 @@ import React178, { useMemo as useMemo56 } from "react";
18787
18794
  import { Badge as Badge27, Group as Group59, Stack as Stack124, Text as Text98 } from "@mantine/core";
18788
18795
 
18789
18796
  // src/mantine/blocks/email/template/TemplateConfig.tsx
18790
- import React177, { useCallback as useCallback51, useMemo as useMemo55 } from "react";
18797
+ import React177, { useCallback as useCallback52, useMemo as useMemo55 } from "react";
18791
18798
 
18792
18799
  // src/mantine/blocks/email/template/GeneralTab.tsx
18793
- import React175, { useEffect as useEffect51, useState as useState66, useCallback as useCallback49, useRef as useRef14 } from "react";
18800
+ import React175, { useEffect as useEffect51, useState as useState66, useCallback as useCallback50, useRef as useRef15 } from "react";
18794
18801
  import { Divider as Divider14, Loader as Loader23, Select as Select4, Stack as Stack122, Text as Text96 } from "@mantine/core";
18795
18802
  var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplateChange, onToChange }) => {
18796
18803
  const handlers = useBlocknoteHandlers();
@@ -18809,7 +18816,7 @@ var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplat
18809
18816
  setLocalTemplateName(currentBlock.props.templateName || "");
18810
18817
  setLocalTo(currentBlock.props.to || "");
18811
18818
  }, [getCurrentBlock]);
18812
- const hasLoadedTemplates = useRef14(false);
18819
+ const hasLoadedTemplates = useRef15(false);
18813
18820
  useEffect51(() => {
18814
18821
  if (hasLoadedTemplates.current) return;
18815
18822
  async function loadTemplates() {
@@ -18832,7 +18839,7 @@ var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplat
18832
18839
  }
18833
18840
  loadTemplates();
18834
18841
  }, [handlers.listEmailTemplates]);
18835
- const handleTemplateSelect = useCallback49(
18842
+ const handleTemplateSelect = useCallback50(
18836
18843
  async (selectedTemplateName) => {
18837
18844
  if (!selectedTemplateName) {
18838
18845
  setLocalTemplateName("");
@@ -18921,7 +18928,7 @@ var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplat
18921
18928
  };
18922
18929
 
18923
18930
  // src/mantine/blocks/email/template/VariablesTab.tsx
18924
- import React176, { useMemo as useMemo54, useCallback as useCallback50, useState as useState67, useEffect as useEffect52 } from "react";
18931
+ import React176, { useMemo as useMemo54, useCallback as useCallback51, useState as useState67, useEffect as useEffect52 } from "react";
18925
18932
  import { Alert as Alert24, Badge as Badge26, Divider as Divider15, Group as Group58, Stack as Stack123, Text as Text97 } from "@mantine/core";
18926
18933
  import { IconInfoCircle as IconInfoCircle4, IconCheck as IconCheck7 } from "@tabler/icons-react";
18927
18934
  var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) => {
@@ -18951,7 +18958,7 @@ var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) =>
18951
18958
  setLocalMapping({});
18952
18959
  }
18953
18960
  }, [getCurrentBlock]);
18954
- const handleVariableChange = useCallback50(
18961
+ const handleVariableChange = useCallback51(
18955
18962
  (variableName, value) => {
18956
18963
  const updated = { ...localMapping, [variableName]: value };
18957
18964
  setLocalMapping(updated);
@@ -18984,11 +18991,11 @@ var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) =>
18984
18991
  // src/mantine/blocks/email/template/TemplateConfig.tsx
18985
18992
  var TemplateConfig10 = ({ editor, block }) => {
18986
18993
  const { closePanel } = usePanelStore();
18987
- const getCurrentBlock = useCallback51(() => {
18994
+ const getCurrentBlock = useCallback52(() => {
18988
18995
  const currentBlock = editor.document.find((b) => b.id === block.id);
18989
18996
  return currentBlock || block;
18990
18997
  }, [editor, block.id]);
18991
- const updateProp = useCallback51(
18998
+ const updateProp = useCallback52(
18992
18999
  (key, value) => {
18993
19000
  const currentBlock = getCurrentBlock();
18994
19001
  editor.updateBlock(currentBlock, {
@@ -19000,7 +19007,7 @@ var TemplateConfig10 = ({ editor, block }) => {
19000
19007
  },
19001
19008
  [editor, getCurrentBlock]
19002
19009
  );
19003
- const handleTemplateChange = useCallback51(
19010
+ const handleTemplateChange = useCallback52(
19004
19011
  (updates) => {
19005
19012
  const currentBlock = getCurrentBlock();
19006
19013
  editor.updateBlock(currentBlock, {
@@ -19012,7 +19019,7 @@ var TemplateConfig10 = ({ editor, block }) => {
19012
19019
  },
19013
19020
  [editor, getCurrentBlock]
19014
19021
  );
19015
- const handleVariablesChange = useCallback51(
19022
+ const handleVariablesChange = useCallback52(
19016
19023
  (variables) => {
19017
19024
  updateProp("variables", variables);
19018
19025
  },
@@ -19082,11 +19089,11 @@ import { Group as Group60, Stack as Stack125, Text as Text99, ActionIcon as Acti
19082
19089
  import { IconSend as IconSend4, IconCheck as IconCheck8, IconX as IconX11 } from "@tabler/icons-react";
19083
19090
 
19084
19091
  // src/mantine/blocks/email/flow/hooks/useEmailActions.ts
19085
- import { useState as useState68, useCallback as useCallback52 } from "react";
19092
+ import { useState as useState68, useCallback as useCallback53 } from "react";
19086
19093
  function useEmailActions({ block, editor }) {
19087
19094
  const handlers = useBlocknoteHandlers();
19088
19095
  const [loading, setLoading] = useState68(false);
19089
- const updateBlockStatus = useCallback52(
19096
+ const updateBlockStatus = useCallback53(
19090
19097
  (updates) => {
19091
19098
  editor.updateBlock(block, {
19092
19099
  props: { ...block.props, ...updates }
@@ -19094,7 +19101,7 @@ function useEmailActions({ block, editor }) {
19094
19101
  },
19095
19102
  [editor, block]
19096
19103
  );
19097
- const sendEmail = useCallback52(async () => {
19104
+ const sendEmail = useCallback53(async () => {
19098
19105
  if (!handlers.sendEmail) {
19099
19106
  updateBlockStatus({
19100
19107
  status: "error",
@@ -19161,7 +19168,7 @@ function useEmailActions({ block, editor }) {
19161
19168
  setLoading(false);
19162
19169
  }
19163
19170
  }, [block, editor, handlers, updateBlockStatus]);
19164
- const resetStatus = useCallback52(() => {
19171
+ const resetStatus = useCallback53(() => {
19165
19172
  updateBlockStatus({
19166
19173
  status: "idle",
19167
19174
  error: ""
@@ -19318,7 +19325,7 @@ import React188 from "react";
19318
19325
  import React184, { useMemo as useMemo59 } from "react";
19319
19326
 
19320
19327
  // src/mantine/blocks/protocolSelector/template/TemplateConfig.tsx
19321
- import React183, { useCallback as useCallback53 } from "react";
19328
+ import React183, { useCallback as useCallback54 } from "react";
19322
19329
 
19323
19330
  // src/mantine/blocks/protocolSelector/template/GeneralTab.tsx
19324
19331
  import React182, { useEffect as useEffect53, useMemo as useMemo58, useState as useState69 } from "react";
@@ -19396,7 +19403,7 @@ var GeneralTab11 = ({ title, description, protocolDids, onTitleChange, onDescrip
19396
19403
  // src/mantine/blocks/protocolSelector/template/TemplateConfig.tsx
19397
19404
  var TemplateConfig11 = ({ editor, block }) => {
19398
19405
  const { closePanel } = usePanelStore();
19399
- const updateProp = useCallback53(
19406
+ const updateProp = useCallback54(
19400
19407
  (key, value) => {
19401
19408
  editor.updateBlock(block, {
19402
19409
  props: {
@@ -19471,7 +19478,7 @@ import { Badge as Badge29, Box as Box38, Group as Group63, Stack as Stack129, Te
19471
19478
  import { IconCircleDashed as IconCircleDashed3, IconChecks } from "@tabler/icons-react";
19472
19479
 
19473
19480
  // src/mantine/blocks/protocolSelector/flow/ProtocolSelectionPanel.tsx
19474
- import React186, { useState as useState70, useEffect as useEffect54, useMemo as useMemo60, useCallback as useCallback54 } from "react";
19481
+ import React186, { useState as useState70, useEffect as useEffect54, useMemo as useMemo60, useCallback as useCallback55 } from "react";
19475
19482
  import { Stack as Stack128, Text as Text102, Box as Box37, Group as Group62, Loader as Loader25 } from "@mantine/core";
19476
19483
 
19477
19484
  // src/icons/EntityAvatar.tsx
@@ -19578,7 +19585,7 @@ var ProtocolSelectionPanel = ({ editor, block }) => {
19578
19585
  }
19579
19586
  });
19580
19587
  }, [protocolDids, handlers]);
19581
- const handleSelectProtocol = useCallback54(
19588
+ const handleSelectProtocol = useCallback55(
19582
19589
  (protocol) => {
19583
19590
  editor.updateBlock(block, {
19584
19591
  props: {
@@ -19734,7 +19741,7 @@ import React192, { useMemo as useMemo62 } from "react";
19734
19741
  import { Badge as Badge30, Group as Group64, Stack as Stack130, Text as Text105 } from "@mantine/core";
19735
19742
 
19736
19743
  // src/mantine/blocks/form/template/TemplateConfig.tsx
19737
- import React191, { useCallback as useCallback55 } from "react";
19744
+ import React191, { useCallback as useCallback56 } from "react";
19738
19745
  import { Paper as Paper16, CloseButton as CloseButton6, Title as Title9 } from "@mantine/core";
19739
19746
 
19740
19747
  // src/mantine/blocks/form/template/GeneralTab.tsx
@@ -19819,7 +19826,7 @@ var GeneralTab12 = ({ title, description, icon, surveySchema, onTitleChange, onD
19819
19826
  // src/mantine/blocks/form/template/TemplateConfig.tsx
19820
19827
  var TemplateConfig12 = ({ editor, block }) => {
19821
19828
  const { closePanel } = usePanelStore();
19822
- const updateProp = useCallback55(
19829
+ const updateProp = useCallback56(
19823
19830
  (key, value) => {
19824
19831
  editor.updateBlock(block, {
19825
19832
  props: {
@@ -19893,12 +19900,12 @@ var FormTemplateView = ({ editor, block }) => {
19893
19900
  };
19894
19901
 
19895
19902
  // src/mantine/blocks/form/flow/FlowView.tsx
19896
- import React194, { useMemo as useMemo64, useState as useState72, useCallback as useCallback57 } from "react";
19903
+ import React194, { useMemo as useMemo64, useState as useState72, useCallback as useCallback58 } from "react";
19897
19904
  import { ActionIcon as ActionIcon31, Badge as Badge31, Group as Group65, Stack as Stack131, Text as Text107, Tooltip as Tooltip19 } from "@mantine/core";
19898
19905
  import { IconChevronRight as IconChevronRight7 } from "@tabler/icons-react";
19899
19906
 
19900
19907
  // src/mantine/blocks/form/flow/FormPanel.tsx
19901
- import React193, { useCallback as useCallback56, useEffect as useEffect56, useMemo as useMemo63, useRef as useRef15 } from "react";
19908
+ import React193, { useCallback as useCallback57, useEffect as useEffect56, useMemo as useMemo63, useRef as useRef16 } from "react";
19902
19909
  import { Alert as Alert26, Text as Text106 } from "@mantine/core";
19903
19910
  import { useDebouncedCallback as useDebouncedCallback2 } from "@mantine/hooks";
19904
19911
  import { IconAlertCircle as IconAlertCircle10 } from "@tabler/icons-react";
@@ -19923,8 +19930,8 @@ function deepEqual2(a, b) {
19923
19930
  }
19924
19931
  var FormPanel = ({ editor, block, onComplete }) => {
19925
19932
  const { closePanel } = usePanelStore();
19926
- const isUpdatingFromProp = useRef15(false);
19927
- const lastSyncedAnswers = useRef15("");
19933
+ const isUpdatingFromProp = useRef16(false);
19934
+ const lastSyncedAnswers = useRef16("");
19928
19935
  const surveySchema = useMemo63(() => {
19929
19936
  if (!block.props.surveySchema) return null;
19930
19937
  try {
@@ -19942,7 +19949,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19942
19949
  model.completeText = "Complete";
19943
19950
  return model;
19944
19951
  }, [surveySchema]);
19945
- const syncPropToSurvey = useCallback56(
19952
+ const syncPropToSurvey = useCallback57(
19946
19953
  (answersJson) => {
19947
19954
  if (!surveyModel || !answersJson || answersJson === lastSyncedAnswers.current) return;
19948
19955
  try {
@@ -19991,7 +19998,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
19991
19998
  surveyModel.onValueChanged.remove(handleValueChanged);
19992
19999
  };
19993
20000
  }, [surveyModel, syncSurveyToProp]);
19994
- const handleSurveyComplete = useCallback56(
20001
+ const handleSurveyComplete = useCallback57(
19995
20002
  (sender) => {
19996
20003
  const data = sender.data || {};
19997
20004
  const finalAnswersJson = JSON.stringify(data);
@@ -20015,7 +20022,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
20015
20022
  surveyModel.onComplete.remove(handleSurveyComplete);
20016
20023
  };
20017
20024
  }, [handleSurveyComplete, surveyModel]);
20018
- const handleClose = useCallback56(() => {
20025
+ const handleClose = useCallback57(() => {
20019
20026
  closePanel();
20020
20027
  }, [closePanel]);
20021
20028
  if (!surveySchema) {
@@ -20038,7 +20045,7 @@ var FormFlowView = ({ editor, block }) => {
20038
20045
  const [hasOpened, setHasOpened] = useState72(false);
20039
20046
  const status = block.props.status || "pending";
20040
20047
  const isCompleted = status === "completed";
20041
- const handleComplete = useCallback57(() => {
20048
+ const handleComplete = useCallback58(() => {
20042
20049
  editor.updateBlock(block, {
20043
20050
  props: {
20044
20051
  ...block.props,
@@ -20133,7 +20140,7 @@ import React199, { useMemo as useMemo65 } from "react";
20133
20140
  import { Badge as Badge32, Group as Group66, Stack as Stack132, Text as Text108 } from "@mantine/core";
20134
20141
 
20135
20142
  // src/mantine/blocks/domainCreatorSign/template/TemplateConfig.tsx
20136
- import React198, { useCallback as useCallback58 } from "react";
20143
+ import React198, { useCallback as useCallback59 } from "react";
20137
20144
 
20138
20145
  // src/mantine/blocks/domainCreatorSign/template/GeneralTab.tsx
20139
20146
  import React197, { useEffect as useEffect57, useState as useState73 } from "react";
@@ -20188,7 +20195,7 @@ var GeneralTab13 = ({ title, description, icon, onTitleChange, onDescriptionChan
20188
20195
  // src/mantine/blocks/domainCreatorSign/template/TemplateConfig.tsx
20189
20196
  var TemplateConfig13 = ({ editor, block }) => {
20190
20197
  const { closePanel } = usePanelStore();
20191
- const updateProp = useCallback58(
20198
+ const updateProp = useCallback59(
20192
20199
  (key, value) => {
20193
20200
  editor.updateBlock(block, {
20194
20201
  props: {
@@ -20247,14 +20254,14 @@ var DomainCreatorSignTemplateView = ({ editor, block }) => {
20247
20254
  };
20248
20255
 
20249
20256
  // src/mantine/blocks/domainCreatorSign/flow/FlowView.tsx
20250
- import React202, { useCallback as useCallback60, useMemo as useMemo66, useEffect as useEffect58 } from "react";
20257
+ import React202, { useCallback as useCallback61, useMemo as useMemo66, useEffect as useEffect58 } from "react";
20251
20258
  import { ActionIcon as ActionIcon32, Badge as Badge34, Group as Group69, Stack as Stack135, Text as Text111, Tooltip as Tooltip21 } from "@mantine/core";
20252
20259
  import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
20253
20260
 
20254
20261
  // src/mantine/blocks/domainCreatorSign/flow/SignPanel.tsx
20255
20262
  import { Alert as Alert27, Button as Button34, Group as Group68, Loader as Loader26, Stack as Stack134, Text as Text110 } from "@mantine/core";
20256
20263
  import { IconAlertCircle as IconAlertCircle11, IconCheck as IconCheck9 } from "@tabler/icons-react";
20257
- import React201, { useCallback as useCallback59, useState as useState75 } from "react";
20264
+ import React201, { useCallback as useCallback60, useState as useState75 } from "react";
20258
20265
 
20259
20266
  // src/mantine/blocks/domainCreatorSign/utils/buildLinkedEntityResource.ts
20260
20267
  function parseLinkedEntities2(entitiesString) {
@@ -20398,19 +20405,19 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
20398
20405
  const [flowStep, setFlowStep] = useState75(block.props.status === "completed" ? "success" : block.props.status === "error" ? "error" : "ready");
20399
20406
  const [error, setError] = useState75(block.props.errorMessage || null);
20400
20407
  const [createdEntityDid, setCreatedEntityDid] = useState75(block.props.entityDid || null);
20401
- const getDomainCardData = useCallback59(() => {
20408
+ const getDomainCardData = useCallback60(() => {
20402
20409
  try {
20403
20410
  return JSON.parse(block.props.domainCardData || "{}");
20404
20411
  } catch {
20405
20412
  return null;
20406
20413
  }
20407
20414
  }, [block.props.domainCardData]);
20408
- const getDate100YearsFromNow = useCallback59(() => {
20415
+ const getDate100YearsFromNow = useCallback60(() => {
20409
20416
  const date = /* @__PURE__ */ new Date();
20410
20417
  date.setFullYear(date.getFullYear() + 100);
20411
20418
  return date.toISOString();
20412
20419
  }, []);
20413
- const processSignAndCreate = useCallback59(async () => {
20420
+ const processSignAndCreate = useCallback60(async () => {
20414
20421
  if (!handlers) {
20415
20422
  throw new Error("Handlers not available");
20416
20423
  }
@@ -20498,7 +20505,7 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
20498
20505
  transactionHash
20499
20506
  };
20500
20507
  }, [handlers, getDomainCardData, block, editor, getDate100YearsFromNow]);
20501
- const handleSign = useCallback59(async () => {
20508
+ const handleSign = useCallback60(async () => {
20502
20509
  try {
20503
20510
  const result = await processSignAndCreate();
20504
20511
  setCreatedEntityDid(result.entityDid);
@@ -20512,7 +20519,7 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
20512
20519
  onError?.(errorMessage);
20513
20520
  }
20514
20521
  }, [processSignAndCreate, onComplete, onError]);
20515
- const handleRetry = useCallback59(() => {
20522
+ const handleRetry = useCallback60(() => {
20516
20523
  setFlowStep("ready");
20517
20524
  setError(null);
20518
20525
  editor.updateBlock(block, {
@@ -20523,10 +20530,10 @@ var SignPanel = ({ editor, block, onComplete, onError }) => {
20523
20530
  }
20524
20531
  });
20525
20532
  }, [editor, block]);
20526
- const handleClose = useCallback59(() => {
20533
+ const handleClose = useCallback60(() => {
20527
20534
  closePanel();
20528
20535
  }, [closePanel]);
20529
- const handleVisitEntity = useCallback59(() => {
20536
+ const handleVisitEntity = useCallback60(() => {
20530
20537
  const entityType = block.props.entityType || "dao";
20531
20538
  if (createdEntityDid && handlers?.redirectToEntityOverview) {
20532
20539
  handlers.redirectToEntityOverview(createdEntityDid, entityType);
@@ -20584,7 +20591,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
20584
20591
  });
20585
20592
  }
20586
20593
  }, [isDataReady, status, editor, block]);
20587
- const handleComplete = useCallback60(
20594
+ const handleComplete = useCallback61(
20588
20595
  (result) => {
20589
20596
  editor.updateBlock(block, {
20590
20597
  props: {
@@ -20597,7 +20604,7 @@ var DomainCreatorSignFlowView = ({ editor, block }) => {
20597
20604
  },
20598
20605
  [editor, block]
20599
20606
  );
20600
- const handleError = useCallback60(
20607
+ const handleError = useCallback61(
20601
20608
  (errorMessage) => {
20602
20609
  editor.updateBlock(block, {
20603
20610
  props: {
@@ -20722,7 +20729,7 @@ import React207, { useMemo as useMemo67 } from "react";
20722
20729
  import { Badge as Badge35, Group as Group70, Stack as Stack136, Text as Text112 } from "@mantine/core";
20723
20730
 
20724
20731
  // src/mantine/blocks/domainCardViewer/template/TemplateConfig.tsx
20725
- import React206, { useCallback as useCallback61 } from "react";
20732
+ import React206, { useCallback as useCallback62 } from "react";
20726
20733
  import { Paper as Paper17, CloseButton as CloseButton7, Title as Title10 } from "@mantine/core";
20727
20734
 
20728
20735
  // src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
@@ -20778,7 +20785,7 @@ var GeneralTab14 = ({ title, description, icon, onTitleChange, onDescriptionChan
20778
20785
  // src/mantine/blocks/domainCardViewer/template/TemplateConfig.tsx
20779
20786
  var TemplateConfig14 = ({ editor, block }) => {
20780
20787
  const { closePanel } = usePanelStore();
20781
- const updateProp = useCallback61(
20788
+ const updateProp = useCallback62(
20782
20789
  (key, value) => {
20783
20790
  editor.updateBlock(block, {
20784
20791
  props: {
@@ -20849,7 +20856,7 @@ var DomainCardViewerTemplateView = ({ editor, block }) => {
20849
20856
  };
20850
20857
 
20851
20858
  // src/mantine/blocks/domainCardViewer/flow/FlowView.tsx
20852
- import React209, { useMemo as useMemo69, useCallback as useCallback62, useEffect as useEffect60 } from "react";
20859
+ import React209, { useMemo as useMemo69, useCallback as useCallback63, useEffect as useEffect60 } from "react";
20853
20860
  import { ActionIcon as ActionIcon33, Badge as Badge36, Button as Button36, Group as Group71, Stack as Stack138, Text as Text114, Tooltip as Tooltip22 } from "@mantine/core";
20854
20861
  import { IconChevronRight as IconChevronRight9, IconLoader, IconTestPipe, IconTrash as IconTrash6 } from "@tabler/icons-react";
20855
20862
 
@@ -21174,7 +21181,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
21174
21181
  });
21175
21182
  }
21176
21183
  }, [isDataReady, status, editor, block]);
21177
- const handleApprove = useCallback62(() => {
21184
+ const handleApprove = useCallback63(() => {
21178
21185
  editor.updateBlock(block, {
21179
21186
  props: {
21180
21187
  ...block.props,
@@ -21185,7 +21192,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
21185
21192
  const panelId = `${DOMAIN_CARD_VIEWER_FLOW_PANEL_ID}-${block.id}`;
21186
21193
  const panelContent = useMemo69(() => /* @__PURE__ */ React209.createElement(ViewerPanel, { editor, block, onApprove: handleApprove }), [editor, block, handleApprove]);
21187
21194
  const { open } = usePanel(panelId, panelContent);
21188
- const handleInjectDummyData = useCallback62(
21195
+ const handleInjectDummyData = useCallback63(
21189
21196
  (e) => {
21190
21197
  e.stopPropagation();
21191
21198
  editor.updateBlock(block, {
@@ -21201,7 +21208,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
21201
21208
  },
21202
21209
  [editor, block]
21203
21210
  );
21204
- const handleSetLoading = useCallback62(
21211
+ const handleSetLoading = useCallback63(
21205
21212
  (e) => {
21206
21213
  e.stopPropagation();
21207
21214
  editor.updateBlock(block, {
@@ -21214,7 +21221,7 @@ var DomainCardViewerFlowView = ({ editor, block }) => {
21214
21221
  },
21215
21222
  [editor, block]
21216
21223
  );
21217
- const handleClearData = useCallback62(
21224
+ const handleClearData = useCallback63(
21218
21225
  (e) => {
21219
21226
  e.stopPropagation();
21220
21227
  editor.updateBlock(block, {
@@ -21317,7 +21324,7 @@ import React214, { useMemo as useMemo70 } from "react";
21317
21324
  import { Badge as Badge37, Group as Group72, Stack as Stack140, Text as Text116 } from "@mantine/core";
21318
21325
 
21319
21326
  // src/mantine/blocks/governanceGroup/template/TemplateConfig.tsx
21320
- import React213, { useCallback as useCallback63 } from "react";
21327
+ import React213, { useCallback as useCallback64 } from "react";
21321
21328
 
21322
21329
  // src/mantine/blocks/governanceGroup/template/GeneralTab.tsx
21323
21330
  import React212, { useEffect as useEffect61, useState as useState77 } from "react";
@@ -22153,7 +22160,7 @@ var getSurveyForGroupType = (groupType) => {
22153
22160
  // src/mantine/blocks/governanceGroup/template/TemplateConfig.tsx
22154
22161
  var TemplateConfig15 = ({ editor, block }) => {
22155
22162
  const { closePanel } = usePanelStore();
22156
- const updateProp = useCallback63(
22163
+ const updateProp = useCallback64(
22157
22164
  (key, value) => {
22158
22165
  editor.updateBlock(block, {
22159
22166
  props: {
@@ -22164,7 +22171,7 @@ var TemplateConfig15 = ({ editor, block }) => {
22164
22171
  },
22165
22172
  [editor, block]
22166
22173
  );
22167
- const handleGroupTypeChange = useCallback63(
22174
+ const handleGroupTypeChange = useCallback64(
22168
22175
  (groupType) => {
22169
22176
  const surveySchema = getSurveyForGroupType(groupType);
22170
22177
  editor.updateBlock(block, {
@@ -22234,12 +22241,12 @@ var GovernanceGroupTemplateView = ({ editor, block }) => {
22234
22241
  };
22235
22242
 
22236
22243
  // src/mantine/blocks/governanceGroup/flow/FlowView.tsx
22237
- import React216, { useCallback as useCallback65, useEffect as useEffect63, useMemo as useMemo72, useRef as useRef17, useState as useState79 } from "react";
22244
+ import React216, { useCallback as useCallback66, useEffect as useEffect63, useMemo as useMemo72, useRef as useRef18, useState as useState79 } from "react";
22238
22245
  import { ActionIcon as ActionIcon34, Badge as Badge38, Group as Group74, Stack as Stack142, Text as Text118, Tooltip as Tooltip23 } from "@mantine/core";
22239
22246
  import { IconChevronRight as IconChevronRight10 } from "@tabler/icons-react";
22240
22247
 
22241
22248
  // src/mantine/blocks/governanceGroup/flow/GovernanceGroupPanel.tsx
22242
- import React215, { useCallback as useCallback64, useEffect as useEffect62, useMemo as useMemo71, useRef as useRef16, useState as useState78 } from "react";
22249
+ import React215, { useCallback as useCallback65, useEffect as useEffect62, useMemo as useMemo71, useRef as useRef17, useState as useState78 } from "react";
22243
22250
  import { Alert as Alert29, Button as Button37, Card as Card20, Group as Group73, Loader as Loader28, SimpleGrid as SimpleGrid3, Stack as Stack141, Text as Text117, ThemeIcon as ThemeIcon4 } from "@mantine/core";
22244
22251
  import { useDebouncedCallback as useDebouncedCallback3 } from "@mantine/hooks";
22245
22252
  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";
@@ -22284,8 +22291,8 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22284
22291
  const [error, setError] = useState78(null);
22285
22292
  const [createdCoreAddress, setCreatedCoreAddress] = useState78(existingCoreAddress || null);
22286
22293
  const [createdGroupAddress, setCreatedGroupAddress] = useState78(block.props.groupAddress || null);
22287
- const isUpdatingFromProp = useRef16(false);
22288
- const lastSyncedAnswers = useRef16("");
22294
+ const isUpdatingFromProp = useRef17(false);
22295
+ const lastSyncedAnswers = useRef17("");
22289
22296
  const surveyModel = useMemo71(() => {
22290
22297
  if (!selectedGroupType) return null;
22291
22298
  const surveySchema = getSurveyForGroupType(selectedGroupType);
@@ -22296,7 +22303,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22296
22303
  model.questionsOnPageMode = "singlePage";
22297
22304
  return model;
22298
22305
  }, [selectedGroupType]);
22299
- const syncPropToSurvey = useCallback64(
22306
+ const syncPropToSurvey = useCallback65(
22300
22307
  (answersJson) => {
22301
22308
  if (!answersJson || answersJson === lastSyncedAnswers.current || !surveyModel) return;
22302
22309
  try {
@@ -22359,7 +22366,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22359
22366
  lastSyncedAnswers.current = "";
22360
22367
  setFlowStep("survey");
22361
22368
  };
22362
- const processGroupCreation = useCallback64(
22369
+ const processGroupCreation = useCallback65(
22363
22370
  async (data) => {
22364
22371
  if (!handlers) {
22365
22372
  throw new Error("Handlers not available");
@@ -22381,7 +22388,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22381
22388
  },
22382
22389
  [handlers, selectedGroupType]
22383
22390
  );
22384
- const handleSurveyComplete = useCallback64(
22391
+ const handleSurveyComplete = useCallback65(
22385
22392
  async (sender) => {
22386
22393
  const data = sender.data || {};
22387
22394
  try {
@@ -22425,12 +22432,12 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22425
22432
  surveyModel.onComplete.remove(handleSurveyComplete);
22426
22433
  };
22427
22434
  }, [handleSurveyComplete, surveyModel]);
22428
- const handleRetry = useCallback64(() => {
22435
+ const handleRetry = useCallback65(() => {
22429
22436
  setFlowStep("survey");
22430
22437
  setError(null);
22431
22438
  surveyModel?.clear();
22432
22439
  }, [surveyModel]);
22433
- const handleBackToTypeSelection = useCallback64(() => {
22440
+ const handleBackToTypeSelection = useCallback65(() => {
22434
22441
  setSelectedGroupType(null);
22435
22442
  setFlowStep("typeSelection");
22436
22443
  editor.updateBlock(block, {
@@ -22442,7 +22449,7 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
22442
22449
  }
22443
22450
  });
22444
22451
  }, [editor, block]);
22445
- const handleClose = useCallback64(() => {
22452
+ const handleClose = useCallback65(() => {
22446
22453
  closePanel();
22447
22454
  }, [closePanel]);
22448
22455
  if (flowStep === "typeSelection") {
@@ -22489,8 +22496,8 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22489
22496
  const [submissionStatus, setSubmissionStatus] = useState79("idle");
22490
22497
  const lastSubmission = block.props.lastSubmission ? JSON.parse(block.props.lastSubmission) : null;
22491
22498
  const hasExistingSubmission = lastSubmission?.coreAddress;
22492
- const editorRef = useRef17(editor);
22493
- const blockRef = useRef17(block);
22499
+ const editorRef = useRef18(editor);
22500
+ const blockRef = useRef18(block);
22494
22501
  useEffect63(() => {
22495
22502
  editorRef.current = editor;
22496
22503
  blockRef.current = block;
@@ -22513,8 +22520,8 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22513
22520
  // eslint-disable-next-line react-hooks/exhaustive-deps
22514
22521
  []
22515
22522
  );
22516
- const handleCompleteRef = useRef17();
22517
- const handleComplete = useCallback65((data) => {
22523
+ const handleCompleteRef = useRef18();
22524
+ const handleComplete = useCallback66((data) => {
22518
22525
  const currentEditor = editorRef.current;
22519
22526
  const currentBlock = blockRef.current;
22520
22527
  currentEditor.updateBlock(currentBlock, {
@@ -22537,7 +22544,7 @@ var GovernanceGroupFlowView = ({ editor, block }) => {
22537
22544
  useEffect63(() => {
22538
22545
  handleCompleteRef.current = handleComplete;
22539
22546
  });
22540
- const stableHandleComplete = useCallback65(
22547
+ const stableHandleComplete = useCallback66(
22541
22548
  (data) => {
22542
22549
  handleCompleteRef.current?.(data);
22543
22550
  },
@@ -22908,7 +22915,7 @@ import React225, { useMemo as useMemo75 } from "react";
22908
22915
  import { Badge as Badge40, Group as Group78, Stack as Stack147, Text as Text122, Tooltip as Tooltip25 } from "@mantine/core";
22909
22916
 
22910
22917
  // src/mantine/blocks/flowLink/flow/FlowLinkPanel.tsx
22911
- import React224, { useState as useState81, useEffect as useEffect65, useCallback as useCallback66 } from "react";
22918
+ import React224, { useState as useState81, useEffect as useEffect65, useCallback as useCallback67 } from "react";
22912
22919
  import { Stack as Stack146, Text as Text121, Card as Card22, Group as Group77, Badge as Badge39, ActionIcon as ActionIcon36, Loader as Loader30, Tooltip as Tooltip24 } from "@mantine/core";
22913
22920
  import { IconRefresh as IconRefresh7, IconCheck as IconCheck12, IconClock as IconClock3, IconCircleDashed as IconCircleDashed4 } from "@tabler/icons-react";
22914
22921
  var FlowLinkPanel = ({ block }) => {
@@ -22916,7 +22923,7 @@ var FlowLinkPanel = ({ block }) => {
22916
22923
  const handlers = useBlocknoteHandlers();
22917
22924
  const links = safeParseJSONArray(block.props.links).sort((a, b) => a.position - b.position);
22918
22925
  const [linksWithStatus, setLinksWithStatus] = useState81(links.map((link) => ({ ...link })));
22919
- const fetchStatuses = useCallback66(async () => {
22926
+ const fetchStatuses = useCallback67(async () => {
22920
22927
  if (!handlers.getFlowStatus) {
22921
22928
  return;
22922
22929
  }
@@ -23234,7 +23241,7 @@ blockRegistry.register({
23234
23241
  });
23235
23242
 
23236
23243
  // src/mantine/blocks/hooks/useBlockDependencies.ts
23237
- import { useMemo as useMemo76, useEffect as useEffect66, useState as useState82, useCallback as useCallback67 } from "react";
23244
+ import { useMemo as useMemo76, useEffect as useEffect66, useState as useState82, useCallback as useCallback68 } from "react";
23238
23245
 
23239
23246
  // src/mantine/blocks/hooks/useDependsOn.ts
23240
23247
  import { useMemo as useMemo77 } from "react";
@@ -23804,14 +23811,14 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
23804
23811
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
23805
23812
 
23806
23813
  // src/core/hooks/useMatrixProvider.ts
23807
- import { useEffect as useEffect67, useState as useState83, useRef as useRef18, useCallback as useCallback68, useMemo as useMemo78 } from "react";
23814
+ import { useEffect as useEffect67, useState as useState83, useRef as useRef19, useCallback as useCallback69, useMemo as useMemo78 } from "react";
23808
23815
  import { MatrixProvider } from "@ixo/matrix-crdt";
23809
23816
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23810
23817
  const [matrixProvider, setProvider] = useState83(null);
23811
23818
  const [status, setStatus] = useState83("disconnected");
23812
- const isMountedRef = useRef18(true);
23813
- const providerRef = useRef18(null);
23814
- const retryTimeoutRef = useRef18(null);
23819
+ const isMountedRef = useRef19(true);
23820
+ const providerRef = useRef19(null);
23821
+ const retryTimeoutRef = useRef19(null);
23815
23822
  const providerOptions = useMemo78(
23816
23823
  () => ({
23817
23824
  translator: {
@@ -23825,22 +23832,22 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
23825
23832
  }),
23826
23833
  []
23827
23834
  );
23828
- const handleDocumentAvailable = useCallback68(() => {
23835
+ const handleDocumentAvailable = useCallback69(() => {
23829
23836
  if (isMountedRef.current) {
23830
23837
  setStatus("connected");
23831
23838
  }
23832
23839
  }, []);
23833
- const handleDocumentUnavailable = useCallback68(() => {
23840
+ const handleDocumentUnavailable = useCallback69(() => {
23834
23841
  if (isMountedRef.current) {
23835
23842
  setStatus("failed");
23836
23843
  }
23837
23844
  }, []);
23838
- const handleCanWriteChanged = useCallback68(() => {
23845
+ const handleCanWriteChanged = useCallback69(() => {
23839
23846
  if (isMountedRef.current && providerRef.current) {
23840
23847
  setStatus(providerRef.current.canWrite ? "connected" : "failed");
23841
23848
  }
23842
23849
  }, []);
23843
- const initProvider = useCallback68(async () => {
23850
+ const initProvider = useCallback69(async () => {
23844
23851
  if (!isMountedRef.current) return;
23845
23852
  if (retryTimeoutRef.current) {
23846
23853
  clearTimeout(retryTimeoutRef.current);
@@ -24613,7 +24620,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
24613
24620
  }
24614
24621
 
24615
24622
  // src/mantine/components/CoverImage.tsx
24616
- import React231, { useState as useState86, useRef as useRef19, useEffect as useEffect70 } from "react";
24623
+ import React231, { useState as useState86, useRef as useRef20, useEffect as useEffect70 } from "react";
24617
24624
  import { Box as Box43, Group as Group80 } from "@mantine/core";
24618
24625
 
24619
24626
  // src/core/lib/imageTransform.ts
@@ -24802,8 +24809,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
24802
24809
  const [isHovering, setIsHovering] = useState86(false);
24803
24810
  const [isRepositioning, setIsRepositioning] = useState86(false);
24804
24811
  const [coverPosition, setCoverPosition] = useState86(50);
24805
- const coverFileInputRef = useRef19(null);
24806
- const logoFileInputRef = useRef19(null);
24812
+ const coverFileInputRef = useRef20(null);
24813
+ const logoFileInputRef = useRef20(null);
24807
24814
  const [opened, { open, close }] = useDisclosure5(false);
24808
24815
  const [metadata, setMetadata] = useState86(() => editor?.getPageMetadata?.() || null);
24809
24816
  useEffect70(() => {
@@ -25081,7 +25088,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
25081
25088
  }
25082
25089
 
25083
25090
  // src/mantine/components/PageHeader.tsx
25084
- import React232, { useState as useState87, useRef as useRef20, useEffect as useEffect71 } from "react";
25091
+ import React232, { useState as useState87, useRef as useRef21, useEffect as useEffect71 } from "react";
25085
25092
  function PageHeader({
25086
25093
  title = "New page",
25087
25094
  icon,
@@ -25095,8 +25102,8 @@ function PageHeader({
25095
25102
  }) {
25096
25103
  const [isMenuOpen, setIsMenuOpen] = useState87(false);
25097
25104
  const [isPrivacyOpen, setIsPrivacyOpen] = useState87(false);
25098
- const menuRef = useRef20(null);
25099
- const privacyRef = useRef20(null);
25105
+ const menuRef = useRef21(null);
25106
+ const privacyRef = useRef21(null);
25100
25107
  useEffect71(() => {
25101
25108
  function handleClickOutside(event) {
25102
25109
  if (menuRef.current && !menuRef.current.contains(event.target)) {
@@ -25295,7 +25302,7 @@ var styles = {
25295
25302
  };
25296
25303
 
25297
25304
  // src/mantine/components/ExternalDropZone.tsx
25298
- import React233, { useCallback as useCallback69, useEffect as useEffect72, useRef as useRef21, useState as useState88 } from "react";
25305
+ import React233, { useCallback as useCallback70, useEffect as useEffect72, useRef as useRef22, useState as useState88 } from "react";
25299
25306
  import { Box as Box44 } from "@mantine/core";
25300
25307
  var SCROLL_ZONE_SIZE = 80;
25301
25308
  var SCROLL_SPEED = 12;
@@ -25308,20 +25315,20 @@ var ExternalDropZone = ({
25308
25315
  onPlacementCancel,
25309
25316
  children
25310
25317
  }) => {
25311
- const containerRef = useRef21(null);
25318
+ const containerRef = useRef22(null);
25312
25319
  const [isValidDrag, setIsValidDrag] = useState88(false);
25313
25320
  const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState88(false);
25314
25321
  const [indicatorStyle, setIndicatorStyle] = useState88({});
25315
- const dropPositionRef = useRef21(null);
25316
- const scrollAnimationRef = useRef21(null);
25317
- const scrollDirectionRef = useRef21(null);
25318
- const scrollContainerRef = useRef21(null);
25319
- const getBlockElements = useCallback69(() => {
25322
+ const dropPositionRef = useRef22(null);
25323
+ const scrollAnimationRef = useRef22(null);
25324
+ const scrollDirectionRef = useRef22(null);
25325
+ const scrollContainerRef = useRef22(null);
25326
+ const getBlockElements = useCallback70(() => {
25320
25327
  if (!containerRef.current) return [];
25321
25328
  const blocks = containerRef.current.querySelectorAll('[data-node-type="blockContainer"]');
25322
25329
  return Array.from(blocks);
25323
25330
  }, []);
25324
- const getScrollContainer = useCallback69(() => {
25331
+ const getScrollContainer = useCallback70(() => {
25325
25332
  if (scrollContainerRef.current) return scrollContainerRef.current;
25326
25333
  let element = containerRef.current;
25327
25334
  while (element) {
@@ -25336,7 +25343,7 @@ var ExternalDropZone = ({
25336
25343
  scrollContainerRef.current = window;
25337
25344
  return window;
25338
25345
  }, []);
25339
- const performScroll = useCallback69(() => {
25346
+ const performScroll = useCallback70(() => {
25340
25347
  const container = getScrollContainer();
25341
25348
  const direction = scrollDirectionRef.current;
25342
25349
  if (!direction) {
@@ -25351,7 +25358,7 @@ var ExternalDropZone = ({
25351
25358
  }
25352
25359
  scrollAnimationRef.current = requestAnimationFrame(performScroll);
25353
25360
  }, [getScrollContainer]);
25354
- const startAutoScroll = useCallback69(
25361
+ const startAutoScroll = useCallback70(
25355
25362
  (direction) => {
25356
25363
  if (scrollDirectionRef.current === direction) return;
25357
25364
  scrollDirectionRef.current = direction;
@@ -25361,14 +25368,14 @@ var ExternalDropZone = ({
25361
25368
  },
25362
25369
  [performScroll]
25363
25370
  );
25364
- const stopAutoScroll = useCallback69(() => {
25371
+ const stopAutoScroll = useCallback70(() => {
25365
25372
  scrollDirectionRef.current = null;
25366
25373
  if (scrollAnimationRef.current) {
25367
25374
  cancelAnimationFrame(scrollAnimationRef.current);
25368
25375
  scrollAnimationRef.current = null;
25369
25376
  }
25370
25377
  }, []);
25371
- const checkAutoScroll = useCallback69(
25378
+ const checkAutoScroll = useCallback70(
25372
25379
  (clientY) => {
25373
25380
  const container = getScrollContainer();
25374
25381
  let containerTop;
@@ -25391,7 +25398,7 @@ var ExternalDropZone = ({
25391
25398
  },
25392
25399
  [getScrollContainer, startAutoScroll, stopAutoScroll]
25393
25400
  );
25394
- const findDropPosition = useCallback69(
25401
+ const findDropPosition = useCallback70(
25395
25402
  (clientY) => {
25396
25403
  const blocks = getBlockElements();
25397
25404
  if (blocks.length === 0 || !editor?.document) return null;
@@ -25424,7 +25431,7 @@ var ExternalDropZone = ({
25424
25431
  },
25425
25432
  [getBlockElements, editor]
25426
25433
  );
25427
- const handleDragOver = useCallback69(
25434
+ const handleDragOver = useCallback70(
25428
25435
  (e) => {
25429
25436
  if (!e.dataTransfer.types.includes(acceptedType)) return;
25430
25437
  e.preventDefault();
@@ -25447,7 +25454,7 @@ var ExternalDropZone = ({
25447
25454
  },
25448
25455
  [acceptedType, findDropPosition, checkAutoScroll]
25449
25456
  );
25450
- const handleDragLeave = useCallback69(
25457
+ const handleDragLeave = useCallback70(
25451
25458
  (e) => {
25452
25459
  if (containerRef.current && !containerRef.current.contains(e.relatedTarget)) {
25453
25460
  setIsValidDrag(false);
@@ -25457,7 +25464,7 @@ var ExternalDropZone = ({
25457
25464
  },
25458
25465
  [stopAutoScroll]
25459
25466
  );
25460
- const handleDrop = useCallback69(
25467
+ const handleDrop = useCallback70(
25461
25468
  (e) => {
25462
25469
  e.preventDefault();
25463
25470
  e.stopPropagation();
@@ -25480,7 +25487,7 @@ var ExternalDropZone = ({
25480
25487
  window.addEventListener("dragend", handleGlobalDragEnd);
25481
25488
  return () => window.removeEventListener("dragend", handleGlobalDragEnd);
25482
25489
  }, [stopAutoScroll]);
25483
- const handleOverlayMouseMove = useCallback69(
25490
+ const handleOverlayMouseMove = useCallback70(
25484
25491
  (e) => {
25485
25492
  setIsHoveringInPlacementMode(true);
25486
25493
  checkAutoScroll(e.clientY);
@@ -25499,12 +25506,12 @@ var ExternalDropZone = ({
25499
25506
  },
25500
25507
  [findDropPosition, checkAutoScroll]
25501
25508
  );
25502
- const handleOverlayMouseLeave = useCallback69(() => {
25509
+ const handleOverlayMouseLeave = useCallback70(() => {
25503
25510
  setIsHoveringInPlacementMode(false);
25504
25511
  dropPositionRef.current = null;
25505
25512
  stopAutoScroll();
25506
25513
  }, [stopAutoScroll]);
25507
- const handleOverlayClick = useCallback69(
25514
+ const handleOverlayClick = useCallback70(
25508
25515
  (e) => {
25509
25516
  e.preventDefault();
25510
25517
  e.stopPropagation();
@@ -25518,7 +25525,7 @@ var ExternalDropZone = ({
25518
25525
  },
25519
25526
  [onDrop, stopAutoScroll]
25520
25527
  );
25521
- const handleOverlayWheel = useCallback69(
25528
+ const handleOverlayWheel = useCallback70(
25522
25529
  (e) => {
25523
25530
  const container = getScrollContainer();
25524
25531
  if (container === window) {
@@ -25621,7 +25628,7 @@ var ExternalDropZone = ({
25621
25628
  };
25622
25629
 
25623
25630
  // src/mantine/IxoEditor.tsx
25624
- import React235, { useState as useState89, useEffect as useEffect73, useCallback as useCallback70 } from "react";
25631
+ import React235, { useState as useState89, useEffect as useEffect73, useCallback as useCallback71 } from "react";
25625
25632
  import { getDefaultReactSlashMenuItems, SuggestionMenuController } from "@blocknote/react";
25626
25633
  import { BlockNoteView } from "@blocknote/mantine";
25627
25634
  import { filterSuggestionItems } from "@blocknote/core";
@@ -25716,7 +25723,7 @@ function IxoEditorContent({
25716
25723
  } catch {
25717
25724
  }
25718
25725
  }, [editor]);
25719
- const handlePrivacyChange = useCallback70(
25726
+ const handlePrivacyChange = useCallback71(
25720
25727
  async (makePrivate) => {
25721
25728
  const matrixClient = editor.getMatrixClient?.();
25722
25729
  const roomId = editor.getRoomId?.();
@@ -26066,7 +26073,7 @@ var FlowPermissionsPanel = ({
26066
26073
  };
26067
26074
 
26068
26075
  // src/mantine/components/GrantPermissionModal.tsx
26069
- import React238, { useState as useState92, useCallback as useCallback71 } from "react";
26076
+ import React238, { useState as useState92, useCallback as useCallback72 } from "react";
26070
26077
  import {
26071
26078
  Modal as Modal4,
26072
26079
  Stack as Stack151,
@@ -26112,7 +26119,7 @@ var GrantPermissionModal = ({
26112
26119
  const [pin, setPin] = useState92("");
26113
26120
  const [loading, setLoading] = useState92(false);
26114
26121
  const [error, setError] = useState92(null);
26115
- const handleSearch = useCallback71(async () => {
26122
+ const handleSearch = useCallback72(async () => {
26116
26123
  if (searchQuery.length < 2) return;
26117
26124
  setSearching(true);
26118
26125
  try {
@@ -26409,4 +26416,4 @@ export {
26409
26416
  ixoGraphQLClient,
26410
26417
  getEntity
26411
26418
  };
26412
- //# sourceMappingURL=chunk-XVUUV4EK.mjs.map
26419
+ //# sourceMappingURL=chunk-443WXWOY.mjs.map