@motiadev/workbench 0.8.2-beta.140-628177 → 0.8.2-beta.140-111855

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 (142) hide show
  1. package/dist/components.json +1 -1
  2. package/dist/index.d.ts +7 -7
  3. package/dist/index.js +5 -5
  4. package/dist/middleware.d.ts +1 -1
  5. package/dist/middleware.js +3 -3
  6. package/dist/motia-plugin/__tests__/generator.test.js +97 -0
  7. package/dist/motia-plugin/__tests__/resolver.test.d.ts +1 -0
  8. package/dist/motia-plugin/__tests__/resolver.test.js +64 -0
  9. package/dist/motia-plugin/__tests__/validator.test.d.ts +1 -0
  10. package/dist/motia-plugin/__tests__/validator.test.js +59 -0
  11. package/dist/motia-plugin/generator.d.ts +78 -0
  12. package/dist/motia-plugin/generator.js +128 -0
  13. package/dist/motia-plugin/hmr.d.ts +19 -0
  14. package/dist/motia-plugin/hmr.js +66 -0
  15. package/dist/motia-plugin/index.d.ts +27 -0
  16. package/dist/motia-plugin/index.js +118 -0
  17. package/dist/motia-plugin/resolver.d.ts +63 -0
  18. package/dist/motia-plugin/resolver.js +92 -0
  19. package/dist/motia-plugin/types.d.ts +169 -0
  20. package/dist/motia-plugin/types.js +36 -0
  21. package/dist/motia-plugin/utils.d.ts +57 -0
  22. package/dist/motia-plugin/utils.js +75 -0
  23. package/dist/motia-plugin/validator.d.ts +19 -0
  24. package/dist/motia-plugin/validator.js +163 -0
  25. package/dist/postcss.config.mjs +1 -1
  26. package/dist/src/App.d.ts +1 -1
  27. package/dist/src/App.js +1 -18
  28. package/dist/src/components/flow/base-edge.d.ts +2 -2
  29. package/dist/src/components/flow/base-edge.js +1 -1
  30. package/dist/src/components/flow/flow-page.js +2 -2
  31. package/dist/src/components/flow/flow-tab-menu-item.js +2 -2
  32. package/dist/src/components/flow/flow-view.d.ts +3 -3
  33. package/dist/src/components/flow/hooks/use-get-flow-state.d.ts +2 -2
  34. package/dist/src/components/flow/hooks/use-get-flow-state.js +0 -4
  35. package/dist/src/components/flow/hooks/use-save-workflow-config.d.ts +1 -1
  36. package/dist/src/components/flow/node-organizer.d.ts +3 -3
  37. package/dist/src/components/flow/nodes/api-flow-node.d.ts +1 -1
  38. package/dist/src/components/flow/nodes/cron-flow-node.d.ts +1 -1
  39. package/dist/src/components/flow/nodes/event-flow-node.d.ts +1 -1
  40. package/dist/src/components/flow/nodes/noop-flow-node.d.ts +1 -1
  41. package/dist/src/components/header/deploy-button.js +2 -2
  42. package/dist/src/components/header/header.d.ts +1 -1
  43. package/dist/src/components/header/header.js +2 -2
  44. package/dist/src/components/root-motia.d.ts +2 -1
  45. package/dist/src/components/tutorial/engine/tutorial-engine.d.ts +1 -1
  46. package/dist/src/components/tutorial/hooks/use-tutorial-engine.d.ts +1 -1
  47. package/dist/src/components/tutorial/hooks/use-tutorial.d.ts +1 -1
  48. package/dist/src/components/tutorial/tutorial-button.d.ts +1 -1
  49. package/dist/src/components/tutorial/tutorial-button.js +1 -1
  50. package/dist/src/components/tutorial/tutorial-step.d.ts +2 -2
  51. package/dist/src/components/tutorial/tutorial-step.js +1 -1
  52. package/dist/src/components/tutorial/tutorial.css +8 -8
  53. package/dist/src/components/ui/json-editor.d.ts +1 -1
  54. package/dist/src/components/ui/json-editor.js +1 -1
  55. package/dist/src/components/ui/table.js +1 -1
  56. package/dist/src/components/ui/theme-toggle.d.ts +1 -1
  57. package/dist/src/components/ui/tooltip.d.ts +1 -1
  58. package/dist/src/hooks/use-fetch-flows.js +1 -1
  59. package/dist/src/hooks/use-update-handle-positions.d.ts +1 -1
  60. package/dist/src/index.css +5 -5
  61. package/dist/src/lib/plugins.js +3 -3
  62. package/dist/src/main.js +2 -3
  63. package/dist/src/project-view-mode.js +1 -1
  64. package/dist/src/publicComponents/api-node.d.ts +2 -2
  65. package/dist/src/publicComponents/base-node/base-handle.d.ts +3 -2
  66. package/dist/src/publicComponents/base-node/base-node.d.ts +3 -2
  67. package/dist/src/publicComponents/base-node/base-node.js +1 -1
  68. package/dist/src/publicComponents/base-node/code-display.d.ts +2 -2
  69. package/dist/src/publicComponents/base-node/code-display.js +1 -1
  70. package/dist/src/publicComponents/base-node/emits.d.ts +2 -2
  71. package/dist/src/publicComponents/base-node/feature-card.d.ts +2 -2
  72. package/dist/src/publicComponents/base-node/language-indicator.d.ts +2 -2
  73. package/dist/src/publicComponents/base-node/node-header.d.ts +3 -2
  74. package/dist/src/publicComponents/base-node/node-sidebar.d.ts +2 -2
  75. package/dist/src/publicComponents/base-node/subscribe.d.ts +1 -1
  76. package/dist/src/publicComponents/cron-node.d.ts +3 -2
  77. package/dist/src/publicComponents/event-node.d.ts +3 -2
  78. package/dist/src/publicComponents/node-props.d.ts +1 -1
  79. package/dist/src/publicComponents/noop-node.d.ts +3 -2
  80. package/dist/src/stores/use-global-store.d.ts +0 -6
  81. package/dist/src/stores/use-global-store.js +0 -6
  82. package/dist/src/types/flow.d.ts +1 -1
  83. package/dist/tsconfig.app.tsbuildinfo +1 -1
  84. package/dist/tsconfig.node.tsbuildinfo +1 -1
  85. package/motia-plugin/__tests__/generator.test.ts +129 -0
  86. package/motia-plugin/__tests__/resolver.test.ts +82 -0
  87. package/motia-plugin/__tests__/validator.test.ts +71 -0
  88. package/motia-plugin/generator.ts +130 -0
  89. package/motia-plugin/hmr.ts +78 -0
  90. package/motia-plugin/index.ts +143 -0
  91. package/motia-plugin/resolver.ts +96 -0
  92. package/motia-plugin/types.ts +198 -0
  93. package/motia-plugin/utils.ts +70 -0
  94. package/motia-plugin/validator.ts +197 -0
  95. package/package.json +9 -9
  96. package/postcss.config.mjs +1 -1
  97. package/dist/src/components/observability/events/code/function-call.d.ts +0 -13
  98. package/dist/src/components/observability/events/code/function-call.js +0 -16
  99. package/dist/src/components/observability/events/event-icon.d.ts +0 -7
  100. package/dist/src/components/observability/events/event-icon.js +0 -16
  101. package/dist/src/components/observability/events/trace-emit-event.d.ts +0 -5
  102. package/dist/src/components/observability/events/trace-emit-event.js +0 -5
  103. package/dist/src/components/observability/events/trace-event.d.ts +0 -5
  104. package/dist/src/components/observability/events/trace-event.js +0 -20
  105. package/dist/src/components/observability/events/trace-log-event.d.ts +0 -5
  106. package/dist/src/components/observability/events/trace-log-event.js +0 -5
  107. package/dist/src/components/observability/events/trace-state-event.d.ts +0 -5
  108. package/dist/src/components/observability/events/trace-state-event.js +0 -5
  109. package/dist/src/components/observability/events/trace-stream-event.d.ts +0 -5
  110. package/dist/src/components/observability/events/trace-stream-event.js +0 -5
  111. package/dist/src/components/observability/hooks/use-get-endtime.d.ts +0 -2
  112. package/dist/src/components/observability/hooks/use-get-endtime.js +0 -15
  113. package/dist/src/components/observability/trace-item/trace-item-detail.d.ts +0 -8
  114. package/dist/src/components/observability/trace-item/trace-item-detail.js +0 -10
  115. package/dist/src/components/observability/trace-item/trace-item.d.ts +0 -10
  116. package/dist/src/components/observability/trace-item/trace-item.js +0 -14
  117. package/dist/src/components/observability/trace-status.d.ts +0 -8
  118. package/dist/src/components/observability/trace-status.js +0 -18
  119. package/dist/src/components/observability/trace-tab-label.d.ts +0 -1
  120. package/dist/src/components/observability/trace-tab-label.js +0 -5
  121. package/dist/src/components/observability/trace-timeline.d.ts +0 -6
  122. package/dist/src/components/observability/trace-timeline.js +0 -30
  123. package/dist/src/components/observability/traces-groups.d.ts +0 -9
  124. package/dist/src/components/observability/traces-groups.js +0 -9
  125. package/dist/src/components/observability/traces-page.d.ts +0 -1
  126. package/dist/src/components/observability/traces-page.js +0 -33
  127. package/dist/src/components/states/hooks/states-hooks.d.ts +0 -13
  128. package/dist/src/components/states/hooks/states-hooks.js +0 -26
  129. package/dist/src/components/states/state-details.d.ts +0 -7
  130. package/dist/src/components/states/state-details.js +0 -3
  131. package/dist/src/components/states/state-editor.d.ts +0 -7
  132. package/dist/src/components/states/state-editor.js +0 -71
  133. package/dist/src/components/states/state-sidebar.d.ts +0 -8
  134. package/dist/src/components/states/state-sidebar.js +0 -17
  135. package/dist/src/components/states/state-tab-label.d.ts +0 -1
  136. package/dist/src/components/states/state-tab-label.js +0 -5
  137. package/dist/src/components/states/states-page.d.ts +0 -1
  138. package/dist/src/components/states/states-page.js +0 -56
  139. package/dist/src/types/observability.d.ts +0 -78
  140. package/dist/vite-plugin-motia-plugins.d.ts +0 -9
  141. package/dist/vite-plugin-motia-plugins.js +0 -69
  142. /package/dist/{src/types/observability.js → motia-plugin/__tests__/generator.test.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
- import { PropsWithChildren } from 'react';
2
- import { ApiNodeProps } from './node-props';
1
+ import type { PropsWithChildren } from 'react';
2
+ import type { ApiNodeProps } from './node-props';
3
3
  type Props = PropsWithChildren<ApiNodeProps>;
4
4
  export declare const ApiNode: ({ data, children }: Props) => import("react/jsx-runtime").JSX.Element;
5
5
  export {};
@@ -1,5 +1,6 @@
1
- import React, { HTMLAttributes } from 'react';
2
- import { HandleProps } from '@xyflow/react';
1
+ import { type HandleProps } from '@xyflow/react';
2
+ import type React from 'react';
3
+ import type { HTMLAttributes } from 'react';
3
4
  type Props = HandleProps & Omit<HTMLAttributes<HTMLDivElement>, 'id'> & {
4
5
  isHidden?: boolean;
5
6
  onTogglePosition?: () => void;
@@ -1,5 +1,6 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { BaseNodeProps } from '../node-props';
1
+ import type React from 'react';
2
+ import { type PropsWithChildren } from 'react';
3
+ import type { BaseNodeProps } from '../node-props';
3
4
  type Props = PropsWithChildren<{
4
5
  title: string;
5
6
  subtitle?: string;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useHandlePositions } from '@/hooks/use-update-handle-positions';
3
2
  import { Button, cn } from '@motiadev/ui';
4
3
  import { ScanSearch } from 'lucide-react';
5
4
  import { useCallback, useEffect, useState } from 'react';
5
+ import { useHandlePositions } from '@/hooks/use-update-handle-positions';
6
6
  import { BaseHandle } from './base-handle';
7
7
  import { NodeHeader } from './node-header';
8
8
  import { NodeSidebar } from './node-sidebar';
@@ -1,5 +1,5 @@
1
- import { Feature } from '@/types/file';
2
- import React from 'react';
1
+ import type React from 'react';
2
+ import type { Feature } from '@/types/file';
3
3
  type CodeDisplayProps = {
4
4
  code: string;
5
5
  language?: string;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useThemeStore } from '@motiadev/ui';
3
- import { FeatureCard } from './feature-card';
4
3
  import { useRef, useState } from 'react';
5
4
  import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
6
5
  import { oneDark, oneLight } from 'react-syntax-highlighter/dist/esm/styles/prism';
6
+ import { FeatureCard } from './feature-card';
7
7
  import { LanguageIndicator } from './language-indicator';
8
8
  const codeTagProps = {
9
9
  style: {
@@ -1,5 +1,5 @@
1
- import { EventNodeData } from '@/types/flow';
2
- import React from 'react';
1
+ import type React from 'react';
2
+ import type { EventNodeData } from '@/types/flow';
3
3
  export declare const Emits: React.FC<{
4
4
  emits: EventNodeData['emits'];
5
5
  }>;
@@ -1,5 +1,5 @@
1
- import { Feature } from '@/types/file';
2
- import React from 'react';
1
+ import type React from 'react';
2
+ import type { Feature } from '@/types/file';
3
3
  type Props = {
4
4
  feature: Feature;
5
5
  highlighted: boolean;
@@ -1,5 +1,5 @@
1
- import { EventNodeData } from '@/types/flow';
2
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
+ import type { EventNodeData } from '@/types/flow';
3
3
  type Props = {
4
4
  language: EventNodeData['language'];
5
5
  className?: string;
@@ -1,5 +1,6 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- import React, { PropsWithChildren } from 'react';
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import type React from 'react';
3
+ import type { PropsWithChildren } from 'react';
3
4
  declare const baseIcon: (props?: ({
4
5
  variant?: "event" | "api" | "noop" | "cron" | null | undefined;
5
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -1,5 +1,5 @@
1
- import { Feature } from '@/types/file';
2
- import React from 'react';
1
+ import type React from 'react';
2
+ import type { Feature } from '@/types/file';
3
3
  type NodeSidebarProps = {
4
4
  content: string;
5
5
  features: Feature[];
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export declare const Subscribe: React.FC<{
3
3
  subscribes: string[];
4
4
  }>;
@@ -1,3 +1,4 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { CronNodeProps } from './node-props';
1
+ import type React from 'react';
2
+ import type { PropsWithChildren } from 'react';
3
+ import type { CronNodeProps } from './node-props';
3
4
  export declare const CronNode: React.FC<PropsWithChildren<CronNodeProps>>;
@@ -1,3 +1,4 @@
1
- import React, { type PropsWithChildren } from 'react';
2
- import { EventNodeProps } from './node-props';
1
+ import type React from 'react';
2
+ import type { PropsWithChildren } from 'react';
3
+ import type { EventNodeProps } from './node-props';
3
4
  export declare const EventNode: React.FC<PropsWithChildren<EventNodeProps>>;
@@ -1,4 +1,4 @@
1
- import { ApiNodeData, CronNodeData, EventNodeData, NoopNodeData } from '../types/flow';
1
+ import type { ApiNodeData, CronNodeData, EventNodeData, NoopNodeData } from '../types/flow';
2
2
  export type NodeProps = EventNodeProps | NoopNodeProps | ApiNodeProps | CronNodeProps;
3
3
  export type BaseNodeProps = {
4
4
  id: string;
@@ -1,3 +1,4 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { NoopNodeProps } from './node-props';
1
+ import type React from 'react';
2
+ import type { PropsWithChildren } from 'react';
3
+ import type { NoopNodeProps } from './node-props';
3
4
  export declare const NoopNode: React.FC<PropsWithChildren<NoopNodeProps>>;
@@ -1,12 +1,6 @@
1
1
  type UseGlobalStore = {
2
2
  selectedEndpointId?: string;
3
3
  selectEndpointId: (endpointId?: string) => void;
4
- selectedTraceGroupId?: string;
5
- selectTraceGroupId: (traceGroupId?: string) => void;
6
- selectedTraceId?: string;
7
- selectTraceId: (traceId?: string) => void;
8
- selectedStateId?: string;
9
- selectStateId: (stateId?: string) => void;
10
4
  };
11
5
  export declare const useGlobalStore: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<UseGlobalStore>, "setState" | "persist"> & {
12
6
  setState(partial: UseGlobalStore | Partial<UseGlobalStore> | ((state: UseGlobalStore) => UseGlobalStore | Partial<UseGlobalStore>), replace?: false | undefined): unknown;
@@ -6,12 +6,6 @@ const select = (id, name) => (state) => {
6
6
  export const useGlobalStore = create(persist((set) => ({
7
7
  selectedEndpointId: undefined,
8
8
  selectEndpointId: (endpointId) => set(select(endpointId, 'selectedEndpointId')),
9
- selectedTraceGroupId: undefined,
10
- selectTraceGroupId: (traceGroupId) => set(select(traceGroupId, 'selectedTraceGroupId')),
11
- selectedTraceId: undefined,
12
- selectTraceId: (traceId) => set(select(traceId, 'selectedTraceId')),
13
- selectedStateId: undefined,
14
- selectStateId: (stateId) => set(select(stateId, 'selectedStateId')),
15
9
  }), {
16
10
  name: 'motia-global-storage',
17
11
  storage: createJSONStorage(() => localStorage),
@@ -1,4 +1,4 @@
1
- import { JSONSchema7 } from 'json-schema';
1
+ import type { JSONSchema7 } from 'json-schema';
2
2
  export type EventNodeData = {
3
3
  type: string;
4
4
  name: string;