@burdenoff/fluidgrids-fe-sdk 2026.801.1 → 2026.801.3

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,6 +1,6 @@
1
1
  import { getGlobalStoreClient } from './chunk-BQXHJIER.js';
2
2
  import { GetMyNodeInstallationsDocument } from './chunk-PNOA7CQV.js';
3
- import { useFlowStore } from './chunk-KU64CCSV.js';
3
+ import { useFlowStore } from './chunk-WSBRI47P.js';
4
4
  import { SdkPermissionGate, FLUIDGRIDS_PERMISSIONS } from './chunk-UIY2HBWA.js';
5
5
  import { NodeEndpointConfigsDocument, NodeManifestDocument, throwIfResultError, UpdateWorkflowDefinitionDocument, CreateWorkflowDefinitionDocument, CreateWorkflowVersionDocument, TriggerWorkflowDocument, describeOperationError, WorkflowRunDocument } from './chunk-XEYNX7YJ.js';
6
6
  import { waitForFluidGridsClient, getFluidGridsClient } from './chunk-5BDQNSP3.js';
@@ -409,6 +409,7 @@ var NodeCard = React.forwardRef(
409
409
  top: -15,
410
410
  transform: hovered ? "translateY(0)" : "translateY(4px)"
411
411
  },
412
+ onClick: (e) => e.stopPropagation(),
412
413
  onDoubleClick: (e) => e.stopPropagation(),
413
414
  children: [
414
415
  onSettings && /* @__PURE__ */ jsx(ToolbarButton2, { title: "Configure", onClick: onSettings, children: /* @__PURE__ */ jsx(Icon, { icon: "lucide:sliders-horizontal", className: "size-4" }) }),
@@ -617,13 +618,8 @@ function CustomHandle({
617
618
  }
618
619
  ) });
619
620
  }
620
- var TONE_COLORS = {
621
- success: "var(--color-status-success-text)",
622
- error: "var(--color-status-error-text)",
623
- warning: "var(--color-status-warning-text)",
624
- info: "#3b82f6",
625
- neutral: "var(--muted-foreground, #6b7280)"
626
- };
621
+
622
+ // src/builder/components/flow-builder/components/blocks/nodes/node/handle-spec.ts
627
623
  function isDynamicSpec(spec) {
628
624
  return !!spec && !Array.isArray(spec) && typeof spec.fromStateRecord === "string";
629
625
  }
@@ -641,6 +637,98 @@ function resolveOutputHandles(data) {
641
637
  if (spec.length === 0) return DEFAULT_HANDLES;
642
638
  return spec;
643
639
  }
