@ixo/editor 5.3.1 → 5.4.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.
|
@@ -24095,9 +24095,68 @@ var GovernanceConfigConfig = ({ inputs, onInputsChange }) => {
|
|
|
24095
24095
|
};
|
|
24096
24096
|
|
|
24097
24097
|
// src/mantine/blocks/action/actionTypes/pod/governanceConfig/GovernanceConfigFlowDetail.tsx
|
|
24098
|
-
import React249, { useCallback as useCallback81, useState as useState102 } from "react";
|
|
24099
|
-
import { Alert as Alert38, Box as Box50, Button as Button45, Group as Group92, Select as Select7, Stack as Stack168, Text as Text146, TextInput as TextInput8 } from "@mantine/core";
|
|
24098
|
+
import React249, { useCallback as useCallback81, useMemo as useMemo91, useState as useState102 } from "react";
|
|
24099
|
+
import { Alert as Alert38, Box as Box50, Button as Button45, Group as Group92, NumberInput as NumberInput4, Select as Select7, Stack as Stack168, Text as Text146, TextInput as TextInput8 } from "@mantine/core";
|
|
24100
24100
|
import { IconCheck as IconCheck17, IconAlertCircle as IconAlertCircle20, IconArrowLeft as IconArrowLeft6, IconUsers as IconUsers5, IconWriting, IconPhoto as IconPhoto4, IconCoin as IconCoin3 } from "@tabler/icons-react";
|
|
24101
|
+
var TIME_UNITS = [
|
|
24102
|
+
{ value: "minutes", label: "minutes", seconds: 60 },
|
|
24103
|
+
{ value: "hours", label: "hours", seconds: 60 * 60 },
|
|
24104
|
+
{ value: "days", label: "days", seconds: 60 * 60 * 24 },
|
|
24105
|
+
{ value: "weeks", label: "weeks", seconds: 60 * 60 * 24 * 7 },
|
|
24106
|
+
{ value: "months", label: "months", seconds: 60 * 60 * 24 * 30 }
|
|
24107
|
+
];
|
|
24108
|
+
function parseSecondsString(raw) {
|
|
24109
|
+
const seconds = parseInt(raw ?? "", 10);
|
|
24110
|
+
if (!Number.isFinite(seconds) || seconds <= 0) return { amount: 0, unit: "minutes" };
|
|
24111
|
+
for (let i = TIME_UNITS.length - 1; i >= 0; i--) {
|
|
24112
|
+
const u = TIME_UNITS[i];
|
|
24113
|
+
if (seconds % u.seconds === 0) return { amount: seconds / u.seconds, unit: u.value };
|
|
24114
|
+
}
|
|
24115
|
+
return { amount: Math.max(1, Math.round(seconds / 60)), unit: "minutes" };
|
|
24116
|
+
}
|
|
24117
|
+
function toSecondsString(amount, unit) {
|
|
24118
|
+
const u = TIME_UNITS.find((t) => t.value === unit);
|
|
24119
|
+
const seconds = Math.max(0, Math.round((amount || 0) * (u?.seconds ?? 60)));
|
|
24120
|
+
return `${seconds}s`;
|
|
24121
|
+
}
|
|
24122
|
+
function decimalStringToPercent(raw) {
|
|
24123
|
+
const n = parseFloat(raw);
|
|
24124
|
+
if (!Number.isFinite(n)) return 0;
|
|
24125
|
+
return Math.round(n * 1e4) / 100;
|
|
24126
|
+
}
|
|
24127
|
+
function percentToDecimalString(percent) {
|
|
24128
|
+
if (!Number.isFinite(percent)) return "0";
|
|
24129
|
+
const clamped = Math.max(0, Math.min(100, percent));
|
|
24130
|
+
return (Math.round(clamped * 100) / 1e4).toString();
|
|
24131
|
+
}
|
|
24132
|
+
var DurationField = ({ label, description, value, onChange, disabled }) => {
|
|
24133
|
+
const parts = useMemo91(() => parseSecondsString(value), [value]);
|
|
24134
|
+
const unitOptions = useMemo91(() => TIME_UNITS.map((u) => ({ value: u.value, label: u.label })), []);
|
|
24135
|
+
return /* @__PURE__ */ React249.createElement(Stack168, { gap: 4 }, /* @__PURE__ */ React249.createElement(Text146, { size: "sm", fw: 500 }, label), /* @__PURE__ */ React249.createElement(Text146, { size: "xs", c: "dimmed" }, description), /* @__PURE__ */ React249.createElement(Group92, { gap: "xs", align: "flex-start", wrap: "nowrap" }, /* @__PURE__ */ React249.createElement(
|
|
24136
|
+
NumberInput4,
|
|
24137
|
+
{
|
|
24138
|
+
value: parts.amount,
|
|
24139
|
+
onChange: (v) => onChange(toSecondsString(typeof v === "number" ? v : parseFloat(String(v)) || 0, parts.unit)),
|
|
24140
|
+
min: 0,
|
|
24141
|
+
step: 1,
|
|
24142
|
+
disabled,
|
|
24143
|
+
size: "sm",
|
|
24144
|
+
style: { flex: 1 },
|
|
24145
|
+
hideControls: true
|
|
24146
|
+
}
|
|
24147
|
+
), /* @__PURE__ */ React249.createElement(
|
|
24148
|
+
Select7,
|
|
24149
|
+
{
|
|
24150
|
+
value: parts.unit,
|
|
24151
|
+
onChange: (u) => onChange(toSecondsString(parts.amount, u || parts.unit)),
|
|
24152
|
+
data: unitOptions,
|
|
24153
|
+
disabled,
|
|
24154
|
+
size: "sm",
|
|
24155
|
+
allowDeselect: false,
|
|
24156
|
+
style: { width: 130 }
|
|
24157
|
+
}
|
|
24158
|
+
)));
|
|
24159
|
+
};
|
|
24101
24160
|
var GROUP_TYPES = [
|
|
24102
24161
|
{
|
|
24103
24162
|
type: "categorical",
|
|
@@ -24136,11 +24195,11 @@ function validateGovernance(groupType, g) {
|
|
|
24136
24195
|
return null;
|
|
24137
24196
|
}
|
|
24138
24197
|
const quorum = parseFloat(g.quorum);
|
|
24139
|
-
if (isNaN(quorum) || quorum <= 0 || quorum > 1) return "Quorum must be between 0 and
|
|
24198
|
+
if (isNaN(quorum) || quorum <= 0 || quorum > 1) return "Quorum must be between 0% and 100%";
|
|
24140
24199
|
const threshold = parseFloat(g.threshold);
|
|
24141
|
-
if (isNaN(threshold) || threshold <= 0 || threshold > 1) return "Threshold must be between 0 and
|
|
24200
|
+
if (isNaN(threshold) || threshold <= 0 || threshold > 1) return "Threshold must be between 0% and 100%";
|
|
24142
24201
|
const veto = parseFloat(g.vetoThreshold);
|
|
24143
|
-
if (!isNaN(veto) && threshold + veto > 1) return "Threshold + Veto threshold cannot exceed
|
|
24202
|
+
if (!isNaN(veto) && threshold + veto > 1) return "Threshold + Veto threshold cannot exceed 100%";
|
|
24144
24203
|
return null;
|
|
24145
24204
|
}
|
|
24146
24205
|
var GovernanceConfigFlowDetail = ({ editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
@@ -24234,81 +24293,85 @@ var GovernanceConfigFlowDetail = ({ editor, block, runtime, updateRuntime, isDis
|
|
|
24234
24293
|
},
|
|
24235
24294
|
"Change type"
|
|
24236
24295
|
)), /* @__PURE__ */ React249.createElement(
|
|
24237
|
-
|
|
24296
|
+
DurationField,
|
|
24238
24297
|
{
|
|
24239
24298
|
label: "Voting period",
|
|
24240
|
-
description: "How long a vote stays open
|
|
24241
|
-
placeholder: "604800s",
|
|
24299
|
+
description: "How long a vote stays open",
|
|
24242
24300
|
value: governance.votingPeriod,
|
|
24243
|
-
onChange: (
|
|
24244
|
-
disabled: isDisabled
|
|
24245
|
-
size: "sm"
|
|
24301
|
+
onChange: (votingPeriod) => update({ votingPeriod }),
|
|
24302
|
+
disabled: isDisabled
|
|
24246
24303
|
}
|
|
24247
24304
|
), groupType === "multisig" ? /* @__PURE__ */ React249.createElement(
|
|
24248
|
-
|
|
24305
|
+
NumberInput4,
|
|
24249
24306
|
{
|
|
24250
24307
|
label: "Signature threshold",
|
|
24251
24308
|
description: "Minimum number of member signatures required to pass a proposal",
|
|
24252
|
-
|
|
24253
|
-
|
|
24254
|
-
|
|
24309
|
+
value: parseInt(governance.threshold, 10) || 0,
|
|
24310
|
+
onChange: (v) => update({ threshold: String(typeof v === "number" ? v : parseInt(String(v), 10) || 0) }),
|
|
24311
|
+
min: 1,
|
|
24312
|
+
step: 1,
|
|
24255
24313
|
disabled: isDisabled,
|
|
24256
24314
|
size: "sm"
|
|
24257
24315
|
}
|
|
24258
24316
|
) : /* @__PURE__ */ React249.createElement(React249.Fragment, null, /* @__PURE__ */ React249.createElement(
|
|
24259
|
-
|
|
24317
|
+
NumberInput4,
|
|
24260
24318
|
{
|
|
24261
24319
|
label: "Quorum",
|
|
24262
|
-
description: "
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24320
|
+
description: "Percentage of voting power that must participate to make the vote valid",
|
|
24321
|
+
value: decimalStringToPercent(governance.quorum),
|
|
24322
|
+
onChange: (v) => update({ quorum: percentToDecimalString(typeof v === "number" ? v : parseFloat(String(v)) || 0) }),
|
|
24323
|
+
min: 0,
|
|
24324
|
+
max: 100,
|
|
24325
|
+
step: 1,
|
|
24326
|
+
suffix: "%",
|
|
24266
24327
|
disabled: isDisabled,
|
|
24267
24328
|
size: "sm"
|
|
24268
24329
|
}
|
|
24269
24330
|
), /* @__PURE__ */ React249.createElement(
|
|
24270
|
-
|
|
24331
|
+
NumberInput4,
|
|
24271
24332
|
{
|
|
24272
24333
|
label: "Threshold",
|
|
24273
|
-
description: "
|
|
24274
|
-
|
|
24275
|
-
|
|
24276
|
-
|
|
24334
|
+
description: "Percentage of YES votes needed to pass a proposal",
|
|
24335
|
+
value: decimalStringToPercent(governance.threshold),
|
|
24336
|
+
onChange: (v) => update({ threshold: percentToDecimalString(typeof v === "number" ? v : parseFloat(String(v)) || 0) }),
|
|
24337
|
+
min: 0,
|
|
24338
|
+
max: 100,
|
|
24339
|
+
step: 1,
|
|
24340
|
+
suffix: "%",
|
|
24277
24341
|
disabled: isDisabled,
|
|
24278
24342
|
size: "sm"
|
|
24279
24343
|
}
|
|
24280
24344
|
), /* @__PURE__ */ React249.createElement(
|
|
24281
|
-
|
|
24345
|
+
NumberInput4,
|
|
24282
24346
|
{
|
|
24283
24347
|
label: "Veto threshold",
|
|
24284
|
-
description: "
|
|
24285
|
-
|
|
24286
|
-
|
|
24287
|
-
|
|
24348
|
+
description: "Percentage of VETO votes that will block a proposal",
|
|
24349
|
+
value: decimalStringToPercent(governance.vetoThreshold),
|
|
24350
|
+
onChange: (v) => update({ vetoThreshold: percentToDecimalString(typeof v === "number" ? v : parseFloat(String(v)) || 0) }),
|
|
24351
|
+
min: 0,
|
|
24352
|
+
max: 100,
|
|
24353
|
+
step: 1,
|
|
24354
|
+
suffix: "%",
|
|
24288
24355
|
disabled: isDisabled,
|
|
24289
24356
|
size: "sm"
|
|
24290
24357
|
}
|
|
24291
24358
|
)), isStakingType && /* @__PURE__ */ React249.createElement(
|
|
24292
|
-
|
|
24359
|
+
DurationField,
|
|
24293
24360
|
{
|
|
24294
24361
|
label: "Unstaking duration",
|
|
24295
|
-
description: "How long tokens/NFTs are locked after un-staking
|
|
24296
|
-
placeholder: "1209600s",
|
|
24362
|
+
description: "How long tokens/NFTs are locked after un-staking",
|
|
24297
24363
|
value: governance.unstakingDuration,
|
|
24298
|
-
onChange: (
|
|
24299
|
-
disabled: isDisabled
|
|
24300
|
-
size: "sm"
|
|
24364
|
+
onChange: (unstakingDuration) => update({ unstakingDuration }),
|
|
24365
|
+
disabled: isDisabled
|
|
24301
24366
|
}
|
|
24302
24367
|
), /* @__PURE__ */ React249.createElement(
|
|
24303
|
-
|
|
24368
|
+
DurationField,
|
|
24304
24369
|
{
|
|
24305
24370
|
label: "Min execution delay",
|
|
24306
|
-
description: "Delay after a proposal passes before it can be executed
|
|
24307
|
-
placeholder: "0s",
|
|
24371
|
+
description: "Delay after a proposal passes before it can be executed",
|
|
24308
24372
|
value: governance.minExecutionDelay,
|
|
24309
|
-
onChange: (
|
|
24310
|
-
disabled: isDisabled
|
|
24311
|
-
size: "sm"
|
|
24373
|
+
onChange: (minExecutionDelay) => update({ minExecutionDelay }),
|
|
24374
|
+
disabled: isDisabled
|
|
24312
24375
|
}
|
|
24313
24376
|
), /* @__PURE__ */ React249.createElement(
|
|
24314
24377
|
Select7,
|
|
@@ -24605,14 +24668,14 @@ var HttpRequestConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
24605
24668
|
};
|
|
24606
24669
|
|
|
24607
24670
|
// src/mantine/blocks/action/actionTypes/httpRequest/HttpRequestFlowDetail.tsx
|
|
24608
|
-
import React253, { useMemo as
|
|
24671
|
+
import React253, { useMemo as useMemo92, useState as useState106 } from "react";
|
|
24609
24672
|
import { Group as Group95, Stack as Stack172, Text as Text150, ActionIcon as ActionIcon37, Badge as Badge45, Collapse as Collapse8, Code as Code9, Loader as Loader38, Alert as Alert41 } from "@mantine/core";
|
|
24610
24673
|
import { IconSend as IconSend5, IconChevronDown as IconChevronDown8, IconChevronUp as IconChevronUp4, IconAlertTriangle as IconAlertTriangle5 } from "@tabler/icons-react";
|
|
24611
24674
|
var HttpRequestFlowDetail = ({ inputs, editor, runtime, updateRuntime, isDisabled }) => {
|
|
24612
24675
|
const [isLoading, setIsLoading] = useState106(false);
|
|
24613
24676
|
const [showDetails, setShowDetails] = useState106(false);
|
|
24614
24677
|
const [validationWarnings, setValidationWarnings] = useState106([]);
|
|
24615
|
-
const parsed =
|
|
24678
|
+
const parsed = useMemo92(() => parseHttpRequestInputs(inputs), [inputs]);
|
|
24616
24679
|
const { endpoint, method, headers, body, responseSchema } = parsed;
|
|
24617
24680
|
const runtimeState = runtime.state;
|
|
24618
24681
|
const status = runtimeState === "running" ? "loading" : runtimeState === "completed" ? "success" : runtimeState === "failed" ? "error" : "idle";
|
|
@@ -24740,7 +24803,7 @@ registerActionTypeUI("qi/http.request", {
|
|
|
24740
24803
|
});
|
|
24741
24804
|
|
|
24742
24805
|
// src/mantine/blocks/action/actionTypes/emailSend/EmailSendConfig.tsx
|
|
24743
|
-
import React254, { useCallback as useCallback85, useEffect as useEffect86, useRef as useRef24, useState as useState107, useMemo as
|
|
24806
|
+
import React254, { useCallback as useCallback85, useEffect as useEffect86, useRef as useRef24, useState as useState107, useMemo as useMemo93 } from "react";
|
|
24744
24807
|
import { Alert as Alert42, Badge as Badge46, Group as Group96, Loader as Loader39, Stack as Stack173, Text as Text151 } from "@mantine/core";
|
|
24745
24808
|
import { IconCheck as IconCheck19, IconInfoCircle as IconInfoCircle6 } from "@tabler/icons-react";
|
|
24746
24809
|
|
|
@@ -24843,14 +24906,14 @@ var EmailSendConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
24843
24906
|
},
|
|
24844
24907
|
[handlers.getEmailTemplate, update]
|
|
24845
24908
|
);
|
|
24846
|
-
const parsedExtractedVariables =
|
|
24909
|
+
const parsedExtractedVariables = useMemo93(() => {
|
|
24847
24910
|
try {
|
|
24848
24911
|
return JSON.parse(local.extractedVariables || "[]");
|
|
24849
24912
|
} catch {
|
|
24850
24913
|
return [];
|
|
24851
24914
|
}
|
|
24852
24915
|
}, [local.extractedVariables]);
|
|
24853
|
-
const parsedVariableMapping =
|
|
24916
|
+
const parsedVariableMapping = useMemo93(() => {
|
|
24854
24917
|
try {
|
|
24855
24918
|
return JSON.parse(local.variables || "{}");
|
|
24856
24919
|
} catch {
|
|
@@ -24922,7 +24985,7 @@ registerActionTypeUI("qi/email.send", {
|
|
|
24922
24985
|
});
|
|
24923
24986
|
|
|
24924
24987
|
// src/mantine/blocks/action/actionTypes/bid/BidConfig.tsx
|
|
24925
|
-
import React255, { useCallback as useCallback86, useEffect as useEffect87, useMemo as
|
|
24988
|
+
import React255, { useCallback as useCallback86, useEffect as useEffect87, useMemo as useMemo94, useState as useState108 } from "react";
|
|
24926
24989
|
import { Alert as Alert43, Button as Button48, Loader as Loader40, Stack as Stack174, Text as Text152 } from "@mantine/core";
|
|
24927
24990
|
import { IconInfoCircle as IconInfoCircle7 } from "@tabler/icons-react";
|
|
24928
24991
|
|
|
@@ -24991,7 +25054,7 @@ var BidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
24991
25054
|
setLoadingCollections(false);
|
|
24992
25055
|
}
|
|
24993
25056
|
}, [handlers, local, onInputsChange, update]);
|
|
24994
|
-
const collectionOptions =
|
|
25057
|
+
const collectionOptions = useMemo94(
|
|
24995
25058
|
() => collections.map((collection) => ({
|
|
24996
25059
|
value: collection.id,
|
|
24997
25060
|
label: collection.protocol?.profile?.name || collection.name || collection.id
|
|
@@ -25036,7 +25099,7 @@ var BidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
25036
25099
|
};
|
|
25037
25100
|
|
|
25038
25101
|
// src/mantine/blocks/action/actionTypes/bid/BidFlowDetail.tsx
|
|
25039
|
-
import React257, { useCallback as useCallback87, useEffect as useEffect88, useMemo as
|
|
25102
|
+
import React257, { useCallback as useCallback87, useEffect as useEffect88, useMemo as useMemo95, useState as useState109 } from "react";
|
|
25040
25103
|
import { Alert as Alert44, Loader as Loader41, Stack as Stack175, Text as Text153 } from "@mantine/core";
|
|
25041
25104
|
import { IconPlayerPlay as IconPlayerPlay3 } from "@tabler/icons-react";
|
|
25042
25105
|
import { SurveyModel as SurveyModel9 } from "@ixo/surveys";
|
|
@@ -25058,28 +25121,28 @@ var BidFlowDetail = ({
|
|
|
25058
25121
|
registerRuntimeInputs
|
|
25059
25122
|
}) => {
|
|
25060
25123
|
const handlers = useBlocknoteHandlers();
|
|
25061
|
-
const services =
|
|
25062
|
-
const flowNode =
|
|
25063
|
-
const runtimeManager =
|
|
25064
|
-
const ucanService =
|
|
25065
|
-
const invocationStore =
|
|
25066
|
-
const flowId =
|
|
25067
|
-
const flowOwnerDid =
|
|
25068
|
-
const schemaVersion =
|
|
25069
|
-
const flowUri =
|
|
25124
|
+
const services = useMemo95(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
25125
|
+
const flowNode = useMemo95(() => buildFlowNodeFromBlock(block), [block]);
|
|
25126
|
+
const runtimeManager = useMemo95(() => createRuntimeStateManager(editor), [editor]);
|
|
25127
|
+
const ucanService = useMemo95(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
25128
|
+
const invocationStore = useMemo95(() => editor?._invocationStore || void 0, [editor]);
|
|
25129
|
+
const flowId = useMemo95(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
25130
|
+
const flowOwnerDid = useMemo95(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
25131
|
+
const schemaVersion = useMemo95(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
25132
|
+
const flowUri = useMemo95(() => {
|
|
25070
25133
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
25071
25134
|
return `ixo:flow:${docId}`;
|
|
25072
25135
|
}, [editor, block.id]);
|
|
25073
|
-
const actorDid =
|
|
25136
|
+
const actorDid = useMemo95(() => {
|
|
25074
25137
|
try {
|
|
25075
25138
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
25076
25139
|
} catch {
|
|
25077
25140
|
return "";
|
|
25078
25141
|
}
|
|
25079
25142
|
}, [handlers]);
|
|
25080
|
-
const parsed =
|
|
25143
|
+
const parsed = useMemo95(() => parseBidActionInputs(inputs), [inputs]);
|
|
25081
25144
|
const editorDocument = editor?.document || [];
|
|
25082
|
-
const resolveOpts =
|
|
25145
|
+
const resolveOpts = useMemo95(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
25083
25146
|
const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
|
|
25084
25147
|
const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
|
|
25085
25148
|
const [role, setRole] = useState109("service_agent");
|
|
@@ -25091,7 +25154,7 @@ var BidFlowDetail = ({
|
|
|
25091
25154
|
const [userBid, setUserBid] = useState109(null);
|
|
25092
25155
|
const [userRole, setUserRole] = useState109(null);
|
|
25093
25156
|
const [surveyReady, setSurveyReady] = useState109(false);
|
|
25094
|
-
const surveyModel =
|
|
25157
|
+
const surveyModel = useMemo95(() => {
|
|
25095
25158
|
if (!surveyJson) return null;
|
|
25096
25159
|
const model = new SurveyModel9(surveyJson);
|
|
25097
25160
|
model.applyTheme(surveyTheme);
|
|
@@ -25382,7 +25445,7 @@ registerActionTypeUI("qi/bid.submit", {
|
|
|
25382
25445
|
});
|
|
25383
25446
|
|
|
25384
25447
|
// src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidConfig.tsx
|
|
25385
|
-
import React258, { useCallback as useCallback88, useEffect as useEffect89, useMemo as
|
|
25448
|
+
import React258, { useCallback as useCallback88, useEffect as useEffect89, useMemo as useMemo96, useState as useState110 } from "react";
|
|
25386
25449
|
import { Alert as Alert45, Button as Button49, Loader as Loader42, Stack as Stack176 } from "@mantine/core";
|
|
25387
25450
|
|
|
25388
25451
|
// src/mantine/blocks/action/actionTypes/evaluateBid/types.ts
|
|
@@ -25450,7 +25513,7 @@ var EvaluateBidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
25450
25513
|
setLoadingCollections(false);
|
|
25451
25514
|
}
|
|
25452
25515
|
}, [handlers, local, onInputsChange, update]);
|
|
25453
|
-
const collectionOptions =
|
|
25516
|
+
const collectionOptions = useMemo96(
|
|
25454
25517
|
() => collections.map((collection) => ({
|
|
25455
25518
|
value: collection.id,
|
|
25456
25519
|
label: collection.protocol?.profile?.name || collection.name || collection.id
|
|
@@ -25495,7 +25558,7 @@ var EvaluateBidConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
25495
25558
|
};
|
|
25496
25559
|
|
|
25497
25560
|
// src/mantine/blocks/action/actionTypes/evaluateBid/EvaluateBidFlowDetail.tsx
|
|
25498
|
-
import React260, { useCallback as useCallback89, useEffect as useEffect90, useMemo as
|
|
25561
|
+
import React260, { useCallback as useCallback89, useEffect as useEffect90, useMemo as useMemo97, useState as useState112 } from "react";
|
|
25499
25562
|
import { ActionIcon as ActionIcon38, Alert as Alert46, Badge as Badge47, Box as Box53, Button as Button50, Divider as Divider21, Group as Group98, Loader as Loader43, Stack as Stack177, Text as Text155, UnstyledButton as UnstyledButton4 } from "@mantine/core";
|
|
25500
25563
|
import { IconArrowLeft as IconArrowLeft7, IconCheck as IconCheck20, IconFilter } from "@tabler/icons-react";
|
|
25501
25564
|
|
|
@@ -25585,28 +25648,28 @@ var EvaluateBidFlowDetail = ({
|
|
|
25585
25648
|
registerRuntimeInputs
|
|
25586
25649
|
}) => {
|
|
25587
25650
|
const handlers = useBlocknoteHandlers();
|
|
25588
|
-
const services =
|
|
25589
|
-
const flowNode =
|
|
25590
|
-
const runtimeManager =
|
|
25591
|
-
const ucanService =
|
|
25592
|
-
const invocationStore =
|
|
25593
|
-
const flowId =
|
|
25594
|
-
const flowOwnerDid =
|
|
25595
|
-
const schemaVersion =
|
|
25596
|
-
const flowUri =
|
|
25651
|
+
const services = useMemo97(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
25652
|
+
const flowNode = useMemo97(() => buildFlowNodeFromBlock(block), [block]);
|
|
25653
|
+
const runtimeManager = useMemo97(() => createRuntimeStateManager(editor), [editor]);
|
|
25654
|
+
const ucanService = useMemo97(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
25655
|
+
const invocationStore = useMemo97(() => editor?._invocationStore || void 0, [editor]);
|
|
25656
|
+
const flowId = useMemo97(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
25657
|
+
const flowOwnerDid = useMemo97(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
25658
|
+
const schemaVersion = useMemo97(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
25659
|
+
const flowUri = useMemo97(() => {
|
|
25597
25660
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
25598
25661
|
return `ixo:flow:${docId}`;
|
|
25599
25662
|
}, [editor, block.id]);
|
|
25600
|
-
const actorDid =
|
|
25663
|
+
const actorDid = useMemo97(() => {
|
|
25601
25664
|
try {
|
|
25602
25665
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
25603
25666
|
} catch {
|
|
25604
25667
|
return "";
|
|
25605
25668
|
}
|
|
25606
25669
|
}, [handlers]);
|
|
25607
|
-
const parsed =
|
|
25670
|
+
const parsed = useMemo97(() => parseEvaluateBidActionInputs(inputs), [inputs]);
|
|
25608
25671
|
const editorDocument = editor?.document || [];
|
|
25609
|
-
const resolveOpts =
|
|
25672
|
+
const resolveOpts = useMemo97(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
25610
25673
|
const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
|
|
25611
25674
|
const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
|
|
25612
25675
|
const [bids, setBids] = useState112([]);
|
|
@@ -25620,8 +25683,8 @@ var EvaluateBidFlowDetail = ({
|
|
|
25620
25683
|
const [activeFilter, setActiveFilter] = useState112("pending");
|
|
25621
25684
|
const [paymentRows, setPaymentRows] = useState112([createPaymentRow()]);
|
|
25622
25685
|
const [profilesByDid, setProfilesByDid] = useState112({});
|
|
25623
|
-
const selectedBid =
|
|
25624
|
-
const filteredBids =
|
|
25686
|
+
const selectedBid = useMemo97(() => bids.find((bid) => bid.id === selectedBidId) || null, [bids, selectedBidId]);
|
|
25687
|
+
const filteredBids = useMemo97(() => {
|
|
25625
25688
|
if (activeFilter === "all") return bids;
|
|
25626
25689
|
return bids.filter((bid) => {
|
|
25627
25690
|
const status = getBidStatus(bid).label.toLowerCase();
|
|
@@ -25986,7 +26049,7 @@ registerActionTypeUI("qi/bid.evaluate", {
|
|
|
25986
26049
|
});
|
|
25987
26050
|
|
|
25988
26051
|
// src/mantine/blocks/action/actionTypes/claim/ClaimConfig.tsx
|
|
25989
|
-
import React261, { useCallback as useCallback90, useEffect as useEffect91, useMemo as
|
|
26052
|
+
import React261, { useCallback as useCallback90, useEffect as useEffect91, useMemo as useMemo98, useState as useState113 } from "react";
|
|
25990
26053
|
import { Alert as Alert47, Button as Button51, Loader as Loader44, Stack as Stack178 } from "@mantine/core";
|
|
25991
26054
|
|
|
25992
26055
|
// src/mantine/blocks/action/actionTypes/claim/types.ts
|
|
@@ -26054,7 +26117,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26054
26117
|
setLoadingCollections(false);
|
|
26055
26118
|
}
|
|
26056
26119
|
}, [handlers, local, onInputsChange, update]);
|
|
26057
|
-
const collectionOptions =
|
|
26120
|
+
const collectionOptions = useMemo98(
|
|
26058
26121
|
() => collections.map((collection) => ({
|
|
26059
26122
|
value: collection.id,
|
|
26060
26123
|
label: collection.protocol?.profile?.name || collection.name || collection.id
|
|
@@ -26099,7 +26162,7 @@ var ClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26099
26162
|
};
|
|
26100
26163
|
|
|
26101
26164
|
// src/mantine/blocks/action/actionTypes/claim/ClaimFlowDetail.tsx
|
|
26102
|
-
import React262, { useCallback as useCallback91, useEffect as useEffect92, useMemo as
|
|
26165
|
+
import React262, { useCallback as useCallback91, useEffect as useEffect92, useMemo as useMemo99, useState as useState114 } from "react";
|
|
26103
26166
|
import { ActionIcon as ActionIcon39, Alert as Alert48, Box as Box54, Group as Group99, Loader as Loader45, Stack as Stack179, Text as Text156 } from "@mantine/core";
|
|
26104
26167
|
import { IconArrowLeft as IconArrowLeft8, IconCheck as IconCheck21, IconPlayerPlay as IconPlayerPlay4 } from "@tabler/icons-react";
|
|
26105
26168
|
import { SurveyModel as SurveyModel10 } from "@ixo/surveys";
|
|
@@ -26143,28 +26206,28 @@ var ClaimFlowDetail = ({
|
|
|
26143
26206
|
registerRuntimeInputs
|
|
26144
26207
|
}) => {
|
|
26145
26208
|
const handlers = useBlocknoteHandlers();
|
|
26146
|
-
const services =
|
|
26147
|
-
const flowNode =
|
|
26148
|
-
const runtimeManager =
|
|
26149
|
-
const ucanService =
|
|
26150
|
-
const invocationStore =
|
|
26151
|
-
const flowId =
|
|
26152
|
-
const flowOwnerDid =
|
|
26153
|
-
const schemaVersion =
|
|
26154
|
-
const flowUri =
|
|
26209
|
+
const services = useMemo99(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
26210
|
+
const flowNode = useMemo99(() => buildFlowNodeFromBlock(block), [block]);
|
|
26211
|
+
const runtimeManager = useMemo99(() => createRuntimeStateManager(editor), [editor]);
|
|
26212
|
+
const ucanService = useMemo99(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
26213
|
+
const invocationStore = useMemo99(() => editor?._invocationStore || void 0, [editor]);
|
|
26214
|
+
const flowId = useMemo99(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
26215
|
+
const flowOwnerDid = useMemo99(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
26216
|
+
const schemaVersion = useMemo99(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
26217
|
+
const flowUri = useMemo99(() => {
|
|
26155
26218
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
26156
26219
|
return `ixo:flow:${docId}`;
|
|
26157
26220
|
}, [editor, block.id]);
|
|
26158
|
-
const actorDid =
|
|
26221
|
+
const actorDid = useMemo99(() => {
|
|
26159
26222
|
try {
|
|
26160
26223
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
26161
26224
|
} catch {
|
|
26162
26225
|
return "";
|
|
26163
26226
|
}
|
|
26164
26227
|
}, [handlers]);
|
|
26165
|
-
const parsed =
|
|
26228
|
+
const parsed = useMemo99(() => parseClaimActionInputs(inputs), [inputs]);
|
|
26166
26229
|
const editorDocument = editor?.document || [];
|
|
26167
|
-
const resolveOpts =
|
|
26230
|
+
const resolveOpts = useMemo99(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
26168
26231
|
const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
|
|
26169
26232
|
const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
|
|
26170
26233
|
const [claims, setClaims] = useState114([]);
|
|
@@ -26186,15 +26249,15 @@ var ClaimFlowDetail = ({
|
|
|
26186
26249
|
const [loadingClaimDetail, setLoadingClaimDetail] = useState114(false);
|
|
26187
26250
|
const [disputeDetails, setDisputeDetails] = useState114(null);
|
|
26188
26251
|
const [loadingDispute, setLoadingDispute] = useState114(false);
|
|
26189
|
-
const selectedClaim =
|
|
26190
|
-
const selectedClaimStatus =
|
|
26252
|
+
const selectedClaim = useMemo99(() => claims.find((c) => c.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
|
|
26253
|
+
const selectedClaimStatus = useMemo99(() => selectedClaim ? getClaimStatusInfo(selectedClaim) : null, [selectedClaim]);
|
|
26191
26254
|
const isSelectedDisputed = selectedClaimStatus?.key === "disputed";
|
|
26192
26255
|
const checkSurveyCompleteness = useCallback91((model) => {
|
|
26193
26256
|
const allRequired = model.getAllQuestions(true).filter((q) => q.isRequired);
|
|
26194
26257
|
const isComplete = allRequired.length === 0 || allRequired.every((q) => !q.isEmpty());
|
|
26195
26258
|
setSurveyComplete(isComplete);
|
|
26196
26259
|
}, []);
|
|
26197
|
-
const surveyModel =
|
|
26260
|
+
const surveyModel = useMemo99(() => {
|
|
26198
26261
|
if (!surveyJson) return null;
|
|
26199
26262
|
const model = new SurveyModel10(surveyJson);
|
|
26200
26263
|
model.applyTheme(surveyTheme);
|
|
@@ -26212,7 +26275,7 @@ var ClaimFlowDetail = ({
|
|
|
26212
26275
|
}
|
|
26213
26276
|
return model;
|
|
26214
26277
|
}, [surveyJson, provideSigningHandler, prefillData]);
|
|
26215
|
-
const detailSurveyModel =
|
|
26278
|
+
const detailSurveyModel = useMemo99(() => {
|
|
26216
26279
|
if (!surveyJson || !selectedClaimData) return null;
|
|
26217
26280
|
const model = new SurveyModel10(surveyJson);
|
|
26218
26281
|
model.applyTheme(surveyTheme);
|
|
@@ -26640,7 +26703,7 @@ registerActionTypeUI("qi/claim.submit", {
|
|
|
26640
26703
|
});
|
|
26641
26704
|
|
|
26642
26705
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimConfig.tsx
|
|
26643
|
-
import React263, { useCallback as useCallback92, useEffect as useEffect93, useMemo as
|
|
26706
|
+
import React263, { useCallback as useCallback92, useEffect as useEffect93, useMemo as useMemo100, useState as useState115 } from "react";
|
|
26644
26707
|
import { Alert as Alert49, Button as Button52, Loader as Loader46, Stack as Stack180 } from "@mantine/core";
|
|
26645
26708
|
|
|
26646
26709
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/types.ts
|
|
@@ -26708,7 +26771,7 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26708
26771
|
setLoadingCollections(false);
|
|
26709
26772
|
}
|
|
26710
26773
|
}, [handlers, local, onInputsChange, update]);
|
|
26711
|
-
const collectionOptions =
|
|
26774
|
+
const collectionOptions = useMemo100(
|
|
26712
26775
|
() => collections.map((collection) => ({
|
|
26713
26776
|
value: collection.id,
|
|
26714
26777
|
label: collection.protocol?.profile?.name || collection.name || collection.id
|
|
@@ -26753,13 +26816,13 @@ var EvaluateClaimConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
26753
26816
|
};
|
|
26754
26817
|
|
|
26755
26818
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/EvaluateClaimFlowDetail.tsx
|
|
26756
|
-
import React266, { useCallback as useCallback94, useEffect as useEffect95, useMemo as
|
|
26819
|
+
import React266, { useCallback as useCallback94, useEffect as useEffect95, useMemo as useMemo102, useState as useState117 } from "react";
|
|
26757
26820
|
import { ActionIcon as ActionIcon40, Alert as Alert50, Box as Box57, Button as Button53, Checkbox as Checkbox13, Divider as Divider22, Group as Group102, Loader as Loader48, ScrollArea as ScrollArea8, Stack as Stack183, Text as Text159, UnstyledButton as UnstyledButton6 } from "@mantine/core";
|
|
26758
26821
|
import { IconArrowLeft as IconArrowLeft9, IconCheck as IconCheck22, IconFilter as IconFilter2 } from "@tabler/icons-react";
|
|
26759
26822
|
import { SurveyModel as SurveyModel11 } from "@ixo/surveys";
|
|
26760
26823
|
|
|
26761
26824
|
// src/mantine/blocks/action/actionTypes/evaluateClaim/ClaimAttachments.tsx
|
|
26762
|
-
import React265, { useCallback as useCallback93, useEffect as useEffect94, useMemo as
|
|
26825
|
+
import React265, { useCallback as useCallback93, useEffect as useEffect94, useMemo as useMemo101, useRef as useRef25, useState as useState116 } from "react";
|
|
26763
26826
|
import { Box as Box56, Group as Group101, Loader as Loader47, SimpleGrid as SimpleGrid4, Stack as Stack182, Text as Text158, Tooltip as Tooltip24, UnstyledButton as UnstyledButton5 } from "@mantine/core";
|
|
26764
26827
|
import { IconFile as IconFile5, IconFileText as IconFileText6, IconMusic, IconPhoto as IconPhoto5, IconVideo } from "@tabler/icons-react";
|
|
26765
26828
|
|
|
@@ -26994,7 +27057,7 @@ var ClaimAttachments = ({ surveyModel, credentialSubject }) => {
|
|
|
26994
27057
|
},
|
|
26995
27058
|
[fetchClaimMedia]
|
|
26996
27059
|
);
|
|
26997
|
-
const items =
|
|
27060
|
+
const items = useMemo101(() => {
|
|
26998
27061
|
if (!credentialSubject || typeof credentialSubject !== "object") return [];
|
|
26999
27062
|
const questionTitles = /* @__PURE__ */ new Map();
|
|
27000
27063
|
const fileQuestionNames = /* @__PURE__ */ new Set();
|
|
@@ -27150,28 +27213,28 @@ var EvaluateClaimFlowDetail = ({
|
|
|
27150
27213
|
registerRuntimeInputs
|
|
27151
27214
|
}) => {
|
|
27152
27215
|
const handlers = useBlocknoteHandlers();
|
|
27153
|
-
const services =
|
|
27154
|
-
const flowNode =
|
|
27155
|
-
const runtimeManager =
|
|
27156
|
-
const ucanService =
|
|
27157
|
-
const invocationStore =
|
|
27158
|
-
const flowId =
|
|
27159
|
-
const flowOwnerDid =
|
|
27160
|
-
const schemaVersion =
|
|
27161
|
-
const flowUri =
|
|
27216
|
+
const services = useMemo102(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
27217
|
+
const flowNode = useMemo102(() => buildFlowNodeFromBlock(block), [block]);
|
|
27218
|
+
const runtimeManager = useMemo102(() => createRuntimeStateManager(editor), [editor]);
|
|
27219
|
+
const ucanService = useMemo102(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
27220
|
+
const invocationStore = useMemo102(() => editor?._invocationStore || void 0, [editor]);
|
|
27221
|
+
const flowId = useMemo102(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
27222
|
+
const flowOwnerDid = useMemo102(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
27223
|
+
const schemaVersion = useMemo102(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
27224
|
+
const flowUri = useMemo102(() => {
|
|
27162
27225
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
27163
27226
|
return `ixo:flow:${docId}`;
|
|
27164
27227
|
}, [editor, block.id]);
|
|
27165
|
-
const actorDid =
|
|
27228
|
+
const actorDid = useMemo102(() => {
|
|
27166
27229
|
try {
|
|
27167
27230
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
27168
27231
|
} catch {
|
|
27169
27232
|
return "";
|
|
27170
27233
|
}
|
|
27171
27234
|
}, [handlers]);
|
|
27172
|
-
const parsed =
|
|
27235
|
+
const parsed = useMemo102(() => parseEvaluateClaimActionInputs(inputs), [inputs]);
|
|
27173
27236
|
const editorDocument = editor?.document || [];
|
|
27174
|
-
const resolveOpts =
|
|
27237
|
+
const resolveOpts = useMemo102(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
27175
27238
|
const deedDid = resolveReferences(parsed.deedDid, editorDocument, resolveOpts).trim();
|
|
27176
27239
|
const collectionId = resolveReferences(parsed.collectionId, editorDocument, resolveOpts).trim();
|
|
27177
27240
|
const [claims, setClaims] = useState117([]);
|
|
@@ -27201,12 +27264,12 @@ var EvaluateClaimFlowDetail = ({
|
|
|
27201
27264
|
const [profilesByDid, setProfilesByDid] = useState117({});
|
|
27202
27265
|
const [disputeDetails, setDisputeDetails] = useState117(null);
|
|
27203
27266
|
const [loadingDispute, setLoadingDispute] = useState117(false);
|
|
27204
|
-
const selectedClaim =
|
|
27205
|
-
const filteredClaims =
|
|
27267
|
+
const selectedClaim = useMemo102(() => claims.find((claim) => claim.claimId === selectedClaimId) || null, [claims, selectedClaimId]);
|
|
27268
|
+
const filteredClaims = useMemo102(() => {
|
|
27206
27269
|
if (activeFilter === "all") return claims;
|
|
27207
27270
|
return claims.filter((claim) => getClaimStatusInfo(claim).key === activeFilter);
|
|
27208
27271
|
}, [claims, activeFilter]);
|
|
27209
|
-
const resolvedCredentialSubject =
|
|
27272
|
+
const resolvedCredentialSubject = useMemo102(() => {
|
|
27210
27273
|
const cs = claimData?.credentialSubject ?? claimData;
|
|
27211
27274
|
if (!cs || typeof cs !== "object") return cs;
|
|
27212
27275
|
return resolveFilesInCredentialSubject(cs);
|
|
@@ -27249,7 +27312,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
27249
27312
|
}
|
|
27250
27313
|
};
|
|
27251
27314
|
}, [handlers.fetchClaimMedia]);
|
|
27252
|
-
const surveyModel =
|
|
27315
|
+
const surveyModel = useMemo102(() => {
|
|
27253
27316
|
if (!surveyJson || !claimData) return null;
|
|
27254
27317
|
const model = new SurveyModel11(surveyJson);
|
|
27255
27318
|
model.applyTheme(surveyTheme);
|
|
@@ -27312,7 +27375,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
27312
27375
|
model.data = resolvedCredentialSubject;
|
|
27313
27376
|
return model;
|
|
27314
27377
|
}, [surveyJson, claimData, resolvedCredentialSubject]);
|
|
27315
|
-
const outcomeSurveyModel =
|
|
27378
|
+
const outcomeSurveyModel = useMemo102(() => {
|
|
27316
27379
|
if (!outcomeTemplateJson) return null;
|
|
27317
27380
|
const model = new SurveyModel11(outcomeTemplateJson);
|
|
27318
27381
|
model.applyTheme(surveyTheme);
|
|
@@ -27534,7 +27597,7 @@ var EvaluateClaimFlowDetail = ({
|
|
|
27534
27597
|
setDisputeDetails(null);
|
|
27535
27598
|
return void 0;
|
|
27536
27599
|
}, [selectedClaim, loadClaimDetail, handlers]);
|
|
27537
|
-
const isClaimAlreadyEvaluated =
|
|
27600
|
+
const isClaimAlreadyEvaluated = useMemo102(() => {
|
|
27538
27601
|
if (!selectedClaim) return false;
|
|
27539
27602
|
return isClaimEvaluated(selectedClaim);
|
|
27540
27603
|
}, [selectedClaim]);
|
|
@@ -28015,7 +28078,7 @@ var ProposalCreateConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
28015
28078
|
};
|
|
28016
28079
|
|
|
28017
28080
|
// src/mantine/blocks/action/actionTypes/proposalCreate/ProposalCreateFlowDetail.tsx
|
|
28018
|
-
import React268, { useCallback as useCallback96, useEffect as useEffect97, useMemo as
|
|
28081
|
+
import React268, { useCallback as useCallback96, useEffect as useEffect97, useMemo as useMemo103, useState as useState119 } from "react";
|
|
28019
28082
|
import { Alert as Alert51, Badge as Badge48, Button as Button54, Card as Card23, Group as Group103, Loader as Loader50, Stack as Stack185, Text as Text161 } from "@mantine/core";
|
|
28020
28083
|
import { IconPlus as IconPlus9, IconPlayerPlay as IconPlayerPlay5 } from "@tabler/icons-react";
|
|
28021
28084
|
var CHAIN_STATUSES2 = ["open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
|
|
@@ -28035,28 +28098,28 @@ var statusColor2 = {
|
|
|
28035
28098
|
};
|
|
28036
28099
|
var ProposalCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
28037
28100
|
const handlers = useBlocknoteHandlers();
|
|
28038
|
-
const services =
|
|
28039
|
-
const flowNode =
|
|
28040
|
-
const runtimeManager =
|
|
28041
|
-
const ucanService =
|
|
28042
|
-
const invocationStore =
|
|
28043
|
-
const flowId =
|
|
28044
|
-
const flowOwnerDid =
|
|
28045
|
-
const schemaVersion =
|
|
28046
|
-
const flowUri =
|
|
28101
|
+
const services = useMemo103(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
28102
|
+
const flowNode = useMemo103(() => buildFlowNodeFromBlock(block), [block]);
|
|
28103
|
+
const runtimeManager = useMemo103(() => createRuntimeStateManager(editor), [editor]);
|
|
28104
|
+
const ucanService = useMemo103(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
28105
|
+
const invocationStore = useMemo103(() => editor?._invocationStore || void 0, [editor]);
|
|
28106
|
+
const flowId = useMemo103(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
28107
|
+
const flowOwnerDid = useMemo103(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
28108
|
+
const schemaVersion = useMemo103(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
28109
|
+
const flowUri = useMemo103(() => {
|
|
28047
28110
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
28048
28111
|
return `ixo:flow:${docId}`;
|
|
28049
28112
|
}, [editor, block.id]);
|
|
28050
|
-
const actorDid =
|
|
28113
|
+
const actorDid = useMemo103(() => {
|
|
28051
28114
|
try {
|
|
28052
28115
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
28053
28116
|
} catch {
|
|
28054
28117
|
return "";
|
|
28055
28118
|
}
|
|
28056
28119
|
}, [handlers]);
|
|
28057
|
-
const parsed =
|
|
28120
|
+
const parsed = useMemo103(() => parseProposalCreateInputs(inputs), [inputs]);
|
|
28058
28121
|
const editorDocument = editor?.document || [];
|
|
28059
|
-
const resolveOpts =
|
|
28122
|
+
const resolveOpts = useMemo103(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
28060
28123
|
const coreAddress = resolveReferences(parsed.coreAddress, editorDocument, resolveOpts).trim();
|
|
28061
28124
|
const proposalTitle = resolveReferences(parsed.proposalTitle, editorDocument, resolveOpts).trim();
|
|
28062
28125
|
const proposalDescription = resolveReferences(parsed.proposalDescription, editorDocument, resolveOpts).trim();
|
|
@@ -28425,7 +28488,7 @@ var ProposalVoteConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
28425
28488
|
};
|
|
28426
28489
|
|
|
28427
28490
|
// src/mantine/blocks/action/actionTypes/proposalVote/ProposalVoteFlowDetail.tsx
|
|
28428
|
-
import React270, { useCallback as useCallback98, useEffect as useEffect99, useMemo as
|
|
28491
|
+
import React270, { useCallback as useCallback98, useEffect as useEffect99, useMemo as useMemo104, useState as useState121 } from "react";
|
|
28429
28492
|
import { Alert as Alert52, Box as Box58, Button as Button55, Card as Card24, Group as Group104, Progress as Progress4, Stack as Stack187, Text as Text163, Tooltip as Tooltip25 } from "@mantine/core";
|
|
28430
28493
|
var getVoteIcon2 = (voteType) => {
|
|
28431
28494
|
switch (voteType) {
|
|
@@ -28442,28 +28505,28 @@ var getVoteIcon2 = (voteType) => {
|
|
|
28442
28505
|
};
|
|
28443
28506
|
var ProposalVoteFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
28444
28507
|
const handlers = useBlocknoteHandlers();
|
|
28445
|
-
const services =
|
|
28446
|
-
const flowNode =
|
|
28447
|
-
const runtimeManager =
|
|
28448
|
-
const ucanService =
|
|
28449
|
-
const invocationStore =
|
|
28450
|
-
const flowId =
|
|
28451
|
-
const flowOwnerDid =
|
|
28452
|
-
const schemaVersion =
|
|
28453
|
-
const flowUri =
|
|
28508
|
+
const services = useMemo104(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
28509
|
+
const flowNode = useMemo104(() => buildFlowNodeFromBlock(block), [block]);
|
|
28510
|
+
const runtimeManager = useMemo104(() => createRuntimeStateManager(editor), [editor]);
|
|
28511
|
+
const ucanService = useMemo104(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
28512
|
+
const invocationStore = useMemo104(() => editor?._invocationStore || void 0, [editor]);
|
|
28513
|
+
const flowId = useMemo104(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
28514
|
+
const flowOwnerDid = useMemo104(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
28515
|
+
const schemaVersion = useMemo104(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
28516
|
+
const flowUri = useMemo104(() => {
|
|
28454
28517
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
28455
28518
|
return `ixo:flow:${docId}`;
|
|
28456
28519
|
}, [editor, block.id]);
|
|
28457
|
-
const actorDid =
|
|
28520
|
+
const actorDid = useMemo104(() => {
|
|
28458
28521
|
try {
|
|
28459
28522
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
28460
28523
|
} catch {
|
|
28461
28524
|
return "";
|
|
28462
28525
|
}
|
|
28463
28526
|
}, [handlers]);
|
|
28464
|
-
const parsed =
|
|
28527
|
+
const parsed = useMemo104(() => parseProposalVoteInputs(inputs), [inputs]);
|
|
28465
28528
|
const editorDocument = editor?.document || [];
|
|
28466
|
-
const resolveOpts =
|
|
28529
|
+
const resolveOpts = useMemo104(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
28467
28530
|
const proposalId = resolveReferences(parsed.proposalId, editorDocument, resolveOpts).trim();
|
|
28468
28531
|
const coreAddress = resolveReferences(parsed.coreAddress, editorDocument, resolveOpts).trim();
|
|
28469
28532
|
const inputContractAddress = resolveReferences(parsed.proposalContractAddress, editorDocument, resolveOpts).trim();
|
|
@@ -28760,7 +28823,7 @@ registerActionTypeUI("qi/proposal.vote", {
|
|
|
28760
28823
|
});
|
|
28761
28824
|
|
|
28762
28825
|
// src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectConfig.tsx
|
|
28763
|
-
import React271, { useMemo as
|
|
28826
|
+
import React271, { useMemo as useMemo105, useState as useState122 } from "react";
|
|
28764
28827
|
import { Box as Box59, Pill as Pill3, PillsInput as PillsInput3, Stack as Stack188, Text as Text164 } from "@mantine/core";
|
|
28765
28828
|
function parseInputs(json) {
|
|
28766
28829
|
try {
|
|
@@ -28773,7 +28836,7 @@ function parseInputs(json) {
|
|
|
28773
28836
|
}
|
|
28774
28837
|
}
|
|
28775
28838
|
var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
|
|
28776
|
-
const local =
|
|
28839
|
+
const local = useMemo105(() => parseInputs(inputs), [inputs]);
|
|
28777
28840
|
const [inputValue, setInputValue] = useState122("");
|
|
28778
28841
|
const update = (dids) => {
|
|
28779
28842
|
onInputsChange(JSON.stringify({ ...local, protocolDids: dids }));
|
|
@@ -28805,7 +28868,7 @@ var ProtocolSelectConfig = ({ inputs, onInputsChange }) => {
|
|
|
28805
28868
|
};
|
|
28806
28869
|
|
|
28807
28870
|
// src/mantine/blocks/action/actionTypes/protocolSelect/ProtocolSelectFlowDetail.tsx
|
|
28808
|
-
import React272, { useCallback as useCallback99, useEffect as useEffect100, useMemo as
|
|
28871
|
+
import React272, { useCallback as useCallback99, useEffect as useEffect100, useMemo as useMemo106, useState as useState123 } from "react";
|
|
28809
28872
|
import { Box as Box60, Group as Group105, Loader as Loader52, Stack as Stack189, Text as Text165 } from "@mantine/core";
|
|
28810
28873
|
function parseInputs2(json) {
|
|
28811
28874
|
try {
|
|
@@ -28819,7 +28882,7 @@ function parseInputs2(json) {
|
|
|
28819
28882
|
}
|
|
28820
28883
|
var ProtocolSelectFlowDetail = ({ inputs, block, runtime, updateRuntime, isDisabled }) => {
|
|
28821
28884
|
const handlers = useBlocknoteHandlers();
|
|
28822
|
-
const { protocolDids } =
|
|
28885
|
+
const { protocolDids } = useMemo106(() => parseInputs2(inputs), [inputs]);
|
|
28823
28886
|
const [protocols, setProtocols] = useState123([]);
|
|
28824
28887
|
const selectedDid = runtime.output?.selectedProtocolDid;
|
|
28825
28888
|
useEffect100(() => {
|
|
@@ -28972,7 +29035,7 @@ var DomainSignConfig = ({ inputs, onInputsChange }) => {
|
|
|
28972
29035
|
};
|
|
28973
29036
|
|
|
28974
29037
|
// src/mantine/blocks/action/actionTypes/domainSign/DomainSignFlowDetail.tsx
|
|
28975
|
-
import React274, { useCallback as useCallback101, useMemo as
|
|
29038
|
+
import React274, { useCallback as useCallback101, useMemo as useMemo107, useState as useState125 } from "react";
|
|
28976
29039
|
import { Alert as Alert53, Button as Button56, Group as Group106, Loader as Loader53, Stack as Stack191, Text as Text167 } from "@mantine/core";
|
|
28977
29040
|
import { IconCheck as IconCheck23, IconAlertCircle as IconAlertCircle21, IconExternalLink as IconExternalLink2 } from "@tabler/icons-react";
|
|
28978
29041
|
var STEP_LABELS = {
|
|
@@ -28982,31 +29045,31 @@ var STEP_LABELS = {
|
|
|
28982
29045
|
};
|
|
28983
29046
|
var DomainSignFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
28984
29047
|
const handlers = useBlocknoteHandlers();
|
|
28985
|
-
const services =
|
|
28986
|
-
const flowNode =
|
|
28987
|
-
const runtimeManager =
|
|
28988
|
-
const ucanService =
|
|
28989
|
-
const invocationStore =
|
|
28990
|
-
const flowId =
|
|
28991
|
-
const flowOwnerDid =
|
|
28992
|
-
const schemaVersion =
|
|
28993
|
-
const flowUri =
|
|
29048
|
+
const services = useMemo107(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
29049
|
+
const flowNode = useMemo107(() => buildFlowNodeFromBlock(block), [block]);
|
|
29050
|
+
const runtimeManager = useMemo107(() => createRuntimeStateManager(editor), [editor]);
|
|
29051
|
+
const ucanService = useMemo107(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
29052
|
+
const invocationStore = useMemo107(() => editor?._invocationStore || void 0, [editor]);
|
|
29053
|
+
const flowId = useMemo107(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
29054
|
+
const flowOwnerDid = useMemo107(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
29055
|
+
const schemaVersion = useMemo107(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
29056
|
+
const flowUri = useMemo107(() => {
|
|
28994
29057
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
28995
29058
|
return `ixo:flow:${docId}`;
|
|
28996
29059
|
}, [editor, block.id]);
|
|
28997
|
-
const actorDid =
|
|
29060
|
+
const actorDid = useMemo107(() => {
|
|
28998
29061
|
try {
|
|
28999
29062
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
29000
29063
|
} catch {
|
|
29001
29064
|
return "";
|
|
29002
29065
|
}
|
|
29003
29066
|
}, [handlers]);
|
|
29004
|
-
const parsed =
|
|
29067
|
+
const parsed = useMemo107(() => parseDomainSignInputs(inputs), [inputs]);
|
|
29005
29068
|
const editorDocument = editor?.document || [];
|
|
29006
|
-
const resolveOpts =
|
|
29069
|
+
const resolveOpts = useMemo107(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
29007
29070
|
const entityType = resolveReferences(parsed.entityType, editorDocument, resolveOpts).trim();
|
|
29008
29071
|
const pendingPayload = runtime.pendingPayload;
|
|
29009
|
-
const domainCardData =
|
|
29072
|
+
const domainCardData = useMemo107(() => {
|
|
29010
29073
|
try {
|
|
29011
29074
|
const raw = pendingPayload?.domainCardData;
|
|
29012
29075
|
if (!raw) return null;
|
|
@@ -29243,7 +29306,7 @@ var DomainCardPreviewConfig = ({ inputs, onInputsChange }) => {
|
|
|
29243
29306
|
};
|
|
29244
29307
|
|
|
29245
29308
|
// src/mantine/blocks/action/actionTypes/domainCardPreview/DomainCardPreviewFlowDetail.tsx
|
|
29246
|
-
import React276, { useCallback as useCallback103, useMemo as
|
|
29309
|
+
import React276, { useCallback as useCallback103, useMemo as useMemo108 } from "react";
|
|
29247
29310
|
import { Alert as Alert54, Badge as Badge49, Box as Box61, Button as Button57, Code as Code10, Group as Group107, Loader as Loader54, ScrollArea as ScrollArea9, Stack as Stack193, Text as Text169 } from "@mantine/core";
|
|
29248
29311
|
import { IconAlertCircle as IconAlertCircle22, IconCheck as IconCheck24, IconSparkles as IconSparkles6 } from "@tabler/icons-react";
|
|
29249
29312
|
var JsonViewer2 = ({ data }) => /* @__PURE__ */ React276.createElement(ScrollArea9.Autosize, { mah: 360, offsetScrollbars: true }, /* @__PURE__ */ React276.createElement(Stack193, { gap: "md" }, data.name && /* @__PURE__ */ React276.createElement(Box61, null, /* @__PURE__ */ React276.createElement(Text169, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Name"), /* @__PURE__ */ React276.createElement(Text169, { size: "lg", fw: 600 }, data.name)), data.summary && /* @__PURE__ */ React276.createElement(Box61, null, /* @__PURE__ */ React276.createElement(Text169, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Summary"), /* @__PURE__ */ React276.createElement(Text169, { size: "sm" }, data.summary)), data.description && /* @__PURE__ */ React276.createElement(Box61, null, /* @__PURE__ */ React276.createElement(Text169, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Description"), /* @__PURE__ */ React276.createElement(Text169, { size: "sm" }, data.description)), data.entity_type && data.entity_type.length > 0 && /* @__PURE__ */ React276.createElement(Box61, null, /* @__PURE__ */ React276.createElement(Text169, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Type"), /* @__PURE__ */ React276.createElement(Text169, { size: "sm" }, data.entity_type.join(", "))), data.keywords && data.keywords.length > 0 && /* @__PURE__ */ React276.createElement(Box61, null, /* @__PURE__ */ React276.createElement(Text169, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600 }, "Keywords"), /* @__PURE__ */ React276.createElement(Text169, { size: "sm" }, data.keywords.join(", "))), data.faq && data.faq.length > 0 && /* @__PURE__ */ React276.createElement(Box61, null, /* @__PURE__ */ React276.createElement(Text169, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "FAQ"), /* @__PURE__ */ React276.createElement(Stack193, { gap: "sm" }, data.faq.map((item, index) => /* @__PURE__ */ React276.createElement(Box61, { key: index, p: "sm", style: { borderRadius: 8, backgroundColor: "var(--mantine-color-dark-6)" } }, /* @__PURE__ */ React276.createElement(Text169, { size: "sm", fw: 500, mb: 4 }, item.question), /* @__PURE__ */ React276.createElement(Text169, { size: "xs", c: "dimmed" }, item.answer))))), /* @__PURE__ */ React276.createElement(Box61, null, /* @__PURE__ */ React276.createElement(Text169, { size: "xs", c: "dimmed", tt: "uppercase", fw: 600, mb: "xs" }, "Raw Data"), /* @__PURE__ */ React276.createElement(Code10, { block: true, style: { fontSize: 11, maxHeight: 200, overflow: "auto" } }, JSON.stringify(data, null, 2)))));
|
|
@@ -29268,21 +29331,21 @@ function coerce(value, fallback) {
|
|
|
29268
29331
|
}
|
|
29269
29332
|
var DomainCardPreviewFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
29270
29333
|
const { domainCardRenderer } = useBlocknoteContext();
|
|
29271
|
-
const parsed =
|
|
29334
|
+
const parsed = useMemo108(() => parseDomainCardPreviewInputs(inputs), [inputs]);
|
|
29272
29335
|
const editorDocument = editor?.document || [];
|
|
29273
|
-
const resolveOpts =
|
|
29274
|
-
const upstreamCardData =
|
|
29336
|
+
const resolveOpts = useMemo108(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
29337
|
+
const upstreamCardData = useMemo108(() => {
|
|
29275
29338
|
if (!parsed.domainCardData) return void 0;
|
|
29276
29339
|
const resolved = resolveReferences(parsed.domainCardData, editorDocument, resolveOpts);
|
|
29277
29340
|
return coerce(resolved, void 0);
|
|
29278
29341
|
}, [parsed.domainCardData, editorDocument, resolveOpts]);
|
|
29279
|
-
const inputsPreview =
|
|
29280
|
-
const inputsCardData =
|
|
29342
|
+
const inputsPreview = useMemo108(() => buildPreviewFromInputs(parsed), [parsed]);
|
|
29343
|
+
const inputsCardData = useMemo108(() => buildCardDataFromInputs(parsed), [parsed]);
|
|
29281
29344
|
const loadingMessage = runtime.output?.loadingMessage || "Agents are analyzing your domain information...";
|
|
29282
29345
|
const errorMessage = runtime.output?.errorMessage || "An error occurred while generating the domain data.";
|
|
29283
29346
|
const domainPreviewData = coerce(runtime.output?.domainPreviewData, null) || inputsPreview;
|
|
29284
29347
|
const domainCardData = coerce(runtime.output?.domainCardData, upstreamCardData) || inputsCardData;
|
|
29285
|
-
const status =
|
|
29348
|
+
const status = useMemo108(() => {
|
|
29286
29349
|
const runtimeStatus = runtime.output?.status;
|
|
29287
29350
|
if (runtimeStatus) return runtimeStatus;
|
|
29288
29351
|
if (domainPreviewData || domainCardData) return "ready";
|
|
@@ -29364,14 +29427,14 @@ var OracleConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
29364
29427
|
};
|
|
29365
29428
|
|
|
29366
29429
|
// src/mantine/blocks/action/actionTypes/oracle/OracleFlowDetail.tsx
|
|
29367
|
-
import React278, { useCallback as useCallback105, useMemo as
|
|
29430
|
+
import React278, { useCallback as useCallback105, useMemo as useMemo109, useState as useState128 } from "react";
|
|
29368
29431
|
import { Alert as Alert55, Button as Button58, Stack as Stack195 } from "@mantine/core";
|
|
29369
29432
|
import { IconCheck as IconCheck25, IconAlertCircle as IconAlertCircle23, IconSparkles as IconSparkles7 } from "@tabler/icons-react";
|
|
29370
29433
|
var OracleFlowDetail = ({ inputs, editor, runtime, updateRuntime, isDisabled }) => {
|
|
29371
29434
|
const handlers = useBlocknoteHandlers();
|
|
29372
|
-
const parsed =
|
|
29435
|
+
const parsed = useMemo109(() => parseOracleInputs(inputs), [inputs]);
|
|
29373
29436
|
const editorDocument = editor?.document || [];
|
|
29374
|
-
const resolveOpts =
|
|
29437
|
+
const resolveOpts = useMemo109(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
29375
29438
|
const resolvedPrompt = resolveReferences(parsed.prompt, editorDocument, resolveOpts).trim();
|
|
29376
29439
|
const [isLoading, setIsLoading] = useState128(false);
|
|
29377
29440
|
const [error, setError] = useState128(null);
|
|
@@ -29462,7 +29525,7 @@ var OraclePromptConfig = ({ inputs, onInputsChange }) => {
|
|
|
29462
29525
|
};
|
|
29463
29526
|
|
|
29464
29527
|
// src/mantine/blocks/action/actionTypes/oraclePrompt/OraclePromptFlowDetail.tsx
|
|
29465
|
-
import React280, { useCallback as useCallback107, useMemo as
|
|
29528
|
+
import React280, { useCallback as useCallback107, useMemo as useMemo110, useState as useState130 } from "react";
|
|
29466
29529
|
import { Alert as Alert56, Loader as Loader55, Stack as Stack197, Text as Text170 } from "@mantine/core";
|
|
29467
29530
|
import { IconSend as IconSend6 } from "@tabler/icons-react";
|
|
29468
29531
|
function parsePrimarySkill(rawSkill) {
|
|
@@ -29502,10 +29565,10 @@ function buildFinalPrompt(prompt, skill) {
|
|
|
29502
29565
|
}
|
|
29503
29566
|
var OraclePromptFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
29504
29567
|
const handlers = useBlocknoteHandlers();
|
|
29505
|
-
const parsed =
|
|
29568
|
+
const parsed = useMemo110(() => parseOraclePromptInputs(inputs), [inputs]);
|
|
29506
29569
|
const editorDocument = editor?.document || [];
|
|
29507
|
-
const resolveOpts =
|
|
29508
|
-
const resolvedPrompt =
|
|
29570
|
+
const resolveOpts = useMemo110(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
29571
|
+
const resolvedPrompt = useMemo110(() => resolveReferences(parsed.prompt || "", editorDocument, resolveOpts).trim(), [parsed.prompt, editorDocument, resolveOpts]);
|
|
29509
29572
|
const [submitting, setSubmitting] = useState130(false);
|
|
29510
29573
|
const [error, setError] = useState130(null);
|
|
29511
29574
|
const handleExecute = useCallback107(async () => {
|
|
@@ -29620,7 +29683,7 @@ var FormSubmitConfig = ({ inputs, onInputsChange }) => {
|
|
|
29620
29683
|
};
|
|
29621
29684
|
|
|
29622
29685
|
// src/mantine/blocks/action/actionTypes/formSubmit/FormSubmitFlowDetail.tsx
|
|
29623
|
-
import React282, { useCallback as useCallback109, useEffect as useEffect106, useMemo as
|
|
29686
|
+
import React282, { useCallback as useCallback109, useEffect as useEffect106, useMemo as useMemo111, useState as useState132 } from "react";
|
|
29624
29687
|
import { Alert as Alert57, Loader as Loader56, Stack as Stack199, Text as Text172 } from "@mantine/core";
|
|
29625
29688
|
import { SurveyModel as SurveyModel12 } from "@ixo/surveys";
|
|
29626
29689
|
function parsePrimarySkill2(rawSkill) {
|
|
@@ -29669,32 +29732,32 @@ ${answersJson}`
|
|
|
29669
29732
|
}
|
|
29670
29733
|
var FormSubmitFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
29671
29734
|
const handlers = useBlocknoteHandlers();
|
|
29672
|
-
const services =
|
|
29673
|
-
const flowNode =
|
|
29674
|
-
const runtimeManager =
|
|
29675
|
-
const ucanService =
|
|
29676
|
-
const invocationStore =
|
|
29677
|
-
const flowId =
|
|
29678
|
-
const flowOwnerDid =
|
|
29679
|
-
const schemaVersion =
|
|
29680
|
-
const flowUri =
|
|
29735
|
+
const services = useMemo111(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
29736
|
+
const flowNode = useMemo111(() => buildFlowNodeFromBlock(block), [block]);
|
|
29737
|
+
const runtimeManager = useMemo111(() => createRuntimeStateManager(editor), [editor]);
|
|
29738
|
+
const ucanService = useMemo111(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
29739
|
+
const invocationStore = useMemo111(() => editor?._invocationStore || void 0, [editor]);
|
|
29740
|
+
const flowId = useMemo111(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
29741
|
+
const flowOwnerDid = useMemo111(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
29742
|
+
const schemaVersion = useMemo111(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
29743
|
+
const flowUri = useMemo111(() => {
|
|
29681
29744
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
29682
29745
|
return `ixo:flow:${docId}`;
|
|
29683
29746
|
}, [editor, block.id]);
|
|
29684
|
-
const actorDid =
|
|
29747
|
+
const actorDid = useMemo111(() => {
|
|
29685
29748
|
try {
|
|
29686
29749
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
29687
29750
|
} catch {
|
|
29688
29751
|
return "";
|
|
29689
29752
|
}
|
|
29690
29753
|
}, [handlers]);
|
|
29691
|
-
const parsed =
|
|
29754
|
+
const parsed = useMemo111(() => parseFormSubmitActionInputs(inputs), [inputs]);
|
|
29692
29755
|
const editorDocument = editor?.document || [];
|
|
29693
|
-
const resolveOpts =
|
|
29694
|
-
const resolvedSchemaString =
|
|
29756
|
+
const resolveOpts = useMemo111(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
29757
|
+
const resolvedSchemaString = useMemo111(() => resolveReferences(parsed.surveySchema || "", editorDocument, resolveOpts).trim(), [parsed.surveySchema, editorDocument, resolveOpts]);
|
|
29695
29758
|
const [submitting, setSubmitting] = useState132(false);
|
|
29696
29759
|
const [error, setError] = useState132(null);
|
|
29697
|
-
const parsedSchema =
|
|
29760
|
+
const parsedSchema = useMemo111(() => {
|
|
29698
29761
|
if (!resolvedSchemaString) return null;
|
|
29699
29762
|
try {
|
|
29700
29763
|
const schema = JSON.parse(resolvedSchemaString);
|
|
@@ -29706,7 +29769,7 @@ var FormSubmitFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isD
|
|
|
29706
29769
|
}, [resolvedSchemaString]);
|
|
29707
29770
|
const isCompleted = runtime.state === "completed";
|
|
29708
29771
|
const savedAnswers = isCompleted && runtime.output?.answers && typeof runtime.output.answers === "object" ? runtime.output.answers : null;
|
|
29709
|
-
const surveyModel =
|
|
29772
|
+
const surveyModel = useMemo111(() => {
|
|
29710
29773
|
if (!parsedSchema) return null;
|
|
29711
29774
|
const model = new SurveyModel12(parsedSchema);
|
|
29712
29775
|
model.applyTheme(surveyTheme);
|
|
@@ -29905,7 +29968,7 @@ var CredentialStoreConfig = ({ inputs, onInputsChange, editor, blockId }) => {
|
|
|
29905
29968
|
};
|
|
29906
29969
|
|
|
29907
29970
|
// src/mantine/blocks/action/actionTypes/credentialStore/CredentialStoreFlowDetail.tsx
|
|
29908
|
-
import React284, { useCallback as useCallback111, useMemo as
|
|
29971
|
+
import React284, { useCallback as useCallback111, useMemo as useMemo112, useState as useState134 } from "react";
|
|
29909
29972
|
import { Alert as Alert58, Button as Button59, Code as Code11, Loader as Loader57, Stack as Stack201, Text as Text174 } from "@mantine/core";
|
|
29910
29973
|
import { IconShieldCheck as IconShieldCheck15 } from "@tabler/icons-react";
|
|
29911
29974
|
function safeParse(value) {
|
|
@@ -29921,7 +29984,7 @@ function safeParse(value) {
|
|
|
29921
29984
|
return result;
|
|
29922
29985
|
}
|
|
29923
29986
|
function CredentialPreview({ value }) {
|
|
29924
|
-
const display =
|
|
29987
|
+
const display = useMemo112(() => {
|
|
29925
29988
|
if (!value) return null;
|
|
29926
29989
|
const parsed = safeParse(value);
|
|
29927
29990
|
if (parsed && typeof parsed === "object") {
|
|
@@ -29934,34 +29997,34 @@ function CredentialPreview({ value }) {
|
|
|
29934
29997
|
}
|
|
29935
29998
|
var CredentialStoreFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
29936
29999
|
const handlers = useBlocknoteHandlers();
|
|
29937
|
-
const services =
|
|
29938
|
-
const flowNode =
|
|
29939
|
-
const runtimeManager =
|
|
29940
|
-
const ucanService =
|
|
29941
|
-
const invocationStore =
|
|
29942
|
-
const flowId =
|
|
29943
|
-
const flowOwnerDid =
|
|
29944
|
-
const schemaVersion =
|
|
29945
|
-
const flowUri =
|
|
30000
|
+
const services = useMemo112(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
30001
|
+
const flowNode = useMemo112(() => buildFlowNodeFromBlock(block), [block]);
|
|
30002
|
+
const runtimeManager = useMemo112(() => createRuntimeStateManager(editor), [editor]);
|
|
30003
|
+
const ucanService = useMemo112(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
30004
|
+
const invocationStore = useMemo112(() => editor?._invocationStore || void 0, [editor]);
|
|
30005
|
+
const flowId = useMemo112(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
30006
|
+
const flowOwnerDid = useMemo112(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
30007
|
+
const schemaVersion = useMemo112(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
30008
|
+
const flowUri = useMemo112(() => {
|
|
29946
30009
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
29947
30010
|
return `ixo:flow:${docId}`;
|
|
29948
30011
|
}, [editor, block.id]);
|
|
29949
|
-
const actorDid =
|
|
30012
|
+
const actorDid = useMemo112(() => {
|
|
29950
30013
|
try {
|
|
29951
30014
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
29952
30015
|
} catch {
|
|
29953
30016
|
return "";
|
|
29954
30017
|
}
|
|
29955
30018
|
}, [handlers]);
|
|
29956
|
-
const parsed =
|
|
30019
|
+
const parsed = useMemo112(() => parseCredentialStoreInputs(inputs), [inputs]);
|
|
29957
30020
|
const editorDocument = editor?.document || [];
|
|
29958
|
-
const resolveOpts =
|
|
29959
|
-
const resolvedCredentialKey =
|
|
30021
|
+
const resolveOpts = useMemo112(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
30022
|
+
const resolvedCredentialKey = useMemo112(
|
|
29960
30023
|
() => resolveReferences(parsed.credentialKey || "", editorDocument, resolveOpts).trim(),
|
|
29961
30024
|
[parsed.credentialKey, editorDocument, resolveOpts]
|
|
29962
30025
|
);
|
|
29963
|
-
const resolvedCredential =
|
|
29964
|
-
const resolvedRoomId =
|
|
30026
|
+
const resolvedCredential = useMemo112(() => resolveReferences(parsed.credential || "", editorDocument, resolveOpts).trim(), [parsed.credential, editorDocument, resolveOpts]);
|
|
30027
|
+
const resolvedRoomId = useMemo112(() => resolveReferences(parsed.roomId || "", editorDocument, resolveOpts).trim(), [parsed.roomId, editorDocument, resolveOpts]);
|
|
29965
30028
|
const [submitting, setSubmitting] = useState134(false);
|
|
29966
30029
|
const [error, setError] = useState134(null);
|
|
29967
30030
|
const hasCredential = !!resolvedCredential;
|
|
@@ -30137,7 +30200,7 @@ var PaymentConfig = ({ inputs, onInputsChange }) => {
|
|
|
30137
30200
|
};
|
|
30138
30201
|
|
|
30139
30202
|
// src/mantine/blocks/action/actionTypes/payment/PaymentFlowDetail.tsx
|
|
30140
|
-
import React286, { useCallback as useCallback113, useMemo as
|
|
30203
|
+
import React286, { useCallback as useCallback113, useMemo as useMemo113, useState as useState136 } from "react";
|
|
30141
30204
|
import { Alert as Alert59, Button as Button60, Code as Code12, Divider as Divider25, Group as Group108, Loader as Loader58, Stack as Stack203, Text as Text176 } from "@mantine/core";
|
|
30142
30205
|
import { IconAlertTriangle as IconAlertTriangle6, IconCash as IconCash2, IconSearch as IconSearch8, IconSend as IconSend7 } from "@tabler/icons-react";
|
|
30143
30206
|
function parsePrimarySkill3(rawSkill) {
|
|
@@ -30213,32 +30276,32 @@ function getPaymentStatusColor(status) {
|
|
|
30213
30276
|
}
|
|
30214
30277
|
var PaymentFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
30215
30278
|
const handlers = useBlocknoteHandlers();
|
|
30216
|
-
const services =
|
|
30217
|
-
const flowNode =
|
|
30218
|
-
const runtimeManager =
|
|
30219
|
-
const ucanService =
|
|
30220
|
-
const invocationStore =
|
|
30221
|
-
const flowId =
|
|
30222
|
-
const flowOwnerDid =
|
|
30223
|
-
const schemaVersion =
|
|
30224
|
-
const flowUri =
|
|
30279
|
+
const services = useMemo113(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
30280
|
+
const flowNode = useMemo113(() => buildFlowNodeFromBlock(block), [block]);
|
|
30281
|
+
const runtimeManager = useMemo113(() => createRuntimeStateManager(editor), [editor]);
|
|
30282
|
+
const ucanService = useMemo113(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
30283
|
+
const invocationStore = useMemo113(() => editor?._invocationStore || void 0, [editor]);
|
|
30284
|
+
const flowId = useMemo113(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
30285
|
+
const flowOwnerDid = useMemo113(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
30286
|
+
const schemaVersion = useMemo113(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
30287
|
+
const flowUri = useMemo113(() => {
|
|
30225
30288
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
30226
30289
|
return `ixo:flow:${docId}`;
|
|
30227
30290
|
}, [editor, block.id]);
|
|
30228
|
-
const actorDid =
|
|
30291
|
+
const actorDid = useMemo113(() => {
|
|
30229
30292
|
try {
|
|
30230
30293
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
30231
30294
|
} catch {
|
|
30232
30295
|
return "";
|
|
30233
30296
|
}
|
|
30234
30297
|
}, [handlers]);
|
|
30235
|
-
const parsed =
|
|
30298
|
+
const parsed = useMemo113(() => parsePaymentInputs(inputs), [inputs]);
|
|
30236
30299
|
const [submitting, setSubmitting] = useState136(false);
|
|
30237
30300
|
const [error, setError] = useState136(null);
|
|
30238
30301
|
const paymentStatus = block.props.paymentStatus || "";
|
|
30239
30302
|
const transactionId = block.props.transactionId || "";
|
|
30240
30303
|
const paymentError = block.props.paymentError || "";
|
|
30241
|
-
const proposal =
|
|
30304
|
+
const proposal = useMemo113(() => {
|
|
30242
30305
|
const raw = block.props.paymentProposal;
|
|
30243
30306
|
if (!raw) return null;
|
|
30244
30307
|
try {
|
|
@@ -30247,7 +30310,7 @@ var PaymentFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisa
|
|
|
30247
30310
|
return null;
|
|
30248
30311
|
}
|
|
30249
30312
|
}, [block.props.paymentProposal]);
|
|
30250
|
-
const summary =
|
|
30313
|
+
const summary = useMemo113(() => {
|
|
30251
30314
|
const raw = block.props.paymentSummary;
|
|
30252
30315
|
if (!raw) return null;
|
|
30253
30316
|
try {
|
|
@@ -30256,7 +30319,7 @@ var PaymentFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisa
|
|
|
30256
30319
|
return null;
|
|
30257
30320
|
}
|
|
30258
30321
|
}, [block.props.paymentSummary]);
|
|
30259
|
-
const paymentConfig =
|
|
30322
|
+
const paymentConfig = useMemo113(() => {
|
|
30260
30323
|
if (!parsed.paymentConfig) return null;
|
|
30261
30324
|
try {
|
|
30262
30325
|
return JSON.parse(parsed.paymentConfig);
|
|
@@ -30457,7 +30520,7 @@ registerActionTypeUI("qi/payment.execute", {
|
|
|
30457
30520
|
});
|
|
30458
30521
|
|
|
30459
30522
|
// src/mantine/blocks/action/actionTypes/matrixDm/MatrixDmConfig.tsx
|
|
30460
|
-
import React287, { useCallback as useCallback114, useEffect as useEffect109, useMemo as
|
|
30523
|
+
import React287, { useCallback as useCallback114, useEffect as useEffect109, useMemo as useMemo114, useState as useState137 } from "react";
|
|
30461
30524
|
import { Flex as Flex35, Stack as Stack204, Text as Text177 } from "@mantine/core";
|
|
30462
30525
|
|
|
30463
30526
|
// src/mantine/blocks/action/actionTypes/matrixDm/types.ts
|
|
@@ -30509,13 +30572,13 @@ var MatrixDmConfig = ({ inputs, onInputsChange, editor }) => {
|
|
|
30509
30572
|
},
|
|
30510
30573
|
[local, onInputsChange]
|
|
30511
30574
|
);
|
|
30512
|
-
const selectData =
|
|
30575
|
+
const selectData = useMemo114(() => {
|
|
30513
30576
|
return roomMembers.map((member) => ({
|
|
30514
30577
|
value: member.did,
|
|
30515
30578
|
label: member.name || member.did
|
|
30516
30579
|
}));
|
|
30517
30580
|
}, [roomMembers]);
|
|
30518
|
-
const memberLookup =
|
|
30581
|
+
const memberLookup = useMemo114(() => {
|
|
30519
30582
|
const lookup = {};
|
|
30520
30583
|
roomMembers.forEach((member) => {
|
|
30521
30584
|
lookup[member.did] = member;
|
|
@@ -30571,24 +30634,24 @@ var WalletGenerateConfig = () => {
|
|
|
30571
30634
|
};
|
|
30572
30635
|
|
|
30573
30636
|
// src/mantine/blocks/action/actionTypes/walletGenerate/WalletGenerateFlowDetail.tsx
|
|
30574
|
-
import React289, { useCallback as useCallback115, useMemo as
|
|
30637
|
+
import React289, { useCallback as useCallback115, useMemo as useMemo115 } from "react";
|
|
30575
30638
|
import { Alert as Alert60, Button as Button61, Group as Group109, Loader as Loader59, Stack as Stack206, Text as Text179 } from "@mantine/core";
|
|
30576
30639
|
import { IconCheck as IconCheck26, IconAlertCircle as IconAlertCircle24 } from "@tabler/icons-react";
|
|
30577
30640
|
var WalletGenerateFlowDetail = ({ inputs: _inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
30578
30641
|
const handlers = useBlocknoteHandlers();
|
|
30579
|
-
const services =
|
|
30580
|
-
const flowNode =
|
|
30581
|
-
const runtimeManager =
|
|
30582
|
-
const ucanService =
|
|
30583
|
-
const invocationStore =
|
|
30584
|
-
const flowId =
|
|
30585
|
-
const flowOwnerDid =
|
|
30586
|
-
const schemaVersion =
|
|
30587
|
-
const flowUri =
|
|
30642
|
+
const services = useMemo115(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
30643
|
+
const flowNode = useMemo115(() => buildFlowNodeFromBlock(block), [block]);
|
|
30644
|
+
const runtimeManager = useMemo115(() => createRuntimeStateManager(editor), [editor]);
|
|
30645
|
+
const ucanService = useMemo115(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
30646
|
+
const invocationStore = useMemo115(() => editor?._invocationStore || void 0, [editor]);
|
|
30647
|
+
const flowId = useMemo115(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
30648
|
+
const flowOwnerDid = useMemo115(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
30649
|
+
const schemaVersion = useMemo115(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
30650
|
+
const flowUri = useMemo115(() => {
|
|
30588
30651
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
30589
30652
|
return `ixo:flow:${docId}`;
|
|
30590
30653
|
}, [editor, block.id]);
|
|
30591
|
-
const actorDid =
|
|
30654
|
+
const actorDid = useMemo115(() => {
|
|
30592
30655
|
try {
|
|
30593
30656
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
30594
30657
|
} catch {
|
|
@@ -30681,7 +30744,7 @@ registerActionTypeUI("qi/wallet.generate", {
|
|
|
30681
30744
|
|
|
30682
30745
|
// src/mantine/blocks/action/actionTypes/walletFund/WalletFundConfig.tsx
|
|
30683
30746
|
import React290, { useCallback as useCallback116, useEffect as useEffect110, useState as useState138 } from "react";
|
|
30684
|
-
import { Stack as Stack207, Text as Text180, NumberInput as
|
|
30747
|
+
import { Stack as Stack207, Text as Text180, NumberInput as NumberInput5 } from "@mantine/core";
|
|
30685
30748
|
|
|
30686
30749
|
// src/mantine/blocks/action/actionTypes/walletFund/types.ts
|
|
30687
30750
|
function parseWalletFundInputs(json) {
|
|
@@ -30725,7 +30788,7 @@ var WalletFundConfig = ({ inputs, onInputsChange }) => {
|
|
|
30725
30788
|
onChange: (event) => update({ address: event.currentTarget.value })
|
|
30726
30789
|
}
|
|
30727
30790
|
)), /* @__PURE__ */ React290.createElement(Stack207, { gap: "xs" }, /* @__PURE__ */ React290.createElement(Text180, { size: "sm", fw: 600 }, "Amount"), /* @__PURE__ */ React290.createElement(Text180, { size: "xs", c: "dimmed" }, "The amount of tokens to send."), /* @__PURE__ */ React290.createElement(
|
|
30728
|
-
|
|
30791
|
+
NumberInput5,
|
|
30729
30792
|
{
|
|
30730
30793
|
placeholder: "0",
|
|
30731
30794
|
value: local.amount,
|
|
@@ -30736,7 +30799,7 @@ var WalletFundConfig = ({ inputs, onInputsChange }) => {
|
|
|
30736
30799
|
};
|
|
30737
30800
|
|
|
30738
30801
|
// src/mantine/blocks/action/actionTypes/walletFund/WalletFundFlowDetail.tsx
|
|
30739
|
-
import React291, { useCallback as useCallback117, useEffect as useEffect111, useMemo as
|
|
30802
|
+
import React291, { useCallback as useCallback117, useEffect as useEffect111, useMemo as useMemo116 } from "react";
|
|
30740
30803
|
import { Alert as Alert61, Group as Group110, Loader as Loader60, Stack as Stack208, Text as Text181 } from "@mantine/core";
|
|
30741
30804
|
import { IconCheck as IconCheck27, IconAlertCircle as IconAlertCircle25 } from "@tabler/icons-react";
|
|
30742
30805
|
var WalletFundFlowDetail = ({
|
|
@@ -30750,29 +30813,29 @@ var WalletFundFlowDetail = ({
|
|
|
30750
30813
|
unlockSigning
|
|
30751
30814
|
}) => {
|
|
30752
30815
|
const handlers = useBlocknoteHandlers();
|
|
30753
|
-
const services =
|
|
30754
|
-
const flowNode =
|
|
30755
|
-
const runtimeManager =
|
|
30756
|
-
const ucanService =
|
|
30757
|
-
const invocationStore =
|
|
30758
|
-
const flowId =
|
|
30759
|
-
const flowOwnerDid =
|
|
30760
|
-
const schemaVersion =
|
|
30761
|
-
const flowUri =
|
|
30816
|
+
const services = useMemo116(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
30817
|
+
const flowNode = useMemo116(() => buildFlowNodeFromBlock(block), [block]);
|
|
30818
|
+
const runtimeManager = useMemo116(() => createRuntimeStateManager(editor), [editor]);
|
|
30819
|
+
const ucanService = useMemo116(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
30820
|
+
const invocationStore = useMemo116(() => editor?._invocationStore || void 0, [editor]);
|
|
30821
|
+
const flowId = useMemo116(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
30822
|
+
const flowOwnerDid = useMemo116(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
30823
|
+
const schemaVersion = useMemo116(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
30824
|
+
const flowUri = useMemo116(() => {
|
|
30762
30825
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
30763
30826
|
return `ixo:flow:${docId}`;
|
|
30764
30827
|
}, [editor, block.id]);
|
|
30765
|
-
const actorDid =
|
|
30828
|
+
const actorDid = useMemo116(() => {
|
|
30766
30829
|
try {
|
|
30767
30830
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
30768
30831
|
} catch {
|
|
30769
30832
|
return "";
|
|
30770
30833
|
}
|
|
30771
30834
|
}, [handlers]);
|
|
30772
|
-
const parsed =
|
|
30835
|
+
const parsed = useMemo116(() => parseWalletFundInputs(inputs), [inputs]);
|
|
30773
30836
|
const editorDocument = editor?.document || [];
|
|
30774
|
-
const resolveOpts =
|
|
30775
|
-
const resolvedInputs =
|
|
30837
|
+
const resolveOpts = useMemo116(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
30838
|
+
const resolvedInputs = useMemo116(() => {
|
|
30776
30839
|
const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
|
|
30777
30840
|
return {
|
|
30778
30841
|
address: r(parsed.address),
|
|
@@ -30879,24 +30942,24 @@ var WalletGenerateAndFundConfig = () => {
|
|
|
30879
30942
|
};
|
|
30880
30943
|
|
|
30881
30944
|
// src/mantine/blocks/action/actionTypes/walletGenerateAndFund/WalletGenerateAndFundFlowDetail.tsx
|
|
30882
|
-
import React293, { useCallback as useCallback118, useMemo as
|
|
30945
|
+
import React293, { useCallback as useCallback118, useMemo as useMemo117 } from "react";
|
|
30883
30946
|
import { Alert as Alert62, Button as Button62, Group as Group111, Loader as Loader61, Stack as Stack210, Text as Text183 } from "@mantine/core";
|
|
30884
30947
|
import { IconCheck as IconCheck28, IconAlertCircle as IconAlertCircle26 } from "@tabler/icons-react";
|
|
30885
30948
|
var WalletGenerateAndFundFlowDetail = ({ inputs: _inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
30886
30949
|
const handlers = useBlocknoteHandlers();
|
|
30887
|
-
const services =
|
|
30888
|
-
const flowNode =
|
|
30889
|
-
const runtimeManager =
|
|
30890
|
-
const ucanService =
|
|
30891
|
-
const invocationStore =
|
|
30892
|
-
const flowId =
|
|
30893
|
-
const flowOwnerDid =
|
|
30894
|
-
const schemaVersion =
|
|
30895
|
-
const flowUri =
|
|
30950
|
+
const services = useMemo117(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
30951
|
+
const flowNode = useMemo117(() => buildFlowNodeFromBlock(block), [block]);
|
|
30952
|
+
const runtimeManager = useMemo117(() => createRuntimeStateManager(editor), [editor]);
|
|
30953
|
+
const ucanService = useMemo117(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
30954
|
+
const invocationStore = useMemo117(() => editor?._invocationStore || void 0, [editor]);
|
|
30955
|
+
const flowId = useMemo117(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
30956
|
+
const flowOwnerDid = useMemo117(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
30957
|
+
const schemaVersion = useMemo117(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
30958
|
+
const flowUri = useMemo117(() => {
|
|
30896
30959
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
30897
30960
|
return `ixo:flow:${docId}`;
|
|
30898
30961
|
}, [editor, block.id]);
|
|
30899
|
-
const actorDid =
|
|
30962
|
+
const actorDid = useMemo117(() => {
|
|
30900
30963
|
try {
|
|
30901
30964
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
30902
30965
|
} catch {
|
|
@@ -31065,34 +31128,34 @@ var IidCreateConfig = ({ inputs, onInputsChange }) => {
|
|
|
31065
31128
|
};
|
|
31066
31129
|
|
|
31067
31130
|
// src/mantine/blocks/action/actionTypes/iidCreate/IidCreateFlowDetail.tsx
|
|
31068
|
-
import React295, { useCallback as useCallback120, useMemo as
|
|
31131
|
+
import React295, { useCallback as useCallback120, useMemo as useMemo118 } from "react";
|
|
31069
31132
|
import { Alert as Alert63, Button as Button63, Group as Group112, Loader as Loader62, Stack as Stack212, Text as Text185 } from "@mantine/core";
|
|
31070
31133
|
import { IconCheck as IconCheck29, IconAlertCircle as IconAlertCircle27 } from "@tabler/icons-react";
|
|
31071
31134
|
var IidCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
31072
31135
|
const handlers = useBlocknoteHandlers();
|
|
31073
|
-
const services =
|
|
31074
|
-
const flowNode =
|
|
31075
|
-
const runtimeManager =
|
|
31076
|
-
const ucanService =
|
|
31077
|
-
const invocationStore =
|
|
31078
|
-
const flowId =
|
|
31079
|
-
const flowOwnerDid =
|
|
31080
|
-
const schemaVersion =
|
|
31081
|
-
const flowUri =
|
|
31136
|
+
const services = useMemo118(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
31137
|
+
const flowNode = useMemo118(() => buildFlowNodeFromBlock(block), [block]);
|
|
31138
|
+
const runtimeManager = useMemo118(() => createRuntimeStateManager(editor), [editor]);
|
|
31139
|
+
const ucanService = useMemo118(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
31140
|
+
const invocationStore = useMemo118(() => editor?._invocationStore || void 0, [editor]);
|
|
31141
|
+
const flowId = useMemo118(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
31142
|
+
const flowOwnerDid = useMemo118(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
31143
|
+
const schemaVersion = useMemo118(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
31144
|
+
const flowUri = useMemo118(() => {
|
|
31082
31145
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
31083
31146
|
return `ixo:flow:${docId}`;
|
|
31084
31147
|
}, [editor, block.id]);
|
|
31085
|
-
const actorDid =
|
|
31148
|
+
const actorDid = useMemo118(() => {
|
|
31086
31149
|
try {
|
|
31087
31150
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
31088
31151
|
} catch {
|
|
31089
31152
|
return "";
|
|
31090
31153
|
}
|
|
31091
31154
|
}, [handlers]);
|
|
31092
|
-
const parsed =
|
|
31155
|
+
const parsed = useMemo118(() => parseIidCreateInputs(inputs), [inputs]);
|
|
31093
31156
|
const editorDocument = editor?.document || [];
|
|
31094
|
-
const resolveOpts =
|
|
31095
|
-
const resolvedInputs =
|
|
31157
|
+
const resolveOpts = useMemo118(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
31158
|
+
const resolvedInputs = useMemo118(() => {
|
|
31096
31159
|
const r = (val) => resolveReferences(val || "", editorDocument, resolveOpts).trim();
|
|
31097
31160
|
return {
|
|
31098
31161
|
mnemonic: r(parsed.mnemonic),
|
|
@@ -31350,34 +31413,34 @@ var MatrixRegisterConfig = ({ inputs, onInputsChange }) => {
|
|
|
31350
31413
|
};
|
|
31351
31414
|
|
|
31352
31415
|
// src/mantine/blocks/action/actionTypes/matrixRegister/MatrixRegisterFlowDetail.tsx
|
|
31353
|
-
import React297, { useCallback as useCallback122, useMemo as
|
|
31416
|
+
import React297, { useCallback as useCallback122, useMemo as useMemo119 } from "react";
|
|
31354
31417
|
import { Alert as Alert64, Button as Button64, Group as Group113, Loader as Loader63, Stack as Stack214, Text as Text187 } from "@mantine/core";
|
|
31355
31418
|
import { IconCheck as IconCheck30, IconAlertCircle as IconAlertCircle28 } from "@tabler/icons-react";
|
|
31356
31419
|
var MatrixRegisterFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
31357
31420
|
const handlers = useBlocknoteHandlers();
|
|
31358
|
-
const services =
|
|
31359
|
-
const flowNode =
|
|
31360
|
-
const runtimeManager =
|
|
31361
|
-
const ucanService =
|
|
31362
|
-
const invocationStore =
|
|
31363
|
-
const flowId =
|
|
31364
|
-
const flowOwnerDid =
|
|
31365
|
-
const schemaVersion =
|
|
31366
|
-
const flowUri =
|
|
31421
|
+
const services = useMemo119(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
31422
|
+
const flowNode = useMemo119(() => buildFlowNodeFromBlock(block), [block]);
|
|
31423
|
+
const runtimeManager = useMemo119(() => createRuntimeStateManager(editor), [editor]);
|
|
31424
|
+
const ucanService = useMemo119(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
31425
|
+
const invocationStore = useMemo119(() => editor?._invocationStore || void 0, [editor]);
|
|
31426
|
+
const flowId = useMemo119(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
31427
|
+
const flowOwnerDid = useMemo119(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
31428
|
+
const schemaVersion = useMemo119(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
31429
|
+
const flowUri = useMemo119(() => {
|
|
31367
31430
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
31368
31431
|
return `ixo:flow:${docId}`;
|
|
31369
31432
|
}, [editor, block.id]);
|
|
31370
|
-
const actorDid =
|
|
31433
|
+
const actorDid = useMemo119(() => {
|
|
31371
31434
|
try {
|
|
31372
31435
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
31373
31436
|
} catch {
|
|
31374
31437
|
return "";
|
|
31375
31438
|
}
|
|
31376
31439
|
}, [handlers]);
|
|
31377
|
-
const parsed =
|
|
31440
|
+
const parsed = useMemo119(() => parseMatrixRegisterInputs(inputs), [inputs]);
|
|
31378
31441
|
const editorDocument = editor?.document || [];
|
|
31379
|
-
const resolveOpts =
|
|
31380
|
-
const resolvedInputs =
|
|
31442
|
+
const resolveOpts = useMemo119(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
31443
|
+
const resolvedInputs = useMemo119(() => {
|
|
31381
31444
|
const r = (val) => resolveReferences(val || "", editorDocument, resolveOpts).trim();
|
|
31382
31445
|
return {
|
|
31383
31446
|
mnemonic: r(parsed.mnemonic),
|
|
@@ -31593,34 +31656,34 @@ var IdentityCreateConfig = ({ inputs, onInputsChange }) => {
|
|
|
31593
31656
|
};
|
|
31594
31657
|
|
|
31595
31658
|
// src/mantine/blocks/action/actionTypes/identityCreate/IdentityCreateFlowDetail.tsx
|
|
31596
|
-
import React299, { useCallback as useCallback124, useMemo as
|
|
31659
|
+
import React299, { useCallback as useCallback124, useMemo as useMemo120 } from "react";
|
|
31597
31660
|
import { Alert as Alert65, Button as Button65, Group as Group114, Loader as Loader64, Stack as Stack216, Text as Text189 } from "@mantine/core";
|
|
31598
31661
|
import { IconCheck as IconCheck31, IconAlertCircle as IconAlertCircle29 } from "@tabler/icons-react";
|
|
31599
31662
|
var IdentityCreateFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
31600
31663
|
const handlers = useBlocknoteHandlers();
|
|
31601
|
-
const services =
|
|
31602
|
-
const flowNode =
|
|
31603
|
-
const runtimeManager =
|
|
31604
|
-
const ucanService =
|
|
31605
|
-
const invocationStore =
|
|
31606
|
-
const flowId =
|
|
31607
|
-
const flowOwnerDid =
|
|
31608
|
-
const schemaVersion =
|
|
31609
|
-
const flowUri =
|
|
31664
|
+
const services = useMemo120(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
31665
|
+
const flowNode = useMemo120(() => buildFlowNodeFromBlock(block), [block]);
|
|
31666
|
+
const runtimeManager = useMemo120(() => createRuntimeStateManager(editor), [editor]);
|
|
31667
|
+
const ucanService = useMemo120(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
31668
|
+
const invocationStore = useMemo120(() => editor?._invocationStore || void 0, [editor]);
|
|
31669
|
+
const flowId = useMemo120(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
31670
|
+
const flowOwnerDid = useMemo120(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
31671
|
+
const schemaVersion = useMemo120(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
31672
|
+
const flowUri = useMemo120(() => {
|
|
31610
31673
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
31611
31674
|
return `ixo:flow:${docId}`;
|
|
31612
31675
|
}, [editor, block.id]);
|
|
31613
|
-
const actorDid =
|
|
31676
|
+
const actorDid = useMemo120(() => {
|
|
31614
31677
|
try {
|
|
31615
31678
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
31616
31679
|
} catch {
|
|
31617
31680
|
return "";
|
|
31618
31681
|
}
|
|
31619
31682
|
}, [handlers]);
|
|
31620
|
-
const parsed =
|
|
31683
|
+
const parsed = useMemo120(() => parseIdentityCreateInputs(inputs), [inputs]);
|
|
31621
31684
|
const editorDocument = editor?.document || [];
|
|
31622
|
-
const resolveOpts =
|
|
31623
|
-
const resolvedInputs =
|
|
31685
|
+
const resolveOpts = useMemo120(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
31686
|
+
const resolvedInputs = useMemo120(() => {
|
|
31624
31687
|
const r = (val) => resolveReferences(val || "", editorDocument, resolveOpts).trim();
|
|
31625
31688
|
const formAnswersStr = r(parsed.formAnswers);
|
|
31626
31689
|
const form = (() => {
|
|
@@ -32042,34 +32105,34 @@ var EntityCreateOracleConfig = ({ inputs, onInputsChange }) => {
|
|
|
32042
32105
|
};
|
|
32043
32106
|
|
|
32044
32107
|
// src/mantine/blocks/action/actionTypes/entityCreateOracle/EntityCreateOracleFlowDetail.tsx
|
|
32045
|
-
import React301, { useCallback as useCallback126, useMemo as
|
|
32108
|
+
import React301, { useCallback as useCallback126, useMemo as useMemo121 } from "react";
|
|
32046
32109
|
import { ActionIcon as ActionIcon41, Alert as Alert66, Button as Button66, CopyButton as CopyButton2, Group as Group115, Loader as Loader65, Stack as Stack218, Text as Text191, Tooltip as Tooltip26 } from "@mantine/core";
|
|
32047
32110
|
import { IconCheck as IconCheck32, IconAlertCircle as IconAlertCircle30, IconCopy as IconCopy2 } from "@tabler/icons-react";
|
|
32048
32111
|
var EntityCreateOracleFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
32049
32112
|
const handlers = useBlocknoteHandlers();
|
|
32050
|
-
const services =
|
|
32051
|
-
const flowNode =
|
|
32052
|
-
const runtimeManager =
|
|
32053
|
-
const ucanService =
|
|
32054
|
-
const invocationStore =
|
|
32055
|
-
const flowId =
|
|
32056
|
-
const flowOwnerDid =
|
|
32057
|
-
const schemaVersion =
|
|
32058
|
-
const flowUri =
|
|
32113
|
+
const services = useMemo121(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
32114
|
+
const flowNode = useMemo121(() => buildFlowNodeFromBlock(block), [block]);
|
|
32115
|
+
const runtimeManager = useMemo121(() => createRuntimeStateManager(editor), [editor]);
|
|
32116
|
+
const ucanService = useMemo121(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
32117
|
+
const invocationStore = useMemo121(() => editor?._invocationStore || void 0, [editor]);
|
|
32118
|
+
const flowId = useMemo121(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
32119
|
+
const flowOwnerDid = useMemo121(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
32120
|
+
const schemaVersion = useMemo121(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
32121
|
+
const flowUri = useMemo121(() => {
|
|
32059
32122
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
32060
32123
|
return `ixo:flow:${docId}`;
|
|
32061
32124
|
}, [editor, block.id]);
|
|
32062
|
-
const actorDid =
|
|
32125
|
+
const actorDid = useMemo121(() => {
|
|
32063
32126
|
try {
|
|
32064
32127
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
32065
32128
|
} catch {
|
|
32066
32129
|
return "";
|
|
32067
32130
|
}
|
|
32068
32131
|
}, [handlers]);
|
|
32069
|
-
const parsed =
|
|
32132
|
+
const parsed = useMemo121(() => parseEntityCreateOracleInputs(inputs), [inputs]);
|
|
32070
32133
|
const editorDocument = editor?.document || [];
|
|
32071
|
-
const resolveOpts =
|
|
32072
|
-
const resolvedInputs =
|
|
32134
|
+
const resolveOpts = useMemo121(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
32135
|
+
const resolvedInputs = useMemo121(() => {
|
|
32073
32136
|
const r = (val) => resolveReferences(val || "", editorDocument, resolveOpts).trim();
|
|
32074
32137
|
const formAnswersStr = r(parsed.formAnswers);
|
|
32075
32138
|
const form = (() => {
|
|
@@ -32263,33 +32326,33 @@ var SandboxProvisionConfig = ({ inputs, onInputsChange }) => {
|
|
|
32263
32326
|
};
|
|
32264
32327
|
|
|
32265
32328
|
// src/mantine/blocks/action/actionTypes/sandboxProvision/SandboxProvisionFlowDetail.tsx
|
|
32266
|
-
import React303, { useCallback as useCallback128, useMemo as
|
|
32329
|
+
import React303, { useCallback as useCallback128, useMemo as useMemo122 } from "react";
|
|
32267
32330
|
import { Alert as Alert67, Anchor as Anchor2, Button as Button67, Group as Group116, Loader as Loader66, Stack as Stack220, Text as Text193 } from "@mantine/core";
|
|
32268
32331
|
import { IconCheck as IconCheck33, IconAlertCircle as IconAlertCircle31 } from "@tabler/icons-react";
|
|
32269
32332
|
var SandboxProvisionFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
32270
32333
|
const handlers = useBlocknoteHandlers();
|
|
32271
|
-
const services =
|
|
32272
|
-
const flowNode =
|
|
32273
|
-
const runtimeManager =
|
|
32274
|
-
const ucanService =
|
|
32275
|
-
const invocationStore =
|
|
32276
|
-
const flowId =
|
|
32277
|
-
const flowOwnerDid =
|
|
32278
|
-
const schemaVersion =
|
|
32279
|
-
const flowUri =
|
|
32334
|
+
const services = useMemo122(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
32335
|
+
const flowNode = useMemo122(() => buildFlowNodeFromBlock(block), [block]);
|
|
32336
|
+
const runtimeManager = useMemo122(() => createRuntimeStateManager(editor), [editor]);
|
|
32337
|
+
const ucanService = useMemo122(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
32338
|
+
const invocationStore = useMemo122(() => editor?._invocationStore || void 0, [editor]);
|
|
32339
|
+
const flowId = useMemo122(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
32340
|
+
const flowOwnerDid = useMemo122(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
32341
|
+
const schemaVersion = useMemo122(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
32342
|
+
const flowUri = useMemo122(() => {
|
|
32280
32343
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
32281
32344
|
return `ixo:flow:${docId}`;
|
|
32282
32345
|
}, [editor, block.id]);
|
|
32283
|
-
const actorDid =
|
|
32346
|
+
const actorDid = useMemo122(() => {
|
|
32284
32347
|
try {
|
|
32285
32348
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
32286
32349
|
} catch {
|
|
32287
32350
|
return "";
|
|
32288
32351
|
}
|
|
32289
32352
|
}, [handlers]);
|
|
32290
|
-
const parsed =
|
|
32353
|
+
const parsed = useMemo122(() => parseSandboxProvisionInputs(inputs), [inputs]);
|
|
32291
32354
|
const editorDocument = editor?.document || [];
|
|
32292
|
-
const resolveOpts =
|
|
32355
|
+
const resolveOpts = useMemo122(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
32293
32356
|
const resolvedEntityDid = resolveReferences(parsed.entityDid || "", editorDocument, resolveOpts).trim();
|
|
32294
32357
|
const resolvedMatrixRoomId = resolveReferences(parsed.matrixRoomId || "", editorDocument, resolveOpts).trim();
|
|
32295
32358
|
const inputsReady = !!(resolvedEntityDid && resolvedMatrixRoomId);
|
|
@@ -32425,33 +32488,33 @@ var OracleContractConfig = ({ inputs, onInputsChange }) => {
|
|
|
32425
32488
|
};
|
|
32426
32489
|
|
|
32427
32490
|
// src/mantine/blocks/action/actionTypes/oracleContract/OracleContractFlowDetail.tsx
|
|
32428
|
-
import React305, { useCallback as useCallback130, useMemo as
|
|
32491
|
+
import React305, { useCallback as useCallback130, useMemo as useMemo123 } from "react";
|
|
32429
32492
|
import { Alert as Alert68, Button as Button68, Group as Group117, Loader as Loader67, Stack as Stack222, Text as Text195 } from "@mantine/core";
|
|
32430
32493
|
import { IconCheck as IconCheck34, IconAlertCircle as IconAlertCircle32 } from "@tabler/icons-react";
|
|
32431
32494
|
var OracleContractFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
32432
32495
|
const handlers = useBlocknoteHandlers();
|
|
32433
|
-
const services =
|
|
32434
|
-
const flowNode =
|
|
32435
|
-
const runtimeManager =
|
|
32436
|
-
const ucanService =
|
|
32437
|
-
const invocationStore =
|
|
32438
|
-
const flowId =
|
|
32439
|
-
const flowOwnerDid =
|
|
32440
|
-
const schemaVersion =
|
|
32441
|
-
const flowUri =
|
|
32496
|
+
const services = useMemo123(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
32497
|
+
const flowNode = useMemo123(() => buildFlowNodeFromBlock(block), [block]);
|
|
32498
|
+
const runtimeManager = useMemo123(() => createRuntimeStateManager(editor), [editor]);
|
|
32499
|
+
const ucanService = useMemo123(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
32500
|
+
const invocationStore = useMemo123(() => editor?._invocationStore || void 0, [editor]);
|
|
32501
|
+
const flowId = useMemo123(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
32502
|
+
const flowOwnerDid = useMemo123(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
32503
|
+
const schemaVersion = useMemo123(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
32504
|
+
const flowUri = useMemo123(() => {
|
|
32442
32505
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
32443
32506
|
return `ixo:flow:${docId}`;
|
|
32444
32507
|
}, [editor, block.id]);
|
|
32445
|
-
const actorDid =
|
|
32508
|
+
const actorDid = useMemo123(() => {
|
|
32446
32509
|
try {
|
|
32447
32510
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
32448
32511
|
} catch {
|
|
32449
32512
|
return "";
|
|
32450
32513
|
}
|
|
32451
32514
|
}, [handlers]);
|
|
32452
|
-
const parsed =
|
|
32515
|
+
const parsed = useMemo123(() => parseOracleContractInputs(inputs), [inputs]);
|
|
32453
32516
|
const editorDocument = editor?.document || [];
|
|
32454
|
-
const resolveOpts =
|
|
32517
|
+
const resolveOpts = useMemo123(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
32455
32518
|
const resolvedOracleEntityDid = resolveReferences(parsed.oracleEntityDid || "", editorDocument, resolveOpts).trim();
|
|
32456
32519
|
const inputsReady = !!resolvedOracleEntityDid;
|
|
32457
32520
|
const userOracleRoomId = runtime.output?.userOracleRoomId || "";
|
|
@@ -32723,7 +32786,7 @@ var OracleStoreSecretsConfig = ({ inputs, onInputsChange }) => {
|
|
|
32723
32786
|
};
|
|
32724
32787
|
|
|
32725
32788
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecrets/OracleStoreSecretsFlowDetail.tsx
|
|
32726
|
-
import React307, { useCallback as useCallback132, useEffect as useEffect119, useMemo as
|
|
32789
|
+
import React307, { useCallback as useCallback132, useEffect as useEffect119, useMemo as useMemo124, useRef as useRef26, useState as useState146 } from "react";
|
|
32727
32790
|
import { Alert as Alert69, Button as Button69, Collapse as Collapse10, Divider as Divider28, Group as Group118, Loader as Loader68, Stack as Stack224, Text as Text197 } from "@mantine/core";
|
|
32728
32791
|
import { IconAlertCircle as IconAlertCircle33, IconCheck as IconCheck35, IconChevronDown as IconChevronDown10, IconChevronUp as IconChevronUp5, IconLock as IconLock2 } from "@tabler/icons-react";
|
|
32729
32792
|
var EXPECTED_SECRETS = [
|
|
@@ -32736,29 +32799,29 @@ var EXPECTED_SECRETS = [
|
|
|
32736
32799
|
];
|
|
32737
32800
|
var OracleStoreSecretsFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
32738
32801
|
const handlers = useBlocknoteHandlers();
|
|
32739
|
-
const services =
|
|
32740
|
-
const flowNode =
|
|
32741
|
-
const runtimeManager =
|
|
32742
|
-
const ucanService =
|
|
32743
|
-
const invocationStore =
|
|
32744
|
-
const flowId =
|
|
32745
|
-
const flowOwnerDid =
|
|
32746
|
-
const schemaVersion =
|
|
32747
|
-
const flowUri =
|
|
32802
|
+
const services = useMemo124(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
32803
|
+
const flowNode = useMemo124(() => buildFlowNodeFromBlock(block), [block]);
|
|
32804
|
+
const runtimeManager = useMemo124(() => createRuntimeStateManager(editor), [editor]);
|
|
32805
|
+
const ucanService = useMemo124(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
32806
|
+
const invocationStore = useMemo124(() => editor?._invocationStore || void 0, [editor]);
|
|
32807
|
+
const flowId = useMemo124(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
32808
|
+
const flowOwnerDid = useMemo124(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
32809
|
+
const schemaVersion = useMemo124(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
32810
|
+
const flowUri = useMemo124(() => {
|
|
32748
32811
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
32749
32812
|
return `ixo:flow:${docId}`;
|
|
32750
32813
|
}, [editor, block.id]);
|
|
32751
|
-
const actorDid =
|
|
32814
|
+
const actorDid = useMemo124(() => {
|
|
32752
32815
|
try {
|
|
32753
32816
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
32754
32817
|
} catch {
|
|
32755
32818
|
return "";
|
|
32756
32819
|
}
|
|
32757
32820
|
}, [handlers]);
|
|
32758
|
-
const parsed =
|
|
32821
|
+
const parsed = useMemo124(() => parseOracleStoreSecretsInputs(inputs), [inputs]);
|
|
32759
32822
|
const editorDocument = editor?.document || [];
|
|
32760
|
-
const resolveOpts =
|
|
32761
|
-
const resolvedInputs =
|
|
32823
|
+
const resolveOpts = useMemo124(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
32824
|
+
const resolvedInputs = useMemo124(() => {
|
|
32762
32825
|
const r = (val) => resolveReferences(val || "", editorDocument, resolveOpts).trim();
|
|
32763
32826
|
return {
|
|
32764
32827
|
matrixRoomId: r(parsed.matrixRoomId),
|
|
@@ -33309,34 +33372,34 @@ var OracleStoreConfigConfig = ({ inputs, onInputsChange }) => {
|
|
|
33309
33372
|
};
|
|
33310
33373
|
|
|
33311
33374
|
// src/mantine/blocks/action/actionTypes/oracleStoreConfig/OracleStoreConfigFlowDetail.tsx
|
|
33312
|
-
import React309, { useCallback as useCallback134, useMemo as
|
|
33375
|
+
import React309, { useCallback as useCallback134, useMemo as useMemo125 } from "react";
|
|
33313
33376
|
import { Alert as Alert70, Button as Button70, Group as Group119, Loader as Loader69, Stack as Stack226, Text as Text199 } from "@mantine/core";
|
|
33314
33377
|
import { IconCheck as IconCheck36, IconAlertCircle as IconAlertCircle34 } from "@tabler/icons-react";
|
|
33315
33378
|
var OracleStoreConfigFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
33316
33379
|
const handlers = useBlocknoteHandlers();
|
|
33317
|
-
const services =
|
|
33318
|
-
const flowNode =
|
|
33319
|
-
const runtimeManager =
|
|
33320
|
-
const ucanService =
|
|
33321
|
-
const invocationStore =
|
|
33322
|
-
const flowId =
|
|
33323
|
-
const flowOwnerDid =
|
|
33324
|
-
const schemaVersion =
|
|
33325
|
-
const flowUri =
|
|
33380
|
+
const services = useMemo125(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
33381
|
+
const flowNode = useMemo125(() => buildFlowNodeFromBlock(block), [block]);
|
|
33382
|
+
const runtimeManager = useMemo125(() => createRuntimeStateManager(editor), [editor]);
|
|
33383
|
+
const ucanService = useMemo125(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
33384
|
+
const invocationStore = useMemo125(() => editor?._invocationStore || void 0, [editor]);
|
|
33385
|
+
const flowId = useMemo125(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
33386
|
+
const flowOwnerDid = useMemo125(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
33387
|
+
const schemaVersion = useMemo125(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
33388
|
+
const flowUri = useMemo125(() => {
|
|
33326
33389
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
33327
33390
|
return `ixo:flow:${docId}`;
|
|
33328
33391
|
}, [editor, block.id]);
|
|
33329
|
-
const actorDid =
|
|
33392
|
+
const actorDid = useMemo125(() => {
|
|
33330
33393
|
try {
|
|
33331
33394
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
33332
33395
|
} catch {
|
|
33333
33396
|
return "";
|
|
33334
33397
|
}
|
|
33335
33398
|
}, [handlers]);
|
|
33336
|
-
const parsed =
|
|
33399
|
+
const parsed = useMemo125(() => parseOracleStoreConfigInputs(inputs), [inputs]);
|
|
33337
33400
|
const editorDocument = editor?.document || [];
|
|
33338
|
-
const resolveOpts =
|
|
33339
|
-
const resolvedInputs =
|
|
33401
|
+
const resolveOpts = useMemo125(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
33402
|
+
const resolvedInputs = useMemo125(() => {
|
|
33340
33403
|
const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
|
|
33341
33404
|
return {
|
|
33342
33405
|
matrixRoomId: r(parsed.matrixRoomId),
|
|
@@ -33720,7 +33783,7 @@ var OracleStoreSecretsAndConfigConfig = ({ inputs, onInputsChange }) => {
|
|
|
33720
33783
|
};
|
|
33721
33784
|
|
|
33722
33785
|
// src/mantine/blocks/action/actionTypes/oracleStoreSecretsAndConfig/OracleStoreSecretsAndConfigFlowDetail.tsx
|
|
33723
|
-
import React311, { useCallback as useCallback136, useEffect as useEffect122, useMemo as
|
|
33786
|
+
import React311, { useCallback as useCallback136, useEffect as useEffect122, useMemo as useMemo126, useRef as useRef27, useState as useState149 } from "react";
|
|
33724
33787
|
import { Alert as Alert71, Button as Button71, Collapse as Collapse11, Divider as Divider31, Group as Group120, Loader as Loader70, Stack as Stack228, Text as Text201 } from "@mantine/core";
|
|
33725
33788
|
import { IconAlertCircle as IconAlertCircle35, IconCheck as IconCheck37, IconChevronDown as IconChevronDown11, IconChevronUp as IconChevronUp6, IconLock as IconLock3 } from "@tabler/icons-react";
|
|
33726
33789
|
var EXPECTED_SECRETS2 = [
|
|
@@ -33733,29 +33796,29 @@ var EXPECTED_SECRETS2 = [
|
|
|
33733
33796
|
];
|
|
33734
33797
|
var OracleStoreSecretsAndConfigFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
33735
33798
|
const handlers = useBlocknoteHandlers();
|
|
33736
|
-
const services =
|
|
33737
|
-
const flowNode =
|
|
33738
|
-
const runtimeManager =
|
|
33739
|
-
const ucanService =
|
|
33740
|
-
const invocationStore =
|
|
33741
|
-
const flowId =
|
|
33742
|
-
const flowOwnerDid =
|
|
33743
|
-
const schemaVersion =
|
|
33744
|
-
const flowUri =
|
|
33799
|
+
const services = useMemo126(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
33800
|
+
const flowNode = useMemo126(() => buildFlowNodeFromBlock(block), [block]);
|
|
33801
|
+
const runtimeManager = useMemo126(() => createRuntimeStateManager(editor), [editor]);
|
|
33802
|
+
const ucanService = useMemo126(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
33803
|
+
const invocationStore = useMemo126(() => editor?._invocationStore || void 0, [editor]);
|
|
33804
|
+
const flowId = useMemo126(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
33805
|
+
const flowOwnerDid = useMemo126(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
33806
|
+
const schemaVersion = useMemo126(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
33807
|
+
const flowUri = useMemo126(() => {
|
|
33745
33808
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
33746
33809
|
return `ixo:flow:${docId}`;
|
|
33747
33810
|
}, [editor, block.id]);
|
|
33748
|
-
const actorDid =
|
|
33811
|
+
const actorDid = useMemo126(() => {
|
|
33749
33812
|
try {
|
|
33750
33813
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
33751
33814
|
} catch {
|
|
33752
33815
|
return "";
|
|
33753
33816
|
}
|
|
33754
33817
|
}, [handlers]);
|
|
33755
|
-
const parsed =
|
|
33818
|
+
const parsed = useMemo126(() => parseOracleStoreSecretsAndConfigInputs(inputs), [inputs]);
|
|
33756
33819
|
const editorDocument = editor?.document || [];
|
|
33757
|
-
const resolveOpts =
|
|
33758
|
-
const resolvedInputs =
|
|
33820
|
+
const resolveOpts = useMemo126(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
33821
|
+
const resolvedInputs = useMemo126(() => {
|
|
33759
33822
|
const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
|
|
33760
33823
|
return {
|
|
33761
33824
|
// Secrets routing
|
|
@@ -34300,7 +34363,7 @@ var OracleConfigureOracleConfig = ({ inputs, onInputsChange }) => {
|
|
|
34300
34363
|
};
|
|
34301
34364
|
|
|
34302
34365
|
// src/mantine/blocks/action/actionTypes/oracleConfigureOracle/OracleConfigureOracleFlowDetail.tsx
|
|
34303
|
-
import React313, { useCallback as useCallback138, useEffect as useEffect124, useMemo as
|
|
34366
|
+
import React313, { useCallback as useCallback138, useEffect as useEffect124, useMemo as useMemo127, useRef as useRef28, useState as useState151 } from "react";
|
|
34304
34367
|
import { Alert as Alert72, Button as Button72, Collapse as Collapse12, Divider as Divider33, Group as Group121, Loader as Loader71, Stack as Stack230, Text as Text203 } from "@mantine/core";
|
|
34305
34368
|
import { IconAlertCircle as IconAlertCircle36, IconCheck as IconCheck38, IconChevronDown as IconChevronDown12, IconChevronUp as IconChevronUp7, IconLock as IconLock4 } from "@tabler/icons-react";
|
|
34306
34369
|
var EXPECTED_SECRETS3 = [
|
|
@@ -34313,29 +34376,29 @@ var EXPECTED_SECRETS3 = [
|
|
|
34313
34376
|
];
|
|
34314
34377
|
var OracleConfigureOracleFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
34315
34378
|
const handlers = useBlocknoteHandlers();
|
|
34316
|
-
const services =
|
|
34317
|
-
const flowNode =
|
|
34318
|
-
const runtimeManager =
|
|
34319
|
-
const ucanService =
|
|
34320
|
-
const invocationStore =
|
|
34321
|
-
const flowId =
|
|
34322
|
-
const flowOwnerDid =
|
|
34323
|
-
const schemaVersion =
|
|
34324
|
-
const flowUri =
|
|
34379
|
+
const services = useMemo127(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
34380
|
+
const flowNode = useMemo127(() => buildFlowNodeFromBlock(block), [block]);
|
|
34381
|
+
const runtimeManager = useMemo127(() => createRuntimeStateManager(editor), [editor]);
|
|
34382
|
+
const ucanService = useMemo127(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
34383
|
+
const invocationStore = useMemo127(() => editor?._invocationStore || void 0, [editor]);
|
|
34384
|
+
const flowId = useMemo127(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
34385
|
+
const flowOwnerDid = useMemo127(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
34386
|
+
const schemaVersion = useMemo127(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
34387
|
+
const flowUri = useMemo127(() => {
|
|
34325
34388
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
34326
34389
|
return `ixo:flow:${docId}`;
|
|
34327
34390
|
}, [editor, block.id]);
|
|
34328
|
-
const actorDid =
|
|
34391
|
+
const actorDid = useMemo127(() => {
|
|
34329
34392
|
try {
|
|
34330
34393
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
34331
34394
|
} catch {
|
|
34332
34395
|
return "";
|
|
34333
34396
|
}
|
|
34334
34397
|
}, [handlers]);
|
|
34335
|
-
const parsed =
|
|
34398
|
+
const parsed = useMemo127(() => parseOracleConfigureOracleInputs(inputs), [inputs]);
|
|
34336
34399
|
const editorDocument = editor?.document || [];
|
|
34337
|
-
const resolveOpts =
|
|
34338
|
-
const resolvedInputs =
|
|
34400
|
+
const resolveOpts = useMemo127(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
34401
|
+
const resolvedInputs = useMemo127(() => {
|
|
34339
34402
|
const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
|
|
34340
34403
|
const formAnswersStr = r(parsed.formAnswers);
|
|
34341
34404
|
const form = (() => {
|
|
@@ -34641,7 +34704,7 @@ var OracleDeploySetupConfig = () => {
|
|
|
34641
34704
|
};
|
|
34642
34705
|
|
|
34643
34706
|
// src/mantine/blocks/action/actionTypes/oracleDeploySetup/OracleDeploySetupFlowDetail.tsx
|
|
34644
|
-
import React315, { useCallback as useCallback139, useMemo as
|
|
34707
|
+
import React315, { useCallback as useCallback139, useMemo as useMemo128 } from "react";
|
|
34645
34708
|
import { Alert as Alert73, Button as Button73, Group as Group122, Loader as Loader72, Stack as Stack232, Text as Text205 } from "@mantine/core";
|
|
34646
34709
|
import { IconCheck as IconCheck39, IconAlertCircle as IconAlertCircle37 } from "@tabler/icons-react";
|
|
34647
34710
|
|
|
@@ -34685,29 +34748,29 @@ function parseOracleDeploySetupInputs(json) {
|
|
|
34685
34748
|
// src/mantine/blocks/action/actionTypes/oracleDeploySetup/OracleDeploySetupFlowDetail.tsx
|
|
34686
34749
|
var OracleDeploySetupFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
34687
34750
|
const handlers = useBlocknoteHandlers();
|
|
34688
|
-
const services =
|
|
34689
|
-
const flowNode =
|
|
34690
|
-
const runtimeManager =
|
|
34691
|
-
const ucanService =
|
|
34692
|
-
const invocationStore =
|
|
34693
|
-
const flowId =
|
|
34694
|
-
const flowOwnerDid =
|
|
34695
|
-
const schemaVersion =
|
|
34696
|
-
const flowUri =
|
|
34751
|
+
const services = useMemo128(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
34752
|
+
const flowNode = useMemo128(() => buildFlowNodeFromBlock(block), [block]);
|
|
34753
|
+
const runtimeManager = useMemo128(() => createRuntimeStateManager(editor), [editor]);
|
|
34754
|
+
const ucanService = useMemo128(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
34755
|
+
const invocationStore = useMemo128(() => editor?._invocationStore || void 0, [editor]);
|
|
34756
|
+
const flowId = useMemo128(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
34757
|
+
const flowOwnerDid = useMemo128(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
34758
|
+
const schemaVersion = useMemo128(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
34759
|
+
const flowUri = useMemo128(() => {
|
|
34697
34760
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
34698
34761
|
return `ixo:flow:${docId}`;
|
|
34699
34762
|
}, [editor, block.id]);
|
|
34700
|
-
const actorDid =
|
|
34763
|
+
const actorDid = useMemo128(() => {
|
|
34701
34764
|
try {
|
|
34702
34765
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
34703
34766
|
} catch {
|
|
34704
34767
|
return "";
|
|
34705
34768
|
}
|
|
34706
34769
|
}, [handlers]);
|
|
34707
|
-
const parsed =
|
|
34770
|
+
const parsed = useMemo128(() => parseOracleDeploySetupInputs(inputs), [inputs]);
|
|
34708
34771
|
const editorDocument = editor?.document || [];
|
|
34709
|
-
const resolveOpts =
|
|
34710
|
-
const resolvedInputs =
|
|
34772
|
+
const resolveOpts = useMemo128(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
34773
|
+
const resolvedInputs = useMemo128(() => {
|
|
34711
34774
|
const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
|
|
34712
34775
|
return {
|
|
34713
34776
|
name: r(parsed.name),
|
|
@@ -34853,7 +34916,7 @@ var OracleDeployStartConfig = () => {
|
|
|
34853
34916
|
};
|
|
34854
34917
|
|
|
34855
34918
|
// src/mantine/blocks/action/actionTypes/oracleDeployStart/OracleDeployStartFlowDetail.tsx
|
|
34856
|
-
import React317, { useCallback as useCallback140, useMemo as
|
|
34919
|
+
import React317, { useCallback as useCallback140, useMemo as useMemo129 } from "react";
|
|
34857
34920
|
import { Alert as Alert74, Button as Button74, Group as Group123, Loader as Loader73, Stack as Stack234, Text as Text207 } from "@mantine/core";
|
|
34858
34921
|
import { IconCheck as IconCheck40, IconAlertCircle as IconAlertCircle38 } from "@tabler/icons-react";
|
|
34859
34922
|
|
|
@@ -34870,28 +34933,28 @@ function parseOracleDeployStartInputs(json) {
|
|
|
34870
34933
|
// src/mantine/blocks/action/actionTypes/oracleDeployStart/OracleDeployStartFlowDetail.tsx
|
|
34871
34934
|
var OracleDeployStartFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
34872
34935
|
const handlers = useBlocknoteHandlers();
|
|
34873
|
-
const services =
|
|
34874
|
-
const flowNode =
|
|
34875
|
-
const runtimeManager =
|
|
34876
|
-
const ucanService =
|
|
34877
|
-
const invocationStore =
|
|
34878
|
-
const flowId =
|
|
34879
|
-
const flowOwnerDid =
|
|
34880
|
-
const schemaVersion =
|
|
34881
|
-
const flowUri =
|
|
34936
|
+
const services = useMemo129(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
34937
|
+
const flowNode = useMemo129(() => buildFlowNodeFromBlock(block), [block]);
|
|
34938
|
+
const runtimeManager = useMemo129(() => createRuntimeStateManager(editor), [editor]);
|
|
34939
|
+
const ucanService = useMemo129(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
34940
|
+
const invocationStore = useMemo129(() => editor?._invocationStore || void 0, [editor]);
|
|
34941
|
+
const flowId = useMemo129(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
34942
|
+
const flowOwnerDid = useMemo129(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
34943
|
+
const schemaVersion = useMemo129(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
34944
|
+
const flowUri = useMemo129(() => {
|
|
34882
34945
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
34883
34946
|
return `ixo:flow:${docId}`;
|
|
34884
34947
|
}, [editor, block.id]);
|
|
34885
|
-
const actorDid =
|
|
34948
|
+
const actorDid = useMemo129(() => {
|
|
34886
34949
|
try {
|
|
34887
34950
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
34888
34951
|
} catch {
|
|
34889
34952
|
return "";
|
|
34890
34953
|
}
|
|
34891
34954
|
}, [handlers]);
|
|
34892
|
-
const parsed =
|
|
34955
|
+
const parsed = useMemo129(() => parseOracleDeployStartInputs(inputs), [inputs]);
|
|
34893
34956
|
const editorDocument = editor?.document || [];
|
|
34894
|
-
const resolveOpts =
|
|
34957
|
+
const resolveOpts = useMemo129(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
34895
34958
|
const resolvedName = resolveReferences(parsed.name || "", editorDocument, resolveOpts).trim();
|
|
34896
34959
|
const resolvedEntityDid = resolveReferences(parsed.entityDid || "", editorDocument, resolveOpts).trim();
|
|
34897
34960
|
const resolvedRoomId = resolveReferences(parsed.roomId || "", editorDocument, resolveOpts).trim();
|
|
@@ -34988,7 +35051,7 @@ var OracleDeployConfig = () => {
|
|
|
34988
35051
|
};
|
|
34989
35052
|
|
|
34990
35053
|
// src/mantine/blocks/action/actionTypes/oracleDeploy/OracleDeployFlowDetail.tsx
|
|
34991
|
-
import React319, { useCallback as useCallback141, useMemo as
|
|
35054
|
+
import React319, { useCallback as useCallback141, useMemo as useMemo130 } from "react";
|
|
34992
35055
|
import { Alert as Alert75, Button as Button75, Group as Group124, Loader as Loader74, Stack as Stack236, Text as Text209 } from "@mantine/core";
|
|
34993
35056
|
import { IconCheck as IconCheck41, IconAlertCircle as IconAlertCircle39 } from "@tabler/icons-react";
|
|
34994
35057
|
|
|
@@ -35041,29 +35104,29 @@ function parseOracleDeployInputs(json) {
|
|
|
35041
35104
|
// src/mantine/blocks/action/actionTypes/oracleDeploy/OracleDeployFlowDetail.tsx
|
|
35042
35105
|
var OracleDeployFlowDetail = ({ inputs, editor, block, runtime, updateRuntime, isDisabled }) => {
|
|
35043
35106
|
const handlers = useBlocknoteHandlers();
|
|
35044
|
-
const services =
|
|
35045
|
-
const flowNode =
|
|
35046
|
-
const runtimeManager =
|
|
35047
|
-
const ucanService =
|
|
35048
|
-
const invocationStore =
|
|
35049
|
-
const flowId =
|
|
35050
|
-
const flowOwnerDid =
|
|
35051
|
-
const schemaVersion =
|
|
35052
|
-
const flowUri =
|
|
35107
|
+
const services = useMemo130(() => buildServicesFromHandlers(handlers), [handlers]);
|
|
35108
|
+
const flowNode = useMemo130(() => buildFlowNodeFromBlock(block), [block]);
|
|
35109
|
+
const runtimeManager = useMemo130(() => createRuntimeStateManager(editor), [editor]);
|
|
35110
|
+
const ucanService = useMemo130(() => editor?.getUcanService?.() || void 0, [editor]);
|
|
35111
|
+
const invocationStore = useMemo130(() => editor?._invocationStore || void 0, [editor]);
|
|
35112
|
+
const flowId = useMemo130(() => editor?.getFlowMetadata?.()?.doc_id || block.id, [editor, block.id]);
|
|
35113
|
+
const flowOwnerDid = useMemo130(() => editor?.getFlowOwnerDid?.() || "", [editor]);
|
|
35114
|
+
const schemaVersion = useMemo130(() => editor?.getFlowMetadata?.()?.schema_version || "0.3", [editor]);
|
|
35115
|
+
const flowUri = useMemo130(() => {
|
|
35053
35116
|
const docId = editor?.getFlowMetadata?.()?.doc_id || block.id;
|
|
35054
35117
|
return `ixo:flow:${docId}`;
|
|
35055
35118
|
}, [editor, block.id]);
|
|
35056
|
-
const actorDid =
|
|
35119
|
+
const actorDid = useMemo130(() => {
|
|
35057
35120
|
try {
|
|
35058
35121
|
return handlers?.getCurrentUser?.()?.address || "";
|
|
35059
35122
|
} catch {
|
|
35060
35123
|
return "";
|
|
35061
35124
|
}
|
|
35062
35125
|
}, [handlers]);
|
|
35063
|
-
const parsed =
|
|
35126
|
+
const parsed = useMemo130(() => parseOracleDeployInputs(inputs), [inputs]);
|
|
35064
35127
|
const editorDocument = editor?.document || [];
|
|
35065
|
-
const resolveOpts =
|
|
35066
|
-
const resolvedInputs =
|
|
35128
|
+
const resolveOpts = useMemo130(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
35129
|
+
const resolvedInputs = useMemo130(() => {
|
|
35067
35130
|
const r = (val) => resolveReferences(String(val ?? ""), editorDocument, resolveOpts).trim();
|
|
35068
35131
|
const formAnswersStr = r(parsed.formAnswers);
|
|
35069
35132
|
const form = (() => {
|
|
@@ -35363,7 +35426,7 @@ import { createReactBlockSpec as createReactBlockSpec21 } from "@blocknote/react
|
|
|
35363
35426
|
import React329 from "react";
|
|
35364
35427
|
|
|
35365
35428
|
// src/mantine/blocks/location/template/TemplateView.tsx
|
|
35366
|
-
import React326, { useMemo as
|
|
35429
|
+
import React326, { useMemo as useMemo131 } from "react";
|
|
35367
35430
|
import { Group as Group126, Stack as Stack238, Text as Text212 } from "@mantine/core";
|
|
35368
35431
|
import { IconMapPin } from "@tabler/icons-react";
|
|
35369
35432
|
|
|
@@ -35791,14 +35854,14 @@ function LocationMap(props) {
|
|
|
35791
35854
|
var LOCATION_TEMPLATE_PANEL_ID = "location-template-panel";
|
|
35792
35855
|
var LocationTemplateView = ({ editor, block }) => {
|
|
35793
35856
|
const panelId = `${LOCATION_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
35794
|
-
const panelContent =
|
|
35857
|
+
const panelContent = useMemo131(() => /* @__PURE__ */ React326.createElement(TemplateConfig17, { editor, block }), [editor, block]);
|
|
35795
35858
|
const { open } = usePanel(panelId, panelContent);
|
|
35796
35859
|
const hasLocation = block.props.latitude && block.props.longitude;
|
|
35797
35860
|
return /* @__PURE__ */ React326.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React326.createElement(Stack238, { gap: "xs", justify: "center" }, /* @__PURE__ */ React326.createElement(Group126, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React326.createElement(IconMapPin, { color: "currentColor", size: 26, stroke: 1.5 }), /* @__PURE__ */ React326.createElement(Stack238, { gap: 2 }, /* @__PURE__ */ React326.createElement(Text212, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React326.createElement(Text212, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation && /* @__PURE__ */ React326.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-template-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true })));
|
|
35798
35861
|
};
|
|
35799
35862
|
|
|
35800
35863
|
// src/mantine/blocks/location/flow/FlowView.tsx
|
|
35801
|
-
import React328, { useMemo as
|
|
35864
|
+
import React328, { useMemo as useMemo132 } from "react";
|
|
35802
35865
|
import { Center as Center14, Group as Group127, Stack as Stack239, Text as Text213 } from "@mantine/core";
|
|
35803
35866
|
import { IconMapPin as IconMapPin2 } from "@tabler/icons-react";
|
|
35804
35867
|
|
|
@@ -35814,7 +35877,7 @@ var FlowConfig3 = ({ block }) => {
|
|
|
35814
35877
|
var LOCATION_FLOW_PANEL_ID = "location-flow-panel";
|
|
35815
35878
|
var LocationFlowView = ({ editor, block }) => {
|
|
35816
35879
|
const panelId = `${LOCATION_FLOW_PANEL_ID}-${block.id}`;
|
|
35817
|
-
const panelContent =
|
|
35880
|
+
const panelContent = useMemo132(() => /* @__PURE__ */ React328.createElement(FlowConfig3, { editor, block }), [editor, block]);
|
|
35818
35881
|
const { open } = usePanel(panelId, panelContent);
|
|
35819
35882
|
const hasLocation = block.props.latitude && block.props.longitude;
|
|
35820
35883
|
return /* @__PURE__ */ React328.createElement(BaseContainer, { blockId: block.id, onClick: open, style: { minHeight: 90, justifyContent: "center" } }, /* @__PURE__ */ React328.createElement(Stack239, { gap: "xs", justify: "center" }, /* @__PURE__ */ React328.createElement(Group127, { wrap: "nowrap", align: "center" }, /* @__PURE__ */ React328.createElement(IconMapPin2, { color: "currentColor", size: 26, stroke: 1.5 }), /* @__PURE__ */ React328.createElement(Stack239, { gap: 2 }, /* @__PURE__ */ React328.createElement(Text213, { fw: 500, size: "sm", contentEditable: false }, block.props.title || "Location"), block.props.description && /* @__PURE__ */ React328.createElement(Text213, { size: "xs", c: "dimmed", contentEditable: false }, block.props.description))), hasLocation ? /* @__PURE__ */ React328.createElement(LocationMap, { latitude: block.props.latitude, longitude: block.props.longitude, mapId: `location-flow-map-${block.id}`, zoom: 14, showMarker: true, showTilesControl: true }) : /* @__PURE__ */ React328.createElement(Center14, { py: "md" }, /* @__PURE__ */ React328.createElement(Text213, { size: "sm", c: "dimmed" }, "Location not configured"))));
|
|
@@ -35858,7 +35921,7 @@ import { createReactBlockSpec as createReactBlockSpec22 } from "@blocknote/react
|
|
|
35858
35921
|
import React336 from "react";
|
|
35859
35922
|
|
|
35860
35923
|
// src/mantine/blocks/embed/template/TemplateView.tsx
|
|
35861
|
-
import React333, { useMemo as
|
|
35924
|
+
import React333, { useMemo as useMemo133 } from "react";
|
|
35862
35925
|
import { Box as Box64, Group as Group128, Stack as Stack241, Text as Text215 } from "@mantine/core";
|
|
35863
35926
|
|
|
35864
35927
|
// src/mantine/blocks/embed/template/TemplateConfig.tsx
|
|
@@ -35987,7 +36050,7 @@ function buildImageSrcdoc(url) {
|
|
|
35987
36050
|
var EMBED_TEMPLATE_PANEL_ID = "embed-template-panel";
|
|
35988
36051
|
var EmbedTemplateView = ({ editor, block }) => {
|
|
35989
36052
|
const panelId = `${EMBED_TEMPLATE_PANEL_ID}-${block.id}`;
|
|
35990
|
-
const panelContent =
|
|
36053
|
+
const panelContent = useMemo133(() => /* @__PURE__ */ React333.createElement(TemplateConfig18, { editor, block }), [editor, block]);
|
|
35991
36054
|
const { open } = usePanel(panelId, panelContent);
|
|
35992
36055
|
const safeUrl = sanitizeEmbedUrl(block.props.url);
|
|
35993
36056
|
const height = Number(block.props.height) || 400;
|
|
@@ -36008,7 +36071,7 @@ var EmbedTemplateView = ({ editor, block }) => {
|
|
|
36008
36071
|
};
|
|
36009
36072
|
|
|
36010
36073
|
// src/mantine/blocks/embed/flow/FlowView.tsx
|
|
36011
|
-
import React335, { useMemo as
|
|
36074
|
+
import React335, { useMemo as useMemo134 } from "react";
|
|
36012
36075
|
import { Box as Box65, Group as Group129, Stack as Stack242, Text as Text216 } from "@mantine/core";
|
|
36013
36076
|
|
|
36014
36077
|
// src/mantine/blocks/embed/flow/FlowConfig.tsx
|
|
@@ -36053,7 +36116,7 @@ var FlowConfig4 = ({ editor, block }) => {
|
|
|
36053
36116
|
var EMBED_FLOW_PANEL_ID = "embed-flow-panel";
|
|
36054
36117
|
var EmbedFlowView = ({ editor, block }) => {
|
|
36055
36118
|
const panelId = `${EMBED_FLOW_PANEL_ID}-${block.id}`;
|
|
36056
|
-
const panelContent =
|
|
36119
|
+
const panelContent = useMemo134(() => /* @__PURE__ */ React335.createElement(FlowConfig4, { editor, block }), [editor, block]);
|
|
36057
36120
|
const { open } = usePanel(panelId, panelContent);
|
|
36058
36121
|
const safeUrl = sanitizeEmbedUrl(block.props.url);
|
|
36059
36122
|
const height = Number(block.props.height) || 400;
|
|
@@ -36110,7 +36173,7 @@ import React339 from "react";
|
|
|
36110
36173
|
import { createReactBlockSpec as createReactBlockSpec23 } from "@blocknote/react";
|
|
36111
36174
|
|
|
36112
36175
|
// src/mantine/blocks/secrets/SecretsBlock.tsx
|
|
36113
|
-
import React338, { useCallback as useCallback146, useMemo as
|
|
36176
|
+
import React338, { useCallback as useCallback146, useMemo as useMemo135, useState as useState157 } from "react";
|
|
36114
36177
|
import {
|
|
36115
36178
|
Anchor as Anchor3,
|
|
36116
36179
|
ActionIcon as ActionIcon43,
|
|
@@ -36242,10 +36305,10 @@ function OutputEntry({ label, value, isSensitive }) {
|
|
|
36242
36305
|
function SecretsBlock({ editor, block }) {
|
|
36243
36306
|
const { docType } = useBlocknoteContext();
|
|
36244
36307
|
const [showOutput, setShowOutput] = useState157(false);
|
|
36245
|
-
const outputs =
|
|
36308
|
+
const outputs = useMemo135(() => collectOutputs(editor), [editor, showOutput]);
|
|
36246
36309
|
const editorDocument = editor?.document || [];
|
|
36247
|
-
const resolveOpts =
|
|
36248
|
-
const entityDid =
|
|
36310
|
+
const resolveOpts = useMemo135(() => ({ yRuntime: editor?._yRuntime }), [editor?._yRuntime]);
|
|
36311
|
+
const entityDid = useMemo135(
|
|
36249
36312
|
() => resolveReferences(block.props.entityDid || "", editorDocument, resolveOpts).trim(),
|
|
36250
36313
|
[block.props.entityDid, editorDocument, resolveOpts]
|
|
36251
36314
|
);
|
|
@@ -36330,10 +36393,10 @@ import { createReactBlockSpec as createReactBlockSpec24 } from "@blocknote/react
|
|
|
36330
36393
|
import React344 from "react";
|
|
36331
36394
|
|
|
36332
36395
|
// src/mantine/blocks/skills/template/SkillsTemplateView.tsx
|
|
36333
|
-
import React342, { useMemo as
|
|
36396
|
+
import React342, { useMemo as useMemo136 } from "react";
|
|
36334
36397
|
import { Badge as Badge50, Group as Group131, Stack as Stack244, Text as Text218 } from "@mantine/core";
|
|
36335
36398
|
var SkillsTemplateView = ({ editor: _editor, block }) => {
|
|
36336
|
-
const skillCount =
|
|
36399
|
+
const skillCount = useMemo136(() => {
|
|
36337
36400
|
try {
|
|
36338
36401
|
const parsed = JSON.parse(block.props.skills || "[]");
|
|
36339
36402
|
return Array.isArray(parsed) ? parsed.length : 0;
|
|
@@ -36341,7 +36404,7 @@ var SkillsTemplateView = ({ editor: _editor, block }) => {
|
|
|
36341
36404
|
return 0;
|
|
36342
36405
|
}
|
|
36343
36406
|
}, [block.props.skills]);
|
|
36344
|
-
const serverCount =
|
|
36407
|
+
const serverCount = useMemo136(() => {
|
|
36345
36408
|
try {
|
|
36346
36409
|
const parsed = JSON.parse(block.props.mcpServers || "[]");
|
|
36347
36410
|
return Array.isArray(parsed) ? parsed.length : 0;
|
|
@@ -36355,7 +36418,7 @@ var SkillsTemplateView = ({ editor: _editor, block }) => {
|
|
|
36355
36418
|
// src/mantine/blocks/skills/flow/SkillsFlowView.tsx
|
|
36356
36419
|
import { ActionIcon as ActionIcon44, Badge as Badge51, Button as Button77, Collapse as Collapse14, Group as Group132, Loader as Loader76, Paper as Paper21, Stack as Stack245, Text as Text219, Tooltip as Tooltip29 } from "@mantine/core";
|
|
36357
36420
|
import { IconBrain as IconBrain3, IconCheck as IconCheck43, IconPencil, IconPlus as IconPlus10, IconTrash as IconTrash10, IconX as IconX15 } from "@tabler/icons-react";
|
|
36358
|
-
import React343, { useCallback as useCallback147, useEffect as useEffect129, useMemo as
|
|
36421
|
+
import React343, { useCallback as useCallback147, useEffect as useEffect129, useMemo as useMemo137, useRef as useRef31, useState as useState158 } from "react";
|
|
36359
36422
|
function parseSkills2(raw) {
|
|
36360
36423
|
try {
|
|
36361
36424
|
const parsed = JSON.parse(raw || "[]");
|
|
@@ -36376,8 +36439,8 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
36376
36439
|
const handlers = useBlocknoteHandlers();
|
|
36377
36440
|
const [runtime, updateRuntime] = useNodeRuntime(editor, block.id);
|
|
36378
36441
|
const isCompleted = runtime.state === "completed" && runtime.evaluationStatus === "approved";
|
|
36379
|
-
const skills =
|
|
36380
|
-
const mcpServers =
|
|
36442
|
+
const skills = useMemo137(() => parseSkills2(block.props.skills), [block.props.skills]);
|
|
36443
|
+
const mcpServers = useMemo137(() => parseMcpServers(block.props.mcpServers), [block.props.mcpServers]);
|
|
36381
36444
|
const [showAddMcp, setShowAddMcp] = useState158(false);
|
|
36382
36445
|
const [mcpName, setMcpName] = useState158("");
|
|
36383
36446
|
const [mcpUrl, setMcpUrl] = useState158("");
|
|
@@ -36401,7 +36464,7 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
36401
36464
|
networkFetchedRef.current = true;
|
|
36402
36465
|
handlers.getNetwork().then(setNetwork).catch(() => setNetwork("mainnet"));
|
|
36403
36466
|
}, [handlers.getNetwork]);
|
|
36404
|
-
const mcpPresets =
|
|
36467
|
+
const mcpPresets = useMemo137(() => {
|
|
36405
36468
|
const net = network || "mainnet";
|
|
36406
36469
|
const subdomain = net === "mainnet" ? "" : `.${net}`;
|
|
36407
36470
|
return [
|
|
@@ -36436,8 +36499,8 @@ var SkillsFlowView = ({ editor, block }) => {
|
|
|
36436
36499
|
},
|
|
36437
36500
|
[editor, getCurrentBlock]
|
|
36438
36501
|
);
|
|
36439
|
-
const selectedSkillCids =
|
|
36440
|
-
const capsuleSelectData =
|
|
36502
|
+
const selectedSkillCids = useMemo137(() => skills.map((s) => s.cid), [skills]);
|
|
36503
|
+
const capsuleSelectData = useMemo137(
|
|
36441
36504
|
() => capsules.map((c) => ({
|
|
36442
36505
|
value: c.cid,
|
|
36443
36506
|
label: c.name
|
|
@@ -36932,10 +36995,10 @@ blockRegistry.register({
|
|
|
36932
36995
|
});
|
|
36933
36996
|
|
|
36934
36997
|
// src/mantine/blocks/hooks/useBlockDependencies.ts
|
|
36935
|
-
import { useMemo as
|
|
36998
|
+
import { useMemo as useMemo138, useEffect as useEffect130, useState as useState159, useCallback as useCallback148 } from "react";
|
|
36936
36999
|
|
|
36937
37000
|
// src/mantine/blocks/hooks/useDependsOn.ts
|
|
36938
|
-
import { useMemo as
|
|
37001
|
+
import { useMemo as useMemo139 } from "react";
|
|
36939
37002
|
|
|
36940
37003
|
// src/mantine/blocks/index.ts
|
|
36941
37004
|
var blockSpecs = {
|
|
@@ -37501,7 +37564,7 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
|
|
|
37501
37564
|
import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
|
|
37502
37565
|
|
|
37503
37566
|
// src/core/hooks/useMatrixProvider.ts
|
|
37504
|
-
import { useEffect as useEffect131, useState as useState160, useRef as useRef32, useCallback as useCallback149, useMemo as
|
|
37567
|
+
import { useEffect as useEffect131, useState as useState160, useRef as useRef32, useCallback as useCallback149, useMemo as useMemo140 } from "react";
|
|
37505
37568
|
import { MatrixProvider } from "@ixo/matrix-crdt";
|
|
37506
37569
|
function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
37507
37570
|
const [matrixProvider, setProvider] = useState160(null);
|
|
@@ -37509,7 +37572,7 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
|
37509
37572
|
const isMountedRef = useRef32(true);
|
|
37510
37573
|
const providerRef = useRef32(null);
|
|
37511
37574
|
const retryTimeoutRef = useRef32(null);
|
|
37512
|
-
const providerOptions =
|
|
37575
|
+
const providerOptions = useMemo140(
|
|
37513
37576
|
() => ({
|
|
37514
37577
|
translator: {
|
|
37515
37578
|
updateEventType: "matrix-crdt.doc_update",
|
|
@@ -37596,17 +37659,17 @@ function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
|
37596
37659
|
}
|
|
37597
37660
|
|
|
37598
37661
|
// src/mantine/hooks/useCollaborativeYDoc.ts
|
|
37599
|
-
import { useMemo as
|
|
37662
|
+
import { useMemo as useMemo141 } from "react";
|
|
37600
37663
|
import * as Y from "yjs";
|
|
37601
37664
|
function useCollaborativeYDoc(_options) {
|
|
37602
|
-
return
|
|
37665
|
+
return useMemo141(() => {
|
|
37603
37666
|
const doc = new Y.Doc();
|
|
37604
37667
|
return doc;
|
|
37605
37668
|
}, []);
|
|
37606
37669
|
}
|
|
37607
37670
|
|
|
37608
37671
|
// src/mantine/hooks/useCollaborativeIxoEditor.ts
|
|
37609
|
-
import { useMemo as
|
|
37672
|
+
import { useMemo as useMemo142, useEffect as useEffect133, useState as useState161, useRef as useRef34 } from "react";
|
|
37610
37673
|
|
|
37611
37674
|
// src/core/lib/matrixMetadata.ts
|
|
37612
37675
|
var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
|
|
@@ -38232,7 +38295,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
38232
38295
|
matrixClient,
|
|
38233
38296
|
permissions = { write: false }
|
|
38234
38297
|
} = options || {};
|
|
38235
|
-
const memoizedUser =
|
|
38298
|
+
const memoizedUser = useMemo142(
|
|
38236
38299
|
() => ({
|
|
38237
38300
|
id: user?.id || "",
|
|
38238
38301
|
name: user?.name || "",
|
|
@@ -38248,13 +38311,13 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
38248
38311
|
matrixClient,
|
|
38249
38312
|
roomId: options.roomId
|
|
38250
38313
|
});
|
|
38251
|
-
const metadataManager =
|
|
38314
|
+
const metadataManager = useMemo142(() => new MatrixMetadataManager(matrixClient, options.roomId), [matrixClient, options.roomId]);
|
|
38252
38315
|
useEffect133(() => {
|
|
38253
38316
|
return () => {
|
|
38254
38317
|
metadataManager.dispose();
|
|
38255
38318
|
};
|
|
38256
38319
|
}, [metadataManager]);
|
|
38257
|
-
const defaultUploadFile =
|
|
38320
|
+
const defaultUploadFile = useMemo142(
|
|
38258
38321
|
() => uploadFile || (async (file) => {
|
|
38259
38322
|
return new Promise((resolve, reject) => {
|
|
38260
38323
|
const reader = new FileReader();
|
|
@@ -38267,7 +38330,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
38267
38330
|
}),
|
|
38268
38331
|
[uploadFile]
|
|
38269
38332
|
);
|
|
38270
|
-
const schema =
|
|
38333
|
+
const schema = useMemo142(
|
|
38271
38334
|
() => BlockNoteSchema2.create({
|
|
38272
38335
|
blockSpecs: {
|
|
38273
38336
|
...defaultBlockSpecs2,
|
|
@@ -38282,14 +38345,14 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
38282
38345
|
}),
|
|
38283
38346
|
[]
|
|
38284
38347
|
);
|
|
38285
|
-
const root =
|
|
38286
|
-
const documentFragment =
|
|
38287
|
-
const flowArray =
|
|
38288
|
-
const runtimeMap =
|
|
38289
|
-
const delegationsMap =
|
|
38290
|
-
const invocationsMap =
|
|
38291
|
-
const migrationMap =
|
|
38292
|
-
const ucanDelegationStore =
|
|
38348
|
+
const root = useMemo142(() => yDoc.getMap("root"), [yDoc]);
|
|
38349
|
+
const documentFragment = useMemo142(() => yDoc.getXmlFragment("document"), [yDoc]);
|
|
38350
|
+
const flowArray = useMemo142(() => yDoc.getArray("flow"), [yDoc]);
|
|
38351
|
+
const runtimeMap = useMemo142(() => yDoc.getMap("runtime"), [yDoc]);
|
|
38352
|
+
const delegationsMap = useMemo142(() => yDoc.getMap("delegations"), [yDoc]);
|
|
38353
|
+
const invocationsMap = useMemo142(() => yDoc.getMap("invocations"), [yDoc]);
|
|
38354
|
+
const migrationMap = useMemo142(() => yDoc.getMap("migration"), [yDoc]);
|
|
38355
|
+
const ucanDelegationStore = useMemo142(() => {
|
|
38293
38356
|
const store = createUcanDelegationStore(delegationsMap);
|
|
38294
38357
|
const originalSet = store.set;
|
|
38295
38358
|
store.set = (delegation) => {
|
|
@@ -38298,7 +38361,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
38298
38361
|
};
|
|
38299
38362
|
return store;
|
|
38300
38363
|
}, [delegationsMap, matrixClient, options.roomId]);
|
|
38301
|
-
const invocationStore =
|
|
38364
|
+
const invocationStore = useMemo142(() => {
|
|
38302
38365
|
const store = createInvocationStore(invocationsMap);
|
|
38303
38366
|
const originalAdd = store.add;
|
|
38304
38367
|
store.add = (invocation) => {
|
|
@@ -38307,8 +38370,8 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
38307
38370
|
};
|
|
38308
38371
|
return store;
|
|
38309
38372
|
}, [invocationsMap, matrixClient, options.roomId]);
|
|
38310
|
-
const userFragment =
|
|
38311
|
-
const collaborationConfig =
|
|
38373
|
+
const userFragment = useMemo142(() => yDoc.getMap(memoizedUser.id), [yDoc, memoizedUser.id]);
|
|
38374
|
+
const collaborationConfig = useMemo142(
|
|
38312
38375
|
() => ({
|
|
38313
38376
|
provider: matrixProvider,
|
|
38314
38377
|
fragment: documentFragment,
|
|
@@ -38320,7 +38383,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
38320
38383
|
}),
|
|
38321
38384
|
[matrixProvider, documentFragment, memoizedUser.name, memoizedUser.color]
|
|
38322
38385
|
);
|
|
38323
|
-
const ixoConfig =
|
|
38386
|
+
const ixoConfig = useMemo142(
|
|
38324
38387
|
() => ({
|
|
38325
38388
|
theme,
|
|
38326
38389
|
editable,
|
|
@@ -38340,7 +38403,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
38340
38403
|
collaboration: collaborationConfig,
|
|
38341
38404
|
pasteHandler: ixoPasteHandler
|
|
38342
38405
|
});
|
|
38343
|
-
const titleText =
|
|
38406
|
+
const titleText = useMemo142(() => yDoc.getText("title"), [yDoc]);
|
|
38344
38407
|
let ixoEditor;
|
|
38345
38408
|
if (editor) {
|
|
38346
38409
|
ixoEditor = editor;
|
|
@@ -38636,7 +38699,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
38636
38699
|
}
|
|
38637
38700
|
|
|
38638
38701
|
// src/mantine/IxoEditor.tsx
|
|
38639
|
-
import React355, { useMemo as
|
|
38702
|
+
import React355, { useMemo as useMemo147 } from "react";
|
|
38640
38703
|
import { SuggestionMenuController, getDefaultReactSlashMenuItems } from "@blocknote/react";
|
|
38641
38704
|
import { BlockNoteView } from "@blocknote/mantine";
|
|
38642
38705
|
import { filterSuggestionItems } from "@blocknote/core";
|
|
@@ -38681,7 +38744,7 @@ function sanitizeThemeForMantine7(theme) {
|
|
|
38681
38744
|
}
|
|
38682
38745
|
|
|
38683
38746
|
// src/mantine/components/CommandPalette.tsx
|
|
38684
|
-
import React346, { useEffect as useEffect134, useRef as useRef35, useState as useState162, useMemo as
|
|
38747
|
+
import React346, { useEffect as useEffect134, useRef as useRef35, useState as useState162, useMemo as useMemo143, useCallback as useCallback151 } from "react";
|
|
38685
38748
|
import { Box as Box66, Text as Text220, Stack as Stack246 } from "@mantine/core";
|
|
38686
38749
|
var GROUP_ORDER = {
|
|
38687
38750
|
Headings: 0,
|
|
@@ -38767,7 +38830,7 @@ function PaletteItem({ item, isSelected, onClick, id }) {
|
|
|
38767
38830
|
);
|
|
38768
38831
|
}
|
|
38769
38832
|
function CommandPalette({ items, onItemClick, loadingState, selectedIndex }) {
|
|
38770
|
-
const groupedItems =
|
|
38833
|
+
const groupedItems = useMemo143(() => {
|
|
38771
38834
|
const groups = [];
|
|
38772
38835
|
let currentGroup;
|
|
38773
38836
|
for (let i = 0; i < items.length; i++) {
|
|
@@ -38923,7 +38986,7 @@ function PanelContent({ theme: _theme }) {
|
|
|
38923
38986
|
}
|
|
38924
38987
|
|
|
38925
38988
|
// src/mantine/components/CoverImage.tsx
|
|
38926
|
-
import React352, { useState as useState166, useRef as useRef36, useEffect as useEffect137, useMemo as
|
|
38989
|
+
import React352, { useState as useState166, useRef as useRef36, useEffect as useEffect137, useMemo as useMemo146 } from "react";
|
|
38927
38990
|
import { Box as Box71, Group as Group136 } from "@mantine/core";
|
|
38928
38991
|
import { IconMoodSmile, IconPhoto as IconPhoto6, IconSettings as IconSettings22, IconArrowsMove, IconTrash as IconTrash12, IconRefresh as IconRefresh6 } from "@tabler/icons-react";
|
|
38929
38992
|
|
|
@@ -39103,7 +39166,7 @@ var CoverImageButton = forwardRef(function CoverImageButton2({ isActive = false,
|
|
|
39103
39166
|
});
|
|
39104
39167
|
|
|
39105
39168
|
// src/mantine/components/Base/BaseIconPicker.tsx
|
|
39106
|
-
import React349, { useState as useState164, useMemo as
|
|
39169
|
+
import React349, { useState as useState164, useMemo as useMemo144, useEffect as useEffect135 } from "react";
|
|
39107
39170
|
import { TextInput as TextInput9, Tabs as Tabs4, Box as Box68, Stack as Stack247, UnstyledButton as UnstyledButton8, Text as Text222, Center as Center15, ScrollArea as ScrollArea10, Group as Group134, Popover as Popover6 } from "@mantine/core";
|
|
39108
39171
|
import * as TablerIcons2 from "@tabler/icons-react";
|
|
39109
39172
|
import { IconSearch as IconSearch9, IconX as IconX16, IconChevronLeft, IconChevronRight as IconChevronRight12 } from "@tabler/icons-react";
|
|
@@ -39139,11 +39202,11 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
39139
39202
|
const [searchQuery, setSearchQuery] = useState164("");
|
|
39140
39203
|
const [activeTab, setActiveTab] = useState164("icons");
|
|
39141
39204
|
const [currentPage, setCurrentPage] = useState164(1);
|
|
39142
|
-
const allIcons =
|
|
39205
|
+
const allIcons = useMemo144(() => {
|
|
39143
39206
|
const iconEntries = Object.entries(TablerIcons2).filter(([name]) => name.startsWith("Icon") && name !== "IconProps");
|
|
39144
39207
|
return iconEntries;
|
|
39145
39208
|
}, []);
|
|
39146
|
-
const filteredIcons =
|
|
39209
|
+
const filteredIcons = useMemo144(() => {
|
|
39147
39210
|
if (!searchQuery) return allIcons;
|
|
39148
39211
|
const query = searchQuery.toLowerCase();
|
|
39149
39212
|
return allIcons.filter(([name]) => name.toLowerCase().includes(query));
|
|
@@ -39151,13 +39214,13 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
39151
39214
|
useEffect135(() => {
|
|
39152
39215
|
setCurrentPage(1);
|
|
39153
39216
|
}, [searchQuery]);
|
|
39154
|
-
const paginatedIcons =
|
|
39217
|
+
const paginatedIcons = useMemo144(() => {
|
|
39155
39218
|
const startIndex = (currentPage - 1) * ICONS_PER_PAGE;
|
|
39156
39219
|
const endIndex = startIndex + ICONS_PER_PAGE;
|
|
39157
39220
|
return filteredIcons.slice(startIndex, endIndex);
|
|
39158
39221
|
}, [filteredIcons, currentPage]);
|
|
39159
39222
|
const totalPages = Math.ceil(filteredIcons.length / ICONS_PER_PAGE);
|
|
39160
|
-
const recentIcons =
|
|
39223
|
+
const recentIcons = useMemo144(() => {
|
|
39161
39224
|
const recentIconNames = localStorageService.get(iconsKey);
|
|
39162
39225
|
if (!recentIconNames || recentIconNames.length === 0) return [];
|
|
39163
39226
|
return recentIconNames.slice(0, 24).map((iconName) => allIcons.find(([name]) => name === iconName)).filter((entry) => entry !== void 0);
|
|
@@ -39278,12 +39341,12 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, onRemove
|
|
|
39278
39341
|
}
|
|
39279
39342
|
|
|
39280
39343
|
// src/mantine/components/Base/PageIcon.tsx
|
|
39281
|
-
import React350, { useMemo as
|
|
39344
|
+
import React350, { useMemo as useMemo145 } from "react";
|
|
39282
39345
|
import { Center as Center16, Box as Box69 } from "@mantine/core";
|
|
39283
39346
|
import * as TablerIcons3 from "@tabler/icons-react";
|
|
39284
39347
|
function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
39285
39348
|
const isIconName = src && !src.startsWith("http");
|
|
39286
|
-
const IconComponent =
|
|
39349
|
+
const IconComponent = useMemo145(() => {
|
|
39287
39350
|
if (!isIconName || !src) return null;
|
|
39288
39351
|
const iconComponent = TablerIcons3[src];
|
|
39289
39352
|
if (iconComponent) {
|
|
@@ -39415,7 +39478,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
39415
39478
|
const logoFileInputRef = useRef36(null);
|
|
39416
39479
|
const [opened, { open, close }] = useDisclosure7(false);
|
|
39417
39480
|
const [metadata, setMetadata] = useState166(() => editor?.getPageMetadata?.() || null);
|
|
39418
|
-
const settingsPanelContent =
|
|
39481
|
+
const settingsPanelContent = useMemo146(() => editor ? /* @__PURE__ */ React352.createElement(FlowSettingsPanel, { editor }) : null, [editor]);
|
|
39419
39482
|
const { open: openSettings } = usePanel("flow-settings-panel", settingsPanelContent);
|
|
39420
39483
|
useEffect137(() => {
|
|
39421
39484
|
if (!editor?._metadataManager) {
|
|
@@ -40223,7 +40286,7 @@ var DEFAULT_ICON_MAP = {
|
|
|
40223
40286
|
};
|
|
40224
40287
|
function SanitizedThemeBoundary({ children }) {
|
|
40225
40288
|
const parentTheme = useMantineTheme();
|
|
40226
|
-
const sanitizedTheme =
|
|
40289
|
+
const sanitizedTheme = useMemo147(() => sanitizeThemeForMantine7(parentTheme), [parentTheme]);
|
|
40227
40290
|
return /* @__PURE__ */ React355.createElement(MantineThemeContext.Provider, { value: sanitizedTheme }, children);
|
|
40228
40291
|
}
|
|
40229
40292
|
function IxoEditorContent({
|
|
@@ -40758,14 +40821,14 @@ var EntitySigningSetup = ({ opened, onClose, entityDid, entityName, onSetup }) =
|
|
|
40758
40821
|
};
|
|
40759
40822
|
|
|
40760
40823
|
// src/mantine/components/FlowPermissionsPanel.tsx
|
|
40761
|
-
import React359, { useState as useState171, useEffect as useEffect141, useMemo as
|
|
40824
|
+
import React359, { useState as useState171, useEffect as useEffect141, useMemo as useMemo148 } from "react";
|
|
40762
40825
|
import { Stack as Stack250, Text as Text225, Paper as Paper22, Group as Group138, Badge as Badge52, Button as Button80, ActionIcon as ActionIcon46, Loader as Loader77, Alert as Alert77, Divider as Divider35 } from "@mantine/core";
|
|
40763
40826
|
import { IconPlus as IconPlus12, IconTrash as IconTrash13, IconShieldCheck as IconShieldCheck16, IconUser as IconUser14, IconRobot as IconRobot4, IconBuilding as IconBuilding2 } from "@tabler/icons-react";
|
|
40764
40827
|
var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission, onRevokePermission, getUserDisplayName }) => {
|
|
40765
40828
|
const [delegations, setDelegations] = useState171([]);
|
|
40766
40829
|
const [loading, setLoading] = useState171(true);
|
|
40767
40830
|
const [revoking, setRevoking] = useState171(null);
|
|
40768
|
-
const rootDelegation =
|
|
40831
|
+
const rootDelegation = useMemo148(() => {
|
|
40769
40832
|
if (editor.getUcanService) {
|
|
40770
40833
|
return editor.getUcanService()?.getRootDelegation() || null;
|
|
40771
40834
|
}
|
|
@@ -40841,7 +40904,7 @@ var FlowPermissionsPanel = ({ editor, entityDid, entityName, onGrantPermission,
|
|
|
40841
40904
|
|
|
40842
40905
|
// src/mantine/components/GrantPermissionModal.tsx
|
|
40843
40906
|
import React360, { useState as useState172, useCallback as useCallback155 } from "react";
|
|
40844
|
-
import { Modal as Modal5, Stack as Stack251, Text as Text226, TextInput as TextInput11, Button as Button81, Group as Group139, Radio as Radio5, Checkbox as Checkbox14, Alert as Alert78, Paper as Paper23, Loader as Loader78, Badge as Badge53, ActionIcon as ActionIcon47, Divider as Divider36, NumberInput as
|
|
40907
|
+
import { Modal as Modal5, Stack as Stack251, Text as Text226, TextInput as TextInput11, Button as Button81, Group as Group139, Radio as Radio5, Checkbox as Checkbox14, Alert as Alert78, Paper as Paper23, Loader as Loader78, Badge as Badge53, ActionIcon as ActionIcon47, Divider as Divider36, NumberInput as NumberInput6 } from "@mantine/core";
|
|
40845
40908
|
import { IconSearch as IconSearch10, IconUser as IconUser15, IconRobot as IconRobot5, IconX as IconX17, IconShieldPlus as IconShieldPlus4 } from "@tabler/icons-react";
|
|
40846
40909
|
var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, searchUsers, getOracles, onGrant }) => {
|
|
40847
40910
|
const singleBlockMode = !!targetBlockId || blocks.length === 1;
|
|
@@ -40997,7 +41060,7 @@ var GrantPermissionModal = ({ opened, onClose, flowUri, blocks, targetBlockId, s
|
|
|
40997
41060
|
}
|
|
40998
41061
|
}
|
|
40999
41062
|
)))))
|
|
41000
|
-
)), /* @__PURE__ */ React360.createElement(Divider36, null), /* @__PURE__ */ React360.createElement(Stack251, { gap: "xs" }, /* @__PURE__ */ React360.createElement(Checkbox14, { label: "Set expiration", checked: expirationEnabled, onChange: (e) => setExpirationEnabled(e.currentTarget.checked) }), expirationEnabled && /* @__PURE__ */ React360.createElement(
|
|
41063
|
+
)), /* @__PURE__ */ React360.createElement(Divider36, null), /* @__PURE__ */ React360.createElement(Stack251, { gap: "xs" }, /* @__PURE__ */ React360.createElement(Checkbox14, { label: "Set expiration", checked: expirationEnabled, onChange: (e) => setExpirationEnabled(e.currentTarget.checked) }), expirationEnabled && /* @__PURE__ */ React360.createElement(NumberInput6, { label: "Expires in (days)", placeholder: "30", value: expirationDays, onChange: setExpirationDays, min: 1, max: 365 })), /* @__PURE__ */ React360.createElement(
|
|
41001
41064
|
Checkbox14,
|
|
41002
41065
|
{
|
|
41003
41066
|
label: "Recipient can grant permissions to others",
|
|
@@ -41119,4 +41182,4 @@ export {
|
|
|
41119
41182
|
getExtraSlashMenuItems,
|
|
41120
41183
|
useCreateIxoEditor
|
|
41121
41184
|
};
|
|
41122
|
-
//# sourceMappingURL=chunk-
|
|
41185
|
+
//# sourceMappingURL=chunk-37N72XWP.mjs.map
|