@motiadev/workbench 0.0.16 → 0.0.17

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.
Files changed (42) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.js +0 -1
  3. package/dist/src/components/app-sidebar.js +3 -4
  4. package/dist/src/components/log-level-badge.d.ts +1 -0
  5. package/dist/src/components/ui/badge.d.ts +2 -2
  6. package/dist/src/components/ui/badge.js +1 -2
  7. package/dist/src/components/ui/button.d.ts +2 -2
  8. package/dist/src/components/ui/button.js +1 -2
  9. package/dist/src/components/ui/collapsible.d.ts +1 -1
  10. package/dist/src/components/ui/collapsible.js +1 -1
  11. package/dist/src/components/ui/dialog.d.ts +2 -2
  12. package/dist/src/components/ui/dialog.js +12 -12
  13. package/dist/src/components/ui/label.d.ts +3 -3
  14. package/dist/src/components/ui/label.js +6 -6
  15. package/dist/src/components/ui/select.d.ts +2 -2
  16. package/dist/src/components/ui/select.js +14 -15
  17. package/dist/src/components/ui/sidebar.d.ts +1 -12
  18. package/dist/src/components/ui/sidebar.js +1 -1
  19. package/dist/src/components/ui/skeleton.d.ts +1 -0
  20. package/dist/src/components/ui/switch.d.ts +2 -2
  21. package/dist/src/components/ui/switch.js +4 -4
  22. package/dist/src/components/ui/textarea.d.ts +1 -1
  23. package/dist/src/components/ui/textarea.js +4 -4
  24. package/dist/src/main.js +1 -1
  25. package/dist/src/publicComponents/base-node.d.ts +1 -1
  26. package/dist/src/publicComponents/emits.d.ts +1 -0
  27. package/dist/src/publicComponents/subscribe.d.ts +1 -0
  28. package/dist/src/route-wrapper.d.ts +2 -3
  29. package/dist/src/routes/flow.js +1 -1
  30. package/dist/src/views/flow/flow-view.d.ts +1 -0
  31. package/dist/src/views/flow/flow-view.js +1 -1
  32. package/dist/src/views/flow/hooks/use-get-flow-state.d.ts +2 -1
  33. package/dist/src/views/flow/hooks/use-get-flow-state.js +4 -2
  34. package/dist/src/views/flow/node-organizer.d.ts +1 -0
  35. package/dist/src/views/flow/node-organizer.js +1 -1
  36. package/dist/tailwind.config.js +2 -1
  37. package/dist/tsconfig.app.tsbuildinfo +1 -1
  38. package/dist/tsconfig.node.tsbuildinfo +1 -1
  39. package/dist/vite.config.js +1 -1
  40. package/package.json +6 -9
  41. package/dist/src/views/flow/nodes/json-schema-form.d.ts +0 -8
  42. package/dist/src/views/flow/nodes/json-schema-form.js +0 -35
package/dist/index.d.ts CHANGED
@@ -5,5 +5,5 @@ export { BaseNode } from './src/publicComponents/base-node';
5
5
  export { BaseHandle } from './src/publicComponents/base-handle';
6
6
  export { Position } from '@xyflow/react';
7
7
  export type { EventNodeData, ApiNodeData } from './src/views/flow/nodes/nodes.types';
8
- export * from './src/publicComponents/node-props';
8
+ export type { ApiNodeProps, BaseNodeProps, CronNodeProps, EventNodeProps, NoopNodeProps, } from './src/publicComponents/node-props';
9
9
  export { Button } from './src/components/ui/button';
package/dist/index.js CHANGED
@@ -4,5 +4,4 @@ export { NoopNode } from './src/publicComponents/noop-node';
4
4
  export { BaseNode } from './src/publicComponents/base-node';
5
5
  export { BaseHandle } from './src/publicComponents/base-handle';
6
6
  export { Position } from '@xyflow/react';
7
- export * from './src/publicComponents/node-props';
8
7
  export { Button } from './src/components/ui/button';
@@ -1,12 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useListFlows } from '@/hooks/use-list-flows';
3
3
  import { Workflow } from 'lucide-react';
4
- import { Link } from 'react-router-dom';
4
+ import { Link, useLocation } from 'react-router';
5
5
  import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, } from './ui/sidebar';