640
+ var DEFAULT_INPUT_HANDLES = [{ id: "target", label: "" }];
641
+ function resolveInputHandles(data) {
642
+ const nodeData = data?.nodeData;
643
+ const spec = nodeData?.inputHandles ?? nodeData?.operations?.inputHandles;
644
+ if (!Array.isArray(spec) || spec.length === 0) return DEFAULT_INPUT_HANDLES;
645
+ return spec;
646
+ }
647
+ function outputHandlesSpacerHeight(count) {
648
+ return count > 2 ? (count - 2) * 26 : 0;
649
+ }
650
+ var TONE_COLORS = {
651
+ success: "var(--color-status-success-text)",
652
+ error: "var(--color-status-error-text)",
653
+ warning: "var(--color-status-warning-text)",
654
+ info: "#3b82f6",
655
+ neutral: "var(--muted-foreground, #6b7280)"
656
+ };
657
+ function HandlePlusStub({
658
+ nodeId,
659
+ handleId,
660
+ color,
661
+ isConnectable,
662
+ isOnlyHandle,
663
+ anchor
664
+ }) {
665
+ const startAttach = useFlowStore((s) => s.actions.pendingConnection.start);
666
+ const isArmedHere = useFlowStore(
667
+ (s) => s.workflow.pendingConnection?.nodeId === nodeId && s.workflow.pendingConnection?.handleId === handleId
668
+ );
669
+ const hasOutgoing = useStore(
670
+ (s) => s.edges.some(
671
+ (e) => e.source === nodeId && (e.sourceHandle === handleId || isOnlyHandle && (e.sourceHandle === null || e.sourceHandle === void 0))
672
+ )
673
+ );
674
+ if (hasOutgoing || isConnectable === false) return null;
675
+ const containerStyle = anchor === "card" ? {
676
+ left: "100%",
677
+ top: "50%",
678
+ transform: "translateY(-50%)",
679
+ marginLeft: 10
680
+ } : { left: 10, top: 0, transform: "translateY(-50%)" };
681
+ return /* @__PURE__ */ jsxs(
682
+ "div",
683
+ {
684
+ className: "nodrag nopan absolute flex items-center",
685
+ style: { ...containerStyle, pointerEvents: "none", zIndex: 5 },
686
+ children: [
687
+ /* @__PURE__ */ jsx(
688
+ "div",
689
+ {
690
+ style: {
691
+ width: 16,
692
+ borderTop: `1.5px dashed ${color}`,
693
+ opacity: 0.5
694
+ }
695
+ }
696
+ ),
697
+ /* @__PURE__ */ jsx(
698
+ "button",
699
+ {
700
+ type: "button",
701
+ title: "Add next node",
702
+ "aria-label": `Add next node from ${handleId}`,
703
+ "data-testid": `handle-plus-${nodeId}-${handleId}`,
704
+ onClick: (e) => {
705
+ e.stopPropagation();
706
+ startAttach({ nodeId, handleId });
707
+ },
708
+ onDoubleClick: (e) => e.stopPropagation(),
709
+ onMouseDown: (e) => e.stopPropagation(),
710
+ className: "cursor-pointer transition-transform hover:scale-110",
711
+ style: {
712
+ pointerEvents: "all",
713
+ width: 16,
714
+ height: 16,
715
+ borderRadius: "50%",
716
+ display: "flex",
717
+ alignItems: "center",
718
+ justifyContent: "center",
719
+ border: `1.5px solid ${color}`,
720
+ background: isArmedHere ? color : "var(--card, #fff)",
721
+ color: isArmedHere ? "var(--card, #fff)" : color,
722
+ boxShadow: isArmedHere ? `0 0 0 3px color-mix(in srgb, ${color} 22%, transparent)` : `0 0 0 2px color-mix(in srgb, ${color} 10%, transparent)`,
723
+ transition: "transform .12s ease, background .12s ease, color .12s ease"
724
+ },
725
+ children: /* @__PURE__ */ jsx(Icon, { icon: "mdi:plus", className: "size-2.5" })
726
+ }
727
+ )
728
+ ]
729
+ }
730
+ );
731
+ }
644
732
  function OutputHandles({
645
733
  nodeId,
646
734
  handles,
@@ -657,16 +745,30 @@ function OutputHandles({
657
745
  }, [nodeId, signature, updateNodeInternals]);
658
746
  if (handles.length === 1) {
659
747
  const handle = handles[0];
660
- return /* @__PURE__ */ jsx(
661
- CustomHandle,
662
- {
663
- type: "source",
664
- id: handle.id,
665
- position: Position.Right,
666
- isConnectable,
667
- accent: handle.tone ? TONE_COLORS[handle.tone] : accent
668
- }
669
- );
748
+ const color = handle.tone ? TONE_COLORS[handle.tone] : accent;
749
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
750
+ /* @__PURE__ */ jsx(
751
+ CustomHandle,
752
+ {
753
+ type: "source",
754
+ id: handle.id,
755
+ position: Position.Right,
756
+ isConnectable,
757
+ accent: color
758
+ }
759
+ ),
760
+ /* @__PURE__ */ jsx(
761
+ HandlePlusStub,
762
+ {
763
+ nodeId,
764
+ handleId: handle.id,
765
+ color,
766
+ isConnectable,
767
+ isOnlyHandle: true,
768
+ anchor: "card"
769
+ }
770
+ )
771
+ ] });
670
772
  }
671
773
  const total = handles.length;
