@flowdrop/flowdrop 1.0.1 → 1.2.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 (385) 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 +1090 -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 +52 -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 +179 -143
  36. package/dist/components/FlowDropEdge.svelte +147 -147
  37. package/dist/components/FlowDropEdge.svelte.d.ts +1 -1
  38. package/dist/components/FlowDropZone.svelte +63 -60
  39. package/dist/components/FlowDropZone.svelte.d.ts +1 -1
  40. package/dist/components/LoadingSpinner.stories.svelte +19 -19
  41. package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
  42. package/dist/components/LoadingSpinner.svelte +21 -21
  43. package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
  44. package/dist/components/Logo.stories.svelte +13 -13
  45. package/dist/components/Logo.stories.svelte.d.ts +1 -1
  46. package/dist/components/Logo.svelte +101 -95
  47. package/dist/components/LogsSidebar.svelte +553 -546
  48. package/dist/components/LogsSidebar.svelte.d.ts +1 -1
  49. package/dist/components/MarkdownDisplay.stories.svelte +29 -23
  50. package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
  51. package/dist/components/MarkdownDisplay.svelte +16 -14
  52. package/dist/components/Navbar.stories.svelte +43 -38
  53. package/dist/components/Navbar.stories.svelte.d.ts +1 -1
  54. package/dist/components/Navbar.svelte +760 -706
  55. package/dist/components/Navbar.svelte.d.ts +1 -1
  56. package/dist/components/NodeSidebar.svelte +905 -746
  57. package/dist/components/NodeSidebar.svelte.d.ts +5 -1
  58. package/dist/components/NodeStatusOverlay.stories.svelte +82 -70
  59. package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
  60. package/dist/components/NodeStatusOverlay.svelte +295 -280
  61. package/dist/components/NodeStatusOverlay.svelte.d.ts +3 -3
  62. package/dist/components/PipelineStatus.svelte +326 -300
  63. package/dist/components/PipelineStatus.svelte.d.ts +4 -4
  64. package/dist/components/PortCoordinateTracker.svelte +49 -47
  65. package/dist/components/PortCoordinateTracker.svelte.d.ts +1 -1
  66. package/dist/components/ReadOnlyDetails.svelte +156 -156
  67. package/dist/components/SchemaForm.stories.svelte +106 -98
  68. package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
  69. package/dist/components/SchemaForm.svelte +490 -463
  70. package/dist/components/SchemaForm.svelte.d.ts +2 -2
  71. package/dist/components/SettingsModal.svelte +226 -223
  72. package/dist/components/SettingsModal.svelte.d.ts +1 -1
  73. package/dist/components/SettingsPanel.svelte +637 -601
  74. package/dist/components/SettingsPanel.svelte.d.ts +1 -1
  75. package/dist/components/StatusIcon.stories.svelte +62 -49
  76. package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
  77. package/dist/components/StatusIcon.svelte +87 -87
  78. package/dist/components/StatusIcon.svelte.d.ts +2 -2
  79. package/dist/components/StatusLabel.stories.svelte +12 -12
  80. package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
  81. package/dist/components/StatusLabel.svelte +19 -19
  82. package/dist/components/ThemeToggle.stories.svelte +16 -16
  83. package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
  84. package/dist/components/ThemeToggle.svelte +180 -169
  85. package/dist/components/ThemeToggle.svelte.d.ts +1 -1
  86. package/dist/components/UniversalNode.svelte +150 -138
  87. package/dist/components/UniversalNode.svelte.d.ts +3 -3
  88. package/dist/components/WorkflowEditor.svelte +1069 -1014
  89. package/dist/components/WorkflowEditor.svelte.d.ts +4 -4
  90. package/dist/components/form/FormArray.svelte +1034 -973
  91. package/dist/components/form/FormArray.svelte.d.ts +1 -1
  92. package/dist/components/form/FormAutocomplete.svelte +1021 -978
  93. package/dist/components/form/FormAutocomplete.svelte.d.ts +1 -1
  94. package/dist/components/form/FormCheckboxGroup.stories.svelte +23 -20
  95. package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
  96. package/dist/components/form/FormCheckboxGroup.svelte +136 -136
  97. package/dist/components/form/FormCodeEditor.svelte +452 -434
  98. package/dist/components/form/FormField.svelte +366 -355
  99. package/dist/components/form/FormField.svelte.d.ts +2 -2
  100. package/dist/components/form/FormFieldLight.svelte +400 -384
  101. package/dist/components/form/FormFieldLight.svelte.d.ts +1 -1
  102. package/dist/components/form/FormFieldWrapper.stories.svelte +42 -42
  103. package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
  104. package/dist/components/form/FormFieldWrapper.svelte +100 -93
  105. package/dist/components/form/FormFieldWrapper.svelte.d.ts +1 -1
  106. package/dist/components/form/FormFieldset.svelte +108 -108
  107. package/dist/components/form/FormFieldset.svelte.d.ts +2 -2
  108. package/dist/components/form/FormMarkdownEditor.svelte +758 -725
  109. package/dist/components/form/FormNumberField.stories.svelte +25 -25
  110. package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
  111. package/dist/components/form/FormNumberField.svelte +88 -88
  112. package/dist/components/form/FormRangeField.stories.svelte +20 -20
  113. package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
  114. package/dist/components/form/FormRangeField.svelte +234 -226
  115. package/dist/components/form/FormSelect.stories.svelte +38 -38
  116. package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
  117. package/dist/components/form/FormSelect.svelte +101 -101
  118. package/dist/components/form/FormSelect.svelte.d.ts +1 -1
  119. package/dist/components/form/FormTemplateEditor.svelte +847 -798
  120. package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -1
  121. package/dist/components/form/FormTextField.stories.svelte +29 -23
  122. package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
  123. package/dist/components/form/FormTextField.svelte +68 -68
  124. package/dist/components/form/FormTextarea.stories.svelte +28 -25
  125. package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
  126. package/dist/components/form/FormTextarea.svelte +74 -74
  127. package/dist/components/form/FormToggle.stories.svelte +23 -20
  128. package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
  129. package/dist/components/form/FormToggle.svelte +98 -98
  130. package/dist/components/form/FormUISchemaRenderer.svelte +120 -113
  131. package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +3 -3
  132. package/dist/components/form/index.d.ts +19 -19
  133. package/dist/components/form/index.js +18 -18
  134. package/dist/components/form/templateAutocomplete.d.ts +2 -2
  135. package/dist/components/form/templateAutocomplete.js +64 -55
  136. package/dist/components/form/types.d.ts +6 -6
  137. package/dist/components/form/types.js +9 -4
  138. package/dist/components/icons/AlertCircleIcon.svelte +11 -0
  139. package/dist/components/icons/AlertCircleIcon.svelte.d.ts +26 -0
  140. package/dist/components/icons/CogIcon.svelte +11 -0
  141. package/dist/components/icons/CogIcon.svelte.d.ts +26 -0
  142. package/dist/components/interrupt/ChoicePrompt.stories.svelte +54 -38
  143. package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
  144. package/dist/components/interrupt/ChoicePrompt.svelte +407 -383
  145. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +1 -1
  146. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +48 -48
  147. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
  148. package/dist/components/interrupt/ConfirmationPrompt.svelte +280 -274
  149. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +1 -1
  150. package/dist/components/interrupt/FormPrompt.svelte +223 -218
  151. package/dist/components/interrupt/FormPrompt.svelte.d.ts +1 -1
  152. package/dist/components/interrupt/InterruptBubble.svelte +617 -583
  153. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +2 -2
  154. package/dist/components/interrupt/ReviewPrompt.stories.svelte +66 -56
  155. package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
  156. package/dist/components/interrupt/ReviewPrompt.svelte +861 -841
  157. package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +1 -1
  158. package/dist/components/interrupt/TextInputPrompt.stories.svelte +38 -33
  159. package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
  160. package/dist/components/interrupt/TextInputPrompt.svelte +333 -328
  161. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +1 -1
  162. package/dist/components/interrupt/index.d.ts +5 -5
  163. package/dist/components/interrupt/index.js +5 -5
  164. package/dist/components/layouts/MainLayout.svelte +724 -691
  165. package/dist/components/layouts/MainLayout.svelte.d.ts +6 -6
  166. package/dist/components/nodes/GatewayNode.stories.svelte +100 -99
  167. package/dist/components/nodes/GatewayNode.svelte +605 -571
  168. package/dist/components/nodes/GatewayNode.svelte.d.ts +3 -3
  169. package/dist/components/nodes/IdeaNode.stories.svelte +44 -43
  170. package/dist/components/nodes/IdeaNode.svelte +451 -437
  171. package/dist/components/nodes/IdeaNode.svelte.d.ts +1 -1
  172. package/dist/components/nodes/NotesNode.stories.svelte +65 -64
  173. package/dist/components/nodes/NotesNode.svelte +380 -369
  174. package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
  175. package/dist/components/nodes/SimpleNode.stories.svelte +145 -144
  176. package/dist/components/nodes/SimpleNode.svelte +486 -424
  177. package/dist/components/nodes/SimpleNode.svelte.d.ts +1 -1
  178. package/dist/components/nodes/SquareNode.stories.svelte +73 -73
  179. package/dist/components/nodes/SquareNode.svelte +439 -380
  180. package/dist/components/nodes/SquareNode.svelte.d.ts +1 -1
  181. package/dist/components/nodes/TerminalNode.stories.svelte +13 -13
  182. package/dist/components/nodes/TerminalNode.svelte +709 -670
  183. package/dist/components/nodes/TerminalNode.svelte.d.ts +1 -1
  184. package/dist/components/nodes/ToolNode.stories.svelte +181 -180
  185. package/dist/components/nodes/ToolNode.svelte +505 -447
  186. package/dist/components/nodes/ToolNode.svelte.d.ts +1 -1
  187. package/dist/components/nodes/WorkflowNode.stories.svelte +70 -46
  188. package/dist/components/nodes/WorkflowNode.svelte +621 -551
  189. package/dist/components/nodes/WorkflowNode.svelte.d.ts +3 -3
  190. package/dist/components/playground/ChatPanel.svelte +945 -889
  191. package/dist/components/playground/ExecutionLogs.svelte +495 -472
  192. package/dist/components/playground/InputCollector.svelte +449 -428
  193. package/dist/components/playground/MessageBubble.stories.svelte +47 -47
  194. package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
  195. package/dist/components/playground/MessageBubble.svelte +626 -610
  196. package/dist/components/playground/MessageBubble.svelte.d.ts +1 -1
  197. package/dist/components/playground/Playground.svelte +1088 -1057
  198. package/dist/components/playground/Playground.svelte.d.ts +3 -3
  199. package/dist/components/playground/PlaygroundModal.svelte +208 -204
  200. package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -3
  201. package/dist/components/playground/SessionManager.svelte +527 -521
  202. package/dist/components/playground/SessionManager.svelte.d.ts +1 -1
  203. package/dist/config/agentSpecEndpoints.d.ts +1 -1
  204. package/dist/config/agentSpecEndpoints.js +20 -20
  205. package/dist/config/constants.js +2 -2
  206. package/dist/config/defaultCategories.d.ts +1 -1
  207. package/dist/config/defaultCategories.js +86 -86
  208. package/dist/config/defaultPortConfig.d.ts +1 -1
  209. package/dist/config/defaultPortConfig.js +144 -144
  210. package/dist/config/endpoints.d.ts +4 -4
  211. package/dist/config/endpoints.js +65 -65
  212. package/dist/config/runtimeConfig.d.ts +2 -2
  213. package/dist/config/runtimeConfig.js +8 -8
  214. package/dist/core/index.d.ts +63 -59
  215. package/dist/core/index.js +35 -33
  216. package/dist/display/index.d.ts +2 -2
  217. package/dist/display/index.js +2 -2
  218. package/dist/editor/index.d.ts +62 -62
  219. package/dist/editor/index.js +53 -53
  220. package/dist/form/code.d.ts +5 -5
  221. package/dist/form/code.js +14 -14
  222. package/dist/form/fieldRegistry.d.ts +3 -3
  223. package/dist/form/fieldRegistry.js +11 -9
  224. package/dist/form/full.d.ts +8 -8
  225. package/dist/form/full.js +9 -9
  226. package/dist/form/index.d.ts +18 -18
  227. package/dist/form/index.js +16 -16
  228. package/dist/form/markdown.d.ts +4 -4
  229. package/dist/form/markdown.js +8 -8
  230. package/dist/helpers/proximityConnect.d.ts +3 -3
  231. package/dist/helpers/proximityConnect.js +34 -32
  232. package/dist/helpers/workflowEditorHelper.d.ts +5 -5
  233. package/dist/helpers/workflowEditorHelper.js +108 -96
  234. package/dist/index.d.ts +6 -6
  235. package/dist/index.js +6 -6
  236. package/dist/mocks/app-environment.js +2 -2
  237. package/dist/mocks/app-forms.js +9 -9
  238. package/dist/mocks/app-navigation.js +11 -11
  239. package/dist/mocks/app-stores.js +8 -8
  240. package/dist/playground/index.d.ts +19 -19
  241. package/dist/playground/index.js +16 -16
  242. package/dist/playground/mount.d.ts +3 -3
  243. package/dist/playground/mount.js +24 -24
  244. package/dist/registry/builtinFormats.js +13 -13
  245. package/dist/registry/builtinNodes.d.ts +2 -2
  246. package/dist/registry/builtinNodes.js +77 -77
  247. package/dist/registry/index.d.ts +4 -4
  248. package/dist/registry/index.js +4 -4
  249. package/dist/registry/nodeComponentRegistry.d.ts +8 -8
  250. package/dist/registry/nodeComponentRegistry.js +11 -9
  251. package/dist/registry/plugin.d.ts +2 -2
  252. package/dist/registry/plugin.js +11 -11
  253. package/dist/registry/workflowFormatRegistry.d.ts +3 -3
  254. package/dist/registry/workflowFormatRegistry.js +2 -2
  255. package/dist/schema/index.d.ts +1 -1
  256. package/dist/schema/index.js +2 -2
  257. package/dist/services/agentSpecExecutionService.d.ts +3 -3
  258. package/dist/services/agentSpecExecutionService.js +59 -55
  259. package/dist/services/api.d.ts +2 -2
  260. package/dist/services/api.js +37 -37
  261. package/dist/services/apiVariableService.d.ts +1 -1
  262. package/dist/services/apiVariableService.js +41 -34
  263. package/dist/services/autoSaveService.js +8 -8
  264. package/dist/services/categoriesApi.d.ts +2 -2
  265. package/dist/services/categoriesApi.js +8 -8
  266. package/dist/services/draftStorage.d.ts +1 -1
  267. package/dist/services/draftStorage.js +11 -11
  268. package/dist/services/dynamicSchemaService.d.ts +1 -1
  269. package/dist/services/dynamicSchemaService.js +41 -39
  270. package/dist/services/globalSave.d.ts +2 -2
  271. package/dist/services/globalSave.js +41 -38
  272. package/dist/services/historyService.d.ts +1 -1
  273. package/dist/services/historyService.js +8 -8
  274. package/dist/services/interruptService.d.ts +1 -1
  275. package/dist/services/interruptService.js +35 -29
  276. package/dist/services/nodeExecutionService.d.ts +1 -1
  277. package/dist/services/nodeExecutionService.js +45 -44
  278. package/dist/services/playgroundService.d.ts +1 -1
  279. package/dist/services/playgroundService.js +29 -29
  280. package/dist/services/portConfigApi.d.ts +2 -2
  281. package/dist/services/portConfigApi.js +8 -8
  282. package/dist/services/settingsService.d.ts +2 -2
  283. package/dist/services/settingsService.js +25 -19
  284. package/dist/services/toastService.d.ts +4 -4
  285. package/dist/services/toastService.js +33 -33
  286. package/dist/services/variableService.d.ts +1 -1
  287. package/dist/services/variableService.js +36 -36
  288. package/dist/services/workflowStorage.d.ts +2 -2
  289. package/dist/services/workflowStorage.js +13 -13
  290. package/dist/settings/index.d.ts +7 -7
  291. package/dist/settings/index.js +6 -6
  292. package/dist/skins/default.d.ts +2 -0
  293. package/dist/skins/default.js +1 -0
  294. package/dist/skins/index.d.ts +13 -0
  295. package/dist/skins/index.js +30 -0
  296. package/dist/skins/slate.d.ts +2 -0
  297. package/dist/skins/slate.js +78 -0
  298. package/dist/stores/categoriesStore.svelte.d.ts +1 -1
  299. package/dist/stores/categoriesStore.svelte.js +5 -5
  300. package/dist/stores/editorStateMachine.svelte.d.ts +2 -2
  301. package/dist/stores/editorStateMachine.svelte.js +65 -33
  302. package/dist/stores/historyStore.svelte.d.ts +4 -4
  303. package/dist/stores/historyStore.svelte.js +4 -4
  304. package/dist/stores/interruptStore.svelte.d.ts +3 -3
  305. package/dist/stores/interruptStore.svelte.js +21 -21
  306. package/dist/stores/playgroundStore.svelte.d.ts +2 -2
  307. package/dist/stores/playgroundStore.svelte.js +25 -18
  308. package/dist/stores/portCoordinateStore.svelte.d.ts +2 -2
  309. package/dist/stores/portCoordinateStore.svelte.js +15 -8
  310. package/dist/stores/settingsStore.svelte.d.ts +2 -2
  311. package/dist/stores/settingsStore.svelte.js +62 -57
  312. package/dist/stores/workflowStore.svelte.d.ts +3 -3
  313. package/dist/stores/workflowStore.svelte.js +50 -47
  314. package/dist/stories/CanvasDecorator.svelte +35 -32
  315. package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
  316. package/dist/stories/EdgeDecorator.svelte +102 -99
  317. package/dist/stories/EdgeDecorator.svelte.d.ts +1 -1
  318. package/dist/stories/NodeDecorator.svelte +59 -53
  319. package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
  320. package/dist/stories/utils.d.ts +2 -2
  321. package/dist/stories/utils.js +105 -67
  322. package/dist/styles/base.css +599 -595
  323. package/dist/styles/toast.css +14 -14
  324. package/dist/styles/tokens.css +409 -378
  325. package/dist/svelte-app.d.ts +12 -9
  326. package/dist/svelte-app.js +40 -39
  327. package/dist/themes/default.d.ts +2 -0
  328. package/dist/themes/default.js +9 -0
  329. package/dist/themes/index.d.ts +13 -0
  330. package/dist/themes/index.js +44 -0
  331. package/dist/themes/minimal.d.ts +2 -0
  332. package/dist/themes/minimal.js +11 -0
  333. package/dist/types/agentspec.d.ts +18 -18
  334. package/dist/types/agentspec.js +2 -2
  335. package/dist/types/auth.d.ts +1 -1
  336. package/dist/types/auth.js +6 -6
  337. package/dist/types/config.d.ts +6 -6
  338. package/dist/types/events.d.ts +2 -2
  339. package/dist/types/events.js +2 -2
  340. package/dist/types/index.d.ts +32 -32
  341. package/dist/types/index.js +6 -6
  342. package/dist/types/interrupt.d.ts +6 -6
  343. package/dist/types/interrupt.js +21 -21
  344. package/dist/types/interruptState.d.ts +12 -12
  345. package/dist/types/interruptState.js +66 -66
  346. package/dist/types/playground.d.ts +7 -7
  347. package/dist/types/playground.js +14 -14
  348. package/dist/types/settings.d.ts +5 -3
  349. package/dist/types/settings.js +25 -18
  350. package/dist/types/skin.d.ts +31 -0
  351. package/dist/types/skin.js +1 -0
  352. package/dist/types/theme.d.ts +35 -0
  353. package/dist/types/theme.js +1 -0
  354. package/dist/types/uischema.d.ts +4 -4
  355. package/dist/types/uischema.js +3 -3
  356. package/dist/utils/colors.d.ts +1 -1
  357. package/dist/utils/colors.js +97 -95
  358. package/dist/utils/config.d.ts +2 -2
  359. package/dist/utils/config.js +48 -48
  360. package/dist/utils/connections.d.ts +2 -2
  361. package/dist/utils/connections.js +15 -15
  362. package/dist/utils/errors.js +3 -3
  363. package/dist/utils/fetchWithAuth.d.ts +1 -1
  364. package/dist/utils/fetchWithAuth.js +2 -2
  365. package/dist/utils/handleIds.d.ts +2 -2
  366. package/dist/utils/handleIds.js +8 -8
  367. package/dist/utils/handlePositioning.d.ts +1 -1
  368. package/dist/utils/handlePositioning.js +2 -2
  369. package/dist/utils/icons.d.ts +1 -1
  370. package/dist/utils/icons.js +74 -74
  371. package/dist/utils/logger.d.ts +1 -1
  372. package/dist/utils/logger.js +7 -7
  373. package/dist/utils/nodeStatus.d.ts +1 -1
  374. package/dist/utils/nodeStatus.js +48 -48
  375. package/dist/utils/nodeTypes.d.ts +1 -1
  376. package/dist/utils/nodeTypes.js +21 -20
  377. package/dist/utils/nodeWrapper.d.ts +7 -7
  378. package/dist/utils/nodeWrapper.js +21 -19
  379. package/dist/utils/performanceUtils.d.ts +1 -1
  380. package/dist/utils/performanceUtils.js +2 -1
  381. package/dist/utils/sanitize.js +1 -1
  382. package/dist/utils/uischema.d.ts +2 -2
  383. package/dist/utils/uischema.js +8 -8
  384. package/dist/utils/validation.js +20 -8
  385. package/package.json +1 -1
@@ -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>