@flowdrop/flowdrop 1.0.0 → 1.1.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 (388) hide show
  1. package/README.md +50 -50
  2. package/dist/adapters/WorkflowAdapter.d.ts +1 -1
  3. package/dist/adapters/WorkflowAdapter.js +25 -25
  4. package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +2 -2
  5. package/dist/adapters/agentspec/AgentSpecAdapter.js +133 -122
  6. package/dist/adapters/agentspec/agentAdapter.d.ts +2 -2
  7. package/dist/adapters/agentspec/agentAdapter.js +10 -10
  8. package/dist/adapters/agentspec/autoLayout.d.ts +1 -1
  9. package/dist/adapters/agentspec/autoLayout.js +2 -2
  10. package/dist/adapters/agentspec/componentTypeDefaults.d.ts +1 -1
  11. package/dist/adapters/agentspec/componentTypeDefaults.js +120 -120
  12. package/dist/adapters/agentspec/defaultNodeTypes.d.ts +2 -2
  13. package/dist/adapters/agentspec/defaultNodeTypes.js +307 -307
  14. package/dist/adapters/agentspec/index.d.ts +10 -10
  15. package/dist/adapters/agentspec/index.js +6 -6
  16. package/dist/adapters/agentspec/validator.d.ts +2 -2
  17. package/dist/adapters/agentspec/validator.js +22 -20
  18. package/dist/api/enhanced-client.d.ts +3 -3
  19. package/dist/api/enhanced-client.js +73 -72
  20. package/dist/components/App.svelte +1081 -961
  21. package/dist/components/App.svelte.d.ts +9 -6
  22. package/dist/components/CanvasBanner.stories.svelte +23 -20
  23. package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
  24. package/dist/components/CanvasBanner.svelte +46 -46
  25. package/dist/components/ConfigForm.svelte +1164 -1065
  26. package/dist/components/ConfigForm.svelte.d.ts +2 -2
  27. package/dist/components/ConfigModal.svelte +180 -180
  28. package/dist/components/ConfigModal.svelte.d.ts +1 -1
  29. package/dist/components/ConfigPanel.stories.svelte +35 -35
  30. package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
  31. package/dist/components/ConfigPanel.svelte +178 -167
  32. package/dist/components/ConfigPanel.svelte.d.ts +1 -1
  33. package/dist/components/ConnectionLine.svelte +25 -25
  34. package/dist/components/EdgeRefresher.svelte +26 -26
  35. package/dist/components/FlowDropEdge.stories.svelte +197 -0
  36. package/dist/components/FlowDropEdge.stories.svelte.d.ts +26 -0
  37. package/dist/components/FlowDropEdge.svelte +168 -0
  38. package/dist/components/FlowDropEdge.svelte.d.ts +4 -0
  39. package/dist/components/FlowDropZone.svelte +63 -60
  40. package/dist/components/FlowDropZone.svelte.d.ts +1 -1
  41. package/dist/components/LoadingSpinner.stories.svelte +19 -19
  42. package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
  43. package/dist/components/LoadingSpinner.svelte +21 -21
  44. package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
  45. package/dist/components/Logo.stories.svelte +13 -13
  46. package/dist/components/Logo.stories.svelte.d.ts +1 -1
  47. package/dist/components/Logo.svelte +101 -95
  48. package/dist/components/LogsSidebar.svelte +553 -546
  49. package/dist/components/LogsSidebar.svelte.d.ts +1 -1
  50. package/dist/components/MarkdownDisplay.stories.svelte +29 -23
  51. package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
  52. package/dist/components/MarkdownDisplay.svelte +16 -14
  53. package/dist/components/Navbar.stories.svelte +43 -38
  54. package/dist/components/Navbar.stories.svelte.d.ts +1 -1
  55. package/dist/components/Navbar.svelte +760 -706
  56. package/dist/components/Navbar.svelte.d.ts +1 -1
  57. package/dist/components/NodeSidebar.svelte +900 -746
  58. package/dist/components/NodeSidebar.svelte.d.ts +3 -1
  59. package/dist/components/NodeStatusOverlay.stories.svelte +82 -70
  60. package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
  61. package/dist/components/NodeStatusOverlay.svelte +295 -280
  62. package/dist/components/NodeStatusOverlay.svelte.d.ts +3 -3
  63. package/dist/components/PipelineStatus.svelte +326 -300
  64. package/dist/components/PipelineStatus.svelte.d.ts +4 -4
  65. package/dist/components/PortCoordinateTracker.svelte +49 -47
  66. package/dist/components/PortCoordinateTracker.svelte.d.ts +1 -1
  67. package/dist/components/ReadOnlyDetails.svelte +156 -156
  68. package/dist/components/SchemaForm.stories.svelte +106 -98
  69. package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
  70. package/dist/components/SchemaForm.svelte +490 -463
  71. package/dist/components/SchemaForm.svelte.d.ts +2 -2
  72. package/dist/components/SettingsModal.svelte +226 -223
  73. package/dist/components/SettingsModal.svelte.d.ts +1 -1
  74. package/dist/components/SettingsPanel.svelte +637 -601
  75. package/dist/components/SettingsPanel.svelte.d.ts +1 -1
  76. package/dist/components/StatusIcon.stories.svelte +62 -49
  77. package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
  78. package/dist/components/StatusIcon.svelte +87 -87
  79. package/dist/components/StatusIcon.svelte.d.ts +2 -2
  80. package/dist/components/StatusLabel.stories.svelte +12 -12
  81. package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
  82. package/dist/components/StatusLabel.svelte +19 -19
  83. package/dist/components/ThemeToggle.stories.svelte +16 -16
  84. package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
  85. package/dist/components/ThemeToggle.svelte +180 -169
  86. package/dist/components/ThemeToggle.svelte.d.ts +1 -1
  87. package/dist/components/UniversalNode.svelte +150 -138
  88. package/dist/components/UniversalNode.svelte.d.ts +3 -3
  89. package/dist/components/WorkflowEditor.svelte +1069 -1007
  90. package/dist/components/WorkflowEditor.svelte.d.ts +4 -4
  91. package/dist/components/form/FormArray.svelte +1034 -973
  92. package/dist/components/form/FormArray.svelte.d.ts +1 -1
  93. package/dist/components/form/FormAutocomplete.svelte +1021 -978
  94. package/dist/components/form/FormAutocomplete.svelte.d.ts +1 -1
  95. package/dist/components/form/FormCheckboxGroup.stories.svelte +23 -20
  96. package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
  97. package/dist/components/form/FormCheckboxGroup.svelte +136 -136
  98. package/dist/components/form/FormCodeEditor.svelte +452 -434
  99. package/dist/components/form/FormField.svelte +366 -355
  100. package/dist/components/form/FormField.svelte.d.ts +2 -2
  101. package/dist/components/form/FormFieldLight.svelte +400 -384
  102. package/dist/components/form/FormFieldLight.svelte.d.ts +1 -1
  103. package/dist/components/form/FormFieldWrapper.stories.svelte +42 -42
  104. package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
  105. package/dist/components/form/FormFieldWrapper.svelte +100 -93
  106. package/dist/components/form/FormFieldWrapper.svelte.d.ts +1 -1
  107. package/dist/components/form/FormFieldset.svelte +108 -108
  108. package/dist/components/form/FormFieldset.svelte.d.ts +2 -2
  109. package/dist/components/form/FormMarkdownEditor.svelte +758 -725
  110. package/dist/components/form/FormNumberField.stories.svelte +25 -25
  111. package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
  112. package/dist/components/form/FormNumberField.svelte +88 -88
  113. package/dist/components/form/FormRangeField.stories.svelte +20 -20
  114. package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
  115. package/dist/components/form/FormRangeField.svelte +234 -226
  116. package/dist/components/form/FormSelect.stories.svelte +38 -38
  117. package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
  118. package/dist/components/form/FormSelect.svelte +101 -101
  119. package/dist/components/form/FormSelect.svelte.d.ts +1 -1
  120. package/dist/components/form/FormTemplateEditor.svelte +847 -798
  121. package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -1
  122. package/dist/components/form/FormTextField.stories.svelte +29 -23
  123. package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
  124. package/dist/components/form/FormTextField.svelte +68 -68
  125. package/dist/components/form/FormTextarea.stories.svelte +28 -25
  126. package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
  127. package/dist/components/form/FormTextarea.svelte +74 -74
  128. package/dist/components/form/FormToggle.stories.svelte +23 -20
  129. package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
  130. package/dist/components/form/FormToggle.svelte +98 -98
  131. package/dist/components/form/FormUISchemaRenderer.svelte +120 -113
  132. package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +3 -3
  133. package/dist/components/form/index.d.ts +19 -19
  134. package/dist/components/form/index.js +18 -18
  135. package/dist/components/form/templateAutocomplete.d.ts +2 -2
  136. package/dist/components/form/templateAutocomplete.js +64 -55
  137. package/dist/components/form/types.d.ts +6 -6
  138. package/dist/components/form/types.js +9 -4
  139. package/dist/components/icons/AlertCircleIcon.svelte +11 -0
  140. package/dist/components/icons/AlertCircleIcon.svelte.d.ts +26 -0
  141. package/dist/components/icons/CogIcon.svelte +11 -0
  142. package/dist/components/icons/CogIcon.svelte.d.ts +26 -0
  143. package/dist/components/interrupt/ChoicePrompt.stories.svelte +54 -38
  144. package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
  145. package/dist/components/interrupt/ChoicePrompt.svelte +407 -383
  146. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +1 -1
  147. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +48 -48
  148. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
  149. package/dist/components/interrupt/ConfirmationPrompt.svelte +280 -274
  150. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +1 -1
  151. package/dist/components/interrupt/FormPrompt.svelte +223 -218
  152. package/dist/components/interrupt/FormPrompt.svelte.d.ts +1 -1
  153. package/dist/components/interrupt/InterruptBubble.svelte +617 -583
  154. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +2 -2
  155. package/dist/components/interrupt/ReviewPrompt.stories.svelte +66 -56
  156. package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
  157. package/dist/components/interrupt/ReviewPrompt.svelte +861 -841
  158. package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +1 -1
  159. package/dist/components/interrupt/TextInputPrompt.stories.svelte +38 -33
  160. package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
  161. package/dist/components/interrupt/TextInputPrompt.svelte +333 -328
  162. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +1 -1
  163. package/dist/components/interrupt/index.d.ts +5 -5
  164. package/dist/components/interrupt/index.js +5 -5
  165. package/dist/components/layouts/MainLayout.svelte +724 -691
  166. package/dist/components/layouts/MainLayout.svelte.d.ts +6 -6
  167. package/dist/components/nodes/GatewayNode.stories.svelte +100 -99
  168. package/dist/components/nodes/GatewayNode.svelte +605 -571
  169. package/dist/components/nodes/GatewayNode.svelte.d.ts +3 -3
  170. package/dist/components/nodes/IdeaNode.stories.svelte +44 -43
  171. package/dist/components/nodes/IdeaNode.svelte +451 -437
  172. package/dist/components/nodes/IdeaNode.svelte.d.ts +1 -1
  173. package/dist/components/nodes/NotesNode.stories.svelte +65 -64
  174. package/dist/components/nodes/NotesNode.svelte +380 -369
  175. package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
  176. package/dist/components/nodes/SimpleNode.stories.svelte +145 -144
  177. package/dist/components/nodes/SimpleNode.svelte +486 -424
  178. package/dist/components/nodes/SimpleNode.svelte.d.ts +1 -1
  179. package/dist/components/nodes/SquareNode.stories.svelte +73 -73
  180. package/dist/components/nodes/SquareNode.svelte +439 -380
  181. package/dist/components/nodes/SquareNode.svelte.d.ts +1 -1
  182. package/dist/components/nodes/TerminalNode.stories.svelte +13 -13
  183. package/dist/components/nodes/TerminalNode.svelte +709 -670
  184. package/dist/components/nodes/TerminalNode.svelte.d.ts +1 -1
  185. package/dist/components/nodes/ToolNode.stories.svelte +181 -180
  186. package/dist/components/nodes/ToolNode.svelte +505 -447
  187. package/dist/components/nodes/ToolNode.svelte.d.ts +1 -1
  188. package/dist/components/nodes/WorkflowNode.stories.svelte +70 -46
  189. package/dist/components/nodes/WorkflowNode.svelte +621 -551
  190. package/dist/components/nodes/WorkflowNode.svelte.d.ts +3 -3
  191. package/dist/components/playground/ChatPanel.svelte +945 -889
  192. package/dist/components/playground/ExecutionLogs.svelte +495 -472
  193. package/dist/components/playground/InputCollector.svelte +449 -428
  194. package/dist/components/playground/MessageBubble.stories.svelte +47 -47
  195. package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
  196. package/dist/components/playground/MessageBubble.svelte +626 -610
  197. package/dist/components/playground/MessageBubble.svelte.d.ts +1 -1
  198. package/dist/components/playground/Playground.svelte +1088 -1057
  199. package/dist/components/playground/Playground.svelte.d.ts +3 -3
  200. package/dist/components/playground/PlaygroundModal.svelte +208 -204
  201. package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -3
  202. package/dist/components/playground/SessionManager.svelte +527 -521
  203. package/dist/components/playground/SessionManager.svelte.d.ts +1 -1
  204. package/dist/config/agentSpecEndpoints.d.ts +1 -1
  205. package/dist/config/agentSpecEndpoints.js +20 -20
  206. package/dist/config/constants.d.ts +8 -0
  207. package/dist/config/constants.js +10 -2
  208. package/dist/config/defaultCategories.d.ts +1 -1
  209. package/dist/config/defaultCategories.js +86 -86
  210. package/dist/config/defaultPortConfig.d.ts +1 -1
  211. package/dist/config/defaultPortConfig.js +144 -144
  212. package/dist/config/endpoints.d.ts +4 -4
  213. package/dist/config/endpoints.js +65 -65
  214. package/dist/config/runtimeConfig.d.ts +2 -2
  215. package/dist/config/runtimeConfig.js +8 -8
  216. package/dist/core/index.d.ts +63 -59
  217. package/dist/core/index.js +35 -33
  218. package/dist/display/index.d.ts +2 -2
  219. package/dist/display/index.js +2 -2
  220. package/dist/editor/index.d.ts +62 -62
  221. package/dist/editor/index.js +53 -53
  222. package/dist/form/code.d.ts +5 -5
  223. package/dist/form/code.js +14 -14
  224. package/dist/form/fieldRegistry.d.ts +3 -3
  225. package/dist/form/fieldRegistry.js +11 -9
  226. package/dist/form/full.d.ts +8 -8
  227. package/dist/form/full.js +9 -9
  228. package/dist/form/index.d.ts +18 -18
  229. package/dist/form/index.js +16 -16
  230. package/dist/form/markdown.d.ts +4 -4
  231. package/dist/form/markdown.js +8 -8
  232. package/dist/helpers/proximityConnect.d.ts +3 -3
  233. package/dist/helpers/proximityConnect.js +34 -32
  234. package/dist/helpers/workflowEditorHelper.d.ts +5 -5
  235. package/dist/helpers/workflowEditorHelper.js +108 -96
  236. package/dist/index.d.ts +6 -6
  237. package/dist/index.js +6 -6
  238. package/dist/mocks/app-environment.js +2 -2
  239. package/dist/mocks/app-forms.js +9 -9
  240. package/dist/mocks/app-navigation.js +11 -11
  241. package/dist/mocks/app-stores.js +8 -8
  242. package/dist/playground/index.d.ts +19 -19
  243. package/dist/playground/index.js +16 -16
  244. package/dist/playground/mount.d.ts +3 -3
  245. package/dist/playground/mount.js +24 -24
  246. package/dist/registry/builtinFormats.js +13 -13
  247. package/dist/registry/builtinNodes.d.ts +2 -2
  248. package/dist/registry/builtinNodes.js +77 -77
  249. package/dist/registry/index.d.ts +4 -4
  250. package/dist/registry/index.js +4 -4
  251. package/dist/registry/nodeComponentRegistry.d.ts +8 -8
  252. package/dist/registry/nodeComponentRegistry.js +11 -9
  253. package/dist/registry/plugin.d.ts +2 -2
  254. package/dist/registry/plugin.js +11 -11
  255. package/dist/registry/workflowFormatRegistry.d.ts +3 -3
  256. package/dist/registry/workflowFormatRegistry.js +2 -2
  257. package/dist/schema/index.d.ts +1 -1
  258. package/dist/schema/index.js +2 -2
  259. package/dist/schemas/v1/workflow.schema.json +22 -107
  260. package/dist/services/agentSpecExecutionService.d.ts +3 -3
  261. package/dist/services/agentSpecExecutionService.js +59 -55
  262. package/dist/services/api.d.ts +18 -4
  263. package/dist/services/api.js +46 -43
  264. package/dist/services/apiVariableService.d.ts +1 -1
  265. package/dist/services/apiVariableService.js +41 -34
  266. package/dist/services/autoSaveService.js +8 -8
  267. package/dist/services/categoriesApi.d.ts +2 -2
  268. package/dist/services/categoriesApi.js +8 -8
  269. package/dist/services/draftStorage.d.ts +1 -1
  270. package/dist/services/draftStorage.js +11 -11
  271. package/dist/services/dynamicSchemaService.d.ts +1 -1
  272. package/dist/services/dynamicSchemaService.js +41 -39
  273. package/dist/services/globalSave.d.ts +2 -2
  274. package/dist/services/globalSave.js +53 -42
  275. package/dist/services/historyService.d.ts +1 -1
  276. package/dist/services/historyService.js +8 -8
  277. package/dist/services/interruptService.d.ts +1 -1
  278. package/dist/services/interruptService.js +35 -29
  279. package/dist/services/nodeExecutionService.d.ts +1 -1
  280. package/dist/services/nodeExecutionService.js +45 -44
  281. package/dist/services/playgroundService.d.ts +1 -1
  282. package/dist/services/playgroundService.js +29 -29
  283. package/dist/services/portConfigApi.d.ts +2 -2
  284. package/dist/services/portConfigApi.js +8 -8
  285. package/dist/services/settingsService.d.ts +2 -2
  286. package/dist/services/settingsService.js +25 -19
  287. package/dist/services/toastService.d.ts +4 -4
  288. package/dist/services/toastService.js +33 -33
  289. package/dist/services/variableService.d.ts +1 -1
  290. package/dist/services/variableService.js +36 -36
  291. package/dist/services/workflowStorage.d.ts +2 -2
  292. package/dist/services/workflowStorage.js +13 -13
  293. package/dist/settings/index.d.ts +7 -7
  294. package/dist/settings/index.js +6 -6
  295. package/dist/skins/default.d.ts +2 -0
  296. package/dist/skins/default.js +1 -0
  297. package/dist/skins/index.d.ts +13 -0
  298. package/dist/skins/index.js +30 -0
  299. package/dist/skins/slate.d.ts +2 -0
  300. package/dist/skins/slate.js +78 -0
  301. package/dist/stores/categoriesStore.svelte.d.ts +1 -1
  302. package/dist/stores/categoriesStore.svelte.js +5 -5
  303. package/dist/stores/editorStateMachine.svelte.d.ts +2 -2
  304. package/dist/stores/editorStateMachine.svelte.js +65 -33
  305. package/dist/stores/historyStore.svelte.d.ts +4 -4
  306. package/dist/stores/historyStore.svelte.js +4 -4
  307. package/dist/stores/interruptStore.svelte.d.ts +3 -3
  308. package/dist/stores/interruptStore.svelte.js +21 -21
  309. package/dist/stores/playgroundStore.svelte.d.ts +2 -2
  310. package/dist/stores/playgroundStore.svelte.js +25 -18
  311. package/dist/stores/portCoordinateStore.svelte.d.ts +2 -2
  312. package/dist/stores/portCoordinateStore.svelte.js +15 -8
  313. package/dist/stores/settingsStore.svelte.d.ts +2 -2
  314. package/dist/stores/settingsStore.svelte.js +62 -57
  315. package/dist/stores/workflowStore.svelte.d.ts +3 -3
  316. package/dist/stores/workflowStore.svelte.js +50 -47
  317. package/dist/stories/CanvasDecorator.svelte +35 -32
  318. package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
  319. package/dist/stories/EdgeDecorator.svelte +125 -0
  320. package/dist/stories/EdgeDecorator.svelte.d.ts +17 -0
  321. package/dist/stories/NodeDecorator.svelte +59 -53
  322. package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
  323. package/dist/stories/utils.d.ts +2 -2
  324. package/dist/stories/utils.js +105 -67
  325. package/dist/styles/base.css +599 -595
  326. package/dist/styles/toast.css +14 -14
  327. package/dist/styles/tokens.css +409 -378
  328. package/dist/svelte-app.d.ts +9 -9
  329. package/dist/svelte-app.js +39 -39
  330. package/dist/themes/default.d.ts +2 -0
  331. package/dist/themes/default.js +9 -0
  332. package/dist/themes/index.d.ts +13 -0
  333. package/dist/themes/index.js +44 -0
  334. package/dist/themes/minimal.d.ts +2 -0
  335. package/dist/themes/minimal.js +11 -0
  336. package/dist/types/agentspec.d.ts +18 -18
  337. package/dist/types/agentspec.js +2 -2
  338. package/dist/types/auth.d.ts +1 -1
  339. package/dist/types/auth.js +6 -6
  340. package/dist/types/config.d.ts +6 -6
  341. package/dist/types/events.d.ts +2 -2
  342. package/dist/types/events.js +2 -2
  343. package/dist/types/index.d.ts +32 -32
  344. package/dist/types/index.js +6 -6
  345. package/dist/types/interrupt.d.ts +6 -6
  346. package/dist/types/interrupt.js +21 -21
  347. package/dist/types/interruptState.d.ts +12 -12
  348. package/dist/types/interruptState.js +66 -66
  349. package/dist/types/playground.d.ts +7 -7
  350. package/dist/types/playground.js +14 -14
  351. package/dist/types/settings.d.ts +5 -3
  352. package/dist/types/settings.js +25 -18
  353. package/dist/types/skin.d.ts +31 -0
  354. package/dist/types/skin.js +1 -0
  355. package/dist/types/theme.d.ts +35 -0
  356. package/dist/types/theme.js +1 -0
  357. package/dist/types/uischema.d.ts +4 -4
  358. package/dist/types/uischema.js +3 -3
  359. package/dist/utils/colors.d.ts +1 -1
  360. package/dist/utils/colors.js +97 -95
  361. package/dist/utils/config.d.ts +2 -2
  362. package/dist/utils/config.js +48 -48
  363. package/dist/utils/connections.d.ts +2 -2
  364. package/dist/utils/connections.js +15 -15
  365. package/dist/utils/errors.js +3 -3
  366. package/dist/utils/fetchWithAuth.d.ts +1 -1
  367. package/dist/utils/fetchWithAuth.js +2 -2
  368. package/dist/utils/handleIds.d.ts +2 -2
  369. package/dist/utils/handleIds.js +8 -8
  370. package/dist/utils/handlePositioning.d.ts +1 -1
  371. package/dist/utils/handlePositioning.js +2 -2
  372. package/dist/utils/icons.d.ts +1 -1
  373. package/dist/utils/icons.js +74 -74
  374. package/dist/utils/logger.d.ts +1 -1
  375. package/dist/utils/logger.js +7 -7
  376. package/dist/utils/nodeStatus.d.ts +1 -1
  377. package/dist/utils/nodeStatus.js +48 -48
  378. package/dist/utils/nodeTypes.d.ts +1 -1
  379. package/dist/utils/nodeTypes.js +21 -20
  380. package/dist/utils/nodeWrapper.d.ts +7 -7
  381. package/dist/utils/nodeWrapper.js +21 -19
  382. package/dist/utils/performanceUtils.d.ts +1 -1
  383. package/dist/utils/performanceUtils.js +2 -1
  384. package/dist/utils/sanitize.js +1 -1
  385. package/dist/utils/uischema.d.ts +2 -2
  386. package/dist/utils/uischema.js +8 -8
  387. package/dist/utils/validation.js +20 -8
  388. package/package.json +296 -291
