@motiadev/workbench 0.9.4-beta.151-930104 → 0.9.4-beta.151-160668

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.
@@ -4,7 +4,7 @@ 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 plugin_react_swc_1 = __importDefault(require("@vitejs/plugin-react-swc"));
7
+ const plugin_react_1 = __importDefault(require("@vitejs/plugin-react"));
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const path_1 = __importDefault(require("path"));
10
10
  const vite_1 = require("vite");
@@ -74,7 +74,7 @@ const applyMiddleware = async ({ app, port, workbenchBase, plugins }) => {
74
74
  },
75
75
  },
76
76
  plugins: [
77
- (0, plugin_react_swc_1.default)(),
77
+ (0, plugin_react_1.default)(),
78
78
  processCwdPlugin(),
79
79
  reoPlugin(),
80
80
  (0, motia_plugin_1.default)(plugins),
@@ -27,7 +27,7 @@ const WorkbenchPluginSchema = zod_1.z.object({
27
27
  label: zod_1.z.string().optional(),
28
28
  labelIcon: zod_1.z.string().optional(),
29
29
  cssImports: zod_1.z.array(zod_1.z.string()).optional(),
30
- props: zod_1.z.record(zod_1.z.any()).optional(),
30
+ props: zod_1.z.record(zod_1.z.any(), zod_1.z.any()).optional(),
31
31
  });
32
32
  /**
33
33
  * Validates a single plugin configuration.
@@ -49,7 +49,7 @@ function validatePluginConfig(plugin, index) {
49
49
  try {
50
50
  const result = WorkbenchPluginSchema.safeParse(plugin);
51
51
  if (!result.success) {
52
- result.error.errors.forEach((err) => {
52
+ result.error.issues.forEach((err) => {
53
53
  const path = err.path.join('.');
54
54
  errors.push(`Plugin at index ${index}, field "${path}": ${err.message}`);
55
55
  });
@@ -17,5 +17,5 @@ export const FlowTabMenuItem = () => {
17
17
  selectFlowId(flowId);
18
18
  motiaAnalytics.track('flow_selected', { flow: flowId });
19
19
  };
20
- return (_jsxs("div", { className: "flex flex-row justify-center items-center gap-2 cursor-pointer", children: [_jsx(Workflow, {}), selectedFlowId ?? 'No flow selected', _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("div", { className: "flex flex-row justify-center items-center gap-2 cursor-pointer", children: _jsx(ChevronsUpDown, { className: "size-4", "data-testid": "flows-dropdown-trigger" }) }) }), _jsx(DropdownMenuContent, { className: "bg-background text-foreground flows-dropdown", children: flows.map((item) => (_jsx(DropdownMenuItem, { "data-testid": `dropdown-${item}`, className: "cursor-pointer gap-2 flow-link", onClick: () => handleFlowSelect(item), children: item }, `dropdown-${item}`))) })] })] }));
20
+ return (_jsxs("div", { className: "flex flex-row justify-center items-center gap-2 cursor-pointer", children: [_jsx(Workflow, {}), selectedFlowId ?? 'No flow selected', _jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("div", { className: "flex flex-row justify-center items-center gap-2 cursor-pointer", "data-testid": "flows-dropdown-trigger", children: _jsx(ChevronsUpDown, { className: "size-4" }) }) }), _jsx(DropdownMenuContent, { className: "bg-background text-foreground flows-dropdown", children: flows.map((item) => (_jsx(DropdownMenuItem, { "data-testid": `dropdown-${item}`, className: "cursor-pointer gap-2 flow-link", onClick: () => handleFlowSelect(item), children: item }, `dropdown-${item}`))) })] })] }));
21
21
  };
@@ -10,6 +10,6 @@ export const TopPanel = memo(() => {
10
10
  const setTopTab = useTabsStore((state) => state.setTopTab);
11
11
  const tabs = useAppTabsStore(useShallow(topTabsSelector));
12
12
  const topPanelId = useId();
13
- return (_jsx(CollapsiblePanel, { id: topPanelId, variant: 'tabs', defaultTab: defaultTab, onTabChange: setTopTab, header: _jsx(TabsList, { children: tabs.map(({ id, tabLabel: Label }) => (_jsx(TabsTrigger, { value: id, "data-testid": `${id.toLowerCase()}-link`, className: "cursor-pointer", children: _jsx(Label, {}) }, id))) }), children: tabs.map(({ id, content: Element }) => (_jsx(TabsContent, { value: id, className: "h-full", children: _jsx(Element, {}) }, id))) }));
13
+ return (_jsx(CollapsiblePanel, { id: topPanelId, variant: 'tabs', defaultTab: defaultTab, onTabChange: setTopTab, withResizeHandle: true, header: _jsx(TabsList, { children: tabs.map(({ id, tabLabel: Label }) => (_jsx(TabsTrigger, { value: id, "data-testid": `${id.toLowerCase()}-link`, className: "cursor-pointer", children: _jsx(Label, {}) }, id))) }), children: tabs.map(({ id, content: Element }) => (_jsx(TabsContent, { value: id, className: "h-full", children: _jsx(Element, {}) }, id))) }));
14
14
  });
15
15
  TopPanel.displayName = 'TopPanel';