@motiadev/workbench 0.14.0-beta.165-516298 → 0.14.0-beta.165-285707

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 (236) hide show
  1. package/dist/index.d.ts +10 -189
  2. package/dist/index.html +1 -1
  3. package/dist/index.js +7 -1065
  4. package/dist/middleware.d.ts +8 -66
  5. package/dist/middleware.js +86 -694
  6. package/dist/motia-plugin/__tests__/generator.test.d.ts +1 -0
  7. package/dist/motia-plugin/__tests__/generator.test.js +97 -0
  8. package/dist/motia-plugin/__tests__/resolver.test.d.ts +1 -0
  9. package/dist/motia-plugin/__tests__/resolver.test.js +64 -0
  10. package/dist/motia-plugin/__tests__/validator.test.d.ts +1 -0
  11. package/dist/motia-plugin/__tests__/validator.test.js +59 -0
  12. package/dist/motia-plugin/generator.d.ts +78 -0
  13. package/dist/motia-plugin/{generator.ts → generator.js} +35 -37
  14. package/dist/motia-plugin/hmr.d.ts +22 -0
  15. package/dist/motia-plugin/hmr.js +100 -0
  16. package/dist/motia-plugin/index.d.ts +3 -0
  17. package/dist/motia-plugin/index.js +153 -0
  18. package/dist/motia-plugin/{resolver.ts → resolver.d.ts} +5 -38
  19. package/dist/motia-plugin/resolver.js +92 -0
  20. package/dist/motia-plugin/types.d.ts +169 -0
  21. package/dist/motia-plugin/types.js +36 -0
  22. package/dist/motia-plugin/{utils.ts → utils.d.ts} +4 -17
  23. package/dist/motia-plugin/utils.js +75 -0
  24. package/dist/motia-plugin/validator.d.ts +19 -0
  25. package/dist/motia-plugin/validator.js +163 -0
  26. package/dist/src/App.d.ts +2 -0
  27. package/dist/src/App.js +35 -0
  28. package/dist/src/components/NotFoundPage.d.ts +1 -0
  29. package/dist/src/components/NotFoundPage.js +3 -0
  30. package/dist/src/components/bottom-panel.d.ts +1 -0
  31. package/dist/src/components/bottom-panel.js +15 -0
  32. package/dist/src/components/flow/base-edge.d.ts +3 -0
  33. package/dist/src/components/flow/base-edge.js +39 -0
  34. package/dist/src/components/flow/flow-loader.d.ts +1 -0
  35. package/dist/src/components/flow/flow-loader.js +4 -0
  36. package/dist/src/components/flow/flow-page.d.ts +1 -0
  37. package/dist/src/components/flow/flow-page.js +25 -0
  38. package/dist/src/components/flow/flow-tab-menu-item.d.ts +1 -0
  39. package/dist/src/components/flow/flow-tab-menu-item.js +18 -0
  40. package/dist/src/components/flow/flow-view.d.ts +12 -0
  41. package/dist/src/components/flow/flow-view.js +22 -0
  42. package/dist/src/components/flow/hooks/use-get-flow-state.d.ts +10 -0
  43. package/dist/src/components/flow/hooks/use-get-flow-state.js +133 -0
  44. package/dist/src/components/flow/hooks/use-save-workflow-config.d.ts +2 -0
  45. package/dist/src/components/flow/hooks/use-save-workflow-config.js +22 -0
  46. package/dist/src/components/flow/node-organizer.d.ts +10 -0
  47. package/dist/src/components/flow/node-organizer.js +82 -0
  48. package/dist/src/components/flow/nodes/api-flow-node.d.ts +2 -0
  49. package/dist/src/components/flow/nodes/api-flow-node.js +5 -0
  50. package/dist/src/components/flow/nodes/cron-flow-node.d.ts +2 -0
  51. package/dist/src/components/flow/nodes/cron-flow-node.js +5 -0
  52. package/dist/src/components/flow/nodes/event-flow-node.d.ts +2 -0
  53. package/dist/src/components/flow/nodes/event-flow-node.js +5 -0
  54. package/dist/src/components/flow/nodes/noop-flow-node.d.ts +2 -0
  55. package/dist/src/components/flow/nodes/noop-flow-node.js +5 -0
  56. package/dist/src/components/header/deploy-button.d.ts +1 -0
  57. package/dist/src/components/header/deploy-button.js +28 -0
  58. package/dist/src/components/header/header.d.ts +2 -0
  59. package/dist/src/components/header/header.js +23 -0
  60. package/dist/src/components/root-motia.d.ts +2 -0
  61. package/dist/src/components/root-motia.js +7 -0
  62. package/dist/src/components/top-panel.d.ts +1 -0
  63. package/dist/src/components/top-panel.js +15 -0
  64. package/dist/src/components/tutorial/engine/tutorial-engine.d.ts +12 -0
  65. package/dist/src/components/tutorial/engine/tutorial-engine.js +36 -0
  66. package/dist/src/components/tutorial/engine/tutorial-types.d.ts +22 -0
  67. package/dist/src/components/tutorial/engine/tutorial-types.js +1 -0
  68. package/dist/src/components/tutorial/engine/workbench-xpath.d.ts +45 -0
  69. package/dist/src/components/tutorial/engine/workbench-xpath.js +45 -0
  70. package/dist/src/components/tutorial/hooks/tutorial-utils.d.ts +1 -0
  71. package/dist/src/components/tutorial/hooks/tutorial-utils.js +17 -0
  72. package/dist/src/components/tutorial/hooks/use-tutorial-engine.d.ts +15 -0
  73. package/dist/src/components/tutorial/hooks/use-tutorial-engine.js +183 -0
  74. package/dist/src/components/tutorial/hooks/use-tutorial.d.ts +5 -0
  75. package/dist/src/components/tutorial/hooks/use-tutorial.js +10 -0
  76. package/dist/src/components/tutorial/tutorial-button.d.ts +2 -0
  77. package/dist/src/components/tutorial/tutorial-button.js +21 -0
  78. package/dist/src/components/tutorial/tutorial-step.d.ts +14 -0
  79. package/dist/src/components/tutorial/tutorial-step.js +19 -0
  80. package/dist/src/components/tutorial/tutorial.d.ts +2 -0
  81. package/dist/src/components/tutorial/tutorial.js +32 -0
  82. package/dist/src/components/ui/json-editor.d.ts +12 -0
  83. package/dist/src/components/ui/json-editor.js +35 -0
  84. package/dist/src/components/ui/table.d.ts +10 -0
  85. package/dist/src/components/ui/table.js +20 -0
  86. package/dist/src/components/ui/theme-toggle.d.ts +2 -0
  87. package/dist/src/components/ui/theme-toggle.js +19 -0
  88. package/dist/src/components/ui/tooltip.d.ts +6 -0
  89. package/dist/src/components/ui/tooltip.js +3 -0
  90. package/dist/src/hooks/use-debounced.d.ts +1 -0
  91. package/dist/src/hooks/use-debounced.js +18 -0
  92. package/dist/src/hooks/use-fetch-flows.d.ts +1 -0
  93. package/dist/src/hooks/use-fetch-flows.js +26 -0
  94. package/dist/src/hooks/use-mobile.d.ts +1 -0
  95. package/dist/src/hooks/use-mobile.js +15 -0
  96. package/dist/src/hooks/use-update-handle-positions.d.ts +10 -0
  97. package/dist/src/hooks/use-update-handle-positions.js +35 -0
  98. package/dist/src/index.css +5 -5
  99. package/dist/src/lib/__tests__/utils.test.d.ts +1 -0
  100. package/dist/src/lib/__tests__/utils.test.js +94 -0
  101. package/dist/src/lib/motia-analytics.d.ts +38 -0
  102. package/dist/src/lib/motia-analytics.js +132 -0
  103. package/dist/src/lib/plugins.d.ts +2 -0
  104. package/dist/src/lib/plugins.js +105 -0
  105. package/dist/src/lib/utils.d.ts +7 -0
  106. package/dist/src/lib/utils.js +34 -0
  107. package/dist/src/main.d.ts +2 -0
  108. package/dist/src/main.js +17 -0
  109. package/dist/src/project-view-mode.d.ts +1 -0
  110. package/dist/src/project-view-mode.js +20 -0
  111. package/dist/src/publicComponents/api-node.d.ts +5 -0
  112. package/dist/src/publicComponents/api-node.js +5 -0
  113. package/dist/src/publicComponents/base-node/base-handle.d.ts +9 -0
  114. package/dist/src/publicComponents/base-node/base-handle.js +8 -0
  115. package/dist/src/publicComponents/base-node/base-node.d.ts +15 -0
  116. package/dist/src/publicComponents/base-node/base-node.js +30 -0
  117. package/dist/src/publicComponents/base-node/code-display.d.ts +9 -0
  118. package/dist/src/publicComponents/base-node/code-display.js +64 -0
  119. package/dist/src/publicComponents/base-node/emits.d.ts +5 -0
  120. package/dist/src/publicComponents/base-node/emits.js +5 -0
  121. package/dist/src/publicComponents/base-node/feature-card.d.ts +10 -0
  122. package/dist/src/publicComponents/base-node/feature-card.js +5 -0
  123. package/dist/src/publicComponents/base-node/language-indicator.d.ts +10 -0
  124. package/dist/src/publicComponents/base-node/language-indicator.js +29 -0
  125. package/dist/src/publicComponents/base-node/node-header.d.ts +13 -0
  126. package/dist/src/publicComponents/base-node/node-header.js +30 -0
  127. package/dist/src/publicComponents/base-node/node-sidebar.d.ts +14 -0
  128. package/dist/src/publicComponents/base-node/node-sidebar.js +9 -0
  129. package/dist/src/publicComponents/base-node/subscribe.d.ts +4 -0
  130. package/dist/src/publicComponents/base-node/subscribe.js +4 -0
  131. package/dist/src/publicComponents/cron-node.d.ts +4 -0
  132. package/dist/src/publicComponents/cron-node.js +6 -0
  133. package/dist/src/publicComponents/event-node.d.ts +4 -0
  134. package/dist/src/publicComponents/event-node.js +5 -0
  135. package/dist/src/publicComponents/node-props.d.ts +21 -0
  136. package/dist/src/publicComponents/node-props.js +1 -0
  137. package/dist/src/publicComponents/noop-node.d.ts +4 -0
  138. package/dist/src/publicComponents/noop-node.js +5 -0
  139. package/dist/src/setupTests.d.ts +1 -0
  140. package/dist/src/setupTests.js +1 -0
  141. package/dist/src/stores/use-app-tabs-store.d.ts +16 -0
  142. package/dist/src/stores/use-app-tabs-store.js +31 -0
  143. package/dist/src/stores/use-flow-store.d.ts +21 -0
  144. package/dist/src/stores/use-flow-store.js +16 -0
  145. package/dist/src/stores/use-global-store.d.ts +18 -0
  146. package/dist/src/stores/use-global-store.js +12 -0
  147. package/dist/src/stores/use-motia-config-store.d.ts +12 -0
  148. package/dist/src/stores/use-motia-config-store.js +24 -0
  149. package/dist/src/stores/use-tabs-store.d.ts +19 -0
  150. package/dist/src/stores/use-tabs-store.js +22 -0
  151. package/dist/src/system-view-mode.d.ts +1 -0
  152. package/dist/src/system-view-mode.js +10 -0
  153. package/dist/src/types/endpoint.d.ts +14 -0
  154. package/dist/src/types/endpoint.js +1 -0
  155. package/dist/src/types/file.d.ts +7 -0
  156. package/dist/src/types/file.js +1 -0
  157. package/dist/src/types/flow.d.ts +115 -0
  158. package/dist/src/types/flow.js +1 -0
  159. package/dist/tsconfig.app.tsbuildinfo +1 -0
  160. package/dist/tsconfig.node.tsbuildinfo +1 -0
  161. package/package.json +51 -53
  162. package/dist/motia-plugin/__tests__/generator.test.ts +0 -129
  163. package/dist/motia-plugin/__tests__/resolver.test.ts +0 -82
  164. package/dist/motia-plugin/__tests__/validator.test.ts +0 -71
  165. package/dist/motia-plugin/hmr.ts +0 -123
  166. package/dist/motia-plugin/index.ts +0 -183
  167. package/dist/motia-plugin/types.ts +0 -198
  168. package/dist/motia-plugin/validator.ts +0 -197
  169. package/dist/src/App.tsx +0 -41
  170. package/dist/src/components/NotFoundPage.tsx +0 -11
  171. package/dist/src/components/bottom-panel.tsx +0 -39
  172. package/dist/src/components/flow/base-edge.tsx +0 -61
  173. package/dist/src/components/flow/flow-loader.tsx +0 -3
  174. package/dist/src/components/flow/flow-page.tsx +0 -75
  175. package/dist/src/components/flow/flow-tab-menu-item.tsx +0 -52
  176. package/dist/src/components/flow/flow-view.tsx +0 -66
  177. package/dist/src/components/flow/hooks/use-get-flow-state.tsx +0 -171
  178. package/dist/src/components/flow/hooks/use-save-workflow-config.ts +0 -25
  179. package/dist/src/components/flow/node-organizer.tsx +0 -103
  180. package/dist/src/components/flow/nodes/api-flow-node.tsx +0 -6
  181. package/dist/src/components/flow/nodes/cron-flow-node.tsx +0 -6
  182. package/dist/src/components/flow/nodes/event-flow-node.tsx +0 -6
  183. package/dist/src/components/flow/nodes/noop-flow-node.tsx +0 -6
  184. package/dist/src/components/header/deploy-button.tsx +0 -110
  185. package/dist/src/components/header/header.tsx +0 -39
  186. package/dist/src/components/root-motia.tsx +0 -10
  187. package/dist/src/components/top-panel.tsx +0 -40
  188. package/dist/src/components/tutorial/engine/tutorial-engine.ts +0 -26
  189. package/dist/src/components/tutorial/engine/tutorial-types.ts +0 -26
  190. package/dist/src/components/tutorial/engine/workbench-xpath.ts +0 -53
  191. package/dist/src/components/tutorial/hooks/tutorial-utils.ts +0 -26
  192. package/dist/src/components/tutorial/hooks/use-tutorial-engine.ts +0 -213
  193. package/dist/src/components/tutorial/hooks/use-tutorial.ts +0 -14
  194. package/dist/src/components/tutorial/tutorial-button.tsx +0 -46
  195. package/dist/src/components/tutorial/tutorial-step.tsx +0 -82
  196. package/dist/src/components/tutorial/tutorial.tsx +0 -59
  197. package/dist/src/components/ui/json-editor.tsx +0 -68
  198. package/dist/src/components/ui/table.tsx +0 -75
  199. package/dist/src/components/ui/theme-toggle.tsx +0 -54
  200. package/dist/src/components/ui/tooltip.tsx +0 -26
  201. package/dist/src/hooks/use-debounced.ts +0 -22
  202. package/dist/src/hooks/use-fetch-flows.ts +0 -33
  203. package/dist/src/hooks/use-mobile.ts +0 -19
  204. package/dist/src/hooks/use-update-handle-positions.ts +0 -42
  205. package/dist/src/lib/__tests__/utils.test.ts +0 -110
  206. package/dist/src/lib/motia-analytics.ts +0 -140
  207. package/dist/src/lib/plugins.tsx +0 -132
  208. package/dist/src/lib/utils.ts +0 -37
  209. package/dist/src/main.tsx +0 -30
  210. package/dist/src/project-view-mode.tsx +0 -32
  211. package/dist/src/publicComponents/api-node.tsx +0 -26
  212. package/dist/src/publicComponents/base-node/base-handle.tsx +0 -50
  213. package/dist/src/publicComponents/base-node/base-node.tsx +0 -114
  214. package/dist/src/publicComponents/base-node/code-display.tsx +0 -119
  215. package/dist/src/publicComponents/base-node/emits.tsx +0 -17
  216. package/dist/src/publicComponents/base-node/feature-card.tsx +0 -32
  217. package/dist/src/publicComponents/base-node/language-indicator.tsx +0 -131
  218. package/dist/src/publicComponents/base-node/node-header.tsx +0 -49
  219. package/dist/src/publicComponents/base-node/node-sidebar.tsx +0 -41
  220. package/dist/src/publicComponents/base-node/subscribe.tsx +0 -13
  221. package/dist/src/publicComponents/cron-node.tsx +0 -24
  222. package/dist/src/publicComponents/event-node.tsx +0 -20
  223. package/dist/src/publicComponents/node-props.tsx +0 -15
  224. package/dist/src/publicComponents/noop-node.tsx +0 -19
  225. package/dist/src/setupTests.ts +0 -1
  226. package/dist/src/stores/use-app-tabs-store.ts +0 -49
  227. package/dist/src/stores/use-flow-store.ts +0 -31
  228. package/dist/src/stores/use-global-store.ts +0 -24
  229. package/dist/src/stores/use-motia-config-store.ts +0 -36
  230. package/dist/src/stores/use-tabs-store.ts +0 -34
  231. package/dist/src/system-view-mode.tsx +0 -28
  232. package/dist/src/types/endpoint.ts +0 -12
  233. package/dist/src/types/file.ts +0 -7
  234. package/dist/src/types/flow.ts +0 -103
  235. package/eslint.config.cjs +0 -22
  236. package/jest.config.cjs +0 -68
