@ixo/editor 1.19.0 → 1.20.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.
@@ -1,5 +1,53 @@
1
+ // src/mantine/hooks/usePanel.ts
2
+ import { useCallback, useMemo, useEffect, useRef } from "react";
3
+ import { create } from "zustand";
4
+ var usePanelStore = create((set) => ({
5
+ activePanel: null,
6
+ registeredPanels: /* @__PURE__ */ new Map(),
7
+ setActivePanel: (panelId) => set({ activePanel: panelId }),
8
+ closePanel: () => set({ activePanel: null }),
9
+ registerPanel: (id, content) => set((state) => {
10
+ const newPanels = new Map(state.registeredPanels);
11
+ newPanels.set(id, content);
12
+ return { registeredPanels: newPanels };
13
+ }),
14
+ unregisterPanel: (id) => set((state) => {
15
+ const newPanels = new Map(state.registeredPanels);
16
+ newPanels.delete(id);
17
+ return { registeredPanels: newPanels };
18
+ })
19
+ }));
20
+ var usePanel = (panelId, content) => {
21
+ const activePanel = usePanelStore((state) => state.activePanel);
22
+ const setActivePanel = usePanelStore((state) => state.setActivePanel);
23
+ const closePanel = usePanelStore((state) => state.closePanel);
24
+ const isOpen = useMemo(() => activePanel === panelId, [activePanel, panelId]);
25
+ const contentRef = useRef(content);
26
+ useEffect(() => {
27
+ contentRef.current = content;
28
+ });
29
+ useEffect(() => {
30
+ const { registerPanel, unregisterPanel } = usePanelStore.getState();
31
+ registerPanel(panelId, contentRef.current);
32
+ return () => {
33
+ unregisterPanel(panelId);
34
+ };
35
+ }, [panelId]);
36
+ useEffect(() => {
37
+ const { registerPanel } = usePanelStore.getState();
38
+ registerPanel(panelId, content);
39
+ }, [content, panelId]);
40
+ const open = useCallback(() => {
41
+ setActivePanel(panelId);
42
+ }, [panelId, setActivePanel]);
43
+ const close = useCallback(() => {
44
+ closePanel();
45
+ }, [closePanel]);
46
+ return { opened: isOpen, open, close };
47
+ };
48
+
1
49
  // src/mantine/context/BlocknoteContext.tsx
