@jini-ai/admin 0.7.2 → 0.7.3-next.1

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 (585) hide show
  1. package/CHANGELOG.md +4 -6
  2. package/dist/agent-plugins/agent-plugins.module.d.ts +1 -1
  3. package/dist/agent-plugins/agent-plugins.module.js +1 -1
  4. package/dist/agent-plugins/controllers/agent-plugin-files.controller.d.ts +3 -3
  5. package/dist/agent-plugins/controllers/agent-plugin-files.controller.js +1 -1
  6. package/dist/agent-plugins/controllers/agent-plugins.controller.d.ts +3 -3
  7. package/dist/agent-plugins/controllers/agent-plugins.controller.js +30 -27
  8. package/dist/agent-plugins/index.d.ts +11 -8
  9. package/dist/agent-plugins/index.js +7 -8
  10. package/dist/agent-plugins/models.d.ts +19 -11
  11. package/dist/agent-plugins/ports.d.ts +1 -1
  12. package/dist/agent-plugins/ports.js +1 -1
  13. package/dist/agent-plugins/react/components/AgentPluginFileContent.d.ts +4 -2
  14. package/dist/agent-plugins/react/components/AgentPluginFileContent.js +3 -3
  15. package/dist/agent-plugins/react/components/AgentPluginFileTree.d.ts +4 -2
  16. package/dist/agent-plugins/react/components/AgentPluginFileTree.js +2 -2
  17. package/dist/agent-plugins/react/components/AgentPluginInspector.d.ts +4 -2
  18. package/dist/agent-plugins/react/components/AgentPluginInspector.js +3 -3
  19. package/dist/agent-plugins/react/components/AgentPluginListPanel.d.ts +5 -3
  20. package/dist/agent-plugins/react/components/AgentPluginListPanel.js +3 -3
  21. package/dist/agent-plugins/react/components/AgentPluginRow.d.ts +3 -1
  22. package/dist/agent-plugins/react/components/AgentPluginRow.js +3 -3
  23. package/dist/agent-plugins/react/hooks/AgentPluginInspector.hooks.js +2 -2
  24. package/dist/agent-plugins/react/hooks/AgentPluginPanel.hooks.d.ts +6 -5
  25. package/dist/agent-plugins/react/hooks/AgentPluginRow.hooks.d.ts +5 -4
  26. package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.d.ts +11 -7
  27. package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.js +3 -3
  28. package/dist/agent-plugins/react/hooks/AgentPluginsPorts.hooks.d.ts +5 -0
  29. package/dist/agent-plugins/react/hooks/AgentPluginsPorts.hooks.js +11 -1
  30. package/dist/agent-plugins/react/hooks/MarketplaceTab.hooks.d.ts +1 -1
  31. package/dist/agent-plugins/react/index.d.ts +25 -71
  32. package/dist/agent-plugins/react/index.js +9 -6
  33. package/dist/agent-plugins/react/pages/AgentPluginsPage.d.ts +8 -2
  34. package/dist/agent-plugins/react/pages/AgentPluginsPage.js +3 -3
  35. package/dist/agent-plugins/react/tabs/DownloadedTab.d.ts +2 -2
  36. package/dist/agent-plugins/react/tabs/DownloadedTab.js +1 -1
  37. package/dist/agent-plugins/react/tabs/InstalledTab.d.ts +2 -2
  38. package/dist/agent-plugins/react/tabs/InstalledTab.js +1 -1
  39. package/dist/agent-plugins/react/tabs/MarketplaceTab.d.ts +5 -2
  40. package/dist/agent-plugins/react/tabs/MarketplaceTab.js +3 -3
  41. package/dist/browser/index.d.ts +2 -0
  42. package/dist/browser/index.js +2 -0
  43. package/dist/browser/react-root-errors.d.ts +19 -0
  44. package/dist/browser/react-root-errors.js +16 -0
  45. package/dist/comments/adapters/http.js +2 -3
  46. package/dist/comments/adapters/memory.d.ts +5 -3
  47. package/dist/comments/adapters/memory.js +5 -6
  48. package/dist/comments/comments.module.d.ts +3 -3
  49. package/dist/comments/comments.module.js +1 -1
  50. package/dist/comments/controllers/comment-queue.controller.d.ts +14 -12
  51. package/dist/comments/controllers/comment-queue.controller.js +154 -155
  52. package/dist/comments/controllers/comment-settings.controller.d.ts +4 -4
  53. package/dist/comments/controllers/comment-settings.controller.js +40 -39
  54. package/dist/comments/controllers/comments.controller.d.ts +4 -4
  55. package/dist/comments/controllers/comments.controller.js +1 -2
  56. package/dist/comments/ports.d.ts +3 -3
  57. package/dist/comments/ports.js +1 -1
  58. package/dist/comments/react/components/QueueActionsCell.d.ts +20 -0
  59. package/dist/comments/react/components/QueueActionsCell.js +15 -0
  60. package/dist/comments/react/components/QueueSection.d.ts +20 -9
  61. package/dist/comments/react/components/QueueSection.js +9 -20
  62. package/dist/comments/react/components/SettingsFields.d.ts +13 -0
  63. package/dist/comments/react/components/SettingsFields.js +17 -0
  64. package/dist/comments/react/components/SettingsSection.d.ts +4 -1
  65. package/dist/comments/react/components/SettingsSection.js +5 -10
  66. package/dist/comments/react/hooks/CommentsPage.hooks.js +1 -1
  67. package/dist/comments/react/hooks/CommentsPorts.hooks.d.ts +5 -0
  68. package/dist/comments/react/hooks/CommentsPorts.hooks.js +11 -1
  69. package/dist/comments/react/hooks/QueueActionsCell.hooks.d.ts +13 -0
  70. package/dist/comments/react/hooks/QueueActionsCell.hooks.js +7 -0
  71. package/dist/comments/react/hooks/QueueSection.hooks.d.ts +3 -11
  72. package/dist/comments/react/hooks/QueueSection.hooks.js +8 -11
  73. package/dist/comments/react/hooks/use-comment-queue.hooks.js +4 -4
  74. package/dist/comments/react/hooks/use-comment-settings.hooks.js +3 -3
  75. package/dist/comments/react/hooks/use-comments.hooks.js +3 -3
  76. package/dist/comments/react/index.d.ts +27 -89
  77. package/dist/comments/react/index.js +5 -6
  78. package/dist/comments/react/pages/CommentsPage.d.ts +4 -1
  79. package/dist/comments/react/pages/CommentsPage.js +2 -2
  80. package/dist/comments/rules.d.ts +1 -1
  81. package/dist/comments/rules.js +2 -3
  82. package/dist/contracts/credential-management.d.ts +1 -1
  83. package/dist/contracts/credential-management.js +1 -1
  84. package/dist/contracts/media-picker.d.ts +1 -1
  85. package/dist/contracts/media-picker.js +1 -1
  86. package/dist/contracts/playground-render-target.d.ts +1 -1
  87. package/dist/contracts/playground-render-target.js +1 -1
  88. package/dist/core/entities/rules.d.ts +8 -2
  89. package/dist/core/entities/rules.js +3 -3
  90. package/dist/core/index.d.ts +1 -2
  91. package/dist/core/index.js +1 -3
  92. package/dist/core/ledger-slice.d.ts +3 -3
  93. package/dist/core/ledger-slice.js +3 -3
  94. package/dist/core/manifest/rules.js +1 -1
  95. package/dist/core/manifest/types.d.ts +11 -0
  96. package/dist/core/module/create-admin.d.ts +1 -8
  97. package/dist/core/module/create-admin.js +4 -9
  98. package/dist/core/module/index.d.ts +1 -5
  99. package/dist/core/module/index.js +1 -3
  100. package/dist/core/ports/auth.d.ts +2 -2
  101. package/dist/core/ports/auth.js +1 -1
  102. package/dist/core/ports/comment-repo.d.ts +53 -0
  103. package/dist/core/ports/comment-repo.js +2 -0
  104. package/dist/core/ports/comments.d.ts +1 -1
  105. package/dist/core/ports/comments.js +1 -1
  106. package/dist/core/ports/database.d.ts +1 -1
  107. package/dist/core/ports/embed-policy.d.ts +19 -0
  108. package/dist/core/ports/embed-policy.js +2 -0
  109. package/dist/core/ports/entities.d.ts +14 -0
  110. package/dist/core/ports/forms-catalog.d.ts +27 -0
  111. package/dist/core/ports/forms-catalog.js +2 -0
  112. package/dist/core/ports/forms.d.ts +3 -3
  113. package/dist/core/ports/identity.d.ts +1 -1
  114. package/dist/core/ports/identity.js +1 -1
  115. package/dist/core/ports/index.d.ts +3 -0
  116. package/dist/core/ports/media.d.ts +1 -1
  117. package/dist/core/ports/plugins.d.ts +1 -1
  118. package/dist/core/react/bind-react.d.ts +6 -16
  119. package/dist/core/react/bind-react.js +1 -1
  120. package/dist/core/react/index.d.ts +3 -2
  121. package/dist/core/react/index.js +3 -2
  122. package/dist/core/react/module-ui.d.ts +10 -0
  123. package/dist/core/react/module-ui.js +6 -0
  124. package/dist/core/react/use-controller.d.ts +1 -1
  125. package/dist/core/react/use-controller.js +2 -1
  126. package/dist/core/routing/route-template.d.ts +11 -0
  127. package/dist/core/routing/route-template.js +23 -0
  128. package/dist/core/transport/http.js +7 -5
  129. package/dist/core/transport/index.d.ts +0 -1
  130. package/dist/core/transport/index.js +0 -1
  131. package/dist/forms/adapters/http.js +2 -2
  132. package/dist/forms/adapters/memory.d.ts +1 -1
  133. package/dist/forms/adapters/memory.js +35 -26
  134. package/dist/forms/controllers/draft-store.d.ts +4 -4
  135. package/dist/forms/controllers/draft-store.js +1 -1
  136. package/dist/forms/controllers/field-attributes-dialog.controller.d.ts +7 -8
  137. package/dist/forms/controllers/field-attributes-dialog.controller.js +8 -6
  138. package/dist/forms/controllers/form-editor.controller.d.ts +8 -5
  139. package/dist/forms/controllers/form-editor.controller.js +2 -2
  140. package/dist/forms/controllers/form-fields-editor.controller.d.ts +4 -4
  141. package/dist/forms/controllers/form-submission-detail.controller.d.ts +4 -4
  142. package/dist/forms/controllers/form-submissions.controller.d.ts +4 -4
  143. package/dist/forms/controllers/forms-list.controller.d.ts +4 -4
  144. package/dist/forms/field-settings.d.ts +32 -16
  145. package/dist/forms/field-settings.js +52 -41
  146. package/dist/forms/forms.module.d.ts +5 -4
  147. package/dist/forms/forms.module.js +3 -3
  148. package/dist/forms/html-rules.d.ts +4 -2
  149. package/dist/forms/html-rules.js +19 -19
  150. package/dist/forms/index.d.ts +6 -4
  151. package/dist/forms/index.js +3 -3
  152. package/dist/forms/messages.en.js +1 -1
  153. package/dist/forms/models.d.ts +1 -1
  154. package/dist/forms/ports.d.ts +8 -4
  155. package/dist/forms/ports.js +3 -1
  156. package/dist/forms/react/components/FieldAttributesDialog.d.ts +4 -1
  157. package/dist/forms/react/components/FieldAttributesDialog.js +6 -28
  158. package/dist/forms/react/components/FieldAttributesStyling.d.ts +26 -0
  159. package/dist/forms/react/components/FieldAttributesStyling.js +42 -0
  160. package/dist/forms/react/components/FieldSettingsRows.js +3 -4
  161. package/dist/forms/react/components/FieldSettingsSection.d.ts +4 -1
  162. package/dist/forms/react/components/FieldSettingsSection.js +3 -3
  163. package/dist/forms/react/components/FormEditorFieldsBody.d.ts +5 -2
  164. package/dist/forms/react/components/FormEditorFieldsBody.js +3 -3
  165. package/dist/forms/react/components/FormEditorFieldsBodyParts.js +1 -1
  166. package/dist/forms/react/components/FormEditorFieldsSlot.d.ts +6 -0
  167. package/dist/forms/react/components/FormEditorFieldsSlot.js +10 -0
  168. package/dist/forms/react/components/FormEditorHeader.d.ts +9 -0
  169. package/dist/forms/react/components/FormEditorHeader.js +16 -0
  170. package/dist/forms/react/components/FormEditorHeaderText.d.ts +1 -1
  171. package/dist/forms/react/components/FormEditorHeaderText.js +1 -1
  172. package/dist/forms/react/components/FormEditorMainPanel.d.ts +1 -1
  173. package/dist/forms/react/components/FormEditorMainPanel.js +4 -4
  174. package/dist/forms/react/components/FormEditorTabStrip.d.ts +5 -2
  175. package/dist/forms/react/components/FormEditorTabStrip.js +3 -4
  176. package/dist/forms/react/components/FormFieldRow.d.ts +10 -0
  177. package/dist/forms/react/components/FormFieldRow.js +53 -0
  178. package/dist/forms/react/components/FormFieldsEditor.d.ts +4 -1
  179. package/dist/forms/react/components/FormFieldsEditor.js +6 -22
  180. package/dist/forms/react/components/FormFieldsTableParts.d.ts +10 -0
  181. package/dist/forms/react/components/FormFieldsTableParts.js +11 -0
  182. package/dist/forms/react/components/FormSubmissionDate.d.ts +1 -1
  183. package/dist/forms/react/components/FormSubmissionDate.js +1 -1
  184. package/dist/forms/react/components/FormSubmissionDetail.d.ts +4 -1
  185. package/dist/forms/react/components/FormSubmissionDetail.js +3 -3
  186. package/dist/forms/react/components/FormSubmissions.d.ts +6 -1
  187. package/dist/forms/react/components/FormSubmissions.js +3 -3
  188. package/dist/forms/react/components/FormSubmissionsTable.js +1 -1
  189. package/dist/forms/react/components/FormsListParts.d.ts +36 -0
  190. package/dist/forms/react/components/FormsListParts.js +41 -0
  191. package/dist/forms/react/hooks/FormsPorts.hooks.d.ts +7 -1
  192. package/dist/forms/react/hooks/FormsPorts.hooks.js +11 -1
  193. package/dist/forms/react/hooks/forms-view.hooks.d.ts +17 -11
  194. package/dist/forms/react/hooks/forms-view.hooks.js +13 -11
  195. package/dist/forms/react/hooks/use-field-attributes-dialog.hooks.d.ts +4 -1
  196. package/dist/forms/react/hooks/use-field-attributes-dialog.hooks.js +6 -4
  197. package/dist/forms/react/hooks/use-form-editor-parts.hooks.d.ts +127 -0
  198. package/dist/forms/react/hooks/use-form-editor-parts.hooks.js +223 -0
  199. package/dist/forms/react/hooks/use-form-editor.hooks.d.ts +13 -3
  200. package/dist/forms/react/hooks/use-form-editor.hooks.js +34 -210
  201. package/dist/forms/react/hooks/use-form-fields-editor.hooks.js +2 -2
  202. package/dist/forms/react/hooks/use-form-submission-detail.hooks.d.ts +2 -2
  203. package/dist/forms/react/hooks/use-form-submission-detail.hooks.js +4 -4
  204. package/dist/forms/react/hooks/use-form-submissions.hooks.d.ts +2 -2
  205. package/dist/forms/react/hooks/use-form-submissions.hooks.js +4 -5
  206. package/dist/forms/react/hooks/use-forms-list.hooks.js +3 -3
  207. package/dist/forms/react/index.d.ts +35 -26
  208. package/dist/forms/react/index.js +5 -6
  209. package/dist/forms/react/pages/FormEditor.d.ts +2 -2
  210. package/dist/forms/react/pages/FormEditor.js +7 -12
  211. package/dist/forms/react/pages/FormsList.d.ts +5 -2
  212. package/dist/forms/react/pages/FormsList.js +4 -30
  213. package/dist/forms/rules.d.ts +5 -5
  214. package/dist/forms/rules.js +8 -20
  215. package/dist/media/adapters/http.d.ts +24 -2
  216. package/dist/media/adapters/http.js +133 -10
  217. package/dist/media/adapters/memory.js +41 -46
  218. package/dist/media/conformance/media-api.conformance.js +60 -42
  219. package/dist/media/controllers/edit-media.controller.d.ts +5 -5
  220. package/dist/media/controllers/edit-media.controller.js +20 -17
  221. package/dist/media/controllers/library.controller.d.ts +14 -14
  222. package/dist/media/controllers/library.controller.js +180 -167
  223. package/dist/media/controllers/providers.controller.d.ts +4 -4
  224. package/dist/media/controllers/providers.controller.js +46 -40
  225. package/dist/media/html-attributes.d.ts +23 -13
  226. package/dist/media/html-attributes.js +15 -23
  227. package/dist/media/index.d.ts +5 -4
  228. package/dist/media/index.js +3 -3
  229. package/dist/media/media.module.d.ts +6 -5
  230. package/dist/media/media.module.js +3 -3
  231. package/dist/media/ports.d.ts +8 -3
  232. package/dist/media/ports.js +4 -1
  233. package/dist/media/react/components/EditMediaPanel.d.ts +4 -1
  234. package/dist/media/react/components/EditMediaPanel.js +3 -3
  235. package/dist/media/react/components/MediaCard.d.ts +7 -2
  236. package/dist/media/react/components/MediaCard.js +6 -6
  237. package/dist/media/react/components/MediaDialog.d.ts +4 -1
  238. package/dist/media/react/components/MediaDialog.js +3 -3
  239. package/dist/media/react/components/MediaGrid.d.ts +4 -1
  240. package/dist/media/react/components/MediaGrid.js +2 -2
  241. package/dist/media/react/components/MediaIcons.d.ts +9 -9
  242. package/dist/media/react/components/MediaIcons.js +9 -9
  243. package/dist/media/react/components/MediaLightbox.d.ts +4 -1
  244. package/dist/media/react/components/MediaLightbox.js +3 -3
  245. package/dist/media/react/components/MediaPicker.d.ts +4 -1
  246. package/dist/media/react/components/MediaPicker.js +3 -3
  247. package/dist/media/react/components/MediaPurgeDialog.d.ts +4 -1
  248. package/dist/media/react/components/MediaPurgeDialog.js +3 -3
  249. package/dist/media/react/components/UploadButton.d.ts +4 -1
  250. package/dist/media/react/components/UploadButton.js +3 -3
  251. package/dist/media/react/hooks/EditMediaPanel.hooks.d.ts +6 -3
  252. package/dist/media/react/hooks/EditMediaPanel.hooks.js +62 -50
  253. package/dist/media/react/hooks/LibraryTab.hooks.d.ts +23 -23
  254. package/dist/media/react/hooks/LibraryTab.hooks.js +52 -36
  255. package/dist/media/react/hooks/MediaCard.hooks.d.ts +1 -1
  256. package/dist/media/react/hooks/MediaCard.hooks.js +2 -1
  257. package/dist/media/react/hooks/MediaDialog.hooks.d.ts +1 -1
  258. package/dist/media/react/hooks/MediaPage.hooks.d.ts +22 -18
  259. package/dist/media/react/hooks/MediaPage.hooks.js +3 -3
  260. package/dist/media/react/hooks/MediaPicker.hooks.d.ts +1 -1
  261. package/dist/media/react/hooks/MediaPicker.hooks.js +2 -2
  262. package/dist/media/react/hooks/MediaPorts.hooks.d.ts +7 -0
  263. package/dist/media/react/hooks/MediaPorts.hooks.js +11 -1
  264. package/dist/media/react/hooks/MediaQuery.hooks.d.ts +3 -3
  265. package/dist/media/react/hooks/MediaQuery.hooks.js +1 -1
  266. package/dist/media/react/hooks/ProvidersTab.hooks.d.ts +7 -1
  267. package/dist/media/react/hooks/ProvidersTab.hooks.js +49 -46
  268. package/dist/media/react/index.d.ts +39 -114
  269. package/dist/media/react/index.js +55 -48
  270. package/dist/media/react/pages/MediaPage.d.ts +4 -1
  271. package/dist/media/react/pages/MediaPage.js +2 -2
  272. package/dist/media/react/tabs/LibraryTab.d.ts +5 -2
  273. package/dist/media/react/tabs/LibraryTab.js +3 -3
  274. package/dist/media/react/tabs/ProvidersTab.d.ts +5 -2
  275. package/dist/media/react/tabs/ProvidersTab.js +2 -2
  276. package/dist/media/rules.d.ts +0 -7
  277. package/dist/media/rules.js +0 -12
  278. package/dist/playground/controllers/playground.controller.d.ts +3 -3
  279. package/dist/playground/controllers/playground.controller.js +1 -1
  280. package/dist/playground/playground.module.d.ts +1 -1
  281. package/dist/playground/playground.module.js +1 -1
  282. package/dist/playground/react/components/Canvas.d.ts +5 -2
  283. package/dist/playground/react/components/Canvas.js +3 -3
  284. package/dist/playground/react/hooks/Canvas.hooks.d.ts +1 -1
  285. package/dist/playground/react/hooks/PlaygroundPage.hooks.d.ts +7 -3
  286. package/dist/playground/react/hooks/PlaygroundPorts.hooks.js +1 -1
  287. package/dist/playground/react/index.d.ts +9 -9
  288. package/dist/playground/react/pages/PlaygroundPage.d.ts +8 -2
  289. package/dist/playground/react/pages/PlaygroundPage.js +3 -3
  290. package/dist/playground/react/tabs/CanvasTab.d.ts +2 -2
  291. package/dist/playground/react/tabs/CanvasTab.js +1 -1
  292. package/dist/react/OverlayHost.d.ts +4 -1
  293. package/dist/react/OverlayHost.js +2 -2
  294. package/dist/react/components/ConfirmDialog/ConfirmDialog.d.ts +12 -2
  295. package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.js +1 -2
  296. package/dist/react/components/ConfirmDialog/ConfirmDialog.js +6 -4
  297. package/dist/react/components/ConfirmDialog/confirm-dialog-attrs.d.ts +1 -1
  298. package/dist/react/components/ConfirmDialog/confirm-dialog-attrs.js +1 -1
  299. package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.d.ts +2 -2
  300. package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.js +9 -8
  301. package/dist/react/components/RowMenu/RowMenu.hooks.js +66 -63
  302. package/dist/react/components/RowMenu/RowMenu.js +1 -1
  303. package/dist/react/components/Sidebar.d.ts +11 -4
  304. package/dist/react/components/Sidebar.js +11 -101
  305. package/dist/react/components/SidebarIcon.d.ts +4 -0
  306. package/dist/react/components/SidebarIcon.js +91 -0
  307. package/dist/react/components/ThemePreviewReloadControl.d.ts +7 -0
  308. package/dist/react/components/ThemePreviewReloadControl.js +5 -0
  309. package/dist/react/entities/EntityDetail.d.ts +4 -1
  310. package/dist/react/entities/EntityDetail.hooks.d.ts +14 -0
  311. package/dist/react/entities/EntityDetail.hooks.js +10 -0
  312. package/dist/react/entities/EntityDetail.js +3 -6
  313. package/dist/react/entities/EntityEdit.d.ts +6 -1
  314. package/dist/react/entities/EntityEdit.js +23 -6
  315. package/dist/react/entities/EntityField.d.ts +3 -1
  316. package/dist/react/entities/EntityField.js +9 -6
  317. package/dist/react/entities/EntityList.d.ts +4 -1
  318. package/dist/react/entities/EntityList.hooks.d.ts +33 -0
  319. package/dist/react/entities/EntityList.hooks.js +28 -0
  320. package/dist/react/entities/EntityList.js +3 -23
  321. package/dist/react/entities/FailureNotice.d.ts +29 -0
  322. package/dist/react/entities/FailureNotice.js +33 -0
  323. package/dist/react/entities/contribution.d.ts +2 -0
  324. package/dist/react/entities/contribution.js +2 -2
  325. package/dist/react/entities/rules.d.ts +6 -1
  326. package/dist/react/entities/rules.js +7 -4
  327. package/dist/react/entities/types.d.ts +19 -0
  328. package/dist/react/entities/use-entity-edit.d.ts +11 -2
  329. package/dist/react/entities/use-entity-edit.js +18 -12
  330. package/dist/react/entities/use-entity-read.d.ts +7 -2
  331. package/dist/react/entities/use-entity-read.js +9 -4
  332. package/dist/react/hooks/use-browser-telemetry-feed.d.ts +13 -0
  333. package/dist/react/hooks/use-browser-telemetry-feed.js +14 -0
  334. package/dist/react/hooks/use-overflow-title.d.ts +17 -0
  335. package/dist/react/hooks/use-overflow-title.js +29 -0
  336. package/dist/react/hooks/use-process-restart.d.ts +46 -0
  337. package/dist/react/hooks/use-process-restart.js +59 -0
  338. package/dist/react/hooks/use-rail-label-titles.d.ts +18 -0
  339. package/dist/react/hooks/use-rail-label-titles.js +44 -0
  340. package/dist/react/index.d.ts +6 -0
  341. package/dist/react/index.js +5 -0
  342. package/dist/react/kit-media-providers.d.ts +187 -0
  343. package/dist/react/kit-media-providers.js +2 -0
  344. package/dist/react/kit.d.ts +478 -0
  345. package/dist/react/kit.js +75 -0
  346. package/dist/react/overlays.d.ts +4 -4
  347. package/dist/react/overlays.js +1 -1
  348. package/dist/react/shell/AdminShell.d.ts +2 -2
  349. package/dist/react/shell/AdminShell.js +56 -24
  350. package/dist/react/shell/index.d.ts +1 -1
  351. package/dist/react/shell/model.d.ts +9 -1
  352. package/dist/react/shell/model.js +31 -15
  353. package/dist/react/shell/shell-hooks.d.ts +34 -0
  354. package/dist/react/shell/shell-hooks.js +31 -0
  355. package/dist/react/shell/theme-ports.d.ts +1 -1
  356. package/dist/react/shell/types.d.ts +97 -3
  357. package/dist/react/shell/use-admin-theme.d.ts +4 -2
  358. package/dist/react/shell/use-admin-theme.js +4 -3
  359. package/dist/react/testing-kit-media-providers.d.ts +3 -0
  360. package/dist/react/testing-kit-media-providers.js +96 -0
  361. package/dist/react/testing-kit.d.ts +11 -0
  362. package/dist/react/testing-kit.js +114 -0
  363. package/dist/redirects/adapters/memory.js +42 -33
  364. package/dist/redirects/conformance/redirects-api.conformance.js +1 -1
  365. package/dist/redirects/controllers/hit-count.controller.d.ts +5 -5
  366. package/dist/redirects/controllers/hit-count.controller.js +1 -1
  367. package/dist/redirects/controllers/import-redirects.controller.d.ts +5 -5
  368. package/dist/redirects/controllers/import-redirects.controller.js +1 -1
  369. package/dist/redirects/controllers/redirects.controller.d.ts +5 -5
  370. package/dist/redirects/controllers/redirects.controller.js +1 -1
  371. package/dist/redirects/index.d.ts +11 -7
  372. package/dist/redirects/index.js +6 -7
  373. package/dist/redirects/ports.d.ts +2 -2
  374. package/dist/redirects/ports.js +1 -1
  375. package/dist/redirects/react/components/CreateRedirectForm.d.ts +17 -0
  376. package/dist/redirects/react/components/CreateRedirectForm.js +19 -0
  377. package/dist/redirects/react/components/HitCountCell.js +2 -2
  378. package/dist/redirects/react/components/ImportRedirectsForm.js +1 -1
  379. package/dist/redirects/react/hooks/RedirectsPage.hooks.d.ts +1 -1
  380. package/dist/redirects/react/hooks/RedirectsPorts.hooks.d.ts +5 -0
  381. package/dist/redirects/react/hooks/RedirectsPorts.hooks.js +11 -1
  382. package/dist/redirects/react/hooks/use-hit-count-cell.hooks.js +3 -3
  383. package/dist/redirects/react/hooks/use-import-redirects-form.hooks.js +4 -4
  384. package/dist/redirects/react/hooks/use-redirects.hooks.d.ts +1 -1
  385. package/dist/redirects/react/hooks/use-redirects.hooks.js +4 -4
  386. package/dist/redirects/react/hooks/wired.hooks.d.ts +1 -1
  387. package/dist/redirects/react/index.d.ts +25 -90
  388. package/dist/redirects/react/index.js +6 -7
  389. package/dist/redirects/react/pages/RedirectsPage.d.ts +3 -1
  390. package/dist/redirects/react/pages/RedirectsPage.js +5 -5
  391. package/dist/redirects/redirects.module.d.ts +2 -2
  392. package/dist/redirects/redirects.module.js +1 -1
  393. package/dist/security/controllers/access-tokens.controller.d.ts +4 -4
  394. package/dist/security/controllers/access-tokens.controller.js +20 -15
  395. package/dist/security/controllers/other-credentials.controller.d.ts +4 -4
  396. package/dist/security/controllers/other-credentials.controller.js +1 -1
  397. package/dist/security/controllers/root-key.controller.d.ts +4 -4
  398. package/dist/security/controllers/root-key.controller.js +1 -1
  399. package/dist/security/ports.d.ts +3 -3
  400. package/dist/security/ports.js +1 -1
  401. package/dist/security/react/components/CredentialEditor.d.ts +4 -2
  402. package/dist/security/react/components/CredentialEditor.js +3 -3
  403. package/dist/security/react/hooks/AccessTokensTab.hooks.d.ts +5 -5
  404. package/dist/security/react/hooks/RootKeyTab.hooks.d.ts +1 -1
  405. package/dist/security/react/hooks/SecurityPage.hooks.d.ts +7 -3
  406. package/dist/security/react/hooks/SecurityPorts.hooks.js +1 -1
  407. package/dist/security/react/index.d.ts +22 -22
  408. package/dist/security/react/pages/SecurityPage.d.ts +8 -2
  409. package/dist/security/react/pages/SecurityPage.js +3 -3
  410. package/dist/security/react/tabs/AccessTokensTab.d.ts +5 -2
  411. package/dist/security/react/tabs/AccessTokensTab.js +3 -3
  412. package/dist/security/react/tabs/RootKeyTab.d.ts +5 -2
  413. package/dist/security/react/tabs/RootKeyTab.js +3 -3
  414. package/dist/security/rules.d.ts +1 -1
  415. package/dist/security/security.module.d.ts +4 -4
  416. package/dist/security/security.module.js +1 -1
  417. package/dist/seo/controllers/entry-picker.controller.d.ts +7 -7
  418. package/dist/seo/controllers/entry-picker.controller.js +1 -1
  419. package/dist/seo/controllers/entry-section.controller.d.ts +9 -9
  420. package/dist/seo/controllers/entry-section.controller.js +1 -1
  421. package/dist/seo/controllers/media-ref.controller.d.ts +9 -9
  422. package/dist/seo/controllers/media-ref.controller.js +1 -1
  423. package/dist/seo/controllers/seo-entry.controller.d.ts +7 -7
  424. package/dist/seo/controllers/seo-entry.controller.js +1 -1
  425. package/dist/seo/controllers/seo.controller.d.ts +7 -7
  426. package/dist/seo/controllers/seo.controller.js +1 -1
  427. package/dist/seo/controllers/sitemap.controller.d.ts +7 -7
  428. package/dist/seo/controllers/sitemap.controller.js +2 -2
  429. package/dist/seo/index.d.ts +4 -2
  430. package/dist/seo/index.js +2 -2
  431. package/dist/seo/ports.d.ts +2 -2
  432. package/dist/seo/ports.js +1 -1
  433. package/dist/seo/react/components/AnalyzePanel.d.ts +13 -0
  434. package/dist/seo/react/components/AnalyzePanel.js +21 -0
  435. package/dist/seo/react/components/EntryPicker.d.ts +19 -0
  436. package/dist/seo/react/components/EntryPicker.js +25 -0
  437. package/dist/seo/react/components/MediaPickerBridge.d.ts +4 -1
  438. package/dist/seo/react/components/MediaPickerBridge.js +2 -2
  439. package/dist/seo/react/components/MediaRefField.d.ts +5 -2
  440. package/dist/seo/react/components/MediaRefField.js +5 -5
  441. package/dist/seo/react/components/SeoEntryFields.d.ts +19 -0
  442. package/dist/seo/react/components/SeoEntryFields.js +19 -0
  443. package/dist/seo/react/components/SeoEntryPanel.d.ts +31 -0
  444. package/dist/seo/react/components/SeoEntryPanel.js +64 -0
  445. package/dist/seo/react/components/SeoIcons.d.ts +3 -3
  446. package/dist/seo/react/components/SeoIcons.js +3 -3
  447. package/dist/seo/react/components/SeoSection.d.ts +27 -0
  448. package/dist/seo/react/components/SeoSection.js +24 -0
  449. package/dist/seo/react/components/SitemapModal.d.ts +42 -2
  450. package/dist/seo/react/components/SitemapModal.js +17 -17
  451. package/dist/seo/react/hooks/MediaRefField.hooks.js +6 -6
  452. package/dist/seo/react/hooks/SeoModuleTabs.d.ts +2 -2
  453. package/dist/seo/react/hooks/SeoModuleTabs.js +3 -1
  454. package/dist/seo/react/hooks/SeoPage.hooks.d.ts +2 -2
  455. package/dist/seo/react/hooks/SeoPorts.hooks.d.ts +5 -0
  456. package/dist/seo/react/hooks/SeoPorts.hooks.js +11 -1
  457. package/dist/seo/react/hooks/SeoQuery.hooks.d.ts +3 -3
  458. package/dist/seo/react/hooks/SeoQuery.hooks.js +1 -1
  459. package/dist/seo/react/hooks/SitemapModal.hooks.js +1 -1
  460. package/dist/seo/react/hooks/use-entry-picker.hooks.js +1 -1
  461. package/dist/seo/react/hooks/use-seo-entry-panel.hooks.js +3 -3
  462. package/dist/seo/react/hooks/use-seo-entry-section.hooks.js +2 -2
  463. package/dist/seo/react/hooks/use-seo.hooks.js +3 -3
  464. package/dist/seo/react/hooks/use-share-image-warning.hooks.js +1 -1
  465. package/dist/seo/react/hooks/use-sitemap-modal.hooks.d.ts +4 -1
  466. package/dist/seo/react/hooks/use-sitemap-modal.hooks.js +6 -5
  467. package/dist/seo/react/index.d.ts +28 -21
  468. package/dist/seo/react/index.js +5 -6
  469. package/dist/seo/react/pages/SeoPage.d.ts +16 -82
  470. package/dist/seo/react/pages/SeoPage.js +29 -216
  471. package/dist/seo/react/tabs/SeoDefaultsSections.d.ts +19 -0
  472. package/dist/seo/react/tabs/SeoDefaultsSections.js +48 -0
  473. package/dist/seo/react/tabs/SeoDefaultsTab.d.ts +24 -0
  474. package/dist/seo/react/tabs/SeoDefaultsTab.js +30 -0
  475. package/dist/seo/react/tabs/SeoSitemapTab.d.ts +24 -0
  476. package/dist/seo/react/tabs/SeoSitemapTab.js +38 -0
  477. package/dist/seo/rules.d.ts +3 -3
  478. package/dist/seo/rules.js +6 -6
  479. package/dist/seo/seo.module.d.ts +3 -3
  480. package/dist/seo/seo.module.js +1 -1
  481. package/dist/source-control/controllers/source-control.controller.d.ts +3 -3
  482. package/dist/source-control/controllers/source-control.controller.js +1 -1
  483. package/dist/source-control/ports.d.ts +1 -1
  484. package/dist/source-control/ports.js +1 -1
  485. package/dist/source-control/react/components/SourceControlCredentialFields.d.ts +4 -2
  486. package/dist/source-control/react/components/SourceControlCredentialFields.js +3 -3
  487. package/dist/source-control/react/components/SourceControlProviderRow.d.ts +1 -1
  488. package/dist/source-control/react/components/SourceControlProviderRow.js +2 -2
  489. package/dist/source-control/react/hooks/ProvidersTab.hooks.d.ts +1 -1
  490. package/dist/source-control/react/hooks/ProvidersTab.hooks.js +2 -2
  491. package/dist/source-control/react/hooks/SourceControlPage.hooks.d.ts +7 -3
  492. package/dist/source-control/react/hooks/SourceControlPorts.hooks.d.ts +5 -0
  493. package/dist/source-control/react/hooks/SourceControlPorts.hooks.js +11 -1
  494. package/dist/source-control/react/index.d.ts +25 -50
  495. package/dist/source-control/react/index.js +9 -6
  496. package/dist/source-control/react/pages/SourceControlPage.d.ts +8 -2
  497. package/dist/source-control/react/pages/SourceControlPage.js +3 -3
  498. package/dist/source-control/react/tabs/ProvidersTab.d.ts +5 -2
  499. package/dist/source-control/react/tabs/ProvidersTab.js +3 -3
  500. package/dist/source-control/source-control.module.d.ts +2 -2
  501. package/dist/source-control/source-control.module.js +1 -1
  502. package/dist/widgets/adapters/http.js +2 -2
  503. package/dist/widgets/adapters/memory.js +26 -20
  504. package/dist/widgets/controllers/instance-editor.controller.d.ts +3 -3
  505. package/dist/widgets/controllers/instance-editor.controller.js +48 -38
  506. package/dist/widgets/controllers/library.controller.d.ts +3 -3
  507. package/dist/widgets/controllers/library.controller.js +1 -2
  508. package/dist/widgets/controllers/region-editor.controller.d.ts +3 -3
  509. package/dist/widgets/controllers/region-editor.controller.js +5 -5
  510. package/dist/widgets/controllers/regions.controller.d.ts +3 -3
  511. package/dist/widgets/controllers/regions.controller.js +1 -2
  512. package/dist/widgets/index.d.ts +2 -1
  513. package/dist/widgets/index.js +1 -1
  514. package/dist/widgets/messages.en.js +1 -1
  515. package/dist/widgets/ports.d.ts +3 -3
  516. package/dist/widgets/ports.js +1 -1
  517. package/dist/widgets/react/components/RegionPlacementRow.d.ts +14 -0
  518. package/dist/widgets/react/components/RegionPlacementRow.js +8 -0
  519. package/dist/widgets/react/components/TrashWidgetDialog.d.ts +11 -0
  520. package/dist/widgets/react/components/TrashWidgetDialog.js +8 -0
  521. package/dist/widgets/react/components/WidgetInstanceNotices.js +1 -1
  522. package/dist/widgets/react/components/WidgetPageHeaders.d.ts +42 -0
  523. package/dist/widgets/react/components/WidgetPageHeaders.js +54 -0
  524. package/dist/widgets/react/components/WidgetRegionEditorHeaderActions.js +1 -1
  525. package/dist/widgets/react/components/WidgetTableColumns.d.ts +12 -0
  526. package/dist/widgets/react/components/WidgetTableColumns.js +47 -0
  527. package/dist/widgets/react/hooks/WidgetsPorts.hooks.d.ts +12 -7
  528. package/dist/widgets/react/hooks/WidgetsPorts.hooks.js +11 -0
  529. package/dist/widgets/react/hooks/WidgetsQuery.hooks.d.ts +2 -2
  530. package/dist/widgets/react/hooks/WidgetsQuery.hooks.js +1 -1
  531. package/dist/widgets/react/hooks/page-views.hooks.d.ts +1 -1
  532. package/dist/widgets/react/hooks/page-views.hooks.js +1 -1
  533. package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.d.ts +2 -2
  534. package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.js +3 -3
  535. package/dist/widgets/react/hooks/use-widget-region-editor.hooks.d.ts +1 -1
  536. package/dist/widgets/react/hooks/use-widget-region-editor.hooks.js +2 -2
  537. package/dist/widgets/react/hooks/use-widget-regions.hooks.d.ts +3 -1
  538. package/dist/widgets/react/hooks/use-widget-regions.hooks.js +7 -6
  539. package/dist/widgets/react/hooks/use-widgets-library.hooks.d.ts +4 -2
  540. package/dist/widgets/react/hooks/use-widgets-library.hooks.js +7 -6
  541. package/dist/widgets/react/index.d.ts +41 -34
  542. package/dist/widgets/react/index.js +5 -6
  543. package/dist/widgets/react/pages/WidgetInstanceEditor.d.ts +5 -1
  544. package/dist/widgets/react/pages/WidgetInstanceEditor.js +7 -9
  545. package/dist/widgets/react/pages/WidgetRegionEditor.d.ts +5 -1
  546. package/dist/widgets/react/pages/WidgetRegionEditor.js +8 -10
  547. package/dist/widgets/react/pages/WidgetRegions.d.ts +5 -1
  548. package/dist/widgets/react/pages/WidgetRegions.js +6 -8
  549. package/dist/widgets/react/pages/WidgetsLibrary.d.ts +5 -1
  550. package/dist/widgets/react/pages/WidgetsLibrary.js +8 -45
  551. package/dist/widgets/rules.d.ts +5 -3
  552. package/dist/widgets/rules.js +4 -9
  553. package/dist/widgets/widgets.module.d.ts +3 -3
  554. package/dist/widgets/widgets.module.js +1 -1
  555. package/package.json +23 -57
  556. package/dist/consent/react/ConsentFields.d.ts +0 -39
  557. package/dist/consent/react/ConsentFields.js +0 -87
  558. package/dist/consent/react/ConsentPreviewFrame.d.ts +0 -14
  559. package/dist/consent/react/ConsentPreviewFrame.js +0 -14
  560. package/dist/consent/react/ConsentSettingsPanel.d.ts +0 -54
  561. package/dist/consent/react/ConsentSettingsPanel.js +0 -13
  562. package/dist/consent/react/index.d.ts +0 -8
  563. package/dist/consent/react/index.js +0 -4
  564. package/dist/consent/react/settings-panel.hooks.d.ts +0 -49
  565. package/dist/consent/react/settings-panel.hooks.js +0 -57
  566. package/dist/core/module/controller-store.d.ts +0 -22
  567. package/dist/core/module/controller-store.js +0 -32
  568. package/dist/core/module/define-admin-module.d.ts +0 -4
  569. package/dist/core/module/define-admin-module.js +0 -5
  570. package/dist/core/module/token.d.ts +0 -19
  571. package/dist/core/module/token.js +0 -4
  572. package/dist/core/module/types.d.ts +0 -79
  573. package/dist/core/module/types.js +0 -2
  574. package/dist/core/permissions/rules.d.ts +0 -35
  575. package/dist/core/permissions/rules.js +0 -34
  576. package/dist/core/transport/errors.d.ts +0 -62
  577. package/dist/core/transport/errors.js +0 -63
  578. package/dist/core/transport/query-suffix.d.ts +0 -3
  579. package/dist/core/transport/query-suffix.js +0 -5
  580. package/dist/media/styles.d.ts +0 -4
  581. package/dist/media/styles.js +0 -5
  582. package/dist/react/bind-react.d.ts +0 -2
  583. package/dist/react/bind-react.js +0 -3
  584. package/dist/react/use-controller.d.ts +0 -2
  585. package/dist/react/use-controller.js +0 -3
