nucleus-core-ts 0.8.148 → 0.8.149

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { addEdge, applyEdgeChanges, applyNodeChanges, Background, Controls, MarkerType, MiniMap, ReactFlow } from "@xyflow/react";
4
- import "@xyflow/react/dist/style.css";
5
- import { useEffect, useEffectEvent, useRef, useState } from "react";
6
- import { cn } from "../../../utils/cn";
7
- import { useVerificationFlowStore } from "../store";
8
- import { getVerificationFlowTheme } from "../theme";
9
- import { setActiveTheme } from "../theme/store";
10
- import { NotificationFlowNode, StepFlowNode, VerifierFlowNode } from "./FlowNode";
11
- import { NodePalette } from "./NodePropertiesPanel";
12
- import { PendingTab } from "./PendingTab";
13
- import { PropertiesPanel } from "./PropertiesPanel";
14
- import { VerificationEntityList } from "./VerificationEntityList";
3
+ import { addEdge, applyEdgeChanges, applyNodeChanges, Background, Controls, MarkerType, MiniMap, ReactFlow } from '@xyflow/react';
4
+ import '@xyflow/react/dist/style.css';
5
+ import { useEffect, useEffectEvent, useRef, useState } from 'react';
6
+ import { cn } from '../../../utils/cn';
7
+ import { useVerificationFlowStore } from '../store';
8
+ import { getVerificationFlowTheme } from '../theme';
9
+ import { setActiveTheme } from '../theme/store';
10
+ import { NotificationFlowNode, StepFlowNode, VerifierFlowNode } from './FlowNode';
11
+ import { NodePalette } from './NodePropertiesPanel';
12
+ import { PendingTab } from './PendingTab';
13
+ import { PropertiesPanel } from './PropertiesPanel';
14
+ import { VerificationEntityList } from './VerificationEntityList';
15
15
  // ─── React Flow Config ────────────────────────────────────────────
