@burdenoff/fluidgrids-fe-sdk 2026.701.8 → 2026.702.1

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,4 +1,4 @@
1
- export { WorkflowBuilder } from './chunk-GX57DKBG.js';
1
+ export { WorkflowBuilder } from './chunk-WPCOE4Z5.js';
2
2
  import './chunk-7VEOUEIN.js';
3
3
  import './chunk-BQXHJIER.js';
4
4
  import './chunk-LUGJJ7LL.js';
@@ -9,5 +9,5 @@ import './chunk-5BDQNSP3.js';
9
9
  import './chunk-WWU2O2SR.js';
10
10
  import './chunk-XQP33UJR.js';
11
11
  import './chunk-Z54K22LP.js';
12
- //# sourceMappingURL=WorkflowBuilder-N6AMMWYX.js.map
13
- //# sourceMappingURL=WorkflowBuilder-N6AMMWYX.js.map
12
+ //# sourceMappingURL=WorkflowBuilder-5D7ZOMHN.js.map
13
+ //# sourceMappingURL=WorkflowBuilder-5D7ZOMHN.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"WorkflowBuilder-N6AMMWYX.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"WorkflowBuilder-5D7ZOMHN.js"}
@@ -18,7 +18,7 @@ import { Handle, Position, getBezierPath, MarkerType, useStore, useReactFlow, ge
18
18
  import { produce } from 'immer';
19
19
  import { nanoid } from 'nanoid/non-secure';
20
20
  import { cn } from '@burdenoff/fe-libs/utils';
21
- import { Textarea, Input, Button, Card, Badge, CardContent as CardContent$1, Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuItem, DropdownMenuSeparator, Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, Popover, PopoverTrigger, PopoverContent, Toaster, Tabs, TabsList, TabsTrigger, TabsContent, CardHeader as CardHeader$1, CardTitle as CardTitle$1, CardDescription as CardDescription$1, ScrollArea, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Label } from '@burdenoff/fe-libs/ui';
21
+ import { Textarea, Input, Button, Card, Badge, CardContent as CardContent$1, Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, DialogDescription, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuItem, DropdownMenuSeparator, Sheet, SheetTrigger, SheetContent, SheetHeader, SheetTitle, Popover, PopoverTrigger, PopoverContent, Toaster, Tabs, TabsList, TabsTrigger, TabsContent, CardHeader as CardHeader$1, CardTitle as CardTitle$1, CardDescription as CardDescription$1, ScrollArea, TooltipProvider, Tooltip, TooltipTrigger, TooltipContent, Label, Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@burdenoff/fe-libs/ui';
22
22
  import { Icon } from '@iconify/react';
23
23
  import * as AdaptiveCards from 'adaptivecards';
24
24
  import { formatDistanceToNow } from 'date-fns';
@@ -7313,6 +7313,19 @@ function ArrayField({
7313
7313
  description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: description })
7314
7314
  ] });
7315
7315
  }