@@ -1,3 +1,4 @@
1
- export * from './bind-react.js';
2
- export * from './use-controller.js';
1
+ export { bindReact } from './bind-react.js';
2
+ export { useController } from './use-controller.js';
3
+ export { reactModuleUi } from './module-ui.js';
3
4
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,10 @@
1
+ import type { ComponentType, LazyExoticComponent, ReactNode } from 'react';
2
+ import type { AdminInstance, AdminModuleUi, ModulePageProps } from '@jini-ai/core/contracts/admin-module';
3
+ import { type LazyTabView } from './bind-react.js';
4
+ /** Admin's React implementation of the module UI contract. Module packages never import it: the
5
+ * host injects it into each module factory (owner answer 2026-11-17, J4). */
6
+ export declare const reactModuleUi: AdminModuleUi<LazyExoticComponent<ComponentType<ModulePageProps<LazyTabView>>>, LazyTabView, ComponentType<{
7
+ admin: AdminInstance;
8
+ children: ReactNode;
9
+ }>>;
10
+ //# sourceMappingURL=module-ui.d.ts.map
@@ -0,0 +1,6 @@
1
+ import { bindReact } from './bind-react.js';
2
+ import { useController } from './use-controller.js';
3
+ /** Admin's React implementation of the module UI contract. Module packages never import it: the
4
+ * host injects it into each module factory (owner answer 2026-11-17, J4). */
5
+ export const reactModuleUi = { bindReact, useController };
6
+ //# sourceMappingURL=module-ui.js.map
@@ -1,5 +1,5 @@
1
1
  import type { DependencyList } from 'react';