6
6
  export const AppSidebar = () => {
7
7
  const { flows } = useListFlows();
8
- const isActive = (_flowId) => {
9
- return false; // TODO: Implement this
10
- };
8
+ const { pathname } = useLocation();
9
+ const isActive = (flowId) => pathname.includes(`/flow/${flowId}`);
11
10
  return (_jsxs(Sidebar, { children: [_jsx(SidebarHeader, {}), _jsx(SidebarContent, { children: _jsxs(SidebarGroup, { children: [_jsx(SidebarGroupLabel, { children: "Flows" }), _jsx(SidebarGroupContent, { children: _jsx(SidebarMenu, { children: flows.map((flow) => (_jsx(SidebarMenuItem, { children: _jsx(SidebarMenuButton, { asChild: true, className: "cursor-pointer", isActive: isActive(flow.id), children: _jsxs(Link, { to: `/flow/${flow.id}`, className: "flex items-center gap-2", "data-testid": `flow-link-${flow.id}`, children: [_jsx(Workflow, {}), _jsx("span", { children: flow.name })] }) }) }, flow.id))) }) })] }) }), _jsx(SidebarFooter, {})] }));
12
11
  };
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  export declare const LogLevelBadge: React.FC<{
2
3
  level: string;
3
4
  }>;
@@ -5,5 +5,5 @@ declare const badgeVariants: (props?: ({
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
7
  }
8
- declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
9
- export { Badge, badgeVariants };
8
+ export declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -17,7 +17,6 @@ const badgeVariants = cva('inline-flex items-center rounded-md border px-2.5 py-
17
17
  variant: 'default',
18
18
  },
19
19
  });
20
- function Badge({ className, variant, ...props }) {
20
+ export function Badge({ className, variant, ...props }) {
21
21
  return _jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
22
22
  }
23
- export { Badge, badgeVariants };
@@ -7,5 +7,5 @@ declare const buttonVariants: (props?: ({
7
7
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
8
  asChild?: boolean;
9
9
  }
10
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
- export { Button, buttonVariants };
10
+ export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export {};
@@ -26,9 +26,8 @@ const buttonVariants = cva('inline-flex items-center justify-center gap-2 whites
26
26
  size: 'default',
27
27
  },
28
28
  });
29
- const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
29
+ export const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
30
30
  const Comp = asChild ? Slot : 'button';
31
31
  return _jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props });
32
32
  });
33
33
  Button.displayName = 'Button';
34
- export { Button, buttonVariants };
@@ -1,4 +1,4 @@
1
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
1
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
2
  declare const Collapsible: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & import("react").RefAttributes<HTMLDivElement>>;
3
3
  declare const CollapsibleTrigger: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
4
4
  declare const CollapsibleContent: import("react").ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
1
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
2
  const Collapsible = CollapsiblePrimitive.Root;
3
3
  const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;
4
4
  const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as DialogPrimitive from "@radix-ui/react-dialog";
1
+ import * as React from 'react';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
3
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
4
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
5
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
@@ -1,22 +1,22 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as DialogPrimitive from "@radix-ui/react-dialog";
4
- import { X } from "lucide-react";
5
- import { cn } from "@/lib/utils";
2
+ import * as React from 'react';
3
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
4
+ import { X } from 'lucide-react';
5
+ import { cn } from '@/lib/utils';
6
6
  const Dialog = DialogPrimitive.Root;
7
7
  const DialogTrigger = DialogPrimitive.Trigger;
8
8
  const DialogPortal = DialogPrimitive.Portal;
9
9
  const DialogClose = DialogPrimitive.Close;
10
- const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className), ...props })));
10
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn('fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0', className), ...props })));
11
11
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
12
- const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
12
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn('fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg', className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
13
13
  DialogContent.displayName = DialogPrimitive.Content.displayName;
14
- const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }));
15
- DialogHeader.displayName = "DialogHeader";
16
- const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
17
- DialogFooter.displayName = "DialogFooter";
18
- const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props })));
14
+ const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }));
15
+ DialogHeader.displayName = 'DialogHeader';
16
+ const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
17
+ DialogFooter.displayName = 'DialogFooter';
18
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn('text-lg font-semibold leading-none tracking-tight', className), ...props })));
19
19
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
20
- const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn("text-sm text-muted-foreground", className), ...props })));
20
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn('text-sm text-muted-foreground', className), ...props })));
21
21
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
22
22
  export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
3
- import { type VariantProps } from "class-variance-authority";
1
+ import * as React from 'react';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import { type VariantProps } from 'class-variance-authority';
4
4
  declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
