@stigmer/react 0.4.8 → 0.5.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 (631) hide show
  1. package/action-menu/ActionMenu.d.ts +64 -0
  2. package/action-menu/ActionMenu.d.ts.map +1 -0
  3. package/action-menu/ActionMenu.js +78 -0
  4. package/action-menu/ActionMenu.js.map +1 -0
  5. package/action-menu/index.d.ts +3 -0
  6. package/action-menu/index.d.ts.map +1 -0
  7. package/action-menu/index.js +2 -0
  8. package/action-menu/index.js.map +1 -0
  9. package/action-menu/types.d.ts +65 -0
  10. package/action-menu/types.d.ts.map +1 -0
  11. package/action-menu/types.js +2 -0
  12. package/action-menu/types.js.map +1 -0
  13. package/agent/AgentCreationWizard.d.ts +55 -0
  14. package/agent/AgentCreationWizard.d.ts.map +1 -0
  15. package/agent/AgentCreationWizard.js +115 -0
  16. package/agent/AgentCreationWizard.js.map +1 -0
  17. package/agent/AgentDetailView.d.ts +77 -9
  18. package/agent/AgentDetailView.d.ts.map +1 -1
  19. package/agent/AgentDetailView.js +265 -87
  20. package/agent/AgentDetailView.js.map +1 -1
  21. package/agent/index.d.ts +8 -0
  22. package/agent/index.d.ts.map +1 -1
  23. package/agent/index.js +4 -0
  24. package/agent/index.js.map +1 -1
  25. package/agent/internal/agentToInput.d.ts +12 -0
  26. package/agent/internal/agentToInput.d.ts.map +1 -0
  27. package/agent/internal/agentToInput.js +72 -0
  28. package/agent/internal/agentToInput.js.map +1 -0
  29. package/agent/steps/CapabilitiesStep.d.ts +16 -0
  30. package/agent/steps/CapabilitiesStep.d.ts.map +1 -0
  31. package/agent/steps/CapabilitiesStep.js +80 -0
  32. package/agent/steps/CapabilitiesStep.js.map +1 -0
  33. package/agent/steps/IdentityStep.d.ts +18 -0
  34. package/agent/steps/IdentityStep.d.ts.map +1 -0
  35. package/agent/steps/IdentityStep.js +43 -0
  36. package/agent/steps/IdentityStep.js.map +1 -0
  37. package/agent/steps/ReviewStep.d.ts +23 -0
  38. package/agent/steps/ReviewStep.d.ts.map +1 -0
  39. package/agent/steps/ReviewStep.js +73 -0
  40. package/agent/steps/ReviewStep.js.map +1 -0
  41. package/agent/steps/types.d.ts +35 -0
  42. package/agent/steps/types.d.ts.map +1 -0
  43. package/agent/steps/types.js +16 -0
  44. package/agent/steps/types.js.map +1 -0
  45. package/agent/useCreateAgent.d.ts +45 -0
  46. package/agent/useCreateAgent.d.ts.map +1 -0
  47. package/agent/useCreateAgent.js +50 -0
  48. package/agent/useCreateAgent.js.map +1 -0
  49. package/agent/useUpdateAgent.d.ts +24 -0
  50. package/agent/useUpdateAgent.d.ts.map +1 -0
  51. package/agent/useUpdateAgent.js +35 -0
  52. package/agent/useUpdateAgent.js.map +1 -0
  53. package/dependency-graph/DependencyGraph.d.ts +37 -0
  54. package/dependency-graph/DependencyGraph.d.ts.map +1 -0
  55. package/dependency-graph/DependencyGraph.js +88 -0
  56. package/dependency-graph/DependencyGraph.js.map +1 -0
  57. package/dependency-graph/DependencyTreeNode.d.ts +23 -0
  58. package/dependency-graph/DependencyTreeNode.d.ts.map +1 -0
  59. package/dependency-graph/DependencyTreeNode.js +99 -0
  60. package/dependency-graph/DependencyTreeNode.js.map +1 -0
  61. package/dependency-graph/index.d.ts +4 -0
  62. package/dependency-graph/index.d.ts.map +1 -0
  63. package/dependency-graph/index.js +5 -0
  64. package/dependency-graph/index.js.map +1 -0
  65. package/dependency-graph/types.d.ts +130 -0
  66. package/dependency-graph/types.d.ts.map +1 -0
  67. package/dependency-graph/types.js +2 -0
  68. package/dependency-graph/types.js.map +1 -0
  69. package/dependency-graph/useDependencyGraph.d.ts +27 -0
  70. package/dependency-graph/useDependencyGraph.d.ts.map +1 -0
  71. package/dependency-graph/useDependencyGraph.js +129 -0
  72. package/dependency-graph/useDependencyGraph.js.map +1 -0
  73. package/empty-state/EmptyState.d.ts +29 -0
  74. package/empty-state/EmptyState.d.ts.map +1 -0
  75. package/empty-state/EmptyState.js +45 -0
  76. package/empty-state/EmptyState.js.map +1 -0
  77. package/empty-state/index.d.ts +4 -0
  78. package/empty-state/index.d.ts.map +1 -0
  79. package/empty-state/index.js +3 -0
  80. package/empty-state/index.js.map +1 -0
  81. package/empty-state/types.d.ts +73 -0
  82. package/empty-state/types.d.ts.map +1 -0
  83. package/empty-state/types.js +2 -0
  84. package/empty-state/types.js.map +1 -0
  85. package/empty-state/useEmptyState.d.ts +18 -0
  86. package/empty-state/useEmptyState.d.ts.map +1 -0
  87. package/empty-state/useEmptyState.js +72 -0
  88. package/empty-state/useEmptyState.js.map +1 -0
  89. package/feedback/StigmerToaster.d.ts +18 -0
  90. package/feedback/StigmerToaster.d.ts.map +1 -0
  91. package/feedback/StigmerToaster.js +31 -0
  92. package/feedback/StigmerToaster.js.map +1 -0
  93. package/feedback/index.d.ts +4 -0
  94. package/feedback/index.d.ts.map +1 -0
  95. package/feedback/index.js +3 -0
  96. package/feedback/index.js.map +1 -0
  97. package/feedback/toast.d.ts +14 -0
  98. package/feedback/toast.d.ts.map +1 -0
  99. package/feedback/toast.js +14 -0
  100. package/feedback/toast.js.map +1 -0
  101. package/feedback/types.d.ts +4 -0
  102. package/feedback/types.d.ts.map +1 -0
  103. package/feedback/types.js +2 -0
  104. package/feedback/types.js.map +1 -0
  105. package/index.d.ts +30 -10
  106. package/index.d.ts.map +1 -1
  107. package/index.js +29 -9
  108. package/index.js.map +1 -1
  109. package/inline-edit/InlineEditImage.d.ts +20 -0
  110. package/inline-edit/InlineEditImage.d.ts.map +1 -0
  111. package/inline-edit/InlineEditImage.js +85 -0
  112. package/inline-edit/InlineEditImage.js.map +1 -0
  113. package/inline-edit/InlineEditKeyValue.d.ts +29 -0
  114. package/inline-edit/InlineEditKeyValue.d.ts.map +1 -0
  115. package/inline-edit/InlineEditKeyValue.js +67 -0
  116. package/inline-edit/InlineEditKeyValue.js.map +1 -0
  117. package/inline-edit/InlineEditResourceList.d.ts +34 -0
  118. package/inline-edit/InlineEditResourceList.d.ts.map +1 -0
  119. package/inline-edit/InlineEditResourceList.js +99 -0
  120. package/inline-edit/InlineEditResourceList.js.map +1 -0
  121. package/inline-edit/InlineEditSelect.d.ts +18 -0
  122. package/inline-edit/InlineEditSelect.d.ts.map +1 -0
  123. package/inline-edit/InlineEditSelect.js +54 -0
  124. package/inline-edit/InlineEditSelect.js.map +1 -0
  125. package/inline-edit/InlineEditText.d.ts +23 -0
  126. package/inline-edit/InlineEditText.d.ts.map +1 -0
  127. package/inline-edit/InlineEditText.js +79 -0
  128. package/inline-edit/InlineEditText.js.map +1 -0
  129. package/inline-edit/InlineEditTextarea.d.ts +22 -0
  130. package/inline-edit/InlineEditTextarea.d.ts.map +1 -0
  131. package/inline-edit/InlineEditTextarea.js +83 -0
  132. package/inline-edit/InlineEditTextarea.js.map +1 -0
  133. package/inline-edit/index.d.ts +16 -0
  134. package/inline-edit/index.d.ts.map +1 -0
  135. package/inline-edit/index.js +8 -0
  136. package/inline-edit/index.js.map +1 -0
  137. package/inline-edit/types.d.ts +42 -0
  138. package/inline-edit/types.d.ts.map +1 -0
  139. package/inline-edit/types.js +2 -0
  140. package/inline-edit/types.js.map +1 -0
  141. package/inline-edit/useInlineFieldSave.d.ts +23 -0
  142. package/inline-edit/useInlineFieldSave.d.ts.map +1 -0
  143. package/inline-edit/useInlineFieldSave.js +44 -0
  144. package/inline-edit/useInlineFieldSave.js.map +1 -0
  145. package/internal/Tabs.d.ts +4 -38
  146. package/internal/Tabs.d.ts.map +1 -1
  147. package/internal/Tabs.js +3 -62
  148. package/internal/Tabs.js.map +1 -1
  149. package/library/ImportResourceDialog.d.ts +43 -0
  150. package/library/ImportResourceDialog.d.ts.map +1 -0
  151. package/library/ImportResourceDialog.js +90 -0
  152. package/library/ImportResourceDialog.js.map +1 -0
  153. package/library/index.d.ts +7 -4
  154. package/library/index.d.ts.map +1 -1
  155. package/library/index.js +4 -2
  156. package/library/index.js.map +1 -1
  157. package/library/serialize-resource-yaml.d.ts +53 -0
  158. package/library/serialize-resource-yaml.d.ts.map +1 -1
  159. package/library/serialize-resource-yaml.js +275 -0
  160. package/library/serialize-resource-yaml.js.map +1 -1
  161. package/library/useExportResource.d.ts +56 -0
  162. package/library/useExportResource.d.ts.map +1 -0
  163. package/library/useExportResource.js +137 -0
  164. package/library/useExportResource.js.map +1 -0
  165. package/library/useImportResource.d.ts +84 -0
  166. package/library/useImportResource.d.ts.map +1 -0
  167. package/library/useImportResource.js +188 -0
  168. package/library/useImportResource.js.map +1 -0
  169. package/mcp-server/McpServerCreationWizard.d.ts +55 -0
  170. package/mcp-server/McpServerCreationWizard.d.ts.map +1 -0
  171. package/mcp-server/McpServerCreationWizard.js +121 -0
  172. package/mcp-server/McpServerCreationWizard.js.map +1 -0
  173. package/mcp-server/McpServerDetailView.d.ts +21 -1
  174. package/mcp-server/McpServerDetailView.d.ts.map +1 -1
  175. package/mcp-server/McpServerDetailView.js +113 -20
  176. package/mcp-server/McpServerDetailView.js.map +1 -1
  177. package/mcp-server/index.d.ts +8 -0
  178. package/mcp-server/index.d.ts.map +1 -1
  179. package/mcp-server/index.js +4 -0
  180. package/mcp-server/index.js.map +1 -1
  181. package/mcp-server/internal/mcpServerToInput.d.ts +12 -0
  182. package/mcp-server/internal/mcpServerToInput.d.ts.map +1 -0
  183. package/mcp-server/internal/mcpServerToInput.js +81 -0
  184. package/mcp-server/internal/mcpServerToInput.js.map +1 -0
  185. package/mcp-server/steps/EnvironmentAuthStep.d.ts +15 -0
  186. package/mcp-server/steps/EnvironmentAuthStep.d.ts.map +1 -0
  187. package/mcp-server/steps/EnvironmentAuthStep.js +55 -0
  188. package/mcp-server/steps/EnvironmentAuthStep.js.map +1 -0
  189. package/mcp-server/steps/IdentityTransportStep.d.ts +19 -0
  190. package/mcp-server/steps/IdentityTransportStep.d.ts.map +1 -0
  191. package/mcp-server/steps/IdentityTransportStep.js +73 -0
  192. package/mcp-server/steps/IdentityTransportStep.js.map +1 -0
  193. package/mcp-server/steps/ReviewStep.d.ts +23 -0
  194. package/mcp-server/steps/ReviewStep.d.ts.map +1 -0
  195. package/mcp-server/steps/ReviewStep.js +137 -0
  196. package/mcp-server/steps/ReviewStep.js.map +1 -0
  197. package/mcp-server/steps/types.d.ts +56 -0
  198. package/mcp-server/steps/types.d.ts.map +1 -0
  199. package/mcp-server/steps/types.js +27 -0
  200. package/mcp-server/steps/types.js.map +1 -0
  201. package/mcp-server/useCreateMcpServer.d.ts +45 -0
  202. package/mcp-server/useCreateMcpServer.d.ts.map +1 -0
  203. package/mcp-server/useCreateMcpServer.js +50 -0
  204. package/mcp-server/useCreateMcpServer.js.map +1 -0
  205. package/mcp-server/useUpdateMcpServer.d.ts +24 -0
  206. package/mcp-server/useUpdateMcpServer.d.ts.map +1 -0
  207. package/mcp-server/useUpdateMcpServer.js +35 -0
  208. package/mcp-server/useUpdateMcpServer.js.map +1 -0
  209. package/package.json +8 -4
  210. package/resource-creation/CreationPicker.d.ts +60 -0
  211. package/resource-creation/CreationPicker.d.ts.map +1 -0
  212. package/resource-creation/CreationPicker.js +74 -0
  213. package/resource-creation/CreationPicker.js.map +1 -0
  214. package/resource-creation/StepIndicator.d.ts +28 -0
  215. package/resource-creation/StepIndicator.d.ts.map +1 -0
  216. package/resource-creation/StepIndicator.js +40 -0
  217. package/resource-creation/StepIndicator.js.map +1 -0
  218. package/resource-creation/TemplateCard.d.ts +24 -0
  219. package/resource-creation/TemplateCard.d.ts.map +1 -0
  220. package/resource-creation/TemplateCard.js +68 -0
  221. package/resource-creation/TemplateCard.js.map +1 -0
  222. package/resource-creation/TemplateGallery.d.ts +43 -0
  223. package/resource-creation/TemplateGallery.d.ts.map +1 -0
  224. package/resource-creation/TemplateGallery.js +78 -0
  225. package/resource-creation/TemplateGallery.js.map +1 -0
  226. package/resource-creation/WizardNav.d.ts +31 -0
  227. package/resource-creation/WizardNav.d.ts.map +1 -0
  228. package/resource-creation/WizardNav.js +29 -0
  229. package/resource-creation/WizardNav.js.map +1 -0
  230. package/resource-creation/WizardShell.d.ts +41 -0
  231. package/resource-creation/WizardShell.d.ts.map +1 -0
  232. package/resource-creation/WizardShell.js +55 -0
  233. package/resource-creation/WizardShell.js.map +1 -0
  234. package/resource-creation/index.d.ts +21 -0
  235. package/resource-creation/index.d.ts.map +1 -0
  236. package/resource-creation/index.js +14 -0
  237. package/resource-creation/index.js.map +1 -0
  238. package/resource-creation/templates/agent-templates.d.ts +15 -0
  239. package/resource-creation/templates/agent-templates.d.ts.map +1 -0
  240. package/resource-creation/templates/agent-templates.js +148 -0
  241. package/resource-creation/templates/agent-templates.js.map +1 -0
  242. package/resource-creation/templates/index.d.ts +5 -0
  243. package/resource-creation/templates/index.d.ts.map +1 -0
  244. package/resource-creation/templates/index.js +5 -0
  245. package/resource-creation/templates/index.js.map +1 -0
  246. package/resource-creation/templates/mcp-server-templates.d.ts +15 -0
  247. package/resource-creation/templates/mcp-server-templates.d.ts.map +1 -0
  248. package/resource-creation/templates/mcp-server-templates.js +92 -0
  249. package/resource-creation/templates/mcp-server-templates.js.map +1 -0
  250. package/resource-creation/templates/types.d.ts +48 -0
  251. package/resource-creation/templates/types.d.ts.map +1 -0
  252. package/resource-creation/templates/types.js +16 -0
  253. package/resource-creation/templates/types.js.map +1 -0
  254. package/resource-creation/types.d.ts +88 -0
  255. package/resource-creation/types.d.ts.map +1 -0
  256. package/resource-creation/types.js +2 -0
  257. package/resource-creation/types.js.map +1 -0
  258. package/resource-creation/useTemplateFilter.d.ts +43 -0
  259. package/resource-creation/useTemplateFilter.d.ts.map +1 -0
  260. package/resource-creation/useTemplateFilter.js +73 -0
  261. package/resource-creation/useTemplateFilter.js.map +1 -0
  262. package/resource-creation/useWizardState.d.ts +67 -0
  263. package/resource-creation/useWizardState.d.ts.map +1 -0
  264. package/resource-creation/useWizardState.js +143 -0
  265. package/resource-creation/useWizardState.js.map +1 -0
  266. package/resource-detail/ConfirmDialog.d.ts +44 -0
  267. package/resource-detail/ConfirmDialog.d.ts.map +1 -0
  268. package/resource-detail/ConfirmDialog.js +62 -0
  269. package/resource-detail/ConfirmDialog.js.map +1 -0
  270. package/resource-detail/ResourceActionBar.d.ts +42 -0
  271. package/resource-detail/ResourceActionBar.d.ts.map +1 -0
  272. package/resource-detail/ResourceActionBar.js +64 -0
  273. package/resource-detail/ResourceActionBar.js.map +1 -0
  274. package/resource-detail/ResourceDetailShell.d.ts +36 -0
  275. package/resource-detail/ResourceDetailShell.d.ts.map +1 -0
  276. package/resource-detail/ResourceDetailShell.js +65 -0
  277. package/resource-detail/ResourceDetailShell.js.map +1 -0
  278. package/resource-detail/Section.d.ts +18 -0
  279. package/resource-detail/Section.d.ts.map +1 -0
  280. package/resource-detail/Section.js +18 -0
  281. package/resource-detail/Section.js.map +1 -0
  282. package/resource-detail/index.d.ts +15 -0
  283. package/resource-detail/index.d.ts.map +1 -0
  284. package/resource-detail/index.js +10 -0
  285. package/resource-detail/index.js.map +1 -0
  286. package/resource-detail/types.d.ts +146 -0
  287. package/resource-detail/types.d.ts.map +1 -0
  288. package/resource-detail/types.js +2 -0
  289. package/resource-detail/types.js.map +1 -0
  290. package/resource-detail/useConfirmAction.d.ts +41 -0
  291. package/resource-detail/useConfirmAction.d.ts.map +1 -0
  292. package/resource-detail/useConfirmAction.js +30 -0
  293. package/resource-detail/useConfirmAction.js.map +1 -0
  294. package/resource-detail/useCopyResource.d.ts +28 -0
  295. package/resource-detail/useCopyResource.d.ts.map +1 -0
  296. package/resource-detail/useCopyResource.js +46 -0
  297. package/resource-detail/useCopyResource.js.map +1 -0
  298. package/resource-detail/useDeleteResource.d.ts +40 -0
  299. package/resource-detail/useDeleteResource.d.ts.map +1 -0
  300. package/resource-detail/useDeleteResource.js +83 -0
  301. package/resource-detail/useDeleteResource.js.map +1 -0
  302. package/resource-detail/useDetailTabs.d.ts +46 -0
  303. package/resource-detail/useDetailTabs.d.ts.map +1 -0
  304. package/resource-detail/useDetailTabs.js +47 -0
  305. package/resource-detail/useDetailTabs.js.map +1 -0
  306. package/resource-workbench/components/BulkActionBar.d.ts +36 -0
  307. package/resource-workbench/components/BulkActionBar.d.ts.map +1 -0
  308. package/resource-workbench/components/BulkActionBar.js +35 -0
  309. package/resource-workbench/components/BulkActionBar.js.map +1 -0
  310. package/resource-workbench/components/ColumnHeader.d.ts +23 -0
  311. package/resource-workbench/components/ColumnHeader.d.ts.map +1 -0
  312. package/resource-workbench/components/ColumnHeader.js +25 -0
  313. package/resource-workbench/components/ColumnHeader.js.map +1 -0
  314. package/resource-workbench/components/FilterBar.d.ts +33 -0
  315. package/resource-workbench/components/FilterBar.d.ts.map +1 -0
  316. package/resource-workbench/components/FilterBar.js +72 -0
  317. package/resource-workbench/components/FilterBar.js.map +1 -0
  318. package/resource-workbench/components/ResourceAvatar.d.ts +29 -0
  319. package/resource-workbench/components/ResourceAvatar.d.ts.map +1 -0
  320. package/resource-workbench/components/ResourceAvatar.js +51 -0
  321. package/resource-workbench/components/ResourceAvatar.js.map +1 -0
  322. package/resource-workbench/components/ResourceCards.d.ts +39 -0
  323. package/resource-workbench/components/ResourceCards.d.ts.map +1 -0
  324. package/resource-workbench/components/ResourceCards.js +41 -0
  325. package/resource-workbench/components/ResourceCards.js.map +1 -0
  326. package/resource-workbench/components/ResourceInspector.d.ts +26 -0
  327. package/resource-workbench/components/ResourceInspector.d.ts.map +1 -0
  328. package/resource-workbench/components/ResourceInspector.js +22 -0
  329. package/resource-workbench/components/ResourceInspector.js.map +1 -0
  330. package/resource-workbench/components/ResourceList.d.ts +39 -0
  331. package/resource-workbench/components/ResourceList.d.ts.map +1 -0
  332. package/resource-workbench/components/ResourceList.js +41 -0
  333. package/resource-workbench/components/ResourceList.js.map +1 -0
  334. package/resource-workbench/components/ResourceTable.d.ts +47 -0
  335. package/resource-workbench/components/ResourceTable.d.ts.map +1 -0
  336. package/resource-workbench/components/ResourceTable.js +78 -0
  337. package/resource-workbench/components/ResourceTable.js.map +1 -0
  338. package/resource-workbench/components/ResourceWorkbench.d.ts +131 -0
  339. package/resource-workbench/components/ResourceWorkbench.d.ts.map +1 -0
  340. package/resource-workbench/components/ResourceWorkbench.js +170 -0
  341. package/resource-workbench/components/ResourceWorkbench.js.map +1 -0
  342. package/resource-workbench/components/SelectionCheckbox.d.ts +24 -0
  343. package/resource-workbench/components/SelectionCheckbox.d.ts.map +1 -0
  344. package/resource-workbench/components/SelectionCheckbox.js +16 -0
  345. package/resource-workbench/components/SelectionCheckbox.js.map +1 -0
  346. package/resource-workbench/components/StatusBadge.d.ts +31 -0
  347. package/resource-workbench/components/StatusBadge.d.ts.map +1 -0
  348. package/resource-workbench/components/StatusBadge.js +75 -0
  349. package/resource-workbench/components/StatusBadge.js.map +1 -0
  350. package/resource-workbench/components/ViewSwitcher.d.ts +21 -0
  351. package/resource-workbench/components/ViewSwitcher.d.ts.map +1 -0
  352. package/resource-workbench/components/ViewSwitcher.js +37 -0
  353. package/resource-workbench/components/ViewSwitcher.js.map +1 -0
  354. package/resource-workbench/hooks/useResourceCollection.d.ts +93 -0
  355. package/resource-workbench/hooks/useResourceCollection.d.ts.map +1 -0
  356. package/resource-workbench/hooks/useResourceCollection.js +133 -0
  357. package/resource-workbench/hooks/useResourceCollection.js.map +1 -0
  358. package/resource-workbench/hooks/useResourceFilters.d.ts +73 -0
  359. package/resource-workbench/hooks/useResourceFilters.d.ts.map +1 -0
  360. package/resource-workbench/hooks/useResourceFilters.js +105 -0
  361. package/resource-workbench/hooks/useResourceFilters.js.map +1 -0
  362. package/resource-workbench/hooks/useResourceSelection.d.ts +44 -0
  363. package/resource-workbench/hooks/useResourceSelection.d.ts.map +1 -0
  364. package/resource-workbench/hooks/useResourceSelection.js +123 -0
  365. package/resource-workbench/hooks/useResourceSelection.js.map +1 -0
  366. package/resource-workbench/hooks/useViewPreference.d.ts +32 -0
  367. package/resource-workbench/hooks/useViewPreference.d.ts.map +1 -0
  368. package/resource-workbench/hooks/useViewPreference.js +60 -0
  369. package/resource-workbench/hooks/useViewPreference.js.map +1 -0
  370. package/resource-workbench/index.d.ts +34 -0
  371. package/resource-workbench/index.d.ts.map +1 -0
  372. package/resource-workbench/index.js +19 -0
  373. package/resource-workbench/index.js.map +1 -0
  374. package/resource-workbench/types.d.ts +165 -0
  375. package/resource-workbench/types.d.ts.map +1 -0
  376. package/resource-workbench/types.js +2 -0
  377. package/resource-workbench/types.js.map +1 -0
  378. package/runner/RunnerDetailView.d.ts +44 -0
  379. package/runner/RunnerDetailView.d.ts.map +1 -0
  380. package/runner/RunnerDetailView.js +154 -0
  381. package/runner/RunnerDetailView.js.map +1 -0
  382. package/runner/RunnerListPanel.d.ts +26 -1
  383. package/runner/RunnerListPanel.d.ts.map +1 -1
  384. package/runner/RunnerListPanel.js +68 -46
  385. package/runner/RunnerListPanel.js.map +1 -1
  386. package/runner/index.d.ts +7 -1
  387. package/runner/index.d.ts.map +1 -1
  388. package/runner/index.js +3 -0
  389. package/runner/index.js.map +1 -1
  390. package/runner/shared.d.ts +31 -0
  391. package/runner/shared.d.ts.map +1 -0
  392. package/runner/shared.js +55 -0
  393. package/runner/shared.js.map +1 -0
  394. package/runner/useRunner.d.ts +37 -0
  395. package/runner/useRunner.d.ts.map +1 -0
  396. package/runner/useRunner.js +24 -0
  397. package/runner/useRunner.js.map +1 -0
  398. package/session/__tests__/group-sessions.test.js +3 -3
  399. package/session/__tests__/group-sessions.test.js.map +1 -1
  400. package/skill/SkillDetailView.d.ts +70 -7
  401. package/skill/SkillDetailView.d.ts.map +1 -1
  402. package/skill/SkillDetailView.js +107 -39
  403. package/skill/SkillDetailView.js.map +1 -1
  404. package/skill/SkillDiffDialog.d.ts +42 -0
  405. package/skill/SkillDiffDialog.d.ts.map +1 -0
  406. package/skill/SkillDiffDialog.js +72 -0
  407. package/skill/SkillDiffDialog.js.map +1 -0
  408. package/skill/SkillFileBrowser.d.ts +31 -0
  409. package/skill/SkillFileBrowser.d.ts.map +1 -0
  410. package/skill/SkillFileBrowser.js +105 -0
  411. package/skill/SkillFileBrowser.js.map +1 -0
  412. package/skill/SkillUploader.d.ts +39 -0
  413. package/skill/SkillUploader.d.ts.map +1 -0
  414. package/skill/SkillUploader.js +141 -0
  415. package/skill/SkillUploader.js.map +1 -0
  416. package/skill/index.d.ts +18 -0
  417. package/skill/index.d.ts.map +1 -1
  418. package/skill/index.js +9 -0
  419. package/skill/index.js.map +1 -1
  420. package/skill/internal/computeArtifactHash.d.ts +9 -0
  421. package/skill/internal/computeArtifactHash.d.ts.map +1 -0
  422. package/skill/internal/computeArtifactHash.js +14 -0
  423. package/skill/internal/computeArtifactHash.js.map +1 -0
  424. package/skill/internal/fetchAndUnpackArtifact.d.ts +16 -0
  425. package/skill/internal/fetchAndUnpackArtifact.d.ts.map +1 -0
  426. package/skill/internal/fetchAndUnpackArtifact.js +34 -0
  427. package/skill/internal/fetchAndUnpackArtifact.js.map +1 -0
  428. package/skill/usePushSkill.d.ts +53 -0
  429. package/skill/usePushSkill.d.ts.map +1 -0
  430. package/skill/usePushSkill.js +57 -0
  431. package/skill/usePushSkill.js.map +1 -0
  432. package/skill/useSkillArtifact.d.ts +37 -0
  433. package/skill/useSkillArtifact.d.ts.map +1 -0
  434. package/skill/useSkillArtifact.js +76 -0
  435. package/skill/useSkillArtifact.js.map +1 -0
  436. package/skill/useSkillDiff.d.ts +31 -0
  437. package/skill/useSkillDiff.d.ts.map +1 -0
  438. package/skill/useSkillDiff.js +97 -0
  439. package/skill/useSkillDiff.js.map +1 -0
  440. package/skill/useSkillDuplicateCheck.d.ts +34 -0
  441. package/skill/useSkillDuplicateCheck.d.ts.map +1 -0
  442. package/skill/useSkillDuplicateCheck.js +58 -0
  443. package/skill/useSkillDuplicateCheck.js.map +1 -0
  444. package/skill/useSkillUpload.d.ts +69 -0
  445. package/skill/useSkillUpload.d.ts.map +1 -0
  446. package/skill/useSkillUpload.js +157 -0
  447. package/skill/useSkillUpload.js.map +1 -0
  448. package/skill/useSkillVersions.d.ts +46 -0
  449. package/skill/useSkillVersions.d.ts.map +1 -0
  450. package/skill/useSkillVersions.js +104 -0
  451. package/skill/useSkillVersions.js.map +1 -0
  452. package/src/action-menu/ActionMenu.tsx +151 -0
  453. package/src/action-menu/index.ts +9 -0
  454. package/src/action-menu/types.ts +70 -0
  455. package/src/agent/AgentCreationWizard.tsx +201 -0
  456. package/src/agent/AgentDetailView.tsx +817 -321
  457. package/src/agent/index.ts +16 -0
  458. package/src/agent/internal/agentToInput.ts +95 -0
  459. package/src/agent/steps/CapabilitiesStep.tsx +363 -0
  460. package/src/agent/steps/IdentityStep.tsx +259 -0
  461. package/src/agent/steps/ReviewStep.tsx +211 -0
  462. package/src/agent/steps/types.ts +53 -0
  463. package/src/agent/useCreateAgent.ts +76 -0
  464. package/src/agent/useUpdateAgent.ts +55 -0
  465. package/src/dependency-graph/DependencyGraph.tsx +153 -0
  466. package/src/dependency-graph/DependencyTreeNode.tsx +282 -0
  467. package/src/dependency-graph/index.ts +15 -0
  468. package/src/dependency-graph/types.ts +131 -0
  469. package/src/dependency-graph/useDependencyGraph.ts +158 -0
  470. package/src/empty-state/EmptyState.tsx +90 -0
  471. package/src/empty-state/index.ts +9 -0
  472. package/src/empty-state/types.ts +81 -0
  473. package/src/empty-state/useEmptyState.ts +85 -0
  474. package/src/feedback/StigmerToaster.tsx +45 -0
  475. package/src/feedback/index.ts +3 -0
  476. package/src/feedback/toast.ts +13 -0
  477. package/src/feedback/types.ts +7 -0
  478. package/src/index.ts +270 -8
  479. package/src/inline-edit/InlineEditImage.tsx +208 -0
  480. package/src/inline-edit/InlineEditKeyValue.tsx +278 -0
  481. package/src/inline-edit/InlineEditResourceList.tsx +325 -0
  482. package/src/inline-edit/InlineEditSelect.tsx +150 -0
  483. package/src/inline-edit/InlineEditText.tsx +211 -0
  484. package/src/inline-edit/InlineEditTextarea.tsx +209 -0
  485. package/src/inline-edit/index.ts +28 -0
  486. package/src/inline-edit/types.ts +47 -0
  487. package/src/inline-edit/useInlineFieldSave.ts +62 -0
  488. package/src/internal/Tabs.tsx +4 -164
  489. package/src/library/ImportResourceDialog.tsx +227 -0
  490. package/src/library/index.ts +18 -8
  491. package/src/library/serialize-resource-yaml.ts +356 -0
  492. package/src/library/useExportResource.ts +183 -0
  493. package/src/library/useImportResource.ts +253 -0
  494. package/src/mcp-server/McpServerCreationWizard.tsx +206 -0
  495. package/src/mcp-server/McpServerDetailView.tsx +392 -105
  496. package/src/mcp-server/index.ts +16 -0
  497. package/src/mcp-server/internal/mcpServerToInput.ts +95 -0
  498. package/src/mcp-server/steps/EnvironmentAuthStep.tsx +462 -0
  499. package/src/mcp-server/steps/IdentityTransportStep.tsx +531 -0
  500. package/src/mcp-server/steps/ReviewStep.tsx +297 -0
  501. package/src/mcp-server/steps/types.ts +85 -0
  502. package/src/mcp-server/useCreateMcpServer.ts +76 -0
  503. package/src/mcp-server/useUpdateMcpServer.ts +55 -0
  504. package/src/resource-creation/CreationPicker.tsx +292 -0
  505. package/src/resource-creation/StepIndicator.tsx +156 -0
  506. package/src/resource-creation/TemplateCard.tsx +143 -0
  507. package/src/resource-creation/TemplateGallery.tsx +222 -0
  508. package/src/resource-creation/WizardNav.tsx +163 -0
  509. package/src/resource-creation/WizardShell.tsx +124 -0
  510. package/src/resource-creation/index.ts +45 -0
  511. package/src/resource-creation/templates/agent-templates.ts +160 -0
  512. package/src/resource-creation/templates/index.ts +7 -0
  513. package/src/resource-creation/templates/mcp-server-templates.ts +106 -0
  514. package/src/resource-creation/templates/types.ts +64 -0
  515. package/src/resource-creation/types.ts +105 -0
  516. package/src/resource-creation/useTemplateFilter.ts +117 -0
  517. package/src/resource-creation/useWizardState.ts +223 -0
  518. package/src/resource-detail/ConfirmDialog.tsx +127 -0
  519. package/src/resource-detail/ResourceActionBar.tsx +157 -0
  520. package/src/resource-detail/ResourceDetailShell.tsx +184 -0
  521. package/src/resource-detail/Section.tsx +78 -0
  522. package/src/resource-detail/index.ts +34 -0
  523. package/src/resource-detail/types.ts +177 -0
  524. package/src/resource-detail/useConfirmAction.ts +70 -0
  525. package/src/resource-detail/useCopyResource.ts +74 -0
  526. package/src/resource-detail/useDeleteResource.ts +110 -0
  527. package/src/resource-detail/useDetailTabs.ts +93 -0
  528. package/src/resource-workbench/components/BulkActionBar.tsx +122 -0
  529. package/src/resource-workbench/components/ColumnHeader.tsx +105 -0
  530. package/src/resource-workbench/components/FilterBar.tsx +173 -0
  531. package/src/resource-workbench/components/ResourceAvatar.tsx +109 -0
  532. package/src/resource-workbench/components/ResourceCards.tsx +126 -0
  533. package/src/resource-workbench/components/ResourceInspector.tsx +88 -0
  534. package/src/resource-workbench/components/ResourceList.tsx +121 -0
  535. package/src/resource-workbench/components/ResourceTable.tsx +222 -0
  536. package/src/resource-workbench/components/ResourceWorkbench.tsx +695 -0
  537. package/src/resource-workbench/components/SelectionCheckbox.tsx +52 -0
  538. package/src/resource-workbench/components/StatusBadge.tsx +119 -0
  539. package/src/resource-workbench/components/ViewSwitcher.tsx +135 -0
  540. package/src/resource-workbench/hooks/useResourceCollection.ts +261 -0
  541. package/src/resource-workbench/hooks/useResourceFilters.ts +216 -0
  542. package/src/resource-workbench/hooks/useResourceSelection.ts +178 -0
  543. package/src/resource-workbench/hooks/useViewPreference.ts +75 -0
  544. package/src/resource-workbench/index.ts +73 -0
  545. package/src/resource-workbench/types.ts +220 -0
  546. package/src/runner/RunnerDetailView.tsx +410 -0
  547. package/src/runner/RunnerListPanel.tsx +126 -111
  548. package/src/runner/index.ts +13 -1
  549. package/src/runner/shared.tsx +124 -0
  550. package/src/runner/useRunner.ts +59 -0
  551. package/src/session/__tests__/group-sessions.test.ts +5 -3
  552. package/src/skill/SkillDetailView.tsx +371 -165
  553. package/src/skill/SkillDiffDialog.tsx +213 -0
  554. package/src/skill/SkillFileBrowser.tsx +289 -0
  555. package/src/skill/SkillUploader.tsx +481 -0
  556. package/src/skill/index.ts +34 -0
  557. package/src/skill/internal/computeArtifactHash.ts +13 -0
  558. package/src/skill/internal/fetchAndUnpackArtifact.ts +48 -0
  559. package/src/skill/usePushSkill.ts +101 -0
  560. package/src/skill/useSkillArtifact.ts +107 -0
  561. package/src/skill/useSkillDiff.ts +128 -0
  562. package/src/skill/useSkillDuplicateCheck.ts +92 -0
  563. package/src/skill/useSkillUpload.ts +231 -0
  564. package/src/skill/useSkillVersions.ts +165 -0
  565. package/src/styles.css +28 -0
  566. package/src/tabs/Tabs.tsx +184 -0
  567. package/src/tabs/index.ts +2 -0
  568. package/src/version-history/DiffFileList.tsx +111 -0
  569. package/src/version-history/DiffSummary.tsx +61 -0
  570. package/src/version-history/DiffViewer.tsx +163 -0
  571. package/src/version-history/MultiFileDiffView.tsx +114 -0
  572. package/src/version-history/VersionTimeline.tsx +232 -0
  573. package/src/version-history/VersionTimelineEntry.tsx +254 -0
  574. package/src/version-history/computeDiff.ts +61 -0
  575. package/src/version-history/computeMultiFileDiff.ts +97 -0
  576. package/src/version-history/index.ts +22 -0
  577. package/src/version-history/types.ts +129 -0
  578. package/styles.css +1 -1
  579. package/tabs/Tabs.d.ts +58 -0
  580. package/tabs/Tabs.d.ts.map +1 -0
  581. package/tabs/Tabs.js +80 -0
  582. package/tabs/Tabs.js.map +1 -0
  583. package/tabs/index.d.ts +3 -0
  584. package/tabs/index.d.ts.map +1 -0
  585. package/tabs/index.js +2 -0
  586. package/tabs/index.js.map +1 -0
  587. package/version-history/DiffFileList.d.ts +22 -0
  588. package/version-history/DiffFileList.d.ts.map +1 -0
  589. package/version-history/DiffFileList.js +37 -0
  590. package/version-history/DiffFileList.js.map +1 -0
  591. package/version-history/DiffSummary.d.ts +21 -0
  592. package/version-history/DiffSummary.d.ts.map +1 -0
  593. package/version-history/DiffSummary.js +16 -0
  594. package/version-history/DiffSummary.js.map +1 -0
  595. package/version-history/DiffViewer.d.ts +31 -0
  596. package/version-history/DiffViewer.d.ts.map +1 -0
  597. package/version-history/DiffViewer.js +60 -0
  598. package/version-history/DiffViewer.js.map +1 -0
  599. package/version-history/MultiFileDiffView.d.ts +30 -0
  600. package/version-history/MultiFileDiffView.d.ts.map +1 -0
  601. package/version-history/MultiFileDiffView.js +40 -0
  602. package/version-history/MultiFileDiffView.js.map +1 -0
  603. package/version-history/VersionTimeline.d.ts +29 -0
  604. package/version-history/VersionTimeline.d.ts.map +1 -0
  605. package/version-history/VersionTimeline.js +87 -0
  606. package/version-history/VersionTimeline.js.map +1 -0
  607. package/version-history/VersionTimelineEntry.d.ts +22 -0
  608. package/version-history/VersionTimelineEntry.d.ts.map +1 -0
  609. package/version-history/VersionTimelineEntry.js +98 -0
  610. package/version-history/VersionTimelineEntry.js.map +1 -0
  611. package/version-history/computeDiff.d.ts +16 -0
  612. package/version-history/computeDiff.d.ts.map +1 -0
  613. package/version-history/computeDiff.js +54 -0
  614. package/version-history/computeDiff.js.map +1 -0
  615. package/version-history/computeMultiFileDiff.d.ts +15 -0
  616. package/version-history/computeMultiFileDiff.d.ts.map +1 -0
  617. package/version-history/computeMultiFileDiff.js +83 -0
  618. package/version-history/computeMultiFileDiff.js.map +1 -0
  619. package/version-history/index.d.ts +14 -0
  620. package/version-history/index.d.ts.map +1 -0
  621. package/version-history/index.js +9 -0
  622. package/version-history/index.js.map +1 -0
  623. package/version-history/types.d.ts +106 -0
  624. package/version-history/types.d.ts.map +1 -0
  625. package/version-history/types.js +2 -0
  626. package/version-history/types.js.map +1 -0
  627. package/library/ResourceListView.d.ts +0 -174
  628. package/library/ResourceListView.d.ts.map +0 -1
  629. package/library/ResourceListView.js +0 -318
  630. package/library/ResourceListView.js.map +0 -1
  631. package/src/library/ResourceListView.tsx +0 -956
