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

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 (587) hide show
  1. package/CHANGELOG.md +4 -4
  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/messages.en.d.ts +1 -0
  374. package/dist/redirects/messages.en.js +1 -0
  375. package/dist/redirects/ports.d.ts +2 -2
  376. package/dist/redirects/ports.js +1 -1
  377. package/dist/redirects/react/components/CreateRedirectForm.d.ts +17 -0
  378. package/dist/redirects/react/components/CreateRedirectForm.js +19 -0
  379. package/dist/redirects/react/components/HitCountCell.js +2 -2
  380. package/dist/redirects/react/components/ImportRedirectsForm.js +1 -1
  381. package/dist/redirects/react/hooks/RedirectsPage.hooks.d.ts +1 -1
  382. package/dist/redirects/react/hooks/RedirectsPorts.hooks.d.ts +5 -0
  383. package/dist/redirects/react/hooks/RedirectsPorts.hooks.js +11 -1
  384. package/dist/redirects/react/hooks/use-hit-count-cell.hooks.js +3 -3
  385. package/dist/redirects/react/hooks/use-import-redirects-form.hooks.js +4 -4
  386. package/dist/redirects/react/hooks/use-redirects.hooks.d.ts +1 -1
  387. package/dist/redirects/react/hooks/use-redirects.hooks.js +4 -4
  388. package/dist/redirects/react/hooks/wired.hooks.d.ts +1 -1
  389. package/dist/redirects/react/index.d.ts +28 -90
  390. package/dist/redirects/react/index.js +6 -7
  391. package/dist/redirects/react/pages/RedirectsPage.d.ts +3 -1
  392. package/dist/redirects/react/pages/RedirectsPage.js +5 -5
  393. package/dist/redirects/redirects.module.d.ts +3 -2
  394. package/dist/redirects/redirects.module.js +1 -1
  395. package/dist/security/controllers/access-tokens.controller.d.ts +4 -4
  396. package/dist/security/controllers/access-tokens.controller.js +20 -15
  397. package/dist/security/controllers/other-credentials.controller.d.ts +4 -4
  398. package/dist/security/controllers/other-credentials.controller.js +1 -1
  399. package/dist/security/controllers/root-key.controller.d.ts +4 -4
  400. package/dist/security/controllers/root-key.controller.js +1 -1
  401. package/dist/security/ports.d.ts +3 -3
  402. package/dist/security/ports.js +1 -1
  403. package/dist/security/react/components/CredentialEditor.d.ts +4 -2
  404. package/dist/security/react/components/CredentialEditor.js +3 -3
  405. package/dist/security/react/hooks/AccessTokensTab.hooks.d.ts +5 -5
  406. package/dist/security/react/hooks/RootKeyTab.hooks.d.ts +1 -1
  407. package/dist/security/react/hooks/SecurityPage.hooks.d.ts +7 -3
  408. package/dist/security/react/hooks/SecurityPorts.hooks.js +1 -1
  409. package/dist/security/react/index.d.ts +22 -22
  410. package/dist/security/react/pages/SecurityPage.d.ts +8 -2
  411. package/dist/security/react/pages/SecurityPage.js +3 -3
  412. package/dist/security/react/tabs/AccessTokensTab.d.ts +5 -2
  413. package/dist/security/react/tabs/AccessTokensTab.js +3 -3
  414. package/dist/security/react/tabs/RootKeyTab.d.ts +5 -2
  415. package/dist/security/react/tabs/RootKeyTab.js +3 -3
  416. package/dist/security/rules.d.ts +1 -1
  417. package/dist/security/security.module.d.ts +4 -4
  418. package/dist/security/security.module.js +1 -1
  419. package/dist/seo/controllers/entry-picker.controller.d.ts +7 -7
  420. package/dist/seo/controllers/entry-picker.controller.js +1 -1
  421. package/dist/seo/controllers/entry-section.controller.d.ts +9 -9
  422. package/dist/seo/controllers/entry-section.controller.js +1 -1
  423. package/dist/seo/controllers/media-ref.controller.d.ts +9 -9
  424. package/dist/seo/controllers/media-ref.controller.js +1 -1
  425. package/dist/seo/controllers/seo-entry.controller.d.ts +7 -7
  426. package/dist/seo/controllers/seo-entry.controller.js +1 -1
  427. package/dist/seo/controllers/seo.controller.d.ts +7 -7
  428. package/dist/seo/controllers/seo.controller.js +1 -1
  429. package/dist/seo/controllers/sitemap.controller.d.ts +7 -7
  430. package/dist/seo/controllers/sitemap.controller.js +2 -2
  431. package/dist/seo/index.d.ts +4 -2
  432. package/dist/seo/index.js +2 -2
  433. package/dist/seo/ports.d.ts +2 -2
  434. package/dist/seo/ports.js +1 -1
  435. package/dist/seo/react/components/AnalyzePanel.d.ts +13 -0
  436. package/dist/seo/react/components/AnalyzePanel.js +21 -0
  437. package/dist/seo/react/components/EntryPicker.d.ts +19 -0
  438. package/dist/seo/react/components/EntryPicker.js +25 -0
  439. package/dist/seo/react/components/MediaPickerBridge.d.ts +4 -1
  440. package/dist/seo/react/components/MediaPickerBridge.js +2 -2
  441. package/dist/seo/react/components/MediaRefField.d.ts +5 -2
  442. package/dist/seo/react/components/MediaRefField.js +5 -5
  443. package/dist/seo/react/components/SeoEntryFields.d.ts +19 -0
  444. package/dist/seo/react/components/SeoEntryFields.js +19 -0
  445. package/dist/seo/react/components/SeoEntryPanel.d.ts +31 -0
  446. package/dist/seo/react/components/SeoEntryPanel.js +64 -0
  447. package/dist/seo/react/components/SeoIcons.d.ts +3 -3
  448. package/dist/seo/react/components/SeoIcons.js +3 -3
  449. package/dist/seo/react/components/SeoSection.d.ts +27 -0
  450. package/dist/seo/react/components/SeoSection.js +24 -0
  451. package/dist/seo/react/components/SitemapModal.d.ts +42 -2
  452. package/dist/seo/react/components/SitemapModal.js +17 -17
  453. package/dist/seo/react/hooks/MediaRefField.hooks.js +6 -6
  454. package/dist/seo/react/hooks/SeoModuleTabs.d.ts +2 -2
  455. package/dist/seo/react/hooks/SeoModuleTabs.js +3 -1
  456. package/dist/seo/react/hooks/SeoPage.hooks.d.ts +2 -2
  457. package/dist/seo/react/hooks/SeoPorts.hooks.d.ts +5 -0
  458. package/dist/seo/react/hooks/SeoPorts.hooks.js +11 -1
  459. package/dist/seo/react/hooks/SeoQuery.hooks.d.ts +3 -3
  460. package/dist/seo/react/hooks/SeoQuery.hooks.js +1 -1
  461. package/dist/seo/react/hooks/SitemapModal.hooks.js +1 -1
  462. package/dist/seo/react/hooks/use-entry-picker.hooks.js +1 -1
  463. package/dist/seo/react/hooks/use-seo-entry-panel.hooks.js +3 -3
  464. package/dist/seo/react/hooks/use-seo-entry-section.hooks.js +2 -2
  465. package/dist/seo/react/hooks/use-seo.hooks.js +3 -3
  466. package/dist/seo/react/hooks/use-share-image-warning.hooks.js +1 -1
  467. package/dist/seo/react/hooks/use-sitemap-modal.hooks.d.ts +4 -1
  468. package/dist/seo/react/hooks/use-sitemap-modal.hooks.js +6 -5
  469. package/dist/seo/react/index.d.ts +28 -21
  470. package/dist/seo/react/index.js +5 -6
  471. package/dist/seo/react/pages/SeoPage.d.ts +16 -82
  472. package/dist/seo/react/pages/SeoPage.js +29 -216
  473. package/dist/seo/react/tabs/SeoDefaultsSections.d.ts +19 -0
  474. package/dist/seo/react/tabs/SeoDefaultsSections.js +48 -0
  475. package/dist/seo/react/tabs/SeoDefaultsTab.d.ts +24 -0
  476. package/dist/seo/react/tabs/SeoDefaultsTab.js +30 -0
  477. package/dist/seo/react/tabs/SeoSitemapTab.d.ts +24 -0
  478. package/dist/seo/react/tabs/SeoSitemapTab.js +38 -0
  479. package/dist/seo/rules.d.ts +3 -3
  480. package/dist/seo/rules.js +6 -6
  481. package/dist/seo/seo.module.d.ts +3 -3
  482. package/dist/seo/seo.module.js +1 -1
  483. package/dist/source-control/controllers/source-control.controller.d.ts +3 -3
  484. package/dist/source-control/controllers/source-control.controller.js +1 -1
  485. package/dist/source-control/ports.d.ts +1 -1
  486. package/dist/source-control/ports.js +1 -1
  487. package/dist/source-control/react/components/SourceControlCredentialFields.d.ts +4 -2
  488. package/dist/source-control/react/components/SourceControlCredentialFields.js +3 -3
  489. package/dist/source-control/react/components/SourceControlProviderRow.d.ts +1 -1
  490. package/dist/source-control/react/components/SourceControlProviderRow.js +2 -2
  491. package/dist/source-control/react/hooks/ProvidersTab.hooks.d.ts +1 -1
  492. package/dist/source-control/react/hooks/ProvidersTab.hooks.js +2 -2
  493. package/dist/source-control/react/hooks/SourceControlPage.hooks.d.ts +7 -3
  494. package/dist/source-control/react/hooks/SourceControlPorts.hooks.d.ts +5 -0
  495. package/dist/source-control/react/hooks/SourceControlPorts.hooks.js +11 -1
  496. package/dist/source-control/react/index.d.ts +25 -50
  497. package/dist/source-control/react/index.js +9 -6
  498. package/dist/source-control/react/pages/SourceControlPage.d.ts +8 -2
  499. package/dist/source-control/react/pages/SourceControlPage.js +3 -3
  500. package/dist/source-control/react/tabs/ProvidersTab.d.ts +5 -2
  501. package/dist/source-control/react/tabs/ProvidersTab.js +3 -3
  502. package/dist/source-control/source-control.module.d.ts +2 -2
  503. package/dist/source-control/source-control.module.js +1 -1
  504. package/dist/widgets/adapters/http.js +2 -2
  505. package/dist/widgets/adapters/memory.js +26 -20
  506. package/dist/widgets/controllers/instance-editor.controller.d.ts +3 -3
  507. package/dist/widgets/controllers/instance-editor.controller.js +48 -38
  508. package/dist/widgets/controllers/library.controller.d.ts +3 -3
  509. package/dist/widgets/controllers/library.controller.js +1 -2
  510. package/dist/widgets/controllers/region-editor.controller.d.ts +3 -3
  511. package/dist/widgets/controllers/region-editor.controller.js +5 -5
  512. package/dist/widgets/controllers/regions.controller.d.ts +3 -3
  513. package/dist/widgets/controllers/regions.controller.js +1 -2
  514. package/dist/widgets/index.d.ts +2 -1
  515. package/dist/widgets/index.js +1 -1
  516. package/dist/widgets/messages.en.js +1 -1
  517. package/dist/widgets/ports.d.ts +3 -3
  518. package/dist/widgets/ports.js +1 -1
  519. package/dist/widgets/react/components/RegionPlacementRow.d.ts +14 -0
  520. package/dist/widgets/react/components/RegionPlacementRow.js +8 -0
  521. package/dist/widgets/react/components/TrashWidgetDialog.d.ts +11 -0
  522. package/dist/widgets/react/components/TrashWidgetDialog.js +8 -0
  523. package/dist/widgets/react/components/WidgetInstanceNotices.js +1 -1
  524. package/dist/widgets/react/components/WidgetPageHeaders.d.ts +42 -0
  525. package/dist/widgets/react/components/WidgetPageHeaders.js +54 -0
  526. package/dist/widgets/react/components/WidgetRegionEditorHeaderActions.js +1 -1
  527. package/dist/widgets/react/components/WidgetTableColumns.d.ts +12 -0
  528. package/dist/widgets/react/components/WidgetTableColumns.js +47 -0
  529. package/dist/widgets/react/hooks/WidgetsPorts.hooks.d.ts +12 -7
  530. package/dist/widgets/react/hooks/WidgetsPorts.hooks.js +11 -0
  531. package/dist/widgets/react/hooks/WidgetsQuery.hooks.d.ts +2 -2
  532. package/dist/widgets/react/hooks/WidgetsQuery.hooks.js +1 -1
  533. package/dist/widgets/react/hooks/page-views.hooks.d.ts +1 -1
  534. package/dist/widgets/react/hooks/page-views.hooks.js +1 -1
  535. package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.d.ts +2 -2
  536. package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.js +3 -3
  537. package/dist/widgets/react/hooks/use-widget-region-editor.hooks.d.ts +1 -1
  538. package/dist/widgets/react/hooks/use-widget-region-editor.hooks.js +2 -2
  539. package/dist/widgets/react/hooks/use-widget-regions.hooks.d.ts +3 -1
  540. package/dist/widgets/react/hooks/use-widget-regions.hooks.js +7 -6
  541. package/dist/widgets/react/hooks/use-widgets-library.hooks.d.ts +4 -2
  542. package/dist/widgets/react/hooks/use-widgets-library.hooks.js +7 -6
  543. package/dist/widgets/react/index.d.ts +41 -34
  544. package/dist/widgets/react/index.js +5 -6
  545. package/dist/widgets/react/pages/WidgetInstanceEditor.d.ts +5 -1
  546. package/dist/widgets/react/pages/WidgetInstanceEditor.js +7 -9
  547. package/dist/widgets/react/pages/WidgetRegionEditor.d.ts +5 -1
  548. package/dist/widgets/react/pages/WidgetRegionEditor.js +8 -10
  549. package/dist/widgets/react/pages/WidgetRegions.d.ts +5 -1
  550. package/dist/widgets/react/pages/WidgetRegions.js +6 -8
  551. package/dist/widgets/react/pages/WidgetsLibrary.d.ts +5 -1
  552. package/dist/widgets/react/pages/WidgetsLibrary.js +8 -45
  553. package/dist/widgets/rules.d.ts +5 -3
  554. package/dist/widgets/rules.js +4 -9
  555. package/dist/widgets/widgets.module.d.ts +3 -3
  556. package/dist/widgets/widgets.module.js +1 -1
  557. package/package.json +25 -59
  558. package/dist/consent/react/ConsentFields.d.ts +0 -39
  559. package/dist/consent/react/ConsentFields.js +0 -87
  560. package/dist/consent/react/ConsentPreviewFrame.d.ts +0 -14
  561. package/dist/consent/react/ConsentPreviewFrame.js +0 -14
  562. package/dist/consent/react/ConsentSettingsPanel.d.ts +0 -54
  563. package/dist/consent/react/ConsentSettingsPanel.js +0 -13
  564. package/dist/consent/react/index.d.ts +0 -8
  565. package/dist/consent/react/index.js +0 -4
  566. package/dist/consent/react/settings-panel.hooks.d.ts +0 -49
  567. package/dist/consent/react/settings-panel.hooks.js +0 -57
  568. package/dist/core/module/controller-store.d.ts +0 -22
  569. package/dist/core/module/controller-store.js +0 -32
  570. package/dist/core/module/define-admin-module.d.ts +0 -4
  571. package/dist/core/module/define-admin-module.js +0 -5
  572. package/dist/core/module/token.d.ts +0 -19
  573. package/dist/core/module/token.js +0 -4
  574. package/dist/core/module/types.d.ts +0 -79
  575. package/dist/core/module/types.js +0 -2
  576. package/dist/core/permissions/rules.d.ts +0 -35
  577. package/dist/core/permissions/rules.js +0 -34
  578. package/dist/core/transport/errors.d.ts +0 -62
  579. package/dist/core/transport/errors.js +0 -63
  580. package/dist/core/transport/query-suffix.d.ts +0 -3
  581. package/dist/core/transport/query-suffix.js +0 -5
  582. package/dist/media/styles.d.ts +0 -4
  583. package/dist/media/styles.js +0 -5
  584. package/dist/react/bind-react.d.ts +0 -2
  585. package/dist/react/bind-react.js +0 -3
  586. package/dist/react/use-controller.d.ts +0 -2
  587. package/dist/react/use-controller.js +0 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jini-ai/admin",