2
- import React, { createContext, useContext, useState, useCallback, useRef, useEffect } from "react";
50
+ import React, { createContext, useContext, useState, useCallback as useCallback2, useRef as useRef2, useEffect as useEffect2 } from "react";
3
51
  var BlocknoteContext = createContext({
4
52
  docType: "flow",
5
53
  sharedProposals: {},
@@ -21,16 +69,16 @@ var BlocknoteContext = createContext({
21
69
  });
22
70
  var BlocknoteProvider = ({ children, editor, handlers, blockRequirements, editable }) => {
23
71
  const [sharedProposals, setSharedProposals] = useState({});
24
- const sharedProposalsRef = useRef({});
72
+ const sharedProposalsRef = useRef2({});
25
73
  const [activeDrawerId, setActiveDrawerId] = useState(null);
26
74
  const [drawerContent, setDrawerContent] = useState(null);
27
75
  const initialDocType = editor?.getDocType?.() || "flow";
28
76
  console.log("[BlocknoteContext] Initial docType from editor:", initialDocType);
29
77
  const [docType, setDocType] = useState(initialDocType);
30
- useEffect(() => {
78
+ useEffect2(() => {
31
79
  console.log("[BlocknoteContext] docType state updated to:", docType);
32
80
  }, [docType]);
33
- useEffect(() => {
81
+ useEffect2(() => {
34
82
  if (!editor?._yRoot) {
35
83
  console.log("[BlocknoteContext] No editor._yRoot, skipping observer setup");
36
84
  return;
@@ -64,10 +112,10 @@ var BlocknoteProvider = ({ children, editor, handlers, blockRequirements, editab
64
112
  editor._yRoot?.unobserve(observer);
65
113
  };
66
114
  }, [editor, docType]);
67
- useEffect(() => {
115
+ useEffect2(() => {
68
116
  sharedProposalsRef.current = sharedProposals;
69
117
  }, [sharedProposals]);
70
- const fetchSharedProposal = useCallback(
118
+ const fetchSharedProposal = useCallback2(
71
119
  async (proposalId, contractAddress, force = false) => {
72
120
  const cacheKey = `${contractAddress}:${proposalId}`;
73
121
  const cached = sharedProposalsRef.current[cacheKey];
@@ -106,7 +154,7 @@ var BlocknoteProvider = ({ children, editor, handlers, blockRequirements, editab
106
154
  },
107
155
  [handlers]
108
156
  );
109
- const invalidateProposal = useCallback((proposalId) => {
157
+ const invalidateProposal = useCallback2((proposalId) => {
110
158
  setSharedProposals((prev) => {
111
159
  const updated = { ...prev };
112
160
  Object.keys(updated).forEach((key) => {
@@ -121,17 +169,17 @@ var BlocknoteProvider = ({ children, editor, handlers, blockRequirements, editab
121
169
  return updated;
122
170
  });
123
171
  }, []);
124
- const subscribeToProposal = useCallback(
172
+ const subscribeToProposal = useCallback2(
125
173
  (cacheKey) => {
126
174
  return sharedProposals[cacheKey]?.proposal;
127
175
  },
128
176
  [sharedProposals]
129
177
  );
130
- const openDrawer = useCallback((id, content) => {
178
+ const openDrawer = useCallback2((id, content) => {
131
179
  setActiveDrawerId(id);
132
180
  setDrawerContent(content);
133
181
  }, []);
134
- const closeDrawer = useCallback(() => {
182
+ const closeDrawer = useCallback2(() => {
135
183
  setActiveDrawerId(null);
136
184
  setDrawerContent(null);
137
185
  }, []);
@@ -191,7 +239,7 @@ import React6 from "react";
191
239
  import { Tabs } from "@mantine/core";
192
240
 
193
241
  // src/mantine/components/ConditionsTab.tsx
194
- import React5, { useCallback as useCallback5 } from "react";
242
+ import React5, { useCallback as useCallback6 } from "react";
195
243
  import { Stack as Stack4, SegmentedControl as SegmentedControl2, Button as Button3, Text as Text2, Alert as Alert2 } from "@mantine/core";
196
244
 
197
245
  // src/mantine/blocks/utils/conditionUtils.ts
@@ -268,11 +316,11 @@ function hasEnableConditions(conditionConfig) {
268
316
  }
269
317
 
270
318
  // src/mantine/blocks/components/ConditionBuilder/ConditionBuilderTab.tsx
271
- import React4, { useCallback as useCallback4 } from "react";
319
+ import React4, { useCallback as useCallback5 } from "react";
272
320
  import { Stack as Stack3, SegmentedControl, Button as Button2, Text, Alert } from "@mantine/core";
273
321
 
274
322
  // src/mantine/blocks/components/ConditionBuilder/ConditionRow.tsx
275
- import React3, { useCallback as useCallback3, useMemo } from "react";
323
+ import React3, { useCallback as useCallback4, useMemo as useMemo2 } from "react";
276
324
  import { Card, Stack as Stack2, TextInput as TextInput2, Select as Select2, Group, Button } from "@mantine/core";
277
325
 
278
326
  // src/mantine/blocks/apiRequest/types.ts
@@ -524,28 +572,28 @@ function getPropertyByName(blockType, propertyName) {
524
572
  }
525
573
 
526
574
  // src/mantine/blocks/components/ConditionBuilder/PropertyValueInput.tsx
527
- import React2, { useCallback as useCallback2 } from "react";
575
+ import React2, { useCallback as useCallback3 } from "react";
528
576
  import { TextInput, NumberInput, Switch, Select, Stack } from "@mantine/core";
529
577
  function PropertyValueInput({ property, value, onChange, disabled = false }) {
530
- const handleStringChange = useCallback2(
578
+ const handleStringChange = useCallback3(
531
579
  (event) => {
532
580
  onChange(event.currentTarget.value);
533
581
  },
534
582
  [onChange]
535
583
  );
536
- const handleNumberChange = useCallback2(
584
+ const handleNumberChange = useCallback3(
537
585
  (val) => {
538
586
  onChange(typeof val === "number" ? val : parseFloat(val) || 0);
539
587
  },
540
588
  [onChange]
541
589
  );
542
- const handleBooleanChange = useCallback2(
590
+ const handleBooleanChange = useCallback3(
543
591
  (event) => {
544
592
  onChange(event.currentTarget.checked);
545
593
  },
546
594
  [onChange]
547
595
  );
548
- const handleSelectChange = useCallback2(
596
+ const handleSelectChange = useCallback3(
549
597
  (val) => {
550
598
  if (val === null) return;
551
599
  if (val === "true") onChange(true);
@@ -580,15 +628,15 @@ function PropertyValueInput({ property, value, onChange, disabled = false }) {
580
628
 
581
629
  // src/mantine/blocks/components/ConditionBuilder/ConditionRow.tsx
582
630
  function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
583
- const availableProperties = useMemo(() => {
631
+ const availableProperties = useMemo2(() => {
584
632
  if (!condition.sourceBlockType) return [];
585
633
  return getConditionableProperties(condition.sourceBlockType);
586
634
  }, [condition.sourceBlockType]);
587
- const selectedProperty = useMemo(() => {
635
+ const selectedProperty = useMemo2(() => {
588
636
  if (!condition.sourceBlockType || !condition.rule.property) return null;
589
637
  return getPropertyByName(condition.sourceBlockType, condition.rule.property);
590
638
  }, [condition.sourceBlockType, condition.rule.property]);
591
- const availableOperators = useMemo(() => {
639
+ const availableOperators = useMemo2(() => {
592
640
  if (!selectedProperty) return [];
593
641
  const baseOperators = [
594
642
  { value: "equals", label: "equals" },
@@ -607,13 +655,13 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
607
655
  }
608
656
  return baseOperators;
609
657
  }, [selectedProperty]);
610
- const handleNameChange = useCallback3(
658
+ const handleNameChange = useCallback4(
611
659
  (name) => {
612
660
  onUpdate({ ...condition, name });
613
661
  },
614
662
  [condition, onUpdate]
615
663
  );
616
- const handleSourceBlockChange = useCallback3(
664
+ const handleSourceBlockChange = useCallback4(
617
665
  (value) => {
618
666
  if (!value) {
619
667
  const updatedCondition2 = {
@@ -636,7 +684,7 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
636
684
  },
637
685
  [condition, onUpdate]
638
686
  );
639
- const handlePropertyChange = useCallback3(
687
+ const handlePropertyChange = useCallback4(
640
688
  (property) => {
641
689
  if (!property) return;
642
690
  onUpdate({
@@ -651,7 +699,7 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
651
699
  },
652
700
  [condition, onUpdate]
653
701
  );
654
- const handleOperatorChange = useCallback3(
702
+ const handleOperatorChange = useCallback4(
655
703
  (operator) => {
656
704
  if (!operator) return;
657
705
  onUpdate({
@@ -664,7 +712,7 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
664
712
  },
665
713
  [condition, onUpdate]
666
714
  );
667
- const handleValueChange = useCallback3(
715
+ const handleValueChange = useCallback4(
668
716
  (value) => {
669
717
  onUpdate({
670
718
  ...condition,
@@ -676,7 +724,7 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
676
724
  },
677
725
  [condition, onUpdate]
678
726
  );
679
- const handleActionChange = useCallback3(
727
+ const handleActionChange = useCallback4(
680
728
  (action) => {
681
729
  if (!action) return;
682
730
  onUpdate({
@@ -689,7 +737,7 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
689
737
  },
690
738
  [condition, onUpdate]
691
739
  );
692
- const handleMessageChange = useCallback3(
740
+ const handleMessageChange = useCallback4(
693
741
  (message) => {
694
742
  onUpdate({
695
743
  ...condition,
@@ -749,7 +797,7 @@ function ConditionRow({ condition, availableBlocks, onUpdate, onDelete }) {
749
797
  function ConditionsTab({ block, editor }) {
750
798
  const currentConditions = parseConditionConfig(block.props.conditions);
751
799
  const availableBlocks = getAvailableBlocks(editor?.document || [], block.id);
752
- const updateConditions = useCallback5(
800
+ const updateConditions = useCallback6(
753
801
  (newConfig) => {
754
802
  const conditionsString = stringifyConditionConfig(newConfig);
755
803
  editor.updateBlock(block, {
@@ -761,7 +809,7 @@ function ConditionsTab({ block, editor }) {
761
809
  },
762
810
  [editor, block]
763
811
  );
764
- const handleModeChange = useCallback5(
812
+ const handleModeChange = useCallback6(
765
813
  (mode) => {
766
814
  updateConditions({
767
815
  ...currentConditions,
@@ -770,7 +818,7 @@ function ConditionsTab({ block, editor }) {
770
818
  },
771
819
  [currentConditions, updateConditions]
772
820
  );
773
- const handleAddCondition = useCallback5(() => {
821
+ const handleAddCondition = useCallback6(() => {
774
822
  const newCondition = createDefaultCondition();
775
823
  const newConfig = {
776
824
  ...currentConditions,
@@ -780,7 +828,7 @@ function ConditionsTab({ block, editor }) {
780
828
  };
781
829
  updateConditions(newConfig);
782
830
  }, [currentConditions, updateConditions]);
783
- const handleUpdateCondition = useCallback5(
831
+ const handleUpdateCondition = useCallback6(
784
832
  (index, updatedCondition) => {
785
833
  const newConditions = [...currentConditions.conditions];
786
834
  newConditions[index] = updatedCondition;
@@ -792,7 +840,7 @@ function ConditionsTab({ block, editor }) {
792
840
  },
793
841
  [currentConditions, updateConditions]
794
842
  );
795
- const handleDeleteCondition = useCallback5(
843
+ const handleDeleteCondition = useCallback6(
796
844
  (index) => {
797
845
  const newConditions = currentConditions.conditions.filter((_, i) => i !== index);
798
846
  updateConditions({
@@ -850,7 +898,7 @@ function ReusablePanel({ extraTabs, context }) {
850
898
  }
851
899
 
852
900
  // src/mantine/blocks/checkbox/template/GeneralTab.tsx
853
- import React7, { useEffect as useEffect2, useMemo as useMemo2, useState as useState2 } from "react";
901
+ import React7, { useEffect as useEffect3, useMemo as useMemo3, useState as useState2 } from "react";
854
902
  import { Divider, SegmentedControl as SegmentedControl3, Stack as Stack5, Switch as Switch2, Text as Text3, TextInput as TextInput3, Textarea, PillsInput, Pill } from "@mantine/core";
855
903
  var GeneralTab = ({
856
904
  title,
@@ -869,19 +917,19 @@ var GeneralTab = ({
869
917
  const [localMode, setLocalMode] = useState2(allowedMode);
870
918
  const [localValues, setLocalValues] = useState2(allowedValues);
871
919
  const [inputValue, setInputValue] = useState2("");
872
- useEffect2(() => {
920
+ useEffect3(() => {
873
921
  setLocalTitle(title || "");
874
922
  }, [title]);
875
- useEffect2(() => {
923
+ useEffect3(() => {
876
924
  setLocalDescription(description || "");
877
925
  }, [description]);
878
- useEffect2(() => {
926
+ useEffect3(() => {
879
927
  setLocalInitialChecked(initialChecked);
880
928
  }, [initialChecked]);
881
- useEffect2(() => {
929
+ useEffect3(() => {
882
930
  setLocalMode(allowedMode);
883
931
  }, [allowedMode]);
884
- useEffect2(() => {
932
+ useEffect3(() => {
885
933
  setLocalValues(allowedValues);
886
934
  }, [allowedValues]);
887
935
  const handleModeChange = (value) => {
@@ -912,7 +960,7 @@ var GeneralTab = ({
912
960
  onAllowedChange(localMode, newValues);
913
961
  }
914
962
  };
915
- const allowedHint = useMemo2(() => {
963
+ const allowedHint = useMemo3(() => {
916
964
  if (localMode === "all") {
917
965
  return "Everyone in the flow can toggle this checkbox.";
918
966
  }
@@ -978,54 +1026,6 @@ var GeneralTab = ({
978
1026
  ))))));
979
1027
  };
980
1028
 
981
- // src/mantine/hooks/usePanel.ts
982
- import { useCallback as useCallback6, useMemo as useMemo3, useEffect as useEffect3, useRef as useRef2 } from "react";
983
- import { create } from "zustand";
984
- var usePanelStore = create((set) => ({
985
- activePanel: null,
986
- registeredPanels: /* @__PURE__ */ new Map(),
987
- setActivePanel: (panelId) => set({ activePanel: panelId }),
988
- closePanel: () => set({ activePanel: null }),
989
- registerPanel: (id, content) => set((state) => {
990
- const newPanels = new Map(state.registeredPanels);
991
- newPanels.set(id, content);
992
- return { registeredPanels: newPanels };
993
- }),
994
- unregisterPanel: (id) => set((state) => {
995
- const newPanels = new Map(state.registeredPanels);
996
- newPanels.delete(id);
997
- return { registeredPanels: newPanels };
998
- })
999
- }));
1000
- var usePanel = (panelId, content) => {
1001
- const activePanel = usePanelStore((state) => state.activePanel);
1002
- const setActivePanel = usePanelStore((state) => state.setActivePanel);
1003
- const closePanel = usePanelStore((state) => state.closePanel);
1004
- const isOpen = useMemo3(() => activePanel === panelId, [activePanel, panelId]);
1005
- const contentRef = useRef2(content);
1006
- useEffect3(() => {
1007
- contentRef.current = content;
1008
- });
1009
- useEffect3(() => {
1010
- const { registerPanel, unregisterPanel } = usePanelStore.getState();
1011
- registerPanel(panelId, contentRef.current);
1012
- return () => {
1013
- unregisterPanel(panelId);
1014
- };
1015
- }, [panelId]);
1016
- useEffect3(() => {
1017
- const { registerPanel } = usePanelStore.getState();
1018
- registerPanel(panelId, content);
1019
- }, [content, panelId]);
1020
- const open = useCallback6(() => {
1021
- setActivePanel(panelId);
1022
- }, [panelId, setActivePanel]);
1023
- const close = useCallback6(() => {
1024
- closePanel();
1025
- }, [closePanel]);
1026
- return { opened: isOpen, open, close };
1027
- };
1028
-
1029
1029
  // src/mantine/blocks/checkbox/template/TemplateConfig.tsx
1030
1030
  var TemplateConfig = ({ editor, block }) => {
1031
1031
  const { closePanel } = usePanelStore();
@@ -2237,7 +2237,22 @@ var GeneralTab2 = ({ initialConfig, onSave }) => {
2237
2237
  }
2238
2238
  };
2239
2239
  const typeConfig = selectedType ? getListTypeConfig(selectedType) : null;
2240
- return /* @__PURE__ */ React14.createElement(Stack8, { gap: "lg" }, /* @__PURE__ */ React14.createElement(Accordion, { value: accordionValue, onChange: setAccordionValue }, /* @__PURE__ */ React14.createElement(Accordion.Item, { value: "type" }, /* @__PURE__ */ React14.createElement(Accordion.Control, null, /* @__PURE__ */ React14.createElement(Text6, { fw: 600 }, "Choose List Type")), /* @__PURE__ */ React14.createElement(Accordion.Panel, null, /* @__PURE__ */ React14.createElement(Stack8, { gap: "sm", mt: "md" }, listTypes.map((listType) => /* @__PURE__ */ React14.createElement(
2240
+ return /* @__PURE__ */ React14.createElement(Stack8, { gap: "lg" }, /* @__PURE__ */ React14.createElement(Accordion, { value: accordionValue, onChange: setAccordionValue }, /* @__PURE__ */ React14.createElement(Accordion.Item, { value: "type" }, /* @__PURE__ */ React14.createElement(
2241
+ Accordion.Control,
2242
+ {
2243
+ styles: {
2244
+ control: {
2245
+ "&:hover": {
2246
+ backgroundColor: "var(--mantine-color-dark-7) !important"
2247
+ }
2248
+ },
2249
+ chevron: {
2250
+ color: "var(--mantine-color-dark-1)"
2251
+ }
2252
+ }
2253
+ },
2254
+ /* @__PURE__ */ React14.createElement(Text6, { fw: 600 }, "Choose List Type")
2255
+ ), /* @__PURE__ */ React14.createElement(Accordion.Panel, null, /* @__PURE__ */ React14.createElement(Stack8, { gap: "sm", mt: "md" }, listTypes.map((listType) => /* @__PURE__ */ React14.createElement(
2241
2256
  Card4,
2242
2257
  {
2243
2258
  key: listType.id,
@@ -2248,6 +2263,11 @@ var GeneralTab2 = ({ initialConfig, onSave }) => {
2248
2263
  style: {
2249
2264
  cursor: "pointer"
2250
2265
  },
2266
+ styles: {
2267
+ root: {
2268
+ border: "1px solid var(--mantine-color-gray-8)"
2269
+ }
2270
+ },
2251
2271
  onClick: () => handleTypeSelect(listType.id)
2252
2272
  },
2253
2273
  /* @__PURE__ */ React14.createElement(Group4, { gap: "md", align: "flex-start" }, /* @__PURE__ */ React14.createElement(
@@ -2267,7 +2287,22 @@ var GeneralTab2 = ({ initialConfig, onSave }) => {
2267
2287
  },
2268
2288
  listType.icon
2269
2289
  ), /* @__PURE__ */ React14.createElement(Stack8, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React14.createElement(Text6, { size: "md", fw: 600 }, listType.name), /* @__PURE__ */ React14.createElement(Text6, { size: "sm", c: "dimmed" }, listType.description)))
2270
- ))))), selectedType && typeConfig && /* @__PURE__ */ React14.createElement(Accordion.Item, { value: "configure" }, /* @__PURE__ */ React14.createElement(Accordion.Control, null, /* @__PURE__ */ React14.createElement(Text6, { fw: 600 }, "Configure ", typeConfig.metadata.name)), /* @__PURE__ */ React14.createElement(Accordion.Panel, null, /* @__PURE__ */ React14.createElement(Stack8, { gap: "md", mt: "md" }, /* @__PURE__ */ React14.createElement(Text6, { size: "sm", c: "dimmed" }, typeConfig.metadata.description), /* @__PURE__ */ React14.createElement(Stack8, { gap: "sm" }, typeConfig.configFields.map((field) => renderConfigField(field))))))), selectedType && /* @__PURE__ */ React14.createElement(Button4, { onClick: handleSaveConfig, disabled: !isConfigValid(), fullWidth: true }, "Save Configuration"));
2290
+ ))))), selectedType && typeConfig && /* @__PURE__ */ React14.createElement(Accordion.Item, { value: "configure" }, /* @__PURE__ */ React14.createElement(
2291
+ Accordion.Control,
2292
+ {
2293
+ styles: {
2294
+ control: {
2295
+ "&:hover": {
2296
+ backgroundColor: "var(--mantine-color-dark-7)"
2297
+ }
2298
+ },
2299
+ chevron: {
2300
+ color: "var(--mantine-color-dark-1)"
2301
+ }
2302
+ }
2303
+ },
2304
+ /* @__PURE__ */ React14.createElement(Text6, { fw: 600 }, "Configure ", typeConfig.metadata.name)
2305
+ ), /* @__PURE__ */ React14.createElement(Accordion.Panel, null, /* @__PURE__ */ React14.createElement(Stack8, { gap: "md", mt: "md" }, /* @__PURE__ */ React14.createElement(Text6, { size: "sm", c: "dimmed" }, typeConfig.metadata.description), /* @__PURE__ */ React14.createElement(Stack8, { gap: "sm" }, typeConfig.configFields.map((field) => renderConfigField(field))))))), selectedType && /* @__PURE__ */ React14.createElement(Button4, { onClick: handleSaveConfig, disabled: !isConfigValid(), fullWidth: true }, "Save Configuration"));
2271
2306
  };
2272
2307
 
2273
2308
  // src/mantine/blocks/list/template/TemplateConfig.tsx
@@ -2329,6 +2364,7 @@ var TemplateConfig2 = ({ editor, block }) => {
2329
2364
  p: "md",
2330
2365
  shadow: "sm",
2331
2366
  style: {
2367
+ flex: 1,
2332
2368
  display: "flex",
2333
2369
  flexDirection: "column"
2334
2370
  }
@@ -2687,7 +2723,37 @@ var ListActionsMenu = ({ options, selectionMode, onSelectActionClick, value, onC
2687
2723
  opt.label
2688
2724
  );
2689
2725
  };
2690
- return /* @__PURE__ */ React32.createElement(Menu, { shadow: "md", width: 220 }, /* @__PURE__ */ React32.createElement(Menu.Target, null, /* @__PURE__ */ React32.createElement(ActionIcon4, { variant: "subtle", size: "sm", "aria-label": "List actions", title: "List actions" }, /* @__PURE__ */ React32.createElement(IconAdjustmentsHorizontal, { size: 18 }))), /* @__PURE__ */ React32.createElement(Menu.Dropdown, null, /* @__PURE__ */ React32.createElement(Menu.Label, null, /* @__PURE__ */ React32.createElement(Text20, { c: "dimmed" }, "Order By")), options.map((opt) => /* @__PURE__ */ React32.createElement(React32.Fragment, { key: opt.key }, renderItem(opt, "desc"), renderItem(opt, "asc"))), /* @__PURE__ */ React32.createElement(Menu.Divider, null), /* @__PURE__ */ React32.createElement(Menu.Item, { leftSection: /* @__PURE__ */ React32.createElement(IconAdjustments, { size: 16 }) }, "Smart Filter"), /* @__PURE__ */ React32.createElement(Menu.Divider, null), /* @__PURE__ */ React32.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "single" ? null : "single"), leftSection: /* @__PURE__ */ React32.createElement(IconCheckbox2, { size: 16 }) }, "Single Select"), /* @__PURE__ */ React32.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "multi" ? null : "multi"), leftSection: /* @__PURE__ */ React32.createElement(IconCheckbox2, { size: 16 }) }, "Multi Select"), onDownloadCsv && /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(Menu.Divider, null), /* @__PURE__ */ React32.createElement(Menu.Item, { onClick: onDownloadCsv, leftSection: /* @__PURE__ */ React32.createElement(IconDownload, { size: 16 }) }, "Download CSV"))));
2726
+ return /* @__PURE__ */ React32.createElement(
2727
+ Menu,
2728
+ {
2729
+ shadow: "md",
2730
+ width: 220,
2731
+ styles: {
2732
+ dropdown: {
2733
+ backgroundColor: "var(--mantine-color-dark-7)",
2734
+ borderColor: "var(--mantine-color-dark-4)"
2735
+ },
2736
+ item: {
2737
+ color: "#fff",
2738
+ backgroundColor: "var(--mantine-color-dark-7)",
2739
+ "&:hover": {
2740
+ backgroundColor: "var(--mantine-color-dark-6)"
2741
+ },
2742
+ '&[data-active="true"]': {
2743
+ backgroundColor: "var(--mantine-color-dark-5)"
2744
+ }
2745
+ },
2746
+ label: {
2747
+ color: "#fff"
2748
+ },
2749
+ divider: {
2750
+ borderColor: "var(--mantine-color-dark-4)"
2751
+ }
2752
+ }
2753
+ },
2754
+ /* @__PURE__ */ React32.createElement(Menu.Target, null, /* @__PURE__ */ React32.createElement(ActionIcon4, { variant: "subtle", size: "sm", "aria-label": "List actions", title: "List actions" }, /* @__PURE__ */ React32.createElement(IconAdjustmentsHorizontal, { size: 18 }))),
2755
+ /* @__PURE__ */ React32.createElement(Menu.Dropdown, null, /* @__PURE__ */ React32.createElement(Menu.Label, null, /* @__PURE__ */ React32.createElement(Text20, null, "Order By")), options.map((opt) => /* @__PURE__ */ React32.createElement(React32.Fragment, { key: opt.key }, renderItem(opt, "desc"), renderItem(opt, "asc"))), /* @__PURE__ */ React32.createElement(Menu.Divider, null), /* @__PURE__ */ React32.createElement(Menu.Item, { leftSection: /* @__PURE__ */ React32.createElement(IconAdjustments, { size: 16 }) }, "Smart Filter"), /* @__PURE__ */ React32.createElement(Menu.Divider, null), /* @__PURE__ */ React32.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "single" ? null : "single"), leftSection: /* @__PURE__ */ React32.createElement(IconCheckbox2, { size: 16 }) }, "Single Select"), /* @__PURE__ */ React32.createElement(Menu.Item, { onClick: () => onSelectActionClick(selectionMode === "multi" ? null : "multi"), leftSection: /* @__PURE__ */ React32.createElement(IconCheckbox2, { size: 16 }) }, "Multi Select"), onDownloadCsv && /* @__PURE__ */ React32.createElement(React32.Fragment, null, /* @__PURE__ */ React32.createElement(Menu.Divider, null), /* @__PURE__ */ React32.createElement(Menu.Item, { onClick: onDownloadCsv, leftSection: /* @__PURE__ */ React32.createElement(IconDownload, { size: 16 }) }, "Download CSV")))
2756
+ );
2691
2757
  };
2692
2758
 
2693
2759
  // src/core/lib/sortListItems.ts
@@ -10617,6 +10683,7 @@ function IxoEditorContent({
10617
10683
  className,
10618
10684
  onChange,
10619
10685
  onSelectionChange,
10686
+ isPanelVisible = true,
10620
10687
  children
10621
10688
  }) {
10622
10689
  return /* @__PURE__ */ React113.createElement("div", { style: { display: "flex", height: "100%" } }, /* @__PURE__ */ React113.createElement("div", { className: `ixo-editor ixo-editor--theme-${config.theme} ${className}`, style: { flex: 1 } }, /* @__PURE__ */ React113.createElement(
@@ -10646,7 +10713,7 @@ function IxoEditorContent({
10646
10713
  }
10647
10714
  ),
10648
10715
  children
10649
- )), /* @__PURE__ */ React113.createElement(PanelContent, null));
10716
+ )), isPanelVisible && /* @__PURE__ */ React113.createElement(PanelContent, null));
10650
10717
  }
10651
10718
  function IxoEditor({
10652
10719
  editor,
@@ -10657,7 +10724,8 @@ function IxoEditor({
10657
10724
  children,
10658
10725
  mantineTheme,
10659
10726
  handlers,
10660
- blockRequirements
10727
+ blockRequirements,
10728
+ isPanelVisible
10661
10729
  }) {
10662
10730
  if (!editor) {
10663
10731
  return null;
@@ -10672,7 +10740,19 @@ function IxoEditor({
10672
10740
  tableHandles: true
10673
10741
  };
10674
10742
  const isEditable = editable;
10675
- const editorContent = /* @__PURE__ */ React113.createElement(BlocknoteProvider, { editor, handlers, blockRequirements, editable: isEditable }, /* @__PURE__ */ React113.createElement(ListBlocksUIProvider, null, /* @__PURE__ */ React113.createElement(Flex22, { pr: 25, justify: "flex-end", align: "center", gap: "xs" }, /* @__PURE__ */ React113.createElement(Text57, { size: "xs", c: "dimmed", tt: "uppercase" }, "Global actions"), /* @__PURE__ */ React113.createElement(ListBlocksToolbar, null)), /* @__PURE__ */ React113.createElement(IxoEditorContent, { editor, config, isEditable, className, onChange, onSelectionChange }, children)));
10743
+ const editorContent = /* @__PURE__ */ React113.createElement(BlocknoteProvider, { editor, handlers, blockRequirements, editable: isEditable }, /* @__PURE__ */ React113.createElement(ListBlocksUIProvider, null, /* @__PURE__ */ React113.createElement(Flex22, { pr: 25, justify: "flex-end", align: "center", gap: "xs" }, /* @__PURE__ */ React113.createElement(Text57, { size: "xs", c: "dimmed", tt: "uppercase" }, "Global actions"), /* @__PURE__ */ React113.createElement(ListBlocksToolbar, null)), /* @__PURE__ */ React113.createElement(
10744
+ IxoEditorContent,
10745
+ {
10746
+ isPanelVisible,
10747
+ editor,
10748
+ config,
10749
+ isEditable,
10750
+ className,
10751
+ onChange,
10752
+ onSelectionChange
10753
+ },
10754
+ children
10755
+ )));
10676
10756
  if (mantineTheme) {
10677
10757
  return /* @__PURE__ */ React113.createElement(MantineProvider, { theme: mantineTheme }, editorContent);
10678
10758
  }
@@ -10738,6 +10818,8 @@ async function getEntity(entityId) {
10738
10818
  }
10739
10819
 
10740
10820
  export {
10821
+ usePanelStore,
10822
+ usePanel,
10741
10823
  BlocknoteProvider,
10742
10824
  useBlocknoteContext,
10743
10825
  useBlocknoteHandlers,
@@ -10758,4 +10840,4 @@ export {
10758
10840
  ixoGraphQLClient,
10759
10841
  getEntity
10760
10842
  };
10761
- //# sourceMappingURL=chunk-FDLWSUB5.mjs.map
10843
+ //# sourceMappingURL=chunk-O477KPVK.mjs.map