672
774
  return /* @__PURE__ */ jsx(Fragment, { children: handles.map((handle, index) => {
@@ -692,16 +794,21 @@ function OutputHandles({
692
794
  "span",
693
795
  {
694
796
  className: "pointer-events-none absolute whitespace-nowrap text-[10px] font-medium leading-none",
695
- style: {
696
- color,
697
- left: "100%",
698
- marginLeft: 16,
699
- top: "50%",
700
- transform: "translateY(-50%)"
701
- },
797
+ style: { color, left: 12, bottom: 8 },
702
798
  title: handle.label,
703
799
  children: handle.label
704
800
  }
801
+ ),
802
+ /* @__PURE__ */ jsx(
803
+ HandlePlusStub,
804
+ {
805
+ nodeId,
806
+ handleId: handle.id,
807
+ color,
808
+ isConnectable,
809
+ isOnlyHandle: false,
810
+ anchor: "point"
811
+ }
705
812
  )
706
813
  ]
707
814
  },
@@ -709,13 +816,6 @@ function OutputHandles({
709
816
  );
710
817
  }) });
711
818
  }
712
- var DEFAULT_INPUT_HANDLES = [{ id: "target", label: "" }];
713
- function resolveInputHandles(data) {
714
- const nodeData = data?.nodeData;
715
- const spec = nodeData?.inputHandles ?? nodeData?.operations?.inputHandles;
716
- if (!Array.isArray(spec) || spec.length === 0) return DEFAULT_INPUT_HANDLES;
717
- return spec;
718
- }
719
819
  function InputHandles({
720
820
  nodeId,
721
821
  handles,
@@ -784,9 +884,6 @@ function InputHandles({
784
884
  );
785
885
  }) });
786
886
  }