3
- "version": "0.7.2",
3
+ "version": "0.7.3-next.2",
4
4
  "description": "Composable admin surface for Jini-hosted products: framework-free contracts, panel registry, and route model in `/core`; React shell and panels in `/react`. Import only the layers you need.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -24,9 +24,9 @@
24
24
  "./react/entities": "browser",
25
25
  "./browser/shell-navigation": "browser",
26
26
  "./core/module": "universal",
27
- "./react/bind-react": "browser",
28
- "./react/use-controller": "browser",
29
27
  "./react/overlays": "browser",
28
+ "./react/kit": "browser",
29
+ "./react/testing-kit": "browser",
30
30
  "./media": "universal",
31
31
  "./media/react": "browser",
32
32
  "./media/adapters/http": "universal",
@@ -78,15 +78,15 @@
78
78
  "./widgets/react": "browser",
79
79
  "./widgets/adapters/http": "universal",
80
80
  "./widgets/adapters/memory": "universal",
81
- "./widgets/conformance": "universal",
82
- "./consent/react": "browser"
81
+ "./widgets/conformance": "universal"
83
82
  },
84
83
  "isolation": {
85
84
  "shared": [
86
85
  "src/react/components/DataTable.tsx",
87
86
  "src/react/components/ConfirmDialog",
88
87
  "src/react/components/RowMenu",
89
- "src/react/types.ts"
88
+ "src/react/types.ts",
89
+ "src/react/kit.tsx"
90
90
  ],
91
91
  "forbidden": {
92
92
  "universal": [
@@ -97,12 +97,6 @@
97
97
  }
98
98
  },
99
99
  "optionalPeers": {
100
- "@jini-ai/agentic": "opt-in: agent-aware ui and protocols; import @jini-ai/admin/react — Agent-aware UI and protocols could not load @jini-ai/agentic. Install @jini-ai/agentic to enable this feature, or check its installed version and native binaries.",
101
- "@jini-ai/ui": "opt-in: ui integrations; import @jini-ai/admin/react — UI integrations could not load @jini-ai/ui. Install @jini-ai/ui to enable this feature, or check its installed version and native binaries.",
102
- "@jini-ai/ui-kit": "opt-in: ui kit integrations; import @jini-ai/admin/react — UI kit integrations could not load @jini-ai/ui-kit. Install @jini-ai/ui-kit to enable this feature, or check its installed version and native binaries.",
103
- "@jini-ai/agent-plugins": "opt-in: agent plugin integrations — Agent plugin integrations could not load @jini-ai/agent-plugins. Install @jini-ai/agent-plugins to enable this feature, or check its installed version and native binaries.",
104
- "@jini-ai/cms": "opt-in: cms integrations; import @jini-ai/admin/media — CMS integrations could not load @jini-ai/cms. Install @jini-ai/cms to enable this feature, or check its installed version and native binaries.",
105
- "@jini-ai/core": "opt-in: core module integrations; import @jini-ai/admin/react — Core module integrations could not load @jini-ai/core. Install @jini-ai/core to enable this feature, or check its installed version and native binaries.",
106
100
  "react": "opt-in: react admin bindings; import @jini-ai/admin/react — React admin bindings could not load react. Install react to enable this feature, or check its installed version.",
107
101
  "react-dom": "opt-in: react admin bindings; import @jini-ai/admin/react — React admin bindings could not load react-dom. Install react-dom to enable this feature, or check its installed version."
108
102
  }
@@ -157,21 +151,21 @@
157
151
  "import": "./dist/core/module/index.js",
158
152
  "default": "./dist/core/module/index.js"
159
153
  },