5
  export { Label };
@@ -1,10 +1,10 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import * as LabelPrimitive from "@radix-ui/react-label";
5
- import { cva } from "class-variance-authority";
6
- import { cn } from "@/lib/utils";
7
- const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
3
+ import * as React from 'react';
4
+ import * as LabelPrimitive from '@radix-ui/react-label';
5
+ import { cva } from 'class-variance-authority';
6
+ import { cn } from '@/lib/utils';
7
+ const labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');
8
8
  const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn(labelVariants(), className), ...props })));
9
9
  Label.displayName = LabelPrimitive.Root.displayName;
10
10
  export { Label };
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as SelectPrimitive from "@radix-ui/react-select";
1
+ import * as React from 'react';
2
+ import * as SelectPrimitive from '@radix-ui/react-select';
3
3
  declare const Select: React.FC<SelectPrimitive.SelectProps>;
4
4
  declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
5
  declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
@@ -1,26 +1,25 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as SelectPrimitive from "@radix-ui/react-select";
4
- import { Check, ChevronDown, ChevronUp } from "lucide-react";
5
- import { cn } from "@/lib/utils";
2
+ import * as React from 'react';
3
+ import * as SelectPrimitive from '@radix-ui/react-select';
4
+ import { Check, ChevronDown, ChevronUp } from 'lucide-react';
5
+ import { cn } from '@/lib/utils';
6
6
  const Select = SelectPrimitive.Root;
7
7
  const SelectGroup = SelectPrimitive.Group;
8
8
  const SelectValue = SelectPrimitive.Value;
9
- const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })] })));
9
+ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn('flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1', className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })] })));
10
10
  SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
11
- const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronUp, { className: "h-4 w-4" }) })));
11
+ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn('flex cursor-default items-center justify-center py-1', className), ...props, children: _jsx(ChevronUp, { className: "h-4 w-4" }) })));
12
12
  SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
13
- const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: _jsx(ChevronDown, { className: "h-4 w-4" }) })));
14
- SelectScrollDownButton.displayName =
15
- SelectPrimitive.ScrollDownButton.displayName;
16
- const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" &&
17
- "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn("p-1", position === "popper" &&
18
- "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
13
+ const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn('flex cursor-default items-center justify-center py-1', className), ...props, children: _jsx(ChevronDown, { className: "h-4 w-4" }) })));
14
+ SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
15
+ const SelectContent = React.forwardRef(({ className, children, position = 'popper', ...props }, ref) => (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: ref, className: cn('relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', position === 'popper' &&
16
+ 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), position: position, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { className: cn('p-1', position === 'popper' &&
17
+ 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]'), children: children }), _jsx(SelectScrollDownButton, {})] }) })));
19
18
  SelectContent.displayName = SelectPrimitive.Content.displayName;
20
- const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn("px-2 py-1.5 text-sm font-semibold", className), ...props })));
19
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Label, { ref: ref, className: cn('px-2 py-1.5 text-sm font-semibold', className), ...props })));
21
20
  SelectLabel.displayName = SelectPrimitive.Label.displayName;
22
- const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className), ...props, children: [_jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
21
+ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(SelectPrimitive.Item, { ref: ref, className: cn('relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] })));
23
22
  SelectItem.displayName = SelectPrimitive.Item.displayName;
24
- const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn("-mx-1 my-1 h-px bg-muted", className), ...props })));
23
+ const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(SelectPrimitive.Separator, { ref: ref, className: cn('-mx-1 my-1 h-px bg-muted', className), ...props })));
25
24
  SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
26
25
  export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
@@ -1,17 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { TooltipContent } from '@/components/ui/tooltip';
4
- type SidebarContext = {
5
- state: 'expanded' | 'collapsed';
6
- open: boolean;
7
- setOpen: (open: boolean) => void;
8
- openMobile: boolean;
9
- setOpenMobile: (open: boolean) => void;
10
- isMobile: boolean;
11
- toggleSidebar: () => void;
12
- };
13
- declare const SidebarContext: React.Context<SidebarContext | null>;
14
- declare function useSidebar(): SidebarContext;
15
4
  declare const SidebarProvider: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
16
5
  defaultOpen?: boolean;
17
6
  open?: boolean;
@@ -63,4 +52,4 @@ declare const SidebarMenuSubButton: React.ForwardRefExoticComponent<Omit<React.C
63
52
  size?: "sm" | "md";
