@ixo/editor 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1563,13 +1563,13 @@ var CheckboxBlockSpec = createReactBlockSpec(
1563
1563
  );
1564
1564
 
1565
1565
  // src/mantine/blocks/list/ListBlock.tsx
1566
- import React36, { useState as useState6, useEffect as useEffect6, useMemo as useMemo6, useCallback as useCallback8 } from "react";
1566
+ import React37, { useState as useState6, useEffect as useEffect6, useMemo as useMemo6, useCallback as useCallback8 } from "react";
1567
1567
  import { createReactBlockSpec as createReactBlockSpec2 } from "@blocknote/react";
1568
- import { Group as Group8, Stack as Stack23, Text as Text23, Button as Button8, ActionIcon as ActionIcon3, Alert as Alert4, Loader as Loader2, Center as Center2, Flex as Flex13 } from "@mantine/core";
1568
+ import { Group as Group8, Stack as Stack24, Text as Text24, Button as Button8, ActionIcon as ActionIcon3, Alert as Alert4, Loader as Loader2, Center as Center2, Flex as Flex14 } from "@mantine/core";
1569
1569
 
1570
1570
  // src/mantine/blocks/list/modal/ListConfigModal.tsx
1571
- import React33, { useState as useState5 } from "react";
1572
- import { Modal, Group as Group7, Box as Box13 } from "@mantine/core";
1571
+ import React34, { useState as useState5 } from "react";
1572
+ import { Modal, Group as Group7, Box as Box14 } from "@mantine/core";
1573
1573
 
1574
1574
  // src/mantine/blocks/list/modal/ListTypeSelectionStep.tsx
1575
1575
  import React14 from "react";
@@ -1589,7 +1589,7 @@ var linkedResourcesConfigFields = [
1589
1589
  description: "The DID identifier to fetch linked resources from",
1590
1590
  type: "text",
1591
1591
  placeholder: "did:ixo:entity:example123",
1592
- required: true
1592
+ required: false
1593
1593
  }
1594
1594
  ];
1595
1595
  var linkedResourcesHandlerKey = "getEntity";
@@ -1906,6 +1906,43 @@ var validatorsFilterFields = [
1906
1906
  ];
1907
1907
  var validatorsHandlerKey = "getValidators";
1908
1908
 
1909
+ // src/mantine/blocks/list/dao_members/config.ts
1910
+ var daoMembersMetadata = {
1911
+ id: "dao_members",
1912
+ name: "Dao Members",
1913
+ description: "Display Dao members",
1914
+ icon: "\u{1F464}"
1915
+ };
1916
+ var daoMembersConfigFields = [
1917
+ {
1918
+ key: "address",
1919
+ label: "Wallet Address",
1920
+ description: "Your wallet address to determine your membership",
1921
+ type: "text",
1922
+ required: false
1923
+ },
1924
+ {
1925
+ key: "groupIds",
1926
+ label: "Group IDs",
1927
+ description: "The IDs of the DAO groups to fetch members from",
1928
+ type: "select",
1929
+ required: false
1930
+ },
1931
+ {
1932
+ key: "withBalance",
1933
+ label: "With Balance",
1934
+ description: "Whether to include the balance of the members",
1935
+ type: "switch",
1936
+ required: false
1937
+ }
1938
+ ];
1939
+ var daoMembersSortFields = [
1940
+ { key: "username", label: "Username", type: "string" },
1941
+ { key: "percentage", label: "Share %", type: "string" },
1942
+ { key: "role", label: "Role", type: "string" }
1943
+ ];
1944
+ var daoMembersHandlerKey = "getDaoMembers";
1945
+
1909
1946
  // src/mantine/blocks/list/registry.ts