160
- "./react/bind-react": {
161
- "types": "./dist/react/bind-react.d.ts",
162
- "import": "./dist/react/bind-react.js",
163
- "default": "./dist/react/bind-react.js"
164
- },
165
- "./react/use-controller": {
166
- "types": "./dist/react/use-controller.d.ts",
167
- "import": "./dist/react/use-controller.js",
168
- "default": "./dist/react/use-controller.js"
169
- },
170
154
  "./react/overlays": {
171
155
  "types": "./dist/react/overlays.d.ts",
172
156
  "import": "./dist/react/overlays.js",
173
157
  "default": "./dist/react/overlays.js"
174
158
  },
159
+ "./react/kit": {
160
+ "types": "./dist/react/kit.d.ts",
161
+ "import": "./dist/react/kit.js",
162
+ "default": "./dist/react/kit.js"
163
+ },
164
+ "./react/testing-kit": {
165
+ "types": "./dist/react/testing-kit.d.ts",
166
+ "import": "./dist/react/testing-kit.js",
167
+ "default": "./dist/react/testing-kit.js"
168
+ },
175
169
  "./media": {
176
170
  "types": "./dist/media/index.d.ts",
177
171
  "import": "./dist/media/index.js",
@@ -431,11 +425,6 @@
431
425
  "types": "./dist/widgets/conformance/widgets-api.conformance.d.ts",
432
426
  "import": "./dist/widgets/conformance/widgets-api.conformance.js",
433
427
  "default": "./dist/widgets/conformance/widgets-api.conformance.js"
434
- },
435
- "./consent/react": {
436
- "types": "./dist/consent/react/index.d.ts",
437
- "import": "./dist/consent/react/index.js",
438
- "default": "./dist/consent/react/index.js"
439
428
  }
