@ixo/editor 7.10.0 → 7.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  useCreateCollaborativeIxoEditor,
24
24
  useCreateIxoEditor,
25
25
  useTrackBlockFocus
26
- } from "./chunk-NKILNRBB.js";
26
+ } from "./chunk-Z2FOJ3BW.js";
27
27
  import "./chunk-JIUHQT5G.js";
28
28
  import "./chunk-I2R77XSN.js";
29
29
  import "./chunk-7ZLW7H37.js";
@@ -5,16 +5,13 @@ import {
5
5
  ActionFlowPanel,
6
6
  ApiRequestBlockSpec,
7
7
  ApiRequestFlowView,
8
- AssignmentTab,
9
8
  AuthorizationTab,
10
9
  BaseIconPicker,
11
- BaseRightPanelLayout,
12
10
  BlockCard,
13
11
  BlockSettingsFrame,
14
12
  CheckboxBlockSpec,
15
13
  CheckboxFlowView,
16
14
  ClaimFlowView,
17
- CommitmentTab,
18
15
  CoverImage,
19
16
  DevUcanGrantButton,
20
17
  DomainCreatorSurveyPanel,
@@ -29,7 +26,6 @@ import {
29
26
  FlowPermissionsPanel,
30
27
  FlowStepRefSpec,
31
28
  FormPanel,
32
- GeneralTab,
33
29
  GovernanceGroupPanel,
34
30
  GrantPermissionModal,
35
31
  GraphQLClient,
@@ -51,6 +47,7 @@ import {
51
47
  TemplateConfig,
52
48
  TemplateConfig10,
53
49
  TemplateConfig11,
50
+ TemplateConfig12,
54
51
  TemplateConfig2,
55
52
  TemplateConfig3,
56
53
  TemplateConfig4,
@@ -59,10 +56,7 @@ import {
59
56
  TemplateConfig7,
60
57
  TemplateConfig8,
61
58
  TemplateConfig9,
62
- TtlTab,
63
59
  blockSpecs,
64
- getActionMeta,
65
- getActionTitle,
66
60
  getEntity,
67
61
  getExtraSlashMenuItems,
68
62
  getInsertEntries,
@@ -77,12 +71,11 @@ import {
77
71
  useCreateIxoEditor,
78
72
  useListBlocksUI,
79
73
  useListBlocksUIStore,
80
- useLiveBlock,
81
74
  useNodeRuntime,
82
75
  usePanel,
83
76
  usePanelStore,
84
77
  useTrackBlockFocus
85
- } from "../chunk-NKILNRBB.js";
78
+ } from "../chunk-Z2FOJ3BW.js";
86
79
  import "../chunk-JIUHQT5G.js";
87
80
  import "../chunk-I2R77XSN.js";
88
81
  import "../chunk-7ZLW7H37.js";
@@ -106,9 +99,7 @@ import {
106
99
  } from "../chunk-YN4CEKCF.js";
107
100
  import "../chunk-76YX5R4L.js";
108
101
  import "../chunk-U2UJYI75.js";
109
- import {
110
- BasePrimaryButton
111
- } from "../chunk-K74XQ4Q5.js";
102
+ import "../chunk-K74XQ4Q5.js";
112
103
  import "../chunk-YCTHHBSS.js";
113
104
  import "../chunk-GH7O4QGO.js";
114
105
  import "../chunk-XPBKU3JX.js";
@@ -161,8 +152,7 @@ import {
161
152
  registerHookedActionType,
162
153
  useBlocknoteContext,
163
154
  useBlocknoteHandlers,
164
- useHookedActions,
165
- useTranslate
155
+ useHookedActions
166
156
  } from "../chunk-6QAM7VK4.js";
167
157
  import "../chunk-JUEFMNUL.js";
168
158
  import {
@@ -173,7 +163,6 @@ import {
173
163
  findOrCreateDMRoom,
174
164
  getDMNotificationState,
175
165
  getHomeserver,
176
- resolveActionType,
177
166
  sendDirectMessage,
178
167
  setDMNotificationRecord,
179
168
  shouldNotify
@@ -421,143 +410,40 @@ function FlowNodePanelContent({ editor, block, isDisabled }) {
421
410
  }
422
411
 
423
412
  // src/mantine/flow/FlowNodeConfigPanel.tsx
424
- import React4 from "react";
425
-
426
- // src/mantine/blocks/action/template/TemplateConfig.tsx
427
- import React3, { useCallback, useContext, useMemo } from "react";
428
- import { Stack, Text } from "@mantine/core";
429
- import { IconCheck, IconClock, IconContract, IconSettings, IconShieldCheck, IconUserCheck } from "@tabler/icons-react";
430
- var TemplateConfig12 = ({ editor, block: blockProp }) => {
431
- const t = useTranslate();
432
- const { closePanel } = usePanelStore();
433
- const { liveBlock: block, readLiveBlock } = useLiveBlock(editor, blockProp);
434
- const embedded = useContext(FlowPanelEmbeddedContext);
435
- const isValid = useMemo(() => {
436
- const actionType = resolveActionType(block.props.actionType || "");
437
- const effectiveTitle = getActionTitle(actionType, block.props.title);
438
- if (!effectiveTitle || !actionType) return false;
439
- try {
440
- const inputs = JSON.parse(block.props.inputs || "{}");
441
- switch (actionType) {
442
- case "qi/email.send":
443
- if (!inputs.to?.trim()) return false;
444
- break;
445
- case "qi/http.request":
446
- if (!inputs.endpoint?.trim()) return false;
447
- break;
448
- case "qi/bid.submit":
449
- case "qi/claim.submit":
450
- case "qi/bid.evaluate":
451
- case "qi/claim.evaluate":
452
- if (!inputs.deedDid?.trim() || !inputs.collectionId?.trim()) return false;
453
- break;
454
- case "qi/form.submit":
455
- if (!inputs.surveySchema?.trim()) return false;
456
- break;
457
- }
458
- } catch {
459
- return false;
460
- }
461
- return true;
462
- }, [block.props]);
463
- const updateProp = useCallback(
464
- (key, value) => {
465
- const current = readLiveBlock();
466
- editor.updateBlock(current, { props: { [key]: value } });
467
- },
468
- [editor, readLiveBlock]
469
- );
470
- const tabs = [
471
- {
472
- label: t("actionBlock.tabs.general", { defaultValue: "General" }),
473
- value: "general",
474
- icon: icon(IconSettings),
475
- content: /* @__PURE__ */ React3.createElement(Stack, { gap: 20 }, /* @__PURE__ */ React3.createElement(
476
- GeneralTab,
477
- {
478
- title: block.props.title || "",
479
- description: block.props.description || "",
480
- actionType: block.props.actionType || "",
481
- inputs: block.props.inputs || "{}",
482
- requiresConfirmation: block.props.requiresConfirmation || "",
483
- trigger: block.props.trigger || "",
484
- onTitleChange: (value) => updateProp("title", value),
485
- onDescriptionChange: (value) => updateProp("description", value),
486
- onActionTypeChange: (value) => {
487
- editor.updateBlock(readLiveBlock(), {
488
- props: { actionType: value, inputs: "{}" }
489
- });
490
- },
491
- onInputsChange: (value) => updateProp("inputs", value),
492
- onRequiresConfirmationChange: (value) => updateProp("requiresConfirmation", value),
493
- onTriggerChange: (value) => updateProp("trigger", value),
494
- editor,
495
- blockId: block.id
496
- }
497
- ), embedded ? /* @__PURE__ */ React3.createElement(Text, { size: "xs", c: "dimmed", mt: 4 }, t("actionBlock.autoSaved", { defaultValue: "Changes save automatically." })) : /* @__PURE__ */ React3.createElement(BasePrimaryButton, { leftSection: /* @__PURE__ */ React3.createElement(IconCheck, { size: 20 }), onClick: closePanel, disabled: !isValid, mt: 4, style: { alignSelf: "flex-start" } }, t("actionBlock.save", { defaultValue: "Save" })))
498
- },
499
- {
500
- label: t("actionBlock.tabs.authorization", { defaultValue: "Authorization" }),
501
- value: "authorization",
502
- icon: icon(IconShieldCheck),
503
- content: /* @__PURE__ */ React3.createElement(AuthorizationTab, { editor, block })
504
- },
505
- {
506
- label: t("actionBlock.tabs.assignment", { defaultValue: "Assignment" }),
507
- value: "assignment",
508
- icon: icon(IconUserCheck),
509
- content: /* @__PURE__ */ React3.createElement(AssignmentTab, { editor, block })
510
- },
511
- {
512
- label: t("actionBlock.tabs.commitment", { defaultValue: "Commitment" }),
513
- value: "commitment",
514
- icon: icon(IconContract),
515
- content: /* @__PURE__ */ React3.createElement(CommitmentTab, { editor, block })
516
- },
517
- {
518
- label: t("actionBlock.tabs.ttl", { defaultValue: "TTL" }),
519
- value: "ttl",
520
- icon: icon(IconClock),
521
- content: /* @__PURE__ */ React3.createElement(TtlTab, { editor, block })
522
- }
523
- ];
524
- return /* @__PURE__ */ React3.createElement(BaseRightPanelLayout, { stepTabs: true, title: block.props.title || getActionMeta(block.props.actionType || "").label, onClose: closePanel, tabs, context: { editor, block } });
525
- };
526
-
527
- // src/mantine/flow/FlowNodeConfigPanel.tsx
413
+ import React3 from "react";
528
414
  function FlowNodeConfigPanel(props) {
529
- return /* @__PURE__ */ React4.createElement(FlowPanelEmbeddedContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(FlowNodeConfigPanelContent, { ...props }));
415
+ return /* @__PURE__ */ React3.createElement(FlowPanelEmbeddedContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(FlowNodeConfigPanelContent, { ...props }));
530
416
  }
531
417
  function FlowNodeConfigPanelContent({ editor, block }) {
532
418
  switch (block?.type) {
533
419
  case "action":
534
- return /* @__PURE__ */ React4.createElement(TemplateConfig12, { editor, block });
420
+ return /* @__PURE__ */ React3.createElement(TemplateConfig12, { editor, block });
535
421
  case "claim":
536
- return /* @__PURE__ */ React4.createElement(TemplateConfig6, { editor, block });
422
+ return /* @__PURE__ */ React3.createElement(TemplateConfig6, { editor, block });
537
423
  case "form":
538
- return /* @__PURE__ */ React4.createElement(TemplateConfig9, { editor, block });
424
+ return /* @__PURE__ */ React3.createElement(TemplateConfig9, { editor, block });
539
425
  case "checkbox":
540
- return /* @__PURE__ */ React4.createElement(TemplateConfig, { editor, block });
426
+ return /* @__PURE__ */ React3.createElement(TemplateConfig, { editor, block });
541
427
  case "evaluator":
542
- return /* @__PURE__ */ React4.createElement(TemplateConfig2, { editor, block });
428
+ return /* @__PURE__ */ React3.createElement(TemplateConfig2, { editor, block });
543
429
  case "notify":
544
- return /* @__PURE__ */ React4.createElement(TemplateConfig5, { editor, block });
430
+ return /* @__PURE__ */ React3.createElement(TemplateConfig5, { editor, block });
545
431
  case "email":
546
- return /* @__PURE__ */ React4.createElement(TemplateConfig8, { editor, block });
432
+ return /* @__PURE__ */ React3.createElement(TemplateConfig8, { editor, block });
547
433
  case "apiRequest":
548
- return /* @__PURE__ */ React4.createElement(TemplateConfig4, { editor, block });
434
+ return /* @__PURE__ */ React3.createElement(TemplateConfig4, { editor, block });
549
435
  case "proposal":
550
- return /* @__PURE__ */ React4.createElement(TemplateConfig3, { editor, block });
436
+ return /* @__PURE__ */ React3.createElement(TemplateConfig3, { editor, block });
551
437
  case "domainCreator":
552
- return /* @__PURE__ */ React4.createElement(TemplateConfig7, { editor, block });
438
+ return /* @__PURE__ */ React3.createElement(TemplateConfig7, { editor, block });
553
439
  case "domainCreatorSign":
554
- return /* @__PURE__ */ React4.createElement(TemplateConfig10, { editor, block });
440
+ return /* @__PURE__ */ React3.createElement(TemplateConfig10, { editor, block });
555
441
  case "governanceGroup":
556
- return /* @__PURE__ */ React4.createElement(TemplateConfig11, { editor, block });
442
+ return /* @__PURE__ */ React3.createElement(TemplateConfig11, { editor, block });
557
443
  case "secrets":
558
- return /* @__PURE__ */ React4.createElement(SecretsTemplateView, { editor, block });
444
+ return /* @__PURE__ */ React3.createElement(SecretsTemplateView, { editor, block });
559
445
  case "skills":
560
- return /* @__PURE__ */ React4.createElement(SkillsTemplateView, { editor, block });
446
+ return /* @__PURE__ */ React3.createElement(SkillsTemplateView, { editor, block });
561
447
  default:
562
448
  return null;
563
449
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/mantine/components/DebugButton.tsx","../../src/mantine/flow/FlowNodePanel.tsx","../../src/mantine/flow/FlowNodeConfigPanel.tsx","../../src/mantine/blocks/action/template/TemplateConfig.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { IconBraces, IconShieldPlus, IconTools } from '@tabler/icons-react';\nimport type { IxoEditorType } from '../../core/types';\nimport type { BlocknoteHandlers } from '../context/BlocknoteContext';\nimport { DevUcanGrantButton } from './DevUcanGrantButton';\nimport { icon } from './ReusablePanel';\nimport { DM_NOTIFICATIONS_MAP_KEY } from '../../core/lib/flowEngine/dmNotificationState';\nimport { RUNS_MAP_KEY, RUNS_TERMINAL_MAP_KEY } from '../../core/lib/flowEngine/runs';\n\nconst ACCENT = '#00ff88';\nconst SURFACE = '#1a1a2e';\n\n/**\n * Dev-tools launcher: a single round button pinned to the bottom-right (the Next.js\n * dev indicator owns the bottom-left) that expands into the individual tools, so the\n * dev overlay costs one small dot instead of a row of bars across the flow canvas.\n */\nexport function DebugButton({ editor, handlers }: { editor: IxoEditorType; handlers?: BlocknoteHandlers }) {\n const [menuOpen, setMenuOpen] = useState(false);\n const [ucanOpen, setUcanOpen] = useState(false);\n const [hovered, setHovered] = useState<string | null>(null);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (!menuOpen) return;\n\n const onPointerDown = (event: MouseEvent) => {\n if (!containerRef.current?.contains(event.target as Node)) setMenuOpen(false);\n };\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') setMenuOpen(false);\n };\n\n document.addEventListener('mousedown', onPointerDown);\n document.addEventListener('keydown', onKeyDown);\n return () => {\n document.removeEventListener('mousedown', onPointerDown);\n document.removeEventListener('keydown', onKeyDown);\n };\n }, [menuOpen]);\n\n const yMapToObject = (map: any) => {\n if (!map) return null;\n const obj: Record<string, any> = {};\n map.forEach((value: any, key: string) => {\n // Recursively unwrap nested Y.Maps so their contents are visible in JSON\n if (value && typeof value.forEach === 'function' && typeof value.get === 'function' && !Array.isArray(value)) {\n obj[key] = yMapToObject(value);\n } else if (value && typeof value.toArray === 'function') {\n obj[key] = value.toArray();\n } else {\n obj[key] = value;\n }\n });\n return Object.keys(obj).length === 0 ? '(empty)' : obj;\n };\n\n const parseJsonProp = (raw: unknown) => {\n if (typeof raw !== 'string' || !raw) return raw;\n try {\n return JSON.parse(raw);\n } catch {\n return raw;\n }\n };\n\n const handleClick = () => {\n (window as any).__editor = editor;\n const yDoc = (editor as any)._yDoc || (editor as any)._yRuntime?.doc;\n const readShared = (key: string) => yDoc?.share?.get?.(key);\n console.log('Editor exposed as window.__editor. _yDoc?', !!yDoc);\n const dump: Record<string, any> = {};\n\n // 1. BlockNote blocks — with parsed trigger / inputs / assignment so we can\n // see exactly what the listener is subscribing to.\n dump.blocks = editor.document.map((block: any) => ({\n id: block.id,\n type: block.type,\n actionType: block?.props?.actionType,\n triggerRaw: block?.props?.trigger,\n trigger: parseJsonProp(block?.props?.trigger),\n inputs: parseJsonProp(block?.props?.inputs),\n assignment: parseJsonProp(block?.props?.assignment),\n triggerMode: block?.props?.triggerMode,\n props: block.props,\n content: block.content,\n children: block.children,\n }));\n\n // 2. Runtime state\n // a) runs: the run-scoped action state (`runId → { meta, actions }`).\n // `yMapToObject` unwraps the nested containers.\n // b) runsTerminal: write-once closed/cancelled latch per run (Phase B).\n // c) runtime: the legacy flat map. Storage v1 mirrors run-scoped writes;\n // storage v2 deliberately leaves this map behind.\n dump.runs = yMapToObject(editor._yRuns ?? readShared(RUNS_MAP_KEY));\n dump.runsTerminal = yMapToObject(editor._yRunsTerminal ?? readShared(RUNS_TERMINAL_MAP_KEY));\n dump.runtime = yMapToObject(editor._yRuntime);\n dump.xeroConnection = yMapToObject((editor as any)._yXeroConnection);\n dump.xeroWorkItems = yMapToObject((editor as any)._yXeroWorkItems);\n\n // 3. Delegations\n dump.delegations = yMapToObject(editor._yDelegations);\n\n // 4. Invocations\n dump.invocations = yMapToObject(editor._yInvocations);\n\n // 5. Flow metadata\n dump.flowMetadata = editor.getFlowMetadata?.() || null;\n\n // 6. Flow array\n dump.flowArray = editor.getFlow?.() || null;\n\n // 7. Entities Y.Map (Personal Agent results)\n dump.entities = yMapToObject(readShared('entities'));\n\n // 8. Trigger/event state — the full chain for debugging block.event.all\n // a) auditTrail: where run records (source emissions) are written\n // b) pendingInvocations: what the Invoke button reads from\n // c) barrierState: partial barrier completion for block.event.all listeners\n // d) dmNotificationState: DM notification dedup (block + pending invocation)\n dump.auditTrail = yMapToObject(readShared('auditTrail'));\n dump.pendingInvocations = yMapToObject(readShared('pendingInvocations'));\n dump.barrierState = yMapToObject(readShared('barrierState'));\n dump.dmNotificationState = yMapToObject(readShared(DM_NOTIFICATIONS_MAP_KEY));\n\n const json = JSON.stringify(dump, null, 2);\n console.log('Editor Debug Dump:\\n' + json);\n };\n\n const tools = [\n {\n id: 'ucans',\n label: 'Grant UCANs',\n title: 'Dev: grant Flow Agent and block action UCANs to room members',\n leftSection: icon(IconShieldPlus, 14, ACCENT),\n onClick: () => setUcanOpen(true),\n },\n {\n id: 'ydoc',\n label: 'Debug Y.Doc',\n title: 'Debug: Log all blocks + runtime state to console',\n leftSection: icon(IconBraces, 14, ACCENT),\n onClick: handleClick,\n },\n ];\n\n return (\n <>\n <DevUcanGrantButton editor={editor} handlers={handlers} opened={ucanOpen} onOpenedChange={setUcanOpen} />\n\n <div\n ref={containerRef}\n style={{\n position: 'fixed',\n bottom: 16,\n right: 16,\n zIndex: 9999,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-end',\n gap: 8,\n fontFamily: 'monospace',\n }}\n >\n {menuOpen && (\n <div\n role=\"menu\"\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: 2,\n padding: 4,\n minWidth: 168,\n background: SURFACE,\n border: `1px solid ${ACCENT}`,\n borderRadius: 8,\n boxShadow: '0 8px 24px rgba(0, 0, 0, 0.45)',\n }}\n >\n {tools.map((tool) => (\n <button\n key={tool.id}\n role=\"menuitem\"\n title={tool.title}\n onClick={() => {\n tool.onClick();\n setMenuOpen(false);\n }}\n onMouseEnter={() => setHovered(tool.id)}\n onMouseLeave={() => setHovered((current) => (current === tool.id ? null : current))}\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n width: '100%',\n padding: '7px 10px',\n background: hovered === tool.id ? 'rgba(0, 255, 136, 0.12)' : 'transparent',\n color: ACCENT,\n border: 'none',\n borderRadius: 5,\n fontSize: 12,\n fontFamily: 'inherit',\n textAlign: 'left',\n cursor: 'pointer',\n }}\n >\n {tool.leftSection}\n {tool.label}\n </button>\n ))}\n </div>\n )}\n\n <button\n onClick={() => setMenuOpen((current) => !current)}\n onMouseEnter={() => setHovered('launcher')}\n onMouseLeave={() => setHovered((current) => (current === 'launcher' ? null : current))}\n aria-label=\"Dev tools\"\n aria-haspopup=\"menu\"\n aria-expanded={menuOpen}\n title=\"Dev tools\"\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 36,\n height: 36,\n padding: 0,\n background: SURFACE,\n color: ACCENT,\n border: `1px solid ${ACCENT}`,\n borderRadius: '50%',\n cursor: 'pointer',\n opacity: menuOpen || hovered === 'launcher' ? 1 : 0.55,\n transition: 'opacity 120ms ease',\n }}\n >\n {icon(IconTools, 18, ACCENT)}\n </button>\n </div>\n </>\n );\n}\n","import React from 'react';\nimport type { IxoBlockProps } from '@/core/types';\nimport { FlowPanelEmbeddedContext } from './embeddedPanelContext';\nimport { RunSessionProvider } from './runSessionContext';\nimport type { RunEventAppender } from '@/core/lib/flowEngine/runLifecycle';\nimport type { DesignPodRuntimeAuthorityV1 } from '@/core/lib/designPod/contracts';\n\n// Panel-based blocks — these export a dedicated \"detail\" panel component that is\n// normally registered via usePanel. We render that panel content directly.\nimport { ActionFlowPanel } from '@/mantine/blocks/action/flow/FlowView';\nimport { FormPanel } from '@/mantine/blocks/form/flow/FormPanel';\nimport { FlowConfig as ProposalFlowConfig } from '@/mantine/blocks/proposal/flow/FlowConfig';\nimport { DomainCreatorSurveyPanel } from '@/mantine/blocks/domainCreator/flow/DomainCreatorSurveyPanel';\nimport { SignPanel } from '@/mantine/blocks/domainCreatorSign/flow/SignPanel';\nimport { GovernanceGroupPanel } from '@/mantine/blocks/governanceGroup/flow/GovernanceGroupPanel';\n\n// Inline-detail blocks — the FlowView itself IS the \"do-the-step\" detail UI\n// (no separate panel; they don't use usePanel for their primary content).\nimport { ClaimFlowView } from '@/mantine/blocks/claim/flow/FlowView';\nimport { EvaluatorFlowView } from '@/mantine/blocks/evaluator/flow/FlowView';\nimport { NotifyFlowView } from '@/mantine/blocks/notify/flow/FlowView';\nimport { CheckboxFlowView } from '@/mantine/blocks/checkbox/flow/FlowView';\nimport { SecretsFlowView } from '@/mantine/blocks/secrets/flow/SecretsFlowView';\nimport { SkillsFlowView } from '@/mantine/blocks/skills/flow/SkillsFlowView';\n\n// email / apiRequest keep their detail UI inside a private (non-exported)\n// PanelContent function, so we dispatch to the full FlowView card instead.\nimport { EmailFlowView } from '@/mantine/blocks/email/flow/FlowView';\nimport { ApiRequestFlowView } from '@/mantine/blocks/apiRequest/flow/FlowView';\n\nexport interface FlowNodePanelProps {\n editor: IxoBlockProps['editor'];\n block: IxoBlockProps['block'];\n isDisabled?: {\n isDisabled: 'disable';\n message?: string;\n };\n /** Explicit session whose runtime state this panel reads and writes. */\n sessionRunId?: string;\n runEventLog?: RunEventAppender;\n designPodAuthority?: DesignPodRuntimeAuthorityV1;\n}\n\n/**\n * Single dispatcher that, given a flow editor and a step block, renders that\n * block's \"do-the-step\" / detail UI. Lets a host app render the panel for any\n * selected step in its own right column without relying on the per-block\n * usePanel/registeredPanels indirection.\n *\n * NOTE: every rendered detail component reads from BlocknoteContext\n * (useBlocknoteHandlers / useBlocknoteContext throw if the provider is\n * missing). Keep <FlowNodePanel> wrapped in the app's BlocknoteProvider /\n * EditorBlocknoteProvider.\n */\nexport function FlowNodePanel(props: FlowNodePanelProps) {\n // Embedded: the host app supplies the panel header, so BaseRightPanelLayout\n // suppresses its own (no duplicate title / close).\n return (\n <RunSessionProvider sessionRunId={props.sessionRunId} runEventLog={props.runEventLog || props.editor?._runEventLog} designPodAuthority={props.designPodAuthority}>\n <FlowPanelEmbeddedContext.Provider value={true}>\n <FlowNodePanelContent {...props} />\n </FlowPanelEmbeddedContext.Provider>\n </RunSessionProvider>\n );\n}\n\nfunction FlowNodePanelContent({ editor, block, isDisabled }: FlowNodePanelProps) {\n switch (block?.type) {\n case 'action':\n return <ActionFlowPanel editor={editor} block={block} isDisabled={isDisabled} />;\n\n case 'form':\n return <FormPanel editor={editor} block={block} />;\n\n case 'proposal':\n return <ProposalFlowConfig editor={editor} block={block} />;\n\n case 'domainCreator':\n return <DomainCreatorSurveyPanel editor={editor} block={block} />;\n\n case 'domainCreatorSign':\n return <SignPanel editor={editor} block={block} />;\n\n case 'governanceGroup':\n return <GovernanceGroupPanel editor={editor} block={block} />;\n\n case 'claim':\n return <ClaimFlowView editor={editor} block={block} />;\n\n case 'evaluator':\n return <EvaluatorFlowView editor={editor} block={block} />;\n\n case 'notify':\n return <NotifyFlowView editor={editor} block={block} isDisabled={isDisabled} />;\n\n case 'checkbox':\n return <CheckboxFlowView editor={editor} block={block} isDisabled={isDisabled} />;\n\n case 'secrets':\n return <SecretsFlowView editor={editor} block={block} />;\n\n case 'skills':\n return <SkillsFlowView editor={editor} block={block} />;\n\n // email / apiRequest: detail UI is a private PanelContent fn; render the\n // full FlowView card (its own onClick opens the registered panel).\n case 'email':\n return <EmailFlowView editor={editor} block={block} isDisabled={isDisabled} />;\n\n case 'apiRequest':\n return <ApiRequestFlowView editor={editor} block={block} isDisabled={isDisabled} />;\n\n // enumChecklist has no flow-mode panel (renders EnumChecklistBlock in all\n // modes). Fallback to null / \"open in document\".\n case 'enumChecklist':\n default:\n return null;\n }\n}\n\nexport default FlowNodePanel;\n","import React from 'react';\nimport type { IxoBlockProps } from '@/core/types';\nimport { FlowPanelEmbeddedContext } from './embeddedPanelContext';\n\n// Per-block TEMPLATE config panels — the authoring counterpart to FlowNodePanel.\n// Each exposes the block's rich configuration (General + the shared\n// Authorization / Assignment / Commitment / TTL / Evaluation tabs) on the same\n// BaseRightPanelLayout the runtime panels use.\nimport { TemplateConfig as ActionConfig } from '@/mantine/blocks/action/template/TemplateConfig';\nimport { TemplateConfig as ClaimConfig } from '@/mantine/blocks/claim/template/TemplateConfig';\nimport { TemplateConfig as FormConfig } from '@/mantine/blocks/form/template/TemplateConfig';\nimport { TemplateConfig as CheckboxConfig } from '@/mantine/blocks/checkbox/template/TemplateConfig';\nimport { TemplateConfig as EvaluatorConfig } from '@/mantine/blocks/evaluator/template/TemplateConfig';\nimport { TemplateConfig as NotifyConfig } from '@/mantine/blocks/notify/template/TemplateConfig';\nimport { TemplateConfig as EmailConfig } from '@/mantine/blocks/email/template/TemplateConfig';\nimport { TemplateConfig as ApiRequestConfig } from '@/mantine/blocks/apiRequest/template/TemplateConfig';\nimport { TemplateConfig as ProposalConfig } from '@/mantine/blocks/proposal/template/TemplateConfig';\nimport { TemplateConfig as DomainCreatorConfig } from '@/mantine/blocks/domainCreator/template/TemplateConfig';\nimport { TemplateConfig as DomainCreatorSignConfig } from '@/mantine/blocks/domainCreatorSign/template/TemplateConfig';\nimport { TemplateConfig as GovernanceGroupConfig } from '@/mantine/blocks/governanceGroup/template/TemplateConfig';\n\n// secrets / skills have a template VIEW rather than a tabbed config.\nimport { SecretsTemplateView } from '@/mantine/blocks/secrets/template/SecretsTemplateView';\nimport { SkillsTemplateView } from '@/mantine/blocks/skills/template/SkillsTemplateView';\n\nexport interface FlowNodeConfigPanelProps {\n editor: IxoBlockProps['editor'];\n block: IxoBlockProps['block'];\n}\n\n/**\n * Single dispatcher that, given a flow editor and a step block, renders that\n * block's TEMPLATE configuration panel — the authoring counterpart to\n * `FlowNodePanel` (which renders the runtime \"do-the-step\" UI). Lets a host app\n * render the rich config (General + Authorization/Assignment/Commitment/TTL/…)\n * for any selected step in its own right column.\n *\n * Since `addFlowNode` and the registry route every capability through the\n * generic `action` block, `action → ActionConfig` is the primary case; the\n * dedicated block types are covered for documents that use them directly.\n *\n * Wrapped in `FlowPanelEmbeddedContext` so each config's `BaseRightPanelLayout`\n * suppresses its own header/close (the host supplies those).\n */\nexport function FlowNodeConfigPanel(props: FlowNodeConfigPanelProps) {\n return (\n <FlowPanelEmbeddedContext.Provider value={true}>\n <FlowNodeConfigPanelContent {...props} />\n </FlowPanelEmbeddedContext.Provider>\n );\n}\n\nfunction FlowNodeConfigPanelContent({ editor, block }: FlowNodeConfigPanelProps) {\n switch (block?.type) {\n case 'action':\n return <ActionConfig editor={editor} block={block} />;\n case 'claim':\n return <ClaimConfig editor={editor} block={block} />;\n case 'form':\n return <FormConfig editor={editor} block={block} />;\n case 'checkbox':\n return <CheckboxConfig editor={editor} block={block} />;\n case 'evaluator':\n return <EvaluatorConfig editor={editor} block={block} />;\n case 'notify':\n return <NotifyConfig editor={editor} block={block} />;\n case 'email':\n return <EmailConfig editor={editor} block={block} />;\n case 'apiRequest':\n return <ApiRequestConfig editor={editor} block={block} />;\n case 'proposal':\n return <ProposalConfig editor={editor} block={block} />;\n case 'domainCreator':\n return <DomainCreatorConfig editor={editor} block={block} />;\n case 'domainCreatorSign':\n return <DomainCreatorSignConfig editor={editor} block={block} />;\n case 'governanceGroup':\n return <GovernanceGroupConfig editor={editor} block={block} />;\n case 'secrets':\n return <SecretsTemplateView editor={editor} block={block} />;\n case 'skills':\n return <SkillsTemplateView editor={editor} block={block} />;\n default:\n return null;\n }\n}\n\nexport default FlowNodeConfigPanel;\n","import React, { useCallback, useContext, useMemo } from 'react';\nimport { Stack, Text } from '@mantine/core';\nimport { IconCheck, IconClock, IconContract, IconSettings, IconShieldCheck, IconUserCheck } from '@tabler/icons-react';\nimport BasePrimaryButton from '@/mantine/components/Base/BasePrimaryButton';\nimport { resolveActionType } from '@/core/lib/actionRegistry';\nimport { IxoBlockProps } from '@/core/types';\nimport { usePanelStore } from '@/mantine/hooks/usePanel';\nimport BaseRightPanelLayout from '@/mantine/components/Layouts/BaseRightPanelLayout';\nimport { icon } from '@/mantine/components/ReusablePanel';\nimport { GeneralTab, getActionMeta, getActionTitle } from './GeneralTab';\nimport { AssignmentTab } from '@/mantine/components/AssignmentTab';\nimport { CommitmentTab } from '@/mantine/components/CommitmentTab';\nimport { AuthorizationTab } from '@/mantine/components/AuthorizationTab';\nimport { TtlTab } from '@/mantine/components/TtlTab';\nimport { useTranslate } from '@/mantine/context/BlocknoteContext';\nimport { useLiveBlock } from '@/mantine/hooks/useLiveBlock';\nimport { FlowPanelEmbeddedContext } from '../../../flow/embeddedPanelContext';\n\nexport const TemplateConfig = ({ editor, block: blockProp }: IxoBlockProps) => {\n const t = useTranslate();\n const { closePanel } = usePanelStore();\n // Never trust the caller's block object — hosts capture it once and never\n // refresh it, so writing `{ ...block.props }` from it reverts every prop the\n // snapshot predates. Read the block from the live document instead.\n const { liveBlock: block, readLiveBlock } = useLiveBlock(editor, blockProp);\n // When the panel is embedded by the host (the Actions right panel), the host\n // supplies the back arrow and edits auto-save via collaborative sync — so the\n // Save button is redundant/confusing (it doesn't persist and doesn't close the\n // host's panel). Show a subtle auto-save hint instead.\n const embedded = useContext(FlowPanelEmbeddedContext);\n\n const isValid = useMemo(() => {\n const actionType = resolveActionType(block.props.actionType || '');\n const effectiveTitle = getActionTitle(actionType, block.props.title);\n if (!effectiveTitle || !actionType) return false;\n try {\n const inputs = JSON.parse(block.props.inputs || '{}');\n switch (actionType) {\n case 'qi/email.send':\n if (!inputs.to?.trim()) return false;\n break;\n case 'qi/http.request':\n if (!inputs.endpoint?.trim()) return false;\n break;\n case 'qi/bid.submit':\n case 'qi/claim.submit':\n case 'qi/bid.evaluate':\n case 'qi/claim.evaluate':\n if (!inputs.deedDid?.trim() || !inputs.collectionId?.trim()) return false;\n break;\n case 'qi/form.submit':\n if (!inputs.surveySchema?.trim()) return false;\n break;\n }\n } catch {\n return false;\n }\n return true;\n }, [block.props]);\n\n // Write ONLY the changed key. BlockNote merges `props` over the node's current\n // attributes, so a partial update is both sufficient and safe; re-sending the\n // whole props object is what clobbered concurrent edits.\n const updateProp = useCallback(\n (key: string, value: any) => {\n const current = readLiveBlock();\n editor.updateBlock(current, { props: { [key]: value } });\n },\n [editor, readLiveBlock]\n );\n\n const tabs = [\n {\n label: t('actionBlock.tabs.general', { defaultValue: 'General' }),\n value: 'general',\n icon: icon(IconSettings),\n content: (\n <Stack gap={20}>\n <GeneralTab\n title={block.props.title || ''}\n description={block.props.description || ''}\n actionType={block.props.actionType || ''}\n inputs={block.props.inputs || '{}'}\n requiresConfirmation={block.props.requiresConfirmation || ''}\n trigger={block.props.trigger || ''}\n onTitleChange={(value) => updateProp('title', value)}\n onDescriptionChange={(value) => updateProp('description', value)}\n onActionTypeChange={(value) => {\n editor.updateBlock(readLiveBlock(), {\n props: { actionType: value, inputs: '{}' },\n });\n }}\n onInputsChange={(value) => updateProp('inputs', value)}\n onRequiresConfirmationChange={(value) => updateProp('requiresConfirmation', value)}\n onTriggerChange={(value) => updateProp('trigger', value)}\n editor={editor}\n blockId={block.id}\n />\n\n {/* Save button — only in the editor's own floating panel. Embedded in\n the host Actions panel, edits auto-save so we show a hint instead. */}\n {embedded ? (\n <Text size=\"xs\" c=\"dimmed\" mt={4}>\n {t('actionBlock.autoSaved', { defaultValue: 'Changes save automatically.' })}\n </Text>\n ) : (\n <BasePrimaryButton leftSection={<IconCheck size={20} />} onClick={closePanel} disabled={!isValid} mt={4} style={{ alignSelf: 'flex-start' }}>\n {t('actionBlock.save', { defaultValue: 'Save' })}\n </BasePrimaryButton>\n )}\n </Stack>\n ),\n },\n {\n label: t('actionBlock.tabs.authorization', { defaultValue: 'Authorization' }),\n value: 'authorization',\n icon: icon(IconShieldCheck),\n content: <AuthorizationTab editor={editor} block={block} />,\n },\n {\n label: t('actionBlock.tabs.assignment', { defaultValue: 'Assignment' }),\n value: 'assignment',\n icon: icon(IconUserCheck),\n content: <AssignmentTab editor={editor} block={block} />,\n },\n {\n label: t('actionBlock.tabs.commitment', { defaultValue: 'Commitment' }),\n value: 'commitment',\n icon: icon(IconContract),\n content: <CommitmentTab editor={editor} block={block} />,\n },\n {\n label: t('actionBlock.tabs.ttl', { defaultValue: 'TTL' }),\n value: 'ttl',\n icon: icon(IconClock),\n content: <TtlTab editor={editor} block={block} />,\n },\n ];\n\n return (\n <BaseRightPanelLayout stepTabs title={block.props.title || getActionMeta(block.props.actionType || '').label} onClose={closePanel} tabs={tabs} context={{ editor, block }} />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,SAAS,WAAW,QAAQ,gBAAgB;AACnD,SAAS,YAAY,gBAAgB,iBAAiB;AAQtD,IAAM,SAAS;AACf,IAAM,UAAU;AAOT,SAAS,YAAY,EAAE,QAAQ,SAAS,GAA4D;AACzG,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAC9C,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAA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KAAK;AACH,aAAO,gBAAAA,OAAA,cAACC,kBAAA,EAAa,QAAgB,OAAc;AAAA,IACrD,KAAK;AACH,aAAO,gBAAAD,OAAA,cAACC,iBAAA,EAAY,QAAgB,OAAc;AAAA,IACpD,KAAK;AACH,aAAO,gBAAAD,OAAA,cAACC,iBAAA,EAAW,QAAgB,OAAc;AAAA,IACnD,KAAK;AACH,aAAO,gBAAAD,OAAA,cAAC,kBAAe,QAAgB,OAAc;AAAA,IACvD,KAAK;AACH,aAAO,gBAAAA,OAAA,cAACC,iBAAA,EAAgB,QAAgB,OAAc;AAAA,IACxD,KAAK;AACH,aAAO,gBAAAD,OAAA,cAACC,iBAAA,EAAa,QAAgB,OAAc;AAAA,IACrD,KAAK;AACH,aAAO,gBAAAD,OAAA,cAACC,iBAAA,EAAY,QAAgB,OAAc;AAAA,IACpD,KAAK;AACH,aAAO,gBAAAD,OAAA,cAACC,iBAAA,EAAiB,QAAgB,OAAc;AAAA,IACzD,KAAK;AACH,aAAO,gBAAAD,OAAA,cAACC,iBAAA,EAAe,QAAgB,OAAc;AAAA,IACvD,KAAK;AACH,aAAO,gBAAAD,OAAA,cAACC,iBAAA,EAAoB,QAAgB,OAAc;AAAA,IAC5D,KAAK;AACH,aAAO,gBAAAD,OAAA,cAACC,kBAAA,EAAwB,QAAgB,OAAc;AAAA,IAChE,KAAK;AACH,aAAO,gBAAAD,OAAA,cAACC,kBAAA,EAAsB,QAAgB,OAAc;AAAA,IAC9D,KAAK;AACH,aAAO,gBAAAD,OAAA,cAAC,uBAAoB,QAAgB,OAAc;AAAA,IAC5D,KAAK;AACH,aAAO,gBAAAA,OAAA,cAAC,sBAAmB,QAAgB,OAAc;AAAA,IAC3D;AACE,aAAO;AAAA,EACX;AACF;","names":["React","React","React","React","TemplateConfig","React","React","TemplateConfig"]}
1
+ {"version":3,"sources":["../../src/mantine/components/DebugButton.tsx","../../src/mantine/flow/FlowNodePanel.tsx","../../src/mantine/flow/FlowNodeConfigPanel.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\nimport { IconBraces, IconShieldPlus, IconTools } from '@tabler/icons-react';\nimport type { IxoEditorType } from '../../core/types';\nimport type { BlocknoteHandlers } from '../context/BlocknoteContext';\nimport { DevUcanGrantButton } from './DevUcanGrantButton';\nimport { icon } from './ReusablePanel';\nimport { DM_NOTIFICATIONS_MAP_KEY } from '../../core/lib/flowEngine/dmNotificationState';\nimport { RUNS_MAP_KEY, RUNS_TERMINAL_MAP_KEY } from '../../core/lib/flowEngine/runs';\n\nconst ACCENT = '#00ff88';\nconst SURFACE = '#1a1a2e';\n\n/**\n * Dev-tools launcher: a single round button pinned to the bottom-right (the Next.js\n * dev indicator owns the bottom-left) that expands into the individual tools, so the\n * dev overlay costs one small dot instead of a row of bars across the flow canvas.\n */\nexport function DebugButton({ editor, handlers }: { editor: IxoEditorType; handlers?: BlocknoteHandlers }) {\n const [menuOpen, setMenuOpen] = useState(false);\n const [ucanOpen, setUcanOpen] = useState(false);\n const [hovered, setHovered] = useState<string | null>(null);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (!menuOpen) return;\n\n const onPointerDown = (event: MouseEvent) => {\n if (!containerRef.current?.contains(event.target as Node)) setMenuOpen(false);\n };\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'Escape') setMenuOpen(false);\n };\n\n document.addEventListener('mousedown', onPointerDown);\n document.addEventListener('keydown', onKeyDown);\n return () => {\n document.removeEventListener('mousedown', onPointerDown);\n document.removeEventListener('keydown', onKeyDown);\n };\n }, [menuOpen]);\n\n const yMapToObject = (map: any) => {\n if (!map) return null;\n const obj: Record<string, any> = {};\n map.forEach((value: any, key: string) => {\n // Recursively unwrap nested Y.Maps so their contents are visible in JSON\n if (value && typeof value.forEach === 'function' && typeof value.get === 'function' && !Array.isArray(value)) {\n obj[key] = yMapToObject(value);\n } else if (value && typeof value.toArray === 'function') {\n obj[key] = value.toArray();\n } else {\n obj[key] = value;\n }\n });\n return Object.keys(obj).length === 0 ? '(empty)' : obj;\n };\n\n const parseJsonProp = (raw: unknown) => {\n if (typeof raw !== 'string' || !raw) return raw;\n try {\n return JSON.parse(raw);\n } catch {\n return raw;\n }\n };\n\n const handleClick = () => {\n (window as any).__editor = editor;\n const yDoc = (editor as any)._yDoc || (editor as any)._yRuntime?.doc;\n const readShared = (key: string) => yDoc?.share?.get?.(key);\n console.log('Editor exposed as window.__editor. _yDoc?', !!yDoc);\n const dump: Record<string, any> = {};\n\n // 1. BlockNote blocks — with parsed trigger / inputs / assignment so we can\n // see exactly what the listener is subscribing to.\n dump.blocks = editor.document.map((block: any) => ({\n id: block.id,\n type: block.type,\n actionType: block?.props?.actionType,\n triggerRaw: block?.props?.trigger,\n trigger: parseJsonProp(block?.props?.trigger),\n inputs: parseJsonProp(block?.props?.inputs),\n assignment: parseJsonProp(block?.props?.assignment),\n triggerMode: block?.props?.triggerMode,\n props: block.props,\n content: block.content,\n children: block.children,\n }));\n\n // 2. Runtime state\n // a) runs: the run-scoped action state (`runId → { meta, actions }`).\n // `yMapToObject` unwraps the nested containers.\n // b) runsTerminal: write-once closed/cancelled latch per run (Phase B).\n // c) runtime: the legacy flat map. Storage v1 mirrors run-scoped writes;\n // storage v2 deliberately leaves this map behind.\n dump.runs = yMapToObject(editor._yRuns ?? readShared(RUNS_MAP_KEY));\n dump.runsTerminal = yMapToObject(editor._yRunsTerminal ?? readShared(RUNS_TERMINAL_MAP_KEY));\n dump.runtime = yMapToObject(editor._yRuntime);\n dump.xeroConnection = yMapToObject((editor as any)._yXeroConnection);\n dump.xeroWorkItems = yMapToObject((editor as any)._yXeroWorkItems);\n\n // 3. Delegations\n dump.delegations = yMapToObject(editor._yDelegations);\n\n // 4. Invocations\n dump.invocations = yMapToObject(editor._yInvocations);\n\n // 5. Flow metadata\n dump.flowMetadata = editor.getFlowMetadata?.() || null;\n\n // 6. Flow array\n dump.flowArray = editor.getFlow?.() || null;\n\n // 7. Entities Y.Map (Personal Agent results)\n dump.entities = yMapToObject(readShared('entities'));\n\n // 8. Trigger/event state — the full chain for debugging block.event.all\n // a) auditTrail: where run records (source emissions) are written\n // b) pendingInvocations: what the Invoke button reads from\n // c) barrierState: partial barrier completion for block.event.all listeners\n // d) dmNotificationState: DM notification dedup (block + pending invocation)\n dump.auditTrail = yMapToObject(readShared('auditTrail'));\n dump.pendingInvocations = yMapToObject(readShared('pendingInvocations'));\n dump.barrierState = yMapToObject(readShared('barrierState'));\n dump.dmNotificationState = yMapToObject(readShared(DM_NOTIFICATIONS_MAP_KEY));\n\n const json = JSON.stringify(dump, null, 2);\n console.log('Editor Debug Dump:\\n' + json);\n };\n\n const tools = [\n {\n id: 'ucans',\n label: 'Grant UCANs',\n title: 'Dev: grant Flow Agent and block action UCANs to room members',\n leftSection: icon(IconShieldPlus, 14, ACCENT),\n onClick: () => setUcanOpen(true),\n },\n {\n id: 'ydoc',\n label: 'Debug Y.Doc',\n title: 'Debug: Log all blocks + runtime state to console',\n leftSection: icon(IconBraces, 14, ACCENT),\n onClick: handleClick,\n },\n ];\n\n return (\n <>\n <DevUcanGrantButton editor={editor} handlers={handlers} opened={ucanOpen} onOpenedChange={setUcanOpen} />\n\n <div\n ref={containerRef}\n style={{\n position: 'fixed',\n bottom: 16,\n right: 16,\n zIndex: 9999,\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-end',\n gap: 8,\n fontFamily: 'monospace',\n }}\n >\n {menuOpen && (\n <div\n role=\"menu\"\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: 2,\n padding: 4,\n minWidth: 168,\n background: SURFACE,\n border: `1px solid ${ACCENT}`,\n borderRadius: 8,\n boxShadow: '0 8px 24px rgba(0, 0, 0, 0.45)',\n }}\n >\n {tools.map((tool) => (\n <button\n key={tool.id}\n role=\"menuitem\"\n title={tool.title}\n onClick={() => {\n tool.onClick();\n setMenuOpen(false);\n }}\n onMouseEnter={() => setHovered(tool.id)}\n onMouseLeave={() => setHovered((current) => (current === tool.id ? null : current))}\n style={{\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n width: '100%',\n padding: '7px 10px',\n background: hovered === tool.id ? 'rgba(0, 255, 136, 0.12)' : 'transparent',\n color: ACCENT,\n border: 'none',\n borderRadius: 5,\n fontSize: 12,\n fontFamily: 'inherit',\n textAlign: 'left',\n cursor: 'pointer',\n }}\n >\n {tool.leftSection}\n {tool.label}\n </button>\n ))}\n </div>\n )}\n\n <button\n onClick={() => setMenuOpen((current) => !current)}\n onMouseEnter={() => setHovered('launcher')}\n onMouseLeave={() => setHovered((current) => (current === 'launcher' ? null : current))}\n aria-label=\"Dev tools\"\n aria-haspopup=\"menu\"\n aria-expanded={menuOpen}\n title=\"Dev tools\"\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 36,\n height: 36,\n padding: 0,\n background: SURFACE,\n color: ACCENT,\n border: `1px solid ${ACCENT}`,\n borderRadius: '50%',\n cursor: 'pointer',\n opacity: menuOpen || hovered === 'launcher' ? 1 : 0.55,\n transition: 'opacity 120ms ease',\n }}\n >\n {icon(IconTools, 18, ACCENT)}\n </button>\n </div>\n </>\n );\n}\n","import React from 'react';\nimport type { IxoBlockProps } from '@/core/types';\nimport { FlowPanelEmbeddedContext } from './embeddedPanelContext';\nimport { RunSessionProvider } from './runSessionContext';\nimport type { RunEventAppender } from '@/core/lib/flowEngine/runLifecycle';\nimport type { DesignPodRuntimeAuthorityV1 } from '@/core/lib/designPod/contracts';\n\n// Panel-based blocks — these export a dedicated \"detail\" panel component that is\n// normally registered via usePanel. We render that panel content directly.\nimport { ActionFlowPanel } from '@/mantine/blocks/action/flow/FlowView';\nimport { FormPanel } from '@/mantine/blocks/form/flow/FormPanel';\nimport { FlowConfig as ProposalFlowConfig } from '@/mantine/blocks/proposal/flow/FlowConfig';\nimport { DomainCreatorSurveyPanel } from '@/mantine/blocks/domainCreator/flow/DomainCreatorSurveyPanel';\nimport { SignPanel } from '@/mantine/blocks/domainCreatorSign/flow/SignPanel';\nimport { GovernanceGroupPanel } from '@/mantine/blocks/governanceGroup/flow/GovernanceGroupPanel';\n\n// Inline-detail blocks — the FlowView itself IS the \"do-the-step\" detail UI\n// (no separate panel; they don't use usePanel for their primary content).\nimport { ClaimFlowView } from '@/mantine/blocks/claim/flow/FlowView';\nimport { EvaluatorFlowView } from '@/mantine/blocks/evaluator/flow/FlowView';\nimport { NotifyFlowView } from '@/mantine/blocks/notify/flow/FlowView';\nimport { CheckboxFlowView } from '@/mantine/blocks/checkbox/flow/FlowView';\nimport { SecretsFlowView } from '@/mantine/blocks/secrets/flow/SecretsFlowView';\nimport { SkillsFlowView } from '@/mantine/blocks/skills/flow/SkillsFlowView';\n\n// email / apiRequest keep their detail UI inside a private (non-exported)\n// PanelContent function, so we dispatch to the full FlowView card instead.\nimport { EmailFlowView } from '@/mantine/blocks/email/flow/FlowView';\nimport { ApiRequestFlowView } from '@/mantine/blocks/apiRequest/flow/FlowView';\n\nexport interface FlowNodePanelProps {\n editor: IxoBlockProps['editor'];\n block: IxoBlockProps['block'];\n isDisabled?: {\n isDisabled: 'disable';\n message?: string;\n };\n /** Explicit session whose runtime state this panel reads and writes. */\n sessionRunId?: string;\n runEventLog?: RunEventAppender;\n designPodAuthority?: DesignPodRuntimeAuthorityV1;\n}\n\n/**\n * Single dispatcher that, given a flow editor and a step block, renders that\n * block's \"do-the-step\" / detail UI. Lets a host app render the panel for any\n * selected step in its own right column without relying on the per-block\n * usePanel/registeredPanels indirection.\n *\n * NOTE: every rendered detail component reads from BlocknoteContext\n * (useBlocknoteHandlers / useBlocknoteContext throw if the provider is\n * missing). Keep <FlowNodePanel> wrapped in the app's BlocknoteProvider /\n * EditorBlocknoteProvider.\n */\nexport function FlowNodePanel(props: FlowNodePanelProps) {\n // Embedded: the host app supplies the panel header, so BaseRightPanelLayout\n // suppresses its own (no duplicate title / close).\n return (\n <RunSessionProvider sessionRunId={props.sessionRunId} runEventLog={props.runEventLog || props.editor?._runEventLog} designPodAuthority={props.designPodAuthority}>\n <FlowPanelEmbeddedContext.Provider value={true}>\n <FlowNodePanelContent {...props} />\n </FlowPanelEmbeddedContext.Provider>\n </RunSessionProvider>\n );\n}\n\nfunction FlowNodePanelContent({ editor, block, isDisabled }: FlowNodePanelProps) {\n switch (block?.type) {\n case 'action':\n return <ActionFlowPanel editor={editor} block={block} isDisabled={isDisabled} />;\n\n case 'form':\n return <FormPanel editor={editor} block={block} />;\n\n case 'proposal':\n return <ProposalFlowConfig editor={editor} block={block} />;\n\n case 'domainCreator':\n return <DomainCreatorSurveyPanel editor={editor} block={block} />;\n\n case 'domainCreatorSign':\n return <SignPanel editor={editor} block={block} />;\n\n case 'governanceGroup':\n return <GovernanceGroupPanel editor={editor} block={block} />;\n\n case 'claim':\n return <ClaimFlowView editor={editor} block={block} />;\n\n case 'evaluator':\n return <EvaluatorFlowView editor={editor} block={block} />;\n\n case 'notify':\n return <NotifyFlowView editor={editor} block={block} isDisabled={isDisabled} />;\n\n case 'checkbox':\n return <CheckboxFlowView editor={editor} block={block} isDisabled={isDisabled} />;\n\n case 'secrets':\n return <SecretsFlowView editor={editor} block={block} />;\n\n case 'skills':\n return <SkillsFlowView editor={editor} block={block} />;\n\n // email / apiRequest: detail UI is a private PanelContent fn; render the\n // full FlowView card (its own onClick opens the registered panel).\n case 'email':\n return <EmailFlowView editor={editor} block={block} isDisabled={isDisabled} />;\n\n case 'apiRequest':\n return <ApiRequestFlowView editor={editor} block={block} isDisabled={isDisabled} />;\n\n // enumChecklist has no flow-mode panel (renders EnumChecklistBlock in all\n // modes). Fallback to null / \"open in document\".\n case 'enumChecklist':\n default:\n return null;\n }\n}\n\nexport default FlowNodePanel;\n","import React from 'react';\nimport type { IxoBlockProps } from '@/core/types';\nimport { FlowPanelEmbeddedContext } from './embeddedPanelContext';\n\n// Per-block TEMPLATE config panels — the authoring counterpart to FlowNodePanel.\n// Each exposes the block's rich configuration (General + the shared\n// Authorization / Assignment / Commitment / TTL / Evaluation tabs) on the same\n// BaseRightPanelLayout the runtime panels use.\nimport { TemplateConfig as ActionConfig } from '@/mantine/blocks/action/template/TemplateConfig';\nimport { TemplateConfig as ClaimConfig } from '@/mantine/blocks/claim/template/TemplateConfig';\nimport { TemplateConfig as FormConfig } from '@/mantine/blocks/form/template/TemplateConfig';\nimport { TemplateConfig as CheckboxConfig } from '@/mantine/blocks/checkbox/template/TemplateConfig';\nimport { TemplateConfig as EvaluatorConfig } from '@/mantine/blocks/evaluator/template/TemplateConfig';\nimport { TemplateConfig as NotifyConfig } from '@/mantine/blocks/notify/template/TemplateConfig';\nimport { TemplateConfig as EmailConfig } from '@/mantine/blocks/email/template/TemplateConfig';\nimport { TemplateConfig as ApiRequestConfig } from '@/mantine/blocks/apiRequest/template/TemplateConfig';\nimport { TemplateConfig as ProposalConfig } from '@/mantine/blocks/proposal/template/TemplateConfig';\nimport { TemplateConfig as DomainCreatorConfig } from '@/mantine/blocks/domainCreator/template/TemplateConfig';\nimport { TemplateConfig as DomainCreatorSignConfig } from '@/mantine/blocks/domainCreatorSign/template/TemplateConfig';\nimport { TemplateConfig as GovernanceGroupConfig } from '@/mantine/blocks/governanceGroup/template/TemplateConfig';\n\n// secrets / skills have a template VIEW rather than a tabbed config.\nimport { SecretsTemplateView } from '@/mantine/blocks/secrets/template/SecretsTemplateView';\nimport { SkillsTemplateView } from '@/mantine/blocks/skills/template/SkillsTemplateView';\n\nexport interface FlowNodeConfigPanelProps {\n editor: IxoBlockProps['editor'];\n block: IxoBlockProps['block'];\n}\n\n/**\n * Single dispatcher that, given a flow editor and a step block, renders that\n * block's TEMPLATE configuration panel — the authoring counterpart to\n * `FlowNodePanel` (which renders the runtime \"do-the-step\" UI). Lets a host app\n * render the rich config (General + Authorization/Assignment/Commitment/TTL/…)\n * for any selected step in its own right column.\n *\n * Since `addFlowNode` and the registry route every capability through the\n * generic `action` block, `action → ActionConfig` is the primary case; the\n * dedicated block types are covered for documents that use them directly.\n *\n * Wrapped in `FlowPanelEmbeddedContext` so each config's `BaseRightPanelLayout`\n * suppresses its own header/close (the host supplies those).\n */\nexport function FlowNodeConfigPanel(props: FlowNodeConfigPanelProps) {\n return (\n <FlowPanelEmbeddedContext.Provider value={true}>\n <FlowNodeConfigPanelContent {...props} />\n </FlowPanelEmbeddedContext.Provider>\n );\n}\n\nfunction FlowNodeConfigPanelContent({ editor, block }: FlowNodeConfigPanelProps) {\n switch (block?.type) {\n case 'action':\n return <ActionConfig editor={editor} block={block} />;\n case 'claim':\n return <ClaimConfig editor={editor} block={block} />;\n case 'form':\n return <FormConfig editor={editor} block={block} />;\n case 'checkbox':\n return <CheckboxConfig editor={editor} block={block} />;\n case 'evaluator':\n return <EvaluatorConfig editor={editor} block={block} />;\n case 'notify':\n return <NotifyConfig editor={editor} block={block} />;\n case 'email':\n return <EmailConfig editor={editor} block={block} />;\n case 'apiRequest':\n return <ApiRequestConfig editor={editor} block={block} />;\n case 'proposal':\n return <ProposalConfig editor={editor} block={block} />;\n case 'domainCreator':\n return <DomainCreatorConfig editor={editor} block={block} />;\n case 'domainCreatorSign':\n return <DomainCreatorSignConfig editor={editor} block={block} />;\n case 'governanceGroup':\n return <GovernanceGroupConfig editor={editor} block={block} />;\n case 'secrets':\n return <SecretsTemplateView editor={editor} block={block} />;\n case 'skills':\n return <SkillsTemplateView editor={editor} block={block} />;\n default:\n return null;\n }\n}\n\nexport default FlowNodeConfigPanel;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,SAAS,WAAW,QAAQ,gBAAgB;AACnD,SAAS,YAAY,gBAAgB,iBAAiB;AAQtD,IAAM,SAAS;AACf,IAAM,UAAU;AAOT,SAAS,YAAY,EAAE,QAAQ,SAAS,GAA4D;AACzG,QAAM,CAA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,IAC9D,KAAK;AACH,aAAO,gBAAAD,OAAA,cAAC,uBAAoB,QAAgB,OAAc;AAAA,IAC5D,KAAK;AACH,aAAO,gBAAAA,OAAA,cAAC,sBAAmB,QAAgB,OAAc;AAAA,IAC3D;AACE,aAAO;AAAA,EACX;AACF;","names":["React","React","React","React","TemplateConfig"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/editor",
3
- "version": "7.10.0",
3
+ "version": "7.11.0",
4
4
  "description": "A custom BlockNote editor wrapper for IXO team",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",