64
53
  isActive?: boolean;
65
54
  }, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
66
- export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
55
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, };
@@ -218,4 +218,4 @@ const SidebarMenuSubButton = React.forwardRef(({ asChild = false, size = 'md', i
218
218
  return (_jsx(Comp, { ref: ref, "data-sidebar": "menu-sub-button", "data-size": size, "data-active": isActive, className: cn('flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground', 'data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground', size === 'sm' && 'text-xs', size === 'md' && 'text-sm', 'group-data-[collapsible=icon]:hidden', className), ...props }));
219
219
  });
220
220
  SidebarMenuSubButton.displayName = 'SidebarMenuSubButton';
221
- export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
221
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, };
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
2
3
  export { Skeleton };
@@ -1,4 +1,4 @@
1
- import * as React from "react";
2
- import * as SwitchPrimitives from "@radix-ui/react-switch";
1
+ import * as React from 'react';
2
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
3
3
  declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
4
  export { Switch };
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import * as SwitchPrimitives from "@radix-ui/react-switch";
4
- import { cn } from "@/lib/utils";
5
- const Switch = React.forwardRef(({ className, ...props }, ref) => (_jsx(SwitchPrimitives.Root, { className: cn("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", className), ...props, ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0") }) })));
2
+ import * as React from 'react';
3
+ import * as SwitchPrimitives from '@radix-ui/react-switch';
4
+ import { cn } from '@/lib/utils';
5
+ const Switch = React.forwardRef(({ className, ...props }, ref) => (_jsx(SwitchPrimitives.Root, { className: cn('peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input', className), ...props, ref: ref, children: _jsx(SwitchPrimitives.Thumb, { className: cn('pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0') }) })));
6
6
  Switch.displayName = SwitchPrimitives.Root.displayName;
7
7
  export { Switch };
@@ -1,3 +1,3 @@
1
- import * as React from "react";
1
+ import * as React from 'react';
2
2
  declare const Textarea: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
3
3
  export { Textarea };
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from "react";
3
- import { cn } from "@/lib/utils";
2
+ import * as React from 'react';
3
+ import { cn } from '@/lib/utils';
4
4
  const Textarea = React.forwardRef(({ className, ...props }, ref) => {
5
- return (_jsx("textarea", { className: cn("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className), ref: ref, ...props }));
5
+ return (_jsx("textarea", { className: cn('flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm', className), ref: ref, ...props }));
6
6
  });
7
- Textarea.displayName = "Textarea";
7
+ Textarea.displayName = 'Textarea';
8
8
  export { Textarea };
package/dist/src/main.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { StrictMode } from 'react';
3
3
  import { createRoot } from 'react-dom/client';
4
- import { BrowserRouter, Route, Routes } from 'react-router-dom';
4
+ import { BrowserRouter, Route, Routes } from 'react-router';
5
5
  import './index.css';
6
6
  import { Index } from './routes';
7
7
  import { Flow } from './routes/flow';
@@ -1,5 +1,5 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
- import { PropsWithChildren } from 'react';
2
+ import React, { PropsWithChildren } from 'react';
3
3
  declare const baseBackgroundVariants: (props?: ({
4
4
  variant?: "event" | "api" | "noop" | "cron" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -1,4 +1,5 @@
1
1
  import { EventNodeData } from '../views/flow/nodes/nodes.types';
2
+ import React from 'react';
2
3
  export declare const Emits: React.FC<{
3
4
  emits: EventNodeData['emits'];
4
5
  }>;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { EventNodeData } from '../views/flow/nodes/nodes.types';
2
3
  export declare const Subscribe: React.FC<{
3
4
  data: EventNodeData;
@@ -1,3 +1,2 @@
1
- export declare const RouteWrapper: ({ children }: {
2
- children: React.ReactNode;
3
- }) => import("react/jsx-runtime").JSX.Element;
1
+ import React, { PropsWithChildren } from 'react';
2
+ export declare const RouteWrapper: React.FC<PropsWithChildren>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { FlowView } from '@/views/flow/flow-view';
3
3
  import { useEffect, useState } from 'react';
4
- import { useParams } from 'react-router-dom';
4
+ import { useParams } from 'react-router';
5
5
  export const Flow = () => {
6
6
  const { id } = useParams();
7
7
  const [flow, setFlow] = useState(null);
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import '@xyflow/react/dist/style.css';
2
3
  import { FlowResponse } from './hooks/use-get-flow-state';
3
4
  type Props = {
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useEffect, useState } from 'react';
2
3
  import { Background, BackgroundVariant, ReactFlow } from '@xyflow/react';
3
4
  import '@xyflow/react/dist/style.css';
4
5
  import { BaseEdge } from './base-edge';
5
6
  import { ArrowHead } from './arrow-head';
6
7
  import { useGetFlowState } from './hooks/use-get-flow-state';
7
- import { useCallback, useEffect, useState } from 'react';
8
8
  import { NodeOrganizer } from './node-organizer';
9
9
  import { FlowLoader } from './flow-loader';
10
10
  import { useLogListener } from '@/hooks/use-log-listener';
@@ -1,4 +1,5 @@
1
1
  import { Edge, Node } from '@xyflow/react';
2
+ import React from 'react';
2
3
  import type { EdgeData, NodeData } from '../nodes/nodes.types';
3
4
  type Emit = string | {
4
5
  type: string;
@@ -34,6 +35,6 @@ export declare const useGetFlowState: (flow: FlowResponse) => {
34
35
  edges: Edge<EdgeData>[];
35
36
  onNodesChange: import("@xyflow/react").OnNodesChange<Node<NodeData>>;
36
37
  onEdgesChange: import("@xyflow/react").OnEdgesChange<Edge<EdgeData>>;
37
- nodeTypes: Record<string, import("react").ComponentType<any>> | undefined;
38
+ nodeTypes: Record<string, React.ComponentType<any>> | undefined;
38
39
  };
39
40
  export {};
@@ -5,6 +5,7 @@ import { NoopFlowNode } from '../nodes/noop-flow-node';
5
5
  import { EventFlowNode } from '../nodes/event-flow-node';
6
6
  import { CronNode } from '@/publicComponents/cron-node';
7
7
  async function importFlow(flow) {
8
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
9
  const nodeTypes = {
9
10
  event: EventFlowNode,
10
11
  api: ApiFlowNode,
@@ -15,7 +16,7 @@ async function importFlow(flow) {
15
16
  for (const step of flow.steps) {
16
17
  if (step.nodeComponentPath) {
17
18
  const module = await import(/* @vite-ignore */ step.nodeComponentPath);
18
- nodeTypes[step.nodeComponentPath] = module.default;
19
+ nodeTypes[step.nodeComponentPath] = module.Node ?? module.default;
19
20
  }
20
21
  }
21
22
  // Create nodes from steps
@@ -34,6 +35,7 @@ async function importFlow(flow) {
34
35
  return { nodes, edges, nodeTypes };
35
36
  }
36
37
  export const useGetFlowState = (flow) => {
38
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
37
39
  const [nodeTypes, setNodeTypes] = useState();
38
40
  const [nodes, setNodes, onNodesChange] = useNodesState([]);
39
41
  const [edges, setEdges, onEdgesChange] = useEdgesState([]);
@@ -45,6 +47,6 @@ export const useGetFlowState = (flow) => {
45
47
  setEdges(edges);
46
48
  setNodeTypes(nodeTypes);
47
49
  });
48
- }, [flow]);
50
+ }, [flow, setNodes, setEdges, setNodeTypes]);
49
51
  return { nodes, edges, onNodesChange, onEdgesChange, nodeTypes };
50
52
  };
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  type Props = {
2
3
  onInitialized: () => void;
3
4
  };
@@ -46,6 +46,6 @@ export const NodeOrganizer = ({ onInitialized }) => {
46
46
  await fitView();
47
47
  }, 1);
48
48
  }
49
- }, [nodesInitialized, onInitialized]);
49
+ }, [nodesInitialized, onInitialized, setNodes, getNodes, getEdges, fitView]);
50
50
  return null;
51
51
  };
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const path_1 = __importDefault(require("path"));
7
+ const tailwindcss_animate_1 = __importDefault(require("tailwindcss-animate"));
7
8
  const config = {
8
9
  darkMode: ['class'],
9
10
  content: [
@@ -72,6 +73,6 @@ const config = {
72
73
  },
73
74
  },
74
75
  },
75
- plugins: [require('tailwindcss-animate')],
76
+ plugins: [tailwindcss_animate_1.default],
76
77
  };
77
78
  exports.default = config;