440
429
  },
441
430
  "files": [
@@ -458,29 +447,24 @@
458
447
  "peerDependencies": {
459
448
  "react": "^18.3.0 || ^19.0.0",
460
449
  "react-dom": "^18.3.0 || ^19.0.0",
461
- "@jini-ai/agentic": "^0.7.0",
462
- "@jini-ai/ui": "^0.7.0",
463
- "@jini-ai/ui-kit": "^0.7.0",
464
- "@jini-ai/agent-plugins": "^0.7.0",
465
- "@jini-ai/cms": "^0.7.0",
466
- "@jini-ai/core": "^0.7.0"
450
+ "@jini-ai/core": "^0.7.3-next.2"
467
451
  },
468
452
  "devDependencies": {
469
453
  "@testing-library/jest-dom": "^6.6.3",
470
454
  "@testing-library/react": "^16.3.0",
471
455
  "@types/react": "^19.2.0",
472
456
  "@types/react-dom": "^19.2.0",
473
- "@vitest/coverage-v8": "^2.1.9",
474
- "jsdom": "^25.0.1",
457
+ "@vitest/coverage-v8": "^3.2.6",
458
+ "jsdom": "^26.1.0",
475
459
  "react": "^19.2.0",
476
460
  "react-dom": "^19.2.0",
477
461
  "@testing-library/user-event": "^14.6.1",
478
- "@jini-ai/ui": "^0.7.2",
479
- "@jini-ai/agentic": "^0.7.2",
480
- "@jini-ai/cms": "^0.7.2",
481
- "@jini-ai/core": "^0.7.2",
482
- "@jini-ai/ui-kit": "^0.7.2",
483
- "@jini-ai/agent-plugins": "^0.7.2"
462
+ "@jini-ai/agentic": "^0.7.3-next.2",
463
+ "@jini-ai/ui": "^0.7.3-next.2",
464
+ "@jini-ai/ui-kit": "^0.7.3-next.2",
465
+ "@jini-ai/agent-plugins": "^0.7.3-next.2",
466
+ "@jini-ai/cms": "^0.7.3-next.2",
467
+ "@jini-ai/core": "^0.7.3-next.2"
484
468
  },
485
469
  "typesVersions": {
486
470
  "*": {
@@ -490,24 +474,6 @@
490
474
  }
491
475
  },
492
476
  "peerDependenciesMeta": {
493
- "@jini-ai/agentic": {
494
- "optional": true
495
- },
496
- "@jini-ai/ui": {
497
- "optional": true
498
- },
499
- "@jini-ai/ui-kit": {
500
- "optional": true
501
- },
502
- "@jini-ai/agent-plugins": {
503
- "optional": true
504
- },
505
- "@jini-ai/cms": {
506
- "optional": true
507
- },
508
- "@jini-ai/core": {
509
- "optional": true
510
- },
511
477
  "react": {
512
478
  "optional": true
513
479
  },
@@ -1,39 +0,0 @@
1
- import type { ConsentFieldProblem, ConsentSettingsView } from './ConsentSettingsPanel.js';
2
- /**
3
- * @file The consent settings split into the three sections a host can place on its own tabs:
4
- * Banner (copy and links), Look (placement and appearance) and Rules (on/off, region, version).
5
- * `ConsentSettingsPanel` stacks all three for hosts that want one screen. Every section is
6
- * controlled: it renders `value`, reports edits as patches and shows the host's `problems` next to
7
- * the field each one names. Hosts style the plain `jini-` classes.
8
- */
9
- type TextKey = 'title' | 'message' | 'acceptLabel' | 'rejectLabel' | 'preferencesLabel' | 'privacyPolicyUrl' | 'secondaryLinkLabel' | 'secondaryLinkUrl';
10
- export interface ConsentFieldsProps {
11
- value: ConsentSettingsView;
12
- onChange(required: {
13
- patch: Partial<ConsentSettingsView>;
14
- }, optional?: Record<string, never>): void;
15
- disabled?: boolean | undefined;
16
- /** Server/engine problems; each one with a matching `field` renders under that control. */
17
- problems?: readonly ConsentFieldProblem[] | undefined;
18
- /** Host translations keyed by the exact fallback copy; unspecified entries use English. */
19
- dictionary?: Readonly<Record<string, string>> | undefined;
20
- /** Host max lengths per text field; the defaults are the engine's loosest bounds. */
21
- limits?: Readonly<Partial<Record<TextKey | 'policyVersion', number>>> | undefined;
22
- }
23
- /** Banner copy and its links. Optional host modes report only a mode patch; the host's independent
24
- * enabled switch stays authoritative. Text is always plain text.
25
- * @example <ConsentBannerFields value={value} onChange={onChange} bannerModes={['jini', 'headless', 'off']} /> */
26
- export declare function ConsentBannerFields({ value, onChange, disabled, problems, dictionary, limits, bannerModes }: ConsentFieldsProps & {
27
- bannerModes?: readonly NonNullable<ConsentSettingsView['bannerMode']>[] | undefined;
28
- }): import("react").JSX.Element;
29
- /** On/off, region behavior and the version that re-asks visitors when it changes. */
30
- export declare function ConsentRulesFields({ value, onChange, disabled, problems, dictionary, limits, regionModes }: ConsentFieldsProps & {
31
- regionModes?: readonly ConsentSettingsView['regionMode'][];
32
- }): import("react").JSX.Element;
33
- /** Placement, bounded appearance tokens and allowlisted custom CSS. The engine checks contrast and
34
- * CSS safety; its problems arrive on the `appearance` field and show under the custom CSS. */
35
- export declare function ConsentLookFields({ value, onChange, disabled, problems, dictionary, placements }: ConsentFieldsProps & {
36
- placements?: readonly string[];
37
- }): import("react").JSX.Element;
38
- export {};
39
- //# sourceMappingURL=ConsentFields.d.ts.map
@@ -1,87 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useId } from 'react';
3
- import { defaultAdminTheme } from '@jini-ai/ui/theme';
4
- import { pixelInputValue, problemsFor, useConsentSettingsPanel, usePolicyVersionInput } from './settings-panel.hooks.js';
5
- const BANNER_FIELDS = [
6
- { key: 'title', label: 'Banner title' }, { key: 'message', label: 'Banner message', multiline: true },
7
- { key: 'acceptLabel', label: 'Accept button text' }, { key: 'rejectLabel', label: 'Reject button text' },
8
- { key: 'preferencesLabel', label: 'Preferences label' }, { key: 'privacyPolicyUrl', label: 'Privacy policy page URL' },
9
- { key: 'secondaryLinkLabel', label: 'Second link text' }, { key: 'secondaryLinkUrl', label: 'Second link URL' },
10
- ];
11
- const BANNER_MODE_LABELS = { jini: 'Jini banner', headless: 'My own', off: 'None' };
12
- const REGION_LABELS = {
13
- auto: 'Automatic (unknown region: opt-in)', 'opt-in': 'Opt-in everywhere (EU / UK)', 'opt-out': 'Opt-out everywhere (California)',
14
- };
15
- const PLACEMENT_LABELS = { 'bottom-bar': 'Bottom bar', 'bottom-left': 'Bottom left', 'bottom-right': 'Bottom right', 'top-bar': 'Top bar' };
16
- // Native color inputs need concrete colors rather than CSS variable expressions.
17
- const COLOR_TOKENS = [
18
- { key: 'backgroundColor', label: 'Background', fallback: defaultAdminTheme.light.bg }, { key: 'textColor', label: 'Text', fallback: defaultAdminTheme.light.text }, { key: 'borderColor', label: 'Border', fallback: defaultAdminTheme.light.border },
19
- ];
20
- /** The engine's own pixel bounds (`compileConsentCss`); out-of-range values come back as problems. */
21
- const PIXEL_TOKENS = [
22
- { key: 'borderRadius', label: 'Corner radius (px)', min: 0, max: 32 }, { key: 'padding', label: 'Padding (px)', min: 8, max: 32 },
23
- { key: 'fontSize', label: 'Text size (px)', min: 16, max: 24 }, { key: 'maxWidth', label: 'Max width (px)', min: 256, max: 960 },
24
- ];
25
- function translator(dictionary = {}) {
26
- return (text) => dictionary[text] ?? text;
27
- }
28
- /** One field's problems, linked to its control through `aria-describedby`. */
29
- function FieldProblems({ id, problems }) {
30
- if (!problems.length)
31
- return null;
32
- return _jsx("span", { id: id, className: "jini-consent-field-problems", children: problems.map(problem => _jsx("span", { className: "jini-hint jini-hint-error", children: problem.message }, `${problem.code ?? ''}${problem.message}`)) });
33
- }
34
- /** Label + control + problems. Problems sit outside the label so they never join the control's
35
- * name; they are its description and mark it invalid instead. */
36
- function Field({ label, field, problems, children }) {
37
- const id = useId();
38
- const own = problemsFor({ problems, field });
39
- const attributes = own.length ? { id, 'aria-invalid': true, 'aria-describedby': `${id}-problems` } : { id };
40
- return _jsxs("div", { className: "jini-consent-settings-field", children: [_jsx("label", { htmlFor: id, className: "jini-field-label", children: label }), children(attributes), _jsx(FieldProblems, { id: `${id}-problems`, problems: own })] });
41
- }
42
- /** Host-supplied banner modes. Native radios provide keyboard selection; the hint keeps its space
43
- * while hidden, and the parent fieldset supplies the disabled state. */
44
- function BannerModeFields({ value, onChange, dictionary, modes }) {
45
- const id = useId();
46
- const t = translator(dictionary);
47
- const handlers = useConsentSettingsPanel({ value, onChange });
48
- return _jsxs("fieldset", { className: "jini-consent-banner-modes", "aria-describedby": value.bannerMode === 'headless' ? `${id}-mode-hint` : undefined, children: [_jsx("legend", { children: t('Banner mode') }), _jsx("div", { className: "jini-consent-banner-options", children: modes.map(mode => _jsxs("label", { children: [_jsx("input", { type: "radio", name: `${id}-banner-mode`, value: mode, checked: (value.bannerMode ?? 'jini') === mode, onChange: handlers.bannerMode({ mode }) }), _jsx("span", { children: t(BANNER_MODE_LABELS[mode]) })] }, mode)) }), _jsx("p", { id: `${id}-mode-hint`, className: "jini-hint jini-consent-banner-mode-hint", style: { visibility: value.bannerMode === 'headless' ? 'visible' : 'hidden' }, children: t('Your banner calls window.jiniConsent.set(...)') })] });
49
- }
50
- /** Banner copy and its links. Optional host modes report only a mode patch; the host's independent
51
- * enabled switch stays authoritative. Text is always plain text.
52
- * @example <ConsentBannerFields value={value} onChange={onChange} bannerModes={['jini', 'headless', 'off']} /> */
53
- export function ConsentBannerFields({ value, onChange, disabled = false, problems, dictionary, limits = {}, bannerModes }) {
54
- const t = translator(dictionary);
55
- const handlers = useConsentSettingsPanel({ value, onChange });
56
- return _jsxs("fieldset", { disabled: disabled, className: "jini-consent-settings-fields", children: [_jsx("legend", { children: t('Banner text') }), bannerModes && _jsx(BannerModeFields, { value: value, onChange: onChange, dictionary: dictionary, modes: bannerModes }), BANNER_FIELDS.map(({ key, label, multiline }) => _jsx(Field, { label: t(label), field: key, problems: problems, children: aria => multiline
57
- ? _jsx("textarea", { className: "jini-input", value: value[key] ?? '', maxLength: limits[key] ?? 2000, rows: 3, onChange: handlers.text(key), ...aria })
58
- : _jsx("input", { className: "jini-input", type: "text", value: value[key] ?? '', maxLength: limits[key] ?? 2000, onChange: handlers.text(key), ...aria }) }, key)), _jsx("p", { className: "jini-hint", children: t('Link a published privacy page, such as /privacy. The second link is optional.') })] });
59
- }
60
- /** On/off, region behavior and the version that re-asks visitors when it changes. */
61
- export function ConsentRulesFields({ value, onChange, disabled = false, problems, dictionary, limits = {}, regionModes = ['auto', 'opt-in', 'opt-out'] }) {
62
- const id = useId();
63
- const t = translator(dictionary);
64
- const handlers = useConsentSettingsPanel({ value, onChange });
65
- const modes = regionModes.includes(value.regionMode) ? regionModes : [value.regionMode, ...regionModes];
66
- return _jsxs("fieldset", { disabled: disabled, className: "jini-consent-settings-fields", children: [_jsx("legend", { children: t('Rules') }), _jsxs("button", { type: "button", className: value.enabled ? 'jini-toggle-row on' : 'jini-toggle-row', role: "switch", "aria-checked": value.enabled, "aria-labelledby": `${id}-enabled`, "aria-describedby": `${id}-hint`, onClick: handlers.toggle, children: [_jsxs("span", { className: "jini-toggle-row-text", children: [_jsx("span", { id: `${id}-enabled`, className: "jini-toggle-row-label", children: t('Enable cookie consent on this site') }), _jsx("span", { id: `${id}-hint`, className: "jini-toggle-row-hint", children: t('Applies to published site pages.') })] }), _jsx("span", { className: "jini-toggle-row-switch", "aria-hidden": "true" })] }), _jsx(Field, { label: t('Region mode'), field: "regionMode", problems: problems, children: aria => _jsx("select", { className: "jini-input", value: value.regionMode, onChange: handlers.region, ...aria, children: modes.map(mode => _jsx("option", { value: mode, children: t(REGION_LABELS[mode]) }, mode)) }) }), _jsx("p", { className: "jini-hint", children: t('California permits optional categories until opt-out. Global Privacy Control always disables analytics and marketing.') }), _jsx(Field, { label: t('Policy version'), field: "policyVersion", problems: problems, children: aria => _jsx(PolicyVersionInput, { value: value.policyVersion, onChange: onChange, maxLength: limits.policyVersion ?? 128, aria: aria }) }), _jsx("p", { className: "jini-hint", children: t('Change the policy version to ask visitors to choose again.') })] });
67
- }
68
- /** Placement, bounded appearance tokens and allowlisted custom CSS. The engine checks contrast and
69
- * CSS safety; its problems arrive on the `appearance` field and show under the custom CSS. */
70
- export function ConsentLookFields({ value, onChange, disabled = false, problems, dictionary, placements = Object.keys(PLACEMENT_LABELS) }) {
71
- const t = translator(dictionary);
72
- const handlers = useConsentSettingsPanel({ value, onChange });
73
- const appearance = value.appearance ?? {};
74
- return _jsxs("fieldset", { disabled: disabled, className: "jini-consent-settings-fields", children: [_jsx("legend", { children: t('Look & position') }), _jsx(Field, { label: t('Position'), field: "placement", problems: problems, children: aria => _jsx("select", { className: "jini-input", value: value.placement ?? placements[0], onChange: handlers.placement, ...aria, children: placements.map(placement => _jsx("option", { value: placement, children: t(PLACEMENT_LABELS[placement] ?? placement) }, placement)) }) }), _jsxs("div", { className: "jini-consent-token-grid", children: [COLOR_TOKENS.map(token => _jsx(ColorToken, { label: t(token.label), value: appearance[token.key], fallback: token.fallback, resetLabel: t('Default'), onChange: handlers.token(token.key) }, token.key)), PIXEL_TOKENS.map(token => _jsx(Field, { label: t(token.label), field: token.key, children: attributes => _jsx("input", { className: "jini-input", type: "number", inputMode: "numeric", min: token.min, max: token.max, step: 1, placeholder: t('Default'), value: pixelInputValue({ value: appearance[token.key] }), onChange: event => handlers.token(token.key)(event.target.value === '' ? '' : `${event.target.value}px`), ...attributes }) }, token.key))] }), _jsx(Field, { label: t('Custom CSS'), field: "appearance", problems: problems, children: aria => _jsx("textarea", { className: "jini-input jini-consent-css", value: value.customCss ?? '', rows: 6, spellCheck: false, onChange: handlers.text('customCss'), ...aria }) }), _jsx("p", { className: "jini-hint", children: t('Only banner selectors and safe properties are allowed. Text needs 4.5:1 contrast.') })] });
75
- }
76
- /** A native color picker; unset shows the shared theme default and offers no reset. */
77
- function ColorToken({ label, value, fallback, resetLabel, onChange }) {
78
- const id = useId();
79
- return _jsxs("div", { className: "jini-consent-settings-field", children: [_jsx("label", { htmlFor: id, className: "jini-field-label", children: label }), _jsxs("span", { className: "jini-consent-color-row", children: [_jsx("input", { id: id, className: "jini-consent-color", type: "color", value: value ?? fallback, onChange: event => onChange(event.target.value) }), _jsx("code", { className: "jini-hint", children: value ?? resetLabel }), value !== undefined && _jsx("button", { type: "button", className: "jini-btn-link", "aria-label": `${resetLabel}: ${label}`, onClick: () => onChange(''), children: resetLabel })] })] });
80
- }
81
- /** Keep transient empty edits local; only a valid policy version reaches autosave.
82
- * Native validity gives keyboard users an actionable error. @complexity O(version length), <=128. */
83
- function PolicyVersionInput({ value, onChange, maxLength, aria }) {
84
- const { draft, change, blur } = usePolicyVersionInput({ value, onChange });
85
- return _jsx("input", { className: "jini-input", type: "text", value: draft, required: true, pattern: String.raw `.*\S.*`, maxLength: maxLength, onChange: change, onBlur: blur, ...aria });
86
- }
87
- //# sourceMappingURL=ConsentFields.js.map
@@ -1,14 +0,0 @@
1
- import { type ConsentPreviewWidth } from './settings-panel.hooks.js';
2
- export interface ConsentPreviewFrameProps {
3
- /** The engine-gated page; `null` while it loads or when the host could not render it. */
4
- html: string | null;
5
- /** Shown in place of the frame while `html` is null. */
6
- status?: string;
7
- initialWidth?: ConsentPreviewWidth;
8
- dictionary?: Readonly<Record<string, string>>;
9
- }
10
- /** The real rendered page with the banner, inert. The HTML is only ever the `srcdoc` of an iframe
11
- * with an empty `sandbox`: no scripts, forms, popups or same-origin access, and it never enters the
12
- * host DOM. Phone is 320px, the narrowest width the banner must still work at. */
13
- export declare function ConsentPreviewFrame({ html, status, initialWidth, dictionary }: ConsentPreviewFrameProps): import("react").JSX.Element;
14
- //# sourceMappingURL=ConsentPreviewFrame.d.ts.map
@@ -1,14 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useConsentPreviewWidth } from './settings-panel.hooks.js';
3
- const WIDTHS = [{ id: 'phone', label: 'Phone' }, { id: 'desktop', label: 'Desktop' }];
4
- /** The real rendered page with the banner, inert. The HTML is only ever the `srcdoc` of an iframe
5
- * with an empty `sandbox`: no scripts, forms, popups or same-origin access, and it never enters the
6
- * host DOM. Phone is 320px, the narrowest width the banner must still work at. */
7
- export function ConsentPreviewFrame({ html, status = '', initialWidth = 'desktop', dictionary = {} }) {
8
- const t = (text) => dictionary[text] ?? text;
9
- const { width, setWidth } = useConsentPreviewWidth({ initial: initialWidth });
10
- return _jsxs("section", { className: "jini-consent-preview", "aria-label": t('Banner preview'), children: [_jsx("div", { className: "jini-consent-preview-widths", role: "group", "aria-label": t('Preview width'), children: WIDTHS.map(option => _jsx("button", { type: "button", className: "jini-btn-secondary", "aria-pressed": width === option.id, onClick: () => setWidth(option.id), children: t(option.label) }, option.id)) }), html === null
11
- ? _jsx("p", { className: "jini-hint jini-consent-preview-empty", children: status })
12
- : _jsx("iframe", { className: `jini-consent-preview-frame is-${width}`, title: t('Banner preview'), sandbox: "", srcDoc: html, style: { width: width === 'phone' ? '320px' : '100%' } })] });
13
- }
14
- //# sourceMappingURL=ConsentPreviewFrame.js.map
@@ -1,54 +0,0 @@
1
- import { type ConsentFieldsProps } from './ConsentFields.js';
2
- /** Bounded appearance tokens, as the engine accepts them: opaque hex colors and `Npx` lengths. */
3
- export interface ConsentAppearanceView {
4
- backgroundColor?: string;
5
- textColor?: string;
6
- borderColor?: string;
7
- borderRadius?: string;
8
- padding?: string;
9
- fontSize?: string;
10
- maxWidth?: string;
11
- }
12
- /** The host's consent configuration. The look fields are optional so older hosts stay valid. */
13
- export interface ConsentSettingsView {
14
- enabled: boolean;
15
- /** @deprecated Retained for saved-settings compatibility; declared-script consent does not use it. */
16
- allowUnsafeEval?: boolean;
17
- /** Optional for older hosts; omitted uses the Jini banner when consent is enabled. */
18
- bannerMode?: 'jini' | 'headless' | 'off';
19
- regionMode: 'auto' | 'opt-in' | 'opt-out';
20
- policyVersion: string;
21
- privacyPolicyUrl: string;
22
- title: string;
23
- message: string;
24
- acceptLabel: string;
25
- rejectLabel: string;
26
- preferencesLabel: string;
27
- placement?: string;
28
- secondaryLinkLabel?: string;
29
- secondaryLinkUrl?: string;
30
- appearance?: ConsentAppearanceView;
31
- customCss?: string;
32
- }
33
- /** One validation result. `field` names the setting it belongs to; field-less problems are the host's to show. */
34
- export interface ConsentFieldProblem {
35
- message: string;
36
- field?: string;
37
- code?: string;
38
- }
39
- export interface ConsentSettingsPanelProps extends Pick<ConsentFieldsProps, 'problems' | 'limits'> {
40
- value: ConsentSettingsView;
41
- onChange(required: {
42
- patch: Partial<ConsentSettingsView>;
43
- }, optional?: Record<string, never>): void;
44
- loading: boolean;
45
- error: string | null;
46
- status: string;
47
- /** Host translations keyed by the exact fallback copy; unspecified entries use English. */
48
- dictionary?: Readonly<Record<string, string>>;
49
- }
50
- /** The composed default for hosts that want one screen: Rules, Banner and Look stacked.
51
- * Shared jini settings classes keep the panel in the host's design language.
52
- * Native labels/selects/checkboxes support keyboard use at desktop and narrow widths. */
53
- export declare function ConsentSettingsPanel({ value, onChange, loading, error, status, dictionary, problems, limits }: ConsentSettingsPanelProps): import("react").JSX.Element;
54
- //# sourceMappingURL=ConsentSettingsPanel.d.ts.map
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useId } from 'react';
3
- import { ConsentBannerFields, ConsentLookFields, ConsentRulesFields } from './ConsentFields.js';
4
- /** The composed default for hosts that want one screen: Rules, Banner and Look stacked.
5
- * Shared jini settings classes keep the panel in the host's design language.
6
- * Native labels/selects/checkboxes support keyboard use at desktop and narrow widths. */
7
- export function ConsentSettingsPanel({ value, onChange, loading, error, status, dictionary = {}, problems, limits }) {
8
- const id = useId();
9
- const t = (text) => dictionary[text] ?? text;
10
- const fields = { value, onChange, disabled: loading, problems, dictionary, limits };
11
- return _jsxs("section", { className: "jini-settings-section", "aria-labelledby": `${id}-heading`, children: [_jsx("div", { className: "jini-section-head", children: _jsxs("div", { children: [_jsx("h4", { id: `${id}-heading`, children: t('Site cookie consent') }), _jsx("p", { className: "jini-hint", children: t('Provides the consent mechanism, not legal advice. Review your texts, categories, and privacy policy for your site.') })] }) }), _jsx("p", { className: "jini-hint", children: t('Off by default. In opt-in regions, optional scripts stay paused until a visitor chooses. Unclassified third-party scripts use the marketing category. Global Privacy Control disables analytics and marketing.') }), _jsx(ConsentRulesFields, { ...fields }), _jsx(ConsentBannerFields, { ...fields }), _jsx(ConsentLookFields, { ...fields }), error && _jsx("p", { className: "jini-hint jini-hint-error", role: "alert", children: error }), _jsx("p", { className: "jini-hint", role: "status", children: status })] });
12
- }
13
- //# sourceMappingURL=ConsentSettingsPanel.js.map
@@ -1,8 +0,0 @@
1
- export { ConsentSettingsPanel } from './ConsentSettingsPanel.js';
2
- export type { ConsentAppearanceView, ConsentFieldProblem, ConsentSettingsPanelProps, ConsentSettingsView } from './ConsentSettingsPanel.js';
3
- export { ConsentBannerFields, ConsentLookFields, ConsentRulesFields } from './ConsentFields.js';
4
- export type { ConsentFieldsProps } from './ConsentFields.js';
5
- export { ConsentPreviewFrame } from './ConsentPreviewFrame.js';
6
- export type { ConsentPreviewFrameProps } from './ConsentPreviewFrame.js';
7
- export type { ConsentPreviewWidth } from './settings-panel.hooks.js';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +0,0 @@
1
- export { ConsentSettingsPanel } from './ConsentSettingsPanel.js';
2
- export { ConsentBannerFields, ConsentLookFields, ConsentRulesFields } from './ConsentFields.js';
3
- export { ConsentPreviewFrame } from './ConsentPreviewFrame.js';
4
- //# sourceMappingURL=index.js.map
@@ -1,49 +0,0 @@
1
- import { type ChangeEvent, type FocusEvent } from 'react';
2
- import type { ConsentAppearanceView, ConsentFieldProblem, ConsentSettingsPanelProps, ConsentSettingsView } from './ConsentSettingsPanel.js';
3
- /** Keep value conversions and toggle behavior out of the view. React owns event signatures. */
4
- export declare function useConsentSettingsPanel({ value, onChange }: Pick<ConsentSettingsPanelProps, 'value' | 'onChange'>, _options?: {}): {
5
- toggle: () => void;
6
- bannerMode: ({ mode }: {
7
- mode: NonNullable<ConsentSettingsView["bannerMode"]>;
8
- }, _optional?: {}) => () => void;
9
- region: (event: ChangeEvent<HTMLSelectElement>) => void;
10
- placement: (event: ChangeEvent<HTMLSelectElement>) => void;
11
- text: (key: keyof ConsentSettingsView) => (event: ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
12
- /** Empty input unsets the token so the engine default applies again. */
13
- token: (key: keyof ConsentAppearanceView) => (next: string) => void;
14
- };
15
- /** A new token object with `key` set, or removed when `value` is empty. Never mutates the input.
16
- * @complexity O(t), t <= 7 tokens. */
17
- export declare function withAppearanceToken({ appearance, key, value }: {
18
- appearance?: ConsentAppearanceView | undefined;
19
- key: keyof ConsentAppearanceView;
20
- value: string;
21
- }, _options?: {}): ConsentAppearanceView;
22
- /** `"12px"` → `"12"` for a number input; unset or hand-written values read empty. */
23
- export declare function pixelInputValue({ value }: {
24
- value: string | undefined;
25
- }, _options?: {}): string;
26
- /** The problems a host attached to one field, in their original order. O(p). */
27
- export declare function problemsFor({ problems, field }: {
28
- problems?: readonly ConsentFieldProblem[] | undefined;
29
- field: string;
30
- }, _options?: {}): ConsentFieldProblem[];
31
- /** Keep transient empty edits local; only a valid policy version reaches autosave.
32
- * Native validity gives keyboard users an actionable error. Valid edits save before navigation.
33
- * @complexity O(version length), <=128. */
34
- export declare function usePolicyVersionInput({ value, onChange }: Pick<ConsentSettingsPanelProps, 'onChange'> & {
35
- value: string;
36
- }, _options?: {}): {
37
- draft: string;
38
- change: (event: ChangeEvent<HTMLInputElement>) => void;
39
- blur: (event: FocusEvent<HTMLInputElement>) => void;
40
- };
41
- export type ConsentPreviewWidth = 'phone' | 'desktop';
42
- /** The preview's own phone/desktop switch; the host never needs to own it. */
43
- export declare function useConsentPreviewWidth({ initial }?: {
44
- initial?: ConsentPreviewWidth;
45
- }, _options?: {}): {
46
- width: ConsentPreviewWidth;
47
- setWidth: import("react").Dispatch<import("react").SetStateAction<ConsentPreviewWidth>>;
48
- };
49
- //# sourceMappingURL=settings-panel.hooks.d.ts.map
@@ -1,57 +0,0 @@
1
- import { useEffect, useState } from 'react';
2
- /** Keep value conversions and toggle behavior out of the view. React owns event signatures. */
3
- export function useConsentSettingsPanel({ value, onChange }, _options = {}) {
4
- return {
5
- toggle: () => onChange({ patch: { enabled: !value.enabled } }),
6
- bannerMode: ({ mode }, _optional = {}) => () => onChange({ patch: { bannerMode: mode } }),
7
- region: (event) => onChange({ patch: { regionMode: event.target.value } }),
8
- placement: (event) => onChange({ patch: { placement: event.target.value } }),
9
- text: (key) => (event) => onChange({ patch: { [key]: event.target.value } }),
10
- /** Empty input unsets the token so the engine default applies again. */
11
- token: (key) => (next) => onChange({ patch: { appearance: withAppearanceToken({ appearance: value.appearance, key, value: next }) } }),
12
- };
13
- }
14
- /** A new token object with `key` set, or removed when `value` is empty. Never mutates the input.
15
- * @complexity O(t), t <= 7 tokens. */
16
- export function withAppearanceToken({ appearance = {}, key, value }, _options = {}) {
17
- const next = { ...appearance };
18
- if (value === '')
19
- delete next[key];
20
- else
21
- next[key] = value;
22
- return next;
23
- }
24
- /** `"12px"` → `"12"` for a number input; unset or hand-written values read empty. */
25
- export function pixelInputValue({ value }, _options = {}) {
26
- return /^(\d+(?:\.\d+)?)px$/.exec(value ?? '')?.[1] ?? '';
27
- }
28
- /** The problems a host attached to one field, in their original order. O(p). */
29
- export function problemsFor({ problems = [], field }, _options = {}) {
30
- return problems.filter(problem => problem.field === field);
31
- }
32
- /** Keep transient empty edits local; only a valid policy version reaches autosave.
33
- * Native validity gives keyboard users an actionable error. Valid edits save before navigation.
34
- * @complexity O(version length), <=128. */
35
- export function usePolicyVersionInput({ value, onChange }, _options = {}) {
36
- const [draft, setDraft] = useState(value);
37
- useEffect(() => setDraft(value), [value]);
38
- return {
39
- draft,
40
- change: (event) => {
41
- const next = event.currentTarget.value;
42
- setDraft(next);
43
- if (event.currentTarget.checkValidity())
44
- onChange({ patch: { policyVersion: next } });
45
- },
46
- blur: (event) => {
47
- if (!event.currentTarget.checkValidity())
48
- event.currentTarget.reportValidity();
49
- },
50
- };
51
- }
52
- /** The preview's own phone/desktop switch; the host never needs to own it. */
53
- export function useConsentPreviewWidth({ initial = 'desktop' } = {}, _options = {}) {
54
- const [width, setWidth] = useState(initial);
55
- return { width, setWidth };
56
- }
57
- //# sourceMappingURL=settings-panel.hooks.js.map
@@ -1,22 +0,0 @@
1
- export interface ControllerStore<S> {
2
- getSnapshot(required?: Record<string, never>, optional?: Record<string, never>): S;
3
- subscribe(required: {
4
- listener: () => void;
5
- }, optional?: Record<string, never>): () => void;
6
- dispose(required?: Record<string, never>, optional?: Record<string, never>): void;
7
- }
8
- /** Snapshot identity changes only on a write: useSyncExternalStore requires a cached snapshot. */
9
- export declare function createControllerStore<S extends object>({ initial }: {
10
- initial: S;
11
- }, _optional?: Record<string, never>): {
12
- getSnapshot: () => Readonly<S>;
13
- subscribe: ({ listener }: {
14
- listener: () => void;
15
- }) => () => void;
16
- set: ({ patch }: {
17
- patch: Partial<S>;
18
- }) => void;
19
- signal: AbortSignal;
20
- dispose: () => void;
21
- };
22
- //# sourceMappingURL=controller-store.d.ts.map
@@ -1,32 +0,0 @@
1
- /** Snapshot identity changes only on a write: useSyncExternalStore requires a cached snapshot. */
2
- export function createControllerStore({ initial }, _optional = {}) {
3
- let state = Object.freeze(initial), disposed = false;
4
- const listeners = new Set();
5
- const abort = new AbortController();
6
- return {
7
- getSnapshot: () => state,
8
- subscribe: ({ listener }) => {
9
- if (!disposed)
10
- listeners.add(listener);
11
- return () => {
12
- listeners.delete(listener);
13
- };
14
- },
15
- set: ({ patch }) => {
16
- if (disposed)
17
- return;
18
- state = Object.freeze({ ...state, ...patch });
19
- for (const listener of listeners)
20
- listener();
21
- },
22
- signal: abort.signal,
23
- dispose: () => {
24
- if (disposed)
25
- return;
26
- disposed = true;
27
- abort.abort();
28
- listeners.clear();
29
- },
30
- };
31
- }
32
- //# sourceMappingURL=controller-store.js.map
@@ -1,4 +0,0 @@
1
- import type { AdminModule } from './types.js';
2
- /** Definition is data only; boot validates identities before any factory runs. */
3
- export declare function defineAdminModule<const M extends AdminModule>(required: M, _optional?: Record<string, never>): M;
4
- //# sourceMappingURL=define-admin-module.d.ts.map
@@ -1,5 +0,0 @@
1
- /** Definition is data only; boot validates identities before any factory runs. */
2
- export function defineAdminModule(required, _optional = {}) {
3
- return Object.freeze(required);
4
- }
5
- //# sourceMappingURL=define-admin-module.js.map
@@ -1,19 +0,0 @@
1
- /** Structurally compatible with @jini-ai/core's singleton Token<T, Id>.
2
- * Admin currently has no core dependency or core/token export to reuse. Keep the same
3
- * named/versioned wire identity without adding an undeclared runtime dependency. */
4
- export interface AdminPortToken<T = unknown, Id extends string = string> {
5
- readonly id: Id;
6
- readonly version: number;
7
- readonly cardinality: 'one';
8
- readonly __type?: T;
9
- }
10
- export declare function adminPort<T, const Id extends string = string>({ id }: {
11
- id: Id;
12
- }, { version }?: {
13
- version?: number;
14
- }): AdminPortToken<T, Id>;
15
- export type PortMap = Readonly<Record<string, AdminPortToken>>;
16
- export type PortValues<P extends PortMap> = {
17
- readonly [K in keyof P]: P[K] extends AdminPortToken<infer T> ? T : never;
18
- };
19
- //# sourceMappingURL=token.d.ts.map
@@ -1,4 +0,0 @@
1
- export function adminPort({ id }, { version = 1 } = {}) {
2
- return Object.freeze({ id, version, cardinality: 'one' });
3
- }
4
- //# sourceMappingURL=token.js.map