package/dist/index.d.ts CHANGED
@@ -1,189 +1,10 @@
1
- import { HandleProps, Position } from "@xyflow/react";
2
- import React$1, { HTMLAttributes, JSX, PropsWithChildren } from "react";
3
- import { JSONSchema7 } from "json-schema";
4
-
5
- //#region src/components/tutorial/engine/tutorial-types.d.ts
6
- type TutorialActionClick = {
7
- type: "click";
8
- selector: string;
9
- optional?: boolean;
10
- };
11
- type TutorialActionEditor = {
12
- type: "fill-editor";
13
- content: Record<string, any>;
14
- };
15
- type TutorialAction = TutorialActionClick | TutorialActionEditor;
16
- type TutorialImage = {
17
- height: number;
18
- src: string;
19
- };
20
- type TutorialStep = {
21
- title: string;
22
- description: React.FC<void>;
23
- image?: TutorialImage;
24
- link?: string;
25
- elementXpath?: string;
26
- before?: TutorialAction[];
27
- };
28
- //#endregion
29
- //#region src/components/tutorial/engine/workbench-xpath.d.ts
30
- declare const workbenchXPath: {
31
- sidebarContainer: string;
32
- closePanelButton: string;
33
- bottomPanel: string;
34
- flows: {
35
- dropdownFlow: (flowId: string) => string;
36
- feature: (featureId: string) => string;
37
- previewButton: (stepId: string) => string;
38
- node: (stepId: string) => string;
39
- };
40
- endpoints: {
41
- endpointsList: string;
42
- endpoint: (method: string, path: string) => string;
43
- callPanel: string;
44
- specButton: string;
45
- bodyTab: string;
46
- headersTab: string;
47
- paramsTab: string;
48
- callTab: string;
49
- response: string;
50
- playButton: string;
51
- };
52
- tracing: {
53
- trace: (index: number) => string;
54
- details: string;
55
- timeline: (index: number) => string;
56
- };
57
- logs: {
58
- container: string;
59
- searchContainer: string;
60
- traceColumn: (index: number) => string;
61
- row: string;
62
- };
63
- states: {
64
- container: string;
65
- row: (index: number) => string;
66
- };
67
- links: {
68
- flows: string;
69
- endpoints: string;
70
- tracing: string;
71
- logs: string;
72
- states: string;
73
- };
74
- };
75
- //#endregion
76
- //#region src/types/flow.d.ts
77
- type EventNodeData = {
78
- type: string;
79
- name: string;
80
- description?: string;
81
- subscribes: string[];
82
- emits: Array<string | {
83
- topic: string;
84
- label?: string;
85
- }>;
86
- virtualEmits?: Array<string | {
87
- topic: string;
88
- label?: string;
89
- }>;
90
- virtualSubscribes?: string[];
91
- language?: string;
92
- };
93
- type NoopNodeData = {
94
- type: string;
95
- name: string;
96
- description?: string;
97
- virtualEmits: string[];
98
- subscribes: string[];
99
- };
100
- type ApiNodeData = {
101
- type: string;
102
- name: string;
103
- language?: string;
104
- description?: string;
105
- emits: Array<string | {
106
- topic: string;
107
- label?: string;
108
- }>;
109
- subscribes?: string[];
110
- virtualEmits?: Array<string | {
111
- topic: string;
112
- label?: string;
113
- }>;
114
- virtualSubscribes?: string[];
115
- webhookUrl?: string;
116
- bodySchema?: JSONSchema7;
117
- };
118
- type CronNodeData = {
119
- type: string;
120
- name: string;
121
- description?: string;
122
- emits: Array<string | {
123
- topic: string;
124
- label?: string;
125
- }>;
126
- virtualEmits?: Array<string | {
127
- topic: string;
128
- label?: string;
129
- }>;
130
- virtualSubscribes?: string[];
131
- cronExpression: string;
132
- language?: string;
133
- };
134
- //#endregion
135
- //#region src/publicComponents/node-props.d.ts
136
- type BaseNodeProps = {
137
- id: string;
138
- nodeConfig?: {
139
- sourceHandlePosition?: "bottom" | "right";
140
- targetHandlePosition?: "top" | "left";
141
- };
142
- };
143
- type EventNodeProps = {
144
- data: BaseNodeProps & EventNodeData;
145
- };
146
- type NoopNodeProps = {
147
- data: BaseNodeProps & NoopNodeData;
148
- };
149
- type ApiNodeProps = {
150
- data: BaseNodeProps & ApiNodeData;
151
- };
152
- type CronNodeProps = {
153
- data: BaseNodeProps & CronNodeData;
154
- };
155
- //#endregion
156
- //#region src/publicComponents/api-node.d.ts
157
- type Props$2 = PropsWithChildren<ApiNodeProps>;
158
- declare const ApiNode: ({
159
- data,
160
- children
161
- }: Props$2) => JSX.Element;
162
- //#endregion
163
- //#region src/publicComponents/base-node/base-handle.d.ts
164
- type Props$1 = HandleProps & Omit<HTMLAttributes<HTMLDivElement>, "id"> & {
165
- isHidden?: boolean;
166
- onTogglePosition?: () => void;
167
- };
168
- declare const BaseHandle: React$1.FC<Props$1>;
169
- //#endregion
170
- //#region src/publicComponents/base-node/base-node.d.ts
171
- type Props = PropsWithChildren<{
172
- title: string;
173
- subtitle?: string;
174
- variant: "event" | "api" | "noop" | "cron";
175
- language?: string;
176
- className?: string;
177
- disableSourceHandle?: boolean;
178
- disableTargetHandle?: boolean;
179
- data: BaseNodeProps;
180
- }>;
181
- declare const BaseNode: React$1.FC<Props>;
182
- //#endregion
183
- //#region src/publicComponents/event-node.d.ts
184
- declare const EventNode: React$1.FC<PropsWithChildren<EventNodeProps>>;
185
- //#endregion
186
- //#region src/publicComponents/noop-node.d.ts
187
- declare const NoopNode: React$1.FC<PropsWithChildren<NoopNodeProps>>;
188
- //#endregion
189
- export { ApiNode, type ApiNodeData, type ApiNodeProps, BaseHandle, BaseNode, type BaseNodeProps, type CronNodeProps, EventNode, type EventNodeData, type EventNodeProps, NoopNode, type NoopNodeProps, Position, type TutorialStep, workbenchXPath };
1
+ export { Position } from '@xyflow/react';
2
+ export type { TutorialStep } from './src/components/tutorial/engine/tutorial-types';
3
+ export { workbenchXPath } from './src/components/tutorial/engine/workbench-xpath';
4
+ export { ApiNode } from './src/publicComponents/api-node';
5
+ export { BaseHandle } from './src/publicComponents/base-node/base-handle';
6
+ export { BaseNode } from './src/publicComponents/base-node/base-node';
7
+ export { EventNode } from './src/publicComponents/event-node';
8
+ export type { ApiNodeProps, BaseNodeProps, CronNodeProps, EventNodeProps, NoopNodeProps, } from './src/publicComponents/node-props';
9
+ export { NoopNode } from './src/publicComponents/noop-node';
10
+ export type { ApiNodeData, EventNodeData } from './src/types/flow';
package/dist/index.html CHANGED
@@ -67,6 +67,6 @@
67
67
  </head>
68
68
  <body class="dark">
69
69
  <div id="root"></div>
70
- <script type="module" src="/src/main.tsx"></script>
70
+ <script type="module" src="/src/main.js"></script>
71
71
  </body>
72
72
  </html>