7316
+ function slimNodeDataToCurrentOperation(data) {
7317
+ const nodeData = data.nodeData;
7318
+ if (!nodeData) return data;
7319
+ const opName = data.operation_name;
7320
+ const rawOps = nodeData.operations;
7321
+ const opsArray = Array.isArray(rawOps) ? rawOps : Array.isArray(rawOps?.operations) ? rawOps.operations : [];
7322
+ const current = opName ? opsArray.find((o) => o?.name === opName) : void 0;
7323
+ if (!current) {
7324
+ const { nodeData: _omit, ...rest } = data;
7325
+ return rest;
7326
+ }
7327
+ return { ...data, nodeData: { ...nodeData, operations: [current] } };
7328
+ }
7316
7329
  function useSaveWorkflow() {
7317
7330
  const [isSaving, setIsSaving] = useState(false);
7318
7331
  const params = useParams();
@@ -7335,9 +7348,12 @@ function useSaveWorkflow() {
7335
7348
  const preparedWorkflow = {
7336
7349
  ...workflow,
7337
7350
  nodes: workflow.nodes?.map((n) => {
7338
- const { nodeData: _ignoredNodeData, ...flattenedData } = n.data ?? {};
7339
- void _ignoredNodeData;
7340
- return { ...n, ...flattenedData };
7351
+ const slimData = slimNodeDataToCurrentOperation(
7352
+ n.data ?? {}
7353
+ );
7354
+ const { nodeData: _slimNodeData, ...flattenedData } = slimData;
7355
+ void _slimNodeData;
7356
+ return { ...n, data: slimData, ...flattenedData };
7341
7357
  })
7342
7358
  };
7343
7359
  const definitionJson = {
@@ -8773,7 +8789,7 @@ var getNodeMetadata = (value) => {
8773
8789
  }, [data?.isAdapterInstance, edges, id, nodeLookup]);
8774
8790
  const nodeType = value?.type;
8775
8791
  const meta = useMemo(() => getNodeDetail(nodeType), [nodeType]);
8776
- const { updateNode, getNode, setNodes } = useReactFlow();
8792
+ const { setNodes } = useReactFlow();
8777
8793
  const [
8778
8794
  showNodePropertiesOf,
8779
8795
  isExecuting,
@@ -8859,44 +8875,15 @@ var getNodeMetadata = (value) => {
8859
8875
  const explicitRole = data.args?.state?.role;
8860
8876
  const isAction = explicitRole === "action" || !explicitRole && edges.some((e) => e.target === id);
8861
8877
  return isAction ? "Send Message" : "Receive Messages";
8862
- })() : "Store & Forward" }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
8863
- /* @__PURE__ */ jsx("div", { className: "flex flex-col p-4", children: /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-card-foreground", children: "Select Operation" }) }),
8864
- value?.operations && /* @__PURE__ */ jsx("div", { className: "space-y-4 ", children: /* @__PURE__ */ jsxs(
8865
- Select,
8866
- {
8867
- value: data?.operation_name,
8868
- onValueChange: (val) => {
8869
- const op = value?.operations?.find(
8870
- (operation) => operation.name === val
8871
- );
8872
- if (op) {
8873
- updateNode(id, {
8874
- data: {
8875
- ...getNode(id)?.data,
8876
- operation_name: op.name,
8877
- operation_type: op.type,
8878
- args: {
8879
- state: { ...op?.adaptive_card?.defaultValue },
8880
- context: getNode(id)?.data?.args?.context
8881
- }
8882
- }
8883
- });
8884
- }
8885
- },
8886
- children: [
8887
- /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select Operation" }) }),
8888
- /* @__PURE__ */ jsx(SelectContent, { children: value?.operations?.map((operation) => /* @__PURE__ */ jsx(
8889
- SelectItem,
8890
- {
8891
- value: operation.name,
8892
- children: operation.name
8893
- },
8894
- operation.name
8895
- )) })
8896
- ]
8897
- }
8898
- ) })
8899
- ] }),
8878
+ })() : "Store & Forward" }) }) : (
8879
+ // Operation is chosen in the Node Store (drag a specific
8880
+ // operation onto the canvas), so the card just shows which one
8881
+ // this node is pinned to — no in-card operation dropdown.
8882
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col p-4", children: [
8883
+ /* @__PURE__ */ jsx("div", { className: "text-xs font-medium text-muted-foreground", children: "Operation" }),
8884
+ /* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-card-foreground mt-0.5 truncate", children: data?.operation_name || "Not configured" })
8885
+ ] })
8886
+ ),
8900
8887
  /* @__PURE__ */ jsx(NodeCardDescription, { description: meta?.description ?? "" }),
8901
8888
  /* @__PURE__ */ jsx(NodeCardFooter, { nodeId: id })
8902
8889
  ] }),