@@ -54,483 +54,510 @@
54
54
  -->
55
55
 
56
56
  <script lang="ts">
57
- import { setContext } from 'svelte';
58
- import Icon from '@iconify/svelte';
59
- import type { ConfigSchema, AuthProvider } from '../types/index.js';
60
- import type { UISchemaElement } from '../types/uischema.js';
61
- import { FormField } from './form/index.js';
62
- import FormUISchemaRenderer from './form/FormUISchemaRenderer.svelte';
63
- import type { FieldSchema } from './form/index.js';
64
-
65
- /**
66
- * Props interface for SchemaForm component
67
- */
68
- interface Props {
69
- /**
70
- * JSON Schema definition for the form.
71
- * Should follow JSON Schema draft-07 format with type: "object".
72
- */
73
- schema: ConfigSchema;
74
-
75
- /**
76
- * Optional UI Schema that controls field layout and grouping.
77
- * When provided, fields render according to the UISchema tree structure.
78
- * When absent, fields render in flat order from schema.properties.
79
- * @see https://jsonforms.io/docs/uischema
80
- */
81
- uiSchema?: UISchemaElement;
82
-
83
- /**
84
- * Current form values as key-value pairs.
85
- * Keys should correspond to properties defined in the schema.
86
- */
87
- values?: Record<string, unknown>;
88
-
89
- /**
90
- * Callback fired whenever any field value changes.
91
- * Receives the complete updated values object.
92
- * @param values - Updated form values
93
- */
94
- onChange?: (values: Record<string, unknown>) => void;
95
-
96
- /**
97
- * Whether to display Save and Cancel action buttons.
98
- * @default false
99
- */
100
- showActions?: boolean;
101
-
102
- /**
103
- * Label for the save button.
104
- * @default "Save"
105
- */
106
- saveLabel?: string;
107
-
108
- /**
109
- * Label for the cancel button.
110
- * @default "Cancel"
111
- */
112
- cancelLabel?: string;
113
-
114
- /**
115
- * Callback fired when the Save button is clicked.
116
- * Receives the final form values.
117
- * @param values - Final form values
118
- */
119
- onSave?: (values: Record<string, unknown>) => void;
120
-
121
- /**
122
- * Callback fired when the Cancel button is clicked.
123
- */
124
- onCancel?: () => void;
125
-
126
- /**
127
- * Whether the form is in a loading state.
128
- * Disables all inputs when true.
129
- * @default false
130
- */
131
- loading?: boolean;
132
-
133
- /**
134
- * Whether the form is disabled.
135
- * @default false
136
- */
137
- disabled?: boolean;
138
-
139
- /**
140
- * Custom CSS class for the form container.
141
- */
142
- class?: string;
143
-
144
- /**
145
- * Authentication provider for autocomplete fields.
146
- * Used to add authentication headers when fetching suggestions from callback URLs.
147
- */
148
- authProvider?: AuthProvider;
149
-
150
- /**
151
- * Base URL for resolving relative autocomplete callback URLs.
152
- * @default ""
153
- */
154
- baseUrl?: string;
155
- }
156
-
157
- let {
158
- schema,
159
- uiSchema,
160
- values = {},
161
- onChange,
162
- showActions = false,
163
- saveLabel = 'Save',
164
- cancelLabel = 'Cancel',
165
- onSave,
166
- onCancel,
167
- loading = false,
168
- disabled = false,
169
- class: className = '',
170
- authProvider,
171
- baseUrl = ''
172
- }: Props = $props();
173
-
174
- // Set context for child components (e.g., FormAutocomplete)
175
- // Use getter functions to ensure child components always get the current prop value,
176
- // even if the prop changes after initial mount
177
- setContext<() => AuthProvider | undefined>('flowdrop:getAuthProvider', () => authProvider);
178
- setContext<() => string>('flowdrop:getBaseUrl', () => baseUrl);
179
-
180
- /**
181
- * Reference to this component's form element
182
- */
183
- let formRef: HTMLFormElement | undefined = $state();
184
-
185
- /**
186
- * Internal reactive state for form values
187
- */
188
- let formValues = $state<Record<string, unknown>>({});
189
-
190
- /**
191
- * Initialize form values when schema or values change
192
- * Merges default values from schema with provided values
193
- */
194
- $effect(() => {
195
- if (schema?.properties) {
196
- const mergedValues: Record<string, unknown> = {};
197
- Object.entries(schema.properties).forEach(([key, field]) => {
198
- const fieldConfig = field as Record<string, unknown>;
199
- // Use provided value if available, otherwise use schema default
200
- mergedValues[key] = values[key] !== undefined ? values[key] : fieldConfig.default;
201
- });
202
- formValues = mergedValues;
203
- }
204
- });
205
-
206
- /**
207
- * Check if a field is required based on schema
208
- * @param key - Field key to check
209
- * @returns Whether the field is required
210
- */
211
- function isFieldRequired(key: string): boolean {
212
- if (!schema?.required) {
213
- return false;
214
- }
215
- return schema.required.includes(key);
216
- }
217
-
218
- /**
219
- * Handle field value changes from FormField components
220
- * Updates internal state and fires onChange callback
221
- * @param key - Field key that changed
222
- * @param value - New field value
223
- */
224
- function handleFieldChange(key: string, value: unknown): void {
225
- formValues[key] = value;
226
-
227
- // Notify parent of the change
228
- if (onChange) {
229
- onChange({ ...formValues });
230
- }
231
- }
232
-
233
- /**
234
- * Handle form submission
235
- * Collects all form values and fires onSave callback
236
- */
237
- function handleSave(): void {
238
- if (loading || disabled) {
239
- return;
240
- }
241
-
242
- // Collect all form values including hidden fields
243
- const updatedValues: Record<string, unknown> = { ...formValues };
244
-
245
- if (formRef) {
246
- const inputs = formRef.querySelectorAll('input, select, textarea');
247
- inputs.forEach((input: Element) => {
248
- const inputEl = input as HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
249
- if (inputEl.id) {
250
- if (inputEl instanceof HTMLInputElement && inputEl.type === 'checkbox') {
251
- updatedValues[inputEl.id] = inputEl.checked;
252
- } else if (
253
- inputEl instanceof HTMLInputElement &&
254
- (inputEl.type === 'number' || inputEl.type === 'range')
255
- ) {
256
- updatedValues[inputEl.id] = inputEl.value ? Number(inputEl.value) : inputEl.value;
257
- } else if (inputEl instanceof HTMLInputElement && inputEl.type === 'hidden') {
258
- // Parse hidden field values that might be JSON
259
- try {
260
- const parsed = JSON.parse(inputEl.value);
261
- updatedValues[inputEl.id] = parsed;
262
- } catch {
263
- // If not JSON, use raw value
264
- updatedValues[inputEl.id] = inputEl.value;
265
- }
266
- } else {
267
- updatedValues[inputEl.id] = inputEl.value;
268
- }
269
- }
270
- });
271
- }
272
-
273
- // Preserve hidden field values from original values if not collected from form
274
- if (values && schema?.properties) {
275
- Object.entries(schema.properties).forEach(
276
- ([key, property]: [string, Record<string, unknown>]) => {
277
- if (property.format === 'hidden' && !(key in updatedValues) && key in values) {
278
- updatedValues[key] = values[key];
279
- }
280
- }
281
- );
282
- }
283
-
284
- if (onSave) {
285
- onSave(updatedValues);
286
- }
287
- }
288
-
289
- /**
290
- * Handle cancel action
291
- */
292
- function handleCancel(): void {
293
- if (onCancel) {
294
- onCancel();
295
- }
296
- }
297
-
298
- /**
299
- * Convert ConfigProperty to FieldSchema for FormField component
300
- * @param property - Schema property definition
301
- * @returns FieldSchema compatible with FormField
302
- */
303
- function toFieldSchema(property: Record<string, unknown>): FieldSchema {
304
- return property as FieldSchema;
305
- }
57
+ import { setContext } from "svelte";
58
+ import Icon from "@iconify/svelte";
59
+ import type { ConfigSchema, AuthProvider } from "../types/index.js";
60
+ import type { UISchemaElement } from "../types/uischema.js";
61
+ import { FormField } from "./form/index.js";
62
+ import FormUISchemaRenderer from "./form/FormUISchemaRenderer.svelte";
63
+ import type { FieldSchema } from "./form/index.js";
64
+
65
+ /**
66
+ * Props interface for SchemaForm component
67
+ */
68
+ interface Props {
69
+ /**
70
+ * JSON Schema definition for the form.
71
+ * Should follow JSON Schema draft-07 format with type: "object".
72
+ */
73
+ schema: ConfigSchema;
74
+
75
+ /**
76
+ * Optional UI Schema that controls field layout and grouping.
77
+ * When provided, fields render according to the UISchema tree structure.
78
+ * When absent, fields render in flat order from schema.properties.
79
+ * @see https://jsonforms.io/docs/uischema
80
+ */
81
+ uiSchema?: UISchemaElement;
82
+
83
+ /**
84
+ * Current form values as key-value pairs.
85
+ * Keys should correspond to properties defined in the schema.
86
+ */
87
+ values?: Record<string, unknown>;
88
+
89
+ /**
90
+ * Callback fired whenever any field value changes.
91
+ * Receives the complete updated values object.
92
+ * @param values - Updated form values
93
+ */
94
+ onChange?: (values: Record<string, unknown>) => void;
95
+
96
+ /**
97
+ * Whether to display Save and Cancel action buttons.
98
+ * @default false
99
+ */
100
+ showActions?: boolean;
101
+
102
+ /**
103
+ * Label for the save button.
104
+ * @default "Save"
105
+ */
106
+ saveLabel?: string;
107
+
108
+ /**
109
+ * Label for the cancel button.
110
+ * @default "Cancel"
111
+ */
112
+ cancelLabel?: string;
113
+
114
+ /**
115
+ * Callback fired when the Save button is clicked.
116
+ * Receives the final form values.
117
+ * @param values - Final form values
118
+ */
119
+ onSave?: (values: Record<string, unknown>) => void;
120
+
121
+ /**
122
+ * Callback fired when the Cancel button is clicked.
123
+ */
124
+ onCancel?: () => void;
125
+
126
+ /**
127
+ * Whether the form is in a loading state.
128
+ * Disables all inputs when true.
129
+ * @default false
130
+ */
131
+ loading?: boolean;
132
+
133
+ /**
134
+ * Whether the form is disabled.
135
+ * @default false
136
+ */
137
+ disabled?: boolean;
138
+
139
+ /**
140
+ * Custom CSS class for the form container.
141
+ */
142
+ class?: string;
143
+
144
+ /**
145
+ * Authentication provider for autocomplete fields.
146
+ * Used to add authentication headers when fetching suggestions from callback URLs.
147
+ */
148
+ authProvider?: AuthProvider;
149
+
150
+ /**
151
+ * Base URL for resolving relative autocomplete callback URLs.
152
+ * @default ""
153
+ */
154
+ baseUrl?: string;
155
+ }
156
+
157
+ let {
158
+ schema,
159
+ uiSchema,
160
+ values = {},
161
+ onChange,
162
+ showActions = false,
163
+ saveLabel = "Save",
164
+ cancelLabel = "Cancel",
165
+ onSave,
166
+ onCancel,
167
+ loading = false,
168
+ disabled = false,
169
+ class: className = "",
170
+ authProvider,
171
+ baseUrl = "",
172
+ }: Props = $props();
173
+
174
+ // Set context for child components (e.g., FormAutocomplete)
175
+ // Use getter functions to ensure child components always get the current prop value,
176
+ // even if the prop changes after initial mount
177
+ setContext<() => AuthProvider | undefined>(
178
+ "flowdrop:getAuthProvider",
179
+ () => authProvider,
180
+ );
181
+ setContext<() => string>("flowdrop:getBaseUrl", () => baseUrl);
182
+
183
+ /**
184
+ * Reference to this component's form element
185
+ */
186
+ let formRef: HTMLFormElement | undefined = $state();
187
+
188
+ /**
189
+ * Internal reactive state for form values
190
+ */
191
+ let formValues = $state<Record<string, unknown>>({});
192
+
193
+ /**
194
+ * Initialize form values when schema or values change
195
+ * Merges default values from schema with provided values
196
+ */
197
+ $effect(() => {
198
+ if (schema?.properties) {
199
+ const mergedValues: Record<string, unknown> = {};
200
+ Object.entries(schema.properties).forEach(([key, field]) => {
201
+ const fieldConfig = field as Record<string, unknown>;
202
+ // Use provided value if available, otherwise use schema default
203
+ mergedValues[key] =
204
+ values[key] !== undefined ? values[key] : fieldConfig.default;
205
+ });
206
+ formValues = mergedValues;
207
+ }
208
+ });
209
+
210
+ /**
211
+ * Check if a field is required based on schema
212
+ * @param key - Field key to check
213
+ * @returns Whether the field is required
214
+ */
215
+ function isFieldRequired(key: string): boolean {
216
+ if (!schema?.required) {
217
+ return false;
218
+ }
219
+ return schema.required.includes(key);
220
+ }
221
+
222
+ /**
223
+ * Handle field value changes from FormField components
224
+ * Updates internal state and fires onChange callback
225
+ * @param key - Field key that changed
226
+ * @param value - New field value
227
+ */
228
+ function handleFieldChange(key: string, value: unknown): void {
229
+ formValues[key] = value;
230
+
231
+ // Notify parent of the change
232
+ if (onChange) {
233
+ onChange({ ...formValues });
234
+ }
235
+ }
236
+
237
+ /**
238
+ * Handle form submission
239
+ * Collects all form values and fires onSave callback
240
+ */
241
+ function handleSave(): void {
242
+ if (loading || disabled) {
243
+ return;
244
+ }
245
+
246
+ // Collect all form values including hidden fields
247
+ const updatedValues: Record<string, unknown> = { ...formValues };
248
+
249
+ if (formRef) {
250
+ const inputs = formRef.querySelectorAll("input, select, textarea");
251
+ inputs.forEach((input: Element) => {
252
+ const inputEl = input as
253
+ | HTMLInputElement
254
+ | HTMLSelectElement
255
+ | HTMLTextAreaElement;
256
+ if (inputEl.id) {
257
+ if (
258
+ inputEl instanceof HTMLInputElement &&
259
+ inputEl.type === "checkbox"
260
+ ) {
261
+ updatedValues[inputEl.id] = inputEl.checked;
262
+ } else if (
263
+ inputEl instanceof HTMLInputElement &&
264
+ (inputEl.type === "number" || inputEl.type === "range")
265
+ ) {
266
+ updatedValues[inputEl.id] = inputEl.value
267
+ ? Number(inputEl.value)
268
+ : inputEl.value;
269
+ } else if (
270
+ inputEl instanceof HTMLInputElement &&
271
+ inputEl.type === "hidden"
272
+ ) {
273
+ // Parse hidden field values that might be JSON
274
+ try {
275
+ const parsed = JSON.parse(inputEl.value);
276
+ updatedValues[inputEl.id] = parsed;
277
+ } catch {
278
+ // If not JSON, use raw value
279
+ updatedValues[inputEl.id] = inputEl.value;
280
+ }
281
+ } else {
282
+ updatedValues[inputEl.id] = inputEl.value;
283
+ }
284
+ }
285
+ });
286
+ }
287
+
288
+ // Preserve hidden field values from original values if not collected from form
289
+ if (values && schema?.properties) {
290
+ Object.entries(schema.properties).forEach(
291
+ ([key, property]: [string, Record<string, unknown>]) => {
292
+ if (
293
+ property.format === "hidden" &&
294
+ !(key in updatedValues) &&
295
+ key in values
296
+ ) {
297
+ updatedValues[key] = values[key];
298
+ }
299
+ },
300
+ );
301
+ }
302
+
303
+ if (onSave) {
304
+ onSave(updatedValues);
305
+ }
306
+ }
307
+
308
+ /**
309
+ * Handle cancel action
310
+ */
311
+ function handleCancel(): void {
312
+ if (onCancel) {
313
+ onCancel();
314
+ }
315
+ }
316
+
317
+ /**
318
+ * Convert ConfigProperty to FieldSchema for FormField component
319
+ * @param property - Schema property definition
320
+ * @returns FieldSchema compatible with FormField
321
+ */
322
+ function toFieldSchema(property: Record<string, unknown>): FieldSchema {
323
+ return property as FieldSchema;
324
+ }
306
325
  </script>