787
- function outputHandlesSpacerHeight(count) {
788
- return count > 2 ? (count - 2) * 26 : 0;
789
- }
790
887
  function LogicNodeCard({
791
888
  title,
792
889
  subtitle,
@@ -801,6 +898,7 @@ function LogicNodeCard({
801
898
  inputHandles,
802
899
  outputHandles,
803
900
  isConnectable,
901
+ onClick,
804
902
  onDoubleClick,
805
903
  onSettings,
806
904
  onExecute,
@@ -817,6 +915,7 @@ function LogicNodeCard({
817
915
  className: "w-48",
818
916
  "data-selected": selected,
819
917
  selected,
918
+ onClick,
820
919
  onDoubleClick,
821
920
  executionStatus,
822
921
  itemCount,
@@ -10187,9 +10286,10 @@ function SubNodeComponent({
10187
10286
  ] })
10188
10287
  );
10189
10288
  }
10289
+ var SINGLE_CLICK_DELAY_MS = 230;
10190
10290
  var getNodeMetadata = (value) => {
10191
10291
  function NodeComponent(props) {
10192
- const { id, isConnectable, selected, data } = props;
10292
+ const { id, isConnectable, selected, data, dragging } = props;
10193
10293
  const { edges, nodeLookup } = useStore(({ edges: edges2, nodeLookup: nodeLookup2 }) => ({
10194
10294
  edges: edges2,
10195
10295
  nodeLookup: nodeLookup2
@@ -10252,7 +10352,46 @@ var getNodeMetadata = (value) => {
10252
10352
  deleteNode(id);
10253
10353
  };
10254
10354
  const openNdv = useFlowStore((s) => s.actions.ndv.open);
10355
+ const openQuickConfig = useFlowStore((s) => s.actions.quickConfig.open);
10356
+ const { getNode, flowToScreenPosition } = useReactFlow();
10357
+ const clickTimerRef = useRef(null);
10358
+ const wasDraggedRef = useRef(false);
10359
+ useEffect(() => {
10360
+ if (dragging) wasDraggedRef.current = true;
10361
+ }, [dragging]);
10362
+ useEffect(
10363
+ () => () => {
10364
+ if (clickTimerRef.current !== null)
10365
+ window.clearTimeout(clickTimerRef.current);
10366
+ },
10367
+ []
10368
+ );
10369
+ const handleCardClick = useCallback(() => {
10370
+ if (wasDraggedRef.current) {
10371
+ wasDraggedRef.current = false;
10372
+ return;
10373
+ }
10374
+ if (clickTimerRef.current !== null)
10375
+ window.clearTimeout(clickTimerRef.current);
10376
+ clickTimerRef.current = window.setTimeout(() => {
10377
+ clickTimerRef.current = null;
10378
+ const current = getNode(id);
10379
+ const anchor = current ? flowToScreenPosition({
10380
+ x: current.position.x + (current.measured?.width ?? 288) + 24,
10381
+ y: current.position.y
10382
+ }) : void 0;
10383
+ openQuickConfig({
10384
+ nodeId: id,
10385
+ type: value?.type,
10386
+ anchor
10387
+ });
10388
+ }, SINGLE_CLICK_DELAY_MS);
10389
+ }, [getNode, flowToScreenPosition, id, openQuickConfig]);
10255
10390
  const handleOpenNdv = useCallback(() => {
10391
+ if (clickTimerRef.current !== null) {
10392
+ window.clearTimeout(clickTimerRef.current);
10393
+ clickTimerRef.current = null;
10394
+ }
10256
10395
  openNdv({ nodeId: id, type: value?.type });
10257
10396
  }, [id, openNdv]);
10258
10397
  const handleExecuteStep = useCallback(() => {
@@ -10327,6 +10466,7 @@ var getNodeMetadata = (value) => {
10327
10466
  inputHandles,
10328
10467
  outputHandles,
10329
10468
  isConnectable: typeof isConnectable === "boolean" ? isConnectable : void 0,
10469
+ onClick: handleCardClick,
10330
10470
  onDoubleClick: handleOpenNdv,
10331
10471
  onSettings: handleOpenNdv,
10332
10472
  onExecute: handleExecuteStep,
@@ -10349,6 +10489,7 @@ var getNodeMetadata = (value) => {
10349
10489
  {
10350
10490
  "data-selected": selected,
10351
10491
  selected,
10492
+ onClick: handleCardClick,
10352
10493
  onDoubleClick: handleOpenNdv,
10353
10494
  executionStatus,
10354
10495
  itemCount,
@@ -10722,6 +10863,6 @@ function registerWorkflowNodeTypes(workflowNodes) {
10722
10863
  }
10723
10864
  }
10724
10865
 
10725
- export { AVAILABLE_NODES, ConfigSchemaForm, ConnectionFormDialog, ConnectionSelector, NODES, NODES_METADATA, NODE_CONFIGS, NODE_OPERATION_DRAG_DATA_FORMAT, NODE_TYPES, NODE_TYPE_DRAG_DATA_FORMAT, NodePropertyPanel, ProviderPicker, STICKY_NOTE_TYPE, buildStickyNode, ensureNodeConfigsLoaded, fetchNodeManifest, getNodeDetail, getNodeMetadata, getProviderForm, isNodeConfigsInitialized, listCustomBlocks, mergeStickyNotes, onNodeTypesUpdate, refetchStoreNodes, registerCustomBlock, registerWorkflowNodeTypes, resolveUiSpec, stripSubmitActions, useConnection, useConnectionDialog, useConnections, useConnectionsByProvider, useCreateConnection, useInitiateOAuth, useInsertNode, useNodeExecution, useProviderByKey, useProviderCatalog, useProviders, useSaveWorkflow };
10726
- //# sourceMappingURL=chunk-IVKT244I.js.map
10727
- //# sourceMappingURL=chunk-IVKT244I.js.map
10866
+ export { AVAILABLE_NODES, ConfigSchemaForm, ConnectionFormDialog, ConnectionSelector, NODES, NODES_METADATA, NODE_CONFIGS, NODE_OPERATION_DRAG_DATA_FORMAT, NODE_TYPES, NODE_TYPE_DRAG_DATA_FORMAT, NodePropertyPanel, ProviderPicker, STICKY_NOTE_TYPE, buildStickyNode, ensureNodeConfigsLoaded, fetchNodeManifest, getNodeDetail, getNodeMetadata, getProviderForm, isNodeConfigsInitialized, listCustomBlocks, mergeStickyNotes, nodeAccent, onNodeTypesUpdate, refetchStoreNodes, registerCustomBlock, registerWorkflowNodeTypes, resolveInputHandles, resolveUiSpec, stripSubmitActions, useConnection, useConnectionDialog, useConnections, useConnectionsByProvider, useCreateConnection, useInitiateOAuth, useInsertNode, useNodeExecution, useProviderByKey, useProviderCatalog, useProviders, useSaveWorkflow };
10867
+ //# sourceMappingURL=chunk-AI5S3GO5.js.map
10868
+ //# sourceMappingURL=chunk-AI5S3GO5.js.map