@flowdrop/flowdrop 1.0.0

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 (403) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +252 -0
  3. package/dist/adapters/WorkflowAdapter.d.ts +167 -0
  4. package/dist/adapters/WorkflowAdapter.js +368 -0
  5. package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +96 -0
  6. package/dist/adapters/agentspec/AgentSpecAdapter.js +626 -0
  7. package/dist/adapters/agentspec/agentAdapter.d.ts +59 -0
  8. package/dist/adapters/agentspec/agentAdapter.js +91 -0
  9. package/dist/adapters/agentspec/autoLayout.d.ts +34 -0
  10. package/dist/adapters/agentspec/autoLayout.js +127 -0
  11. package/dist/adapters/agentspec/componentTypeDefaults.d.ts +73 -0
  12. package/dist/adapters/agentspec/componentTypeDefaults.js +238 -0
  13. package/dist/adapters/agentspec/defaultNodeTypes.d.ts +53 -0
  14. package/dist/adapters/agentspec/defaultNodeTypes.js +561 -0
  15. package/dist/adapters/agentspec/index.d.ts +37 -0
  16. package/dist/adapters/agentspec/index.js +39 -0
  17. package/dist/adapters/agentspec/validator.d.ts +34 -0
  18. package/dist/adapters/agentspec/validator.js +169 -0
  19. package/dist/api/enhanced-client.d.ts +183 -0
  20. package/dist/api/enhanced-client.js +430 -0
  21. package/dist/components/App.svelte +981 -0
  22. package/dist/components/App.svelte.d.ts +54 -0
  23. package/dist/components/CanvasBanner.stories.svelte +29 -0
  24. package/dist/components/CanvasBanner.stories.svelte.d.ts +27 -0
  25. package/dist/components/CanvasBanner.svelte +57 -0
  26. package/dist/components/CanvasBanner.svelte.d.ts +8 -0
  27. package/dist/components/ConfigForm.svelte +1138 -0
  28. package/dist/components/ConfigForm.svelte.d.ts +44 -0
  29. package/dist/components/ConfigModal.svelte +188 -0
  30. package/dist/components/ConfigModal.svelte.d.ts +13 -0
  31. package/dist/components/ConfigPanel.stories.svelte +47 -0
  32. package/dist/components/ConfigPanel.stories.svelte.d.ts +27 -0
  33. package/dist/components/ConfigPanel.svelte +182 -0
  34. package/dist/components/ConfigPanel.svelte.d.ts +32 -0
  35. package/dist/components/ConnectionLine.svelte +32 -0
  36. package/dist/components/ConnectionLine.svelte.d.ts +3 -0
  37. package/dist/components/EdgeRefresher.svelte +41 -0
  38. package/dist/components/EdgeRefresher.svelte.d.ts +9 -0
  39. package/dist/components/FlowDropZone.svelte +83 -0
  40. package/dist/components/FlowDropZone.svelte.d.ts +13 -0
  41. package/dist/components/LoadingSpinner.stories.svelte +30 -0
  42. package/dist/components/LoadingSpinner.stories.svelte.d.ts +27 -0
  43. package/dist/components/LoadingSpinner.svelte +36 -0
  44. package/dist/components/LoadingSpinner.svelte.d.ts +8 -0
  45. package/dist/components/Logo.stories.svelte +22 -0
  46. package/dist/components/Logo.stories.svelte.d.ts +27 -0
  47. package/dist/components/Logo.svelte +102 -0
  48. package/dist/components/Logo.svelte.d.ts +26 -0
  49. package/dist/components/LogsSidebar.svelte +563 -0
  50. package/dist/components/LogsSidebar.svelte.d.ts +17 -0
  51. package/dist/components/MarkdownDisplay.stories.svelte +36 -0
  52. package/dist/components/MarkdownDisplay.stories.svelte.d.ts +27 -0
  53. package/dist/components/MarkdownDisplay.svelte +29 -0
  54. package/dist/components/MarkdownDisplay.svelte.d.ts +7 -0
  55. package/dist/components/Navbar.stories.svelte +53 -0
  56. package/dist/components/Navbar.stories.svelte.d.ts +27 -0
  57. package/dist/components/Navbar.svelte +726 -0
  58. package/dist/components/Navbar.svelte.d.ts +29 -0
  59. package/dist/components/NodeSidebar.svelte +762 -0
  60. package/dist/components/NodeSidebar.svelte.d.ts +9 -0
  61. package/dist/components/NodeStatusOverlay.stories.svelte +85 -0
  62. package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +27 -0
  63. package/dist/components/NodeStatusOverlay.svelte +327 -0
  64. package/dist/components/NodeStatusOverlay.svelte.d.ts +11 -0
  65. package/dist/components/PipelineStatus.svelte +314 -0
  66. package/dist/components/PipelineStatus.svelte.d.ts +20 -0
  67. package/dist/components/PortCoordinateTracker.svelte +58 -0
  68. package/dist/components/PortCoordinateTracker.svelte.d.ts +12 -0
  69. package/dist/components/ReadOnlyDetails.svelte +170 -0
  70. package/dist/components/ReadOnlyDetails.svelte.d.ts +25 -0
  71. package/dist/components/SchemaForm.stories.svelte +116 -0
  72. package/dist/components/SchemaForm.stories.svelte.d.ts +27 -0
  73. package/dist/components/SchemaForm.svelte +536 -0
  74. package/dist/components/SchemaForm.svelte.d.ts +83 -0
  75. package/dist/components/SettingsModal.svelte +279 -0
  76. package/dist/components/SettingsModal.svelte.d.ts +23 -0
  77. package/dist/components/SettingsPanel.svelte +638 -0
  78. package/dist/components/SettingsPanel.svelte.d.ts +21 -0
  79. package/dist/components/StatusIcon.stories.svelte +60 -0
  80. package/dist/components/StatusIcon.stories.svelte.d.ts +27 -0
  81. package/dist/components/StatusIcon.svelte +119 -0
  82. package/dist/components/StatusIcon.svelte.d.ts +10 -0
  83. package/dist/components/StatusLabel.stories.svelte +17 -0
  84. package/dist/components/StatusLabel.stories.svelte.d.ts +27 -0
  85. package/dist/components/StatusLabel.svelte +33 -0
  86. package/dist/components/StatusLabel.svelte.d.ts +7 -0
  87. package/dist/components/ThemeToggle.stories.svelte +25 -0
  88. package/dist/components/ThemeToggle.stories.svelte.d.ts +27 -0
  89. package/dist/components/ThemeToggle.svelte +185 -0
  90. package/dist/components/ThemeToggle.svelte.d.ts +14 -0
  91. package/dist/components/UniversalNode.svelte +155 -0
  92. package/dist/components/UniversalNode.svelte.d.ts +15 -0
  93. package/dist/components/WorkflowEditor.svelte +1035 -0
  94. package/dist/components/WorkflowEditor.svelte.d.ts +23 -0
  95. package/dist/components/form/FormArray.svelte +1049 -0
  96. package/dist/components/form/FormArray.svelte.d.ts +22 -0
  97. package/dist/components/form/FormAutocomplete.svelte +1009 -0
  98. package/dist/components/form/FormAutocomplete.svelte.d.ts +25 -0
  99. package/dist/components/form/FormCheckboxGroup.stories.svelte +28 -0
  100. package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +27 -0
  101. package/dist/components/form/FormCheckboxGroup.svelte +155 -0
  102. package/dist/components/form/FormCheckboxGroup.svelte.d.ts +17 -0
  103. package/dist/components/form/FormCodeEditor.svelte +458 -0
  104. package/dist/components/form/FormCodeEditor.svelte.d.ts +25 -0
  105. package/dist/components/form/FormField.svelte +417 -0
  106. package/dist/components/form/FormField.svelte.d.ts +29 -0
  107. package/dist/components/form/FormFieldLight.svelte +425 -0
  108. package/dist/components/form/FormFieldLight.svelte.d.ts +18 -0
  109. package/dist/components/form/FormFieldWrapper.stories.svelte +53 -0
  110. package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +27 -0
  111. package/dist/components/form/FormFieldWrapper.svelte +125 -0
  112. package/dist/components/form/FormFieldWrapper.svelte.d.ts +18 -0
  113. package/dist/components/form/FormFieldset.svelte +142 -0
  114. package/dist/components/form/FormFieldset.svelte.d.ts +11 -0
  115. package/dist/components/form/FormMarkdownEditor.svelte +752 -0
  116. package/dist/components/form/FormMarkdownEditor.svelte.d.ts +33 -0
  117. package/dist/components/form/FormNumberField.stories.svelte +36 -0
  118. package/dist/components/form/FormNumberField.stories.svelte.d.ts +27 -0
  119. package/dist/components/form/FormNumberField.svelte +112 -0
  120. package/dist/components/form/FormNumberField.svelte.d.ts +25 -0
  121. package/dist/components/form/FormRangeField.stories.svelte +31 -0
  122. package/dist/components/form/FormRangeField.stories.svelte.d.ts +27 -0
  123. package/dist/components/form/FormRangeField.svelte +246 -0
  124. package/dist/components/form/FormRangeField.svelte.d.ts +23 -0
  125. package/dist/components/form/FormSelect.stories.svelte +50 -0
  126. package/dist/components/form/FormSelect.stories.svelte.d.ts +27 -0
  127. package/dist/components/form/FormSelect.svelte +129 -0
  128. package/dist/components/form/FormSelect.svelte.d.ts +20 -0
  129. package/dist/components/form/FormTemplateEditor.svelte +825 -0
  130. package/dist/components/form/FormTemplateEditor.svelte.d.ts +41 -0
  131. package/dist/components/form/FormTextField.stories.svelte +30 -0
  132. package/dist/components/form/FormTextField.stories.svelte.d.ts +27 -0
  133. package/dist/components/form/FormTextField.svelte +91 -0
  134. package/dist/components/form/FormTextField.svelte.d.ts +19 -0
  135. package/dist/components/form/FormTextarea.stories.svelte +34 -0
  136. package/dist/components/form/FormTextarea.stories.svelte.d.ts +27 -0
  137. package/dist/components/form/FormTextarea.svelte +97 -0
  138. package/dist/components/form/FormTextarea.svelte.d.ts +21 -0
  139. package/dist/components/form/FormToggle.stories.svelte +30 -0
  140. package/dist/components/form/FormToggle.stories.svelte.d.ts +27 -0
  141. package/dist/components/form/FormToggle.svelte +126 -0
  142. package/dist/components/form/FormToggle.svelte.d.ts +19 -0
  143. package/dist/components/form/FormUISchemaRenderer.svelte +136 -0
  144. package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +32 -0
  145. package/dist/components/form/index.d.ts +50 -0
  146. package/dist/components/form/index.js +54 -0
  147. package/dist/components/form/templateAutocomplete.d.ts +29 -0
  148. package/dist/components/form/templateAutocomplete.js +254 -0
  149. package/dist/components/form/types.d.ts +485 -0
  150. package/dist/components/form/types.js +73 -0
  151. package/dist/components/interrupt/ChoicePrompt.stories.svelte +52 -0
  152. package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +27 -0
  153. package/dist/components/interrupt/ChoicePrompt.svelte +401 -0
  154. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +23 -0
  155. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +71 -0
  156. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +27 -0
  157. package/dist/components/interrupt/ConfirmationPrompt.svelte +292 -0
  158. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +25 -0
  159. package/dist/components/interrupt/FormPrompt.svelte +236 -0
  160. package/dist/components/interrupt/FormPrompt.svelte.d.ts +23 -0
  161. package/dist/components/interrupt/InterruptBubble.svelte +601 -0
  162. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +16 -0
  163. package/dist/components/interrupt/ReviewPrompt.stories.svelte +67 -0
  164. package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +27 -0
  165. package/dist/components/interrupt/ReviewPrompt.svelte +861 -0
  166. package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +23 -0
  167. package/dist/components/interrupt/TextInputPrompt.stories.svelte +47 -0
  168. package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +27 -0
  169. package/dist/components/interrupt/TextInputPrompt.svelte +346 -0
  170. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +23 -0
  171. package/dist/components/interrupt/index.d.ts +13 -0
  172. package/dist/components/interrupt/index.js +15 -0
  173. package/dist/components/layouts/MainLayout.svelte +718 -0
  174. package/dist/components/layouts/MainLayout.svelte.d.ts +62 -0
  175. package/dist/components/nodes/GatewayNode.stories.svelte +108 -0
  176. package/dist/components/nodes/GatewayNode.stories.svelte.d.ts +26 -0
  177. package/dist/components/nodes/GatewayNode.svelte +591 -0
  178. package/dist/components/nodes/GatewayNode.svelte.d.ts +15 -0
  179. package/dist/components/nodes/IdeaNode.stories.svelte +52 -0
  180. package/dist/components/nodes/IdeaNode.stories.svelte.d.ts +26 -0
  181. package/dist/components/nodes/IdeaNode.svelte +455 -0
  182. package/dist/components/nodes/IdeaNode.svelte.d.ts +24 -0
  183. package/dist/components/nodes/NotesNode.stories.svelte +76 -0
  184. package/dist/components/nodes/NotesNode.stories.svelte.d.ts +26 -0
  185. package/dist/components/nodes/NotesNode.svelte +378 -0
  186. package/dist/components/nodes/NotesNode.svelte.d.ts +24 -0
  187. package/dist/components/nodes/SimpleNode.stories.svelte +159 -0
  188. package/dist/components/nodes/SimpleNode.stories.svelte.d.ts +26 -0
  189. package/dist/components/nodes/SimpleNode.svelte +451 -0
  190. package/dist/components/nodes/SimpleNode.svelte.d.ts +25 -0
  191. package/dist/components/nodes/SquareNode.stories.svelte +82 -0
  192. package/dist/components/nodes/SquareNode.stories.svelte.d.ts +26 -0
  193. package/dist/components/nodes/SquareNode.svelte +407 -0
  194. package/dist/components/nodes/SquareNode.svelte.d.ts +25 -0
  195. package/dist/components/nodes/TerminalNode.stories.svelte +25 -0
  196. package/dist/components/nodes/TerminalNode.stories.svelte.d.ts +26 -0
  197. package/dist/components/nodes/TerminalNode.svelte +690 -0
  198. package/dist/components/nodes/TerminalNode.svelte.d.ts +25 -0
  199. package/dist/components/nodes/ToolNode.stories.svelte +189 -0
  200. package/dist/components/nodes/ToolNode.stories.svelte.d.ts +26 -0
  201. package/dist/components/nodes/ToolNode.svelte +471 -0
  202. package/dist/components/nodes/ToolNode.svelte.d.ts +36 -0
  203. package/dist/components/nodes/WorkflowNode.stories.svelte +55 -0
  204. package/dist/components/nodes/WorkflowNode.stories.svelte.d.ts +26 -0
  205. package/dist/components/nodes/WorkflowNode.svelte +571 -0
  206. package/dist/components/nodes/WorkflowNode.svelte.d.ts +15 -0
  207. package/dist/components/playground/ChatPanel.svelte +905 -0
  208. package/dist/components/playground/ChatPanel.svelte.d.ts +46 -0
  209. package/dist/components/playground/ExecutionLogs.svelte +488 -0
  210. package/dist/components/playground/ExecutionLogs.svelte.d.ts +14 -0
  211. package/dist/components/playground/InputCollector.svelte +444 -0
  212. package/dist/components/playground/InputCollector.svelte.d.ts +16 -0
  213. package/dist/components/playground/MessageBubble.stories.svelte +62 -0
  214. package/dist/components/playground/MessageBubble.stories.svelte.d.ts +27 -0
  215. package/dist/components/playground/MessageBubble.svelte +633 -0
  216. package/dist/components/playground/MessageBubble.svelte.d.ts +24 -0
  217. package/dist/components/playground/Playground.svelte +1075 -0
  218. package/dist/components/playground/Playground.svelte.d.ts +25 -0
  219. package/dist/components/playground/PlaygroundModal.svelte +220 -0
  220. package/dist/components/playground/PlaygroundModal.svelte.d.ts +25 -0
  221. package/dist/components/playground/SessionManager.svelte +538 -0
  222. package/dist/components/playground/SessionManager.svelte.d.ts +20 -0
  223. package/dist/config/agentSpecEndpoints.d.ts +70 -0
  224. package/dist/config/agentSpecEndpoints.js +65 -0
  225. package/dist/config/constants.d.ts +43 -0
  226. package/dist/config/constants.js +31 -0
  227. package/dist/config/defaultCategories.d.ts +7 -0
  228. package/dist/config/defaultCategories.js +126 -0
  229. package/dist/config/defaultPortConfig.d.ts +6 -0
  230. package/dist/config/defaultPortConfig.js +201 -0
  231. package/dist/config/endpoints.d.ts +160 -0
  232. package/dist/config/endpoints.js +146 -0
  233. package/dist/config/runtimeConfig.d.ts +47 -0
  234. package/dist/config/runtimeConfig.js +80 -0
  235. package/dist/core/index.d.ts +75 -0
  236. package/dist/core/index.js +92 -0
  237. package/dist/display/index.d.ts +29 -0
  238. package/dist/display/index.js +36 -0
  239. package/dist/editor/index.d.ts +95 -0
  240. package/dist/editor/index.js +138 -0
  241. package/dist/form/code.d.ts +101 -0
  242. package/dist/form/code.js +168 -0
  243. package/dist/form/fieldRegistry.d.ts +169 -0
  244. package/dist/form/fieldRegistry.js +152 -0
  245. package/dist/form/full.d.ts +56 -0
  246. package/dist/form/full.js +80 -0
  247. package/dist/form/index.d.ts +77 -0
  248. package/dist/form/index.js +91 -0
  249. package/dist/form/markdown.d.ts +69 -0
  250. package/dist/form/markdown.js +103 -0
  251. package/dist/helpers/nodeLayoutHelper.d.ts +14 -0
  252. package/dist/helpers/nodeLayoutHelper.js +19 -0
  253. package/dist/helpers/proximityConnect.d.ts +94 -0
  254. package/dist/helpers/proximityConnect.js +314 -0
  255. package/dist/helpers/workflowEditorHelper.d.ts +183 -0
  256. package/dist/helpers/workflowEditorHelper.js +595 -0
  257. package/dist/index.d.ts +37 -0
  258. package/dist/index.js +64 -0
  259. package/dist/mocks/app-environment.d.ts +8 -0
  260. package/dist/mocks/app-environment.js +16 -0
  261. package/dist/mocks/app-forms.d.ts +2 -0
  262. package/dist/mocks/app-forms.js +22 -0
  263. package/dist/mocks/app-navigation.d.ts +5 -0
  264. package/dist/mocks/app-navigation.js +36 -0
  265. package/dist/mocks/app-stores.d.ts +14 -0
  266. package/dist/mocks/app-stores.js +26 -0
  267. package/dist/playground/index.d.ts +131 -0
  268. package/dist/playground/index.js +172 -0
  269. package/dist/playground/mount.d.ts +203 -0
  270. package/dist/playground/mount.js +235 -0
  271. package/dist/registry/BaseRegistry.d.ts +92 -0
  272. package/dist/registry/BaseRegistry.js +124 -0
  273. package/dist/registry/builtinFormats.d.ts +23 -0
  274. package/dist/registry/builtinFormats.js +70 -0
  275. package/dist/registry/builtinNodes.d.ts +77 -0
  276. package/dist/registry/builtinNodes.js +211 -0
  277. package/dist/registry/index.d.ts +8 -0
  278. package/dist/registry/index.js +12 -0
  279. package/dist/registry/nodeComponentRegistry.d.ts +276 -0
  280. package/dist/registry/nodeComponentRegistry.js +262 -0
  281. package/dist/registry/plugin.d.ts +215 -0
  282. package/dist/registry/plugin.js +249 -0
  283. package/dist/registry/workflowFormatRegistry.d.ts +122 -0
  284. package/dist/registry/workflowFormatRegistry.js +96 -0
  285. package/dist/schema/index.d.ts +23 -0
  286. package/dist/schema/index.js +23 -0
  287. package/dist/schemas/v1/workflow.schema.json +1078 -0
  288. package/dist/services/agentSpecExecutionService.d.ts +106 -0
  289. package/dist/services/agentSpecExecutionService.js +334 -0
  290. package/dist/services/api.d.ts +115 -0
  291. package/dist/services/api.js +214 -0
  292. package/dist/services/apiVariableService.d.ts +114 -0
  293. package/dist/services/apiVariableService.js +338 -0
  294. package/dist/services/autoSaveService.d.ts +112 -0
  295. package/dist/services/autoSaveService.js +227 -0
  296. package/dist/services/categoriesApi.d.ts +14 -0
  297. package/dist/services/categoriesApi.js +49 -0
  298. package/dist/services/draftStorage.d.ts +171 -0
  299. package/dist/services/draftStorage.js +299 -0
  300. package/dist/services/dynamicSchemaService.d.ts +108 -0
  301. package/dist/services/dynamicSchemaService.js +444 -0
  302. package/dist/services/globalSave.d.ts +69 -0
  303. package/dist/services/globalSave.js +248 -0
  304. package/dist/services/historyService.d.ts +208 -0
  305. package/dist/services/historyService.js +321 -0
  306. package/dist/services/interruptService.d.ts +133 -0
  307. package/dist/services/interruptService.js +280 -0
  308. package/dist/services/nodeExecutionService.d.ts +63 -0
  309. package/dist/services/nodeExecutionService.js +266 -0
  310. package/dist/services/playgroundService.d.ts +130 -0
  311. package/dist/services/playgroundService.js +321 -0
  312. package/dist/services/portConfigApi.d.ts +14 -0
  313. package/dist/services/portConfigApi.js +54 -0
  314. package/dist/services/settingsService.d.ts +92 -0
  315. package/dist/services/settingsService.js +196 -0
  316. package/dist/services/toastService.d.ts +156 -0
  317. package/dist/services/toastService.js +265 -0
  318. package/dist/services/variableService.d.ts +141 -0
  319. package/dist/services/variableService.js +463 -0
  320. package/dist/services/workflowStorage.d.ts +37 -0
  321. package/dist/services/workflowStorage.js +116 -0
  322. package/dist/settings/index.d.ts +25 -0
  323. package/dist/settings/index.js +33 -0
  324. package/dist/stores/categoriesStore.svelte.d.ts +32 -0
  325. package/dist/stores/categoriesStore.svelte.js +77 -0
  326. package/dist/stores/editorStateMachine.svelte.d.ts +42 -0
  327. package/dist/stores/editorStateMachine.svelte.js +132 -0
  328. package/dist/stores/historyStore.svelte.d.ts +136 -0
  329. package/dist/stores/historyStore.svelte.js +207 -0
  330. package/dist/stores/interruptStore.svelte.d.ts +179 -0
  331. package/dist/stores/interruptStore.svelte.js +346 -0
  332. package/dist/stores/playgroundStore.svelte.d.ts +230 -0
  333. package/dist/stores/playgroundStore.svelte.js +515 -0
  334. package/dist/stores/portCoordinateStore.svelte.d.ts +66 -0
  335. package/dist/stores/portCoordinateStore.svelte.js +186 -0
  336. package/dist/stores/settingsStore.svelte.d.ts +158 -0
  337. package/dist/stores/settingsStore.svelte.js +544 -0
  338. package/dist/stores/workflowStore.svelte.d.ts +260 -0
  339. package/dist/stores/workflowStore.svelte.js +649 -0
  340. package/dist/stories/CanvasDecorator.svelte +49 -0
  341. package/dist/stories/CanvasDecorator.svelte.d.ts +8 -0
  342. package/dist/stories/NodeDecorator.svelte +73 -0
  343. package/dist/stories/NodeDecorator.svelte.d.ts +8 -0
  344. package/dist/stories/utils.d.ts +93 -0
  345. package/dist/stories/utils.js +122 -0
  346. package/dist/styles/base.css +1300 -0
  347. package/dist/styles/toast.css +35 -0
  348. package/dist/styles/tokens.css +475 -0
  349. package/dist/svelte-app.d.ts +150 -0
  350. package/dist/svelte-app.js +295 -0
  351. package/dist/types/agentspec.d.ts +318 -0
  352. package/dist/types/agentspec.js +48 -0
  353. package/dist/types/auth.d.ts +263 -0
  354. package/dist/types/auth.js +229 -0
  355. package/dist/types/config.d.ts +151 -0
  356. package/dist/types/config.js +7 -0
  357. package/dist/types/events.d.ts +190 -0
  358. package/dist/types/events.js +30 -0
  359. package/dist/types/index.d.ts +1234 -0
  360. package/dist/types/index.js +27 -0
  361. package/dist/types/interrupt.d.ts +390 -0
  362. package/dist/types/interrupt.js +145 -0
  363. package/dist/types/interruptState.d.ts +211 -0
  364. package/dist/types/interruptState.js +308 -0
  365. package/dist/types/playground.d.ts +351 -0
  366. package/dist/types/playground.js +95 -0
  367. package/dist/types/settings.d.ts +189 -0
  368. package/dist/types/settings.js +97 -0
  369. package/dist/types/uischema.d.ts +144 -0
  370. package/dist/types/uischema.js +51 -0
  371. package/dist/utils/colors.d.ts +288 -0
  372. package/dist/utils/colors.js +548 -0
  373. package/dist/utils/config.d.ts +37 -0
  374. package/dist/utils/config.js +226 -0
  375. package/dist/utils/connections.d.ts +125 -0
  376. package/dist/utils/connections.js +414 -0
  377. package/dist/utils/errors.d.ts +28 -0
  378. package/dist/utils/errors.js +44 -0
  379. package/dist/utils/fetchWithAuth.d.ts +25 -0
  380. package/dist/utils/fetchWithAuth.js +34 -0
  381. package/dist/utils/handleIds.d.ts +35 -0
  382. package/dist/utils/handleIds.js +58 -0
  383. package/dist/utils/handlePositioning.d.ts +31 -0
  384. package/dist/utils/handlePositioning.js +35 -0
  385. package/dist/utils/icons.d.ts +106 -0
  386. package/dist/utils/icons.js +157 -0
  387. package/dist/utils/logger.d.ts +47 -0
  388. package/dist/utils/logger.js +72 -0
  389. package/dist/utils/nodeStatus.d.ts +53 -0
  390. package/dist/utils/nodeStatus.js +183 -0
  391. package/dist/utils/nodeTypes.d.ts +117 -0
  392. package/dist/utils/nodeTypes.js +244 -0
  393. package/dist/utils/nodeWrapper.d.ts +39 -0
  394. package/dist/utils/nodeWrapper.js +62 -0
  395. package/dist/utils/performanceUtils.d.ts +30 -0
  396. package/dist/utils/performanceUtils.js +108 -0
  397. package/dist/utils/sanitize.d.ts +19 -0
  398. package/dist/utils/sanitize.js +31 -0
  399. package/dist/utils/uischema.d.ts +52 -0
  400. package/dist/utils/uischema.js +88 -0
  401. package/dist/utils/validation.d.ts +29 -0
  402. package/dist/utils/validation.js +39 -0
  403. package/package.json +292 -0
