@ixo/editor 1.15.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,10 +36,19 @@ var BlocknoteProvider = ({ children, editor, handlers, blockRequirements, editab
36
36
  return;
37
37
  }
38
38
  const updateDocType = () => {
39
+ const authoritativeDocType = editor._authoritativeDocType;
40
+ if (authoritativeDocType) {
41
+ console.log("[BlocknoteContext] Using authoritative local docType:", authoritativeDocType);
42
+ if (authoritativeDocType !== docType) {
43
+ console.log("[BlocknoteContext] Setting docType to authoritative value:", authoritativeDocType);
44
+ setDocType(authoritativeDocType);
45
+ }
46
+ return;
47
+ }
39
48
  const newDocType = editor.getDocType?.() || "flow";
40
- console.log("[BlocknoteContext] updateDocType() called, newDocType:", newDocType, "current docType:", docType);
49
+ console.log("[BlocknoteContext] updateDocType() called, newDocType from YMap:", newDocType, "current docType:", docType);
41
50
  if (newDocType !== docType) {
42
- console.log("[BlocknoteContext] docType changed from", docType, "to", newDocType);
51
+ console.log("[BlocknoteContext] docType changed from", docType, "to", newDocType, "(remote or initial change)");
43
52
  setDocType(newDocType);
44
53
  }
45
54
  };
@@ -54,7 +63,7 @@ var BlocknoteProvider = ({ children, editor, handlers, blockRequirements, editab
54
63
  console.log("[BlocknoteContext] Unobserving YMap");
55
64
  editor._yRoot?.unobserve(observer);
56
65
  };
57
- }, [editor]);
66
+ }, [editor, docType]);
58
67
  useEffect(() => {
59
68
  sharedProposalsRef.current = sharedProposals;
60
69
  }, [sharedProposals]);
@@ -266,6 +275,41 @@ import { Stack as Stack3, SegmentedControl, Button as Button2, Text, Alert } fro
266
275
  import React3, { useCallback as useCallback3, useMemo } from "react";
267
276
  import { Card, Stack as Stack2, TextInput as TextInput2, Select as Select2, Group, Button } from "@mantine/core";
268
277
 
278
+ // src/mantine/blocks/apiRequest/types.ts
279
+ function parseResponseSchema(schemaString) {
280
+ if (!schemaString) return null;
281
+ try {
282
+ return JSON.parse(schemaString);
283
+ } catch (error) {
284
+ console.warn("Failed to parse response schema:", error);
285
+ return null;
286
+ }
287
+ }
288
+ function validateResponseAgainstSchema(response, schema) {
289
+ const errors = [];
290
+ schema.fields.forEach((field) => {
291
+ const value = getNestedValueForValidation(response, field.path);
292
+ if (value === void 0) {
293
+ errors.push(`Missing field: ${field.path}`);
294
+ } else {
295
+ const actualType = Array.isArray(value) ? "array" : typeof value;
296
+ if (field.type === "object" && actualType !== "object") {
297
+ errors.push(`Type mismatch for ${field.path}: expected object, got ${actualType}`);
298
+ } else if (field.type === "array" && !Array.isArray(value)) {
299
+ errors.push(`Type mismatch for ${field.path}: expected array, got ${actualType}`);
300
+ } else if (field.type !== "object" && field.type !== "array" && actualType !== field.type) {
301
+ errors.push(`Type mismatch for ${field.path}: expected ${field.type}, got ${actualType}`);
302
+ }
303
+ }
304
+ });
305
+ return errors;
306
+ }
307
+ function getNestedValueForValidation(obj, path) {
308
+ return path.split(".").reduce((current, key) => {
309
+ return current?.[key];
310
+ }, obj);
311
+ }
312
+
269
313
  // src/mantine/blocks/registry/conditionableProperties.ts
270
314
  var CONDITIONABLE_PROPERTIES = {
271
315
  checkbox: [
@@ -404,10 +448,75 @@ var CONDITIONABLE_PROPERTIES = {
404
448
  type: "string",
405
449
  description: "The JSON string of actions"
406
450
  }
451
+ ],
452
+ apiRequest: [
453
+ {
454
+ name: "endpoint",
455
+ displayName: "Endpoint",
456
+ type: "string",
457
+ description: "The API endpoint URL"
458
+ },
459
+ {
460
+ name: "method",
461
+ displayName: "HTTP Method",
462
+ type: "select",
463
+ selectOptions: [
464
+ { value: "GET", label: "GET" },
465
+ { value: "POST", label: "POST" },
466
+ { value: "PUT", label: "PUT" },
467
+ { value: "DELETE", label: "DELETE" },
468
+ { value: "PATCH", label: "PATCH" }
469
+ ],
470
+ description: "The HTTP method for the request"
471
+ },
472
+ {
473
+ name: "response",
474
+ displayName: "Response",
475
+ type: "string",
476
+ description: "The response data from the API request"
477
+ },
478
+ {
479
+ name: "status",
480
+ displayName: "Status",
481
+ type: "select",
482
+ selectOptions: [
483
+ { value: "idle", label: "Idle" },
484
+ { value: "loading", label: "Loading" },
485
+ { value: "success", label: "Success" },
486
+ { value: "error", label: "Error" }
487
+ ],
488
+ description: "The current status of the API request"
489
+ },
490
+ {
491
+ name: "title",
492
+ displayName: "Title",
493
+ type: "string",
494
+ description: "The title of the API request block"
495
+ },
496
+ {
497
+ name: "description",
498
+ displayName: "Description",
499
+ type: "string",
500
+ description: "The description of the API request block"
501
+ }
407
502
  ]
408
503
  };
409
- function getConditionableProperties(blockType) {
410
- return CONDITIONABLE_PROPERTIES[blockType] || [];
504
+ function getConditionableProperties(blockType, block) {
505
+ const baseProperties = CONDITIONABLE_PROPERTIES[blockType] || [];
506
+ if (blockType === "apiRequest" && block?.props?.responseSchema) {
507
+ const schema = parseResponseSchema(block.props.responseSchema);
508
+ if (schema && schema.fields.length > 0) {
509
+ const schemaProperties = schema.fields.map((field) => ({
510
+ name: `response.${field.path}`,
511
+ displayName: field.displayName,
512
+ type: field.type,
513
+ description: field.description || `Response field: ${field.displayName}`
514
+ }));
515
+ const filteredBase = baseProperties.filter((prop) => prop.name !== "response");
516
+ return [...filteredBase, ...schemaProperties];
517
+ }
518
+ }
519
+ return baseProperties;
411
520
  }
412
521
  function getPropertyByName(blockType, propertyName) {
413
522
  const properties = getConditionableProperties(blockType);
@@ -1287,11 +1396,11 @@ var CheckboxBlockSpec = createReactBlockSpec(
1287
1396
  );
1288
1397
 
1289
1398
  // src/mantine/blocks/list/ListBlockSpec.tsx
1290
- import React41 from "react";
1399
+ import React42 from "react";
1291
1400
  import { createReactBlockSpec as createReactBlockSpec2 } from "@blocknote/react";
1292
1401
 
1293
1402
  // src/mantine/blocks/list/ListBlock.tsx
1294
- import React40 from "react";
1403
+ import React41 from "react";
1295
1404
 
1296
1405
  // src/mantine/blocks/list/template/TemplateView.tsx
1297
1406
  import React16, { useMemo as useMemo6 } from "react";
@@ -2202,8 +2311,8 @@ var ListTemplateView = ({ editor, block }) => {
2202
2311
  return /* @__PURE__ */ React16.createElement(Card5, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React16.createElement(Badge2, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React16.createElement(Group5, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React16.createElement(Group5, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React16.createElement(ActionIcon3, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "checklist")), /* @__PURE__ */ React16.createElement(Stack9, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React16.createElement(Text7, { fw: 500, size: "sm", contentEditable: false }, listName), /* @__PURE__ */ React16.createElement(Text7, { size: "xs", c: "dimmed", contentEditable: false }, listType ? `List of ${listName.toLowerCase()}` : "Click to configure list type and settings")))));
2203
2312
  };
2204
2313
 
2205
- // src/mantine/blocks/list/flow/FlowView.tsx
2206
- import React39, { useState as useState6, useEffect as useEffect6, useMemo as useMemo8, useCallback as useCallback9 } from "react";
2314
+ // src/mantine/blocks/list/flow/ListFlowView.tsx
2315
+ import React40, { useState as useState6, useEffect as useEffect6, useMemo as useMemo9, useCallback as useCallback10 } from "react";
2207
2316
  import { Group as Group7, Stack as Stack26, Text as Text26, ActionIcon as ActionIcon5, Alert as Alert4, Loader as Loader2, Center as Center2, Flex as Flex17, Button as Button5, Title as Title4, Collapse } from "@mantine/core";
2208
2317
 
2209
2318
  // src/mantine/blocks/list/linked_resources/LinkedResourcesList.tsx
@@ -2581,7 +2690,7 @@ function filterListItems(items, filterOption) {
2581
2690
  });
2582
2691
  }
2583
2692
 
2584
- // src/mantine/blocks/list/flow/FlowView.tsx
2693
+ // src/mantine/blocks/list/flow/ListFlowView.tsx
2585
2694
  import { IconArrowDown as IconArrowDown2, IconArrowRight as IconArrowRight2, IconArrowUp as IconArrowUp2, IconChevronDown, IconChevronUp, IconRefresh, IconSettings, IconAlertCircle } from "@tabler/icons-react";
2586
2695
 
2587
2696
  // src/mantine/blocks/list/ListPagination.tsx
@@ -2891,15 +3000,42 @@ function downloadArrayAsCsv(rows, options) {
2891
3000
  URL.revokeObjectURL(url);
2892
3001
  }
2893
3002
 
2894
- // src/mantine/blocks/list/flow/FlowView.tsx
3003
+ // src/mantine/blocks/list/flow/ListFlowView.tsx
2895
3004
  import { useDisclosure } from "@mantine/hooks";
3005
+
3006
+ // src/mantine/blocks/list/ui/ListBlocksUIContext.tsx
3007
+ import React39, { createContext as createContext2, useCallback as useCallback9, useContext as useContext2, useMemo as useMemo8, useRef as useRef3 } from "react";
3008
+ var ListBlocksUIContext = createContext2(null);
3009
+ var ListBlocksUIProvider = ({ children }) => {
3010
+ const listenersRef = useRef3(/* @__PURE__ */ new Set());
3011
+ const subscribe = useCallback9((listener) => {
3012
+ listenersRef.current.add(listener);
3013
+ return () => {
3014
+ listenersRef.current.delete(listener);
3015
+ };
3016
+ }, []);
3017
+ const broadcastCollapse = useCallback9((event) => {
3018
+ listenersRef.current.forEach((listener) => listener(event));
3019
+ }, []);
3020
+ const value = useMemo8(() => ({ broadcastCollapse, subscribe }), [broadcastCollapse, subscribe]);
3021
+ return /* @__PURE__ */ React39.createElement(ListBlocksUIContext.Provider, { value }, children);
3022
+ };
3023
+ var useListBlocksUI = () => {
3024
+ const ctx = useContext2(ListBlocksUIContext);
3025
+ if (!ctx) {
3026
+ throw new Error("useListBlocksUI must be used within a ListBlocksUIProvider");
3027
+ }
3028
+ return ctx;
3029
+ };
3030
+
3031
+ // src/mantine/blocks/list/flow/ListFlowView.tsx
2896
3032
  var LIST_FLOW_PANEL_ID = "list-flow-panel";
2897
3033
  var LIST_SELECTION_FLOW_PANEL_ID = "list-selection-flow-panel";
2898
3034
  var ListFlowView = ({ block, editor }) => {
2899
3035
  const { editable } = useBlocknoteContext();
2900
3036
  const [data, setData] = useState6(null);
2901
3037
  const [loading, setLoading] = useState6(false);
2902
- const [opened, { toggle }] = useDisclosure(true);
3038
+ const [opened, { toggle, open, close }] = useDisclosure(true);
2903
3039
  const [error, setError] = useState6(null);
2904
3040
  const [showErrorDetails, setShowErrorDetails] = useState6(false);
2905
3041
  const [page, setPage] = useState6(1);
@@ -2907,13 +3043,14 @@ var ListFlowView = ({ block, editor }) => {
2907
3043
  const [totalPages, setTotalPages] = useState6(0);
2908
3044
  const [selectedIds, setSelectedIds] = useState6(/* @__PURE__ */ new Set());
2909
3045
  const panelId = `${LIST_FLOW_PANEL_ID}-${block.id}`;
2910
- const panelContent = useMemo8(() => /* @__PURE__ */ React39.createElement(TemplateConfig2, { editor, block }), [editor, block]);
3046
+ const panelContent = useMemo9(() => /* @__PURE__ */ React40.createElement(TemplateConfig2, { editor, block }), [editor, block]);
2911
3047
  const { open: openPanel } = usePanel(panelId, panelContent);
2912
3048
  const handlers = useBlocknoteHandlers();
2913
3049
  const listType = block.props.listType && block.props.listType !== "" ? block.props.listType : null;
3050
+ const { subscribe } = useListBlocksUI();
2914
3051
  const selectionPanelId = `${LIST_SELECTION_FLOW_PANEL_ID}-${block.id}`;
2915
- const selectionPanelContent = useMemo8(
2916
- () => /* @__PURE__ */ React39.createElement(ListSelectionPanel, { editor, block, selectedIds, listType }),
3052
+ const selectionPanelContent = useMemo9(
3053
+ () => /* @__PURE__ */ React40.createElement(ListSelectionPanel, { editor, block, selectedIds, listType }),
2917
3054
  [editor, block, selectedIds, listType]
2918
3055
  );
2919
3056
  const { open: openSelectionPanel } = usePanel(selectionPanelId, selectionPanelContent);
@@ -2924,13 +3061,13 @@ var ListFlowView = ({ block, editor }) => {
2924
3061
  setSelectedIds(new Set(lastSelected ? [lastSelected] : []));
2925
3062
  }
2926
3063
  }, [selectionMode, selectedIds]);
2927
- const isItemChecked = useCallback9(
3064
+ const isItemChecked = useCallback10(
2928
3065
  (id) => {
2929
3066
  return selectedIds.has(id);
2930
3067
  },
2931
3068
  [selectedIds]
2932
3069
  );
2933
- const onItemCheck = useCallback9(
3070
+ const onItemCheck = useCallback10(
2934
3071
  (id, checked) => {
2935
3072
  setSelectedIds((prev) => {
2936
3073
  const nextSelectedIds = new Set(prev);
@@ -2951,7 +3088,7 @@ var ListFlowView = ({ block, editor }) => {
2951
3088
  },
2952
3089
  [selectionMode]
2953
3090
  );
2954
- const listConfig = useMemo8(() => {
3091
+ const listConfig = useMemo9(() => {
2955
3092
  if (block.props.listConfig && block.props.listConfig !== "{}") {
2956
3093
  try {
2957
3094
  return JSON.parse(block.props.listConfig);
@@ -2962,7 +3099,7 @@ var ListFlowView = ({ block, editor }) => {
2962
3099
  }
2963
3100
  return {};
2964
3101
  }, [block.props.listConfig]);
2965
- const listSortConfigOptions = useMemo8(() => {
3102
+ const listSortConfigOptions = useMemo9(() => {
2966
3103
  if (block.props.sortOptions && block.props.sortOptions !== "{}") {
2967
3104
  try {
2968
3105
  return JSON.parse(block.props.sortOptions);
@@ -2973,7 +3110,7 @@ var ListFlowView = ({ block, editor }) => {
2973
3110
  }
2974
3111
  return {};
2975
3112
  }, [block.props.sortOptions]);
2976
- const listFilterConfigOptions = useMemo8(() => {
3113
+ const listFilterConfigOptions = useMemo9(() => {
2977
3114
  if (block.props.filterOptions && block.props.filterOptions !== "{}") {
2978
3115
  try {
2979
3116
  return JSON.parse(block.props.filterOptions);
@@ -2984,7 +3121,7 @@ var ListFlowView = ({ block, editor }) => {
2984
3121
  }
2985
3122
  return {};
2986
3123
  }, [block.props.filterOptions]);
2987
- const listFilterConfig = useMemo8(() => {
3124
+ const listFilterConfig = useMemo9(() => {
2988
3125
  if (block.props.filter && block.props.filter !== "{}") {
2989
3126
  try {
2990
3127
  return JSON.parse(block.props.filter);
@@ -2995,7 +3132,7 @@ var ListFlowView = ({ block, editor }) => {
2995
3132
  }
2996
3133
  return {};
2997
3134
  }, [block.props.filter]);
2998
- const listSortConfig = useMemo8(() => {
3135
+ const listSortConfig = useMemo9(() => {
2999
3136
  if (block.props.sort && block.props.sort !== "{}") {
3000
3137
  try {
3001
3138
  return JSON.parse(block.props.sort);
@@ -3006,6 +3143,14 @@ var ListFlowView = ({ block, editor }) => {
3006
3143
  }
3007
3144
  return {};
3008
3145
  }, [block.props.sort]);
3146
+ useEffect6(() => {
3147
+ const unsubscribe = subscribe((event) => {
3148
+ if (event === "collapse") close();
3149
+ else if (event === "expand") open();
3150
+ else toggle();
3151
+ });
3152
+ return unsubscribe;
3153
+ }, [subscribe, close, open, toggle]);
3009
3154
  const updateProps = (props) => {
3010
3155
  editor.updateBlock(block, {
3011
3156
  props: {
@@ -3014,7 +3159,7 @@ var ListFlowView = ({ block, editor }) => {
3014
3159
  }
3015
3160
  });
3016
3161
  };
3017
- const fetchData = useCallback9(async () => {
3162
+ const fetchData = useCallback10(async () => {
3018
3163
  if (!handlers || !listType || !listConfig) return;
3019
3164
  setLoading(true);
3020
3165
  setError(null);
@@ -3143,11 +3288,11 @@ var ListFlowView = ({ block, editor }) => {
3143
3288
  }
3144
3289
  updateProps({ sort: JSON.stringify(sortOption) });
3145
3290
  };
3146
- const sortedData = useMemo8(() => {
3291
+ const sortedData = useMemo9(() => {
3147
3292
  if (!data) return null;
3148
3293
  return sortListItems(data, listSortConfig);
3149
3294
  }, [data?.items, listSortConfig]);
3150
- const filteredData = useMemo8(() => {
3295
+ const filteredData = useMemo9(() => {
3151
3296
  if (!listFilterConfig?.key) return sortedData;
3152
3297
  if (!sortedData) return null;
3153
3298
  return filterListItems(sortedData, listFilterConfig);
@@ -3156,44 +3301,44 @@ var ListFlowView = ({ block, editor }) => {
3156
3301
  if (!filteredData || !listType) return null;
3157
3302
  switch (listType) {
3158
3303
  case "linked_resources":
3159
- return /* @__PURE__ */ React39.createElement(LinkedResourcesList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
3304
+ return /* @__PURE__ */ React40.createElement(LinkedResourcesList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
3160
3305
  case "assets":
3161
- return /* @__PURE__ */ React39.createElement(AssetsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
3306
+ return /* @__PURE__ */ React40.createElement(AssetsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
3162
3307
  case "transactions":
3163
- return /* @__PURE__ */ React39.createElement(TransactionsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
3308
+ return /* @__PURE__ */ React40.createElement(TransactionsList, { items: filteredData, config: listConfig, mods: selectionMode, isItemChecked, onItemCheck });
3164
3309
  case "collections":
3165
- return /* @__PURE__ */ React39.createElement(CollectionsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3310
+ return /* @__PURE__ */ React40.createElement(CollectionsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3166
3311
  case "investments":
3167
- return /* @__PURE__ */ React39.createElement(InvestmentsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3312
+ return /* @__PURE__ */ React40.createElement(InvestmentsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3168
3313
  case "oracles":
3169
- return /* @__PURE__ */ React39.createElement(OraclesList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3314
+ return /* @__PURE__ */ React40.createElement(OraclesList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3170
3315
  case "pods":
3171
- return /* @__PURE__ */ React39.createElement(PodsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3316
+ return /* @__PURE__ */ React40.createElement(PodsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3172
3317
  case "proposals":
3173
- return /* @__PURE__ */ React39.createElement(ProposalsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3318
+ return /* @__PURE__ */ React40.createElement(ProposalsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3174
3319
  case "requests":
3175
- return /* @__PURE__ */ React39.createElement(RequestsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3320
+ return /* @__PURE__ */ React40.createElement(RequestsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3176
3321
  case "projects":
3177
- return /* @__PURE__ */ React39.createElement(ProjectsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3322
+ return /* @__PURE__ */ React40.createElement(ProjectsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3178
3323
  case "daos":
3179
- return /* @__PURE__ */ React39.createElement(DaosList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3324
+ return /* @__PURE__ */ React40.createElement(DaosList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3180
3325
  case "group_members":
3181
- return /* @__PURE__ */ React39.createElement(MembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3326
+ return /* @__PURE__ */ React40.createElement(MembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3182
3327
  case "dao_members":
3183
- return /* @__PURE__ */ React39.createElement(DaoMembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3328
+ return /* @__PURE__ */ React40.createElement(DaoMembersList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3184
3329
  case "validators":
3185
- return /* @__PURE__ */ React39.createElement(ValidatorsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3330
+ return /* @__PURE__ */ React40.createElement(ValidatorsList, { items: filteredData, mods: selectionMode, isItemChecked, onItemCheck });
3186
3331
  default:
3187
3332
  return null;
3188
3333
  }
3189
3334
  };
3190
3335
  if (!listType) {
3191
- return /* @__PURE__ */ React39.createElement(Center2, { py: "xl" }, /* @__PURE__ */ React39.createElement(Text26, { size: "sm", c: "dimmed" }, "List not configured"));
3336
+ return /* @__PURE__ */ React40.createElement(Center2, { py: "xl" }, /* @__PURE__ */ React40.createElement(Text26, { size: "sm", c: "dimmed" }, "List not configured"));
3192
3337
  }
3193
- return /* @__PURE__ */ React39.createElement(Stack26, { w: "100%" }, /* @__PURE__ */ React39.createElement(Flex17, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React39.createElement(Title4, { order: 4 }, getListNameByType(listType)), /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: toggle, "aria-label": opened ? "Collapse" : "Expand", title: opened ? "Collapse" : "Expand" }, opened ? /* @__PURE__ */ React39.createElement(IconChevronUp, { size: 18 }) : /* @__PURE__ */ React39.createElement(IconChevronDown, { size: 18 }))), /* @__PURE__ */ React39.createElement(Collapse, { pb: 5, px: 5, in: opened }, /* @__PURE__ */ React39.createElement(Stack26, { mih: totalPages !== 1 ? 500 : void 0, w: "100%" }, /* @__PURE__ */ React39.createElement(Flex17, { align: "center", gap: "xs" }, listSortConfig?.key && /* @__PURE__ */ React39.createElement(Flex17, { align: "center" }, /* @__PURE__ */ React39.createElement(Text26, { size: "xs", c: "dimmed" }, listSortConfig.key?.replace(/([A-Z])/g, " $1").replace(
3338
+ return /* @__PURE__ */ React40.createElement(Stack26, { w: "100%" }, /* @__PURE__ */ React40.createElement(Flex17, { px: 5, align: "center", justify: "space-between" }, /* @__PURE__ */ React40.createElement(Title4, { order: 4 }, getListNameByType(listType)), /* @__PURE__ */ React40.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: toggle, "aria-label": opened ? "Collapse" : "Expand", title: opened ? "Collapse" : "Expand" }, opened ? /* @__PURE__ */ React40.createElement(IconChevronUp, { size: 18 }) : /* @__PURE__ */ React40.createElement(IconChevronDown, { size: 18 }))), /* @__PURE__ */ React40.createElement(Collapse, { pb: 5, px: 5, in: opened }, /* @__PURE__ */ React40.createElement(Stack26, { mih: totalPages !== 1 ? 500 : void 0, w: "100%" }, /* @__PURE__ */ React40.createElement(Flex17, { align: "center", gap: "xs" }, listSortConfig?.key && /* @__PURE__ */ React40.createElement(Flex17, { align: "center" }, /* @__PURE__ */ React40.createElement(Text26, { size: "xs" }, listSortConfig.key?.replace(/([A-Z])/g, " $1").replace(
3194
3339
  /^./,
3195
3340
  (str) => str.toUpperCase()
3196
- ), " "), /* @__PURE__ */ React39.createElement(Text26, { lh: 0.5, c: "dimmed" }, listSortConfig.direction === "asc" && /* @__PURE__ */ React39.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React39.createElement(IconArrowDown2, { size: 18 }))), selectionMode && /* @__PURE__ */ React39.createElement(Text26, { lh: 0.5, c: "dimmed" }, selectionMode === "single" ? "Single Selection" : "Multi Selection")), /* @__PURE__ */ React39.createElement(Flex17, { justify: "space-between" }, /* @__PURE__ */ React39.createElement(Flex17, { gap: "xs", align: "center" }, /* @__PURE__ */ React39.createElement(FilterTab, { key: "All", label: "All", isActive: !listFilterConfig?.key, onClick: () => handleFilterChange(null) }), Array.isArray(listFilterConfigOptions) && listFilterConfigOptions.length > 0 && listFilterConfigOptions.map(({ key, label, type }) => /* @__PURE__ */ React39.createElement(
3341
+ ), " "), /* @__PURE__ */ React40.createElement(Text26, { lh: 0.5 }, listSortConfig.direction === "asc" && /* @__PURE__ */ React40.createElement(IconArrowUp2, { size: 18 }), listSortConfig.direction === "desc" && /* @__PURE__ */ React40.createElement(IconArrowDown2, { size: 18 }))), selectionMode && /* @__PURE__ */ React40.createElement(Text26, { lh: 0.5 }, selectionMode === "single" ? "Single Selection" : "Multi Selection")), /* @__PURE__ */ React40.createElement(Flex17, { justify: "space-between" }, /* @__PURE__ */ React40.createElement(Flex17, { gap: "xs", align: "center" }, /* @__PURE__ */ React40.createElement(FilterTab, { key: "All", label: "All", isActive: !listFilterConfig?.key, onClick: () => handleFilterChange(null) }), Array.isArray(listFilterConfigOptions) && listFilterConfigOptions.length > 0 && listFilterConfigOptions.map(({ key, label, type }) => /* @__PURE__ */ React40.createElement(
3197
3342
  FilterTab,
3198
3343
  {
3199
3344
  key: label,
@@ -3201,7 +3346,7 @@ var ListFlowView = ({ block, editor }) => {
3201
3346
  isActive: listFilterConfig?.key === key && listFilterConfig?.value === type,
3202
3347
  onClick: () => handleFilterChange({ key, value: type })
3203
3348
  }
3204
- ))), /* @__PURE__ */ React39.createElement(Flex17, { gap: "xs" }, /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: fetchData, loading }, /* @__PURE__ */ React39.createElement(IconRefresh, { size: 18 })), editable && /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: openPanel }, /* @__PURE__ */ React39.createElement(IconSettings, { size: 18 })), selectedIds.size > 0 && /* @__PURE__ */ React39.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: openSelectionPanel }, /* @__PURE__ */ React39.createElement(IconArrowRight2, null)), listConfig && listSortConfigOptions && listSortConfigOptions?.length > 0 && /* @__PURE__ */ React39.createElement(
3349
+ ))), /* @__PURE__ */ React40.createElement(Flex17, { gap: "xs" }, /* @__PURE__ */ React40.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: fetchData, loading }, /* @__PURE__ */ React40.createElement(IconRefresh, { size: 18 })), editable && /* @__PURE__ */ React40.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: openPanel }, /* @__PURE__ */ React40.createElement(IconSettings, { size: 18 })), selectedIds.size > 0 && /* @__PURE__ */ React40.createElement(ActionIcon5, { variant: "subtle", size: "sm", onClick: openSelectionPanel }, /* @__PURE__ */ React40.createElement(IconArrowRight2, null)), listConfig && listSortConfigOptions && listSortConfigOptions?.length > 0 && /* @__PURE__ */ React40.createElement(
3205
3350
  ListActionsMenu,
3206
3351
  {
3207
3352
  onSelectActionClick: (mode) => setSelectionMode(mode),
@@ -3211,7 +3356,7 @@ var ListFlowView = ({ block, editor }) => {
3211
3356
  onChange: (sortOption) => handleSortChange(sortOption),
3212
3357
  onDownloadCsv: data?.items ? () => downloadArrayAsCsv(data.items) : void 0
3213
3358
  }
3214
- ))), /* @__PURE__ */ React39.createElement(Flex17, { flex: 1 }, loading ? /* @__PURE__ */ React39.createElement(Center2, { py: "xl", w: "100%" }, /* @__PURE__ */ React39.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React39.createElement(Alert4, { color: "red", title: "Failed to load data", icon: /* @__PURE__ */ React39.createElement(IconAlertCircle, { size: 18 }) }, /* @__PURE__ */ React39.createElement(Stack26, { gap: "xs" }, /* @__PURE__ */ React39.createElement(Text26, { size: "sm" }, showErrorDetails ? error : "Unable to fetch list data"), /* @__PURE__ */ React39.createElement(Group7, { gap: "xs" }, /* @__PURE__ */ React39.createElement(Button5, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"), /* @__PURE__ */ React39.createElement(Button5, { size: "xs", variant: "subtle", onClick: () => setShowErrorDetails(!showErrorDetails) }, showErrorDetails ? "Hide" : "Show", " Details")))) : /* @__PURE__ */ React39.createElement(Stack26, { flex: 1 }, /* @__PURE__ */ React39.createElement(Stack26, { gap: "md" }, renderListComponent(), /* @__PURE__ */ React39.createElement(
3359
+ ))), /* @__PURE__ */ React40.createElement(Flex17, { flex: 1 }, loading ? /* @__PURE__ */ React40.createElement(Center2, { py: "xl", w: "100%" }, /* @__PURE__ */ React40.createElement(Loader2, { size: "md", mx: "auto" })) : error ? /* @__PURE__ */ React40.createElement(Alert4, { color: "red", title: "Failed to load data", icon: /* @__PURE__ */ React40.createElement(IconAlertCircle, { size: 18 }) }, /* @__PURE__ */ React40.createElement(Stack26, { gap: "xs" }, /* @__PURE__ */ React40.createElement(Text26, { size: "sm" }, showErrorDetails ? error : "Unable to fetch list data"), /* @__PURE__ */ React40.createElement(Group7, { gap: "xs" }, /* @__PURE__ */ React40.createElement(Button5, { size: "xs", variant: "subtle", onClick: fetchData }, "Retry"), /* @__PURE__ */ React40.createElement(Button5, { size: "xs", variant: "subtle", onClick: () => setShowErrorDetails(!showErrorDetails) }, showErrorDetails ? "Hide" : "Show", " Details")))) : /* @__PURE__ */ React40.createElement(Stack26, { flex: 1 }, /* @__PURE__ */ React40.createElement(Stack26, { gap: "md" }, renderListComponent(), /* @__PURE__ */ React40.createElement(
3215
3360
  ListPagination,
3216
3361
  {
3217
3362
  page,
@@ -3229,9 +3374,9 @@ function ListBlock({ editor, block }) {
3229
3374
  const listType = block.props.listType && block.props.listType !== "";
3230
3375
  const isConfigured = listType;
3231
3376
  if (editable && !isConfigured) {
3232
- return /* @__PURE__ */ React40.createElement(ListTemplateView, { editor, block });
3377
+ return /* @__PURE__ */ React41.createElement(ListTemplateView, { editor, block });
3233
3378
  }
3234
- return /* @__PURE__ */ React40.createElement(ListFlowView, { block, editor });
3379
+ return /* @__PURE__ */ React41.createElement(ListFlowView, { block, editor });
3235
3380
  }
3236
3381
 
3237
3382
  // src/mantine/blocks/list/ListBlockSpec.tsx
@@ -3266,16 +3411,16 @@ var ListBlockSpec = createReactBlockSpec2(
3266
3411
  {
3267
3412
  render: (props) => {
3268
3413
  const ixoProps = props;
3269
- return /* @__PURE__ */ React41.createElement(ListBlock, { ...ixoProps });
3414
+ return /* @__PURE__ */ React42.createElement(ListBlock, { ...ixoProps });
3270
3415
  }
3271
3416
  }
3272
3417
  );
3273
3418
 
3274
3419
  // src/mantine/blocks/overview/OverviewBlock.tsx
3275
- import React42 from "react";
3420
+ import React43 from "react";
3276
3421
  import { createReactBlockSpec as createReactBlockSpec3 } from "@blocknote/react";
3277
3422
  var OverviewBlockContent = ({ block, editor }) => {
3278
- return /* @__PURE__ */ React42.createElement(
3423
+ return /* @__PURE__ */ React43.createElement(
3279
3424
  "div",
3280
3425
  {
3281
3426
  style: {
@@ -3287,7 +3432,7 @@ var OverviewBlockContent = ({ block, editor }) => {
3287
3432
  border: "1px solid #e5e7eb"
3288
3433
  }
3289
3434
  },
3290
- /* @__PURE__ */ React42.createElement("div", { style: { marginBottom: "12px" } }, /* @__PURE__ */ React42.createElement(
3435
+ /* @__PURE__ */ React43.createElement("div", { style: { marginBottom: "12px" } }, /* @__PURE__ */ React43.createElement(
3291
3436
  "input",
3292
3437
  {
3293
3438
  type: "text",
@@ -3313,7 +3458,7 @@ var OverviewBlockContent = ({ block, editor }) => {
3313
3458
  }
3314
3459
  }
3315
3460
  )),
3316
- /* @__PURE__ */ React42.createElement("div", { style: { minHeight: "40px", color: "#6b7280" } }, block.props.did ? /* @__PURE__ */ React42.createElement("p", null, "Loading overview for DID: ", block.props.did) : /* @__PURE__ */ React42.createElement("p", null, "Enter a DID to load overview data"))
3461
+ /* @__PURE__ */ React43.createElement("div", { style: { minHeight: "40px", color: "#6b7280" } }, block.props.did ? /* @__PURE__ */ React43.createElement("p", null, "Loading overview for DID: ", block.props.did) : /* @__PURE__ */ React43.createElement("p", null, "Enter a DID to load overview data"))
3317
3462
  );
3318
3463
  };
3319
3464
  var OverviewBlock = createReactBlockSpec3(
@@ -3327,7 +3472,7 @@ var OverviewBlock = createReactBlockSpec3(
3327
3472
  content: "none"
3328
3473
  },
3329
3474
  {
3330
- render: (props) => /* @__PURE__ */ React42.createElement(OverviewBlockContent, { ...props })
3475
+ render: (props) => /* @__PURE__ */ React43.createElement(OverviewBlockContent, { ...props })
3331
3476
  }
3332
3477
  );
3333
3478
 
@@ -3354,7 +3499,7 @@ var ValidatorActionType = /* @__PURE__ */ ((ValidatorActionType2) => {
3354
3499
  })(ValidatorActionType || {});
3355
3500
 
3356
3501
  // src/mantine/context/hooks/useSharedProposal.ts
3357
- import { useState as useState7, useEffect as useEffect7, useCallback as useCallback10 } from "react";
3502
+ import { useState as useState7, useEffect as useEffect7, useCallback as useCallback11 } from "react";
3358
3503
  var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
3359
3504
  const { sharedProposals, fetchSharedProposal, invalidateProposal, subscribeToProposal } = useBlocknoteContext();
3360
3505
  const [localProposal, setLocalProposal] = useState7(null);
@@ -3371,8 +3516,8 @@ var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
3371
3516
  setLocalProposal(proposal);
3372
3517
  }
3373
3518
  }, [subscribeToProposal, cacheKey]);
3374
- const refetch = useCallback10(() => fetchSharedProposal(proposalId, contractAddress, true), [fetchSharedProposal, proposalId, contractAddress]);
3375
- const invalidate = useCallback10(() => invalidateProposal(proposalId), [invalidateProposal, proposalId]);
3519
+ const refetch = useCallback11(() => fetchSharedProposal(proposalId, contractAddress, true), [fetchSharedProposal, proposalId, contractAddress]);
3520
+ const invalidate = useCallback11(() => invalidateProposal(proposalId), [invalidateProposal, proposalId]);
3376
3521
  return {
3377
3522
  proposal: localProposal,
3378
3523
  loading: sharedProposals[cacheKey]?.loading ?? false,
@@ -3383,34 +3528,47 @@ var useSharedProposal = ({ proposalId, contractAddress, autoFetch = true }) => {
3383
3528
  };
3384
3529
 
3385
3530
  // src/mantine/blocks/proposal/ProposalBlockSpec.tsx
3386
- import React86 from "react";
3531
+ import React87 from "react";
3387
3532
  import { createReactBlockSpec as createReactBlockSpec4 } from "@blocknote/react";
3388
3533
 
3389
3534
  // src/mantine/blocks/proposal/ProposalBlock.tsx
3390
- import React85 from "react";
3535
+ import React86 from "react";
3391
3536
 
3392
3537
  // src/mantine/blocks/proposal/template/TemplateView.tsx
3393
- import React79, { useMemo as useMemo10 } from "react";
3538
+ import React80, { useMemo as useMemo11 } from "react";
3394
3539
 
3395
3540
  // src/mantine/blocks/proposal/template/TemplateConfig.tsx
3396
- import React78, { useCallback as useCallback12 } from "react";
3541
+ import React79, { useCallback as useCallback13 } from "react";
3397
3542
  import { Paper as Paper6, CloseButton as CloseButton4, Title as Title5 } from "@mantine/core";
3398
3543
 
3399
3544
  // src/mantine/blocks/proposal/template/GeneralTab.tsx
3400
- import React43, { useEffect as useEffect8, useState as useState8 } from "react";
3401
- import { Stack as Stack27, Text as Text27, TextInput as TextInput5, Textarea as Textarea2, Select as Select3, Loader as Loader3 } from "@mantine/core";
3545
+ import React44, { useEffect as useEffect8, useState as useState8 } from "react";
3546
+ import { Stack as Stack27, Text as Text27, TextInput as TextInput5, Textarea as Textarea2, Select as Select3, Loader as Loader3, SegmentedControl as SegmentedControl4 } from "@mantine/core";
3402
3547
  var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescriptionChange, onGroupChange }) => {
3403
3548
  const handlers = useBlocknoteHandlers();
3404
3549
  const [localTitle, setLocalTitle] = useState8(title || "");
3405
3550
  const [localDescription, setLocalDescription] = useState8(description || "");
3406
3551
  const [groups, setGroups] = useState8([]);
3407
3552
  const [loadingGroups, setLoadingGroups] = useState8(false);
3553
+ const [inputMode, setInputMode] = useState8("select");
3554
+ const [manualAddress, setManualAddress] = useState8("");
3408
3555
  useEffect8(() => {
3409
3556
  setLocalTitle(title || "");
3410
3557
  }, [title]);
3411
3558
  useEffect8(() => {
3412
3559
  setLocalDescription(description || "");
3413
3560
  }, [description]);
3561
+ useEffect8(() => {
3562
+ if (coreAddress) {
3563
+ const matchesGroup = groups.some((g) => g.coreAddress === coreAddress);
3564
+ if (matchesGroup) {
3565
+ setInputMode("select");
3566
+ } else {
3567
+ setInputMode("manual");
3568
+ setManualAddress(coreAddress);
3569
+ }
3570
+ }
3571
+ }, [coreAddress, groups]);
3414
3572
  useEffect8(() => {
3415
3573
  const fetchGroups = async () => {
3416
3574
  if (!handlers?.getDAOGroups) {
@@ -3429,7 +3587,7 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
3429
3587
  };
3430
3588
  fetchGroups();
3431
3589
  }, [handlers]);
3432
- return /* @__PURE__ */ React43.createElement(Stack27, { gap: "lg" }, /* @__PURE__ */ React43.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React43.createElement(Text27, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React43.createElement(
3590
+ return /* @__PURE__ */ React44.createElement(Stack27, { gap: "lg" }, /* @__PURE__ */ React44.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React44.createElement(Text27, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React44.createElement(
3433
3591
  TextInput5,
3434
3592
  {
3435
3593
  placeholder: "e.g. Proposal Title",
@@ -3440,7 +3598,7 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
3440
3598
  onTitleChange(newTitle);
3441
3599
  }
3442
3600
  }
3443
- )), /* @__PURE__ */ React43.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React43.createElement(Text27, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React43.createElement(
3601
+ )), /* @__PURE__ */ React44.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React44.createElement(Text27, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React44.createElement(
3444
3602
  Textarea2,
3445
3603
  {
3446
3604
  placeholder: "Describe what this proposal is about",
@@ -3452,7 +3610,18 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
3452
3610
  onDescriptionChange(newDescription);
3453
3611
  }
3454
3612
  }
3455
- )), /* @__PURE__ */ React43.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React43.createElement(Text27, { size: "sm", fw: 600 }, "Group"), /* @__PURE__ */ React43.createElement(
3613
+ )), /* @__PURE__ */ React44.createElement(Stack27, { gap: "xs" }, /* @__PURE__ */ React44.createElement(Text27, { size: "sm", fw: 600 }, "Group"), /* @__PURE__ */ React44.createElement(
3614
+ SegmentedControl4,
3615
+ {
3616
+ value: inputMode,
3617
+ onChange: (value) => setInputMode(value),
3618
+ data: [
3619
+ { label: "Select DAO", value: "select" },
3620
+ { label: "Manual Entry", value: "manual" }
3621
+ ],
3622
+ fullWidth: true
3623
+ }
3624
+ ), inputMode === "select" ? /* @__PURE__ */ React44.createElement(
3456
3625
  Select3,
3457
3626
  {
3458
3627
  placeholder: loadingGroups ? "Loading groups..." : "Select a DAO group",
@@ -3470,18 +3639,29 @@ var GeneralTab3 = ({ title, description, coreAddress, onTitleChange, onDescripti
3470
3639
  label: group.name
3471
3640
  })),
3472
3641
  disabled: loadingGroups,
3473
- rightSection: loadingGroups ? /* @__PURE__ */ React43.createElement(Loader3, { size: "xs" }) : void 0,
3642
+ rightSection: loadingGroups ? /* @__PURE__ */ React44.createElement(Loader3, { size: "xs" }) : void 0,
3474
3643
  searchable: true
3475
3644
  }
3645
+ ) : /* @__PURE__ */ React44.createElement(
3646
+ TextInput5,
3647
+ {
3648
+ placeholder: "Enter DAO core address",
3649
+ value: manualAddress,
3650
+ onChange: (event) => {
3651
+ const newAddress = event.currentTarget.value;
3652
+ setManualAddress(newAddress);
3653
+ onGroupChange(newAddress);
3654
+ }
3655
+ }
3476
3656
  )));
3477
3657
  };
3478
3658
 
3479
3659
  // src/mantine/blocks/proposal/template/ActionsTab.tsx
3480
- import React76, { useCallback as useCallback11, useEffect as useEffect11, useState as useState16 } from "react";
3660
+ import React77, { useCallback as useCallback12, useEffect as useEffect11, useState as useState16 } from "react";
3481
3661
  import { Card as Card13, Stack as Stack60 } from "@mantine/core";
3482
3662
 
3483
3663
  // src/mantine/blocks/proposal/actions-components/ActionsCard.tsx
3484
- import React44 from "react";
3664
+ import React45 from "react";
3485
3665
  import { Card as Card6, Group as Group8, Text as Text28, Badge as Badge5, Stack as Stack28, ActionIcon as ActionIcon6, ScrollArea } from "@mantine/core";
3486
3666
  var getActionSummary = (action) => {
3487
3667
  switch (action.type) {
@@ -3514,7 +3694,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
3514
3694
  }
3515
3695
  onClick();
3516
3696
  };
3517
- return /* @__PURE__ */ React44.createElement(
3697
+ return /* @__PURE__ */ React45.createElement(
3518
3698
  Card6,
3519
3699
  {
3520
3700
  shadow: "sm",
@@ -3531,7 +3711,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
3531
3711
  },
3532
3712
  onClick: handleCardClick
3533
3713
  },
3534
- /* @__PURE__ */ React44.createElement(Group8, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React44.createElement(Stack28, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React44.createElement(Text28, { size: "md", fw: 600, style: { color: "#f1f3f5" } }, "Proposal Actions (", actions.length, ")"), actions.length === 0 ? /* @__PURE__ */ React44.createElement(Text28, { size: "sm", style: { color: "#868e96" } }, "No actions added yet.") : /* @__PURE__ */ React44.createElement(ScrollArea, { h: actions.length > 3 ? 150 : void 0, style: { marginTop: 8 } }, /* @__PURE__ */ React44.createElement(Stack28, { gap: "xs" }, actions.map((action, index) => /* @__PURE__ */ React44.createElement(
3714
+ /* @__PURE__ */ React45.createElement(Group8, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React45.createElement(Stack28, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React45.createElement(Text28, { size: "md", fw: 600, style: { color: "#f1f3f5" } }, "Proposal Actions (", actions.length, ")"), actions.length === 0 ? /* @__PURE__ */ React45.createElement(Text28, { size: "sm", style: { color: "#868e96" } }, "No actions added yet.") : /* @__PURE__ */ React45.createElement(ScrollArea, { h: actions.length > 3 ? 150 : void 0, style: { marginTop: 8 } }, /* @__PURE__ */ React45.createElement(Stack28, { gap: "xs" }, actions.map((action, index) => /* @__PURE__ */ React45.createElement(
3535
3715
  Card6,
3536
3716
  {
3537
3717
  key: index,
@@ -3542,7 +3722,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
3542
3722
  borderColor: "#333"
3543
3723
  }
3544
3724
  },
3545
- /* @__PURE__ */ React44.createElement(Group8, { justify: "space-between", align: "center" }, /* @__PURE__ */ React44.createElement(Group8, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React44.createElement(
3725
+ /* @__PURE__ */ React45.createElement(Group8, { justify: "space-between", align: "center" }, /* @__PURE__ */ React45.createElement(Group8, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React45.createElement(
3546
3726
  Badge5,
3547
3727
  {
3548
3728
  size: "sm",
@@ -3553,7 +3733,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
3553
3733
  }
3554
3734
  },
3555
3735
  action.type
3556
- ), /* @__PURE__ */ React44.createElement(Text28, { size: "sm", style: { color: "#adb5bd" } }, getActionSummary(action))), !disabled && /* @__PURE__ */ React44.createElement(Group8, { gap: 4 }, /* @__PURE__ */ React44.createElement(
3736
+ ), /* @__PURE__ */ React45.createElement(Text28, { size: "sm", style: { color: "#adb5bd" } }, getActionSummary(action))), !disabled && /* @__PURE__ */ React45.createElement(Group8, { gap: 4 }, /* @__PURE__ */ React45.createElement(
3557
3737
  ActionIcon6,
3558
3738
  {
3559
3739
  size: "sm",
@@ -3566,7 +3746,7 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
3566
3746
  style: { color: "#4dabf7" }
3567
3747
  },
3568
3748
  "\u270F\uFE0F"
3569
- ), /* @__PURE__ */ React44.createElement(
3749
+ ), /* @__PURE__ */ React45.createElement(
3570
3750
  ActionIcon6,
3571
3751
  {
3572
3752
  size: "sm",
@@ -3585,14 +3765,14 @@ var ActionsCard = ({ actions, isSelected, onClick, onEditAction, onRemoveAction,
3585
3765
  };
3586
3766
 
3587
3767
  // src/mantine/blocks/proposal/ActionsPanel.tsx
3588
- import React75, { useState as useState15, useEffect as useEffect10, useMemo as useMemo9 } from "react";
3768
+ import React76, { useState as useState15, useEffect as useEffect10, useMemo as useMemo10 } from "react";
3589
3769
  import { Stack as Stack59, Button as Button11, Group as Group19, Text as Text36, Card as Card12, Badge as Badge8, Divider as Divider4, ScrollArea as ScrollArea3, Alert as Alert7, Tabs as Tabs2, SimpleGrid, Paper as Paper5 } from "@mantine/core";
3590
3770
 
3591
3771
  // src/mantine/blocks/proposal/actions-components/SpendActionForm.tsx
3592
- import React45 from "react";
3772
+ import React46 from "react";
3593
3773
  import { TextInput as TextInput6, Stack as Stack29 } from "@mantine/core";
3594
3774
  var SpendActionForm = ({ data, onChange }) => {
3595
- return /* @__PURE__ */ React45.createElement(Stack29, null, /* @__PURE__ */ React45.createElement(
3775
+ return /* @__PURE__ */ React46.createElement(Stack29, null, /* @__PURE__ */ React46.createElement(
3596
3776
  TextInput6,
3597
3777
  {
3598
3778
  label: "Recipient Address",
@@ -3612,7 +3792,7 @@ var SpendActionForm = ({ data, onChange }) => {
3612
3792
  }
3613
3793
  }
3614
3794
  }
3615
- ), /* @__PURE__ */ React45.createElement(
3795
+ ), /* @__PURE__ */ React46.createElement(
3616
3796
  TextInput6,
3617
3797
  {
3618
3798
  label: "Denomination",
@@ -3632,7 +3812,7 @@ var SpendActionForm = ({ data, onChange }) => {
3632
3812
  }
3633
3813
  }
3634
3814
  }
3635
- ), /* @__PURE__ */ React45.createElement(
3815
+ ), /* @__PURE__ */ React46.createElement(
3636
3816
  TextInput6,
3637
3817
  {
3638
3818
  label: "Amount",
@@ -3656,7 +3836,7 @@ var SpendActionForm = ({ data, onChange }) => {
3656
3836
  };
3657
3837
 
3658
3838
  // src/mantine/blocks/proposal/actions-components/UpdateMembersActionForm.tsx
3659
- import React46, { useState as useState9 } from "react";
3839
+ import React47, { useState as useState9 } from "react";
3660
3840
  import { Stack as Stack30, TextInput as TextInput7, NumberInput as NumberInput2, Button as Button6, Group as Group9, Text as Text29, Card as Card7, Badge as Badge6, ActionIcon as ActionIcon7, Divider as Divider3, ScrollArea as ScrollArea2 } from "@mantine/core";
3661
3841
  var UpdateMembersActionForm = ({ data, onChange }) => {
3662
3842
  const [newMember, setNewMember] = useState9({ addr: "", weight: 1 });
@@ -3700,7 +3880,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
3700
3880
  }
3701
3881
  }
3702
3882
  };
3703
- return /* @__PURE__ */ React46.createElement(Stack30, null, /* @__PURE__ */ React46.createElement(Stack30, { gap: "xs" }, /* @__PURE__ */ React46.createElement(Text29, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Add"), /* @__PURE__ */ React46.createElement(ScrollArea2, { h: 150 }, /* @__PURE__ */ React46.createElement(Stack30, { gap: "xs" }, (data.add || []).map((member, index) => /* @__PURE__ */ React46.createElement(
3883
+ return /* @__PURE__ */ React47.createElement(Stack30, null, /* @__PURE__ */ React47.createElement(Stack30, { gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Add"), /* @__PURE__ */ React47.createElement(ScrollArea2, { h: 150 }, /* @__PURE__ */ React47.createElement(Stack30, { gap: "xs" }, (data.add || []).map((member, index) => /* @__PURE__ */ React47.createElement(
3704
3884
  Card7,
3705
3885
  {
3706
3886
  key: index,
@@ -3711,7 +3891,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
3711
3891
  borderColor: "#333"
3712
3892
  }
3713
3893
  },
3714
- /* @__PURE__ */ React46.createElement(Group9, { justify: "space-between" }, /* @__PURE__ */ React46.createElement("div", null, /* @__PURE__ */ React46.createElement(Text29, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, member.addr.slice(0, 20), "..."), /* @__PURE__ */ React46.createElement(
3894
+ /* @__PURE__ */ React47.createElement(Group9, { justify: "space-between" }, /* @__PURE__ */ React47.createElement("div", null, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, member.addr.slice(0, 20), "..."), /* @__PURE__ */ React47.createElement(
3715
3895
  Badge6,
3716
3896
  {
3717
3897
  size: "sm",
@@ -3722,8 +3902,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
3722
3902
  },
3723
3903
  "Weight: ",
3724
3904
  member.weight
3725
- )), /* @__PURE__ */ React46.createElement(ActionIcon7, { size: "sm", variant: "subtle", onClick: () => handleRemoveMember(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
3726
- )))), /* @__PURE__ */ React46.createElement(Group9, { grow: true }, /* @__PURE__ */ React46.createElement(TextInput7, { placeholder: "Member address", value: newMember.addr, onChange: (e) => setNewMember({ ...newMember, addr: e.currentTarget.value }), styles: inputStyles29 }), /* @__PURE__ */ React46.createElement(
3905
+ )), /* @__PURE__ */ React47.createElement(ActionIcon7, { size: "sm", variant: "subtle", onClick: () => handleRemoveMember(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
3906
+ )))), /* @__PURE__ */ React47.createElement(Group9, { grow: true }, /* @__PURE__ */ React47.createElement(TextInput7, { placeholder: "Member address", value: newMember.addr, onChange: (e) => setNewMember({ ...newMember, addr: e.currentTarget.value }), styles: inputStyles29 }), /* @__PURE__ */ React47.createElement(
3727
3907
  NumberInput2,
3728
3908
  {
3729
3909
  placeholder: "Weight",
@@ -3732,7 +3912,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
3732
3912
  min: 1,
3733
3913
  styles: inputStyles29
3734
3914
  }
3735
- ), /* @__PURE__ */ React46.createElement(
3915
+ ), /* @__PURE__ */ React47.createElement(
3736
3916
  Button6,
3737
3917
  {
3738
3918
  size: "sm",
@@ -3745,7 +3925,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
3745
3925
  }
3746
3926
  },
3747
3927
  "\u2795 Add"
3748
- ))), /* @__PURE__ */ React46.createElement(Divider3, { color: "#333" }), /* @__PURE__ */ React46.createElement(Stack30, { gap: "xs" }, /* @__PURE__ */ React46.createElement(Text29, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Remove"), /* @__PURE__ */ React46.createElement(ScrollArea2, { h: 100 }, /* @__PURE__ */ React46.createElement(Stack30, { gap: "xs" }, (data.remove || []).map((item, index) => /* @__PURE__ */ React46.createElement(
3928
+ ))), /* @__PURE__ */ React47.createElement(Divider3, { color: "#333" }), /* @__PURE__ */ React47.createElement(Stack30, { gap: "xs" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Members to Remove"), /* @__PURE__ */ React47.createElement(ScrollArea2, { h: 100 }, /* @__PURE__ */ React47.createElement(Stack30, { gap: "xs" }, (data.remove || []).map((item, index) => /* @__PURE__ */ React47.createElement(
3749
3929
  Card7,
3750
3930
  {
3751
3931
  key: index,
@@ -3756,8 +3936,8 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
3756
3936
  borderColor: "#333"
3757
3937
  }
3758
3938
  },
3759
- /* @__PURE__ */ React46.createElement(Group9, { justify: "space-between" }, /* @__PURE__ */ React46.createElement(Text29, { size: "sm", style: { color: "#adb5bd" } }, item.addr.slice(0, 30), "..."), /* @__PURE__ */ React46.createElement(ActionIcon7, { size: "sm", variant: "subtle", onClick: () => handleRemoveRemoveAddress(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
3760
- )))), /* @__PURE__ */ React46.createElement(Group9, { grow: true }, /* @__PURE__ */ React46.createElement(TextInput7, { placeholder: "Address to remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles29 }), /* @__PURE__ */ React46.createElement(
3939
+ /* @__PURE__ */ React47.createElement(Group9, { justify: "space-between" }, /* @__PURE__ */ React47.createElement(Text29, { size: "sm", style: { color: "#adb5bd" } }, item.addr.slice(0, 30), "..."), /* @__PURE__ */ React47.createElement(ActionIcon7, { size: "sm", variant: "subtle", onClick: () => handleRemoveRemoveAddress(index), style: { color: "#ff6b6b" } }, "\u{1F5D1}\uFE0F"))
3940
+ )))), /* @__PURE__ */ React47.createElement(Group9, { grow: true }, /* @__PURE__ */ React47.createElement(TextInput7, { placeholder: "Address to remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles29 }), /* @__PURE__ */ React47.createElement(
3761
3941
  Button6,
3762
3942
  {
3763
3943
  size: "sm",
@@ -3774,7 +3954,7 @@ var UpdateMembersActionForm = ({ data, onChange }) => {
3774
3954
  };
3775
3955
 
3776
3956
  // src/mantine/blocks/proposal/actions-components/StakeActionForm.tsx
3777
- import React47 from "react";
3957
+ import React48 from "react";
3778
3958
  import { Stack as Stack31, TextInput as TextInput8, Select as Select4, NumberInput as NumberInput3 } from "@mantine/core";
3779
3959
  var stakeTypeOptions = [
3780
3960
  { value: StakeType.Delegate, label: "Delegate" },
@@ -3820,7 +4000,7 @@ var selectStyles = {
3820
4000
  var StakeActionForm = ({ data, onChange }) => {
3821
4001
  const isRedelegate = data.stakeType === StakeType.Redelegate;
3822
4002
  const needsAmount = data.stakeType !== StakeType.WithdrawDelegatorReward;
3823
- return /* @__PURE__ */ React47.createElement(Stack31, { gap: "md" }, /* @__PURE__ */ React47.createElement(
4003
+ return /* @__PURE__ */ React48.createElement(Stack31, { gap: "md" }, /* @__PURE__ */ React48.createElement(
3824
4004
  Select4,
3825
4005
  {
3826
4006
  label: "Stake Type",
@@ -3830,7 +4010,7 @@ var StakeActionForm = ({ data, onChange }) => {
3830
4010
  required: true,
3831
4011
  styles: selectStyles
3832
4012
  }
3833
- ), /* @__PURE__ */ React47.createElement(
4013
+ ), /* @__PURE__ */ React48.createElement(
3834
4014
  TextInput8,
3835
4015
  {
3836
4016
  label: "Validator Address",
@@ -3840,7 +4020,7 @@ var StakeActionForm = ({ data, onChange }) => {
3840
4020
  required: true,
3841
4021
  styles: inputStyles
3842
4022
  }
3843
- ), isRedelegate && /* @__PURE__ */ React47.createElement(
4023
+ ), isRedelegate && /* @__PURE__ */ React48.createElement(
3844
4024
  TextInput8,
3845
4025
  {
3846
4026
  label: "Destination Validator Address",
@@ -3850,7 +4030,7 @@ var StakeActionForm = ({ data, onChange }) => {
3850
4030
  required: true,
3851
4031
  styles: inputStyles
3852
4032
  }
3853
- ), needsAmount && /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
4033
+ ), needsAmount && /* @__PURE__ */ React48.createElement(React48.Fragment, null, /* @__PURE__ */ React48.createElement(
3854
4034
  NumberInput3,
3855
4035
  {
3856
4036
  label: "Amount",
@@ -3862,7 +4042,7 @@ var StakeActionForm = ({ data, onChange }) => {
3862
4042
  required: true,
3863
4043
  styles: inputStyles
3864
4044
  }
3865
- ), /* @__PURE__ */ React47.createElement(
4045
+ ), /* @__PURE__ */ React48.createElement(
3866
4046
  Select4,
3867
4047
  {
3868
4048
  label: "Denomination",
@@ -3879,7 +4059,7 @@ var StakeActionForm = ({ data, onChange }) => {
3879
4059
  };
3880
4060
 
3881
4061
  // src/mantine/blocks/proposal/actions-components/JoinActionForm.tsx
3882
- import React48 from "react";
4062
+ import React49 from "react";
3883
4063
  import { Stack as Stack32, TextInput as TextInput9 } from "@mantine/core";
3884
4064
  var inputStyles2 = {
3885
4065
  label: { color: "#adb5bd" },
@@ -3893,7 +4073,7 @@ var inputStyles2 = {
3893
4073
  }
3894
4074
  };
3895
4075
  var JoinActionForm = ({ data, onChange }) => {
3896
- return /* @__PURE__ */ React48.createElement(Stack32, { gap: "md" }, /* @__PURE__ */ React48.createElement(TextInput9, { label: "ID", placeholder: "did:ixo:entity:abc123...", value: data.id, onChange: (e) => onChange({ ...data, id: e.target.value }), required: true, styles: inputStyles2 }), /* @__PURE__ */ React48.createElement(
4076
+ return /* @__PURE__ */ React49.createElement(Stack32, { gap: "md" }, /* @__PURE__ */ React49.createElement(TextInput9, { label: "ID", placeholder: "did:ixo:entity:abc123...", value: data.id, onChange: (e) => onChange({ ...data, id: e.target.value }), required: true, styles: inputStyles2 }), /* @__PURE__ */ React49.createElement(
3897
4077
  TextInput9,
3898
4078
  {
3899
4079
  label: "Core Address",
@@ -3903,11 +4083,11 @@ var JoinActionForm = ({ data, onChange }) => {
3903
4083
  required: true,
3904
4084
  styles: inputStyles2
3905
4085
  }
3906
- ), /* @__PURE__ */ React48.createElement(TextInput9, { label: "Address", placeholder: "ixo1...", value: data.address, onChange: (e) => onChange({ ...data, address: e.target.value }), required: true, styles: inputStyles2 }));
4086
+ ), /* @__PURE__ */ React49.createElement(TextInput9, { label: "Address", placeholder: "ixo1...", value: data.address, onChange: (e) => onChange({ ...data, address: e.target.value }), required: true, styles: inputStyles2 }));
3907
4087
  };
3908
4088
 
3909
4089
  // src/mantine/blocks/proposal/actions-components/forms/MintActionForm.tsx
3910
- import React49 from "react";
4090
+ import React50 from "react";
3911
4091
  import { Stack as Stack33, TextInput as TextInput10, NumberInput as NumberInput4 } from "@mantine/core";
3912
4092
  var inputStyles3 = {
3913
4093
  label: { color: "#adb5bd" },
@@ -3921,7 +4101,7 @@ var inputStyles3 = {
3921
4101
  }
3922
4102
  };
3923
4103
  var MintActionForm = ({ data, onChange }) => {
3924
- return /* @__PURE__ */ React49.createElement(Stack33, { gap: "md" }, /* @__PURE__ */ React49.createElement(TextInput10, { label: "Recipient Address", placeholder: "ixo1...", value: data.to, onChange: (e) => onChange({ ...data, to: e.currentTarget.value }), required: true, styles: inputStyles3 }), /* @__PURE__ */ React49.createElement(
4104
+ return /* @__PURE__ */ React50.createElement(Stack33, { gap: "md" }, /* @__PURE__ */ React50.createElement(TextInput10, { label: "Recipient Address", placeholder: "ixo1...", value: data.to, onChange: (e) => onChange({ ...data, to: e.currentTarget.value }), required: true, styles: inputStyles3 }), /* @__PURE__ */ React50.createElement(
3925
4105
  NumberInput4,
3926
4106
  {
3927
4107
  label: "Amount",
@@ -3937,7 +4117,7 @@ var MintActionForm = ({ data, onChange }) => {
3937
4117
  };
3938
4118
 
3939
4119
  // src/mantine/blocks/proposal/actions-components/forms/ExecuteActionForm.tsx
3940
- import React50, { useState as useState10 } from "react";
4120
+ import React51, { useState as useState10 } from "react";
3941
4121
  import { Stack as Stack34, TextInput as TextInput11, Textarea as Textarea3, Button as Button7, Group as Group10, Text as Text30, Card as Card8 } from "@mantine/core";
3942
4122
  var inputStyles4 = {
3943
4123
  label: { color: "#adb5bd" },
@@ -3975,7 +4155,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
3975
4155
  return data.message;
3976
4156
  }
3977
4157
  };
3978
- return /* @__PURE__ */ React50.createElement(Stack34, { gap: "md" }, /* @__PURE__ */ React50.createElement(
4158
+ return /* @__PURE__ */ React51.createElement(Stack34, { gap: "md" }, /* @__PURE__ */ React51.createElement(
3979
4159
  TextInput11,
3980
4160
  {
3981
4161
  label: "Contract Address",
@@ -3985,7 +4165,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
3985
4165
  required: true,
3986
4166
  styles: inputStyles4
3987
4167
  }
3988
- ), /* @__PURE__ */ React50.createElement(
4168
+ ), /* @__PURE__ */ React51.createElement(
3989
4169
  Textarea3,
3990
4170
  {
3991
4171
  label: "Message (JSON)",
@@ -3996,7 +4176,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
3996
4176
  required: true,
3997
4177
  styles: inputStyles4
3998
4178
  }
3999
- ), /* @__PURE__ */ React50.createElement(Stack34, { gap: "xs" }, /* @__PURE__ */ React50.createElement(Text30, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React50.createElement(Card8, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React50.createElement(Group10, { justify: "space-between" }, /* @__PURE__ */ React50.createElement(Text30, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React50.createElement(Button7, { size: "xs", variant: "subtle", onClick: () => handleRemoveFund(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React50.createElement(Group10, { grow: true }, /* @__PURE__ */ React50.createElement(TextInput11, { placeholder: "Amount", value: newFund.amount, onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }), styles: inputStyles4 }), /* @__PURE__ */ React50.createElement(TextInput11, { placeholder: "Denom (e.g., uixo)", value: newFund.denom, onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }), styles: inputStyles4 }), /* @__PURE__ */ React50.createElement(
4179
+ ), /* @__PURE__ */ React51.createElement(Stack34, { gap: "xs" }, /* @__PURE__ */ React51.createElement(Text30, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React51.createElement(Card8, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React51.createElement(Group10, { justify: "space-between" }, /* @__PURE__ */ React51.createElement(Text30, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React51.createElement(Button7, { size: "xs", variant: "subtle", onClick: () => handleRemoveFund(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React51.createElement(Group10, { grow: true }, /* @__PURE__ */ React51.createElement(TextInput11, { placeholder: "Amount", value: newFund.amount, onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }), styles: inputStyles4 }), /* @__PURE__ */ React51.createElement(TextInput11, { placeholder: "Denom (e.g., uixo)", value: newFund.denom, onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }), styles: inputStyles4 }), /* @__PURE__ */ React51.createElement(
4000
4180
  Button7,
4001
4181
  {
4002
4182
  size: "sm",
@@ -4011,7 +4191,7 @@ var ExecuteActionForm = ({ data, onChange }) => {
4011
4191
  };
4012
4192
 
4013
4193
  // src/mantine/blocks/proposal/actions-components/forms/CustomActionForm.tsx
4014
- import React51, { useState as useState11, useEffect as useEffect9 } from "react";
4194
+ import React52, { useState as useState11, useEffect as useEffect9 } from "react";
4015
4195
  import { Stack as Stack35, Textarea as Textarea4, Alert as Alert5, Text as Text31, Badge as Badge7 } from "@mantine/core";
4016
4196
  import { Group as Group11 } from "@mantine/core";
4017
4197
  var inputStyles5 = {
@@ -4049,7 +4229,7 @@ var CustomActionForm = ({ data, onChange }) => {
4049
4229
  return data.message;
4050
4230
  }
4051
4231
  };
4052
- return /* @__PURE__ */ React51.createElement(Stack35, { gap: "md" }, /* @__PURE__ */ React51.createElement(Alert5, { color: "yellow", style: { backgroundColor: "#2a2a2a", borderColor: "#ffd43b" } }, /* @__PURE__ */ React51.createElement(Text31, { size: "sm", style: { color: "#ffd43b" } }, "\u26A0\uFE0F Custom actions require valid JSON messages. Supports both Wasm and Stargate message formats.")), /* @__PURE__ */ React51.createElement("div", null, /* @__PURE__ */ React51.createElement(Group11, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React51.createElement(Text31, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Custom Message (JSON)"), /* @__PURE__ */ React51.createElement(
4232
+ return /* @__PURE__ */ React52.createElement(Stack35, { gap: "md" }, /* @__PURE__ */ React52.createElement(Alert5, { color: "yellow", style: { backgroundColor: "#2a2a2a", borderColor: "#ffd43b" } }, /* @__PURE__ */ React52.createElement(Text31, { size: "sm", style: { color: "#ffd43b" } }, "\u26A0\uFE0F Custom actions require valid JSON messages. Supports both Wasm and Stargate message formats.")), /* @__PURE__ */ React52.createElement("div", null, /* @__PURE__ */ React52.createElement(Group11, { gap: "xs", mb: "xs" }, /* @__PURE__ */ React52.createElement(Text31, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Custom Message (JSON)"), /* @__PURE__ */ React52.createElement(
4053
4233
  Badge7,
4054
4234
  {
4055
4235
  size: "sm",
@@ -4059,7 +4239,7 @@ var CustomActionForm = ({ data, onChange }) => {
4059
4239
  }
4060
4240
  },
4061
4241
  isValid ? "Valid JSON" : "Invalid JSON"
4062
- )), /* @__PURE__ */ React51.createElement(
4242
+ )), /* @__PURE__ */ React52.createElement(
4063
4243
  Textarea4,
4064
4244
  {
4065
4245
  placeholder: `Example Wasm message:
@@ -4092,7 +4272,7 @@ Example Stargate message:
4092
4272
  };
4093
4273
 
4094
4274
  // src/mantine/blocks/proposal/actions-components/forms/AuthzExecActionForm.tsx
4095
- import React52 from "react";
4275
+ import React53 from "react";
4096
4276
  import { Stack as Stack36, Select as Select5, TextInput as TextInput12, Textarea as Textarea5 } from "@mantine/core";
4097
4277
  var inputStyles6 = {
4098
4278
  label: { color: "#adb5bd" },
@@ -4128,7 +4308,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
4128
4308
  onChange({ ...data, [field]: value });
4129
4309
  }
4130
4310
  };
4131
- return /* @__PURE__ */ React52.createElement(Stack36, { gap: "md" }, /* @__PURE__ */ React52.createElement(
4311
+ return /* @__PURE__ */ React53.createElement(Stack36, { gap: "md" }, /* @__PURE__ */ React53.createElement(
4132
4312
  Select5,
4133
4313
  {
4134
4314
  label: "Action Type",
@@ -4139,7 +4319,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
4139
4319
  required: true,
4140
4320
  styles: inputStyles6
4141
4321
  }
4142
- ), data.authzExecActionType === AuthzExecActionTypes.Delegate && /* @__PURE__ */ React52.createElement(
4322
+ ), data.authzExecActionType === AuthzExecActionTypes.Delegate && /* @__PURE__ */ React53.createElement(
4143
4323
  Textarea5,
4144
4324
  {
4145
4325
  label: "Delegate Message (JSON)",
@@ -4149,7 +4329,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
4149
4329
  minRows: 4,
4150
4330
  styles: inputStyles6
4151
4331
  }
4152
- ), data.authzExecActionType === AuthzExecActionTypes.Undelegate && /* @__PURE__ */ React52.createElement(
4332
+ ), data.authzExecActionType === AuthzExecActionTypes.Undelegate && /* @__PURE__ */ React53.createElement(
4153
4333
  Textarea5,
4154
4334
  {
4155
4335
  label: "Undelegate Message (JSON)",
@@ -4159,7 +4339,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
4159
4339
  minRows: 4,
4160
4340
  styles: inputStyles6
4161
4341
  }
4162
- ), data.authzExecActionType === AuthzExecActionTypes.Redelegate && /* @__PURE__ */ React52.createElement(
4342
+ ), data.authzExecActionType === AuthzExecActionTypes.Redelegate && /* @__PURE__ */ React53.createElement(
4163
4343
  Textarea5,
4164
4344
  {
4165
4345
  label: "Redelegate Message (JSON)",
@@ -4169,7 +4349,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
4169
4349
  minRows: 4,
4170
4350
  styles: inputStyles6
4171
4351
  }
4172
- ), data.authzExecActionType === AuthzExecActionTypes.ClaimRewards && /* @__PURE__ */ React52.createElement(
4352
+ ), data.authzExecActionType === AuthzExecActionTypes.ClaimRewards && /* @__PURE__ */ React53.createElement(
4173
4353
  Textarea5,
4174
4354
  {
4175
4355
  label: "Claim Rewards Message (JSON)",
@@ -4179,7 +4359,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
4179
4359
  minRows: 3,
4180
4360
  styles: inputStyles6
4181
4361
  }
4182
- ), data.authzExecActionType === AuthzExecActionTypes.Custom && /* @__PURE__ */ React52.createElement(
4362
+ ), data.authzExecActionType === AuthzExecActionTypes.Custom && /* @__PURE__ */ React53.createElement(
4183
4363
  TextInput12,
4184
4364
  {
4185
4365
  label: "Custom Message",
@@ -4192,7 +4372,7 @@ var AuthzExecActionForm = ({ data, onChange }) => {
4192
4372
  };
4193
4373
 
4194
4374
  // src/mantine/blocks/proposal/actions-components/forms/AuthzGrantActionForm.tsx
4195
- import React53 from "react";
4375
+ import React54 from "react";
4196
4376
  import { Stack as Stack37, TextInput as TextInput13 } from "@mantine/core";
4197
4377
  var inputStyles7 = {
4198
4378
  label: { color: "#adb5bd" },
@@ -4206,7 +4386,7 @@ var inputStyles7 = {
4206
4386
  }
4207
4387
  };
4208
4388
  var AuthzGrantActionForm = ({ data, onChange }) => {
4209
- return /* @__PURE__ */ React53.createElement(Stack37, { gap: "md" }, /* @__PURE__ */ React53.createElement(
4389
+ return /* @__PURE__ */ React54.createElement(Stack37, { gap: "md" }, /* @__PURE__ */ React54.createElement(
4210
4390
  TextInput13,
4211
4391
  {
4212
4392
  label: "Type URL",
@@ -4216,7 +4396,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
4216
4396
  required: true,
4217
4397
  styles: inputStyles7
4218
4398
  }
4219
- ), /* @__PURE__ */ React53.createElement(
4399
+ ), /* @__PURE__ */ React54.createElement(
4220
4400
  TextInput13,
4221
4401
  {
4222
4402
  label: "Grantee Address",
@@ -4229,7 +4409,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
4229
4409
  required: true,
4230
4410
  styles: inputStyles7
4231
4411
  }
4232
- ), /* @__PURE__ */ React53.createElement(
4412
+ ), /* @__PURE__ */ React54.createElement(
4233
4413
  TextInput13,
4234
4414
  {
4235
4415
  label: "Message Type URL",
@@ -4246,7 +4426,7 @@ var AuthzGrantActionForm = ({ data, onChange }) => {
4246
4426
  };
4247
4427
 
4248
4428
  // src/mantine/blocks/proposal/actions-components/forms/BurnNftActionForm.tsx
4249
- import React54 from "react";
4429
+ import React55 from "react";
4250
4430
  import { Stack as Stack38, TextInput as TextInput14 } from "@mantine/core";
4251
4431
  var inputStyles8 = {
4252
4432
  label: { color: "#adb5bd" },
@@ -4260,7 +4440,7 @@ var inputStyles8 = {
4260
4440
  }
4261
4441
  };
4262
4442
  var BurnNftActionForm = ({ data, onChange }) => {
4263
- return /* @__PURE__ */ React54.createElement(Stack38, { gap: "md" }, /* @__PURE__ */ React54.createElement(
4443
+ return /* @__PURE__ */ React55.createElement(Stack38, { gap: "md" }, /* @__PURE__ */ React55.createElement(
4264
4444
  TextInput14,
4265
4445
  {
4266
4446
  label: "Collection Address",
@@ -4270,11 +4450,11 @@ var BurnNftActionForm = ({ data, onChange }) => {
4270
4450
  required: true,
4271
4451
  styles: inputStyles8
4272
4452
  }
4273
- ), /* @__PURE__ */ React54.createElement(TextInput14, { label: "Token ID", placeholder: "1", value: data.tokenId, onChange: (e) => onChange({ ...data, tokenId: e.currentTarget.value }), required: true, styles: inputStyles8 }));
4453
+ ), /* @__PURE__ */ React55.createElement(TextInput14, { label: "Token ID", placeholder: "1", value: data.tokenId, onChange: (e) => onChange({ ...data, tokenId: e.currentTarget.value }), required: true, styles: inputStyles8 }));
4274
4454
  };
4275
4455
 
4276
4456
  // src/mantine/blocks/proposal/actions-components/forms/TransferNftActionForm.tsx
4277
- import React55 from "react";
4457
+ import React56 from "react";
4278
4458
  import { Stack as Stack39, TextInput as TextInput15, Checkbox as Checkbox4, Textarea as Textarea6 } from "@mantine/core";
4279
4459
  var inputStyles9 = {
4280
4460
  label: { color: "#adb5bd" },
@@ -4288,7 +4468,7 @@ var inputStyles9 = {
4288
4468
  }
4289
4469
  };
4290
4470
  var TransferNftActionForm = ({ data, onChange }) => {
4291
- return /* @__PURE__ */ React55.createElement(Stack39, { gap: "md" }, /* @__PURE__ */ React55.createElement(
4471
+ return /* @__PURE__ */ React56.createElement(Stack39, { gap: "md" }, /* @__PURE__ */ React56.createElement(
4292
4472
  TextInput15,
4293
4473
  {
4294
4474
  label: "Collection Address",
@@ -4298,7 +4478,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
4298
4478
  required: true,
4299
4479
  styles: inputStyles9
4300
4480
  }
4301
- ), /* @__PURE__ */ React55.createElement(TextInput15, { label: "Token ID", placeholder: "1", value: data.tokenId, onChange: (e) => onChange({ ...data, tokenId: e.currentTarget.value }), required: true, styles: inputStyles9 }), /* @__PURE__ */ React55.createElement(
4481
+ ), /* @__PURE__ */ React56.createElement(TextInput15, { label: "Token ID", placeholder: "1", value: data.tokenId, onChange: (e) => onChange({ ...data, tokenId: e.currentTarget.value }), required: true, styles: inputStyles9 }), /* @__PURE__ */ React56.createElement(
4302
4482
  TextInput15,
4303
4483
  {
4304
4484
  label: "Recipient Address",
@@ -4308,7 +4488,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
4308
4488
  required: true,
4309
4489
  styles: inputStyles9
4310
4490
  }
4311
- ), /* @__PURE__ */ React55.createElement(
4491
+ ), /* @__PURE__ */ React56.createElement(
4312
4492
  Checkbox4,
4313
4493
  {
4314
4494
  label: "Execute Smart Contract",
@@ -4319,7 +4499,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
4319
4499
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
4320
4500
  }
4321
4501
  }
4322
- ), data.executeSmartContract && /* @__PURE__ */ React55.createElement(
4502
+ ), data.executeSmartContract && /* @__PURE__ */ React56.createElement(
4323
4503
  Textarea6,
4324
4504
  {
4325
4505
  label: "Smart Contract Message (JSON)",
@@ -4333,7 +4513,7 @@ var TransferNftActionForm = ({ data, onChange }) => {
4333
4513
  };
4334
4514
 
4335
4515
  // src/mantine/blocks/proposal/actions-components/forms/ManageCw721ActionForm.tsx
4336
- import React56 from "react";
4516
+ import React57 from "react";
4337
4517
  import { Stack as Stack40, TextInput as TextInput16, Radio, Group as Group12 } from "@mantine/core";
4338
4518
  var inputStyles10 = {
4339
4519
  label: { color: "#adb5bd" },
@@ -4347,7 +4527,7 @@ var inputStyles10 = {
4347
4527
  }
4348
4528
  };
4349
4529
  var ManageCw721ActionForm = ({ data, onChange }) => {
4350
- return /* @__PURE__ */ React56.createElement(Stack40, { gap: "md" }, /* @__PURE__ */ React56.createElement(Radio.Group, { label: "Action", value: data.adding ? "add" : "remove", onChange: (value) => onChange({ ...data, adding: value === "add" }) }, /* @__PURE__ */ React56.createElement(Group12, { mt: "xs" }, /* @__PURE__ */ React56.createElement(
4530
+ return /* @__PURE__ */ React57.createElement(Stack40, { gap: "md" }, /* @__PURE__ */ React57.createElement(Radio.Group, { label: "Action", value: data.adding ? "add" : "remove", onChange: (value) => onChange({ ...data, adding: value === "add" }) }, /* @__PURE__ */ React57.createElement(Group12, { mt: "xs" }, /* @__PURE__ */ React57.createElement(
4351
4531
  Radio,
4352
4532
  {
4353
4533
  value: "add",
@@ -4357,7 +4537,7 @@ var ManageCw721ActionForm = ({ data, onChange }) => {
4357
4537
  radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
4358
4538
  }
4359
4539
  }
4360
- ), /* @__PURE__ */ React56.createElement(
4540
+ ), /* @__PURE__ */ React57.createElement(
4361
4541
  Radio,
4362
4542
  {
4363
4543
  value: "remove",
@@ -4367,7 +4547,7 @@ var ManageCw721ActionForm = ({ data, onChange }) => {
4367
4547
  radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
4368
4548
  }
4369
4549
  }
4370
- ))), /* @__PURE__ */ React56.createElement(
4550
+ ))), /* @__PURE__ */ React57.createElement(
4371
4551
  TextInput16,
4372
4552
  {
4373
4553
  label: "NFT Contract Address",
@@ -4381,7 +4561,7 @@ var ManageCw721ActionForm = ({ data, onChange }) => {
4381
4561
  };
4382
4562
 
4383
4563
  // src/mantine/blocks/proposal/actions-components/forms/InstantiateActionForm.tsx
4384
- import React57, { useState as useState12 } from "react";
4564
+ import React58, { useState as useState12 } from "react";
4385
4565
  import { Stack as Stack41, TextInput as TextInput17, Textarea as Textarea7, NumberInput as NumberInput5, Button as Button8, Group as Group13, Text as Text32, Card as Card9 } from "@mantine/core";
4386
4566
  var inputStyles11 = {
4387
4567
  label: { color: "#adb5bd" },
@@ -4419,7 +4599,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
4419
4599
  return data.message;
4420
4600
  }
4421
4601
  };
4422
- return /* @__PURE__ */ React57.createElement(Stack41, { gap: "md" }, /* @__PURE__ */ React57.createElement(
4602
+ return /* @__PURE__ */ React58.createElement(Stack41, { gap: "md" }, /* @__PURE__ */ React58.createElement(
4423
4603
  TextInput17,
4424
4604
  {
4425
4605
  label: "Admin Address",
@@ -4429,7 +4609,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
4429
4609
  required: true,
4430
4610
  styles: inputStyles11
4431
4611
  }
4432
- ), /* @__PURE__ */ React57.createElement(
4612
+ ), /* @__PURE__ */ React58.createElement(
4433
4613
  NumberInput5,
4434
4614
  {
4435
4615
  label: "Code ID",
@@ -4440,7 +4620,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
4440
4620
  required: true,
4441
4621
  styles: inputStyles11
4442
4622
  }
4443
- ), /* @__PURE__ */ React57.createElement(TextInput17, { label: "Label", placeholder: "My Contract", value: data.label, onChange: (e) => onChange({ ...data, label: e.currentTarget.value }), required: true, styles: inputStyles11 }), /* @__PURE__ */ React57.createElement(
4623
+ ), /* @__PURE__ */ React58.createElement(TextInput17, { label: "Label", placeholder: "My Contract", value: data.label, onChange: (e) => onChange({ ...data, label: e.currentTarget.value }), required: true, styles: inputStyles11 }), /* @__PURE__ */ React58.createElement(
4444
4624
  Textarea7,
4445
4625
  {
4446
4626
  label: "Instantiate Message (JSON)",
@@ -4451,7 +4631,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
4451
4631
  required: true,
4452
4632
  styles: inputStyles11
4453
4633
  }
4454
- ), /* @__PURE__ */ React57.createElement(Stack41, { gap: "xs" }, /* @__PURE__ */ React57.createElement(Text32, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React57.createElement(Card9, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React57.createElement(Group13, { justify: "space-between" }, /* @__PURE__ */ React57.createElement(Text32, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React57.createElement(Button8, { size: "xs", variant: "subtle", onClick: () => handleRemoveFund(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React57.createElement(Group13, { grow: true }, /* @__PURE__ */ React57.createElement(TextInput17, { placeholder: "Amount", value: newFund.amount, onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }), styles: inputStyles11 }), /* @__PURE__ */ React57.createElement(TextInput17, { placeholder: "Denom (e.g., uixo)", value: newFund.denom, onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }), styles: inputStyles11 }), /* @__PURE__ */ React57.createElement(
4634
+ ), /* @__PURE__ */ React58.createElement(Stack41, { gap: "xs" }, /* @__PURE__ */ React58.createElement(Text32, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Funds (Optional)"), (data.funds || []).map((fund, index) => /* @__PURE__ */ React58.createElement(Card9, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React58.createElement(Group13, { justify: "space-between" }, /* @__PURE__ */ React58.createElement(Text32, { size: "sm", style: { color: "#f1f3f5" } }, fund.amount, " ", fund.denom), /* @__PURE__ */ React58.createElement(Button8, { size: "xs", variant: "subtle", onClick: () => handleRemoveFund(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React58.createElement(Group13, { grow: true }, /* @__PURE__ */ React58.createElement(TextInput17, { placeholder: "Amount", value: newFund.amount, onChange: (e) => setNewFund({ ...newFund, amount: e.currentTarget.value }), styles: inputStyles11 }), /* @__PURE__ */ React58.createElement(TextInput17, { placeholder: "Denom (e.g., uixo)", value: newFund.denom, onChange: (e) => setNewFund({ ...newFund, denom: e.currentTarget.value }), styles: inputStyles11 }), /* @__PURE__ */ React58.createElement(
4455
4635
  Button8,
4456
4636
  {
4457
4637
  size: "sm",
@@ -4466,7 +4646,7 @@ var InstantiateActionForm = ({ data, onChange }) => {
4466
4646
  };
4467
4647
 
4468
4648
  // src/mantine/blocks/proposal/actions-components/forms/MigrateActionForm.tsx
4469
- import React58 from "react";
4649
+ import React59 from "react";
4470
4650
  import { Stack as Stack42, TextInput as TextInput18, Textarea as Textarea8, NumberInput as NumberInput6 } from "@mantine/core";
4471
4651
  var inputStyles12 = {
4472
4652
  label: { color: "#adb5bd" },
@@ -4488,7 +4668,7 @@ var MigrateActionForm = ({ data, onChange }) => {
4488
4668
  return data.msg;
4489
4669
  }
4490
4670
  };
4491
- return /* @__PURE__ */ React58.createElement(Stack42, { gap: "md" }, /* @__PURE__ */ React58.createElement(
4671
+ return /* @__PURE__ */ React59.createElement(Stack42, { gap: "md" }, /* @__PURE__ */ React59.createElement(
4492
4672
  TextInput18,
4493
4673
  {
4494
4674
  label: "Contract Address",
@@ -4498,7 +4678,7 @@ var MigrateActionForm = ({ data, onChange }) => {
4498
4678
  required: true,
4499
4679
  styles: inputStyles12
4500
4680
  }
4501
- ), /* @__PURE__ */ React58.createElement(
4681
+ ), /* @__PURE__ */ React59.createElement(
4502
4682
  NumberInput6,
4503
4683
  {
4504
4684
  label: "New Code ID",
@@ -4509,7 +4689,7 @@ var MigrateActionForm = ({ data, onChange }) => {
4509
4689
  required: true,
4510
4690
  styles: inputStyles12
4511
4691
  }
4512
- ), /* @__PURE__ */ React58.createElement(
4692
+ ), /* @__PURE__ */ React59.createElement(
4513
4693
  Textarea8,
4514
4694
  {
4515
4695
  label: "Migration Message (JSON)",
@@ -4524,7 +4704,7 @@ var MigrateActionForm = ({ data, onChange }) => {
4524
4704
  };
4525
4705
 
4526
4706
  // src/mantine/blocks/proposal/actions-components/forms/UpdateAdminActionForm.tsx
4527
- import React59 from "react";
4707
+ import React60 from "react";
4528
4708
  import { Stack as Stack43, TextInput as TextInput19 } from "@mantine/core";
4529
4709
  var inputStyles13 = {
4530
4710
  label: { color: "#adb5bd" },
@@ -4538,7 +4718,7 @@ var inputStyles13 = {
4538
4718
  }
4539
4719
  };
4540
4720
  var UpdateAdminActionForm = ({ data, onChange }) => {
4541
- return /* @__PURE__ */ React59.createElement(Stack43, { gap: "md" }, /* @__PURE__ */ React59.createElement(
4721
+ return /* @__PURE__ */ React60.createElement(Stack43, { gap: "md" }, /* @__PURE__ */ React60.createElement(
4542
4722
  TextInput19,
4543
4723
  {
4544
4724
  label: "Contract Address",
@@ -4548,7 +4728,7 @@ var UpdateAdminActionForm = ({ data, onChange }) => {
4548
4728
  required: true,
4549
4729
  styles: inputStyles13
4550
4730
  }
4551
- ), /* @__PURE__ */ React59.createElement(
4731
+ ), /* @__PURE__ */ React60.createElement(
4552
4732
  TextInput19,
4553
4733
  {
4554
4734
  label: "New Admin Address",
@@ -4562,7 +4742,7 @@ var UpdateAdminActionForm = ({ data, onChange }) => {
4562
4742
  };
4563
4743
 
4564
4744
  // src/mantine/blocks/proposal/actions-components/forms/ManageCw20ActionForm.tsx
4565
- import React60 from "react";
4745
+ import React61 from "react";
4566
4746
  import { Stack as Stack44, TextInput as TextInput20, Radio as Radio2, Group as Group14 } from "@mantine/core";
4567
4747
  var inputStyles14 = {
4568
4748
  label: { color: "#adb5bd" },
@@ -4576,7 +4756,7 @@ var inputStyles14 = {
4576
4756
  }
4577
4757
  };
4578
4758
  var ManageCw20ActionForm = ({ data, onChange }) => {
4579
- return /* @__PURE__ */ React60.createElement(Stack44, { gap: "md" }, /* @__PURE__ */ React60.createElement(Radio2.Group, { label: "Action", value: data.adding ? "add" : "remove", onChange: (value) => onChange({ ...data, adding: value === "add" }) }, /* @__PURE__ */ React60.createElement(Group14, { mt: "xs" }, /* @__PURE__ */ React60.createElement(
4759
+ return /* @__PURE__ */ React61.createElement(Stack44, { gap: "md" }, /* @__PURE__ */ React61.createElement(Radio2.Group, { label: "Action", value: data.adding ? "add" : "remove", onChange: (value) => onChange({ ...data, adding: value === "add" }) }, /* @__PURE__ */ React61.createElement(Group14, { mt: "xs" }, /* @__PURE__ */ React61.createElement(
4580
4760
  Radio2,
4581
4761
  {
4582
4762
  value: "add",
@@ -4586,7 +4766,7 @@ var ManageCw20ActionForm = ({ data, onChange }) => {
4586
4766
  radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
4587
4767
  }
4588
4768
  }
4589
- ), /* @__PURE__ */ React60.createElement(
4769
+ ), /* @__PURE__ */ React61.createElement(
4590
4770
  Radio2,
4591
4771
  {
4592
4772
  value: "remove",
@@ -4596,7 +4776,7 @@ var ManageCw20ActionForm = ({ data, onChange }) => {
4596
4776
  radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
4597
4777
  }
4598
4778
  }
4599
- ))), /* @__PURE__ */ React60.createElement(
4779
+ ))), /* @__PURE__ */ React61.createElement(
4600
4780
  TextInput20,
4601
4781
  {
4602
4782
  label: "Token Contract Address",
@@ -4610,7 +4790,7 @@ var ManageCw20ActionForm = ({ data, onChange }) => {
4610
4790
  };
4611
4791
 
4612
4792
  // src/mantine/blocks/proposal/actions-components/forms/ManageSubDaosActionForm.tsx
4613
- import React61, { useState as useState13 } from "react";
4793
+ import React62, { useState as useState13 } from "react";
4614
4794
  import { Stack as Stack45, TextInput as TextInput21, Button as Button9, Group as Group15, Text as Text33, Card as Card10, Textarea as Textarea9 } from "@mantine/core";
4615
4795
  var inputStyles15 = {
4616
4796
  label: { color: "#adb5bd" },
@@ -4656,7 +4836,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
4656
4836
  toRemove: (data.toRemove || []).filter((_, i) => i !== index)
4657
4837
  });
4658
4838
  };
4659
- return /* @__PURE__ */ React61.createElement(Stack45, { gap: "md" }, /* @__PURE__ */ React61.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React61.createElement(Text33, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Add"), (data.toAdd || []).map((subDao, index) => /* @__PURE__ */ React61.createElement(Card10, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React61.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React61.createElement(Group15, { justify: "space-between" }, /* @__PURE__ */ React61.createElement(Text33, { size: "sm", style: { color: "#f1f3f5" } }, subDao.addr), /* @__PURE__ */ React61.createElement(Button9, { size: "xs", variant: "subtle", onClick: () => handleRemoveFromAddList(index), style: { color: "#ff6b6b" } }, "Remove")), subDao.charter && /* @__PURE__ */ React61.createElement(Text33, { size: "xs", style: { color: "#adb5bd" } }, "Charter: ", subDao.charter)))), /* @__PURE__ */ React61.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React61.createElement(TextInput21, { placeholder: "SubDAO Address", value: newSubDao.addr, onChange: (e) => setNewSubDao({ ...newSubDao, addr: e.currentTarget.value }), styles: inputStyles15 }), /* @__PURE__ */ React61.createElement(
4839
+ return /* @__PURE__ */ React62.createElement(Stack45, { gap: "md" }, /* @__PURE__ */ React62.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React62.createElement(Text33, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Add"), (data.toAdd || []).map((subDao, index) => /* @__PURE__ */ React62.createElement(Card10, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React62.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React62.createElement(Group15, { justify: "space-between" }, /* @__PURE__ */ React62.createElement(Text33, { size: "sm", style: { color: "#f1f3f5" } }, subDao.addr), /* @__PURE__ */ React62.createElement(Button9, { size: "xs", variant: "subtle", onClick: () => handleRemoveFromAddList(index), style: { color: "#ff6b6b" } }, "Remove")), subDao.charter && /* @__PURE__ */ React62.createElement(Text33, { size: "xs", style: { color: "#adb5bd" } }, "Charter: ", subDao.charter)))), /* @__PURE__ */ React62.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React62.createElement(TextInput21, { placeholder: "SubDAO Address", value: newSubDao.addr, onChange: (e) => setNewSubDao({ ...newSubDao, addr: e.currentTarget.value }), styles: inputStyles15 }), /* @__PURE__ */ React62.createElement(
4660
4840
  Textarea9,
4661
4841
  {
4662
4842
  placeholder: "Charter (optional)",
@@ -4665,7 +4845,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
4665
4845
  minRows: 2,
4666
4846
  styles: inputStyles15
4667
4847
  }
4668
- ), /* @__PURE__ */ React61.createElement(
4848
+ ), /* @__PURE__ */ React62.createElement(
4669
4849
  Button9,
4670
4850
  {
4671
4851
  size: "sm",
@@ -4676,7 +4856,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
4676
4856
  }
4677
4857
  },
4678
4858
  "Add SubDAO"
4679
- ))), /* @__PURE__ */ React61.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React61.createElement(Text33, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Remove"), (data.toRemove || []).map((subDao, index) => /* @__PURE__ */ React61.createElement(Card10, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React61.createElement(Group15, { justify: "space-between" }, /* @__PURE__ */ React61.createElement(Text33, { size: "sm", style: { color: "#f1f3f5" } }, subDao.address), /* @__PURE__ */ React61.createElement(Button9, { size: "xs", variant: "subtle", onClick: () => handleRemoveFromRemoveList(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React61.createElement(Group15, { grow: true }, /* @__PURE__ */ React61.createElement(TextInput21, { placeholder: "SubDAO Address to Remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles15 }), /* @__PURE__ */ React61.createElement(
4859
+ ))), /* @__PURE__ */ React62.createElement(Stack45, { gap: "xs" }, /* @__PURE__ */ React62.createElement(Text33, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "SubDAOs to Remove"), (data.toRemove || []).map((subDao, index) => /* @__PURE__ */ React62.createElement(Card10, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React62.createElement(Group15, { justify: "space-between" }, /* @__PURE__ */ React62.createElement(Text33, { size: "sm", style: { color: "#f1f3f5" } }, subDao.address), /* @__PURE__ */ React62.createElement(Button9, { size: "xs", variant: "subtle", onClick: () => handleRemoveFromRemoveList(index), style: { color: "#ff6b6b" } }, "Remove")))), /* @__PURE__ */ React62.createElement(Group15, { grow: true }, /* @__PURE__ */ React62.createElement(TextInput21, { placeholder: "SubDAO Address to Remove", value: newRemoveAddress, onChange: (e) => setNewRemoveAddress(e.currentTarget.value), styles: inputStyles15 }), /* @__PURE__ */ React62.createElement(
4680
4860
  Button9,
4681
4861
  {
4682
4862
  size: "sm",
@@ -4691,7 +4871,7 @@ var ManageSubDaosActionForm = ({ data, onChange }) => {
4691
4871
  };
4692
4872
 
4693
4873
  // src/mantine/blocks/proposal/actions-components/forms/UpdateInfoActionForm.tsx
4694
- import React62 from "react";
4874
+ import React63 from "react";
4695
4875
  import { Stack as Stack46, TextInput as TextInput22, Textarea as Textarea10, Checkbox as Checkbox5 } from "@mantine/core";
4696
4876
  var inputStyles16 = {
4697
4877
  label: { color: "#adb5bd" },
@@ -4705,7 +4885,7 @@ var inputStyles16 = {
4705
4885
  }
4706
4886
  };
4707
4887
  var UpdateInfoActionForm = ({ data, onChange }) => {
4708
- return /* @__PURE__ */ React62.createElement(Stack46, { gap: "md" }, /* @__PURE__ */ React62.createElement(TextInput22, { label: "DAO Name", placeholder: "My DAO", value: data.name, onChange: (e) => onChange({ ...data, name: e.currentTarget.value }), required: true, styles: inputStyles16 }), /* @__PURE__ */ React62.createElement(
4888
+ return /* @__PURE__ */ React63.createElement(Stack46, { gap: "md" }, /* @__PURE__ */ React63.createElement(TextInput22, { label: "DAO Name", placeholder: "My DAO", value: data.name, onChange: (e) => onChange({ ...data, name: e.currentTarget.value }), required: true, styles: inputStyles16 }), /* @__PURE__ */ React63.createElement(
4709
4889
  Textarea10,
4710
4890
  {
4711
4891
  label: "Description",
@@ -4715,7 +4895,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
4715
4895
  minRows: 3,
4716
4896
  styles: inputStyles16
4717
4897
  }
4718
- ), /* @__PURE__ */ React62.createElement(
4898
+ ), /* @__PURE__ */ React63.createElement(
4719
4899
  TextInput22,
4720
4900
  {
4721
4901
  label: "Image URL (Optional)",
@@ -4724,7 +4904,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
4724
4904
  onChange: (e) => onChange({ ...data, image_url: e.currentTarget.value || null }),
4725
4905
  styles: inputStyles16
4726
4906
  }
4727
- ), /* @__PURE__ */ React62.createElement(
4907
+ ), /* @__PURE__ */ React63.createElement(
4728
4908
  TextInput22,
4729
4909
  {
4730
4910
  label: "DAO URI (Optional)",
@@ -4733,7 +4913,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
4733
4913
  onChange: (e) => onChange({ ...data, dao_uri: e.currentTarget.value || null }),
4734
4914
  styles: inputStyles16
4735
4915
  }
4736
- ), /* @__PURE__ */ React62.createElement(
4916
+ ), /* @__PURE__ */ React63.createElement(
4737
4917
  Checkbox5,
4738
4918
  {
4739
4919
  label: "Automatically add CW20 tokens",
@@ -4744,7 +4924,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
4744
4924
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
4745
4925
  }
4746
4926
  }
4747
- ), /* @__PURE__ */ React62.createElement(
4927
+ ), /* @__PURE__ */ React63.createElement(
4748
4928
  Checkbox5,
4749
4929
  {
4750
4930
  label: "Automatically add CW721 NFTs",
@@ -4759,7 +4939,7 @@ var UpdateInfoActionForm = ({ data, onChange }) => {
4759
4939
  };
4760
4940
 
4761
4941
  // src/mantine/blocks/proposal/actions-components/forms/ManageStorageItemsActionForm.tsx
4762
- import React63 from "react";
4942
+ import React64 from "react";
4763
4943
  import { Stack as Stack47, TextInput as TextInput23, Radio as Radio3, Group as Group16, Textarea as Textarea11 } from "@mantine/core";
4764
4944
  var inputStyles17 = {
4765
4945
  label: { color: "#adb5bd" },
@@ -4773,7 +4953,7 @@ var inputStyles17 = {
4773
4953
  }
4774
4954
  };
4775
4955
  var ManageStorageItemsActionForm = ({ data, onChange }) => {
4776
- return /* @__PURE__ */ React63.createElement(Stack47, { gap: "md" }, /* @__PURE__ */ React63.createElement(Radio3.Group, { label: "Action", value: data.setting ? "set" : "remove", onChange: (value) => onChange({ ...data, setting: value === "set" }) }, /* @__PURE__ */ React63.createElement(Group16, { mt: "xs" }, /* @__PURE__ */ React63.createElement(
4956
+ return /* @__PURE__ */ React64.createElement(Stack47, { gap: "md" }, /* @__PURE__ */ React64.createElement(Radio3.Group, { label: "Action", value: data.setting ? "set" : "remove", onChange: (value) => onChange({ ...data, setting: value === "set" }) }, /* @__PURE__ */ React64.createElement(Group16, { mt: "xs" }, /* @__PURE__ */ React64.createElement(
4777
4957
  Radio3,
4778
4958
  {
4779
4959
  value: "set",
@@ -4783,7 +4963,7 @@ var ManageStorageItemsActionForm = ({ data, onChange }) => {
4783
4963
  radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
4784
4964
  }
4785
4965
  }
4786
- ), /* @__PURE__ */ React63.createElement(
4966
+ ), /* @__PURE__ */ React64.createElement(
4787
4967
  Radio3,
4788
4968
  {
4789
4969
  value: "remove",
@@ -4793,7 +4973,7 @@ var ManageStorageItemsActionForm = ({ data, onChange }) => {
4793
4973
  radio: { backgroundColor: "#2a2a2a", borderColor: "#333" }
4794
4974
  }
4795
4975
  }
4796
- ))), /* @__PURE__ */ React63.createElement(TextInput23, { label: "Storage Key", placeholder: "config_key", value: data.key, onChange: (e) => onChange({ ...data, key: e.currentTarget.value }), required: true, styles: inputStyles17 }), data.setting && /* @__PURE__ */ React63.createElement(
4976
+ ))), /* @__PURE__ */ React64.createElement(TextInput23, { label: "Storage Key", placeholder: "config_key", value: data.key, onChange: (e) => onChange({ ...data, key: e.currentTarget.value }), required: true, styles: inputStyles17 }), data.setting && /* @__PURE__ */ React64.createElement(
4797
4977
  Textarea11,
4798
4978
  {
4799
4979
  label: "Storage Value",
@@ -4808,7 +4988,7 @@ var ManageStorageItemsActionForm = ({ data, onChange }) => {
4808
4988
  };
4809
4989
 
4810
4990
  // src/mantine/blocks/proposal/actions-components/forms/DaoAdminExecActionForm.tsx
4811
- import React64, { useState as useState14 } from "react";
4991
+ import React65, { useState as useState14 } from "react";
4812
4992
  import { Stack as Stack48, TextInput as TextInput24, Button as Button10, Group as Group17, Text as Text34, Card as Card11, Textarea as Textarea12 } from "@mantine/core";
4813
4993
  var inputStyles18 = {
4814
4994
  label: { color: "#adb5bd" },
@@ -4842,7 +5022,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
4842
5022
  msgs: (data.msgs || []).filter((_, i) => i !== index)
4843
5023
  });
4844
5024
  };
4845
- return /* @__PURE__ */ React64.createElement(Stack48, { gap: "md" }, /* @__PURE__ */ React64.createElement(
5025
+ return /* @__PURE__ */ React65.createElement(Stack48, { gap: "md" }, /* @__PURE__ */ React65.createElement(
4846
5026
  TextInput24,
4847
5027
  {
4848
5028
  label: "Core Address",
@@ -4852,7 +5032,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
4852
5032
  required: true,
4853
5033
  styles: inputStyles18
4854
5034
  }
4855
- ), /* @__PURE__ */ React64.createElement(Stack48, { gap: "xs" }, /* @__PURE__ */ React64.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Messages to Execute"), (data.msgs || []).map((msg, index) => /* @__PURE__ */ React64.createElement(Card11, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React64.createElement(Group17, { justify: "space-between" }, /* @__PURE__ */ React64.createElement(Text34, { size: "sm", style: { color: "#f1f3f5" } }, "Message ", index + 1), /* @__PURE__ */ React64.createElement(Button10, { size: "xs", variant: "subtle", onClick: () => handleRemoveMessage(index), style: { color: "#ff6b6b" } }, "Remove")), /* @__PURE__ */ React64.createElement(Text34, { size: "xs", style: { color: "#adb5bd", fontFamily: "monospace" } }, JSON.stringify(msg, null, 2).substring(0, 100), "..."))), /* @__PURE__ */ React64.createElement(
5035
+ ), /* @__PURE__ */ React65.createElement(Stack48, { gap: "xs" }, /* @__PURE__ */ React65.createElement(Text34, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Messages to Execute"), (data.msgs || []).map((msg, index) => /* @__PURE__ */ React65.createElement(Card11, { key: index, withBorder: true, padding: "xs", style: { backgroundColor: "#2a2a2a", borderColor: "#333" } }, /* @__PURE__ */ React65.createElement(Group17, { justify: "space-between" }, /* @__PURE__ */ React65.createElement(Text34, { size: "sm", style: { color: "#f1f3f5" } }, "Message ", index + 1), /* @__PURE__ */ React65.createElement(Button10, { size: "xs", variant: "subtle", onClick: () => handleRemoveMessage(index), style: { color: "#ff6b6b" } }, "Remove")), /* @__PURE__ */ React65.createElement(Text34, { size: "xs", style: { color: "#adb5bd", fontFamily: "monospace" } }, JSON.stringify(msg, null, 2).substring(0, 100), "..."))), /* @__PURE__ */ React65.createElement(
4856
5036
  Textarea12,
4857
5037
  {
4858
5038
  placeholder: 'Add cosmos message as JSON:\\n{"bank": {"send": {"to_address": "ixo1...", "amount": [{"denom": "uixo", "amount": "1000"}]}}}',
@@ -4861,7 +5041,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
4861
5041
  minRows: 4,
4862
5042
  styles: inputStyles18
4863
5043
  }
4864
- ), /* @__PURE__ */ React64.createElement(
5044
+ ), /* @__PURE__ */ React65.createElement(
4865
5045
  Button10,
4866
5046
  {
4867
5047
  size: "sm",
@@ -4876,7 +5056,7 @@ var DaoAdminExecActionForm = ({ data, onChange }) => {
4876
5056
  };
4877
5057
 
4878
5058
  // src/mantine/blocks/proposal/actions-components/forms/AcceptToMarketplaceActionForm.tsx
4879
- import React65 from "react";
5059
+ import React66 from "react";
4880
5060
  import { Stack as Stack49, TextInput as TextInput25 } from "@mantine/core";
4881
5061
  var inputStyles19 = {
4882
5062
  label: { color: "#adb5bd" },
@@ -4890,7 +5070,7 @@ var inputStyles19 = {
4890
5070
  }
4891
5071
  };
4892
5072
  var AcceptToMarketplaceActionForm = ({ data, onChange }) => {
4893
- return /* @__PURE__ */ React65.createElement(Stack49, { gap: "md" }, /* @__PURE__ */ React65.createElement(TextInput25, { label: "DID", placeholder: "did:ixo:...", value: data.did, onChange: (e) => onChange({ ...data, did: e.currentTarget.value }), required: true, styles: inputStyles19 }), /* @__PURE__ */ React65.createElement(
5073
+ return /* @__PURE__ */ React66.createElement(Stack49, { gap: "md" }, /* @__PURE__ */ React66.createElement(TextInput25, { label: "DID", placeholder: "did:ixo:...", value: data.did, onChange: (e) => onChange({ ...data, did: e.currentTarget.value }), required: true, styles: inputStyles19 }), /* @__PURE__ */ React66.createElement(
4894
5074
  TextInput25,
4895
5075
  {
4896
5076
  label: "Relayer Node DID",
@@ -4900,7 +5080,7 @@ var AcceptToMarketplaceActionForm = ({ data, onChange }) => {
4900
5080
  required: true,
4901
5081
  styles: inputStyles19
4902
5082
  }
4903
- ), /* @__PURE__ */ React65.createElement(
5083
+ ), /* @__PURE__ */ React66.createElement(
4904
5084
  TextInput25,
4905
5085
  {
4906
5086
  label: "Relayer Node Address",
@@ -4914,7 +5094,7 @@ var AcceptToMarketplaceActionForm = ({ data, onChange }) => {
4914
5094
  };
4915
5095
 
4916
5096
  // src/mantine/blocks/proposal/actions-components/forms/CreateEntityActionForm.tsx
4917
- import React66 from "react";
5097
+ import React67 from "react";
4918
5098
  import { Stack as Stack50, Textarea as Textarea13, Alert as Alert6, Text as Text35 } from "@mantine/core";
4919
5099
  var inputStyles20 = {
4920
5100
  label: { color: "#adb5bd" },
@@ -4935,7 +5115,7 @@ var CreateEntityActionForm = ({ data, onChange }) => {
4935
5115
  } catch {
4936
5116
  }
4937
5117
  };
4938
- return /* @__PURE__ */ React66.createElement(Stack50, { gap: "md" }, /* @__PURE__ */ React66.createElement(Alert6, { color: "blue", style: { backgroundColor: "#2a2a2a", borderColor: "#4dabf7" } }, /* @__PURE__ */ React66.createElement(Text35, { size: "sm", style: { color: "#4dabf7" } }, "This is a complex entity creation action. Please provide the complete entity data as JSON.")), /* @__PURE__ */ React66.createElement(
5118
+ return /* @__PURE__ */ React67.createElement(Stack50, { gap: "md" }, /* @__PURE__ */ React67.createElement(Alert6, { color: "blue", style: { backgroundColor: "#2a2a2a", borderColor: "#4dabf7" } }, /* @__PURE__ */ React67.createElement(Text35, { size: "sm", style: { color: "#4dabf7" } }, "This is a complex entity creation action. Please provide the complete entity data as JSON.")), /* @__PURE__ */ React67.createElement(
4939
5119
  Textarea13,
4940
5120
  {
4941
5121
  label: "Entity Data (JSON)",
@@ -4950,7 +5130,7 @@ var CreateEntityActionForm = ({ data, onChange }) => {
4950
5130
  };
4951
5131
 
4952
5132
  // src/mantine/blocks/proposal/actions-components/forms/UpdateVotingConfigActionForm.tsx
4953
- import React67 from "react";
5133
+ import React68 from "react";
4954
5134
  import { Stack as Stack51, Checkbox as Checkbox6, Select as Select6, NumberInput as NumberInput7, Group as Group18 } from "@mantine/core";
4955
5135
  var inputStyles21 = {
4956
5136
  label: { color: "#adb5bd" },
@@ -4964,7 +5144,7 @@ var inputStyles21 = {
4964
5144
  }
4965
5145
  };
4966
5146
  var UpdateVotingConfigActionForm = ({ data, onChange }) => {
4967
- return /* @__PURE__ */ React67.createElement(Stack51, { gap: "md" }, /* @__PURE__ */ React67.createElement(
5147
+ return /* @__PURE__ */ React68.createElement(Stack51, { gap: "md" }, /* @__PURE__ */ React68.createElement(
4968
5148
  Checkbox6,
4969
5149
  {
4970
5150
  label: "Only members can execute",
@@ -4975,7 +5155,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
4975
5155
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
4976
5156
  }
4977
5157
  }
4978
- ), /* @__PURE__ */ React67.createElement(
5158
+ ), /* @__PURE__ */ React68.createElement(
4979
5159
  Select6,
4980
5160
  {
4981
5161
  label: "Threshold Type",
@@ -4987,7 +5167,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
4987
5167
  ],
4988
5168
  styles: inputStyles21
4989
5169
  }
4990
- ), data.thresholdType === "%" && /* @__PURE__ */ React67.createElement(
5170
+ ), data.thresholdType === "%" && /* @__PURE__ */ React68.createElement(
4991
5171
  NumberInput7,
4992
5172
  {
4993
5173
  label: "Threshold Percentage",
@@ -4999,7 +5179,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
4999
5179
  suffix: "%",
5000
5180
  styles: inputStyles21
5001
5181
  }
5002
- ), /* @__PURE__ */ React67.createElement(
5182
+ ), /* @__PURE__ */ React68.createElement(
5003
5183
  Checkbox6,
5004
5184
  {
5005
5185
  label: "Enable Quorum",
@@ -5010,7 +5190,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
5010
5190
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
5011
5191
  }
5012
5192
  }
5013
- ), data.quorumEnabled && /* @__PURE__ */ React67.createElement(React67.Fragment, null, /* @__PURE__ */ React67.createElement(
5193
+ ), data.quorumEnabled && /* @__PURE__ */ React68.createElement(React68.Fragment, null, /* @__PURE__ */ React68.createElement(
5014
5194
  Select6,
5015
5195
  {
5016
5196
  label: "Quorum Type",
@@ -5022,7 +5202,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
5022
5202
  ],
5023
5203
  styles: inputStyles21
5024
5204
  }
5025
- ), data.quorumType === "%" && /* @__PURE__ */ React67.createElement(
5205
+ ), data.quorumType === "%" && /* @__PURE__ */ React68.createElement(
5026
5206
  NumberInput7,
5027
5207
  {
5028
5208
  label: "Quorum Percentage",
@@ -5034,7 +5214,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
5034
5214
  suffix: "%",
5035
5215
  styles: inputStyles21
5036
5216
  }
5037
- )), /* @__PURE__ */ React67.createElement(Group18, { grow: true }, /* @__PURE__ */ React67.createElement(
5217
+ )), /* @__PURE__ */ React68.createElement(Group18, { grow: true }, /* @__PURE__ */ React68.createElement(
5038
5218
  NumberInput7,
5039
5219
  {
5040
5220
  label: "Proposal Duration",
@@ -5044,7 +5224,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
5044
5224
  min: 1,
5045
5225
  styles: inputStyles21
5046
5226
  }
5047
- ), /* @__PURE__ */ React67.createElement(
5227
+ ), /* @__PURE__ */ React68.createElement(
5048
5228
  Select6,
5049
5229
  {
5050
5230
  label: "Duration Units",
@@ -5058,7 +5238,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
5058
5238
  ],
5059
5239
  styles: inputStyles21
5060
5240
  }
5061
- )), /* @__PURE__ */ React67.createElement(
5241
+ )), /* @__PURE__ */ React68.createElement(
5062
5242
  Checkbox6,
5063
5243
  {
5064
5244
  label: "Allow revoting",
@@ -5073,7 +5253,7 @@ var UpdateVotingConfigActionForm = ({ data, onChange }) => {
5073
5253
  };
5074
5254
 
5075
5255
  // src/mantine/blocks/proposal/actions-components/forms/UpdatePreProposeConfigActionForm.tsx
5076
- import React68 from "react";
5256
+ import React69 from "react";
5077
5257
  import { Stack as Stack52, Checkbox as Checkbox7, TextInput as TextInput26, Select as Select7, Textarea as Textarea14 } from "@mantine/core";
5078
5258
  var inputStyles22 = {
5079
5259
  label: { color: "#adb5bd" },
@@ -5087,7 +5267,7 @@ var inputStyles22 = {
5087
5267
  }
5088
5268
  };
5089
5269
  var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
5090
- return /* @__PURE__ */ React68.createElement(Stack52, { gap: "md" }, /* @__PURE__ */ React68.createElement(
5270
+ return /* @__PURE__ */ React69.createElement(Stack52, { gap: "md" }, /* @__PURE__ */ React69.createElement(
5091
5271
  Checkbox7,
5092
5272
  {
5093
5273
  label: "Anyone can propose",
@@ -5098,7 +5278,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
5098
5278
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
5099
5279
  }
5100
5280
  }
5101
- ), /* @__PURE__ */ React68.createElement(
5281
+ ), /* @__PURE__ */ React69.createElement(
5102
5282
  Checkbox7,
5103
5283
  {
5104
5284
  label: "Deposit required",
@@ -5109,7 +5289,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
5109
5289
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
5110
5290
  }
5111
5291
  }
5112
- ), data.depositRequired && /* @__PURE__ */ React68.createElement(React68.Fragment, null, /* @__PURE__ */ React68.createElement(
5292
+ ), data.depositRequired && /* @__PURE__ */ React69.createElement(React69.Fragment, null, /* @__PURE__ */ React69.createElement(
5113
5293
  TextInput26,
5114
5294
  {
5115
5295
  label: "Deposit Amount",
@@ -5122,7 +5302,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
5122
5302
  required: true,
5123
5303
  styles: inputStyles22
5124
5304
  }
5125
- ), /* @__PURE__ */ React68.createElement(
5305
+ ), /* @__PURE__ */ React69.createElement(
5126
5306
  Select7,
5127
5307
  {
5128
5308
  label: "Deposit Type",
@@ -5138,7 +5318,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
5138
5318
  ],
5139
5319
  styles: inputStyles22
5140
5320
  }
5141
- ), /* @__PURE__ */ React68.createElement(
5321
+ ), /* @__PURE__ */ React69.createElement(
5142
5322
  TextInput26,
5143
5323
  {
5144
5324
  label: "Token Denomination or Address",
@@ -5151,7 +5331,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
5151
5331
  required: true,
5152
5332
  styles: inputStyles22
5153
5333
  }
5154
- ), /* @__PURE__ */ React68.createElement(
5334
+ ), /* @__PURE__ */ React69.createElement(
5155
5335
  TextInput26,
5156
5336
  {
5157
5337
  label: "Refund Policy",
@@ -5164,7 +5344,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
5164
5344
  required: true,
5165
5345
  styles: inputStyles22
5166
5346
  }
5167
- ), data.depositInfo.type !== "native" && /* @__PURE__ */ React68.createElement(
5347
+ ), data.depositInfo.type !== "native" && /* @__PURE__ */ React69.createElement(
5168
5348
  Textarea14,
5169
5349
  {
5170
5350
  label: "Token Configuration (JSON)",
@@ -5187,7 +5367,7 @@ var UpdatePreProposeConfigActionForm = ({ data, onChange }) => {
5187
5367
  };
5188
5368
 
5189
5369
  // src/mantine/blocks/proposal/actions-components/forms/GovernanceVoteActionForm.tsx
5190
- import React69 from "react";
5370
+ import React70 from "react";
5191
5371
  import { Stack as Stack53, TextInput as TextInput27, Select as Select8 } from "@mantine/core";
5192
5372
  var inputStyles23 = {
5193
5373
  label: { color: "#adb5bd" },
@@ -5207,7 +5387,7 @@ var GovernanceVoteActionForm = ({ data, onChange }) => {
5207
5387
  { value: "3", label: "No" },
5208
5388
  { value: "4", label: "No with Veto" }
5209
5389
  ];
5210
- return /* @__PURE__ */ React69.createElement(Stack53, { gap: "md" }, /* @__PURE__ */ React69.createElement(
5390
+ return /* @__PURE__ */ React70.createElement(Stack53, { gap: "md" }, /* @__PURE__ */ React70.createElement(
5211
5391
  TextInput27,
5212
5392
  {
5213
5393
  label: "Proposal ID",
@@ -5217,7 +5397,7 @@ var GovernanceVoteActionForm = ({ data, onChange }) => {
5217
5397
  required: true,
5218
5398
  styles: inputStyles23
5219
5399
  }
5220
- ), /* @__PURE__ */ React69.createElement(
5400
+ ), /* @__PURE__ */ React70.createElement(
5221
5401
  Select8,
5222
5402
  {
5223
5403
  label: "Vote Option",
@@ -5231,7 +5411,7 @@ var GovernanceVoteActionForm = ({ data, onChange }) => {
5231
5411
  };
5232
5412
 
5233
5413
  // src/mantine/blocks/proposal/actions-components/forms/WithdrawTokenSwapActionForm.tsx
5234
- import React70 from "react";
5414
+ import React71 from "react";
5235
5415
  import { Stack as Stack54, TextInput as TextInput28, Checkbox as Checkbox8 } from "@mantine/core";
5236
5416
  var inputStyles24 = {
5237
5417
  label: { color: "#adb5bd" },
@@ -5245,7 +5425,7 @@ var inputStyles24 = {
5245
5425
  }
5246
5426
  };
5247
5427
  var WithdrawTokenSwapActionForm = ({ data, onChange }) => {
5248
- return /* @__PURE__ */ React70.createElement(Stack54, { gap: "md" }, /* @__PURE__ */ React70.createElement(
5428
+ return /* @__PURE__ */ React71.createElement(Stack54, { gap: "md" }, /* @__PURE__ */ React71.createElement(
5249
5429
  Checkbox8,
5250
5430
  {
5251
5431
  label: "Contract chosen",
@@ -5256,7 +5436,7 @@ var WithdrawTokenSwapActionForm = ({ data, onChange }) => {
5256
5436
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
5257
5437
  }
5258
5438
  }
5259
- ), data.contractChosen && /* @__PURE__ */ React70.createElement(
5439
+ ), data.contractChosen && /* @__PURE__ */ React71.createElement(
5260
5440
  TextInput28,
5261
5441
  {
5262
5442
  label: "Token Swap Contract Address",
@@ -5270,7 +5450,7 @@ var WithdrawTokenSwapActionForm = ({ data, onChange }) => {
5270
5450
  };
5271
5451
 
5272
5452
  // src/mantine/blocks/proposal/actions-components/forms/PerformTokenSwapActionForm.tsx
5273
- import React71 from "react";
5453
+ import React72 from "react";
5274
5454
  import { Stack as Stack55, TextInput as TextInput29, Checkbox as Checkbox9, Textarea as Textarea15 } from "@mantine/core";
5275
5455
  var inputStyles25 = {
5276
5456
  label: { color: "#adb5bd" },
@@ -5284,7 +5464,7 @@ var inputStyles25 = {
5284
5464
  }
5285
5465
  };
5286
5466
  var PerformTokenSwapActionForm = ({ data, onChange }) => {
5287
- return /* @__PURE__ */ React71.createElement(Stack55, { gap: "md" }, /* @__PURE__ */ React71.createElement(
5467
+ return /* @__PURE__ */ React72.createElement(Stack55, { gap: "md" }, /* @__PURE__ */ React72.createElement(
5288
5468
  Checkbox9,
5289
5469
  {
5290
5470
  label: "Contract chosen",
@@ -5295,7 +5475,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
5295
5475
  input: { backgroundColor: "#2a2a2a", borderColor: "#333" }
5296
5476
  }
5297
5477
  }
5298
- ), data.contractChosen && /* @__PURE__ */ React71.createElement(React71.Fragment, null, /* @__PURE__ */ React71.createElement(
5478
+ ), data.contractChosen && /* @__PURE__ */ React72.createElement(React72.Fragment, null, /* @__PURE__ */ React72.createElement(
5299
5479
  TextInput29,
5300
5480
  {
5301
5481
  label: "Token Swap Contract Address",
@@ -5305,7 +5485,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
5305
5485
  required: true,
5306
5486
  styles: inputStyles25
5307
5487
  }
5308
- ), /* @__PURE__ */ React71.createElement(
5488
+ ), /* @__PURE__ */ React72.createElement(
5309
5489
  Textarea15,
5310
5490
  {
5311
5491
  label: "Self Party Information (JSON)",
@@ -5321,7 +5501,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
5321
5501
  minRows: 4,
5322
5502
  styles: inputStyles25
5323
5503
  }
5324
- ), /* @__PURE__ */ React71.createElement(
5504
+ ), /* @__PURE__ */ React72.createElement(
5325
5505
  Textarea15,
5326
5506
  {
5327
5507
  label: "Counterparty Information (JSON)",
@@ -5341,7 +5521,7 @@ var PerformTokenSwapActionForm = ({ data, onChange }) => {
5341
5521
  };
5342
5522
 
5343
5523
  // src/mantine/blocks/proposal/actions-components/forms/StakeToGroupActionForm.tsx
5344
- import React72 from "react";
5524
+ import React73 from "react";
5345
5525
  import { Stack as Stack56, TextInput as TextInput30 } from "@mantine/core";
5346
5526
  var inputStyles26 = {
5347
5527
  label: { color: "#adb5bd" },
@@ -5355,7 +5535,7 @@ var inputStyles26 = {
5355
5535
  }
5356
5536
  };
5357
5537
  var StakeToGroupActionForm = ({ data, onChange }) => {
5358
- return /* @__PURE__ */ React72.createElement(Stack56, { gap: "md" }, /* @__PURE__ */ React72.createElement(
5538
+ return /* @__PURE__ */ React73.createElement(Stack56, { gap: "md" }, /* @__PURE__ */ React73.createElement(
5359
5539
  TextInput30,
5360
5540
  {
5361
5541
  label: "Token Contract Address",
@@ -5365,7 +5545,7 @@ var StakeToGroupActionForm = ({ data, onChange }) => {
5365
5545
  required: true,
5366
5546
  styles: inputStyles26
5367
5547
  }
5368
- ), /* @__PURE__ */ React72.createElement(
5548
+ ), /* @__PURE__ */ React73.createElement(
5369
5549
  TextInput30,
5370
5550
  {
5371
5551
  label: "Staking Contract Address",
@@ -5375,11 +5555,11 @@ var StakeToGroupActionForm = ({ data, onChange }) => {
5375
5555
  required: true,
5376
5556
  styles: inputStyles26
5377
5557
  }
5378
- ), /* @__PURE__ */ React72.createElement(TextInput30, { label: "Amount", placeholder: "1000", value: data.amount, onChange: (e) => onChange({ ...data, amount: e.currentTarget.value }), required: true, styles: inputStyles26 }));
5558
+ ), /* @__PURE__ */ React73.createElement(TextInput30, { label: "Amount", placeholder: "1000", value: data.amount, onChange: (e) => onChange({ ...data, amount: e.currentTarget.value }), required: true, styles: inputStyles26 }));
5379
5559
  };
5380
5560
 
5381
5561
  // src/mantine/blocks/proposal/actions-components/forms/SendGroupTokenActionForm.tsx
5382
- import React73 from "react";
5562
+ import React74 from "react";
5383
5563
  import { Stack as Stack57, TextInput as TextInput31 } from "@mantine/core";
5384
5564
  var inputStyles27 = {
5385
5565
  label: { color: "#adb5bd" },
@@ -5393,7 +5573,7 @@ var inputStyles27 = {
5393
5573
  }
5394
5574
  };
5395
5575
  var SendGroupTokenActionForm = ({ data, onChange }) => {
5396
- return /* @__PURE__ */ React73.createElement(Stack57, { gap: "md" }, /* @__PURE__ */ React73.createElement(
5576
+ return /* @__PURE__ */ React74.createElement(Stack57, { gap: "md" }, /* @__PURE__ */ React74.createElement(
5397
5577
  TextInput31,
5398
5578
  {
5399
5579
  label: "Contract Address",
@@ -5403,7 +5583,7 @@ var SendGroupTokenActionForm = ({ data, onChange }) => {
5403
5583
  required: true,
5404
5584
  styles: inputStyles27
5405
5585
  }
5406
- ), /* @__PURE__ */ React73.createElement(
5586
+ ), /* @__PURE__ */ React74.createElement(
5407
5587
  TextInput31,
5408
5588
  {
5409
5589
  label: "Recipient Address",
@@ -5413,11 +5593,11 @@ var SendGroupTokenActionForm = ({ data, onChange }) => {
5413
5593
  required: true,
5414
5594
  styles: inputStyles27
5415
5595
  }
5416
- ), /* @__PURE__ */ React73.createElement(TextInput31, { label: "Amount", placeholder: "1000", value: data.amount, onChange: (e) => onChange({ ...data, amount: e.currentTarget.value }), required: true, styles: inputStyles27 }));
5596
+ ), /* @__PURE__ */ React74.createElement(TextInput31, { label: "Amount", placeholder: "1000", value: data.amount, onChange: (e) => onChange({ ...data, amount: e.currentTarget.value }), required: true, styles: inputStyles27 }));
5417
5597
  };
5418
5598
 
5419
5599
  // src/mantine/blocks/proposal/actions-components/forms/ValidatorActionsActionForm.tsx
5420
- import React74 from "react";
5600
+ import React75 from "react";
5421
5601
  import { Stack as Stack58, Select as Select9, Textarea as Textarea16 } from "@mantine/core";
5422
5602
  var inputStyles28 = {
5423
5603
  label: { color: "#adb5bd" },
@@ -5437,7 +5617,7 @@ var ValidatorActionsActionForm = ({ data, onChange }) => {
5437
5617
  { value: "/cosmos.slashing.v1beta1.MsgUnjail" /* UnjailValidator */, label: "Unjail Validator" },
5438
5618
  { value: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" /* WithdrawValidatorCommission */, label: "Withdraw Commission" }
5439
5619
  ];
5440
- return /* @__PURE__ */ React74.createElement(Stack58, { gap: "md" }, /* @__PURE__ */ React74.createElement(
5620
+ return /* @__PURE__ */ React75.createElement(Stack58, { gap: "md" }, /* @__PURE__ */ React75.createElement(
5441
5621
  Select9,
5442
5622
  {
5443
5623
  label: "Validator Action Type",
@@ -5447,7 +5627,7 @@ var ValidatorActionsActionForm = ({ data, onChange }) => {
5447
5627
  required: true,
5448
5628
  styles: inputStyles28
5449
5629
  }
5450
- ), data.validatorActionType === "/cosmos.staking.v1beta1.MsgCreateValidator" /* CreateValidator */ && /* @__PURE__ */ React74.createElement(
5630
+ ), data.validatorActionType === "/cosmos.staking.v1beta1.MsgCreateValidator" /* CreateValidator */ && /* @__PURE__ */ React75.createElement(
5451
5631
  Textarea16,
5452
5632
  {
5453
5633
  label: "Create Validator Message (JSON)",
@@ -5458,7 +5638,7 @@ var ValidatorActionsActionForm = ({ data, onChange }) => {
5458
5638
  required: true,
5459
5639
  styles: inputStyles28
5460
5640
  }
5461
- ), data.validatorActionType === "/cosmos.staking.v1beta1.MsgEditValidator" /* EditValidator */ && /* @__PURE__ */ React74.createElement(
5641
+ ), data.validatorActionType === "/cosmos.staking.v1beta1.MsgEditValidator" /* EditValidator */ && /* @__PURE__ */ React75.createElement(
5462
5642
  Textarea16,
5463
5643
  {
5464
5644
  label: "Edit Validator Message (JSON)",
@@ -6139,7 +6319,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
6139
6319
  return config?.getDefaultData() || {};
6140
6320
  });
6141
6321
  const currentActionConfig = getActionConfig(selectedActionType);
6142
- const categorizedActions = useMemo9(() => getCategorizedActions(), []);
6322
+ const categorizedActions = useMemo10(() => getCategorizedActions(), []);
6143
6323
  useEffect10(() => {
6144
6324
  if (!isEditing) {
6145
6325
  const config = getActionConfig(selectedActionType);
@@ -6163,10 +6343,10 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
6163
6343
  };
6164
6344
  const renderActionForm = () => {
6165
6345
  if (!currentActionConfig) {
6166
- return /* @__PURE__ */ React75.createElement(Alert7, { color: "red", style: { backgroundColor: "#2a2a2a", borderColor: "#ff6b6b" } }, /* @__PURE__ */ React75.createElement(Text36, { size: "sm", style: { color: "#ff6b6b" } }, "Unknown action type selected"));
6346
+ return /* @__PURE__ */ React76.createElement(Alert7, { color: "red", style: { backgroundColor: "#2a2a2a", borderColor: "#ff6b6b" } }, /* @__PURE__ */ React76.createElement(Text36, { size: "sm", style: { color: "#ff6b6b" } }, "Unknown action type selected"));
6167
6347
  }
6168
6348
  const FormComponent = currentActionConfig.FormComponent;
6169
- return /* @__PURE__ */ React75.createElement(FormComponent, { data: actionData, onChange: setActionData, isTemplateMode });
6349
+ return /* @__PURE__ */ React76.createElement(FormComponent, { data: actionData, onChange: setActionData, isTemplateMode });
6170
6350
  };
6171
6351
  const getCategoryColor = (category) => {
6172
6352
  const colors = {
@@ -6181,7 +6361,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
6181
6361
  };
6182
6362
  return colors[category] || "#6b7280";
6183
6363
  };
6184
- return /* @__PURE__ */ React75.createElement(Stack59, { style: { backgroundColor: "#1a1a1a", color: "#f1f3f5", height: "100%" } }, /* @__PURE__ */ React75.createElement(Text36, { size: "lg", fw: 600, style: { color: "#f1f3f5" } }, isEditing ? "Edit Action" : "Add New Action"), !isEditing ? /* @__PURE__ */ React75.createElement(Stack59, { gap: "md" }, /* @__PURE__ */ React75.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Select Action Type"), /* @__PURE__ */ React75.createElement(
6364
+ return /* @__PURE__ */ React76.createElement(Stack59, { style: { backgroundColor: "#1a1a1a", color: "#f1f3f5", height: "100%" } }, /* @__PURE__ */ React76.createElement(Text36, { size: "lg", fw: 600, style: { color: "#f1f3f5" } }, isEditing ? "Edit Action" : "Add New Action"), !isEditing ? /* @__PURE__ */ React76.createElement(Stack59, { gap: "md" }, /* @__PURE__ */ React76.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Select Action Type"), /* @__PURE__ */ React76.createElement(
6185
6365
  Tabs2,
6186
6366
  {
6187
6367
  defaultValue: ACTION_CATEGORIES[0].id,
@@ -6202,8 +6382,8 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
6202
6382
  panel: { paddingTop: "md" }
6203
6383
  }
6204
6384
  },
6205
- /* @__PURE__ */ React75.createElement(Tabs2.List, null, ACTION_CATEGORIES.map((category) => /* @__PURE__ */ React75.createElement(Tabs2.Tab, { key: category.id, value: category.id }, /* @__PURE__ */ React75.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React75.createElement("span", null, category.icon), /* @__PURE__ */ React75.createElement("span", null, category.label))))),
6206
- ACTION_CATEGORIES.map((category) => /* @__PURE__ */ React75.createElement(Tabs2.Panel, { key: category.id, value: category.id, mt: 10 }, /* @__PURE__ */ React75.createElement(SimpleGrid, { cols: 2, spacing: "xs" }, (categorizedActions.get(category.id) || []).map((config) => /* @__PURE__ */ React75.createElement(
6385
+ /* @__PURE__ */ React76.createElement(Tabs2.List, null, ACTION_CATEGORIES.map((category) => /* @__PURE__ */ React76.createElement(Tabs2.Tab, { key: category.id, value: category.id }, /* @__PURE__ */ React76.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React76.createElement("span", null, category.icon), /* @__PURE__ */ React76.createElement("span", null, category.label))))),
6386
+ ACTION_CATEGORIES.map((category) => /* @__PURE__ */ React76.createElement(Tabs2.Panel, { key: category.id, value: category.id, mt: 10 }, /* @__PURE__ */ React76.createElement(SimpleGrid, { cols: 2, spacing: "xs" }, (categorizedActions.get(category.id) || []).map((config) => /* @__PURE__ */ React76.createElement(
6207
6387
  Paper5,
6208
6388
  {
6209
6389
  key: config.value,
@@ -6217,9 +6397,9 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
6217
6397
  },
6218
6398
  onClick: () => setSelectedActionType(config.value)
6219
6399
  },
6220
- /* @__PURE__ */ React75.createElement(Stack59, { gap: "xs" }, /* @__PURE__ */ React75.createElement(Group19, { justify: "space-between" }, /* @__PURE__ */ React75.createElement(Text36, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, config.label), selectedActionType === config.value && /* @__PURE__ */ React75.createElement(Badge8, { size: "xs", style: { backgroundColor: "#4dabf7" } }, "Selected")), config.description && /* @__PURE__ */ React75.createElement(Text36, { size: "xs", style: { color: "#adb5bd" } }, config.description))
6400
+ /* @__PURE__ */ React76.createElement(Stack59, { gap: "xs" }, /* @__PURE__ */ React76.createElement(Group19, { justify: "space-between" }, /* @__PURE__ */ React76.createElement(Text36, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, config.label), selectedActionType === config.value && /* @__PURE__ */ React76.createElement(Badge8, { size: "xs", style: { backgroundColor: "#4dabf7" } }, "Selected")), config.description && /* @__PURE__ */ React76.createElement(Text36, { size: "xs", style: { color: "#adb5bd" } }, config.description))
6221
6401
  )))))
6222
- )) : /* @__PURE__ */ React75.createElement(
6402
+ )) : /* @__PURE__ */ React76.createElement(
6223
6403
  Card12,
6224
6404
  {
6225
6405
  withBorder: true,
@@ -6229,7 +6409,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
6229
6409
  borderColor: "#333"
6230
6410
  }
6231
6411
  },
6232
- /* @__PURE__ */ React75.createElement(Group19, { justify: "space-between" }, /* @__PURE__ */ React75.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React75.createElement(
6412
+ /* @__PURE__ */ React76.createElement(Group19, { justify: "space-between" }, /* @__PURE__ */ React76.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React76.createElement(
6233
6413
  Badge8,
6234
6414
  {
6235
6415
  size: "sm",
@@ -6239,10 +6419,10 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
6239
6419
  }
6240
6420
  },
6241
6421
  currentActionConfig?.label || selectedActionType
6242
- ), /* @__PURE__ */ React75.createElement(Text36, { size: "sm", style: { color: "#adb5bd" } }, "(Editing)")))
6243
- ), /* @__PURE__ */ React75.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React75.createElement(ScrollArea3, { style: { flex: 1 } }, renderActionForm()), /* @__PURE__ */ React75.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React75.createElement(Stack59, { gap: "xs" }, /* @__PURE__ */ React75.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Current Actions (", actions.length, ")"), /* @__PURE__ */ React75.createElement(ScrollArea3, { h: 100 }, /* @__PURE__ */ React75.createElement(Stack59, { gap: "xs" }, actions.map((action, index) => {
6422
+ ), /* @__PURE__ */ React76.createElement(Text36, { size: "sm", style: { color: "#adb5bd" } }, "(Editing)")))
6423
+ ), /* @__PURE__ */ React76.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React76.createElement(ScrollArea3, { style: { flex: 1 } }, renderActionForm()), /* @__PURE__ */ React76.createElement(Divider4, { color: "#333" }), /* @__PURE__ */ React76.createElement(Stack59, { gap: "xs" }, /* @__PURE__ */ React76.createElement(Text36, { size: "sm", fw: 500, style: { color: "#adb5bd" } }, "Current Actions (", actions.length, ")"), /* @__PURE__ */ React76.createElement(ScrollArea3, { h: 100 }, /* @__PURE__ */ React76.createElement(Stack59, { gap: "xs" }, actions.map((action, index) => {
6244
6424
  const config = getActionConfig(action.type);
6245
- return /* @__PURE__ */ React75.createElement(
6425
+ return /* @__PURE__ */ React76.createElement(
6246
6426
  Card12,
6247
6427
  {
6248
6428
  key: index,
@@ -6255,7 +6435,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
6255
6435
  opacity: index === editingIndex ? 0.7 : 1
6256
6436
  }
6257
6437
  },
6258
- /* @__PURE__ */ React75.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React75.createElement(
6438
+ /* @__PURE__ */ React76.createElement(Group19, { gap: "xs" }, /* @__PURE__ */ React76.createElement(
6259
6439
  Badge8,
6260
6440
  {
6261
6441
  size: "sm",
@@ -6265,9 +6445,9 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
6265
6445
  }
6266
6446
  },
6267
6447
  config?.label || action.type
6268
- ), /* @__PURE__ */ React75.createElement(Text36, { size: "sm", style: { color: "#adb5bd" } }, config?.getSummary(action.data) || "Action"), index === editingIndex && /* @__PURE__ */ React75.createElement(Badge8, { size: "xs", style: { backgroundColor: "#4dabf7", color: "#fff" } }, "Editing"))
6448
+ ), /* @__PURE__ */ React76.createElement(Text36, { size: "sm", style: { color: "#adb5bd" } }, config?.getSummary(action.data) || "Action"), index === editingIndex && /* @__PURE__ */ React76.createElement(Badge8, { size: "xs", style: { backgroundColor: "#4dabf7", color: "#fff" } }, "Editing"))
6269
6449
  );
6270
- })))), /* @__PURE__ */ React75.createElement(Group19, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React75.createElement(
6450
+ })))), /* @__PURE__ */ React76.createElement(Group19, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React76.createElement(
6271
6451
  Button11,
6272
6452
  {
6273
6453
  variant: "default",
@@ -6282,7 +6462,7 @@ var ActionsPanel = ({ actions, editingIndex, onSave, onCancel, isTemplateMode =
6282
6462
  }
6283
6463
  },
6284
6464
  "Cancel"
6285
- ), /* @__PURE__ */ React75.createElement(
6465
+ ), /* @__PURE__ */ React76.createElement(
6286
6466
  Button11,
6287
6467
  {
6288
6468
  onClick: handleSave,
@@ -6322,22 +6502,22 @@ var ActionsTab = ({ actions, onActionsChange, editor, block }) => {
6322
6502
  setIsEditorVisible(true);
6323
6503
  }
6324
6504
  }, [currentActions.length, isEditorVisible]);
6325
- const handleAddAction = useCallback11(() => {
6505
+ const handleAddAction = useCallback12(() => {
6326
6506
  setEditingIndex(null);
6327
6507
  setIsEditorVisible(true);
6328
6508
  }, []);
6329
- const handleEditAction = useCallback11((index) => {
6509
+ const handleEditAction = useCallback12((index) => {
6330
6510
  setEditingIndex(index);
6331
6511
  setIsEditorVisible(true);
6332
6512
  }, []);
6333
- const handleRemoveAction = useCallback11(
6513
+ const handleRemoveAction = useCallback12(
6334
6514
  (index) => {
6335
6515
  const newActions = currentActions.filter((_, i) => i !== index);
6336
6516
  onActionsChange(newActions);
6337
6517
  },
6338
6518
  [currentActions, onActionsChange]
6339
6519
  );
6340
- const handleSaveAction = useCallback11(
6520
+ const handleSaveAction = useCallback12(
6341
6521
  (action) => {
6342
6522
  let newActions;
6343
6523
  if (editingIndex !== null) {
@@ -6351,12 +6531,12 @@ var ActionsTab = ({ actions, onActionsChange, editor, block }) => {
6351
6531
  },
6352
6532
  [editingIndex, currentActions, onActionsChange]
6353
6533
  );
6354
- const handleCancelEditor = useCallback11(() => {
6534
+ const handleCancelEditor = useCallback12(() => {
6355
6535
  setIsEditorVisible(false);
6356
6536
  setEditingIndex(null);
6357
6537
  }, []);
6358
- return /* @__PURE__ */ React76.createElement(Stack60, { gap: "md" }, /* @__PURE__ */ React76.createElement(ActionsCard, { actions: currentActions, isSelected: false, onClick: () => {
6359
- }, onEditAction: handleEditAction, onRemoveAction: handleRemoveAction }), isEditorVisible && /* @__PURE__ */ React76.createElement(
6538
+ return /* @__PURE__ */ React77.createElement(Stack60, { gap: "md" }, /* @__PURE__ */ React77.createElement(ActionsCard, { actions: currentActions, isSelected: false, onClick: () => {
6539
+ }, onEditAction: handleEditAction, onRemoveAction: handleRemoveAction }), isEditorVisible && /* @__PURE__ */ React77.createElement(
6360
6540
  Card13,
6361
6541
  {
6362
6542
  withBorder: true,
@@ -6367,21 +6547,21 @@ var ActionsTab = ({ actions, onActionsChange, editor, block }) => {
6367
6547
  borderColor: "#333"
6368
6548
  }
6369
6549
  },
6370
- /* @__PURE__ */ React76.createElement(ActionsPanel, { actions: currentActions, editingIndex, onSave: handleSaveAction, onCancel: handleCancelEditor, isTemplateMode: true })
6550
+ /* @__PURE__ */ React77.createElement(ActionsPanel, { actions: currentActions, editingIndex, onSave: handleSaveAction, onCancel: handleCancelEditor, isTemplateMode: true })
6371
6551
  ));
6372
6552
  };
6373
6553
 
6374
6554
  // src/mantine/blocks/proposal/template/VoteTab.tsx
6375
- import React77 from "react";
6555
+ import React78 from "react";
6376
6556
  import { Stack as Stack61, TextInput as TextInput32 } from "@mantine/core";
6377
6557
  var VoteTab = ({ voteTitle, voteSubtitle, voteIcon, onVoteTitleChange, onVoteSubtitleChange, onVoteIconChange }) => {
6378
- return /* @__PURE__ */ React77.createElement(Stack61, { gap: "md" }, /* @__PURE__ */ React77.createElement(TextInput32, { label: "Vote Button Title", placeholder: "Vote on this proposal", value: voteTitle, onChange: (event) => onVoteTitleChange(event.currentTarget.value) }), /* @__PURE__ */ React77.createElement(TextInput32, { label: "Vote Button Subtitle", placeholder: "Cast your vote", value: voteSubtitle, onChange: (event) => onVoteSubtitleChange(event.currentTarget.value) }), /* @__PURE__ */ React77.createElement(TextInput32, { label: "Vote Icon", placeholder: "checklist", value: voteIcon, onChange: (event) => onVoteIconChange(event.currentTarget.value) }));
6558
+ return /* @__PURE__ */ React78.createElement(Stack61, { gap: "md" }, /* @__PURE__ */ React78.createElement(TextInput32, { label: "Vote Button Title", placeholder: "Vote on this proposal", value: voteTitle, onChange: (event) => onVoteTitleChange(event.currentTarget.value) }), /* @__PURE__ */ React78.createElement(TextInput32, { label: "Vote Button Subtitle", placeholder: "Cast your vote", value: voteSubtitle, onChange: (event) => onVoteSubtitleChange(event.currentTarget.value) }), /* @__PURE__ */ React78.createElement(TextInput32, { label: "Vote Icon", placeholder: "checklist", value: voteIcon, onChange: (event) => onVoteIconChange(event.currentTarget.value) }));
6379
6559
  };
6380
6560
 
6381
6561
  // src/mantine/blocks/proposal/template/TemplateConfig.tsx
6382
6562
  var TemplateConfig3 = ({ editor, block }) => {
6383
6563
  const { closePanel } = usePanelStore();
6384
- const updateProp = useCallback12(
6564
+ const updateProp = useCallback13(
6385
6565
  (key, value) => {
6386
6566
  editor.updateBlock(block, {
6387
6567
  props: {
@@ -6392,7 +6572,7 @@ var TemplateConfig3 = ({ editor, block }) => {
6392
6572
  },
6393
6573
  [editor, block]
6394
6574
  );
6395
- return /* @__PURE__ */ React78.createElement(
6575
+ return /* @__PURE__ */ React79.createElement(
6396
6576
  Paper6,
6397
6577
  {
6398
6578
  p: "md",
@@ -6403,7 +6583,7 @@ var TemplateConfig3 = ({ editor, block }) => {
6403
6583
  flexDirection: "column"
6404
6584
  }
6405
6585
  },
6406
- /* @__PURE__ */ React78.createElement(
6586
+ /* @__PURE__ */ React79.createElement(
6407
6587
  "div",
6408
6588
  {
6409
6589
  style: {
@@ -6413,17 +6593,17 @@ var TemplateConfig3 = ({ editor, block }) => {
6413
6593
  marginBottom: "1rem"
6414
6594
  }
6415
6595
  },
6416
- /* @__PURE__ */ React78.createElement(Title5, { order: 3 }, "Proposal Settings"),
6417
- /* @__PURE__ */ React78.createElement(CloseButton4, { onClick: closePanel })
6596
+ /* @__PURE__ */ React79.createElement(Title5, { order: 3 }, "Proposal Settings"),
6597
+ /* @__PURE__ */ React79.createElement(CloseButton4, { onClick: closePanel })
6418
6598
  ),
6419
- /* @__PURE__ */ React78.createElement(
6599
+ /* @__PURE__ */ React79.createElement(
6420
6600
  ReusablePanel,
6421
6601
  {
6422
6602
  extraTabs: [
6423
6603
  {
6424
6604
  label: "General",
6425
6605
  value: "general",
6426
- content: /* @__PURE__ */ React78.createElement(
6606
+ content: /* @__PURE__ */ React79.createElement(
6427
6607
  GeneralTab3,
6428
6608
  {
6429
6609
  title: block.props.title || "",
@@ -6438,12 +6618,12 @@ var TemplateConfig3 = ({ editor, block }) => {
6438
6618
  {
6439
6619
  label: "Actions",
6440
6620
  value: "actions",
6441
- content: /* @__PURE__ */ React78.createElement(ActionsTab, { actions: block.props.actions || "[]", onActionsChange: (actions) => updateProp("actions", JSON.stringify(actions)), editor, block })
6621
+ content: /* @__PURE__ */ React79.createElement(ActionsTab, { actions: block.props.actions || "[]", onActionsChange: (actions) => updateProp("actions", JSON.stringify(actions)), editor, block })
6442
6622
  },
6443
6623
  {
6444
6624
  label: "Vote",
6445
6625
  value: "vote",
6446
- content: /* @__PURE__ */ React78.createElement(
6626
+ content: /* @__PURE__ */ React79.createElement(
6447
6627
  VoteTab,
6448
6628
  {
6449
6629
  voteTitle: block.props.voteTitle || "",
@@ -6467,16 +6647,16 @@ import { Card as Card14, Group as Group20, Stack as Stack62, Text as Text37, Act
6467
6647
  var PROPOSAL_TEMPLATE_PANEL_ID = "proposal-template-panel";
6468
6648
  var ProposalTemplateView = ({ editor, block }) => {
6469
6649
  const panelId = `${PROPOSAL_TEMPLATE_PANEL_ID}-${block.id}`;
6470
- const panelContent = useMemo10(() => /* @__PURE__ */ React79.createElement(TemplateConfig3, { editor, block }), [editor, block]);
6650
+ const panelContent = useMemo11(() => /* @__PURE__ */ React80.createElement(TemplateConfig3, { editor, block }), [editor, block]);
6471
6651
  const { open } = usePanel(panelId, panelContent);
6472
- return /* @__PURE__ */ React79.createElement(Card14, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer" }, onClick: open }, /* @__PURE__ */ React79.createElement(Group20, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React79.createElement(Group20, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React79.createElement(ActionIcon8, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "file-text")), /* @__PURE__ */ React79.createElement(Stack62, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React79.createElement(Text37, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Title"), /* @__PURE__ */ React79.createElement(Text37, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Proposal description"))), /* @__PURE__ */ React79.createElement(Text37, { size: "xs", c: "dimmed", contentEditable: false }, block.props.status || "draft")));
6652
+ return /* @__PURE__ */ React80.createElement(Card14, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer" }, onClick: open }, /* @__PURE__ */ React80.createElement(Group20, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React80.createElement(Group20, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React80.createElement(ActionIcon8, { variant: "light", color: "blue", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "file-text")), /* @__PURE__ */ React80.createElement(Stack62, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React80.createElement(Text37, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Proposal Title"), /* @__PURE__ */ React80.createElement(Text37, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description || "Proposal description"))), /* @__PURE__ */ React80.createElement(Text37, { size: "xs", c: "dimmed", contentEditable: false }, block.props.status || "draft")));
6473
6653
  };
6474
6654
 
6475
6655
  // src/mantine/blocks/proposal/flow/FlowView.tsx
6476
- import React84, { useMemo as useMemo11 } from "react";
6656
+ import React85, { useMemo as useMemo12 } from "react";
6477
6657
 
6478
6658
  // src/mantine/blocks/proposal/components/OnChainProposalCard.tsx
6479
- import React80 from "react";
6659
+ import React81 from "react";
6480
6660
  import { Card as Card15, Group as Group21, Stack as Stack63, Text as Text38, Skeleton, Badge as Badge9, Button as Button13, ActionIcon as ActionIcon9 } from "@mantine/core";
6481
6661
  var statusColor = {
6482
6662
  open: "#4dabf7",
@@ -6506,7 +6686,7 @@ var OnChainProposalCard = ({
6506
6686
  onVote,
6507
6687
  voteEnabled = false
6508
6688
  }) => {
6509
- return /* @__PURE__ */ React80.createElement(
6689
+ return /* @__PURE__ */ React81.createElement(
6510
6690
  Card15,
6511
6691
  {
6512
6692
  shadow: "sm",
@@ -6519,9 +6699,9 @@ var OnChainProposalCard = ({
6519
6699
  },
6520
6700
  onClick
6521
6701
  },
6522
- isFetching && /* @__PURE__ */ React80.createElement(Stack63, null, /* @__PURE__ */ React80.createElement(Skeleton, { height: 20, width: "70%" }), /* @__PURE__ */ React80.createElement(Skeleton, { height: 16 }), /* @__PURE__ */ React80.createElement(Skeleton, { height: 16, width: "40%" })),
6523
- error && /* @__PURE__ */ React80.createElement(Text38, { size: "sm", c: "red" }, typeof error === "string" ? error : error.message || "An error occurred while loading the proposal."),
6524
- !isFetching && /* @__PURE__ */ React80.createElement(Group21, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React80.createElement(Group21, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React80.createElement(ActionIcon9, { variant: "light", color: "blue", size: "xl", radius: "xl", style: { flexShrink: 0 } }, getIcon(icon, 24, 1.5, "file-text")), /* @__PURE__ */ React80.createElement(Stack63, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React80.createElement(Group21, { gap: "xs" }, /* @__PURE__ */ React80.createElement(Text38, { size: "md", fw: 600 }, title || "Proposal"), /* @__PURE__ */ React80.createElement(Badge9, { color: statusColor[status], variant: "filled", size: "sm", radius: "sm" }, status.replace(/_/g, " ").toUpperCase())), /* @__PURE__ */ React80.createElement(Text38, { size: "sm", c: "dimmed" }, getDisplayDescription(description)))), /* @__PURE__ */ React80.createElement(Group21, { gap: "xs" }, voteEnabled && onVote && status === "open" && /* @__PURE__ */ React80.createElement(
6702
+ isFetching && /* @__PURE__ */ React81.createElement(Stack63, null, /* @__PURE__ */ React81.createElement(Skeleton, { height: 20, width: "70%" }), /* @__PURE__ */ React81.createElement(Skeleton, { height: 16 }), /* @__PURE__ */ React81.createElement(Skeleton, { height: 16, width: "40%" })),
6703
+ error && /* @__PURE__ */ React81.createElement(Text38, { size: "sm", c: "red" }, typeof error === "string" ? error : error.message || "An error occurred while loading the proposal."),
6704
+ !isFetching && /* @__PURE__ */ React81.createElement(Group21, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React81.createElement(Group21, { align: "flex-start", gap: "md", style: { flex: 1 } }, /* @__PURE__ */ React81.createElement(ActionIcon9, { variant: "light", color: "blue", size: "xl", radius: "xl", style: { flexShrink: 0 } }, getIcon(icon, 24, 1.5, "file-text")), /* @__PURE__ */ React81.createElement(Stack63, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React81.createElement(Group21, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Text38, { size: "md", fw: 600 }, title || "Proposal"), /* @__PURE__ */ React81.createElement(Badge9, { color: statusColor[status], variant: "filled", size: "sm", radius: "sm" }, status.replace(/_/g, " ").toUpperCase())), /* @__PURE__ */ React81.createElement(Text38, { size: "sm", c: "dimmed" }, getDisplayDescription(description)))), /* @__PURE__ */ React81.createElement(Group21, { gap: "xs" }, voteEnabled && onVote && status === "open" && /* @__PURE__ */ React81.createElement(
6525
6705
  Button13,
6526
6706
  {
6527
6707
  size: "sm",
@@ -6534,7 +6714,7 @@ var OnChainProposalCard = ({
6534
6714
  style: { flexShrink: 0 }
6535
6715
  },
6536
6716
  "Vote"
6537
- ), status === "passed" && onExecute && /* @__PURE__ */ React80.createElement(
6717
+ ), status === "passed" && onExecute && /* @__PURE__ */ React81.createElement(
6538
6718
  Button13,
6539
6719
  {
6540
6720
  size: "sm",
@@ -6553,8 +6733,8 @@ var OnChainProposalCard = ({
6553
6733
  };
6554
6734
 
6555
6735
  // src/mantine/blocks/proposal/flow/FlowConfig.tsx
6556
- import React83, { useCallback as useCallback14, useState as useState21 } from "react";
6557
- import { Paper as Paper7, CloseButton as CloseButton5, Title as Title6, Stack as Stack66, TextInput as TextInput33, Textarea as Textarea18, Button as Button16, Text as Text41, Card as Card18 } from "@mantine/core";
6736
+ import React84, { useCallback as useCallback15, useState as useState21, useEffect as useEffect15 } from "react";
6737
+ import { Paper as Paper7, CloseButton as CloseButton5, Title as Title6, Stack as Stack66, TextInput as TextInput33, Textarea as Textarea18, Button as Button16, Text as Text41, Card as Card18, Select as Select10, Loader as Loader4, SegmentedControl as SegmentedControl5 } from "@mantine/core";
6558
6738
 
6559
6739
  // src/mantine/blocks/proposal/flow/useFlowBusinessLogic.ts
6560
6740
  import { useEffect as useEffect12, useState as useState17 } from "react";
@@ -6794,7 +6974,7 @@ var useVoteBusinessLogic = ({ block, editor }) => {
6794
6974
  };
6795
6975
 
6796
6976
  // src/mantine/blocks/proposal/flow/VoteGeneralTab.tsx
6797
- import React81, { useState as useState19 } from "react";
6977
+ import React82, { useState as useState19 } from "react";
6798
6978
  import { Stack as Stack64, Text as Text39, Group as Group22, Card as Card16, Button as Button14, Progress as Progress2, Box as Box16, Textarea as Textarea17, Tooltip as Tooltip3 } from "@mantine/core";
6799
6979
  var getVoteIcon = (voteType) => {
6800
6980
  switch (voteType) {
@@ -6837,7 +7017,7 @@ var FlowGeneralTab = ({
6837
7017
  setRationale("");
6838
7018
  }
6839
7019
  };
6840
- return /* @__PURE__ */ React81.createElement(Stack64, { gap: "lg" }, !hasSubmittedProposal && /* @__PURE__ */ React81.createElement(
7020
+ return /* @__PURE__ */ React82.createElement(Stack64, { gap: "lg" }, !hasSubmittedProposal && /* @__PURE__ */ React82.createElement(
6841
7021
  Card16,
6842
7022
  {
6843
7023
  padding: "md",
@@ -6848,7 +7028,7 @@ var FlowGeneralTab = ({
6848
7028
  color: "#f1f3f5"
6849
7029
  }
6850
7030
  },
6851
- /* @__PURE__ */ React81.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React81.createElement(
7031
+ /* @__PURE__ */ React82.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React82.createElement(
6852
7032
  Box16,
6853
7033
  {
6854
7034
  style: {
@@ -6858,9 +7038,9 @@ var FlowGeneralTab = ({
6858
7038
  borderRadius: "50%"
6859
7039
  }
6860
7040
  }
6861
- ), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "Waiting for Proposal Submission")),
6862
- /* @__PURE__ */ React81.createElement(Text39, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "The connected proposal needs to be submitted before voting can begin.")
6863
- ), /* @__PURE__ */ React81.createElement(
7041
+ ), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, "Waiting for Proposal Submission")),
7042
+ /* @__PURE__ */ React82.createElement(Text39, { size: "xs", style: { color: "#adb5bd", marginTop: 4 } }, "The connected proposal needs to be submitted before voting can begin.")
7043
+ ), /* @__PURE__ */ React82.createElement(
6864
7044
  Card16,
6865
7045
  {
6866
7046
  padding: "lg",
@@ -6872,7 +7052,7 @@ var FlowGeneralTab = ({
6872
7052
  opacity: !hasSubmittedProposal ? 0.6 : 1
6873
7053
  }
6874
7054
  },
6875
- /* @__PURE__ */ React81.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React81.createElement(
7055
+ /* @__PURE__ */ React82.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React82.createElement(
6876
7056
  Box16,
6877
7057
  {
6878
7058
  w: 8,
@@ -6882,7 +7062,7 @@ var FlowGeneralTab = ({
6882
7062
  borderRadius: "50%"
6883
7063
  }
6884
7064
  }
6885
- ), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Status")), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? proposalStatus === "open" ? "Active" : proposalStatus || "Active" : "Waiting")), /* @__PURE__ */ React81.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Proposal ID")), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React81.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Title")), /* @__PURE__ */ React81.createElement(
7065
+ ), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Status")), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? proposalStatus === "open" ? "Active" : proposalStatus || "Active" : "Waiting")), /* @__PURE__ */ React82.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Proposal ID")), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? `#${proposalId}` : "TBD")), /* @__PURE__ */ React82.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Title")), /* @__PURE__ */ React82.createElement(
6886
7066
  Text39,
6887
7067
  {
6888
7068
  size: "sm",
@@ -6892,8 +7072,8 @@ var FlowGeneralTab = ({
6892
7072
  }
6893
7073
  },
6894
7074
  hasSubmittedProposal ? proposalTitle || "Untitled" : "N/A"
6895
- )), /* @__PURE__ */ React81.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Description")), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" }, title: proposalDescription }, hasSubmittedProposal ? proposalDescription ? proposalDescription.length > 30 ? proposalDescription.substring(0, 30) + "..." : proposalDescription : "No description" : "N/A")), /* @__PURE__ */ React81.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
6896
- /* @__PURE__ */ React81.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React81.createElement(
7075
+ )), /* @__PURE__ */ React82.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Description")), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" }, title: proposalDescription }, hasSubmittedProposal ? proposalDescription ? proposalDescription.length > 30 ? proposalDescription.substring(0, 30) + "..." : proposalDescription : "No description" : "N/A")), /* @__PURE__ */ React82.createElement(Group22, { justify: "space-between" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Box16, { w: 8, h: 8, style: { backgroundColor: "#adb5bd", borderRadius: "50%" } }), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "My Vote")), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#f1f3f5" } }, hasSubmittedProposal ? userVote?.vote ? userVote.vote.vote : "Pending" : "N/A"))),
7076
+ /* @__PURE__ */ React82.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, hasSubmittedProposal ? "Voting is open" : "Voting pending"), /* @__PURE__ */ React82.createElement(
6897
7077
  Progress2,
6898
7078
  {
6899
7079
  value: hasSubmittedProposal ? 75 : 0,
@@ -6906,7 +7086,7 @@ var FlowGeneralTab = ({
6906
7086
  }
6907
7087
  }
6908
7088
  ))
6909
- ), hasSubmittedProposal && !hasVoted && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React81.createElement(Stack64, { gap: "lg" }, disabled && isDisabled?.message && /* @__PURE__ */ React81.createElement(
7089
+ ), hasSubmittedProposal && !hasVoted && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React82.createElement(Stack64, { gap: "lg" }, disabled && isDisabled?.message && /* @__PURE__ */ React82.createElement(
6910
7090
  Card16,
6911
7091
  {
6912
7092
  padding: "md",
@@ -6917,7 +7097,7 @@ var FlowGeneralTab = ({
6917
7097
  color: "#f1f3f5"
6918
7098
  }
6919
7099
  },
6920
- /* @__PURE__ */ React81.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React81.createElement(
7100
+ /* @__PURE__ */ React82.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React82.createElement(
6921
7101
  Box16,
6922
7102
  {
6923
7103
  style: {
@@ -6927,8 +7107,8 @@ var FlowGeneralTab = ({
6927
7107
  borderRadius: "50%"
6928
7108
  }
6929
7109
  }
6930
- ), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, isDisabled.message))
6931
- ), /* @__PURE__ */ React81.createElement(Stack64, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React81.createElement(Tooltip3, { key: voteType, label: disabled ? isDisabled?.message : void 0, disabled: !disabled, position: "top" }, /* @__PURE__ */ React81.createElement(
7110
+ ), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#ffd43b" } }, isDisabled.message))
7111
+ ), /* @__PURE__ */ React82.createElement(Stack64, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React82.createElement(Tooltip3, { key: voteType, label: disabled ? isDisabled?.message : void 0, disabled: !disabled, position: "top" }, /* @__PURE__ */ React82.createElement(
6932
7112
  Button14,
6933
7113
  {
6934
7114
  variant: "outline",
@@ -6947,8 +7127,8 @@ var FlowGeneralTab = ({
6947
7127
  opacity: disabled ? 0.5 : 1
6948
7128
  }
6949
7129
  },
6950
- /* @__PURE__ */ React81.createElement(Text39, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
6951
- )))), /* @__PURE__ */ React81.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Rationale (optional)"), /* @__PURE__ */ React81.createElement(
7130
+ /* @__PURE__ */ React82.createElement(Text39, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
7131
+ )))), /* @__PURE__ */ React82.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "Rationale (optional)"), /* @__PURE__ */ React82.createElement(
6952
7132
  Textarea17,
6953
7133
  {
6954
7134
  value: rationale,
@@ -6965,7 +7145,7 @@ var FlowGeneralTab = ({
6965
7145
  }
6966
7146
  }
6967
7147
  }
6968
- ))), (status === "executed" || proposalStatus === "executed") && /* @__PURE__ */ React81.createElement(
7148
+ ))), (status === "executed" || proposalStatus === "executed") && /* @__PURE__ */ React82.createElement(
6969
7149
  Card16,
6970
7150
  {
6971
7151
  padding: "md",
@@ -6975,8 +7155,8 @@ var FlowGeneralTab = ({
6975
7155
  border: "1px solid #333"
6976
7156
  }
6977
7157
  },
6978
- /* @__PURE__ */ React81.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Text39, { fw: 500, size: "sm", style: { color: "#f1f3f5" } }, "Proposal Executed"), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "This proposal has been successfully executed."))
6979
- ), !hasSubmittedProposal && /* @__PURE__ */ React81.createElement(Stack64, { gap: "lg" }, /* @__PURE__ */ React81.createElement(Stack64, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React81.createElement(Tooltip3, { key: voteType, label: "Proposal must be submitted before voting", position: "top" }, /* @__PURE__ */ React81.createElement(
7158
+ /* @__PURE__ */ React82.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Text39, { fw: 500, size: "sm", style: { color: "#f1f3f5" } }, "Proposal Executed"), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", style: { color: "#adb5bd" } }, "This proposal has been successfully executed."))
7159
+ ), !hasSubmittedProposal && /* @__PURE__ */ React82.createElement(Stack64, { gap: "lg" }, /* @__PURE__ */ React82.createElement(Stack64, { gap: "md" }, ["yes", "no", "no_with_veto", "abstain"].map((voteType) => /* @__PURE__ */ React82.createElement(Tooltip3, { key: voteType, label: "Proposal must be submitted before voting", position: "top" }, /* @__PURE__ */ React82.createElement(
6980
7160
  Button14,
6981
7161
  {
6982
7162
  variant: "outline",
@@ -6993,8 +7173,8 @@ var FlowGeneralTab = ({
6993
7173
  opacity: 0.5
6994
7174
  }
6995
7175
  },
6996
- /* @__PURE__ */ React81.createElement(Text39, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
6997
- ))))), hasSubmittedProposal && !hasVoted && selectedVote && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React81.createElement(Tooltip3, { label: disabled ? isDisabled?.message : "Sign to vote", position: "top" }, /* @__PURE__ */ React81.createElement("div", null, /* @__PURE__ */ React81.createElement(
7176
+ /* @__PURE__ */ React82.createElement(Text39, { fw: 500, tt: "capitalize", style: { textAlign: "left" } }, voteType === "no_with_veto" ? "No with Veto" : voteType)
7177
+ ))))), hasSubmittedProposal && !hasVoted && selectedVote && (status === "open" || proposalStatus === "open") && /* @__PURE__ */ React82.createElement(Tooltip3, { label: disabled ? isDisabled?.message : "Sign to vote", position: "top" }, /* @__PURE__ */ React82.createElement("div", null, /* @__PURE__ */ React82.createElement(
6998
7178
  Button14,
6999
7179
  {
7000
7180
  size: "sm",
@@ -7010,7 +7190,7 @@ var FlowGeneralTab = ({
7010
7190
  }
7011
7191
  },
7012
7192
  "Sign"
7013
- ))), hasVoted && hasSubmittedProposal && /* @__PURE__ */ React81.createElement(
7193
+ ))), hasVoted && hasSubmittedProposal && /* @__PURE__ */ React82.createElement(
7014
7194
  Card16,
7015
7195
  {
7016
7196
  padding: "md",
@@ -7021,7 +7201,7 @@ var FlowGeneralTab = ({
7021
7201
  color: "#f1f3f5"
7022
7202
  }
7023
7203
  },
7024
- /* @__PURE__ */ React81.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React81.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React81.createElement(
7204
+ /* @__PURE__ */ React82.createElement(Stack64, { gap: "xs" }, /* @__PURE__ */ React82.createElement(Group22, { gap: "xs", align: "center" }, /* @__PURE__ */ React82.createElement(
7025
7205
  Box16,
7026
7206
  {
7027
7207
  style: {
@@ -7031,12 +7211,12 @@ var FlowGeneralTab = ({
7031
7211
  borderRadius: "50%"
7032
7212
  }
7033
7213
  }
7034
- ), /* @__PURE__ */ React81.createElement(Text39, { size: "sm", fw: 500, style: { color: "#51cf66" } }, "Vote Submitted")), /* @__PURE__ */ React81.createElement(Text39, { size: "xs", style: { color: "#adb5bd" } }, "You have already voted on this proposal. Your vote:", " ", /* @__PURE__ */ React81.createElement(Text39, { span: true, fw: 500, tt: "capitalize" }, userVote?.vote?.vote)))
7214
+ ), /* @__PURE__ */ React82.createElement(Text39, { size: "sm", fw: 500, style: { color: "#51cf66" } }, "Vote Submitted")), /* @__PURE__ */ React82.createElement(Text39, { size: "xs", style: { color: "#adb5bd" } }, "You have already voted on this proposal. Your vote:", " ", /* @__PURE__ */ React82.createElement(Text39, { span: true, fw: 500, tt: "capitalize" }, userVote?.vote?.vote)))
7035
7215
  ));
7036
7216
  };
7037
7217
 
7038
7218
  // src/mantine/blocks/proposal/flow/ActionsTab.tsx
7039
- import React82, { useCallback as useCallback13, useEffect as useEffect14, useState as useState20 } from "react";
7219
+ import React83, { useCallback as useCallback14, useEffect as useEffect14, useState as useState20 } from "react";
7040
7220
  import { Alert as Alert8, Button as Button15, Card as Card17, Stack as Stack65, Text as Text40 } from "@mantine/core";
7041
7221
  var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated }) => {
7042
7222
  const [isEditorVisible, setIsEditorVisible] = useState20(false);
@@ -7057,12 +7237,12 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
7057
7237
  setIsEditorVisible(true);
7058
7238
  }
7059
7239
  }, [currentActions.length, isEditorVisible, isProposalCreated]);
7060
- const handleAddAction = useCallback13(() => {
7240
+ const handleAddAction = useCallback14(() => {
7061
7241
  if (isProposalCreated) return;
7062
7242
  setEditingIndex(null);
7063
7243
  setIsEditorVisible(true);
7064
7244
  }, [isProposalCreated]);
7065
- const handleEditAction = useCallback13(
7245
+ const handleEditAction = useCallback14(
7066
7246
  (index) => {
7067
7247
  if (isProposalCreated) return;
7068
7248
  setEditingIndex(index);
@@ -7070,7 +7250,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
7070
7250
  },
7071
7251
  [isProposalCreated]
7072
7252
  );
7073
- const handleRemoveAction = useCallback13(
7253
+ const handleRemoveAction = useCallback14(
7074
7254
  (index) => {
7075
7255
  if (isProposalCreated) return;
7076
7256
  const newActions = currentActions.filter((_, i) => i !== index);
@@ -7078,7 +7258,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
7078
7258
  },
7079
7259
  [currentActions, onActionsChange, isProposalCreated]
7080
7260
  );
7081
- const handleSaveAction = useCallback13(
7261
+ const handleSaveAction = useCallback14(
7082
7262
  (action) => {
7083
7263
  let newActions;
7084
7264
  if (editingIndex !== null) {
@@ -7092,11 +7272,11 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
7092
7272
  },
7093
7273
  [editingIndex, currentActions, onActionsChange]
7094
7274
  );
7095
- const handleCancelEditor = useCallback13(() => {
7275
+ const handleCancelEditor = useCallback14(() => {
7096
7276
  setIsEditorVisible(false);
7097
7277
  setEditingIndex(null);
7098
7278
  }, []);
7099
- return /* @__PURE__ */ React82.createElement(Stack65, { gap: "md" }, isProposalCreated && /* @__PURE__ */ React82.createElement(Alert8, { color: "yellow", title: "Actions Locked" }, /* @__PURE__ */ React82.createElement(Text40, { size: "sm" }, "Actions cannot be edited after the proposal has been created. These actions are now part of the on-chain proposal.")), /* @__PURE__ */ React82.createElement(Stack65, { gap: "sm" }, !isProposalCreated && /* @__PURE__ */ React82.createElement(
7279
+ return /* @__PURE__ */ React83.createElement(Stack65, { gap: "md" }, isProposalCreated && /* @__PURE__ */ React83.createElement(Alert8, { color: "yellow", title: "Actions Locked" }, /* @__PURE__ */ React83.createElement(Text40, { size: "sm" }, "Actions cannot be edited after the proposal has been created. These actions are now part of the on-chain proposal.")), /* @__PURE__ */ React83.createElement(Stack65, { gap: "sm" }, !isProposalCreated && /* @__PURE__ */ React83.createElement(
7100
7280
  Button15,
7101
7281
  {
7102
7282
  onClick: handleAddAction,
@@ -7108,7 +7288,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
7108
7288
  }
7109
7289
  },
7110
7290
  "Add Action"
7111
- ), /* @__PURE__ */ React82.createElement(
7291
+ ), /* @__PURE__ */ React83.createElement(
7112
7292
  ActionsCard,
7113
7293
  {
7114
7294
  actions: currentActions,
@@ -7119,7 +7299,7 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
7119
7299
  onRemoveAction: handleRemoveAction,
7120
7300
  disabled: isProposalCreated
7121
7301
  }
7122
- )), !isProposalCreated && isEditorVisible && /* @__PURE__ */ React82.createElement(
7302
+ )), !isProposalCreated && isEditorVisible && /* @__PURE__ */ React83.createElement(
7123
7303
  Card17,
7124
7304
  {
7125
7305
  withBorder: true,
@@ -7130,23 +7310,28 @@ var ActionsTab2 = ({ actions, onActionsChange, editor, block, isProposalCreated
7130
7310
  borderColor: "#333"
7131
7311
  }
7132
7312
  },
7133
- /* @__PURE__ */ React82.createElement(ActionsPanel, { actions: currentActions, editingIndex, onSave: handleSaveAction, onCancel: handleCancelEditor, isTemplateMode: false })
7313
+ /* @__PURE__ */ React83.createElement(ActionsPanel, { actions: currentActions, editingIndex, onSave: handleSaveAction, onCancel: handleCancelEditor, isTemplateMode: false })
7134
7314
  ));
7135
7315
  };
7136
7316
 
7137
7317
  // src/mantine/blocks/proposal/flow/FlowConfig.tsx
7138
7318
  var FlowConfig = ({ editor, block }) => {
7139
7319
  const { closePanel } = usePanelStore();
7320
+ const handlers = useBlocknoteHandlers();
7140
7321
  const coreAddress = block.props.coreAddress || "";
7141
7322
  const [errors, setErrors] = useState21({});
7142
7323
  const [isCreating, setIsCreating] = useState21(false);
7324
+ const [groups, setGroups] = useState21([]);
7325
+ const [loadingGroups, setLoadingGroups] = useState21(false);
7326
+ const [inputMode, setInputMode] = useState21("select");
7327
+ const [manualAddress, setManualAddress] = useState21("");
7143
7328
  const { createProposal, title, description, proposalId } = useFlowBusinessLogic({
7144
7329
  block,
7145
7330
  editor
7146
7331
  });
7147
7332
  const isProposalCreated = !!proposalId;
7148
7333
  const voteLogic = useVoteBusinessLogic({ block, editor });
7149
- const updateProp = useCallback14(
7334
+ const updateProp = useCallback15(
7150
7335
  (key, value) => {
7151
7336
  editor.updateBlock(block, {
7152
7337
  props: {
@@ -7157,6 +7342,35 @@ var FlowConfig = ({ editor, block }) => {
7157
7342
  },
7158
7343
  [editor, block]
7159
7344
  );
7345
+ useEffect15(() => {
7346
+ if (coreAddress) {
7347
+ const matchesGroup = groups.some((g) => g.coreAddress === coreAddress);
7348
+ if (matchesGroup) {
7349
+ setInputMode("select");
7350
+ } else {
7351
+ setInputMode("manual");
7352
+ setManualAddress(coreAddress);
7353
+ }
7354
+ }
7355
+ }, [coreAddress, groups]);
7356
+ useEffect15(() => {
7357
+ const fetchGroups = async () => {
7358
+ if (!handlers?.getDAOGroups) {
7359
+ console.warn("getDAOGroups handler not available");
7360
+ return;
7361
+ }
7362
+ setLoadingGroups(true);
7363
+ try {
7364
+ const daoGroups = await handlers.getDAOGroups();
7365
+ setGroups(daoGroups);
7366
+ } catch (error) {
7367
+ console.error("Failed to fetch DAO groups:", error);
7368
+ } finally {
7369
+ setLoadingGroups(false);
7370
+ }
7371
+ };
7372
+ fetchGroups();
7373
+ }, [handlers]);
7160
7374
  const validateForm = () => {
7161
7375
  const newErrors = {};
7162
7376
  if (!title.trim()) {
@@ -7183,7 +7397,52 @@ var FlowConfig = ({ editor, block }) => {
7183
7397
  setIsCreating(false);
7184
7398
  }
7185
7399
  };
7186
- const createProposalTab = /* @__PURE__ */ React83.createElement(Stack66, { gap: "lg" }, coreAddress && /* @__PURE__ */ React83.createElement(Card18, { padding: "sm", radius: "md", withBorder: true }, /* @__PURE__ */ React83.createElement(Text41, { size: "xs", c: "dimmed" }, "Core Address:", " ", /* @__PURE__ */ React83.createElement(Text41, { span: true, ff: "monospace", c: "bright" }, coreAddress.slice(0, 20), "...", coreAddress.slice(-10)))), /* @__PURE__ */ React83.createElement(
7400
+ const createProposalTab = /* @__PURE__ */ React84.createElement(Stack66, { gap: "lg" }, /* @__PURE__ */ React84.createElement(Stack66, { gap: "xs" }, /* @__PURE__ */ React84.createElement(Text41, { size: "sm", fw: 600 }, "DAO Group"), /* @__PURE__ */ React84.createElement(
7401
+ SegmentedControl5,
7402
+ {
7403
+ value: inputMode,
7404
+ onChange: (value) => setInputMode(value),
7405
+ data: [
7406
+ { label: "Select DAO", value: "select" },
7407
+ { label: "Manual Entry", value: "manual" }
7408
+ ],
7409
+ fullWidth: true,
7410
+ disabled: isProposalCreated
7411
+ }
7412
+ ), inputMode === "select" ? /* @__PURE__ */ React84.createElement(
7413
+ Select10,
7414
+ {
7415
+ placeholder: loadingGroups ? "Loading groups..." : "Select a DAO group",
7416
+ value: groups.find((g) => g.coreAddress === coreAddress)?.id || null,
7417
+ onChange: (value) => {
7418
+ if (value) {
7419
+ const selectedGroup = groups.find((g) => g.id === value);
7420
+ if (selectedGroup) {
7421
+ updateProp("coreAddress", selectedGroup.coreAddress);
7422
+ }
7423
+ }
7424
+ },
7425
+ data: groups.map((group) => ({
7426
+ value: group.id,
7427
+ label: group.name
7428
+ })),
7429
+ disabled: loadingGroups || isProposalCreated,
7430
+ rightSection: loadingGroups ? /* @__PURE__ */ React84.createElement(Loader4, { size: "xs" }) : void 0,
7431
+ searchable: true
7432
+ }
7433
+ ) : /* @__PURE__ */ React84.createElement(
7434
+ TextInput33,
7435
+ {
7436
+ placeholder: "Enter DAO core address",
7437
+ value: manualAddress,
7438
+ onChange: (event) => {
7439
+ const newAddress = event.currentTarget.value;
7440
+ setManualAddress(newAddress);
7441
+ updateProp("coreAddress", newAddress);
7442
+ },
7443
+ disabled: isProposalCreated
7444
+ }
7445
+ ), coreAddress && /* @__PURE__ */ React84.createElement(Card18, { padding: "sm", radius: "md", withBorder: true }, /* @__PURE__ */ React84.createElement(Text41, { size: "xs", c: "dimmed" }, "Core Address:", " ", /* @__PURE__ */ React84.createElement(Text41, { span: true, ff: "monospace", c: "bright" }, coreAddress.slice(0, 20), "...", coreAddress.slice(-10))))), /* @__PURE__ */ React84.createElement(
7187
7446
  TextInput33,
7188
7447
  {
7189
7448
  label: "Title",
@@ -7194,7 +7453,7 @@ var FlowConfig = ({ editor, block }) => {
7194
7453
  required: true,
7195
7454
  disabled: isProposalCreated
7196
7455
  }
7197
- ), /* @__PURE__ */ React83.createElement(
7456
+ ), /* @__PURE__ */ React84.createElement(
7198
7457
  Textarea18,
7199
7458
  {
7200
7459
  label: "Description",
@@ -7206,8 +7465,8 @@ var FlowConfig = ({ editor, block }) => {
7206
7465
  required: true,
7207
7466
  disabled: isProposalCreated
7208
7467
  }
7209
- ), errors.general && /* @__PURE__ */ React83.createElement(Text41, { size: "sm", c: "red" }, errors.general), isProposalCreated && /* @__PURE__ */ React83.createElement(Card18, { padding: "md", radius: "md", withBorder: true, style: { borderColor: "var(--mantine-color-green-6)" } }, /* @__PURE__ */ React83.createElement(Text41, { fw: 500, size: "sm", c: "green" }, "Proposal Created Successfully"), /* @__PURE__ */ React83.createElement(Text41, { size: "sm", c: "dimmed" }, "Your proposal has been created and is now open for voting.")), /* @__PURE__ */ React83.createElement(Button16, { fullWidth: true, onClick: handleCreateProposal, disabled: isProposalCreated, loading: isCreating }, isProposalCreated ? "Proposal Created" : "Create Proposal"));
7210
- const handleActionsChange = useCallback14(
7468
+ ), errors.general && /* @__PURE__ */ React84.createElement(Text41, { size: "sm", c: "red" }, errors.general), isProposalCreated && /* @__PURE__ */ React84.createElement(Card18, { padding: "md", radius: "md", withBorder: true, style: { borderColor: "var(--mantine-color-green-6)" } }, /* @__PURE__ */ React84.createElement(Text41, { fw: 500, size: "sm", c: "green" }, "Proposal Created Successfully"), /* @__PURE__ */ React84.createElement(Text41, { size: "sm", c: "dimmed" }, "Your proposal has been created and is now open for voting.")), /* @__PURE__ */ React84.createElement(Button16, { fullWidth: true, onClick: handleCreateProposal, disabled: isProposalCreated, loading: isCreating }, isProposalCreated ? "Proposal Created" : "Create Proposal"));
7469
+ const handleActionsChange = useCallback15(
7211
7470
  (newActions) => {
7212
7471
  updateProp("actions", JSON.stringify(newActions));
7213
7472
  },
@@ -7222,12 +7481,12 @@ var FlowConfig = ({ editor, block }) => {
7222
7481
  {
7223
7482
  label: "Actions",
7224
7483
  value: "actions",
7225
- content: /* @__PURE__ */ React83.createElement(ActionsTab2, { actions: block.props.actions || "[]", onActionsChange: handleActionsChange, editor, block, isProposalCreated })
7484
+ content: /* @__PURE__ */ React84.createElement(ActionsTab2, { actions: block.props.actions || "[]", onActionsChange: handleActionsChange, editor, block, isProposalCreated })
7226
7485
  },
7227
7486
  {
7228
7487
  label: "Vote",
7229
7488
  value: "vote",
7230
- content: /* @__PURE__ */ React83.createElement(
7489
+ content: /* @__PURE__ */ React84.createElement(
7231
7490
  FlowGeneralTab,
7232
7491
  {
7233
7492
  proposalId: voteLogic.proposalId,
@@ -7243,7 +7502,7 @@ var FlowConfig = ({ editor, block }) => {
7243
7502
  )
7244
7503
  }
7245
7504
  ];
7246
- return /* @__PURE__ */ React83.createElement(
7505
+ return /* @__PURE__ */ React84.createElement(
7247
7506
  Paper7,
7248
7507
  {
7249
7508
  p: "md",
@@ -7254,7 +7513,7 @@ var FlowConfig = ({ editor, block }) => {
7254
7513
  flexDirection: "column"
7255
7514
  }
7256
7515
  },
7257
- /* @__PURE__ */ React83.createElement(
7516
+ /* @__PURE__ */ React84.createElement(
7258
7517
  "div",
7259
7518
  {
7260
7519
  style: {
@@ -7264,10 +7523,10 @@ var FlowConfig = ({ editor, block }) => {
7264
7523
  marginBottom: "1rem"
7265
7524
  }
7266
7525
  },
7267
- /* @__PURE__ */ React83.createElement(Title6, { order: 3 }, "Proposal Settings"),
7268
- /* @__PURE__ */ React83.createElement(CloseButton5, { onClick: closePanel })
7526
+ /* @__PURE__ */ React84.createElement(Title6, { order: 3 }, "Proposal Settings"),
7527
+ /* @__PURE__ */ React84.createElement(CloseButton5, { onClick: closePanel })
7269
7528
  ),
7270
- /* @__PURE__ */ React83.createElement(ReusablePanel, { extraTabs, context: { editor, block } })
7529
+ /* @__PURE__ */ React84.createElement(ReusablePanel, { extraTabs, context: { editor, block } })
7271
7530
  );
7272
7531
  };
7273
7532
 
@@ -7279,13 +7538,13 @@ var ProposalFlowView = ({ block, editor }) => {
7279
7538
  block,
7280
7539
  editor
7281
7540
  });
7282
- const panelContent = useMemo11(() => /* @__PURE__ */ React84.createElement(FlowConfig, { editor, block }), [editor, block]);
7541
+ const panelContent = useMemo12(() => /* @__PURE__ */ React85.createElement(FlowConfig, { editor, block }), [editor, block]);
7283
7542
  const { open } = usePanel(panelId, panelContent);
7284
7543
  const handleVote = () => {
7285
7544
  open();
7286
7545
  };
7287
7546
  const showVoteButton = (block.props.voteEnabled || false) && proposalId;
7288
- return /* @__PURE__ */ React84.createElement(
7547
+ return /* @__PURE__ */ React85.createElement(
7289
7548
  OnChainProposalCard,
7290
7549
  {
7291
7550
  title,
@@ -7312,10 +7571,10 @@ function ProposalBlock({ editor, block }) {
7312
7571
  console.log("[ProposalBlock] Rendering with docType:", docType);
7313
7572
  if (docType === "template") {
7314
7573
  console.log("[ProposalBlock] Rendering ProposalTemplateView (docType is template)");
7315
- return /* @__PURE__ */ React85.createElement(ProposalTemplateView, { editor, block });
7574
+ return /* @__PURE__ */ React86.createElement(ProposalTemplateView, { editor, block });
7316
7575
  }
7317
7576
  console.log("[ProposalBlock] Rendering ProposalFlowView (docType is flow)");
7318
- return /* @__PURE__ */ React85.createElement(ProposalFlowView, { block, editor });
7577
+ return /* @__PURE__ */ React86.createElement(ProposalFlowView, { block, editor });
7319
7578
  }
7320
7579
 
7321
7580
  // src/mantine/blocks/proposal/ProposalBlockSpec.tsx
@@ -7374,29 +7633,399 @@ var ProposalBlockSpec = createReactBlockSpec4(
7374
7633
  {
7375
7634
  render: (props) => {
7376
7635
  const ixoProps = props;
7377
- return /* @__PURE__ */ React86.createElement(ProposalBlock, { ...ixoProps });
7636
+ return /* @__PURE__ */ React87.createElement(ProposalBlock, { ...ixoProps });
7378
7637
  }
7379
7638
  }
7380
7639
  );
7381
7640
 
7382
7641
  // src/mantine/blocks/apiRequest/ApiRequestBlockSpec.tsx
7383
- import React92 from "react";
7642
+ import React96 from "react";
7384
7643
  import { createReactBlockSpec as createReactBlockSpec5 } from "@blocknote/react";
7385
7644
 
7386
7645
  // src/mantine/blocks/apiRequest/ApiRequestBlock.tsx
7387
- import React91 from "react";
7646
+ import React95 from "react";
7388
7647
 
7389
7648
  // src/mantine/blocks/apiRequest/template/TemplateView.tsx
7390
- import React89, { useMemo as useMemo12 } from "react";
7649
+ import React93, { useMemo as useMemo16 } from "react";
7391
7650
 
7392
7651
  // src/mantine/blocks/apiRequest/template/TemplateConfig.tsx
7393
- import React88, { useCallback as useCallback15 } from "react";
7394
- import { Paper as Paper9, CloseButton as CloseButton6, Title as Title7 } from "@mantine/core";
7652
+ import React92, { useCallback as useCallback17, useMemo as useMemo15 } from "react";
7653
+ import { Paper as Paper10, CloseButton as CloseButton6, Title as Title7 } from "@mantine/core";
7395
7654
 
7396
7655
  // src/mantine/blocks/apiRequest/template/GeneralTab.tsx
7397
- import React87, { useEffect as useEffect15, useState as useState22 } from "react";
7398
- import { Divider as Divider5, Select as Select10, Stack as Stack67, Text as Text42, TextInput as TextInput34, Textarea as Textarea19, Button as Button17, Group as Group23, ActionIcon as ActionIcon10, Paper as Paper8 } from "@mantine/core";
7656
+ import React90, { useEffect as useEffect16, useState as useState24 } from "react";
7657
+ import { Divider as Divider5, Select as Select11, Stack as Stack68, Text as Text43, TextInput as TextInput34, Textarea as Textarea19, Button as Button18, Group as Group25, ActionIcon as ActionIcon12, Paper as Paper8 } from "@mantine/core";
7399
7658
  import { IconTrash, IconPlus } from "@tabler/icons-react";
7659
+
7660
+ // src/mantine/components/DataInput/DataInput.tsx
7661
+ import React89, { useState as useState23, useCallback as useCallback16, useMemo as useMemo14 } from "react";
7662
+ import { Input as Input2, ActionIcon as ActionIcon11, Tooltip as Tooltip5, Badge as Badge11, Group as Group24 } from "@mantine/core";
7663
+ import { IconVariable, IconX as IconX2 } from "@tabler/icons-react";
7664
+
7665
+ // src/mantine/components/DataInput/BlockPropSelector.tsx
7666
+ import React88, { useState as useState22, useMemo as useMemo13 } from "react";
7667
+ import { Popover, Text as Text42, Stack as Stack67, Group as Group23, ActionIcon as ActionIcon10, Input, ScrollArea as ScrollArea4, Badge as Badge10, Box as Box17, Tooltip as Tooltip4 } from "@mantine/core";
7668
+ import { IconSearch, IconX, IconCircle, IconChevronRight, IconArrowLeft } from "@tabler/icons-react";
7669
+ function buildPropertyTree(properties) {
7670
+ const root = [];
7671
+ properties.forEach((prop) => {
7672
+ const pathParts = prop.name.split(".");
7673
+ let currentLevel = root;
7674
+ pathParts.forEach((part, index) => {
7675
+ const isLastPart = index === pathParts.length - 1;
7676
+ const fullPath = pathParts.slice(0, index + 1).join(".");
7677
+ let existingNode = currentLevel.find((node) => node.name === part);
7678
+ if (!existingNode) {
7679
+ const newNode = {
7680
+ name: part,
7681
+ displayName: isLastPart ? prop.displayName : part,
7682
+ type: isLastPart ? prop.type : "object",
7683
+ fullPath,
7684
+ children: [],
7685
+ isLeaf: isLastPart
7686
+ };
7687
+ currentLevel.push(newNode);
7688
+ existingNode = newNode;
7689
+ }
7690
+ if (!isLastPart) {
7691
+ currentLevel = existingNode.children;
7692
+ }
7693
+ });
7694
+ });
7695
+ return root;
7696
+ }
7697
+ function getBlockDisplayName2(block) {
7698
+ const title = block.props?.title || block.props?.name || block.props?.label;
7699
+ if (title) {
7700
+ return title;
7701
+ }
7702
+ return `${block.type} (${block.id.slice(0, 8)}...)`;
7703
+ }
7704
+ function getBlockTypeColor(blockType) {
7705
+ const colorMap = {
7706
+ checkbox: "blue",
7707
+ proposal: "green",
7708
+ proposalVote: "teal",
7709
+ list: "orange",
7710
+ overview: "purple",
7711
+ proposalActions: "pink",
7712
+ apiRequest: "cyan"
7713
+ };
7714
+ return colorMap[blockType] || "gray";
7715
+ }
7716
+ function BlockPropSelector({ children, opened, onClose, onSelect, editorDocument, currentBlockId }) {
7717
+ const [searchQuery, setSearchQuery] = useState22("");
7718
+ const [selectedBlock, setSelectedBlock] = useState22(null);
7719
+ const [navigationPath, setNavigationPath] = useState22([]);
7720
+ const availableBlocks = useMemo13(() => {
7721
+ if (!editorDocument) return [];
7722
+ return editorDocument.filter((block) => {
7723
+ if (currentBlockId && block.id === currentBlockId) {
7724
+ return false;
7725
+ }
7726
+ const props = getConditionableProperties(block.type);
7727
+ return props.length > 0;
7728
+ }).map((block) => ({
7729
+ ...block,
7730
+ displayName: getBlockDisplayName2(block),
7731
+ properties: getConditionableProperties(block.type, block),
7732
+ propertyTree: buildPropertyTree(getConditionableProperties(block.type, block))
7733
+ }));
7734
+ }, [editorDocument, currentBlockId]);
7735
+ const filteredBlocks = useMemo13(() => {
7736
+ if (!searchQuery.trim()) {
7737
+ return availableBlocks;
7738
+ }
7739
+ const query = searchQuery.toLowerCase();
7740
+ return availableBlocks.filter((block) => {
7741
+ if (block.displayName.toLowerCase().includes(query)) {
7742
+ return true;
7743
+ }
7744
+ if (block.type.toLowerCase().includes(query)) {
7745
+ return true;
7746
+ }
7747
+ return block.properties.some((prop) => prop.name.toLowerCase().includes(query) || prop.displayName.toLowerCase().includes(query));
7748
+ });
7749
+ }, [availableBlocks, searchQuery]);
7750
+ const currentNodes = useMemo13(() => {
7751
+ if (!selectedBlock) return [];
7752
+ if (navigationPath.length === 0) {
7753
+ return selectedBlock.propertyTree;
7754
+ } else {
7755
+ const lastNode = navigationPath[navigationPath.length - 1];
7756
+ return lastNode.children;
7757
+ }
7758
+ }, [selectedBlock, navigationPath]);
7759
+ const handleBlockSelect = (block) => {
7760
+ setSelectedBlock(block);
7761
+ setNavigationPath([]);
7762
+ setSearchQuery("");
7763
+ };
7764
+ const handleNodeClick = (node) => {
7765
+ if (node.isLeaf) {
7766
+ onSelect({
7767
+ blockId: selectedBlock.id,
7768
+ blockType: selectedBlock.type,
7769
+ propName: node.fullPath,
7770
+ propDisplayName: node.displayName
7771
+ });
7772
+ handleClose();
7773
+ } else {
7774
+ setNavigationPath([...navigationPath, node]);
7775
+ }
7776
+ };
7777
+ const handleBack = () => {
7778
+ if (navigationPath.length > 0) {
7779
+ setNavigationPath(navigationPath.slice(0, -1));
7780
+ } else {
7781
+ setSelectedBlock(null);
7782
+ }
7783
+ };
7784
+ const handleClose = () => {
7785
+ setSelectedBlock(null);
7786
+ setNavigationPath([]);
7787
+ setSearchQuery("");
7788
+ onClose();
7789
+ };
7790
+ return /* @__PURE__ */ React88.createElement(Popover, { opened, onClose: handleClose, position: "bottom-end", width: 420, shadow: "md", withinPortal: true }, /* @__PURE__ */ React88.createElement(Popover.Target, null, children), /* @__PURE__ */ React88.createElement(Popover.Dropdown, { p: "md" }, /* @__PURE__ */ React88.createElement(Stack67, { gap: "md" }, /* @__PURE__ */ React88.createElement(Group23, { justify: "space-between", align: "center" }, /* @__PURE__ */ React88.createElement(Group23, { gap: "xs" }, (selectedBlock || navigationPath.length > 0) && /* @__PURE__ */ React88.createElement(ActionIcon10, { variant: "subtle", size: "sm", onClick: handleBack }, /* @__PURE__ */ React88.createElement(IconArrowLeft, { size: 16 })), /* @__PURE__ */ React88.createElement(Text42, { fw: 600, size: "sm" }, !selectedBlock ? "Select a Block" : navigationPath.length === 0 ? `${selectedBlock.displayName} - Select Property` : `${navigationPath[navigationPath.length - 1].displayName}`)), /* @__PURE__ */ React88.createElement(ActionIcon10, { variant: "subtle", size: "sm", onClick: handleClose }, /* @__PURE__ */ React88.createElement(IconX, { size: 16 }))), !selectedBlock && /* @__PURE__ */ React88.createElement(
7791
+ Input,
7792
+ {
7793
+ placeholder: "Search blocks and properties...",
7794
+ leftSection: /* @__PURE__ */ React88.createElement(IconSearch, { size: 16 }),
7795
+ value: searchQuery,
7796
+ onChange: (e) => setSearchQuery(e.currentTarget.value),
7797
+ size: "xs",
7798
+ rightSection: searchQuery && /* @__PURE__ */ React88.createElement(ActionIcon10, { variant: "subtle", onClick: () => setSearchQuery(""), size: "xs" }, /* @__PURE__ */ React88.createElement(IconX, { size: 12 }))
7799
+ }
7800
+ ), /* @__PURE__ */ React88.createElement(ScrollArea4, { h: 300, type: "auto" }, !selectedBlock ? (
7801
+ // Block selection view
7802
+ filteredBlocks.length === 0 ? /* @__PURE__ */ React88.createElement(Text42, { c: "dimmed", ta: "center", py: "xl", size: "sm" }, availableBlocks.length === 0 ? "No blocks with referenceable properties found" : "No blocks match your search") : /* @__PURE__ */ React88.createElement(Stack67, { gap: "sm" }, filteredBlocks.map((block) => /* @__PURE__ */ React88.createElement(
7803
+ Box17,
7804
+ {
7805
+ key: block.id,
7806
+ onClick: () => handleBlockSelect(block),
7807
+ style: {
7808
+ borderRadius: "6px",
7809
+ border: "1px solid var(--mantine-color-gray-3)",
7810
+ padding: "12px",
7811
+ cursor: "pointer",
7812
+ transition: "all 0.15s ease"
7813
+ },
7814
+ onMouseEnter: (e) => {
7815
+ e.currentTarget.style.backgroundColor = "var(--mantine-color-gray-0)";
7816
+ e.currentTarget.style.borderColor = "var(--mantine-color-gray-4)";
7817
+ },
7818
+ onMouseLeave: (e) => {
7819
+ e.currentTarget.style.backgroundColor = "transparent";
7820
+ e.currentTarget.style.borderColor = "var(--mantine-color-gray-3)";
7821
+ }
7822
+ },
7823
+ /* @__PURE__ */ React88.createElement(Group23, { gap: "xs", justify: "space-between" }, /* @__PURE__ */ React88.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React88.createElement(
7824
+ IconCircle,
7825
+ {
7826
+ size: 10,
7827
+ fill: `var(--mantine-color-${getBlockTypeColor(block.type)}-6)`,
7828
+ color: `var(--mantine-color-${getBlockTypeColor(block.type)}-6)`
7829
+ }
7830
+ ), /* @__PURE__ */ React88.createElement(Text42, { fw: 500, size: "sm" }, block.displayName), /* @__PURE__ */ React88.createElement(Badge10, { size: "xs", variant: "light", color: getBlockTypeColor(block.type) }, block.type)), /* @__PURE__ */ React88.createElement(IconChevronRight, { size: 16, color: "var(--mantine-color-gray-5)" }))
7831
+ )))
7832
+ ) : (
7833
+ // Property navigation view
7834
+ currentNodes.length === 0 ? /* @__PURE__ */ React88.createElement(Text42, { c: "dimmed", ta: "center", py: "xl", size: "sm" }, "No properties available") : /* @__PURE__ */ React88.createElement(Stack67, { gap: "xs" }, currentNodes.map((node, index) => /* @__PURE__ */ React88.createElement(Tooltip4, { key: index, label: node.isLeaf ? `Select ${node.displayName}` : `Navigate into ${node.displayName}`, position: "left", withArrow: true }, /* @__PURE__ */ React88.createElement(
7835
+ Box17,
7836
+ {
7837
+ onClick: () => handleNodeClick(node),
7838
+ style: {
7839
+ padding: "10px 12px",
7840
+ borderRadius: "4px",
7841
+ cursor: "pointer",
7842
+ transition: "background-color 0.15s ease",
7843
+ border: "1px solid transparent"
7844
+ },
7845
+ onMouseEnter: (e) => {
7846
+ e.currentTarget.style.backgroundColor = "var(--mantine-color-gray-0)";
7847
+ e.currentTarget.style.borderColor = "var(--mantine-color-gray-3)";
7848
+ },
7849
+ onMouseLeave: (e) => {
7850
+ e.currentTarget.style.backgroundColor = "transparent";
7851
+ e.currentTarget.style.borderColor = "transparent";
7852
+ }
7853
+ },
7854
+ /* @__PURE__ */ React88.createElement(Group23, { gap: "xs", justify: "space-between" }, /* @__PURE__ */ React88.createElement(Group23, { gap: "xs" }, /* @__PURE__ */ React88.createElement(Text42, { size: "sm" }, node.displayName), /* @__PURE__ */ React88.createElement(Badge10, { size: "xs", variant: "dot", color: "gray" }, node.type)), !node.isLeaf && /* @__PURE__ */ React88.createElement(IconChevronRight, { size: 16, color: "var(--mantine-color-gray-5)" }))
7855
+ ))))
7856
+ )))));
7857
+ }
7858
+
7859
+ // src/mantine/utils/referenceResolver.ts
7860
+ var REFERENCE_REGEX = /\{\{([a-zA-Z0-9_-]+)\.([a-zA-Z0-9_.]+)\}\}/g;
7861
+ function parseReferences(input) {
7862
+ const references = [];
7863
+ const regex = new RegExp(REFERENCE_REGEX);
7864
+ let match;
7865
+ while ((match = regex.exec(input)) !== null) {
7866
+ references.push({
7867
+ fullMatch: match[0],
7868
+ blockId: match[1],
7869
+ propPath: match[2],
7870
+ startIndex: match.index,
7871
+ endIndex: match.index + match[0].length
7872
+ });
7873
+ }
7874
+ return references;
7875
+ }
7876
+ function getNestedValue(obj, path) {
7877
+ return path.split(".").reduce((current, key) => {
7878
+ return current?.[key];
7879
+ }, obj);
7880
+ }
7881
+ function resolveSingleReference(blockId, propPath, editorDocument) {
7882
+ if (!editorDocument || !Array.isArray(editorDocument)) {
7883
+ console.warn("Invalid editor document provided to resolveSingleReference");
7884
+ return void 0;
7885
+ }
7886
+ const block = editorDocument.find((b) => b.id === blockId);
7887
+ if (!block) {
7888
+ console.warn(`Block not found: ${blockId}`);
7889
+ return void 0;
7890
+ }
7891
+ if (propPath.startsWith("response.")) {
7892
+ const responseData = block.props.response;
7893
+ if (!responseData) {
7894
+ console.warn(`No response data in block ${blockId}`);
7895
+ return void 0;
7896
+ }
7897
+ try {
7898
+ const parsedResponse = typeof responseData === "string" ? JSON.parse(responseData) : responseData;
7899
+ const innerPath = propPath.substring("response.".length);
7900
+ const value2 = getNestedValue(parsedResponse, innerPath);
7901
+ if (value2 === void 0) {
7902
+ console.warn(`Property not found in response: ${innerPath} in block ${blockId}`);
7903
+ }
7904
+ return value2;
7905
+ } catch (error) {
7906
+ console.warn(`Failed to parse response JSON for block ${blockId}:`, error);
7907
+ return void 0;
7908
+ }
7909
+ }
7910
+ const value = getNestedValue(block.props, propPath);
7911
+ if (value === void 0) {
7912
+ console.warn(`Property not found: ${propPath} in block ${blockId}`);
7913
+ }
7914
+ return value;
7915
+ }
7916
+ function resolveReferences(input, editorDocument, options = {}) {
7917
+ const { fallback = "", stringifyObjects = true } = options;
7918
+ if (input == null) {
7919
+ return "";
7920
+ }
7921
+ const inputStr = String(input);
7922
+ const references = parseReferences(inputStr);
7923
+ if (references.length === 0) {
7924
+ return inputStr;
7925
+ }
7926
+ let result = inputStr;
7927
+ for (let i = references.length - 1; i >= 0; i--) {
7928
+ const ref = references[i];
7929
+ const resolvedValue = resolveSingleReference(ref.blockId, ref.propPath, editorDocument);
7930
+ let replacementStr;
7931
+ if (resolvedValue === void 0 || resolvedValue === null) {
7932
+ replacementStr = fallback;
7933
+ } else if (typeof resolvedValue === "object") {
7934
+ replacementStr = stringifyObjects ? JSON.stringify(resolvedValue) : fallback;
7935
+ } else {
7936
+ replacementStr = String(resolvedValue);
7937
+ }
7938
+ result = result.substring(0, ref.startIndex) + replacementStr + result.substring(ref.endIndex);
7939
+ }
7940
+ return result;
7941
+ }
7942
+ function hasReferences(input) {
7943
+ if (input == null) return false;
7944
+ return parseReferences(String(input)).length > 0;
7945
+ }
7946
+ function createReference(blockId, propPath) {
7947
+ return `{{${blockId}.${propPath}}}`;
7948
+ }
7949
+
7950
+ // src/mantine/components/DataInput/DataInput.tsx
7951
+ function DataInput({
7952
+ value,
7953
+ onChange,
7954
+ placeholder,
7955
+ editorDocument,
7956
+ currentBlockId,
7957
+ leftSection,
7958
+ disabled = false,
7959
+ description,
7960
+ label,
7961
+ required,
7962
+ size = "sm"
7963
+ }) {
7964
+ const [selectorOpened, setSelectorOpened] = useState23(false);
7965
+ const containsReferences = useMemo14(() => {
7966
+ return hasReferences(value);
7967
+ }, [value]);
7968
+ const references = useMemo14(() => {
7969
+ return parseReferences(value || "");
7970
+ }, [value]);
7971
+ const handleOpenSelector = useCallback16(() => {
7972
+ setSelectorOpened(true);
7973
+ }, []);
7974
+ const handleCloseSelector = useCallback16(() => {
7975
+ setSelectorOpened(false);
7976
+ }, []);
7977
+ const handleSelectProperty = useCallback16(
7978
+ (selection) => {
7979
+ const reference = createReference(selection.blockId, selection.propName);
7980
+ const newValue = value ? `${value}${reference}` : reference;
7981
+ onChange(newValue);
7982
+ },
7983
+ [value, onChange]
7984
+ );
7985
+ const handleClearReferences = useCallback16(() => {
7986
+ let newValue = value || "";
7987
+ references.forEach((ref) => {
7988
+ newValue = newValue.replace(ref.fullMatch, "");
7989
+ });
7990
+ onChange(newValue);
7991
+ }, [value, references, onChange]);
7992
+ return /* @__PURE__ */ React89.createElement(Input2.Wrapper, { label, description, required, size, style: { width: "100%" } }, /* @__PURE__ */ React89.createElement(
7993
+ Input2,
7994
+ {
7995
+ value: value || "",
7996
+ onChange: (e) => onChange(e.currentTarget.value),
7997
+ placeholder,
7998
+ leftSection,
7999
+ disabled,
8000
+ size,
8001
+ style: { width: "100%" },
8002
+ rightSectionPointerEvents: "all",
8003
+ rightSection: /* @__PURE__ */ React89.createElement(Group24, { gap: 4, wrap: "nowrap" }, containsReferences && /* @__PURE__ */ React89.createElement(Tooltip5, { label: "Click to clear all references", position: "left" }, /* @__PURE__ */ React89.createElement(Badge11, { size: "sm", variant: "light", color: "blue", style: { cursor: "pointer" }, onClick: handleClearReferences, leftSection: /* @__PURE__ */ React89.createElement(IconX2, { size: 10 }) }, references.length, " ref", references.length !== 1 ? "s" : "")), /* @__PURE__ */ React89.createElement(
8004
+ BlockPropSelector,
8005
+ {
8006
+ opened: selectorOpened,
8007
+ onClose: handleCloseSelector,
8008
+ onSelect: handleSelectProperty,
8009
+ editorDocument,
8010
+ currentBlockId
8011
+ },
8012
+ /* @__PURE__ */ React89.createElement(Tooltip5, { label: "Insert reference to another block's property", position: "left" }, /* @__PURE__ */ React89.createElement(
8013
+ ActionIcon11,
8014
+ {
8015
+ variant: containsReferences ? "light" : "subtle",
8016
+ color: containsReferences ? "blue" : "gray",
8017
+ onClick: handleOpenSelector,
8018
+ disabled,
8019
+ size
8020
+ },
8021
+ /* @__PURE__ */ React89.createElement(IconVariable, { size: 16 })
8022
+ ))
8023
+ ))
8024
+ }
8025
+ ));
8026
+ }
8027
+
8028
+ // src/mantine/blocks/apiRequest/template/GeneralTab.tsx
7400
8029
  var GeneralTab4 = ({
7401
8030
  title,
7402
8031
  description,
@@ -7409,20 +8038,22 @@ var GeneralTab4 = ({
7409
8038
  onEndpointChange,
7410
8039
  onMethodChange,
7411
8040
  onHeadersChange,
7412
- onBodyChange
8041
+ onBodyChange,
8042
+ editor,
8043
+ blockId
7413
8044
  }) => {
7414
- const [localTitle, setLocalTitle] = useState22(title || "");
7415
- const [localDescription, setLocalDescription] = useState22(description || "");
7416
- const [localEndpoint, setLocalEndpoint] = useState22(endpoint || "");
7417
- const [localMethod, setLocalMethod] = useState22(method || "GET");
7418
- const [localHeaders, setLocalHeaders] = useState22(headers || []);
7419
- const [localBody, setLocalBody] = useState22(body || []);
7420
- useEffect15(() => setLocalTitle(title || ""), [title]);
7421
- useEffect15(() => setLocalDescription(description || ""), [description]);
7422
- useEffect15(() => setLocalEndpoint(endpoint || ""), [endpoint]);
7423
- useEffect15(() => setLocalMethod(method || "GET"), [method]);
7424
- useEffect15(() => setLocalHeaders(headers || []), [headers]);
7425
- useEffect15(() => setLocalBody(body || []), [body]);
8045
+ const [localTitle, setLocalTitle] = useState24(title || "");
8046
+ const [localDescription, setLocalDescription] = useState24(description || "");
8047
+ const [localEndpoint, setLocalEndpoint] = useState24(endpoint || "");
8048
+ const [localMethod, setLocalMethod] = useState24(method || "GET");
8049
+ const [localHeaders, setLocalHeaders] = useState24(headers || []);
8050
+ const [localBody, setLocalBody] = useState24(body || []);
8051
+ useEffect16(() => setLocalTitle(title || ""), [title]);
8052
+ useEffect16(() => setLocalDescription(description || ""), [description]);
8053
+ useEffect16(() => setLocalEndpoint(endpoint || ""), [endpoint]);
8054
+ useEffect16(() => setLocalMethod(method || "GET"), [method]);
8055
+ useEffect16(() => setLocalHeaders(headers || []), [headers]);
8056
+ useEffect16(() => setLocalBody(body || []), [body]);
7426
8057
  const handleAddHeader = () => {
7427
8058
  const newHeaders = [...localHeaders, { key: "", value: "" }];
7428
8059
  setLocalHeaders(newHeaders);
@@ -7455,7 +8086,7 @@ var GeneralTab4 = ({
7455
8086
  setLocalBody(newBody);
7456
8087
  onBodyChange(newBody);
7457
8088
  };
7458
- return /* @__PURE__ */ React87.createElement(Stack67, { gap: "lg" }, /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React87.createElement(
8089
+ return /* @__PURE__ */ React90.createElement(Stack68, { gap: "lg" }, /* @__PURE__ */ React90.createElement(Stack68, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text43, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React90.createElement(
7459
8090
  TextInput34,
7460
8091
  {
7461
8092
  placeholder: "e.g. Submit User Data",
@@ -7466,7 +8097,7 @@ var GeneralTab4 = ({
7466
8097
  onTitleChange(newTitle);
7467
8098
  }
7468
8099
  }
7469
- )), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React87.createElement(
8100
+ )), /* @__PURE__ */ React90.createElement(Stack68, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text43, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React90.createElement(
7470
8101
  Textarea19,
7471
8102
  {
7472
8103
  placeholder: "Describe what this API request does",
@@ -7478,8 +8109,8 @@ var GeneralTab4 = ({
7478
8109
  onDescriptionChange(newDescription);
7479
8110
  }
7480
8111
  }
7481
- )), /* @__PURE__ */ React87.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "HTTP Method"), /* @__PURE__ */ React87.createElement(
7482
- Select10,
8112
+ )), /* @__PURE__ */ React90.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React90.createElement(Stack68, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text43, { size: "sm", fw: 600 }, "HTTP Method"), /* @__PURE__ */ React90.createElement(
8113
+ Select11,
7483
8114
  {
7484
8115
  value: localMethod,
7485
8116
  onChange: (value) => {
@@ -7495,7 +8126,7 @@ var GeneralTab4 = ({
7495
8126
  { value: "PATCH", label: "PATCH" }
7496
8127
  ]
7497
8128
  }
7498
- )), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Endpoint URL"), /* @__PURE__ */ React87.createElement(
8129
+ )), /* @__PURE__ */ React90.createElement(Stack68, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text43, { size: "sm", fw: 600 }, "Endpoint URL"), /* @__PURE__ */ React90.createElement(
7499
8130
  TextInput34,
7500
8131
  {
7501
8132
  placeholder: "https://api.example.com/endpoint",
@@ -7506,45 +8137,140 @@ var GeneralTab4 = ({
7506
8137
  onEndpointChange(newEndpoint);
7507
8138
  }
7508
8139
  }
7509
- )), /* @__PURE__ */ React87.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Request Headers"), /* @__PURE__ */ React87.createElement(Button17, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React87.createElement(IconPlus, { size: 14 }), onClick: handleAddHeader }, "Add Header")), /* @__PURE__ */ React87.createElement(Text42, { size: "xs" }, "Add custom headers to your API request (e.g., Authorization, Content-Type)"), localHeaders.length > 0 && /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, localHeaders.map((header, index) => /* @__PURE__ */ React87.createElement(Paper8, { key: index, p: "xs" }, /* @__PURE__ */ React87.createElement(Group23, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React87.createElement(
7510
- TextInput34,
8140
+ )), /* @__PURE__ */ React90.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React90.createElement(Stack68, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Group25, { justify: "space-between" }, /* @__PURE__ */ React90.createElement(Text43, { size: "sm", fw: 600 }, "Request Headers"), /* @__PURE__ */ React90.createElement(Button18, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React90.createElement(IconPlus, { size: 14 }), onClick: handleAddHeader }, "Add Header")), /* @__PURE__ */ React90.createElement(Text43, { size: "xs" }, "Add custom headers to your API request (e.g., Authorization, Content-Type)"), localHeaders.length > 0 && /* @__PURE__ */ React90.createElement(Stack68, { gap: "xs" }, localHeaders.map((header, index) => /* @__PURE__ */ React90.createElement(Paper8, { key: index, p: "xs" }, /* @__PURE__ */ React90.createElement(Group25, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React90.createElement(
8141
+ DataInput,
7511
8142
  {
7512
8143
  placeholder: "Header key (e.g., Authorization)",
7513
8144
  value: header.key,
7514
- onChange: (event) => handleHeaderChange(index, "key", event.currentTarget.value),
7515
- style: { flex: 1 }
8145
+ onChange: (value) => handleHeaderChange(index, "key", value),
8146
+ editorDocument: editor?.document || [],
8147
+ currentBlockId: blockId,
8148
+ size: "sm"
7516
8149
  }
7517
- ), /* @__PURE__ */ React87.createElement(
7518
- TextInput34,
8150
+ ), /* @__PURE__ */ React90.createElement(
8151
+ DataInput,
7519
8152
  {
7520
8153
  placeholder: "Header value (e.g., Bearer token123)",
7521
8154
  value: header.value,
7522
- onChange: (event) => handleHeaderChange(index, "value", event.currentTarget.value),
7523
- style: { flex: 1 }
8155
+ onChange: (value) => handleHeaderChange(index, "value", value),
8156
+ editorDocument: editor?.document || [],
8157
+ currentBlockId: blockId,
8158
+ size: "sm"
7524
8159
  }
7525
- ), /* @__PURE__ */ React87.createElement(ActionIcon10, { color: "red", variant: "subtle", onClick: () => handleRemoveHeader(index) }, /* @__PURE__ */ React87.createElement(IconTrash, { size: 16 }))))))), /* @__PURE__ */ React87.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, /* @__PURE__ */ React87.createElement(Group23, { justify: "space-between" }, /* @__PURE__ */ React87.createElement(Text42, { size: "sm", fw: 600 }, "Request Body (JSON)"), /* @__PURE__ */ React87.createElement(Button17, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React87.createElement(IconPlus, { size: 14 }), onClick: handleAddBodyField }, "Add Field")), /* @__PURE__ */ React87.createElement(Text42, { size: "xs" }, "Build your JSON request body as key-value pairs"), localBody.length > 0 && /* @__PURE__ */ React87.createElement(Stack67, { gap: "xs" }, localBody.map((field, index) => /* @__PURE__ */ React87.createElement(Paper8, { key: index, p: "xs" }, /* @__PURE__ */ React87.createElement(Group23, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React87.createElement(
7526
- TextInput34,
8160
+ ), /* @__PURE__ */ React90.createElement(ActionIcon12, { color: "red", variant: "subtle", onClick: () => handleRemoveHeader(index) }, /* @__PURE__ */ React90.createElement(IconTrash, { size: 16 }))))))), /* @__PURE__ */ React90.createElement(Divider5, { variant: "dashed" }), /* @__PURE__ */ React90.createElement(Stack68, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Group25, { justify: "space-between" }, /* @__PURE__ */ React90.createElement(Text43, { size: "sm", fw: 600 }, "Request Body (JSON)"), /* @__PURE__ */ React90.createElement(Button18, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React90.createElement(IconPlus, { size: 14 }), onClick: handleAddBodyField }, "Add Field")), /* @__PURE__ */ React90.createElement(Text43, { size: "xs" }, "Build your JSON request body as key-value pairs"), localBody.length > 0 && /* @__PURE__ */ React90.createElement(Stack68, { gap: "xs" }, localBody.map((field, index) => /* @__PURE__ */ React90.createElement(Paper8, { key: index, p: "xs" }, /* @__PURE__ */ React90.createElement(Group25, { gap: "xs", align: "flex-start" }, /* @__PURE__ */ React90.createElement(
8161
+ DataInput,
7527
8162
  {
7528
8163
  placeholder: "Field key (e.g., name)",
7529
8164
  value: field.key,
7530
- onChange: (event) => handleBodyFieldChange(index, "key", event.currentTarget.value),
7531
- style: { flex: 1 }
8165
+ onChange: (value) => handleBodyFieldChange(index, "key", value),
8166
+ editorDocument: editor?.document || [],
8167
+ currentBlockId: blockId,
8168
+ size: "sm"
7532
8169
  }
7533
- ), /* @__PURE__ */ React87.createElement(
7534
- TextInput34,
8170
+ ), /* @__PURE__ */ React90.createElement(
8171
+ DataInput,
7535
8172
  {
7536
8173
  placeholder: "Field value (e.g., John Doe)",
7537
8174
  value: field.value,
7538
- onChange: (event) => handleBodyFieldChange(index, "value", event.currentTarget.value),
7539
- style: { flex: 1 }
8175
+ onChange: (value) => handleBodyFieldChange(index, "value", value),
8176
+ editorDocument: editor?.document || [],
8177
+ currentBlockId: blockId,
8178
+ size: "sm"
7540
8179
  }
7541
- ), /* @__PURE__ */ React87.createElement(ActionIcon10, { color: "red", variant: "subtle", onClick: () => handleRemoveBodyField(index) }, /* @__PURE__ */ React87.createElement(IconTrash, { size: 16 }))))))));
8180
+ ), /* @__PURE__ */ React90.createElement(ActionIcon12, { color: "red", variant: "subtle", onClick: () => handleRemoveBodyField(index) }, /* @__PURE__ */ React90.createElement(IconTrash, { size: 16 }))))))));
8181
+ };
8182
+
8183
+ // src/mantine/blocks/apiRequest/template/ResponseSchemaTab.tsx
8184
+ import React91 from "react";
8185
+ import { Stack as Stack69, Text as Text44, Button as Button19, Group as Group26, ActionIcon as ActionIcon13, Paper as Paper9, TextInput as TextInput35, Select as Select12, Textarea as Textarea20, Alert as Alert9, Code } from "@mantine/core";
8186
+ import { IconTrash as IconTrash2, IconPlus as IconPlus2, IconInfoCircle } from "@tabler/icons-react";
8187
+ var ResponseSchemaTab = ({ schema, onSchemaChange, blockId }) => {
8188
+ const fields = schema?.fields || [];
8189
+ const handleAddField = () => {
8190
+ const newFields = [
8191
+ ...fields,
8192
+ {
8193
+ path: "",
8194
+ displayName: "",
8195
+ type: "string",
8196
+ description: ""
8197
+ }
8198
+ ];
8199
+ onSchemaChange({ fields: newFields });
8200
+ };
8201
+ const handleRemoveField = (index) => {
8202
+ const newFields = fields.filter((_, i) => i !== index);
8203
+ onSchemaChange({ fields: newFields });
8204
+ };
8205
+ const handleFieldChange = (index, key, value) => {
8206
+ const newFields = [...fields];
8207
+ newFields[index] = { ...newFields[index], [key]: value };
8208
+ onSchemaChange({ fields: newFields });
8209
+ };
8210
+ return /* @__PURE__ */ React91.createElement(Stack69, { gap: "lg" }, /* @__PURE__ */ React91.createElement(Alert9, { icon: /* @__PURE__ */ React91.createElement(IconInfoCircle, { size: 16 }), title: "Response Schema", color: "blue" }, /* @__PURE__ */ React91.createElement(Text44, { size: "xs" }, "Define the expected structure of your API response. This allows other blocks to reference specific fields from the response data using the DataInput component.")), /* @__PURE__ */ React91.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 600 }, "How it works"), /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed" }, "1. Define response fields using dot notation (e.g., ", /* @__PURE__ */ React91.createElement(Code, null, "customer.email"), ")"), /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed" }, "2. Fields become available in DataInput selectors across other blocks"), /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed" }, "3. Reference them like: ", /* @__PURE__ */ React91.createElement(Code, null, `{{${blockId}.response.customer.email}}`))), /* @__PURE__ */ React91.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Group26, { justify: "space-between" }, /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 600 }, "Response Fields"), /* @__PURE__ */ React91.createElement(Button19, { size: "xs", variant: "light", leftSection: /* @__PURE__ */ React91.createElement(IconPlus2, { size: 14 }), onClick: handleAddField }, "Add Field")), fields.length === 0 ? /* @__PURE__ */ React91.createElement(Paper9, { p: "md", withBorder: true, style: { backgroundColor: "var(--mantine-color-gray-0)" } }, /* @__PURE__ */ React91.createElement(Text44, { size: "sm", c: "dimmed", ta: "center" }, 'No response fields defined yet. Click "Add Field" to start defining your response structure.')) : /* @__PURE__ */ React91.createElement(Stack69, { gap: "md" }, fields.map((field, index) => /* @__PURE__ */ React91.createElement(Paper9, { key: index, p: "md", withBorder: true }, /* @__PURE__ */ React91.createElement(Stack69, { gap: "sm" }, /* @__PURE__ */ React91.createElement(Group26, { justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 500 }, "Field ", index + 1), /* @__PURE__ */ React91.createElement(ActionIcon13, { color: "red", variant: "subtle", onClick: () => handleRemoveField(index) }, /* @__PURE__ */ React91.createElement(IconTrash2, { size: 16 }))), /* @__PURE__ */ React91.createElement(
8211
+ TextInput35,
8212
+ {
8213
+ label: "Field Path",
8214
+ placeholder: "e.g., customer.email or product.id",
8215
+ description: "Use dot notation to specify nested fields in the API response",
8216
+ value: field.path,
8217
+ onChange: (e) => handleFieldChange(index, "path", e.currentTarget.value),
8218
+ required: true,
8219
+ size: "sm"
8220
+ }
8221
+ ), /* @__PURE__ */ React91.createElement(
8222
+ TextInput35,
8223
+ {
8224
+ label: "Display Name",
8225
+ placeholder: "e.g., User Email",
8226
+ description: "Human-readable name shown in DataInput selector",
8227
+ value: field.displayName,
8228
+ onChange: (e) => handleFieldChange(index, "displayName", e.currentTarget.value),
8229
+ required: true,
8230
+ size: "sm"
8231
+ }
8232
+ ), /* @__PURE__ */ React91.createElement(
8233
+ Select12,
8234
+ {
8235
+ label: "Type",
8236
+ description: "Expected data type of this field",
8237
+ value: field.type,
8238
+ onChange: (value) => handleFieldChange(index, "type", value || "string"),
8239
+ data: [
8240
+ { value: "string", label: "String" },
8241
+ { value: "number", label: "Number" },
8242
+ { value: "boolean", label: "Boolean" },
8243
+ { value: "object", label: "Object" },
8244
+ { value: "array", label: "Array" }
8245
+ ],
8246
+ size: "sm"
8247
+ }
8248
+ ), /* @__PURE__ */ React91.createElement(
8249
+ Textarea20,
8250
+ {
8251
+ label: "Description (optional)",
8252
+ placeholder: "Describe what this field represents",
8253
+ value: field.description || "",
8254
+ onChange: (e) => handleFieldChange(index, "description", e.currentTarget.value),
8255
+ minRows: 2,
8256
+ size: "sm"
8257
+ }
8258
+ ), field.path && field.displayName && /* @__PURE__ */ React91.createElement(Stack69, { gap: 4 }, /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed" }, "Reference format:"), /* @__PURE__ */ React91.createElement(Code, { block: true, style: { fontSize: "11px" } }, `{{${blockId}.response.${field.path}}}`))))))), fields.length === 0 && /* @__PURE__ */ React91.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React91.createElement(Text44, { size: "sm", fw: 600 }, "Example Schema"), /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed" }, "For a typical API response like:"), /* @__PURE__ */ React91.createElement(Code, { block: true, style: { fontSize: "11px" } }, `{
8259
+ "customer": {
8260
+ "email": "user@example.com",
8261
+ "name": "John Doe"
8262
+ },
8263
+ "product": {
8264
+ "id": "l1v6r07b",
8265
+ "name": "Product-1"
8266
+ }
8267
+ }`), /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed" }, "You would define fields like:"), /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed" }, "\u2022 Path: ", /* @__PURE__ */ React91.createElement(Code, null, "customer.email"), ', Display Name: "Customer Email", Type: string'), /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed" }, "\u2022 Path: ", /* @__PURE__ */ React91.createElement(Code, null, "customer.name"), ', Display Name: "Customer Name", Type: string'), /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed" }, "\u2022 Path: ", /* @__PURE__ */ React91.createElement(Code, null, "product.id"), ', Display Name: "Product ID", Type: string'), /* @__PURE__ */ React91.createElement(Text44, { size: "xs", c: "dimmed" }, "\u2022 Path: ", /* @__PURE__ */ React91.createElement(Code, null, "product.name"), ', Display Name: "Product Name", Type: string')));
7542
8268
  };
7543
8269
 
7544
8270
  // src/mantine/blocks/apiRequest/template/TemplateConfig.tsx
7545
8271
  var TemplateConfig4 = ({ editor, block }) => {
7546
8272
  const { closePanel } = usePanelStore();
7547
- const updateProp = useCallback15(
8273
+ const updateProp = useCallback17(
7548
8274
  (key, value) => {
7549
8275
  editor.updateBlock(block, {
7550
8276
  props: {
@@ -7555,20 +8281,88 @@ var TemplateConfig4 = ({ editor, block }) => {
7555
8281
  },
7556
8282
  [editor, block]
7557
8283
  );
7558
- const handleHeadersChange = useCallback15(
8284
+ const handleHeadersChange = useCallback17(
7559
8285
  (headers) => {
7560
8286
  updateProp("headers", JSON.stringify(headers));
7561
8287
  },
7562
8288
  [updateProp]
7563
8289
  );
7564
- const handleBodyChange = useCallback15(
8290
+ const handleBodyChange = useCallback17(
7565
8291
  (body) => {
7566
8292
  updateProp("body", JSON.stringify(body));
7567
8293
  },
7568
8294
  [updateProp]
7569
8295
  );
7570
- return /* @__PURE__ */ React88.createElement(
7571
- Paper9,
8296
+ const handleSchemaChange = useCallback17(
8297
+ (schema) => {
8298
+ updateProp("responseSchema", JSON.stringify(schema));
8299
+ },
8300
+ [updateProp]
8301
+ );
8302
+ const parsedResponseSchema = useMemo15(() => {
8303
+ return parseResponseSchema(block.props.responseSchema);
8304
+ }, [block.props.responseSchema]);
8305
+ const tabs = useMemo15(
8306
+ () => [
8307
+ {
8308
+ label: "General",
8309
+ value: "general",
8310
+ content: /* @__PURE__ */ React92.createElement(
8311
+ GeneralTab4,
8312
+ {
8313
+ title: block.props.title || "",
8314
+ description: block.props.description || "",
8315
+ endpoint: block.props.endpoint || "",
8316
+ method: block.props.method || "GET",
8317
+ headers: (() => {
8318
+ try {
8319
+ return typeof block.props.headers === "string" ? JSON.parse(block.props.headers) : block.props.headers || [];
8320
+ } catch {
8321
+ return [];
8322
+ }
8323
+ })(),
8324
+ body: (() => {
8325
+ try {
8326
+ return typeof block.props.body === "string" ? JSON.parse(block.props.body) : block.props.body || [];
8327
+ } catch {
8328
+ return [];
8329
+ }
8330
+ })(),
8331
+ onTitleChange: (value) => updateProp("title", value),
8332
+ onDescriptionChange: (value) => updateProp("description", value),
8333
+ onEndpointChange: (value) => updateProp("endpoint", value),
8334
+ onMethodChange: (value) => updateProp("method", value),
8335
+ onHeadersChange: handleHeadersChange,
8336
+ onBodyChange: handleBodyChange,
8337
+ editor,
8338
+ blockId: block.id
8339
+ }
8340
+ )
8341
+ },
8342
+ {
8343
+ label: "Response Schema",
8344
+ value: "response-schema",
8345
+ content: /* @__PURE__ */ React92.createElement(ResponseSchemaTab, { schema: parsedResponseSchema, onSchemaChange: handleSchemaChange, blockId: block.id })
8346
+ }
8347
+ ],
8348
+ [
8349
+ block.props.title,
8350
+ block.props.description,
8351
+ block.props.endpoint,
8352
+ block.props.method,
8353
+ block.props.headers,
8354
+ block.props.body,
8355
+ block.id,
8356
+ parsedResponseSchema,
8357
+ updateProp,
8358
+ handleHeadersChange,
8359
+ handleBodyChange,
8360
+ handleSchemaChange,
8361
+ editor
8362
+ ]
8363
+ );
8364
+ return /* @__PURE__ */ React92.createElement(
8365
+ Paper10,
7572
8366
  {
7573
8367
  p: "md",
7574
8368
  shadow: "sm",
@@ -7578,7 +8372,7 @@ var TemplateConfig4 = ({ editor, block }) => {
7578
8372
  flexDirection: "column"
7579
8373
  }
7580
8374
  },
7581
- /* @__PURE__ */ React88.createElement(
8375
+ /* @__PURE__ */ React92.createElement(
7582
8376
  "div",
7583
8377
  {
7584
8378
  style: {
@@ -7588,59 +8382,19 @@ var TemplateConfig4 = ({ editor, block }) => {
7588
8382
  marginBottom: "1rem"
7589
8383
  }
7590
8384
  },
7591
- /* @__PURE__ */ React88.createElement(Title7, { order: 3 }, "API Request Settings"),
7592
- /* @__PURE__ */ React88.createElement(CloseButton6, { onClick: closePanel })
8385
+ /* @__PURE__ */ React92.createElement(Title7, { order: 3 }, "API Request Settings"),
8386
+ /* @__PURE__ */ React92.createElement(CloseButton6, { onClick: closePanel })
7593
8387
  ),
7594
- /* @__PURE__ */ React88.createElement(
7595
- ReusablePanel,
7596
- {
7597
- extraTabs: [
7598
- {
7599
- label: "General",
7600
- value: "general",
7601
- content: /* @__PURE__ */ React88.createElement(
7602
- GeneralTab4,
7603
- {
7604
- title: block.props.title || "",
7605
- description: block.props.description || "",
7606
- endpoint: block.props.endpoint || "",
7607
- method: block.props.method || "GET",
7608
- headers: (() => {
7609
- try {
7610
- return typeof block.props.headers === "string" ? JSON.parse(block.props.headers) : block.props.headers || [];
7611
- } catch {
7612
- return [];
7613
- }
7614
- })(),
7615
- body: (() => {
7616
- try {
7617
- return typeof block.props.body === "string" ? JSON.parse(block.props.body) : block.props.body || [];
7618
- } catch {
7619
- return [];
7620
- }
7621
- })(),
7622
- onTitleChange: (value) => updateProp("title", value),
7623
- onDescriptionChange: (value) => updateProp("description", value),
7624
- onEndpointChange: (value) => updateProp("endpoint", value),
7625
- onMethodChange: (value) => updateProp("method", value),
7626
- onHeadersChange: handleHeadersChange,
7627
- onBodyChange: handleBodyChange
7628
- }
7629
- )
7630
- }
7631
- ],
7632
- context: { editor, block }
7633
- }
7634
- )
8388
+ /* @__PURE__ */ React92.createElement(ReusablePanel, { extraTabs: tabs, context: { editor, block } })
7635
8389
  );
7636
8390
  };
7637
8391
 
7638
8392
  // src/mantine/blocks/apiRequest/template/TemplateView.tsx
7639
- import { Card as Card19, Group as Group24, Stack as Stack68, Text as Text43, ActionIcon as ActionIcon11, Badge as Badge10 } from "@mantine/core";
8393
+ import { Card as Card19, Group as Group27, Stack as Stack70, Text as Text45, ActionIcon as ActionIcon14, Badge as Badge12 } from "@mantine/core";
7640
8394
  var API_REQUEST_TEMPLATE_PANEL_ID = "api-request-template-panel";
7641
8395
  var ApiRequestTemplateView = ({ editor, block }) => {
7642
8396
  const panelId = `${API_REQUEST_TEMPLATE_PANEL_ID}-${block.id}`;
7643
- const panelContent = useMemo12(() => /* @__PURE__ */ React89.createElement(TemplateConfig4, { editor, block }), [editor, block]);
8397
+ const panelContent = useMemo16(() => /* @__PURE__ */ React93.createElement(TemplateConfig4, { editor, block }), [editor, block]);
7644
8398
  const { open } = usePanel(panelId, panelContent);
7645
8399
  const method = block.props.method || "GET";
7646
8400
  const endpoint = block.props.endpoint || "https://api.example.com/endpoint";
@@ -7660,17 +8414,18 @@ var ApiRequestTemplateView = ({ editor, block }) => {
7660
8414
  return "gray";
7661
8415
  }
7662
8416
  };
7663
- return /* @__PURE__ */ React89.createElement(Card19, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React89.createElement(Badge10, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React89.createElement(Group24, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React89.createElement(Group24, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React89.createElement(ActionIcon11, { variant: "light", color: "violet", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "square-check")), /* @__PURE__ */ React89.createElement(Stack68, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React89.createElement(Group24, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React89.createElement(Badge10, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React89.createElement(Text43, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request")), /* @__PURE__ */ React89.createElement(Text43, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, endpoint), block.props.description && /* @__PURE__ */ React89.createElement(Text43, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
8417
+ return /* @__PURE__ */ React93.createElement(Card19, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React93.createElement(Badge12, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React93.createElement(Group27, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React93.createElement(Group27, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React93.createElement(ActionIcon14, { variant: "light", color: "violet", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "square-check")), /* @__PURE__ */ React93.createElement(Stack70, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React93.createElement(Group27, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React93.createElement(Badge12, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React93.createElement(Text45, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request")), /* @__PURE__ */ React93.createElement(Text45, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, endpoint), block.props.description && /* @__PURE__ */ React93.createElement(Text45, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
7664
8418
  };
7665
8419
 
7666
8420
  // src/mantine/blocks/apiRequest/flow/FlowView.tsx
7667
- import React90, { useState as useState23 } from "react";
7668
- import { Card as Card20, Group as Group25, Stack as Stack69, Text as Text44, ActionIcon as ActionIcon12, Tooltip as Tooltip4, Button as Button18, Badge as Badge11, Collapse as Collapse2, Code, Loader as Loader4, Alert as Alert9 } from "@mantine/core";
7669
- import { IconSend, IconChevronDown as IconChevronDown2, IconChevronUp as IconChevronUp2 } from "@tabler/icons-react";
8421
+ import React94, { useState as useState25 } from "react";
8422
+ import { Card as Card20, Group as Group28, Stack as Stack71, Text as Text46, ActionIcon as ActionIcon15, Tooltip as Tooltip6, Button as Button20, Badge as Badge13, Collapse as Collapse2, Code as Code2, Loader as Loader5, Alert as Alert10 } from "@mantine/core";
8423
+ import { IconSend, IconChevronDown as IconChevronDown2, IconChevronUp as IconChevronUp2, IconAlertTriangle } from "@tabler/icons-react";
7670
8424
  var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
7671
8425
  const disabled = isDisabled?.isDisabled === "disable";
7672
- const [isLoading, setIsLoading] = useState23(false);
7673
- const [showDetails, setShowDetails] = useState23(false);
8426
+ const [isLoading, setIsLoading] = useState25(false);
8427
+ const [showDetails, setShowDetails] = useState25(false);
8428
+ const [validationWarnings, setValidationWarnings] = useState25([]);
7674
8429
  const method = block.props.method || "GET";
7675
8430
  const endpoint = block.props.endpoint || "";
7676
8431
  const headers = (() => {
@@ -7724,17 +8479,23 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
7724
8479
  props: { ...block.props, status: "loading", response: "" }
7725
8480
  });
7726
8481
  try {
8482
+ const editorDocument = editor?.document || [];
8483
+ const resolvedEndpoint = resolveReferences(endpoint, editorDocument);
7727
8484
  const headersObj = {};
7728
8485
  headers.forEach((h) => {
7729
8486
  if (h.key && h.value) {
7730
- headersObj[h.key] = h.value;
8487
+ const resolvedKey = resolveReferences(h.key, editorDocument);
8488
+ const resolvedValue = resolveReferences(h.value, editorDocument);
8489
+ headersObj[resolvedKey] = resolvedValue;
7731
8490
  }
7732
8491
  });
7733
8492
  const bodyObj = {};
7734
8493
  if (method !== "GET") {
7735
8494
  body.forEach((b) => {
7736
8495
  if (b.key && b.value) {
7737
- bodyObj[b.key] = b.value;
8496
+ const resolvedKey = resolveReferences(b.key, editorDocument);
8497
+ const resolvedValue = resolveReferences(b.value, editorDocument);
8498
+ bodyObj[resolvedKey] = resolvedValue;
7738
8499
  }
7739
8500
  });
7740
8501
  }
@@ -7748,21 +8509,24 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
7748
8509
  if (method !== "GET" && Object.keys(bodyObj).length > 0) {
7749
8510
  fetchOptions.body = JSON.stringify(bodyObj);
7750
8511
  }
7751
- const apiResponse = await fetch(endpoint, fetchOptions);
8512
+ const apiResponse = await fetch(resolvedEndpoint, fetchOptions);
7752
8513
  const responseData = await apiResponse.json();
8514
+ const schema = parseResponseSchema(block.props.responseSchema);
8515
+ if (schema && schema.fields.length > 0) {
8516
+ const errors = validateResponseAgainstSchema(responseData, schema);
8517
+ if (errors.length > 0) {
8518
+ console.warn("Response validation warnings:", errors);
8519
+ setValidationWarnings(errors);
8520
+ setShowDetails(true);
8521
+ } else {
8522
+ setValidationWarnings([]);
8523
+ }
8524
+ }
7753
8525
  editor.updateBlock(block, {
7754
8526
  props: {
7755
8527
  ...block.props,
7756
8528
  status: apiResponse.ok ? "success" : "error",
7757
- response: JSON.stringify(
7758
- {
7759
- status: apiResponse.status,
7760
- statusText: apiResponse.statusText,
7761
- data: responseData
7762
- },
7763
- null,
7764
- 2
7765
- )
8529
+ response: JSON.stringify(responseData, null, 2)
7766
8530
  }
7767
8531
  });
7768
8532
  } catch (error) {
@@ -7783,21 +8547,21 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
7783
8547
  setIsLoading(false);
7784
8548
  }
7785
8549
  };
7786
- const executeButton = /* @__PURE__ */ React90.createElement(
7787
- Button18,
8550
+ const executeButton = /* @__PURE__ */ React94.createElement(
8551
+ Button20,
7788
8552
  {
7789
8553
  size: "sm",
7790
8554
  variant: "light",
7791
8555
  color: getMethodColor(method),
7792
- leftSection: isLoading ? /* @__PURE__ */ React90.createElement(Loader4, { size: 14 }) : /* @__PURE__ */ React90.createElement(IconSend, { size: 14 }),
8556
+ leftSection: isLoading ? /* @__PURE__ */ React94.createElement(Loader5, { size: 14 }) : /* @__PURE__ */ React94.createElement(IconSend, { size: 14 }),
7793
8557
  onClick: handleExecuteRequest,
7794
8558
  disabled: disabled || isLoading || !endpoint,
7795
8559
  style: { flexShrink: 0 }
7796
8560
  },
7797
8561
  isLoading ? "Sending..." : "Execute"
7798
8562
  );
7799
- return /* @__PURE__ */ React90.createElement(Card20, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React90.createElement(Stack69, { gap: "md" }, /* @__PURE__ */ React90.createElement(Group25, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React90.createElement(Group25, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React90.createElement(ActionIcon12, { variant: "light", color: "violet", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "square-check")), /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React90.createElement(Group25, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React90.createElement(Badge11, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React90.createElement(Text44, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request"), status !== "idle" && /* @__PURE__ */ React90.createElement(Badge11, { size: "xs", variant: "dot", color: getStatusColor(status) }, status)), /* @__PURE__ */ React90.createElement(
7800
- Text44,
8563
+ return /* @__PURE__ */ React94.createElement(Card20, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React94.createElement(Stack71, { gap: "md" }, /* @__PURE__ */ React94.createElement(Group28, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React94.createElement(Group28, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React94.createElement(ActionIcon15, { variant: "light", color: "violet", size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "square-check")), /* @__PURE__ */ React94.createElement(Stack71, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React94.createElement(Group28, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React94.createElement(Badge13, { size: "sm", variant: "filled", color: getMethodColor(method) }, method), /* @__PURE__ */ React94.createElement(Text46, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "API Request"), status !== "idle" && /* @__PURE__ */ React94.createElement(Badge13, { size: "xs", variant: "dot", color: getStatusColor(status) }, status)), /* @__PURE__ */ React94.createElement(
8564
+ Text46,
7801
8565
  {
7802
8566
  size: "xs",
7803
8567
  c: "dimmed",
@@ -7809,7 +8573,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
7809
8573
  }
7810
8574
  },
7811
8575
  endpoint || "No endpoint configured"
7812
- ), block.props.description && /* @__PURE__ */ React90.createElement(Text44, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React90.createElement(Group25, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React90.createElement(Tooltip4, { label: isDisabled.message, position: "left", withArrow: true }, executeButton) : executeButton, /* @__PURE__ */ React90.createElement(ActionIcon12, { variant: "subtle", onClick: () => setShowDetails(!showDetails), disabled: headers.length === 0 && body.length === 0 && !response }, showDetails ? /* @__PURE__ */ React90.createElement(IconChevronUp2, { size: 16 }) : /* @__PURE__ */ React90.createElement(IconChevronDown2, { size: 16 })))), /* @__PURE__ */ React90.createElement(Collapse2, { in: showDetails }, /* @__PURE__ */ React90.createElement(Stack69, { gap: "md" }, headers.length > 0 && /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text44, { size: "xs", fw: 600, c: "dimmed" }, "Headers:"), /* @__PURE__ */ React90.createElement(Code, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
8576
+ ), block.props.description && /* @__PURE__ */ React94.createElement(Text46, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React94.createElement(Group28, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React94.createElement(Tooltip6, { label: isDisabled.message, position: "left", withArrow: true }, executeButton) : executeButton, /* @__PURE__ */ React94.createElement(ActionIcon15, { variant: "subtle", onClick: () => setShowDetails(!showDetails), disabled: headers.length === 0 && body.length === 0 && !response }, showDetails ? /* @__PURE__ */ React94.createElement(IconChevronUp2, { size: 16 }) : /* @__PURE__ */ React94.createElement(IconChevronDown2, { size: 16 })))), /* @__PURE__ */ React94.createElement(Collapse2, { in: showDetails }, /* @__PURE__ */ React94.createElement(Stack71, { gap: "md" }, validationWarnings.length > 0 && /* @__PURE__ */ React94.createElement(Alert10, { icon: /* @__PURE__ */ React94.createElement(IconAlertTriangle, { size: 16 }), title: "Schema Validation Warnings", color: "yellow" }, /* @__PURE__ */ React94.createElement(Stack71, { gap: "xs" }, /* @__PURE__ */ React94.createElement(Text46, { size: "xs" }, "The API response does not match the defined schema:"), validationWarnings.map((warning, index) => /* @__PURE__ */ React94.createElement(Text46, { key: index, size: "xs", c: "dimmed" }, "\u2022 ", warning)))), headers.length > 0 && /* @__PURE__ */ React94.createElement(Stack71, { gap: "xs" }, /* @__PURE__ */ React94.createElement(Text46, { size: "xs", fw: 600, c: "dimmed" }, "Headers:"), /* @__PURE__ */ React94.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
7813
8577
  headers.reduce(
7814
8578
  (acc, h) => {
7815
8579
  if (h.key && h.value) acc[h.key] = h.value;
@@ -7819,7 +8583,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
7819
8583
  ),
7820
8584
  null,
7821
8585
  2
7822
- ))), method !== "GET" && body.length > 0 && /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text44, { size: "xs", fw: 600, c: "dimmed" }, "Body:"), /* @__PURE__ */ React90.createElement(Code, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
8586
+ ))), method !== "GET" && body.length > 0 && /* @__PURE__ */ React94.createElement(Stack71, { gap: "xs" }, /* @__PURE__ */ React94.createElement(Text46, { size: "xs", fw: 600, c: "dimmed" }, "Body:"), /* @__PURE__ */ React94.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
7823
8587
  body.reduce(
7824
8588
  (acc, b) => {
7825
8589
  if (b.key && b.value) acc[b.key] = b.value;
@@ -7829,7 +8593,7 @@ var ApiRequestFlowView = ({ editor, block, isDisabled }) => {
7829
8593
  ),
7830
8594
  null,
7831
8595
  2
7832
- ))), response && /* @__PURE__ */ React90.createElement(Stack69, { gap: "xs" }, /* @__PURE__ */ React90.createElement(Text44, { size: "xs", fw: 600, c: "dimmed" }, "Response:"), status === "error" ? /* @__PURE__ */ React90.createElement(Alert9, { color: "red", title: "Error", styles: { message: { fontSize: "11px" } } }, /* @__PURE__ */ React90.createElement(Code, { block: true, style: { fontSize: "11px" } }, response)) : /* @__PURE__ */ React90.createElement(Code, { block: true, style: { fontSize: "11px", maxHeight: "300px", overflow: "auto" } }, response))))));
8596
+ ))), response && /* @__PURE__ */ React94.createElement(Stack71, { gap: "xs" }, /* @__PURE__ */ React94.createElement(Text46, { size: "xs", fw: 600, c: "dimmed" }, "Response:"), status === "error" ? /* @__PURE__ */ React94.createElement(Alert10, { color: "red", title: "Error", styles: { message: { fontSize: "11px" } } }, /* @__PURE__ */ React94.createElement(Code2, { block: true, style: { fontSize: "11px" } }, response)) : /* @__PURE__ */ React94.createElement(Code2, { block: true, style: { fontSize: "11px", maxHeight: "300px", overflow: "auto" } }, response))))));
7833
8597
  };
7834
8598
 
7835
8599
  // src/mantine/blocks/apiRequest/ApiRequestBlock.tsx
@@ -7837,7 +8601,7 @@ function ApiRequestBlock({ editor, block }) {
7837
8601
  const { docType } = useBlocknoteContext();
7838
8602
  const { actions } = useBlockConditions(block, editor);
7839
8603
  if (docType === "template") {
7840
- return /* @__PURE__ */ React91.createElement(ApiRequestTemplateView, { editor, block });
8604
+ return /* @__PURE__ */ React95.createElement(ApiRequestTemplateView, { editor, block });
7841
8605
  }
7842
8606
  const conditionConfig = parseConditionConfig(block.props.conditions);
7843
8607
  const hasVisibility = hasVisibilityConditions(conditionConfig);
@@ -7849,7 +8613,7 @@ function ApiRequestBlock({ editor, block }) {
7849
8613
  const hasEnable = hasEnableConditions(conditionConfig);
7850
8614
  const enableActionExists = actions.some((a) => a.action === "enable");
7851
8615
  const shouldDisable = hasEnable && !enableActionExists;
7852
- return /* @__PURE__ */ React91.createElement(
8616
+ return /* @__PURE__ */ React95.createElement(
7853
8617
  ApiRequestFlowView,
7854
8618
  {
7855
8619
  block,
@@ -7894,6 +8658,9 @@ var ApiRequestBlockSpec = createReactBlockSpec5(
7894
8658
  status: {
7895
8659
  default: "idle"
7896
8660
  },
8661
+ responseSchema: {
8662
+ default: ""
8663
+ },
7897
8664
  conditions: {
7898
8665
  default: ""
7899
8666
  }
@@ -7903,37 +8670,37 @@ var ApiRequestBlockSpec = createReactBlockSpec5(
7903
8670
  {
7904
8671
  render: (props) => {
7905
8672
  const ixoProps = props;
7906
- return /* @__PURE__ */ React92.createElement(ApiRequestBlock, { ...ixoProps });
8673
+ return /* @__PURE__ */ React96.createElement(ApiRequestBlock, { ...ixoProps });
7907
8674
  }
7908
8675
  }
7909
8676
  );
7910
8677
 
7911
8678
  // src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
7912
- import React99, { useState as useState25, useEffect as useEffect16, useMemo as useMemo13, useCallback as useCallback16 } from "react";
8679
+ import React103, { useState as useState27, useEffect as useEffect17, useMemo as useMemo17, useCallback as useCallback18 } from "react";
7913
8680
  import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react";
7914
- import { Stack as Stack75, Text as Text50, Button as Button23, ActionIcon as ActionIcon13, Center as Center3, Flex as Flex19 } from "@mantine/core";
8681
+ import { Stack as Stack77, Text as Text52, Button as Button25, ActionIcon as ActionIcon16, Center as Center3, Flex as Flex19 } from "@mantine/core";
7915
8682
 
7916
8683
  // src/mantine/blocks/enumChecklist/oracle_personalities/index.tsx
7917
- import React93 from "react";
7918
- import { Box as Box17, Flex as Flex18, Stack as Stack70, Text as Text45, Image as Image13 } from "@mantine/core";
8684
+ import React97 from "react";
8685
+ import { Box as Box18, Flex as Flex18, Stack as Stack72, Text as Text47, Image as Image13 } from "@mantine/core";
7919
8686
  function OraclePersonalitiesEnumList({ selectionMode, isItemChecked, onItemCheck, items }) {
7920
8687
  if (!items || items.length === 0) {
7921
- return /* @__PURE__ */ React93.createElement(Text45, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No assets found");
8688
+ return /* @__PURE__ */ React97.createElement(Text47, { size: "sm", c: "dimmed", ta: "center", py: "md" }, "No assets found");
7922
8689
  }
7923
- const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */ React93.createElement(ListItemContainer, { key: id }, /* @__PURE__ */ React93.createElement(Flex18, { align: "center", gap: "sm" }, /* @__PURE__ */ React93.createElement(Image13, { radius: 16, w: 62, h: 62, src: icon, alt: name }), /* @__PURE__ */ React93.createElement(Stack70, { gap: 0 }, /* @__PURE__ */ React93.createElement(Text45, { size: "sm", fw: 500 }, name || "-"), description !== void 0 && /* @__PURE__ */ React93.createElement(Text45, { size: "sm", c: "dimmed" }, description))), /* @__PURE__ */ React93.createElement(Flex18, { align: "center", gap: "md" }, /* @__PURE__ */ React93.createElement(Stack70, { ta: "right", gap: 0 }, /* @__PURE__ */ React93.createElement(Text45, { size: "sm", fw: 500 }, "Voice"), /* @__PURE__ */ React93.createElement(Text45, { size: "sm", c: "dimmed" }, voice)), selectionMode && /* @__PURE__ */ React93.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${name}`, checked: isItemChecked?.(id), onCheck: (checked) => onItemCheck?.(id, checked) }))));
7924
- return /* @__PURE__ */ React93.createElement(Box17, { flex: 1 }, /* @__PURE__ */ React93.createElement(Stack70, null, rows));
8690
+ const rows = items.map(({ id, name, description, voice, icon }) => /* @__PURE__ */ React97.createElement(ListItemContainer, { key: id }, /* @__PURE__ */ React97.createElement(Flex18, { align: "center", gap: "sm" }, /* @__PURE__ */ React97.createElement(Image13, { radius: 16, w: 62, h: 62, src: icon, alt: name }), /* @__PURE__ */ React97.createElement(Stack72, { gap: 0 }, /* @__PURE__ */ React97.createElement(Text47, { size: "sm", fw: 500 }, name || "-"), description !== void 0 && /* @__PURE__ */ React97.createElement(Text47, { size: "sm", c: "dimmed" }, description))), /* @__PURE__ */ React97.createElement(Flex18, { align: "center", gap: "md" }, /* @__PURE__ */ React97.createElement(Stack72, { ta: "right", gap: 0 }, /* @__PURE__ */ React97.createElement(Text47, { size: "sm", fw: 500 }, "Voice"), /* @__PURE__ */ React97.createElement(Text47, { size: "sm", c: "dimmed" }, voice)), selectionMode && /* @__PURE__ */ React97.createElement(ListItemCheckbox, { ariaLabel: `Select oracle ${name}`, checked: isItemChecked?.(id), onCheck: (checked) => onItemCheck?.(id, checked) }))));
8691
+ return /* @__PURE__ */ React97.createElement(Box18, { flex: 1 }, /* @__PURE__ */ React97.createElement(Stack72, null, rows));
7925
8692
  }
7926
8693
 
7927
8694
  // src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
7928
- import React98, { useState as useState24 } from "react";
7929
- import { Modal, Group as Group29, Box as Box19 } from "@mantine/core";
8695
+ import React102, { useState as useState26 } from "react";
8696
+ import { Modal, Group as Group32, Box as Box20 } from "@mantine/core";
7930
8697
 
7931
8698
  // src/mantine/blocks/list/modal/ModalNavigation.tsx
7932
- import React94 from "react";
7933
- import { Stack as Stack71, Button as Button19, Text as Text46 } from "@mantine/core";
8699
+ import React98 from "react";
8700
+ import { Stack as Stack73, Button as Button21, Text as Text48 } from "@mantine/core";
7934
8701
  var ModalNavigation = ({ steps, activeStep, onStepChange, showUpdateButton = false, onUpdateBlock }) => {
7935
- return /* @__PURE__ */ React94.createElement(Stack71, { gap: "xs", style: { height: "100%" } }, /* @__PURE__ */ React94.createElement(Stack71, { gap: "xs", style: { flex: 1 } }, steps.map((step) => /* @__PURE__ */ React94.createElement(
7936
- Button19,
8702
+ return /* @__PURE__ */ React98.createElement(Stack73, { gap: "xs", style: { height: "100%" } }, /* @__PURE__ */ React98.createElement(Stack73, { gap: "xs", style: { flex: 1 } }, steps.map((step) => /* @__PURE__ */ React98.createElement(
8703
+ Button21,
7937
8704
  {
7938
8705
  key: step.id,
7939
8706
  variant: activeStep === step.id ? "filled" : "subtle",
@@ -7950,13 +8717,13 @@ var ModalNavigation = ({ steps, activeStep, onStepChange, showUpdateButton = fal
7950
8717
  }
7951
8718
  }
7952
8719
  },
7953
- /* @__PURE__ */ React94.createElement(Stack71, { gap: 2, align: "flex-start" }, /* @__PURE__ */ React94.createElement(Text46, { size: "sm", fw: 500 }, step.label), /* @__PURE__ */ React94.createElement(Text46, { size: "xs", opacity: 0.7 }, step.description))
7954
- ))), showUpdateButton && /* @__PURE__ */ React94.createElement(Button19, { variant: "filled", color: "blue", onClick: onUpdateBlock, style: { marginTop: "auto" } }, "Update Block"));
8720
+ /* @__PURE__ */ React98.createElement(Stack73, { gap: 2, align: "flex-start" }, /* @__PURE__ */ React98.createElement(Text48, { size: "sm", fw: 500 }, step.label), /* @__PURE__ */ React98.createElement(Text48, { size: "xs", opacity: 0.7 }, step.description))
8721
+ ))), showUpdateButton && /* @__PURE__ */ React98.createElement(Button21, { variant: "filled", color: "blue", onClick: onUpdateBlock, style: { marginTop: "auto" } }, "Update Block"));
7955
8722
  };
7956
8723
 
7957
8724
  // src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
7958
- import React95 from "react";
7959
- import { Stack as Stack72, Card as Card21, Group as Group26, Text as Text47, Box as Box18, Button as Button20 } from "@mantine/core";
8725
+ import React99 from "react";
8726
+ import { Stack as Stack74, Card as Card21, Group as Group29, Text as Text49, Box as Box19, Button as Button22 } from "@mantine/core";
7960
8727
 
7961
8728
  // src/mantine/blocks/enumChecklist/oracle_personalities/config.ts
7962
8729
  var oraclePersonalitiesMetadata = {
@@ -8085,7 +8852,7 @@ function getEnumListItems(type) {
8085
8852
  // src/mantine/blocks/enumChecklist/EnumChecklistTypeSelection.tsx
8086
8853
  var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
8087
8854
  const enumListsMeta = getEnumListTypesMetadata();
8088
- return /* @__PURE__ */ React95.createElement(Stack72, { gap: "md" }, /* @__PURE__ */ React95.createElement("div", null, /* @__PURE__ */ React95.createElement(Text47, { size: "lg", fw: 600, mb: "xs" }, "Choose List Type"), /* @__PURE__ */ React95.createElement(Text47, { size: "sm", c: "dimmed" }, "Select the type of list you want to create")), /* @__PURE__ */ React95.createElement(Stack72, { gap: "sm" }, enumListsMeta.map((enumChecklistMeta) => /* @__PURE__ */ React95.createElement(
8855
+ return /* @__PURE__ */ React99.createElement(Stack74, { gap: "md" }, /* @__PURE__ */ React99.createElement("div", null, /* @__PURE__ */ React99.createElement(Text49, { size: "lg", fw: 600, mb: "xs" }, "Choose List Type"), /* @__PURE__ */ React99.createElement(Text49, { size: "sm", c: "dimmed" }, "Select the type of list you want to create")), /* @__PURE__ */ React99.createElement(Stack74, { gap: "sm" }, enumListsMeta.map((enumChecklistMeta) => /* @__PURE__ */ React99.createElement(
8089
8856
  Card21,
8090
8857
  {
8091
8858
  key: enumChecklistMeta.id,
@@ -8098,8 +8865,8 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
8098
8865
  },
8099
8866
  onClick: () => onTypeSelect(enumChecklistMeta.id)
8100
8867
  },
8101
- /* @__PURE__ */ React95.createElement(Group26, { gap: "md", align: "flex-start" }, /* @__PURE__ */ React95.createElement(
8102
- Box18,
8868
+ /* @__PURE__ */ React99.createElement(Group29, { gap: "md", align: "flex-start" }, /* @__PURE__ */ React99.createElement(
8869
+ Box19,
8103
8870
  {
8104
8871
  style: {
8105
8872
  width: 48,
@@ -8114,36 +8881,36 @@ var EnumChecklistTypeSelection = ({ selectedType, onTypeSelect, onNext }) => {
8114
8881
  }
8115
8882
  },
8116
8883
  enumChecklistMeta.icon
8117
- ), /* @__PURE__ */ React95.createElement(Stack72, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React95.createElement(Text47, { size: "md", fw: 600 }, enumChecklistMeta.name), /* @__PURE__ */ React95.createElement(Text47, { size: "sm", c: "dimmed" }, enumChecklistMeta.description)))
8118
- ))), /* @__PURE__ */ React95.createElement(Group26, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React95.createElement(Button20, { onClick: onNext, disabled: !selectedType }, "Next")));
8884
+ ), /* @__PURE__ */ React99.createElement(Stack74, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React99.createElement(Text49, { size: "md", fw: 600 }, enumChecklistMeta.name), /* @__PURE__ */ React99.createElement(Text49, { size: "sm", c: "dimmed" }, enumChecklistMeta.description)))
8885
+ ))), /* @__PURE__ */ React99.createElement(Group29, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React99.createElement(Button22, { onClick: onNext, disabled: !selectedType }, "Next")));
8119
8886
  };
8120
8887
 
8121
8888
  // src/mantine/blocks/enumChecklist/EnumChecklistPreviewStep.tsx
8122
- import React96 from "react";
8123
- import { Stack as Stack73, Text as Text48, Button as Button21, Group as Group27 } from "@mantine/core";
8889
+ import React100 from "react";
8890
+ import { Stack as Stack75, Text as Text50, Button as Button23, Group as Group30 } from "@mantine/core";
8124
8891
  var EnumChecklistPreviewStep = ({ listType, onAddToBlock, onPrev }) => {
8125
8892
  const renderListComponent = () => {
8126
8893
  switch (listType) {
8127
8894
  case "oracle_personalities":
8128
- return /* @__PURE__ */ React96.createElement(OraclePersonalitiesEnumList, { items: getEnumListItems(listType) });
8895
+ return /* @__PURE__ */ React100.createElement(OraclePersonalitiesEnumList, { items: getEnumListItems(listType) });
8129
8896
  default:
8130
8897
  return null;
8131
8898
  }
8132
8899
  };
8133
- return /* @__PURE__ */ React96.createElement(Stack73, { gap: "md" }, /* @__PURE__ */ React96.createElement("div", null, /* @__PURE__ */ React96.createElement(Text48, { size: "lg", fw: 600, mb: "xs" }, "Preview ", getEnumListNameByType(listType)), /* @__PURE__ */ React96.createElement(Text48, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), /* @__PURE__ */ React96.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React96.createElement(Group27, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React96.createElement(Button21, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React96.createElement(Button21, { onClick: onAddToBlock }, "Add to Block")));
8900
+ return /* @__PURE__ */ React100.createElement(Stack75, { gap: "md" }, /* @__PURE__ */ React100.createElement("div", null, /* @__PURE__ */ React100.createElement(Text50, { size: "lg", fw: 600, mb: "xs" }, "Preview ", getEnumListNameByType(listType)), /* @__PURE__ */ React100.createElement(Text50, { size: "sm", c: "dimmed" }, "Preview how your list will look with the current configuration")), /* @__PURE__ */ React100.createElement("div", { style: { maxHeight: "400px", overflow: "auto" } }, renderListComponent()), /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React100.createElement(Button23, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React100.createElement(Button23, { onClick: onAddToBlock }, "Add to Block")));
8134
8901
  };
8135
8902
 
8136
8903
  // src/mantine/blocks/enumChecklist/EnumChecklistConfigurationStep.tsx
8137
- import React97 from "react";
8138
- import { Stack as Stack74, TextInput as TextInput35, Text as Text49, Button as Button22, Group as Group28, Switch as Switch4, Select as Select11 } from "@mantine/core";
8904
+ import React101 from "react";
8905
+ import { Stack as Stack76, TextInput as TextInput36, Text as Text51, Button as Button24, Group as Group31, Switch as Switch4, Select as Select13 } from "@mantine/core";
8139
8906
  var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onConfigChange, onPrev, onNext, isValid }) => {
8140
8907
  const typeConfig = ENUM_LIST_CONFIG[listType];
8141
8908
  const configFields = getEnumListTypesConfigFields(listType);
8142
8909
  const renderListConfigField = (field) => {
8143
8910
  switch (field.type) {
8144
8911
  case "text":
8145
- return /* @__PURE__ */ React97.createElement(
8146
- TextInput35,
8912
+ return /* @__PURE__ */ React101.createElement(
8913
+ TextInput36,
8147
8914
  {
8148
8915
  label: field.label,
8149
8916
  description: field.description,
@@ -8154,7 +8921,7 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
8154
8921
  }
8155
8922
  );
8156
8923
  case "switch":
8157
- return /* @__PURE__ */ React97.createElement(
8924
+ return /* @__PURE__ */ React101.createElement(
8158
8925
  Switch4,
8159
8926
  {
8160
8927
  label: field.label,
@@ -8164,8 +8931,8 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
8164
8931
  }
8165
8932
  );
8166
8933
  case "select":
8167
- return /* @__PURE__ */ React97.createElement(
8168
- Select11,
8934
+ return /* @__PURE__ */ React101.createElement(
8935
+ Select13,
8169
8936
  {
8170
8937
  label: field.label,
8171
8938
  description: field.description,
@@ -8177,8 +8944,8 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
8177
8944
  }
8178
8945
  );
8179
8946
  default:
8180
- return /* @__PURE__ */ React97.createElement(
8181
- TextInput35,
8947
+ return /* @__PURE__ */ React101.createElement(
8948
+ TextInput36,
8182
8949
  {
8183
8950
  label: field.label,
8184
8951
  description: field.description,
@@ -8190,14 +8957,14 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
8190
8957
  );
8191
8958
  }
8192
8959
  };
8193
- return /* @__PURE__ */ React97.createElement(Stack74, { gap: "md" }, /* @__PURE__ */ React97.createElement("div", null, /* @__PURE__ */ React97.createElement(Text49, { size: "lg", fw: 600, mb: "xs" }, "Configure ", typeConfig.metadata.name), /* @__PURE__ */ React97.createElement(Text49, { size: "sm", c: "dimmed" }, typeConfig.metadata.description)), /* @__PURE__ */ React97.createElement(Stack74, { gap: "sm" }, configFields.map((field) => /* @__PURE__ */ React97.createElement("div", { key: field.key }, renderListConfigField(field)))), /* @__PURE__ */ React97.createElement(Group28, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React97.createElement(Button22, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React97.createElement(Button22, { onClick: onNext, disabled: !isValid }, "Next")));
8960
+ return /* @__PURE__ */ React101.createElement(Stack76, { gap: "md" }, /* @__PURE__ */ React101.createElement("div", null, /* @__PURE__ */ React101.createElement(Text51, { size: "lg", fw: 600, mb: "xs" }, "Configure ", typeConfig.metadata.name), /* @__PURE__ */ React101.createElement(Text51, { size: "sm", c: "dimmed" }, typeConfig.metadata.description)), /* @__PURE__ */ React101.createElement(Stack76, { gap: "sm" }, configFields.map((field) => /* @__PURE__ */ React101.createElement("div", { key: field.key }, renderListConfigField(field)))), /* @__PURE__ */ React101.createElement(Group31, { justify: "space-between", mt: "md" }, /* @__PURE__ */ React101.createElement(Button24, { variant: "subtle", onClick: onPrev }, "Previous"), /* @__PURE__ */ React101.createElement(Button24, { onClick: onNext, disabled: !isValid }, "Next")));
8194
8961
  };
8195
8962
 
8196
8963
  // src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
8197
8964
  var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
8198
- const [activeStep, setActiveStep] = useState24("type");
8199
- const [selectedType, setSelectedType] = useState24(initialConfig?.listType || null);
8200
- const [config, setConfig] = useState24(initialConfig?.listConfig || {});
8965
+ const [activeStep, setActiveStep] = useState26("type");
8966
+ const [selectedType, setSelectedType] = useState26(initialConfig?.listType || null);
8967
+ const [config, setConfig] = useState26(initialConfig?.listConfig || {});
8201
8968
  const handleTypeSelect = (type) => {
8202
8969
  setSelectedType(type);
8203
8970
  const configFieldsByType = getEnumListTypesConfigFields(type);
@@ -8252,9 +9019,9 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
8252
9019
  const renderStepContent = () => {
8253
9020
  switch (activeStep) {
8254
9021
  case "type":
8255
- return /* @__PURE__ */ React98.createElement(EnumChecklistTypeSelection, { selectedType, onTypeSelect: handleTypeSelect, onNext: () => setActiveStep("configure") });
9022
+ return /* @__PURE__ */ React102.createElement(EnumChecklistTypeSelection, { selectedType, onTypeSelect: handleTypeSelect, onNext: () => setActiveStep("configure") });
8256
9023
  case "configure":
8257
- return selectedType ? /* @__PURE__ */ React98.createElement(
9024
+ return selectedType ? /* @__PURE__ */ React102.createElement(
8258
9025
  EnumChecklistConfigurationStep,
8259
9026
  {
8260
9027
  enumChecklistType: selectedType,
@@ -8266,22 +9033,22 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
8266
9033
  }
8267
9034
  ) : null;
8268
9035
  case "preview":
8269
- return selectedType ? /* @__PURE__ */ React98.createElement(EnumChecklistPreviewStep, { listType: selectedType, onAddToBlock: handleAddToBlock, onPrev: () => setActiveStep("configure") }) : null;
9036
+ return selectedType ? /* @__PURE__ */ React102.createElement(EnumChecklistPreviewStep, { listType: selectedType, onAddToBlock: handleAddToBlock, onPrev: () => setActiveStep("configure") }) : null;
8270
9037
  default:
8271
9038
  return null;
8272
9039
  }
8273
9040
  };
8274
- return /* @__PURE__ */ React98.createElement(Modal, { opened, onClose: handleClose, title: "Configure Enum Checklist Block", size: "xl" }, /* @__PURE__ */ React98.createElement(Group29, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React98.createElement(Box19, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React98.createElement(ModalNavigation, { steps, activeStep, onStepChange: setActiveStep, showUpdateButton: selectedType !== null, onUpdateBlock: handleAddToBlock })), /* @__PURE__ */ React98.createElement(Box19, { style: { flex: 1 } }, renderStepContent())));
9041
+ return /* @__PURE__ */ React102.createElement(Modal, { opened, onClose: handleClose, title: "Configure Enum Checklist Block", size: "xl" }, /* @__PURE__ */ React102.createElement(Group32, { align: "flex-start", gap: "lg", style: { minHeight: "400px" } }, /* @__PURE__ */ React102.createElement(Box20, { style: { width: "200px", flexShrink: 0, height: "400px", display: "flex" } }, /* @__PURE__ */ React102.createElement(ModalNavigation, { steps, activeStep, onStepChange: setActiveStep, showUpdateButton: selectedType !== null, onUpdateBlock: handleAddToBlock })), /* @__PURE__ */ React102.createElement(Box20, { style: { flex: 1 } }, renderStepContent())));
8275
9042
  };
8276
9043
 
8277
9044
  // src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
8278
- var IconSettings2 = () => /* @__PURE__ */ React99.createElement("span", null, "\u2699\uFE0F");
9045
+ var IconSettings2 = () => /* @__PURE__ */ React103.createElement("span", null, "\u2699\uFE0F");
8279
9046
  var EnumChecklistBlockType = "enumChecklist";
8280
9047
  var EnumChecklistBlockContent = ({ block, editor }) => {
8281
- const [modalOpened, setModalOpened] = useState25(false);
9048
+ const [modalOpened, setModalOpened] = useState27(false);
8282
9049
  const { editable } = useBlocknoteContext();
8283
9050
  const listType = block.props.listType && block.props.listType !== "" ? block.props.listType : null;
8284
- const listConfig = useMemo13(() => {
9051
+ const listConfig = useMemo17(() => {
8285
9052
  if (block.props.listConfig && block.props.listConfig !== "{}") {
8286
9053
  try {
8287
9054
  return JSON.parse(block.props.listConfig);
@@ -8292,7 +9059,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
8292
9059
  }
8293
9060
  return {};
8294
9061
  }, [block.props.listConfig]);
8295
- const selectedIds = useMemo13(() => {
9062
+ const selectedIds = useMemo17(() => {
8296
9063
  if (block.props.selectedIds && block.props.selectedIds !== "[]") {
8297
9064
  try {
8298
9065
  return new Set(JSON.parse(block.props.selectedIds));
@@ -8303,7 +9070,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
8303
9070
  }
8304
9071
  return /* @__PURE__ */ new Set();
8305
9072
  }, [block.props.selectedIds]);
8306
- useEffect16(() => {
9073
+ useEffect17(() => {
8307
9074
  if (listConfig?.selection_mode === "single" && selectedIds.size > 1) {
8308
9075
  const arr = Array.from(selectedIds);
8309
9076
  const lastSelected = arr.length > 0 ? arr[arr.length - 1] : void 0;
@@ -8312,13 +9079,13 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
8312
9079
  });
8313
9080
  }
8314
9081
  }, [listConfig?.selection_mode, selectedIds]);
8315
- const isItemChecked = useCallback16(
9082
+ const isItemChecked = useCallback18(
8316
9083
  (id) => {
8317
9084
  return selectedIds.has(id);
8318
9085
  },
8319
9086
  [selectedIds]
8320
9087
  );
8321
- const onItemCheck = useCallback16(
9088
+ const onItemCheck = useCallback18(
8322
9089
  (id, checked) => {
8323
9090
  const currentSelectedIds = Array.from(selectedIds);
8324
9091
  let newSelectedIds;
@@ -8361,7 +9128,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
8361
9128
  if (!listType) return null;
8362
9129
  switch (listType) {
8363
9130
  case "oracle_personalities":
8364
- return /* @__PURE__ */ React99.createElement(
9131
+ return /* @__PURE__ */ React103.createElement(
8365
9132
  OraclePersonalitiesEnumList,
8366
9133
  {
8367
9134
  items: getEnumListItems(listType),
@@ -8374,7 +9141,7 @@ var EnumChecklistBlockContent = ({ block, editor }) => {
8374
9141
  return null;
8375
9142
  }
8376
9143
  };
8377
- return /* @__PURE__ */ React99.createElement(Stack75, { w: "100%" }, listType && /* @__PURE__ */ React99.createElement(Flex19, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React99.createElement(Text50, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React99.createElement(Text50, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React99.createElement(Flex19, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React99.createElement(Flex19, { gap: "xs" }, /* @__PURE__ */ React99.createElement(ActionIcon13, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React99.createElement(IconSettings2, null))))), /* @__PURE__ */ React99.createElement(Flex19, { flex: 1 }, !listType ? /* @__PURE__ */ React99.createElement(Center3, { py: "xl" }, /* @__PURE__ */ React99.createElement(Stack75, { align: "center", gap: "sm" }, /* @__PURE__ */ React99.createElement(Text50, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React99.createElement(Button23, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : /* @__PURE__ */ React99.createElement(Stack75, { gap: "md", flex: 1 }, renderListComponent())), /* @__PURE__ */ React99.createElement(
9144
+ return /* @__PURE__ */ React103.createElement(Stack77, { w: "100%" }, listType && /* @__PURE__ */ React103.createElement(Flex19, { align: "center", justify: "space-between", gap: "xs" }, /* @__PURE__ */ React103.createElement(Text52, null, getEnumListNameByType(listType)), listConfig.listSelectionMode && /* @__PURE__ */ React103.createElement(Text52, { lh: 0.5, c: "dimmed" }, listConfig?.selection_mode === "single" ? "Single Selection" : "Multi Selection"), editable && /* @__PURE__ */ React103.createElement(Flex19, { justify: listType ? "space-between" : "flex-end" }, /* @__PURE__ */ React103.createElement(Flex19, { gap: "xs" }, /* @__PURE__ */ React103.createElement(ActionIcon16, { variant: "subtle", size: "sm", onClick: () => setModalOpened(true) }, /* @__PURE__ */ React103.createElement(IconSettings2, null))))), /* @__PURE__ */ React103.createElement(Flex19, { flex: 1 }, !listType ? /* @__PURE__ */ React103.createElement(Center3, { py: "xl" }, /* @__PURE__ */ React103.createElement(Stack77, { align: "center", gap: "sm" }, /* @__PURE__ */ React103.createElement(Text52, { size: "sm", c: "dimmed", ta: "center" }, "No list type configured"), /* @__PURE__ */ React103.createElement(Button25, { size: "sm", variant: "light", onClick: () => setModalOpened(true) }, "Configure List"))) : /* @__PURE__ */ React103.createElement(Stack77, { gap: "md", flex: 1 }, renderListComponent())), /* @__PURE__ */ React103.createElement(
8378
9145
  EnumChecklistConfigModal,
8379
9146
  {
8380
9147
  opened: modalOpened,
@@ -8406,28 +9173,28 @@ var EnumChecklistBlock = createReactBlockSpec6(
8406
9173
  content: "none"
8407
9174
  },
8408
9175
  {
8409
- render: (props) => /* @__PURE__ */ React99.createElement(EnumChecklistBlockContent, { ...props })
9176
+ render: (props) => /* @__PURE__ */ React103.createElement(EnumChecklistBlockContent, { ...props })
8410
9177
  }
8411
9178
  );
8412
9179
 
8413
9180
  // src/mantine/blocks/notify/NotifyBlockSpec.tsx
8414
- import React105 from "react";
9181
+ import React109 from "react";
8415
9182
  import { createReactBlockSpec as createReactBlockSpec7 } from "@blocknote/react";
8416
9183
 
8417
9184
  // src/mantine/blocks/notify/NotifyBlock.tsx
8418
- import React104 from "react";
9185
+ import React108 from "react";
8419
9186
 
8420
9187
  // src/mantine/blocks/notify/template/TemplateView.tsx
8421
- import React102, { useMemo as useMemo14 } from "react";
9188
+ import React106, { useMemo as useMemo18 } from "react";
8422
9189
 
8423
9190
  // src/mantine/blocks/notify/template/TemplateConfig.tsx
8424
- import React101, { useCallback as useCallback17 } from "react";
8425
- import { Paper as Paper11, CloseButton as CloseButton7, Title as Title8 } from "@mantine/core";
9191
+ import React105, { useCallback as useCallback19 } from "react";
9192
+ import { Paper as Paper12, CloseButton as CloseButton7, Title as Title8 } from "@mantine/core";
8426
9193
 
8427
9194
  // src/mantine/blocks/notify/template/GeneralTab.tsx
8428
- import React100, { useEffect as useEffect17, useState as useState26 } from "react";
8429
- import { Divider as Divider6, Select as Select12, Stack as Stack76, Text as Text51, TextInput as TextInput36, Textarea as Textarea20, Button as Button24, Group as Group30, ActionIcon as ActionIcon14, Paper as Paper10 } from "@mantine/core";
8430
- import { IconTrash as IconTrash2, IconPlus as IconPlus2 } from "@tabler/icons-react";
9195
+ import React104, { useEffect as useEffect18, useState as useState28 } from "react";
9196
+ import { Divider as Divider6, Select as Select14, Stack as Stack78, Text as Text53, TextInput as TextInput37, Textarea as Textarea21, Button as Button26, Group as Group33, ActionIcon as ActionIcon17, Paper as Paper11 } from "@mantine/core";
9197
+ import { IconTrash as IconTrash3, IconPlus as IconPlus3 } from "@tabler/icons-react";
8431
9198
  var GeneralTab5 = ({
8432
9199
  title,
8433
9200
  description,
@@ -8450,30 +9217,32 @@ var GeneralTab5 = ({
8450
9217
  onBodyChange,
8451
9218
  onBodyTypeChange,
8452
9219
  onFromChange,
8453
- onReplyToChange
9220
+ onReplyToChange,
9221
+ editor,
9222
+ blockId
8454
9223
  }) => {
8455
- const [localTitle, setLocalTitle] = useState26(title || "");
8456
- const [localDescription, setLocalDescription] = useState26(description || "");
8457
- const [localChannel, setLocalChannel] = useState26(channel || "email");
8458
- const [localTo, setLocalTo] = useState26(to || []);
8459
- const [localCc, setLocalCc] = useState26(cc || []);
8460
- const [localBcc, setLocalBcc] = useState26(bcc || []);
8461
- const [localSubject, setLocalSubject] = useState26(subject || "");
8462
- const [localBody, setLocalBody] = useState26(body || "");
8463
- const [localBodyType, setLocalBodyType] = useState26(bodyType || "text");
8464
- const [localFrom, setLocalFrom] = useState26(from || "");
8465
- const [localReplyTo, setLocalReplyTo] = useState26(replyTo || "");
8466
- useEffect17(() => setLocalTitle(title || ""), [title]);
8467
- useEffect17(() => setLocalDescription(description || ""), [description]);
8468
- useEffect17(() => setLocalChannel(channel || "email"), [channel]);
8469
- useEffect17(() => setLocalTo(to || []), [to]);
8470
- useEffect17(() => setLocalCc(cc || []), [cc]);
8471
- useEffect17(() => setLocalBcc(bcc || []), [bcc]);
8472
- useEffect17(() => setLocalSubject(subject || ""), [subject]);
8473
- useEffect17(() => setLocalBody(body || ""), [body]);
8474
- useEffect17(() => setLocalBodyType(bodyType || "text"), [bodyType]);
8475
- useEffect17(() => setLocalFrom(from || ""), [from]);
8476
- useEffect17(() => setLocalReplyTo(replyTo || ""), [replyTo]);
9224
+ const [localTitle, setLocalTitle] = useState28(title || "");
9225
+ const [localDescription, setLocalDescription] = useState28(description || "");
9226
+ const [localChannel, setLocalChannel] = useState28(channel || "email");
9227
+ const [localTo, setLocalTo] = useState28(to || []);
9228
+ const [localCc, setLocalCc] = useState28(cc || []);
9229
+ const [localBcc, setLocalBcc] = useState28(bcc || []);
9230
+ const [localSubject, setLocalSubject] = useState28(subject || "");
9231
+ const [localBody, setLocalBody] = useState28(body || "");
9232
+ const [localBodyType, setLocalBodyType] = useState28(bodyType || "text");
9233
+ const [localFrom, setLocalFrom] = useState28(from || "");
9234
+ const [localReplyTo, setLocalReplyTo] = useState28(replyTo || "");
9235
+ useEffect18(() => setLocalTitle(title || ""), [title]);
9236
+ useEffect18(() => setLocalDescription(description || ""), [description]);
9237
+ useEffect18(() => setLocalChannel(channel || "email"), [channel]);
9238
+ useEffect18(() => setLocalTo(to || []), [to]);
9239
+ useEffect18(() => setLocalCc(cc || []), [cc]);
9240
+ useEffect18(() => setLocalBcc(bcc || []), [bcc]);
9241
+ useEffect18(() => setLocalSubject(subject || ""), [subject]);
9242
+ useEffect18(() => setLocalBody(body || ""), [body]);
9243
+ useEffect18(() => setLocalBodyType(bodyType || "text"), [bodyType]);
9244
+ useEffect18(() => setLocalFrom(from || ""), [from]);
9245
+ useEffect18(() => setLocalReplyTo(replyTo || ""), [replyTo]);
8477
9246
  const handleAddRecipient = (type) => {
8478
9247
  const setter = type === "to" ? setLocalTo : type === "cc" ? setLocalCc : setLocalBcc;
8479
9248
  const callback = type === "to" ? onToChange : type === "cc" ? onCcChange : onBccChange;
@@ -8499,8 +9268,8 @@ var GeneralTab5 = ({
8499
9268
  setter(newRecipients);
8500
9269
  callback(newRecipients);
8501
9270
  };
8502
- return /* @__PURE__ */ React100.createElement(Stack76, { gap: "lg" }, /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React100.createElement(
8503
- TextInput36,
9271
+ return /* @__PURE__ */ React104.createElement(Stack78, { gap: "lg" }, /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "Title"), /* @__PURE__ */ React104.createElement(
9272
+ TextInput37,
8504
9273
  {
8505
9274
  placeholder: "e.g. Welcome Email",
8506
9275
  value: localTitle,
@@ -8510,8 +9279,8 @@ var GeneralTab5 = ({
8510
9279
  onTitleChange(newTitle);
8511
9280
  }
8512
9281
  }
8513
- )), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React100.createElement(
8514
- Textarea20,
9282
+ )), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "Description"), /* @__PURE__ */ React104.createElement(
9283
+ Textarea21,
8515
9284
  {
8516
9285
  placeholder: "Describe what this notification does",
8517
9286
  minRows: 2,
@@ -8522,8 +9291,8 @@ var GeneralTab5 = ({
8522
9291
  onDescriptionChange(newDescription);
8523
9292
  }
8524
9293
  }
8525
- )), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Channel"), /* @__PURE__ */ React100.createElement(
8526
- Select12,
9294
+ )), /* @__PURE__ */ React104.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "Channel"), /* @__PURE__ */ React104.createElement(
9295
+ Select14,
8527
9296
  {
8528
9297
  value: localChannel,
8529
9298
  onChange: (value) => {
@@ -8538,24 +9307,38 @@ var GeneralTab5 = ({
8538
9307
  { value: "rcs", label: "RCS (Coming Soon)", disabled: true }
8539
9308
  ]
8540
9309
  }
8541
- )), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), localChannel === "email" && /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "To (Recipients)"), /* @__PURE__ */ React100.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React100.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("to") }, "Add")), localTo.length === 0 && /* @__PURE__ */ React100.createElement(Text51, { size: "xs", c: "dimmed" }, "No recipients added yet"), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, localTo.map((recipient, index) => /* @__PURE__ */ React100.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React100.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React100.createElement(TextInput36, { style: { flex: 1 }, placeholder: "email@example.com", value: recipient, onChange: (e) => handleRecipientChange("to", index, e.currentTarget.value) }), /* @__PURE__ */ React100.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("to", index) }, /* @__PURE__ */ React100.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "CC (Optional)"), /* @__PURE__ */ React100.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React100.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("cc") }, "Add")), localCc.length > 0 && /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, localCc.map((recipient, index) => /* @__PURE__ */ React100.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React100.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React100.createElement(
8542
- TextInput36,
9310
+ )), /* @__PURE__ */ React104.createElement(Divider6, { variant: "dashed" }), localChannel === "email" && /* @__PURE__ */ React104.createElement(React104.Fragment, null, /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Group33, { justify: "space-between" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "To (Recipients)"), /* @__PURE__ */ React104.createElement(Button26, { size: "xs", leftSection: /* @__PURE__ */ React104.createElement(IconPlus3, { size: 14 }), onClick: () => handleAddRecipient("to") }, "Add")), localTo.length === 0 && /* @__PURE__ */ React104.createElement(Text53, { size: "xs", c: "dimmed" }, "No recipients added yet"), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, localTo.map((recipient, index) => /* @__PURE__ */ React104.createElement(Paper11, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React104.createElement(Group33, { gap: "xs", wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React104.createElement(
9311
+ DataInput,
8543
9312
  {
8544
- style: { flex: 1 },
8545
- placeholder: "email@example.com",
9313
+ placeholder: "email@example.com or reference",
8546
9314
  value: recipient,
8547
- onChange: (e) => handleRecipientChange("cc", index, e.currentTarget.value)
9315
+ onChange: (value) => handleRecipientChange("to", index, value),
9316
+ editorDocument: editor?.document || [],
9317
+ currentBlockId: blockId,
9318
+ size: "sm"
8548
9319
  }
8549
- ), /* @__PURE__ */ React100.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("cc", index) }, /* @__PURE__ */ React100.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Group30, { justify: "space-between" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "BCC (Optional)"), /* @__PURE__ */ React100.createElement(Button24, { size: "xs", leftSection: /* @__PURE__ */ React100.createElement(IconPlus2, { size: 14 }), onClick: () => handleAddRecipient("bcc") }, "Add")), localBcc.length > 0 && /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, localBcc.map((recipient, index) => /* @__PURE__ */ React100.createElement(Paper10, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React100.createElement(Group30, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React100.createElement(
8550
- TextInput36,
9320
+ ), /* @__PURE__ */ React104.createElement(ActionIcon17, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("to", index) }, /* @__PURE__ */ React104.createElement(IconTrash3, { size: 16 }))))))), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Group33, { justify: "space-between" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "CC (Optional)"), /* @__PURE__ */ React104.createElement(Button26, { size: "xs", leftSection: /* @__PURE__ */ React104.createElement(IconPlus3, { size: 14 }), onClick: () => handleAddRecipient("cc") }, "Add")), localCc.length > 0 && /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, localCc.map((recipient, index) => /* @__PURE__ */ React104.createElement(Paper11, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React104.createElement(Group33, { gap: "xs", wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React104.createElement(
9321
+ DataInput,
8551
9322
  {
8552
- style: { flex: 1 },
8553
- placeholder: "email@example.com",
9323
+ placeholder: "email@example.com or reference",
8554
9324
  value: recipient,
8555
- onChange: (e) => handleRecipientChange("bcc", index, e.currentTarget.value)
9325
+ onChange: (value) => handleRecipientChange("cc", index, value),
9326
+ editorDocument: editor?.document || [],
9327
+ currentBlockId: blockId,
9328
+ size: "sm"
8556
9329
  }
8557
- ), /* @__PURE__ */ React100.createElement(ActionIcon14, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("bcc", index) }, /* @__PURE__ */ React100.createElement(IconTrash2, { size: 16 }))))))), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "From (Optional)"), /* @__PURE__ */ React100.createElement(
8558
- TextInput36,
9330
+ ), /* @__PURE__ */ React104.createElement(ActionIcon17, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("cc", index) }, /* @__PURE__ */ React104.createElement(IconTrash3, { size: 16 }))))))), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Group33, { justify: "space-between" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "BCC (Optional)"), /* @__PURE__ */ React104.createElement(Button26, { size: "xs", leftSection: /* @__PURE__ */ React104.createElement(IconPlus3, { size: 14 }), onClick: () => handleAddRecipient("bcc") }, "Add")), localBcc.length > 0 && /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, localBcc.map((recipient, index) => /* @__PURE__ */ React104.createElement(Paper11, { key: index, p: "xs", withBorder: true }, /* @__PURE__ */ React104.createElement(Group33, { gap: "xs", wrap: "nowrap", align: "flex-start" }, /* @__PURE__ */ React104.createElement(
9331
+ DataInput,
9332
+ {
9333
+ placeholder: "email@example.com or reference",
9334
+ value: recipient,
9335
+ onChange: (value) => handleRecipientChange("bcc", index, value),
9336
+ editorDocument: editor?.document || [],
9337
+ currentBlockId: blockId,
9338
+ size: "sm"
9339
+ }
9340
+ ), /* @__PURE__ */ React104.createElement(ActionIcon17, { color: "red", variant: "light", onClick: () => handleRemoveRecipient("bcc", index) }, /* @__PURE__ */ React104.createElement(IconTrash3, { size: 16 }))))))), /* @__PURE__ */ React104.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "From (Optional)"), /* @__PURE__ */ React104.createElement(
9341
+ TextInput37,
8559
9342
  {
8560
9343
  placeholder: "sender@example.com",
8561
9344
  value: localFrom,
@@ -8565,8 +9348,8 @@ var GeneralTab5 = ({
8565
9348
  onFromChange(newFrom);
8566
9349
  }
8567
9350
  }
8568
- ), /* @__PURE__ */ React100.createElement(Text51, { size: "xs", c: "dimmed" }, "Custom sender email address")), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Reply-To (Optional)"), /* @__PURE__ */ React100.createElement(
8569
- TextInput36,
9351
+ ), /* @__PURE__ */ React104.createElement(Text53, { size: "xs", c: "dimmed" }, "Custom sender email address")), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "Reply-To (Optional)"), /* @__PURE__ */ React104.createElement(
9352
+ TextInput37,
8570
9353
  {
8571
9354
  placeholder: "reply@example.com",
8572
9355
  value: localReplyTo,
@@ -8576,8 +9359,8 @@ var GeneralTab5 = ({
8576
9359
  onReplyToChange(newReplyTo);
8577
9360
  }
8578
9361
  }
8579
- ), /* @__PURE__ */ React100.createElement(Text51, { size: "xs", c: "dimmed" }, "Where replies should be sent")), /* @__PURE__ */ React100.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Subject"), /* @__PURE__ */ React100.createElement(
8580
- TextInput36,
9362
+ ), /* @__PURE__ */ React104.createElement(Text53, { size: "xs", c: "dimmed" }, "Where replies should be sent")), /* @__PURE__ */ React104.createElement(Divider6, { variant: "dashed" }), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "Subject"), /* @__PURE__ */ React104.createElement(
9363
+ TextInput37,
8581
9364
  {
8582
9365
  placeholder: "Email subject line",
8583
9366
  value: localSubject,
@@ -8587,8 +9370,8 @@ var GeneralTab5 = ({
8587
9370
  onSubjectChange(newSubject);
8588
9371
  }
8589
9372
  }
8590
- )), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Body Type"), /* @__PURE__ */ React100.createElement(
8591
- Select12,
9373
+ )), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "Body Type"), /* @__PURE__ */ React104.createElement(
9374
+ Select14,
8592
9375
  {
8593
9376
  value: localBodyType,
8594
9377
  onChange: (value) => {
@@ -8601,8 +9384,8 @@ var GeneralTab5 = ({
8601
9384
  { value: "html", label: "HTML" }
8602
9385
  ]
8603
9386
  }
8604
- )), /* @__PURE__ */ React100.createElement(Stack76, { gap: "xs" }, /* @__PURE__ */ React100.createElement(Text51, { size: "sm", fw: 600 }, "Body"), /* @__PURE__ */ React100.createElement(
8605
- Textarea20,
9387
+ )), /* @__PURE__ */ React104.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React104.createElement(Text53, { size: "sm", fw: 600 }, "Body"), /* @__PURE__ */ React104.createElement(
9388
+ Textarea21,
8606
9389
  {
8607
9390
  placeholder: localBodyType === "html" ? "<h1>Hello!</h1><p>Welcome to our service.</p>" : "Email body content",
8608
9391
  minRows: 6,
@@ -8613,13 +9396,13 @@ var GeneralTab5 = ({
8613
9396
  onBodyChange(newBody);
8614
9397
  }
8615
9398
  }
8616
- ), /* @__PURE__ */ React100.createElement(Text51, { size: "xs", c: "dimmed" }, localBodyType === "html" ? "HTML content for the email body" : "Plain text content for the email body"))));
9399
+ ), /* @__PURE__ */ React104.createElement(Text53, { size: "xs", c: "dimmed" }, localBodyType === "html" ? "HTML content for the email body" : "Plain text content for the email body"))));
8617
9400
  };
8618
9401
 
8619
9402
  // src/mantine/blocks/notify/template/TemplateConfig.tsx
8620
9403
  var TemplateConfig5 = ({ editor, block }) => {
8621
9404
  const { closePanel } = usePanelStore();
8622
- const updateProp = useCallback17(
9405
+ const updateProp = useCallback19(
8623
9406
  (key, value) => {
8624
9407
  editor.updateBlock(block, {
8625
9408
  props: {
@@ -8630,26 +9413,26 @@ var TemplateConfig5 = ({ editor, block }) => {
8630
9413
  },
8631
9414
  [editor, block]
8632
9415
  );
8633
- const handleToChange = useCallback17(
9416
+ const handleToChange = useCallback19(
8634
9417
  (to) => {
8635
9418
  updateProp("to", JSON.stringify(to));
8636
9419
  },
8637
9420
  [updateProp]
8638
9421
  );
8639
- const handleCcChange = useCallback17(
9422
+ const handleCcChange = useCallback19(
8640
9423
  (cc) => {
8641
9424
  updateProp("cc", JSON.stringify(cc));
8642
9425
  },
8643
9426
  [updateProp]
8644
9427
  );
8645
- const handleBccChange = useCallback17(
9428
+ const handleBccChange = useCallback19(
8646
9429
  (bcc) => {
8647
9430
  updateProp("bcc", JSON.stringify(bcc));
8648
9431
  },
8649
9432
  [updateProp]
8650
9433
  );
8651
- return /* @__PURE__ */ React101.createElement(
8652
- Paper11,
9434
+ return /* @__PURE__ */ React105.createElement(
9435
+ Paper12,
8653
9436
  {
8654
9437
  p: "md",
8655
9438
  shadow: "sm",
@@ -8659,7 +9442,7 @@ var TemplateConfig5 = ({ editor, block }) => {
8659
9442
  flexDirection: "column"
8660
9443
  }
8661
9444
  },
8662
- /* @__PURE__ */ React101.createElement(
9445
+ /* @__PURE__ */ React105.createElement(
8663
9446
  "div",
8664
9447
  {
8665
9448
  style: {
@@ -8669,17 +9452,17 @@ var TemplateConfig5 = ({ editor, block }) => {
8669
9452
  marginBottom: "1rem"
8670
9453
  }
8671
9454
  },
8672
- /* @__PURE__ */ React101.createElement(Title8, { order: 3 }, "Notification Settings"),
8673
- /* @__PURE__ */ React101.createElement(CloseButton7, { onClick: closePanel })
9455
+ /* @__PURE__ */ React105.createElement(Title8, { order: 3 }, "Notification Settings"),
9456
+ /* @__PURE__ */ React105.createElement(CloseButton7, { onClick: closePanel })
8674
9457
  ),
8675
- /* @__PURE__ */ React101.createElement(
9458
+ /* @__PURE__ */ React105.createElement(
8676
9459
  ReusablePanel,
8677
9460
  {
8678
9461
  extraTabs: [
8679
9462
  {
8680
9463
  label: "General",
8681
9464
  value: "general",
8682
- content: /* @__PURE__ */ React101.createElement(
9465
+ content: /* @__PURE__ */ React105.createElement(
8683
9466
  GeneralTab5,
8684
9467
  {
8685
9468
  title: block.props.title || "",
@@ -8721,7 +9504,9 @@ var TemplateConfig5 = ({ editor, block }) => {
8721
9504
  onBodyChange: (value) => updateProp("body", value),
8722
9505
  onBodyTypeChange: (value) => updateProp("bodyType", value),
8723
9506
  onFromChange: (value) => updateProp("from", value),
8724
- onReplyToChange: (value) => updateProp("replyTo", value)
9507
+ onReplyToChange: (value) => updateProp("replyTo", value),
9508
+ editor,
9509
+ blockId: block.id
8725
9510
  }
8726
9511
  )
8727
9512
  }
@@ -8733,11 +9518,11 @@ var TemplateConfig5 = ({ editor, block }) => {
8733
9518
  };
8734
9519
 
8735
9520
  // src/mantine/blocks/notify/template/TemplateView.tsx
8736
- import { Card as Card22, Group as Group31, Stack as Stack77, Text as Text52, ActionIcon as ActionIcon15, Badge as Badge12 } from "@mantine/core";
9521
+ import { Card as Card22, Group as Group34, Stack as Stack79, Text as Text54, ActionIcon as ActionIcon18, Badge as Badge14 } from "@mantine/core";
8737
9522
  var NOTIFY_TEMPLATE_PANEL_ID = "notify-template-panel";
8738
9523
  var NotifyTemplateView = ({ editor, block }) => {
8739
9524
  const panelId = `${NOTIFY_TEMPLATE_PANEL_ID}-${block.id}`;
8740
- const panelContent = useMemo14(() => /* @__PURE__ */ React102.createElement(TemplateConfig5, { editor, block }), [editor, block]);
9525
+ const panelContent = useMemo18(() => /* @__PURE__ */ React106.createElement(TemplateConfig5, { editor, block }), [editor, block]);
8741
9526
  const { open } = usePanel(panelId, panelContent);
8742
9527
  const channel = block.props.channel || "email";
8743
9528
  const to = (() => {
@@ -8762,17 +9547,17 @@ var NotifyTemplateView = ({ editor, block }) => {
8762
9547
  return "gray";
8763
9548
  }
8764
9549
  };
8765
- return /* @__PURE__ */ React102.createElement(Card22, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React102.createElement(Badge12, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React102.createElement(Group31, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React102.createElement(Group31, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React102.createElement(ActionIcon15, { variant: "light", color: getChannelColor(channel), size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "bell")), /* @__PURE__ */ React102.createElement(Stack77, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React102.createElement(Group31, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React102.createElement(Badge12, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React102.createElement(Text52, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification")), /* @__PURE__ */ React102.createElement(Text52, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.join(", ")}` : "Click to configure recipients"), block.props.description && /* @__PURE__ */ React102.createElement(Text52, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
9550
+ return /* @__PURE__ */ React106.createElement(Card22, { withBorder: true, padding: "md", radius: "md", style: { width: "100%", cursor: "pointer", position: "relative" }, onClick: open }, /* @__PURE__ */ React106.createElement(Badge14, { size: "xs", variant: "light", color: "gray", style: { position: "absolute", top: 8, right: 8 } }, "Template"), /* @__PURE__ */ React106.createElement(Group34, { wrap: "nowrap", justify: "space-between", align: "center" }, /* @__PURE__ */ React106.createElement(Group34, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React106.createElement(ActionIcon18, { variant: "light", color: getChannelColor(channel), size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "bell")), /* @__PURE__ */ React106.createElement(Stack79, { gap: "xs", style: { flex: 1 } }, /* @__PURE__ */ React106.createElement(Group34, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React106.createElement(Badge14, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React106.createElement(Text54, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification")), /* @__PURE__ */ React106.createElement(Text54, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.join(", ")}` : "Click to configure recipients"), block.props.description && /* @__PURE__ */ React106.createElement(Text54, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description)))));
8766
9551
  };
8767
9552
 
8768
9553
  // src/mantine/blocks/notify/flow/FlowView.tsx
8769
- import React103, { useState as useState27 } from "react";
8770
- import { Card as Card23, Group as Group32, Stack as Stack78, Text as Text53, ActionIcon as ActionIcon16, Tooltip as Tooltip5, Button as Button25, Badge as Badge13, Collapse as Collapse3, Alert as Alert10, Loader as Loader5, Code as Code2 } from "@mantine/core";
8771
- import { IconSend as IconSend2, IconChevronDown as IconChevronDown3, IconChevronUp as IconChevronUp3, IconCheck, IconX } from "@tabler/icons-react";
9554
+ import React107, { useState as useState29 } from "react";
9555
+ import { Card as Card23, Group as Group35, Stack as Stack80, Text as Text55, ActionIcon as ActionIcon19, Tooltip as Tooltip7, Button as Button27, Badge as Badge15, Collapse as Collapse3, Alert as Alert11, Loader as Loader6, Code as Code3 } from "@mantine/core";
9556
+ import { IconSend as IconSend2, IconChevronDown as IconChevronDown3, IconChevronUp as IconChevronUp3, IconCheck, IconX as IconX3 } from "@tabler/icons-react";
8772
9557
  var NotifyFlowView = ({ editor, block, isDisabled }) => {
8773
9558
  const disabled = isDisabled?.isDisabled === "disable";
8774
- const [isLoading, setIsLoading] = useState27(false);
8775
- const [showDetails, setShowDetails] = useState27(false);
9559
+ const [isLoading, setIsLoading] = useState29(false);
9560
+ const [showDetails, setShowDetails] = useState29(false);
8776
9561
  let handlers = null;
8777
9562
  try {
8778
9563
  handlers = useBlocknoteHandlers();
@@ -8835,17 +9620,25 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
8835
9620
  props: { ...block.props, status: "sending", errorMessage: "" }
8836
9621
  });
8837
9622
  try {
9623
+ const editorDocument = editor?.document || [];
8838
9624
  if (channel === "email") {
9625
+ const resolvedTo = to.filter((email) => email.trim() !== "").map((email) => resolveReferences(email, editorDocument));
9626
+ const resolvedCc = cc.filter((email) => email.trim() !== "").map((email) => resolveReferences(email, editorDocument));
9627
+ const resolvedBcc = bcc.filter((email) => email.trim() !== "").map((email) => resolveReferences(email, editorDocument));
9628
+ const resolvedSubject = resolveReferences(block.props.subject || "", editorDocument);
9629
+ const resolvedBody = resolveReferences(block.props.body || "", editorDocument);
9630
+ const resolvedFrom = block.props.from ? resolveReferences(block.props.from, editorDocument) : void 0;
9631
+ const resolvedReplyTo = block.props.replyTo ? resolveReferences(block.props.replyTo, editorDocument) : void 0;
8839
9632
  const params = {
8840
9633
  channel: "email",
8841
- to: to.filter((email) => email.trim() !== ""),
8842
- cc: cc.filter((email) => email.trim() !== ""),
8843
- bcc: bcc.filter((email) => email.trim() !== ""),
8844
- subject: block.props.subject || "",
8845
- body: block.props.body || "",
9634
+ to: resolvedTo,
9635
+ cc: resolvedCc,
9636
+ bcc: resolvedBcc,
9637
+ subject: resolvedSubject,
9638
+ body: resolvedBody,
8846
9639
  bodyType: block.props.bodyType || "text",
8847
- from: block.props.from || void 0,
8848
- replyTo: block.props.replyTo || void 0
9640
+ from: resolvedFrom,
9641
+ replyTo: resolvedReplyTo
8849
9642
  };
8850
9643
  if (params.cc?.length === 0) delete params.cc;
8851
9644
  if (params.bcc?.length === 0) delete params.bcc;
@@ -8873,20 +9666,20 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
8873
9666
  }
8874
9667
  };
8875
9668
  const canSend = !disabled && !isLoading && handlers && to.length > 0 && (channel === "email" ? block.props.subject && block.props.body : true);
8876
- const sendButton = /* @__PURE__ */ React103.createElement(
8877
- Button25,
9669
+ const sendButton = /* @__PURE__ */ React107.createElement(
9670
+ Button27,
8878
9671
  {
8879
9672
  size: "sm",
8880
9673
  variant: "light",
8881
9674
  color: getChannelColor(channel),
8882
- leftSection: isLoading ? /* @__PURE__ */ React103.createElement(Loader5, { size: 14 }) : status === "sent" ? /* @__PURE__ */ React103.createElement(IconCheck, { size: 14 }) : /* @__PURE__ */ React103.createElement(IconSend2, { size: 14 }),
9675
+ leftSection: isLoading ? /* @__PURE__ */ React107.createElement(Loader6, { size: 14 }) : status === "sent" ? /* @__PURE__ */ React107.createElement(IconCheck, { size: 14 }) : /* @__PURE__ */ React107.createElement(IconSend2, { size: 14 }),
8883
9676
  onClick: handleSendNotification,
8884
9677
  disabled: !canSend,
8885
9678
  style: { flexShrink: 0 }
8886
9679
  },
8887
9680
  isLoading ? "Sending..." : status === "sent" ? "Sent" : "Send"
8888
9681
  );
8889
- return /* @__PURE__ */ React103.createElement(Card23, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React103.createElement(Stack78, { gap: "md" }, /* @__PURE__ */ React103.createElement(Group32, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React103.createElement(Group32, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React103.createElement(ActionIcon16, { variant: "light", color: getChannelColor(channel), size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "bell")), /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React103.createElement(Group32, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React103.createElement(Badge13, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React103.createElement(Text53, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification"), status !== "idle" && /* @__PURE__ */ React103.createElement(Badge13, { size: "xs", variant: "dot", color: getStatusColor(status) }, status)), /* @__PURE__ */ React103.createElement(Text53, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.slice(0, 2).join(", ")}${to.length > 2 ? ` +${to.length - 2} more` : ""}` : "No recipients"), block.props.description && /* @__PURE__ */ React103.createElement(Text53, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React103.createElement(Group32, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React103.createElement(Tooltip5, { label: isDisabled.message, position: "left", withArrow: true }, sendButton) : sendButton, /* @__PURE__ */ React103.createElement(ActionIcon16, { variant: "subtle", onClick: () => setShowDetails(!showDetails) }, showDetails ? /* @__PURE__ */ React103.createElement(IconChevronUp3, { size: 16 }) : /* @__PURE__ */ React103.createElement(IconChevronDown3, { size: 16 })))), status === "failed" && block.props.errorMessage && /* @__PURE__ */ React103.createElement(Alert10, { color: "red", icon: /* @__PURE__ */ React103.createElement(IconX, { size: 16 }), title: "Failed to send", styles: { message: { fontSize: "12px" } } }, block.props.errorMessage), status === "sent" && block.props.messageId && /* @__PURE__ */ React103.createElement(Alert10, { color: "green", icon: /* @__PURE__ */ React103.createElement(IconCheck, { size: 16 }), title: "Sent successfully", styles: { message: { fontSize: "12px" } } }, "Message ID: ", block.props.messageId, block.props.sentAt && /* @__PURE__ */ React103.createElement(React103.Fragment, null, /* @__PURE__ */ React103.createElement("br", null), "Sent at: ", new Date(block.props.sentAt).toLocaleString())), /* @__PURE__ */ React103.createElement(Collapse3, { in: showDetails }, /* @__PURE__ */ React103.createElement(Stack78, { gap: "md" }, channel === "email" && /* @__PURE__ */ React103.createElement(React103.Fragment, null, /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Recipients:"), /* @__PURE__ */ React103.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
9682
+ return /* @__PURE__ */ React107.createElement(Card23, { withBorder: true, padding: "md", radius: "md", style: { width: "100%" } }, /* @__PURE__ */ React107.createElement(Stack80, { gap: "md" }, /* @__PURE__ */ React107.createElement(Group35, { wrap: "nowrap", justify: "space-between", align: "flex-start" }, /* @__PURE__ */ React107.createElement(Group35, { wrap: "nowrap", align: "flex-start", style: { flex: 1 } }, /* @__PURE__ */ React107.createElement(ActionIcon19, { variant: "light", color: getChannelColor(channel), size: "lg", radius: "xl", style: { flexShrink: 0 } }, getIcon(block.props.icon, 18, 1.5, "bell")), /* @__PURE__ */ React107.createElement(Stack80, { gap: "xs", style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React107.createElement(Group35, { gap: "xs", wrap: "nowrap" }, /* @__PURE__ */ React107.createElement(Badge15, { size: "sm", variant: "filled", color: getChannelColor(channel) }, channel.toUpperCase()), /* @__PURE__ */ React107.createElement(Text55, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Notification"), status !== "idle" && /* @__PURE__ */ React107.createElement(Badge15, { size: "xs", variant: "dot", color: getStatusColor(status) }, status)), /* @__PURE__ */ React107.createElement(Text55, { size: "xs", c: "dimmed", contentEditable: false, lineClamp: 1 }, to.length > 0 ? `To: ${to.slice(0, 2).join(", ")}${to.length > 2 ? ` +${to.length - 2} more` : ""}` : "No recipients"), block.props.description && /* @__PURE__ */ React107.createElement(Text55, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), /* @__PURE__ */ React107.createElement(Group35, { gap: "xs", style: { flexShrink: 0 } }, disabled && isDisabled?.message ? /* @__PURE__ */ React107.createElement(Tooltip7, { label: isDisabled.message, position: "left", withArrow: true }, sendButton) : sendButton, /* @__PURE__ */ React107.createElement(ActionIcon19, { variant: "subtle", onClick: () => setShowDetails(!showDetails) }, showDetails ? /* @__PURE__ */ React107.createElement(IconChevronUp3, { size: 16 }) : /* @__PURE__ */ React107.createElement(IconChevronDown3, { size: 16 })))), status === "failed" && block.props.errorMessage && /* @__PURE__ */ React107.createElement(Alert11, { color: "red", icon: /* @__PURE__ */ React107.createElement(IconX3, { size: 16 }), title: "Failed to send", styles: { message: { fontSize: "12px" } } }, block.props.errorMessage), status === "sent" && block.props.messageId && /* @__PURE__ */ React107.createElement(Alert11, { color: "green", icon: /* @__PURE__ */ React107.createElement(IconCheck, { size: 16 }), title: "Sent successfully", styles: { message: { fontSize: "12px" } } }, "Message ID: ", block.props.messageId, block.props.sentAt && /* @__PURE__ */ React107.createElement(React107.Fragment, null, /* @__PURE__ */ React107.createElement("br", null), "Sent at: ", new Date(block.props.sentAt).toLocaleString())), /* @__PURE__ */ React107.createElement(Collapse3, { in: showDetails }, /* @__PURE__ */ React107.createElement(Stack80, { gap: "md" }, channel === "email" && /* @__PURE__ */ React107.createElement(React107.Fragment, null, /* @__PURE__ */ React107.createElement(Stack80, { gap: "xs" }, /* @__PURE__ */ React107.createElement(Text55, { size: "xs", fw: 600, c: "dimmed" }, "Recipients:"), /* @__PURE__ */ React107.createElement(Code3, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
8890
9683
  {
8891
9684
  to: to.filter((e) => e.trim() !== ""),
8892
9685
  ...cc.length > 0 && { cc: cc.filter((e) => e.trim() !== "") },
@@ -8894,7 +9687,7 @@ var NotifyFlowView = ({ editor, block, isDisabled }) => {
8894
9687
  },
8895
9688
  null,
8896
9689
  2
8897
- ))), block.props.subject && /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Subject:"), /* @__PURE__ */ React103.createElement(Text53, { size: "xs" }, block.props.subject)), block.props.body && /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Body (", block.props.bodyType || "text", "):"), /* @__PURE__ */ React103.createElement(Code2, { block: true, style: { fontSize: "11px", maxHeight: "200px", overflow: "auto" } }, block.props.body)), (block.props.from || block.props.replyTo) && /* @__PURE__ */ React103.createElement(Stack78, { gap: "xs" }, /* @__PURE__ */ React103.createElement(Text53, { size: "xs", fw: 600, c: "dimmed" }, "Additional:"), /* @__PURE__ */ React103.createElement(Code2, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
9690
+ ))), block.props.subject && /* @__PURE__ */ React107.createElement(Stack80, { gap: "xs" }, /* @__PURE__ */ React107.createElement(Text55, { size: "xs", fw: 600, c: "dimmed" }, "Subject:"), /* @__PURE__ */ React107.createElement(Text55, { size: "xs" }, block.props.subject)), block.props.body && /* @__PURE__ */ React107.createElement(Stack80, { gap: "xs" }, /* @__PURE__ */ React107.createElement(Text55, { size: "xs", fw: 600, c: "dimmed" }, "Body (", block.props.bodyType || "text", "):"), /* @__PURE__ */ React107.createElement(Code3, { block: true, style: { fontSize: "11px", maxHeight: "200px", overflow: "auto" } }, block.props.body)), (block.props.from || block.props.replyTo) && /* @__PURE__ */ React107.createElement(Stack80, { gap: "xs" }, /* @__PURE__ */ React107.createElement(Text55, { size: "xs", fw: 600, c: "dimmed" }, "Additional:"), /* @__PURE__ */ React107.createElement(Code3, { block: true, style: { fontSize: "11px" } }, JSON.stringify(
8898
9691
  {
8899
9692
  ...block.props.from && { from: block.props.from },
8900
9693
  ...block.props.replyTo && { replyTo: block.props.replyTo }
@@ -8909,7 +9702,7 @@ function NotifyBlock({ editor, block }) {
8909
9702
  const { editable } = useBlocknoteContext();
8910
9703
  const { actions } = useBlockConditions(block, editor);
8911
9704
  if (editable) {
8912
- return /* @__PURE__ */ React104.createElement(NotifyTemplateView, { editor, block });
9705
+ return /* @__PURE__ */ React108.createElement(NotifyTemplateView, { editor, block });
8913
9706
  }
8914
9707
  const conditionConfig = parseConditionConfig(block.props.conditions);
8915
9708
  const hasVisibility = hasVisibilityConditions(conditionConfig);
@@ -8921,7 +9714,7 @@ function NotifyBlock({ editor, block }) {
8921
9714
  const hasEnable = hasEnableConditions(conditionConfig);
8922
9715
  const enableActionExists = actions.some((a) => a.action === "enable");
8923
9716
  const shouldDisable = hasEnable && !enableActionExists;
8924
- return /* @__PURE__ */ React104.createElement(NotifyFlowView, { block, editor, isDisabled: shouldDisable ? { isDisabled: "disable", message: "Notification disabled by conditions" } : void 0 });
9717
+ return /* @__PURE__ */ React108.createElement(NotifyFlowView, { block, editor, isDisabled: shouldDisable ? { isDisabled: "disable", message: "Notification disabled by conditions" } : void 0 });
8925
9718
  }
8926
9719
 
8927
9720
  // src/mantine/blocks/notify/NotifyBlockSpec.tsx
@@ -8965,11 +9758,20 @@ var NotifyBlockSpec = createReactBlockSpec7(
8965
9758
  {
8966
9759
  render: (props) => {
8967
9760
  const ixoProps = props;
8968
- return /* @__PURE__ */ React105.createElement(NotifyBlock, { ...ixoProps });
9761
+ return /* @__PURE__ */ React109.createElement(NotifyBlock, { ...ixoProps });
8969
9762
  }
8970
9763
  }
8971
9764
  );
8972
9765
 
9766
+ // src/mantine/blocks/list/ui/ListBlocksToolbar.tsx
9767
+ import React110 from "react";
9768
+ import { ActionIcon as ActionIcon20, Group as Group36, Tooltip as Tooltip8 } from "@mantine/core";
9769
+ import { IconChevronUp as IconChevronUp4, IconChevronDown as IconChevronDown4 } from "@tabler/icons-react";
9770
+ var ListBlocksToolbar = () => {
9771
+ const { broadcastCollapse } = useListBlocksUI();
9772
+ return /* @__PURE__ */ React110.createElement(Group36, { gap: "xs" }, /* @__PURE__ */ React110.createElement(Tooltip8, { label: "Collapse all lists", withArrow: true }, /* @__PURE__ */ React110.createElement(ActionIcon20, { c: "dimmed", variant: "subtle", size: "sm", "aria-label": "Collapse all lists", onClick: () => broadcastCollapse("collapse") }, /* @__PURE__ */ React110.createElement(IconChevronUp4, { size: 18 }))), /* @__PURE__ */ React110.createElement(Tooltip8, { label: "Expand all lists", withArrow: true }, /* @__PURE__ */ React110.createElement(ActionIcon20, { c: "dimmed", variant: "subtle", size: "sm", "aria-label": "Expand all lists", onClick: () => broadcastCollapse("expand") }, /* @__PURE__ */ React110.createElement(IconChevronDown4, { size: 18 }))));
9773
+ };
9774
+
8973
9775
  // src/mantine/blocks/registry/blockRegistry.ts
8974
9776
  var BlockRegistry = class {
8975
9777
  constructor() {
@@ -9096,10 +9898,10 @@ blockRegistry.register({
9096
9898
  });
9097
9899
 
9098
9900
  // src/mantine/blocks/hooks/useBlockDependencies.ts
9099
- import { useMemo as useMemo15, useEffect as useEffect18, useState as useState28, useCallback as useCallback18 } from "react";
9901
+ import { useMemo as useMemo19, useEffect as useEffect19, useState as useState30, useCallback as useCallback20 } from "react";
9100
9902
 
9101
9903
  // src/mantine/blocks/hooks/useDependsOn.ts
9102
- import { useMemo as useMemo16 } from "react";
9904
+ import { useMemo as useMemo20 } from "react";
9103
9905
 
9104
9906
  // src/mantine/blocks/index.ts
9105
9907
  var blockSpecs = {
@@ -9203,31 +10005,6 @@ var getExtraSlashMenuItems = (editor) => {
9203
10005
  group: "Domains",
9204
10006
  subtext: "Create an overview from DID data"
9205
10007
  },
9206
- {
9207
- title: "Proposal Vote",
9208
- onItemClick: () => {
9209
- editor.insertBlocks(
9210
- [
9211
- {
9212
- type: "proposalVote",
9213
- props: {
9214
- title: "",
9215
- subtitle: "",
9216
- icon: 'A\uFFFD\uFFFD,\uFFFD?"A3A_A,A?',
9217
- status: "open",
9218
- daysLeft: 0,
9219
- conditions: ""
9220
- }
9221
- }
9222
- ],
9223
- editor.getTextCursorPosition().block,
9224
- "after"
9225
- );
9226
- },
9227
- aliases: ["vote", "proposal-vote", "governance-vote", "dao-vote"],
9228
- group: "DAO",
9229
- subtext: "Create a proposal voting block"
9230
- },
9231
10008
  {
9232
10009
  title: "Proposal",
9233
10010
  onItemClick: () => {
@@ -9252,28 +10029,6 @@ var getExtraSlashMenuItems = (editor) => {
9252
10029
  group: "DAO",
9253
10030
  subtext: "Create a new DAO proposal"
9254
10031
  },
9255
- {
9256
- title: "Proposal Actions",
9257
- onItemClick: () => {
9258
- editor.insertBlocks(
9259
- [
9260
- {
9261
- type: "proposalActions",
9262
- props: {
9263
- proposalBlockId: "",
9264
- hasDependencies: true,
9265
- actions: "[]"
9266
- }
9267
- }
9268
- ],
9269
- editor.getTextCursorPosition().block,
9270
- "after"
9271
- );
9272
- },
9273
- aliases: ["actions", "proposal-actions", "dao-actions", "governance-actions"],
9274
- group: "DAO",
9275
- subtext: "Manage proposal actions"
9276
- },
9277
10032
  {
9278
10033
  title: "API Request",
9279
10034
  onItemClick: () => {
@@ -9345,7 +10100,7 @@ var getExtraSlashMenuItems = (editor) => {
9345
10100
  const yRoot = editor?._yRoot;
9346
10101
  const docType = yRoot?.get("docType");
9347
10102
  if (docType === "page") {
9348
- return slashMenuList.filter((item) => item.title !== "Proposal Actions" && item.title !== "Proposal Vote" && item.title !== "Proposal");
10103
+ return slashMenuList.filter((item) => item.title !== "Proposal");
9349
10104
  }
9350
10105
  return slashMenuList;
9351
10106
  };
@@ -9418,15 +10173,15 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
9418
10173
  import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
9419
10174
 
9420
10175
  // src/core/hooks/useMatrixProvider.ts
9421
- import { useEffect as useEffect19, useState as useState29, useRef as useRef3, useCallback as useCallback19, useMemo as useMemo17 } from "react";
10176
+ import { useEffect as useEffect20, useState as useState31, useRef as useRef4, useCallback as useCallback21, useMemo as useMemo21 } from "react";
9422
10177
  import { MatrixProvider } from "@ixo/matrix-crdt";
9423
10178
  function useMatrixProvider({ matrixClient, roomId, yDoc }) {
9424
- const [matrixProvider, setProvider] = useState29(null);
9425
- const [status, setStatus] = useState29("disconnected");
9426
- const isMountedRef = useRef3(true);
9427
- const providerRef = useRef3(null);
9428
- const retryTimeoutRef = useRef3(null);
9429
- const providerOptions = useMemo17(
10179
+ const [matrixProvider, setProvider] = useState31(null);
10180
+ const [status, setStatus] = useState31("disconnected");
10181
+ const isMountedRef = useRef4(true);
10182
+ const providerRef = useRef4(null);
10183
+ const retryTimeoutRef = useRef4(null);
10184
+ const providerOptions = useMemo21(
9430
10185
  () => ({
9431
10186
  translator: {
9432
10187
  updateEventType: "matrix-crdt.doc_update",
@@ -9439,22 +10194,22 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
9439
10194
  }),
9440
10195
  []
9441
10196
  );
9442
- const handleDocumentAvailable = useCallback19(() => {
10197
+ const handleDocumentAvailable = useCallback21(() => {
9443
10198
  if (isMountedRef.current) {
9444
10199
  setStatus("connected");
9445
10200
  }
9446
10201
  }, []);
9447
- const handleDocumentUnavailable = useCallback19(() => {
10202
+ const handleDocumentUnavailable = useCallback21(() => {
9448
10203
  if (isMountedRef.current) {
9449
10204
  setStatus("failed");
9450
10205
  }
9451
10206
  }, []);
9452
- const handleCanWriteChanged = useCallback19(() => {
10207
+ const handleCanWriteChanged = useCallback21(() => {
9453
10208
  if (isMountedRef.current && providerRef.current) {
9454
10209
  setStatus(providerRef.current.canWrite ? "connected" : "failed");
9455
10210
  }
9456
10211
  }, []);
9457
- const initProvider = useCallback19(async () => {
10212
+ const initProvider = useCallback21(async () => {
9458
10213
  if (!isMountedRef.current) return;
9459
10214
  if (retryTimeoutRef.current) {
9460
10215
  clearTimeout(retryTimeoutRef.current);
@@ -9488,7 +10243,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
9488
10243
  }
9489
10244
  }
9490
10245
  }, [matrixClient, providerOptions, handleDocumentAvailable, handleDocumentUnavailable, handleCanWriteChanged]);
9491
- useEffect19(() => {
10246
+ useEffect20(() => {
9492
10247
  isMountedRef.current = true;
9493
10248
  initProvider();
9494
10249
  return () => {
@@ -9505,7 +10260,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
9505
10260
  setStatus("disconnected");
9506
10261
  };
9507
10262
  }, [initProvider]);
9508
- useEffect19(() => {
10263
+ useEffect20(() => {
9509
10264
  return () => {
9510
10265
  isMountedRef.current = false;
9511
10266
  };
@@ -9514,17 +10269,17 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
9514
10269
  }
9515
10270
 
9516
10271
  // src/mantine/hooks/useCollaborativeYDoc.ts
9517
- import { useMemo as useMemo18 } from "react";
10272
+ import { useMemo as useMemo22 } from "react";
9518
10273
  import * as Y from "yjs";
9519
10274
  function useCollaborativeYDoc(_options) {
9520
- return useMemo18(() => {
10275
+ return useMemo22(() => {
9521
10276
  const doc = new Y.Doc();
9522
10277
  return doc;
9523
10278
  }, []);
9524
10279
  }
9525
10280
 
9526
10281
  // src/mantine/hooks/useCollaborativeIxoEditor.ts
9527
- import { useMemo as useMemo19, useEffect as useEffect20 } from "react";
10282
+ import { useMemo as useMemo23, useEffect as useEffect21 } from "react";
9528
10283
  function useCreateCollaborativeIxoEditor(options) {
9529
10284
  const yDoc = useCollaborativeYDoc(options);
9530
10285
  const {
@@ -9542,7 +10297,7 @@ function useCreateCollaborativeIxoEditor(options) {
9542
10297
  matrixClient,
9543
10298
  permissions = { write: false }
9544
10299
  } = options || {};
9545
- const memoizedUser = useMemo19(
10300
+ const memoizedUser = useMemo23(
9546
10301
  () => ({
9547
10302
  id: user?.id || "",
9548
10303
  name: user?.name || "",
@@ -9557,7 +10312,7 @@ function useCreateCollaborativeIxoEditor(options) {
9557
10312
  matrixClient,
9558
10313
  roomId: options.roomId
9559
10314
  });
9560
- const defaultUploadFile = useMemo19(
10315
+ const defaultUploadFile = useMemo23(
9561
10316
  () => uploadFile || (async (file) => {
9562
10317
  return new Promise((resolve, reject) => {
9563
10318
  const reader = new FileReader();
@@ -9571,7 +10326,7 @@ function useCreateCollaborativeIxoEditor(options) {
9571
10326
  }),
9572
10327
  [uploadFile]
9573
10328
  );
9574
- const schema = useMemo19(
10329
+ const schema = useMemo23(
9575
10330
  () => BlockNoteSchema2.create({
9576
10331
  blockSpecs: {
9577
10332
  ...defaultBlockSpecs2,
@@ -9586,11 +10341,11 @@ function useCreateCollaborativeIxoEditor(options) {
9586
10341
  }),
9587
10342
  []
9588
10343
  );
9589
- const root = useMemo19(() => yDoc.getMap("root"), [yDoc]);
9590
- const documentFragment = useMemo19(() => yDoc.getXmlFragment("document"), [yDoc]);
9591
- const flowArray = useMemo19(() => yDoc.getArray("flow"), [yDoc]);
9592
- const userFragment = useMemo19(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
9593
- const collaborationConfig = useMemo19(
10344
+ const root = useMemo23(() => yDoc.getMap("root"), [yDoc]);
10345
+ const documentFragment = useMemo23(() => yDoc.getXmlFragment("document"), [yDoc]);
10346
+ const flowArray = useMemo23(() => yDoc.getArray("flow"), [yDoc]);
10347
+ const userFragment = useMemo23(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
10348
+ const collaborationConfig = useMemo23(
9594
10349
  () => ({
9595
10350
  provider: matrixProvider,
9596
10351
  fragment: documentFragment,
@@ -9602,7 +10357,7 @@ function useCreateCollaborativeIxoEditor(options) {
9602
10357
  }),
9603
10358
  [matrixProvider, documentFragment, memoizedUser.name, memoizedUser.color]
9604
10359
  );
9605
- const ixoConfig = useMemo19(
10360
+ const ixoConfig = useMemo23(
9606
10361
  () => ({
9607
10362
  theme,
9608
10363
  editable,
@@ -9621,7 +10376,7 @@ function useCreateCollaborativeIxoEditor(options) {
9621
10376
  uploadFile: defaultUploadFile,
9622
10377
  collaboration: collaborationConfig
9623
10378
  });
9624
- const titleText = useMemo19(() => yDoc.getText("title"), [yDoc]);
10379
+ const titleText = useMemo23(() => yDoc.getText("title"), [yDoc]);
9625
10380
  let ixoEditor;
9626
10381
  if (editor) {
9627
10382
  ixoEditor = editor;
@@ -9680,15 +10435,16 @@ function useCreateCollaborativeIxoEditor(options) {
9680
10435
  return;
9681
10436
  }
9682
10437
  console.log("[useCollaborativeIxoEditor] setDocType() called, setting docType to:", value);
10438
+ ixoEditor._authoritativeDocType = value;
9683
10439
  root.set("docType", value);
9684
10440
  };
9685
10441
  }
9686
- useEffect20(() => {
10442
+ useEffect21(() => {
9687
10443
  if (ixoEditor) {
9688
10444
  ixoEditor.isEditable = editable;
9689
10445
  }
9690
10446
  }, [ixoEditor, editable]);
9691
- useEffect20(() => {
10447
+ useEffect21(() => {
9692
10448
  if (connectionStatus !== "connected") {
9693
10449
  return;
9694
10450
  }
@@ -9722,19 +10478,19 @@ function useCreateCollaborativeIxoEditor(options) {
9722
10478
  }
9723
10479
 
9724
10480
  // src/mantine/IxoEditor.tsx
9725
- import React107 from "react";
10481
+ import React112 from "react";
9726
10482
  import { getDefaultReactSlashMenuItems, SuggestionMenuController } from "@blocknote/react";
9727
10483
  import { BlockNoteView } from "@blocknote/mantine";
9728
10484
  import { filterSuggestionItems } from "@blocknote/core";
9729
- import { MantineProvider } from "@mantine/core";
10485
+ import { Flex as Flex20, MantineProvider, Text as Text56 } from "@mantine/core";
9730
10486
 
9731
10487
  // src/mantine/components/PanelContent.tsx
9732
- import React106 from "react";
10488
+ import React111 from "react";
9733
10489
  function PanelContent() {
9734
10490
  const { activePanel, registeredPanels } = usePanelStore();
9735
10491
  const isOpen = activePanel !== null;
9736
10492
  const content = activePanel ? registeredPanels.get(activePanel) : null;
9737
- return /* @__PURE__ */ React106.createElement(
10493
+ return /* @__PURE__ */ React111.createElement(
9738
10494
  "div",
9739
10495
  {
9740
10496
  style: {
@@ -9758,7 +10514,7 @@ function IxoEditorContent({
9758
10514
  onSelectionChange,
9759
10515
  children
9760
10516
  }) {
9761
- return /* @__PURE__ */ React107.createElement("div", { style: { display: "flex", height: "100%" } }, /* @__PURE__ */ React107.createElement("div", { className: `ixo-editor ixo-editor--theme-${config.theme} ${className}`, style: { flex: 1 } }, /* @__PURE__ */ React107.createElement(
10517
+ return /* @__PURE__ */ React112.createElement("div", { style: { display: "flex", height: "100%" } }, /* @__PURE__ */ React112.createElement("div", { className: `ixo-editor ixo-editor--theme-${config.theme} ${className}`, style: { flex: 1 } }, /* @__PURE__ */ React112.createElement(
9762
10518
  BlockNoteView,
9763
10519
  {
9764
10520
  editor,
@@ -9773,7 +10529,7 @@ function IxoEditorContent({
9773
10529
  onChange,
9774
10530
  onSelectionChange
9775
10531
  },
9776
- config.slashMenu && /* @__PURE__ */ React107.createElement(
10532
+ config.slashMenu && /* @__PURE__ */ React112.createElement(
9777
10533
  SuggestionMenuController,
9778
10534
  {
9779
10535
  triggerCharacter: "/",
@@ -9785,7 +10541,7 @@ function IxoEditorContent({
9785
10541
  }
9786
10542
  ),
9787
10543
  children
9788
- )), /* @__PURE__ */ React107.createElement(PanelContent, null));
10544
+ )), /* @__PURE__ */ React112.createElement(PanelContent, null));
9789
10545
  }
9790
10546
  function IxoEditor({
9791
10547
  editor,
@@ -9811,9 +10567,9 @@ function IxoEditor({
9811
10567
  tableHandles: true
9812
10568
  };
9813
10569
  const isEditable = editable;
9814
- const editorContent = /* @__PURE__ */ React107.createElement(BlocknoteProvider, { editor, handlers, blockRequirements, editable: isEditable }, /* @__PURE__ */ React107.createElement(IxoEditorContent, { editor, config, isEditable, className, onChange, onSelectionChange }, children));
10570
+ const editorContent = /* @__PURE__ */ React112.createElement(BlocknoteProvider, { editor, handlers, blockRequirements, editable: isEditable }, /* @__PURE__ */ React112.createElement(ListBlocksUIProvider, null, /* @__PURE__ */ React112.createElement(Flex20, { pr: 25, justify: "flex-end", align: "center", gap: "xs" }, /* @__PURE__ */ React112.createElement(Text56, { size: "xs", c: "dimmed", tt: "uppercase" }, "Global actions"), /* @__PURE__ */ React112.createElement(ListBlocksToolbar, null)), /* @__PURE__ */ React112.createElement(IxoEditorContent, { editor, config, isEditable, className, onChange, onSelectionChange }, children)));
9815
10571
  if (mantineTheme) {
9816
- return /* @__PURE__ */ React107.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
10572
+ return /* @__PURE__ */ React112.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
9817
10573
  }
9818
10574
  return editorContent;
9819
10575
  }
@@ -9897,4 +10653,4 @@ export {
9897
10653
  ixoGraphQLClient,
9898
10654
  getEntity
9899
10655
  };
9900
- //# sourceMappingURL=chunk-HNGZPIVW.mjs.map
10656
+ //# sourceMappingURL=chunk-NWID2DZ5.mjs.map