307
326
 
308
327
  {#if schema?.properties}
309
- <form
310
- bind:this={formRef}
311
- class="schema-form {className}"
312
- class:schema-form--loading={loading}
313
- class:schema-form--disabled={disabled}
314
- onsubmit={(e) => {
315
- e.preventDefault();
316
- handleSave();
317
- }}
318
- >
319
- <div class="schema-form__fields">
320
- {#if uiSchema}
321
- <FormUISchemaRenderer
322
- element={uiSchema}
323
- {schema}
324
- values={formValues}
325
- requiredFields={schema.required ?? []}
326
- onFieldChange={handleFieldChange}
327
- {toFieldSchema}
328
- />
329
- {:else}
330
- {#each Object.entries(schema.properties) as [key, field], index (key)}
331
- {@const fieldSchema = toFieldSchema(field as Record<string, unknown>)}
332
- {@const required = isFieldRequired(key)}
333
-
334
- <FormField
335
- fieldKey={key}
336
- schema={fieldSchema}
337
- value={formValues[key]}
338
- {required}
339
- animationIndex={index}
340
- onChange={(val) => handleFieldChange(key, val)}
341
- />
342
- {/each}
343
- {/if}
344
- </div>
345
-
346
- {#if showActions}
347
- <div class="schema-form__footer">
348
- <button
349
- type="button"
350
- class="schema-form__button schema-form__button--secondary"
351
- onclick={handleCancel}
352
- disabled={loading}
353
- >
354
- <Icon icon="heroicons:x-mark" class="schema-form__button-icon" />
355
- <span>{cancelLabel}</span>
356
- </button>
357
- <button
358
- type="submit"
359
- class="schema-form__button schema-form__button--primary"
360
- disabled={loading || disabled}
361
- >
362
- {#if loading}
363
- <span class="schema-form__button-spinner"></span>
364
- {:else}
365
- <Icon icon="heroicons:check" class="schema-form__button-icon" />
366
- {/if}
367
- <span>{saveLabel}</span>
368
- </button>
369
- </div>
370
- {/if}
371
- </form>
328
+ <form
329
+ bind:this={formRef}
330
+ class="schema-form {className}"
331
+ class:schema-form--loading={loading}
332
+ class:schema-form--disabled={disabled}
333
+ onsubmit={(e) => {
334
+ e.preventDefault();
335
+ handleSave();
336
+ }}
337
+ >
338
+ <div class="schema-form__fields">
339
+ {#if uiSchema}
340
+ <FormUISchemaRenderer
341
+ element={uiSchema}
342
+ {schema}
343
+ values={formValues}
344
+ requiredFields={schema.required ?? []}
345
+ onFieldChange={handleFieldChange}
346
+ {toFieldSchema}
347
+ />
348
+ {:else}
349
+ {#each Object.entries(schema.properties) as [key, field], index (key)}
350
+ {@const fieldSchema = toFieldSchema(field as Record<string, unknown>)}
351
+ {@const required = isFieldRequired(key)}
352
+
353
+ <FormField
354
+ fieldKey={key}
355
+ schema={fieldSchema}
356
+ value={formValues[key]}
357
+ {required}
358
+ animationIndex={index}
359
+ onChange={(val) => handleFieldChange(key, val)}
360
+ />
361
+ {/each}
362
+ {/if}
363
+ </div>
364
+
365
+ {#if showActions}
366
+ <div class="schema-form__footer">
367
+ <button
368
+ type="button"
369
+ class="schema-form__button schema-form__button--secondary"
370
+ onclick={handleCancel}
371
+ disabled={loading}
372
+ >
373
+ <Icon icon="heroicons:x-mark" class="schema-form__button-icon" />
374
+ <span>{cancelLabel}</span>
375
+ </button>
376
+ <button
377
+ type="submit"
378
+ class="schema-form__button schema-form__button--primary"
379
+ disabled={loading || disabled}
380
+ >
381
+ {#if loading}
382
+ <span class="schema-form__button-spinner"></span>
383
+ {:else}
384
+ <Icon icon="heroicons:check" class="schema-form__button-icon" />
385
+ {/if}
386
+ <span>{saveLabel}</span>
387
+ </button>
388
+ </div>
389
+ {/if}
390
+ </form>
372
391
  {:else}
373
- <div class="schema-form__empty">
374
- <div class="schema-form__empty-icon">
375
- <Icon icon="heroicons:document-text" />
376
- </div>
377
- <p class="schema-form__empty-text">No schema properties defined.</p>
378
- </div>
392
+ <div class="schema-form__empty">
393
+ <div class="schema-form__empty-icon">
394
+ <Icon icon="heroicons:document-text" />
395
+ </div>
396
+ <p class="schema-form__empty-text">No schema properties defined.</p>
397
+ </div>
379
398
  {/if}
380
399
 
381
400
  <style>
382
- /* ============================================
401
+ /* ============================================
383
402
  SCHEMA FORM - Container Styles
384
403
  ============================================ */
385
404
 
386
- .schema-form {
387
- display: flex;
388
- flex-direction: column;
389
- gap: var(--fd-space-3xl);
390
- }
391
-
392
- .schema-form--loading,
393
- .schema-form--disabled {
394
- opacity: 0.7;
395
- pointer-events: none;
396
- }
397
-
398
- .schema-form__fields {
399
- display: flex;
400
- flex-direction: column;
401
- gap: var(--fd-space-2xl);
402
- }
403
-
404
- /* ============================================
405
+ .schema-form {
406
+ display: flex;
407
+ flex-direction: column;
408
+ gap: var(--fd-space-3xl);
409
+ }
410
+
411
+ .schema-form--loading,
412
+ .schema-form--disabled {
413
+ opacity: 0.7;
414
+ pointer-events: none;
415
+ }
416
+
417
+ .schema-form__fields {
418
+ display: flex;
419
+ flex-direction: column;
420
+ gap: var(--fd-space-2xl);
421
+ }
422
+
423
+ /* ============================================
405
424
  FOOTER ACTIONS
406
425
  ============================================ */
407
426
 
408
- .schema-form__footer {
409
- display: flex;
410
- gap: var(--fd-space-md);
411
- justify-content: flex-end;
412
- padding-top: var(--fd-space-xl);
413
- border-top: 1px solid var(--fd-border-muted);
414
- margin-top: var(--fd-space-xs);
415
- }
416
-
417
- .schema-form__button {
418
- display: inline-flex;
419
- align-items: center;
420
- justify-content: center;
421
- gap: var(--fd-space-xs);
422
- padding: 0.625rem var(--fd-space-xl);
423
- border-radius: var(--fd-radius-lg);
424
- font-size: var(--fd-text-sm);
425
- font-weight: 600;
426
- font-family: inherit;
427
- cursor: pointer;
428
- transition: all var(--fd-transition-normal);
429
- border: 1px solid transparent;
430
- min-height: 2.5rem;
431
- }
432
-
433
- .schema-form__button:disabled {
434
- opacity: 0.5;
435
- cursor: not-allowed;
436
- }
437
-
438
- .schema-form__button :global(svg) {
439
- width: 1rem;
440
- height: 1rem;
441
- flex-shrink: 0;
442
- }
443
-
444
- .schema-form__button--secondary {
445
- background-color: var(--fd-background);
446
- border-color: var(--fd-border);
447
- color: var(--fd-foreground);
448
- box-shadow: var(--fd-shadow-sm);
449
- }
450
-
451
- .schema-form__button--secondary:hover:not(:disabled) {
452
- background-color: var(--fd-muted);
453
- border-color: var(--fd-border-strong);
454
- color: var(--fd-foreground);
455
- }
456
-
457
- .schema-form__button--secondary:focus-visible {
458
- outline: none;
459
- box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
460
- }
461
-
462
- .schema-form__button--primary {
463
- background: linear-gradient(135deg, var(--fd-primary) 0%, var(--fd-primary-hover) 100%);
464
- color: var(--fd-primary-foreground);
465
- box-shadow:
466
- 0 1px 3px rgba(59, 130, 246, 0.3),
467
- inset 0 1px 0 rgba(255, 255, 255, 0.1);
468
- }
469
-
470
- .schema-form__button--primary:hover:not(:disabled) {
471
- background: linear-gradient(135deg, var(--fd-primary-hover) 0%, var(--fd-primary-hover) 100%);
472
- box-shadow:
473
- 0 4px 12px rgba(59, 130, 246, 0.35),
474
- inset 0 1px 0 rgba(255, 255, 255, 0.1);
475
- transform: translateY(-1px);
476
- }
477
-
478
- .schema-form__button--primary:active:not(:disabled) {
479
- transform: translateY(0);
480
- }
481
-
482
- .schema-form__button--primary:focus-visible {
483
- outline: none;
484
- box-shadow:
485
- 0 0 0 3px rgba(59, 130, 246, 0.4),
486
- 0 4px 12px rgba(59, 130, 246, 0.35);
487
- }
488
-
489
- .schema-form__button-spinner {
490
- width: 1rem;
491
- height: 1rem;
492
- border: 2px solid rgba(255, 255, 255, 0.3);
493
- border-top-color: white;
494
- border-radius: 50%;
495
- animation: schema-form-spin 0.6s linear infinite;
496
- }
497
-
498
- @keyframes schema-form-spin {
499
- to {
500
- transform: rotate(360deg);
501
- }
502
- }
503
-
504
- /* ============================================
427
+ .schema-form__footer {
428
+ display: flex;
429
+ gap: var(--fd-space-md);
430
+ justify-content: flex-end;
431
+ padding-top: var(--fd-space-xl);
432
+ border-top: 1px solid var(--fd-border-muted);
433
+ margin-top: var(--fd-space-xs);
434
+ }
435
+
436
+ .schema-form__button {
437
+ display: inline-flex;
438
+ align-items: center;
439
+ justify-content: center;
440
+ gap: var(--fd-space-xs);
441
+ padding: 0.625rem var(--fd-space-xl);
442
+ border-radius: var(--fd-radius-lg);
443
+ font-size: var(--fd-text-sm);
444
+ font-weight: 600;
445
+ font-family: inherit;
446
+ cursor: pointer;
447
+ transition: all var(--fd-transition-normal);
448
+ border: 1px solid transparent;
449
+ min-height: 2.5rem;
450
+ }
451
+
452
+ .schema-form__button:disabled {
453
+ opacity: 0.5;
454
+ cursor: not-allowed;
455
+ }
456
+
457
+ .schema-form__button :global(svg) {
458
+ width: 1rem;
459
+ height: 1rem;
460
+ flex-shrink: 0;
461
+ }
462
+
463
+ .schema-form__button--secondary {
464
+ background-color: var(--fd-background);
465
+ border-color: var(--fd-border);
466
+ color: var(--fd-foreground);
467
+ box-shadow: var(--fd-shadow-sm);
468
+ }
469
+
470
+ .schema-form__button--secondary:hover:not(:disabled) {
471
+ background-color: var(--fd-muted);
472
+ border-color: var(--fd-border-strong);
473
+ color: var(--fd-foreground);
474
+ }
475
+
476
+ .schema-form__button--secondary:focus-visible {
477
+ outline: none;
478
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
479
+ }
480
+
481
+ .schema-form__button--primary {
482
+ background: linear-gradient(
483
+ 135deg,
484
+ var(--fd-primary) 0%,
485
+ var(--fd-primary-hover) 100%
486
+ );
487
+ color: var(--fd-primary-foreground);
488
+ box-shadow:
489
+ 0 1px 3px rgba(59, 130, 246, 0.3),
490
+ inset 0 1px 0 rgba(255, 255, 255, 0.1);
491
+ }
492
+
493
+ .schema-form__button--primary:hover:not(:disabled) {
494
+ background: linear-gradient(
495
+ 135deg,
496
+ var(--fd-primary-hover) 0%,
497
+ var(--fd-primary-hover) 100%
498
+ );
499
+ box-shadow:
500
+ 0 4px 12px rgba(59, 130, 246, 0.35),
501
+ inset 0 1px 0 rgba(255, 255, 255, 0.1);
502
+ transform: translateY(-1px);
503
+ }
504
+
505
+ .schema-form__button--primary:active:not(:disabled) {
506
+ transform: translateY(0);
507
+ }
508
+
509
+ .schema-form__button--primary:focus-visible {
510
+ outline: none;
511
+ box-shadow:
512
+ 0 0 0 3px rgba(59, 130, 246, 0.4),
513
+ 0 4px 12px rgba(59, 130, 246, 0.35);
514
+ }
515
+
516
+ .schema-form__button-spinner {
517
+ width: 1rem;
518
+ height: 1rem;
519
+ border: 2px solid rgba(255, 255, 255, 0.3);
520
+ border-top-color: white;
521
+ border-radius: 50%;
522
+ animation: schema-form-spin 0.6s linear infinite;
523
+ }
524
+
525
+ @keyframes schema-form-spin {
526
+ to {
527
+ transform: rotate(360deg);
528
+ }
529
+ }
530
+
531
+ /* ============================================
505
532
  EMPTY STATE
506
533
  ============================================ */
507
534
 
508
- .schema-form__empty {
509
- display: flex;
510
- flex-direction: column;
511
- align-items: center;
512
- justify-content: center;
513
- padding: var(--fd-space-6xl) var(--fd-space-3xl);
514
- text-align: center;
515
- }
516
-
517
- .schema-form__empty-icon {
518
- width: 3rem;
519
- height: 3rem;
520
- margin-bottom: var(--fd-space-xl);
521
- color: var(--fd-border);
522
- }
523
-
524
- .schema-form__empty-icon :global(svg) {
525
- width: 100%;
526
- height: 100%;
527
- }
528
-
529
- .schema-form__empty-text {
530
- margin: 0;
531
- font-size: var(--fd-text-sm);
532
- color: var(--fd-muted-foreground);
533
- font-style: italic;
534
- line-height: 1.5;
535
- }
535
+ .schema-form__empty {
536
+ display: flex;
537
+ flex-direction: column;
538
+ align-items: center;
539
+ justify-content: center;
540
+ padding: var(--fd-space-6xl) var(--fd-space-3xl);
541
+ text-align: center;
542
+ }
543
+
544
+ .schema-form__empty-icon {
545
+ width: 3rem;
546
+ height: 3rem;
547
+ margin-bottom: var(--fd-space-xl);
548
+ color: var(--fd-border);
549
+ }
550
+
551
+ .schema-form__empty-icon :global(svg) {
552
+ width: 100%;
553
+ height: 100%;
554
+ }
555
+
556
+ .schema-form__empty-text {
557
+ margin: 0;
558
+ font-size: var(--fd-text-sm);
559
+ color: var(--fd-muted-foreground);
560
+ font-style: italic;
561
+ line-height: 1.5;
562
+ }
536
563
  </style>