2
- import type { ControllerStore } from '../module/controller-store.js';
2
+ import { type ControllerStore } from '@jini-ai/core/admin-runtime';
3
3
  /** Factory runs after commit, never during render. Each effect attachment owns a fresh
4
4
  * controller, so StrictMode's cleanup/replay cannot revive a disposed controller. */
5
5
  export declare function useController<C extends ControllerStore<unknown>>({ create, dependencies }: {
@@ -1,4 +1,5 @@
1
1
  import { useEffect, useState, useSyncExternalStore, useCallback } from 'react';
2
+ import {} from '@jini-ai/core/admin-runtime';
2
3
  /** Factory runs after commit, never during render. Each effect attachment owns a fresh
3
4
  * controller, so StrictMode's cleanup/replay cannot revive a disposed controller. */
4
5
  export function useController({ create, dependencies }, { start, } = {}) {
@@ -9,7 +10,7 @@ export function useController({ create, dependencies }, { start, } = {}) {
9
10
  start?.({ controller: current });
10
11
  return () => current.dispose();
11
12
  // Dependencies are explicitly supplied by the owning hook, like useMemo's contract.
12
- // eslint-disable-next-line react-hooks/exhaustive-deps
13
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- controller owners supply the dynamic dependency list.
13
14
  }, dependencies);
14
15
  const subscribe = useCallback((listener) => controller?.subscribe({ listener }) ?? (() => { }), [controller]);
15
16
  const snapshot = useSyncExternalStore(subscribe, () => (controller?.getSnapshot() ?? null), () => null);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Builds a route template from the host's base and captured params, dropping queries and fragments.
3
+ * Unmatched segments retain their encoding; malformed encoding stays raw rather than throwing.
4
+ * @complexity O(p + s) map operations for p params and s segments; O(p + s) auxiliary space.
5
+ */
6
+ export declare function toRouteTemplate({ base, routePath, params }: {
7
+ base: string;
8
+ routePath: string;
9
+ params: Readonly<Record<string, string>>;
10
+ }, _optional?: Record<string, never>): string;
11
+ //# sourceMappingURL=route-template.d.ts.map
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Builds a route template from the host's base and captured params, dropping queries and fragments.
3
+ * Unmatched segments retain their encoding; malformed encoding stays raw rather than throwing.
4
+ * @complexity O(p + s) map operations for p params and s segments; O(p + s) auxiliary space.
5
+ */
6
+ export function toRouteTemplate({ base, routePath, params }, _optional = {}) {
7
+ const queryOrFragment = routePath.search(/[?#]/);
8
+ const path = queryOrFragment === -1 ? routePath : routePath.slice(0, queryOrFragment);
9
+ const names = new Map(Object.entries(params).map(([name, value]) => [value, name]));
10
+ const segments = path.split('/').filter(Boolean).map((segment) => {
11
+ let decoded;
12
+ try {
13
+ decoded = decodeURIComponent(segment);
14
+ }
15
+ catch {
16
+ decoded = segment; /* Keep malformed encoding raw. */
17
+ }
18
+ const name = names.get(decoded);
19
+ return name ? `:${name}` : segment;
20
+ });
21
+ return [base, ...segments].join('/');
22
+ }
23
+ //# sourceMappingURL=route-template.js.map
@@ -7,7 +7,8 @@
7
7
  * original contracts with neutral operator copy. Error-body parsing deliberately keeps the
8
8
  * `.catch(() => ({}))` outcome on a body that is not JSON, while distinguishing it from parsed null.
9
9
  */
10
- import { AdminApiError } from './errors.js';
10
+ import { describeErrorForLog } from '@jini-ai/core';
11
+ import { AdminApiError } from '@jini-ai/core/admin-runtime';
11
12
  // Browser connection pools can leave requests queued forever without a fetch rejection.
12
13
  // 60 seconds bounds that hang while allowing large uploads on slow connections to complete.
13
14
  const DEFAULT_REQUEST_TIMEOUT_MS = 60_000;
@@ -21,10 +22,11 @@ function unreachableApiMessage({ status } = {}) {
21
22
  function errorName(cause) {
22
23
  return cause && typeof cause === 'object' && 'name' in cause ? cause.name : undefined;
23
24
  }
24
- function requestTimeoutError({ cause, timeoutMs }, _optional = {}) {
25
+ function requestTimeoutError({ timeoutMs }, _optional = {}) {
25
26
  const message = `the API did not respond within ${timeoutMs / 1000}s — the browser may be out of free connections for this origin (try closing other admin tabs) or the server is unresponsive`;
26
27
  return new AdminApiError({ message, status: 0 }, {
27
- code: 'REQUEST_TIMEOUT', body: { cause: cause instanceof Error ? cause.message : String(cause) },
28
+ // Reached only for a cause named TimeoutError (any realm), so the name is the whole label.
29
+ code: 'REQUEST_TIMEOUT', body: { cause: 'TimeoutError' },
28
30
  });
29
31
  }
30
32
  function throwTranslatedFetchFailure({ cause, timeoutMs }, { isPageUnloading } = {}) {
@@ -32,14 +34,14 @@ function throwTranslatedFetchFailure({ cause, timeoutMs }, { isPageUnloading } =
32
34
  if (name === 'AbortError')
33
35
  throw cause;
34
36
  if (name === 'TimeoutError')
35
- throw requestTimeoutError({ cause, timeoutMs });
37
+ throw requestTimeoutError({ timeoutMs });
36
38
  // Only fetch's TypeError proves a network failure. Adapter bugs retain their original type.
37
39
  if (!(cause instanceof TypeError))
38
40
  throw cause;
39
41
  if (isPageUnloading?.())
40
42
  throw new DOMException('request cancelled: the page is unloading', 'AbortError');
41
43
  throw new AdminApiError({ message: unreachableApiMessage(), status: 0 }, {
42
- code: 'API_UNREACHABLE', body: { cause: cause.message },
44
+ code: 'API_UNREACHABLE', body: { cause: describeErrorForLog({ err: cause }) },
43
45
  });
44
46
  }
45
47
  /**
@@ -1,4 +1,3 @@
1
- export { AdminApiError, describeApiError } from './errors.js';
2
1
  export { createAdminClient, createHttpTransport } from './http.js';
3
2
  export type { AdminFetch, HttpTransportOptions } from './http.js';
4
3
  export type { AdminClient, AdminRouteGroupFactory, AdminTransport } from './types.js';
@@ -1,3 +1,2 @@
1
- export { AdminApiError, describeApiError } from './errors.js';
2
1
  export { createAdminClient, createHttpTransport } from './http.js';
3
2
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { querySuffix } from '../../core/transport/query-suffix.js';
1
+ import { querySuffix } from '@jini-ai/core/admin-runtime';
2
2
  /** Preserve the existing forms wire, including its data envelopes and explicit authoring route.
3
3
  * `mediaBasePath` (the host's media collection path) enables file-answer download links. */
4
4
  export function createHttpFormsApi({ transport, basePath }, { mediaBasePath } = {}) {
@@ -33,7 +33,7 @@ export function createHttpFormsApi({ transport, basePath }, { mediaBasePath } =
33
33
  if (options.limit)
34
34
  params.set('limit', String(options.limit));
35
35
  const qs = params.toString();
36
- const response = await transport.request({ path: `${submissionPath(formId)}${querySuffix(qs)}`, method: 'GET' });
36
+ const response = await transport.request({ path: `${submissionPath(formId)}${querySuffix({ query: qs })}`, method: 'GET' });
37
37
  return { items: response.data, nextCursor: response.nextCursor };
38
38
  },
39
39
  async getFormSubmission({ formId, submissionId }, _optional = {}) {
@@ -1,4 +1,4 @@
1
- import type { FormProviderDescription } from '@jini-ai/cms/forms';
1
+ import type { FormProviderDescription } from '@jini-ai/core/contracts/forms';
2
2
  import type { AdminFormsPort, AdminFormDefinition, AdminFormSubmission } from '../../core/ports/forms.js';
3
3
  import type { FormsTrashPort } from '../ports.js';
4
4
  /** A scoped, deterministic in-memory API with the core contract's add/edit-only invariant. */
@@ -1,4 +1,4 @@
1
- import { AdminApiError } from '../../core/transport/errors.js';
1
+ import { AdminApiError } from '@jini-ai/core/admin-runtime';
2
2
  // Keep this disposable browser fixture independent of the CMS runtime.
3
3
  const DEFAULT_PROVIDERS = [{ id: 'builtin', label: 'Built-in', fields: [], answers: 'Answers are stored in the built-in inbox.', validation: 'The built-in receiver validates the declared form fields.', frameOrigins: [], available: true }];
4
4
  // The contract excludes slug; runtime callers cannot smuggle it through a cast either.
@@ -16,6 +16,38 @@ function assertNoFieldRemoved({ current, patch }) {
16
16
  throw new AdminApiError({ message: 'existing form fields cannot be removed', status: 400 }, { code: 'FORMS_FIELD_VALIDATION_ERROR' });
17
17
  }
18
18
  }
19
+ function createMemoryFormWriters(definitions, { now, nextId, nextFakeId, missing }) {
20
+ return {
21
+ async createFormDefinition(input, options = {}) {
22
+ if (definitions.some(form => form.slug === input.slug))
23
+ throw new AdminApiError({ message: 'form slug already exists', status: 409 });
24
+ let id = nextId?.() ?? nextFakeId();
25
+ if (!nextId)
26
+ while (definitions.some(form => form.id === id))
27
+ id = nextFakeId();
28
+ if (definitions.some(form => form.id === id))
29
+ throw new AdminApiError({ message: 'form id already exists', status: 409 });
30
+ const created = { ...structuredClone(input), id, notify: structuredClone(options.notify ?? { enabled: false, recipients: [] }), status: 'active', createdAt: now(), updatedAt: now() };
31
+ definitions.push(created);
32
+ return structuredClone(created);
33
+ },
34
+ async updateFormDefinition({ id }, patch = {}) {
35
+ const current = definitions.find(form => form.id === id) ?? missing(id);
36
+ assertNoFieldRemoved({ current, patch });
37
+ const updated = { ...current, ...structuredClone(suppliedPatch(patch)), updatedAt: now() };
38
+ definitions[definitions.indexOf(current)] = updated;
39
+ return structuredClone(updated);
40
+ },
41
+ };
42
+ }
43
+ function createMemoryFormLookup(definitions) {
44
+ const missing = (id, { kind = 'form definition' } = {}) => {
45
+ throw new AdminApiError({ message: `${kind} '${id}' was not found`, status: 404 });
46
+ };
47
+ const find = (id) => definitions.find(form => form.slug === id) ?? definitions.find(form => form.id === id) ?? missing(id);
48
+ const definitionId = (id) => definitions.find(form => form.slug === id)?.id ?? id;
49
+ return { missing, find, definitionId };
50
+ }
19
51
  /** A scoped, deterministic in-memory API with the core contract's add/edit-only invariant. */
20
52
  export function createMemoryFormsApi(_required = {}, { forms = [], submissions = [], providers = DEFAULT_PROVIDERS, now = () => new Date(0).toISOString(), nextId } = {}) {
21
53
  const descriptions = structuredClone([...providers]);
@@ -23,11 +55,7 @@ export function createMemoryFormsApi(_required = {}, { forms = [], submissions =
23
55
  const answers = structuredClone([...submissions]);
24
56
  let sequence = definitions.length;
25
57
  const nextFakeId = () => { sequence += 1; return `fake-${sequence}`; };
26
- const missing = (id, { kind = 'form definition' } = {}) => {
27
- throw new AdminApiError({ message: `${kind} '${id}' was not found`, status: 404 });
28
- };
29
- const find = (id) => definitions.find(form => form.slug === id) ?? definitions.find(form => form.id === id) ?? missing(id);
30
- const definitionId = (id) => definitions.find(form => form.slug === id)?.id ?? id;
58
+ const { missing, find, definitionId } = createMemoryFormLookup(definitions);
31
59
  const findSubmission = (formId, id) => {
32
60
  const resolvedId = definitionId(formId);
33
61
  return answers.find(item => item.id === id && item.formDefinitionId === resolvedId && item.status !== 'trash') ?? missing(id, { kind: 'form submission' });
@@ -49,26 +77,7 @@ export function createMemoryFormsApi(_required = {}, { forms = [], submissions =
49
77
  async listFormProviders(_required, _optional = {}) { return structuredClone(descriptions); },
50
78
  async listFormDefinitions(_required, _optional = {}) { return structuredClone(definitions); },
51
79
  async getFormDefinition({ id }, _optional = {}) { return structuredClone(find(id)); },
52
- async createFormDefinition(input, options = {}) {
53
- if (definitions.some(form => form.slug === input.slug))
54
- throw new AdminApiError({ message: 'form slug already exists', status: 409 });
55
- let id = nextId?.() ?? nextFakeId();
56
- if (!nextId)
57
- while (definitions.some(form => form.id === id))
58
- id = nextFakeId();
59
- if (definitions.some(form => form.id === id))
60
- throw new AdminApiError({ message: 'form id already exists', status: 409 });
61
- const created = { ...structuredClone(input), id, notify: structuredClone(options.notify ?? { enabled: false, recipients: [] }), status: 'active', createdAt: now(), updatedAt: now() };
62
- definitions.push(created);
63
- return structuredClone(created);
64
- },
65
- async updateFormDefinition({ id }, patch = {}) {
66
- const current = definitions.find(form => form.id === id) ?? missing(id);
67
- assertNoFieldRemoved({ current, patch });
68
- const updated = { ...current, ...structuredClone(suppliedPatch(patch)), updatedAt: now() };
69
- definitions[definitions.indexOf(current)] = updated;
70
- return structuredClone(updated);
71
- },
80
+ ...createMemoryFormWriters(definitions, { now, nextId, nextFakeId, missing }),
72
81
  // O(n log n) time/O(n) space over the fixture submissions; one filtered cursor page,
73
82
  // no per-row I/O. This adapter is a disposable contract fixture, not a production store.
74
83
  async listFormSubmissions({ formId }, { cursor, limit = 50 } = {}) {
@@ -2,11 +2,11 @@
2
2
  export declare function createFormsDraftStore<S extends object>({ initial }: {
3
3
  initial: S;
4
4
  }, _optional?: {}): {
5
- getSnapshot: () => Readonly<S>;
6
- subscribe: ({ listener }: {
5
+ getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => S;
6
+ subscribe: (required: {
7
7
  listener: () => void;
8
- }) => () => void;
9
- dispose: () => void;
8
+ }, optional?: Record<string, never>) => () => void;
9
+ dispose: (required?: Record<string, never>, optional?: Record<string, never>) => void;
10
10
  update<K extends keyof S>({ key, value }: {
11
11
  key: K;
12
12
  value: S[K] | ((current: S[K]) => S[K]);
@@ -1,4 +1,4 @@
1
- import { createControllerStore } from '../../core/module/controller-store.js';
1
+ import { createControllerStore } from '@jini-ai/core/admin-runtime';
2
2
  /** Section controllers share only the typed draft-update mechanism, not domain decisions. */
3
3
  export function createFormsDraftStore({ initial }, _optional = {}) {
4
4
  const store = createControllerStore({ initial });
@@ -1,3 +1,4 @@
1
+ import type { FormsCatalogPort } from "../../core/ports/forms-catalog.js";
1
2
  import type { AdminFormField } from "../models.js";
2
3
  import { type AttrRow } from "../rules.js";
3
4
  import { type FieldSettingsForm, type OptionRow } from "../field-settings.js";
@@ -8,12 +9,10 @@ export interface FieldAttributesDialogState {
8
9
  settings: FieldSettingsForm;
9
10
  error: string | null;
10
11
  }
11
- export declare function initialFieldAttributesDialogState({ field }: {
12
- field: AdminFormField;
13
- }, _optional?: {}): FieldAttributesDialogState;
14
12
  /** A headless section store. React owns subscriptions/effects, never this state. */
15
- export declare function createFieldAttributesDialogController({ field }: {
13
+ export declare function createFieldAttributesDialogController({ field, catalog }: {
16
14
  field: AdminFormField;
15
+ catalog: FormsCatalogPort;
17
16
  }, _optional?: {}): {
18
17
  setSettings({ patch }: {
19
18
  patch: Partial<FieldSettingsForm>;
@@ -79,11 +78,11 @@ export declare function createFieldAttributesDialogController({ field }: {
79
78
  checkboxValue?: string | undefined;
80
79
  };
81
80
  };
82
- getSnapshot: () => Readonly<FieldAttributesDialogState>;
83
- subscribe: ({ listener }: {
81
+ getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => FieldAttributesDialogState;
82
+ subscribe: (required: {
84
83
  listener: () => void;
85
- }) => () => void;
86
- dispose: () => void;
84
+ }, optional?: Record<string, never>) => () => void;
85
+ dispose: (required?: Record<string, never>, optional?: Record<string, never>) => void;
87
86
  update<K extends keyof FieldAttributesDialogState>({ key, value }: {
88
87
  key: K;
89
88
  value: FieldAttributesDialogState[K] | ((current: FieldAttributesDialogState[K]) => FieldAttributesDialogState[K]);
@@ -1,8 +1,8 @@
1
1
  import { createFormsDraftStore } from "./draft-store.js";
2
2
  import { attrRowsFromField, updateAttrRow, removeAttrRow, addAttrRow, buildFieldAttributesPatch } from "../rules.js";
3
3
  import { addOptionRow, buildFieldSettingsPatch, moveOptionRow, removeOptionRow, settingsFormFromField, updateOptionRow } from "../field-settings.js";
4
- export function initialFieldAttributesDialogState({ field }, _optional = {}) {
5
- return { className: field.className ?? "", rows: attrRowsFromField({ field }), settings: settingsFormFromField({ field }), error: null };
4
+ function initialFieldAttributesDialogState({ field, catalog }, _optional = {}) {
5
+ return { className: field.className ?? "", rows: attrRowsFromField({ field }), settings: settingsFormFromField({ field, catalog }), error: null };
6
6
  }
7
7
  /** Add or remove one value from a list setting (accepted uploads, default choices). */
8
8
  const toggled = (values, value, on) => {
@@ -21,8 +21,9 @@ function mergeSubmitPatches(settings, attributes) {
21
21
  return { ok: true, patch: { ...settings.patch, ...attributes.patch } };
22
22
  }
23
23
  /** A headless section store. React owns subscriptions/effects, never this state. */
24
- export function createFieldAttributesDialogController({ field }, _optional = {}) {
25
- const store = createFormsDraftStore({ initial: initialFieldAttributesDialogState({ field }) });
24
+ export function createFieldAttributesDialogController({ field, catalog }, _optional = {}) {
25
+ const store = createFormsDraftStore({ initial: initialFieldAttributesDialogState({ field, catalog }) });
26
+ let nextAttrRowId = store.getSnapshot().rows.length;
26
27
  const editSettings = (change) => store.update({ key: 'settings', value: change });
27
28
  const editOptions = (change) => editSettings(settings => ({ ...settings, options: change(settings.options) }));
28
29
  return {
@@ -50,12 +51,13 @@ export function createFieldAttributesDialogController({ field }, _optional = {})
50
51
  store.update({ key: 'rows', value: rows => removeAttrRow({ rows, rowId }) });
51
52
  },
52
53
  addRow(_required, _options = {}) {
53
- store.update({ key: 'rows', value: rows => addAttrRow({ rows }) });
54
+ const rowId = nextAttrRowId++;
55
+ store.update({ key: 'rows', value: rows => addAttrRow({ rows, rowId }) });
54
56
  },
55
57
  /** Settings are checked first: they sit above the attribute rows in the dialog. */
56
58
  submit(_required, _options = {}) {
57
59
  const snapshot = store.getSnapshot();
58
- const settings = buildFieldSettingsPatch({ form: snapshot.settings, field });
60
+ const settings = buildFieldSettingsPatch({ form: snapshot.settings, field, catalog });
59
61
  const attributes = buildFieldAttributesPatch(snapshot);
60
62
  const result = mergeSubmitPatches(settings, attributes);
61
63
  store.update({ key: 'error', value: result.ok ? null : result.error });
@@ -1,4 +1,5 @@
1
1
  import type { AdminFormProviderSelection } from "../../core/ports/forms.js";
2
+ import type { FormsCatalogPort } from "../../core/ports/forms-catalog.js";
2
3
  import type { AdminFormDefinition, AdminFormField, AdminFormNotify } from "../models.js";
3
4
  export interface FormEditorState {
4
5
  form: AdminFormDefinition | null;
@@ -18,7 +19,9 @@ export declare function initialFormEditorState(_required: Record<string, never>,
18
19
  /** A headless section store. React owns subscriptions/effects, never this state.
19
20
  * @complexity O(1) construction; HTML starter generation is O(fields + generated bytes), no I/O.
20
21
  * @overallScore 97 — Recommended: callers replace provider configuration rather than mutate its readonly record. */
21
- export declare function createFormEditorController(_required: Record<string, never>, _optional?: {}): {
22
+ export declare function createFormEditorController({ catalog }: {
23
+ catalog: FormsCatalogPort;
24
+ }, _optional?: {}): {
22
25
  seed({ form }: {
23
26
  form: AdminFormDefinition;
24
27
  }, _options?: {}): void;
@@ -27,11 +30,11 @@ export declare function createFormEditorController(_required: Record<string, nev
27
30
  }, { submitLabel }?: {
28
31
  submitLabel?: string;
29
32
  }): void;
30
- getSnapshot: () => Readonly<FormEditorState>;
31
- subscribe: ({ listener }: {
33
+ getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => FormEditorState;
34
+ subscribe: (required: {
32
35
  listener: () => void;
33
- }) => () => void;
34
- dispose: () => void;
36
+ }, optional?: Record<string, never>) => () => void;
37
+ dispose: (required?: Record<string, never>, optional?: Record<string, never>) => void;
35
38
  update<K extends keyof FormEditorState>({ key, value }: {
36
39
  key: K;
37
40
  value: FormEditorState[K] | ((current: FormEditorState[K]) => FormEditorState[K]);
@@ -10,7 +10,7 @@ export function initialFormEditorState(_required, _optional = {}) {
10
10
  /** A headless section store. React owns subscriptions/effects, never this state.
11
11
  * @complexity O(1) construction; HTML starter generation is O(fields + generated bytes), no I/O.
12
12
  * @overallScore 97 — Recommended: callers replace provider configuration rather than mutate its readonly record. */
13
- export function createFormEditorController(_required, _optional = {}) {
13
+ export function createFormEditorController({ catalog }, _optional = {}) {
14
14
  const store = createFormsDraftStore({ initial: initialFormEditorState({}) });
15
15
  return {
16
16
  ...store,
@@ -19,7 +19,7 @@ export function createFormEditorController(_required, _optional = {}) {
19
19
  },
20
20
  changeMode({ mode }, { submitLabel = 'Send' } = {}) {
21
21
  const state = store.getSnapshot();
22
- const html = mode === 'html' && !state.html ? formHtmlStarter({ fields: state.fields }, { submitLabel }) : state.html;
22
+ const html = mode === 'html' && !state.html ? formHtmlStarter({ fields: state.fields, catalog }, { submitLabel }) : state.html;
23
23
  store.patch({ patch: { mode, html } });
24
24
  },
25
25
  };
@@ -4,11 +4,11 @@ export interface FormFieldsEditorState {
4
4
  export declare function initialFormFieldsEditorState(_required: Record<string, never>, _optional?: {}): FormFieldsEditorState;
5
5
  /** A headless section store. React owns subscriptions/effects, never this state. */
6
6
  export declare function createFormFieldsEditorController(_required: Record<string, never>, _optional?: {}): {
7
- getSnapshot: () => Readonly<FormFieldsEditorState>;
8
- subscribe: ({ listener }: {
7
+ getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => FormFieldsEditorState;
8
+ subscribe: (required: {
9
9
  listener: () => void;
10
- }) => () => void;
11
- dispose: () => void;
10
+ }, optional?: Record<string, never>) => () => void;
11
+ dispose: (required?: Record<string, never>, optional?: Record<string, never>) => void;
12
12
  update<K extends "editingAttrsIndex">({ key, value }: {
13
13
  key: K;
14
14
  value: FormFieldsEditorState[K] | ((current: FormFieldsEditorState[K]) => FormFieldsEditorState[K]);
@@ -4,11 +4,11 @@ export interface FormSubmissionDetailState {
4
4
  export declare function initialFormSubmissionDetailState(_required: Record<string, never>, _optional?: {}): FormSubmissionDetailState;
5
5
  /** A headless section store. React owns subscriptions/effects, never this state. */
6
6
  export declare function createFormSubmissionDetailController(_required: Record<string, never>, _optional?: {}): {
7
- getSnapshot: () => Readonly<FormSubmissionDetailState>;
8
- subscribe: ({ listener }: {
7
+ getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => FormSubmissionDetailState;
8
+ subscribe: (required: {
9
9
  listener: () => void;
10
- }) => () => void;
11
- dispose: () => void;
10
+ }, optional?: Record<string, never>) => () => void;
11
+ dispose: (required?: Record<string, never>, optional?: Record<string, never>) => void;
12
12
  update<K extends "confirmOpen">({ key, value }: {
13
13
  key: K;
14
14
  value: FormSubmissionDetailState[K] | ((current: FormSubmissionDetailState[K]) => FormSubmissionDetailState[K]);
@@ -9,11 +9,11 @@ export interface FormSubmissionsState {
9
9
  export declare function initialFormSubmissionsState(_required: Record<string, never>, _optional?: {}): FormSubmissionsState;
10
10
  /** A headless section store. React owns subscriptions/effects, never this state. */
11
11
  export declare function createFormSubmissionsController(_required: Record<string, never>, _optional?: {}): {
12
- getSnapshot: () => Readonly<FormSubmissionsState>;
13
- subscribe: ({ listener }: {
12
+ getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => FormSubmissionsState;
13
+ subscribe: (required: {
14
14
  listener: () => void;
15
- }) => () => void;
16
- dispose: () => void;
15
+ }, optional?: Record<string, never>) => () => void;
16
+ dispose: (required?: Record<string, never>, optional?: Record<string, never>) => void;
17
17
  update<K extends keyof FormSubmissionsState>({ key, value }: {
18
18
  key: K;
19
19
  value: FormSubmissionsState[K] | ((current: FormSubmissionsState[K]) => FormSubmissionsState[K]);
@@ -6,11 +6,11 @@ export interface FormsListState {
6
6
  export declare function initialFormsListState(_required: Record<string, never>, _optional?: {}): FormsListState;
7
7
  /** A headless section store. React owns subscriptions/effects, never this state. */
8
8
  export declare function createFormsListController(_required: Record<string, never>, _optional?: {}): {
9
- getSnapshot: () => Readonly<FormsListState>;
10
- subscribe: ({ listener }: {
9
+ getSnapshot: (required?: Record<string, never>, optional?: Record<string, never>) => FormsListState;
10
+ subscribe: (required: {
11
11
  listener: () => void;
12
- }) => () => void;
13
- dispose: () => void;
12
+ }, optional?: Record<string, never>) => () => void;
13
+ dispose: (required?: Record<string, never>, optional?: Record<string, never>) => void;
14
14
  update<K extends keyof FormsListState>({ key, value }: {
15
15
  key: K;
16
16
  value: FormsListState[K] | ((current: FormsListState[K]) => FormsListState[K]);
@@ -1,9 +1,9 @@
1
- import { type FieldType } from "@jini-ai/cms/forms";
1
+ import type { FormsCatalogPort } from "../core/ports/forms-catalog.js";
2
2
  import type { AdminFormField } from "./models.js";
3
- /** Plain-language type names (translation keys). Exhaustive over the registry by type. */
4
- export declare const FIELD_TYPE_LABELS: Record<FieldType, string>;
5
- export type FieldBounds = "number" | "date" | "time" | "datetime-local";
6
- export type FieldDefaultKind = "text" | "textarea" | "number" | "temporal" | "boolean" | "choice" | "choices";
3
+ /** Plain-language type names (translation keys) for the types admin knows. */
4
+ export declare const FIELD_TYPE_LABELS: Readonly<Record<string, string>>;
5
+ type FieldBounds = "number" | "date" | "time" | "datetime-local";
6
+ type FieldDefaultKind = "text" | "textarea" | "number" | "temporal" | "boolean" | "choice" | "choices";
7
7
  /** Which builder settings apply to one field type. */
8
8
  export interface FieldSettings {
9
9
  placeholder: boolean;
@@ -23,17 +23,19 @@ export interface FieldSettings {
23
23
  * text only, so the editor never offers a setting the server would refuse.
24
24
  * @complexity O(1).
25
25
  */
26
- export declare function fieldSettingsFor({ type }: {
26
+ export declare function fieldSettingsFor({ type, catalog }: {
27
27
  type: string;
28
+ catalog: FormsCatalogPort;
28
29
  }, _optional?: Record<string, never>): FieldSettings;
29
- export type FieldTypeGroup = "Text" | "Numbers and dates" | "Choices" | "Other";
30
+ type FieldTypeGroup = "Text" | "Numbers and dates" | "Choices" | "Other";
30
31
  /**
31
32
  * The type picker's `<optgroup>`s, in registry order within each group. A stored type the
32
33
  * registry does not know is kept as its own trailing option so loading never changes it.
33
34
  * @complexity O(t) in registered types.
34
35
  */
35
- export declare function fieldTypeGroups({ current }: {
36
+ export declare function fieldTypeGroups({ current, catalog }: {
36
37
  current?: string;
38
+ catalog: FormsCatalogPort;
37
39
  }, _optional?: Record<string, never>): Array<{
38
40
  group: FieldTypeGroup;
39
41
  types: Array<{
@@ -61,9 +63,10 @@ export declare function labelChangePatch({ field, label, isExisting }: {
61
63
  * Identity, label, help text and styling always survive.
62
64
  * @complexity O(1) apart from copying the option list.
63
65
  */
64
- export declare function retypeField({ field, type }: {
66
+ export declare function retypeField({ field, type, catalog }: {
65
67
  field: AdminFormField;
66
68
  type: AdminFormField["type"];
69
+ catalog: FormsCatalogPort;
67
70
  }, _optional?: Record<string, never>): AdminFormField;
68
71
  /** Local React keys for option rows; identity is scoped to the editor's own row list. */
69
72
  export interface OptionRow {
@@ -89,8 +92,9 @@ export interface FieldSettingsForm {
89
92
  maxFileSizeMb: string;
90
93
  }
91
94
  /** Seed the draft from a stored field. @complexity O(o) in options. */
92
- export declare function settingsFormFromField({ field }: {
95
+ export declare function settingsFormFromField({ field, catalog }: {
93
96
  field: AdminFormField;
97
+ catalog: FormsCatalogPort;
94
98
  }, _optional?: Record<string, never>): FieldSettingsForm;
95
99
  /**
96
100
  * Edit one option row. A value that still mirrors its label follows label edits, so typing labels
@@ -117,13 +121,23 @@ export declare function moveOptionRow({ rows, rowId, offset }: {
117
121
  rowId: number;
118
122
  offset: -1 | 1;
119
123
  }, _optional?: Record<string, never>): OptionRow[];
120
- /** Upload groups offered as checkboxes; values are accept entries the CMS recognizes. */
121
- export declare const UPLOAD_CHOICES: {
124
+ /**
125
+ * Upload groups offered as checkboxes; values are accept entries the CMS recognizes.
126
+ * The CMS widens `image/*`/`video/*` to its safe formats only; PDF is its one safe document type.
127
+ * Read from the catalog at call time: a port cannot be read when this module loads.
128
+ * @complexity O(1).
129
+ */
130
+ export declare function uploadChoices({ catalog }: {
131
+ catalog: FormsCatalogPort;
132
+ }, _optional?: Record<string, never>): Array<{
122
133
  value: string;
123
134
  label: string;
124
- }[];
125
- export declare const MAX_UPLOAD_MB: number;
126
- export type FieldSettingsPatchResult = {
135
+ }>;
136
+ /** The largest upload the form builder offers, in megabytes: the catalog's byte cap. @complexity O(1). */
137
+ export declare function maxUploadMb({ catalog }: {
138
+ catalog: FormsCatalogPort;
139
+ }, _optional?: Record<string, never>): number;
140
+ type FieldSettingsPatchResult = {
127
141
  ok: true;
128
142
  patch: Partial<AdminFormField>;
129
143
  } | {
@@ -136,8 +150,10 @@ export type FieldSettingsPatchResult = {
136
150
  * is omitted for unsupported types; `retypeField` already drops it on a type change. First failure wins.
137
151
  * @complexity O(o) in options.
138
152
  */
139
- export declare function buildFieldSettingsPatch({ form, field }: {
153
+ export declare function buildFieldSettingsPatch({ form, field, catalog }: {
140
154
  form: FieldSettingsForm;
141
155
  field: Pick<AdminFormField, "type" | "checkboxValue">;
156
+ catalog: FormsCatalogPort;
142
157
  }, _optional?: Record<string, never>): FieldSettingsPatchResult;
158
+ export {};
143
159
  //# sourceMappingURL=field-settings.d.ts.map