@@ -11453,6 +11440,7 @@ gql$1`
11453
11440
 
11454
11441
  // src/builder/contants/symbols.ts
11455
11442
  var NODE_TYPE_DRAG_DATA_FORMAT = "application/flow-builder.node-type";
11443
+ var NODE_OPERATION_DRAG_DATA_FORMAT = "application/flow-builder.node-operation";
11456
11444
  function StoreNodeListItem({
11457
11445
  name,
11458
11446
  description,
@@ -11852,6 +11840,99 @@ var UninstallNodeDialog = ({
11852
11840
  ] })
11853
11841
  ] }) });
11854
11842
  };
11843
+ function isTriggerOperation(op) {
11844
+ return op.role === "trigger" || !!op.delivery || op.type === "subscription";
11845
+ }
11846
+ function StoreNodeOperations({ nodeType }) {
11847
+ const [, bump] = useState(0);
11848
+ useEffect(() => onNodeTypesUpdate(() => bump((n) => n + 1)), []);
11849
+ const config2 = nodeType ? NODE_CONFIGS.find((c) => c.type === nodeType) : void 0;
11850
+ const operations = config2?.operations ?? [];
11851
+ const handleDragStart = useCallback(
11852
+ (e, opName) => {
11853
+ if (!nodeType) return;
11854
+ e.dataTransfer.setData(NODE_TYPE_DRAG_DATA_FORMAT, nodeType);
11855
+ if (opName)
11856
+ e.dataTransfer.setData(NODE_OPERATION_DRAG_DATA_FORMAT, opName);
11857
+ e.dataTransfer.effectAllowed = "move";
11858
+ },
11859
+ [nodeType]
11860
+ );
11861
+ if (!nodeType) return null;
11862
+ if (operations.length === 0) {
11863
+ return /* @__PURE__ */ jsx("div", { className: "px-3 pt-3 pb-1", children: /* @__PURE__ */ jsxs(
11864
+ "button",
11865
+ {
11866
+ draggable: true,
11867
+ onDragStart: (e) => handleDragStart(e),
11868
+ title: "Drag to add to canvas",
11869
+ className: "w-full flex items-center gap-2.5 px-2 py-2 rounded-md hover:bg-muted/60 transition-colors text-left group",
11870
+ style: { cursor: "grab" },
11871
+ children: [
11872
+ /* @__PURE__ */ jsx("div", { className: "size-7 shrink-0 rounded-md bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsx(Icon, { icon: "mynaui:plus", className: "size-3.5 text-primary" }) }),
11873
+ /* @__PURE__ */ jsx("span", { className: "flex-1 text-sm font-medium text-foreground group-hover:text-primary transition-colors", children: "Add to canvas" }),
11874
+ /* @__PURE__ */ jsx(
11875
+ Icon,
11876
+ {
11877
+ icon: "mynaui:drag-dots-vertical",
11878
+ className: "size-4 shrink-0 text-foreground/40 group-hover:text-primary transition-colors"
11879
+ }
11880
+ )
11881
+ ]
11882
+ }
11883
+ ) });
11884
+ }
11885
+ return /* @__PURE__ */ jsxs("div", { className: "px-3 pt-3 pb-1", children: [
11886
+ /* @__PURE__ */ jsx("p", { className: "px-1 pb-2 text-xs font-medium text-muted-foreground", children: "Operations \u2014 drag one onto the canvas" }),
11887
+ /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children: operations.map((op) => {
11888
+ const isTrigger = isTriggerOperation(op);
11889
+ return /* @__PURE__ */ jsxs(
11890
+ "button",
11891
+ {
11892
+ draggable: true,
11893
+ onDragStart: (e) => handleDragStart(e, op.name),
11894
+ title: `${op.name} \u2014 drag to add to canvas`,
11895
+ className: "w-full flex items-center gap-2.5 px-2 py-2 rounded-md hover:bg-muted/60 transition-colors text-left group",
11896
+ style: { cursor: "grab" },
11897
+ children: [
11898
+ /* @__PURE__ */ jsx("div", { className: "size-7 shrink-0 rounded-md bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsx(
11899
+ Icon,
11900
+ {
11901
+ icon: isTrigger ? "solar:play-bold" : "mynaui:bolt",
11902
+ className: "size-3.5 text-primary"
11903
+ }
11904
+ ) }),
11905
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
11906
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
11907
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-foreground group-hover:text-primary transition-colors truncate", children: op.name }),
11908
+ /* @__PURE__ */ jsx(
11909
+ "span",
11910
+ {
11911
+ className: "shrink-0 inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-semibold",
11912
+ style: {
11913
+ background: isTrigger ? "var(--color-status-info-bgSubtle)" : "var(--color-status-neutral-bgSubtle, var(--muted))",
11914
+ color: isTrigger ? "var(--color-status-info-text)" : "var(--muted-foreground)"
11915
+ },
11916
+ children: isTrigger ? "Trigger" : "Action"
11917
+ }
11918
+ )
11919
+ ] }),
11920
+ op.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground truncate mt-0.5 leading-snug", children: op.description })
11921
+ ] }),
11922
+ /* @__PURE__ */ jsx(
11923
+ Icon,
11924
+ {
11925
+ icon: "mynaui:drag-dots-vertical",
11926
+ className: "size-4 shrink-0 text-foreground/40 group-hover:text-primary transition-colors"
11927
+ }
11928
+ )
11929
+ ]
11930
+ },
11931
+ op.name
11932
+ );
11933
+ }) })
11934
+ ] });
11935
+ }
11855
11936
  function formatDownloads(count2) {
11856
11937
  if (count2 >= 1e6) return `${(count2 / 1e6).toFixed(1)}M`;
11857
11938
  if (count2 >= 1e3) return `${(count2 / 1e3).toFixed(1)}k`;
@@ -11877,6 +11958,8 @@ function StoreNodeDetail({ node, onBack }) {
11877
11958
  const context = useContext(FluidGridsContext);
11878
11959
  const workspaceId = context?.workspaceId ?? getFluidGridsConfig().workspaceId;
11879
11960
  const isInstalled = installedAppIds.has(node.id);
11961
+ const manifestNodeType = node.manifest?.nodeType;
11962
+ const nodeType = manifestNodeType ?? (isInstalled ? `store/${node.slug}` : void 0);
11880
11963
  const installation = installationsMap.get(node.id);
11881
11964
  const installedVersion = installation?.installedVersion;
11882
11965
  const installationId = installation?.installationId;
@@ -12093,6 +12176,7 @@ function StoreNodeDetail({ node, onBack }) {
12093
12176
  ] })
12094
12177
  ] }),
12095
12178
  node.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/80 leading-relaxed mb-4", children: node.description }),
12179
+ isInstalled && /* @__PURE__ */ jsx("div", { className: "mb-4 -mx-3 rounded-lg border border-border/50", children: /* @__PURE__ */ jsx(StoreNodeOperations, { nodeType }) }),
12096
12180
  node.publisher && /* @__PURE__ */ jsxs("div", { className: "mb-4 p-2.5 rounded-lg bg-muted/50 flex items-center gap-2", children: [
12097
12181
  /* @__PURE__ */ jsx("div", { className: "size-6 rounded bg-muted flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-muted-foreground", children: node.publisher.name.charAt(0) }) }),
12098
12182
  /* @__PURE__ */ jsx("span", { className: "text-xs text-foreground font-medium flex-1 min-w-0 truncate", children: node.publisher.name }),
@@ -19132,10 +19216,31 @@ var useAddNodeOnEdgeDropStore = create()(
19132
19216
  }
19133
19217
  })
19134
19218
  );
19219
+ function buildOperationSeed(type, operationName, existingData) {
19220
+ const config2 = NODE_CONFIGS.find((c) => c.type === type);
19221
+ if (!config2) return null;
19222
+ const operations = config2.operations ?? [];
19223
+ const op = operations.find((o) => o.name === operationName);
19224
+ if (!op) return null;
19225
+ const manifest = config2.defaultData?.nodeData;
19226
+ const prevArgs = existingData.args ?? {};
19227
+ return {
19228
+ ...existingData,
19229
+ operation_name: op.name,
19230
+ operation_type: op.type,
19231
+ args: {
19232
+ // Preserve default context/credentials; seed state from the op defaults.
19233
+ ...prevArgs,
19234
+ state: { ...op.adaptive_card?.defaultValue ?? {} }
19235
+ },
19236
+ // Slim manifest: keep node-level metadata but only the pinned operation.
19237
+ nodeData: { ...manifest ?? {}, operations: [op] }
19238
+ };
19239
+ }
19135
19240
  function useInsertNode() {
19136
19241
  const { addNodes, screenToFlowPosition, getNodes, updateNode } = useReactFlow();
19137
19242
  return useCallback(
19138
- (type, pos) => {
19243
+ (type, pos, operationName) => {
19139
19244
  const _pos = pos || screenToFlowPosition({
19140
19245
  x: window.innerWidth / 2,
19141
19246
  y: window.innerHeight / 2
@@ -19149,6 +19254,14 @@ function useInsertNode() {
19149
19254
  position: _pos,
19150
19255
  selected: true
19151
19256
  });
19257
+ if (operationName) {
19258
+ const seeded = buildOperationSeed(
19259
+ type,
19260
+ operationName,
19261
+ newNode.data ?? {}
19262
+ );
19263
+ if (seeded) newNode.data = seeded;
19264
+ }
19152
19265
  addNodes(newNode);
19153
19266
  return newNode;
19154
19267
  },
@@ -19254,12 +19367,14 @@ function useDragDropFlowBuilder() {
19254
19367
  e.preventDefault();
19255
19368
  const type = e.dataTransfer.getData(NODE_TYPE_DRAG_DATA_FORMAT);
19256
19369
  if (typeof type === "undefined" || !type) return;
19370
+ const operationName = e.dataTransfer.getData(NODE_OPERATION_DRAG_DATA_FORMAT) || void 0;
19257
19371
  insertNode(
19258
19372
  type,
19259
19373
  screenToFlowPosition({
19260
19374
  x: e.clientX,
19261
19375
  y: e.clientY
19262
- })
19376
+ }),
19377
+ operationName
19263
19378
  );
19264
19379
  },
19265
19380
  [insertNode, screenToFlowPosition]
@@ -19550,9 +19665,12 @@ function AddNodeFloatingMenu({
19550
19665
  };
19551
19666
  });
19552
19667
  const fromHandleId = _incomingNodeMetadetails?.fromHandle?.id;
19668
+ const connectableNodes = AVAILABLE_NODES.filter(
19669
+ (node) => node.publishType !== "STORE"
19670
+ );
19553
19671
  return {
19554
19672
  availableNodes: mapNodesWithMetadata(
19555
- fromHandleId === "source" || fromHandleId === "target" ? AVAILABLE_NODES.map((node) => node.type) : AVAILABLE_NODES.filter(
19673
+ fromHandleId === "source" || fromHandleId === "target" ? connectableNodes.map((node) => node.type) : connectableNodes.filter(
19556
19674
  (node) => node?.manifest?.kind?.includes(fromHandleId ?? "")
19557
19675
  ).map((node) => node.type)
19558
19676
  ),
@@ -22036,5 +22154,5 @@ function WorkflowBuilder() {
22036
22154
  }
22037
22155
 
22038
22156
  export { Card2 as Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ConfigSchemaForm, ConnectionFormDialog, ConnectionSelector, FluidGridsProvider, ProviderPicker, TemplateCard, WorkflowBuilder, getProviderForm, listCustomBlocks, refetchStoreNodes, registerCustomBlock, resolveUiSpec, stripSubmitActions, useConnection, useConnectionDialog, useConnections, useConnectionsByProvider, useCreateConnection, useFluidGridsContext, useImportWorkflowTemplate, useInitiateOAuth, useNodeExecution, useProviderByKey, useProviderCatalog, useProviders, useWorkflowTemplates };
22039
- //# sourceMappingURL=chunk-GX57DKBG.js.map
22040
- //# sourceMappingURL=chunk-GX57DKBG.js.map
22157
+ //# sourceMappingURL=chunk-WPCOE4Z5.js.map
22158
+ //# sourceMappingURL=chunk-WPCOE4Z5.js.map