1910
1947
  var listTypeRegistry = {
1911
1948
  linked_resources: {
@@ -1984,6 +2021,13 @@ var listTypeRegistry = {
1984
2021
  sortFields: validatorsSortFields,
1985
2022
  filterFields: validatorsFilterFields,
1986
2023
  handlerKey: validatorsHandlerKey
2024
+ },
2025
+ dao_members: {
2026
+ metadata: daoMembersMetadata,
2027
+ configFields: daoMembersConfigFields,
2028
+ sortFields: daoMembersSortFields,
2029
+ filterFields: [],
2030
+ handlerKey: daoMembersHandlerKey
1987
2031
  }
1988
2032
  };
1989
2033
  var getAllListTypes = () => {
@@ -2041,7 +2085,7 @@ var ListConfigurationStep = ({ listType, config, onConfigChange, onPrev, onNext,
2041
2085
  const handleAutoFill = async () => {
2042
2086
  if (listType === "transactions" && handlers?.getCurrentUser) {
2043
2087
  try {
2044
- const user = await handlers.getCurrentUser();
2088
+ const user = handlers.getCurrentUser();
2045
2089
  onConfigChange("address", user.address);
2046
2090
  } catch (error) {
2047
2091
  console.error("Failed to get current user:", error);
@@ -2090,8 +2134,8 @@ var ListConfigurationStep = ({ listType, config, onConfigChange, onPrev, onNext,
2090
2134
  };
2091
2135
 
2092
2136
  // src/mantine/blocks/list/modal/ListPreviewStep.tsx
2093
- import React31, { useState as useState4, useEffect as useEffect5 } from "react";
2094
- import { Stack as Stack21, Text as Text19, Button as Button6, Alert as Alert3, Loader, Center, Group as Group6 } from "@mantine/core";
2137
+ import React32, { useState as useState4, useEffect as useEffect5 } from "react";
2138
+ import { Stack as Stack22, Text as Text20, Button as Button6, Alert as Alert3, Loader, Center, Group as Group6 } from "@mantine/core";
2095
2139
 
2096
2140
  // src/mantine/blocks/list/linked_resources/LinkedResourcesList.tsx
2097
2141
  import React19 from "react";
@@ -2370,6 +2414,24 @@ function ListPagination({ page, setPage, totalPages }) {
2370
2414
  // src/core/constants.ts
2371
2415
  var DEFAULT_PAGE_SIZE = 5;
2372
2416
 
2417
+ // src/mantine/blocks/list/dao_members/MembersList.tsx
2418
+ import React31 from "react";
2419
+ import { Text as Text19, Box as Box13, Image as Image10, Stack as Stack21, Flex as Flex13 } from "@mantine/core";
2420
+ var DaoMembersList = ({ items, mods, isItemChecked, onItemCheck }) => {
2421
+ if (!items || items.length === 0) {
2422
+ return /* @__PURE__ */ React31.createElement(Text19, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No members found");
2423
+ }
2424
+ const rows = items.map((member) => /* @__PURE__ */ React31.createElement(ListItemContainer, { key: member.did }, /* @__PURE__ */ React31.createElement(Flex13, { align: "center", gap: "sm" }, /* @__PURE__ */ React31.createElement(Image10, { radius: 16, w: 32, h: 32, src: member.icon }), /* @__PURE__ */ React31.createElement(Stack21, { gap: 0 }, /* @__PURE__ */ React31.createElement(Text19, { size: "sm", fw: 500 }, member.username || "Unknown User"), /* @__PURE__ */ React31.createElement(Text19, { size: "xs", c: "dimmed", lineClamp: 1 }, member.address || "No address"))), /* @__PURE__ */ React31.createElement(Flex13, { align: "center", gap: "md" }, /* @__PURE__ */ React31.createElement(Stack21, { ta: "right", gap: 0 }, /* @__PURE__ */ React31.createElement(Text19, { size: "sm", fw: 500, c: "blue" }, member.percentage || "0%"), /* @__PURE__ */ React31.createElement(Text19, { size: "xs", c: "dimmed", tt: "capitalize" }, member.role || "member")), mods && /* @__PURE__ */ React31.createElement(
2425
+ ListItemCheckbox,
2426
+ {
2427
+ ariaLabel: `Select member ${member.username || member.did}`,
2428
+ checked: isItemChecked?.(member.did) || false,
2429
+ onCheck: (checked) => onItemCheck?.(member.did, checked)
2430
+ }
2431
+ ))));
2432
+ return /* @__PURE__ */ React31.createElement(Box13, { flex: 1 }, /* @__PURE__ */ React31.createElement(Stack21, { gap: "xs" }, rows));
2433
+ };
2434
+
2373
2435
  // src/mantine/blocks/list/modal/ListPreviewStep.tsx
2374
2436
  var ListPreviewStep = ({ listType, config, onAddToBlock, onPrev }) => {
2375
2437
  const [data, setData] = useState4(null);
@@ -2385,15 +2447,20 @@ var ListPreviewStep = ({ listType, config, onAddToBlock, onPrev }) => {
2385
2447
  setError(null);
2386
2448
  try {
2387
2449
  let result;
2450
+ let did;
2451
+ let userAddress;
2452
+ let groupIds;
2388
2453
  switch (listType) {
2389
2454
  case "linked_resources":
2390
- if (!config.did) throw new Error("DID is required");
2391
- result = await handlers.getEntity(config.did);
2455
+ did = handlers.getEntityDid();
2456
+ if (!did && !config.did) throw new Error("DID is required");
2457
+ result = await handlers.getEntity(did || config.did);
2392
2458
  setData({ items: result.linkedResource });
2393
2459
  break;
2394
2460
  case "assets":
2395
- if (!config.collectionDid) throw new Error("Collection DID is required");
2396
- result = await handlers.getAssets(config.collectionDid, page);
2461
+ did = handlers.getEntityDid();
2462
+ if (!did && !config.collectionDid) throw new Error("Collection DID is required");
2463
+ result = await handlers.getAssets(did || config.collectionDid, page);
2397
2464
  setData({ items: result.data });
2398
2465
  break;
2399
2466
  case "transactions":
@@ -2403,33 +2470,39 @@ var ListPreviewStep = ({ listType, config, onAddToBlock, onPrev }) => {
2403
2470
  setData({ items: result.data });
2404
2471
  break;
2405
2472
  case "collections":
2406
- if (!config.relayedNodeDid) throw new Error("Relayer is required");
2407
- result = await handlers.getCollections(config.relayedNodeDid, page);
2473
+ did = handlers.getEntityDid();
2474
+ if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
2475
+ result = await handlers.getCollections(did || config.relayedNodeDid, page);
2408
2476
  setData({ items: result.data });
2409
2477
  break;
2410
2478
  case "investments":
2411
- if (!config.relayedNodeDid) throw new Error("Relayer is required");
2412
- result = await handlers.getInvestments(config.relayedNodeDid, page);
2479
+ did = handlers.getEntityDid();
2480
+ if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
2481
+ result = await handlers.getInvestments(did || config.relayedNodeDid, page);
2413
2482
  setData({ items: result.data });
2414
2483
  break;
2415
2484
  case "oracles":
2416
- if (!config.relayedNodeDid) throw new Error("Relayer is required");
2417
- result = await handlers.getOracles(config.relayedNodeDid, page);
2485
+ did = handlers.getEntityDid();
2486
+ if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
2487
+ result = await handlers.getOracles(did || config.relayedNodeDid, page);
2418
2488
  setData({ items: result.data });
2419
2489
  break;
2420
2490
  case "pods":
2421
- if (!config.relayedNodeDid) throw new Error("Relayer is required");
2422
- result = await handlers.getPODs(config.relayedNodeDid, page);
2491
+ did = handlers.getEntityDid();
2492
+ if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
2493
+ result = await handlers.getPODs(did || config.relayedNodeDid, page);
2423
2494
  setData({ items: result.data });
2424
2495
  break;
2425
2496
  case "proposals":
2426
- if (!config.relayedNodeDid) throw new Error("Relayer is required");
2427
- result = await handlers.getProposals(config.relayedNodeDid, page);
2497
+ did = handlers.getEntityDid();
2498
+ if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
2499
+ result = await handlers.getProposals(did || config.relayedNodeDid, page);
2428
2500
  setData({ items: result.data });
2429
2501
  break;
2430
2502
  case "requests":
2431
- if (!config.relayedNodeDid) throw new Error("Relayer is required");
2432
- result = await handlers.getRequests(config.relayedNodeDid, page);
2503
+ did = handlers.getEntityDid();
2504
+ if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
2505
+ result = await handlers.getRequests(did || config.relayedNodeDid, page);
2433
2506
  setData({ items: result.data });
2434
2507
  break;
2435
2508
  case "group_members":
@@ -2439,8 +2512,17 @@ var ListPreviewStep = ({ listType, config, onAddToBlock, onPrev }) => {
2439
2512
  setData({ items: result.data });
2440
2513
  break;
2441
2514
  case "validators":
2442
- if (!config.relayedNodeDid) throw new Error("Relayer is required");
2443
- result = await handlers.getValidators(config.relayedNodeDid, page);
2515
+ did = handlers.getEntityDid();
2516
+ if (!did && !config.relayedNodeDid) throw new Error("Relayer is required");
2517
+ result = await handlers.getValidators(did || config.relayedNodeDid, page);
2518
+ setData({ items: result.data });
2519
+ break;
2520
+ case "dao_members":
2521
+ userAddress = handlers.getCurrentUser();
2522
+ groupIds = handlers.getDaoGroupsIds();
2523
+ if (!userAddress.address && !config.address) throw new Error("Address is required");
2524
+ if (!groupIds && !config.groupIds) throw new Error("Group Ids are required");
2525
+ result = await handlers.getDaoMembers(userAddress.address || config.address, groupIds || config.groupIds, config.withBalance, page);
2444
2526
  setData({ items: result.data });
2445
2527
  break;
2446
2528
  default:
@@ -2459,37 +2541,39 @@ var ListPreviewStep = ({ listType, config, onAddToBlock, onPrev }) => {
2459
2541
  if (!data) return null;
2460
2542
  switch (listType) {
2461
2543
  case "linked_resources":
2462
- return /* @__PURE__ */ React31.createElement(LinkedResourcesList, { items: data.items, config });
2544
+ return /* @__PURE__ */ React32.createElement(LinkedResourcesList, { items: data.items, config });
2463
2545
  case "assets":
2464
- return /* @__PURE__ */ React31.createElement(AssetsList, { items: data.items, config });
2546
+ return /* @__PURE__ */ React32.createElement(AssetsList, { items: data.items, config });
2465
2547
  case "transactions":
2466
- return /* @__PURE__ */ React31.createElement(TransactionsList, { items: data.items, config });
2548
+ return /* @__PURE__ */ React32.createElement(TransactionsList, { items: data.items, config });
2467
2549
  case "collections":
2468
- return /* @__PURE__ */ React31.createElement(CollectionsList, { items: data.items });
2550
+ return /* @__PURE__ */ React32.createElement(CollectionsList, { items: data.items });
2469
2551
  case "investments":
2470
- return /* @__PURE__ */ React31.createElement(InvestmentsList, { items: data.items });
2552
+ return /* @__PURE__ */ React32.createElement(InvestmentsList, { items: data.items });
2471
2553
  case "oracles":
2472
- return /* @__PURE__ */ React31.createElement(OraclesList, { items: data.items });
2554
+ return /* @__PURE__ */ React32.createElement(OraclesList, { items: data.items });
2473
2555
  case "pods":
2474
- return /* @__PURE__ */ React31.createElement(PodsList, { items: data.items });
2556
+ return /* @__PURE__ */ React32.createElement(PodsList, { items: data.items });
2475
2557
  case "proposals":
2476
- return /* @__PURE__ */ React31.createElement(ProposalsList, { items: data.items });
2558
+ return /* @__PURE__ */ React32.createElement(ProposalsList, { items: data.items });
2477
2559
  case "requests":
2478
- return /* @__PURE__ */ React31.createElement(RequestsList, { items: data.items });
2560
+ return /* @__PURE__ */ React32.createElement(RequestsList, { items: data.items });
2479
2561
  case "group_members":
2480
- return /* @__PURE__ */ React31.createElement(MembersList, { items: data.items });
2562
+ return /* @__PURE__ */ React32.createElement(MembersList, { items: data.items });
2563
+ case "dao_members":
2564
+ return /* @__PURE__ */ React32.createElement(DaoMembersList, { items: data.items });
2481
2565
  case "validators":
2482
- return /* @__PURE__ */ React31.createElement(ValidatorsList, { items: data.items });
2566
+ return /* @__PURE__ */ React32.createElement(ValidatorsList, { items: data.items });
2483
2567
  default:
2484
2568
  return null;
2485
2569
  }
2486
2570
  };
2487
- return /* @__PURE__ */ React31.createElement(Stack21, { gap: "md" }, /* @__PURE__ */ React31.createElement("div", null, /* @__PURE__ */ React31.createElement(Text19, { size: "lg", fw: 600, mb: "xs" }, "Preview ", typeConfig.metadata.name), /* @__PURE__ */ React31.createElement(Text19, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), loading && /* @__PURE__ */ React31.createElement(Center, { py: "xl" }, /* @__PURE__ */ React31.createElement(Stack21, { align: "center", gap: "sm" }, /* @__PURE__ */ React31.createElement(Loader, { size: "md" }), /* @__PURE__ */ React31.createElement(Text19, { size: "sm", c: "dimmed" }, "Loading preview..."))), error && /* @__PURE__ */ React31.createElement(Alert3, { color: "red", title: "Failed to load preview" }, /* @__PURE__ */ React31.createElement(Stack21, { gap: "xs" }, /* @__PURE__ */ React31.createElement(Text19, { size: "sm" }, error), /* @__PURE__ */ React31.createElement(Button6, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"))), !loading && !error && data && /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React31.createElement(ListPagination, { page, setPage, totalPages })), /* @__PURE__ */ React31.createElement(Group6, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React31.createElement(Button6, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React31.createElement(Button6, { onClick: onAddToBlock }, "Add to Block")));
2571
+ return /* @__PURE__ */ React32.createElement(Stack22, { gap: "md" }, /* @__PURE__ */ React32.createElement("div", null, /* @__PURE__ */ React32.createElement(Text20, { size: "lg", fw: 600, mb: "xs" }, "Preview ", typeConfig.metadata.name), /* @__PURE__ */ React32.createElement(Text20, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), loading && /* @__PURE__ */ React32.createElement(Center, { py: "xl" }, /* @__PURE__ */ React32.createElement(Stack22, { align: "center", gap: "sm" }, /* @__PURE__ */ React32.createElement(Loader, { size: "md" }), /* @__PURE__ */ React32.createElement(Text20, { size: "sm", c: "dimmed" }, "Loading preview..."))), error && /* @__PURE__ */ React32.createElement(Alert3, { color: "red", title: "Failed to load preview" }, /* @__PURE__ */ React32.createElement(Stack22, { gap: "xs" }, /* @__PURE__ */ React32.createElement(Text20, { size: "sm" }, error), /* @__PURE__ */ React32.createElement(Button6, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"))), !loading && !error && data && /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React32.createElement(ListPagination, { page, setPage, totalPages })), /* @__PURE__ */ React32.createElement(Group6, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React32.createElement(Button6, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React32.createElement(Button6, { onClick: onAddToBlock }, "Add to Block")));
2488
2572
  };
2489
2573
 
2490
2574
  // src/mantine/blocks/list/modal/ModalNavigation.tsx
2491
- import React32 from "react";
2492
- import { Stack as Stack22, Button as Button7, Text as Text20 } from "@mantine/core";
2575
+ import React33 from "react";
2576
+ import { Stack as Stack23, Button as Button7, Text as Text21 } from "@mantine/core";
2493
2577
  var ModalNavigation = ({
2494
2578
  steps,
2495
2579
  activeStep,
@@ -2497,7 +2581,7 @@ var ModalNavigation = ({
2497
2581
  showUpdateButton = false,
2498
2582
  onUpdateBlock
2499
2583
  }) => {
2500
- return /* @__PURE__ */ React32.createElement(Stack22, { gap: "xs", style: { height: "100%" } }, /* @__PURE__ */ React32.createElement(Stack22, { gap: "xs", style: { flex: 1 } }, steps.map((step) => /* @__PURE__ */ React32.createElement(
2584
+ return /* @__PURE__ */ React33.createElement(Stack23, { gap: "xs", style: { height: "100%" } }, /* @__PURE__ */ React33.createElement(Stack23, { gap: "xs", style: { flex: 1 } }, steps.map((step) => /* @__PURE__ */ React33.createElement(
2501
2585
  Button7,
2502
2586
  {
2503
2587
  key: step.id,
@@ -2515,8 +2599,8 @@ var ModalNavigation = ({
2515
2599
  }
2516
2600
  }
2517
2601
  },
2518
- /* @__PURE__ */ React32.createElement(Stack22, { gap: 2, align: "flex-start" }, /* @__PURE__ */ React32.createElement(Text20, { size: "sm", fw: 500 }, step.label), /* @__PURE__ */ React32.createElement(Text20, { size: "xs", opacity: 0.7 }, step.description))
2519
- ))), showUpdateButton && /* @__PURE__ */ React32.createElement(Button7, { variant: "filled", color: "blue", onClick: onUpdateBlock, style: { marginTop: "auto" } }, "Update Block"));
2602
+ /* @__PURE__ */ React33.createElement(Stack23, { gap: 2, align: "flex-start" }, /* @__PURE__ */ React33.createElement(Text21, { size: "sm", fw: 500 }, step.label), /* @__PURE__ */ React33.createElement(Text21, { size: "xs", opacity: 0.7 }, step.description))
2603
+ ))), showUpdateButton && /* @__PURE__ */ React33.createElement(Button7, { variant: "filled", color: "blue", onClick: onUpdateBlock, style: { marginTop: "auto" } }, "Update Block"));
2520
2604
  };
2521
2605
 
2522
2606
  // src/mantine/blocks/list/modal/ListConfigModal.tsx
@@ -2589,9 +2673,9 @@ var ListConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
2589
2673
  const renderStepContent = () => {
2590
2674
  switch (activeStep) {
2591
2675
  case "type":
2592
- return /* @__PURE__ */ React33.createElement(ListTypeSelectionStep, { selectedType, onTypeSelect: handleTypeSelect, onNext: () => setActiveStep("configure") });
2676
+ return /* @__PURE__ */ React34.createElement(ListTypeSelectionStep, { selectedType, onTypeSelect: handleTypeSelect, onNext: () => setActiveStep("configure") });
2593
2677
  case "configure":
2594
- return selectedType ? /* @__PURE__ */ React33.createElement(
2678
+ return selectedType ? /* @__PURE__ */ React34.createElement(
2595
2679
  ListConfigurationStep,
2596
2680
  {
2597
2681
  listType: selectedType,
@@ -2603,12 +2687,12 @@ var ListConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
2603
2687
  }
2604
2688
  ) : null;
2605
2689
  case "preview":
2606
- return selectedType ? /* @__PURE__ */ React33.createElement(ListPreviewStep, { listSortConfig: null, listType: selectedType, config, onAddToBlock: handleAddToBlock, onPrev: () => setActiveStep("configure") }) : null;
2690
+ return selectedType ? /* @__PURE__ */ React34.createElement(ListPreviewStep, { listSortConfig: null, listType: selectedType, config, onAddToBlock: handleAddToBlock, onPrev: () => setActiveStep("configure") }) : null;
2607
2691
  default:
2608
2692
  return null;
2609
2693
  }
2610
2694
  };
2611
- return /* @__PURE__ */ React33.createElement(Modal, { opened, onClose: handleClose, title: "Configure List Block", size: "xl" }, /* @__PURE__ */ React33.createElement(Group7, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React33.createElement(Box13, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React33.createElement(
2695
+ return /* @__PURE__ */ React34.createElement(Modal, { opened, onClose: handleClose, title: "Configure List Block", size: "xl" }, /* @__PURE__ */ React34.createElement(Group7, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React34.createElement(Box14, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React34.createElement(
2612
2696
  ModalNavigation,
2613
2697
  {
2614
2698
  steps,
@@ -2617,22 +2701,22 @@ var ListConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
2617
2701
  showUpdateButton: selectedType !== null && isConfigValid(),
2618
2702
  onUpdateBlock: handleAddToBlock
2619
2703
  }
2620
- )), /* @__PURE__ */ React33.createElement(Box13, { style: { flex: 1 } }, renderStepContent())));
2704
+ )), /* @__PURE__ */ React34.createElement(Box14, { style: { flex: 1 } }, renderStepContent())));
2621
2705
  };
2622
2706
 
2623
2707
  // src/mantine/blocks/list/ListActionsMenu.tsx
2624
- import React34 from "react";
2625
- import { Menu, Text as Text21 } from "@mantine/core";
2708
+ import React35 from "react";
2709
+ import { Menu, Text as Text22 } from "@mantine/core";
2626
2710
  import { IconArrowDown, IconArrowUp, IconAdjustments, IconCheckbox as IconCheckbox2, IconAdjustmentsHorizontal } from "@tabler/icons-react";
2627
2711
  var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onChange }) => {
2628
2712
  const renderItem = (opt, direction) => {
2629
2713
  const isActive = value?.key === opt.key && value?.direction === direction;
2630
2714
  const Icon = direction === "asc" ? IconArrowUp : IconArrowDown;
2631
- return /* @__PURE__ */ React34.createElement(
2715
+ return /* @__PURE__ */ React35.createElement(
2632
2716
  Menu.Item,
2633
2717
  {
2634
2718
  key: `${opt.key}-${direction}`,
2635
- leftSection: /* @__PURE__ */ React34.createElement(Icon, { size: 16 }),
2719
+ leftSection: /* @__PURE__ */ React35.createElement(Icon, { size: 16 }),
2636
2720
  onClick: () => {
2637
2721
  console.log("Changing sort: ", direction);
2638
2722
  onChange({ key: opt.key, direction });
@@ -2642,7 +2726,7 @@ var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onC
2642
2726
  opt.label
2643
2727
  );
2644
2728
  };
2645
- return /* @__PURE__ */ React34.createElement(Menu, { shadow: "md", width: 220 }, /* @__PURE__ */ React34.createElement(Menu.Target, null, /* @__PURE__ */ React34.createElement(Text21, { style: { cursor: "pointer" } }, /* @__PURE__ */ React34.createElement(IconAdjustmentsHorizontal, { size: 20 }))), /* @__PURE__ */ React34.createElement(Menu.Dropdown, null, /* @__PURE__ */ React34.createElement(Menu.Label, null, /* @__PURE__ */ React34.createElement(Text21, { c: "dimmed" }, "Order By")), options.map((opt) => /* @__PURE__ */ React34.createElement(React34.Fragment, { key: opt.key }, renderItem(opt, "desc"), renderItem(opt, "asc"))), /* @__PURE__ */ React34.createElement(Menu.Divider, null), /* @__PURE__ */ React34.createElement(Menu.Item, { leftSection: /* @__PURE__ */ React34.createElement(IconAdjustments, { size: 16 }) }, "Smart Filter"), /* @__PURE__ */ React34.createElement(Menu.Divider, null), /* @__PURE__ */ React34.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "single" ? null : "single"), leftSection: /* @__PURE__ */ React34.createElement(IconCheckbox2, { size: 16 }) }, "Single Select"), /* @__PURE__ */ React34.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "multi" ? null : "multi"), leftSection: /* @__PURE__ */ React34.createElement(IconCheckbox2, { size: 16 }) }, "Multi Select")));
2729
+ return /* @__PURE__ */ React35.createElement(Menu, { shadow: "md", width: 220 }, /* @__PURE__ */ React35.createElement(Menu.Target, null, /* @__PURE__ */ React35.createElement(Text22, { style: { cursor: "pointer" } }, /* @__PURE__ */ React35.createElement(IconAdjustmentsHorizontal, { size: 20 }))), /* @__PURE__ */ React35.createElement(Menu.Dropdown, null, /* @__PURE__ */ React35.createElement(Menu.Label, null, /* @__PURE__ */ React35.createElement(Text22, { c: "dimmed" }, "Order By")), options.map((opt) => /* @__PURE__ */ React35.createElement(React35.Fragment, { key: opt.key }, renderItem(opt, "desc"), renderItem(opt, "asc"))), /* @__PURE__ */ React35.createElement(Menu.Divider, null), /* @__PURE__ */ React35.createElement(Menu.Item, { leftSection: /* @__PURE__ */ React35.createElement(IconAdjustments, { size: 16 }) }, "Smart Filter"), /* @__PURE__ */ React35.createElement(Menu.Divider, null), /* @__PURE__ */ React35.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "single" ? null : "single"), leftSection: /* @__PURE__ */ React35.createElement(IconCheckbox2, { size: 16 }) }, "Single Select"), /* @__PURE__ */ React35.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "multi" ? null : "multi"), leftSection: /* @__PURE__ */ React35.createElement(IconCheckbox2, { size: 16 }) }, "Multi Select")));
2646
2730
  };
2647
2731
 
2648
2732
  // src/core/lib/sortListItems.ts
@@ -2665,10 +2749,10 @@ function sortListItems(data, sortOption) {
2665
2749
  }
2666
2750
 
2667
2751
  // src/mantine/blocks/list/FilterTab.tsx
2668
- import React35 from "react";
2669
- import { UnstyledButton, Text as Text22 } from "@mantine/core";
2752
+ import React36 from "react";
2753
+ import { UnstyledButton, Text as Text23 } from "@mantine/core";
2670
2754
  function FilterTab({ onClick, label, isActive }) {
2671
- return /* @__PURE__ */ React35.createElement(
2755
+ return /* @__PURE__ */ React36.createElement(
2672
2756
  UnstyledButton,
2673
2757
  {
2674
2758
  onClick,
@@ -2699,7 +2783,7 @@ function FilterTab({ onClick, label, isActive }) {
2699
2783
  if (!isActive) e.currentTarget.style.background = "transparent";
2700
2784
  }
2701
2785
  },
2702
- /* @__PURE__ */ React35.createElement(Text22, { size: "sm", fw: 500 }, label)
2786
+ /* @__PURE__ */ React36.createElement(Text23, { size: "sm", fw: 500 }, label)
2703
2787
  );
2704
2788
  }
2705
2789
 
@@ -2717,9 +2801,9 @@ function filterListItems(items, filterOption) {
2717
2801
 
2718
2802
  // src/mantine/blocks/list/ListBlock.tsx
2719
2803
  import { IconArrowDown as IconArrowDown2, IconArrowUp as IconArrowUp2 } from "@tabler/icons-react";
2720
- var IconSettings = () => /* @__PURE__ */ React36.createElement("span", null, "\u2699\uFE0F");
2721
- var IconRefresh = () => /* @__PURE__ */ React36.createElement("span", null, "\u{1F504}");
2722
- var IconAlertCircle = () => /* @__PURE__ */ React36.createElement("span", null, "\u26A0\uFE0F");
2804
+ var IconSettings = () => /* @__PURE__ */ React37.createElement("span", null, "\u2699\uFE0F");
2805
+ var IconRefresh = () => /* @__PURE__ */ React37.createElement("span", null, "\u{1F504}");
2806
+ var IconAlertCircle = () => /* @__PURE__ */ React37.createElement("span", null, "\u26A0\uFE0F");
2723
2807
  var ListBlockContent = ({ block, editor }) => {
2724
2808
  const [modalOpened, setModalOpened] = useState6(false);
2725
2809
  const [data, setData] = useState6(null);
@@ -2836,15 +2920,20 @@ var ListBlockContent = ({ block, editor }) => {
2836
2920
  setError(null);
2837
2921
  try {
2838
2922
  let result;
2923
+ let did;
2924
+ let groupIds;
2925
+ let userAddress;
2839
2926
  switch (listType) {
2840
2927
  case "linked_resources":
2841
- if (!listConfig.did) throw new Error("DID is required");
2842
- result = await handlers.getEntity(listConfig.did);
2928
+ did = handlers.getEntityDid();
2929
+ if (!did && !listConfig.did) throw new Error("DID is required");
2930
+ result = await handlers.getEntity(did || listConfig.did);
2843
2931
  setData({ items: result.linkedResource });
2844
2932
  break;
2845
2933
  case "assets":
2846
- if (!listConfig.collectionDid) throw new Error("Collection DID is required");
2847
- result = await handlers.getAssets(listConfig.collectionDid, page);
2934
+ did = handlers.getEntityDid();
2935
+ if (!did && !listConfig.collectionDid) throw new Error("Collection DID is required");
2936
+ result = await handlers.getAssets(did || listConfig.collectionDid, page);
2848
2937
  setData({ items: result.data });
2849
2938
  break;
2850
2939
  case "transactions":
@@ -2854,33 +2943,39 @@ var ListBlockContent = ({ block, editor }) => {
2854
2943
  setData({ items: result.data });
2855
2944
  break;
2856
2945
  case "collections":
2857
- if (!listConfig.relayedNodeDid) throw new Error("Relayer is required");
2858
- result = await handlers.getCollections(listConfig.relayedNodeDid, page);
2946
+ did = handlers.getEntityDid();
2947
+ if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
2948
+ result = await handlers.getCollections(did || listConfig.relayedNodeDid, page);
2859
2949
  setData({ items: result.data });
2860
2950
  break;
2861
2951
  case "investments":
2862
- if (!listConfig.relayedNodeDid) throw new Error("Relayer is required");
2863
- result = await handlers.getInvestments(listConfig.relayedNodeDid, page);
2952
+ did = handlers.getEntityDid();
2953
+ if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
2954
+ result = await handlers.getInvestments(did || listConfig.relayedNodeDid, page);
2864
2955
  setData({ items: result.data });
2865
2956
  break;
2866
2957
  case "oracles":
2867
- if (!listConfig.relayedNodeDid) throw new Error("Relayer is required");
2868
- result = await handlers.getOracles(listConfig.relayedNodeDid, page);
2958
+ did = handlers.getEntityDid();
2959
+ if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
2960
+ result = await handlers.getOracles(did || listConfig.relayedNodeDid, page);
2869
2961
  setData({ items: result.data });
2870
2962
  break;
2871
2963
  case "pods":
2872
- if (!listConfig.relayedNodeDid) throw new Error("Relayer is required");
2873
- result = await handlers.getPODs(listConfig.relayedNodeDid, page);
2964
+ did = handlers.getEntityDid();
2965
+ if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
2966
+ result = await handlers.getPODs(did || listConfig.relayedNodeDid, page);
2874
2967
  setData({ items: result.data });
2875
2968
  break;
2876
2969
  case "proposals":
2877
- if (!listConfig.relayedNodeDid) throw new Error("Relayer is required");
2878
- result = await handlers.getProposals(listConfig.relayedNodeDid, page);
2970
+ did = handlers.getEntityDid();
2971
+ if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
2972
+ result = await handlers.getProposals(did || listConfig.relayedNodeDid, page);
2879
2973
  setData({ items: result.data });
2880
2974
  break;
2881
2975
  case "requests":
2882
- if (!listConfig.relayedNodeDid) throw new Error("Relayer is required");
2883
- result = await handlers.getRequests(listConfig.relayedNodeDid, page);
2976
+ did = handlers.getEntityDid();
2977
+ if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
2978
+ result = await handlers.getRequests(did || listConfig.relayedNodeDid, page);
2884
2979
  setData({ items: result.data });
2885
2980
  break;
2886
2981
  case "group_members":
@@ -2890,8 +2985,17 @@ var ListBlockContent = ({ block, editor }) => {
2890
2985
  setData({ items: result.data });
2891
2986
  break;
2892
2987
  case "validators":
2893
- if (!listConfig.relayedNodeDid) throw new Error("Relayer is required");
2894
- result = await handlers.getValidators(listConfig.relayedNodeDid, page);
2988
+ did = handlers.getEntityDid();
2989
+ if (!did && !listConfig.relayedNodeDid) throw new Error("Relayer is required");
2990
+ result = await handlers.getValidators(did || listConfig.relayedNodeDid, page);
2991
+ setData({ items: result.data });
2992
+ break;
2993
+ case "dao_members":
2994
+ userAddress = handlers.getCurrentUser();
2995
+ groupIds = handlers.getDaoGroupsIds();
2996
+ if (!userAddress.address && !listConfig.address) throw new Error("Address is required");
2997
+ if (!groupIds && !listConfig.groupIds) throw new Error("Group Ids are required");
2998
+ result = await handlers.getDaoMembers(userAddress.address || listConfig.address, groupIds || listConfig.groupIds, listConfig.withBalance, page);
2895
2999
  setData({ items: result.data });
2896
3000
  break;
2897
3001
  default:
@@ -2947,35 +3051,37 @@ var ListBlockContent = ({ block, editor }) => {
2947
3051
  console.log("[ListBlockContent] renderListComponent", data, listType);
2948
3052
  switch (listType) {
2949
3053
  case "linked_resources":
2950
- return /* @__PURE__ */ React36.createElement(LinkedResourcesList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
3054
+ return /* @__PURE__ */ React37.createElement(LinkedResourcesList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
2951
3055
  case "assets":
2952
- return /* @__PURE__ */ React36.createElement(AssetsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
3056
+ return /* @__PURE__ */ React37.createElement(AssetsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
2953
3057
  case "transactions":
2954
- return /* @__PURE__ */ React36.createElement(TransactionsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
3058
+ return /* @__PURE__ */ React37.createElement(TransactionsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
2955
3059
  case "collections":
2956
- return /* @__PURE__ */ React36.createElement(CollectionsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3060
+ return /* @__PURE__ */ React37.createElement(CollectionsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
2957
3061
  case "investments":
2958
- return /* @__PURE__ */ React36.createElement(InvestmentsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3062
+ return /* @__PURE__ */ React37.createElement(InvestmentsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
2959
3063
  case "oracles":
2960
- return /* @__PURE__ */ React36.createElement(OraclesList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3064
+ return /* @__PURE__ */ React37.createElement(OraclesList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
2961
3065
  case "pods":
2962
- return /* @__PURE__ */ React36.createElement(PodsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3066
+ return /* @__PURE__ */ React37.createElement(PodsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
2963
3067
  case "proposals":
2964
- return /* @__PURE__ */ React36.createElement(ProposalsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3068
+ return /* @__PURE__ */ React37.createElement(ProposalsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
2965
3069
  case "requests":
2966
- return /* @__PURE__ */ React36.createElement(RequestsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3070
+ return /* @__PURE__ */ React37.createElement(RequestsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
2967
3071
  case "group_members":
2968
- return /* @__PURE__ */ React36.createElement(MembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3072
+ return /* @__PURE__ */ React37.createElement(MembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3073
+ case "dao_members":
3074
+ return /* @__PURE__ */ React37.createElement(DaoMembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
2969
3075
  case "validators":
2970
- return /* @__PURE__ */ React36.createElement(ValidatorsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3076
+ return /* @__PURE__ */ React37.createElement(ValidatorsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
2971
3077
  default:
2972
3078
  return null;
2973
3079
  }
2974
3080
  };
2975
- return /* @__PURE__ */ React36.createElement(Stack23, { mih: listType && totalPages !== 0 ? 700 : void 0, w: "100%" }, listType && /* @__PURE__ */ React36.createElement(Flex13, { align: "center", gap: "xs" }, /* @__PURE__ */ React36.createElement(Text23, null, getListNameByType(listType)), listSortConfig?.key && /* @__PURE__ */ React36.createElement(Flex13, { align: "center" }, /* @__PURE__ */ React36.createElement(Text23, { size: "xs", c: "dimmed" }, listSortConfig.key?.replace(/([A-Z])/g, " $1").replace(
3081
+ return /* @__PURE__ */ React37.createElement(Stack24, { mih: listType && totalPages !== 0 ? 700 : void 0, w: "100%" }, listType && /* @__PURE__ */ React37.createElement(Flex14, { align: "center", gap: "xs" }, /* @__PURE__ */ React37.createElement(Text24, null, getListNameByType(listType)), listSortConfig?.key && /* @__PURE__ */ React37.createElement(Flex14, { align: "center" }, /* @__PURE__ */ React37.createElement(Text24, { size: "xs", c: "dimmed" }, listSortConfig.key?.replace(/([A-Z])/g, " $1").replace(
2976
3082
  /^./,
2977
3083
  (str) => str.toUpperCase()
2978
- ), " "), /* @__PURE__ */ React36.createElement(Text23, { lh: 0.5, c: "dimmed" }, listSortConfig.direction === "asc" && /* @__PURE__ */ React36.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React36.createElement(IconArrowDown2, { size: 18 }))), selectionMode && /* @__PURE__ */ React36.createElement(Text23, { lh: 0.5, c: "dimmed" }, selectionMode === "single" ? "Single Selection" : "Multi Selection")), /* @__PURE__ */ React36.createElement(Flex13, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React36.createElement(Flex13, { gap: "xs", align: "center" }, listType && /* @__PURE__ */ React36.createElement(FilterTab, { key: "All", label: "All", isActive: !listFilterConfig?.key, onClick: () => handleFilterChange(null) }), Array.isArray(listFilterConfigOptions) && listFilterConfigOptions.length > 0 && listFilterConfigOptions.map(({ key, label, type }) => /* @__PURE__ */ React36.createElement(
3084
+ ), " "), /* @__PURE__ */ React37.createElement(Text24, { lh: 0.5, c: "dimmed" }, listSortConfig.direction === "asc" && /* @__PURE__ */ React37.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React37.createElement(IconArrowDown2, { size: 18 }))), selectionMode && /* @__PURE__ */ React37.createElement(Text24, { lh: 0.5, c: "dimmed" }, selectionMode === "single" ? "Single Selection" : "Multi Selection")), /* @__PURE__ */ React37.createElement(Flex14, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React37.createElement(Flex14, { gap: "xs", align: "center" }, listType && /* @__PURE__ */ React37.createElement(FilterTab, { key: "All", label: "All", isActive: !listFilterConfig?.key, onClick: () => handleFilterChange(null) }), Array.isArray(listFilterConfigOptions) && listFilterConfigOptions.length > 0 && listFilterConfigOptions.map(({ key, label, type }) => /* @__PURE__ */ React37.createElement(
2979
3085
  FilterTab,
2980
3086
  {
2981
3087
  key: label,
@@ -2983,7 +3089,7 @@ var ListBlockContent = ({ block, editor }) => {
2983
3089
  isActive: listFilterConfig?.key === key && listFilterConfig?.value === type,
2984
3090
  onClick: () => handleFilterChange({ key, value: type })
2985
3091
  }
2986
- ))), /* @__PURE__ */ React36.createElement(Flex13, { gap: "xs" }, listType && editable && /* @__PURE__ */ React36.createElement(ActionIcon3, { variant: "subtle", size: "sm", onClick: fetchData, loading }, /* @__PURE__ */ React36.createElement(IconRefresh, null)), editable && /* @__PURE__ */ React36.createElement(ActionIcon3, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React36.createElement(IconSettings, null)), listType && listConfig && listSortConfigOptions && listSortConfigOptions?.length > 0 && /* @__PURE__ */ React36.createElement(
3092
+ ))), /* @__PURE__ */ React37.createElement(Flex14, { gap: "xs" }, listType && editable && /* @__PURE__ */ React37.createElement(ActionIcon3, { variant: "subtle", size: "sm", onClick: fetchData, loading }, /* @__PURE__ */ React37.createElement(IconRefresh, null)), editable && /* @__PURE__ */ React37.createElement(ActionIcon3, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React37.createElement(IconSettings, null)), listType && listConfig && listSortConfigOptions && listSortConfigOptions?.length > 0 && /* @__PURE__ */ React37.createElement(
2987
3093
  ListActionsMenu,
2988
3094
  {
2989
3095
  onSelectActionClick: (mode) => setSelectionMode(mode),
@@ -2992,7 +3098,7 @@ var ListBlockContent = ({ block, editor }) => {
2992
3098
  value: listSortConfig,
2993
3099
  onChange: (sortOption) => handleSortChange(sortOption)
2994
3100
  }
2995
- ))), /* @__PURE__ */ React36.createElement(Flex13, { flex: 1 }, !listType ? /* @__PURE__ */ React36.createElement(Center2, { py: "xl" }, /* @__PURE__ */ React36.createElement(Stack23, { align: "center", gap: "sm" }, /* @__PURE__ */ React36.createElement(Text23, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React36.createElement(Button8, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : loading ? /* @__PURE__ */ React36.createElement(Center2, { py: "xl", w: "100%" }, /* @__PURE__ */ React36.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React36.createElement(Alert4, { color: "red", title: "Failed to load data", icon: /* @__PURE__ */ React36.createElement(IconAlertCircle, null) }, /* @__PURE__ */ React36.createElement(Stack23, { gap: "xs" }, /* @__PURE__ */ React36.createElement(Text23, { size: "sm" }, showErrorDetails ? error : "Unable to fetch list data"), /* @__PURE__ */ React36.createElement(Group8, { gap: "xs" }, /* @__PURE__ */ React36.createElement(Button8, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"), /* @__PURE__ */ React36.createElement(Button8, { size: "xs", variant: "subtle", onClick: () => setShowErrorDetails(!showErrorDetails) }, showErrorDetails ? "Hide" : "Show", " Details")))) : /* @__PURE__ */ React36.createElement(Stack23, { gap: "md", flex: 1 }, renderListComponent(), /* @__PURE__ */ React36.createElement(
3101
+ ))), /* @__PURE__ */ React37.createElement(Flex14, { flex: 1 }, !listType ? /* @__PURE__ */ React37.createElement(Center2, { py: "xl" }, /* @__PURE__ */ React37.createElement(Stack24, { align: "center", gap: "sm" }, /* @__PURE__ */ React37.createElement(Text24, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React37.createElement(Button8, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : loading ? /* @__PURE__ */ React37.createElement(Center2, { py: "xl", w: "100%" }, /* @__PURE__ */ React37.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React37.createElement(Alert4, { color: "red", title: "Failed to load data", icon: /* @__PURE__ */ React37.createElement(IconAlertCircle, null) }, /* @__PURE__ */ React37.createElement(Stack24, { gap: "xs" }, /* @__PURE__ */ React37.createElement(Text24, { size: "sm" }, showErrorDetails ? error : "Unable to fetch list data"), /* @__PURE__ */ React37.createElement(Group8, { gap: "xs" }, /* @__PURE__ */ React37.createElement(Button8, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"), /* @__PURE__ */ React37.createElement(Button8, { size: "xs", variant: "subtle", onClick: () => setShowErrorDetails(!showErrorDetails) }, showErrorDetails ? "Hide" : "Show", " Details")))) : /* @__PURE__ */ React37.createElement(Stack24, { gap: "md", flex: 1 }, renderListComponent(), /* @__PURE__ */ React37.createElement(
2996
3102
  ListPagination,
2997
3103
  {
2998
3104
  page,
@@ -3001,7 +3107,7 @@ var ListBlockContent = ({ block, editor }) => {
3001
3107
  },
3002
3108
  totalPages
3003
3109
  }
3004
- ))), /* @__PURE__ */ React36.createElement(
3110
+ ))), /* @__PURE__ */ React37.createElement(
3005
3111
  ListConfigModal,
3006
3112
  {
3007
3113
  opened: modalOpened,
@@ -3037,15 +3143,15 @@ var ListBlock = createReactBlockSpec2(
3037
3143
  content: "none"
3038
3144
  },
3039
3145
  {
3040
- render: (props) => /* @__PURE__ */ React36.createElement(ListBlockContent, { ...props })
3146
+ render: (props) => /* @__PURE__ */ React37.createElement(ListBlockContent, { ...props })
3041
3147
  }
3042
3148
  );
3043
3149
 
3044
3150
  // src/mantine/blocks/overview/OverviewBlock.tsx
3045
- import React37 from "react";
3151
+ import React38 from "react";
3046
3152
  import { createReactBlockSpec as createReactBlockSpec3 } from "@blocknote/react";
3047
3153
  var OverviewBlockContent = ({ block, editor }) => {
3048
- return /* @__PURE__ */ React37.createElement(
3154
+ return /* @__PURE__ */ React38.createElement(
3049
3155
  "div",
3050
3156
  {
3051
3157
  style: {
@@ -3057,7 +3163,7 @@ var OverviewBlockContent = ({ block, editor }) => {
3057
3163
  border: "1px solid #e5e7eb"
3058
3164
  }
3059
3165
  },
3060
- /* @__PURE__ */ React37.createElement("div", { style: { marginBottom: "12px" } }, /* @__PURE__ */ React37.createElement(
3166
+ /* @__PURE__ */ React38.createElement("div", { style: { marginBottom: "12px" } }, /* @__PURE__ */ React38.createElement(
3061
3167
  "input",
3062
3168
  {
3063
3169
  type: "text",
@@ -3083,7 +3189,7 @@ var OverviewBlockContent = ({ block, editor }) => {
3083
3189
  }
3084
3190
  }
3085
3191
  )),
3086
- /* @__PURE__ */ React37.createElement("div", { style: { minHeight: "40px", color: "#6b7280" } }, block.props.did ? /* @__PURE__ */ React37.createElement("p", null, "Loading overview for DID: ", block.props.did) : /* @__PURE__ */ React37.createElement("p", null, "Enter a DID to load overview data"))
3192
+ /* @__PURE__ */ React38.createElement("div", { style: { minHeight: "40px", color: "#6b7280" } }, block.props.did ? /* @__PURE__ */ React38.createElement("p", null, "Loading overview for DID: ", block.props.did) : /* @__PURE__ */ React38.createElement("p", null, "Enter a DID to load overview data"))
3087
3193
  );
3088
3194
  };
3089
3195
  var OverviewBlock = createReactBlockSpec3(
@@ -3097,184 +3203,143 @@ var OverviewBlock = createReactBlockSpec3(
3097
3203
  content: "none"
3098
3204
  },
3099
3205
  {
3100
- render: (props) => /* @__PURE__ */ React37.createElement(OverviewBlockContent, { ...props })
3206
+ render: (props) => /* @__PURE__ */ React38.createElement(OverviewBlockContent, { ...props })
3101
3207
  }
3102
3208
  );
3103
3209
 
3104
- // src/mantine/context/types.ts
3105
- var StakeType = {
3106
- Delegate: "delegate",
3107
- Undelegate: "undelegate",
3108
- Redelegate: "redelegate",
3109
- WithdrawDelegatorReward: "withdraw_delegator_reward"
3110
- };
3111
- var AuthzExecActionTypes = {
3112
- Delegate: "/cosmos.staking.v1beta1.MsgDelegate",
3113
- Undelegate: "/cosmos.staking.v1beta1.MsgUndelegate",
3114
- Redelegate: "/cosmos.staking.v1beta1.MsgBeginRedelegate",
3115
- ClaimRewards: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
3116
- Custom: "custom"
3117
- };
3118
- var ValidatorActionType = /* @__PURE__ */ ((ValidatorActionType2) => {
3119
- ValidatorActionType2["CreateValidator"] = "/cosmos.staking.v1beta1.MsgCreateValidator";
3120
- ValidatorActionType2["EditValidator"] = "/cosmos.staking.v1beta1.MsgEditValidator";
3121
- ValidatorActionType2["UnjailValidator"] = "/cosmos.slashing.v1beta1.MsgUnjail";
3122
- ValidatorActionType2["WithdrawValidatorCommission"] = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission";
3123
- return ValidatorActionType2;
3124
- })(ValidatorActionType || {});
3125
-
3126
- // src/mantine/context/hooks/useSharedProposal.ts
3127
- import { useState as useState7, useEffect as useEffect7, useCallback as useCallback9 } from "react";
3128
- var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
3129
- const { sharedProposals, fetchSharedProposal, invalidateProposal, subscribeToProposal } = useBlocknoteContext();
3130
- const [localProposal, setLocalProposal] = useState7(null);
3131
- const cacheKey = `${contractAddress}:${proposalId}`;
3132
- useEffect7(() => {
3133
- if (!proposalId || !contractAddress || !autoFetch) return;
3134
- fetchSharedProposal(proposalId, contractAddress).then(setLocalProposal).catch((error) => {
3135
- console.error("Failed to fetch proposal:", error);
3136
- });
3137
- }, [proposalId, contractAddress, fetchSharedProposal, autoFetch]);
3138
- useEffect7(() => {
3139
- const proposal = subscribeToProposal(cacheKey);
3140
- if (proposal) {
3141
- setLocalProposal(proposal);
3142
- }
3143
- }, [subscribeToProposal, cacheKey]);
3144
- const refetch = useCallback9(() => fetchSharedProposal(proposalId, contractAddress, true), [fetchSharedProposal, proposalId, contractAddress]);
3145
- const invalidate = useCallback9(() => invalidateProposal(proposalId), [invalidateProposal, proposalId]);
3146
- return {
3147
- proposal: localProposal,
3148
- loading: sharedProposals[cacheKey]?.loading ?? false,
3149
- error: sharedProposals[cacheKey]?.error,
3150
- refetch,
3151
- invalidate
3152
- };
3153
- };
3154
-
3155
3210
  // src/mantine/blocks/proposalVote/ProposalVoteBlockSpec.tsx
3156
- import React45 from "react";
3211
+ import React46 from "react";
3157
3212
  import { createReactBlockSpec as createReactBlockSpec4 } from "@blocknote/react";
3158
3213
 
3159
3214
  // src/mantine/blocks/proposalVote/ProposalVoteBlock.tsx
3160
- import React44 from "react";
3215
+ import React45 from "react";
3161
3216
 
3162
3217
  // src/mantine/blocks/proposalVote/template/TemplateView.tsx
3163
- import React40, { useMemo as useMemo8 } from "react";
3218
+ import React41, { useMemo as useMemo9 } from "react";
3164
3219
 
3165
3220
  // src/mantine/blocks/proposalVote/template/TemplateConfig.tsx
3166
- import React39, { useCallback as useCallback10, useState as useState9 } from "react";
3221
+ import React40, { useCallback as useCallback10 } from "react";
3167
3222
  import { Paper as Paper2, CloseButton as CloseButton2, Title as Title2 } from "@mantine/core";
3168
3223
 
3169
3224
  // src/mantine/blocks/proposalVote/template/GeneralTab.tsx
3170
- import React38, { useState as useState8, useEffect as useEffect8, useMemo as useMemo7 } from "react";
3171
- import { Stack as Stack24, Text as Text24, Group as Group9, Card as Card5, Button as Button9, Select as Select3 } from "@mantine/core";
3225
+ import React39, { useState as useState8, useEffect as useEffect8, useMemo as useMemo8 } from "react";
3226
+ import { Stack as Stack25, Text as Text25, Group as Group9, Card as Card5, Button as Button9, Select as Select3 } from "@mantine/core";
3172
3227
 
3173
- // src/mantine/blocks/stores/dependencyHelpers.ts
3174
- function getDependencies(block) {
3175
- if (!block?.props?.dependencies) {
3228
+ // src/mantine/blocks/hooks/useBlockDependencies.ts
3229
+ import { useMemo as useMemo7, useEffect as useEffect7, useState as useState7, useCallback as useCallback9 } from "react";
3230
+ function parseDependsOn(block) {
3231
+ if (!block?.props?.dependsOn) {
3176
3232
  return null;
3177
3233
  }
3178
3234
  try {
3179
- if (typeof block.props.dependencies === "object") {
3180
- return block.props.dependencies;
3235
+ if (typeof block.props.dependsOn === "object") {
3236
+ return block.props.dependsOn;
3181
3237
  }
3182
- if (typeof block.props.dependencies === "string") {
3183
- return JSON.parse(block.props.dependencies);
3238
+ if (typeof block.props.dependsOn === "string") {
3239
+ return JSON.parse(block.props.dependsOn);
3184
3240
  }
3185
3241
  return null;
3186
3242
  } catch (error) {
3187
- console.error("[getDependencies] Failed to parse dependencies:", error);
3243
+ console.error("[useBlockDependencies] Failed to parse dependsOn:", error);
3188
3244
  return null;
3189
3245
  }
3190
3246
  }
3191
- function setDependencies(editor, block, deps) {
3192
- if (!editor || !block) {
3193
- console.error("[setDependencies] Invalid editor or block");
3194
- return;
3195
- }
3196
- const depsString = JSON.stringify(deps);
3197
- try {
3198
- editor.updateBlock(block.id, {
3199
- ...block,
3200
- props: {
3201
- ...block.props,
3202
- dependencies: depsString
3247
+ function useBlockDependencies(block, editor) {
3248
+ const editorDocument = editor?.document;
3249
+ const dependencies = useMemo7(() => {
3250
+ return parseDependsOn(block);
3251
+ }, [block?.props?.dependsOn]);
3252
+ const [sourceBlockVersion, setSourceBlockVersion] = useState7(0);
3253
+ useEffect7(() => {
3254
+ if (!editor || !dependencies) {
3255
+ return;
3256
+ }
3257
+ const sourceBlockIds = new Set(
3258
+ Object.values(dependencies).filter((dep) => dep && dep.blockId).map((dep) => dep.blockId)
3259
+ );
3260
+ if (sourceBlockIds.size === 0) {
3261
+ return;
3262
+ }
3263
+ const cleanup = editor.onChange(() => {
3264
+ setSourceBlockVersion((prev) => prev + 1);
3265
+ });
3266
+ return cleanup;
3267
+ }, [editor, dependencies]);
3268
+ const resolvedDependencies = useMemo7(() => {
3269
+ if (!editorDocument || !block || !dependencies) {
3270
+ return {};
3271
+ }
3272
+ const resolved = {};
3273
+ Object.entries(dependencies).forEach(([depType, config]) => {
3274
+ if (!config || !config.blockId || config.blockId === "") {
3275
+ resolved[depType] = null;
3276
+ return;
3277
+ }
3278
+ const targetBlock = editorDocument.find((docBlock) => docBlock.id === config.blockId && docBlock.type === depType);
3279
+ if (!targetBlock) {
3280
+ resolved[depType] = null;
3281
+ return;
3203
3282
  }
3283
+ const extracted = { blockId: config.blockId };
3284
+ Object.entries(config.subscribes).forEach(([prop, shouldSubscribe]) => {
3285
+ if (shouldSubscribe === true && targetBlock.props && prop in targetBlock.props) {
3286
+ extracted[prop] = targetBlock.props[prop];
3287
+ }
3288
+ });
3289
+ resolved[depType] = extracted;
3204
3290
  });
3205
- console.log("[setDependencies] Updated dependencies for block:", block.id, deps);
3206
- } catch (error) {
3207
- console.error("[setDependencies] Failed to update block:", error);
3208
- }
3209
- }
3210
- function updateDependency(editor, block, dependencyType, targetBlockId, _blockType) {
3211
- const currentDeps = getDependencies(block) || {};
3212
- if (!currentDeps[dependencyType]) {
3213
- let dependsOnConfig = null;
3214
- try {
3215
- if (block?.props?.dependsOn) {
3216
- dependsOnConfig = typeof block.props.dependsOn === "string" ? JSON.parse(block.props.dependsOn) : block.props.dependsOn;
3291
+ return resolved;
3292
+ }, [dependencies, editorDocument, block?.id, sourceBlockVersion]);
3293
+ const updateDependency2 = useCallback9(
3294
+ (dependencyType, targetBlockId) => {
3295
+ if (!block || !editor) {
3296
+ console.error("[useBlockDependencies] Cannot update: missing block or editor");
3297
+ return;
3217
3298
  }
3218
- } catch (e) {
3219
- console.error("[updateDependency] Failed to parse dependsOn:", e);
3220
- }
3221
- const dependencyDefaults = dependsOnConfig?.[dependencyType];
3222
- currentDeps[dependencyType] = dependencyDefaults ? { ...dependencyDefaults } : { blockId: "", subscribes: {} };
3223
- }
3224
- if (!targetBlockId) {
3225
- currentDeps[dependencyType] = {
3226
- ...currentDeps[dependencyType],
3227
- blockId: ""
3228
- };
3229
- } else {
3230
- currentDeps[dependencyType] = {
3231
- ...currentDeps[dependencyType],
3232
- blockId: targetBlockId
3233
- };
3234
- }
3235
- setDependencies(editor, block, currentDeps);
3236
- }
3237
- function getDefaultDependencyConfig(block) {
3238
- if (!block?.props?.dependsOn) {
3239
- return null;
3240
- }
3241
- try {
3242
- const defaults = typeof block.props.dependsOn === "string" ? JSON.parse(block.props.dependsOn) : block.props.dependsOn;
3243
- return JSON.parse(JSON.stringify(defaults));
3244
- } catch (error) {
3245
- console.error("[getDefaultDependencyConfig] Failed to parse dependsOn:", error);
3246
- return null;
3247
- }
3248
- }
3249
- function initializeBlockDependencies(editor, block, _blockType) {
3250
- const defaults = getDefaultDependencyConfig(block);
3251
- if (defaults && !getDependencies(block)) {
3252
- setDependencies(editor, block, defaults);
3253
- }
3299
+ const currentDeps = parseDependsOn(block) || {};
3300
+ if (!currentDeps[dependencyType]) {
3301
+ console.error(`[useBlockDependencies] No dependency config for type: ${dependencyType}`);
3302
+ return;
3303
+ }
3304
+ const updatedDeps = {
3305
+ ...currentDeps,
3306
+ [dependencyType]: {
3307
+ ...currentDeps[dependencyType],
3308
+ blockId: targetBlockId || ""
3309
+ }
3310
+ };
3311
+ const depsString = JSON.stringify(updatedDeps);
3312
+ try {
3313
+ editor.updateBlock(block.id, {
3314
+ ...block,
3315
+ props: {
3316
+ ...block.props,
3317
+ dependsOn: depsString
3318
+ }
3319
+ });
3320
+ console.log("[useBlockDependencies] Updated dependsOn for block:", block.id, updatedDeps);
3321
+ } catch (error) {
3322
+ console.error("[useBlockDependencies] Failed to update block:", error);
3323
+ }
3324
+ },
3325
+ [block, editor]
3326
+ );
3327
+ return {
3328
+ dependencies: resolvedDependencies,
3329
+ updateDependency: updateDependency2
3330
+ };
3254
3331
  }
3255
3332
 
3256
3333
  // src/mantine/blocks/proposalVote/template/GeneralTab.tsx
3257
- var GeneralTab2 = ({ block, editor, proposal }) => {
3258
- const [selectedDependency, setSelectedDependency] = useState8(
3259
- () => block?.props?.proposalBlockId || ""
3260
- );
3261
- const blockSupportsDependencies = block?.props?.hasDependencies === true;
3334
+ var GeneralTab2 = ({ block, editor, proposalData }) => {
3335
+ const [selectedDependency, setSelectedDependency] = useState8("");
3336
+ const { dependencies: resolvedDeps, updateDependency: updateDependency2 } = useBlockDependencies(block, editor);
3262
3337
  useEffect8(() => {
3263
3338
  if (!block) return;
3264
- if (!blockSupportsDependencies) {
3265
- setSelectedDependency(block?.props?.proposalBlockId || "");
3266
- return;
3267
- }
3268
- const deps = getDependencies(block);
3269
- const proposalDep = deps?.proposal;
3270
- setSelectedDependency(proposalDep?.blockId || block.props?.proposalBlockId || "");
3271
- }, [
3272
- block?.id,
3273
- blockSupportsDependencies,
3274
- block?.props?.proposalBlockId,
3275
- block?.props?.dependencies
3276
- ]);
3277
- const availableBlocks = useMemo7(() => {
3339
+ const proposalDep = resolvedDeps?.proposal;
3340
+ setSelectedDependency(proposalDep?.blockId || "");
3341
+ }, [block?.id, resolvedDeps]);
3342
+ const availableBlocks = useMemo8(() => {
3278
3343
  if (!editor?.document) return [];
3279
3344
  const proposalBlocks = editor.document.filter((editorBlock) => editorBlock.type === "proposal").map((editorBlock) => ({
3280
3345
  id: editorBlock.id,
@@ -3285,25 +3350,16 @@ var GeneralTab2 = ({ block, editor, proposal }) => {
3285
3350
  return proposalBlocks;
3286
3351
  }, [editor?.document]);
3287
3352
  const hasDependency = Boolean(selectedDependency);
3288
- const showDependencyDropdown = blockSupportsDependencies && !hasDependency;
3353
+ const showDependencyDropdown = !hasDependency;
3289
3354
  const handleUpdateDependency = (blockId) => {
3290
- if (!block || !blockSupportsDependencies) {
3355
+ if (!block) {
3291
3356
  return;
3292
3357
  }
3293
3358
  const nextValue = blockId || "";
3294
- const currentValue = block.props?.proposalBlockId || "";
3295
- updateDependency(editor, block, "proposal", blockId, "proposalVote");
3359
+ updateDependency2("proposal", blockId);
3296
3360
  setSelectedDependency(nextValue);
3297
- if (editor && typeof editor.updateBlock === "function" && currentValue !== nextValue) {
3298
- editor.updateBlock(block, {
3299
- props: {
3300
- ...block.props,
3301
- proposalBlockId: nextValue
3302
- }
3303
- });
3304
- }
3305
3361
  };
3306
- return /* @__PURE__ */ React38.createElement(Stack24, { gap: "lg" }, blockSupportsDependencies && showDependencyDropdown && /* @__PURE__ */ React38.createElement(Stack24, { gap: "md" }, /* @__PURE__ */ React38.createElement(
3362
+ return /* @__PURE__ */ React39.createElement(Stack25, { gap: "lg" }, showDependencyDropdown && /* @__PURE__ */ React39.createElement(Stack25, { gap: "md" }, /* @__PURE__ */ React39.createElement(
3307
3363
  Card5,
3308
3364
  {
3309
3365
  padding: "md",
@@ -3314,9 +3370,9 @@ var GeneralTab2 = ({ block, editor, proposal }) => {
3314
3370
  color: "#f1f3f5"
3315
3371
  }
3316
3372
  },
3317
- /* @__PURE__ */ React38.createElement(Text24, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "\u26A0\uFE0F No Proposal Connected"),
3318
- /* @__PURE__ */ React38.createElement(Text24, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "Please select a proposal block to connect this vote to.")
3319
- ), /* @__PURE__ */ React38.createElement(Text24, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Select Proposal to Vote On"), /* @__PURE__ */ React38.createElement(
3373
+ /* @__PURE__ */ React39.createElement(Text25, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "\u26A0\uFE0F No Proposal Connected"),
3374
+ /* @__PURE__ */ React39.createElement(Text25, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "Please select a proposal block to connect this vote to.")
3375
+ ), /* @__PURE__ */ React39.createElement(Text25, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Select Proposal to Vote On"), /* @__PURE__ */ React39.createElement(
3320
3376
  Select3,
3321
3377
  {
3322
3378
  value: selectedDependency,
@@ -3351,31 +3407,12 @@ var GeneralTab2 = ({ block, editor, proposal }) => {
3351
3407
  }
3352
3408
  }
3353
3409
  }
3354
- ), availableBlocks.length === 0 && /* @__PURE__ */ React38.createElement(Text24, { size: "xs", style: { color: "#868e96" } }, "No proposals available. Create a proposal first.")), blockSupportsDependencies && hasDependency && /* @__PURE__ */ React38.createElement(Stack24, { gap: "md" }, /* @__PURE__ */ React38.createElement(Group9, { justify: "space-between", align: "center" }, /* @__PURE__ */ React38.createElement(Text24, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Connected Proposal"), /* @__PURE__ */ React38.createElement(
3355
- Button9,
3356
- {
3357
- variant: "subtle",
3358
- size: "xs",
3359
- color: "red",
3360
- onClick: () => handleUpdateDependency(null)
3361
- },
3362
- "Disconnect"
3363
- )), /* @__PURE__ */ React38.createElement(
3364
- Card5,
3365
- {
3366
- padding: "sm",
3367
- radius: "md",
3368
- style: { backgroundColor: "#2a2a2a", border: "1px solid #333" }
3369
- },
3370
- /* @__PURE__ */ React38.createElement(Text24, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, proposal?.proposal?.title || "Connected Proposal"),
3371
- proposal?.proposal?.description && /* @__PURE__ */ React38.createElement(Text24, { size: "xs", style: { color: "#adb5bd" } }, proposal.proposal.description)
3372
- )));
3410
+ ), availableBlocks.length === 0 && /* @__PURE__ */ React39.createElement(Text25, { size: "xs", style: { color: "#868e96" } }, "No proposals available. Create a proposal first.")), hasDependency && /* @__PURE__ */ React39.createElement(Stack25, { gap: "md" }, /* @__PURE__ */ React39.createElement(Group9, { justify: "space-between", align: "center" }, /* @__PURE__ */ React39.createElement(Text25, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Connected Proposal"), /* @__PURE__ */ React39.createElement(Button9, { variant: "subtle", size: "xs", color: "red", onClick: () => handleUpdateDependency(null) }, "Disconnect")), /* @__PURE__ */ React39.createElement(Card5, { padding: "sm", radius: "md", style: { backgroundColor: "#2a2a2a", border: "1px solid #333" } }, /* @__PURE__ */ React39.createElement(Text25, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, proposalData?.title || "Connected Proposal"), proposalData?.description && /* @__PURE__ */ React39.createElement(Text25, { size: "xs", style: { color: "#adb5bd" } }, proposalData.description), proposalData?.proposalId && /* @__PURE__ */ React39.createElement(Text25, { size: "xs", style: { color: "#51cf66", marginTop: 4 } }, "Proposal ID: #", proposalData.proposalId), proposalData?.status && /* @__PURE__ */ React39.createElement(Text25, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "Status: ", proposalData.status))));
3373
3411
  };
3374
3412
 
3375
3413
  // src/mantine/blocks/proposalVote/template/TemplateConfig.tsx
3376
3414
  var TemplateConfig2 = ({ editor, block }) => {
3377
3415
  const { closePanel } = usePanelStore();
3378
- const [proposalContractAddress, setProposalContractAddress] = useState9(null);
3379
3416
  const updateProp = useCallback10(
3380
3417
  (key, value) => {
3381
3418
  editor.updateBlock(block, {
@@ -3393,16 +3430,9 @@ var TemplateConfig2 = ({ editor, block }) => {
3393
3430
  },
3394
3431
  [updateProp]
3395
3432
  );
3396
- const proposalBlockId = block?.props?.proposalBlockId;
3397
- const proposalBlock = proposalBlockId ? editor?.document?.find((b) => b.id === proposalBlockId) : null;
3398
- const proposalId = proposalBlock?.props?.proposalId || "";
3399
- const { proposal } = useSharedProposal({
3400
- proposalId,
3401
- contractAddress: proposalContractAddress || "",
3402
- autoFetch: false
3403
- // Don't auto-fetch in template mode
3404
- });
3405
- return /* @__PURE__ */ React39.createElement(
3433
+ const { dependencies } = useBlockDependencies(block, editor);
3434
+ const proposalData = dependencies?.proposal || null;
3435
+ return /* @__PURE__ */ React40.createElement(
3406
3436
  Paper2,
3407
3437
  {
3408
3438
  p: "md",
@@ -3413,7 +3443,7 @@ var TemplateConfig2 = ({ editor, block }) => {
3413
3443
  flexDirection: "column"
3414
3444
  }
3415
3445
  },
3416
- /* @__PURE__ */ React39.createElement(
3446
+ /* @__PURE__ */ React40.createElement(
3417
3447
  "div",
3418
3448
  {
3419
3449
  style: {
@@ -3423,25 +3453,17 @@ var TemplateConfig2 = ({ editor, block }) => {
3423
3453
  marginBottom: "1rem"
3424
3454
  }
3425
3455
  },
3426
- /* @__PURE__ */ React39.createElement(Title2, { order: 3 }, "Proposal Vote Settings"),
3427
- /* @__PURE__ */ React39.createElement(CloseButton2, { onClick: closePanel })
3456
+ /* @__PURE__ */ React40.createElement(Title2, { order: 3 }, "Proposal Vote Settings"),
3457
+ /* @__PURE__ */ React40.createElement(CloseButton2, { onClick: closePanel })
3428
3458
  ),
3429
- /* @__PURE__ */ React39.createElement(
3459
+ /* @__PURE__ */ React40.createElement(
3430
3460
  ReusablePanel,
3431
3461
  {
3432
3462
  extraTabs: [
3433
3463
  {
3434
3464
  label: "General",
3435
3465
  value: "general",
3436
- content: /* @__PURE__ */ React39.createElement(
3437
- GeneralTab2,
3438
- {
3439
- block,
3440
- editor,
3441
- proposal,
3442
- proposalContractAddress
3443
- }
3444
- )
3466
+ content: /* @__PURE__ */ React40.createElement(GeneralTab2, { block, editor, proposalData })
3445
3467
  }
3446
3468
  ],
3447
3469
  context: { editor, block },
@@ -3452,7 +3474,7 @@ var TemplateConfig2 = ({ editor, block }) => {
3452
3474
  };
3453
3475
 
3454
3476
  // src/mantine/blocks/proposalVote/template/TemplateView.tsx
3455
- import { Card as Card6, Group as Group10, Stack as Stack25, Text as Text25, ActionIcon as ActionIcon4, Badge as Badge4 } from "@mantine/core";
3477
+ import { Card as Card6, Group as Group10, Stack as Stack26, Text as Text26, ActionIcon as ActionIcon4, Badge as Badge4 } from "@mantine/core";
3456
3478
  var PROPOSAL_VOTE_TEMPLATE_PANEL_ID = "proposal-vote-template-panel";
3457
3479
  var getStatusColor = (status) => {
3458
3480
  switch (status) {
@@ -3472,12 +3494,12 @@ var getStatusColor = (status) => {
3472
3494
  };
3473
3495
  var ProposalVoteTemplateView = ({ editor, block }) => {
3474
3496
  const panelId = `${PROPOSAL_VOTE_TEMPLATE_PANEL_ID}-${block.id}`;
3475
- const panelContent = useMemo8(
3476
- () => /* @__PURE__ */ React40.createElement(TemplateConfig2, { editor, block }),
3497
+ const panelContent = useMemo9(
3498
+ () => /* @__PURE__ */ React41.createElement(TemplateConfig2, { editor, block }),
3477
3499
  [editor, block]
3478
3500
  );
3479
3501
  const { open } = usePanel(panelId, panelContent);
3480
- return /* @__PURE__ */ React40.createElement(
3502
+ return /* @__PURE__ */ React41.createElement(
3481
3503
  Card6,
3482
3504
  {
3483
3505
  withBorder: true,
@@ -3486,57 +3508,20 @@ var ProposalVoteTemplateView = ({ editor, block }) => {
3486
3508
  style: { width: "100%", cursor: "pointer" },
3487
3509
  onClick: open
3488
3510
  },
3489
- /* @__PURE__ */ React40.createElement(Group10, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React40.createElement(Group10, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React40.createElement(ActionIcon4, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "checklist")), /* @__PURE__ */ React40.createElement(Stack25, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React40.createElement(Text25, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Vote"), /* @__PURE__ */ React40.createElement(Text25, { size: "xs", c: "dimmed", contentEditable: false }, block.props.subtitle || "Cast your vote"))), /* @__PURE__ */ React40.createElement(Badge4, { color: getStatusColor(block.props.status || "open"), variant: "filled", size: "sm" }, (block.props.status || "open").toUpperCase()))
3511
+ /* @__PURE__ */ React41.createElement(Group10, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React41.createElement(Group10, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React41.createElement(ActionIcon4, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "checklist")), /* @__PURE__ */ React41.createElement(Stack26, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React41.createElement(Text26, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Vote"), /* @__PURE__ */ React41.createElement(Text26, { size: "xs", c: "dimmed", contentEditable: false }, block.props.subtitle || "Cast your vote"))), /* @__PURE__ */ React41.createElement(Badge4, { color: getStatusColor(block.props.status || "open"), variant: "filled", size: "sm" }, (block.props.status || "open").toUpperCase()))
3490
3512
  );
3491
3513
  };
3492
3514
 
3493
3515
  // src/mantine/blocks/proposalVote/flow/FlowView.tsx
3494
- import React43, { useMemo as useMemo12 } from "react";
3516
+ import React44, { useMemo as useMemo11 } from "react";
3495
3517
 
3496
3518
  // src/mantine/blocks/proposalVote/flow/FlowConfig.tsx
3497
- import React42 from "react";
3519
+ import React43 from "react";
3498
3520
  import { Paper as Paper3, CloseButton as CloseButton3, Title as Title3 } from "@mantine/core";
3499
3521
 
3500
3522
  // src/mantine/blocks/proposalVote/flow/GeneralTab.tsx
3501
- import React41, { useState as useState10 } from "react";
3502
- import { Stack as Stack26, Text as Text26, Group as Group11, Card as Card7, Button as Button10, Progress as Progress2, Box as Box14, Textarea as Textarea2, Tooltip as Tooltip3 } from "@mantine/core";
3503
- var calculateTimeRemaining = (proposal) => {
3504
- if (!proposal?.proposal.expiration || "never" in proposal.proposal.expiration) {
3505
- return "Never expires";
3506
- }
3507
- if ("at_height" in proposal.proposal.expiration) {
3508
- return `Expires at block ${proposal.proposal.expiration.at_height}`;
3509
- }
3510
- if ("at_time" in proposal.proposal.expiration) {
3511
- const timestamp = proposal.proposal.expiration.at_time;
3512
- let expirationTime;
3513
- if (timestamp.length > 13) {
3514
- expirationTime = parseInt(timestamp) / 1e6;
3515
- } else {
3516
- expirationTime = parseInt(timestamp);
3517
- if (timestamp.length === 10) {
3518
- expirationTime *= 1e3;
3519
- }
3520
- }
3521
- const now = Date.now();
3522
- const diffMs = expirationTime - now;
3523
- const days = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
3524
- const hours = Math.floor(diffMs % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60));
3525
- const minutes = Math.floor(diffMs % (1e3 * 60 * 60) / (1e3 * 60));
3526
- if (diffMs <= 0) return "Expired";
3527
- if (days > 0) return `${days} days ${hours}h ${minutes}m`;
3528
- return `${hours}h ${minutes}m`;
3529
- }
3530
- return "Unknown";
3531
- };
3532
- var calculateOutcome = (proposal) => {
3533
- if (!proposal?.proposal.votes) return "0%";
3534
- const { yes, no, abstain } = proposal.proposal.votes;
3535
- const totalVotes = parseInt(yes) + parseInt(no) + parseInt(abstain);
3536
- if (totalVotes === 0) return "0%";
3537
- const yesPercentage = parseInt(yes) / totalVotes * 100;
3538
- return `${yesPercentage.toFixed(1)}% approve`;
3539
- };
3523
+ import React42, { useState as useState9 } from "react";
3524
+ import { Stack as Stack27, Text as Text27, Group as Group11, Card as Card7, Button as Button10, Progress as Progress2, Box as Box15, Textarea as Textarea2, Tooltip as Tooltip3 } from "@mantine/core";
3540
3525
  var getVoteIcon = (voteType) => {
3541
3526
  switch (voteType) {
3542
3527
  case "yes":
@@ -3551,7 +3536,10 @@ var getVoteIcon = (voteType) => {
3551
3536
  }
3552
3537
  };
3553
3538
  var FlowGeneralTab = ({
3554
- proposal,
3539
+ proposalId,
3540
+ proposalTitle,
3541
+ proposalDescription,
3542
+ proposalStatus,
3555
3543
  userVote,
3556
3544
  proposalContractAddress,
3557
3545
  onVote,
@@ -3559,13 +3547,14 @@ var FlowGeneralTab = ({
3559
3547
  isDisabled
3560
3548
  }) => {
3561
3549
  const disabled = isDisabled?.isDisabled === "disable";
3562
- const [selectedVote, setSelectedVote] = useState10("");
3563
- const [rationale, setRationale] = useState10("");
3564
- const hasSubmittedProposal = Boolean(proposal?.id);
3550
+ const [selectedVote, setSelectedVote] = useState9("");
3551
+ const [rationale, setRationale] = useState9("");
3552
+ const hasSubmittedProposal = Boolean(proposalId);
3553
+ const hasVoted = Boolean(userVote?.vote);
3565
3554
  const handleSlideToSign = () => {
3566
- if (selectedVote && proposal && proposalContractAddress) {
3555
+ if (selectedVote && proposalId && proposalContractAddress) {
3567
3556
  onVote?.({
3568
- proposalId: proposal.id,
3557
+ proposalId: parseInt(proposalId),
3569
3558
  rationale: rationale.trim() || void 0,
3570
3559
  vote: selectedVote,
3571
3560
  proposalContractAddress
@@ -3574,8 +3563,7 @@ var FlowGeneralTab = ({
3574
3563
  setRationale("");
3575
3564
  }
3576
3565
  };
3577
- const hasDependency = Boolean(proposal);
3578
- return /* @__PURE__ */ React41.createElement(Stack26, { gap: "lg" }, !hasSubmittedProposal && /* @__PURE__ */ React41.createElement(
3566
+ return /* @__PURE__ */ React42.createElement(Stack27, { gap: "lg" }, !hasSubmittedProposal && /* @__PURE__ */ React42.createElement(
3579
3567
  Card7,
3580
3568
  {
3581
3569
  padding: "md",
@@ -3586,8 +3574,8 @@ var FlowGeneralTab = ({
3586
3574
  color: "#f1f3f5"
3587
3575
  }
3588
3576
  },
3589
- /* @__PURE__ */ React41.createElement(Group11, { gap: "xs", align: "center" }, /* @__PURE__ */ React41.createElement(
3590
- Box14,
3577
+ /* @__PURE__ */ React42.createElement(Group11, { gap: "xs", align: "center" }, /* @__PURE__ */ React42.createElement(
3578
+ Box15,
3591
3579
  {
3592
3580
  style: {
3593
3581
  width: 8,
@@ -3596,9 +3584,9 @@ var FlowGeneralTab = ({
3596
3584
  borderRadius: "50%"
3597
3585
  }
3598
3586
  }
3599
- ), /* @__PURE__ */ React41.createElement(Text26, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "Waiting for Proposal Submission")),
3600
- /* @__PURE__ */ React41.createElement(Text26, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "The connected proposal needs to be submitted before voting can begin.")
3601
- ), /* @__PURE__ */ React41.createElement(
3587
+ ), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "Waiting for Proposal Submission")),
3588
+ /* @__PURE__ */ React42.createElement(Text27, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "The connected proposal needs to be submitted before voting can begin.")
3589
+ ), /* @__PURE__ */ React42.createElement(
3602
3590
  Card7,
3603
3591
  {
3604
3592
  padding: "lg",
@@ -3610,8 +3598,8 @@ var FlowGeneralTab = ({
3610
3598
  opacity: !hasSubmittedProposal ? 0.6 : 1
3611
3599
  }
3612
3600
  },
3613
- /* @__PURE__ */ React41.createElement(Stack26, { gap: "xs" }, /* @__PURE__ */ React41.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React41.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React41.createElement(
3614
- Box14,
3601
+ /* @__PURE__ */ React42.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React42.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React42.createElement(
3602
+ Box15,
3615
3603
  {
3616
3604
  w: 8,
3617
3605
  h: 8,
@@ -3620,18 +3608,18 @@ var FlowGeneralTab = ({
3620
3608
  borderRadius: "50%"
3621
3609
  }
3622
3610
  }
3623
- ), /* @__PURE__ */ React41.createElement(Text26, { size: "sm", style: { color: "#adb5bd" } }, "Status")), /* @__PURE__ */ React41.createElement(Text26, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? proposal?.proposal.status === "open" ? "Active" : proposal?.proposal.status || "Active" : "Waiting")), /* @__PURE__ */ React41.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React41.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React41.createElement(Box14, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React41.createElement(Text26, { size: "sm", style: { color: "#adb5bd" } }, "Ends in")), /* @__PURE__ */ React41.createElement(Text26, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? calculateTimeRemaining(proposal) : "TBD")), /* @__PURE__ */ React41.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React41.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React41.createElement(Box14, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React41.createElement(Text26, { size: "sm", style: { color: "#adb5bd" } }, "Outcome")), /* @__PURE__ */ React41.createElement(
3624
- Text26,
3611
+ ), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "Status")), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? proposalStatus === "open" ? "Active" : proposalStatus || "Active" : "Waiting")), /* @__PURE__ */ React42.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React42.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Box15, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "Proposal ID")), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React42.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React42.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Box15, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "Title")), /* @__PURE__ */ React42.createElement(
3612
+ Text27,
3625
3613
  {
3626
3614
  size: "sm",
3627
3615
  fw: 500,
3628
3616
  style: {
3629
- color: hasSubmittedProposal ? "#51cf66" : "#868e96"
3617
+ color: hasSubmittedProposal ? "#f1f3f5" : "#868e96"
3630
3618
  }
3631
3619
  },
3632
- hasSubmittedProposal ? calculateOutcome(proposal) : "N/A"
3633
- )), /* @__PURE__ */ React41.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React41.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React41.createElement(Box14, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React41.createElement(Text26, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React41.createElement(Text26, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
3634
- /* @__PURE__ */ React41.createElement(Stack26, { gap: "xs" }, /* @__PURE__ */ React41.createElement(Text26, { size: "sm", style: { color: "#adb5bd" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React41.createElement(
3620
+ hasSubmittedProposal ? proposalTitle || "Untitled" : "N/A"
3621
+ )), /* @__PURE__ */ React42.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React42.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Box15, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "Description")), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#f1f3f5" }, title: proposalDescription }, hasSubmittedProposal ? proposalDescription ? proposalDescription.length > 30 ? proposalDescription.substring(0, 30) + "..." : proposalDescription : "No description" : "N/A")), /* @__PURE__ */ React42.createElement(Group11, { justify: "space-between" }, /* @__PURE__ */ React42.createElement(Group11, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Box15, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
3622
+ /* @__PURE__ */ React42.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React42.createElement(
3635
3623
  Progress2,
3636
3624
  {
3637
3625
  value: hasSubmittedProposal ? 75 : 0,
@@ -3644,7 +3632,7 @@ var FlowGeneralTab = ({
3644
3632
  }
3645
3633
  }
3646
3634
  ))
3647
- ), hasDependency && hasSubmittedProposal && (status === "open" || proposal?.proposal.status === "open") && /* @__PURE__ */ React41.createElement(Stack26, { gap: "lg" }, disabled && isDisabled?.message && /* @__PURE__ */ React41.createElement(
3635
+ ), hasSubmittedProposal && !hasVoted && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React42.createElement(Stack27, { gap: "lg" }, disabled && isDisabled?.message && /* @__PURE__ */ React42.createElement(
3648
3636
  Card7,
3649
3637
  {
3650
3638
  padding: "md",
@@ -3655,8 +3643,8 @@ var FlowGeneralTab = ({
3655
3643
  color: "#f1f3f5"
3656
3644
  }
3657
3645
  },
3658
- /* @__PURE__ */ React41.createElement(Group11, { gap: "xs", align: "center" }, /* @__PURE__ */ React41.createElement(
3659
- Box14,
3646
+ /* @__PURE__ */ React42.createElement(Group11, { gap: "xs", align: "center" }, /* @__PURE__ */ React42.createElement(
3647
+ Box15,
3660
3648
  {
3661
3649
  style: {
3662
3650
  width: 8,
@@ -3665,37 +3653,28 @@ var FlowGeneralTab = ({
3665
3653
  borderRadius: "50%"
3666
3654
  }
3667
3655
  }
3668
- ), /* @__PURE__ */ React41.createElement(Text26, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, isDisabled.message))
3669
- ), /* @__PURE__ */ React41.createElement(Stack26, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React41.createElement(
3670
- Tooltip3,
3671
- {
3672
- key: voteType,
3673
- label: disabled ? isDisabled?.message : void 0,
3674
- disabled: !disabled,
3675
- position: "top"
3656
+ ), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, isDisabled.message))
3657
+ ), /* @__PURE__ */ React42.createElement(Stack27, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React42.createElement(Tooltip3, { key: voteType, label: disabled ? isDisabled?.message : void 0, disabled: !disabled, position: "top" }, /* @__PURE__ */ React42.createElement(
3658
+ Button10,
3659
+ {
3660
+ variant: "outline",
3661
+ leftSection: getVoteIcon(voteType),
3662
+ onClick: () => !disabled && setSelectedVote(voteType),
3663
+ disabled,
3664
+ size: "md",
3665
+ style: {
3666
+ backgroundColor: selectedVote === voteType ? "#333" : "#2a2a2a",
3667
+ borderColor: selectedVote === voteType ? "#51cf66" : "#444",
3668
+ borderWidth: selectedVote === voteType ? "2px" : "1px",
3669
+ color: disabled ? "#666" : "#f1f3f5",
3670
+ justifyContent: "flex-start",
3671
+ padding: "12px",
3672
+ textAlign: "left",
3673
+ opacity: disabled ? 0.5 : 1
3674
+ }
3676
3675
  },
3677
- /* @__PURE__ */ React41.createElement(
3678
- Button10,
3679
- {
3680
- variant: "outline",
3681
- leftSection: getVoteIcon(voteType),
3682
- onClick: () => !disabled && setSelectedVote(voteType),
3683
- disabled,
3684
- size: "md",
3685
- style: {
3686
- backgroundColor: selectedVote === voteType ? "#333" : "#2a2a2a",
3687
- borderColor: selectedVote === voteType ? "#51cf66" : "#444",
3688
- borderWidth: selectedVote === voteType ? "2px" : "1px",
3689
- color: disabled ? "#666" : "#f1f3f5",
3690
- justifyContent: "flex-start",
3691
- padding: "12px",
3692
- textAlign: "left",
3693
- opacity: disabled ? 0.5 : 1
3694
- }
3695
- },
3696
- /* @__PURE__ */ React41.createElement(Text26, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
3697
- )
3698
- ))), /* @__PURE__ */ React41.createElement(Stack26, { gap: "xs" }, /* @__PURE__ */ React41.createElement(Text26, { size: "sm", style: { color: "#adb5bd" } }, "Rationale (optional)"), /* @__PURE__ */ React41.createElement(
3676
+ /* @__PURE__ */ React42.createElement(Text27, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
3677
+ )))), /* @__PURE__ */ React42.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "Rationale (optional)"), /* @__PURE__ */ React42.createElement(
3699
3678
  Textarea2,
3700
3679
  {
3701
3680
  value: rationale,
@@ -3712,7 +3691,7 @@ var FlowGeneralTab = ({
3712
3691
  }
3713
3692
  }
3714
3693
  }
3715
- ))), (status === "executed" || proposal?.proposal.status === "executed") && /* @__PURE__ */ React41.createElement(
3694
+ ))), (status === "executed" || proposalStatus === "executed") && /* @__PURE__ */ React42.createElement(
3716
3695
  Card7,
3717
3696
  {
3718
3697
  padding: "md",
@@ -3722,34 +3701,26 @@ var FlowGeneralTab = ({
3722
3701
  border: "1px solid #333"
3723
3702
  }
3724
3703
  },
3725
- /* @__PURE__ */ React41.createElement(Stack26, { gap: "xs" }, /* @__PURE__ */ React41.createElement(Text26, { fw: 500, size: "sm", style: { color: "#f1f3f5" } }, "Proposal Executed"), /* @__PURE__ */ React41.createElement(Text26, { size: "sm", style: { color: "#adb5bd" } }, "This proposal has been successfully executed."))
3726
- ), hasDependency && !hasSubmittedProposal && /* @__PURE__ */ React41.createElement(Stack26, { gap: "lg" }, /* @__PURE__ */ React41.createElement(Stack26, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React41.createElement(
3727
- Tooltip3,
3704
+ /* @__PURE__ */ React42.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Text27, { fw: 500, size: "sm", style: { color: "#f1f3f5" } }, "Proposal Executed"), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", style: { color: "#adb5bd" } }, "This proposal has been successfully executed."))
3705
+ ), !hasSubmittedProposal && /* @__PURE__ */ React42.createElement(Stack27, { gap: "lg" }, /* @__PURE__ */ React42.createElement(Stack27, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React42.createElement(Tooltip3, { key: voteType, label: "Proposal must be submitted before voting", position: "top" }, /* @__PURE__ */ React42.createElement(
3706
+ Button10,
3728
3707
  {
3729
- key: voteType,
3730
- label: "Proposal must be submitted before voting",
3731
- position: "top"
3708
+ variant: "outline",
3709
+ leftSection: getVoteIcon(voteType),
3710
+ size: "md",
3711
+ disabled: true,
3712
+ style: {
3713
+ backgroundColor: "#1a1a1a",
3714
+ borderColor: "#333",
3715
+ color: "#666",
3716
+ justifyContent: "flex-start",
3717
+ padding: "12px",
3718
+ textAlign: "left",
3719
+ opacity: 0.5
3720
+ }
3732
3721
  },
3733
- /* @__PURE__ */ React41.createElement(
3734
- Button10,
3735
- {
3736
- variant: "outline",
3737
- leftSection: getVoteIcon(voteType),
3738
- size: "md",
3739
- disabled: true,
3740
- style: {
3741
- backgroundColor: "#1a1a1a",
3742
- borderColor: "#333",
3743
- color: "#666",
3744
- justifyContent: "flex-start",
3745
- padding: "12px",
3746
- textAlign: "left",
3747
- opacity: 0.5
3748
- }
3749
- },
3750
- /* @__PURE__ */ React41.createElement(Text26, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
3751
- )
3752
- )))), hasDependency && hasSubmittedProposal && selectedVote && (status === "open" || proposal?.proposal.status === "open") && /* @__PURE__ */ React41.createElement(Tooltip3, { label: disabled ? isDisabled?.message : "Sign to vote", position: "top" }, /* @__PURE__ */ React41.createElement("div", null, /* @__PURE__ */ React41.createElement(
3722
+ /* @__PURE__ */ React42.createElement(Text27, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
3723
+ ))))), hasSubmittedProposal && !hasVoted && selectedVote && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React42.createElement(Tooltip3, { label: disabled ? isDisabled?.message : "Sign to vote", position: "top" }, /* @__PURE__ */ React42.createElement("div", null, /* @__PURE__ */ React42.createElement(
3753
3724
  Button10,
3754
3725
  {
3755
3726
  size: "sm",
@@ -3765,12 +3736,38 @@ var FlowGeneralTab = ({
3765
3736
  }
3766
3737
  },
3767
3738
  "Sign"
3768
- ))));
3739
+ ))), hasVoted && hasSubmittedProposal && /* @__PURE__ */ React42.createElement(
3740
+ Card7,
3741
+ {
3742
+ padding: "md",
3743
+ radius: "md",
3744
+ style: {
3745
+ backgroundColor: "#2a2a2a",
3746
+ border: "1px solid #51cf66",
3747
+ color: "#f1f3f5"
3748
+ }
3749
+ },
3750
+ /* @__PURE__ */ React42.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React42.createElement(Group11, { gap: "xs", align: "center" }, /* @__PURE__ */ React42.createElement(
3751
+ Box15,
3752
+ {
3753
+ style: {
3754
+ width: 8,
3755
+ height: 8,
3756
+ backgroundColor: "#51cf66",
3757
+ borderRadius: "50%"
3758
+ }
3759
+ }
3760
+ ), /* @__PURE__ */ React42.createElement(Text27, { size: "sm", fw: 500, style: { color: "#51cf66" } }, "Vote Submitted")), /* @__PURE__ */ React42.createElement(Text27, { size: "xs", style: { color: "#adb5bd" } }, "You have already voted on this proposal. Your vote:", " ", /* @__PURE__ */ React42.createElement(Text27, { span: true, fw: 500, tt: "capitalize" }, userVote?.vote?.vote)))
3761
+ ));
3769
3762
  };
3770
3763
 
3771
3764
  // src/mantine/blocks/proposalVote/flow/FlowConfig.tsx
3772
3765
  var FlowConfig = ({
3773
- proposal,
3766
+ proposalData,
3767
+ proposalId,
3768
+ proposalTitle,
3769
+ proposalDescription,
3770
+ proposalStatus,
3774
3771
  userVote,
3775
3772
  proposalContractAddress,
3776
3773
  onVote,
@@ -3780,7 +3777,7 @@ var FlowConfig = ({
3780
3777
  isDisabled
3781
3778
  }) => {
3782
3779
  const { closePanel } = usePanelStore();
3783
- return /* @__PURE__ */ React42.createElement(
3780
+ return /* @__PURE__ */ React43.createElement(
3784
3781
  Paper3,
3785
3782
  {
3786
3783
  p: "md",
@@ -3791,7 +3788,7 @@ var FlowConfig = ({
3791
3788
  flexDirection: "column"
3792
3789
  }
3793
3790
  },
3794
- /* @__PURE__ */ React42.createElement(
3791
+ /* @__PURE__ */ React43.createElement(
3795
3792
  "div",
3796
3793
  {
3797
3794
  style: {
@@ -3801,20 +3798,24 @@ var FlowConfig = ({
3801
3798
  marginBottom: "1rem"
3802
3799
  }
3803
3800
  },
3804
- /* @__PURE__ */ React42.createElement(Title3, { order: 3 }, "Proposal Vote"),
3805
- /* @__PURE__ */ React42.createElement(CloseButton3, { onClick: closePanel })
3801
+ /* @__PURE__ */ React43.createElement(Title3, { order: 3 }, "Proposal Vote"),
3802
+ /* @__PURE__ */ React43.createElement(CloseButton3, { onClick: closePanel })
3806
3803
  ),
3807
- /* @__PURE__ */ React42.createElement(
3804
+ /* @__PURE__ */ React43.createElement(
3808
3805
  ReusablePanel,
3809
3806
  {
3810
3807
  extraTabs: [
3811
3808
  {
3812
3809
  label: "General",
3813
3810
  value: "general",
3814
- content: /* @__PURE__ */ React42.createElement(
3811
+ content: /* @__PURE__ */ React43.createElement(
3815
3812
  FlowGeneralTab,
3816
3813
  {
3817
- proposal,
3814
+ proposalData,
3815
+ proposalId,
3816
+ proposalTitle,
3817
+ proposalDescription,
3818
+ proposalStatus,
3818
3819
  userVote,
3819
3820
  proposalContractAddress,
3820
3821
  onVote,
@@ -3832,114 +3833,17 @@ var FlowConfig = ({
3832
3833
  };
3833
3834
 
3834
3835
  // src/mantine/blocks/proposalVote/flow/FlowView.tsx
3835
- import { Card as Card8, Group as Group12, Stack as Stack27, Text as Text27, ActionIcon as ActionIcon5, Alert as Alert5, Skeleton, Badge as Badge5 } from "@mantine/core";
3836
-
3837
- // src/mantine/blocks/proposalVote/flow/useFlowBusinessLogic.ts
3838
- import { useEffect as useEffect9, useState as useState11, useMemo as useMemo11 } from "react";
3839
-
3840
- // src/mantine/blocks/hooks/useBlockDependencies.ts
3841
- import { useMemo as useMemo10 } from "react";
3842
-
3843
- // src/mantine/blocks/hooks/useDependsOn.ts
3844
- import { useMemo as useMemo9 } from "react";
3845
- function useDependsOn(block, editor) {
3846
- const editorDocument = editor?.document;
3847
- const dependsOnConfig = useMemo9(() => {
3848
- if (!block?.props?.dependsOn) {
3849
- return null;
3850
- }
3851
- try {
3852
- const config = typeof block.props.dependsOn === "string" ? JSON.parse(block.props.dependsOn) : block.props.dependsOn;
3853
- console.log("[useDependsOn] Parsed dependsOn config:", config);
3854
- return config;
3855
- } catch (error) {
3856
- console.error("[useDependsOn] Failed to parse dependsOn prop:", error);
3857
- return null;
3858
- }
3859
- }, [block?.props?.dependsOn]);
3860
- const dependencies = useMemo9(() => {
3861
- return getDependencies(block);
3862
- }, [block?.props?.dependencies]);
3863
- const resolvedDependencies = useMemo9(() => {
3864
- if (!block || !editorDocument) {
3865
- return {};
3866
- }
3867
- const deps = dependencies;
3868
- if (!deps) {
3869
- return {};
3870
- }
3871
- const resolved = {};
3872
- Object.entries(deps).forEach(([depType, config]) => {
3873
- if (!config || !config.blockId || config.blockId === "") {
3874
- resolved[depType] = null;
3875
- return;
3876
- }
3877
- const targetBlock = editorDocument.find(
3878
- (docBlock) => docBlock.id === config.blockId && docBlock.type === depType
3879
- );
3880
- if (!targetBlock) {
3881
- resolved[depType] = null;
3882
- return;
3883
- }
3884
- const extracted = {};
3885
- Object.entries(config.subscribes).forEach(([prop, shouldSubscribe]) => {
3886
- if (shouldSubscribe === true && targetBlock.props && prop in targetBlock.props) {
3887
- extracted[prop] = targetBlock.props[prop];
3888
- }
3889
- });
3890
- resolved[depType] = extracted;
3891
- });
3892
- console.log("[useDependsOn] Resolved dependencies:", resolved);
3893
- return resolved;
3894
- }, [
3895
- dependencies,
3896
- // Re-run when dependencies change
3897
- editorDocument,
3898
- // Re-run when document changes (more stable than editor?.document)
3899
- block?.id
3900
- ]);
3901
- return {
3902
- dependsOnConfig,
3903
- dependencies,
3904
- resolvedDependencies
3905
- };
3906
- }
3907
-
3908
- // src/mantine/blocks/hooks/useBlockDependencies.ts
3909
- function useBlockDependencies(block, blockType, editor, hasDependencies = true) {
3910
- const editorDocument = editor?.document;
3911
- const updateBlock = editor?.updateBlock;
3912
- const blockObj = typeof block === "string" ? editorDocument?.find((b) => b.id === block) : block;
3913
- console.log(
3914
- `[useBlockDependencies] Hook called for blockId: ${blockObj?.id}, blockType: ${blockType}`
3915
- );
3916
- if (!hasDependencies || !blockObj?.props?.dependsOn) {
3917
- console.log(
3918
- `[useBlockDependencies] Block ${blockObj?.id} doesn't support dependencies, returning {}`
3919
- );
3920
- return {};
3921
- }
3922
- useMemo10(() => {
3923
- if (updateBlock && blockObj && !blockObj.props.dependencies) {
3924
- console.log(`[useBlockDependencies] Initializing dependencies for ${blockObj.id}`);
3925
- initializeBlockDependencies(editor, blockObj, blockType);
3926
- }
3927
- }, [blockObj?.id, blockType, updateBlock]);
3928
- const { resolvedDependencies } = useDependsOn(blockObj, editor);
3929
- console.log(
3930
- `[useBlockDependencies] Returning resolved dependencies for ${blockObj?.id}:`,
3931
- resolvedDependencies
3932
- );
3933
- return resolvedDependencies;
3934
- }
3836
+ import { Card as Card8, Group as Group12, Stack as Stack28, Text as Text28, ActionIcon as ActionIcon5, Alert as Alert5, Badge as Badge5 } from "@mantine/core";
3935
3837
 
3936
3838
  // src/mantine/blocks/proposalVote/flow/useFlowBusinessLogic.ts
3839
+ import { useState as useState10, useMemo as useMemo10, useEffect as useEffect9 } from "react";
3937
3840
  var useFlowBusinessLogic = ({ block, editor }) => {
3938
3841
  const { blockRequirements } = useBlocknoteContext();
3939
- const [proposalContractAddress, setProposalContractAddress] = useState11(null);
3940
- const [localError, setLocalError] = useState11(null);
3941
- const [userVote, setUserVote] = useState11(null);
3942
- const hydratedBlock = useMemo11(() => {
3842
+ const coreAddress = blockRequirements?.proposal?.coreAddress;
3843
+ const [localError, setLocalError] = useState10(null);
3844
+ const [userVote, setUserVote] = useState10(null);
3845
+ const [proposalContractAddress, setProposalContractAddress] = useState10(null);
3846
+ const hydratedBlock = useMemo10(() => {
3943
3847
  if (editor && typeof editor.getUserProps === "function") {
3944
3848
  return {
3945
3849
  ...block,
@@ -3948,59 +3852,64 @@ var useFlowBusinessLogic = ({ block, editor }) => {
3948
3852
  }
3949
3853
  return block;
3950
3854
  }, [block, editor]);
3951
- const dependencies = useBlockDependencies(
3952
- hydratedBlock,
3953
- "proposalVote",
3954
- editor,
3955
- hydratedBlock.props.hasDependencies
3956
- );
3855
+ const { dependencies } = useBlockDependencies(hydratedBlock, editor);
3957
3856
  let handlers = null;
3958
3857
  try {
3959
3858
  handlers = useBlocknoteHandlers();
3960
3859
  } catch {
3961
3860
  handlers = null;
3962
3861
  }
3963
- const requirements = blockRequirements?.proposal;
3964
- const proposalDependency = dependencies?.proposal;
3965
- const proposalBlock = proposalDependency?.blockId ? editor?.document?.find((b) => b.id === proposalDependency.blockId) : null;
3966
- const proposalId = proposalBlock && editor && typeof editor.getUserProps === "function" && editor.getUserProps(proposalBlock)?.proposalId || "";
3967
- const { proposal, loading, error } = useSharedProposal({
3968
- proposalId,
3969
- contractAddress: proposalContractAddress || "",
3970
- autoFetch: !!proposalContractAddress && !!proposalId
3971
- });
3862
+ const proposalData = dependencies?.proposal || null;
3863
+ const proposalId = proposalData?.proposalId || "";
3864
+ const proposalTitle = proposalData?.title || "";
3865
+ const proposalDescription = proposalData?.description || "";
3866
+ const proposalStatus = proposalData?.status || "draft";
3972
3867
  useEffect9(() => {
3973
- if (!handlers || !requirements?.coreAddress || !proposalId) {
3868
+ if (!handlers || !coreAddress || !proposalId) {
3869
+ setProposalContractAddress(null);
3974
3870
  return;
3975
3871
  }
3976
- const fetchPolicyAddress = async () => {
3872
+ let isCancelled = false;
3873
+ const loadProposalContract = async () => {
3977
3874
  try {
3978
- const { proposalContractAddress: fetchedProposalContractAddress } = await handlers.getProposalContractAddress({
3979
- coreAddress: requirements.coreAddress
3980
- });
3981
- setProposalContractAddress(fetchedProposalContractAddress);
3982
- } catch (err) {
3983
- console.error("Failed to fetch proposal contract address:", err);
3984
- setLocalError("Failed to load proposal contract address");
3875
+ const { proposalContractAddress: resolvedAddress } = await handlers.getProposalContractAddress({ coreAddress });
3876
+ if (!isCancelled) {
3877
+ setProposalContractAddress(resolvedAddress);
3878
+ }
3879
+ } catch (error) {
3880
+ if (!isCancelled) {
3881
+ console.error("[ProposalVote] Failed to fetch proposal contract address:", error);
3882
+ }
3985
3883
  }
3986
3884
  };
3987
- fetchPolicyAddress();
3988
- }, [handlers, requirements?.coreAddress, proposalId]);
3885
+ void loadProposalContract();
3886
+ return () => {
3887
+ isCancelled = true;
3888
+ };
3889
+ }, [handlers, coreAddress, proposalId]);
3989
3890
  useEffect9(() => {
3990
- if (!handlers || !proposalContractAddress || !proposalId || !proposal) {
3891
+ if (!handlers || !proposalContractAddress || !proposalId) {
3991
3892
  return;
3992
3893
  }
3894
+ let isCancelled = false;
3993
3895
  const loadUserVote = async () => {
3994
3896
  try {
3995
- const user = await handlers.getCurrentUser();
3897
+ const user = handlers.getCurrentUser();
3996
3898
  const vote = await handlers.getVote(proposalContractAddress, proposalId, user.address);
3997
- setUserVote(vote);
3998
- } catch (err) {
3999
- console.error("Failed to load user vote:", err);
3899
+ if (!isCancelled) {
3900
+ setUserVote(vote);
3901
+ }
3902
+ } catch (error) {
3903
+ if (!isCancelled) {
3904
+ console.error("[ProposalVote] Failed to fetch user vote:", error);
3905
+ }
4000
3906
  }
4001
3907
  };
4002
- loadUserVote();
4003
- }, [handlers, proposalContractAddress, proposalId, proposal]);
3908
+ void loadUserVote();
3909
+ return () => {
3910
+ isCancelled = true;
3911
+ };
3912
+ }, [handlers, proposalContractAddress, proposalId]);
4004
3913
  const updateProp = (key, value) => {
4005
3914
  editor.updateBlock(hydratedBlock, {
4006
3915
  props: {
@@ -4014,11 +3923,7 @@ var useFlowBusinessLogic = ({ block, editor }) => {
4014
3923
  try {
4015
3924
  await handlers.vote(voteParams);
4016
3925
  const user = await handlers.getCurrentUser();
4017
- const vote = await handlers.getVote(
4018
- voteParams.proposalContractAddress,
4019
- voteParams.proposalId.toString(),
4020
- user.address
4021
- );
3926
+ const vote = await handlers.getVote(voteParams.proposalContractAddress, voteParams.proposalId.toString(), user.address);
4022
3927
  setUserVote(vote);
4023
3928
  } catch (err) {
4024
3929
  console.error("Failed to vote:", err);
@@ -4028,22 +3933,22 @@ var useFlowBusinessLogic = ({ block, editor }) => {
4028
3933
  const handleIconChange = (icon) => {
4029
3934
  updateProp("icon", icon);
4030
3935
  };
4031
- const status = proposal?.proposal?.status || hydratedBlock.props.status || "open";
3936
+ const status = proposalStatus || hydratedBlock.props.status || "open";
4032
3937
  return {
4033
3938
  // Block props
4034
3939
  hydratedBlock,
4035
- title: hydratedBlock.props.title,
4036
- subtitle: hydratedBlock.props.subtitle,
3940
+ title: proposalTitle || hydratedBlock.props.title,
3941
+ subtitle: proposalDescription || hydratedBlock.props.subtitle,
4037
3942
  icon: hydratedBlock.props.icon,
4038
3943
  status,
4039
- // Proposal data
4040
- proposal,
3944
+ // Proposal data (from dependency, not blockchain)
3945
+ proposalData,
3946
+ proposalId,
3947
+ proposalTitle,
3948
+ proposalDescription,
4041
3949
  userVote,
4042
- proposalContractAddress,
4043
- // Loading states
4044
- loading,
3950
+ proposalContractAddress: proposalContractAddress || "",
4045
3951
  // Errors
4046
- error,
4047
3952
  localError,
4048
3953
  // Handlers
4049
3954
  handleVote,
@@ -4071,25 +3976,16 @@ var getStatusColor2 = (status) => {
4071
3976
  };
4072
3977
  var ProposalVoteFlowView = ({ block, editor, isDisabled }) => {
4073
3978
  const panelId = `${PROPOSAL_VOTE_FLOW_PANEL_ID}-${block.id}`;
4074
- const {
4075
- hydratedBlock,
4076
- title,
4077
- subtitle,
4078
- icon,
4079
- status,
4080
- proposal,
4081
- userVote,
4082
- proposalContractAddress,
4083
- loading,
4084
- error,
4085
- localError,
4086
- handleVote
4087
- } = useFlowBusinessLogic({ block, editor });
4088
- const panelContent = useMemo12(
4089
- () => /* @__PURE__ */ React43.createElement(
3979
+ const { hydratedBlock, title, subtitle, icon, status, proposalData, proposalId, proposalTitle, proposalDescription, userVote, proposalContractAddress, localError, handleVote } = useFlowBusinessLogic({ block, editor });
3980
+ const panelContent = useMemo11(
3981
+ () => /* @__PURE__ */ React44.createElement(
4090
3982
  FlowConfig,
4091
3983
  {
4092
- proposal,
3984
+ proposalData,
3985
+ proposalId,
3986
+ proposalTitle,
3987
+ proposalDescription,
3988
+ proposalStatus: status,
4093
3989
  userVote,
4094
3990
  proposalContractAddress,
4095
3991
  onVote: handleVote,
@@ -4099,41 +3995,10 @@ var ProposalVoteFlowView = ({ block, editor, isDisabled }) => {
4099
3995
  isDisabled
4100
3996
  }
4101
3997
  ),
4102
- [
4103
- proposal,
4104
- userVote,
4105
- proposalContractAddress,
4106
- handleVote,
4107
- hydratedBlock,
4108
- status,
4109
- editor,
4110
- isDisabled
4111
- ]
3998
+ [proposalData, proposalId, proposalTitle, proposalDescription, status, userVote, proposalContractAddress, handleVote, hydratedBlock, editor, isDisabled]
4112
3999
  );
4113
4000
  const { open } = usePanel(panelId, panelContent);
4114
- return /* @__PURE__ */ React43.createElement(
4115
- Card8,
4116
- {
4117
- withBorder: true,
4118
- padding: "md",
4119
- radius: "md",
4120
- style: { width: "100%", cursor: "pointer" },
4121
- onClick: open
4122
- },
4123
- loading && /* @__PURE__ */ React43.createElement(Stack27, null, /* @__PURE__ */ React43.createElement(Skeleton, { height: 20, width: "70%" }), /* @__PURE__ */ React43.createElement(Skeleton, { height: 16 }), /* @__PURE__ */ React43.createElement(Skeleton, { height: 16, width: "40%" })),
4124
- (error || localError) && /* @__PURE__ */ React43.createElement(Alert5, { color: "red", title: "Error", mb: "md" }, String(error || localError)),
4125
- !loading && !error && !localError && /* @__PURE__ */ React43.createElement(Group12, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React43.createElement(Group12, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React43.createElement(
4126
- ActionIcon5,
4127
- {
4128
- variant: "light",
4129
- color: "blue",
4130
- size: "xl",
4131
- radius: "xl",
4132
- style: { flexShrink: 0 }
4133
- },
4134
- getIcon(icon, 24, 1.5, "checklist")
4135
- ), /* @__PURE__ */ React43.createElement(Stack27, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React43.createElement(Text27, { fw: 500, size: "sm", contentEditable: false }, proposal?.proposal?.title || title || "Proposal Vote"), /* @__PURE__ */ React43.createElement(Text27, { size: "xs", c: "dimmed", contentEditable: false }, proposal?.proposal?.description || subtitle || "Cast your vote"))), /* @__PURE__ */ React43.createElement(Badge5, { color: getStatusColor2(status), variant: "filled", size: "sm" }, status.toUpperCase()))
4136
- );
4001
+ return /* @__PURE__ */ React44.createElement(Card8, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer" }, onClick: open }, localError && /* @__PURE__ */ React44.createElement(Alert5, { color: "red", title: "Error", mb: "md" }, String(localError)), !localError && /* @__PURE__ */ React44.createElement(Group12, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React44.createElement(Group12, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React44.createElement(ActionIcon5, { variant: "light", color: "blue", size: "xl", radius: "xl", style: { flexShrink: 0 } }, getIcon(icon, 24, 1.5, "checklist")), /* @__PURE__ */ React44.createElement(Stack28, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React44.createElement(Text28, { fw: 500, size: "sm", contentEditable: false }, "Proposal Vote"), /* @__PURE__ */ React44.createElement(Text28, { size: "xs", c: "dimmed", contentEditable: false }, "Cast your vote"))), /* @__PURE__ */ React44.createElement(Badge5, { color: getStatusColor2(status), variant: "filled", size: "sm" }, status.toUpperCase())));
4137
4002
  };
4138
4003
 
4139
4004
  // src/mantine/blocks/proposalVote/ProposalVoteBlock.tsx
@@ -4142,7 +4007,7 @@ function ProposalVoteBlock({ editor, block }) {
4142
4007
  const { actions } = useBlockConditions(block, editor);
4143
4008
  console.log("Rendering ProposalVoteBlock with actions:", actions);
4144
4009
  if (editable) {
4145
- return /* @__PURE__ */ React44.createElement(ProposalVoteTemplateView, { editor, block });
4010
+ return /* @__PURE__ */ React45.createElement(ProposalVoteTemplateView, { editor, block });
4146
4011
  }
4147
4012
  const conditionConfig = parseConditionConfig(block.props.conditions);
4148
4013
  const hasVisibility = hasVisibilityConditions(conditionConfig);
@@ -4162,7 +4027,7 @@ function ProposalVoteBlock({ editor, block }) {
4162
4027
  shouldDisable,
4163
4028
  actions
4164
4029
  });
4165
- return /* @__PURE__ */ React44.createElement(
4030
+ return /* @__PURE__ */ React45.createElement(
4166
4031
  ProposalVoteFlowView,
4167
4032
  {
4168
4033
  block,
@@ -4186,21 +4051,15 @@ var ProposalVoteBlockSpec = createReactBlockSpec4(
4186
4051
  proposal: {
4187
4052
  blockId: "",
4188
4053
  subscribes: {
4189
- proposalId: true
4054
+ proposalId: true,
4055
+ title: true,
4056
+ description: true,
4057
+ status: true,
4058
+ icon: true
4190
4059
  }
4191
4060
  }
4192
4061
  })
4193
4062
  },
4194
- // Legacy dependency fields (for backward compatibility)
4195
- proposalBlockId: {
4196
- default: ""
4197
- },
4198
- hasDependencies: {
4199
- default: true
4200
- },
4201
- dependencies: {
4202
- default: ""
4203
- },
4204
4063
  // Display props (collaborative)
4205
4064
  title: {
4206
4065
  default: ""
@@ -4231,28 +4090,79 @@ var ProposalVoteBlockSpec = createReactBlockSpec4(
4231
4090
  {
4232
4091
  render: (props) => {
4233
4092
  const ixoProps = props;
4234
- return /* @__PURE__ */ React45.createElement(ProposalVoteBlock, { ...ixoProps });
4093
+ return /* @__PURE__ */ React46.createElement(ProposalVoteBlock, { ...ixoProps });
4094
+ }
4095
+ }
4096
+ );
4097
+
4098
+ // src/mantine/context/types.ts
4099
+ var StakeType = {
4100
+ Delegate: "delegate",
4101
+ Undelegate: "undelegate",
4102
+ Redelegate: "redelegate",
4103
+ WithdrawDelegatorReward: "withdraw_delegator_reward"
4104
+ };
4105
+ var AuthzExecActionTypes = {
4106
+ Delegate: "/cosmos.staking.v1beta1.MsgDelegate",
4107
+ Undelegate: "/cosmos.staking.v1beta1.MsgUndelegate",
4108
+ Redelegate: "/cosmos.staking.v1beta1.MsgBeginRedelegate",
4109
+ ClaimRewards: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
4110
+ Custom: "custom"
4111
+ };
4112
+ var ValidatorActionType = /* @__PURE__ */ ((ValidatorActionType2) => {
4113
+ ValidatorActionType2["CreateValidator"] = "/cosmos.staking.v1beta1.MsgCreateValidator";
4114
+ ValidatorActionType2["EditValidator"] = "/cosmos.staking.v1beta1.MsgEditValidator";
4115
+ ValidatorActionType2["UnjailValidator"] = "/cosmos.slashing.v1beta1.MsgUnjail";
4116
+ ValidatorActionType2["WithdrawValidatorCommission"] = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission";
4117
+ return ValidatorActionType2;
4118
+ })(ValidatorActionType || {});
4119
+
4120
+ // src/mantine/context/hooks/useSharedProposal.ts
4121
+ import { useState as useState11, useEffect as useEffect10, useCallback as useCallback11 } from "react";
4122
+ var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
4123
+ const { sharedProposals, fetchSharedProposal, invalidateProposal, subscribeToProposal } = useBlocknoteContext();
4124
+ const [localProposal, setLocalProposal] = useState11(null);
4125
+ const cacheKey = `${contractAddress}:${proposalId}`;
4126
+ useEffect10(() => {
4127
+ if (!proposalId || !contractAddress || !autoFetch) return;
4128
+ fetchSharedProposal(proposalId, contractAddress).then(setLocalProposal).catch((error) => {
4129
+ console.error("Failed to fetch proposal:", error);
4130
+ });
4131
+ }, [proposalId, contractAddress, fetchSharedProposal, autoFetch]);
4132
+ useEffect10(() => {
4133
+ const proposal = subscribeToProposal(cacheKey);
4134
+ if (proposal) {
4135
+ setLocalProposal(proposal);
4235
4136
  }
4236
- }
4237
- );
4137
+ }, [subscribeToProposal, cacheKey]);
4138
+ const refetch = useCallback11(() => fetchSharedProposal(proposalId, contractAddress, true), [fetchSharedProposal, proposalId, contractAddress]);
4139
+ const invalidate = useCallback11(() => invalidateProposal(proposalId), [invalidateProposal, proposalId]);
4140
+ return {
4141
+ proposal: localProposal,
4142
+ loading: sharedProposals[cacheKey]?.loading ?? false,
4143
+ error: sharedProposals[cacheKey]?.error,
4144
+ refetch,
4145
+ invalidate
4146
+ };
4147
+ };
4238
4148
 
4239
4149
  // src/mantine/blocks/proposal/ProposalBlockSpec.tsx
4240
- import React53 from "react";
4150
+ import React54 from "react";
4241
4151
  import { createReactBlockSpec as createReactBlockSpec5 } from "@blocknote/react";
4242
4152
 
4243
4153
  // src/mantine/blocks/proposal/ProposalBlock.tsx
4244
- import React52 from "react";
4154
+ import React53 from "react";
4245
4155
 
4246
4156
  // src/mantine/blocks/proposal/template/TemplateView.tsx
4247
- import React48, { useMemo as useMemo13 } from "react";
4157
+ import React49, { useMemo as useMemo12 } from "react";
4248
4158
 
4249
4159
  // src/mantine/blocks/proposal/template/TemplateConfig.tsx
4250
- import React47, { useCallback as useCallback11 } from "react";
4160
+ import React48, { useCallback as useCallback12 } from "react";
4251
4161
  import { Paper as Paper4, CloseButton as CloseButton4, Title as Title4 } from "@mantine/core";
4252
4162
 
4253
4163
  // src/mantine/blocks/proposal/template/GeneralTab.tsx
4254
- import React46, { useEffect as useEffect10, useState as useState12 } from "react";
4255
- import { Stack as Stack28, Text as Text28, TextInput as TextInput5, Textarea as Textarea3 } from "@mantine/core";
4164
+ import React47, { useEffect as useEffect11, useState as useState12 } from "react";
4165
+ import { Stack as Stack29, Text as Text29, TextInput as TextInput5, Textarea as Textarea3 } from "@mantine/core";
4256
4166
  var GeneralTab3 = ({
4257
4167
  title,
4258
4168
  description,
@@ -4264,16 +4174,16 @@ var GeneralTab3 = ({
4264
4174
  const [localTitle, setLocalTitle] = useState12(title || "");
4265
4175
  const [localDescription, setLocalDescription] = useState12(description || "");
4266
4176
  const [localIcon, setLocalIcon] = useState12(icon || "\u{1F4DD}");
4267
- useEffect10(() => {
4177
+ useEffect11(() => {
4268
4178
  setLocalTitle(title || "");
4269
4179
  }, [title]);
4270
- useEffect10(() => {
4180
+ useEffect11(() => {
4271
4181
  setLocalDescription(description || "");
4272
4182
  }, [description]);
4273
- useEffect10(() => {
4183
+ useEffect11(() => {
4274
4184
  setLocalIcon(icon || "\u{1F4DD}");
4275
4185
  }, [icon]);
4276
- return /* @__PURE__ */ React46.createElement(Stack28, { gap: "lg" }, /* @__PURE__ */ React46.createElement(Stack28, { gap: "xs" }, /* @__PURE__ */ React46.createElement(Text28, { size: "sm", fw: 600, style: { color: "#f1f3f5" } }, "Title"), /* @__PURE__ */ React46.createElement(
4186
+ return /* @__PURE__ */ React47.createElement(Stack29, { gap: "lg" }, /* @__PURE__ */ React47.createElement(Stack29, { gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 600, style: { color: "#f1f3f5" } }, "Title"), /* @__PURE__ */ React47.createElement(
4277
4187
  TextInput5,
4278
4188
  {
4279
4189
  placeholder: "e.g. Proposal Title",
@@ -4291,7 +4201,7 @@ var GeneralTab3 = ({
4291
4201
  }
4292
4202
  }
4293
4203
  }
4294
- )), /* @__PURE__ */ React46.createElement(Stack28, { gap: "xs" }, /* @__PURE__ */ React46.createElement(Text28, { size: "sm", fw: 600, style: { color: "#f1f3f5" } }, "Icon"), /* @__PURE__ */ React46.createElement(
4204
+ )), /* @__PURE__ */ React47.createElement(Stack29, { gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 600, style: { color: "#f1f3f5" } }, "Icon"), /* @__PURE__ */ React47.createElement(
4295
4205
  TextInput5,
4296
4206
  {
4297
4207
  placeholder: "e.g. \u{1F4DD}",
@@ -4311,7 +4221,7 @@ var GeneralTab3 = ({
4311
4221
  }
4312
4222
  }
4313
4223
  }
4314
- )), /* @__PURE__ */ React46.createElement(Stack28, { gap: "xs" }, /* @__PURE__ */ React46.createElement(Text28, { size: "sm", fw: 600, style: { color: "#f1f3f5" } }, "Description"), /* @__PURE__ */ React46.createElement(
4224
+ )), /* @__PURE__ */ React47.createElement(Stack29, { gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 600, style: { color: "#f1f3f5" } }, "Description"), /* @__PURE__ */ React47.createElement(
4315
4225
  Textarea3,
4316
4226
  {
4317
4227
  placeholder: "Describe what this proposal is about",
@@ -4336,7 +4246,7 @@ var GeneralTab3 = ({
4336
4246
  // src/mantine/blocks/proposal/template/TemplateConfig.tsx
4337
4247
  var TemplateConfig3 = ({ editor, block }) => {
4338
4248
  const { closePanel } = usePanelStore();
4339
- const updateProp = useCallback11(
4249
+ const updateProp = useCallback12(
4340
4250
  (key, value) => {
4341
4251
  editor.updateBlock(block, {
4342
4252
  props: {
@@ -4347,7 +4257,7 @@ var TemplateConfig3 = ({ editor, block }) => {
4347
4257
  },
4348
4258
  [editor, block]
4349
4259
  );
4350
- return /* @__PURE__ */ React47.createElement(
4260
+ return /* @__PURE__ */ React48.createElement(
4351
4261
  Paper4,
4352
4262
  {
4353
4263
  p: "md",
@@ -4358,7 +4268,7 @@ var TemplateConfig3 = ({ editor, block }) => {
4358
4268
  flexDirection: "column"
4359
4269
  }
4360
4270
  },
4361
- /* @__PURE__ */ React47.createElement(
4271
+ /* @__PURE__ */ React48.createElement(
4362
4272
  "div",
4363
4273
  {
4364
4274
  style: {
@@ -4368,17 +4278,17 @@ var TemplateConfig3 = ({ editor, block }) => {
4368
4278
  marginBottom: "1rem"
4369
4279
  }
4370
4280
  },
4371
- /* @__PURE__ */ React47.createElement(Title4, { order: 3 }, "Proposal Settings"),
4372
- /* @__PURE__ */ React47.createElement(CloseButton4, { onClick: closePanel })
4281
+ /* @__PURE__ */ React48.createElement(Title4, { order: 3 }, "Proposal Settings"),
4282
+ /* @__PURE__ */ React48.createElement(CloseButton4, { onClick: closePanel })
4373
4283
  ),
4374
- /* @__PURE__ */ React47.createElement(
4284
+ /* @__PURE__ */ React48.createElement(
4375
4285
  ReusablePanel,
4376
4286
  {
4377
4287
  extraTabs: [
4378
4288
  {
4379
4289
  label: "General",
4380
4290
  value: "general",
4381
- content: /* @__PURE__ */ React47.createElement(
4291
+ content: /* @__PURE__ */ React48.createElement(
4382
4292
  GeneralTab3,
4383
4293
  {
4384
4294
  title: block.props.title || "",
@@ -4398,16 +4308,16 @@ var TemplateConfig3 = ({ editor, block }) => {
4398
4308
  };
4399
4309
 
4400
4310
  // src/mantine/blocks/proposal/template/TemplateView.tsx
4401
- import { Card as Card9, Group as Group13, Stack as Stack29, Text as Text29, ActionIcon as ActionIcon6 } from "@mantine/core";
4311
+ import { Card as Card9, Group as Group13, Stack as Stack30, Text as Text30, ActionIcon as ActionIcon6 } from "@mantine/core";
4402
4312
  var PROPOSAL_TEMPLATE_PANEL_ID = "proposal-template-panel";
4403
4313
  var ProposalTemplateView = ({ editor, block }) => {
4404
4314
  const panelId = `${PROPOSAL_TEMPLATE_PANEL_ID}-${block.id}`;
4405
- const panelContent = useMemo13(
4406
- () => /* @__PURE__ */ React48.createElement(TemplateConfig3, { editor, block }),
4315
+ const panelContent = useMemo12(
4316
+ () => /* @__PURE__ */ React49.createElement(TemplateConfig3, { editor, block }),
4407
4317
  [editor, block]
4408
4318
  );
4409
4319
  const { open } = usePanel(panelId, panelContent);
4410
- return /* @__PURE__ */ React48.createElement(
4320
+ return /* @__PURE__ */ React49.createElement(
4411
4321
  Card9,
4412
4322
  {
4413
4323
  withBorder: true,
@@ -4416,16 +4326,16 @@ var ProposalTemplateView = ({ editor, block }) => {
4416
4326
  style: { width: "100%", cursor: "pointer" },
4417
4327
  onClick: open
4418
4328
  },
4419
- /* @__PURE__ */ React48.createElement(Group13, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React48.createElement(Group13, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React48.createElement(ActionIcon6, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "file-text")), /* @__PURE__ */ React48.createElement(Stack29, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React48.createElement(Text29, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Title"), /* @__PURE__ */ React48.createElement(Text29, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Proposal description"))), /* @__PURE__ */ React48.createElement(Text29, { size: "xs", c: "dimmed", contentEditable: false }, block.props.status || "draft"))
4329
+ /* @__PURE__ */ React49.createElement(Group13, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React49.createElement(Group13, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React49.createElement(ActionIcon6, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "file-text")), /* @__PURE__ */ React49.createElement(Stack30, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React49.createElement(Text30, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Title"), /* @__PURE__ */ React49.createElement(Text30, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Proposal description"))), /* @__PURE__ */ React49.createElement(Text30, { size: "xs", c: "dimmed", contentEditable: false }, block.props.status || "draft"))
4420
4330
  );
4421
4331
  };
4422
4332
 
4423
4333
  // src/mantine/blocks/proposal/flow/FlowView.tsx
4424
- import React51, { useMemo as useMemo14 } from "react";
4334
+ import React52, { useMemo as useMemo13 } from "react";
4425
4335
 
4426
4336
  // src/mantine/blocks/proposal/components/OnChainProposalCard.tsx
4427
- import React49 from "react";
4428
- import { Card as Card10, Group as Group14, Stack as Stack30, Text as Text30, Skeleton as Skeleton2, Badge as Badge6, Button as Button11, ActionIcon as ActionIcon7 } from "@mantine/core";
4337
+ import React50 from "react";
4338
+ import { Card as Card10, Group as Group14, Stack as Stack31, Text as Text31, Skeleton as Skeleton2, Badge as Badge6, Button as Button11, ActionIcon as ActionIcon7 } from "@mantine/core";
4429
4339
  var statusColor = {
4430
4340
  open: "#4dabf7",
4431
4341
  passed: "#51cf66",
@@ -4455,7 +4365,7 @@ var OnChainProposalCard = ({
4455
4365
  onExecute,
4456
4366
  isExecuting = false
4457
4367
  }) => {
4458
- return /* @__PURE__ */ React49.createElement(
4368
+ return /* @__PURE__ */ React50.createElement(
4459
4369
  Card10,
4460
4370
  {
4461
4371
  shadow: "sm",
@@ -4468,9 +4378,9 @@ var OnChainProposalCard = ({
4468
4378
  },
4469
4379
  onClick
4470
4380
  },
4471
- isFetching && /* @__PURE__ */ React49.createElement(Stack30, null, /* @__PURE__ */ React49.createElement(Skeleton2, { height: 20, width: "70%" }), /* @__PURE__ */ React49.createElement(Skeleton2, { height: 16 }), /* @__PURE__ */ React49.createElement(Skeleton2, { height: 16, width: "40%" })),
4472
- error && /* @__PURE__ */ React49.createElement(Text30, { size: "sm", c: "red" }, typeof error === "string" ? error : error.message || "An error occurred while loading the proposal."),
4473
- !isFetching && /* @__PURE__ */ React49.createElement(Group14, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React49.createElement(Group14, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React49.createElement(ActionIcon7, { variant: "light", color: "blue", size: "xl", radius: "xl", style: { flexShrink: 0 } }, getIcon(icon, 24, 1.5, "file-text")), /* @__PURE__ */ React49.createElement(Stack30, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React49.createElement(Group14, { gap: "xs" }, /* @__PURE__ */ React49.createElement(Text30, { size: "md", fw: 600 }, title || "Proposal"), /* @__PURE__ */ React49.createElement(Badge6, { color: statusColor[status], variant: "filled", size: "sm", radius: "sm" }, status.replace(/_/g, " ").toUpperCase())), /* @__PURE__ */ React49.createElement(Text30, { size: "sm", c: "dimmed" }, getDisplayDescription(description)), status === "passed" && onExecute && /* @__PURE__ */ React49.createElement(
4381
+ isFetching && /* @__PURE__ */ React50.createElement(Stack31, null, /* @__PURE__ */ React50.createElement(Skeleton2, { height: 20, width: "70%" }), /* @__PURE__ */ React50.createElement(Skeleton2, { height: 16 }), /* @__PURE__ */ React50.createElement(Skeleton2, { height: 16, width: "40%" })),
4382
+ error && /* @__PURE__ */ React50.createElement(Text31, { size: "sm", c: "red" }, typeof error === "string" ? error : error.message || "An error occurred while loading the proposal."),
4383
+ !isFetching && /* @__PURE__ */ React50.createElement(Group14, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React50.createElement(Group14, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React50.createElement(ActionIcon7, { variant: "light", color: "blue", size: "xl", radius: "xl", style: { flexShrink: 0 } }, getIcon(icon, 24, 1.5, "file-text")), /* @__PURE__ */ React50.createElement(Stack31, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React50.createElement(Group14, { gap: "xs" }, /* @__PURE__ */ React50.createElement(Text31, { size: "md", fw: 600 }, title || "Proposal"), /* @__PURE__ */ React50.createElement(Badge6, { color: statusColor[status], variant: "filled", size: "sm", radius: "sm" }, status.replace(/_/g, " ").toUpperCase())), /* @__PURE__ */ React50.createElement(Text31, { size: "sm", c: "dimmed" }, getDisplayDescription(description)))), status === "passed" && onExecute && /* @__PURE__ */ React50.createElement(
4474
4384
  Button11,
4475
4385
  {
4476
4386
  size: "sm",
@@ -4481,39 +4391,30 @@ var OnChainProposalCard = ({
4481
4391
  e.stopPropagation();
4482
4392
  onExecute();
4483
4393
  },
4484
- mt: "xs",
4485
- w: "fit-content"
4394
+ style: { flexShrink: 0 }
4486
4395
  },
4487
4396
  "Execute"
4488
- ))))
4397
+ ))
4489
4398
  );
4490
4399
  };
4491
4400
 
4492
4401
  // src/mantine/blocks/proposal/flow/FlowConfig.tsx
4493
- import React50, { useCallback as useCallback12, useState as useState14 } from "react";
4402
+ import React51, { useCallback as useCallback13, useState as useState14 } from "react";
4494
4403
  import {
4495
4404
  Paper as Paper5,
4496
4405
  CloseButton as CloseButton5,
4497
4406
  Title as Title5,
4498
- Stack as Stack31,
4407
+ Stack as Stack32,
4499
4408
  TextInput as TextInput6,
4500
4409
  Textarea as Textarea4,
4501
4410
  Button as Button12,
4502
- Text as Text31,
4411
+ Text as Text32,
4503
4412
  Card as Card11
4504
4413
  } from "@mantine/core";
4505
4414
 
4506
4415
  // src/mantine/blocks/proposal/flow/useFlowBusinessLogic.ts
4507
- import { useEffect as useEffect11, useState as useState13 } from "react";
4508
- var CHAIN_STATUSES = [
4509
- "open",
4510
- "passed",
4511
- "rejected",
4512
- "executed",
4513
- "closed",
4514
- "execution_failed",
4515
- "veto_timelock"
4516
- ];
4416
+ import { useEffect as useEffect12, useState as useState13 } from "react";
4417
+ var CHAIN_STATUSES = ["open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
4517
4418
  var isChainStatus = (value) => {
4518
4419
  return CHAIN_STATUSES.includes(value);
4519
4420
  };
@@ -4556,7 +4457,7 @@ var useFlowBusinessLogic2 = ({ block, editor }) => {
4556
4457
  props: { ...block.props, ...nextProps }
4557
4458
  });
4558
4459
  };
4559
- useEffect11(() => {
4460
+ useEffect12(() => {
4560
4461
  if (!handlers || !coreAddress || !proposalId) {
4561
4462
  setProposalContractAddress(null);
4562
4463
  return;
@@ -4579,7 +4480,7 @@ var useFlowBusinessLogic2 = ({ block, editor }) => {
4579
4480
  isCancelled = true;
4580
4481
  };
4581
4482
  }, [handlers, coreAddress, proposalId]);
4582
- useEffect11(() => {
4483
+ useEffect12(() => {
4583
4484
  if (!proposal) return;
4584
4485
  const chainStatus = proposal.proposal.status;
4585
4486
  const parsedStatus = parseStatus(chainStatus);
@@ -4625,7 +4526,7 @@ var useFlowBusinessLogic2 = ({ block, editor }) => {
4625
4526
  description: localDescription
4626
4527
  };
4627
4528
  const createdProposalId = await handlers.createProposal(params);
4628
- updateBlockProps({ proposalId: createdProposalId });
4529
+ updateBlockProps({ proposalId: createdProposalId, status: "open" });
4629
4530
  return createdProposalId;
4630
4531
  };
4631
4532
  return {
@@ -4660,7 +4561,7 @@ var FlowConfig2 = ({ editor, block }) => {
4660
4561
  editor
4661
4562
  });
4662
4563
  const isProposalCreated = !!proposalId;
4663
- const updateProp = useCallback12(
4564
+ const updateProp = useCallback13(
4664
4565
  (key, value) => {
4665
4566
  editor.updateBlock(block, {
4666
4567
  props: {
@@ -4697,7 +4598,7 @@ var FlowConfig2 = ({ editor, block }) => {
4697
4598
  setIsCreating(false);
4698
4599
  }
4699
4600
  };
4700
- return /* @__PURE__ */ React50.createElement(
4601
+ return /* @__PURE__ */ React51.createElement(
4701
4602
  Paper5,
4702
4603
  {
4703
4604
  p: "md",
@@ -4708,7 +4609,7 @@ var FlowConfig2 = ({ editor, block }) => {
4708
4609
  flexDirection: "column"
4709
4610
  }
4710
4611
  },
4711
- /* @__PURE__ */ React50.createElement(
4612
+ /* @__PURE__ */ React51.createElement(
4712
4613
  "div",
4713
4614
  {
4714
4615
  style: {
@@ -4718,10 +4619,10 @@ var FlowConfig2 = ({ editor, block }) => {
4718
4619
  marginBottom: "1rem"
4719
4620
  }
4720
4621
  },
4721
- /* @__PURE__ */ React50.createElement(Title5, { order: 3 }, "Create Proposal"),
4722
- /* @__PURE__ */ React50.createElement(CloseButton5, { onClick: closePanel })
4622
+ /* @__PURE__ */ React51.createElement(Title5, { order: 3 }, "Create Proposal"),
4623
+ /* @__PURE__ */ React51.createElement(CloseButton5, { onClick: closePanel })
4723
4624
  ),
4724
- /* @__PURE__ */ React50.createElement(Stack31, { gap: "lg", style: { flex: 1, overflow: "auto" } }, coreAddress && /* @__PURE__ */ React50.createElement(Card11, { padding: "sm", radius: "md", withBorder: true }, /* @__PURE__ */ React50.createElement(Text31, { size: "xs", c: "dimmed" }, "Core Address:", " ", /* @__PURE__ */ React50.createElement(Text31, { span: true, ff: "monospace", c: "bright" }, coreAddress.slice(0, 20), "...", coreAddress.slice(-10)))), /* @__PURE__ */ React50.createElement(
4625
+ /* @__PURE__ */ React51.createElement(Stack32, { gap: "lg", style: { flex: 1, overflow: "auto" } }, coreAddress && /* @__PURE__ */ React51.createElement(Card11, { padding: "sm", radius: "md", withBorder: true }, /* @__PURE__ */ React51.createElement(Text32, { size: "xs", c: "dimmed" }, "Core Address:", " ", /* @__PURE__ */ React51.createElement(Text32, { span: true, ff: "monospace", c: "bright" }, coreAddress.slice(0, 20), "...", coreAddress.slice(-10)))), /* @__PURE__ */ React51.createElement(
4725
4626
  TextInput6,
4726
4627
  {
4727
4628
  label: "Title",
@@ -4732,7 +4633,7 @@ var FlowConfig2 = ({ editor, block }) => {
4732
4633
  required: true,
4733
4634
  disabled: isProposalCreated
4734
4635
  }
4735
- ), /* @__PURE__ */ React50.createElement(
4636
+ ), /* @__PURE__ */ React51.createElement(
4736
4637
  Textarea4,
4737
4638
  {
4738
4639
  label: "Description",
@@ -4744,7 +4645,7 @@ var FlowConfig2 = ({ editor, block }) => {
4744
4645
  required: true,
4745
4646
  disabled: isProposalCreated
4746
4647
  }
4747
- ), errors.general && /* @__PURE__ */ React50.createElement(Text31, { size: "sm", c: "red" }, errors.general), isProposalCreated && /* @__PURE__ */ React50.createElement(
4648
+ ), errors.general && /* @__PURE__ */ React51.createElement(Text32, { size: "sm", c: "red" }, errors.general), isProposalCreated && /* @__PURE__ */ React51.createElement(
4748
4649
  Card11,
4749
4650
  {
4750
4651
  padding: "md",
@@ -4752,9 +4653,9 @@ var FlowConfig2 = ({ editor, block }) => {
4752
4653
  withBorder: true,
4753
4654
  style: { borderColor: "var(--mantine-color-green-6)" }
4754
4655
  },
4755
- /* @__PURE__ */ React50.createElement(Text31, { fw: 500, size: "sm", c: "green" }, "Proposal Created Successfully"),
4756
- /* @__PURE__ */ React50.createElement(Text31, { size: "sm", c: "dimmed" }, "Your proposal has been created and is now open for voting.")
4757
- ), /* @__PURE__ */ React50.createElement(
4656
+ /* @__PURE__ */ React51.createElement(Text32, { fw: 500, size: "sm", c: "green" }, "Proposal Created Successfully"),
4657
+ /* @__PURE__ */ React51.createElement(Text32, { size: "sm", c: "dimmed" }, "Your proposal has been created and is now open for voting.")
4658
+ ), /* @__PURE__ */ React51.createElement(
4758
4659
  Button12,
4759
4660
  {
4760
4661
  fullWidth: true,
@@ -4784,9 +4685,9 @@ var ProposalFlowView = ({ block, editor }) => {
4784
4685
  handleExecuteProposal,
4785
4686
  handleIconChange
4786
4687
  } = useFlowBusinessLogic2({ block, editor });
4787
- const panelContent = useMemo14(() => /* @__PURE__ */ React51.createElement(FlowConfig2, { editor, block }), [editor, block]);
4688
+ const panelContent = useMemo13(() => /* @__PURE__ */ React52.createElement(FlowConfig2, { editor, block }), [editor, block]);
4788
4689
  const { open } = usePanel(panelId, panelContent);
4789
- return /* @__PURE__ */ React51.createElement(
4690
+ return /* @__PURE__ */ React52.createElement(
4790
4691
  OnChainProposalCard,
4791
4692
  {
4792
4693
  title,
@@ -4808,9 +4709,9 @@ var ProposalFlowView = ({ block, editor }) => {
4808
4709
  // src/mantine/blocks/proposal/ProposalBlock.tsx
4809
4710
  function ProposalBlock({ editor, block }) {
4810
4711
  if (editor.isEditable) {
4811
- return /* @__PURE__ */ React52.createElement(ProposalTemplateView, { editor, block });
4712
+ return /* @__PURE__ */ React53.createElement(ProposalTemplateView, { editor, block });
4812
4713
  }
4813
- return /* @__PURE__ */ React52.createElement(ProposalFlowView, { block, editor });
4714
+ return /* @__PURE__ */ React53.createElement(ProposalFlowView, { block, editor });
4814
4715
  }
4815
4716
 
4816
4717
  // src/mantine/blocks/proposal/ProposalBlockSpec.tsx
@@ -4849,21 +4750,21 @@ var ProposalBlockSpec = createReactBlockSpec5(
4849
4750
  {
4850
4751
  render: (props) => {
4851
4752
  const ixoProps = props;
4852
- return /* @__PURE__ */ React53.createElement(ProposalBlock, { ...ixoProps });
4753
+ return /* @__PURE__ */ React54.createElement(ProposalBlock, { ...ixoProps });
4853
4754
  }
4854
4755
  }
4855
4756
  );
4856
4757
 
4857
4758
  // src/mantine/blocks/proposalActions/ProposalActionsBlockSpec.tsx
4858
- import React56 from "react";
4759
+ import React57 from "react";
4859
4760
  import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react";
4860
4761
 
4861
4762
  // src/mantine/blocks/proposalActions/ProposalActionsBlock.tsx
4862
- import React55, { useCallback as useCallback13 } from "react";
4763
+ import React56, { useCallback as useCallback14 } from "react";
4863
4764
 
4864
4765
  // src/mantine/blocks/proposalActions/components/ActionsCard.tsx
4865
- import React54 from "react";
4866
- import { Card as Card12, Group as Group15, Text as Text32, Badge as Badge7, Stack as Stack32, ActionIcon as ActionIcon8, Button as Button13, Box as Box16, ScrollArea } from "@mantine/core";
4766
+ import React55 from "react";
4767
+ import { Card as Card12, Group as Group15, Text as Text33, Badge as Badge7, Stack as Stack33, ActionIcon as ActionIcon8, Button as Button13, Box as Box17, ScrollArea } from "@mantine/core";
4867
4768
  var getActionSummary = (action) => {
4868
4769
  switch (action.type) {
4869
4770
  case "Spend":
@@ -4895,7 +4796,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
4895
4796
  }
4896
4797
  onClick();
4897
4798
  };
4898
- return /* @__PURE__ */ React54.createElement(
4799
+ return /* @__PURE__ */ React55.createElement(
4899
4800
  Card12,
4900
4801
  {
4901
4802
  shadow: "sm",
@@ -4912,8 +4813,8 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
4912
4813
  },
4913
4814
  onClick: handleCardClick
4914
4815
  },
4915
- /* @__PURE__ */ React54.createElement(Group15, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React54.createElement(Group15, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React54.createElement(
4916
- Box16,
4816
+ /* @__PURE__ */ React55.createElement(Group15, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React55.createElement(Group15, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React55.createElement(
4817
+ Box17,
4917
4818
  {
4918
4819
  style: {
4919
4820
  width: 48,
@@ -4928,7 +4829,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
4928
4829
  }
4929
4830
  },
4930
4831
  "\u{1F4CB}"
4931
- ), /* @__PURE__ */ React54.createElement(Stack32, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React54.createElement(Group15, { justify: "space-between", align: "center" }, /* @__PURE__ */ React54.createElement(Text32, { size: "md", fw: 600, style: { color: "#f1f3f5" } }, "Proposal Actions (", actions.length, ")"), /* @__PURE__ */ React54.createElement(
4832
+ ), /* @__PURE__ */ React55.createElement(Stack33, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React55.createElement(Group15, { justify: "space-between", align: "center" }, /* @__PURE__ */ React55.createElement(Text33, { size: "md", fw: 600, style: { color: "#f1f3f5" } }, "Proposal Actions (", actions.length, ")"), /* @__PURE__ */ React55.createElement(
4932
4833
  Button13,
4933
4834
  {
4934
4835
  size: "xs",
@@ -4945,7 +4846,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
4945
4846
  }
4946
4847
  },
4947
4848
  "Add Action"
4948
- )), actions.length === 0 ? /* @__PURE__ */ React54.createElement(Text32, { size: "sm", style: { color: "#868e96" } }, 'No actions added yet. Click "Add Action" to get started.') : /* @__PURE__ */ React54.createElement(ScrollArea, { h: actions.length > 3 ? 150 : void 0, style: { marginTop: 8 } }, /* @__PURE__ */ React54.createElement(Stack32, { gap: "xs" }, actions.map((action, index) => /* @__PURE__ */ React54.createElement(
4849
+ )), actions.length === 0 ? /* @__PURE__ */ React55.createElement(Text33, { size: "sm", style: { color: "#868e96" } }, 'No actions added yet. Click "Add Action" to get started.') : /* @__PURE__ */ React55.createElement(ScrollArea, { h: actions.length > 3 ? 150 : void 0, style: { marginTop: 8 } }, /* @__PURE__ */ React55.createElement(Stack33, { gap: "xs" }, actions.map((action, index) => /* @__PURE__ */ React55.createElement(
4949
4850
  Card12,
4950
4851
  {
4951
4852
  key: index,
@@ -4956,7 +4857,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
4956
4857
  borderColor: "#333"
4957
4858
  }
4958
4859
  },
4959
- /* @__PURE__ */ React54.createElement(Group15, { justify: "space-between", align: "center" }, /* @__PURE__ */ React54.createElement(Group15, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React54.createElement(
4860
+ /* @__PURE__ */ React55.createElement(Group15, { justify: "space-between", align: "center" }, /* @__PURE__ */ React55.createElement(Group15, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React55.createElement(
4960
4861
  Badge7,
4961
4862
  {
4962
4863
  size: "sm",
@@ -4967,7 +4868,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
4967
4868
  }
4968
4869
  },
4969
4870
  action.type
4970
- ), /* @__PURE__ */ React54.createElement(Text32, { size: "sm", style: { color: "#adb5bd" } }, getActionSummary(action))), /* @__PURE__ */ React54.createElement(Group15, { gap: 4 }, /* @__PURE__ */ React54.createElement(
4871
+ ), /* @__PURE__ */ React55.createElement(Text33, { size: "sm", style: { color: "#adb5bd" } }, getActionSummary(action))), /* @__PURE__ */ React55.createElement(Group15, { gap: 4 }, /* @__PURE__ */ React55.createElement(
4971
4872
  ActionIcon8,
4972
4873
  {
4973
4874
  size: "sm",
@@ -4980,7 +4881,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onAddAction, onEditAction, on
4980
4881
  style: { color: "#4dabf7" }
4981
4882
  },
4982
4883
  "\u270F\uFE0F"
4983
- ), /* @__PURE__ */ React54.createElement(
4884
+ ), /* @__PURE__ */ React55.createElement(
4984
4885
  ActionIcon8,
4985
4886
  {
4986
4887
  size: "sm",
@@ -5014,7 +4915,7 @@ var ProposalActionsBlock = ({ block, editor }) => {
5014
4915
  };
5015
4916
  const storedActionsJson = block?.props?.actions || "[]";
5016
4917
  const actions = parseActions(storedActionsJson);
5017
- const updateActions = useCallback13(
4918
+ const updateActions = useCallback14(
5018
4919
  (newActions) => {
5019
4920
  editor.updateBlock(block, {
5020
4921
  props: {
@@ -5024,20 +4925,20 @@ var ProposalActionsBlock = ({ block, editor }) => {
5024
4925
  },
5025
4926
  [block, editor]
5026
4927
  );
5027
- const handleAddAction = useCallback13(() => {
4928
+ const handleAddAction = useCallback14(() => {
5028
4929
  }, []);
5029
- const handleEditAction = useCallback13(() => {
4930
+ const handleEditAction = useCallback14(() => {
5030
4931
  }, []);
5031
- const handleRemoveAction = useCallback13(
4932
+ const handleRemoveAction = useCallback14(
5032
4933
  (index) => {
5033
4934
  const newActions = actions.filter((_, i) => i !== index);
5034
4935
  updateActions(newActions);
5035
4936
  },
5036
4937
  [actions, updateActions]
5037
4938
  );
5038
- const handleCardClick = useCallback13(() => {
4939
+ const handleCardClick = useCallback14(() => {
5039
4940
  }, []);
5040
- return /* @__PURE__ */ React55.createElement(ActionsCard, { actions, isSelected: true, onClick: handleCardClick, onAddAction: handleAddAction, onEditAction: handleEditAction, onRemoveAction: handleRemoveAction });
4941
+ return /* @__PURE__ */ React56.createElement(ActionsCard, { actions, isSelected: true, onClick: handleCardClick, onAddAction: handleAddAction, onEditAction: handleEditAction, onRemoveAction: handleRemoveAction });
5041
4942
  };
5042
4943
 
5043
4944
  // src/mantine/blocks/proposalActions/ProposalActionsBlockSpec.tsx
@@ -5075,19 +4976,19 @@ var ProposalActionsBlockSpec = createReactBlockSpec6(
5075
4976
  content: "none"
5076
4977
  },
5077
4978
  {
5078
- render: (props) => /* @__PURE__ */ React56.createElement(ProposalActionsBlock, { ...props })
4979
+ render: (props) => /* @__PURE__ */ React57.createElement(ProposalActionsBlock, { ...props })
5079
4980
  }
5080
4981
  );
5081
4982
 
5082
4983
  // src/mantine/blocks/proposalActions/ProposalActionsDrawer.tsx
5083
- import React87, { useState as useState21, useEffect as useEffect13, useMemo as useMemo15 } from "react";
5084
- import { Stack as Stack63, Select as Select10, Button as Button19, Group as Group26, Text as Text40, Card as Card18, Badge as Badge10, Divider as Divider3, ScrollArea as ScrollArea3, Alert as Alert8, Tabs as Tabs2, SimpleGrid, Paper as Paper6 } from "@mantine/core";
4984
+ import React88, { useState as useState21, useEffect as useEffect14, useMemo as useMemo14 } from "react";
4985
+ import { Stack as Stack64, Select as Select10, Button as Button19, Group as Group26, Text as Text41, Card as Card18, Badge as Badge10, Divider as Divider3, ScrollArea as ScrollArea3, Alert as Alert8, Tabs as Tabs2, SimpleGrid, Paper as Paper6 } from "@mantine/core";
5085
4986
 
5086
4987
  // src/mantine/blocks/proposalActions/components/SpendActionForm.tsx
5087
- import React57 from "react";
5088
- import { TextInput as TextInput7, Stack as Stack33 } from "@mantine/core";
4988
+ import React58 from "react";
4989
+ import { TextInput as TextInput7, Stack as Stack34 } from "@mantine/core";
5089
4990
  var SpendActionForm = ({ data, onChange }) => {
5090
- return /* @__PURE__ */ React57.createElement(Stack33, null, /* @__PURE__ */ React57.createElement(
4991
+ return /* @__PURE__ */ React58.createElement(Stack34, null, /* @__PURE__ */ React58.createElement(
5091
4992
  TextInput7,
5092
4993
  {
5093
4994
  label: "Recipient Address",
@@ -5107,7 +5008,7 @@ var SpendActionForm = ({ data, onChange }) => {
5107
5008
  }
5108
5009
  }
5109
5010
  }
5110
- ), /* @__PURE__ */ React57.createElement(
5011
+ ), /* @__PURE__ */ React58.createElement(
5111
5012
  TextInput7,
5112
5013
  {
5113
5014
  label: "Denomination",
@@ -5127,7 +5028,7 @@ var SpendActionForm = ({ data, onChange }) => {
5127
5028
  }
5128
5029
  }
5129
5030
  }
5130
- ), /* @__PURE__ */ React57.createElement(
5031
+ ), /* @__PURE__ */ React58.createElement(
5131
5032
  TextInput7,
5132
5033
  {
5133
5034
  label: "Amount",
@@ -5151,8 +5052,8 @@ var SpendActionForm = ({ data, onChange }) => {
5151
5052
  };
5152
5053
 
5153
5054
  // src/mantine/blocks/proposalActions/components/UpdateMembersActionForm.tsx
5154
- import React58, { useState as useState15 } from "react";
5155
- import { Stack as Stack34, TextInput as TextInput8, NumberInput as NumberInput2, Button as Button14, Group as Group16, Text as Text33, Card as Card13, Badge as Badge8, ActionIcon as ActionIcon9, Divider as Divider2, ScrollArea as ScrollArea2 } from "@mantine/core";
5055
+ import React59, { useState as useState15 } from "react";
5056
+ import { Stack as Stack35, TextInput as TextInput8, NumberInput as NumberInput2, Button as Button14, Group as Group16, Text as Text34, Card as Card13, Badge as Badge8, ActionIcon as ActionIcon9, Divider as Divider2, ScrollArea as ScrollArea2 } from "@mantine/core";
5156
5057
  var UpdateMembersActionForm = ({ data, onChange }) => {
5157
5058
  const [newMember, setNewMember] = useState15({ address: "", weight: 1 });
5158
5059
  const [newRemoveAddress, setNewRemoveAddress] = useState15("");
@@ -5195,7 +5096,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
5195
5096
  }
5196
5097
  }
5197
5098
  };
5198
- return /* @__PURE__ */ React58.createElement(Stack34, null, /* @__PURE__ */ React58.createElement(Stack34, { gap: "xs" }, /* @__PURE__ */ React58.createElement(Text33, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Add"), /* @__PURE__ */ React58.createElement(ScrollArea2, { h: 150 }, /* @__PURE__ */ React58.createElement(Stack34, { gap: "xs" }, (data.add || []).map((member, index) => /* @__PURE__ */ React58.createElement(
5099
+ return /* @__PURE__ */ React59.createElement(Stack35, null, /* @__PURE__ */ React59.createElement(Stack35, { gap: "xs" }, /* @__PURE__ */ React59.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Add"), /* @__PURE__ */ React59.createElement(ScrollArea2, { h: 150 }, /* @__PURE__ */ React59.createElement(Stack35, { gap: "xs" }, (data.add || []).map((member, index) => /* @__PURE__ */ React59.createElement(
5199
5100
  Card13,
5200
5101
  {
5201
5102
  key: index,
@@ -5206,7 +5107,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
5206
5107
  borderColor: "#333"
5207
5108
  }
5208
5109
  },
5209
- /* @__PURE__ */ React58.createElement(Group16, { justify: "space-between" }, /* @__PURE__ */ React58.createElement("div", null, /* @__PURE__ */ React58.createElement(Text33, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, member.address.slice(0, 20), "..."), /* @__PURE__ */ React58.createElement(
5110
+ /* @__PURE__ */ React59.createElement(Group16, { justify: "space-between" }, /* @__PURE__ */ React59.createElement("div", null, /* @__PURE__ */ React59.createElement(Text34, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, member.address.slice(0, 20), "..."), /* @__PURE__ */ React59.createElement(
5210
5111
  Badge8,
5211
5112
  {
5212
5113
  size: "sm",
@@ -5217,8 +5118,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
5217
5118
  },
5218
5119
  "Weight: ",
5219
5120
  member.weight
5220
- )), /* @__PURE__ */ React58.createElement(ActionIcon9, { size: "sm", variant: "subtle", onClick: () => handleRemoveMember(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
5221
- )))), /* @__PURE__ */ React58.createElement(Group16, { grow: true }, /* @__PURE__ */ React58.createElement(TextInput8, { placeholder: "Member address", value: newMember.address, onChange: (e) => setNewMember({ ...newMember, address: e.currentTarget.value }), styles: inputStyles29 }), /* @__PURE__ */ React58.createElement(
5121
+ )), /* @__PURE__ */ React59.createElement(ActionIcon9, { size: "sm", variant: "subtle", onClick: () => handleRemoveMember(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
5122
+ )))), /* @__PURE__ */ React59.createElement(Group16, { grow: true }, /* @__PURE__ */ React59.createElement(TextInput8, { placeholder: "Member address", value: newMember.address, onChange: (e) => setNewMember({ ...newMember, address: e.currentTarget.value }), styles: inputStyles29 }), /* @__PURE__ */ React59.createElement(
5222
5123
  NumberInput2,
5223
5124
  {
5224
5125
  placeholder: "Weight",
@@ -5227,7 +5128,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
5227
5128
  min: 1,
5228
5129
  styles: inputStyles29
5229
5130
  }
5230
- ), /* @__PURE__ */ React58.createElement(
5131
+ ), /* @__PURE__ */ React59.createElement(
5231
5132
  Button14,
5232
5133
  {
5233
5134
  size: "sm",
@@ -5240,7 +5141,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
5240
5141
  }
5241
5142
  },
5242
5143
  "\u2795 Add"
5243
- ))), /* @__PURE__ */ React58.createElement(Divider2, { color: "#333" }), /* @__PURE__ */ React58.createElement(Stack34, { gap: "xs" }, /* @__PURE__ */ React58.createElement(Text33, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Remove"), /* @__PURE__ */ React58.createElement(ScrollArea2, { h: 100 }, /* @__PURE__ */ React58.createElement(Stack34, { gap: "xs" }, (data.remove || []).map((item, index) => /* @__PURE__ */ React58.createElement(
5144
+ ))), /* @__PURE__ */ React59.createElement(Divider2, { color: "#333" }), /* @__PURE__ */ React59.createElement(Stack35, { gap: "xs" }, /* @__PURE__ */ React59.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Remove"), /* @__PURE__ */ React59.createElement(ScrollArea2, { h: 100 }, /* @__PURE__ */ React59.createElement(Stack35, { gap: "xs" }, (data.remove || []).map((item, index) => /* @__PURE__ */ React59.createElement(
5244
5145
  Card13,
5245
5146
  {
5246
5147
  key: index,
@@ -5251,8 +5152,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
5251
5152
  borderColor: "#333"
5252
5153
  }
5253
5154
  },
5254
- /* @__PURE__ */ React58.createElement(Group16, { justify: "space-between" }, /* @__PURE__ */ React58.createElement(Text33, { size: "sm", style: { color: "#adb5bd" } }, item.addr.slice(0, 30), "..."), /* @__PURE__ */ React58.createElement(ActionIcon9, { size: "sm", variant: "subtle", onClick: () => handleRemoveRemoveAddress(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
5255
- )))), /* @__PURE__ */ React58.createElement(Group16, { grow: true }, /* @__PURE__ */ React58.createElement(TextInput8, { placeholder: "Address to remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles29 }), /* @__PURE__ */ React58.createElement(
5155
+ /* @__PURE__ */ React59.createElement(Group16, { justify: "space-between" }, /* @__PURE__ */ React59.createElement(Text34, { size: "sm", style: { color: "#adb5bd" } }, item.addr.slice(0, 30), "..."), /* @__PURE__ */ React59.createElement(ActionIcon9, { size: "sm", variant: "subtle", onClick: () => handleRemoveRemoveAddress(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
5156
+ )))), /* @__PURE__ */ React59.createElement(Group16, { grow: true }, /* @__PURE__ */ React59.createElement(TextInput8, { placeholder: "Address to remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles29 }), /* @__PURE__ */ React59.createElement(
5256
5157
  Button14,
5257
5158
  {
5258
5159
  size: "sm",
@@ -5269,8 +5170,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
5269
5170
  };
5270
5171
 
5271
5172
  // src/mantine/blocks/proposalActions/components/StakeActionForm.tsx
5272
- import React59 from "react";
5273
- import { Stack as Stack35, TextInput as TextInput9, Select as Select4, NumberInput as NumberInput3 } from "@mantine/core";
5173
+ import React60 from "react";
5174
+ import { Stack as Stack36, TextInput as TextInput9, Select as Select4, NumberInput as NumberInput3 } from "@mantine/core";
5274
5175
  var stakeTypeOptions = [
5275
5176
  { value: StakeType.Delegate, label: "Delegate" },
5276
5177
  { value: StakeType.Undelegate, label: "Undelegate" },
@@ -5315,7 +5216,7 @@ var selectStyles = {
5315
5216
  var StakeActionForm = ({ data, onChange }) => {
5316
5217
  const isRedelegate = data.stakeType === StakeType.Redelegate;
5317
5218
  const needsAmount = data.stakeType !== StakeType.WithdrawDelegatorReward;
5318
- return /* @__PURE__ */ React59.createElement(Stack35, { gap: "md" }, /* @__PURE__ */ React59.createElement(
5219
+ return /* @__PURE__ */ React60.createElement(Stack36, { gap: "md" }, /* @__PURE__ */ React60.createElement(
5319
5220
  Select4,
5320
5221
  {
5321
5222
  label: "Stake Type",
@@ -5325,7 +5226,7 @@ var StakeActionForm = ({ data, onChange }) => {
5325
5226
  required: true,
5326
5227
  styles: selectStyles
5327
5228
  }
5328
- ), /* @__PURE__ */ React59.createElement(
5229
+ ), /* @__PURE__ */ React60.createElement(
5329
5230
  TextInput9,
5330
5231
  {
5331
5232
  label: "Validator Address",
@@ -5335,7 +5236,7 @@ var StakeActionForm = ({ data, onChange }) => {
5335
5236
  required: true,
5336
5237
  styles: inputStyles
5337
5238
  }
5338
- ), isRedelegate && /* @__PURE__ */ React59.createElement(
5239
+ ), isRedelegate && /* @__PURE__ */ React60.createElement(
5339
5240
  TextInput9,
5340
5241
  {
5341
5242
  label: "Destination Validator Address",
@@ -5345,7 +5246,7 @@ var StakeActionForm = ({ data, onChange }) => {
5345
5246
  required: true,
5346
5247
  styles: inputStyles
5347
5248
  }
5348
- ), needsAmount && /* @__PURE__ */ React59.createElement(React59.Fragment, null, /* @__PURE__ */ React59.createElement(
5249
+ ), needsAmount && /* @__PURE__ */ React60.createElement(React60.Fragment, null, /* @__PURE__ */ React60.createElement(
5349
5250
  NumberInput3,
5350
5251
  {
5351
5252
  label: "Amount",
@@ -5357,7 +5258,7 @@ var StakeActionForm = ({ data, onChange }) => {
5357
5258
  required: true,
5358
5259
  styles: inputStyles
5359
5260
  }
5360
- ), /* @__PURE__ */ React59.createElement(
5261
+ ), /* @__PURE__ */ React60.createElement(
5361
5262
  Select4,
5362
5263
  {
5363
5264
  label: "Denomination",
@@ -5374,8 +5275,8 @@ var StakeActionForm = ({ data, onChange }) => {
5374
5275
  };
5375
5276
 
5376
5277
  // src/mantine/blocks/proposalActions/components/JoinActionForm.tsx
5377
- import React60 from "react";
5378
- import { Stack as Stack36, TextInput as TextInput10 } from "@mantine/core";
5278
+ import React61 from "react";
5279
+ import { Stack as Stack37, TextInput as TextInput10 } from "@mantine/core";
5379
5280
  var inputStyles2 = {
5380
5281
  label: { color: "#adb5bd" },
5381
5282
  input: {
@@ -5388,7 +5289,7 @@ var inputStyles2 = {
5388
5289
  }
5389
5290
  };
5390
5291
  var JoinActionForm = ({ data, onChange }) => {
5391
- return /* @__PURE__ */ React60.createElement(Stack36, { gap: "md" }, /* @__PURE__ */ React60.createElement(
5292
+ return /* @__PURE__ */ React61.createElement(Stack37, { gap: "md" }, /* @__PURE__ */ React61.createElement(
5392
5293
  TextInput10,
5393
5294
  {
5394
5295
  label: "ID",
@@ -5398,7 +5299,7 @@ var JoinActionForm = ({ data, onChange }) => {
5398
5299
  required: true,
5399
5300
  styles: inputStyles2
5400
5301
  }
5401
- ), /* @__PURE__ */ React60.createElement(
5302
+ ), /* @__PURE__ */ React61.createElement(
5402
5303
  TextInput10,
5403
5304
  {
5404
5305
  label: "Core Address",
@@ -5408,7 +5309,7 @@ var JoinActionForm = ({ data, onChange }) => {
5408
5309
  required: true,
5409
5310
  styles: inputStyles2
5410
5311
  }
5411
- ), /* @__PURE__ */ React60.createElement(
5312
+ ), /* @__PURE__ */ React61.createElement(
5412
5313
  TextInput10,
5413
5314
  {
5414
5315
  label: "Address",
@@ -5422,8 +5323,8 @@ var JoinActionForm = ({ data, onChange }) => {
5422
5323
  };
5423
5324
 
5424
5325
  // src/mantine/blocks/proposalActions/components/forms/MintActionForm.tsx
5425
- import React61 from "react";
5426
- import { Stack as Stack37, TextInput as TextInput11, NumberInput as NumberInput4 } from "@mantine/core";
5326
+ import React62 from "react";
5327
+ import { Stack as Stack38, TextInput as TextInput11, NumberInput as NumberInput4 } from "@mantine/core";
5427
5328
  var inputStyles3 = {
5428
5329
  label: { color: "#adb5bd" },
5429
5330
  input: {
@@ -5436,7 +5337,7 @@ var inputStyles3 = {
5436
5337
  }
5437
5338
  };
5438
5339
  var MintActionForm = ({ data, onChange }) => {
5439
- return /* @__PURE__ */ React61.createElement(Stack37, { gap: "md" }, /* @__PURE__ */ React61.createElement(
5340
+ return /* @__PURE__ */ React62.createElement(Stack38, { gap: "md" }, /* @__PURE__ */ React62.createElement(
5440
5341
  TextInput11,
5441
5342
  {
5442
5343
  label: "Recipient Address",
@@ -5446,7 +5347,7 @@ var MintActionForm = ({ data, onChange }) => {
5446
5347
  required: true,
5447
5348
  styles: inputStyles3
5448
5349
  }
5449
- ), /* @__PURE__ */ React61.createElement(
5350
+ ), /* @__PURE__ */ React62.createElement(
5450
5351
  NumberInput4,
5451
5352
  {
5452
5353
  label: "Amount",
@@ -5462,8 +5363,8 @@ var MintActionForm = ({ data, onChange }) => {
5462
5363
  };
5463
5364
 
5464
5365
  // src/mantine/blocks/proposalActions/components/forms/ExecuteActionForm.tsx
5465
- import React62, { useState as useState16 } from "react";
5466
- import { Stack as Stack38, TextInput as TextInput12, Textarea as Textarea5, Button as Button15, Group as Group17, Text as Text34, Card as Card14 } from "@mantine/core";
5366
+ import React63, { useState as useState16 } from "react";
5367
+ import { Stack as Stack39, TextInput as TextInput12, Textarea as Textarea5, Button as Button15, Group as Group17, Text as Text35, Card as Card14 } from "@mantine/core";
5467
5368
  var inputStyles4 = {
5468
5369
  label: { color: "#adb5bd" },
5469
5370
  input: {
@@ -5500,7 +5401,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
5500
5401
  return data.message;
5501
5402
  }
5502
5403
  };
5503
- return /* @__PURE__ */ React62.createElement(Stack38, { gap: "md" }, /* @__PURE__ */ React62.createElement(
5404
+ return /* @__PURE__ */ React63.createElement(Stack39, { gap: "md" }, /* @__PURE__ */ React63.createElement(
5504
5405
  TextInput12,
5505
5406
  {
5506
5407
  label: "Contract Address",
@@ -5510,7 +5411,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
5510
5411
  required: true,
5511
5412
  styles: inputStyles4
5512
5413
  }
5513
- ), /* @__PURE__ */ React62.createElement(
5414
+ ), /* @__PURE__ */ React63.createElement(
5514
5415
  Textarea5,
5515
5416
  {
5516
5417
  label: "Message (JSON)",
@@ -5521,7 +5422,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
5521
5422
  required: true,
5522
5423
  styles: inputStyles4
5523
5424
  }
5524
- ), /* @__PURE__ */ React62.createElement(Stack38, { gap: "xs" }, /* @__PURE__ */ React62.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React62.createElement(
5425
+ ), /* @__PURE__ */ React63.createElement(Stack39, { gap: "xs" }, /* @__PURE__ */ React63.createElement(Text35, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React63.createElement(
5525
5426
  Card14,
5526
5427
  {
5527
5428
  key: index,
@@ -5529,7 +5430,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
5529
5430
  padding: "xs",
5530
5431
  style: { backgroundColor: "#2a2a2a", borderColor: "#333" }
5531
5432
  },
5532
- /* @__PURE__ */ React62.createElement(Group17, { justify: "space-between" }, /* @__PURE__ */ React62.createElement(Text34, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React62.createElement(
5433
+ /* @__PURE__ */ React63.createElement(Group17, { justify: "space-between" }, /* @__PURE__ */ React63.createElement(Text35, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React63.createElement(
5533
5434
  Button15,
5534
5435
  {
5535
5436
  size: "xs",
@@ -5539,7 +5440,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
5539
5440
  },
5540
5441
  "Remove"
5541
5442
  ))
5542
- )), /* @__PURE__ */ React62.createElement(Group17, { grow: true }, /* @__PURE__ */ React62.createElement(
5443
+ )), /* @__PURE__ */ React63.createElement(Group17, { grow: true }, /* @__PURE__ */ React63.createElement(
5543
5444
  TextInput12,
5544
5445
  {
5545
5446
  placeholder: "Amount",
@@ -5547,7 +5448,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
5547
5448
  onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }),
5548
5449
  styles: inputStyles4
5549
5450
  }
5550
- ), /* @__PURE__ */ React62.createElement(
5451
+ ), /* @__PURE__ */ React63.createElement(
5551
5452
  TextInput12,
5552
5453
  {
5553
5454
  placeholder: "Denom (e.g., uixo)",
@@ -5555,7 +5456,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
5555
5456
  onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }),
5556
5457
  styles: inputStyles4
5557
5458
  }
5558
- ), /* @__PURE__ */ React62.createElement(
5459
+ ), /* @__PURE__ */ React63.createElement(
5559
5460
  Button15,
5560
5461
  {
5561
5462
  size: "sm",
@@ -5570,8 +5471,8 @@ var ExecuteActionForm = ({ data, onChange }) => {
5570
5471
  };
5571
5472
 
5572
5473
  // src/mantine/blocks/proposalActions/components/forms/CustomActionForm.tsx
5573
- import React63, { useState as useState17, useEffect as useEffect12 } from "react";
5574
- import { Stack as Stack39, Textarea as Textarea6, Alert as Alert6, Text as Text35, Badge as Badge9 } from "@mantine/core";
5474
+ import React64, { useState as useState17, useEffect as useEffect13 } from "react";
5475
+ import { Stack as Stack40, Textarea as Textarea6, Alert as Alert6, Text as Text36, Badge as Badge9 } from "@mantine/core";
5575
5476
  import { Group as Group18 } from "@mantine/core";
5576
5477
  var inputStyles5 = {
5577
5478
  label: { color: "#adb5bd" },
@@ -5588,7 +5489,7 @@ var inputStyles5 = {
5588
5489
  var CustomActionForm = ({ data, onChange }) => {
5589
5490
  const [isValid, setIsValid] = useState17(true);
5590
5491
  const [error, setError] = useState17("");
5591
- useEffect12(() => {
5492
+ useEffect13(() => {
5592
5493
  try {
5593
5494
  if (data.message) {
5594
5495
  JSON.parse(data.message);
@@ -5608,7 +5509,7 @@ var CustomActionForm = ({ data, onChange }) => {
5608
5509
  return data.message;
5609
5510
  }
5610
5511
  };
5611
- return /* @__PURE__ */ React63.createElement(Stack39, { gap: "md" }, /* @__PURE__ */ React63.createElement(Alert6, { color: "yellow", style: { backgroundColor: "#2a2a2a", borderColor: "#ffd43b" } }, /* @__PURE__ */ React63.createElement(Text35, { size: "sm", style: { color: "#ffd43b" } }, "\u26A0\uFE0F Custom actions require valid JSON messages. Supports both Wasm and Stargate message formats.")), /* @__PURE__ */ React63.createElement("div", null, /* @__PURE__ */ React63.createElement(Group18, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React63.createElement(Text35, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Custom Message (JSON)"), /* @__PURE__ */ React63.createElement(
5512
+ return /* @__PURE__ */ React64.createElement(Stack40, { gap: "md" }, /* @__PURE__ */ React64.createElement(Alert6, { color: "yellow", style: { backgroundColor: "#2a2a2a", borderColor: "#ffd43b" } }, /* @__PURE__ */ React64.createElement(Text36, { size: "sm", style: { color: "#ffd43b" } }, "\u26A0\uFE0F Custom actions require valid JSON messages. Supports both Wasm and Stargate message formats.")), /* @__PURE__ */ React64.createElement("div", null, /* @__PURE__ */ React64.createElement(Group18, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React64.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Custom Message (JSON)"), /* @__PURE__ */ React64.createElement(
5612
5513
  Badge9,
5613
5514
  {
5614
5515
  size: "sm",
@@ -5618,7 +5519,7 @@ var CustomActionForm = ({ data, onChange }) => {
5618
5519
  }
5619
5520
  },
5620
5521
  isValid ? "Valid JSON" : "Invalid JSON"
5621
- )), /* @__PURE__ */ React63.createElement(
5522
+ )), /* @__PURE__ */ React64.createElement(
5622
5523
  Textarea6,
5623
5524
  {
5624
5525
  placeholder: `Example Wasm message:
@@ -5651,8 +5552,8 @@ Example Stargate message:
5651
5552
  };
5652
5553
 
5653
5554
  // src/mantine/blocks/proposalActions/components/forms/AuthzExecActionForm.tsx
5654
- import React64 from "react";
5655
- import { Stack as Stack40, Select as Select5, TextInput as TextInput13, Textarea as Textarea7 } from "@mantine/core";
5555
+ import React65 from "react";
5556
+ import { Stack as Stack41, Select as Select5, TextInput as TextInput13, Textarea as Textarea7 } from "@mantine/core";
5656
5557
  var inputStyles6 = {
5657
5558
  label: { color: "#adb5bd" },
5658
5559
  input: {
@@ -5690,7 +5591,7 @@ var AuthzExecActionForm = ({
5690
5591
  onChange({ ...data, [field]: value });
5691
5592
  }
5692
5593
  };
5693
- return /* @__PURE__ */ React64.createElement(Stack40, { gap: "md" }, /* @__PURE__ */ React64.createElement(
5594
+ return /* @__PURE__ */ React65.createElement(Stack41, { gap: "md" }, /* @__PURE__ */ React65.createElement(
5694
5595
  Select5,
5695
5596
  {
5696
5597
  label: "Action Type",
@@ -5701,7 +5602,7 @@ var AuthzExecActionForm = ({
5701
5602
  required: true,
5702
5603
  styles: inputStyles6
5703
5604
  }
5704
- ), data.authzExecActionType === AuthzExecActionTypes.Delegate && /* @__PURE__ */ React64.createElement(
5605
+ ), data.authzExecActionType === AuthzExecActionTypes.Delegate && /* @__PURE__ */ React65.createElement(
5705
5606
  Textarea7,
5706
5607
  {
5707
5608
  label: "Delegate Message (JSON)",
@@ -5711,7 +5612,7 @@ var AuthzExecActionForm = ({
5711
5612
  minRows: 4,
5712
5613
  styles: inputStyles6
5713
5614
  }
5714
- ), data.authzExecActionType === AuthzExecActionTypes.Undelegate && /* @__PURE__ */ React64.createElement(
5615
+ ), data.authzExecActionType === AuthzExecActionTypes.Undelegate && /* @__PURE__ */ React65.createElement(
5715
5616
  Textarea7,
5716
5617
  {
5717
5618
  label: "Undelegate Message (JSON)",
@@ -5721,7 +5622,7 @@ var AuthzExecActionForm = ({
5721
5622
  minRows: 4,
5722
5623
  styles: inputStyles6
5723
5624
  }
5724
- ), data.authzExecActionType === AuthzExecActionTypes.Redelegate && /* @__PURE__ */ React64.createElement(
5625
+ ), data.authzExecActionType === AuthzExecActionTypes.Redelegate && /* @__PURE__ */ React65.createElement(
5725
5626
  Textarea7,
5726
5627
  {
5727
5628
  label: "Redelegate Message (JSON)",
@@ -5731,7 +5632,7 @@ var AuthzExecActionForm = ({
5731
5632
  minRows: 4,
5732
5633
  styles: inputStyles6
5733
5634
  }
5734
- ), data.authzExecActionType === AuthzExecActionTypes.ClaimRewards && /* @__PURE__ */ React64.createElement(
5635
+ ), data.authzExecActionType === AuthzExecActionTypes.ClaimRewards && /* @__PURE__ */ React65.createElement(
5735
5636
  Textarea7,
5736
5637
  {
5737
5638
  label: "Claim Rewards Message (JSON)",
@@ -5741,7 +5642,7 @@ var AuthzExecActionForm = ({
5741
5642
  minRows: 3,
5742
5643
  styles: inputStyles6
5743
5644
  }
5744
- ), data.authzExecActionType === AuthzExecActionTypes.Custom && /* @__PURE__ */ React64.createElement(
5645
+ ), data.authzExecActionType === AuthzExecActionTypes.Custom && /* @__PURE__ */ React65.createElement(
5745
5646
  TextInput13,
5746
5647
  {
5747
5648
  label: "Custom Message",
@@ -5754,8 +5655,8 @@ var AuthzExecActionForm = ({
5754
5655
  };
5755
5656
 
5756
5657
  // src/mantine/blocks/proposalActions/components/forms/AuthzGrantActionForm.tsx
5757
- import React65 from "react";
5758
- import { Stack as Stack41, TextInput as TextInput14 } from "@mantine/core";
5658
+ import React66 from "react";
5659
+ import { Stack as Stack42, TextInput as TextInput14 } from "@mantine/core";
5759
5660
  var inputStyles7 = {
5760
5661
  label: { color: "#adb5bd" },
5761
5662
  input: {
@@ -5768,7 +5669,7 @@ var inputStyles7 = {
5768
5669
  }
5769
5670
  };
5770
5671
  var AuthzGrantActionForm = ({ data, onChange }) => {
5771
- return /* @__PURE__ */ React65.createElement(Stack41, { gap: "md" }, /* @__PURE__ */ React65.createElement(
5672
+ return /* @__PURE__ */ React66.createElement(Stack42, { gap: "md" }, /* @__PURE__ */ React66.createElement(
5772
5673
  TextInput14,
5773
5674
  {
5774
5675
  label: "Type URL",
@@ -5778,7 +5679,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
5778
5679
  required: true,
5779
5680
  styles: inputStyles7
5780
5681
  }
5781
- ), /* @__PURE__ */ React65.createElement(
5682
+ ), /* @__PURE__ */ React66.createElement(
5782
5683
  TextInput14,
5783
5684
  {
5784
5685
  label: "Grantee Address",
@@ -5791,7 +5692,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
5791
5692
  required: true,
5792
5693
  styles: inputStyles7
5793
5694
  }
5794
- ), /* @__PURE__ */ React65.createElement(
5695
+ ), /* @__PURE__ */ React66.createElement(
5795
5696
  TextInput14,
5796
5697
  {
5797
5698
  label: "Message Type URL",
@@ -5808,8 +5709,8 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
5808
5709
  };
5809
5710
 
5810
5711
  // src/mantine/blocks/proposalActions/components/forms/BurnNftActionForm.tsx
5811
- import React66 from "react";
5812
- import { Stack as Stack42, TextInput as TextInput15 } from "@mantine/core";
5712
+ import React67 from "react";
5713
+ import { Stack as Stack43, TextInput as TextInput15 } from "@mantine/core";
5813
5714
  var inputStyles8 = {
5814
5715
  label: { color: "#adb5bd" },
5815
5716
  input: {
@@ -5822,7 +5723,7 @@ var inputStyles8 = {
5822
5723
  }
5823
5724
  };
5824
5725
  var BurnNftActionForm = ({ data, onChange }) => {
5825
- return /* @__PURE__ */ React66.createElement(Stack42, { gap: "md" }, /* @__PURE__ */ React66.createElement(
5726
+ return /* @__PURE__ */ React67.createElement(Stack43, { gap: "md" }, /* @__PURE__ */ React67.createElement(
5826
5727
  TextInput15,
5827
5728
  {
5828
5729
  label: "Collection Address",
@@ -5832,7 +5733,7 @@ var BurnNftActionForm = ({ data, onChange }) => {
5832
5733
  required: true,
5833
5734
  styles: inputStyles8
5834
5735
  }
5835
- ), /* @__PURE__ */ React66.createElement(
5736
+ ), /* @__PURE__ */ React67.createElement(
5836
5737
  TextInput15,
5837
5738
  {
5838
5739
  label: "Token ID",
@@ -5846,8 +5747,8 @@ var BurnNftActionForm = ({ data, onChange }) => {
5846
5747
  };
5847
5748
 
5848
5749
  // src/mantine/blocks/proposalActions/components/forms/TransferNftActionForm.tsx
5849
- import React67 from "react";
5850
- import { Stack as Stack43, TextInput as TextInput16, Checkbox as Checkbox4, Textarea as Textarea8 } from "@mantine/core";
5750
+ import React68 from "react";
5751
+ import { Stack as Stack44, TextInput as TextInput16, Checkbox as Checkbox4, Textarea as Textarea8 } from "@mantine/core";
5851
5752
  var inputStyles9 = {
5852
5753
  label: { color: "#adb5bd" },
5853
5754
  input: {
@@ -5863,7 +5764,7 @@ var TransferNftActionForm = ({
5863
5764
  data,
5864
5765
  onChange
5865
5766
  }) => {
5866
- return /* @__PURE__ */ React67.createElement(Stack43, { gap: "md" }, /* @__PURE__ */ React67.createElement(
5767
+ return /* @__PURE__ */ React68.createElement(Stack44, { gap: "md" }, /* @__PURE__ */ React68.createElement(
5867
5768
  TextInput16,
5868
5769
  {
5869
5770
  label: "Collection Address",
@@ -5873,7 +5774,7 @@ var TransferNftActionForm = ({
5873
5774
  required: true,
5874
5775
  styles: inputStyles9
5875
5776
  }
5876
- ), /* @__PURE__ */ React67.createElement(
5777
+ ), /* @__PURE__ */ React68.createElement(
5877
5778
  TextInput16,
5878
5779
  {
5879
5780
  label: "Token ID",
@@ -5883,7 +5784,7 @@ var TransferNftActionForm = ({
5883
5784
  required: true,
5884
5785
  styles: inputStyles9
5885
5786
  }
5886
- ), /* @__PURE__ */ React67.createElement(
5787
+ ), /* @__PURE__ */ React68.createElement(
5887
5788
  TextInput16,
5888
5789
  {
5889
5790
  label: "Recipient Address",
@@ -5893,7 +5794,7 @@ var TransferNftActionForm = ({
5893
5794
  required: true,
5894
5795
  styles: inputStyles9
5895
5796
  }
5896
- ), /* @__PURE__ */ React67.createElement(
5797
+ ), /* @__PURE__ */ React68.createElement(
5897
5798
  Checkbox4,
5898
5799
  {
5899
5800
  label: "Execute Smart Contract",
@@ -5904,7 +5805,7 @@ var TransferNftActionForm = ({
5904
5805
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
5905
5806
  }
5906
5807
  }
5907
- ), data.executeSmartContract && /* @__PURE__ */ React67.createElement(
5808
+ ), data.executeSmartContract && /* @__PURE__ */ React68.createElement(
5908
5809
  Textarea8,
5909
5810
  {
5910
5811
  label: "Smart Contract Message (JSON)",
@@ -5918,8 +5819,8 @@ var TransferNftActionForm = ({
5918
5819
  };
5919
5820
 
5920
5821
  // src/mantine/blocks/proposalActions/components/forms/ManageCw721ActionForm.tsx
5921
- import React68 from "react";
5922
- import { Stack as Stack44, TextInput as TextInput17, Radio, Group as Group19 } from "@mantine/core";
5822
+ import React69 from "react";
5823
+ import { Stack as Stack45, TextInput as TextInput17, Radio, Group as Group19 } from "@mantine/core";
5923
5824
  var inputStyles10 = {
5924
5825
  label: { color: "#adb5bd" },
5925
5826
  input: {
@@ -5935,14 +5836,14 @@ var ManageCw721ActionForm = ({
5935
5836
  data,
5936
5837
  onChange
5937
5838
  }) => {
5938
- return /* @__PURE__ */ React68.createElement(Stack44, { gap: "md" }, /* @__PURE__ */ React68.createElement(
5839
+ return /* @__PURE__ */ React69.createElement(Stack45, { gap: "md" }, /* @__PURE__ */ React69.createElement(
5939
5840
  Radio.Group,
5940
5841
  {
5941
5842
  label: "Action",
5942
5843
  value: data.adding ? "add" : "remove",
5943
5844
  onChange: (value) => onChange({ ...data, adding: value === "add" })
5944
5845
  },
5945
- /* @__PURE__ */ React68.createElement(Group19, { mt: "xs" }, /* @__PURE__ */ React68.createElement(
5846
+ /* @__PURE__ */ React69.createElement(Group19, { mt: "xs" }, /* @__PURE__ */ React69.createElement(
5946
5847
  Radio,
5947
5848
  {
5948
5849
  value: "add",
@@ -5952,7 +5853,7 @@ var ManageCw721ActionForm = ({
5952
5853
  radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
5953
5854
  }
5954
5855
  }
5955
- ), /* @__PURE__ */ React68.createElement(
5856
+ ), /* @__PURE__ */ React69.createElement(
5956
5857
  Radio,
5957
5858
  {
5958
5859
  value: "remove",
@@ -5963,7 +5864,7 @@ var ManageCw721ActionForm = ({
5963
5864
  }
5964
5865
  }
5965
5866
  ))
5966
- ), /* @__PURE__ */ React68.createElement(
5867
+ ), /* @__PURE__ */ React69.createElement(
5967
5868
  TextInput17,
5968
5869
  {
5969
5870
  label: "NFT Contract Address",
@@ -5977,8 +5878,8 @@ var ManageCw721ActionForm = ({
5977
5878
  };
5978
5879
 
5979
5880
  // src/mantine/blocks/proposalActions/components/forms/InstantiateActionForm.tsx
5980
- import React69, { useState as useState18 } from "react";
5981
- import { Stack as Stack45, TextInput as TextInput18, Textarea as Textarea9, NumberInput as NumberInput5, Button as Button16, Group as Group20, Text as Text36, Card as Card15 } from "@mantine/core";
5881
+ import React70, { useState as useState18 } from "react";
5882
+ import { Stack as Stack46, TextInput as TextInput18, Textarea as Textarea9, NumberInput as NumberInput5, Button as Button16, Group as Group20, Text as Text37, Card as Card15 } from "@mantine/core";
5982
5883
  var inputStyles11 = {
5983
5884
  label: { color: "#adb5bd" },
5984
5885
  input: {
@@ -6018,7 +5919,7 @@ var InstantiateActionForm = ({
6018
5919
  return data.message;
6019
5920
  }
6020
5921
  };
6021
- return /* @__PURE__ */ React69.createElement(Stack45, { gap: "md" }, /* @__PURE__ */ React69.createElement(
5922
+ return /* @__PURE__ */ React70.createElement(Stack46, { gap: "md" }, /* @__PURE__ */ React70.createElement(
6022
5923
  TextInput18,
6023
5924
  {
6024
5925
  label: "Admin Address",
@@ -6028,7 +5929,7 @@ var InstantiateActionForm = ({
6028
5929
  required: true,
6029
5930
  styles: inputStyles11
6030
5931
  }
6031
- ), /* @__PURE__ */ React69.createElement(
5932
+ ), /* @__PURE__ */ React70.createElement(
6032
5933
  NumberInput5,
6033
5934
  {
6034
5935
  label: "Code ID",
@@ -6039,7 +5940,7 @@ var InstantiateActionForm = ({
6039
5940
  required: true,
6040
5941
  styles: inputStyles11
6041
5942
  }
6042
- ), /* @__PURE__ */ React69.createElement(
5943
+ ), /* @__PURE__ */ React70.createElement(
6043
5944
  TextInput18,
6044
5945
  {
6045
5946
  label: "Label",
@@ -6049,7 +5950,7 @@ var InstantiateActionForm = ({
6049
5950
  required: true,
6050
5951
  styles: inputStyles11
6051
5952
  }
6052
- ), /* @__PURE__ */ React69.createElement(
5953
+ ), /* @__PURE__ */ React70.createElement(
6053
5954
  Textarea9,
6054
5955
  {
6055
5956
  label: "Instantiate Message (JSON)",
@@ -6060,7 +5961,7 @@ var InstantiateActionForm = ({
6060
5961
  required: true,
6061
5962
  styles: inputStyles11
6062
5963
  }
6063
- ), /* @__PURE__ */ React69.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React69.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React69.createElement(
5964
+ ), /* @__PURE__ */ React70.createElement(Stack46, { gap: "xs" }, /* @__PURE__ */ React70.createElement(Text37, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React70.createElement(
6064
5965
  Card15,
6065
5966
  {
6066
5967
  key: index,
@@ -6068,7 +5969,7 @@ var InstantiateActionForm = ({
6068
5969
  padding: "xs",
6069
5970
  style: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6070
5971
  },
6071
- /* @__PURE__ */ React69.createElement(Group20, { justify: "space-between" }, /* @__PURE__ */ React69.createElement(Text36, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React69.createElement(
5972
+ /* @__PURE__ */ React70.createElement(Group20, { justify: "space-between" }, /* @__PURE__ */ React70.createElement(Text37, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React70.createElement(
6072
5973
  Button16,
6073
5974
  {
6074
5975
  size: "xs",
@@ -6078,7 +5979,7 @@ var InstantiateActionForm = ({
6078
5979
  },
6079
5980
  "Remove"
6080
5981
  ))
6081
- )), /* @__PURE__ */ React69.createElement(Group20, { grow: true }, /* @__PURE__ */ React69.createElement(
5982
+ )), /* @__PURE__ */ React70.createElement(Group20, { grow: true }, /* @__PURE__ */ React70.createElement(
6082
5983
  TextInput18,
6083
5984
  {
6084
5985
  placeholder: "Amount",
@@ -6086,7 +5987,7 @@ var InstantiateActionForm = ({
6086
5987
  onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }),
6087
5988
  styles: inputStyles11
6088
5989
  }
6089
- ), /* @__PURE__ */ React69.createElement(
5990
+ ), /* @__PURE__ */ React70.createElement(
6090
5991
  TextInput18,
6091
5992
  {
6092
5993
  placeholder: "Denom (e.g., uixo)",
@@ -6094,7 +5995,7 @@ var InstantiateActionForm = ({
6094
5995
  onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }),
6095
5996
  styles: inputStyles11
6096
5997
  }
6097
- ), /* @__PURE__ */ React69.createElement(
5998
+ ), /* @__PURE__ */ React70.createElement(
6098
5999
  Button16,
6099
6000
  {
6100
6001
  size: "sm",
@@ -6109,8 +6010,8 @@ var InstantiateActionForm = ({
6109
6010
  };
6110
6011
 
6111
6012
  // src/mantine/blocks/proposalActions/components/forms/MigrateActionForm.tsx
6112
- import React70 from "react";
6113
- import { Stack as Stack46, TextInput as TextInput19, Textarea as Textarea10, NumberInput as NumberInput6 } from "@mantine/core";
6013
+ import React71 from "react";
6014
+ import { Stack as Stack47, TextInput as TextInput19, Textarea as Textarea10, NumberInput as NumberInput6 } from "@mantine/core";
6114
6015
  var inputStyles12 = {
6115
6016
  label: { color: "#adb5bd" },
6116
6017
  input: {
@@ -6131,7 +6032,7 @@ var MigrateActionForm = ({ data, onChange }) => {
6131
6032
  return data.msg;
6132
6033
  }
6133
6034
  };
6134
- return /* @__PURE__ */ React70.createElement(Stack46, { gap: "md" }, /* @__PURE__ */ React70.createElement(
6035
+ return /* @__PURE__ */ React71.createElement(Stack47, { gap: "md" }, /* @__PURE__ */ React71.createElement(
6135
6036
  TextInput19,
6136
6037
  {
6137
6038
  label: "Contract Address",
@@ -6141,7 +6042,7 @@ var MigrateActionForm = ({ data, onChange }) => {
6141
6042
  required: true,
6142
6043
  styles: inputStyles12
6143
6044
  }
6144
- ), /* @__PURE__ */ React70.createElement(
6045
+ ), /* @__PURE__ */ React71.createElement(
6145
6046
  NumberInput6,
6146
6047
  {
6147
6048
  label: "New Code ID",
@@ -6152,7 +6053,7 @@ var MigrateActionForm = ({ data, onChange }) => {
6152
6053
  required: true,
6153
6054
  styles: inputStyles12
6154
6055
  }
6155
- ), /* @__PURE__ */ React70.createElement(
6056
+ ), /* @__PURE__ */ React71.createElement(
6156
6057
  Textarea10,
6157
6058
  {
6158
6059
  label: "Migration Message (JSON)",
@@ -6167,8 +6068,8 @@ var MigrateActionForm = ({ data, onChange }) => {
6167
6068
  };
6168
6069
 
6169
6070
  // src/mantine/blocks/proposalActions/components/forms/UpdateAdminActionForm.tsx
6170
- import React71 from "react";
6171
- import { Stack as Stack47, TextInput as TextInput20 } from "@mantine/core";
6071
+ import React72 from "react";
6072
+ import { Stack as Stack48, TextInput as TextInput20 } from "@mantine/core";
6172
6073
  var inputStyles13 = {
6173
6074
  label: { color: "#adb5bd" },
6174
6075
  input: {
@@ -6184,7 +6085,7 @@ var UpdateAdminActionForm = ({
6184
6085
  data,
6185
6086
  onChange
6186
6087
  }) => {
6187
- return /* @__PURE__ */ React71.createElement(Stack47, { gap: "md" }, /* @__PURE__ */ React71.createElement(
6088
+ return /* @__PURE__ */ React72.createElement(Stack48, { gap: "md" }, /* @__PURE__ */ React72.createElement(
6188
6089
  TextInput20,
6189
6090
  {
6190
6091
  label: "Contract Address",
@@ -6194,7 +6095,7 @@ var UpdateAdminActionForm = ({
6194
6095
  required: true,
6195
6096
  styles: inputStyles13
6196
6097
  }
6197
- ), /* @__PURE__ */ React71.createElement(
6098
+ ), /* @__PURE__ */ React72.createElement(
6198
6099
  TextInput20,
6199
6100
  {
6200
6101
  label: "New Admin Address",
@@ -6208,8 +6109,8 @@ var UpdateAdminActionForm = ({
6208
6109
  };
6209
6110
 
6210
6111
  // src/mantine/blocks/proposalActions/components/forms/ManageCw20ActionForm.tsx
6211
- import React72 from "react";
6212
- import { Stack as Stack48, TextInput as TextInput21, Radio as Radio2, Group as Group21 } from "@mantine/core";
6112
+ import React73 from "react";
6113
+ import { Stack as Stack49, TextInput as TextInput21, Radio as Radio2, Group as Group21 } from "@mantine/core";
6213
6114
  var inputStyles14 = {
6214
6115
  label: { color: "#adb5bd" },
6215
6116
  input: {
@@ -6225,14 +6126,14 @@ var ManageCw20ActionForm = ({
6225
6126
  data,
6226
6127
  onChange
6227
6128
  }) => {
6228
- return /* @__PURE__ */ React72.createElement(Stack48, { gap: "md" }, /* @__PURE__ */ React72.createElement(
6129
+ return /* @__PURE__ */ React73.createElement(Stack49, { gap: "md" }, /* @__PURE__ */ React73.createElement(
6229
6130
  Radio2.Group,
6230
6131
  {
6231
6132
  label: "Action",
6232
6133
  value: data.adding ? "add" : "remove",
6233
6134
  onChange: (value) => onChange({ ...data, adding: value === "add" })
6234
6135
  },
6235
- /* @__PURE__ */ React72.createElement(Group21, { mt: "xs" }, /* @__PURE__ */ React72.createElement(
6136
+ /* @__PURE__ */ React73.createElement(Group21, { mt: "xs" }, /* @__PURE__ */ React73.createElement(
6236
6137
  Radio2,
6237
6138
  {
6238
6139
  value: "add",
@@ -6242,7 +6143,7 @@ var ManageCw20ActionForm = ({
6242
6143
  radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6243
6144
  }
6244
6145
  }
6245
- ), /* @__PURE__ */ React72.createElement(
6146
+ ), /* @__PURE__ */ React73.createElement(
6246
6147
  Radio2,
6247
6148
  {
6248
6149
  value: "remove",
@@ -6253,7 +6154,7 @@ var ManageCw20ActionForm = ({
6253
6154
  }
6254
6155
  }
6255
6156
  ))
6256
- ), /* @__PURE__ */ React72.createElement(
6157
+ ), /* @__PURE__ */ React73.createElement(
6257
6158
  TextInput21,
6258
6159
  {
6259
6160
  label: "Token Contract Address",
@@ -6267,8 +6168,8 @@ var ManageCw20ActionForm = ({
6267
6168
  };
6268
6169
 
6269
6170
  // src/mantine/blocks/proposalActions/components/forms/ManageSubDaosActionForm.tsx
6270
- import React73, { useState as useState19 } from "react";
6271
- import { Stack as Stack49, TextInput as TextInput22, Button as Button17, Group as Group22, Text as Text37, Card as Card16, Textarea as Textarea11 } from "@mantine/core";
6171
+ import React74, { useState as useState19 } from "react";
6172
+ import { Stack as Stack50, TextInput as TextInput22, Button as Button17, Group as Group22, Text as Text38, Card as Card16, Textarea as Textarea11 } from "@mantine/core";
6272
6173
  var inputStyles15 = {
6273
6174
  label: { color: "#adb5bd" },
6274
6175
  input: {
@@ -6316,7 +6217,7 @@ var ManageSubDaosActionForm = ({
6316
6217
  toRemove: (data.toRemove || []).filter((_, i) => i !== index)
6317
6218
  });
6318
6219
  };
6319
- return /* @__PURE__ */ React73.createElement(Stack49, { gap: "md" }, /* @__PURE__ */ React73.createElement(Stack49, { gap: "xs" }, /* @__PURE__ */ React73.createElement(Text37, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Add"), (data.toAdd || []).map((subDao, index) => /* @__PURE__ */ React73.createElement(
6220
+ return /* @__PURE__ */ React74.createElement(Stack50, { gap: "md" }, /* @__PURE__ */ React74.createElement(Stack50, { gap: "xs" }, /* @__PURE__ */ React74.createElement(Text38, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Add"), (data.toAdd || []).map((subDao, index) => /* @__PURE__ */ React74.createElement(
6320
6221
  Card16,
6321
6222
  {
6322
6223
  key: index,
@@ -6324,7 +6225,7 @@ var ManageSubDaosActionForm = ({
6324
6225
  padding: "xs",
6325
6226
  style: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6326
6227
  },
6327
- /* @__PURE__ */ React73.createElement(Stack49, { gap: "xs" }, /* @__PURE__ */ React73.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React73.createElement(Text37, { size: "sm", style: { color: "#f1f3f5" } }, subDao.addr), /* @__PURE__ */ React73.createElement(
6228
+ /* @__PURE__ */ React74.createElement(Stack50, { gap: "xs" }, /* @__PURE__ */ React74.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React74.createElement(Text38, { size: "sm", style: { color: "#f1f3f5" } }, subDao.addr), /* @__PURE__ */ React74.createElement(
6328
6229
  Button17,
6329
6230
  {
6330
6231
  size: "xs",
@@ -6333,8 +6234,8 @@ var ManageSubDaosActionForm = ({
6333
6234
  style: { color: "#ff6b6b" }
6334
6235
  },
6335
6236
  "Remove"
6336
- )), subDao.charter && /* @__PURE__ */ React73.createElement(Text37, { size: "xs", style: { color: "#adb5bd" } }, "Charter: ", subDao.charter))
6337
- )), /* @__PURE__ */ React73.createElement(Stack49, { gap: "xs" }, /* @__PURE__ */ React73.createElement(
6237
+ )), subDao.charter && /* @__PURE__ */ React74.createElement(Text38, { size: "xs", style: { color: "#adb5bd" } }, "Charter: ", subDao.charter))
6238
+ )), /* @__PURE__ */ React74.createElement(Stack50, { gap: "xs" }, /* @__PURE__ */ React74.createElement(
6338
6239
  TextInput22,
6339
6240
  {
6340
6241
  placeholder: "SubDAO Address",
@@ -6342,7 +6243,7 @@ var ManageSubDaosActionForm = ({
6342
6243
  onChange: (e) => setNewSubDao({ ...newSubDao, addr: e.currentTarget.value }),
6343
6244
  styles: inputStyles15
6344
6245
  }
6345
- ), /* @__PURE__ */ React73.createElement(
6246
+ ), /* @__PURE__ */ React74.createElement(
6346
6247
  Textarea11,
6347
6248
  {
6348
6249
  placeholder: "Charter (optional)",
@@ -6351,7 +6252,7 @@ var ManageSubDaosActionForm = ({
6351
6252
  minRows: 2,
6352
6253
  styles: inputStyles15
6353
6254
  }
6354
- ), /* @__PURE__ */ React73.createElement(
6255
+ ), /* @__PURE__ */ React74.createElement(
6355
6256
  Button17,
6356
6257
  {
6357
6258
  size: "sm",
@@ -6362,7 +6263,7 @@ var ManageSubDaosActionForm = ({
6362
6263
  }
6363
6264
  },
6364
6265
  "Add SubDAO"
6365
- ))), /* @__PURE__ */ React73.createElement(Stack49, { gap: "xs" }, /* @__PURE__ */ React73.createElement(Text37, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Remove"), (data.toRemove || []).map((subDao, index) => /* @__PURE__ */ React73.createElement(
6266
+ ))), /* @__PURE__ */ React74.createElement(Stack50, { gap: "xs" }, /* @__PURE__ */ React74.createElement(Text38, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Remove"), (data.toRemove || []).map((subDao, index) => /* @__PURE__ */ React74.createElement(
6366
6267
  Card16,
6367
6268
  {
6368
6269
  key: index,
@@ -6370,7 +6271,7 @@ var ManageSubDaosActionForm = ({
6370
6271
  padding: "xs",
6371
6272
  style: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6372
6273
  },
6373
- /* @__PURE__ */ React73.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React73.createElement(Text37, { size: "sm", style: { color: "#f1f3f5" } }, subDao.address), /* @__PURE__ */ React73.createElement(
6274
+ /* @__PURE__ */ React74.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React74.createElement(Text38, { size: "sm", style: { color: "#f1f3f5" } }, subDao.address), /* @__PURE__ */ React74.createElement(
6374
6275
  Button17,
6375
6276
  {
6376
6277
  size: "xs",
@@ -6380,7 +6281,7 @@ var ManageSubDaosActionForm = ({
6380
6281
  },
6381
6282
  "Remove"
6382
6283
  ))
6383
- )), /* @__PURE__ */ React73.createElement(Group22, { grow: true }, /* @__PURE__ */ React73.createElement(
6284
+ )), /* @__PURE__ */ React74.createElement(Group22, { grow: true }, /* @__PURE__ */ React74.createElement(
6384
6285
  TextInput22,
6385
6286
  {
6386
6287
  placeholder: "SubDAO Address to Remove",
@@ -6388,7 +6289,7 @@ var ManageSubDaosActionForm = ({
6388
6289
  onChange: (e) => setNewRemoveAddress(e.currentTarget.value),
6389
6290
  styles: inputStyles15
6390
6291
  }
6391
- ), /* @__PURE__ */ React73.createElement(
6292
+ ), /* @__PURE__ */ React74.createElement(
6392
6293
  Button17,
6393
6294
  {
6394
6295
  size: "sm",
@@ -6403,8 +6304,8 @@ var ManageSubDaosActionForm = ({
6403
6304
  };
6404
6305
 
6405
6306
  // src/mantine/blocks/proposalActions/components/forms/UpdateInfoActionForm.tsx
6406
- import React74 from "react";
6407
- import { Stack as Stack50, TextInput as TextInput23, Textarea as Textarea12, Checkbox as Checkbox5 } from "@mantine/core";
6307
+ import React75 from "react";
6308
+ import { Stack as Stack51, TextInput as TextInput23, Textarea as Textarea12, Checkbox as Checkbox5 } from "@mantine/core";
6408
6309
  var inputStyles16 = {
6409
6310
  label: { color: "#adb5bd" },
6410
6311
  input: {
@@ -6420,7 +6321,7 @@ var UpdateInfoActionForm = ({
6420
6321
  data,
6421
6322
  onChange
6422
6323
  }) => {
6423
- return /* @__PURE__ */ React74.createElement(Stack50, { gap: "md" }, /* @__PURE__ */ React74.createElement(
6324
+ return /* @__PURE__ */ React75.createElement(Stack51, { gap: "md" }, /* @__PURE__ */ React75.createElement(
6424
6325
  TextInput23,
6425
6326
  {
6426
6327
  label: "DAO Name",
@@ -6430,7 +6331,7 @@ var UpdateInfoActionForm = ({
6430
6331
  required: true,
6431
6332
  styles: inputStyles16
6432
6333
  }
6433
- ), /* @__PURE__ */ React74.createElement(
6334
+ ), /* @__PURE__ */ React75.createElement(
6434
6335
  Textarea12,
6435
6336
  {
6436
6337
  label: "Description",
@@ -6440,7 +6341,7 @@ var UpdateInfoActionForm = ({
6440
6341
  minRows: 3,
6441
6342
  styles: inputStyles16
6442
6343
  }
6443
- ), /* @__PURE__ */ React74.createElement(
6344
+ ), /* @__PURE__ */ React75.createElement(
6444
6345
  TextInput23,
6445
6346
  {
6446
6347
  label: "Image URL (Optional)",
@@ -6449,7 +6350,7 @@ var UpdateInfoActionForm = ({
6449
6350
  onChange: (e) => onChange({ ...data, image_url: e.currentTarget.value || null }),
6450
6351
  styles: inputStyles16
6451
6352
  }
6452
- ), /* @__PURE__ */ React74.createElement(
6353
+ ), /* @__PURE__ */ React75.createElement(
6453
6354
  TextInput23,
6454
6355
  {
6455
6356
  label: "DAO URI (Optional)",
@@ -6458,7 +6359,7 @@ var UpdateInfoActionForm = ({
6458
6359
  onChange: (e) => onChange({ ...data, dao_uri: e.currentTarget.value || null }),
6459
6360
  styles: inputStyles16
6460
6361
  }
6461
- ), /* @__PURE__ */ React74.createElement(
6362
+ ), /* @__PURE__ */ React75.createElement(
6462
6363
  Checkbox5,
6463
6364
  {
6464
6365
  label: "Automatically add CW20 tokens",
@@ -6469,7 +6370,7 @@ var UpdateInfoActionForm = ({
6469
6370
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6470
6371
  }
6471
6372
  }
6472
- ), /* @__PURE__ */ React74.createElement(
6373
+ ), /* @__PURE__ */ React75.createElement(
6473
6374
  Checkbox5,
6474
6375
  {
6475
6376
  label: "Automatically add CW721 NFTs",
@@ -6484,8 +6385,8 @@ var UpdateInfoActionForm = ({
6484
6385
  };
6485
6386
 
6486
6387
  // src/mantine/blocks/proposalActions/components/forms/ManageStorageItemsActionForm.tsx
6487
- import React75 from "react";
6488
- import { Stack as Stack51, TextInput as TextInput24, Radio as Radio3, Group as Group23, Textarea as Textarea13 } from "@mantine/core";
6388
+ import React76 from "react";
6389
+ import { Stack as Stack52, TextInput as TextInput24, Radio as Radio3, Group as Group23, Textarea as Textarea13 } from "@mantine/core";
6489
6390
  var inputStyles17 = {
6490
6391
  label: { color: "#adb5bd" },
6491
6392
  input: {
@@ -6501,14 +6402,14 @@ var ManageStorageItemsActionForm = ({
6501
6402
  data,
6502
6403
  onChange
6503
6404
  }) => {
6504
- return /* @__PURE__ */ React75.createElement(Stack51, { gap: "md" }, /* @__PURE__ */ React75.createElement(
6405
+ return /* @__PURE__ */ React76.createElement(Stack52, { gap: "md" }, /* @__PURE__ */ React76.createElement(
6505
6406
  Radio3.Group,
6506
6407
  {
6507
6408
  label: "Action",
6508
6409
  value: data.setting ? "set" : "remove",
6509
6410
  onChange: (value) => onChange({ ...data, setting: value === "set" })
6510
6411
  },
6511
- /* @__PURE__ */ React75.createElement(Group23, { mt: "xs" }, /* @__PURE__ */ React75.createElement(
6412
+ /* @__PURE__ */ React76.createElement(Group23, { mt: "xs" }, /* @__PURE__ */ React76.createElement(
6512
6413
  Radio3,
6513
6414
  {
6514
6415
  value: "set",
@@ -6518,7 +6419,7 @@ var ManageStorageItemsActionForm = ({
6518
6419
  radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6519
6420
  }
6520
6421
  }
6521
- ), /* @__PURE__ */ React75.createElement(
6422
+ ), /* @__PURE__ */ React76.createElement(
6522
6423
  Radio3,
6523
6424
  {
6524
6425
  value: "remove",
@@ -6529,7 +6430,7 @@ var ManageStorageItemsActionForm = ({
6529
6430
  }
6530
6431
  }
6531
6432
  ))
6532
- ), /* @__PURE__ */ React75.createElement(
6433
+ ), /* @__PURE__ */ React76.createElement(
6533
6434
  TextInput24,
6534
6435
  {
6535
6436
  label: "Storage Key",
@@ -6539,7 +6440,7 @@ var ManageStorageItemsActionForm = ({
6539
6440
  required: true,
6540
6441
  styles: inputStyles17
6541
6442
  }
6542
- ), data.setting && /* @__PURE__ */ React75.createElement(
6443
+ ), data.setting && /* @__PURE__ */ React76.createElement(
6543
6444
  Textarea13,
6544
6445
  {
6545
6446
  label: "Storage Value",
@@ -6554,8 +6455,8 @@ var ManageStorageItemsActionForm = ({
6554
6455
  };
6555
6456
 
6556
6457
  // src/mantine/blocks/proposalActions/components/forms/DaoAdminExecActionForm.tsx
6557
- import React76, { useState as useState20 } from "react";
6558
- import { Stack as Stack52, TextInput as TextInput25, Button as Button18, Group as Group24, Text as Text38, Card as Card17, Textarea as Textarea14 } from "@mantine/core";
6458
+ import React77, { useState as useState20 } from "react";
6459
+ import { Stack as Stack53, TextInput as TextInput25, Button as Button18, Group as Group24, Text as Text39, Card as Card17, Textarea as Textarea14 } from "@mantine/core";
6559
6460
  var inputStyles18 = {
6560
6461
  label: { color: "#adb5bd" },
6561
6462
  input: {
@@ -6591,7 +6492,7 @@ var DaoAdminExecActionForm = ({
6591
6492
  msgs: (data.msgs || []).filter((_, i) => i !== index)
6592
6493
  });
6593
6494
  };
6594
- return /* @__PURE__ */ React76.createElement(Stack52, { gap: "md" }, /* @__PURE__ */ React76.createElement(
6495
+ return /* @__PURE__ */ React77.createElement(Stack53, { gap: "md" }, /* @__PURE__ */ React77.createElement(
6595
6496
  TextInput25,
6596
6497
  {
6597
6498
  label: "Core Address",
@@ -6601,7 +6502,7 @@ var DaoAdminExecActionForm = ({
6601
6502
  required: true,
6602
6503
  styles: inputStyles18
6603
6504
  }
6604
- ), /* @__PURE__ */ React76.createElement(Stack52, { gap: "xs" }, /* @__PURE__ */ React76.createElement(Text38, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Messages to Execute"), (data.msgs || []).map((msg, index) => /* @__PURE__ */ React76.createElement(
6505
+ ), /* @__PURE__ */ React77.createElement(Stack53, { gap: "xs" }, /* @__PURE__ */ React77.createElement(Text39, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Messages to Execute"), (data.msgs || []).map((msg, index) => /* @__PURE__ */ React77.createElement(
6605
6506
  Card17,
6606
6507
  {
6607
6508
  key: index,
@@ -6609,7 +6510,7 @@ var DaoAdminExecActionForm = ({
6609
6510
  padding: "xs",
6610
6511
  style: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6611
6512
  },
6612
- /* @__PURE__ */ React76.createElement(Group24, { justify: "space-between" }, /* @__PURE__ */ React76.createElement(Text38, { size: "sm", style: { color: "#f1f3f5" } }, "Message ", index + 1), /* @__PURE__ */ React76.createElement(
6513
+ /* @__PURE__ */ React77.createElement(Group24, { justify: "space-between" }, /* @__PURE__ */ React77.createElement(Text39, { size: "sm", style: { color: "#f1f3f5" } }, "Message ", index + 1), /* @__PURE__ */ React77.createElement(
6613
6514
  Button18,
6614
6515
  {
6615
6516
  size: "xs",
@@ -6619,8 +6520,8 @@ var DaoAdminExecActionForm = ({
6619
6520
  },
6620
6521
  "Remove"
6621
6522
  )),
6622
- /* @__PURE__ */ React76.createElement(Text38, { size: "xs", style: { color: "#adb5bd", fontFamily: "monospace" } }, JSON.stringify(msg, null, 2).substring(0, 100), "...")
6623
- )), /* @__PURE__ */ React76.createElement(
6523
+ /* @__PURE__ */ React77.createElement(Text39, { size: "xs", style: { color: "#adb5bd", fontFamily: "monospace" } }, JSON.stringify(msg, null, 2).substring(0, 100), "...")
6524
+ )), /* @__PURE__ */ React77.createElement(
6624
6525
  Textarea14,
6625
6526
  {
6626
6527
  placeholder: 'Add cosmos message as JSON:\\n{"bank": {"send": {"to_address": "ixo1...", "amount": [{"denom": "uixo", "amount": "1000"}]}}}',
@@ -6629,7 +6530,7 @@ var DaoAdminExecActionForm = ({
6629
6530
  minRows: 4,
6630
6531
  styles: inputStyles18
6631
6532
  }
6632
- ), /* @__PURE__ */ React76.createElement(
6533
+ ), /* @__PURE__ */ React77.createElement(
6633
6534
  Button18,
6634
6535
  {
6635
6536
  size: "sm",
@@ -6644,8 +6545,8 @@ var DaoAdminExecActionForm = ({
6644
6545
  };
6645
6546
 
6646
6547
  // src/mantine/blocks/proposalActions/components/forms/AcceptToMarketplaceActionForm.tsx
6647
- import React77 from "react";
6648
- import { Stack as Stack53, TextInput as TextInput26 } from "@mantine/core";
6548
+ import React78 from "react";
6549
+ import { Stack as Stack54, TextInput as TextInput26 } from "@mantine/core";
6649
6550
  var inputStyles19 = {
6650
6551
  label: { color: "#adb5bd" },
6651
6552
  input: {
@@ -6661,7 +6562,7 @@ var AcceptToMarketplaceActionForm = ({
6661
6562
  data,
6662
6563
  onChange
6663
6564
  }) => {
6664
- return /* @__PURE__ */ React77.createElement(Stack53, { gap: "md" }, /* @__PURE__ */ React77.createElement(
6565
+ return /* @__PURE__ */ React78.createElement(Stack54, { gap: "md" }, /* @__PURE__ */ React78.createElement(
6665
6566
  TextInput26,
6666
6567
  {
6667
6568
  label: "DID",
@@ -6671,7 +6572,7 @@ var AcceptToMarketplaceActionForm = ({
6671
6572
  required: true,
6672
6573
  styles: inputStyles19
6673
6574
  }
6674
- ), /* @__PURE__ */ React77.createElement(
6575
+ ), /* @__PURE__ */ React78.createElement(
6675
6576
  TextInput26,
6676
6577
  {
6677
6578
  label: "Relayer Node DID",
@@ -6681,7 +6582,7 @@ var AcceptToMarketplaceActionForm = ({
6681
6582
  required: true,
6682
6583
  styles: inputStyles19
6683
6584
  }
6684
- ), /* @__PURE__ */ React77.createElement(
6585
+ ), /* @__PURE__ */ React78.createElement(
6685
6586
  TextInput26,
6686
6587
  {
6687
6588
  label: "Relayer Node Address",
@@ -6695,8 +6596,8 @@ var AcceptToMarketplaceActionForm = ({
6695
6596
  };
6696
6597
 
6697
6598
  // src/mantine/blocks/proposalActions/components/forms/CreateEntityActionForm.tsx
6698
- import React78 from "react";
6699
- import { Stack as Stack54, Textarea as Textarea15, Alert as Alert7, Text as Text39 } from "@mantine/core";
6599
+ import React79 from "react";
6600
+ import { Stack as Stack55, Textarea as Textarea15, Alert as Alert7, Text as Text40 } from "@mantine/core";
6700
6601
  var inputStyles20 = {
6701
6602
  label: { color: "#adb5bd" },
6702
6603
  input: {
@@ -6716,7 +6617,7 @@ var CreateEntityActionForm = ({ data, onChange }) => {
6716
6617
  } catch {
6717
6618
  }
6718
6619
  };
6719
- return /* @__PURE__ */ React78.createElement(Stack54, { gap: "md" }, /* @__PURE__ */ React78.createElement(Alert7, { color: "blue", style: { backgroundColor: "#2a2a2a", borderColor: "#4dabf7" } }, /* @__PURE__ */ React78.createElement(Text39, { size: "sm", style: { color: "#4dabf7" } }, "This is a complex entity creation action. Please provide the complete entity data as JSON.")), /* @__PURE__ */ React78.createElement(
6620
+ return /* @__PURE__ */ React79.createElement(Stack55, { gap: "md" }, /* @__PURE__ */ React79.createElement(Alert7, { color: "blue", style: { backgroundColor: "#2a2a2a", borderColor: "#4dabf7" } }, /* @__PURE__ */ React79.createElement(Text40, { size: "sm", style: { color: "#4dabf7" } }, "This is a complex entity creation action. Please provide the complete entity data as JSON.")), /* @__PURE__ */ React79.createElement(
6720
6621
  Textarea15,
6721
6622
  {
6722
6623
  label: "Entity Data (JSON)",
@@ -6731,8 +6632,8 @@ var CreateEntityActionForm = ({ data, onChange }) => {
6731
6632
  };
6732
6633
 
6733
6634
  // src/mantine/blocks/proposalActions/components/forms/UpdateVotingConfigActionForm.tsx
6734
- import React79 from "react";
6735
- import { Stack as Stack55, Checkbox as Checkbox6, Select as Select6, NumberInput as NumberInput7, Group as Group25 } from "@mantine/core";
6635
+ import React80 from "react";
6636
+ import { Stack as Stack56, Checkbox as Checkbox6, Select as Select6, NumberInput as NumberInput7, Group as Group25 } from "@mantine/core";
6736
6637
  var inputStyles21 = {
6737
6638
  label: { color: "#adb5bd" },
6738
6639
  input: {
@@ -6748,7 +6649,7 @@ var UpdateVotingConfigActionForm = ({
6748
6649
  data,
6749
6650
  onChange
6750
6651
  }) => {
6751
- return /* @__PURE__ */ React79.createElement(Stack55, { gap: "md" }, /* @__PURE__ */ React79.createElement(
6652
+ return /* @__PURE__ */ React80.createElement(Stack56, { gap: "md" }, /* @__PURE__ */ React80.createElement(
6752
6653
  Checkbox6,
6753
6654
  {
6754
6655
  label: "Only members can execute",
@@ -6759,7 +6660,7 @@ var UpdateVotingConfigActionForm = ({
6759
6660
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6760
6661
  }
6761
6662
  }
6762
- ), /* @__PURE__ */ React79.createElement(
6663
+ ), /* @__PURE__ */ React80.createElement(
6763
6664
  Select6,
6764
6665
  {
6765
6666
  label: "Threshold Type",
@@ -6771,7 +6672,7 @@ var UpdateVotingConfigActionForm = ({
6771
6672
  ],
6772
6673
  styles: inputStyles21
6773
6674
  }
6774
- ), data.thresholdType === "%" && /* @__PURE__ */ React79.createElement(
6675
+ ), data.thresholdType === "%" && /* @__PURE__ */ React80.createElement(
6775
6676
  NumberInput7,
6776
6677
  {
6777
6678
  label: "Threshold Percentage",
@@ -6783,7 +6684,7 @@ var UpdateVotingConfigActionForm = ({
6783
6684
  suffix: "%",
6784
6685
  styles: inputStyles21
6785
6686
  }
6786
- ), /* @__PURE__ */ React79.createElement(
6687
+ ), /* @__PURE__ */ React80.createElement(
6787
6688
  Checkbox6,
6788
6689
  {
6789
6690
  label: "Enable Quorum",
@@ -6794,7 +6695,7 @@ var UpdateVotingConfigActionForm = ({
6794
6695
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6795
6696
  }
6796
6697
  }
6797
- ), data.quorumEnabled && /* @__PURE__ */ React79.createElement(React79.Fragment, null, /* @__PURE__ */ React79.createElement(
6698
+ ), data.quorumEnabled && /* @__PURE__ */ React80.createElement(React80.Fragment, null, /* @__PURE__ */ React80.createElement(
6798
6699
  Select6,
6799
6700
  {
6800
6701
  label: "Quorum Type",
@@ -6806,7 +6707,7 @@ var UpdateVotingConfigActionForm = ({
6806
6707
  ],
6807
6708
  styles: inputStyles21
6808
6709
  }
6809
- ), data.quorumType === "%" && /* @__PURE__ */ React79.createElement(
6710
+ ), data.quorumType === "%" && /* @__PURE__ */ React80.createElement(
6810
6711
  NumberInput7,
6811
6712
  {
6812
6713
  label: "Quorum Percentage",
@@ -6818,7 +6719,7 @@ var UpdateVotingConfigActionForm = ({
6818
6719
  suffix: "%",
6819
6720
  styles: inputStyles21
6820
6721
  }
6821
- )), /* @__PURE__ */ React79.createElement(Group25, { grow: true }, /* @__PURE__ */ React79.createElement(
6722
+ )), /* @__PURE__ */ React80.createElement(Group25, { grow: true }, /* @__PURE__ */ React80.createElement(
6822
6723
  NumberInput7,
6823
6724
  {
6824
6725
  label: "Proposal Duration",
@@ -6828,7 +6729,7 @@ var UpdateVotingConfigActionForm = ({
6828
6729
  min: 1,
6829
6730
  styles: inputStyles21
6830
6731
  }
6831
- ), /* @__PURE__ */ React79.createElement(
6732
+ ), /* @__PURE__ */ React80.createElement(
6832
6733
  Select6,
6833
6734
  {
6834
6735
  label: "Duration Units",
@@ -6842,7 +6743,7 @@ var UpdateVotingConfigActionForm = ({
6842
6743
  ],
6843
6744
  styles: inputStyles21
6844
6745
  }
6845
- )), /* @__PURE__ */ React79.createElement(
6746
+ )), /* @__PURE__ */ React80.createElement(
6846
6747
  Checkbox6,
6847
6748
  {
6848
6749
  label: "Allow revoting",
@@ -6857,8 +6758,8 @@ var UpdateVotingConfigActionForm = ({
6857
6758
  };
6858
6759
 
6859
6760
  // src/mantine/blocks/proposalActions/components/forms/UpdatePreProposeConfigActionForm.tsx
6860
- import React80 from "react";
6861
- import { Stack as Stack56, Checkbox as Checkbox7, TextInput as TextInput27, Select as Select7, Textarea as Textarea16 } from "@mantine/core";
6761
+ import React81 from "react";
6762
+ import { Stack as Stack57, Checkbox as Checkbox7, TextInput as TextInput27, Select as Select7, Textarea as Textarea16 } from "@mantine/core";
6862
6763
  var inputStyles22 = {
6863
6764
  label: { color: "#adb5bd" },
6864
6765
  input: {
@@ -6871,7 +6772,7 @@ var inputStyles22 = {
6871
6772
  }
6872
6773
  };
6873
6774
  var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
6874
- return /* @__PURE__ */ React80.createElement(Stack56, { gap: "md" }, /* @__PURE__ */ React80.createElement(
6775
+ return /* @__PURE__ */ React81.createElement(Stack57, { gap: "md" }, /* @__PURE__ */ React81.createElement(
6875
6776
  Checkbox7,
6876
6777
  {
6877
6778
  label: "Anyone can propose",
@@ -6882,7 +6783,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
6882
6783
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6883
6784
  }
6884
6785
  }
6885
- ), /* @__PURE__ */ React80.createElement(
6786
+ ), /* @__PURE__ */ React81.createElement(
6886
6787
  Checkbox7,
6887
6788
  {
6888
6789
  label: "Deposit required",
@@ -6893,7 +6794,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
6893
6794
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
6894
6795
  }
6895
6796
  }
6896
- ), data.depositRequired && /* @__PURE__ */ React80.createElement(React80.Fragment, null, /* @__PURE__ */ React80.createElement(
6797
+ ), data.depositRequired && /* @__PURE__ */ React81.createElement(React81.Fragment, null, /* @__PURE__ */ React81.createElement(
6897
6798
  TextInput27,
6898
6799
  {
6899
6800
  label: "Deposit Amount",
@@ -6906,7 +6807,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
6906
6807
  required: true,
6907
6808
  styles: inputStyles22
6908
6809
  }
6909
- ), /* @__PURE__ */ React80.createElement(
6810
+ ), /* @__PURE__ */ React81.createElement(
6910
6811
  Select7,
6911
6812
  {
6912
6813
  label: "Deposit Type",
@@ -6922,7 +6823,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
6922
6823
  ],
6923
6824
  styles: inputStyles22
6924
6825
  }
6925
- ), /* @__PURE__ */ React80.createElement(
6826
+ ), /* @__PURE__ */ React81.createElement(
6926
6827
  TextInput27,
6927
6828
  {
6928
6829
  label: "Token Denomination or Address",
@@ -6935,7 +6836,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
6935
6836
  required: true,
6936
6837
  styles: inputStyles22
6937
6838
  }
6938
- ), /* @__PURE__ */ React80.createElement(
6839
+ ), /* @__PURE__ */ React81.createElement(
6939
6840
  TextInput27,
6940
6841
  {
6941
6842
  label: "Refund Policy",
@@ -6948,7 +6849,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
6948
6849
  required: true,
6949
6850
  styles: inputStyles22
6950
6851
  }
6951
- ), data.depositInfo.type !== "native" && /* @__PURE__ */ React80.createElement(
6852
+ ), data.depositInfo.type !== "native" && /* @__PURE__ */ React81.createElement(
6952
6853
  Textarea16,
6953
6854
  {
6954
6855
  label: "Token Configuration (JSON)",
@@ -6971,8 +6872,8 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
6971
6872
  };
6972
6873
 
6973
6874
  // src/mantine/blocks/proposalActions/components/forms/GovernanceVoteActionForm.tsx
6974
- import React81 from "react";
6975
- import { Stack as Stack57, TextInput as TextInput28, Select as Select8 } from "@mantine/core";
6875
+ import React82 from "react";
6876
+ import { Stack as Stack58, TextInput as TextInput28, Select as Select8 } from "@mantine/core";
6976
6877
  var inputStyles23 = {
6977
6878
  label: { color: "#adb5bd" },
6978
6879
  input: {
@@ -6994,7 +6895,7 @@ var GovernanceVoteActionForm = ({
6994
6895
  { value: "3", label: "No" },
6995
6896
  { value: "4", label: "No with Veto" }
6996
6897
  ];
6997
- return /* @__PURE__ */ React81.createElement(Stack57, { gap: "md" }, /* @__PURE__ */ React81.createElement(
6898
+ return /* @__PURE__ */ React82.createElement(Stack58, { gap: "md" }, /* @__PURE__ */ React82.createElement(
6998
6899
  TextInput28,
6999
6900
  {
7000
6901
  label: "Proposal ID",
@@ -7004,7 +6905,7 @@ var GovernanceVoteActionForm = ({
7004
6905
  required: true,
7005
6906
  styles: inputStyles23
7006
6907
  }
7007
- ), /* @__PURE__ */ React81.createElement(
6908
+ ), /* @__PURE__ */ React82.createElement(
7008
6909
  Select8,
7009
6910
  {
7010
6911
  label: "Vote Option",
@@ -7018,8 +6919,8 @@ var GovernanceVoteActionForm = ({
7018
6919
  };
7019
6920
 
7020
6921
  // src/mantine/blocks/proposalActions/components/forms/WithdrawTokenSwapActionForm.tsx
7021
- import React82 from "react";
7022
- import { Stack as Stack58, TextInput as TextInput29, Checkbox as Checkbox8 } from "@mantine/core";
6922
+ import React83 from "react";
6923
+ import { Stack as Stack59, TextInput as TextInput29, Checkbox as Checkbox8 } from "@mantine/core";
7023
6924
  var inputStyles24 = {
7024
6925
  label: { color: "#adb5bd" },
7025
6926
  input: {
@@ -7035,7 +6936,7 @@ var WithdrawTokenSwapActionForm = ({
7035
6936
  data,
7036
6937
  onChange
7037
6938
  }) => {
7038
- return /* @__PURE__ */ React82.createElement(Stack58, { gap: "md" }, /* @__PURE__ */ React82.createElement(
6939
+ return /* @__PURE__ */ React83.createElement(Stack59, { gap: "md" }, /* @__PURE__ */ React83.createElement(
7039
6940
  Checkbox8,
7040
6941
  {
7041
6942
  label: "Contract chosen",
@@ -7046,7 +6947,7 @@ var WithdrawTokenSwapActionForm = ({
7046
6947
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
7047
6948
  }
7048
6949
  }
7049
- ), data.contractChosen && /* @__PURE__ */ React82.createElement(
6950
+ ), data.contractChosen && /* @__PURE__ */ React83.createElement(
7050
6951
  TextInput29,
7051
6952
  {
7052
6953
  label: "Token Swap Contract Address",
@@ -7060,8 +6961,8 @@ var WithdrawTokenSwapActionForm = ({
7060
6961
  };
7061
6962
 
7062
6963
  // src/mantine/blocks/proposalActions/components/forms/PerformTokenSwapActionForm.tsx
7063
- import React83 from "react";
7064
- import { Stack as Stack59, TextInput as TextInput30, Checkbox as Checkbox9, Textarea as Textarea17 } from "@mantine/core";
6964
+ import React84 from "react";
6965
+ import { Stack as Stack60, TextInput as TextInput30, Checkbox as Checkbox9, Textarea as Textarea17 } from "@mantine/core";
7065
6966
  var inputStyles25 = {
7066
6967
  label: { color: "#adb5bd" },
7067
6968
  input: {
@@ -7077,7 +6978,7 @@ var PerformTokenSwapActionForm = ({
7077
6978
  data,
7078
6979
  onChange
7079
6980
  }) => {
7080
- return /* @__PURE__ */ React83.createElement(Stack59, { gap: "md" }, /* @__PURE__ */ React83.createElement(
6981
+ return /* @__PURE__ */ React84.createElement(Stack60, { gap: "md" }, /* @__PURE__ */ React84.createElement(
7081
6982
  Checkbox9,
7082
6983
  {
7083
6984
  label: "Contract chosen",
@@ -7088,7 +6989,7 @@ var PerformTokenSwapActionForm = ({
7088
6989
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
7089
6990
  }
7090
6991
  }
7091
- ), data.contractChosen && /* @__PURE__ */ React83.createElement(React83.Fragment, null, /* @__PURE__ */ React83.createElement(
6992
+ ), data.contractChosen && /* @__PURE__ */ React84.createElement(React84.Fragment, null, /* @__PURE__ */ React84.createElement(
7092
6993
  TextInput30,
7093
6994
  {
7094
6995
  label: "Token Swap Contract Address",
@@ -7098,7 +6999,7 @@ var PerformTokenSwapActionForm = ({
7098
6999
  required: true,
7099
7000
  styles: inputStyles25
7100
7001
  }
7101
- ), /* @__PURE__ */ React83.createElement(
7002
+ ), /* @__PURE__ */ React84.createElement(
7102
7003
  Textarea17,
7103
7004
  {
7104
7005
  label: "Self Party Information (JSON)",
@@ -7114,7 +7015,7 @@ var PerformTokenSwapActionForm = ({
7114
7015
  minRows: 4,
7115
7016
  styles: inputStyles25
7116
7017
  }
7117
- ), /* @__PURE__ */ React83.createElement(
7018
+ ), /* @__PURE__ */ React84.createElement(
7118
7019
  Textarea17,
7119
7020
  {
7120
7021
  label: "Counterparty Information (JSON)",
@@ -7134,8 +7035,8 @@ var PerformTokenSwapActionForm = ({
7134
7035
  };
7135
7036
 
7136
7037
  // src/mantine/blocks/proposalActions/components/forms/StakeToGroupActionForm.tsx
7137
- import React84 from "react";
7138
- import { Stack as Stack60, TextInput as TextInput31 } from "@mantine/core";
7038
+ import React85 from "react";
7039
+ import { Stack as Stack61, TextInput as TextInput31 } from "@mantine/core";
7139
7040
  var inputStyles26 = {
7140
7041
  label: { color: "#adb5bd" },
7141
7042
  input: {
@@ -7151,7 +7052,7 @@ var StakeToGroupActionForm = ({
7151
7052
  data,
7152
7053
  onChange
7153
7054
  }) => {
7154
- return /* @__PURE__ */ React84.createElement(Stack60, { gap: "md" }, /* @__PURE__ */ React84.createElement(
7055
+ return /* @__PURE__ */ React85.createElement(Stack61, { gap: "md" }, /* @__PURE__ */ React85.createElement(
7155
7056
  TextInput31,
7156
7057
  {
7157
7058
  label: "Token Contract Address",
@@ -7161,7 +7062,7 @@ var StakeToGroupActionForm = ({
7161
7062
  required: true,
7162
7063
  styles: inputStyles26
7163
7064
  }
7164
- ), /* @__PURE__ */ React84.createElement(
7065
+ ), /* @__PURE__ */ React85.createElement(
7165
7066
  TextInput31,
7166
7067
  {
7167
7068
  label: "Staking Contract Address",
@@ -7171,7 +7072,7 @@ var StakeToGroupActionForm = ({
7171
7072
  required: true,
7172
7073
  styles: inputStyles26
7173
7074
  }
7174
- ), /* @__PURE__ */ React84.createElement(
7075
+ ), /* @__PURE__ */ React85.createElement(
7175
7076
  TextInput31,
7176
7077
  {
7177
7078
  label: "Amount",
@@ -7185,8 +7086,8 @@ var StakeToGroupActionForm = ({
7185
7086
  };
7186
7087
 
7187
7088
  // src/mantine/blocks/proposalActions/components/forms/SendGroupTokenActionForm.tsx
7188
- import React85 from "react";
7189
- import { Stack as Stack61, TextInput as TextInput32 } from "@mantine/core";
7089
+ import React86 from "react";
7090
+ import { Stack as Stack62, TextInput as TextInput32 } from "@mantine/core";
7190
7091
  var inputStyles27 = {
7191
7092
  label: { color: "#adb5bd" },
7192
7093
  input: {
@@ -7202,7 +7103,7 @@ var SendGroupTokenActionForm = ({
7202
7103
  data,
7203
7104
  onChange
7204
7105
  }) => {
7205
- return /* @__PURE__ */ React85.createElement(Stack61, { gap: "md" }, /* @__PURE__ */ React85.createElement(
7106
+ return /* @__PURE__ */ React86.createElement(Stack62, { gap: "md" }, /* @__PURE__ */ React86.createElement(
7206
7107
  TextInput32,
7207
7108
  {
7208
7109
  label: "Contract Address",
@@ -7212,7 +7113,7 @@ var SendGroupTokenActionForm = ({
7212
7113
  required: true,
7213
7114
  styles: inputStyles27
7214
7115
  }
7215
- ), /* @__PURE__ */ React85.createElement(
7116
+ ), /* @__PURE__ */ React86.createElement(
7216
7117
  TextInput32,
7217
7118
  {
7218
7119
  label: "Recipient Address",
@@ -7222,7 +7123,7 @@ var SendGroupTokenActionForm = ({
7222
7123
  required: true,
7223
7124
  styles: inputStyles27
7224
7125
  }
7225
- ), /* @__PURE__ */ React85.createElement(
7126
+ ), /* @__PURE__ */ React86.createElement(
7226
7127
  TextInput32,
7227
7128
  {
7228
7129
  label: "Amount",
@@ -7236,8 +7137,8 @@ var SendGroupTokenActionForm = ({
7236
7137
  };
7237
7138
 
7238
7139
  // src/mantine/blocks/proposalActions/components/forms/ValidatorActionsActionForm.tsx
7239
- import React86 from "react";
7240
- import { Stack as Stack62, Select as Select9, Textarea as Textarea18 } from "@mantine/core";
7140
+ import React87 from "react";
7141
+ import { Stack as Stack63, Select as Select9, Textarea as Textarea18 } from "@mantine/core";
7241
7142
  var inputStyles28 = {
7242
7143
  label: { color: "#adb5bd" },
7243
7144
  input: {
@@ -7259,7 +7160,7 @@ var ValidatorActionsActionForm = ({
7259
7160
  { value: "/cosmos.slashing.v1beta1.MsgUnjail" /* UnjailValidator */, label: "Unjail Validator" },
7260
7161
  { value: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" /* WithdrawValidatorCommission */, label: "Withdraw Commission" }
7261
7162
  ];
7262
- return /* @__PURE__ */ React86.createElement(Stack62, { gap: "md" }, /* @__PURE__ */ React86.createElement(
7163
+ return /* @__PURE__ */ React87.createElement(Stack63, { gap: "md" }, /* @__PURE__ */ React87.createElement(
7263
7164
  Select9,
7264
7165
  {
7265
7166
  label: "Validator Action Type",
@@ -7269,7 +7170,7 @@ var ValidatorActionsActionForm = ({
7269
7170
  required: true,
7270
7171
  styles: inputStyles28
7271
7172
  }
7272
- ), data.validatorActionType === "/cosmos.staking.v1beta1.MsgCreateValidator" /* CreateValidator */ && /* @__PURE__ */ React86.createElement(
7173
+ ), data.validatorActionType === "/cosmos.staking.v1beta1.MsgCreateValidator" /* CreateValidator */ && /* @__PURE__ */ React87.createElement(
7273
7174
  Textarea18,
7274
7175
  {
7275
7176
  label: "Create Validator Message (JSON)",
@@ -7280,7 +7181,7 @@ var ValidatorActionsActionForm = ({
7280
7181
  required: true,
7281
7182
  styles: inputStyles28
7282
7183
  }
7283
- ), data.validatorActionType === "/cosmos.staking.v1beta1.MsgEditValidator" /* EditValidator */ && /* @__PURE__ */ React86.createElement(
7184
+ ), data.validatorActionType === "/cosmos.staking.v1beta1.MsgEditValidator" /* EditValidator */ && /* @__PURE__ */ React87.createElement(
7284
7185
  Textarea18,
7285
7186
  {
7286
7187
  label: "Edit Validator Message (JSON)",
@@ -7937,28 +7838,28 @@ var actionRegistry = /* @__PURE__ */ new Map([
7937
7838
  ]);
7938
7839
 
7939
7840
  // src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
7940
- import React93, { useState as useState23, useEffect as useEffect14, useMemo as useMemo16, useCallback as useCallback14 } from "react";
7841
+ import React94, { useState as useState23, useEffect as useEffect15, useMemo as useMemo15, useCallback as useCallback15 } from "react";
7941
7842
  import { createReactBlockSpec as createReactBlockSpec7 } from "@blocknote/react";
7942
- import { Stack as Stack68, Text as Text45, Button as Button23, ActionIcon as ActionIcon10, Center as Center3, Flex as Flex15 } from "@mantine/core";
7843
+ import { Stack as Stack69, Text as Text46, Button as Button23, ActionIcon as ActionIcon10, Center as Center3, Flex as Flex16 } from "@mantine/core";
7943
7844
 
7944
7845
  // src/mantine/blocks/enumChecklist/oracle_personalities/index.tsx
7945
- import React88 from "react";
7946
- import { Box as Box17, Flex as Flex14, Stack as Stack64, Text as Text41, Image as Image10 } from "@mantine/core";
7846
+ import React89 from "react";
7847
+ import { Box as Box18, Flex as Flex15, Stack as Stack65, Text as Text42, Image as Image11 } from "@mantine/core";
7947
7848
  function OraclePersonalitiesEnumList({ selectionMode, isItemChecked, onItemCheck, items }) {
7948
7849
  if (!items || items.length === 0) {
7949
- return /* @__PURE__ */ React88.createElement(Text41, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No assets found");
7850
+ return /* @__PURE__ */ React89.createElement(Text42, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No assets found");
7950
7851
  }
7951
- const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */ React88.createElement(ListItemContainer, { key: id }, /* @__PURE__ */ React88.createElement(Flex14, { align: "center", gap: "sm" }, /* @__PURE__ */ React88.createElement(Image10, { radius: 16, w: 62, h: 62, src: icon, alt: name }), /* @__PURE__ */ React88.createElement(Stack64, { gap: 0 }, /* @__PURE__ */ React88.createElement(Text41, { size: "sm", fw: 500 }, name || "-"), description !== void 0 && /* @__PURE__ */ React88.createElement(Text41, { size: "sm", c: "dimmed" }, description))), /* @__PURE__ */ React88.createElement(Flex14, { align: "center", gap: "md" }, /* @__PURE__ */ React88.createElement(Stack64, { ta: "right", gap: 0 }, /* @__PURE__ */ React88.createElement(Text41, { size: "sm", fw: 500 }, "Voice"), /* @__PURE__ */ React88.createElement(Text41, { size: "sm", c: "dimmed" }, voice)), selectionMode && /* @__PURE__ */ React88.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${name}`, checked: isItemChecked?.(id), onCheck: (checked) => onItemCheck?.(id, checked) }))));
7952
- return /* @__PURE__ */ React88.createElement(Box17, { flex: 1 }, /* @__PURE__ */ React88.createElement(Stack64, null, rows));
7852
+ const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */ React89.createElement(ListItemContainer, { key: id }, /* @__PURE__ */ React89.createElement(Flex15, { align: "center", gap: "sm" }, /* @__PURE__ */ React89.createElement(Image11, { radius: 16, w: 62, h: 62, src: icon, alt: name }), /* @__PURE__ */ React89.createElement(Stack65, { gap: 0 }, /* @__PURE__ */ React89.createElement(Text42, { size: "sm", fw: 500 }, name || "-"), description !== void 0 && /* @__PURE__ */ React89.createElement(Text42, { size: "sm", c: "dimmed" }, description))), /* @__PURE__ */ React89.createElement(Flex15, { align: "center", gap: "md" }, /* @__PURE__ */ React89.createElement(Stack65, { ta: "right", gap: 0 }, /* @__PURE__ */ React89.createElement(Text42, { size: "sm", fw: 500 }, "Voice"), /* @__PURE__ */ React89.createElement(Text42, { size: "sm", c: "dimmed" }, voice)), selectionMode && /* @__PURE__ */ React89.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${name}`, checked: isItemChecked?.(id), onCheck: (checked) => onItemCheck?.(id, checked) }))));
7853
+ return /* @__PURE__ */ React89.createElement(Box18, { flex: 1 }, /* @__PURE__ */ React89.createElement(Stack65, null, rows));
7953
7854
  }
7954
7855
 
7955
7856
  // src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
7956
- import React92, { useState as useState22 } from "react";
7957
- import { Modal as Modal2, Group as Group30, Box as Box19 } from "@mantine/core";
7857
+ import React93, { useState as useState22 } from "react";
7858
+ import { Modal as Modal2, Group as Group30, Box as Box20 } from "@mantine/core";
7958
7859
 
7959
7860
  // src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
7960
- import React89 from "react";
7961
- import { Stack as Stack65, Card as Card19, Group as Group27, Text as Text42, Box as Box18, Button as Button20 } from "@mantine/core";
7861
+ import React90 from "react";
7862
+ import { Stack as Stack66, Card as Card19, Group as Group27, Text as Text43, Box as Box19, Button as Button20 } from "@mantine/core";
7962
7863
 
7963
7864
  // src/mantine/blocks/enumChecklist/oracle_personalities/config.ts
7964
7865
  var oraclePersonalitiesMetadata = {
@@ -8087,7 +7988,7 @@ function getEnumListItems(type) {
8087
7988
  // src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
8088
7989
  var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
8089
7990
  const enumListsMeta = getEnumListTypesMetadata();
8090
- return /* @__PURE__ */ React89.createElement(Stack65, { gap: "md" }, /* @__PURE__ */ React89.createElement("div", null, /* @__PURE__ */ React89.createElement(Text42, { size: "lg", fw: 600, mb: "xs" }, "Choose List Type"), /* @__PURE__ */ React89.createElement(Text42, { size: "sm", c: "dimmed" }, "Select the type of list you want to create")), /* @__PURE__ */ React89.createElement(Stack65, { gap: "sm" }, enumListsMeta.map((enumChecklistMeta) => /* @__PURE__ */ React89.createElement(
7991
+ return /* @__PURE__ */ React90.createElement(Stack66, { gap: "md" }, /* @__PURE__ */ React90.createElement("div", null, /* @__PURE__ */ React90.createElement(Text43, { size: "lg", fw: 600, mb: "xs" }, "Choose List Type"), /* @__PURE__ */ React90.createElement(Text43, { size: "sm", c: "dimmed" }, "Select the type of list you want to create")), /* @__PURE__ */ React90.createElement(Stack66, { gap: "sm" }, enumListsMeta.map((enumChecklistMeta) => /* @__PURE__ */ React90.createElement(
8091
7992
  Card19,
8092
7993
  {
8093
7994
  key: enumChecklistMeta.id,
@@ -8100,8 +8001,8 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
8100
8001
  },
8101
8002
  onClick: () => onTypeSelect(enumChecklistMeta.id)
8102
8003
  },
8103
- /* @__PURE__ */ React89.createElement(Group27, { gap: "md", align: "flex-start" }, /* @__PURE__ */ React89.createElement(
8104
- Box18,
8004
+ /* @__PURE__ */ React90.createElement(Group27, { gap: "md", align: "flex-start" }, /* @__PURE__ */ React90.createElement(
8005
+ Box19,
8105
8006
  {
8106
8007
  style: {
8107
8008
  width: 48,
@@ -8116,35 +8017,35 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
8116
8017
  }
8117
8018
  },
8118
8019
  enumChecklistMeta.icon
8119
- ), /* @__PURE__ */ React89.createElement(Stack65, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React89.createElement(Text42, { size: "md", fw: 600 }, enumChecklistMeta.name), /* @__PURE__ */ React89.createElement(Text42, { size: "sm", c: "dimmed" }, enumChecklistMeta.description)))
8120
- ))), /* @__PURE__ */ React89.createElement(Group27, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React89.createElement(Button20, { onClick: onNext, disabled: !selectedType }, "Next")));
8020
+ ), /* @__PURE__ */ React90.createElement(Stack66, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React90.createElement(Text43, { size: "md", fw: 600 }, enumChecklistMeta.name), /* @__PURE__ */ React90.createElement(Text43, { size: "sm", c: "dimmed" }, enumChecklistMeta.description)))
8021
+ ))), /* @__PURE__ */ React90.createElement(Group27, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React90.createElement(Button20, { onClick: onNext, disabled: !selectedType }, "Next")));
8121
8022
  };
8122
8023
 
8123
8024
  // src/mantine/blocks/enumChecklist/EnumChecklistPreviewStep.tsx
8124
- import React90 from "react";
8125
- import { Stack as Stack66, Text as Text43, Button as Button21, Group as Group28 } from "@mantine/core";
8025
+ import React91 from "react";
8026
+ import { Stack as Stack67, Text as Text44, Button as Button21, Group as Group28 } from "@mantine/core";
8126
8027
  var EnumChecklistPreviewStep = ({ listType, onAddToBlock, onPrev }) => {
8127
8028
  const renderListComponent = () => {
8128
8029
  switch (listType) {
8129
8030
  case "oracle_personalities":
8130
- return /* @__PURE__ */ React90.createElement(OraclePersonalitiesEnumList, { items: getEnumListItems(listType) });
8031
+ return /* @__PURE__ */ React91.createElement(OraclePersonalitiesEnumList, { items: getEnumListItems(listType) });
8131
8032
  default:
8132
8033
  return null;
8133
8034
  }
8134
8035
  };
8135
- return /* @__PURE__ */ React90.createElement(Stack66, { gap: "md" }, /* @__PURE__ */ React90.createElement("div", null, /* @__PURE__ */ React90.createElement(Text43, { size: "lg", fw: 600, mb: "xs" }, "Preview ", getEnumListNameByType(listType)), /* @__PURE__ */ React90.createElement(Text43, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), /* @__PURE__ */ React90.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React90.createElement(Group28, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React90.createElement(Button21, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React90.createElement(Button21, { onClick: onAddToBlock }, "Add to Block")));
8036
+ return /* @__PURE__ */ React91.createElement(Stack67, { gap: "md" }, /* @__PURE__ */ React91.createElement("div", null, /* @__PURE__ */ React91.createElement(Text44, { size: "lg", fw: 600, mb: "xs" }, "Preview ", getEnumListNameByType(listType)), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), /* @__PURE__ */ React91.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React91.createElement(Group28, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React91.createElement(Button21, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React91.createElement(Button21, { onClick: onAddToBlock }, "Add to Block")));
8136
8037
  };
8137
8038
 
8138
8039
  // src/mantine/blocks/enumChecklist/EnumChecklistConfigurationStep.tsx
8139
- import React91 from "react";
8140
- import { Stack as Stack67, TextInput as TextInput33, Text as Text44, Button as Button22, Group as Group29, Switch as Switch4, Select as Select11 } from "@mantine/core";
8040
+ import React92 from "react";
8041
+ import { Stack as Stack68, TextInput as TextInput33, Text as Text45, Button as Button22, Group as Group29, Switch as Switch4, Select as Select11 } from "@mantine/core";
8141
8042
  var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onConfigChange, onPrev, onNext, isValid }) => {
8142
8043
  const typeConfig = ENUM_LIST_CONFIG[listType];
8143
8044
  const configFields = getEnumListTypesConfigFields(listType);
8144
8045
  const renderListConfigField = (field) => {
8145
8046
  switch (field.type) {
8146
8047
  case "text":
8147
- return /* @__PURE__ */ React91.createElement(
8048
+ return /* @__PURE__ */ React92.createElement(
8148
8049
  TextInput33,
8149
8050
  {
8150
8051
  label: field.label,
@@ -8156,7 +8057,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
8156
8057
  }
8157
8058
  );
8158
8059
  case "switch":
8159
- return /* @__PURE__ */ React91.createElement(
8060
+ return /* @__PURE__ */ React92.createElement(
8160
8061
  Switch4,
8161
8062
  {
8162
8063
  label: field.label,
@@ -8166,7 +8067,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
8166
8067
  }
8167
8068
  );
8168
8069
  case "select":
8169
- return /* @__PURE__ */ React91.createElement(
8070
+ return /* @__PURE__ */ React92.createElement(
8170
8071
  Select11,
8171
8072
  {
8172
8073
  label: field.label,
@@ -8179,7 +8080,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
8179
8080
  }
8180
8081
  );
8181
8082
  default:
8182
- return /* @__PURE__ */ React91.createElement(
8083
+ return /* @__PURE__ */ React92.createElement(
8183
8084
  TextInput33,
8184
8085
  {
8185
8086
  label: field.label,
@@ -8192,7 +8093,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
8192
8093
  );
8193
8094
  }
8194
8095
  };
8195
- return /* @__PURE__ */ React91.createElement(Stack67, { gap: "md" }, /* @__PURE__ */ React91.createElement("div", null, /* @__PURE__ */ React91.createElement(Text44, { size: "lg", fw: 600, mb: "xs" }, "Configure ", typeConfig.metadata.name), /* @__PURE__ */ React91.createElement(Text44, { size: "sm", c: "dimmed" }, typeConfig.metadata.description)), /* @__PURE__ */ React91.createElement(Stack67, { gap: "sm" }, configFields.map((field) => /* @__PURE__ */ React91.createElement("div", { key: field.key }, renderListConfigField(field)))), /* @__PURE__ */ React91.createElement(Group29, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React91.createElement(Button22, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React91.createElement(Button22, { onClick: onNext, disabled: !isValid }, "Next")));
8096
+ return /* @__PURE__ */ React92.createElement(Stack68, { gap: "md" }, /* @__PURE__ */ React92.createElement("div", null, /* @__PURE__ */ React92.createElement(Text45, { size: "lg", fw: 600, mb: "xs" }, "Configure ", typeConfig.metadata.name), /* @__PURE__ */ React92.createElement(Text45, { size: "sm", c: "dimmed" }, typeConfig.metadata.description)), /* @__PURE__ */ React92.createElement(Stack68, { gap: "sm" }, configFields.map((field) => /* @__PURE__ */ React92.createElement("div", { key: field.key }, renderListConfigField(field)))), /* @__PURE__ */ React92.createElement(Group29, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React92.createElement(Button22, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React92.createElement(Button22, { onClick: onNext, disabled: !isValid }, "Next")));
8196
8097
  };
8197
8098
 
8198
8099
  // src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
@@ -8254,9 +8155,9 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
8254
8155
  const renderStepContent = () => {
8255
8156
  switch (activeStep) {
8256
8157
  case "type":
8257
- return /* @__PURE__ */ React92.createElement(EnumChecklistTypeSelection, { selectedType, onTypeSelect: handleTypeSelect, onNext: () => setActiveStep("configure") });
8158
+ return /* @__PURE__ */ React93.createElement(EnumChecklistTypeSelection, { selectedType, onTypeSelect: handleTypeSelect, onNext: () => setActiveStep("configure") });
8258
8159
  case "configure":
8259
- return selectedType ? /* @__PURE__ */ React92.createElement(
8160
+ return selectedType ? /* @__PURE__ */ React93.createElement(
8260
8161
  EnumChecklistConfigurationStep,
8261
8162
  {
8262
8163
  enumChecklistType: selectedType,
@@ -8268,22 +8169,22 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
8268
8169
  }
8269
8170
  ) : null;
8270
8171
  case "preview":
8271
- return selectedType ? /* @__PURE__ */ React92.createElement(EnumChecklistPreviewStep, { listType: selectedType, onAddToBlock: handleAddToBlock, onPrev: () => setActiveStep("configure") }) : null;
8172
+ return selectedType ? /* @__PURE__ */ React93.createElement(EnumChecklistPreviewStep, { listType: selectedType, onAddToBlock: handleAddToBlock, onPrev: () => setActiveStep("configure") }) : null;
8272
8173
  default:
8273
8174
  return null;
8274
8175
  }
8275
8176
  };
8276
- return /* @__PURE__ */ React92.createElement(Modal2, { opened, onClose: handleClose, title: "Configure Enum Checklist Block", size: "xl" }, /* @__PURE__ */ React92.createElement(Group30, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React92.createElement(Box19, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React92.createElement(ModalNavigation, { steps, activeStep, onStepChange: setActiveStep, showUpdateButton: selectedType !== null, onUpdateBlock: handleAddToBlock })), /* @__PURE__ */ React92.createElement(Box19, { style: { flex: 1 } }, renderStepContent())));
8177
+ return /* @__PURE__ */ React93.createElement(Modal2, { opened, onClose: handleClose, title: "Configure Enum Checklist Block", size: "xl" }, /* @__PURE__ */ React93.createElement(Group30, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React93.createElement(Box20, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React93.createElement(ModalNavigation, { steps, activeStep, onStepChange: setActiveStep, showUpdateButton: selectedType !== null, onUpdateBlock: handleAddToBlock })), /* @__PURE__ */ React93.createElement(Box20, { style: { flex: 1 } }, renderStepContent())));
8277
8178
  };
8278
8179
 
8279
8180
  // src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
8280
- var IconSettings2 = () => /* @__PURE__ */ React93.createElement("span", null, "\u2699\uFE0F");
8181
+ var IconSettings2 = () => /* @__PURE__ */ React94.createElement("span", null, "\u2699\uFE0F");
8281
8182
  var EnumChecklistBlockType = "enumChecklist";
8282
8183
  var EnumChecklistBlockContent = ({ block, editor }) => {
8283
8184
  const [modalOpened, setModalOpened] = useState23(false);
8284
8185
  const { editable } = useBlocknoteContext();
8285
8186
  const listType = block.props.listType && block.props.listType !== "" ? block.props.listType : null;
8286
- const listConfig = useMemo16(() => {
8187
+ const listConfig = useMemo15(() => {
8287
8188
  if (block.props.listConfig && block.props.listConfig !== "{}") {
8288
8189
  try {
8289
8190
  return JSON.parse(block.props.listConfig);
@@ -8294,7 +8195,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
8294
8195
  }
8295
8196
  return {};
8296
8197
  }, [block.props.listConfig]);
8297
- const selectedIds = useMemo16(() => {
8198
+ const selectedIds = useMemo15(() => {
8298
8199
  if (block.props.selectedIds && block.props.selectedIds !== "[]") {
8299
8200
  try {
8300
8201
  return new Set(JSON.parse(block.props.selectedIds));
@@ -8305,7 +8206,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
8305
8206
  }
8306
8207
  return /* @__PURE__ */ new Set();
8307
8208
  }, [block.props.selectedIds]);
8308
- useEffect14(() => {
8209
+ useEffect15(() => {
8309
8210
  if (listConfig?.selection_mode === "single" && selectedIds.size > 1) {
8310
8211
  const arr = Array.from(selectedIds);
8311
8212
  const lastSelected = arr.length > 0 ? arr[arr.length - 1] : void 0;
@@ -8314,13 +8215,13 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
8314
8215
  });
8315
8216
  }
8316
8217
  }, [listConfig?.selection_mode, selectedIds]);
8317
- const isItemChecked = useCallback14(
8218
+ const isItemChecked = useCallback15(
8318
8219
  (id) => {
8319
8220
  return selectedIds.has(id);
8320
8221
  },
8321
8222
  [selectedIds]
8322
8223
  );
8323
- const onItemCheck = useCallback14(
8224
+ const onItemCheck = useCallback15(
8324
8225
  (id, checked) => {
8325
8226
  const currentSelectedIds = Array.from(selectedIds);
8326
8227
  let newSelectedIds;
@@ -8363,7 +8264,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
8363
8264
  if (!listType) return null;
8364
8265
  switch (listType) {
8365
8266
  case "oracle_personalities":
8366
- return /* @__PURE__ */ React93.createElement(
8267
+ return /* @__PURE__ */ React94.createElement(
8367
8268
  OraclePersonalitiesEnumList,
8368
8269
  {
8369
8270
  items: getEnumListItems(listType),
@@ -8376,7 +8277,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
8376
8277
  return null;
8377
8278
  }
8378
8279
  };
8379
- return /* @__PURE__ */ React93.createElement(Stack68, { w: "100%" }, listType && /* @__PURE__ */ React93.createElement(Flex15, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React93.createElement(Text45, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React93.createElement(Text45, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React93.createElement(Flex15, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React93.createElement(Flex15, { gap: "xs" }, /* @__PURE__ */ React93.createElement(ActionIcon10, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React93.createElement(IconSettings2, null))))), /* @__PURE__ */ React93.createElement(Flex15, { flex: 1 }, !listType ? /* @__PURE__ */ React93.createElement(Center3, { py: "xl" }, /* @__PURE__ */ React93.createElement(Stack68, { align: "center", gap: "sm" }, /* @__PURE__ */ React93.createElement(Text45, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React93.createElement(Button23, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : /* @__PURE__ */ React93.createElement(Stack68, { gap: "md", flex: 1 }, renderListComponent())), /* @__PURE__ */ React93.createElement(
8280
+ return /* @__PURE__ */ React94.createElement(Stack69, { w: "100%" }, listType && /* @__PURE__ */ React94.createElement(Flex16, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React94.createElement(Text46, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React94.createElement(Text46, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React94.createElement(Flex16, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React94.createElement(Flex16, { gap: "xs" }, /* @__PURE__ */ React94.createElement(ActionIcon10, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React94.createElement(IconSettings2, null))))), /* @__PURE__ */ React94.createElement(Flex16, { flex: 1 }, !listType ? /* @__PURE__ */ React94.createElement(Center3, { py: "xl" }, /* @__PURE__ */ React94.createElement(Stack69, { align: "center", gap: "sm" }, /* @__PURE__ */ React94.createElement(Text46, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React94.createElement(Button23, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : /* @__PURE__ */ React94.createElement(Stack69, { gap: "md", flex: 1 }, renderListComponent())), /* @__PURE__ */ React94.createElement(
8380
8281
  EnumChecklistConfigModal,
8381
8282
  {
8382
8283
  opened: modalOpened,
@@ -8408,7 +8309,7 @@ var EnumChecklistBlock = createReactBlockSpec7(
8408
8309
  content: "none"
8409
8310
  },
8410
8311
  {
8411
- render: (props) => /* @__PURE__ */ React93.createElement(EnumChecklistBlockContent, { ...props })
8312
+ render: (props) => /* @__PURE__ */ React94.createElement(EnumChecklistBlockContent, { ...props })
8412
8313
  }
8413
8314
  );
8414
8315
 
@@ -8506,6 +8407,9 @@ blockRegistry.register({
8506
8407
  defaultProps: {}
8507
8408
  });
8508
8409
 
8410
+ // src/mantine/blocks/hooks/useDependsOn.ts
8411
+ import { useMemo as useMemo16 } from "react";
8412
+
8509
8413
  // src/mantine/blocks/index.ts
8510
8414
  var blockSpecs = {
8511
8415
  checkbox: CheckboxBlockSpec,
@@ -8620,8 +8524,6 @@ var getExtraSlashMenuItems = (editor) => [
8620
8524
  icon: 'A\uFFFD\uFFFD,\uFFFD?"A3A_A,A?',
8621
8525
  status: "open",
8622
8526
  daysLeft: 0,
8623
- proposalId: "",
8624
- proposalBlockId: "",
8625
8527
  conditions: ""
8626
8528
  }
8627
8529
  }
@@ -8752,15 +8654,10 @@ function useCreateIxoEditor(options) {
8752
8654
 
8753
8655
  // src/mantine/hooks/useCollaborativeIxoEditor.ts
8754
8656
  import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
8755
- import {
8756
- BlockNoteSchema as BlockNoteSchema2,
8757
- defaultBlockSpecs as defaultBlockSpecs2,
8758
- defaultInlineContentSpecs as defaultInlineContentSpecs2,
8759
- defaultStyleSpecs as defaultStyleSpecs2
8760
- } from "@blocknote/core";
8657
+ import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
8761
8658
 
8762
8659
  // src/core/hooks/useMatrixProvider.ts
8763
- import { useEffect as useEffect15, useState as useState24, useRef as useRef3, useCallback as useCallback15, useMemo as useMemo17 } from "react";
8660
+ import { useEffect as useEffect16, useState as useState24, useRef as useRef3, useCallback as useCallback16, useMemo as useMemo17 } from "react";
8764
8661
  import { MatrixProvider } from "@ixo/matrix-crdt";
8765
8662
  function useMatrixProvider({
8766
8663
  matrixClient,
@@ -8787,22 +8684,22 @@ function useMatrixProvider({
8787
8684
  }),
8788
8685
  []
8789
8686
  );
8790
- const handleDocumentAvailable = useCallback15(() => {
8687
+ const handleDocumentAvailable = useCallback16(() => {
8791
8688
  if (isMountedRef.current) {
8792
8689
  setStatus("connected");
8793
8690
  }
8794
8691
  }, []);
8795
- const handleDocumentUnavailable = useCallback15(() => {
8692
+ const handleDocumentUnavailable = useCallback16(() => {
8796
8693
  if (isMountedRef.current) {
8797
8694
  setStatus("failed");
8798
8695
  }
8799
8696
  }, []);
8800
- const handleCanWriteChanged = useCallback15(() => {
8697
+ const handleCanWriteChanged = useCallback16(() => {
8801
8698
  if (isMountedRef.current && providerRef.current) {
8802
8699
  setStatus(providerRef.current.canWrite ? "connected" : "failed");
8803
8700
  }
8804
8701
  }, []);
8805
- const initProvider = useCallback15(async () => {
8702
+ const initProvider = useCallback16(async () => {
8806
8703
  if (!isMountedRef.current) return;
8807
8704
  if (retryTimeoutRef.current) {
8808
8705
  clearTimeout(retryTimeoutRef.current);
@@ -8847,7 +8744,7 @@ function useMatrixProvider({
8847
8744
  handleDocumentUnavailable,
8848
8745
  handleCanWriteChanged
8849
8746
  ]);
8850
- useEffect15(() => {
8747
+ useEffect16(() => {
8851
8748
  isMountedRef.current = true;
8852
8749
  initProvider();
8853
8750
  return () => {
@@ -8864,7 +8761,7 @@ function useMatrixProvider({
8864
8761
  setStatus("disconnected");
8865
8762
  };
8866
8763
  }, [initProvider]);
8867
- useEffect15(() => {
8764
+ useEffect16(() => {
8868
8765
  return () => {
8869
8766
  isMountedRef.current = false;
8870
8767
  };
@@ -8885,6 +8782,7 @@ function useCollaborativeYDoc(options) {
8885
8782
  root.set("doc_id", options.docId || `flow_${Date.now()}`);
8886
8783
  root.set("createdAt", (/* @__PURE__ */ new Date()).toISOString());
8887
8784
  root.set("createdBy", options.user?.id || "anonymous");
8785
+ root.set("docType", "");
8888
8786
  const titleText = doc.getText("title");
8889
8787
  if (titleText.length === 0 && options.title) {
8890
8788
  titleText.insert(0, options.title);
@@ -8895,7 +8793,7 @@ function useCollaborativeYDoc(options) {
8895
8793
  }
8896
8794
 
8897
8795
  // src/mantine/hooks/useCollaborativeIxoEditor.ts
8898
- import { useMemo as useMemo19, useEffect as useEffect16 } from "react";
8796
+ import { useMemo as useMemo19, useEffect as useEffect17 } from "react";
8899
8797
  function useCreateCollaborativeIxoEditor(options) {
8900
8798
  const yDoc = useCollaborativeYDoc(options);
8901
8799
  const {
@@ -9031,8 +8929,12 @@ function useCreateCollaborativeIxoEditor(options) {
9031
8929
  ixoEditor.getFlow = () => {
9032
8930
  return flowArray.toArray();
9033
8931
  };
8932
+ ixoEditor.getDocType = () => root.get("docType") || "";
8933
+ ixoEditor.setDocType = (value) => {
8934
+ root.set("docType", value);
8935
+ };
9034
8936
  }
9035
- useEffect16(() => {
8937
+ useEffect17(() => {
9036
8938
  if (ixoEditor) {
9037
8939
  ixoEditor.isEditable = editable;
9038
8940
  }
@@ -9048,19 +8950,19 @@ function useCreateCollaborativeIxoEditor(options) {
9048
8950
  }
9049
8951
 
9050
8952
  // src/mantine/IxoEditor.tsx
9051
- import React95 from "react";
8953
+ import React96 from "react";
9052
8954
  import { getDefaultReactSlashMenuItems, SuggestionMenuController } from "@blocknote/react";
9053
8955
  import { BlockNoteView } from "@blocknote/mantine";
9054
8956
  import { filterSuggestionItems } from "@blocknote/core";
9055
8957
  import { MantineProvider } from "@mantine/core";
9056
8958
 
9057
8959
  // src/mantine/components/PanelContent.tsx
9058
- import React94 from "react";
8960
+ import React95 from "react";
9059
8961
  function PanelContent() {
9060
8962
  const { activePanel, registeredPanels } = usePanelStore();
9061
8963
  const isOpen = activePanel !== null;
9062
8964
  const content = activePanel ? registeredPanels.get(activePanel) : null;
9063
- return /* @__PURE__ */ React94.createElement(
8965
+ return /* @__PURE__ */ React95.createElement(
9064
8966
  "div",
9065
8967
  {
9066
8968
  style: {
@@ -9084,13 +8986,13 @@ function IxoEditorContent({
9084
8986
  onSelectionChange,
9085
8987
  children
9086
8988
  }) {
9087
- return /* @__PURE__ */ React95.createElement("div", { style: { display: "flex", height: "100%" } }, /* @__PURE__ */ React95.createElement(
8989
+ return /* @__PURE__ */ React96.createElement("div", { style: { display: "flex", height: "100%" } }, /* @__PURE__ */ React96.createElement(
9088
8990
  "div",
9089
8991
  {
9090
8992
  className: `ixo-editor ixo-editor--theme-${config.theme} ${className}`,
9091
8993
  style: { flex: 1 }
9092
8994
  },
9093
- /* @__PURE__ */ React95.createElement(
8995
+ /* @__PURE__ */ React96.createElement(
9094
8996
  BlockNoteView,
9095
8997
  {
9096
8998
  editor,
@@ -9105,7 +9007,7 @@ function IxoEditorContent({
9105
9007
  onChange,
9106
9008
  onSelectionChange
9107
9009
  },
9108
- config.slashMenu && /* @__PURE__ */ React95.createElement(
9010
+ config.slashMenu && /* @__PURE__ */ React96.createElement(
9109
9011
  SuggestionMenuController,
9110
9012
  {
9111
9013
  triggerCharacter: "/",
@@ -9118,7 +9020,7 @@ function IxoEditorContent({
9118
9020
  ),
9119
9021
  children
9120
9022
  )
9121
- ), /* @__PURE__ */ React95.createElement(PanelContent, null));
9023
+ ), /* @__PURE__ */ React96.createElement(PanelContent, null));
9122
9024
  }
9123
9025
  function IxoEditor({
9124
9026
  editor,
@@ -9144,7 +9046,7 @@ function IxoEditor({
9144
9046
  tableHandles: true
9145
9047
  };
9146
9048
  const isEditable = editable;
9147
- const editorContent = /* @__PURE__ */ React95.createElement(
9049
+ const editorContent = /* @__PURE__ */ React96.createElement(
9148
9050
  BlocknoteProvider,
9149
9051
  {
9150
9052
  editor,
@@ -9152,7 +9054,7 @@ function IxoEditor({
9152
9054
  blockRequirements,
9153
9055
  editable: isEditable
9154
9056
  },
9155
- /* @__PURE__ */ React95.createElement(
9057
+ /* @__PURE__ */ React96.createElement(
9156
9058
  IxoEditorContent,
9157
9059
  {
9158
9060
  editor,
@@ -9166,7 +9068,7 @@ function IxoEditor({
9166
9068
  )
9167
9069
  );
9168
9070
  if (mantineTheme) {
9169
- return /* @__PURE__ */ React95.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
9071
+ return /* @__PURE__ */ React96.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
9170
9072
  }
9171
9073
  return editorContent;
9172
9074
  }
@@ -9238,10 +9140,10 @@ export {
9238
9140
  CheckboxBlockSpec,
9239
9141
  ListBlock,
9240
9142
  OverviewBlock,
9143
+ ProposalVoteBlockSpec,
9241
9144
  StakeType,
9242
9145
  AuthzExecActionTypes,
9243
9146
  ValidatorActionType,
9244
- ProposalVoteBlockSpec,
9245
9147
  blockSpecs,
9246
9148
  getExtraSlashMenuItems,
9247
9149
  useCreateIxoEditor,
@@ -9251,4 +9153,4 @@ export {
9251
9153
  ixoGraphQLClient,
9252
9154
  getEntity
9253
9155
  };
9254
- //# sourceMappingURL=chunk-N4T5JPKZ.mjs.map
9156
+ //# sourceMappingURL=chunk-VGSTHGS4.mjs.map