@motiadev/workbench 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/README.md +50 -0
- package/dist/index.d.ts +0 -1
- package/dist/middleware.d.ts +2 -2
- package/dist/middleware.js +5 -7
- package/dist/src/components/app-sidebar.d.ts +0 -1
- package/dist/src/components/app-sidebar.js +5 -6
- package/dist/src/components/log-console.d.ts +0 -1
- package/dist/src/components/log-level-badge.d.ts +0 -1
- package/dist/src/components/ui/badge.d.ts +1 -2
- package/dist/src/components/ui/button.d.ts +1 -2
- package/dist/src/components/ui/collapsible.d.ts +0 -1
- package/dist/src/components/ui/dialog.d.ts +0 -1
- package/dist/src/components/ui/input.d.ts +0 -1
- package/dist/src/components/ui/label.d.ts +0 -1
- package/dist/src/components/ui/select.d.ts +0 -1
- package/dist/src/components/ui/separator.d.ts +0 -1
- package/dist/src/components/ui/sheet.d.ts +1 -2
- package/dist/src/components/ui/sidebar.d.ts +0 -1
- package/dist/src/components/ui/skeleton.d.ts +0 -1
- package/dist/src/components/ui/switch.d.ts +0 -1
- package/dist/src/components/ui/table.d.ts +0 -1
- package/dist/src/components/ui/textarea.d.ts +0 -1
- package/dist/src/components/ui/tooltip.d.ts +0 -1
- package/dist/src/hooks/use-list-flows.d.ts +0 -1
- package/dist/src/hooks/use-log-listener.d.ts +0 -1
- package/dist/src/hooks/use-mobile.d.ts +0 -1
- package/dist/src/lib/utils.d.ts +0 -1
- package/dist/src/main.d.ts +0 -8
- package/dist/src/main.js +6 -7
- package/dist/src/publicComponents/api-node.d.ts +0 -1
- package/dist/src/publicComponents/base-handle.d.ts +0 -1
- package/dist/src/publicComponents/base-node.d.ts +0 -1
- package/dist/src/publicComponents/emits.d.ts +0 -1
- package/dist/src/publicComponents/event-node.d.ts +0 -1
- package/dist/src/publicComponents/node-props.d.ts +0 -1
- package/dist/src/publicComponents/noop-node.d.ts +0 -1
- package/dist/src/publicComponents/subscribe.d.ts +0 -1
- package/dist/src/route-wrapper.d.ts +0 -1
- package/dist/src/routes/flow.d.ts +1 -0
- package/dist/src/routes/flow.js +16 -0
- package/dist/src/routes/index.d.ts +1 -2
- package/dist/src/routes/index.js +2 -6
- package/dist/src/stores/use-logs.d.ts +0 -1
- package/dist/src/views/flow/arrow-head.d.ts +0 -1
- package/dist/src/views/flow/base-edge.d.ts +0 -1
- package/dist/src/views/flow/flow-loader.d.ts +0 -1
- package/dist/src/views/flow/flow-view.d.ts +0 -1
- package/dist/src/views/flow/hooks/use-get-flow-state.d.ts +0 -1
- package/dist/src/views/flow/hooks/use-organize-nodes.d.ts +0 -1
- package/dist/src/views/flow/legend.d.ts +0 -1
- package/dist/src/views/flow/node-organizer.d.ts +0 -1
- package/dist/src/views/flow/nodes/api-flow-node.d.ts +0 -1
- package/dist/src/views/flow/nodes/event-flow-node.d.ts +0 -1
- package/dist/src/views/flow/nodes/json-schema-form.d.ts +0 -1
- package/dist/src/views/flow/nodes/language-indicator.d.ts +0 -1
- package/dist/src/views/flow/nodes/nodes.types.d.ts +0 -1
- package/dist/src/views/flow/nodes/noop-flow-node.d.ts +0 -1
- package/dist/tailwind.config.d.ts +0 -1
- package/dist/vite.config.d.ts +1 -10
- package/dist/vite.config.js +4 -5
- package/package.json +3 -3
- package/components.json +0 -21
- package/dist/index.d.ts.map +0 -1
- package/dist/middleware.d.ts.map +0 -1
- package/dist/src/components/app-sidebar.d.ts.map +0 -1
- package/dist/src/components/log-console.d.ts.map +0 -1
- package/dist/src/components/log-level-badge.d.ts.map +0 -1
- package/dist/src/components/ui/badge.d.ts.map +0 -1
- package/dist/src/components/ui/button.d.ts.map +0 -1
- package/dist/src/components/ui/collapsible.d.ts.map +0 -1
- package/dist/src/components/ui/dialog.d.ts.map +0 -1
- package/dist/src/components/ui/input.d.ts.map +0 -1
- package/dist/src/components/ui/label.d.ts.map +0 -1
- package/dist/src/components/ui/select.d.ts.map +0 -1
- package/dist/src/components/ui/separator.d.ts.map +0 -1
- package/dist/src/components/ui/sheet.d.ts.map +0 -1
- package/dist/src/components/ui/sidebar.d.ts.map +0 -1
- package/dist/src/components/ui/skeleton.d.ts.map +0 -1
- package/dist/src/components/ui/switch.d.ts.map +0 -1
- package/dist/src/components/ui/table.d.ts.map +0 -1
- package/dist/src/components/ui/textarea.d.ts.map +0 -1
- package/dist/src/components/ui/tooltip.d.ts.map +0 -1
- package/dist/src/hooks/use-list-flows.d.ts.map +0 -1
- package/dist/src/hooks/use-log-listener.d.ts.map +0 -1
- package/dist/src/hooks/use-mobile.d.ts.map +0 -1
- package/dist/src/lib/utils.d.ts.map +0 -1
- package/dist/src/main.d.ts.map +0 -1
- package/dist/src/publicComponents/api-node.d.ts.map +0 -1
- package/dist/src/publicComponents/base-handle.d.ts.map +0 -1
- package/dist/src/publicComponents/base-node.d.ts.map +0 -1
- package/dist/src/publicComponents/emits.d.ts.map +0 -1
- package/dist/src/publicComponents/event-node.d.ts.map +0 -1
- package/dist/src/publicComponents/node-props.d.ts.map +0 -1
- package/dist/src/publicComponents/noop-node.d.ts.map +0 -1
- package/dist/src/publicComponents/subscribe.d.ts.map +0 -1
- package/dist/src/route-wrapper.d.ts.map +0 -1
- package/dist/src/routeTree.gen.d.ts +0 -53
- package/dist/src/routeTree.gen.d.ts.map +0 -1
- package/dist/src/routeTree.gen.js +0 -45
- package/dist/src/routes/__root.d.ts +0 -2
- package/dist/src/routes/__root.d.ts.map +0 -1
- package/dist/src/routes/__root.js +0 -15
- package/dist/src/routes/flow/$id.d.ts +0 -4
- package/dist/src/routes/flow/$id.d.ts.map +0 -1
- package/dist/src/routes/flow/$id.js +0 -15
- package/dist/src/routes/index.d.ts.map +0 -1
- package/dist/src/stores/use-logs.d.ts.map +0 -1
- package/dist/src/views/flow/arrow-head.d.ts.map +0 -1
- package/dist/src/views/flow/base-edge.d.ts.map +0 -1
- package/dist/src/views/flow/flow-loader.d.ts.map +0 -1
- package/dist/src/views/flow/flow-view.d.ts.map +0 -1
- package/dist/src/views/flow/hooks/use-get-flow-state.d.ts.map +0 -1
- package/dist/src/views/flow/hooks/use-organize-nodes.d.ts.map +0 -1
- package/dist/src/views/flow/legend.d.ts.map +0 -1
- package/dist/src/views/flow/node-organizer.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/api-flow-node.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/event-flow-node.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/json-schema-form.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/language-indicator.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/nodes.types.d.ts.map +0 -1
- package/dist/src/views/flow/nodes/noop-flow-node.d.ts.map +0 -1
- package/dist/tailwind.config.d.ts.map +0 -1
- package/dist/tsconfig.app.tsbuildinfo +0 -1
- package/dist/tsconfig.node.tsbuildinfo +0 -1
- package/dist/vite.config.d.ts.map +0 -1
- package/eslint.config.js +0 -28
- package/index.html +0 -19
- package/index.tsx +0 -10
- package/middleware.ts +0 -48
- package/postcss.config.js +0 -6
- package/src/assets/.empty +0 -0
- package/src/components/app-sidebar.tsx +0 -55
- package/src/components/log-console.tsx +0 -76
- package/src/components/log-level-badge.tsx +0 -12
- package/src/components/ui/badge.tsx +0 -31
- package/src/components/ui/button.tsx +0 -47
- package/src/components/ui/collapsible.tsx +0 -9
- package/src/components/ui/dialog.tsx +0 -120
- package/src/components/ui/input.tsx +0 -21
- package/src/components/ui/label.tsx +0 -26
- package/src/components/ui/select.tsx +0 -157
- package/src/components/ui/separator.tsx +0 -22
- package/src/components/ui/sheet.tsx +0 -106
- package/src/components/ui/sidebar.tsx +0 -637
- package/src/components/ui/skeleton.tsx +0 -7
- package/src/components/ui/switch.tsx +0 -27
- package/src/components/ui/table.tsx +0 -76
- package/src/components/ui/textarea.tsx +0 -22
- package/src/components/ui/tooltip.tsx +0 -32
- package/src/hooks/use-list-flows.tsx +0 -20
- package/src/hooks/use-log-listener.tsx +0 -32
- package/src/hooks/use-mobile.tsx +0 -19
- package/src/lib/utils.ts +0 -6
- package/src/main.tsx +0 -28
- package/src/publicComponents/api-node.tsx +0 -28
- package/src/publicComponents/base-handle.tsx +0 -43
- package/src/publicComponents/base-node.tsx +0 -57
- package/src/publicComponents/emits.tsx +0 -22
- package/src/publicComponents/event-node.tsx +0 -36
- package/src/publicComponents/node-props.tsx +0 -15
- package/src/publicComponents/noop-node.tsx +0 -21
- package/src/publicComponents/subscribe.tsx +0 -19
- package/src/route-wrapper.tsx +0 -9
- package/src/routeTree.gen.ts +0 -109
- package/src/routes/__root.tsx +0 -26
- package/src/routes/flow/$id.tsx +0 -21
- package/src/routes/index.tsx +0 -13
- package/src/stores/use-logs.ts +0 -22
- package/src/views/flow/arrow-head.tsx +0 -13
- package/src/views/flow/base-edge.tsx +0 -31
- package/src/views/flow/flow-loader.tsx +0 -3
- package/src/views/flow/flow-view.tsx +0 -72
- package/src/views/flow/hooks/use-get-flow-state.tsx +0 -93
- package/src/views/flow/hooks/use-organize-nodes.ts +0 -60
- package/src/views/flow/legend.tsx +0 -96
- package/src/views/flow/node-organizer.tsx +0 -70
- package/src/views/flow/nodes/api-flow-node.tsx +0 -6
- package/src/views/flow/nodes/event-flow-node.tsx +0 -6
- package/src/views/flow/nodes/json-schema-form.tsx +0 -110
- package/src/views/flow/nodes/language-indicator.tsx +0 -74
- package/src/views/flow/nodes/nodes.types.ts +0 -36
- package/src/views/flow/nodes/noop-flow-node.tsx +0 -6
- package/src/vite-env.d.ts +0 -1
- package/tailwind.config.ts +0 -75
- package/tsconfig.app.json +0 -32
- package/tsconfig.json +0 -14
- package/tsconfig.node.json +0 -32
- package/tsconfig.node.tsbuildinfo +0 -1
- package/vite.config.ts +0 -14
- /package/{public → dist/public}/.empty +0 -0
- /package/{src → dist/src}/index.css +0 -0
package/dist/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## Expanding the ESLint configuration
|
|
11
|
+
|
|
12
|
+
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
|
|
13
|
+
|
|
14
|
+
- Configure the top-level `parserOptions` property like this:
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
export default tseslint.config({
|
|
18
|
+
languageOptions: {
|
|
19
|
+
// other options...
|
|
20
|
+
parserOptions: {
|
|
21
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
22
|
+
tsconfigRootDir: import.meta.dirname,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
|
|
29
|
+
- Optionally add `...tseslint.configs.stylisticTypeChecked`
|
|
30
|
+
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
// eslint.config.js
|
|
34
|
+
import react from 'eslint-plugin-react'
|
|
35
|
+
|
|
36
|
+
export default tseslint.config({
|
|
37
|
+
// Set the react version
|
|
38
|
+
settings: { react: { version: '18.3' } },
|
|
39
|
+
plugins: {
|
|
40
|
+
// Add the react plugin
|
|
41
|
+
react,
|
|
42
|
+
},
|
|
43
|
+
rules: {
|
|
44
|
+
// other rules...
|
|
45
|
+
// Enable its recommended rules
|
|
46
|
+
...react.configs.recommended.rules,
|
|
47
|
+
...react.configs['jsx-runtime'].rules,
|
|
48
|
+
},
|
|
49
|
+
})
|
|
50
|
+
```
|
package/dist/index.d.ts
CHANGED
|
@@ -7,4 +7,3 @@ export { Position } from '@xyflow/react';
|
|
|
7
7
|
export type { EventNodeData, ApiNodeData } from './src/views/flow/nodes/nodes.types';
|
|
8
8
|
export * from './src/publicComponents/node-props';
|
|
9
9
|
export { Button } from './src/components/ui/button';
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/middleware.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import type { Express } from 'express';
|
|
2
|
+
export declare const applyMiddleware: (app: Express) => Promise<void>;
|
package/dist/middleware.js
CHANGED
|
@@ -4,16 +4,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.applyMiddleware = void 0;
|
|
7
|
+
const autoprefixer_1 = __importDefault(require("autoprefixer"));
|
|
7
8
|
const fs_1 = __importDefault(require("fs"));
|
|
8
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const tailwindcss_1 = __importDefault(require("tailwindcss"));
|
|
11
|
+
const vite_1 = require("vite");
|
|
9
12
|
const tailwind_config_1 = __importDefault(require("./tailwind.config"));
|
|
10
13
|
const applyMiddleware = async (app) => {
|
|
11
|
-
|
|
12
|
-
const { default: Express } = await import('express');
|
|
13
|
-
const { createServer } = await import('vite');
|
|
14
|
-
const { default: autoprefixer } = await import('autoprefixer');
|
|
15
|
-
const { default: tailwindcss } = await import('tailwindcss');
|
|
16
|
-
const vite = await createServer({
|
|
14
|
+
const vite = await (0, vite_1.createServer)({
|
|
17
15
|
appType: 'spa',
|
|
18
16
|
root: __dirname,
|
|
19
17
|
server: {
|
|
@@ -27,7 +25,7 @@ const applyMiddleware = async (app) => {
|
|
|
27
25
|
},
|
|
28
26
|
css: {
|
|
29
27
|
postcss: {
|
|
30
|
-
plugins: [
|
|
28
|
+
plugins: [(0, autoprefixer_1.default)(), (0, tailwindcss_1.default)(tailwind_config_1.default)],
|
|
31
29
|
},
|
|
32
30
|
},
|
|
33
31
|
});
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useListFlows } from '@/hooks/use-list-flows';
|
|
3
|
-
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, } from './ui/sidebar';
|
|
4
3
|
import { Workflow } from 'lucide-react';
|
|
5
|
-
import { Link
|
|
4
|
+
import { Link } from 'react-router-dom';
|
|
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
|
|
9
|
-
|
|
10
|
-
return !!matchRoute({ to: '/flow/$id', params: { id: flowId } });
|
|
8
|
+
const isActive = (_flowId) => {
|
|
9
|
+
return false; // TODO: Implement this
|
|
11
10
|
};
|
|
12
|
-
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:
|
|
11
|
+
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, {})] }));
|
|
13
12
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "
|
|
4
|
+
variant?: "default" | "secondary" | "info" | "error" | "warning" | "destructive" | "outline" | null | undefined;
|
|
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
8
|
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export { Badge, badgeVariants };
|
|
10
|
-
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "link" | "none" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined;
|
|
5
5
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -9,4 +9,3 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
9
9
|
}
|
|
10
10
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
11
|
export { Button, buttonVariants };
|
|
12
|
-
//# sourceMappingURL=button.d.ts.map
|
|
@@ -3,4 +3,3 @@ declare const Collapsible: import("react").ForwardRefExoticComponent<Collapsible
|
|
|
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>>;
|
|
5
5
|
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
6
|
-
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -17,4 +17,3 @@ declare const DialogFooter: {
|
|
|
17
17
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
18
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
19
|
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
20
|
-
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
3
3
|
export { Input };
|
|
4
|
-
//# sourceMappingURL=input.d.ts.map
|
|
@@ -3,4 +3,3 @@ import * as LabelPrimitive from "@radix-ui/react-label";
|
|
|
3
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 };
|
|
6
|
-
//# sourceMappingURL=label.d.ts.map
|
|
@@ -11,4 +11,3 @@ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.
|
|
|
11
11
|
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
|
|
14
|
-
//# sourceMappingURL=select.d.ts.map
|
|
@@ -2,4 +2,3 @@ import * as React from 'react';
|
|
|
2
2
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
3
|
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export { Separator };
|
|
5
|
-
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -7,7 +7,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
|
|
|
7
7
|
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
8
8
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
declare const sheetVariants: (props?: ({
|
|
10
|
-
side?: "
|
|
10
|
+
side?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
12
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
13
13
|
}
|
|
@@ -23,4 +23,3 @@ declare const SheetFooter: {
|
|
|
23
23
|
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
24
24
|
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
25
25
|
export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
26
|
-
//# sourceMappingURL=sheet.d.ts.map
|
|
@@ -64,4 +64,3 @@ declare const SidebarMenuSubButton: React.ForwardRefExoticComponent<Omit<React.C
|
|
|
64
64
|
isActive?: boolean;
|
|
65
65
|
}, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
66
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, };
|
|
67
|
-
//# sourceMappingURL=sidebar.d.ts.map
|
|
@@ -2,4 +2,3 @@ import * as React from "react";
|
|
|
2
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 };
|
|
5
|
-
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -8,4 +8,3 @@ declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<
|
|
|
8
8
|
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
9
|
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
10
10
|
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
|
|
11
|
-
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
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 };
|
|
4
|
-
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -5,4 +5,3 @@ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
|
|
|
5
5
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
6
|
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
8
|
-
//# sourceMappingURL=tooltip.d.ts.map
|
package/dist/src/lib/utils.d.ts
CHANGED
package/dist/src/main.d.ts
CHANGED
|
@@ -1,9 +1 @@
|
|
|
1
1
|
import './index.css';
|
|
2
|
-
declare const router: import("@tanstack/react-router").Router<import("@tanstack/react-router").RootRoute<undefined, {}, import("@tanstack/react-router").AnyContext, import("@tanstack/react-router").AnyContext, {}, undefined, import("./routeTree.gen").RootRouteChildren, import("./routeTree.gen").FileRouteTypes>, import("@tanstack/react-router").TrailingSlashOption, boolean, import("@tanstack/history").RouterHistory, Record<string, any>, Record<string, any>>;
|
|
3
|
-
declare module '@tanstack/react-router' {
|
|
4
|
-
interface Register {
|
|
5
|
-
router: typeof router;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=main.d.ts.map
|
package/dist/src/main.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
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
5
|
import './index.css';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
// Create a new router instance
|
|
9
|
-
const router = createRouter({ routeTree });
|
|
6
|
+
import { Index } from './routes';
|
|
7
|
+
import { Flow } from './routes/flow';
|
|
8
|
+
import { RouteWrapper } from './route-wrapper';
|
|
10
9
|
// Render the app
|
|
11
10
|
const rootElement = document.getElementById('root');
|
|
12
11
|
if (!rootElement.innerHTML) {
|
|
13
12
|
const root = createRoot(rootElement);
|
|
14
|
-
root.render(_jsx(StrictMode, { children: _jsx(
|
|
13
|
+
root.render(_jsx(StrictMode, { children: _jsx(BrowserRouter, { children: _jsx(RouteWrapper, { children: _jsxs(Routes, { children: [_jsx(Route, { path: "/", element: _jsx(Index, {}) }), _jsx(Route, { path: "/flow/:id", element: _jsx(Flow, {}) })] }) }) }) }));
|
|
15
14
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Flow: () => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FlowView } from '@/views/flow/flow-view';
|
|
3
|
+
import { useEffect, useState } from 'react';
|
|
4
|
+
import { useParams } from 'react-router-dom';
|
|
5
|
+
export const Flow = () => {
|
|
6
|
+
const { id } = useParams();
|
|
7
|
+
const [flow, setFlow] = useState(null);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
fetch(`/flows/${id}`)
|
|
10
|
+
.then((res) => res.json())
|
|
11
|
+
.then((flow) => setFlow(flow));
|
|
12
|
+
}, [id]);
|
|
13
|
+
if (!flow)
|
|
14
|
+
return null;
|
|
15
|
+
return (_jsx("div", { className: "w-screen h-screen", children: _jsx(FlowView, { flow: flow }) }));
|
|
16
|
+
};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export declare const Index: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/src/routes/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
export const Route = createFileRoute('/')({
|
|
4
|
-
component: Index,
|
|
5
|
-
});
|
|
6
|
-
function Index() {
|
|
2
|
+
export const Index = () => {
|
|
7
3
|
return (_jsx("div", { className: "flex items-center justify-center w-full h-screen", children: _jsx("p", { className: "text-gray-500", children: "Select a flow" }) }));
|
|
8
|
-
}
|
|
4
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { Edge, Node } from '@xyflow/react';
|
|
2
2
|
import { EventNodeData, EdgeData, ApiNodeData } from '../nodes/nodes.types';
|
|
3
3
|
export declare const useOrganizeNodes: (nodes: Node<EventNodeData | ApiNodeData>[], edges: Edge<EdgeData>[], setNodes: (nodes: Node<EventNodeData | ApiNodeData>[]) => void) => void;
|
|
4
|
-
//# sourceMappingURL=use-organize-nodes.d.ts.map
|
package/dist/vite.config.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
declare const _default: {
|
|
3
|
-
plugins: any[];
|
|
4
|
-
resolve: {
|
|
5
|
-
alias: {
|
|
6
|
-
'@': string;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
};
|
|
1
|
+
declare const _default: import("vite").UserConfig;
|
|
10
2
|
export default _default;
|
|
11
|
-
//# sourceMappingURL=vite.config.d.ts.map
|
package/dist/vite.config.js
CHANGED
|
@@ -3,16 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const vite_1 = require("vite");
|
|
6
7
|
const plugin_react_1 = __importDefault(require("@vitejs/plugin-react"));
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const vite_1 = require("@tanstack/router-plugin/vite");
|
|
9
9
|
// https://vite.dev/config/
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
plugins: [(0, vite_1.TanStackRouterVite)(), (0, plugin_react_1.default)()],
|
|
10
|
+
exports.default = (0, vite_1.defineConfig)({
|
|
11
|
+
plugins: [(0, plugin_react_1.default)()],
|
|
13
12
|
resolve: {
|
|
14
13
|
alias: {
|
|
15
14
|
'@': path_1.default.resolve(__dirname, './src'),
|
|
16
15
|
},
|
|
17
16
|
},
|
|
18
|
-
};
|
|
17
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motiadev/workbench",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@radix-ui/react-collapsible": "^1.1.2",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"postcss": "^8.4.49",
|
|
27
27
|
"react": "^18.3.1",
|
|
28
28
|
"react-dom": "^18.3.1",
|
|
29
|
+
"react-router-dom": "^7.1.3",
|
|
29
30
|
"socket.io-client": "^4.8.1",
|
|
30
31
|
"tailwind-merge": "^2.6.0",
|
|
31
32
|
"tailwindcss": "^3.4.17",
|
|
@@ -52,7 +53,6 @@
|
|
|
52
53
|
},
|
|
53
54
|
"scripts": {
|
|
54
55
|
"lint": "eslint .",
|
|
55
|
-
"build": "rm -rf dist && tsc --build"
|
|
56
|
-
"old": "rm -rf dist && vite build"
|
|
56
|
+
"build": "rm -rf dist && tsc --build && sh post-build.sh"
|
|
57
57
|
}
|
|
58
58
|
}
|
package/components.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
-
"style": "new-york",
|
|
4
|
-
"rsc": false,
|
|
5
|
-
"tsx": true,
|
|
6
|
-
"tailwind": {
|
|
7
|
-
"config": "tailwind.config.js",
|
|
8
|
-
"css": "src/index.css",
|
|
9
|
-
"baseColor": "gray",
|
|
10
|
-
"cssVariables": true,
|
|
11
|
-
"prefix": ""
|
|
12
|
-
},
|
|
13
|
-
"aliases": {
|
|
14
|
-
"components": "@/components",
|
|
15
|
-
"utils": "@/lib/utils",
|
|
16
|
-
"ui": "@/components/ui",
|
|
17
|
-
"lib": "@/lib",
|
|
18
|
-
"hooks": "@/hooks"
|
|
19
|
-
},
|
|
20
|
-
"iconLibrary": "lucide"
|
|
21
|
-
}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAA;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAA;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAA;AACpF,cAAc,mCAAmC,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA"}
|
package/dist/middleware.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../middleware.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,QAAe,GAAG,kBA2C7C,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/app-sidebar.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,UAAU,+CAsCtB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-console.d.ts","sourceRoot":"","sources":["../../../src/components/log-console.tsx"],"names":[],"mappings":"AAcA,eAAO,MAAM,UAAU,+CA6DtB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-level-badge.d.ts","sourceRoot":"","sources":["../../../src/components/log-level-badge.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CASrD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,QAAA,MAAM,aAAa;;8EAkBlB,CAAA;AAED,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAE/G,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAE1D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|