@@ -0,0 +1,485 @@
1
+ /**
2
+ * Form Field Types
3
+ * Shared types for form components in the FlowDrop workflow editor
4
+ *
5
+ * These types provide a foundation for dynamic form rendering based on JSON Schema
6
+ * and support extensibility for complex field types like arrays and objects.
7
+ */
8
+ import type { AutocompleteConfig, TemplateVariablesConfig } from '../../types/index.js';
9
+ /**
10
+ * Supported field types for form rendering
11
+ * Aligned with JSON Schema specification (draft-07)
12
+ *
13
+ * Note: 'select' type was removed in favor of using standard JSON Schema patterns:
14
+ * - Use `enum` for simple value lists
15
+ * - Use `oneOf` with `const`/`title` for labeled options
16
+ */
17
+ export type FieldType = 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object';
18
+ /**
19
+ * Field format for specialized rendering
20
+ * - multiline: Renders as textarea
21
+ * - hidden: Field is hidden from UI but included in form submission
22
+ * - range: Renders as range slider for numeric values
23
+ * - json: Renders as CodeMirror JSON editor
24
+ * - code: Alias for json, renders as CodeMirror editor
25
+ * - markdown: Renders as SimpleMDE Markdown editor
26
+ * - template: Renders as CodeMirror editor with Twig/Liquid syntax highlighting
27
+ * - autocomplete: Renders as text input with autocomplete suggestions from callback URL
28
+ */
29
+ export type FieldFormat = 'multiline' | 'hidden' | 'range' | 'json' | 'code' | 'markdown' | 'template' | 'autocomplete' | string;
30
+ /**
31
+ * Option type for select and checkbox group fields
32
+ *
33
+ * For new schemas, prefer JSON Schema `oneOf` with `const`/`title`.
34
+ * This type is supported for simpler use cases and backward compatibility.
35
+ *
36
+ * @example Standard JSON Schema approach (preferred):
37
+ * ```json
38
+ * {
39
+ * "type": "string",
40
+ * "oneOf": [
41
+ * { "const": "draft", "title": "Draft" },
42
+ * { "const": "published", "title": "Published" }
43
+ * ]
44
+ * }
45
+ * ```
46
+ */
47
+ export interface FieldOption {
48
+ /** The value stored when this option is selected */
49
+ value: string;
50
+ /** The display label for this option */
51
+ label: string;
52
+ }
53
+ /**
54
+ * JSON Schema oneOf item for labeled options
55
+ * This is the standard JSON Schema way to define labeled select options
56
+ *
57
+ * @example
58
+ * ```json
59
+ * {
60
+ * "type": "string",
61
+ * "oneOf": [
62
+ * { "const": "draft", "title": "Draft" },
63
+ * { "const": "published", "title": "Published" }
64
+ * ]
65
+ * }
66
+ * ```
67
+ */
68
+ export interface OneOfItem {
69
+ /** The constant value for this option (JSON Schema `const` keyword) */
70
+ const: string | number | boolean;
71
+ /** Human-readable label for this option (JSON Schema `title` keyword) */
72
+ title?: string;
73
+ /** Optional description for this option */
74
+ description?: string;
75
+ }
76
+ /**
77
+ * Base properties shared by all form fields
78
+ */
79
+ export interface BaseFieldProps<T = unknown> {
80
+ /** Unique identifier for the field (used for id and name attributes) */
81
+ id: string;
82
+ /** Current value of the field */
83
+ value: T;
84
+ /** Whether the field is required */
85
+ required?: boolean;
86
+ /** Whether the field is disabled */
87
+ disabled?: boolean;
88
+ /** Placeholder text for input fields */
89
+ placeholder?: string;
90
+ /** ARIA description ID for accessibility */
91
+ ariaDescribedBy?: string;
92
+ /** Callback when the field value changes */
93
+ onChange: (value: T) => void;
94
+ }
95
+ /**
96
+ * Properties for text input fields
97
+ */
98
+ export interface TextFieldProps extends BaseFieldProps<string> {
99
+ }
100
+ /**
101
+ * Properties for multiline text fields (textarea)
102
+ */
103
+ export interface TextareaFieldProps extends BaseFieldProps<string> {
104
+ /** Number of visible rows */
105
+ rows?: number;
106
+ }
107
+ /**
108
+ * Properties for number input fields
109
+ */
110
+ export interface NumberFieldProps extends BaseFieldProps<number | string> {
111
+ /** Minimum allowed value */
112
+ min?: number;
113
+ /** Maximum allowed value */
114
+ max?: number;
115
+ /** Step increment for the input */
116
+ step?: number;
117
+ }
118
+ /**
119
+ * Properties for boolean toggle fields
120
+ */
121
+ export interface ToggleFieldProps extends BaseFieldProps<boolean> {
122
+ /** Label shown when toggle is on */
123
+ onLabel?: string;
124
+ /** Label shown when toggle is off */
125
+ offLabel?: string;
126
+ }
127
+ /**
128
+ * Properties for range slider fields
129
+ */
130
+ export interface RangeFieldProps extends BaseFieldProps<number | string> {
131
+ /** Minimum allowed value */
132
+ min?: number;
133
+ /** Maximum allowed value */
134
+ max?: number;
135
+ /** Step increment for the slider */
136
+ step?: number;
137
+ }
138
+ /**
139
+ * Properties for select dropdown fields
140
+ */
141
+ export interface SelectFieldProps extends BaseFieldProps<string> {
142
+ /** Available options for selection */
143
+ options: FieldOption[] | string[];
144
+ }
145
+ /**
146
+ * Properties for checkbox group fields (multiple selection)
147
+ */
148
+ export interface CheckboxGroupFieldProps extends BaseFieldProps<string[]> {
149
+ /** Available options for selection */
150
+ options: string[];
151
+ }
152
+ /**
153
+ * Properties for array fields (dynamic lists)
154
+ */
155
+ export interface ArrayFieldProps extends BaseFieldProps<unknown[]> {
156
+ /** Schema for array items */
157
+ itemSchema: FieldSchema;
158
+ /** Minimum number of items required */
159
+ minItems?: number;
160
+ /** Maximum number of items allowed */
161
+ maxItems?: number;
162
+ /** Label for the add button */
163
+ addLabel?: string;
164
+ }
165
+ /**
166
+ * Properties for code editor fields (CodeMirror-based)
167
+ */
168
+ export interface CodeEditorFieldProps extends BaseFieldProps<unknown> {
169
+ /** Whether to use dark theme */
170
+ darkTheme?: boolean;
171
+ /** Editor height in pixels or CSS value */
172
+ height?: string;
173
+ /** Whether to auto-format JSON on blur */
174
+ autoFormat?: boolean;
175
+ }
176
+ /**
177
+ * Properties for markdown editor fields (CodeMirror 6-based)
178
+ */
179
+ export interface MarkdownEditorFieldProps extends BaseFieldProps<string> {
180
+ /** Editor height in pixels or CSS value */
181
+ height?: string;
182
+ /** Whether to show the toolbar */
183
+ showToolbar?: boolean;
184
+ /** Whether to show the status bar */
185
+ showStatusBar?: boolean;
186
+ /** Whether to enable spell checking */
187
+ spellChecker?: boolean;
188
+ }
189
+ /**
190
+ * Properties for template editor fields (CodeMirror with Twig/Liquid syntax)
191
+ */
192
+ export interface TemplateEditorFieldProps extends BaseFieldProps<string> {
193
+ /** Whether to use dark theme */
194
+ darkTheme?: boolean;
195
+ /** Editor height in pixels or CSS value */
196
+ height?: string;
197
+ /**
198
+ * Configuration for template variable autocomplete.
199
+ * Controls which variables are available and how they are displayed.
200
+ */
201
+ variables?: TemplateVariablesConfig;
202
+ /** Placeholder variable example for the hint */
203
+ placeholderExample?: string;
204
+ }
205
+ /**
206
+ * Properties for autocomplete fields
207
+ * Fetches suggestions from a callback URL with support for debouncing and keyboard navigation
208
+ */
209
+ export interface AutocompleteFieldProps extends BaseFieldProps<string | string[]> {
210
+ /** Autocomplete configuration from schema */
211
+ autocomplete: AutocompleteConfig;
212
+ /** Base URL for resolving relative callback URLs */
213
+ baseUrl?: string;
214
+ }
215
+ /**
216
+ * Autocomplete configuration imported from main types
217
+ * Re-exported here for convenience
218
+ */
219
+ export type { AutocompleteConfig } from '../../types/index.js';
220
+ /**
221
+ * Field schema definition derived from JSON Schema property
222
+ * Used to determine which field component to render
223
+ *
224
+ * FlowDrop follows JSON Schema draft-07 specification for field definitions.
225
+ * For select/dropdown fields, use standard JSON Schema patterns:
226
+ * - `enum` for simple value lists (no labels)
227
+ * - `oneOf` with `const`/`title` for labeled options
228
+ */
229
+ export interface FieldSchema {
230
+ /** The field type from JSON Schema */
231
+ type: FieldType | string;
232
+ /** Display title for the field */
233
+ title?: string;
234
+ /** Description for help text */
235
+ description?: string;
236
+ /** Default value for the field */
237
+ default?: unknown;
238
+ /** Enum values for select/checkbox fields (simple values without labels) */
239
+ enum?: unknown[];
240
+ /**
241
+ * JSON Schema oneOf for labeled options (standard approach)
242
+ * Use this instead of the deprecated `options` property
243
+ *
244
+ * @example
245
+ * ```json
246
+ * {
247
+ * "type": "string",
248
+ * "oneOf": [
249
+ * { "const": "draft", "title": "Draft" },
250
+ * { "const": "published", "title": "Published" }
251
+ * ]
252
+ * }
253
+ * ```
254
+ */
255
+ oneOf?: OneOfItem[];
256
+ /** Whether multiple values can be selected (for enum/oneOf) */
257
+ multiple?: boolean;
258
+ /** Format hint for specialized rendering */
259
+ format?: FieldFormat;
260
+ /** Placeholder text */
261
+ placeholder?: string;
262
+ /** Minimum value for numbers */
263
+ minimum?: number;
264
+ /** Maximum value for numbers */
265
+ maximum?: number;
266
+ /** Step increment for number/range inputs */
267
+ step?: number;
268
+ /** Minimum length for strings */
269
+ minLength?: number;
270
+ /** Maximum length for strings */
271
+ maxLength?: number;
272
+ /** Validation pattern for strings */
273
+ pattern?: string;
274
+ /** Item schema for array fields */
275
+ items?: FieldSchema;
276
+ /** Minimum number of items for array fields */
277
+ minItems?: number;
278
+ /** Maximum number of items for array fields */
279
+ maxItems?: number;
280
+ /** Property schemas for object fields (future use) */
281
+ properties?: Record<string, FieldSchema>;
282
+ /** Required properties for object fields (future use) */
283
+ required?: string[];
284
+ /** Autocomplete configuration for fetching suggestions from callback URL */
285
+ autocomplete?: AutocompleteConfig;
286
+ /**
287
+ * Whether the field is read-only (JSON Schema readOnly keyword).
288
+ * When true, the field is displayed but cannot be edited.
289
+ */
290
+ readOnly?: boolean;
291
+ /**
292
+ * Configuration for template variable autocomplete.
293
+ * Controls which input ports provide variables and how they are displayed.
294
+ *
295
+ * @example
296
+ * ```json
297
+ * {
298
+ * "type": "string",
299
+ * "format": "template",
300
+ * "variables": {
301
+ * "ports": ["data", "context"],
302
+ * "showHints": true
303
+ * }
304
+ * }
305
+ * ```
306
+ */
307
+ variables?: TemplateVariablesConfig;
308
+ /** Allow additional properties not defined by the schema */
309
+ [key: string]: unknown;
310
+ }
311
+ /**
312
+ * Props for the FormField factory component
313
+ * Renders the appropriate field component based on schema
314
+ */
315
+ export interface FormFieldFactoryProps {
316
+ /** Unique key/id for the field */
317
+ fieldKey: string;
318
+ /** Field schema definition */
319
+ schema: FieldSchema;
320
+ /** Current field value */
321
+ value: unknown;
322
+ /** Whether the field is required */
323
+ required?: boolean;
324
+ /** Animation delay index for staggered animations */
325
+ animationIndex?: number;
326
+ /** Callback when the field value changes */
327
+ onChange: (value: unknown) => void;
328
+ }
329
+ /**
330
+ * Props for the FormFieldWrapper component
331
+ * Provides label, description, and layout for field content
332
+ */
333
+ export interface FormFieldWrapperProps {
334
+ /** Field identifier for label association */
335
+ id: string;
336
+ /** Display label text */
337
+ label: string;
338
+ /** Whether the field is required */
339
+ required?: boolean;
340
+ /** Description/help text for the field */
341
+ description?: string;
342
+ /** Animation delay in milliseconds */
343
+ animationDelay?: number;
344
+ }
345
+ /**
346
+ * Type guard to check if options are FieldOption objects
347
+ */
348
+ export declare function isFieldOptionArray(options: FieldOption[] | string[]): options is FieldOption[];
349
+ /**
350
+ * Type guard to check if items are OneOfItem objects (JSON Schema oneOf pattern)
351
+ */
352
+ export declare function isOneOfArray(items: unknown[]): items is OneOfItem[];
353
+ /**
354
+ * Convert JSON Schema oneOf items to FieldOption format
355
+ * This bridges the standard oneOf pattern to the internal FieldOption structure
356
+ *
357
+ * @param oneOfItems - Array of JSON Schema oneOf items with const/title
358
+ * @returns Array of FieldOption objects
359
+ */
360
+ export declare function oneOfToOptions(oneOfItems: OneOfItem[]): FieldOption[];
361
+ /**
362
+ * Normalize options to FieldOption format
363
+ * Handles multiple input formats for consistent internal handling:
364
+ * - JSON Schema oneOf items -> converted to FieldOption
365
+ * - FieldOption array -> passed through
366
+ * - String array -> converted to FieldOption
367
+ *
368
+ * @param options - Options in various formats
369
+ * @returns Normalized FieldOption array
370
+ */
371
+ export declare function normalizeOptions(options: FieldOption[] | string[] | OneOfItem[] | unknown[]): FieldOption[];
372
+ /**
373
+ * Get options from a schema, handling both oneOf (standard) and options (legacy) patterns
374
+ * Prefers oneOf if both are present
375
+ *
376
+ * @param schema - Field schema that may contain oneOf or options
377
+ * @returns Normalized FieldOption array
378
+ */
379
+ export declare function getSchemaOptions(schema: FieldSchema): FieldOption[];
380
+ /**
381
+ * Props interface for the SchemaForm component
382
+ *
383
+ * SchemaForm is a standalone form generator that creates dynamic forms
384
+ * from JSON Schema definitions without requiring FlowDrop workflow nodes.
385
+ *
386
+ * @example
387
+ * ```typescript
388
+ * const props: SchemaFormProps = {
389
+ * schema: {
390
+ * type: "object",
391
+ * properties: {
392
+ * name: { type: "string", title: "Name" },
393
+ * age: { type: "number", title: "Age" }
394
+ * },
395
+ * required: ["name"]
396
+ * },
397
+ * values: { name: "John", age: 30 },
398
+ * onChange: (values) => handleChange(values),
399
+ * showActions: true,
400
+ * onSave: (values) => handleSave(values)
401
+ * };
402
+ * ```
403
+ */
404
+ export interface SchemaFormProps {
405
+ /**
406
+ * JSON Schema definition for the form.
407
+ * Should follow JSON Schema draft-07 format with type: "object".
408
+ * Properties define the form fields to render.
409
+ */
410
+ schema: {
411
+ type: 'object';
412
+ properties: Record<string, FieldSchema>;
413
+ required?: string[];
414
+ additionalProperties?: boolean;
415
+ };
416
+ /**
417
+ * Current form values as key-value pairs.
418
+ * Keys should correspond to properties defined in the schema.
419
+ * Missing values will use schema defaults if defined.
420
+ */
421
+ values?: Record<string, unknown>;
422
+ /**
423
+ * Callback fired whenever any field value changes.
424
+ * Receives the complete updated values object.
425
+ * Use this for controlled form state management.
426
+ * @param values - Updated form values
427
+ */
428
+ onChange?: (values: Record<string, unknown>) => void;
429
+ /**
430
+ * Whether to display Save and Cancel action buttons.
431
+ * When false, the form operates in "inline" mode without buttons.
432
+ * @default false
433
+ */
434
+ showActions?: boolean;
435
+ /**
436
+ * Label text for the save button.
437
+ * Only used when showActions is true.
438
+ * @default "Save"
439
+ */
440
+ saveLabel?: string;
441
+ /**
442
+ * Label text for the cancel button.
443
+ * Only used when showActions is true.
444
+ * @default "Cancel"
445
+ */
446
+ cancelLabel?: string;
447
+ /**
448
+ * Callback fired when the Save button is clicked.
449
+ * Receives the final form values after collecting from DOM.
450
+ * @param values - Final form values
451
+ */
452
+ onSave?: (values: Record<string, unknown>) => void;
453
+ /**
454
+ * Callback fired when the Cancel button is clicked.
455
+ * Use this to reset form state or close modals.
456
+ */
457
+ onCancel?: () => void;
458
+ /**
459
+ * Whether the form is in a loading state.
460
+ * Disables all inputs and shows a loading spinner on the save button.
461
+ * @default false
462
+ */
463
+ loading?: boolean;
464
+ /**
465
+ * Whether the form is disabled.
466
+ * Prevents all interactions including save.
467
+ * @default false
468
+ */
469
+ disabled?: boolean;
470
+ /**
471
+ * Custom CSS class to apply to the form container.
472
+ * Use for additional styling customization.
473
+ */
474
+ class?: string;
475
+ /**
476
+ * Authentication provider for autocomplete fields.
477
+ * Used to add authentication headers when fetching suggestions from callback URLs.
478
+ */
479
+ authProvider?: import('../../types/index.js').AuthProvider;
480
+ /**
481
+ * Base URL for resolving relative autocomplete callback URLs.
482
+ * @default ""
483
+ */
484
+ baseUrl?: string;
485
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Form Field Types
3
+ * Shared types for form components in the FlowDrop workflow editor
4
+ *
5
+ * These types provide a foundation for dynamic form rendering based on JSON Schema
6
+ * and support extensibility for complex field types like arrays and objects.
7
+ */
8
+ /**
9
+ * Type guard to check if options are FieldOption objects
10
+ */
11
+ export function isFieldOptionArray(options) {
12
+ return options.length > 0 && typeof options[0] === 'object' && 'value' in options[0];
13
+ }
14
+ /**
15
+ * Type guard to check if items are OneOfItem objects (JSON Schema oneOf pattern)
16
+ */
17
+ export function isOneOfArray(items) {
18
+ return (items.length > 0 && typeof items[0] === 'object' && items[0] !== null && 'const' in items[0]);
19
+ }
20
+ /**
21
+ * Convert JSON Schema oneOf items to FieldOption format
22
+ * This bridges the standard oneOf pattern to the internal FieldOption structure
23
+ *
24
+ * @param oneOfItems - Array of JSON Schema oneOf items with const/title
25
+ * @returns Array of FieldOption objects
26
+ */
27
+ export function oneOfToOptions(oneOfItems) {
28
+ return oneOfItems.map((item) => ({
29
+ value: String(item.const),
30
+ label: item.title ?? String(item.const)
31
+ }));
32
+ }
33
+ /**
34
+ * Normalize options to FieldOption format
35
+ * Handles multiple input formats for consistent internal handling:
36
+ * - JSON Schema oneOf items -> converted to FieldOption
37
+ * - FieldOption array -> passed through
38
+ * - String array -> converted to FieldOption
39
+ *
40
+ * @param options - Options in various formats
41
+ * @returns Normalized FieldOption array
42
+ */
43
+ export function normalizeOptions(options) {
44
+ if (!options || options.length === 0) {
45
+ return [];
46
+ }
47
+ // Handle JSON Schema oneOf pattern (standard)
48
+ if (isOneOfArray(options)) {
49
+ return oneOfToOptions(options);
50
+ }
51
+ // Handle FieldOption array
52
+ if (isFieldOptionArray(options)) {
53
+ return options;
54
+ }
55
+ // Handle string array (simple enum values)
56
+ return options.map((opt) => ({
57
+ value: String(opt),
58
+ label: String(opt)
59
+ }));
60
+ }
61
+ /**
62
+ * Get options from a schema, handling both oneOf (standard) and options (legacy) patterns
63
+ * Prefers oneOf if both are present
64
+ *
65
+ * @param schema - Field schema that may contain oneOf or options
66
+ * @returns Normalized FieldOption array
67
+ */
68
+ export function getSchemaOptions(schema) {
69
+ if (schema.oneOf && schema.oneOf.length > 0) {
70
+ return oneOfToOptions(schema.oneOf);
71
+ }
72
+ return [];
73
+ }
@@ -0,0 +1,52 @@
1
+ <script module>
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import ChoicePrompt from './ChoicePrompt.svelte';
4
+ import { fn } from 'storybook/test';
5
+ import { createChoiceConfig } from '../../stories/utils.js';
6
+
7
+ const { Story } = defineMeta({
8
+ title: 'Interrupt/ChoicePrompt',
9
+ component: ChoicePrompt,
10
+ tags: ['autodocs'],
11
+ args: {
12
+ config: createChoiceConfig(),
13
+ isResolved: false,
14
+ isSubmitting: false,
15
+ onSubmit: fn()
16
+ }
17
+ });
18
+ </script>
19
+
20
+ <Story name="Single Select" />
21
+
22
+ <Story
23
+ name="Multi Select"
24
+ args={{
25
+ config: createChoiceConfig({
26
+ message: 'Select the features to enable:',
27
+ multiple: true,
28
+ options: [
29
+ { value: 'auth', label: 'Authentication', description: 'User login and signup' },
30
+ { value: 'analytics', label: 'Analytics', description: 'Usage tracking and metrics' },
31
+ { value: 'notifications', label: 'Notifications', description: 'Email and push alerts' },
32
+ { value: 'export', label: 'Data Export', description: 'CSV and JSON export' }
33
+ ]
34
+ })
35
+ }}
36
+ />
37
+
38
+ <Story
39
+ name="Resolved"
40
+ args={{
41
+ isResolved: true,
42
+ resolvedValue: 'high',
43
+ resolvedByUserName: 'Bob'
44
+ }}
45
+ />
46
+
47
+ <Story
48
+ name="Submitting"
49
+ args={{
50
+ isSubmitting: true
51
+ }}
52
+ />
@@ -0,0 +1,27 @@
1
+ export default ChoicePrompt;
2
+ type ChoicePrompt = SvelteComponent<{
3
+ [x: string]: never;
4
+ }, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const ChoicePrompt: $$__sveltets_2_IsomorphicComponent<{
10
+ [x: string]: never;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}, {}, string>;
14
+ import ChoicePrompt from './ChoicePrompt.svelte';
15
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
16
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
17
+ $$bindings?: Bindings;
18
+ } & Exports;
19
+ (internal: unknown, props: {
20
+ $$events?: Events;
21
+ $$slots?: Slots;
22
+ }): Exports & {
23
+ $set?: any;
24
+ $on?: any;
25
+ };
26
+ z_$$bindings?: Bindings;
27
+ }