16
16
  const nodeTypes = {
17
17
  step: StepFlowNode,
@@ -20,16 +20,16 @@ const nodeTypes = {
20
20
  };
21
21
  function buildEdgeOptions(isDark) {
22
22
  return {
23
- type: "default",
23
+ type: 'default',
24
24
  animated: isDark,
25
25
  markerEnd: {
26
26
  type: MarkerType.ArrowClosed,
27
27
  width: isDark ? 16 : 20,
28
28
  height: isDark ? 16 : 20,
29
- color: isDark ? "rgba(255,255,255,0.35)" : "#000000"
29
+ color: isDark ? 'rgba(255,255,255,0.35)' : '#000000'
30
30
  },
31
31
  style: {
32
- stroke: isDark ? "rgba(255,255,255,0.35)" : "#000000",
32
+ stroke: isDark ? 'rgba(255,255,255,0.35)' : '#000000',
33
33
  strokeWidth: isDark ? 1.5 : 2
34
34
  }
35
35
  };
@@ -44,12 +44,12 @@ function stepsToNodes(steps, graphData, selectedNodeId) {
44
44
  return steps.map((s)=>{
45
45
  const baseData = {
46
46
  label: s.name || `Step ${s.step_order}`,
47
- description: s.description || "",
47
+ description: s.description || '',
48
48
  nodeType: s.node_type,
49
49
  stepOrder: s.step_order,
50
50
  selected: s.node_id === selectedNodeId
51
51
  };
52
- if (s.node_type === "verifier") {
52
+ if (s.node_type === 'verifier') {
53
53
  const config = graphData.verifier_configs.find((vc)=>vc.node_id === s.node_id);
54
54
  return {
55
55
  id: s.node_id,
@@ -60,16 +60,16 @@ function stepsToNodes(steps, graphData, selectedNodeId) {
60
60
  },
61
61
  data: {
62
62
  ...baseData,
63
- verifierType: config?.verifier_type || "role",
64
- verifierUserId: config?.verifier_user_id || "",
65
- verifierRole: config?.verifier_role || "",
66
- verifierUserEmail: "",
63
+ verifierType: config?.verifier_type || 'role',
64
+ verifierUserId: config?.verifier_user_id || '',
65
+ verifierRole: config?.verifier_role || '',
66
+ verifierUserEmail: '',
67
67
  requireSignature: config?.require_signature || false,
68
68
  allMustApprove: config?.all_must_approve || false
69
69
  }
70
70
  };
71
71
  }
72
- if (s.node_type === "notification") {
72
+ if (s.node_type === 'notification') {
73
73
  const rule = graphData.notification_rules.find((nr)=>nr.node_id === s.node_id);
74
74
  const ruleId = rule?.id || s.node_id;
75
75
  const channels = graphData.notification_channels.filter((nc)=>nc.rule_id === ruleId || nc.rule_id === s.node_id).map((nc)=>nc.channel);
@@ -83,14 +83,14 @@ function stepsToNodes(steps, graphData, selectedNodeId) {
83
83
  },
84
84
  data: {
85
85
  ...baseData,
86
- trigger: rule?.trigger || "on_step_reached",
86
+ trigger: rule?.trigger || 'on_step_reached',
87
87
  channels,
88
- titleTemplate: rule?.title_template || "",
89
- bodyTemplate: rule?.body_template || "",
90
- recipientType: recipient?.recipient_type || "",
91
- recipientUserId: recipient?.recipient_user_id || "",
92
- recipientRole: recipient?.recipient_role || "",
93
- recipientUserEmail: ""
88
+ titleTemplate: rule?.title_template || '',
89
+ bodyTemplate: rule?.body_template || '',
90
+ recipientType: recipient?.recipient_type || '',
91
+ recipientUserId: recipient?.recipient_user_id || '',
92
+ recipientRole: recipient?.recipient_role || '',
93
+ recipientUserEmail: ''
94
94
  }
95
95
  };
96
96
  }
@@ -118,9 +118,9 @@ function edgesToFlow(flowEdges, edgeOptions) {
118
118
  }
119
119
  function createNewNode(nodeType, position) {
120
120
  const labels = {
121
- step: "New Step",
122
- verifier: "New Verifier",
123
- notification: "New Notification"
121
+ step: 'New Step',
122
+ verifier: 'New Verifier',
123
+ notification: 'New Notification'
124
124
  };
125
125
  const base = {
126
126
  id: nextNodeId(),
@@ -128,25 +128,25 @@ function createNewNode(nodeType, position) {
128
128
  position,
129
129
  data: {
130
130
  label: labels[nodeType],
131
- description: "",
131
+ description: '',
132
132
  nodeType,
133
133
  stepOrder: 0,
134
134
  selected: false
135
135
  }
136
136
  };
137
- if (nodeType === "verifier") {
137
+ if (nodeType === 'verifier') {
138
138
  base.data = {
139
139
  ...base.data,
140
- verifierType: "role",
141
- verifierRole: "",
140
+ verifierType: 'role',
141
+ verifierRole: '',
142
142
  requireSignature: false,
143
143
  allMustApprove: false
144
144
  };
145
145
  }
146
- if (nodeType === "notification") {
146
+ if (nodeType === 'notification') {
147
147
  base.data = {
148
148
  ...base.data,
149
- trigger: "on_step_reached",
149
+ trigger: 'on_step_reached',
150
150
  channels: []
151
151
  };
152
152
  }
@@ -159,13 +159,13 @@ function buildSavePayload(flowId, entityName, flowName, flowDescription, trigger
159
159
  target_node_id: e.target,
160
160
  source_handle: e.sourceHandle || undefined,
161
161
  target_handle: e.targetHandle || undefined,
162
- edge_type: "default",
163
- label: String(e.label || ""),
162
+ edge_type: 'default',
163
+ label: String(e.label || ''),
164
164
  animated: true
165
165
  }));
166
166
  const stepNodeIds = new Set(nodes.filter((n)=>{
167
167
  const d = n.data;
168
- return (d.nodeType || n.type) === "step";
168
+ return (d.nodeType || n.type) === 'step';
169
169
  }).map((n)=>n.id));
170
170
  const adjacency = {};
171
171
  for (const e of flowEdges){
@@ -206,9 +206,9 @@ function buildSavePayload(flowId, entityName, flowName, flowDescription, trigger
206
206
  return {
207
207
  node_id: n.id,
208
208
  node_type: nodeType,
209
- step_order: nodeType === "step" ? stepOrderMap[n.id] ?? 0 : 0,
210
- name: String(d.label || ""),
211
- description: String(d.description || ""),
209
+ step_order: nodeType === 'step' ? stepOrderMap[n.id] ?? 0 : 0,
210
+ name: String(d.label || ''),
211
+ description: String(d.description || ''),
212
212
  position_x: Math.round(n.position.x),
213
213
  position_y: Math.round(n.position.y),
214
214
  width: n.width || undefined,
@@ -217,12 +217,12 @@ function buildSavePayload(flowId, entityName, flowName, flowDescription, trigger
217
217
  });
218
218
  const verifier_configs = nodes.filter((n)=>{
219
219
  const d = n.data;
220
- return d.nodeType === "verifier";
220
+ return d.nodeType === 'verifier';
221
221
  }).map((n)=>{
222
222
  const d = n.data;
223
223
  return {
224
224
  node_id: n.id,
225
- verifier_type: d.verifierType || "role",
225
+ verifier_type: d.verifierType || 'role',
226
226
  verifier_user_id: d.verifierUserId,
227
227
  verifier_role: d.verifierRole,
228
228
  require_signature: Boolean(d.requireSignature),
@@ -234,12 +234,12 @@ function buildSavePayload(flowId, entityName, flowName, flowDescription, trigger
234
234
  const notification_recipients = [];
235
235
  for (const n of nodes){
236
236
  const d = n.data;
237
- if (d.nodeType !== "notification") continue;
237
+ if (d.nodeType !== 'notification') continue;
238
238
  const ruleId = `rule_${n.id}`;
239
239
  notification_rules.push({
240
240
  id: ruleId,
241
241
  node_id: n.id,
242
- trigger: d.trigger || "on_step_reached",
242
+ trigger: d.trigger || 'on_step_reached',
243
243
  title_template: d.titleTemplate,
244
244
  body_template: d.bodyTemplate
245
245
  });
@@ -278,19 +278,19 @@ function buildSavePayload(flowId, entityName, flowName, flowDescription, trigger
278
278
  };
279
279
  }
280
280
  // ─── Main Component ───────────────────────────────────────────────
281
- export function VerificationFlowPage({ entityName, title, subtitle, flowListAction, flowGetAction, flowSaveAction, flowPublishAction, flowDeleteAction, pendingAction, decideAction, listUsersAction, listRolesAction, entityStatusesAction, onFlowSelected, onDecisionMade, onEntityClick, onBack, showPending = true, showEntityStatuses = false, className, themeMode = "dark" }) {
281
+ export function VerificationFlowPage({ entityName, title, subtitle, flowListAction, flowGetAction, flowSaveAction, flowPublishAction, flowDeleteAction, pendingAction, decideAction, listUsersAction, listRolesAction, entityStatusesAction, onFlowSelected, onDecisionMade, onEntityClick, onBack, showPending = true, showEntityStatuses = false, className, themeMode = 'dark' }) {
282
282
  const theme = getVerificationFlowTheme(themeMode);
283
283
  setActiveTheme(theme);
284
- const edgeOptions = buildEdgeOptions(themeMode === "dark");
284
+ const edgeOptions = buildEdgeOptions(themeMode === 'dark');
285
285
  const store = useVerificationFlowStore();
286
286
  const [nodes, setNodes] = useState([]);
287
287
  const [edges, setEdges] = useState([]);
288
288
  const [isDraggingOver, setIsDraggingOver] = useState(false);
289
- const [flowName, setFlowName] = useState("");
290
- const [flowDescription, setFlowDescription] = useState("");
291
- const [flowTriggerOn, setFlowTriggerOn] = useState("create");
289
+ const [flowName, setFlowName] = useState('');
290
+ const [flowDescription, setFlowDescription] = useState('');
291
+ const [flowTriggerOn, setFlowTriggerOn] = useState('create');
292
292
  const [deleteConfirmId, setDeleteConfirmId] = useState(null);
293
- const [viewMode, setViewMode] = useState("list");
293
+ const [viewMode, setViewMode] = useState('list');
294
294
  const [showCreateForm, setShowCreateForm] = useState(false);
295
295
  const reactFlowWrapper = useRef(null);
296
296
  const reactFlowInstance = useRef(null);
@@ -335,7 +335,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
335
335
  // ─── Drag & Drop from Palette ─────────────────────────────────
336
336
  const onDragOver = useEffectEvent((event)=>{
337
337
  event.preventDefault();
338
- event.dataTransfer.dropEffect = "move";
338
+ event.dataTransfer.dropEffect = 'move';
339
339
  setIsDraggingOver(true);
340
340
  });
341
341
  const onDragLeave = useEffectEvent(()=>{
@@ -344,7 +344,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
344
344
  const onDrop = useEffectEvent((event)=>{
345
345
  event.preventDefault();
346
346
  setIsDraggingOver(false);
347
- const nodeType = event.dataTransfer.getData("application/reactflow-nodetype");
347
+ const nodeType = event.dataTransfer.getData('application/reactflow-nodetype');
348
348
  if (!nodeType) return;
349
349
  const bounds = reactFlowWrapper.current?.getBoundingClientRect();
350
350
  if (!bounds || !reactFlowInstance.current) return;
@@ -428,11 +428,11 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
428
428
  onAfterHandle: ()=>{
429
429
  setDeleteConfirmId(null);
430
430
  store.setSelectedFlowId(null);
431
- setFlowName("");
432
- setFlowDescription("");
431
+ setFlowName('');
432
+ setFlowDescription('');
433
433
  setNodes([]);
434
434
  setEdges([]);
435
- setViewMode("list");
435
+ setViewMode('list');
436
436
  loadFlows();
437
437
  },
438
438
  onErrorHandle: ()=>{
@@ -444,12 +444,12 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
444
444
  const openDesigner = useEffectEvent((flowId)=>{
445
445
  store.setSelectedFlowId(flowId);
446
446
  onFlowSelected?.(flowId);
447
- setViewMode("designer");
447
+ setViewMode('designer');
448
448
  });
449
449
  const handleCreateNew = useEffectEvent(()=>{
450
450
  setFlowName(`${entityName} Flow`);
451
- setFlowDescription("");
452
- setFlowTriggerOn("create");
451
+ setFlowDescription('');
452
+ setFlowTriggerOn('create');
453
453
  setShowCreateForm(true);
454
454
  });
455
455
  const handleCreateConfirm = useEffectEvent(()=>{
@@ -458,10 +458,10 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
458
458
  setEdges([]);
459
459
  store.setIsDirty(true);
460
460
  setShowCreateForm(false);
461
- setViewMode("designer");
461
+ setViewMode('designer');
462
462
  });
463
463
  const backToList = useEffectEvent(()=>{
464
- setViewMode("list");
464
+ setViewMode('list');
465
465
  store.setSelectedNodeId(null);
466
466
  loadFlows();
467
467
  });
@@ -498,9 +498,9 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
498
498
  const resObj = res;
499
499
  const flow = resObj.data?.flow;
500
500
  if (flow) {
501
- setFlowName(flow.name || "");
502
- setFlowDescription(flow.description || "");
503
- setFlowTriggerOn(flow.trigger_on || "create");
501
+ setFlowName(flow.name || '');
502
+ setFlowDescription(flow.description || '');
503
+ setFlowTriggerOn(flow.trigger_on || 'create');
504
504
  }
505
505
  const graph = resObj.data?.graph;
506
506
  if (graph?.steps && graph.steps.length > 0) {
@@ -512,10 +512,10 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
512
512
  const userIds = new Set();
513
513
  for (const n of builtNodes){
514
514
  const d = n.data;
515
- if (d.nodeType === "verifier" && d.verifierType === "user" && d.verifierUserId) {
515
+ if (d.nodeType === 'verifier' && d.verifierType === 'user' && d.verifierUserId) {
516
516
  userIds.add(d.verifierUserId);
517
517
  }
518
- if (d.nodeType === "notification" && d.recipientType === "user" && d.recipientUserId) {
518
+ if (d.nodeType === 'notification' && d.recipientType === 'user' && d.recipientUserId) {
519
519
  userIds.add(d.recipientUserId);
520
520
  }
521
521
  }
@@ -536,7 +536,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
536
536
  if (emailMap.size > 0) {
537
537
  setNodes((prev)=>prev.map((n)=>{
538
538
  const d = n.data;
539
- if (d.nodeType === "verifier" && d.verifierUserId && emailMap.has(d.verifierUserId)) {
539
+ if (d.nodeType === 'verifier' && d.verifierUserId && emailMap.has(d.verifierUserId)) {
540
540
  return {
541
541
  ...n,
542
542
  data: {
@@ -545,7 +545,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
545
545
  }
546
546
  };
547
547
  }
548
- if (d.nodeType === "notification" && d.recipientUserId && emailMap.has(d.recipientUserId)) {
548
+ if (d.nodeType === 'notification' && d.recipientUserId && emailMap.has(d.recipientUserId)) {
549
549
  return {
550
550
  ...n,
551
551
  data: {
@@ -609,10 +609,10 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
609
609
  ]
610
610
  });
611
611
  const triggerLabels = {
612
- create: "On Create",
613
- update: "On Update",
614
- delete: "On Delete",
615
- manual: "Manual"
612
+ create: 'On Create',
613
+ update: 'On Update',
614
+ delete: 'On Delete',
615
+ manual: 'Manual'
616
616
  };
617
617
  // ─── Render ───────────────────────────────────────────────────
618
618
  return /*#__PURE__*/ _jsxs("div", {
@@ -626,22 +626,22 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
626
626
  "aria-label": "Close",
627
627
  className: "absolute inset-0 cursor-default",
628
628
  style: {
629
- backgroundColor: "rgba(0, 0, 0, 0.6)"
629
+ backgroundColor: 'rgba(0, 0, 0, 0.6)'
630
630
  },
631
631
  onClick: ()=>setDeleteConfirmId(null)
632
632
  }),
633
633
  /*#__PURE__*/ _jsxs("div", {
634
- className: themeMode === "light" ? "relative rounded-xl border border-gray-200 bg-white p-6 w-full max-w-sm space-y-4 shadow-2xl" : "relative rounded-xl border border-white/[0.08] bg-[#12121a] p-6 w-full max-w-sm space-y-4 shadow-2xl",
634
+ className: themeMode === 'light' ? 'relative rounded-xl border border-gray-200 bg-white p-6 w-full max-w-sm space-y-4 shadow-2xl' : 'relative rounded-xl border border-white/[0.08] bg-[#12121a] p-6 w-full max-w-sm space-y-4 shadow-2xl',
635
635
  children: [
636
636
  /*#__PURE__*/ _jsx("p", {
637
- className: themeMode === "light" ? "text-[13px] font-semibold text-gray-900" : "text-[13px] font-semibold text-white/90",
637
+ className: themeMode === 'light' ? 'text-[13px] font-semibold text-gray-900' : 'text-[13px] font-semibold text-white/90',
638
638
  children: "Delete Flow"
639
639
  }),
640
640
  /*#__PURE__*/ _jsxs("p", {
641
- className: themeMode === "light" ? "text-[12px] text-gray-500 leading-relaxed" : "text-[12px] text-white/50 leading-relaxed",
641
+ className: themeMode === 'light' ? 'text-[12px] text-gray-500 leading-relaxed' : 'text-[12px] text-white/50 leading-relaxed',
642
642
  children: [
643
643
  'Are you sure you want to delete "',
644
- store.flows.find((f)=>f.id === deleteConfirmId)?.name || "this flow",
644
+ store.flows.find((f)=>f.id === deleteConfirmId)?.name || 'this flow',
645
645
  '"? This action cannot be undone.'
646
646
  ]
647
647
  }),
@@ -651,7 +651,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
651
651
  /*#__PURE__*/ _jsx("button", {
652
652
  type: "button",
653
653
  onClick: ()=>setDeleteConfirmId(null),
654
- className: themeMode === "light" ? "rounded-lg px-3.5 py-1.5 text-[11px] font-medium text-gray-400 hover:text-gray-600 transition-all" : "rounded-lg px-3.5 py-1.5 text-[11px] font-medium text-white/40 hover:text-white/60 transition-all",
654
+ className: themeMode === 'light' ? 'rounded-lg px-3.5 py-1.5 text-[11px] font-medium text-gray-400 hover:text-gray-600 transition-all' : 'rounded-lg px-3.5 py-1.5 text-[11px] font-medium text-white/40 hover:text-white/60 transition-all',
655
655
  children: "Cancel"
656
656
  }),
657
657
  /*#__PURE__*/ _jsx("button", {
@@ -674,15 +674,15 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
674
674
  "aria-label": "Close",
675
675
  className: "absolute inset-0 cursor-default",
676
676
  style: {
677
- backgroundColor: "rgba(0, 0, 0, 0.6)"
677
+ backgroundColor: 'rgba(0, 0, 0, 0.6)'
678
678
  },
679
679
  onClick: ()=>setShowCreateForm(false)
680
680
  }),
681
681
  /*#__PURE__*/ _jsxs("div", {
682
- className: themeMode === "light" ? "relative rounded-xl border border-gray-200 bg-white p-6 w-full max-w-md space-y-5 shadow-2xl" : "relative rounded-xl border border-white/[0.08] bg-[#12121a] p-6 w-full max-w-md space-y-5 shadow-2xl",
682
+ className: themeMode === 'light' ? 'relative rounded-xl border border-gray-200 bg-white p-6 w-full max-w-md space-y-5 shadow-2xl' : 'relative rounded-xl border border-white/[0.08] bg-[#12121a] p-6 w-full max-w-md space-y-5 shadow-2xl',
683
683
  children: [
684
684
  /*#__PURE__*/ _jsx("p", {
685
- className: themeMode === "light" ? "text-[14px] font-semibold text-gray-900" : "text-[14px] font-semibold text-white/90",
685
+ className: themeMode === 'light' ? 'text-[14px] font-semibold text-gray-900' : 'text-[14px] font-semibold text-white/90',
686
686
  children: "Create New Flow"
687
687
  }),
688
688
  /*#__PURE__*/ _jsxs("div", {
@@ -693,13 +693,13 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
693
693
  children: [
694
694
  /*#__PURE__*/ _jsx("label", {
695
695
  htmlFor: "vf-create-name",
696
- className: themeMode === "light" ? "block text-[11px] font-medium text-gray-500" : "block text-[11px] font-medium text-white/50",
696
+ className: themeMode === 'light' ? 'block text-[11px] font-medium text-gray-500' : 'block text-[11px] font-medium text-white/50',
697
697
  children: "Flow Name"
698
698
  }),
699
699
  /*#__PURE__*/ _jsx("input", {
700
700
  id: "vf-create-name",
701
701
  type: "text",
702
- className: themeMode === "light" ? "w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-[12px] text-gray-800 outline-none focus:border-gray-400 placeholder:text-gray-400" : "w-full rounded-lg border border-white/[0.08] bg-white/[0.04] px-3 py-2 text-[12px] text-white/80 outline-none focus:border-white/20 placeholder:text-white/20",
702
+ className: themeMode === 'light' ? 'w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-[12px] text-gray-800 outline-none focus:border-gray-400 placeholder:text-gray-400' : 'w-full rounded-lg border border-white/[0.08] bg-white/[0.04] px-3 py-2 text-[12px] text-white/80 outline-none focus:border-white/20 placeholder:text-white/20',
703
703
  placeholder: "Enter flow name...",
704
704
  value: flowName,
705
705
  onChange: (e)=>setFlowName(e.target.value)
@@ -711,12 +711,12 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
711
711
  children: [
712
712
  /*#__PURE__*/ _jsx("label", {
713
713
  htmlFor: "vf-create-desc",
714
- className: themeMode === "light" ? "block text-[11px] font-medium text-gray-500" : "block text-[11px] font-medium text-white/50",
714
+ className: themeMode === 'light' ? 'block text-[11px] font-medium text-gray-500' : 'block text-[11px] font-medium text-white/50',
715
715
  children: "Description"
716
716
  }),
717
717
  /*#__PURE__*/ _jsx("textarea", {
718
718
  id: "vf-create-desc",
719
- className: themeMode === "light" ? "w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-[12px] text-gray-800 outline-none focus:border-gray-400 resize-none placeholder:text-gray-400" : "w-full rounded-lg border border-white/[0.08] bg-white/[0.04] px-3 py-2 text-[12px] text-white/80 outline-none focus:border-white/20 resize-none placeholder:text-white/20",
719
+ className: themeMode === 'light' ? 'w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-[12px] text-gray-800 outline-none focus:border-gray-400 resize-none placeholder:text-gray-400' : 'w-full rounded-lg border border-white/[0.08] bg-white/[0.04] px-3 py-2 text-[12px] text-white/80 outline-none focus:border-white/20 resize-none placeholder:text-white/20',
720
720
  placeholder: "Describe this verification flow...",
721
721
  rows: 3,
722
722
  value: flowDescription,
@@ -729,12 +729,12 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
729
729
  children: [
730
730
  /*#__PURE__*/ _jsx("label", {
731
731
  htmlFor: "vf-create-trigger",
732
- className: themeMode === "light" ? "block text-[11px] font-medium text-gray-500" : "block text-[11px] font-medium text-white/50",
732
+ className: themeMode === 'light' ? 'block text-[11px] font-medium text-gray-500' : 'block text-[11px] font-medium text-white/50',
733
733
  children: "Trigger On"
734
734
  }),
735
735
  /*#__PURE__*/ _jsxs("select", {
736
736
  id: "vf-create-trigger",
737
- className: themeMode === "light" ? "w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-[12px] text-gray-800 outline-none focus:border-gray-400" : "w-full rounded-lg border border-white/[0.08] bg-white/[0.04] px-3 py-2 text-[12px] text-white/80 outline-none focus:border-white/20",
737
+ className: themeMode === 'light' ? 'w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-[12px] text-gray-800 outline-none focus:border-gray-400' : 'w-full rounded-lg border border-white/[0.08] bg-white/[0.04] px-3 py-2 text-[12px] text-white/80 outline-none focus:border-white/20',
738
738
  value: flowTriggerOn,
739
739
  onChange: (e)=>setFlowTriggerOn(e.target.value),
740
740
  children: [
@@ -766,7 +766,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
766
766
  /*#__PURE__*/ _jsx("button", {
767
767
  type: "button",
768
768
  onClick: ()=>setShowCreateForm(false),
769
- className: themeMode === "light" ? "rounded-lg px-3.5 py-1.5 text-[11px] font-medium text-gray-400 hover:text-gray-600 transition-all" : "rounded-lg px-3.5 py-1.5 text-[11px] font-medium text-white/40 hover:text-white/60 transition-all",
769
+ className: themeMode === 'light' ? 'rounded-lg px-3.5 py-1.5 text-[11px] font-medium text-gray-400 hover:text-gray-600 transition-all' : 'rounded-lg px-3.5 py-1.5 text-[11px] font-medium text-white/40 hover:text-white/60 transition-all',
770
770
  children: "Cancel"
771
771
  }),
772
772
  /*#__PURE__*/ _jsx("button", {
@@ -788,14 +788,14 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
788
788
  /*#__PURE__*/ _jsxs("div", {
789
789
  className: "flex items-center gap-3",
790
790
  children: [
791
- viewMode === "list" && onBack && /*#__PURE__*/ _jsx("button", {
791
+ viewMode === 'list' && onBack && /*#__PURE__*/ _jsx("button", {
792
792
  type: "button",
793
793
  onClick: onBack,
794
794
  className: theme.header.backButton,
795
795
  title: "Back",
796
796
  children: backArrowSvg
797
797
  }),
798
- viewMode === "designer" && /*#__PURE__*/ _jsx("button", {
798
+ viewMode === 'designer' && /*#__PURE__*/ _jsx("button", {
799
799
  type: "button",
800
800
  onClick: backToList,
801
801
  className: theme.header.backButton,
@@ -806,29 +806,29 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
806
806
  className: theme.header.title,
807
807
  children: resolvedTitle
808
808
  }),
809
- viewMode === "list" && /*#__PURE__*/ _jsx("span", {
809
+ viewMode === 'list' && /*#__PURE__*/ _jsx("span", {
810
810
  className: theme.header.subtitle,
811
811
  children: resolvedSubtitle
812
812
  }),
813
- viewMode === "list" && (showPending || showEntityStatuses) && /*#__PURE__*/ _jsxs("nav", {
813
+ viewMode === 'list' && (showPending || showEntityStatuses) && /*#__PURE__*/ _jsxs("nav", {
814
814
  className: theme.tabs.container,
815
815
  children: [
816
816
  /*#__PURE__*/ _jsx("button", {
817
817
  type: "button",
818
- className: store.activeTab === "flow" ? theme.tabs.tabActive : theme.tabs.tab,
819
- onClick: ()=>store.setActiveTab("flow"),
818
+ className: store.activeTab === 'flow' ? theme.tabs.tabActive : theme.tabs.tab,
819
+ onClick: ()=>store.setActiveTab('flow'),
820
820
  children: "Flows"
821
821
  }),
822
822
  showPending && /*#__PURE__*/ _jsx("button", {
823
823
  type: "button",
824
- className: store.activeTab === "pending" ? theme.tabs.tabActive : theme.tabs.tab,
825
- onClick: ()=>store.setActiveTab("pending"),
824
+ className: store.activeTab === 'pending' ? theme.tabs.tabActive : theme.tabs.tab,
825
+ onClick: ()=>store.setActiveTab('pending'),
826
826
  children: "Pending"
827
827
  }),
828
828
  showEntityStatuses && entityStatusesAction && /*#__PURE__*/ _jsx("button", {
829
829
  type: "button",
830
- className: store.activeTab === "statuses" ? theme.tabs.tabActive : theme.tabs.tab,
831
- onClick: ()=>store.setActiveTab("statuses"),
830
+ className: store.activeTab === 'statuses' ? theme.tabs.tabActive : theme.tabs.tab,
831
+ onClick: ()=>store.setActiveTab('statuses'),
832
832
  children: "Statuses"
833
833
  })
834
834
  ]
@@ -837,22 +837,22 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
837
837
  }),
838
838
  /*#__PURE__*/ _jsx("div", {
839
839
  className: theme.header.actions,
840
- children: viewMode === "designer" && store.activeTab === "flow" && /*#__PURE__*/ _jsxs(_Fragment, {
840
+ children: viewMode === 'designer' && store.activeTab === 'flow' && /*#__PURE__*/ _jsxs(_Fragment, {
841
841
  children: [
842
842
  /*#__PURE__*/ _jsx("span", {
843
843
  className: "text-[11px] text-white/50 font-medium",
844
- children: flowName || "Untitled Flow"
844
+ children: flowName || 'Untitled Flow'
845
845
  }),
846
846
  selectedFlow?.is_draft !== undefined && /*#__PURE__*/ _jsx("span", {
847
- className: cn("text-[9px] font-medium px-2 py-0.5 rounded-full", selectedFlow?.is_draft ? "bg-amber-500/15 border border-amber-500/20 text-amber-400" : "bg-emerald-500/15 border border-emerald-500/20 text-emerald-400"),
848
- children: selectedFlow?.is_draft ? "Draft" : "Published"
847
+ className: cn('text-[9px] font-medium px-2 py-0.5 rounded-full', selectedFlow?.is_draft ? 'bg-amber-500/15 border border-amber-500/20 text-amber-400' : 'bg-emerald-500/15 border border-emerald-500/20 text-emerald-400'),
848
+ children: selectedFlow?.is_draft ? 'Draft' : 'Published'
849
849
  }),
850
850
  flowSaveAction && /*#__PURE__*/ _jsx("button", {
851
851
  type: "button",
852
852
  onClick: handleSave,
853
853
  disabled: store.isSaving || !store.isDirty,
854
854
  className: store.isDirty ? theme.header.saveButton : theme.header.saveButtonDisabled,
855
- children: store.isSaving ? "Saving..." : "Save"
855
+ children: store.isSaving ? 'Saving...' : 'Save'
856
856
  }),
857
857
  flowPublishAction && selectedFlow?.is_draft && /*#__PURE__*/ _jsx("button", {
858
858
  type: "button",
@@ -871,7 +871,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
871
871
  })
872
872
  ]
873
873
  }),
874
- viewMode === "list" && store.activeTab === "flow" && /*#__PURE__*/ _jsxs("div", {
874
+ viewMode === 'list' && store.activeTab === 'flow' && /*#__PURE__*/ _jsxs("div", {
875
875
  className: theme.flowList.container,
876
876
  children: [
877
877
  store.isLoadingFlows && /*#__PURE__*/ _jsx("div", {
@@ -983,7 +983,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
983
983
  children: [
984
984
  /*#__PURE__*/ _jsx("span", {
985
985
  className: cn(theme.flowList.card.badge, flow.is_draft ? theme.flowList.card.badgeDraft : theme.flowList.card.badgePublished),
986
- children: flow.is_draft ? "Draft" : "Published"
986
+ children: flow.is_draft ? 'Draft' : 'Published'
987
987
  }),
988
988
  flow.trigger_on && /*#__PURE__*/ _jsx("span", {
989
989
  className: theme.flowList.card.triggerBadge,
@@ -1032,7 +1032,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
1032
1032
  })
1033
1033
  ]
1034
1034
  }),
1035
- viewMode === "designer" && store.activeTab === "flow" && /*#__PURE__*/ _jsxs("div", {
1035
+ viewMode === 'designer' && store.activeTab === 'flow' && /*#__PURE__*/ _jsxs("div", {
1036
1036
  className: theme.layout.main,
1037
1037
  children: [
1038
1038
  /*#__PURE__*/ _jsx("aside", {
@@ -1069,8 +1069,8 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
1069
1069
  reactFlowInstance.current = instance;
1070
1070
  },
1071
1071
  deleteKeyCode: [
1072
- "Backspace",
1073
- "Delete"
1072
+ 'Backspace',
1073
+ 'Delete'
1074
1074
  ],
1075
1075
  fitView: true,
1076
1076
  minZoom: 0.2,
@@ -1087,24 +1087,24 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
1087
1087
  className: theme.canvas.background,
1088
1088
  children: [
1089
1089
  /*#__PURE__*/ _jsx(Background, {
1090
- color: themeMode === "dark" ? "rgba(255,255,255,0.03)" : "rgba(0,0,0,0.05)",
1090
+ color: themeMode === 'dark' ? 'rgba(255,255,255,0.03)' : 'rgba(0,0,0,0.05)',
1091
1091
  gap: 24,
1092
1092
  size: 1
1093
1093
  }),
1094
1094
  /*#__PURE__*/ _jsx(Controls, {
1095
1095
  showInteractive: false,
1096
1096
  position: "bottom-right",
1097
- className: themeMode === "dark" ? "!bg-white/[0.04] !border-white/[0.06] !rounded-lg [&>button]:!bg-transparent [&>button]:!border-white/[0.06] [&>button]:!text-white/40 [&>button:hover]:!bg-white/[0.06]" : "!bg-white !border-gray-200 !rounded-lg !shadow-sm [&>button]:!bg-transparent [&>button]:!border-gray-200 [&>button]:!text-gray-400 [&>button:hover]:!bg-gray-50"
1097
+ className: themeMode === 'dark' ? '!bg-white/[0.04] !border-white/[0.06] !rounded-lg [&>button]:!bg-transparent [&>button]:!border-white/[0.06] [&>button]:!text-white/40 [&>button:hover]:!bg-white/[0.06]' : '!bg-white !border-gray-200 !rounded-lg !shadow-sm [&>button]:!bg-transparent [&>button]:!border-gray-200 [&>button]:!text-gray-400 [&>button:hover]:!bg-gray-50'
1098
1098
  }),
1099
1099
  /*#__PURE__*/ _jsx(MiniMap, {
1100
1100
  nodeColor: (node)=>{
1101
- const nt = String(node.data?.nodeType || "step");
1102
- if (nt === "verifier") return "#f59e0b";
1103
- if (nt === "notification") return "#8b5cf6";
1104
- return "#3b82f6";
1101
+ const nt = String(node.data?.nodeType || 'step');
1102
+ if (nt === 'verifier') return '#f59e0b';
1103
+ if (nt === 'notification') return '#8b5cf6';
1104
+ return '#3b82f6';
1105
1105
  },
1106
- maskColor: themeMode === "dark" ? "rgba(0,0,0,0.7)" : "rgba(255,255,255,0.7)",
1107
- className: themeMode === "dark" ? "!bg-white/[0.02] !border-white/[0.06] !rounded-lg" : "!bg-white/80 !border-gray-200 !rounded-lg !shadow-sm"
1106
+ maskColor: themeMode === 'dark' ? 'rgba(0,0,0,0.7)' : 'rgba(255,255,255,0.7)',
1107
+ className: themeMode === 'dark' ? '!bg-white/[0.02] !border-white/[0.06] !rounded-lg' : '!bg-white/80 !border-gray-200 !rounded-lg !shadow-sm'
1108
1108
  })
1109
1109
  ]
1110
1110
  }),
@@ -1117,13 +1117,13 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
1117
1117
  }),
1118
1118
  /*#__PURE__*/ _jsx("p", {
1119
1119
  className: theme.overlay.infoDescription,
1120
- children: selectedFlow.description || "No description"
1120
+ children: selectedFlow.description || 'No description'
1121
1121
  }),
1122
1122
  /*#__PURE__*/ _jsx("div", {
1123
1123
  className: "flex gap-2 mt-2",
1124
1124
  children: /*#__PURE__*/ _jsx("span", {
1125
1125
  className: cn(theme.overlay.badge, selectedFlow.is_draft ? theme.overlay.badgeDraft : theme.overlay.badgePublished),
1126
- children: selectedFlow.is_draft ? "Draft" : "Published"
1126
+ children: selectedFlow.is_draft ? 'Draft' : 'Published'
1127
1127
  })
1128
1128
  })
1129
1129
  ]
@@ -1192,7 +1192,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
1192
1192
  })
1193
1193
  ]
1194
1194
  }),
1195
- store.activeTab === "pending" && showPending && /*#__PURE__*/ _jsx("div", {
1195
+ store.activeTab === 'pending' && showPending && /*#__PURE__*/ _jsx("div", {
1196
1196
  className: "flex-1 overflow-auto p-6",
1197
1197
  children: /*#__PURE__*/ _jsx(PendingTab, {
1198
1198
  pendingAction: pendingAction,
@@ -1200,7 +1200,7 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
1200
1200
  onDecisionMade: onDecisionMade
1201
1201
  })
1202
1202
  }),
1203
- store.activeTab === "statuses" && showEntityStatuses && entityStatusesAction && /*#__PURE__*/ _jsx("div", {
1203
+ store.activeTab === 'statuses' && showEntityStatuses && entityStatusesAction && /*#__PURE__*/ _jsx("div", {
1204
1204
  className: "flex-1 overflow-auto p-6",
1205
1205
  children: /*#__PURE__*/ _jsx(VerificationEntityList, {
1206
1206
  entityName: entityName,