@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.
- package/CHANGELOG.md +4 -6
- package/dist/agent-plugins/agent-plugins.module.d.ts +1 -1
- package/dist/agent-plugins/agent-plugins.module.js +1 -1
- package/dist/agent-plugins/controllers/agent-plugin-files.controller.d.ts +3 -3
- package/dist/agent-plugins/controllers/agent-plugin-files.controller.js +1 -1
- package/dist/agent-plugins/controllers/agent-plugins.controller.d.ts +3 -3
- package/dist/agent-plugins/controllers/agent-plugins.controller.js +30 -27
- package/dist/agent-plugins/index.d.ts +11 -8
- package/dist/agent-plugins/index.js +7 -8
- package/dist/agent-plugins/models.d.ts +19 -11
- package/dist/agent-plugins/ports.d.ts +1 -1
- package/dist/agent-plugins/ports.js +1 -1
- package/dist/agent-plugins/react/components/AgentPluginFileContent.d.ts +4 -2
- package/dist/agent-plugins/react/components/AgentPluginFileContent.js +3 -3
- package/dist/agent-plugins/react/components/AgentPluginFileTree.d.ts +4 -2
- package/dist/agent-plugins/react/components/AgentPluginFileTree.js +2 -2
- package/dist/agent-plugins/react/components/AgentPluginInspector.d.ts +4 -2
- package/dist/agent-plugins/react/components/AgentPluginInspector.js +3 -3
- package/dist/agent-plugins/react/components/AgentPluginListPanel.d.ts +5 -3
- package/dist/agent-plugins/react/components/AgentPluginListPanel.js +3 -3
- package/dist/agent-plugins/react/components/AgentPluginRow.d.ts +3 -1
- package/dist/agent-plugins/react/components/AgentPluginRow.js +3 -3
- package/dist/agent-plugins/react/hooks/AgentPluginInspector.hooks.js +2 -2
- package/dist/agent-plugins/react/hooks/AgentPluginPanel.hooks.d.ts +6 -5
- package/dist/agent-plugins/react/hooks/AgentPluginRow.hooks.d.ts +5 -4
- package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.d.ts +11 -7
- package/dist/agent-plugins/react/hooks/AgentPluginsPage.hooks.js +3 -3
- package/dist/agent-plugins/react/hooks/AgentPluginsPorts.hooks.d.ts +5 -0
- package/dist/agent-plugins/react/hooks/AgentPluginsPorts.hooks.js +11 -1
- package/dist/agent-plugins/react/hooks/MarketplaceTab.hooks.d.ts +1 -1
- package/dist/agent-plugins/react/index.d.ts +25 -71
- package/dist/agent-plugins/react/index.js +9 -6
- package/dist/agent-plugins/react/pages/AgentPluginsPage.d.ts +8 -2
- package/dist/agent-plugins/react/pages/AgentPluginsPage.js +3 -3
- package/dist/agent-plugins/react/tabs/DownloadedTab.d.ts +2 -2
- package/dist/agent-plugins/react/tabs/DownloadedTab.js +1 -1
- package/dist/agent-plugins/react/tabs/InstalledTab.d.ts +2 -2
- package/dist/agent-plugins/react/tabs/InstalledTab.js +1 -1
- package/dist/agent-plugins/react/tabs/MarketplaceTab.d.ts +5 -2
- package/dist/agent-plugins/react/tabs/MarketplaceTab.js +3 -3
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/react-root-errors.d.ts +19 -0
- package/dist/browser/react-root-errors.js +16 -0
- package/dist/comments/adapters/http.js +2 -3
- package/dist/comments/adapters/memory.d.ts +5 -3
- package/dist/comments/adapters/memory.js +5 -6
- package/dist/comments/comments.module.d.ts +3 -3
- package/dist/comments/comments.module.js +1 -1
- package/dist/comments/controllers/comment-queue.controller.d.ts +14 -12
- package/dist/comments/controllers/comment-queue.controller.js +154 -155
- package/dist/comments/controllers/comment-settings.controller.d.ts +4 -4
- package/dist/comments/controllers/comment-settings.controller.js +40 -39
- package/dist/comments/controllers/comments.controller.d.ts +4 -4
- package/dist/comments/controllers/comments.controller.js +1 -2
- package/dist/comments/ports.d.ts +3 -3
- package/dist/comments/ports.js +1 -1
- package/dist/comments/react/components/QueueActionsCell.d.ts +20 -0
- package/dist/comments/react/components/QueueActionsCell.js +15 -0
- package/dist/comments/react/components/QueueSection.d.ts +20 -9
- package/dist/comments/react/components/QueueSection.js +9 -20
- package/dist/comments/react/components/SettingsFields.d.ts +13 -0
- package/dist/comments/react/components/SettingsFields.js +17 -0
- package/dist/comments/react/components/SettingsSection.d.ts +4 -1
- package/dist/comments/react/components/SettingsSection.js +5 -10
- package/dist/comments/react/hooks/CommentsPage.hooks.js +1 -1
- package/dist/comments/react/hooks/CommentsPorts.hooks.d.ts +5 -0
- package/dist/comments/react/hooks/CommentsPorts.hooks.js +11 -1
- package/dist/comments/react/hooks/QueueActionsCell.hooks.d.ts +13 -0
- package/dist/comments/react/hooks/QueueActionsCell.hooks.js +7 -0
- package/dist/comments/react/hooks/QueueSection.hooks.d.ts +3 -11
- package/dist/comments/react/hooks/QueueSection.hooks.js +8 -11
- package/dist/comments/react/hooks/use-comment-queue.hooks.js +4 -4
- package/dist/comments/react/hooks/use-comment-settings.hooks.js +3 -3
- package/dist/comments/react/hooks/use-comments.hooks.js +3 -3
- package/dist/comments/react/index.d.ts +27 -89
- package/dist/comments/react/index.js +5 -6
- package/dist/comments/react/pages/CommentsPage.d.ts +4 -1
- package/dist/comments/react/pages/CommentsPage.js +2 -2
- package/dist/comments/rules.d.ts +1 -1
- package/dist/comments/rules.js +2 -3
- package/dist/contracts/credential-management.d.ts +1 -1
- package/dist/contracts/credential-management.js +1 -1
- package/dist/contracts/media-picker.d.ts +1 -1
- package/dist/contracts/media-picker.js +1 -1
- package/dist/contracts/playground-render-target.d.ts +1 -1
- package/dist/contracts/playground-render-target.js +1 -1
- package/dist/core/entities/rules.d.ts +8 -2
- package/dist/core/entities/rules.js +3 -3
- package/dist/core/index.d.ts +1 -2
- package/dist/core/index.js +1 -3
- package/dist/core/ledger-slice.d.ts +3 -3
- package/dist/core/ledger-slice.js +3 -3
- package/dist/core/manifest/rules.js +1 -1
- package/dist/core/manifest/types.d.ts +11 -0
- package/dist/core/module/create-admin.d.ts +1 -8
- package/dist/core/module/create-admin.js +4 -9
- package/dist/core/module/index.d.ts +1 -5
- package/dist/core/module/index.js +1 -3
- package/dist/core/ports/auth.d.ts +2 -2
- package/dist/core/ports/auth.js +1 -1
- package/dist/core/ports/comment-repo.d.ts +53 -0
- package/dist/core/ports/comment-repo.js +2 -0
- package/dist/core/ports/comments.d.ts +1 -1
- package/dist/core/ports/comments.js +1 -1
- package/dist/core/ports/database.d.ts +1 -1
- package/dist/core/ports/embed-policy.d.ts +19 -0
- package/dist/core/ports/embed-policy.js +2 -0
- package/dist/core/ports/entities.d.ts +14 -0
- package/dist/core/ports/forms-catalog.d.ts +27 -0
- package/dist/core/ports/forms-catalog.js +2 -0
- package/dist/core/ports/forms.d.ts +3 -3
- package/dist/core/ports/identity.d.ts +1 -1
- package/dist/core/ports/identity.js +1 -1
- package/dist/core/ports/index.d.ts +3 -0
- package/dist/core/ports/media.d.ts +1 -1
- package/dist/core/ports/plugins.d.ts +1 -1
- package/dist/core/react/bind-react.d.ts +6 -16
- package/dist/core/react/bind-react.js +1 -1
- package/dist/core/react/index.d.ts +3 -2
- package/dist/core/react/index.js +3 -2
- package/dist/core/react/module-ui.d.ts +10 -0
- package/dist/core/react/module-ui.js +6 -0
- package/dist/core/react/use-controller.d.ts +1 -1
- package/dist/core/react/use-controller.js +2 -1
- package/dist/core/routing/route-template.d.ts +11 -0
- package/dist/core/routing/route-template.js +23 -0
- package/dist/core/transport/http.js +7 -5
- package/dist/core/transport/index.d.ts +0 -1
- package/dist/core/transport/index.js +0 -1
- package/dist/forms/adapters/http.js +2 -2
- package/dist/forms/adapters/memory.d.ts +1 -1
- package/dist/forms/adapters/memory.js +35 -26
- package/dist/forms/controllers/draft-store.d.ts +4 -4
- package/dist/forms/controllers/draft-store.js +1 -1
- package/dist/forms/controllers/field-attributes-dialog.controller.d.ts +7 -8
- package/dist/forms/controllers/field-attributes-dialog.controller.js +8 -6
- package/dist/forms/controllers/form-editor.controller.d.ts +8 -5
- package/dist/forms/controllers/form-editor.controller.js +2 -2
- package/dist/forms/controllers/form-fields-editor.controller.d.ts +4 -4
- package/dist/forms/controllers/form-submission-detail.controller.d.ts +4 -4
- package/dist/forms/controllers/form-submissions.controller.d.ts +4 -4
- package/dist/forms/controllers/forms-list.controller.d.ts +4 -4
- package/dist/forms/field-settings.d.ts +32 -16
- package/dist/forms/field-settings.js +52 -41
- package/dist/forms/forms.module.d.ts +5 -4
- package/dist/forms/forms.module.js +3 -3
- package/dist/forms/html-rules.d.ts +4 -2
- package/dist/forms/html-rules.js +19 -19
- package/dist/forms/index.d.ts +6 -4
- package/dist/forms/index.js +3 -3
- package/dist/forms/messages.en.js +1 -1
- package/dist/forms/models.d.ts +1 -1
- package/dist/forms/ports.d.ts +8 -4
- package/dist/forms/ports.js +3 -1
- package/dist/forms/react/components/FieldAttributesDialog.d.ts +4 -1
- package/dist/forms/react/components/FieldAttributesDialog.js +6 -28
- package/dist/forms/react/components/FieldAttributesStyling.d.ts +26 -0
- package/dist/forms/react/components/FieldAttributesStyling.js +42 -0
- package/dist/forms/react/components/FieldSettingsRows.js +3 -4
- package/dist/forms/react/components/FieldSettingsSection.d.ts +4 -1
- package/dist/forms/react/components/FieldSettingsSection.js +3 -3
- package/dist/forms/react/components/FormEditorFieldsBody.d.ts +5 -2
- package/dist/forms/react/components/FormEditorFieldsBody.js +3 -3
- package/dist/forms/react/components/FormEditorFieldsBodyParts.js +1 -1
- package/dist/forms/react/components/FormEditorFieldsSlot.d.ts +6 -0
- package/dist/forms/react/components/FormEditorFieldsSlot.js +10 -0
- package/dist/forms/react/components/FormEditorHeader.d.ts +9 -0
- package/dist/forms/react/components/FormEditorHeader.js +16 -0
- package/dist/forms/react/components/FormEditorHeaderText.d.ts +1 -1
- package/dist/forms/react/components/FormEditorHeaderText.js +1 -1
- package/dist/forms/react/components/FormEditorMainPanel.d.ts +1 -1
- package/dist/forms/react/components/FormEditorMainPanel.js +4 -4
- package/dist/forms/react/components/FormEditorTabStrip.d.ts +5 -2
- package/dist/forms/react/components/FormEditorTabStrip.js +3 -4
- package/dist/forms/react/components/FormFieldRow.d.ts +10 -0
- package/dist/forms/react/components/FormFieldRow.js +53 -0
- package/dist/forms/react/components/FormFieldsEditor.d.ts +4 -1
- package/dist/forms/react/components/FormFieldsEditor.js +6 -22
- package/dist/forms/react/components/FormFieldsTableParts.d.ts +10 -0
- package/dist/forms/react/components/FormFieldsTableParts.js +11 -0
- package/dist/forms/react/components/FormSubmissionDate.d.ts +1 -1
- package/dist/forms/react/components/FormSubmissionDate.js +1 -1
- package/dist/forms/react/components/FormSubmissionDetail.d.ts +4 -1
- package/dist/forms/react/components/FormSubmissionDetail.js +3 -3
- package/dist/forms/react/components/FormSubmissions.d.ts +6 -1
- package/dist/forms/react/components/FormSubmissions.js +3 -3
- package/dist/forms/react/components/FormSubmissionsTable.js +1 -1
- package/dist/forms/react/components/FormsListParts.d.ts +36 -0
- package/dist/forms/react/components/FormsListParts.js +41 -0
- package/dist/forms/react/hooks/FormsPorts.hooks.d.ts +7 -1
- package/dist/forms/react/hooks/FormsPorts.hooks.js +11 -1
- package/dist/forms/react/hooks/forms-view.hooks.d.ts +17 -11
- package/dist/forms/react/hooks/forms-view.hooks.js +13 -11
- package/dist/forms/react/hooks/use-field-attributes-dialog.hooks.d.ts +4 -1
- package/dist/forms/react/hooks/use-field-attributes-dialog.hooks.js +6 -4
- package/dist/forms/react/hooks/use-form-editor-parts.hooks.d.ts +127 -0
- package/dist/forms/react/hooks/use-form-editor-parts.hooks.js +223 -0
- package/dist/forms/react/hooks/use-form-editor.hooks.d.ts +13 -3
- package/dist/forms/react/hooks/use-form-editor.hooks.js +34 -210
- package/dist/forms/react/hooks/use-form-fields-editor.hooks.js +2 -2
- package/dist/forms/react/hooks/use-form-submission-detail.hooks.d.ts +2 -2
- package/dist/forms/react/hooks/use-form-submission-detail.hooks.js +4 -4
- package/dist/forms/react/hooks/use-form-submissions.hooks.d.ts +2 -2
- package/dist/forms/react/hooks/use-form-submissions.hooks.js +4 -5
- package/dist/forms/react/hooks/use-forms-list.hooks.js +3 -3
- package/dist/forms/react/index.d.ts +35 -26
- package/dist/forms/react/index.js +5 -6
- package/dist/forms/react/pages/FormEditor.d.ts +2 -2
- package/dist/forms/react/pages/FormEditor.js +7 -12
- package/dist/forms/react/pages/FormsList.d.ts +5 -2
- package/dist/forms/react/pages/FormsList.js +4 -30
- package/dist/forms/rules.d.ts +5 -5
- package/dist/forms/rules.js +8 -20
- package/dist/media/adapters/http.d.ts +24 -2
- package/dist/media/adapters/http.js +133 -10
- package/dist/media/adapters/memory.js +41 -46
- package/dist/media/conformance/media-api.conformance.js +60 -42
- package/dist/media/controllers/edit-media.controller.d.ts +5 -5
- package/dist/media/controllers/edit-media.controller.js +20 -17
- package/dist/media/controllers/library.controller.d.ts +14 -14
- package/dist/media/controllers/library.controller.js +180 -167
- package/dist/media/controllers/providers.controller.d.ts +4 -4
- package/dist/media/controllers/providers.controller.js +46 -40
- package/dist/media/html-attributes.d.ts +23 -13
- package/dist/media/html-attributes.js +15 -23
- package/dist/media/index.d.ts +5 -4
- package/dist/media/index.js +3 -3
- package/dist/media/media.module.d.ts +6 -5
- package/dist/media/media.module.js +3 -3
- package/dist/media/ports.d.ts +8 -3
- package/dist/media/ports.js +4 -1
- package/dist/media/react/components/EditMediaPanel.d.ts +4 -1
- package/dist/media/react/components/EditMediaPanel.js +3 -3
- package/dist/media/react/components/MediaCard.d.ts +7 -2
- package/dist/media/react/components/MediaCard.js +6 -6
- package/dist/media/react/components/MediaDialog.d.ts +4 -1
- package/dist/media/react/components/MediaDialog.js +3 -3
- package/dist/media/react/components/MediaGrid.d.ts +4 -1
- package/dist/media/react/components/MediaGrid.js +2 -2
- package/dist/media/react/components/MediaIcons.d.ts +9 -9
- package/dist/media/react/components/MediaIcons.js +9 -9
- package/dist/media/react/components/MediaLightbox.d.ts +4 -1
- package/dist/media/react/components/MediaLightbox.js +3 -3
- package/dist/media/react/components/MediaPicker.d.ts +4 -1
- package/dist/media/react/components/MediaPicker.js +3 -3
- package/dist/media/react/components/MediaPurgeDialog.d.ts +4 -1
- package/dist/media/react/components/MediaPurgeDialog.js +3 -3
- package/dist/media/react/components/UploadButton.d.ts +4 -1
- package/dist/media/react/components/UploadButton.js +3 -3
- package/dist/media/react/hooks/EditMediaPanel.hooks.d.ts +6 -3
- package/dist/media/react/hooks/EditMediaPanel.hooks.js +62 -50
- package/dist/media/react/hooks/LibraryTab.hooks.d.ts +23 -23
- package/dist/media/react/hooks/LibraryTab.hooks.js +52 -36
- package/dist/media/react/hooks/MediaCard.hooks.d.ts +1 -1
- package/dist/media/react/hooks/MediaCard.hooks.js +2 -1
- package/dist/media/react/hooks/MediaDialog.hooks.d.ts +1 -1
- package/dist/media/react/hooks/MediaPage.hooks.d.ts +22 -18
- package/dist/media/react/hooks/MediaPage.hooks.js +3 -3
- package/dist/media/react/hooks/MediaPicker.hooks.d.ts +1 -1
- package/dist/media/react/hooks/MediaPicker.hooks.js +2 -2
- package/dist/media/react/hooks/MediaPorts.hooks.d.ts +7 -0
- package/dist/media/react/hooks/MediaPorts.hooks.js +11 -1
- package/dist/media/react/hooks/MediaQuery.hooks.d.ts +3 -3
- package/dist/media/react/hooks/MediaQuery.hooks.js +1 -1
- package/dist/media/react/hooks/ProvidersTab.hooks.d.ts +7 -1
- package/dist/media/react/hooks/ProvidersTab.hooks.js +49 -46
- package/dist/media/react/index.d.ts +39 -114
- package/dist/media/react/index.js +55 -48
- package/dist/media/react/pages/MediaPage.d.ts +4 -1
- package/dist/media/react/pages/MediaPage.js +2 -2
- package/dist/media/react/tabs/LibraryTab.d.ts +5 -2
- package/dist/media/react/tabs/LibraryTab.js +3 -3
- package/dist/media/react/tabs/ProvidersTab.d.ts +5 -2
- package/dist/media/react/tabs/ProvidersTab.js +2 -2
- package/dist/media/rules.d.ts +0 -7
- package/dist/media/rules.js +0 -12
- package/dist/playground/controllers/playground.controller.d.ts +3 -3
- package/dist/playground/controllers/playground.controller.js +1 -1
- package/dist/playground/playground.module.d.ts +1 -1
- package/dist/playground/playground.module.js +1 -1
- package/dist/playground/react/components/Canvas.d.ts +5 -2
- package/dist/playground/react/components/Canvas.js +3 -3
- package/dist/playground/react/hooks/Canvas.hooks.d.ts +1 -1
- package/dist/playground/react/hooks/PlaygroundPage.hooks.d.ts +7 -3
- package/dist/playground/react/hooks/PlaygroundPorts.hooks.js +1 -1
- package/dist/playground/react/index.d.ts +9 -9
- package/dist/playground/react/pages/PlaygroundPage.d.ts +8 -2
- package/dist/playground/react/pages/PlaygroundPage.js +3 -3
- package/dist/playground/react/tabs/CanvasTab.d.ts +2 -2
- package/dist/playground/react/tabs/CanvasTab.js +1 -1
- package/dist/react/OverlayHost.d.ts +4 -1
- package/dist/react/OverlayHost.js +2 -2
- package/dist/react/components/ConfirmDialog/ConfirmDialog.d.ts +12 -2
- package/dist/react/components/ConfirmDialog/ConfirmDialog.hooks.js +1 -2
- package/dist/react/components/ConfirmDialog/ConfirmDialog.js +6 -4
- package/dist/react/components/ConfirmDialog/confirm-dialog-attrs.d.ts +1 -1
- package/dist/react/components/ConfirmDialog/confirm-dialog-attrs.js +1 -1
- package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.d.ts +2 -2
- package/dist/react/components/InteractiveHtmlEditor/InteractiveHtmlEditor.js +9 -8
- package/dist/react/components/RowMenu/RowMenu.hooks.js +66 -63
- package/dist/react/components/RowMenu/RowMenu.js +1 -1
- package/dist/react/components/Sidebar.d.ts +11 -4
- package/dist/react/components/Sidebar.js +11 -101
- package/dist/react/components/SidebarIcon.d.ts +4 -0
- package/dist/react/components/SidebarIcon.js +91 -0
- package/dist/react/components/ThemePreviewReloadControl.d.ts +7 -0
- package/dist/react/components/ThemePreviewReloadControl.js +5 -0
- package/dist/react/entities/EntityDetail.d.ts +4 -1
- package/dist/react/entities/EntityDetail.hooks.d.ts +14 -0
- package/dist/react/entities/EntityDetail.hooks.js +10 -0
- package/dist/react/entities/EntityDetail.js +3 -6
- package/dist/react/entities/EntityEdit.d.ts +6 -1
- package/dist/react/entities/EntityEdit.js +23 -6
- package/dist/react/entities/EntityField.d.ts +3 -1
- package/dist/react/entities/EntityField.js +9 -6
- package/dist/react/entities/EntityList.d.ts +4 -1
- package/dist/react/entities/EntityList.hooks.d.ts +33 -0
- package/dist/react/entities/EntityList.hooks.js +28 -0
- package/dist/react/entities/EntityList.js +3 -23
- package/dist/react/entities/FailureNotice.d.ts +29 -0
- package/dist/react/entities/FailureNotice.js +33 -0
- package/dist/react/entities/contribution.d.ts +2 -0
- package/dist/react/entities/contribution.js +2 -2
- package/dist/react/entities/rules.d.ts +6 -1
- package/dist/react/entities/rules.js +7 -4
- package/dist/react/entities/types.d.ts +19 -0
- package/dist/react/entities/use-entity-edit.d.ts +11 -2
- package/dist/react/entities/use-entity-edit.js +18 -12
- package/dist/react/entities/use-entity-read.d.ts +7 -2
- package/dist/react/entities/use-entity-read.js +9 -4
- package/dist/react/hooks/use-browser-telemetry-feed.d.ts +13 -0
- package/dist/react/hooks/use-browser-telemetry-feed.js +14 -0
- package/dist/react/hooks/use-overflow-title.d.ts +17 -0
- package/dist/react/hooks/use-overflow-title.js +29 -0
- package/dist/react/hooks/use-process-restart.d.ts +46 -0
- package/dist/react/hooks/use-process-restart.js +59 -0
- package/dist/react/hooks/use-rail-label-titles.d.ts +18 -0
- package/dist/react/hooks/use-rail-label-titles.js +44 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.js +5 -0
- package/dist/react/kit-media-providers.d.ts +187 -0
- package/dist/react/kit-media-providers.js +2 -0
- package/dist/react/kit.d.ts +478 -0
- package/dist/react/kit.js +75 -0
- package/dist/react/overlays.d.ts +4 -4
- package/dist/react/overlays.js +1 -1
- package/dist/react/shell/AdminShell.d.ts +2 -2
- package/dist/react/shell/AdminShell.js +56 -24
- package/dist/react/shell/index.d.ts +1 -1
- package/dist/react/shell/model.d.ts +9 -1
- package/dist/react/shell/model.js +31 -15
- package/dist/react/shell/shell-hooks.d.ts +34 -0
- package/dist/react/shell/shell-hooks.js +31 -0
- package/dist/react/shell/theme-ports.d.ts +1 -1
- package/dist/react/shell/types.d.ts +97 -3
- package/dist/react/shell/use-admin-theme.d.ts +4 -2
- package/dist/react/shell/use-admin-theme.js +4 -3
- package/dist/react/testing-kit-media-providers.d.ts +3 -0
- package/dist/react/testing-kit-media-providers.js +96 -0
- package/dist/react/testing-kit.d.ts +11 -0
- package/dist/react/testing-kit.js +114 -0
- package/dist/redirects/adapters/memory.js +42 -33
- package/dist/redirects/conformance/redirects-api.conformance.js +1 -1
- package/dist/redirects/controllers/hit-count.controller.d.ts +5 -5
- package/dist/redirects/controllers/hit-count.controller.js +1 -1
- package/dist/redirects/controllers/import-redirects.controller.d.ts +5 -5
- package/dist/redirects/controllers/import-redirects.controller.js +1 -1
- package/dist/redirects/controllers/redirects.controller.d.ts +5 -5
- package/dist/redirects/controllers/redirects.controller.js +1 -1
- package/dist/redirects/index.d.ts +11 -7
- package/dist/redirects/index.js +6 -7
- package/dist/redirects/ports.d.ts +2 -2
- package/dist/redirects/ports.js +1 -1
- package/dist/redirects/react/components/CreateRedirectForm.d.ts +17 -0
- package/dist/redirects/react/components/CreateRedirectForm.js +19 -0
- package/dist/redirects/react/components/HitCountCell.js +2 -2
- package/dist/redirects/react/components/ImportRedirectsForm.js +1 -1
- package/dist/redirects/react/hooks/RedirectsPage.hooks.d.ts +1 -1
- package/dist/redirects/react/hooks/RedirectsPorts.hooks.d.ts +5 -0
- package/dist/redirects/react/hooks/RedirectsPorts.hooks.js +11 -1
- package/dist/redirects/react/hooks/use-hit-count-cell.hooks.js +3 -3
- package/dist/redirects/react/hooks/use-import-redirects-form.hooks.js +4 -4
- package/dist/redirects/react/hooks/use-redirects.hooks.d.ts +1 -1
- package/dist/redirects/react/hooks/use-redirects.hooks.js +4 -4
- package/dist/redirects/react/hooks/wired.hooks.d.ts +1 -1
- package/dist/redirects/react/index.d.ts +25 -90
- package/dist/redirects/react/index.js +6 -7
- package/dist/redirects/react/pages/RedirectsPage.d.ts +3 -1
- package/dist/redirects/react/pages/RedirectsPage.js +5 -5
- package/dist/redirects/redirects.module.d.ts +2 -2
- package/dist/redirects/redirects.module.js +1 -1
- package/dist/security/controllers/access-tokens.controller.d.ts +4 -4
- package/dist/security/controllers/access-tokens.controller.js +20 -15
- package/dist/security/controllers/other-credentials.controller.d.ts +4 -4
- package/dist/security/controllers/other-credentials.controller.js +1 -1
- package/dist/security/controllers/root-key.controller.d.ts +4 -4
- package/dist/security/controllers/root-key.controller.js +1 -1
- package/dist/security/ports.d.ts +3 -3
- package/dist/security/ports.js +1 -1
- package/dist/security/react/components/CredentialEditor.d.ts +4 -2
- package/dist/security/react/components/CredentialEditor.js +3 -3
- package/dist/security/react/hooks/AccessTokensTab.hooks.d.ts +5 -5
- package/dist/security/react/hooks/RootKeyTab.hooks.d.ts +1 -1
- package/dist/security/react/hooks/SecurityPage.hooks.d.ts +7 -3
- package/dist/security/react/hooks/SecurityPorts.hooks.js +1 -1
- package/dist/security/react/index.d.ts +22 -22
- package/dist/security/react/pages/SecurityPage.d.ts +8 -2
- package/dist/security/react/pages/SecurityPage.js +3 -3
- package/dist/security/react/tabs/AccessTokensTab.d.ts +5 -2
- package/dist/security/react/tabs/AccessTokensTab.js +3 -3
- package/dist/security/react/tabs/RootKeyTab.d.ts +5 -2
- package/dist/security/react/tabs/RootKeyTab.js +3 -3
- package/dist/security/rules.d.ts +1 -1
- package/dist/security/security.module.d.ts +4 -4
- package/dist/security/security.module.js +1 -1
- package/dist/seo/controllers/entry-picker.controller.d.ts +7 -7
- package/dist/seo/controllers/entry-picker.controller.js +1 -1
- package/dist/seo/controllers/entry-section.controller.d.ts +9 -9
- package/dist/seo/controllers/entry-section.controller.js +1 -1
- package/dist/seo/controllers/media-ref.controller.d.ts +9 -9
- package/dist/seo/controllers/media-ref.controller.js +1 -1
- package/dist/seo/controllers/seo-entry.controller.d.ts +7 -7
- package/dist/seo/controllers/seo-entry.controller.js +1 -1
- package/dist/seo/controllers/seo.controller.d.ts +7 -7
- package/dist/seo/controllers/seo.controller.js +1 -1
- package/dist/seo/controllers/sitemap.controller.d.ts +7 -7
- package/dist/seo/controllers/sitemap.controller.js +2 -2
- package/dist/seo/index.d.ts +4 -2
- package/dist/seo/index.js +2 -2
- package/dist/seo/ports.d.ts +2 -2
- package/dist/seo/ports.js +1 -1
- package/dist/seo/react/components/AnalyzePanel.d.ts +13 -0
- package/dist/seo/react/components/AnalyzePanel.js +21 -0
- package/dist/seo/react/components/EntryPicker.d.ts +19 -0
- package/dist/seo/react/components/EntryPicker.js +25 -0
- package/dist/seo/react/components/MediaPickerBridge.d.ts +4 -1
- package/dist/seo/react/components/MediaPickerBridge.js +2 -2
- package/dist/seo/react/components/MediaRefField.d.ts +5 -2
- package/dist/seo/react/components/MediaRefField.js +5 -5
- package/dist/seo/react/components/SeoEntryFields.d.ts +19 -0
- package/dist/seo/react/components/SeoEntryFields.js +19 -0
- package/dist/seo/react/components/SeoEntryPanel.d.ts +31 -0
- package/dist/seo/react/components/SeoEntryPanel.js +64 -0
- package/dist/seo/react/components/SeoIcons.d.ts +3 -3
- package/dist/seo/react/components/SeoIcons.js +3 -3
- package/dist/seo/react/components/SeoSection.d.ts +27 -0
- package/dist/seo/react/components/SeoSection.js +24 -0
- package/dist/seo/react/components/SitemapModal.d.ts +42 -2
- package/dist/seo/react/components/SitemapModal.js +17 -17
- package/dist/seo/react/hooks/MediaRefField.hooks.js +6 -6
- package/dist/seo/react/hooks/SeoModuleTabs.d.ts +2 -2
- package/dist/seo/react/hooks/SeoModuleTabs.js +3 -1
- package/dist/seo/react/hooks/SeoPage.hooks.d.ts +2 -2
- package/dist/seo/react/hooks/SeoPorts.hooks.d.ts +5 -0
- package/dist/seo/react/hooks/SeoPorts.hooks.js +11 -1
- package/dist/seo/react/hooks/SeoQuery.hooks.d.ts +3 -3
- package/dist/seo/react/hooks/SeoQuery.hooks.js +1 -1
- package/dist/seo/react/hooks/SitemapModal.hooks.js +1 -1
- package/dist/seo/react/hooks/use-entry-picker.hooks.js +1 -1
- package/dist/seo/react/hooks/use-seo-entry-panel.hooks.js +3 -3
- package/dist/seo/react/hooks/use-seo-entry-section.hooks.js +2 -2
- package/dist/seo/react/hooks/use-seo.hooks.js +3 -3
- package/dist/seo/react/hooks/use-share-image-warning.hooks.js +1 -1
- package/dist/seo/react/hooks/use-sitemap-modal.hooks.d.ts +4 -1
- package/dist/seo/react/hooks/use-sitemap-modal.hooks.js +6 -5
- package/dist/seo/react/index.d.ts +28 -21
- package/dist/seo/react/index.js +5 -6
- package/dist/seo/react/pages/SeoPage.d.ts +16 -82
- package/dist/seo/react/pages/SeoPage.js +29 -216
- package/dist/seo/react/tabs/SeoDefaultsSections.d.ts +19 -0
- package/dist/seo/react/tabs/SeoDefaultsSections.js +48 -0
- package/dist/seo/react/tabs/SeoDefaultsTab.d.ts +24 -0
- package/dist/seo/react/tabs/SeoDefaultsTab.js +30 -0
- package/dist/seo/react/tabs/SeoSitemapTab.d.ts +24 -0
- package/dist/seo/react/tabs/SeoSitemapTab.js +38 -0
- package/dist/seo/rules.d.ts +3 -3
- package/dist/seo/rules.js +6 -6
- package/dist/seo/seo.module.d.ts +3 -3
- package/dist/seo/seo.module.js +1 -1
- package/dist/source-control/controllers/source-control.controller.d.ts +3 -3
- package/dist/source-control/controllers/source-control.controller.js +1 -1
- package/dist/source-control/ports.d.ts +1 -1
- package/dist/source-control/ports.js +1 -1
- package/dist/source-control/react/components/SourceControlCredentialFields.d.ts +4 -2
- package/dist/source-control/react/components/SourceControlCredentialFields.js +3 -3
- package/dist/source-control/react/components/SourceControlProviderRow.d.ts +1 -1
- package/dist/source-control/react/components/SourceControlProviderRow.js +2 -2
- package/dist/source-control/react/hooks/ProvidersTab.hooks.d.ts +1 -1
- package/dist/source-control/react/hooks/ProvidersTab.hooks.js +2 -2
- package/dist/source-control/react/hooks/SourceControlPage.hooks.d.ts +7 -3
- package/dist/source-control/react/hooks/SourceControlPorts.hooks.d.ts +5 -0
- package/dist/source-control/react/hooks/SourceControlPorts.hooks.js +11 -1
- package/dist/source-control/react/index.d.ts +25 -50
- package/dist/source-control/react/index.js +9 -6
- package/dist/source-control/react/pages/SourceControlPage.d.ts +8 -2
- package/dist/source-control/react/pages/SourceControlPage.js +3 -3
- package/dist/source-control/react/tabs/ProvidersTab.d.ts +5 -2
- package/dist/source-control/react/tabs/ProvidersTab.js +3 -3
- package/dist/source-control/source-control.module.d.ts +2 -2
- package/dist/source-control/source-control.module.js +1 -1
- package/dist/widgets/adapters/http.js +2 -2
- package/dist/widgets/adapters/memory.js +26 -20
- package/dist/widgets/controllers/instance-editor.controller.d.ts +3 -3
- package/dist/widgets/controllers/instance-editor.controller.js +48 -38
- package/dist/widgets/controllers/library.controller.d.ts +3 -3
- package/dist/widgets/controllers/library.controller.js +1 -2
- package/dist/widgets/controllers/region-editor.controller.d.ts +3 -3
- package/dist/widgets/controllers/region-editor.controller.js +5 -5
- package/dist/widgets/controllers/regions.controller.d.ts +3 -3
- package/dist/widgets/controllers/regions.controller.js +1 -2
- package/dist/widgets/index.d.ts +2 -1
- package/dist/widgets/index.js +1 -1
- package/dist/widgets/messages.en.js +1 -1
- package/dist/widgets/ports.d.ts +3 -3
- package/dist/widgets/ports.js +1 -1
- package/dist/widgets/react/components/RegionPlacementRow.d.ts +14 -0
- package/dist/widgets/react/components/RegionPlacementRow.js +8 -0
- package/dist/widgets/react/components/TrashWidgetDialog.d.ts +11 -0
- package/dist/widgets/react/components/TrashWidgetDialog.js +8 -0
- package/dist/widgets/react/components/WidgetInstanceNotices.js +1 -1
- package/dist/widgets/react/components/WidgetPageHeaders.d.ts +42 -0
- package/dist/widgets/react/components/WidgetPageHeaders.js +54 -0
- package/dist/widgets/react/components/WidgetRegionEditorHeaderActions.js +1 -1
- package/dist/widgets/react/components/WidgetTableColumns.d.ts +12 -0
- package/dist/widgets/react/components/WidgetTableColumns.js +47 -0
- package/dist/widgets/react/hooks/WidgetsPorts.hooks.d.ts +12 -7
- package/dist/widgets/react/hooks/WidgetsPorts.hooks.js +11 -0
- package/dist/widgets/react/hooks/WidgetsQuery.hooks.d.ts +2 -2
- package/dist/widgets/react/hooks/WidgetsQuery.hooks.js +1 -1
- package/dist/widgets/react/hooks/page-views.hooks.d.ts +1 -1
- package/dist/widgets/react/hooks/page-views.hooks.js +1 -1
- package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.d.ts +2 -2
- package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.js +3 -3
- package/dist/widgets/react/hooks/use-widget-region-editor.hooks.d.ts +1 -1
- package/dist/widgets/react/hooks/use-widget-region-editor.hooks.js +2 -2
- package/dist/widgets/react/hooks/use-widget-regions.hooks.d.ts +3 -1
- package/dist/widgets/react/hooks/use-widget-regions.hooks.js +7 -6
- package/dist/widgets/react/hooks/use-widgets-library.hooks.d.ts +4 -2
- package/dist/widgets/react/hooks/use-widgets-library.hooks.js +7 -6
- package/dist/widgets/react/index.d.ts +41 -34
- package/dist/widgets/react/index.js +5 -6
- package/dist/widgets/react/pages/WidgetInstanceEditor.d.ts +5 -1
- package/dist/widgets/react/pages/WidgetInstanceEditor.js +7 -9
- package/dist/widgets/react/pages/WidgetRegionEditor.d.ts +5 -1
- package/dist/widgets/react/pages/WidgetRegionEditor.js +8 -10
- package/dist/widgets/react/pages/WidgetRegions.d.ts +5 -1
- package/dist/widgets/react/pages/WidgetRegions.js +6 -8
- package/dist/widgets/react/pages/WidgetsLibrary.d.ts +5 -1
- package/dist/widgets/react/pages/WidgetsLibrary.js +8 -45
- package/dist/widgets/rules.d.ts +5 -3
- package/dist/widgets/rules.js +4 -9
- package/dist/widgets/widgets.module.d.ts +3 -3
- package/dist/widgets/widgets.module.js +1 -1
- package/package.json +23 -57
- package/dist/consent/react/ConsentFields.d.ts +0 -39
- package/dist/consent/react/ConsentFields.js +0 -87
- package/dist/consent/react/ConsentPreviewFrame.d.ts +0 -14
- package/dist/consent/react/ConsentPreviewFrame.js +0 -14
- package/dist/consent/react/ConsentSettingsPanel.d.ts +0 -54
- package/dist/consent/react/ConsentSettingsPanel.js +0 -13
- package/dist/consent/react/index.d.ts +0 -8
- package/dist/consent/react/index.js +0 -4
- package/dist/consent/react/settings-panel.hooks.d.ts +0 -49
- package/dist/consent/react/settings-panel.hooks.js +0 -57
- package/dist/core/module/controller-store.d.ts +0 -22
- package/dist/core/module/controller-store.js +0 -32
- package/dist/core/module/define-admin-module.d.ts +0 -4
- package/dist/core/module/define-admin-module.js +0 -5
- package/dist/core/module/token.d.ts +0 -19
- package/dist/core/module/token.js +0 -4
- package/dist/core/module/types.d.ts +0 -79
- package/dist/core/module/types.js +0 -2
- package/dist/core/permissions/rules.d.ts +0 -35
- package/dist/core/permissions/rules.js +0 -34
- package/dist/core/transport/errors.d.ts +0 -62
- package/dist/core/transport/errors.js +0 -63
- package/dist/core/transport/query-suffix.d.ts +0 -3
- package/dist/core/transport/query-suffix.js +0 -5
- package/dist/media/styles.d.ts +0 -4
- package/dist/media/styles.js +0 -5
- package/dist/react/bind-react.d.ts +0 -2
- package/dist/react/bind-react.js +0 -3
- package/dist/react/use-controller.d.ts +0 -2
- package/dist/react/use-controller.js +0 -3
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Types for the media-providers editor slot of the admin UI kit. They are local copies of the
|
|
3
|
+
* shapes the host's editor implements, so this package's published types pin no UI library.
|
|
4
|
+
*/
|
|
5
|
+
import type { MediaProviderCatalogPolicy, MediaProviderOption } from '@jini-ai/core';
|
|
6
|
+
/**
|
|
7
|
+
* One provider's stored credentials.
|
|
8
|
+
*
|
|
9
|
+
* TWO KINDS OF "PRESENT" live in this shape, and conflating them is the bug
|
|
10
|
+
* this whole module exists to avoid:
|
|
11
|
+
*
|
|
12
|
+
* - **Recoverable fields** (`apiKey`, `baseUrl`, `model`) are real values the
|
|
13
|
+
* operator typed and that can be re-sent.
|
|
14
|
+
* - **Markers** (`apiKeyConfigured`, `apiKeyTail`) are the server saying "a key
|
|
15
|
+
* exists here, but you don't get to see it". They prove configuration
|
|
16
|
+
* without carrying anything usable.
|
|
17
|
+
*
|
|
18
|
+
* An entry holding ONLY markers is configured but carries no data — see
|
|
19
|
+
* `isMarkerOnlyEntry`.
|
|
20
|
+
*/
|
|
21
|
+
export interface MediaProviderCredentials {
|
|
22
|
+
apiKey?: string;
|
|
23
|
+
baseUrl?: string;
|
|
24
|
+
model?: string;
|
|
25
|
+
/** Server-side marker: a key is stored, not disclosed. */
|
|
26
|
+
apiKeyConfigured?: boolean;
|
|
27
|
+
/** Server-side marker: last few characters, for display only. */
|
|
28
|
+
apiKeyTail?: string;
|
|
29
|
+
/** Free-form provenance tag, host-defined. */
|
|
30
|
+
source?: string;
|
|
31
|
+
}
|
|
32
|
+
/** Credentials keyed by provider id. */
|
|
33
|
+
export type MediaProviderMap = Record<string, MediaProviderCredentials>;
|
|
34
|
+
/**
|
|
35
|
+
* Result of the tab's daemon read, surfaced while the initial fetch or a
|
|
36
|
+
* manual reload is in flight. `'unreachable'` mirrors
|
|
37
|
+
* `MediaProvidersPort.fetchMediaProviders`'s `null` result as a renderable
|
|
38
|
+
* state — the daemon was never reached, distinct from `'ok'` (reached; local
|
|
39
|
+
* state is now reconciled against whatever it reported, including managing
|
|
40
|
+
* nothing at all). There is no `'error'` member: the port's `fetchMediaProviders`
|
|
41
|
+
* never rejects — see its own doc comment for why unreachable is a value,
|
|
42
|
+
* not a failure, in this contract.
|
|
43
|
+
*/
|
|
44
|
+
export type MediaProvidersLoadState = {
|
|
45
|
+
status: 'loading';
|
|
46
|
+
} | {
|
|
47
|
+
status: 'ok';
|
|
48
|
+
} | {
|
|
49
|
+
status: 'unreachable';
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Result of `MediaProvidersPort.saveMediaProviders`, surfaced near whichever
|
|
53
|
+
* action triggered it (an explicit Save, or Clear's implicit save-on-clear).
|
|
54
|
+
* Same "async edge result" idiom as `ConnectionTestState`/`AgentScanState` in
|
|
55
|
+
* the execution tab's types — one shared shape for "what happened the last
|
|
56
|
+
* time this async edge ran" across this package.
|
|
57
|
+
*/
|
|
58
|
+
export type MediaProvidersSaveState = {
|
|
59
|
+
status: 'idle';
|
|
60
|
+
} | {
|
|
61
|
+
status: 'saving';
|
|
62
|
+
} | {
|
|
63
|
+
status: 'saved';
|
|
64
|
+
} | {
|
|
65
|
+
status: 'save-error';
|
|
66
|
+
message: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* The daemon-side transport this tab needs: reading the server's current
|
|
70
|
+
* provider credentials and persisting the operator's local edits back to it.
|
|
71
|
+
* Genuinely host-owned — the origin called its own daemon's media-provider
|
|
72
|
+
* config endpoints (`fetchMediaProvidersFromDaemon`/`syncMediaProvidersToDaemon`
|
|
73
|
+
* in `App.tsx`). This feature ships only a fake in `dependencies.ts`; a real
|
|
74
|
+
* host supplies its own implementation (same convention as
|
|
75
|
+
* `ProjectLocationsPort`/`SkillsPort`).
|
|
76
|
+
*/
|
|
77
|
+
export interface MediaProvidersPort {
|
|
78
|
+
/**
|
|
79
|
+
* The server's current provider credentials. Called on mount and on
|
|
80
|
+
* reload.
|
|
81
|
+
*
|
|
82
|
+
* Resolves `null` when the daemon could not be reached at all — as opposed
|
|
83
|
+
* to reached and managing nothing (`{}`). `mergeDaemonProviders` treats
|
|
84
|
+
* those two outcomes very differently (see `rules.ts`'s doc comment):
|
|
85
|
+
* `null` leaves local edits untouched, `{}` is a real answer that can drop
|
|
86
|
+
* stale local markers. A host implementation MUST preserve this
|
|
87
|
+
* distinction rather than collapsing an unreachable daemon to `{}` — doing
|
|
88
|
+
* so would make a transient network blip read as "the server manages
|
|
89
|
+
* nothing" and wipe local edits that only `null` protects.
|
|
90
|
+
*/
|
|
91
|
+
fetchMediaProviders(): Promise<MediaProviderMap | null>;
|
|
92
|
+
/**
|
|
93
|
+
* Persists `providers` as the full set of daemon-held credentials and
|
|
94
|
+
* resolves the authoritative copy afterward — same "save the whole set,
|
|
95
|
+
* get the truth back" shape as `ProjectLocationsPort.saveLocations`.
|
|
96
|
+
*
|
|
97
|
+
* REJECTS on failure — unlike `ExecutionPort.testConnection`, there is no
|
|
98
|
+
* "reached but declined" outcome worth modelling as a value here; a save
|
|
99
|
+
* either persists or it doesn't.
|
|
100
|
+
*
|
|
101
|
+
* **Callers MUST NOT overlap two of these.** Whole-map replacement carries
|
|
102
|
+
* no expected-revision, so the implementation has nothing to reject a stale
|
|
103
|
+
* write with: when two are in flight the surviving state is whichever the
|
|
104
|
+
* host happens to handle LAST, which need not be the one issued last. A
|
|
105
|
+
* caller that guards only its own RESPONSE handling still loses — the
|
|
106
|
+
* superseded REQUEST has already rewritten the host. Serialize instead, and
|
|
107
|
+
* build each payload when it is sent rather than when it is queued
|
|
108
|
+
* (`useMediaProvidersTab`'s `persist`/`flushNow` is the reference).
|
|
109
|
+
*
|
|
110
|
+
* Adding an expected-revision parameter would let the host reject staleness
|
|
111
|
+
* outright, but this port is host-implemented, so that is a breaking change
|
|
112
|
+
* and deliberately not taken; caller-side serialization closes the same race
|
|
113
|
+
* without one.
|
|
114
|
+
*/
|
|
115
|
+
saveMediaProviders(providers: MediaProviderMap): Promise<MediaProviderMap>;
|
|
116
|
+
}
|
|
117
|
+
/** The operator-editable fields of a provider entry. Server markers
|
|
118
|
+
* (`apiKeyConfigured`/`apiKeyTail`) are deliberately excluded — they only
|
|
119
|
+
* ever arrive FROM the daemon, never typed by the operator; see
|
|
120
|
+
* `MediaProviderCredentials`'s own doc comment for the recoverable-vs-marker
|
|
121
|
+
* distinction this narrows around. */
|
|
122
|
+
export type MediaProviderEditPatch = Pick<MediaProviderCredentials, 'apiKey' | 'baseUrl' | 'model'>;
|
|
123
|
+
export interface UseMediaProvidersTabOptions {
|
|
124
|
+
port: MediaProvidersPort;
|
|
125
|
+
/** Identity rules shared by catalog rows, local edits and daemon responses. Stable while mounted. */
|
|
126
|
+
catalogPolicy: MediaProviderCatalogPolicy;
|
|
127
|
+
/** Host-persisted local edits from before this tab mounted (e.g. the
|
|
128
|
+
* host's own locally-cached config, read before the daemon round-trip
|
|
129
|
+
* completes). Defaults to none. Threaded into the initial
|
|
130
|
+
* daemon-reconciliation merge unchanged, so a first-run migration
|
|
131
|
+
* (`shouldSyncLocalProvidersToDaemon`) has real local data to detect. */
|
|
132
|
+
initialProviders?: MediaProviderMap | undefined;
|
|
133
|
+
}
|
|
134
|
+
export interface UseMediaProvidersTabResult {
|
|
135
|
+
/** The full working set: local edits layered over whatever the daemon last
|
|
136
|
+
* reported. Reflects `initialProviders` until the first load settles. */
|
|
137
|
+
providers: MediaProviderMap;
|
|
138
|
+
load: MediaProvidersLoadState;
|
|
139
|
+
save: MediaProvidersSaveState;
|
|
140
|
+
hasAnyConfigured: boolean;
|
|
141
|
+
/** Provider ids with an edit not yet flushed to the daemon. A `reload()`
|
|
142
|
+
* preserves exactly these over whatever the server reports for them — see
|
|
143
|
+
* `mergeDaemonProviders`'s `preserveLocalProviderIds`. */
|
|
144
|
+
pendingProviderIds: ReadonlySet<string>;
|
|
145
|
+
updateProvider: (providerId: string, patch: MediaProviderEditPatch) => void;
|
|
146
|
+
/** Drops the provider entirely (recoverable fields AND server markers) and
|
|
147
|
+
* immediately persists the removal. Clear is treated as a decisive action
|
|
148
|
+
* — same as the origin's confirm-then-clear flow — not a pending edit an
|
|
149
|
+
* operator might still back out of via `reload()`. */
|
|
150
|
+
clearProvider: (providerId: string) => void;
|
|
151
|
+
/** Flushes every current provider to the daemon. */
|
|
152
|
+
saveChanges: () => void;
|
|
153
|
+
/** Re-reads the daemon's copy and reconciles it against local state. */
|
|
154
|
+
reload: () => void;
|
|
155
|
+
}
|
|
156
|
+
/** The media-providers editor and its pure rules; the host implements them, admin's ProvidersTab renders them. */
|
|
157
|
+
export interface AdminMediaProvidersKit {
|
|
158
|
+
useMediaProvidersTab(options: UseMediaProvidersTabOptions): UseMediaProvidersTabResult;
|
|
159
|
+
readonly rules: {
|
|
160
|
+
sortProvidersByConfigured<T extends {
|
|
161
|
+
id: string;
|
|
162
|
+
label: string;
|
|
163
|
+
}>(required: {
|
|
164
|
+
catalog: readonly T[];
|
|
165
|
+
providers: MediaProviderMap | null | undefined;
|
|
166
|
+
}, optional?: {
|
|
167
|
+
pinnedIds?: readonly string[] | undefined;
|
|
168
|
+
}): readonly T[];
|
|
169
|
+
isEntryPresent(required: {
|
|
170
|
+
entry: MediaProviderCredentials | null | undefined;
|
|
171
|
+
}, optional?: Record<string, never>): boolean;
|
|
172
|
+
isMarkerOnlyEntry(required: {
|
|
173
|
+
entry: MediaProviderCredentials | null | undefined;
|
|
174
|
+
}, optional?: Record<string, never>): boolean;
|
|
175
|
+
maskedKeyLabel(required: {
|
|
176
|
+
entry: MediaProviderCredentials | null | undefined;
|
|
177
|
+
}, optional?: Record<string, never>): string | null;
|
|
178
|
+
isProviderBaseUrlInvalid(required: {
|
|
179
|
+
entry: MediaProviderCredentials | null | undefined;
|
|
180
|
+
}, optional?: Record<string, never>): boolean;
|
|
181
|
+
invalidBaseUrlProviderIds(required: {
|
|
182
|
+
providers: MediaProviderMap | null | undefined;
|
|
183
|
+
}, optional?: Record<string, never>): readonly string[];
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
export type { MediaProviderCatalogPolicy, MediaProviderOption };
|
|
187
|
+
//# sourceMappingURL=kit-media-providers.d.ts.map
|
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
import type { ComponentType, MouseEvent, ReactNode, Ref, RefObject, SyntheticEvent } from 'react';
|
|
2
|
+
import type { FetchQueryAdapter } from '@jini-ai/core/fetch';
|
|
3
|
+
import type { Translate } from '@jini-ai/core/text';
|
|
4
|
+
import type { MediaProviderCatalogPolicy, MediaProviderOption } from '@jini-ai/core';
|
|
5
|
+
import type { UserFacingError } from '@jini-ai/core';
|
|
6
|
+
import type { AdminMediaProvidersKit } from './kit-media-providers.js';
|
|
7
|
+
/** Opaque host metadata; implementations spread it onto the documented focus target. */
|
|
8
|
+
export type KitAttrs = Readonly<{
|
|
9
|
+
id?: string;
|
|
10
|
+
'data-jini-part'?: string;
|
|
11
|
+
}> & Readonly<Partial<Record<`data-${string}` | `aria-${string}`, string | number | boolean | undefined>>>;
|
|
12
|
+
/** The host owns handle validation and its agent runtime. */
|
|
13
|
+
export type AgentAttrsPort = (required: {
|
|
14
|
+
handle: string;
|
|
15
|
+
}, optional?: {
|
|
16
|
+
role?: 'button' | 'field' | 'select';
|
|
17
|
+
label?: string;
|
|
18
|
+
}) => KitAttrs;
|
|
19
|
+
type Action = (required: Record<string, never>, optional?: Record<string, never>) => void;
|
|
20
|
+
type ValuePort<T> = (required: {
|
|
21
|
+
value: T;
|
|
22
|
+
}, optional?: Record<string, never>) => void;
|
|
23
|
+
type Tone = 'info' | 'success' | 'warning' | 'danger';
|
|
24
|
+
interface Base {
|
|
25
|
+
readonly attrs?: KitAttrs;
|
|
26
|
+
readonly className?: string;
|
|
27
|
+
readonly agentHandle?: string | false;
|
|
28
|
+
}
|
|
29
|
+
export interface ButtonProps extends Base {
|
|
30
|
+
readonly children?: ReactNode;
|
|
31
|
+
readonly onPress?: Action;
|
|
32
|
+
readonly disabled?: boolean;
|
|
33
|
+
readonly pending?: boolean;
|
|
34
|
+
readonly variant?: 'primary' | 'secondary' | 'danger' | 'warning' | 'ghost';
|
|
35
|
+
readonly type?: 'button' | 'submit' | 'reset';
|
|
36
|
+
readonly ref?: Ref<HTMLButtonElement>;
|
|
37
|
+
}
|
|
38
|
+
export interface IconButtonProps extends ButtonProps {
|
|
39
|
+
readonly label: string;
|
|
40
|
+
}
|
|
41
|
+
export interface TextFieldProps extends Base {
|
|
42
|
+
readonly label: string;
|
|
43
|
+
readonly value: string;
|
|
44
|
+
readonly onValueChange: ValuePort<string>;
|
|
45
|
+
readonly disabled?: boolean;
|
|
46
|
+
readonly required?: boolean;
|
|
47
|
+
readonly placeholder?: string;
|
|
48
|
+
readonly type?: 'text' | 'password' | 'email' | 'search' | 'url' | 'tel' | 'number';
|
|
49
|
+
readonly ref?: Ref<HTMLInputElement>;
|
|
50
|
+
}
|
|
51
|
+
export interface TextAreaProps extends Base {
|
|
52
|
+
readonly label: string;
|
|
53
|
+
readonly value: string;
|
|
54
|
+
readonly onValueChange: ValuePort<string>;
|
|
55
|
+
readonly disabled?: boolean;
|
|
56
|
+
readonly rows?: number;
|
|
57
|
+
readonly ref?: Ref<HTMLTextAreaElement>;
|
|
58
|
+
}
|
|
59
|
+
export interface SelectOption {
|
|
60
|
+
readonly value: string;
|
|
61
|
+
readonly label: string;
|
|
62
|
+
readonly disabled?: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface SelectProps extends Base {
|
|
65
|
+
readonly label: string;
|
|
66
|
+
readonly value: string;
|
|
67
|
+
readonly options: readonly SelectOption[];
|
|
68
|
+
readonly onValueChange: ValuePort<string>;
|
|
69
|
+
readonly disabled?: boolean;
|
|
70
|
+
readonly ref?: Ref<HTMLSelectElement>;
|
|
71
|
+
}
|
|
72
|
+
export interface SwitchProps extends Base {
|
|
73
|
+
readonly label: string;
|
|
74
|
+
readonly checked: boolean;
|
|
75
|
+
readonly disabled?: boolean;
|
|
76
|
+
readonly onCheckedChange: (required: {
|
|
77
|
+
checked: boolean;
|
|
78
|
+
}, optional?: Record<string, never>) => void;
|
|
79
|
+
}
|
|
80
|
+
export interface DialogProps extends Base {
|
|
81
|
+
readonly open: boolean;
|
|
82
|
+
readonly title: string;
|
|
83
|
+
readonly children?: ReactNode;
|
|
84
|
+
readonly onClose: Action;
|
|
85
|
+
readonly pending?: boolean;
|
|
86
|
+
readonly closeLabel?: string;
|
|
87
|
+
readonly ref?: Ref<HTMLDialogElement>;
|
|
88
|
+
}
|
|
89
|
+
export type KitConfirmTone = 'default' | 'warning' | 'danger';
|
|
90
|
+
/** The host kit's confirm dialog. Admin's own ConfirmDialog (components/ConfirmDialog) is separate. */
|
|
91
|
+
export interface KitConfirmDialogProps extends Base {
|
|
92
|
+
readonly open: boolean;
|
|
93
|
+
readonly title: string;
|
|
94
|
+
readonly confirmLabel: string;
|
|
95
|
+
readonly cancelLabel?: string;
|
|
96
|
+
readonly tone?: KitConfirmTone;
|
|
97
|
+
readonly pending?: boolean;
|
|
98
|
+
readonly consequence?: string;
|
|
99
|
+
readonly agentMayConfirm?: boolean;
|
|
100
|
+
readonly body?: ReactNode;
|
|
101
|
+
readonly errorLabel?: string;
|
|
102
|
+
readonly onConfirm: (required: Record<string, never>, optional?: Record<string, never>) => void | Promise<void>;
|
|
103
|
+
readonly onCancel: Action;
|
|
104
|
+
readonly actionAccessibleNames?: {
|
|
105
|
+
readonly cancel: string;
|
|
106
|
+
readonly confirm: string;
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export interface TabItem {
|
|
110
|
+
readonly id: string;
|
|
111
|
+
readonly label: string;
|
|
112
|
+
readonly content: ReactNode;
|
|
113
|
+
readonly disabled?: boolean;
|
|
114
|
+
readonly attrs?: KitAttrs;
|
|
115
|
+
}
|
|
116
|
+
export interface TabsProps extends Base {
|
|
117
|
+
readonly label: string;
|
|
118
|
+
readonly value: string;
|
|
119
|
+
readonly items: readonly TabItem[];
|
|
120
|
+
readonly onValueChange: ValuePort<string>;
|
|
121
|
+
}
|
|
122
|
+
export interface MenuItem {
|
|
123
|
+
readonly id: string;
|
|
124
|
+
readonly label: string;
|
|
125
|
+
readonly disabled?: boolean;
|
|
126
|
+
readonly onPress: Action;
|
|
127
|
+
readonly attrs?: KitAttrs;
|
|
128
|
+
}
|
|
129
|
+
export interface MenuProps extends Base {
|
|
130
|
+
readonly label: string;
|
|
131
|
+
readonly items: readonly MenuItem[];
|
|
132
|
+
readonly disabled?: boolean;
|
|
133
|
+
}
|
|
134
|
+
export interface NoticeProps extends Base {
|
|
135
|
+
readonly children: ReactNode;
|
|
136
|
+
readonly tone?: Tone;
|
|
137
|
+
}
|
|
138
|
+
export interface SpinnerProps extends Base {
|
|
139
|
+
readonly label?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface BadgeProps extends Base {
|
|
142
|
+
readonly children: ReactNode;
|
|
143
|
+
readonly tone?: Tone;
|
|
144
|
+
}
|
|
145
|
+
export interface InfoTipProps {
|
|
146
|
+
label: string;
|
|
147
|
+
agentHandle?: string | false | undefined;
|
|
148
|
+
}
|
|
149
|
+
type LightboxPart = 'dialog' | 'close' | 'previous' | 'next';
|
|
150
|
+
export interface LightboxProps {
|
|
151
|
+
open: boolean;
|
|
152
|
+
title: string;
|
|
153
|
+
onClose: () => void;
|
|
154
|
+
children?: ReactNode;
|
|
155
|
+
index?: number | undefined;
|
|
156
|
+
count?: number | undefined;
|
|
157
|
+
onNavigate?: ((index: number) => void) | undefined;
|
|
158
|
+
labels?: Partial<Record<'close' | 'previous' | 'next', string>> | undefined;
|
|
159
|
+
className?: string | undefined;
|
|
160
|
+
partAttrs?: Partial<Record<LightboxPart, Record<string, string>>> | undefined;
|
|
161
|
+
}
|
|
162
|
+
/** Option rows for the searchable listbox; `group` runs must arrive ordered. */
|
|
163
|
+
export interface WidgetSelectOption {
|
|
164
|
+
value: string;
|
|
165
|
+
label: string;
|
|
166
|
+
group?: string | undefined;
|
|
167
|
+
badge?: string | undefined;
|
|
168
|
+
detail?: string | undefined;
|
|
169
|
+
}
|
|
170
|
+
export interface WidgetSelectProps {
|
|
171
|
+
value: string;
|
|
172
|
+
onChange: (value: string) => void;
|
|
173
|
+
options: WidgetSelectOption[];
|
|
174
|
+
placeholder?: string | undefined;
|
|
175
|
+
id?: string | undefined;
|
|
176
|
+
'aria-label'?: string | undefined;
|
|
177
|
+
disabled?: boolean | undefined;
|
|
178
|
+
agentHandle?: string | false | undefined;
|
|
179
|
+
translate?: Translate | undefined;
|
|
180
|
+
}
|
|
181
|
+
export interface TabBarTab {
|
|
182
|
+
readonly id: string;
|
|
183
|
+
readonly label: string;
|
|
184
|
+
readonly icon?: ReactNode | undefined;
|
|
185
|
+
readonly count?: number | undefined;
|
|
186
|
+
readonly tag?: string | undefined;
|
|
187
|
+
readonly handle?: string | undefined;
|
|
188
|
+
readonly handleLabel?: string | undefined;
|
|
189
|
+
}
|
|
190
|
+
export interface TabBarProps {
|
|
191
|
+
tabs: readonly TabBarTab[];
|
|
192
|
+
activeId: string;
|
|
193
|
+
onChange: (id: string) => void;
|
|
194
|
+
ariaLabel: string;
|
|
195
|
+
containerHandle?: string | undefined;
|
|
196
|
+
}
|
|
197
|
+
export interface CanvasEmbedPlaceholderDescriptor {
|
|
198
|
+
kindLabel: string;
|
|
199
|
+
identityLabel: string;
|
|
200
|
+
}
|
|
201
|
+
export interface CanvasContentWrapperNode {
|
|
202
|
+
tagName: string;
|
|
203
|
+
attributes?: Readonly<Record<string, string>>;
|
|
204
|
+
}
|
|
205
|
+
export interface CanvasStyling {
|
|
206
|
+
adminTheme?: AdminTheme;
|
|
207
|
+
colorScheme?: ColorScheme;
|
|
208
|
+
stylesheets?: readonly string[];
|
|
209
|
+
css?: string;
|
|
210
|
+
contentWrapper?: readonly CanvasContentWrapperNode[];
|
|
211
|
+
}
|
|
212
|
+
/** `flush()` before save/unmount syncs an open rich-text session's pending edit into onChange. */
|
|
213
|
+
export interface InteractiveHtmlEditorHandle {
|
|
214
|
+
flush(): Promise<string | undefined>;
|
|
215
|
+
}
|
|
216
|
+
/** Which source element a protected block stands for: its tag, optional id, and occurrence among matches. */
|
|
217
|
+
export interface HtmlEditorTarget {
|
|
218
|
+
occurrenceIndex: number;
|
|
219
|
+
tagName: string;
|
|
220
|
+
id?: string;
|
|
221
|
+
}
|
|
222
|
+
/** Structural mirror of the editor's options, so a host's editor keeps its HTML-source and error callbacks. */
|
|
223
|
+
export interface HtmlEditorProps {
|
|
224
|
+
html: string;
|
|
225
|
+
onChange: (html: string) => void;
|
|
226
|
+
className?: string;
|
|
227
|
+
canvasStyling?: CanvasStyling;
|
|
228
|
+
isProtectedElement?: (el: Element) => boolean;
|
|
229
|
+
describeEmbedPlaceholder?: (el: Element) => CanvasEmbedPlaceholderDescriptor | undefined;
|
|
230
|
+
/** Opens the HTML source for a block the canvas cannot edit visually. */
|
|
231
|
+
onRequestEditHtml?: ((target: HtmlEditorTarget, options: object) => void | Promise<void>) | undefined;
|
|
232
|
+
/** Called when a visual edit cannot be written back to the source (the error carries a `code`). */
|
|
233
|
+
onSerializationError?: ((error: Error & {
|
|
234
|
+
readonly code: string;
|
|
235
|
+
}) => void) | undefined;
|
|
236
|
+
translate?: Translate | undefined;
|
|
237
|
+
ref?: Ref<InteractiveHtmlEditorHandle>;
|
|
238
|
+
}
|
|
239
|
+
export interface ErrorNoticeProps {
|
|
240
|
+
readonly failure: UserFacingError;
|
|
241
|
+
readonly t?: Translate;
|
|
242
|
+
readonly className?: string;
|
|
243
|
+
readonly role?: 'alert' | 'status';
|
|
244
|
+
}
|
|
245
|
+
export interface AdminKitComponents {
|
|
246
|
+
Button: ComponentType<ButtonProps>;
|
|
247
|
+
IconButton: ComponentType<IconButtonProps>;
|
|
248
|
+
TextField: ComponentType<TextFieldProps>;
|
|
249
|
+
TextArea: ComponentType<TextAreaProps>;
|
|
250
|
+
Select: ComponentType<SelectProps>;
|
|
251
|
+
Switch: ComponentType<SwitchProps>;
|
|
252
|
+
Dialog: ComponentType<DialogProps>;
|
|
253
|
+
ConfirmDialog: ComponentType<KitConfirmDialogProps>;
|
|
254
|
+
Tabs: ComponentType<TabsProps>;
|
|
255
|
+
Menu: ComponentType<MenuProps>;
|
|
256
|
+
Notice: ComponentType<NoticeProps>;
|
|
257
|
+
Spinner: ComponentType<SpinnerProps>;
|
|
258
|
+
Badge: ComponentType<BadgeProps>;
|
|
259
|
+
InfoTip: ComponentType<InfoTipProps>;
|
|
260
|
+
Lightbox: ComponentType<LightboxProps>;
|
|
261
|
+
WidgetSelect: ComponentType<WidgetSelectProps>;
|
|
262
|
+
TabBar: ComponentType<TabBarProps>;
|
|
263
|
+
HtmlEditor: ComponentType<HtmlEditorProps>;
|
|
264
|
+
ErrorNotice: ComponentType<ErrorNoticeProps>;
|
|
265
|
+
}
|
|
266
|
+
export interface AgentControlProps {
|
|
267
|
+
readonly agentHandle?: string | false | undefined;
|
|
268
|
+
readonly 'data-agent-element'?: string | undefined;
|
|
269
|
+
readonly 'data-agent-private'?: string | boolean | undefined;
|
|
270
|
+
readonly 'data-agent-page'?: string | undefined;
|
|
271
|
+
}
|
|
272
|
+
export interface DirtyGuard {
|
|
273
|
+
isDirty: boolean;
|
|
274
|
+
confirmLeave: (required?: Record<string, never>, optional?: {
|
|
275
|
+
unsavedBeyondTracked?: boolean;
|
|
276
|
+
}) => boolean;
|
|
277
|
+
}
|
|
278
|
+
export type DirtyGuardHostPort = Pick<Window, 'addEventListener' | 'removeEventListener' | 'confirm'>;
|
|
279
|
+
export interface SettlementGeneration {
|
|
280
|
+
next: () => number;
|
|
281
|
+
isCurrent: (required: {
|
|
282
|
+
generation: number;
|
|
283
|
+
}) => boolean;
|
|
284
|
+
}
|
|
285
|
+
/** The fields of the host's confirm view model admin's ConfirmDialog reads. */
|
|
286
|
+
export interface ConfirmControllerView {
|
|
287
|
+
readonly pending: boolean;
|
|
288
|
+
readonly error: ReactNode;
|
|
289
|
+
readonly cancel: {
|
|
290
|
+
readonly attrs?: KitAttrs;
|
|
291
|
+
readonly onPress?: Action;
|
|
292
|
+
};
|
|
293
|
+
readonly confirm: {
|
|
294
|
+
readonly attrs?: KitAttrs;
|
|
295
|
+
readonly onPress?: Action;
|
|
296
|
+
};
|
|
297
|
+
requestDismiss(required: {
|
|
298
|
+
reason: 'cancel-button' | 'escape' | 'backdrop' | 'close';
|
|
299
|
+
}, optional?: Record<string, never>): boolean;
|
|
300
|
+
}
|
|
301
|
+
export interface NativeDialogView {
|
|
302
|
+
readonly titleId: string;
|
|
303
|
+
readonly props: {
|
|
304
|
+
readonly ref: RefObject<HTMLDialogElement | null>;
|
|
305
|
+
readonly onCancel: (event: SyntheticEvent<HTMLDialogElement>) => void;
|
|
306
|
+
readonly onClick: (event: MouseEvent<HTMLDialogElement>) => void;
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
export interface AdminKitHooks {
|
|
310
|
+
useAgentHandle(required: AgentControlProps, optional?: Record<string, never>): string | undefined;
|
|
311
|
+
useFocusTrap(required: {
|
|
312
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
313
|
+
}, optional?: {
|
|
314
|
+
active?: boolean | undefined;
|
|
315
|
+
}): void;
|
|
316
|
+
useDirtyGuard<T>(required: {
|
|
317
|
+
current: T;
|
|
318
|
+
original: T | null;
|
|
319
|
+
}, optional?: {
|
|
320
|
+
translate?: Translate | undefined;
|
|
321
|
+
host?: DirtyGuardHostPort | undefined;
|
|
322
|
+
}): DirtyGuard;
|
|
323
|
+
useSettlementGeneration(): SettlementGeneration;
|
|
324
|
+
useConfirmController(required: KitConfirmDialogProps, optional?: {
|
|
325
|
+
agent?: AgentAttrsPort;
|
|
326
|
+
}): ConfirmControllerView;
|
|
327
|
+
useNativeDialog(required: DialogProps, optional?: {
|
|
328
|
+
initialFocus?: () => void;
|
|
329
|
+
document?: Pick<Document, 'activeElement'>;
|
|
330
|
+
}): NativeDialogView;
|
|
331
|
+
}
|
|
332
|
+
export interface AdminQueryKit extends FetchQueryAdapter {
|
|
333
|
+
useFetchQueryScope(required: {
|
|
334
|
+
owner: object;
|
|
335
|
+
}, optional?: Record<string, never>): number;
|
|
336
|
+
}
|
|
337
|
+
export interface AdminThemeColors {
|
|
338
|
+
readonly primary: string;
|
|
339
|
+
readonly primaryInk: string;
|
|
340
|
+
readonly bg: string;
|
|
341
|
+
readonly surface: string;
|
|
342
|
+
readonly text: string;
|
|
343
|
+
readonly muted: string;
|
|
344
|
+
readonly border: string;
|
|
345
|
+
readonly danger: string;
|
|
346
|
+
readonly success: string;
|
|
347
|
+
readonly warning: string;
|
|
348
|
+
}
|
|
349
|
+
export interface AdminTheme {
|
|
350
|
+
readonly name: string;
|
|
351
|
+
readonly fonts: {
|
|
352
|
+
readonly body: string;
|
|
353
|
+
readonly heading: string;
|
|
354
|
+
readonly mono?: string;
|
|
355
|
+
readonly load?: readonly string[];
|
|
356
|
+
};
|
|
357
|
+
readonly light: AdminThemeColors;
|
|
358
|
+
readonly dark: AdminThemeColors;
|
|
359
|
+
readonly radius?: string;
|
|
360
|
+
readonly density?: number;
|
|
361
|
+
}
|
|
362
|
+
export type ColorScheme = 'light' | 'dark';
|
|
363
|
+
export type ColorSchemePreference = ColorScheme | 'system';
|
|
364
|
+
export type MatchMediaPort = (query: string) => {
|
|
365
|
+
readonly matches: boolean;
|
|
366
|
+
addEventListener?: (type: 'change', listener: () => void) => void;
|
|
367
|
+
removeEventListener?: (type: 'change', listener: () => void) => void;
|
|
368
|
+
};
|
|
369
|
+
export type AdminThemeTarget = Pick<HTMLElement, 'style' | 'getAttribute' | 'setAttribute' | 'removeAttribute'>;
|
|
370
|
+
export type AdminThemeDocument = Pick<Document, 'head' | 'createElement' | 'baseURI'>;
|
|
371
|
+
export interface AdminThemeKit {
|
|
372
|
+
applyAdminTheme(required: {
|
|
373
|
+
readonly theme: AdminTheme;
|
|
374
|
+
}, optional: {
|
|
375
|
+
readonly target: AdminThemeTarget;
|
|
376
|
+
readonly document: AdminThemeDocument;
|
|
377
|
+
}): () => void;
|
|
378
|
+
resolveColorScheme(required: {
|
|
379
|
+
readonly preference: ColorSchemePreference;
|
|
380
|
+
}, optional?: {
|
|
381
|
+
readonly matchMedia?: MatchMediaPort;
|
|
382
|
+
}): ColorScheme;
|
|
383
|
+
readonly defaultAdminTheme: AdminTheme;
|
|
384
|
+
}
|
|
385
|
+
export interface AdminKit {
|
|
386
|
+
readonly components: AdminKitComponents;
|
|
387
|
+
readonly hooks: AdminKitHooks;
|
|
388
|
+
readonly query: AdminQueryKit;
|
|
389
|
+
readonly mediaProviders: AdminMediaProvidersKit;
|
|
390
|
+
readonly theme: AdminThemeKit;
|
|
391
|
+
}
|
|
392
|
+
/** Mount once at the host root. The first kit is kept: hook slots must not change identity. */
|
|
393
|
+
export declare function AdminKitProvider(required: {
|
|
394
|
+
kit: AdminKit;
|
|
395
|
+
children: ReactNode;
|
|
396
|
+
}): import("react").JSX.Element;
|
|
397
|
+
export declare function useAdminKit(): AdminKit;
|
|
398
|
+
export declare const Button: ComponentType<ButtonProps> & ComponentType<ButtonProps & {
|
|
399
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
400
|
+
}>;
|
|
401
|
+
export declare const IconButton: ComponentType<IconButtonProps> & ComponentType<IconButtonProps & {
|
|
402
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
403
|
+
}>;
|
|
404
|
+
export declare const TextField: ComponentType<TextFieldProps> & ComponentType<TextFieldProps & {
|
|
405
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
406
|
+
}>;
|
|
407
|
+
export declare const TextArea: ComponentType<TextAreaProps> & ComponentType<TextAreaProps & {
|
|
408
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
409
|
+
}>;
|
|
410
|
+
export declare const Select: ComponentType<SelectProps> & ComponentType<SelectProps & {
|
|
411
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
412
|
+
}>;
|
|
413
|
+
export declare const Switch: ComponentType<SwitchProps> & ComponentType<SwitchProps & {
|
|
414
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
415
|
+
}>;
|
|
416
|
+
export declare const Dialog: ComponentType<DialogProps> & ComponentType<DialogProps & {
|
|
417
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
418
|
+
}>;
|
|
419
|
+
export declare const ConfirmDialog: ComponentType<KitConfirmDialogProps> & ComponentType<KitConfirmDialogProps & {
|
|
420
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
421
|
+
}>;
|
|
422
|
+
export declare const Tabs: ComponentType<TabsProps> & ComponentType<TabsProps & {
|
|
423
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
424
|
+
}>;
|
|
425
|
+
export declare const Menu: ComponentType<MenuProps> & ComponentType<MenuProps & {
|
|
426
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
427
|
+
}>;
|
|
428
|
+
export declare const Notice: ComponentType<NoticeProps> & ComponentType<NoticeProps & {
|
|
429
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
430
|
+
}>;
|
|
431
|
+
export declare const Spinner: ComponentType<SpinnerProps> & ComponentType<SpinnerProps & {
|
|
432
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
433
|
+
}>;
|
|
434
|
+
export declare const Badge: ComponentType<BadgeProps> & ComponentType<BadgeProps & {
|
|
435
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
436
|
+
}>;
|
|
437
|
+
export declare const InfoTip: ComponentType<InfoTipProps> & ComponentType<InfoTipProps & {
|
|
438
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
439
|
+
}>;
|
|
440
|
+
export declare const Lightbox: ComponentType<LightboxProps> & ComponentType<LightboxProps & {
|
|
441
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
442
|
+
}>;
|
|
443
|
+
export declare const WidgetSelect: ComponentType<WidgetSelectProps> & ComponentType<WidgetSelectProps & {
|
|
444
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
445
|
+
}>;
|
|
446
|
+
export declare const TabBar: ComponentType<TabBarProps> & ComponentType<TabBarProps & {
|
|
447
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
448
|
+
}>;
|
|
449
|
+
export declare const HtmlEditor: ComponentType<HtmlEditorProps> & ComponentType<HtmlEditorProps & {
|
|
450
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
451
|
+
}>;
|
|
452
|
+
export declare const ErrorNotice: ComponentType<ErrorNoticeProps> & ComponentType<ErrorNoticeProps & {
|
|
453
|
+
useAdminKitHook?: typeof useAdminKit;
|
|
454
|
+
}>;
|
|
455
|
+
export declare const useAgentHandle: AdminKitHooks['useAgentHandle'];
|
|
456
|
+
export declare const useFocusTrap: AdminKitHooks['useFocusTrap'];
|
|
457
|
+
export declare function useDirtyGuard<T>(required: {
|
|
458
|
+
current: T;
|
|
459
|
+
original: T | null;
|
|
460
|
+
}, optional?: {
|
|
461
|
+
translate?: Translate | undefined;
|
|
462
|
+
host?: DirtyGuardHostPort | undefined;
|
|
463
|
+
}): DirtyGuard;
|
|
464
|
+
export declare const useSettlementGeneration: AdminKitHooks['useSettlementGeneration'];
|
|
465
|
+
export declare const useConfirmController: AdminKitHooks['useConfirmController'];
|
|
466
|
+
export declare const useNativeDialog: AdminKitHooks['useNativeDialog'];
|
|
467
|
+
export declare const useFetchQuery: FetchQueryAdapter['useFetchQuery'];
|
|
468
|
+
export declare const useFetchMutation: FetchQueryAdapter['useFetchMutation'];
|
|
469
|
+
export declare const useInvalidate: FetchQueryAdapter['useInvalidate'];
|
|
470
|
+
export declare const useCachedLoader: FetchQueryAdapter['useCachedLoader'];
|
|
471
|
+
export declare const useFetchQueryScope: AdminQueryKit['useFetchQueryScope'];
|
|
472
|
+
export declare const useMediaProvidersTab: AdminMediaProvidersKit['useMediaProvidersTab'];
|
|
473
|
+
/** The pure media-provider rules, read once per render by the hook that calls them. */
|
|
474
|
+
export declare function useMediaProviderRules(): AdminMediaProvidersKit['rules'];
|
|
475
|
+
/** applyAdminTheme / resolveColorScheme / defaultAdminTheme, read once per render. */
|
|
476
|
+
export declare function useAdminThemeKit(): AdminThemeKit;
|
|
477
|
+
export type { MediaProviderCatalogPolicy, MediaProviderOption };
|
|
478
|
+
//# sourceMappingURL=kit.d.ts.map
|