@ixo/editor 5.36.1 → 5.37.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.
- package/dist/{chunk-CDBCSQQA.mjs → chunk-MNPEDF2U.mjs} +250 -123
- package/dist/chunk-MNPEDF2U.mjs.map +1 -0
- package/dist/{chunk-MCFRBVCB.mjs → chunk-OOPKMGYW.mjs} +29 -1
- package/dist/{chunk-MCFRBVCB.mjs.map → chunk-OOPKMGYW.mjs.map} +1 -1
- package/dist/{chunk-OXIWTOZ5.mjs → chunk-SBSTGR5L.mjs} +72 -2
- package/dist/chunk-SBSTGR5L.mjs.map +1 -0
- package/dist/core/index.d.ts +38 -5
- package/dist/core/index.mjs +6 -2
- package/dist/core/index.mjs.map +1 -1
- package/dist/{graphql-client-DsWWkro-.d.ts → graphql-client-7RPUfOZ7.d.ts} +56 -3
- package/dist/{index-DUqLNz0c.d.ts → index-1drTq85A.d.ts} +4 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +7 -3
- package/dist/index.mjs.map +1 -1
- package/dist/mantine/index.d.ts +46 -4
- package/dist/mantine/index.mjs +122 -2
- package/dist/mantine/index.mjs.map +1 -1
- package/dist/{store-C2NG2nTB.d.ts → store-ChkNN7b4.d.ts} +1 -1
- package/package.json +1 -1
- package/style-core.css +5 -2
- package/style-mantine.css +5 -2
- package/style-scoped.css +5 -2
- package/style.css +5 -2
- package/dist/chunk-CDBCSQQA.mjs.map +0 -1
- package/dist/chunk-OXIWTOZ5.mjs.map +0 -1
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
transformSurveyToCredentialSubject,
|
|
66
66
|
updateXeroWorkReviewPayloadForEditor,
|
|
67
67
|
upsertXeroWorkItemForEditor
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-OOPKMGYW.mjs";
|
|
69
69
|
|
|
70
70
|
// src/mantine/hooks/usePanel.ts
|
|
71
71
|
import { useCallback, useMemo, useEffect, useRef } from "react";
|
|
@@ -571,6 +571,7 @@ var BlocknoteProvider = ({
|
|
|
571
571
|
getDynamicListData,
|
|
572
572
|
dynamicListPanelRenderer,
|
|
573
573
|
domainCardRenderer,
|
|
574
|
+
onFlowStepRefClick,
|
|
574
575
|
mapConfig,
|
|
575
576
|
connectedUsers,
|
|
576
577
|
awarenessInstance,
|
|
@@ -723,6 +724,7 @@ var BlocknoteProvider = ({
|
|
|
723
724
|
getDynamicListData,
|
|
724
725
|
dynamicListPanelRenderer,
|
|
725
726
|
domainCardRenderer,
|
|
727
|
+
onFlowStepRefClick,
|
|
726
728
|
mapConfig,
|
|
727
729
|
connectedUsers,
|
|
728
730
|
awarenessInstance,
|
|
@@ -1630,7 +1632,13 @@ var GeneralTab = ({
|
|
|
1630
1632
|
// src/mantine/components/Layouts/BaseRightPanelLayout.tsx
|
|
1631
1633
|
import { ActionIcon as ActionIcon5, Box as Box2, Flex as Flex2, Stack as Stack11, Text as Text9 } from "@mantine/core";
|
|
1632
1634
|
import { IconBrain, IconHourglass, IconShieldCheck as IconShieldCheck2, IconWand, IconX as IconX3 } from "@tabler/icons-react";
|
|
1633
|
-
import React21, { useEffect as useEffect11, useMemo as useMemo8 } from "react";
|
|
1635
|
+
import React21, { useContext as useContext2, useEffect as useEffect11, useMemo as useMemo8 } from "react";
|
|
1636
|
+
|
|
1637
|
+
// src/mantine/flow/embeddedPanelContext.ts
|
|
1638
|
+
import { createContext as createContext2 } from "react";
|
|
1639
|
+
var FlowPanelEmbeddedContext = createContext2(false);
|
|
1640
|
+
|
|
1641
|
+
// src/mantine/components/Layouts/BaseRightPanelLayout.tsx
|
|
1634
1642
|
import { useMediaQuery } from "@mantine/hooks";
|
|
1635
1643
|
|
|
1636
1644
|
// src/mantine/components/ReusablePanel.tsx
|
|
@@ -2939,6 +2947,7 @@ function BaseRightPanelLayout({ title, isTemplate: _isTemplate = true, captionCo
|
|
|
2939
2947
|
}
|
|
2940
2948
|
}, [context?.block.props.skill]);
|
|
2941
2949
|
const tabState = useTabState(allTabs);
|
|
2950
|
+
const embedded = useContext2(FlowPanelEmbeddedContext);
|
|
2942
2951
|
return (
|
|
2943
2952
|
// pos:absolute + inset:0 gives the Stack a definite size from its
|
|
2944
2953
|
// positioned parent (AppShell.Aside). `h="100%"` doesn't reliably
|
|
@@ -2955,7 +2964,7 @@ function BaseRightPanelLayout({ title, isTemplate: _isTemplate = true, captionCo
|
|
|
2955
2964
|
overflow: "hidden"
|
|
2956
2965
|
}
|
|
2957
2966
|
},
|
|
2958
|
-
/* @__PURE__ */ React21.createElement(Flex2, { align: "center", px: "md", justify: "space-between", gap: "md" }, title ? /* @__PURE__ */ React21.createElement(Text9, { fz: 16, fw: 400, truncate: "end", style: { flex: 1, minWidth: 0 } }, title) : /* @__PURE__ */ React21.createElement(Box2, { style: { flex: 1 } }), /* @__PURE__ */ React21.createElement(Flex2, { align: "center", gap: "5px" }, /* @__PURE__ */ React21.createElement(PanelMaximizeButton, { isMaximized, onToggleMaximize: () => setMaximized(!isMaximized), isMobile }), /* @__PURE__ */ React21.createElement(
|
|
2967
|
+
!embedded && /* @__PURE__ */ React21.createElement(Flex2, { align: "center", px: "md", justify: "space-between", gap: "md" }, title ? /* @__PURE__ */ React21.createElement(Text9, { fz: 16, fw: 400, truncate: "end", style: { flex: 1, minWidth: 0 } }, title) : /* @__PURE__ */ React21.createElement(Box2, { style: { flex: 1 } }), /* @__PURE__ */ React21.createElement(Flex2, { align: "center", gap: "5px" }, /* @__PURE__ */ React21.createElement(PanelMaximizeButton, { isMaximized, onToggleMaximize: () => setMaximized(!isMaximized), isMobile }), /* @__PURE__ */ React21.createElement(
|
|
2959
2968
|
ActionIcon5,
|
|
2960
2969
|
{
|
|
2961
2970
|
onClick: () => {
|
|
@@ -2967,11 +2976,11 @@ function BaseRightPanelLayout({ title, isTemplate: _isTemplate = true, captionCo
|
|
|
2967
2976
|
},
|
|
2968
2977
|
/* @__PURE__ */ React21.createElement(IconX3, { size: 18 })
|
|
2969
2978
|
))),
|
|
2970
|
-
allTabs.length > 0 && /* @__PURE__ */ React21.createElement(Box2, { px: 40 }, /* @__PURE__ */ React21.createElement(TabsSelection, { tabs: allTabs, activeTab: tabState.activeTab, onTabChange: tabState.setActiveTab, defaultValue: tabState.defaultValue })),
|
|
2979
|
+
allTabs.length > 0 && /* @__PURE__ */ React21.createElement(Box2, { px: embedded ? 16 : 40 }, /* @__PURE__ */ React21.createElement(TabsSelection, { tabs: allTabs, activeTab: tabState.activeTab, onTabChange: tabState.setActiveTab, defaultValue: tabState.defaultValue })),
|
|
2971
2980
|
selectedSkill && selectedSkill?.name && /* @__PURE__ */ React21.createElement(
|
|
2972
2981
|
Flex2,
|
|
2973
2982
|
{
|
|
2974
|
-
mx: 40,
|
|
2983
|
+
mx: embedded ? 16 : 40,
|
|
2975
2984
|
style: { borderRadius: 16, cursor: "pointer" },
|
|
2976
2985
|
mb: 12,
|
|
2977
2986
|
py: "sm",
|
|
@@ -2988,7 +2997,7 @@ function BaseRightPanelLayout({ title, isTemplate: _isTemplate = true, captionCo
|
|
|
2988
2997
|
/* @__PURE__ */ React21.createElement(
|
|
2989
2998
|
Box2,
|
|
2990
2999
|
{
|
|
2991
|
-
px: 40,
|
|
3000
|
+
px: embedded ? 16 : 40,
|
|
2992
3001
|
className: "ixo-hide-scrollbar",
|
|
2993
3002
|
style: {
|
|
2994
3003
|
flex: 1,
|
|
@@ -42588,9 +42597,15 @@ var SecretsBlockSpec = createReactBlockSpec23(
|
|
|
42588
42597
|
|
|
42589
42598
|
// src/mantine/blocks/secrets/template/SecretsTemplateView.tsx
|
|
42590
42599
|
import React379 from "react";
|
|
42600
|
+
var SecretsTemplateView = ({ editor, block }) => {
|
|
42601
|
+
return /* @__PURE__ */ React379.createElement(SecretsBlock, { editor, block });
|
|
42602
|
+
};
|
|
42591
42603
|
|
|
42592
42604
|
// src/mantine/blocks/secrets/flow/SecretsFlowView.tsx
|
|
42593
42605
|
import React380 from "react";
|
|
42606
|
+
var SecretsFlowView = ({ editor, block }) => {
|
|
42607
|
+
return /* @__PURE__ */ React380.createElement(SecretsBlock, { editor, block });
|
|
42608
|
+
};
|
|
42594
42609
|
|
|
42595
42610
|
// src/mantine/blocks/skills/SkillsBlockSpec.tsx
|
|
42596
42611
|
import React384 from "react";
|
|
@@ -43705,6 +43720,66 @@ var getExtraSlashMenuItems = (editor, translate) => {
|
|
|
43705
43720
|
return slashMenuList;
|
|
43706
43721
|
};
|
|
43707
43722
|
|
|
43723
|
+
// src/mantine/inline/FlowStepRefSpec.tsx
|
|
43724
|
+
import React385 from "react";
|
|
43725
|
+
import { createReactInlineContentSpec } from "@blocknote/react";
|
|
43726
|
+
import { IconBolt as IconBolt13 } from "@tabler/icons-react";
|
|
43727
|
+
function FlowStepRefChip({ nodeId, label }) {
|
|
43728
|
+
const { onFlowStepRefClick } = useBlocknoteContext();
|
|
43729
|
+
const text = label || nodeId || "Step";
|
|
43730
|
+
return /* @__PURE__ */ React385.createElement(
|
|
43731
|
+
"span",
|
|
43732
|
+
{
|
|
43733
|
+
role: "button",
|
|
43734
|
+
tabIndex: 0,
|
|
43735
|
+
contentEditable: false,
|
|
43736
|
+
"data-flow-step-ref": nodeId,
|
|
43737
|
+
onClick: () => onFlowStepRefClick?.(nodeId),
|
|
43738
|
+
onKeyDown: (e) => {
|
|
43739
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
43740
|
+
e.preventDefault();
|
|
43741
|
+
onFlowStepRefClick?.(nodeId);
|
|
43742
|
+
}
|
|
43743
|
+
},
|
|
43744
|
+
style: {
|
|
43745
|
+
display: "inline-flex",
|
|
43746
|
+
alignItems: "center",
|
|
43747
|
+
gap: 3,
|
|
43748
|
+
padding: "0 6px",
|
|
43749
|
+
borderRadius: 4,
|
|
43750
|
+
lineHeight: 1.5,
|
|
43751
|
+
cursor: "pointer",
|
|
43752
|
+
userSelect: "none",
|
|
43753
|
+
whiteSpace: "nowrap",
|
|
43754
|
+
verticalAlign: "baseline",
|
|
43755
|
+
backgroundColor: "var(--mantine-color-blue-light)",
|
|
43756
|
+
color: "var(--mantine-color-blue-light-color)",
|
|
43757
|
+
fontWeight: 500
|
|
43758
|
+
}
|
|
43759
|
+
},
|
|
43760
|
+
/* @__PURE__ */ React385.createElement(IconBolt13, { size: 13, style: { flexShrink: 0 } }),
|
|
43761
|
+
text
|
|
43762
|
+
);
|
|
43763
|
+
}
|
|
43764
|
+
var FlowStepRefSpec = createReactInlineContentSpec(
|
|
43765
|
+
{
|
|
43766
|
+
type: "flowStepRef",
|
|
43767
|
+
propSchema: {
|
|
43768
|
+
nodeId: { default: "" },
|
|
43769
|
+
label: { default: "" }
|
|
43770
|
+
},
|
|
43771
|
+
content: "none"
|
|
43772
|
+
},
|
|
43773
|
+
{
|
|
43774
|
+
render: (props) => /* @__PURE__ */ React385.createElement(FlowStepRefChip, { nodeId: props.inlineContent.props.nodeId, label: props.inlineContent.props.label })
|
|
43775
|
+
}
|
|
43776
|
+
);
|
|
43777
|
+
|
|
43778
|
+
// src/mantine/inline/index.ts
|
|
43779
|
+
var inlineContentSpecs = {
|
|
43780
|
+
flowStepRef: FlowStepRefSpec
|
|
43781
|
+
};
|
|
43782
|
+
|
|
43708
43783
|
// src/mantine/hooks/useCreateIxoEditor.ts
|
|
43709
43784
|
import { useCreateBlockNote } from "@blocknote/react";
|
|
43710
43785
|
import { BlockNoteSchema, defaultBlockSpecs, defaultInlineContentSpecs } from "@blocknote/core";
|
|
@@ -43812,7 +43887,8 @@ function useCreateIxoEditor(options) {
|
|
|
43812
43887
|
...blockSpecs
|
|
43813
43888
|
},
|
|
43814
43889
|
inlineContentSpecs: {
|
|
43815
|
-
...defaultInlineContentSpecs
|
|
43890
|
+
...defaultInlineContentSpecs,
|
|
43891
|
+
...inlineContentSpecs
|
|
43816
43892
|
},
|
|
43817
43893
|
styleSpecs: ixoStyleSpecs
|
|
43818
43894
|
});
|
|
@@ -44623,7 +44699,8 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
44623
44699
|
...blockSpecs
|
|
44624
44700
|
},
|
|
44625
44701
|
inlineContentSpecs: {
|
|
44626
|
-
...defaultInlineContentSpecs2
|
|
44702
|
+
...defaultInlineContentSpecs2,
|
|
44703
|
+
...inlineContentSpecs
|
|
44627
44704
|
},
|
|
44628
44705
|
styleSpecs: ixoStyleSpecs
|
|
44629
44706
|
}),
|
|
@@ -45001,17 +45078,17 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
45001
45078
|
}
|
|
45002
45079
|
|
|
45003
45080
|
// src/mantine/components/Base/BaseIconPicker.tsx
|
|
45004
|
-
import
|
|
45081
|
+
import React387, { useState as useState206, useMemo as useMemo167, useEffect as useEffect173 } from "react";
|
|
45005
45082
|
import { TextInput as TextInput13, Tabs as Tabs4, Box as Box73, Stack as Stack284, UnstyledButton as UnstyledButton8, Text as Text259, Center as Center15, ScrollArea as ScrollArea10, Group as Group155, Popover as Popover5 } from "@mantine/core";
|
|
45006
45083
|
import * as TablerIcons2 from "@tabler/icons-react";
|
|
45007
45084
|
import { IconSearch as IconSearch12, IconX as IconX20, IconChevronLeft, IconChevronRight as IconChevronRight13 } from "@tabler/icons-react";
|
|
45008
45085
|
|
|
45009
45086
|
// src/mantine/components/Base/CoverImageButton.tsx
|
|
45010
|
-
import
|
|
45087
|
+
import React386, { forwardRef, useState as useState205 } from "react";
|
|
45011
45088
|
import { UnstyledButton as UnstyledButton7, Group as Group154, Text as Text258 } from "@mantine/core";
|
|
45012
45089
|
var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false, onClick, icon: icon2, children, style }, ref) {
|
|
45013
45090
|
const [hovered, setHovered] = useState205(false);
|
|
45014
|
-
return /* @__PURE__ */
|
|
45091
|
+
return /* @__PURE__ */ React386.createElement(
|
|
45015
45092
|
UnstyledButton7,
|
|
45016
45093
|
{
|
|
45017
45094
|
ref,
|
|
@@ -45027,7 +45104,7 @@ var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false,
|
|
|
45027
45104
|
...style
|
|
45028
45105
|
}
|
|
45029
45106
|
},
|
|
45030
|
-
/* @__PURE__ */
|
|
45107
|
+
/* @__PURE__ */ React386.createElement(Group154, { gap: 4, wrap: "nowrap" }, icon2 && /* @__PURE__ */ React386.createElement(
|
|
45031
45108
|
"span",
|
|
45032
45109
|
{
|
|
45033
45110
|
style: {
|
|
@@ -45037,7 +45114,7 @@ var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false,
|
|
|
45037
45114
|
}
|
|
45038
45115
|
},
|
|
45039
45116
|
icon2
|
|
45040
|
-
), /* @__PURE__ */
|
|
45117
|
+
), /* @__PURE__ */ React386.createElement(
|
|
45041
45118
|
Text258,
|
|
45042
45119
|
{
|
|
45043
45120
|
fz: 12,
|
|
@@ -45115,9 +45192,9 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
45115
45192
|
};
|
|
45116
45193
|
const renderIconGrid = (icons) => {
|
|
45117
45194
|
if (icons.length === 0) {
|
|
45118
|
-
return /* @__PURE__ */
|
|
45195
|
+
return /* @__PURE__ */ React387.createElement(Center15, { py: "xl" }, /* @__PURE__ */ React387.createElement(Text259, { c: "dimmed", size: "sm" }, "No icons found"));
|
|
45119
45196
|
}
|
|
45120
|
-
return /* @__PURE__ */
|
|
45197
|
+
return /* @__PURE__ */ React387.createElement(
|
|
45121
45198
|
Box73,
|
|
45122
45199
|
{
|
|
45123
45200
|
style: {
|
|
@@ -45129,7 +45206,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
45129
45206
|
},
|
|
45130
45207
|
icons.map(([name, IconComponent]) => {
|
|
45131
45208
|
const isSelected = currentIcon === name.replace("Icon", "").replace(/([A-Z])/g, "-$1").toLowerCase().slice(1);
|
|
45132
|
-
return /* @__PURE__ */
|
|
45209
|
+
return /* @__PURE__ */ React387.createElement(
|
|
45133
45210
|
UnstyledButton8,
|
|
45134
45211
|
{
|
|
45135
45212
|
key: name,
|
|
@@ -45155,12 +45232,12 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
45155
45232
|
}
|
|
45156
45233
|
}
|
|
45157
45234
|
},
|
|
45158
|
-
/* @__PURE__ */
|
|
45235
|
+
/* @__PURE__ */ React387.createElement(IconComponent, { size: 24, stroke: 1.5, color: "var(--mantine-color-text)" })
|
|
45159
45236
|
);
|
|
45160
45237
|
})
|
|
45161
45238
|
);
|
|
45162
45239
|
};
|
|
45163
|
-
return /* @__PURE__ */
|
|
45240
|
+
return /* @__PURE__ */ React387.createElement(Popover5, { opened, onClose, position: "right", width: 500, shadow: "xl" }, /* @__PURE__ */ React387.createElement(Popover5.Target, null, children), /* @__PURE__ */ React387.createElement(
|
|
45164
45241
|
Popover5.Dropdown,
|
|
45165
45242
|
{
|
|
45166
45243
|
style: {
|
|
@@ -45170,7 +45247,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
45170
45247
|
},
|
|
45171
45248
|
p: 0
|
|
45172
45249
|
},
|
|
45173
|
-
onRemove && /* @__PURE__ */
|
|
45250
|
+
onRemove && /* @__PURE__ */ React387.createElement(
|
|
45174
45251
|
UnstyledButton8,
|
|
45175
45252
|
{
|
|
45176
45253
|
onClick: () => {
|
|
@@ -45187,17 +45264,17 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
45187
45264
|
transition: "background 0.15s ease"
|
|
45188
45265
|
}
|
|
45189
45266
|
},
|
|
45190
|
-
/* @__PURE__ */
|
|
45267
|
+
/* @__PURE__ */ React387.createElement(Group155, { gap: 4, wrap: "nowrap" }, /* @__PURE__ */ React387.createElement(IconX20, { size: 14 }), /* @__PURE__ */ React387.createElement(Text259, { fz: 12, c: "dimmed", style: { whiteSpace: "nowrap" } }, "Remove"))
|
|
45191
45268
|
),
|
|
45192
|
-
/* @__PURE__ */
|
|
45269
|
+
/* @__PURE__ */ React387.createElement(Stack284, { gap: "md", p: "md" }, /* @__PURE__ */ React387.createElement(Tabs4, { value: activeTab, onChange: setActiveTab, variant: "pills" }, /* @__PURE__ */ React387.createElement(Tabs4.List, null, /* @__PURE__ */ React387.createElement(Tabs4.Tab, { value: "icons" }, "Icons"), /* @__PURE__ */ React387.createElement(Tabs4.Tab, { value: "upload" }, "Upload")), /* @__PURE__ */ React387.createElement(Tabs4.Panel, { value: "icons", pt: "md" }, /* @__PURE__ */ React387.createElement(
|
|
45193
45270
|
TextInput13,
|
|
45194
45271
|
{
|
|
45195
45272
|
mb: "md",
|
|
45196
45273
|
placeholder: "Filter",
|
|
45197
|
-
leftSection: /* @__PURE__ */
|
|
45274
|
+
leftSection: /* @__PURE__ */ React387.createElement(IconSearch12, { size: 18 }),
|
|
45198
45275
|
value: searchQuery,
|
|
45199
45276
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
45200
|
-
rightSection: searchQuery && /* @__PURE__ */
|
|
45277
|
+
rightSection: searchQuery && /* @__PURE__ */ React387.createElement(UnstyledButton8, { onClick: () => setSearchQuery("") }, /* @__PURE__ */ React387.createElement(IconX20, { size: 18 })),
|
|
45201
45278
|
style: { flex: 1 },
|
|
45202
45279
|
styles: {
|
|
45203
45280
|
input: {
|
|
@@ -45207,21 +45284,21 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
45207
45284
|
}
|
|
45208
45285
|
}
|
|
45209
45286
|
}
|
|
45210
|
-
), !searchQuery && /* @__PURE__ */
|
|
45287
|
+
), !searchQuery && /* @__PURE__ */ React387.createElement(Box73, { mb: "md" }, /* @__PURE__ */ React387.createElement(Text259, { size: "sm", fw: 500, mb: "xs", px: "xs" }, "Recent"), /* @__PURE__ */ React387.createElement(ScrollArea10.Autosize, { scrollbarSize: 0, mah: 60 }, renderIconGrid(recentIcons))), /* @__PURE__ */ React387.createElement(Box73, null, /* @__PURE__ */ React387.createElement(Group155, { justify: "space-between", mb: "xs", px: "xs" }, /* @__PURE__ */ React387.createElement(Text259, { size: "sm", fw: 500 }, searchQuery ? "Results" : "Icons"), totalPages > 1 && /* @__PURE__ */ React387.createElement(Group155, { gap: "xs" }, /* @__PURE__ */ React387.createElement(Text259, { size: "xs", c: "dimmed" }, "Page ", currentPage, " of ", totalPages, " (", filteredIcons.length, " total)"), /* @__PURE__ */ React387.createElement(BaseButton, { size: "xs", onClick: () => setCurrentPage((p) => Math.max(1, p - 1)), disabled: currentPage === 1, leftSection: /* @__PURE__ */ React387.createElement(IconChevronLeft, { size: 14 }) }, "Prev"), /* @__PURE__ */ React387.createElement(
|
|
45211
45288
|
BaseButton,
|
|
45212
45289
|
{
|
|
45213
45290
|
size: "xs",
|
|
45214
45291
|
onClick: () => setCurrentPage((p) => Math.min(totalPages, p + 1)),
|
|
45215
45292
|
disabled: currentPage === totalPages,
|
|
45216
|
-
leftSection: /* @__PURE__ */
|
|
45293
|
+
leftSection: /* @__PURE__ */ React387.createElement(IconChevronRight13, { size: 14 })
|
|
45217
45294
|
},
|
|
45218
45295
|
"Next"
|
|
45219
|
-
))), /* @__PURE__ */
|
|
45296
|
+
))), /* @__PURE__ */ React387.createElement(ScrollArea10.Autosize, { scrollbarSize: 0, mah: 200 }, renderIconGrid(paginatedIcons)))), /* @__PURE__ */ React387.createElement(Tabs4.Panel, { value: "upload", pt: "md" }, /* @__PURE__ */ React387.createElement(Center15, { py: "xl" }, /* @__PURE__ */ React387.createElement(Stack284, { align: "center", gap: "md" }, /* @__PURE__ */ React387.createElement(Text259, { size: "sm", c: "dimmed", ta: "center" }, "Upload a custom icon image", /* @__PURE__ */ React387.createElement("br", null), "(PNG, JPG, SVG)"), /* @__PURE__ */ React387.createElement(CoverImageButton, { onClick: onUploadClick }, "Choose File"))))))
|
|
45220
45297
|
));
|
|
45221
45298
|
}
|
|
45222
45299
|
|
|
45223
45300
|
// src/mantine/components/CoverImage.tsx
|
|
45224
|
-
import
|
|
45301
|
+
import React390, { useState as useState208, useRef as useRef53, useEffect as useEffect175, useMemo as useMemo169 } from "react";
|
|
45225
45302
|
import { Box as Box76, Group as Group157 } from "@mantine/core";
|
|
45226
45303
|
import { IconMoodSmile, IconPhoto as IconPhoto6, IconSettings as IconSettings23, IconArrowsMove, IconTrash as IconTrash15, IconRefresh as IconRefresh15 } from "@tabler/icons-react";
|
|
45227
45304
|
|
|
@@ -45356,7 +45433,7 @@ function transformIconImage(sourceUrl, size = "default", customOptions) {
|
|
|
45356
45433
|
}
|
|
45357
45434
|
|
|
45358
45435
|
// src/mantine/components/Base/PageIcon.tsx
|
|
45359
|
-
import
|
|
45436
|
+
import React388, { useMemo as useMemo168 } from "react";
|
|
45360
45437
|
import { Center as Center16, Box as Box74 } from "@mantine/core";
|
|
45361
45438
|
import * as TablerIcons3 from "@tabler/icons-react";
|
|
45362
45439
|
function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
@@ -45372,7 +45449,7 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
|
45372
45449
|
const Container = useCenter ? Center16 : Box74;
|
|
45373
45450
|
if (!src) return null;
|
|
45374
45451
|
if (IconComponent) {
|
|
45375
|
-
return /* @__PURE__ */
|
|
45452
|
+
return /* @__PURE__ */ React388.createElement(
|
|
45376
45453
|
Container,
|
|
45377
45454
|
{
|
|
45378
45455
|
style: {
|
|
@@ -45388,10 +45465,10 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
|
45388
45465
|
...style
|
|
45389
45466
|
}
|
|
45390
45467
|
},
|
|
45391
|
-
/* @__PURE__ */
|
|
45468
|
+
/* @__PURE__ */ React388.createElement(IconComponent, { size: iconSize, stroke: 1.5, color: "var(--mantine-color-text)" })
|
|
45392
45469
|
);
|
|
45393
45470
|
}
|
|
45394
|
-
return /* @__PURE__ */
|
|
45471
|
+
return /* @__PURE__ */ React388.createElement(
|
|
45395
45472
|
"img",
|
|
45396
45473
|
{
|
|
45397
45474
|
src,
|
|
@@ -45412,7 +45489,7 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
|
45412
45489
|
import { useDisclosure as useDisclosure7 } from "@mantine/hooks";
|
|
45413
45490
|
|
|
45414
45491
|
// src/mantine/components/FlowSettingsPanel.tsx
|
|
45415
|
-
import
|
|
45492
|
+
import React389, { useState as useState207, useEffect as useEffect174, useCallback as useCallback191 } from "react";
|
|
45416
45493
|
import { Stack as Stack285, Group as Group156, Button as Button96, ActionIcon as ActionIcon52, Text as Text260, Box as Box75 } from "@mantine/core";
|
|
45417
45494
|
import { IconPlus as IconPlus13, IconTrash as IconTrash14 } from "@tabler/icons-react";
|
|
45418
45495
|
var SYSTEM_KEYS = /* @__PURE__ */ new Set(["@context", "_type", "schema_version", "doc_id", "title", "createdAt", "createdBy", "flowOwnerDid"]);
|
|
@@ -45479,8 +45556,8 @@ var FlowSettingsPanel = ({ editor }) => {
|
|
|
45479
45556
|
},
|
|
45480
45557
|
[editor]
|
|
45481
45558
|
);
|
|
45482
|
-
const subtitle = /* @__PURE__ */
|
|
45483
|
-
return /* @__PURE__ */
|
|
45559
|
+
const subtitle = /* @__PURE__ */ React389.createElement(Box75, { px: 40, mb: "md" }, /* @__PURE__ */ React389.createElement(Text260, { size: "sm", c: "dimmed" }, "Add key-value settings for this flow. These are available to oracles and action blocks at runtime."));
|
|
45560
|
+
return /* @__PURE__ */ React389.createElement(BaseRightPanelLayout, { title: "Flow Details", onClose: closePanel, isTemplate: true, captionContent: subtitle }, /* @__PURE__ */ React389.createElement(Stack285, { gap: "lg" }, rows.map((row, index) => /* @__PURE__ */ React389.createElement(Stack285, { key: index, gap: "xs" }, /* @__PURE__ */ React389.createElement(Group156, { gap: "xs", align: "center", wrap: "nowrap" }, /* @__PURE__ */ React389.createElement(BaseTextInput, { placeholder: "Key (e.g. protocolDid)", value: row.key, onChange: (e) => handleKeyChange(index, e.currentTarget.value), style: { flex: 1 } }), /* @__PURE__ */ React389.createElement(ActionIcon52, { variant: "subtle", color: "red", onClick: () => handleDelete(index), size: "lg" }, /* @__PURE__ */ React389.createElement(IconTrash14, { size: 16 }))), /* @__PURE__ */ React389.createElement(BaseTextArea, { placeholder: "Value", value: row.value, onChange: (e) => handleValueChange(index, e.currentTarget.value), minRows: 1, maxRows: 8 }))), /* @__PURE__ */ React389.createElement(Button96, { variant: "subtle", leftSection: /* @__PURE__ */ React389.createElement(IconPlus13, { size: 16 }), onClick: handleAdd, size: "sm" }, "Add detail")));
|
|
45484
45561
|
};
|
|
45485
45562
|
|
|
45486
45563
|
// src/mantine/components/CoverImage.tsx
|
|
@@ -45493,7 +45570,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45493
45570
|
const logoFileInputRef = useRef53(null);
|
|
45494
45571
|
const [opened, { open, close }] = useDisclosure7(false);
|
|
45495
45572
|
const [metadata, setMetadata] = useState208(() => editor?.getPageMetadata?.() || null);
|
|
45496
|
-
const settingsPanelContent = useMemo169(() => editor ? /* @__PURE__ */
|
|
45573
|
+
const settingsPanelContent = useMemo169(() => editor ? /* @__PURE__ */ React390.createElement(FlowSettingsPanel, { editor }) : null, [editor]);
|
|
45497
45574
|
const { open: openSettings } = usePanel("flow-settings-panel", settingsPanelContent);
|
|
45498
45575
|
useEffect175(() => {
|
|
45499
45576
|
if (!editor?._metadataManager) {
|
|
@@ -45583,7 +45660,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45583
45660
|
return null;
|
|
45584
45661
|
}
|
|
45585
45662
|
if (!hasCover) {
|
|
45586
|
-
return /* @__PURE__ */
|
|
45663
|
+
return /* @__PURE__ */ React390.createElement(
|
|
45587
45664
|
Box76,
|
|
45588
45665
|
{
|
|
45589
45666
|
style: {
|
|
@@ -45595,7 +45672,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45595
45672
|
onMouseEnter: () => editable && setIsHovering(true),
|
|
45596
45673
|
onMouseLeave: () => editable && setIsHovering(false)
|
|
45597
45674
|
},
|
|
45598
|
-
/* @__PURE__ */
|
|
45675
|
+
/* @__PURE__ */ React390.createElement("div", { style: { maxWidth: "900px", margin: "0 auto", position: "relative", minHeight: "inherit" } }, /* @__PURE__ */ React390.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }), /* @__PURE__ */ React390.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") }), logoSrc && /* @__PURE__ */ React390.createElement(
|
|
45599
45676
|
Box76,
|
|
45600
45677
|
{
|
|
45601
45678
|
style: {
|
|
@@ -45608,8 +45685,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45608
45685
|
zIndex: 11
|
|
45609
45686
|
}
|
|
45610
45687
|
},
|
|
45611
|
-
/* @__PURE__ */
|
|
45612
|
-
editable && /* @__PURE__ */
|
|
45688
|
+
/* @__PURE__ */ React390.createElement(PageIcon, { src: logoSrc, useCenter: true, iconSize: 64 }),
|
|
45689
|
+
editable && /* @__PURE__ */ React390.createElement(
|
|
45613
45690
|
BaseIconPicker,
|
|
45614
45691
|
{
|
|
45615
45692
|
opened,
|
|
@@ -45619,7 +45696,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45619
45696
|
onUploadClick: () => logoFileInputRef.current?.click(),
|
|
45620
45697
|
onRemove: handleRemoveLogo
|
|
45621
45698
|
},
|
|
45622
|
-
/* @__PURE__ */
|
|
45699
|
+
/* @__PURE__ */ React390.createElement(
|
|
45623
45700
|
Box76,
|
|
45624
45701
|
{
|
|
45625
45702
|
onClick: open,
|
|
@@ -45632,7 +45709,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45632
45709
|
}
|
|
45633
45710
|
)
|
|
45634
45711
|
)
|
|
45635
|
-
), editable && (isHovering || opened) && /* @__PURE__ */
|
|
45712
|
+
), editable && (isHovering || opened) && /* @__PURE__ */ React390.createElement(Group157, { gap: 4, style: { position: "absolute", bottom: hasLogo ? -18 : 0, left: 0, zIndex: 10 } }, !logoSrc && /* @__PURE__ */ React390.createElement(
|
|
45636
45713
|
BaseIconPicker,
|
|
45637
45714
|
{
|
|
45638
45715
|
opened,
|
|
@@ -45641,11 +45718,11 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45641
45718
|
onSelectIcon: (name) => handleSelectLogoIcon(name),
|
|
45642
45719
|
onUploadClick: () => logoFileInputRef.current?.click()
|
|
45643
45720
|
},
|
|
45644
|
-
/* @__PURE__ */
|
|
45645
|
-
), /* @__PURE__ */
|
|
45721
|
+
/* @__PURE__ */ React390.createElement(CoverImageButton, { onClick: open, icon: /* @__PURE__ */ React390.createElement(IconMoodSmile, { size: 14 }) }, "Add icon")
|
|
45722
|
+
), /* @__PURE__ */ React390.createElement(CoverImageButton, { onClick: () => coverFileInputRef.current?.click(), icon: /* @__PURE__ */ React390.createElement(IconPhoto6, { size: 14 }) }, "Add cover"), /* @__PURE__ */ React390.createElement(CoverImageButton, { onClick: openSettings, icon: /* @__PURE__ */ React390.createElement(IconSettings23, { size: 14 }) }, "Details")))
|
|
45646
45723
|
);
|
|
45647
45724
|
}
|
|
45648
|
-
return /* @__PURE__ */
|
|
45725
|
+
return /* @__PURE__ */ React390.createElement(
|
|
45649
45726
|
Box76,
|
|
45650
45727
|
{
|
|
45651
45728
|
style: {
|
|
@@ -45673,7 +45750,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45673
45750
|
}
|
|
45674
45751
|
}
|
|
45675
45752
|
},
|
|
45676
|
-
/* @__PURE__ */
|
|
45753
|
+
/* @__PURE__ */ React390.createElement(
|
|
45677
45754
|
"img",
|
|
45678
45755
|
{
|
|
45679
45756
|
src: coverUrl,
|
|
@@ -45691,7 +45768,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45691
45768
|
}
|
|
45692
45769
|
}
|
|
45693
45770
|
),
|
|
45694
|
-
editable && isHovering && /* @__PURE__ */
|
|
45771
|
+
editable && isHovering && /* @__PURE__ */ React390.createElement(
|
|
45695
45772
|
Group157,
|
|
45696
45773
|
{
|
|
45697
45774
|
gap: "xs",
|
|
@@ -45702,8 +45779,8 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45702
45779
|
zIndex: 10
|
|
45703
45780
|
}
|
|
45704
45781
|
},
|
|
45705
|
-
/* @__PURE__ */
|
|
45706
|
-
/* @__PURE__ */
|
|
45782
|
+
/* @__PURE__ */ React390.createElement(CoverImageButton, { onClick: () => coverFileInputRef.current?.click(), icon: /* @__PURE__ */ React390.createElement(IconRefresh15, { size: 14 }) }, "Change cover"),
|
|
45783
|
+
/* @__PURE__ */ React390.createElement(
|
|
45707
45784
|
CoverImageButton,
|
|
45708
45785
|
{
|
|
45709
45786
|
onClick: () => {
|
|
@@ -45713,25 +45790,25 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45713
45790
|
setIsRepositioning(!isRepositioning);
|
|
45714
45791
|
},
|
|
45715
45792
|
isActive: isRepositioning,
|
|
45716
|
-
icon: /* @__PURE__ */
|
|
45793
|
+
icon: /* @__PURE__ */ React390.createElement(IconArrowsMove, { size: 14 })
|
|
45717
45794
|
},
|
|
45718
45795
|
isRepositioning ? "Done" : "Reposition"
|
|
45719
45796
|
),
|
|
45720
|
-
/* @__PURE__ */
|
|
45797
|
+
/* @__PURE__ */ React390.createElement(CoverImageButton, { onClick: handleRemoveCover, icon: /* @__PURE__ */ React390.createElement(IconTrash15, { size: 14 }) }, "Remove")
|
|
45721
45798
|
),
|
|
45722
|
-
/* @__PURE__ */
|
|
45799
|
+
/* @__PURE__ */ React390.createElement("div", { style: { maxWidth: "964px", margin: "0 auto", position: "absolute", bottom: 0, left: 0, right: 0, height: "70px" } }, /* @__PURE__ */ React390.createElement(
|
|
45723
45800
|
Box76,
|
|
45724
45801
|
{
|
|
45725
45802
|
style: {
|
|
45726
45803
|
position: "absolute",
|
|
45727
45804
|
bottom: "4px",
|
|
45728
|
-
insetInlineStart: "
|
|
45805
|
+
insetInlineStart: "32px",
|
|
45729
45806
|
width: "120px",
|
|
45730
45807
|
height: "120px",
|
|
45731
45808
|
zIndex: 11
|
|
45732
45809
|
}
|
|
45733
45810
|
},
|
|
45734
|
-
logoSrc ? /* @__PURE__ */
|
|
45811
|
+
logoSrc ? /* @__PURE__ */ React390.createElement(React390.Fragment, null, /* @__PURE__ */ React390.createElement(PageIcon, { src: logoSrc, useCenter: true, iconSize: 64 }), editable && /* @__PURE__ */ React390.createElement(
|
|
45735
45812
|
BaseIconPicker,
|
|
45736
45813
|
{
|
|
45737
45814
|
opened,
|
|
@@ -45741,7 +45818,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45741
45818
|
onUploadClick: () => logoFileInputRef.current?.click(),
|
|
45742
45819
|
onRemove: handleRemoveLogo
|
|
45743
45820
|
},
|
|
45744
|
-
/* @__PURE__ */
|
|
45821
|
+
/* @__PURE__ */ React390.createElement(
|
|
45745
45822
|
Box76,
|
|
45746
45823
|
{
|
|
45747
45824
|
onClick: open,
|
|
@@ -45753,7 +45830,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45753
45830
|
}
|
|
45754
45831
|
}
|
|
45755
45832
|
)
|
|
45756
|
-
)) : editable && isHovering && /* @__PURE__ */
|
|
45833
|
+
)) : editable && isHovering && /* @__PURE__ */ React390.createElement(
|
|
45757
45834
|
BaseIconPicker,
|
|
45758
45835
|
{
|
|
45759
45836
|
opened,
|
|
@@ -45762,11 +45839,11 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45762
45839
|
onSelectIcon: (name) => handleSelectLogoIcon(name),
|
|
45763
45840
|
onUploadClick: () => logoFileInputRef.current?.click()
|
|
45764
45841
|
},
|
|
45765
|
-
/* @__PURE__ */
|
|
45842
|
+
/* @__PURE__ */ React390.createElement(
|
|
45766
45843
|
CoverImageButton,
|
|
45767
45844
|
{
|
|
45768
45845
|
onClick: open,
|
|
45769
|
-
icon: /* @__PURE__ */
|
|
45846
|
+
icon: /* @__PURE__ */ React390.createElement(IconMoodSmile, { size: 14 }),
|
|
45770
45847
|
style: {
|
|
45771
45848
|
position: "absolute",
|
|
45772
45849
|
top: "50%",
|
|
@@ -45779,13 +45856,13 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
45779
45856
|
)
|
|
45780
45857
|
)
|
|
45781
45858
|
)),
|
|
45782
|
-
/* @__PURE__ */
|
|
45783
|
-
/* @__PURE__ */
|
|
45859
|
+
/* @__PURE__ */ React390.createElement("input", { ref: coverFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "cover") }),
|
|
45860
|
+
/* @__PURE__ */ React390.createElement("input", { ref: logoFileInputRef, type: "file", accept: "image/*", style: { display: "none" }, onChange: (e) => handleFileSelect(e, "logo") })
|
|
45784
45861
|
);
|
|
45785
45862
|
}
|
|
45786
45863
|
|
|
45787
45864
|
// src/mantine/components/PageTitle.tsx
|
|
45788
|
-
import
|
|
45865
|
+
import React391, { useState as useState209, useEffect as useEffect176, useRef as useRef54, useCallback as useCallback192 } from "react";
|
|
45789
45866
|
import { Box as Box77 } from "@mantine/core";
|
|
45790
45867
|
var DEFAULT_TITLE = "New page";
|
|
45791
45868
|
function isUserTitle(name) {
|
|
@@ -45931,7 +46008,7 @@ function PageTitle({ editor, editable }) {
|
|
|
45931
46008
|
setTitle(titleRef.current.textContent || "");
|
|
45932
46009
|
}
|
|
45933
46010
|
}, []);
|
|
45934
|
-
return /* @__PURE__ */
|
|
46011
|
+
return /* @__PURE__ */ React391.createElement(Box77, { maw: 964, mx: "auto", w: "100%", px: 32 }, /* @__PURE__ */ React391.createElement(
|
|
45935
46012
|
Box77,
|
|
45936
46013
|
{
|
|
45937
46014
|
ref: titleRef,
|
|
@@ -45988,7 +46065,7 @@ if (typeof document !== "undefined") {
|
|
|
45988
46065
|
}
|
|
45989
46066
|
|
|
45990
46067
|
// src/mantine/components/ExternalDropZone.tsx
|
|
45991
|
-
import
|
|
46068
|
+
import React392, { useCallback as useCallback193, useEffect as useEffect177, useRef as useRef55, useState as useState210 } from "react";
|
|
45992
46069
|
import { Box as Box78 } from "@mantine/core";
|
|
45993
46070
|
var SCROLL_ZONE_SIZE = 80;
|
|
45994
46071
|
var SCROLL_SPEED = 12;
|
|
@@ -46269,11 +46346,11 @@ var ExternalDropZone = ({
|
|
|
46269
46346
|
}
|
|
46270
46347
|
};
|
|
46271
46348
|
}, []);
|
|
46272
|
-
const indicatorWithPosition = dropIndicator &&
|
|
46349
|
+
const indicatorWithPosition = dropIndicator && React392.isValidElement(dropIndicator) ? React392.cloneElement(dropIndicator, {
|
|
46273
46350
|
indicatorTop: typeof indicatorStyle.top === "number" ? indicatorStyle.top : void 0
|
|
46274
46351
|
}) : dropIndicator;
|
|
46275
46352
|
const shouldShowIndicator = isValidDrag || isPlacementMode && isHoveringInPlacementMode;
|
|
46276
|
-
return /* @__PURE__ */
|
|
46353
|
+
return /* @__PURE__ */ React392.createElement(
|
|
46277
46354
|
Box78,
|
|
46278
46355
|
{
|
|
46279
46356
|
ref: containerRef,
|
|
@@ -46289,7 +46366,7 @@ var ExternalDropZone = ({
|
|
|
46289
46366
|
"data-placement-mode": isPlacementMode ? "true" : void 0
|
|
46290
46367
|
},
|
|
46291
46368
|
children,
|
|
46292
|
-
isPlacementMode && /* @__PURE__ */
|
|
46369
|
+
isPlacementMode && /* @__PURE__ */ React392.createElement(
|
|
46293
46370
|
Box78,
|
|
46294
46371
|
{
|
|
46295
46372
|
style: {
|
|
@@ -46309,12 +46386,12 @@ var ExternalDropZone = ({
|
|
|
46309
46386
|
onWheel: handleOverlayWheel
|
|
46310
46387
|
}
|
|
46311
46388
|
),
|
|
46312
|
-
shouldShowIndicator && indicatorWithPosition && /* @__PURE__ */
|
|
46389
|
+
shouldShowIndicator && indicatorWithPosition && /* @__PURE__ */ React392.createElement(Box78, { style: { ...indicatorStyle, background: "none", border: "none", boxShadow: "none" } }, indicatorWithPosition)
|
|
46313
46390
|
);
|
|
46314
46391
|
};
|
|
46315
46392
|
|
|
46316
46393
|
// src/mantine/IxoEditor.tsx
|
|
46317
|
-
import
|
|
46394
|
+
import React395, { useMemo as useMemo171 } from "react";
|
|
46318
46395
|
import { GridSuggestionMenuController, SuggestionMenuController, getDefaultReactSlashMenuItems } from "@blocknote/react";
|
|
46319
46396
|
import { BlockNoteView } from "@blocknote/mantine";
|
|
46320
46397
|
import { filterSuggestionItems } from "@blocknote/core";
|
|
@@ -46359,7 +46436,7 @@ function sanitizeThemeForMantine7(theme) {
|
|
|
46359
46436
|
}
|
|
46360
46437
|
|
|
46361
46438
|
// src/mantine/components/CommandPalette.tsx
|
|
46362
|
-
import
|
|
46439
|
+
import React393, { useEffect as useEffect178, useRef as useRef56, useState as useState211, useMemo as useMemo170, useCallback as useCallback194 } from "react";
|
|
46363
46440
|
import { Box as Box79, Text as Text261, Stack as Stack286 } from "@mantine/core";
|
|
46364
46441
|
var GROUP_ORDER = {
|
|
46365
46442
|
Headings: 0,
|
|
@@ -46397,7 +46474,7 @@ function PaletteItem({ item, isSelected, onClick, id }) {
|
|
|
46397
46474
|
}
|
|
46398
46475
|
}, [isSelected]);
|
|
46399
46476
|
const highlighted = isSelected || hovered;
|
|
46400
|
-
return /* @__PURE__ */
|
|
46477
|
+
return /* @__PURE__ */ React393.createElement(
|
|
46401
46478
|
Box79,
|
|
46402
46479
|
{
|
|
46403
46480
|
ref,
|
|
@@ -46419,7 +46496,7 @@ function PaletteItem({ item, isSelected, onClick, id }) {
|
|
|
46419
46496
|
backgroundColor: highlighted ? "var(--mantine-color-neutralColor-4)" : "transparent"
|
|
46420
46497
|
}
|
|
46421
46498
|
},
|
|
46422
|
-
/* @__PURE__ */
|
|
46499
|
+
/* @__PURE__ */ React393.createElement(
|
|
46423
46500
|
Box79,
|
|
46424
46501
|
{
|
|
46425
46502
|
style: {
|
|
@@ -46436,7 +46513,7 @@ function PaletteItem({ item, isSelected, onClick, id }) {
|
|
|
46436
46513
|
},
|
|
46437
46514
|
item.icon
|
|
46438
46515
|
),
|
|
46439
|
-
/* @__PURE__ */
|
|
46516
|
+
/* @__PURE__ */ React393.createElement(Stack286, { gap: 0, style: { overflow: "hidden", minWidth: 0, flex: 1 } }, /* @__PURE__ */ React393.createElement(
|
|
46440
46517
|
Text261,
|
|
46441
46518
|
{
|
|
46442
46519
|
size: "sm",
|
|
@@ -46447,7 +46524,7 @@ function PaletteItem({ item, isSelected, onClick, id }) {
|
|
|
46447
46524
|
}
|
|
46448
46525
|
},
|
|
46449
46526
|
item.title
|
|
46450
|
-
), item.subtext && /* @__PURE__ */
|
|
46527
|
+
), item.subtext && /* @__PURE__ */ React393.createElement(
|
|
46451
46528
|
Text261,
|
|
46452
46529
|
{
|
|
46453
46530
|
size: "xs",
|
|
@@ -46482,7 +46559,7 @@ function CommandPalette({ items, onItemClick, loadingState, selectedIndex }) {
|
|
|
46482
46559
|
[onItemClick]
|
|
46483
46560
|
);
|
|
46484
46561
|
if (loadingState === "loading-initial") {
|
|
46485
|
-
return /* @__PURE__ */
|
|
46562
|
+
return /* @__PURE__ */ React393.createElement(
|
|
46486
46563
|
Box79,
|
|
46487
46564
|
{
|
|
46488
46565
|
style: {
|
|
@@ -46494,10 +46571,10 @@ function CommandPalette({ items, onItemClick, loadingState, selectedIndex }) {
|
|
|
46494
46571
|
boxShadow: "0 4px 16px rgba(0, 0, 0, 0.2)"
|
|
46495
46572
|
}
|
|
46496
46573
|
},
|
|
46497
|
-
/* @__PURE__ */
|
|
46574
|
+
/* @__PURE__ */ React393.createElement(Text261, { size: "sm", style: { color: "var(--mantine-color-neutralColor-7) !important", textAlign: "center" } }, t("palette.loading", { defaultValue: "Loading..." }))
|
|
46498
46575
|
);
|
|
46499
46576
|
}
|
|
46500
|
-
return /* @__PURE__ */
|
|
46577
|
+
return /* @__PURE__ */ React393.createElement(
|
|
46501
46578
|
Box79,
|
|
46502
46579
|
{
|
|
46503
46580
|
id: "bn-suggestion-menu",
|
|
@@ -46513,7 +46590,7 @@ function CommandPalette({ items, onItemClick, loadingState, selectedIndex }) {
|
|
|
46513
46590
|
padding: "6px 0"
|
|
46514
46591
|
}
|
|
46515
46592
|
},
|
|
46516
|
-
/* @__PURE__ */
|
|
46593
|
+
/* @__PURE__ */ React393.createElement(
|
|
46517
46594
|
Box79,
|
|
46518
46595
|
{
|
|
46519
46596
|
style: {
|
|
@@ -46524,7 +46601,7 @@ function CommandPalette({ items, onItemClick, loadingState, selectedIndex }) {
|
|
|
46524
46601
|
msOverflowStyle: "none"
|
|
46525
46602
|
}
|
|
46526
46603
|
},
|
|
46527
|
-
groupedItems.map((group) => /* @__PURE__ */
|
|
46604
|
+
groupedItems.map((group) => /* @__PURE__ */ React393.createElement(React393.Fragment, { key: group.label }, /* @__PURE__ */ React393.createElement(
|
|
46528
46605
|
Text261,
|
|
46529
46606
|
{
|
|
46530
46607
|
size: "xs",
|
|
@@ -46538,7 +46615,7 @@ function CommandPalette({ items, onItemClick, loadingState, selectedIndex }) {
|
|
|
46538
46615
|
}
|
|
46539
46616
|
},
|
|
46540
46617
|
translateGroupLabel(group.label, t)
|
|
46541
|
-
), group.items.map(({ item, globalIndex }) => /* @__PURE__ */
|
|
46618
|
+
), group.items.map(({ item, globalIndex }) => /* @__PURE__ */ React393.createElement(
|
|
46542
46619
|
PaletteItem,
|
|
46543
46620
|
{
|
|
46544
46621
|
key: `${item.title}-${globalIndex}`,
|
|
@@ -46548,7 +46625,7 @@ function CommandPalette({ items, onItemClick, loadingState, selectedIndex }) {
|
|
|
46548
46625
|
id: `bn-suggestion-menu-item-${globalIndex}`
|
|
46549
46626
|
}
|
|
46550
46627
|
)))),
|
|
46551
|
-
items.length === 0 && (loadingState === "loaded" || loadingState === "loading") && /* @__PURE__ */
|
|
46628
|
+
items.length === 0 && (loadingState === "loaded" || loadingState === "loading") && /* @__PURE__ */ React393.createElement(
|
|
46552
46629
|
Text261,
|
|
46553
46630
|
{
|
|
46554
46631
|
size: "sm",
|
|
@@ -46585,7 +46662,7 @@ import {
|
|
|
46585
46662
|
} from "@tabler/icons-react";
|
|
46586
46663
|
|
|
46587
46664
|
// src/mantine/components/PanelContent.tsx
|
|
46588
|
-
import
|
|
46665
|
+
import React394 from "react";
|
|
46589
46666
|
import { Box as Box80 } from "@mantine/core";
|
|
46590
46667
|
var panelStyles = {
|
|
46591
46668
|
backgroundColor: "var(--mantine-color-body)",
|
|
@@ -46599,7 +46676,7 @@ function PanelContent({ theme: _theme }) {
|
|
|
46599
46676
|
const { activePanel, registeredPanels } = usePanelStore();
|
|
46600
46677
|
const isOpen = activePanel !== null;
|
|
46601
46678
|
const content = activePanel ? registeredPanels.get(activePanel) : null;
|
|
46602
|
-
return /* @__PURE__ */
|
|
46679
|
+
return /* @__PURE__ */ React394.createElement(
|
|
46603
46680
|
Box80,
|
|
46604
46681
|
{
|
|
46605
46682
|
pos: "sticky",
|
|
@@ -46657,7 +46734,7 @@ var BUILTIN_TITLE_KEYS = {
|
|
|
46657
46734
|
function SanitizedThemeBoundary({ children }) {
|
|
46658
46735
|
const parentTheme = useMantineTheme();
|
|
46659
46736
|
const sanitizedTheme = useMemo171(() => sanitizeThemeForMantine7(parentTheme), [parentTheme]);
|
|
46660
|
-
return /* @__PURE__ */
|
|
46737
|
+
return /* @__PURE__ */ React395.createElement(MantineThemeContext.Provider, { value: sanitizedTheme }, children);
|
|
46661
46738
|
}
|
|
46662
46739
|
function IxoEditorContent({
|
|
46663
46740
|
editor,
|
|
@@ -46680,7 +46757,7 @@ function IxoEditorContent({
|
|
|
46680
46757
|
const { activePanel } = usePanelStore();
|
|
46681
46758
|
const isPanelOpen = activePanel !== null;
|
|
46682
46759
|
const t = useTranslate();
|
|
46683
|
-
const editorContent = /* @__PURE__ */
|
|
46760
|
+
const editorContent = /* @__PURE__ */ React395.createElement(
|
|
46684
46761
|
BlockNoteView,
|
|
46685
46762
|
{
|
|
46686
46763
|
editor,
|
|
@@ -46695,7 +46772,7 @@ function IxoEditorContent({
|
|
|
46695
46772
|
onChange,
|
|
46696
46773
|
onSelectionChange
|
|
46697
46774
|
},
|
|
46698
|
-
config.slashMenu && /* @__PURE__ */
|
|
46775
|
+
config.slashMenu && /* @__PURE__ */ React395.createElement(React395.Fragment, null, /* @__PURE__ */ React395.createElement(
|
|
46699
46776
|
SuggestionMenuController,
|
|
46700
46777
|
{
|
|
46701
46778
|
triggerCharacter: "/",
|
|
@@ -46721,10 +46798,27 @@ function IxoEditorContent({
|
|
|
46721
46798
|
return filterSuggestionItems(allItems, query);
|
|
46722
46799
|
}
|
|
46723
46800
|
}
|
|
46724
|
-
), /* @__PURE__ */
|
|
46801
|
+
), /* @__PURE__ */ React395.createElement(GridSuggestionMenuController, { triggerCharacter: ":", columns: 10, minQueryLength: 2 }), /* @__PURE__ */ React395.createElement(
|
|
46802
|
+
SuggestionMenuController,
|
|
46803
|
+
{
|
|
46804
|
+
triggerCharacter: "@",
|
|
46805
|
+
getItems: async (query) => filterSuggestionItems(
|
|
46806
|
+
(editor.document || []).filter((block) => block.type === "action").map((block) => ({
|
|
46807
|
+
title: String(block.props?.title || block.id),
|
|
46808
|
+
onItemClick: () => {
|
|
46809
|
+
editor.insertInlineContent([
|
|
46810
|
+
{ type: "flowStepRef", props: { nodeId: block.id, label: String(block.props?.title || "") } },
|
|
46811
|
+
" "
|
|
46812
|
+
]);
|
|
46813
|
+
}
|
|
46814
|
+
})),
|
|
46815
|
+
query
|
|
46816
|
+
)
|
|
46817
|
+
}
|
|
46818
|
+
)),
|
|
46725
46819
|
children
|
|
46726
46820
|
);
|
|
46727
|
-
return /* @__PURE__ */
|
|
46821
|
+
return /* @__PURE__ */ React395.createElement("div", { style: { display: "flex", height: "100%", width: "100%", gap: 0 } }, /* @__PURE__ */ React395.createElement(
|
|
46728
46822
|
"div",
|
|
46729
46823
|
{
|
|
46730
46824
|
className: `ixo-editor ixo-editor--theme-${config.theme}${isEditable ? "" : " ixo-editor--readonly"} ${className}`,
|
|
@@ -46734,10 +46828,10 @@ function IxoEditorContent({
|
|
|
46734
46828
|
...isEditable ? {} : { caretColor: "transparent" }
|
|
46735
46829
|
}
|
|
46736
46830
|
},
|
|
46737
|
-
/* @__PURE__ */
|
|
46738
|
-
/* @__PURE__ */
|
|
46831
|
+
/* @__PURE__ */ React395.createElement(CoverImage, { coverImageUrl, logoUrl }),
|
|
46832
|
+
/* @__PURE__ */ React395.createElement(PageTitle, { editor, editable: isEditable }),
|
|
46739
46833
|
belowTitleSlot,
|
|
46740
|
-
(onExternalDrop || isPlacementMode) && isEditable ? /* @__PURE__ */
|
|
46834
|
+
(onExternalDrop || isPlacementMode) && isEditable ? /* @__PURE__ */ React395.createElement(
|
|
46741
46835
|
ExternalDropZone,
|
|
46742
46836
|
{
|
|
46743
46837
|
editor,
|
|
@@ -46750,7 +46844,7 @@ function IxoEditorContent({
|
|
|
46750
46844
|
},
|
|
46751
46845
|
editorContent
|
|
46752
46846
|
) : editorContent
|
|
46753
|
-
), isPanelVisible && /* @__PURE__ */
|
|
46847
|
+
), isPanelVisible && /* @__PURE__ */ React395.createElement(PanelContent, { theme: config.theme }));
|
|
46754
46848
|
}
|
|
46755
46849
|
function IxoEditor({
|
|
46756
46850
|
editor,
|
|
@@ -46769,6 +46863,7 @@ function IxoEditor({
|
|
|
46769
46863
|
getDynamicListData,
|
|
46770
46864
|
dynamicListPanelRenderer,
|
|
46771
46865
|
domainCardRenderer,
|
|
46866
|
+
onFlowStepRefClick,
|
|
46772
46867
|
onExternalDrop,
|
|
46773
46868
|
externalDropType,
|
|
46774
46869
|
dropIndicator,
|
|
@@ -46793,7 +46888,7 @@ function IxoEditor({
|
|
|
46793
46888
|
tableHandles: true
|
|
46794
46889
|
};
|
|
46795
46890
|
const isEditable = editable;
|
|
46796
|
-
const editorContent = /* @__PURE__ */
|
|
46891
|
+
const editorContent = /* @__PURE__ */ React395.createElement(SanitizedThemeBoundary, null, /* @__PURE__ */ React395.createElement(
|
|
46797
46892
|
BlocknoteProvider,
|
|
46798
46893
|
{
|
|
46799
46894
|
editor,
|
|
@@ -46804,12 +46899,13 @@ function IxoEditor({
|
|
|
46804
46899
|
getDynamicListData,
|
|
46805
46900
|
dynamicListPanelRenderer,
|
|
46806
46901
|
domainCardRenderer,
|
|
46902
|
+
onFlowStepRefClick,
|
|
46807
46903
|
mapConfig,
|
|
46808
46904
|
connectedUsers,
|
|
46809
46905
|
awarenessInstance,
|
|
46810
46906
|
translate
|
|
46811
46907
|
},
|
|
46812
|
-
/* @__PURE__ */
|
|
46908
|
+
/* @__PURE__ */ React395.createElement(
|
|
46813
46909
|
IxoEditorContent,
|
|
46814
46910
|
{
|
|
46815
46911
|
isPanelVisible,
|
|
@@ -46835,7 +46931,7 @@ function IxoEditor({
|
|
|
46835
46931
|
}
|
|
46836
46932
|
|
|
46837
46933
|
// src/mantine/components/DevUcanGrantButton.tsx
|
|
46838
|
-
import
|
|
46934
|
+
import React396, { useEffect as useEffect179, useMemo as useMemo172, useState as useState212 } from "react";
|
|
46839
46935
|
import { Alert as Alert103, Badge as Badge59, Button as Button97, Checkbox as Checkbox16, Divider as Divider45, Group as Group158, Loader as Loader93, Modal as Modal4, Paper as Paper26, Select as Select12, Stack as Stack287, Text as Text262 } from "@mantine/core";
|
|
46840
46936
|
import { IconKey as IconKey5, IconShieldPlus as IconShieldPlus5 } from "@tabler/icons-react";
|
|
46841
46937
|
var FLOW_AGENT_COMMAND_TYPES = [
|
|
@@ -47069,7 +47165,7 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
|
|
|
47069
47165
|
value: member.did,
|
|
47070
47166
|
label: member.name ? `${member.name} (${member.did})` : member.did
|
|
47071
47167
|
}));
|
|
47072
|
-
return /* @__PURE__ */
|
|
47168
|
+
return /* @__PURE__ */ React396.createElement(React396.Fragment, null, /* @__PURE__ */ React396.createElement(
|
|
47073
47169
|
"button",
|
|
47074
47170
|
{
|
|
47075
47171
|
onClick: () => setOpened(true),
|
|
@@ -47091,7 +47187,7 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
|
|
|
47091
47187
|
title: "Dev: grant Flow Agent and block action UCANs to room members"
|
|
47092
47188
|
},
|
|
47093
47189
|
"Grant UCANs"
|
|
47094
|
-
), /* @__PURE__ */
|
|
47190
|
+
), /* @__PURE__ */ React396.createElement(Modal4, { opened, onClose: () => setOpened(false), title: "Grant Dev UCANs", size: "xl", centered: true }, /* @__PURE__ */ React396.createElement(Stack287, { gap: "md" }, /* @__PURE__ */ React396.createElement(Alert103, { color: "yellow", variant: "light", icon: /* @__PURE__ */ React396.createElement(IconKey5, { size: 16 }) }, /* @__PURE__ */ React396.createElement(Text262, { size: "sm" }, "Dev tool for granting Flow Agent command UCANs and block action UCANs to members of the current Matrix room.")), /* @__PURE__ */ React396.createElement(
|
|
47095
47191
|
Select12,
|
|
47096
47192
|
{
|
|
47097
47193
|
label: "Room member",
|
|
@@ -47101,9 +47197,9 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
|
|
|
47101
47197
|
onChange: setSelectedMemberDid,
|
|
47102
47198
|
searchable: true,
|
|
47103
47199
|
disabled: loadingMembers || signing,
|
|
47104
|
-
rightSection: loadingMembers ? /* @__PURE__ */
|
|
47200
|
+
rightSection: loadingMembers ? /* @__PURE__ */ React396.createElement(Loader93, { size: 14 }) : null
|
|
47105
47201
|
}
|
|
47106
|
-
), /* @__PURE__ */
|
|
47202
|
+
), /* @__PURE__ */ React396.createElement(Divider45, null), /* @__PURE__ */ React396.createElement(Stack287, { gap: "xs" }, /* @__PURE__ */ React396.createElement(Group158, { justify: "space-between" }, /* @__PURE__ */ React396.createElement(Text262, { size: "sm", fw: 600 }, "UCAN capabilities"), /* @__PURE__ */ React396.createElement(Group158, { gap: "xs" }, /* @__PURE__ */ React396.createElement(Button97, { size: "compact-xs", variant: "subtle", onClick: () => setSelectedCapabilities(capabilityOptions.map((option) => option.id)) }, "All"), /* @__PURE__ */ React396.createElement(Button97, { size: "compact-xs", variant: "subtle", onClick: () => setSelectedCapabilities([]) }, "None"))), /* @__PURE__ */ React396.createElement(Paper26, { withBorder: true, p: "sm", style: { maxHeight: 360, overflow: "auto" } }, /* @__PURE__ */ React396.createElement(Stack287, { gap: "xs" }, capabilityOptions.map((option) => /* @__PURE__ */ React396.createElement(
|
|
47107
47203
|
Checkbox16,
|
|
47108
47204
|
{
|
|
47109
47205
|
key: option.id,
|
|
@@ -47111,14 +47207,14 @@ function DevUcanGrantButton({ editor, handlers: propHandlers }) {
|
|
|
47111
47207
|
onChange: (event) => {
|
|
47112
47208
|
setSelectedCapabilities((current) => event.currentTarget.checked ? [...current, option.id] : current.filter((id) => id !== option.id));
|
|
47113
47209
|
},
|
|
47114
|
-
label: /* @__PURE__ */
|
|
47210
|
+
label: /* @__PURE__ */ React396.createElement(Group158, { gap: "xs" }, /* @__PURE__ */ React396.createElement(Text262, { size: "sm" }, option.label), /* @__PURE__ */ React396.createElement(Badge59, { size: "xs", variant: "light" }, option.capability.can)),
|
|
47115
47211
|
description: `${option.description} on ${option.capability.with}`
|
|
47116
47212
|
}
|
|
47117
|
-
))))), message && /* @__PURE__ */
|
|
47213
|
+
))))), message && /* @__PURE__ */ React396.createElement(Alert103, { color: message.color }, message.text), /* @__PURE__ */ React396.createElement(Group158, { justify: "flex-end" }, /* @__PURE__ */ React396.createElement(Button97, { variant: "subtle", onClick: () => setOpened(false), disabled: signing }, "Close"), /* @__PURE__ */ React396.createElement(Button97, { variant: "light", color: "gray", onClick: logAvailableHandlers, disabled: signing }, "Log handlers"), /* @__PURE__ */ React396.createElement(Button97, { leftSection: /* @__PURE__ */ React396.createElement(IconShieldPlus5, { size: 16 }), onClick: handleSign, loading: signing, disabled: !hasSigningHandler }, "Sign UCAN")))));
|
|
47118
47214
|
}
|
|
47119
47215
|
|
|
47120
47216
|
// src/mantine/components/EntitySigningSetup.tsx
|
|
47121
|
-
import
|
|
47217
|
+
import React397, { useState as useState213 } from "react";
|
|
47122
47218
|
import { Modal as Modal5, Stack as Stack288, Text as Text263, TextInput as TextInput14, Button as Button98, Alert as Alert104, Group as Group159 } from "@mantine/core";
|
|
47123
47219
|
import { IconAlertCircle as IconAlertCircle51, IconCheck as IconCheck50, IconKey as IconKey6 } from "@tabler/icons-react";
|
|
47124
47220
|
var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) => {
|
|
@@ -47166,15 +47262,15 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
|
|
|
47166
47262
|
setSuccess(false);
|
|
47167
47263
|
}
|
|
47168
47264
|
};
|
|
47169
|
-
return /* @__PURE__ */
|
|
47265
|
+
return /* @__PURE__ */ React397.createElement(
|
|
47170
47266
|
Modal5,
|
|
47171
47267
|
{
|
|
47172
47268
|
opened,
|
|
47173
47269
|
onClose: handleClose,
|
|
47174
|
-
title: /* @__PURE__ */
|
|
47270
|
+
title: /* @__PURE__ */ React397.createElement(Group159, { gap: "xs" }, /* @__PURE__ */ React397.createElement(IconKey6, { size: 20 }), /* @__PURE__ */ React397.createElement(Text263, { fw: 600 }, "Entity Signing Setup")),
|
|
47175
47271
|
size: "md"
|
|
47176
47272
|
},
|
|
47177
|
-
/* @__PURE__ */
|
|
47273
|
+
/* @__PURE__ */ React397.createElement(Stack288, { gap: "md" }, success ? /* @__PURE__ */ React397.createElement(Alert104, { color: "green", icon: /* @__PURE__ */ React397.createElement(IconCheck50, { size: 16 }) }, "Entity signing key set up successfully!") : /* @__PURE__ */ React397.createElement(React397.Fragment, null, /* @__PURE__ */ React397.createElement(Text263, { size: "sm", c: "dimmed" }, "Flow authorization requires a signing key for", " ", /* @__PURE__ */ React397.createElement(Text263, { span: true, fw: 500 }, entityName || entityDid), "."), /* @__PURE__ */ React397.createElement(Alert104, { color: "blue", variant: "light" }, /* @__PURE__ */ React397.createElement(Text263, { size: "sm" }, "This is a ", /* @__PURE__ */ React397.createElement("strong", null, "one-time setup"), " that allows flows to grant permissions without requiring wallet signatures for each delegation.")), /* @__PURE__ */ React397.createElement(Stack288, { gap: "xs" }, /* @__PURE__ */ React397.createElement(Text263, { size: "sm", fw: 500 }, "What happens:"), /* @__PURE__ */ React397.createElement(Text263, { size: "sm", c: "dimmed" }, "1. A new signing key is generated"), /* @__PURE__ */ React397.createElement(Text263, { size: "sm", c: "dimmed" }, "2. Key is registered on the entity's DID document (requires wallet)"), /* @__PURE__ */ React397.createElement(Text263, { size: "sm", c: "dimmed" }, "3. Key is stored encrypted in the entity's Matrix room")), /* @__PURE__ */ React397.createElement(
|
|
47178
47274
|
TextInput14,
|
|
47179
47275
|
{
|
|
47180
47276
|
label: "Enter PIN to encrypt signing key",
|
|
@@ -47185,12 +47281,12 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
|
|
|
47185
47281
|
onChange: (e) => setPin(e.currentTarget.value),
|
|
47186
47282
|
disabled: loading
|
|
47187
47283
|
}
|
|
47188
|
-
), /* @__PURE__ */
|
|
47284
|
+
), /* @__PURE__ */ React397.createElement(TextInput14, { label: "Confirm PIN", type: "password", placeholder: "Confirm PIN", value: confirmPin, onChange: (e) => setConfirmPin(e.currentTarget.value), disabled: loading }), error && /* @__PURE__ */ React397.createElement(Alert104, { color: "red", icon: /* @__PURE__ */ React397.createElement(IconAlertCircle51, { size: 16 }) }, error), /* @__PURE__ */ React397.createElement(Group159, { justify: "flex-end", mt: "md" }, /* @__PURE__ */ React397.createElement(Button98, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React397.createElement(Button98, { onClick: handleSetup, loading, leftSection: /* @__PURE__ */ React397.createElement(IconKey6, { size: 16 }) }, "Setup Entity Signing"))))
|
|
47189
47285
|
);
|
|
47190
47286
|
};
|
|
47191
47287
|
|
|
47192
47288
|
// src/mantine/components/FlowPermissionsPanel.tsx
|
|
47193
|
-
import
|
|
47289
|
+
import React398, { useState as useState214, useEffect as useEffect180, useMemo as useMemo173 } from "react";
|
|
47194
47290
|
import { Stack as Stack289, Text as Text264, Paper as Paper27, Group as Group160, Badge as Badge60, Button as Button99, ActionIcon as ActionIcon53, Loader as Loader94, Alert as Alert105, Divider as Divider46 } from "@mantine/core";
|
|
47195
47291
|
import { IconPlus as IconPlus14, IconTrash as IconTrash16, IconShieldCheck as IconShieldCheck18, IconUser as IconUser14, IconRobot as IconRobot5, IconBuilding as IconBuilding2 } from "@tabler/icons-react";
|
|
47196
47292
|
var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission, onRevokePermission, getUserDisplayName }) => {
|
|
@@ -47245,11 +47341,11 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
|
|
|
47245
47341
|
const getIcon2 = (type) => {
|
|
47246
47342
|
switch (type) {
|
|
47247
47343
|
case "oracle":
|
|
47248
|
-
return /* @__PURE__ */
|
|
47344
|
+
return /* @__PURE__ */ React398.createElement(IconRobot5, { size: 16 });
|
|
47249
47345
|
case "entity":
|
|
47250
|
-
return /* @__PURE__ */
|
|
47346
|
+
return /* @__PURE__ */ React398.createElement(IconBuilding2, { size: 16 });
|
|
47251
47347
|
default:
|
|
47252
|
-
return /* @__PURE__ */
|
|
47348
|
+
return /* @__PURE__ */ React398.createElement(IconUser14, { size: 16 });
|
|
47253
47349
|
}
|
|
47254
47350
|
};
|
|
47255
47351
|
const isCustomCapability = (caps) => {
|
|
@@ -47273,11 +47369,11 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
|
|
|
47273
47369
|
if (date < /* @__PURE__ */ new Date()) return "Expired";
|
|
47274
47370
|
return date.toLocaleDateString();
|
|
47275
47371
|
};
|
|
47276
|
-
return /* @__PURE__ */
|
|
47372
|
+
return /* @__PURE__ */ React398.createElement(Stack289, { gap: "md" }, /* @__PURE__ */ React398.createElement(Stack289, { gap: "xs" }, /* @__PURE__ */ React398.createElement(Text264, { fw: 600, size: "sm" }, "Root Authority"), /* @__PURE__ */ React398.createElement(Paper27, { p: "sm", withBorder: true }, /* @__PURE__ */ React398.createElement(Group160, { gap: "xs" }, /* @__PURE__ */ React398.createElement(IconShieldCheck18, { size: 20, color: "var(--mantine-color-green-6)" }), /* @__PURE__ */ React398.createElement(Stack289, { gap: 2, style: { flex: 1 } }, /* @__PURE__ */ React398.createElement(Text264, { size: "sm", fw: 500 }, entityName || entityDid), /* @__PURE__ */ React398.createElement(Text264, { size: "xs", c: "dimmed" }, rootDelegation ? `Granted: ${new Date(rootDelegation.createdAt).toLocaleDateString()}` : "Root capability not set up")), /* @__PURE__ */ React398.createElement(Badge60, { color: "green", variant: "light" }, "Entity")))), /* @__PURE__ */ React398.createElement(Divider46, { label: "Flow Permissions", labelPosition: "center" }), loading ? /* @__PURE__ */ React398.createElement(Group160, { justify: "center", py: "xl" }, /* @__PURE__ */ React398.createElement(Loader94, { size: "sm" })) : flowDelegations.length === 0 ? /* @__PURE__ */ React398.createElement(Alert105, { color: "gray", variant: "light" }, /* @__PURE__ */ React398.createElement(Text264, { size: "sm" }, "No flow permissions have been granted yet.")) : /* @__PURE__ */ React398.createElement(Stack289, { gap: "xs" }, flowDelegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React398.createElement(Paper27, { key: delegation.cid, p: "sm", withBorder: true }, /* @__PURE__ */ React398.createElement(Group160, { justify: "space-between" }, /* @__PURE__ */ React398.createElement(Group160, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React398.createElement(Stack289, { gap: 2 }, /* @__PURE__ */ React398.createElement(Text264, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React398.createElement(Text264, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React398.createElement(Group160, { gap: "xs" }, /* @__PURE__ */ React398.createElement(Text264, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React398.createElement(Text264, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React398.createElement(Text264, { size: "xs", c: "dimmed" }, "Granted by: ", delegation.issuerDid === entityDid ? "Entity" : delegation.issuerDid.slice(-8))))), /* @__PURE__ */ React398.createElement(ActionIcon53, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React398.createElement(IconTrash16, { size: 16 })))))), /* @__PURE__ */ React398.createElement(Divider46, { label: "Custom Capabilities", labelPosition: "center" }), !loading && customDelegations.length === 0 ? /* @__PURE__ */ React398.createElement(Alert105, { color: "gray", variant: "light" }, /* @__PURE__ */ React398.createElement(Text264, { size: "sm" }, "No custom capabilities have been created yet.")) : /* @__PURE__ */ React398.createElement(Stack289, { gap: "xs" }, customDelegations.map(({ delegation, displayName, type }) => /* @__PURE__ */ React398.createElement(Paper27, { key: delegation.cid, p: "sm", withBorder: true, style: { borderColor: "var(--mantine-color-violet-4)" } }, /* @__PURE__ */ React398.createElement(Group160, { justify: "space-between" }, /* @__PURE__ */ React398.createElement(Group160, { gap: "xs" }, getIcon2(type), /* @__PURE__ */ React398.createElement(Stack289, { gap: 2 }, /* @__PURE__ */ React398.createElement(Group160, { gap: "xs" }, /* @__PURE__ */ React398.createElement(Text264, { size: "sm", fw: 500 }, displayName), /* @__PURE__ */ React398.createElement(Badge60, { size: "xs", variant: "light", color: "violet" }, "custom")), /* @__PURE__ */ React398.createElement(Text264, { size: "xs", c: "dimmed" }, formatCapabilities(delegation.capabilities)), /* @__PURE__ */ React398.createElement(Group160, { gap: "xs" }, /* @__PURE__ */ React398.createElement(Text264, { size: "xs", c: "dimmed" }, "Expires: ", formatExpiration(delegation.expiration)), /* @__PURE__ */ React398.createElement(Text264, { size: "xs", c: "dimmed" }, "\u2022"), /* @__PURE__ */ React398.createElement(Text264, { size: "xs", c: "dimmed" }, "Issued by: ", delegation.issuerDid.slice(-12))))), /* @__PURE__ */ React398.createElement(ActionIcon53, { color: "red", variant: "subtle", onClick: () => handleRevoke(delegation.cid), loading: revoking === delegation.cid, disabled: !!revoking }, /* @__PURE__ */ React398.createElement(IconTrash16, { size: 16 })))))), /* @__PURE__ */ React398.createElement(Button99, { leftSection: /* @__PURE__ */ React398.createElement(IconPlus14, { size: 16 }), variant: "light", onClick: onGrantPermission }, "Grant Permission"));
|
|
47277
47373
|
};
|
|
47278
47374
|
|
|
47279
47375
|
// src/mantine/components/GrantPermissionModal.tsx
|
|
47280
|
-
import
|
|
47376
|
+
import React399, { useState as useState215, useCallback as useCallback195 } from "react";
|
|
47281
47377
|
import { Modal as Modal6, Stack as Stack290, Text as Text265, TextInput as TextInput15, Button as Button100, Group as Group161, Radio as Radio6, Checkbox as Checkbox17, Alert as Alert106, Paper as Paper28, Loader as Loader95, Badge as Badge61, ActionIcon as ActionIcon54, Divider as Divider47, NumberInput as NumberInput10 } from "@mantine/core";
|
|
47282
47378
|
import { IconSearch as IconSearch13, IconUser as IconUser15, IconRobot as IconRobot6, IconX as IconX21, IconShieldPlus as IconShieldPlus6 } from "@tabler/icons-react";
|
|
47283
47379
|
var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, searchUsers, getOracles, onGrant }) => {
|
|
@@ -47385,15 +47481,15 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
|
|
|
47385
47481
|
resetForm();
|
|
47386
47482
|
}
|
|
47387
47483
|
};
|
|
47388
|
-
return /* @__PURE__ */
|
|
47484
|
+
return /* @__PURE__ */ React399.createElement(
|
|
47389
47485
|
Modal6,
|
|
47390
47486
|
{
|
|
47391
47487
|
opened,
|
|
47392
47488
|
onClose: handleClose,
|
|
47393
|
-
title: /* @__PURE__ */
|
|
47489
|
+
title: /* @__PURE__ */ React399.createElement(Group161, { gap: "xs" }, /* @__PURE__ */ React399.createElement(IconShieldPlus6, { size: 20 }), /* @__PURE__ */ React399.createElement(Text265, { fw: 600 }, "Grant Permission")),
|
|
47394
47490
|
size: "lg"
|
|
47395
47491
|
},
|
|
47396
|
-
/* @__PURE__ */
|
|
47492
|
+
/* @__PURE__ */ React399.createElement(Stack290, { gap: "md" }, /* @__PURE__ */ React399.createElement(Stack290, { gap: "xs" }, /* @__PURE__ */ React399.createElement(Text265, { size: "sm", fw: 500 }, "Recipient Type"), /* @__PURE__ */ React399.createElement(
|
|
47397
47493
|
Radio6.Group,
|
|
47398
47494
|
{
|
|
47399
47495
|
value: recipientType,
|
|
@@ -47403,23 +47499,23 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
|
|
|
47403
47499
|
setSearchResults([]);
|
|
47404
47500
|
}
|
|
47405
47501
|
},
|
|
47406
|
-
/* @__PURE__ */
|
|
47407
|
-
)), recipientType !== "manual" ? /* @__PURE__ */
|
|
47502
|
+
/* @__PURE__ */ React399.createElement(Group161, null, /* @__PURE__ */ React399.createElement(Radio6, { value: "user", label: "User" }), /* @__PURE__ */ React399.createElement(Radio6, { value: "oracle", label: "Oracle" }), /* @__PURE__ */ React399.createElement(Radio6, { value: "manual", label: "Enter DID" }))
|
|
47503
|
+
)), recipientType !== "manual" ? /* @__PURE__ */ React399.createElement(Stack290, { gap: "xs" }, /* @__PURE__ */ React399.createElement(
|
|
47408
47504
|
TextInput15,
|
|
47409
47505
|
{
|
|
47410
47506
|
placeholder: recipientType === "oracle" ? "Search oracles..." : "Search users...",
|
|
47411
|
-
leftSection: /* @__PURE__ */
|
|
47412
|
-
rightSection: searching ? /* @__PURE__ */
|
|
47507
|
+
leftSection: /* @__PURE__ */ React399.createElement(IconSearch13, { size: 16 }),
|
|
47508
|
+
rightSection: searching ? /* @__PURE__ */ React399.createElement(Loader95, { size: 14 }) : null,
|
|
47413
47509
|
value: searchQuery,
|
|
47414
47510
|
onChange: (e) => setSearchQuery(e.currentTarget.value),
|
|
47415
47511
|
onKeyDown: (e) => e.key === "Enter" && handleSearch()
|
|
47416
47512
|
}
|
|
47417
|
-
), selectedRecipient ? /* @__PURE__ */
|
|
47513
|
+
), selectedRecipient ? /* @__PURE__ */ React399.createElement(Paper28, { p: "sm", withBorder: true }, /* @__PURE__ */ React399.createElement(Group161, { justify: "space-between" }, /* @__PURE__ */ React399.createElement(Group161, { gap: "xs" }, recipientType === "oracle" ? /* @__PURE__ */ React399.createElement(IconRobot6, { size: 16 }) : /* @__PURE__ */ React399.createElement(IconUser15, { size: 16 }), /* @__PURE__ */ React399.createElement(Text265, { size: "sm" }, selectedRecipient.displayName), /* @__PURE__ */ React399.createElement(Badge61, { size: "xs", variant: "light" }, selectedRecipient.did.slice(-12))), /* @__PURE__ */ React399.createElement(ActionIcon54, { size: "sm", variant: "subtle", onClick: () => setSelectedRecipient(null) }, /* @__PURE__ */ React399.createElement(IconX21, { size: 14 })))) : searchResults.length > 0 ? /* @__PURE__ */ React399.createElement(Paper28, { p: "xs", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React399.createElement(Stack290, { gap: 4 }, searchResults.map((result) => /* @__PURE__ */ React399.createElement(Button100, { key: result.did, variant: "subtle", size: "sm", justify: "flex-start", onClick: () => setSelectedRecipient(result) }, result.displayName)))) : null) : /* @__PURE__ */ React399.createElement(TextInput15, { label: "Recipient DID", placeholder: "did:ixo:...", value: manualDid, onChange: (e) => setManualDid(e.currentTarget.value) }), /* @__PURE__ */ React399.createElement(Divider47, null), /* @__PURE__ */ React399.createElement(Stack290, { gap: "xs" }, /* @__PURE__ */ React399.createElement(Text265, { size: "sm", fw: 500 }, "Permission Scope"), singleBlockMode && fixedBlock ? (
|
|
47418
47514
|
// Single block mode: show fixed block info
|
|
47419
|
-
/* @__PURE__ */
|
|
47515
|
+
/* @__PURE__ */ React399.createElement(Paper28, { p: "sm", withBorder: true }, /* @__PURE__ */ React399.createElement(Group161, { gap: "xs" }, /* @__PURE__ */ React399.createElement(Badge61, { variant: "light", color: "blue" }, fixedBlock.type), /* @__PURE__ */ React399.createElement(Text265, { size: "sm" }, fixedBlock.name || `Block ${fixedBlock.id.slice(-8)}`)), /* @__PURE__ */ React399.createElement(Text265, { size: "xs", c: "dimmed", mt: "xs" }, "Permission will be granted to execute this specific block."))
|
|
47420
47516
|
) : (
|
|
47421
47517
|
// Multi-block mode: show scope selection
|
|
47422
|
-
/* @__PURE__ */
|
|
47518
|
+
/* @__PURE__ */ React399.createElement(React399.Fragment, null, /* @__PURE__ */ React399.createElement(Radio6.Group, { value: scopeType, onChange: (v) => setScopeType(v) }, /* @__PURE__ */ React399.createElement(Stack290, { gap: "xs" }, /* @__PURE__ */ React399.createElement(Radio6, { value: "full", label: "Full flow access (can execute any block)" }), /* @__PURE__ */ React399.createElement(Radio6, { value: "blocks", label: "Specific blocks only" }))), scopeType === "blocks" && /* @__PURE__ */ React399.createElement(Paper28, { p: "sm", withBorder: true, style: { maxHeight: 150, overflow: "auto" } }, /* @__PURE__ */ React399.createElement(Stack290, { gap: "xs" }, blocks.map((block) => /* @__PURE__ */ React399.createElement(
|
|
47423
47519
|
Checkbox17,
|
|
47424
47520
|
{
|
|
47425
47521
|
key: block.id,
|
|
@@ -47434,7 +47530,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
|
|
|
47434
47530
|
}
|
|
47435
47531
|
}
|
|
47436
47532
|
)))))
|
|
47437
|
-
)), /* @__PURE__ */
|
|
47533
|
+
)), /* @__PURE__ */ React399.createElement(Divider47, null), /* @__PURE__ */ React399.createElement(Stack290, { gap: "xs" }, /* @__PURE__ */ React399.createElement(Checkbox17, { label: "Set expiration", checked: expirationEnabled, onChange: (e) => setExpirationEnabled(e.currentTarget.checked) }), expirationEnabled && /* @__PURE__ */ React399.createElement(NumberInput10, { label: "Expires in (days)", placeholder: "30", value: expirationDays, onChange: setExpirationDays, min: 1, max: 365 })), /* @__PURE__ */ React399.createElement(
|
|
47438
47534
|
Checkbox17,
|
|
47439
47535
|
{
|
|
47440
47536
|
label: "Recipient can grant permissions to others",
|
|
@@ -47442,7 +47538,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
|
|
|
47442
47538
|
checked: canDelegate,
|
|
47443
47539
|
onChange: (e) => setCanDelegate(e.currentTarget.checked)
|
|
47444
47540
|
}
|
|
47445
|
-
), /* @__PURE__ */
|
|
47541
|
+
), /* @__PURE__ */ React399.createElement(Divider47, null), /* @__PURE__ */ React399.createElement(TextInput15, { label: "Enter your PIN to sign this delegation", type: "password", placeholder: "PIN", value: pin, onChange: (e) => setPin(e.currentTarget.value) }), error && /* @__PURE__ */ React399.createElement(Alert106, { color: "red" }, error), /* @__PURE__ */ React399.createElement(Group161, { justify: "flex-end" }, /* @__PURE__ */ React399.createElement(Button100, { variant: "subtle", onClick: handleClose, disabled: loading }, "Cancel"), /* @__PURE__ */ React399.createElement(Button100, { onClick: handleGrant, loading }, "Grant Permission")))
|
|
47446
47542
|
);
|
|
47447
47543
|
};
|
|
47448
47544
|
|
|
@@ -47509,6 +47605,7 @@ export {
|
|
|
47509
47605
|
usePanel,
|
|
47510
47606
|
useListBlocksUIStore,
|
|
47511
47607
|
useListBlocksUI,
|
|
47608
|
+
FlowPanelEmbeddedContext,
|
|
47512
47609
|
registerHookedActionType,
|
|
47513
47610
|
getHookedActionType,
|
|
47514
47611
|
getAllHookedActionTypes,
|
|
@@ -47527,21 +47624,51 @@ export {
|
|
|
47527
47624
|
AuthzExecActionTypes,
|
|
47528
47625
|
ValidatorActionType,
|
|
47529
47626
|
AuthorizationTab,
|
|
47627
|
+
TemplateConfig,
|
|
47530
47628
|
useNodeRuntime,
|
|
47629
|
+
CheckboxFlowView,
|
|
47531
47630
|
CheckboxBlockSpec,
|
|
47631
|
+
TemplateConfig3 as TemplateConfig2,
|
|
47532
47632
|
useOpenSurveyStore,
|
|
47533
47633
|
snapshotOpenSurvey,
|
|
47534
47634
|
fillOpenSurvey,
|
|
47535
47635
|
useRegisterOpenSurvey,
|
|
47636
|
+
EvaluatorFlowView,
|
|
47536
47637
|
ListBlockSpec,
|
|
47537
47638
|
OverviewBlock,
|
|
47639
|
+
TemplateConfig4 as TemplateConfig3,
|
|
47640
|
+
FlowConfig2 as FlowConfig,
|
|
47538
47641
|
ProposalBlockSpec,
|
|
47539
47642
|
EvaluationTab,
|
|
47643
|
+
TemplateConfig5 as TemplateConfig4,
|
|
47644
|
+
ApiRequestFlowView,
|
|
47540
47645
|
ApiRequestBlockSpec,
|
|
47646
|
+
TemplateConfig6 as TemplateConfig5,
|
|
47647
|
+
NotifyFlowView,
|
|
47648
|
+
TemplateConfig7 as TemplateConfig6,
|
|
47649
|
+
ClaimFlowView,
|
|
47541
47650
|
DynamicListBlockSpec,
|
|
47651
|
+
TemplateConfig8 as TemplateConfig7,
|
|
47652
|
+
DomainCreatorSurveyPanel,
|
|
47653
|
+
TemplateConfig9 as TemplateConfig8,
|
|
47654
|
+
EmailFlowView,
|
|
47655
|
+
TemplateConfig11 as TemplateConfig9,
|
|
47656
|
+
FormPanel,
|
|
47657
|
+
TemplateConfig12 as TemplateConfig10,
|
|
47658
|
+
SignPanel,
|
|
47542
47659
|
HookedActionsTab,
|
|
47660
|
+
TemplateConfig14 as TemplateConfig11,
|
|
47661
|
+
GovernanceGroupPanel,
|
|
47662
|
+
TemplateConfig16 as TemplateConfig12,
|
|
47663
|
+
ActionFlowPanel,
|
|
47664
|
+
SecretsTemplateView,
|
|
47665
|
+
SecretsFlowView,
|
|
47666
|
+
SkillsTemplateView,
|
|
47667
|
+
SkillsFlowView,
|
|
47543
47668
|
blockSpecs,
|
|
47544
47669
|
getExtraSlashMenuItems,
|
|
47670
|
+
FlowStepRefSpec,
|
|
47671
|
+
inlineContentSpecs,
|
|
47545
47672
|
useCreateIxoEditor,
|
|
47546
47673
|
getDMNotificationState,
|
|
47547
47674
|
setDMNotificationRecord,
|
|
@@ -47560,4 +47687,4 @@ export {
|
|
|
47560
47687
|
ixoGraphQLClient,
|
|
47561
47688
|
getEntity
|
|
47562
47689
|
};
|
|
47563
|
-
//# sourceMappingURL=chunk-
|
|
47690
|
+
//# sourceMappingURL=chunk-MNPEDF2U.mjs.map
|