@@ -0,0 +1,88 @@
1
+ import type { ReactNode } from "react";
2
+ /** A single env var declaration entry in a wizard form. */
3
+ export interface EnvVarEntry {
4
+ /** Environment variable name (e.g. GITHUB_TOKEN). */
5
+ readonly key: string;
6
+ /** Human-readable description. */
7
+ readonly description: string;
8
+ /** Whether this variable holds a secret value. */
9
+ readonly isSecret: boolean;
10
+ /** Whether the variable is optional. */
11
+ readonly optional: boolean;
12
+ }
13
+ /** A generic key-value pair entry for wizard forms (e.g. HTTP headers). */
14
+ export interface KeyValueEntry {
15
+ /** The key (e.g. header name). */
16
+ readonly key: string;
17
+ /** The value (e.g. header value). */
18
+ readonly value: string;
19
+ }
20
+ /**
21
+ * Defines a wizard step's metadata and validation logic.
22
+ *
23
+ * Generic over `TData` — the accumulated form state type that flows
24
+ * through all steps. Each step's `validate` function receives the full
25
+ * accumulated state and returns an error message or `null` if valid.
26
+ *
27
+ * @typeParam TData - Shape of the wizard's accumulated form data.
28
+ */
29
+ export interface WizardStepDef<TData> {
30
+ /** Stable step identifier (used as key and for navigation). */
31
+ readonly id: string;
32
+ /** Human-readable step label displayed in the step indicator. */
33
+ readonly label: string;
34
+ /**
35
+ * Validates the current data before allowing navigation to the next step.
36
+ * Returns a descriptive error string if invalid, or `null` if the step
37
+ * passes validation.
38
+ *
39
+ * When omitted, the step is always considered valid.
40
+ */
41
+ readonly validate?: (data: TData) => string | null;
42
+ }
43
+ /** Internal state shape for the wizard reducer. */
44
+ export interface WizardState<TData> {
45
+ /** Zero-based index of the currently active step. */
46
+ readonly currentStepIndex: number;
47
+ /** Accumulated form data across all steps. */
48
+ readonly data: TData;
49
+ /** Validation error for the current step, or `null` when valid. */
50
+ readonly validationError: string | null;
51
+ }
52
+ /**
53
+ * Props for {@link WizardShell} — the resource-agnostic wizard layout.
54
+ *
55
+ * Renders a step indicator, content area, and navigation footer.
56
+ * The content for each step is provided via `children` — the wizard
57
+ * shell does not know about step-specific rendering.
58
+ */
59
+ export interface WizardShellProps {
60
+ /** Step definitions for the progress indicator (only `id` and `label` are used for rendering). */
61
+ readonly steps: readonly {
62
+ readonly id: string;
63
+ readonly label: string;
64
+ }[];
65
+ /** Zero-based index of the currently active step. */
66
+ readonly currentStepIndex: number;
67
+ /** Content to render in the main area (the active step's UI). */
68
+ readonly children: ReactNode;
69
+ /** Label for the final step's action button (e.g. "Create agent"). */
70
+ readonly submitLabel: string;
71
+ /** Whether the submit action is currently in progress. */
72
+ readonly isSubmitting?: boolean;
73
+ /** Whether the "Next" / submit button should be disabled. */
74
+ readonly canGoNext?: boolean;
75
+ /** Whether the "Back" button should be shown. */
76
+ readonly canGoBack?: boolean;
77
+ /** Called when the user clicks "Next" or the submit button. */
78
+ readonly onNext: () => void;
79
+ /** Called when the user clicks "Back". */
80
+ readonly onBack: () => void;
81
+ /** Called when a completed step is clicked in the indicator (backward jump). */
82
+ readonly onGoToStep?: (index: number) => void;
83
+ /** Called when the user cancels the wizard entirely. */
84
+ readonly onCancel?: () => void;
85
+ /** Additional CSS classes for the root container. */
86
+ readonly className?: string;
87
+ }
88
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/resource-creation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,2DAA2D;AAC3D,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,kCAAkC;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,qCAAqC;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAMD;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa,CAAC,KAAK;IAClC,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,MAAM,GAAG,IAAI,CAAC;CACpD;AAMD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appingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/resource-creation/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ import type { ResourceTemplate, TemplateCategory } from "./templates/types";
2
+ /** Options for {@link useTemplateFilter}. */
3
+ export interface UseTemplateFilterOptions<TData> {
4
+ /** The full set of templates to filter. */
5
+ readonly templates: readonly ResourceTemplate<TData>[];
6
+ }
7
+ /** Return value of {@link useTemplateFilter}. */
8
+ export interface UseTemplateFilterReturn<TData> {
9
+ /** Templates matching the current search query and active category. */
10
+ readonly filtered: readonly ResourceTemplate<TData>[];
11
+ /** Current search query string. */
12
+ readonly query: string;
13
+ /** Update the search query. */
14
+ readonly setQuery: (query: string) => void;
15
+ /** Currently active category filter, or `null` for "All". */
16
+ readonly activeCategory: TemplateCategory | null;
17
+ /** Set the active category filter. Pass `null` to show all. */
18
+ readonly setActiveCategory: (category: TemplateCategory | null) => void;
19
+ /** Deduplicated, sorted list of categories present in the template set. */
20
+ readonly availableCategories: readonly TemplateCategory[];
21
+ }
22
+ /**
23
+ * Headless hook for filtering and searching a set of resource templates.
24
+ *
25
+ * Provides category tab state, text search across name/description/tags,
26
+ * and the filtered result set. Fully memoized — only recalculates when
27
+ * inputs change.
28
+ *
29
+ * Platform builders can use this hook with their own rendering; the
30
+ * styled `TemplateGallery` component uses it internally.
31
+ *
32
+ * @typeParam TData - The wizard data shape (e.g. `AgentWizardData`).
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * const { filtered, query, setQuery, activeCategory, setActiveCategory, availableCategories } =
37
+ * useTemplateFilter({ templates: AGENT_TEMPLATES });
38
+ *
39
+ * // Render your own gallery UI using `filtered`
40
+ * ```
41
+ */
42
+ export declare function useTemplateFilter<TData>(options: UseTemplateFilterOptions<TData>): UseTemplateFilterReturn<TData>;
43
+ //# sourceMappingURL=useTemplateFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTemplateFilter.d.ts","sourceRoot":"","sources":["../../src/resource-creation/useTemplateFilter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAM5E,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB,CAAC,KAAK;IAC7C,2CAA2C;IAC3C,QAAQ,CAAC,SAAS,EAAE,SAAS,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;CACxD;AAED,iDAAiD;AACjD,MAAM,WAAW,uBAAuB,CAAC,KAAK;IAC5C,uEAAuE;IACvE,QAAQ,CAAC,QAAQ,EAAE,SAAS,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;IACtD,mCAAmC;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,+BAA+B;IAC/B,QAAQ,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,6DAA6D;IAC7D,QAAQ,CAAC,cAAc,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACjD,+DAA+D;IAC/D,QAAQ,CAAC,iBAAiB,EAAE,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;IACxE,2EAA2E;IAC3E,QAAQ,CAAC,mBAAmB,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAC3D;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EACrC,OAAO,EAAE,wBAAwB,CAAC,KAAK,CAAC,GACvC,uBAAuB,CAAC,KAAK,CAAC,CA2DhC"}
@@ -0,0 +1,73 @@
1
+ "use client";
2
+ import { useCallback, useMemo, useState } from "react";
3
+ // ---------------------------------------------------------------------------
4
+ // Hook
5
+ // ---------------------------------------------------------------------------
6
+ /**
7
+ * Headless hook for filtering and searching a set of resource templates.
8
+ *
9
+ * Provides category tab state, text search across name/description/tags,
10
+ * and the filtered result set. Fully memoized — only recalculates when
11
+ * inputs change.
12
+ *
13
+ * Platform builders can use this hook with their own rendering; the
14
+ * styled `TemplateGallery` component uses it internally.
15
+ *
16
+ * @typeParam TData - The wizard data shape (e.g. `AgentWizardData`).
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * const { filtered, query, setQuery, activeCategory, setActiveCategory, availableCategories } =
21
+ * useTemplateFilter({ templates: AGENT_TEMPLATES });
22
+ *
23
+ * // Render your own gallery UI using `filtered`
24
+ * ```
25
+ */
26
+ export function useTemplateFilter(options) {
27
+ const { templates } = options;
28
+ const [query, setQueryRaw] = useState("");
29
+ const [activeCategory, setActiveCategory] = useState(null);
30
+ const setQuery = useCallback((q) => {
31
+ setQueryRaw(q);
32
+ }, []);
33
+ const availableCategories = useMemo(() => {
34
+ const seen = new Set();
35
+ for (const t of templates) {
36
+ seen.add(t.category);
37
+ }
38
+ const sorted = [...seen].sort();
39
+ return sorted;
40
+ }, [templates]);
41
+ const filtered = useMemo(() => {
42
+ let result = templates;
43
+ if (activeCategory) {
44
+ result = result.filter((t) => t.category === activeCategory);
45
+ }
46
+ const trimmed = query.trim().toLowerCase();
47
+ if (trimmed) {
48
+ result = result.filter((t) => {
49
+ const haystack = [t.name, t.description, ...(t.tags ?? [])]
50
+ .join(" ")
51
+ .toLowerCase();
52
+ return haystack.includes(trimmed);
53
+ });
54
+ }
55
+ return result;
56
+ }, [templates, activeCategory, query]);
57
+ return useMemo(() => ({
58
+ filtered,
59
+ query,
60
+ setQuery,
61
+ activeCategory,
62
+ setActiveCategory,
63
+ availableCategories,
64
+ }), [
65
+ filtered,
66
+ query,
67
+ setQuery,
68
+ activeCategory,
69
+ setActiveCategory,
70
+ availableCategories,
71
+ ]);
72
+ }
73
+ //# sourceMappingURL=useTemplateFilter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTemplateFilter.js","sourceRoot":"","sources":["../../src/resource-creation/useTemplateFilter.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,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Z,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;gBAC3B,MAAM,QAAQ,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;qBACxD,IAAI,CAAC,GAAG,CAAC;qBACT,WAAW,EAAE,CAAC;gBACjB,OAAO,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EAAE,CAAC,SAAS,EAAE,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC;IAEvC,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC;QACL,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,cAAc;QACd,iBAAiB;QACjB,mBAAmB;KACpB,CAAC,EACF;QACE,QAAQ;QACR,KAAK;QACL,QAAQ;QACR,cAAc;QACd,iBAAiB;QACjB,mBAAmB;KACpB,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,67 @@
1
+ import type { WizardStepDef } from "./types";
2
+ /** Options for {@link useWizardState}. */
3
+ export interface UseWizardStateOptions<TData> {
4
+ /** Ordered step definitions — determines wizard length and validation. */
5
+ readonly steps: readonly WizardStepDef<TData>[];
6
+ /** Initial form data (empty/default values for all fields). */
7
+ readonly initialData: TData;
8
+ }
9
+ /** Return value of {@link useWizardState}. */
10
+ export interface UseWizardStateReturn<TData> {
11
+ /** Zero-based index of the current step. */
12
+ readonly currentStepIndex: number;
13
+ /** Definition of the current step. */
14
+ readonly currentStep: WizardStepDef<TData>;
15
+ /** Accumulated form data across all steps. */
16
+ readonly data: TData;
17
+ /** Merges a partial update into the accumulated data. */
18
+ readonly updateData: (partial: Partial<TData>) => void;
19
+ /** Whether navigation forward is allowed (current step is valid). */
20
+ readonly canGoNext: boolean;
21
+ /** Whether navigation backward is possible (not on first step). */
22
+ readonly canGoBack: boolean;
23
+ /** Advance to the next step (validates current step first). */
24
+ readonly goNext: () => void;
25
+ /** Return to the previous step. */
26
+ readonly goBack: () => void;
27
+ /** Jump directly to a specific step (only allows going backward). */
28
+ readonly goToStep: (index: number) => void;
29
+ /** Validation error for the current step, or `null`. */
30
+ readonly validationError: string | null;
31
+ /** `true` when on the first step. */
32
+ readonly isFirstStep: boolean;
33
+ /** `true` when on the last step. */
34
+ readonly isLastStep: boolean;
35
+ }
36
+ /**
37
+ * Headless state machine for multi-step wizard flows.
38
+ *
39
+ * Manages step navigation, per-step validation gating, and accumulated
40
+ * form data. Generic over the data shape — each wizard defines its own
41
+ * `TData` type with fields for all steps.
42
+ *
43
+ * Navigation forward is gated by the current step's `validate` function.
44
+ * Navigation backward is always allowed. Direct step jumps only go backward
45
+ * (prevents skipping required steps).
46
+ *
47
+ * Follows the `useReducer` + discriminated union pattern established
48
+ * by `agentSetupReducer` — pure state transitions, imperative API on top.
49
+ *
50
+ * @typeParam TData - Accumulated form data shape.
51
+ *
52
+ * @example
53
+ * ```tsx
54
+ * const wizard = useWizardState({
55
+ * steps: [
56
+ * { id: "basics", label: "Basics", validate: (d) => d.name ? null : "Name is required" },
57
+ * { id: "review", label: "Review" },
58
+ * ],
59
+ * initialData: { name: "", description: "" },
60
+ * });
61
+ *
62
+ * // wizard.data.name, wizard.updateData({ name: "My Agent" })
63
+ * // wizard.goNext(), wizard.goBack()
64
+ * ```
65
+ */
66
+ export declare function useWizardState<TData>(options: UseWizardStateOptions<TData>): UseWizardStateReturn<TData>;
67
+ //# sourceMappingURL=useWizardState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWizardState.d.ts","sourceRoot":"","sources":["../../src/resource-creation/useWizardState.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,SAAS,CAAC;AAM1D,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB,CAAC,KAAK;IAC1C,0EAA0E;I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{ useCallback, useMemo, useReducer } from "react";
3
+ // ---------------------------------------------------------------------------
4
+ // Reducer
5
+ // ---------------------------------------------------------------------------
6
+ function createReducer(steps) {
7
+ return function wizardReducer(state, action) {
8
+ switch (action.type) {
9
+ case "GO_NEXT": {
10
+ const step = steps[state.currentStepIndex];
11
+ const error = step?.validate?.(state.data) ?? null;
12
+ if (error) {
13
+ return { ...state, validationError: error };
14
+ }
15
+ const nextIndex = Math.min(state.currentStepIndex + 1, steps.length - 1);
16
+ return {
17
+ ...state,
18
+ currentStepIndex: nextIndex,
19
+ validationError: null,
20
+ };
21
+ }
22
+ case "GO_BACK": {
23
+ const prevIndex = Math.max(state.currentStepIndex - 1, 0);
24
+ return {
25
+ ...state,
26
+ currentStepIndex: prevIndex,
27
+ validationError: null,
28
+ };
29
+ }
30
+ case "GO_TO_STEP": {
31
+ if (action.index < 0 || action.index >= steps.length)
32
+ return state;
33
+ if (action.index >= state.currentStepIndex)
34
+ return state;
35
+ return {
36
+ ...state,
37
+ currentStepIndex: action.index,
38
+ validationError: null,
39
+ };
40
+ }
41
+ case "UPDATE_DATA":
42
+ return {
43
+ ...state,
44
+ data: { ...state.data, ...action.partial },
45
+ validationError: null,
46
+ };
47
+ case "SET_VALIDATION_ERROR":
48
+ return { ...state, validationError: action.error };
49
+ default:
50
+ return state;
51
+ }
52
+ };
53
+ }
54
+ // ---------------------------------------------------------------------------
55
+ // Hook
56
+ // ---------------------------------------------------------------------------
57
+ /**
58
+ * Headless state machine for multi-step wizard flows.
59
+ *
60
+ * Manages step navigation, per-step validation gating, and accumulated
61
+ * form data. Generic over the data shape — each wizard defines its own
62
+ * `TData` type with fields for all steps.
63
+ *
64
+ * Navigation forward is gated by the current step's `validate` function.
65
+ * Navigation backward is always allowed. Direct step jumps only go backward
66
+ * (prevents skipping required steps).
67
+ *
68
+ * Follows the `useReducer` + discriminated union pattern established
69
+ * by `agentSetupReducer` — pure state transitions, imperative API on top.
70
+ *
71
+ * @typeParam TData - Accumulated form data shape.
72
+ *
73
+ * @example
74
+ * ```tsx
75
+ * const wizard = useWizardState({
76
+ * steps: [
77
+ * { id: "basics", label: "Basics", validate: (d) => d.name ? null : "Name is required" },
78
+ * { id: "review", label: "Review" },
79
+ * ],
80
+ * initialData: { name: "", description: "" },
81
+ * });
82
+ *
83
+ * // wizard.data.name, wizard.updateData({ name: "My Agent" })
84
+ * // wizard.goNext(), wizard.goBack()
85
+ * ```
86
+ */
87
+ export function useWizardState(options) {
88
+ const { steps, initialData } = options;
89
+ const reducer = useMemo(() => createReducer(steps), [steps]);
90
+ const [state, dispatch] = useReducer(reducer, {
91
+ currentStepIndex: 0,
92
+ data: initialData,
93
+ validationError: null,
94
+ });
95
+ const currentStep = steps[state.currentStepIndex];
96
+ const isFirstStep = state.currentStepIndex === 0;
97
+ const isLastStep = state.currentStepIndex === steps.length - 1;
98
+ const canGoNext = useMemo(() => {
99
+ const error = currentStep.validate?.(state.data) ?? null;
100
+ return error === null;
101
+ }, [currentStep, state.data]);
102
+ const canGoBack = !isFirstStep;
103
+ const goNext = useCallback(() => {
104
+ dispatch({ type: "GO_NEXT" });
105
+ }, []);
106
+ const goBack = useCallback(() => {
107
+ dispatch({ type: "GO_BACK" });
108
+ }, []);
109
+ const goToStep = useCallback((index) => {
110
+ dispatch({ type: "GO_TO_STEP", index });
111
+ }, []);
112
+ const updateData = useCallback((partial) => {
113
+ dispatch({ type: "UPDATE_DATA", partial });
114
+ }, []);
115
+ return useMemo(() => ({
116
+ currentStepIndex: state.currentStepIndex,
117
+ currentStep,
118
+ data: state.data,
119
+ updateData,
120
+ canGoNext,
121
+ canGoBack,
122
+ goNext,
123
+ goBack,
124
+ goToStep,
125
+ validationError: state.validationError,
126
+ isFirstStep,
127
+ isLastStep,
128
+ }), [
129
+ state.currentStepIndex,
130
+ state.data,
131
+ state.validationError,
132
+ currentStep,
133
+ canGoNext,
134
+ canGoBack,
135
+ isFirstStep,
136
+ isLastStep,
137
+ updateData,
138
+ goNext,
139
+ goBack,
140
+ goToStep,
141
+ ]);
142
+ }
143
+ //# sourceMappingURL=useWizardState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWizardState.js","sourceRoot":"","sources":["../../src/resource-creation/useWizardState.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAsDzD,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,SAAS,aAAa,CAAQ,KAAsC;IAClE,OAAO,SAAS,aAAa,CAC3B,KAAyB,EACzB,MAA2B;QAE3B,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,KAAK,SAAS,CAAC,CAAC,CAAC;gBACf,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;gBAC3C,MAAM,KAAK,GAAG,IAAI,EAAE,QAAQ,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;gBACnD,IAAI,KAAK,EAAE,CAAC;oBACV,OAAO,EAAE,GAAG,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;gBAC9C,CAAC;gBACD,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CACxB,KAAK,CAAC,gBAAgB,GAAG,CAAC,EAC1B,KAAK,CAAC,MAAM,GAAG,CAAC,CACjB,CAAC;gBACF,OAAO;oBACL,GAAG,KAAK;oBACR,gBAAgB,EAAE,SAAS;oBAC3B,eAAe,EAAE,IAAI;iBACtB,CAAC;YACJ,CAAC;YAED,KAAK,SAAS,CAAC,CAAC,CAAC;gBACf,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,gBAAgB,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC1D,OAAO;oBACL,GAAG,KAAK;oBACR,gBAAgB,EAAE,SAAS;oBAC3B,eAAe,EAAE,IAAI;iBACtB,CAAC;YACJ,CAAC;YAED,KAA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;QACV,SAAS;QACT,SAAS;QACT,MAAM;QACN,MAAM;QACN,QAAQ;QACR,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,WAAW;QACX,UAAU;KACX,CAAC,EACF;QACE,KAAK,CAAC,gBAAgB;QACtB,KAAK,CAAC,IAAI;QACV,KAAK,CAAC,eAAe;QACrB,WAAW;QACX,SAAS;QACT,SAAS;QACT,WAAW;QACX,UAAU;QACV,UAAU;QACV,MAAM;QACN,MAAM;QACN,QAAQ;KACT,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { ConfirmState } from "./types";
2
+ export interface ConfirmDialogProps {
3
+ /** Pending confirmation state from {@link useConfirmAction}. */
4
+ readonly state: ConfirmState | null;
5
+ /** Accept the pending confirmation. */
6
+ readonly onConfirm: () => void;
7
+ /** Dismiss the pending confirmation. */
8
+ readonly onCancel: () => void;
9
+ }
10
+ /**
11
+ * Accessible confirmation dialog for destructive actions.
12
+ *
13
+ * Uses the native `<dialog>` element with `showModal()` for built-in
14
+ * focus trapping, Escape key handling, and backdrop. Styled via
15
+ * `--stgm-*` design tokens.
16
+ *
17
+ * Pairs with {@link useConfirmAction} which manages the imperative
18
+ * `confirm()` → Promise pattern.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const { confirmState, confirm, handleConfirm, handleCancel } = useConfirmAction();
23
+ *
24
+ * // Trigger
25
+ * const handleDelete = async () => {
26
+ * const ok = await confirm({
27
+ * title: "Delete agent?",
28
+ * description: "This cannot be undone.",
29
+ * confirmLabel: "Delete",
30
+ * variant: "destructive",
31
+ * });
32
+ * if (ok) await deleteAgent();
33
+ * };
34
+ *
35
+ * // Render
36
+ * <ConfirmDialog
37
+ * state={confirmState}
38
+ * onConfirm={handleConfirm}
39
+ * onCancel={handleCancel}
40
+ * />
41
+ * ```
42
+ */
43
+ export declare function ConfirmDialog({ state, onConfirm, onCancel, }: ConfirmDialogProps): import("react/jsx-runtime").JSX.Element | null;
44
+ //# sourceMappingURL=ConfirmDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmDialog.d.ts","sourceRoot":"","sources":["../../src/resource-detail/ConfirmDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,kBAAkB;IACjC,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IACpC,uCAAuC;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC;IAC/B,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,SAAS,EACT,QAAQ,GACT,EAAE,kBAAkB,kDA0EpB"}
@@ -0,0 +1,62 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef } from "react";
4
+ import { cn } from "@stigmer/theme";
5
+ /**
6
+ * Accessible confirmation dialog for destructive actions.
7
+ *
8
+ * Uses the native `<dialog>` element with `showModal()` for built-in
9
+ * focus trapping, Escape key handling, and backdrop. Styled via
10
+ * `--stgm-*` design tokens.
11
+ *
12
+ * Pairs with {@link useConfirmAction} which manages the imperative
13
+ * `confirm()` → Promise pattern.
14
+ *
15
+ * @example
16
+ * ```tsx
17
+ * const { confirmState, confirm, handleConfirm, handleCancel } = useConfirmAction();
18
+ *
19
+ * // Trigger
20
+ * const handleDelete = async () => {
21
+ * const ok = await confirm({
22
+ * title: "Delete agent?",
23
+ * description: "This cannot be undone.",
24
+ * confirmLabel: "Delete",
25
+ * variant: "destructive",
26
+ * });
27
+ * if (ok) await deleteAgent();
28
+ * };
29
+ *
30
+ * // Render
31
+ * <ConfirmDialog
32
+ * state={confirmState}
33
+ * onConfirm={handleConfirm}
34
+ * onCancel={handleCancel}
35
+ * />
36
+ * ```
37
+ */
38
+ export function ConfirmDialog({ state, onConfirm, onCancel, }) {
39
+ const dialogRef = useRef(null);
40
+ useEffect(() => {
41
+ const dialog = dialogRef.current;
42
+ if (!dialog)
43
+ return;
44
+ if (state && !dialog.open) {
45
+ dialog.showModal();
46
+ }
47
+ else if (!state && dialog.open) {
48
+ dialog.close();
49
+ }
50
+ }, [state]);
51
+ const handleDialogCancel = useCallback((e) => {
52
+ e.preventDefault();
53
+ onCancel();
54
+ }, [onCancel]);
55
+ if (!state)
56
+ return null;
57
+ const isDestructive = state.variant === "destructive";
58
+ return (_jsx("dialog", { ref: dialogRef, onCancel: handleDialogCancel, className: cn("fixed inset-0 z-50 m-auto w-full max-w-sm rounded-lg border border-border bg-popover p-0 text-popover-foreground shadow-lg", "backdrop:bg-black/50", "open:animate-in open:fade-in-0 open:zoom-in-95"), children: _jsxs("div", { className: "flex flex-col gap-4 p-6", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx("h3", { className: "text-base font-semibold text-foreground", children: state.title }), _jsx("p", { className: "text-sm text-muted-foreground", children: state.description })] }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx("button", { type: "button", onClick: onCancel, className: cn("rounded-md px-3 py-1.5 text-sm font-medium transition-colors", "border border-input bg-background text-foreground", "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), children: state.cancelLabel ?? "Cancel" }), _jsx("button", { type: "button", onClick: onConfirm, className: cn("rounded-md px-3 py-1.5 text-sm font-medium transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", isDestructive
59
+ ? "bg-destructive text-destructive-foreground hover:bg-destructive-hover"
60
+ : "bg-primary text-primary-foreground hover:bg-primary-hover"), children: state.confirmLabel ?? "Confirm" })] })] }) }));
61
+ }
62
+ //# sourceMappingURL=ConfirmDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmDialog.js","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C,uBAAuB,aACpC,aAAI,SAAS,EAAC,yCAAyC,YACpD,KAAK,CAAC,KAAK,GACT,EACL,YAAG,SAAS,EAAC,+BAA+B,YACzC,KAAK,CAAC,WAAW,GAChB,IACA,EACN,eAAK,SAAS,EAAC,wBAAwB,aACrC,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,EAAE,CACX,8DAA8D,EAC9D,mDAAmD,EACnD,8CAA8C,EAC9C,yEAAyE,CAC1E,YAEA,KAAK,CAAC,WAAW,IAAI,QAAQ,GACvB,EACT,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,SAAS,EAClB,SAAS,EAAE,EAAE,CACX,8DAA8D,EAC9D,yEAAyE,EACzE,aAAa;gCACX,CAAC,CAAC,uEAAuE;gCACzE,CAAC,CAAC,2DAA2D,CAChE,YAEA,KAAK,CAAC,YAAY,IAAI,SAAS,GACzB,IACL,IACF,GACC,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,42 @@
1
+ import type { DetailAction } from "./types";
2
+ export interface ResourceActionBarProps {
3
+ /**
4
+ * Primary action rendered as a visible button.
5
+ * Use for the most common action on this resource (e.g. "Edit").
6
+ */
7
+ readonly primaryAction?: DetailAction;
8
+ /**
9
+ * Secondary and tertiary actions rendered in the overflow (kebab) menu.
10
+ * Actions with the same `group` are visually grouped with separators.
11
+ */
12
+ readonly actions?: readonly DetailAction[];
13
+ /** Additional CSS classes for the root container. */
14
+ readonly className?: string;
15
+ }
16
+ /**
17
+ * Horizontal action bar for resource detail page headers.
18
+ *
19
+ * Renders an optional primary action as a visible button and any
20
+ * remaining actions in a kebab overflow menu (using the SDK's
21
+ * {@link ActionMenu} compound component).
22
+ *
23
+ * When there are no actions at all, renders nothing.
24
+ *
25
+ * @example
26
+ * ```tsx
27
+ * <ResourceActionBar
28
+ * primaryAction={{
29
+ * id: "edit",
30
+ * label: "Edit",
31
+ * icon: <PencilIcon />,
32
+ * onAction: () => router.push(editUrl),
33
+ * }}
34
+ * actions={[
35
+ * { id: "copy-id", label: "Copy ID", onAction: () => copyId(id) },
36
+ * { id: "delete", label: "Delete", variant: "destructive", onAction: handleDelete },
37
+ * ]}
38
+ * />
39
+ * ```
40
+ */
41
+ export declare function ResourceActionBar({ primaryAction, actions, className, }: ResourceActionBarProps): import("react/jsx-runtime").JSX.Element | null;
42
+ //# sourceMappingURL=ResourceActionBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResourceActionBar.d.ts","sourceRoot":"","sources":["../../src/resource-detail/ResourceActionBar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC;IACtC;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAC3C,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,aAAa,EACb,OAAO,EACP,SAAS,GACV,EAAE,sBAAsB,kDAyBxB"}