@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 @@
1
+ {"version":3,"file":"InlineEditSelect.js","sourceRoot":"","sources":["../../src/inline-edit/InlineEditSelect.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAapC;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,KAAK,EACL,OAA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"./types";
2
+ /** Props for {@link InlineEditText}. */
3
+ export interface InlineEditTextProps extends InlineEditBaseProps {
4
+ /** Current field value. */
5
+ readonly value: string;
6
+ /** Called with the new value when the user confirms the edit. */
7
+ readonly onSave: (newValue: string) => Promise<boolean>;
8
+ /** Placeholder shown when value is empty (in both read and edit mode). */
9
+ readonly placeholder?: string;
10
+ /** Optional client-side validation. Return an error string to block save. */
11
+ readonly validate?: (value: string) => string | null;
12
+ /** Render as heading text (larger, bolder). */
13
+ readonly variant?: "default" | "heading";
14
+ }
15
+ /**
16
+ * Click-to-edit single-line text field.
17
+ *
18
+ * Displays the value as styled text. On click, transitions to an input
19
+ * with inline confirm/cancel controls. Confirm triggers `onSave`;
20
+ * cancel reverts. Escape key also cancels.
21
+ */
22
+ export declare function InlineEditText({ value, onSave, placeholder, validate, variant, disabled, isSaving, error, className, }: InlineEditTextProps): import("react/jsx-runtime").JSX.Element;
23
+ //# sourceMappingURL=InlineEditText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineEditText.d.ts","sourceRoot":"","sources":["../../src/inline-edit/InlineEditText.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,wCAAwC;AACxC,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,2BAA2B;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iEAAiE;IACjE,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,0EAA0E;IAC1E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACrD,+CAA+C;IAC/C,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAC1C;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,MAAM,EACN,WAA6B,EAC7B,QAAQ,EACR,OAAmB,EACnB,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,GACV,EAAE,mBAAmB,2CAyIrB"}
@@ -0,0 +1,79 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef, useState } from "react";
4
+ import { cn } from "@stigmer/theme";
5
+ /**
6
+ * Click-to-edit single-line text field.
7
+ *
8
+ * Displays the value as styled text. On click, transitions to an input
9
+ * with inline confirm/cancel controls. Confirm triggers `onSave`;
10
+ * cancel reverts. Escape key also cancels.
11
+ */
12
+ export function InlineEditText({ value, onSave, placeholder = "Click to edit", validate, variant = "default", disabled, isSaving, error, className, }) {
13
+ const [isEditing, setIsEditing] = useState(false);
14
+ const [draft, setDraft] = useState(value);
15
+ const [localError, setLocalError] = useState(null);
16
+ const inputRef = useRef(null);
17
+ useEffect(() => {
18
+ if (isEditing) {
19
+ setDraft(value);
20
+ setLocalError(null);
21
+ requestAnimationFrame(() => inputRef.current?.focus());
22
+ }
23
+ }, [isEditing, value]);
24
+ const handleConfirm = useCallback(async () => {
25
+ const trimmed = draft.trim();
26
+ if (trimmed === value) {
27
+ setIsEditing(false);
28
+ return;
29
+ }
30
+ if (validate) {
31
+ const err = validate(trimmed);
32
+ if (err) {
33
+ setLocalError(err);
34
+ return;
35
+ }
36
+ }
37
+ const ok = await onSave(trimmed);
38
+ if (ok)
39
+ setIsEditing(false);
40
+ }, [draft, value, validate, onSave]);
41
+ const handleCancel = useCallback(() => {
42
+ setIsEditing(false);
43
+ setDraft(value);
44
+ setLocalError(null);
45
+ }, [value]);
46
+ const handleKeyDown = useCallback((e) => {
47
+ if (e.key === "Enter") {
48
+ e.preventDefault();
49
+ handleConfirm();
50
+ }
51
+ else if (e.key === "Escape") {
52
+ handleCancel();
53
+ }
54
+ }, [handleConfirm, handleCancel]);
55
+ const displayError = localError || error;
56
+ if (disabled || !isEditing) {
57
+ return (_jsx("div", { className: cn("group/inline-edit", className), children: _jsxs("button", { type: "button", onClick: () => { if (!disabled)
58
+ setIsEditing(true); }, disabled: disabled, className: cn("inline-flex w-full items-center gap-1.5 rounded-md px-1.5 py-0.5 text-left transition-colors", !disabled && "hover:bg-accent-hover cursor-pointer", disabled && "cursor-default", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"), children: [_jsx("span", { className: cn("min-w-0 truncate", variant === "heading"
59
+ ? "text-lg font-semibold text-foreground"
60
+ : "text-sm text-foreground", !value && "text-muted-foreground italic"), children: value || placeholder }), !disabled && (_jsx(PencilIcon, { className: "size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/inline-edit:opacity-100" }))] }) }));
61
+ }
62
+ return (_jsxs("div", { className: cn("flex flex-col gap-1", className), children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("input", { ref: inputRef, type: "text", value: draft, onChange: (e) => { setDraft(e.target.value); setLocalError(null); }, onKeyDown: handleKeyDown, disabled: isSaving, placeholder: placeholder, className: cn("flex-1 rounded-md border border-border bg-input-bg px-2 py-1 text-sm text-foreground", "focus:outline-none focus:ring-2 focus:ring-ring", "disabled:opacity-50", variant === "heading" && "text-lg font-semibold", displayError && "border-destructive") }), _jsx("button", { type: "button", onClick: handleConfirm, disabled: isSaving, "aria-label": "Save", className: cn("inline-flex size-7 items-center justify-center rounded-md", "bg-primary text-primary-foreground hover:bg-primary-hover", "disabled:opacity-50", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), children: isSaving ? _jsx(Spinner, {}) : _jsx(CheckIcon, { className: "size-3.5" }) }), _jsx("button", { type: "button", onClick: handleCancel, disabled: isSaving, "aria-label": "Cancel", className: cn("inline-flex size-7 items-center justify-center rounded-md", "border border-border bg-background text-foreground hover:bg-accent hover:text-accent-foreground", "disabled:opacity-50", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), children: _jsx(XIcon, { className: "size-3.5" }) })] }), displayError && (_jsx("p", { className: "px-1 text-xs text-destructive", role: "alert", children: displayError }))] }));
63
+ }
64
+ // ---------------------------------------------------------------------------
65
+ // Icons
66
+ // ---------------------------------------------------------------------------
67
+ function PencilIcon({ className }) {
68
+ return (_jsx("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "M11.5 1.5a2.121 2.121 0 0 1 3 3L5 14l-4 1 1-4Z" }) }));
69
+ }
70
+ function CheckIcon({ className }) {
71
+ return (_jsx("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m3 8.5 3.5 3.5 6.5-8" }) }));
72
+ }
73
+ function XIcon({ className }) {
74
+ return (_jsx("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "m4 4 8 8M12 4l-8 8" }) }));
75
+ }
76
+ function Spinner() {
77
+ return (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", className: "animate-spin", "aria-hidden": "true", children: _jsx("path", { d: "M8 2a6 6 0 1 0 6 6" }) }));
78
+ }
79
+ //# sourceMappingURL=InlineEditText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineEditText.js","sourceRoot":"","sources":["../../src/inline-edit/InlineEditText.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE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KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAC,cAAc,iBAAa,MAAM,YACjK,eAAM,CAAC,EAAC,oBAAoB,GAAG,GAC3B,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { InlineEditBaseProps } from "./types";
2
+ /** Props for {@link InlineEditTextarea}. */
3
+ export interface InlineEditTextareaProps extends InlineEditBaseProps {
4
+ /** Current field value. */
5
+ readonly value: string;
6
+ /** Called with the new value when the user confirms. */
7
+ readonly onSave: (newValue: string) => Promise<boolean>;
8
+ /** Placeholder shown when value is empty. */
9
+ readonly placeholder?: string;
10
+ /** Optional client-side validation. */
11
+ readonly validate?: (value: string) => string | null;
12
+ /** Minimum rows for the textarea. @default 3 */
13
+ readonly minRows?: number;
14
+ }
15
+ /**
16
+ * Click-to-edit multiline text field.
17
+ *
18
+ * In read mode, renders the value as preformatted text with expand/collapse.
19
+ * On click, opens a textarea with confirm/cancel. Ctrl+Enter confirms.
20
+ */
21
+ export declare function InlineEditTextarea({ value, onSave, placeholder, validate, minRows, disabled, isSaving, error, className, }: InlineEditTextareaProps): import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=InlineEditTextarea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineEditTextarea.d.ts","sourceRoot":"","sources":["../../src/inline-edit/InlineEditTextarea.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,4CAA4C;AAC5C,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAClE,2BAA2B;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,6CAA6C;IAC7C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACrD,gDAAgD;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,MAAM,EACN,WAA6B,EAC7B,QAAQ,EACR,OAAW,EACX,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,GACV,EAAE,uBAAuB,2CAwJzB"}
@@ -0,0 +1,83 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useRef, useState } from "react";
4
+ import { cn } from "@stigmer/theme";
5
+ /**
6
+ * Click-to-edit multiline text field.
7
+ *
8
+ * In read mode, renders the value as preformatted text with expand/collapse.
9
+ * On click, opens a textarea with confirm/cancel. Ctrl+Enter confirms.
10
+ */
11
+ export function InlineEditTextarea({ value, onSave, placeholder = "Click to edit", validate, minRows = 3, disabled, isSaving, error, className, }) {
12
+ const [isEditing, setIsEditing] = useState(false);
13
+ const [draft, setDraft] = useState(value);
14
+ const [localError, setLocalError] = useState(null);
15
+ const textareaRef = useRef(null);
16
+ useEffect(() => {
17
+ if (isEditing) {
18
+ setDraft(value);
19
+ setLocalError(null);
20
+ requestAnimationFrame(() => {
21
+ const ta = textareaRef.current;
22
+ if (ta) {
23
+ ta.focus();
24
+ ta.selectionStart = ta.value.length;
25
+ }
26
+ });
27
+ }
28
+ }, [isEditing, value]);
29
+ // Auto-resize textarea
30
+ useEffect(() => {
31
+ const ta = textareaRef.current;
32
+ if (!ta)
33
+ return;
34
+ ta.style.height = "auto";
35
+ ta.style.height = `${ta.scrollHeight}px`;
36
+ }, [draft, isEditing]);
37
+ const handleConfirm = useCallback(async () => {
38
+ if (draft === value) {
39
+ setIsEditing(false);
40
+ return;
41
+ }
42
+ if (validate) {
43
+ const err = validate(draft);
44
+ if (err) {
45
+ setLocalError(err);
46
+ return;
47
+ }
48
+ }
49
+ const ok = await onSave(draft);
50
+ if (ok)
51
+ setIsEditing(false);
52
+ }, [draft, value, validate, onSave]);
53
+ const handleCancel = useCallback(() => {
54
+ setIsEditing(false);
55
+ setDraft(value);
56
+ setLocalError(null);
57
+ }, [value]);
58
+ const handleKeyDown = useCallback((e) => {
59
+ if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
60
+ e.preventDefault();
61
+ handleConfirm();
62
+ }
63
+ else if (e.key === "Escape") {
64
+ handleCancel();
65
+ }
66
+ }, [handleConfirm, handleCancel]);
67
+ const displayError = localError || error;
68
+ if (disabled || !isEditing) {
69
+ return (_jsx("div", { className: cn("group/inline-edit", className), children: _jsx("button", { type: "button", onClick: () => { if (!disabled)
70
+ setIsEditing(true); }, disabled: disabled, className: cn("w-full rounded-md px-2 py-1.5 text-left transition-colors", !disabled && "hover:bg-accent-hover cursor-pointer", disabled && "cursor-default", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"), children: _jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsx("pre", { className: cn("min-w-0 whitespace-pre-wrap break-words font-mono text-sm text-foreground", !value && "text-muted-foreground italic font-sans"), children: value || placeholder }), !disabled && (_jsx(PencilIcon, { className: "mt-0.5 size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/inline-edit:opacity-100" }))] }) }) }));
71
+ }
72
+ return (_jsxs("div", { className: cn("flex flex-col gap-1.5", className), children: [_jsx("textarea", { ref: textareaRef, value: draft, onChange: (e) => { setDraft(e.target.value); setLocalError(null); }, onKeyDown: handleKeyDown, disabled: isSaving, placeholder: placeholder, rows: minRows, className: cn("w-full resize-y rounded-md border border-border bg-input-bg px-3 py-2 font-mono text-sm text-foreground", "focus:outline-none focus:ring-2 focus:ring-ring", "disabled:opacity-50", displayError && "border-destructive") }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-[10px] text-muted-foreground", children: isSaving ? "Saving..." : "Ctrl+Enter to save, Escape to cancel" }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("button", { type: "button", onClick: handleCancel, disabled: isSaving, className: cn("rounded-md px-2.5 py-1 text-xs font-medium", "border border-border bg-background text-foreground hover:bg-accent hover:text-accent-foreground", "disabled:opacity-50", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), children: "Cancel" }), _jsxs("button", { type: "button", onClick: handleConfirm, disabled: isSaving, className: cn("inline-flex items-center gap-1 rounded-md px-2.5 py-1 text-xs font-medium", "bg-primary text-primary-foreground hover:bg-primary-hover", "disabled:opacity-50", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), children: [isSaving && _jsx(Spinner, {}), "Save"] })] })] }), displayError && (_jsx("p", { className: "px-1 text-xs text-destructive", role: "alert", children: displayError }))] }));
73
+ }
74
+ // ---------------------------------------------------------------------------
75
+ // Icons
76
+ // ---------------------------------------------------------------------------
77
+ function PencilIcon({ className }) {
78
+ return (_jsx("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "M11.5 1.5a2.121 2.121 0 0 1 3 3L5 14l-4 1 1-4Z" }) }));
79
+ }
80
+ function Spinner() {
81
+ return (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", className: "animate-spin", "aria-hidden": "true", children: _jsx("path", { d: "M8 2a6 6 0 1 0 6 6" }) }));
82
+ }
83
+ //# sourceMappingURL=InlineEditTextarea.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineEditTextarea.js","sourceRoot":"","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C,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAC,cAAc,iBAAa,MAAM,YACjK,eAAM,CAAC,EAAC,oBAAoB,GAAG,GAC3B,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ export { InlineEditText } from "./InlineEditText";
2
+ export type { InlineEditTextProps } from "./InlineEditText";
3
+ export { InlineEditTextarea } from "./InlineEditTextarea";
4
+ export type { InlineEditTextareaProps } from "./InlineEditTextarea";
5
+ export { InlineEditImage } from "./InlineEditImage";
6
+ export type { InlineEditImageProps } from "./InlineEditImage";
7
+ export { InlineEditSelect } from "./InlineEditSelect";
8
+ export type { InlineEditSelectProps } from "./InlineEditSelect";
9
+ export { InlineEditKeyValue } from "./InlineEditKeyValue";
10
+ export type { InlineEditKeyValueProps } from "./InlineEditKeyValue";
11
+ export { InlineEditResourceList } from "./InlineEditResourceList";
12
+ export type { InlineEditResourceListProps } from "./InlineEditResourceList";
13
+ export { useInlineFieldSave } from "./useInlineFieldSave";
14
+ export type { UseInlineFieldSaveReturn } from "./useInlineFieldSave";
15
+ export type { InlineEditBaseProps, KeyValueRow, ResourceRefRow, SelectOption, InlineFieldSaveResult, } from "./types";
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/inline-edit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,YAAY,EACV,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ export { InlineEditText } from "./InlineEditText";
2
+ export { InlineEditTextarea } from "./InlineEditTextarea";
3
+ export { InlineEditImage } from "./InlineEditImage";
4
+ export { InlineEditSelect } from "./InlineEditSelect";
5
+ export { InlineEditKeyValue } from "./InlineEditKeyValue";
6
+ export { InlineEditResourceList } from "./InlineEditResourceList";
7
+ export { useInlineFieldSave } from "./useInlineFieldSave";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/inline-edit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,42 @@
1
+ /** Shared props for all inline edit components. */
2
+ export interface InlineEditBaseProps {
3
+ /** Whether editing is disabled (component renders as read-only). */
4
+ readonly disabled?: boolean;
5
+ /** `true` while a save operation is in flight. */
6
+ readonly isSaving?: boolean;
7
+ /** Error from the last failed save. Shown inline below the field. */
8
+ readonly error?: string | null;
9
+ /** Additional CSS classes for the root container. */
10
+ readonly className?: string;
11
+ }
12
+ /** Entry in an inline key-value editor. */
13
+ export interface KeyValueRow {
14
+ readonly key: string;
15
+ readonly value: string;
16
+ /** When `true`, renders a "secret" badge. */
17
+ readonly isSecret?: boolean;
18
+ /** Optional description shown as helper text. */
19
+ readonly description?: string;
20
+ /** When `true`, this row is optional. */
21
+ readonly optional?: boolean;
22
+ }
23
+ /** Entry in an inline resource reference list (MCP servers, skills, etc.). */
24
+ export interface ResourceRefRow {
25
+ readonly org: string;
26
+ readonly slug: string;
27
+ /** Display label (defaults to slug when omitted). */
28
+ readonly label?: string;
29
+ }
30
+ /** Single option for InlineEditSelect. */
31
+ export interface SelectOption {
32
+ readonly value: string;
33
+ readonly label: string;
34
+ readonly description?: string;
35
+ }
36
+ /** Save result returned to the inline component after a field save. */
37
+ export interface InlineFieldSaveResult<T = unknown> {
38
+ readonly success: boolean;
39
+ readonly data?: T;
40
+ readonly error?: string;
41
+ }
42
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/inline-edit/types.ts"],"names":[],"mappings":"AAEA,mDAAmD;AACnD,MAAM,WAAW,mBAAmB;IAClC,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,kDAAkD;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,qEAAqE;IACrE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,2CAA2C;AAC3C,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,yCAAyC;IACzC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,0CAA0C;AAC1C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,uEAAuE;AACvE,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,OAAO;IAChD,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/inline-edit/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ /** Return value of {@link useInlineFieldSave}. */
2
+ export interface UseInlineFieldSaveReturn<TResource, TValue> {
3
+ /** Trigger a save. Resolves `true` on success, `false` on failure. */
4
+ readonly save: (newValue: TValue) => Promise<boolean>;
5
+ /** `true` while the save RPC is in flight. */
6
+ readonly isSaving: boolean;
7
+ /** Error from the most recent failed save. */
8
+ readonly error: string | null;
9
+ /** Clear the error state. */
10
+ readonly clearError: () => void;
11
+ }
12
+ /**
13
+ * Generic hook that saves a single field on a resource.
14
+ *
15
+ * The `saveFn` receives the current resource and the new field value,
16
+ * reconstructs the full input, and calls the update API. On success
17
+ * the resource state is refreshed; on failure the error is captured.
18
+ *
19
+ * @param currentResource - Ref to the latest fetched resource (read on each save).
20
+ * @param saveFn - Async function that performs the update and returns the new resource.
21
+ */
22
+ export declare function useInlineFieldSave<TResource, TValue>(currentResource: TResource | null | undefined, saveFn: (resource: TResource, newValue: TValue) => Promise<TResource>): UseInlineFieldSaveReturn<TResource, TValue>;
23
+ //# sourceMappingURL=useInlineFieldSave.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInlineFieldSave.d.ts","sourceRoot":"","sources":["../../src/inline-edit/useInlineFieldSave.ts"],"names":[],"mappings":"AAKA,kDAAkD;AAClD,MAAM,WAAW,wBAAwB,CAAC,SAAS,EAAE,MAAM;IACzD,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACtD,8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,6BAA6B;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAClD,eAAe,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,EAC7C,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,GACpE,wBAAwB,CAAC,SAAS,EAAE,MAAM,CAAC,CA+B7C"}
@@ -0,0 +1,44 @@
1
+ "use client";
2
+ import { useCallback, useRef, useState } from "react";
3
+ import { toError } from "../internal/toError";
4
+ /**
5
+ * Generic hook that saves a single field on a resource.
6
+ *
7
+ * The `saveFn` receives the current resource and the new field value,
8
+ * reconstructs the full input, and calls the update API. On success
9
+ * the resource state is refreshed; on failure the error is captured.
10
+ *
11
+ * @param currentResource - Ref to the latest fetched resource (read on each save).
12
+ * @param saveFn - Async function that performs the update and returns the new resource.
13
+ */
14
+ export function useInlineFieldSave(currentResource, saveFn) {
15
+ const [isSaving, setIsSaving] = useState(false);
16
+ const [error, setError] = useState(null);
17
+ const inflight = useRef(0);
18
+ const clearError = useCallback(() => setError(null), []);
19
+ const save = useCallback(async (newValue) => {
20
+ if (!currentResource)
21
+ return false;
22
+ const callId = ++inflight.current;
23
+ setIsSaving(true);
24
+ setError(null);
25
+ try {
26
+ await saveFn(currentResource, newValue);
27
+ if (inflight.current !== callId)
28
+ return false;
29
+ return true;
30
+ }
31
+ catch (err) {
32
+ if (inflight.current !== callId)
33
+ return false;
34
+ setError(toError(err).message);
35
+ return false;
36
+ }
37
+ finally {
38
+ if (inflight.current === callId)
39
+ setIsSaving(false);
40
+ }
41
+ }, [currentResource, saveFn]);
42
+ return { save, isSaving, error, clearError };
43
+ }
44
+ //# sourceMappingURL=useInlineFieldSave.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInlineFieldSave.js","sourceRoot":"","sources":["../../src/inline-edit/useInlineFieldSave.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAc9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,EAAE,UAAU,EAAE,CAAC;AAC/C,CAAC"}
@@ -1,41 +1,7 @@
1
- import { type ReactNode } from "react";
2
- export interface TabItem {
3
- /** Unique identifier for the tab, used as the `activeTab` value. */
4
- readonly id: string;
5
- /** Display label shown in the tab trigger. */
6
- readonly label: string;
7
- /** Optional numeric badge rendered next to the label (e.g. item count). */
8
- readonly badge?: number;
9
- }
10
- export interface TabsProps {
11
- /** Ordered list of tabs to render. Tabs with no matching content are still clickable. */
12
- readonly tabs: readonly TabItem[];
13
- /** The `id` of the currently active tab. */
14
- readonly activeTab: string;
15
- /** Called when the user selects a different tab. */
16
- readonly onTabChange: (tabId: string) => void;
17
- /**
18
- * Content to render in the active tab panel.
19
- * Typically a switch/map over `activeTab`.
20
- */
21
- readonly children: ReactNode;
22
- /** Accessible label for the tab list (e.g. "Capability sections"). */
23
- readonly "aria-label"?: string;
24
- /** Additional CSS classes for the root container. */
25
- readonly className?: string;
26
- }
27
1
  /**
28
- * Accessible tabbed panel with badge support.
29
- *
30
- * Implements the WAI-ARIA Tabs pattern:
31
- * - `role="tablist"` / `role="tab"` / `role="tabpanel"`
32
- * - Arrow-key navigation (Left/Right), Home/End to jump
33
- * - `aria-selected`, `aria-controls`, `aria-labelledby` wiring
34
- *
35
- * All visual properties flow through `--stgm-*` design tokens.
36
- * No external dependencies — safe for platform builder embedding.
37
- *
38
- * @internal — not yet part of the public `@stigmer/react` API.
2
+ * @deprecated Import from `../tabs` instead. This re-export exists only
3
+ * to avoid breaking internal consumers during migration.
39
4
  */
40
- export declare function Tabs({ tabs, activeTab, onTabChange, children, "aria-label": ariaLabel, className, }: TabsProps): import("react/jsx-runtime").JSX.Element;
5
+ export { Tabs } from "../tabs/Tabs";
6
+ export type { TabsProps, TabItem } from "../tabs/Tabs";
41
7
  //# sourceMappingURL=Tabs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/internal/Tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvF,MAAM,WAAW,OAAO;IACtB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,SAAS;IACxB,yFAAyF;IACzF,QAAQ,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;IAClC,4CAA4C;IAC5C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,oDAAoD;IACpD,QAAQ,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C;;;OAGG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,sEAAsE;IACtE,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,SAAS,GACV,EAAE,SAAS,2CAiHX"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/internal/Tabs.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
package/internal/Tabs.js CHANGED
@@ -1,65 +1,6 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useCallback, useId, useRef } from "react";
4
- import { cn } from "@stigmer/theme";
5
1
  /**
6
- * Accessible tabbed panel with badge support.
7
- *
8
- * Implements the WAI-ARIA Tabs pattern:
9
- * - `role="tablist"` / `role="tab"` / `role="tabpanel"`
10
- * - Arrow-key navigation (Left/Right), Home/End to jump
11
- * - `aria-selected`, `aria-controls`, `aria-labelledby` wiring
12
- *
13
- * All visual properties flow through `--stgm-*` design tokens.
14
- * No external dependencies — safe for platform builder embedding.
15
- *
16
- * @internal — not yet part of the public `@stigmer/react` API.
2
+ * @deprecated Import from `../tabs` instead. This re-export exists only
3
+ * to avoid breaking internal consumers during migration.
17
4
  */
18
- export function Tabs({ tabs, activeTab, onTabChange, children, "aria-label": ariaLabel, className, }) {
19
- const instanceId = useId();
20
- const tabRefsMap = useRef(new Map());
21
- const tabId = (id) => `${instanceId}-tab-${id}`;
22
- const panelId = (id) => `${instanceId}-panel-${id}`;
23
- const focusTab = useCallback((id) => {
24
- tabRefsMap.current.get(id)?.focus();
25
- onTabChange(id);
26
- }, [onTabChange]);
27
- const handleKeyDown = useCallback((e) => {
28
- const currentIndex = tabs.findIndex((t) => t.id === activeTab);
29
- if (currentIndex === -1)
30
- return;
31
- let nextIndex = null;
32
- switch (e.key) {
33
- case "ArrowRight":
34
- nextIndex = (currentIndex + 1) % tabs.length;
35
- break;
36
- case "ArrowLeft":
37
- nextIndex = (currentIndex - 1 + tabs.length) % tabs.length;
38
- break;
39
- case "Home":
40
- nextIndex = 0;
41
- break;
42
- case "End":
43
- nextIndex = tabs.length - 1;
44
- break;
45
- default:
46
- return;
47
- }
48
- e.preventDefault();
49
- focusTab(tabs[nextIndex].id);
50
- }, [tabs, activeTab, focusTab]);
51
- return (_jsxs("div", { className: cn("flex flex-col", className), children: [_jsx("div", { role: "tablist", "aria-label": ariaLabel, onKeyDown: handleKeyDown, className: "flex border-b border-border", children: tabs.map((tab) => {
52
- const isActive = tab.id === activeTab;
53
- return (_jsxs("button", { ref: (el) => {
54
- if (el)
55
- tabRefsMap.current.set(tab.id, el);
56
- else
57
- tabRefsMap.current.delete(tab.id);
58
- }, id: tabId(tab.id), role: "tab", type: "button", "aria-selected": isActive, "aria-controls": panelId(tab.id), tabIndex: isActive ? 0 : -1, onClick: () => onTabChange(tab.id), "data-cursor-target": `tab-${tab.id}`, className: cn("relative inline-flex items-center gap-1.5 px-3 py-2 text-xs font-medium transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1", isActive
59
- ? "text-foreground"
60
- : "text-muted-foreground hover:text-foreground"), children: [tab.label, tab.badge != null && tab.badge > 0 && (_jsx("span", { className: cn("inline-flex min-w-[1.25rem] items-center justify-center rounded-full px-1 py-px text-[10px] font-medium leading-none", isActive
61
- ? "bg-primary-subtle text-primary"
62
- : "bg-muted text-muted-foreground"), children: tab.badge })), isActive && (_jsx("span", { className: "absolute inset-x-0 -bottom-px h-0.5 bg-primary", "aria-hidden": "true" }))] }, tab.id));
63
- }) }), _jsx("div", { id: panelId(activeTab), role: "tabpanel", "aria-labelledby": tabId(activeTab), tabIndex: 0, className: "focus-visible:outline-none", children: children })] }));
64
- }
5
+ export { Tabs } from "../tabs/Tabs";
65
6
  //# sourceMappingURL=Tabs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../src/internal/Tabs.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAsC,MAAM,OAAO,CAAC;AACvF,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AA6BpC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,IAAI,CAAC,EACnB,IAAI,EACJ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,SAAS,GACC;IACV,MAAM,UAAU,GAAG,KAAK,EAAE,CAAC;IAC3B,MAAM,UAAU,GAAG,MAAM,CAAiC,IAAI,GAAG,EAAE,CAAC,CAAC;IAErE,MAAM,KAAK,GAAG,CAAC,EAAU,EAAE,EAAE,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AC,CAAC,gCAAgC,CACrC,YAEA,GAAG,CAAC,KAAK,GACL,CACR,EACA,QAAQ,IAAI,CACX,eACE,SAAS,EAAC,gDAAgD,iBAC9C,MAAM,GAClB,CACH,KAvCI,GAAG,CAAC,EAAE,CAwCJ,CACV,CAAC;gBACJ,CAAC,CAAC,GACE,EAEN,cACE,EAAE,EAAE,OAAO,CAAC,SAAS,CAAC,EACtB,IAAI,EAAC,UAAU,qBACE,KAAK,CAAC,SAAS,CAAC,EACjC,QAAQ,EAAE,CAAC,EACX,SAAS,EAAC,4BAA4B,YAErC,QAAQ,GACL,IACF,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../src/internal/Tabs.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { ApplyResourceResult } from "./useApplyResource";
2
+ /** Props for {@link ImportResourceDialog}. */
3
+ export interface ImportResourceDialogProps {
4
+ /** Whether the dialog is open. */
5
+ readonly open: boolean;
6
+ /** Called when the dialog should open or close. */
7
+ readonly onOpenChange: (open: boolean) => void;
8
+ /** Target organization slug to apply the imported resource to. */
9
+ readonly org: string;
10
+ /** Called after a successful import. Use for navigation or list refresh. */
11
+ readonly onSuccess?: (result: ApplyResourceResult) => void;
12
+ }
13
+ /**
14
+ * Modal dialog for importing a Stigmer resource from a YAML or JSON file.
15
+ *
16
+ * Workflow:
17
+ * 1. User selects a `.yaml`, `.yml`, or `.json` file via the file picker
18
+ * 2. The file is validated and a preview card shows the detected resource
19
+ * 3. User confirms the import, which calls `apply()` on the target org
20
+ * 4. On success: toast notification and `onSuccess` callback
21
+ * 5. On error: inline error message with guidance
22
+ *
23
+ * Uses the native `<dialog>` element for built-in focus trapping, Escape
24
+ * key handling, and backdrop — consistent with {@link ConfirmDialog}.
25
+ *
26
+ * Zero Console dependencies — safe for platform builder embedding.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * const [open, setOpen] = useState(false);
31
+ *
32
+ * <ImportResourceDialog
33
+ * open={open}
34
+ * onOpenChange={setOpen}
35
+ * org={activeOrg}
36
+ * onSuccess={(result) => {
37
+ * router.push(`/library/${result.kind === "Agent" ? "agents" : "mcp-servers"}`);
38
+ * }}
39
+ * />
40
+ * ```
41
+ */
42
+ export declare function ImportResourceDialog({ open, onOpenChange, org, onSuccess, }: ImportResourceDialogProps): import("react/jsx-runtime").JSX.Element;
43
+ //# sourceMappingURL=ImportResourceDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportResourceDialog.d.ts","sourceRoot":"","sources":["../../src/library/ImportResourceDialog.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAM9D,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,kEAAkE;IAClE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;CAC5D;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,SAAS,GACV,EAAE,yBAAyB,2CAoK3B"}