@alneas/appkit-react 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/README.md +85 -15
- package/consumer-ai/SKILL.md +12 -0
- package/consumer-ai/api-index.json +103754 -0
- package/consumer-ai/package-context.json +409 -0
- package/dist/ai/action/ExecutionHistory.cjs.map +1 -1
- package/dist/ai/action/ExecutionHistory.d.cts +32 -2
- package/dist/ai/action/ExecutionHistory.d.ts +32 -2
- package/dist/ai/action/ExecutionHistory.js.map +1 -1
- package/dist/ai/action/ScreenActionContext.cjs.map +1 -1
- package/dist/ai/action/ScreenActionContext.d.cts +15 -2
- package/dist/ai/action/ScreenActionContext.d.ts +15 -2
- package/dist/ai/action/ScreenActionContext.js.map +1 -1
- package/dist/ai/action/context.cjs.map +1 -1
- package/dist/ai/action/context.d.cts +19 -3
- package/dist/ai/action/context.d.ts +19 -3
- package/dist/ai/action/context.js.map +1 -1
- package/dist/ai/action/types.d.cts +35 -3
- package/dist/ai/action/types.d.ts +35 -3
- package/dist/ai/action/use-execution-session.cjs.map +1 -1
- package/dist/ai/action/use-execution-session.d.cts +17 -1
- package/dist/ai/action/use-execution-session.d.ts +17 -1
- package/dist/ai/action/use-execution-session.js.map +1 -1
- package/dist/ai/action/use-screen-action-registry.cjs.map +1 -1
- package/dist/ai/action/use-screen-action-registry.d.cts +77 -8
- package/dist/ai/action/use-screen-action-registry.d.ts +77 -8
- package/dist/ai/action/use-screen-action-registry.js.map +1 -1
- package/dist/ai/action/use-screen-action.cjs.map +1 -1
- package/dist/ai/action/use-screen-action.d.cts +23 -6
- package/dist/ai/action/use-screen-action.d.ts +23 -6
- package/dist/ai/action/use-screen-action.js.map +1 -1
- package/dist/ai/action/use-screen-context.cjs.map +1 -1
- package/dist/ai/action/use-screen-context.d.cts +42 -5
- package/dist/ai/action/use-screen-context.d.ts +42 -5
- package/dist/ai/action/use-screen-context.js.map +1 -1
- package/dist/ai/ai-chat/transport.cjs.map +1 -1
- package/dist/ai/ai-chat/transport.d.cts +35 -8
- package/dist/ai/ai-chat/transport.d.ts +35 -8
- package/dist/ai/ai-chat/transport.js.map +1 -1
- package/dist/ai/generative-ui/GenerativeUIRenderer.cjs.map +1 -1
- package/dist/ai/generative-ui/GenerativeUIRenderer.d.cts +21 -3
- package/dist/ai/generative-ui/GenerativeUIRenderer.d.ts +21 -3
- package/dist/ai/generative-ui/GenerativeUIRenderer.js.map +1 -1
- package/dist/ai/generative-ui/error-boundary.cjs.map +1 -1
- package/dist/ai/generative-ui/error-boundary.d.cts +98 -2
- package/dist/ai/generative-ui/error-boundary.d.ts +98 -2
- package/dist/ai/generative-ui/error-boundary.js.map +1 -1
- package/dist/ai/generative-ui/registry.cjs.map +1 -1
- package/dist/ai/generative-ui/registry.d.cts +96 -7
- package/dist/ai/generative-ui/registry.d.ts +96 -7
- package/dist/ai/generative-ui/registry.js.map +1 -1
- package/dist/ai/proposal/ProposalFieldReview.cjs.map +1 -1
- package/dist/ai/proposal/ProposalFieldReview.d.cts +170 -8
- package/dist/ai/proposal/ProposalFieldReview.d.ts +170 -8
- package/dist/ai/proposal/ProposalFieldReview.js.map +1 -1
- package/dist/ai/proposal/types.d.cts +97 -26
- package/dist/ai/proposal/types.d.ts +97 -26
- package/dist/ai/proposal/use-proposal-batch-review.cjs.map +1 -1
- package/dist/ai/proposal/use-proposal-batch-review.d.cts +133 -7
- package/dist/ai/proposal/use-proposal-batch-review.d.ts +133 -7
- package/dist/ai/proposal/use-proposal-batch-review.js.map +1 -1
- package/dist/ai/proposal/use-proposal-review.cjs.map +1 -1
- package/dist/ai/proposal/use-proposal-review.d.cts +47 -5
- package/dist/ai/proposal/use-proposal-review.d.ts +47 -5
- package/dist/ai/proposal/use-proposal-review.js.map +1 -1
- package/dist/avatar.svg +1 -0
- package/dist/consumer-ai/SKILL.md +6 -0
- package/dist/consumer-ai/api-index.json +103754 -0
- package/dist/consumer-ai/package-context.json +5 -3
- package/dist/mockServiceWorker.js +361 -0
- package/dist/styles.css +1 -1
- package/dist/tools/components/auth/AuthForms.cjs.map +1 -1
- package/dist/tools/components/auth/AuthForms.d.cts +131 -81
- package/dist/tools/components/auth/AuthForms.d.ts +131 -81
- package/dist/tools/components/auth/AuthForms.js.map +1 -1
- package/dist/tools/components/auth/AuthGuard.cjs.map +1 -1
- package/dist/tools/components/auth/AuthGuard.d.cts +31 -4
- package/dist/tools/components/auth/AuthGuard.d.ts +31 -4
- package/dist/tools/components/auth/AuthGuard.js.map +1 -1
- package/dist/tools/components/auth/AuthProvider.cjs.map +1 -1
- package/dist/tools/components/auth/AuthProvider.d.cts +39 -42
- package/dist/tools/components/auth/AuthProvider.d.ts +39 -42
- package/dist/tools/components/auth/AuthProvider.js.map +1 -1
- package/dist/tools/components/auth/ProtectedRoute.cjs.map +1 -1
- package/dist/tools/components/auth/ProtectedRoute.d.cts +75 -60
- package/dist/tools/components/auth/ProtectedRoute.d.ts +75 -60
- package/dist/tools/components/auth/ProtectedRoute.js.map +1 -1
- package/dist/tools/components/auth/SignInButton.cjs.map +1 -1
- package/dist/tools/components/auth/SignInButton.d.cts +26 -18
- package/dist/tools/components/auth/SignInButton.d.ts +26 -18
- package/dist/tools/components/auth/SignInButton.js.map +1 -1
- package/dist/tools/components/auth/UserProfileProvider.cjs.map +1 -1
- package/dist/tools/components/auth/UserProfileProvider.d.cts +48 -20
- package/dist/tools/components/auth/UserProfileProvider.d.ts +48 -20
- package/dist/tools/components/auth/UserProfileProvider.js.map +1 -1
- package/dist/tools/components/auth/adapters/better-auth-adapter.cjs.map +1 -1
- package/dist/tools/components/auth/adapters/better-auth-adapter.d.cts +371 -51
- package/dist/tools/components/auth/adapters/better-auth-adapter.d.ts +371 -51
- package/dist/tools/components/auth/adapters/better-auth-adapter.js.map +1 -1
- package/dist/tools/components/auth/adapters/mock-adapter.cjs.map +1 -1
- package/dist/tools/components/auth/adapters/mock-adapter.d.cts +149 -28
- package/dist/tools/components/auth/adapters/mock-adapter.d.ts +149 -28
- package/dist/tools/components/auth/adapters/mock-adapter.js.map +1 -1
- package/dist/tools/components/auth/auth-session.cjs.map +1 -1
- package/dist/tools/components/auth/auth-session.d.cts +147 -1
- package/dist/tools/components/auth/auth-session.d.ts +147 -1
- package/dist/tools/components/auth/auth-session.js.map +1 -1
- package/dist/tools/components/auth/session-cache.cjs.map +1 -1
- package/dist/tools/components/auth/session-cache.d.cts +88 -24
- package/dist/tools/components/auth/session-cache.d.ts +88 -24
- package/dist/tools/components/auth/session-cache.js.map +1 -1
- package/dist/tools/components/auth/types.cjs.map +1 -1
- package/dist/tools/components/auth/types.d.cts +329 -106
- package/dist/tools/components/auth/types.d.ts +329 -106
- package/dist/tools/components/auth/types.js.map +1 -1
- package/dist/tools/components/auth/useAuth.cjs.map +1 -1
- package/dist/tools/components/auth/useAuth.d.cts +110 -17
- package/dist/tools/components/auth/useAuth.d.ts +110 -17
- package/dist/tools/components/auth/useAuth.js.map +1 -1
- package/dist/tools/components/auth/useAuthGuard.cjs.map +1 -1
- package/dist/tools/components/auth/useAuthGuard.d.cts +49 -38
- package/dist/tools/components/auth/useAuthGuard.d.ts +49 -38
- package/dist/tools/components/auth/useAuthGuard.js.map +1 -1
- package/dist/tools/components/auth/useRoleCheck.cjs.map +1 -1
- package/dist/tools/components/auth/useRoleCheck.d.cts +48 -1
- package/dist/tools/components/auth/useRoleCheck.d.ts +48 -1
- package/dist/tools/components/auth/useRoleCheck.js.map +1 -1
- package/dist/tools/components/auth/useUserProfile.cjs.map +1 -1
- package/dist/tools/components/auth/useUserProfile.d.cts +66 -1
- package/dist/tools/components/auth/useUserProfile.d.ts +66 -1
- package/dist/tools/components/auth/useUserProfile.js.map +1 -1
- package/dist/tools/components/barcode/BarcodeGenerator.cjs.map +1 -1
- package/dist/tools/components/barcode/BarcodeGenerator.d.cts +32 -18
- package/dist/tools/components/barcode/BarcodeGenerator.d.ts +32 -18
- package/dist/tools/components/barcode/BarcodeGenerator.js.map +1 -1
- package/dist/tools/components/barcode/QRCodeGenerator.cjs +1 -1
- package/dist/tools/components/barcode/QRCodeGenerator.cjs.map +1 -1
- package/dist/tools/components/barcode/QRCodeGenerator.d.cts +20 -13
- package/dist/tools/components/barcode/QRCodeGenerator.d.ts +20 -13
- package/dist/tools/components/barcode/QRCodeGenerator.js +1 -1
- package/dist/tools/components/barcode/QRCodeGenerator.js.map +1 -1
- package/dist/tools/components/barcode/QRCodeScanner.cjs.map +1 -1
- package/dist/tools/components/barcode/QRCodeScanner.d.cts +32 -1
- package/dist/tools/components/barcode/QRCodeScanner.d.ts +32 -1
- package/dist/tools/components/barcode/QRCodeScanner.js.map +1 -1
- package/dist/tools/components/calendar/ResourceCalendar.cjs.map +1 -1
- package/dist/tools/components/calendar/ResourceCalendar.d.cts +17 -42
- package/dist/tools/components/calendar/ResourceCalendar.d.ts +17 -42
- package/dist/tools/components/calendar/ResourceCalendar.js.map +1 -1
- package/dist/tools/components/calendar/views/ResourceView.cjs +1 -1
- package/dist/tools/components/calendar/views/ResourceView.cjs.map +1 -1
- package/dist/tools/components/calendar/views/ResourceView.js +2 -2
- package/dist/tools/components/calendar/views/ResourceView.js.map +1 -1
- package/dist/tools/components/chart/ComposedChart.cjs.map +1 -1
- package/dist/tools/components/chart/ComposedChart.d.cts +54 -1
- package/dist/tools/components/chart/ComposedChart.d.ts +54 -1
- package/dist/tools/components/chart/ComposedChart.js.map +1 -1
- package/dist/tools/components/chart/SimpleAreaChart.cjs.map +1 -1
- package/dist/tools/components/chart/SimpleAreaChart.d.cts +41 -1
- package/dist/tools/components/chart/SimpleAreaChart.d.ts +41 -1
- package/dist/tools/components/chart/SimpleAreaChart.js.map +1 -1
- package/dist/tools/components/chart/SimpleBarChart.cjs.map +1 -1
- package/dist/tools/components/chart/SimpleBarChart.d.cts +34 -24
- package/dist/tools/components/chart/SimpleBarChart.d.ts +34 -24
- package/dist/tools/components/chart/SimpleBarChart.js.map +1 -1
- package/dist/tools/components/chart/SimpleLineChart.cjs.map +1 -1
- package/dist/tools/components/chart/SimpleLineChart.d.cts +31 -28
- package/dist/tools/components/chart/SimpleLineChart.d.ts +31 -28
- package/dist/tools/components/chart/SimpleLineChart.js.map +1 -1
- package/dist/tools/components/chart/SimplePieChart.cjs.map +1 -1
- package/dist/tools/components/chart/SimplePieChart.d.cts +28 -22
- package/dist/tools/components/chart/SimplePieChart.d.ts +28 -22
- package/dist/tools/components/chart/SimplePieChart.js.map +1 -1
- package/dist/tools/components/chart/SimpleRadarChart.cjs.map +1 -1
- package/dist/tools/components/chart/SimpleRadarChart.d.cts +38 -1
- package/dist/tools/components/chart/SimpleRadarChart.d.ts +38 -1
- package/dist/tools/components/chart/SimpleRadarChart.js.map +1 -1
- package/dist/tools/components/chart/SimpleScatterChart.cjs.map +1 -1
- package/dist/tools/components/chart/SimpleScatterChart.d.cts +44 -1
- package/dist/tools/components/chart/SimpleScatterChart.d.ts +44 -1
- package/dist/tools/components/chart/SimpleScatterChart.js.map +1 -1
- package/dist/tools/components/chart/StackedBarChart.cjs.map +1 -1
- package/dist/tools/components/chart/StackedBarChart.d.cts +38 -1
- package/dist/tools/components/chart/StackedBarChart.d.ts +38 -1
- package/dist/tools/components/chart/StackedBarChart.js.map +1 -1
- package/dist/tools/components/data-table/data-table.cjs +1 -1
- package/dist/tools/components/data-table/data-table.cjs.map +1 -1
- package/dist/tools/components/data-table/data-table.js +286 -263
- package/dist/tools/components/data-table/data-table.js.map +1 -1
- package/dist/tools/components/data-table/table-utils.cjs.map +1 -1
- package/dist/tools/components/data-table/table-utils.d.cts +45 -35
- package/dist/tools/components/data-table/table-utils.d.ts +45 -35
- package/dist/tools/components/data-table/table-utils.js.map +1 -1
- package/dist/tools/components/editable-table/editable-table.cjs +1 -1
- package/dist/tools/components/editable-table/editable-table.cjs.map +1 -1
- package/dist/tools/components/editable-table/editable-table.js +15 -2
- package/dist/tools/components/editable-table/editable-table.js.map +1 -1
- package/dist/tools/components/error/ErrorDialog.cjs +1 -1
- package/dist/tools/components/error/ErrorDialog.cjs.map +1 -1
- package/dist/tools/components/error/ErrorDialog.js +1 -1
- package/dist/tools/components/error/ErrorDialog.js.map +1 -1
- package/dist/tools/components/error/ErrorInline.cjs +1 -1
- package/dist/tools/components/error/ErrorInline.cjs.map +1 -1
- package/dist/tools/components/error/ErrorInline.js +1 -1
- package/dist/tools/components/error/ErrorInline.js.map +1 -1
- package/dist/tools/components/error/ErrorNotification.cjs +1 -1
- package/dist/tools/components/error/ErrorNotification.cjs.map +1 -1
- package/dist/tools/components/error/ErrorNotification.js +10 -10
- package/dist/tools/components/error/ErrorNotification.js.map +1 -1
- package/dist/tools/components/file-browser/FilePreview.cjs +1 -1
- package/dist/tools/components/file-browser/FilePreview.cjs.map +1 -1
- package/dist/tools/components/file-browser/FilePreview.js +28 -26
- package/dist/tools/components/file-browser/FilePreview.js.map +1 -1
- package/dist/tools/components/filter/filter.cjs.map +1 -1
- package/dist/tools/components/filter/filter.d.cts +23 -34
- package/dist/tools/components/filter/filter.d.ts +23 -34
- package/dist/tools/components/filter/filter.js.map +1 -1
- package/dist/tools/components/form/EnhancedDetailPage.cjs.map +1 -1
- package/dist/tools/components/form/EnhancedDetailPage.d.cts +47 -42
- package/dist/tools/components/form/EnhancedDetailPage.d.ts +47 -42
- package/dist/tools/components/form/EnhancedDetailPage.js.map +1 -1
- package/dist/tools/components/form/form-grid.cjs.map +1 -1
- package/dist/tools/components/form/form-grid.d.cts +44 -22
- package/dist/tools/components/form/form-grid.d.ts +44 -22
- package/dist/tools/components/form/form-grid.js.map +1 -1
- package/dist/tools/components/gantt/GanttChart.cjs +1 -1
- package/dist/tools/components/gantt/GanttChart.cjs.map +1 -1
- package/dist/tools/components/gantt/GanttChart.d.cts +20 -1
- package/dist/tools/components/gantt/GanttChart.d.ts +20 -1
- package/dist/tools/components/gantt/GanttChart.js +3 -0
- package/dist/tools/components/gantt/GanttChart.js.map +1 -1
- package/dist/tools/components/gantt/components/GanttTaskBar.cjs +1 -1
- package/dist/tools/components/gantt/components/GanttTaskBar.cjs.map +1 -1
- package/dist/tools/components/gantt/components/GanttTaskBar.js +2 -1
- package/dist/tools/components/gantt/components/GanttTaskBar.js.map +1 -1
- package/dist/tools/components/header/header.cjs +1 -1
- package/dist/tools/components/header/header.cjs.map +1 -1
- package/dist/tools/components/header/header.d.cts +103 -40
- package/dist/tools/components/header/header.d.ts +103 -40
- package/dist/tools/components/header/header.js +1 -1
- package/dist/tools/components/header/header.js.map +1 -1
- package/dist/tools/components/i18n/LanguageSwitcher.cjs.map +1 -1
- package/dist/tools/components/i18n/LanguageSwitcher.d.cts +18 -14
- package/dist/tools/components/i18n/LanguageSwitcher.d.ts +18 -14
- package/dist/tools/components/i18n/LanguageSwitcher.js.map +1 -1
- package/dist/tools/components/kanban/KanbanBoard.cjs +1 -1
- package/dist/tools/components/kanban/KanbanBoard.cjs.map +1 -1
- package/dist/tools/components/kanban/KanbanBoard.d.cts +16 -34
- package/dist/tools/components/kanban/KanbanBoard.d.ts +16 -34
- package/dist/tools/components/kanban/KanbanBoard.js +3 -0
- package/dist/tools/components/kanban/KanbanBoard.js.map +1 -1
- package/dist/tools/components/kanban/KanbanColumn.cjs +1 -1
- package/dist/tools/components/kanban/KanbanColumn.cjs.map +1 -1
- package/dist/tools/components/kanban/KanbanColumn.js +1 -1
- package/dist/tools/components/kanban/KanbanColumn.js.map +1 -1
- package/dist/tools/components/kanban/kanban-compound.cjs +1 -1
- package/dist/tools/components/kanban/kanban-compound.cjs.map +1 -1
- package/dist/tools/components/kanban/kanban-compound.js +4 -1
- package/dist/tools/components/kanban/kanban-compound.js.map +1 -1
- package/dist/tools/components/kanban/kanban-primitives.cjs +1 -1
- package/dist/tools/components/kanban/kanban-primitives.cjs.map +1 -1
- package/dist/tools/components/kanban/kanban-primitives.js +0 -1
- package/dist/tools/components/kanban/kanban-primitives.js.map +1 -1
- package/dist/tools/components/priority-queue/PriorityCard.cjs +1 -1
- package/dist/tools/components/priority-queue/PriorityCard.cjs.map +1 -1
- package/dist/tools/components/priority-queue/PriorityCard.js +3 -1
- package/dist/tools/components/priority-queue/PriorityCard.js.map +1 -1
- package/dist/tools/components/sidebar/SmartSidebar.cjs.map +1 -1
- package/dist/tools/components/sidebar/SmartSidebar.d.cts +41 -43
- package/dist/tools/components/sidebar/SmartSidebar.d.ts +41 -43
- package/dist/tools/components/sidebar/SmartSidebar.js.map +1 -1
- package/dist/tools/components/splash/SplashScreen.cjs.map +1 -1
- package/dist/tools/components/splash/SplashScreen.d.cts +43 -68
- package/dist/tools/components/splash/SplashScreen.d.ts +43 -68
- package/dist/tools/components/splash/SplashScreen.js.map +1 -1
- package/dist/tools/components/workflow/WorkflowStatusPanel.cjs +1 -1
- package/dist/tools/components/workflow/WorkflowStatusPanel.cjs.map +1 -1
- package/dist/tools/components/workflow/WorkflowStatusPanel.js +2 -2
- package/dist/tools/components/workflow/WorkflowStatusPanel.js.map +1 -1
- package/dist/tools/lib/data-access/data-access-context.cjs.map +1 -1
- package/dist/tools/lib/data-access/data-access-context.d.cts +15 -6
- package/dist/tools/lib/data-access/data-access-context.d.ts +15 -6
- package/dist/tools/lib/data-access/data-access-context.js.map +1 -1
- package/dist/tools/lib/data-access/react-query-provider.cjs.map +1 -1
- package/dist/tools/lib/data-access/react-query-provider.d.cts +19 -2
- package/dist/tools/lib/data-access/react-query-provider.d.ts +19 -2
- package/dist/tools/lib/data-access/react-query-provider.js.map +1 -1
- package/dist/tools/lib/data-access/react-query.cjs.map +1 -1
- package/dist/tools/lib/data-access/react-query.d.cts +365 -90
- package/dist/tools/lib/data-access/react-query.d.ts +365 -90
- package/dist/tools/lib/data-access/react-query.js.map +1 -1
- package/dist/tools/lib/error/AppError.cjs.map +1 -1
- package/dist/tools/lib/error/AppError.d.cts +157 -63
- package/dist/tools/lib/error/AppError.d.ts +157 -63
- package/dist/tools/lib/error/AppError.js.map +1 -1
- package/dist/tools/lib/hooks/useAsyncWithTimeout.cjs.map +1 -1
- package/dist/tools/lib/hooks/useAsyncWithTimeout.d.cts +79 -26
- package/dist/tools/lib/hooks/useAsyncWithTimeout.d.ts +79 -26
- package/dist/tools/lib/hooks/useAsyncWithTimeout.js.map +1 -1
- package/dist/tools/lib/hooks/useError.cjs.map +1 -1
- package/dist/tools/lib/hooks/useError.d.cts +51 -16
- package/dist/tools/lib/hooks/useError.d.ts +51 -16
- package/dist/tools/lib/hooks/useError.js.map +1 -1
- package/dist/tools/lib/schema/ajv.cjs +1 -1
- package/dist/tools/lib/schema/ajv.cjs.map +1 -1
- package/dist/tools/lib/schema/ajv.d.cts +19 -8
- package/dist/tools/lib/schema/ajv.d.ts +19 -8
- package/dist/tools/lib/schema/ajv.js +2 -1
- package/dist/tools/lib/schema/ajv.js.map +1 -1
- package/dist/tools/lib/state/error-store.cjs.map +1 -1
- package/dist/tools/lib/state/error-store.d.cts +61 -10
- package/dist/tools/lib/state/error-store.d.ts +61 -10
- package/dist/tools/lib/state/error-store.js.map +1 -1
- package/dist/tools/lib/state/store-factory.cjs.map +1 -1
- package/dist/tools/lib/state/store-factory.d.cts +25 -4
- package/dist/tools/lib/state/store-factory.d.ts +25 -4
- package/dist/tools/lib/state/store-factory.js.map +1 -1
- package/dist/tools/lib/state/ui-store.cjs.map +1 -1
- package/dist/tools/lib/state/ui-store.d.cts +39 -0
- package/dist/tools/lib/state/ui-store.d.ts +39 -0
- package/dist/tools/lib/state/ui-store.js.map +1 -1
- package/dist/ui/components/theme/theme-context.cjs.map +1 -1
- package/dist/ui/components/theme/theme-context.d.cts +171 -1
- package/dist/ui/components/theme/theme-context.d.ts +171 -1
- package/dist/ui/components/theme/theme-context.js.map +1 -1
- package/dist/ui/components/theme/theme-provider.cjs.map +1 -1
- package/dist/ui/components/theme/theme-provider.d.cts +31 -19
- package/dist/ui/components/theme/theme-provider.d.ts +31 -19
- package/dist/ui/components/theme/theme-provider.js.map +1 -1
- package/dist/ui/components/theme/theme-script.cjs.map +1 -1
- package/dist/ui/components/theme/theme-script.d.cts +16 -1
- package/dist/ui/components/theme/theme-script.d.ts +16 -1
- package/dist/ui/components/theme/theme-script.js.map +1 -1
- package/dist/ui/components/theme/theme-switcher.cjs +1 -1
- package/dist/ui/components/theme/theme-switcher.cjs.map +1 -1
- package/dist/ui/components/theme/theme-switcher.d.cts +82 -13
- package/dist/ui/components/theme/theme-switcher.d.ts +82 -13
- package/dist/ui/components/theme/theme-switcher.js +8 -0
- package/dist/ui/components/theme/theme-switcher.js.map +1 -1
- package/dist/ui/components/ui/accordion.cjs.map +1 -1
- package/dist/ui/components/ui/accordion.d.cts +60 -0
- package/dist/ui/components/ui/accordion.d.ts +60 -0
- package/dist/ui/components/ui/accordion.js.map +1 -1
- package/dist/ui/components/ui/adjustable-pane.cjs.map +1 -1
- package/dist/ui/components/ui/adjustable-pane.d.cts +44 -26
- package/dist/ui/components/ui/adjustable-pane.d.ts +44 -26
- package/dist/ui/components/ui/adjustable-pane.js.map +1 -1
- package/dist/ui/components/ui/alert-dialog.cjs.map +1 -1
- package/dist/ui/components/ui/alert-dialog.d.cts +179 -2
- package/dist/ui/components/ui/alert-dialog.d.ts +179 -2
- package/dist/ui/components/ui/alert-dialog.js.map +1 -1
- package/dist/ui/components/ui/alert.cjs.map +1 -1
- package/dist/ui/components/ui/alert.d.cts +52 -4
- package/dist/ui/components/ui/alert.d.ts +52 -4
- package/dist/ui/components/ui/alert.js.map +1 -1
- package/dist/ui/components/ui/aspect-ratio.cjs.map +1 -1
- package/dist/ui/components/ui/aspect-ratio.d.cts +16 -1
- package/dist/ui/components/ui/aspect-ratio.d.ts +16 -1
- package/dist/ui/components/ui/aspect-ratio.js.map +1 -1
- package/dist/ui/components/ui/avatar.cjs.map +1 -1
- package/dist/ui/components/ui/avatar.d.cts +87 -3
- package/dist/ui/components/ui/avatar.d.ts +87 -3
- package/dist/ui/components/ui/avatar.js.map +1 -1
- package/dist/ui/components/ui/badge-components.cjs.map +1 -1
- package/dist/ui/components/ui/badge-components.d.cts +13 -1
- package/dist/ui/components/ui/badge-components.d.ts +13 -1
- package/dist/ui/components/ui/badge-components.js.map +1 -1
- package/dist/ui/components/ui/badge-variants.cjs.map +1 -1
- package/dist/ui/components/ui/badge-variants.d.cts +15 -0
- package/dist/ui/components/ui/badge-variants.d.ts +15 -0
- package/dist/ui/components/ui/badge-variants.js.map +1 -1
- package/dist/ui/components/ui/breadcrumb.cjs.map +1 -1
- package/dist/ui/components/ui/breadcrumb.d.cts +91 -7
- package/dist/ui/components/ui/breadcrumb.d.ts +91 -7
- package/dist/ui/components/ui/breadcrumb.js.map +1 -1
- package/dist/ui/components/ui/button-components.cjs.map +1 -1
- package/dist/ui/components/ui/button-components.d.cts +18 -6
- package/dist/ui/components/ui/button-components.d.ts +18 -6
- package/dist/ui/components/ui/button-components.js.map +1 -1
- package/dist/ui/components/ui/button-group-components.cjs.map +1 -1
- package/dist/ui/components/ui/button-group-components.d.cts +39 -3
- package/dist/ui/components/ui/button-group-components.d.ts +39 -3
- package/dist/ui/components/ui/button-group-components.js.map +1 -1
- package/dist/ui/components/ui/button-group-variants.cjs.map +1 -1
- package/dist/ui/components/ui/button-group-variants.d.cts +15 -0
- package/dist/ui/components/ui/button-group-variants.d.ts +15 -0
- package/dist/ui/components/ui/button-group-variants.js.map +1 -1
- package/dist/ui/components/ui/button-variants.cjs.map +1 -1
- package/dist/ui/components/ui/button-variants.d.cts +13 -2
- package/dist/ui/components/ui/button-variants.d.ts +13 -2
- package/dist/ui/components/ui/button-variants.js.map +1 -1
- package/dist/ui/components/ui/card.cjs.map +1 -1
- package/dist/ui/components/ui/card.d.cts +106 -2
- package/dist/ui/components/ui/card.d.ts +106 -2
- package/dist/ui/components/ui/card.js.map +1 -1
- package/dist/ui/components/ui/checkbox-group.cjs.map +1 -1
- package/dist/ui/components/ui/checkbox-group.d.cts +13 -1
- package/dist/ui/components/ui/checkbox-group.d.ts +13 -1
- package/dist/ui/components/ui/checkbox-group.js.map +1 -1
- package/dist/ui/components/ui/checkbox.cjs.map +1 -1
- package/dist/ui/components/ui/checkbox.d.cts +17 -6
- package/dist/ui/components/ui/checkbox.d.ts +17 -6
- package/dist/ui/components/ui/checkbox.js.map +1 -1
- package/dist/ui/components/ui/collapsible.cjs.map +1 -1
- package/dist/ui/components/ui/collapsible.d.cts +39 -3
- package/dist/ui/components/ui/collapsible.d.ts +39 -3
- package/dist/ui/components/ui/collapsible.js.map +1 -1
- package/dist/ui/components/ui/combobox-components.cjs.map +1 -1
- package/dist/ui/components/ui/combobox-components.d.cts +209 -14
- package/dist/ui/components/ui/combobox-components.d.ts +209 -14
- package/dist/ui/components/ui/combobox-components.js.map +1 -1
- package/dist/ui/components/ui/combobox-hooks.cjs.map +1 -1
- package/dist/ui/components/ui/combobox-hooks.d.cts +13 -1
- package/dist/ui/components/ui/combobox-hooks.d.ts +13 -1
- package/dist/ui/components/ui/combobox-hooks.js.map +1 -1
- package/dist/ui/components/ui/command.cjs.map +1 -1
- package/dist/ui/components/ui/command.d.cts +132 -9
- package/dist/ui/components/ui/command.d.ts +132 -9
- package/dist/ui/components/ui/command.js.map +1 -1
- package/dist/ui/components/ui/context-menu.cjs.map +1 -1
- package/dist/ui/components/ui/context-menu.d.cts +233 -2
- package/dist/ui/components/ui/context-menu.d.ts +233 -2
- package/dist/ui/components/ui/context-menu.js.map +1 -1
- package/dist/ui/components/ui/dialog.cjs.map +1 -1
- package/dist/ui/components/ui/dialog.d.cts +157 -5
- package/dist/ui/components/ui/dialog.d.ts +157 -5
- package/dist/ui/components/ui/dialog.js.map +1 -1
- package/dist/ui/components/ui/drawer.cjs.map +1 -1
- package/dist/ui/components/ui/drawer.d.cts +130 -10
- package/dist/ui/components/ui/drawer.d.ts +130 -10
- package/dist/ui/components/ui/drawer.js.map +1 -1
- package/dist/ui/components/ui/dropdown-menu.cjs.map +1 -1
- package/dist/ui/components/ui/dropdown-menu.d.cts +225 -6
- package/dist/ui/components/ui/dropdown-menu.d.ts +225 -6
- package/dist/ui/components/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/components/ui/empty.cjs.map +1 -1
- package/dist/ui/components/ui/empty.d.cts +78 -6
- package/dist/ui/components/ui/empty.d.ts +78 -6
- package/dist/ui/components/ui/empty.js.map +1 -1
- package/dist/ui/components/ui/field.cjs.map +1 -1
- package/dist/ui/components/ui/field.d.cts +180 -6
- package/dist/ui/components/ui/field.d.ts +180 -6
- package/dist/ui/components/ui/field.js.map +1 -1
- package/dist/ui/components/ui/file-icon.cjs.map +1 -1
- package/dist/ui/components/ui/file-icon.d.cts +32 -4
- package/dist/ui/components/ui/file-icon.d.ts +32 -4
- package/dist/ui/components/ui/file-icon.js.map +1 -1
- package/dist/ui/components/ui/hover-card.cjs.map +1 -1
- package/dist/ui/components/ui/hover-card.d.cts +39 -3
- package/dist/ui/components/ui/hover-card.d.ts +39 -3
- package/dist/ui/components/ui/hover-card.js.map +1 -1
- package/dist/ui/components/ui/input-group.cjs.map +1 -1
- package/dist/ui/components/ui/input-group.d.cts +84 -6
- package/dist/ui/components/ui/input-group.d.ts +84 -6
- package/dist/ui/components/ui/input-group.js.map +1 -1
- package/dist/ui/components/ui/input-otp.cjs.map +1 -1
- package/dist/ui/components/ui/input-otp.d.cts +58 -4
- package/dist/ui/components/ui/input-otp.d.ts +58 -4
- package/dist/ui/components/ui/input-otp.js.map +1 -1
- package/dist/ui/components/ui/input.cjs.map +1 -1
- package/dist/ui/components/ui/input.d.cts +18 -10
- package/dist/ui/components/ui/input.d.ts +18 -10
- package/dist/ui/components/ui/input.js.map +1 -1
- package/dist/ui/components/ui/item.cjs.map +1 -1
- package/dist/ui/components/ui/item.d.cts +130 -10
- package/dist/ui/components/ui/item.d.ts +130 -10
- package/dist/ui/components/ui/item.js.map +1 -1
- package/dist/ui/components/ui/kbd.cjs.map +1 -1
- package/dist/ui/components/ui/kbd.d.cts +26 -2
- package/dist/ui/components/ui/kbd.d.ts +26 -2
- package/dist/ui/components/ui/kbd.js.map +1 -1
- package/dist/ui/components/ui/label.cjs.map +1 -1
- package/dist/ui/components/ui/label.d.cts +15 -0
- package/dist/ui/components/ui/label.d.ts +15 -0
- package/dist/ui/components/ui/label.js.map +1 -1
- package/dist/ui/components/ui/layout.cjs +1 -1
- package/dist/ui/components/ui/layout.cjs.map +1 -1
- package/dist/ui/components/ui/layout.d.cts +45 -11
- package/dist/ui/components/ui/layout.d.ts +45 -11
- package/dist/ui/components/ui/layout.js +22 -20
- package/dist/ui/components/ui/layout.js.map +1 -1
- package/dist/ui/components/ui/menubar.cjs.map +1 -1
- package/dist/ui/components/ui/menubar.d.cts +220 -16
- package/dist/ui/components/ui/menubar.d.ts +220 -16
- package/dist/ui/components/ui/menubar.js.map +1 -1
- package/dist/ui/components/ui/meter.cjs.map +1 -1
- package/dist/ui/components/ui/meter.d.cts +52 -4
- package/dist/ui/components/ui/meter.d.ts +52 -4
- package/dist/ui/components/ui/meter.js.map +1 -1
- package/dist/ui/components/ui/mobile-form-variants.cjs.map +1 -1
- package/dist/ui/components/ui/mobile-form-variants.d.cts +30 -0
- package/dist/ui/components/ui/mobile-form-variants.d.ts +30 -0
- package/dist/ui/components/ui/mobile-form-variants.js.map +1 -1
- package/dist/ui/components/ui/mobile-form.cjs.map +1 -1
- package/dist/ui/components/ui/mobile-form.d.cts +186 -9
- package/dist/ui/components/ui/mobile-form.d.ts +186 -9
- package/dist/ui/components/ui/mobile-form.js.map +1 -1
- package/dist/ui/components/ui/navigation-menu-components.cjs.map +1 -1
- package/dist/ui/components/ui/navigation-menu-components.d.cts +104 -8
- package/dist/ui/components/ui/navigation-menu-components.d.ts +104 -8
- package/dist/ui/components/ui/navigation-menu-components.js.map +1 -1
- package/dist/ui/components/ui/navigation-menu-variants.cjs.map +1 -1
- package/dist/ui/components/ui/navigation-menu-variants.d.cts +15 -0
- package/dist/ui/components/ui/navigation-menu-variants.d.ts +15 -0
- package/dist/ui/components/ui/navigation-menu-variants.js.map +1 -1
- package/dist/ui/components/ui/number-field.cjs.map +1 -1
- package/dist/ui/components/ui/number-field.d.cts +78 -6
- package/dist/ui/components/ui/number-field.d.ts +78 -6
- package/dist/ui/components/ui/number-field.js.map +1 -1
- package/dist/ui/components/ui/pagination.cjs.map +1 -1
- package/dist/ui/components/ui/pagination.d.cts +99 -7
- package/dist/ui/components/ui/pagination.d.ts +99 -7
- package/dist/ui/components/ui/pagination.js.map +1 -1
- package/dist/ui/components/ui/password-input.cjs.map +1 -1
- package/dist/ui/components/ui/password-input.d.cts +10 -7
- package/dist/ui/components/ui/password-input.d.ts +10 -7
- package/dist/ui/components/ui/password-input.js.map +1 -1
- package/dist/ui/components/ui/popover.cjs.map +1 -1
- package/dist/ui/components/ui/popover.d.cts +86 -2
- package/dist/ui/components/ui/popover.d.ts +86 -2
- package/dist/ui/components/ui/popover.js.map +1 -1
- package/dist/ui/components/ui/progress.cjs.map +1 -1
- package/dist/ui/components/ui/progress.d.cts +72 -2
- package/dist/ui/components/ui/progress.d.ts +72 -2
- package/dist/ui/components/ui/progress.js.map +1 -1
- package/dist/ui/components/ui/radio-card.cjs.map +1 -1
- package/dist/ui/components/ui/radio-card.d.cts +32 -4
- package/dist/ui/components/ui/radio-card.d.ts +32 -4
- package/dist/ui/components/ui/radio-card.js.map +1 -1
- package/dist/ui/components/ui/radio-group.cjs.map +1 -1
- package/dist/ui/components/ui/radio-group.d.cts +28 -2
- package/dist/ui/components/ui/radio-group.d.ts +28 -2
- package/dist/ui/components/ui/radio-group.js.map +1 -1
- package/dist/ui/components/ui/resizable.cjs.map +1 -1
- package/dist/ui/components/ui/resizable.d.cts +42 -3
- package/dist/ui/components/ui/resizable.d.ts +42 -3
- package/dist/ui/components/ui/resizable.js.map +1 -1
- package/dist/ui/components/ui/responsive-list.cjs.map +1 -1
- package/dist/ui/components/ui/responsive-list.d.cts +176 -13
- package/dist/ui/components/ui/responsive-list.d.ts +176 -13
- package/dist/ui/components/ui/responsive-list.js.map +1 -1
- package/dist/ui/components/ui/scroll-area.cjs.map +1 -1
- package/dist/ui/components/ui/scroll-area.d.cts +28 -1
- package/dist/ui/components/ui/scroll-area.d.ts +28 -1
- package/dist/ui/components/ui/scroll-area.js.map +1 -1
- package/dist/ui/components/ui/searchable-select-input.cjs.map +1 -1
- package/dist/ui/components/ui/searchable-select-input.d.cts +199 -49
- package/dist/ui/components/ui/searchable-select-input.d.ts +199 -49
- package/dist/ui/components/ui/searchable-select-input.js.map +1 -1
- package/dist/ui/components/ui/select.cjs.map +1 -1
- package/dist/ui/components/ui/select.d.cts +205 -40
- package/dist/ui/components/ui/select.d.ts +205 -40
- package/dist/ui/components/ui/select.js.map +1 -1
- package/dist/ui/components/ui/separator.cjs.map +1 -1
- package/dist/ui/components/ui/separator.d.cts +13 -2
- package/dist/ui/components/ui/separator.d.ts +13 -2
- package/dist/ui/components/ui/separator.js.map +1 -1
- package/dist/ui/components/ui/sheet.cjs.map +1 -1
- package/dist/ui/components/ui/sheet.d.cts +128 -3
- package/dist/ui/components/ui/sheet.d.ts +128 -3
- package/dist/ui/components/ui/sheet.js.map +1 -1
- package/dist/ui/components/ui/skeleton.cjs.map +1 -1
- package/dist/ui/components/ui/skeleton.d.cts +13 -1
- package/dist/ui/components/ui/skeleton.d.ts +13 -1
- package/dist/ui/components/ui/skeleton.js.map +1 -1
- package/dist/ui/components/ui/slider.cjs.map +1 -1
- package/dist/ui/components/ui/slider.d.cts +13 -7
- package/dist/ui/components/ui/slider.d.ts +13 -7
- package/dist/ui/components/ui/slider.js.map +1 -1
- package/dist/ui/components/ui/spinner.cjs.map +1 -1
- package/dist/ui/components/ui/spinner.d.cts +13 -1
- package/dist/ui/components/ui/spinner.d.ts +13 -1
- package/dist/ui/components/ui/spinner.js.map +1 -1
- package/dist/ui/components/ui/switch.cjs.map +1 -1
- package/dist/ui/components/ui/switch.d.cts +26 -0
- package/dist/ui/components/ui/switch.d.ts +26 -0
- package/dist/ui/components/ui/switch.js.map +1 -1
- package/dist/ui/components/ui/table.cjs.map +1 -1
- package/dist/ui/components/ui/table.d.cts +118 -2
- package/dist/ui/components/ui/table.d.ts +118 -2
- package/dist/ui/components/ui/table.js.map +1 -1
- package/dist/ui/components/ui/tabs-components.cjs.map +1 -1
- package/dist/ui/components/ui/tabs-components.d.cts +52 -5
- package/dist/ui/components/ui/tabs-components.d.ts +52 -5
- package/dist/ui/components/ui/tabs-components.js.map +1 -1
- package/dist/ui/components/ui/tabs-variants.cjs.map +1 -1
- package/dist/ui/components/ui/tabs-variants.d.cts +15 -0
- package/dist/ui/components/ui/tabs-variants.d.ts +15 -0
- package/dist/ui/components/ui/tabs-variants.js.map +1 -1
- package/dist/ui/components/ui/textarea.cjs.map +1 -1
- package/dist/ui/components/ui/textarea.d.cts +23 -0
- package/dist/ui/components/ui/textarea.d.ts +23 -0
- package/dist/ui/components/ui/textarea.js.map +1 -1
- package/dist/ui/components/ui/toast.cjs.map +1 -1
- package/dist/ui/components/ui/toast.d.cts +136 -0
- package/dist/ui/components/ui/toast.d.ts +136 -0
- package/dist/ui/components/ui/toast.js.map +1 -1
- package/dist/ui/components/ui/toaster.cjs.map +1 -1
- package/dist/ui/components/ui/toaster.d.cts +12 -3
- package/dist/ui/components/ui/toaster.d.ts +12 -3
- package/dist/ui/components/ui/toaster.js.map +1 -1
- package/dist/ui/components/ui/toggle-components.cjs.map +1 -1
- package/dist/ui/components/ui/toggle-components.d.cts +15 -0
- package/dist/ui/components/ui/toggle-components.d.ts +15 -0
- package/dist/ui/components/ui/toggle-components.js.map +1 -1
- package/dist/ui/components/ui/toggle-group.cjs.map +1 -1
- package/dist/ui/components/ui/toggle-group.d.cts +33 -0
- package/dist/ui/components/ui/toggle-group.d.ts +33 -0
- package/dist/ui/components/ui/toggle-group.js.map +1 -1
- package/dist/ui/components/ui/toggle-variants.cjs.map +1 -1
- package/dist/ui/components/ui/toggle-variants.d.cts +15 -0
- package/dist/ui/components/ui/toggle-variants.d.ts +15 -0
- package/dist/ui/components/ui/toggle-variants.js.map +1 -1
- package/dist/ui/components/ui/toolbar.cjs.map +1 -1
- package/dist/ui/components/ui/toolbar.d.cts +94 -7
- package/dist/ui/components/ui/toolbar.d.ts +94 -7
- package/dist/ui/components/ui/toolbar.js.map +1 -1
- package/dist/ui/components/ui/tooltip.cjs.map +1 -1
- package/dist/ui/components/ui/tooltip.d.cts +54 -3
- package/dist/ui/components/ui/tooltip.d.ts +54 -3
- package/dist/ui/components/ui/tooltip.js.map +1 -1
- package/dist/ui/lib/hooks/use-gps.cjs.map +1 -1
- package/dist/ui/lib/hooks/use-gps.d.cts +29 -4
- package/dist/ui/lib/hooks/use-gps.d.ts +29 -4
- package/dist/ui/lib/hooks/use-gps.js.map +1 -1
- package/dist/ui/lib/hooks/use-is-client.cjs.map +1 -1
- package/dist/ui/lib/hooks/use-is-client.d.cts +11 -2
- package/dist/ui/lib/hooks/use-is-client.d.ts +11 -2
- package/dist/ui/lib/hooks/use-is-client.js.map +1 -1
- package/dist/ui/lib/hooks/use-keyboard-shortcut.cjs.map +1 -1
- package/dist/ui/lib/hooks/use-keyboard-shortcut.d.cts +48 -18
- package/dist/ui/lib/hooks/use-keyboard-shortcut.d.ts +48 -18
- package/dist/ui/lib/hooks/use-keyboard-shortcut.js.map +1 -1
- package/dist/ui/lib/hooks/use-mobile.cjs.map +1 -1
- package/dist/ui/lib/hooks/use-mobile.d.cts +11 -3
- package/dist/ui/lib/hooks/use-mobile.d.ts +11 -3
- package/dist/ui/lib/hooks/use-mobile.js.map +1 -1
- package/dist/ui/lib/hooks/use-toast.cjs.map +1 -1
- package/dist/ui/lib/hooks/use-toast.d.cts +184 -15
- package/dist/ui/lib/hooks/use-toast.d.ts +184 -15
- package/dist/ui/lib/hooks/use-toast.js.map +1 -1
- package/dist/ui/lib/ime-utils.cjs.map +1 -1
- package/dist/ui/lib/ime-utils.d.cts +40 -13
- package/dist/ui/lib/ime-utils.d.ts +40 -13
- package/dist/ui/lib/ime-utils.js.map +1 -1
- package/dist/ui/lib/utils.cjs.map +1 -1
- package/dist/ui/lib/utils.d.cts +9 -6
- package/dist/ui/lib/utils.d.ts +9 -6
- package/dist/ui/lib/utils.js.map +1 -1
- package/docs/ai.md +34 -1
- package/docs/exports.md +5 -1
- package/docs/index.md +89 -16
- package/docs/migration.md +268 -0
- package/docs/request-form.md +4 -1
- package/docs/tools.md +4 -1
- package/docs/ui.md +4 -1
- package/llms-full.txt +499 -36
- package/llms.txt +4 -0
- package/package.json +35 -5
|
@@ -2,187 +2,462 @@ import { UseQueryOptions, QueryClient, UseMutationOptions, MutationFunction, Que
|
|
|
2
2
|
import { DataAccessAdapter, Filter, QueryOptions } from './types.cjs';
|
|
3
3
|
export { useDataAccess } from './data-access-context.cjs';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Creates a TanStack QueryClient with five-minute stale time, one retry and no focus refetch.
|
|
6
|
+
* @returns New caller-owned client; share one stable client for one application/auth domain.
|
|
7
|
+
* @remarks No requests begin on construction. Supply it to QueryClientProvider; callers
|
|
8
|
+
* own clearing/disposal and SSR request isolation. No CSS is required.
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { createQueryClient } from '@alneas/appkit-react/tools/data-access/react';
|
|
12
|
+
* const queryClient = createQueryClient();
|
|
13
|
+
* queryClient.clear();
|
|
14
|
+
* ```
|
|
7
15
|
*/
|
|
8
16
|
export declare function createQueryClient(): QueryClient;
|
|
9
17
|
/**
|
|
10
|
-
*
|
|
11
|
-
* @returns
|
|
18
|
+
* Binds query invalidation to the nearest QueryClient.
|
|
19
|
+
* @returns Function accepting a query key and resolving after TanStack prefix-matched invalidation/refetch work.
|
|
20
|
+
* @throws Error outside QueryClientProvider.
|
|
21
|
+
* @remarks The returned callback forwards invalidateQueries with queryKey only; it does
|
|
22
|
+
* not establish authorization or choose a collection automatically. No CSS is required.
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
26
|
+
* import { createQueryClient, useInvalidate } from '@alneas/appkit-react/tools/data-access/react';
|
|
27
|
+
* const client = createQueryClient();
|
|
28
|
+
* function Refresh() { const invalidate = useInvalidate(); return <button onClick={() => { void invalidate(['tasks']); }}>Refresh</button>; }
|
|
29
|
+
* export function Screen() { return <QueryClientProvider client={client}><Refresh /></QueryClientProvider>; }
|
|
30
|
+
* ```
|
|
12
31
|
*/
|
|
13
32
|
export declare function useInvalidate(): (key: QueryKey) => Promise<void>;
|
|
14
33
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
34
|
+
* Runs a TanStack mutation and invalidates only the explicitly configured query keys on success.
|
|
35
|
+
* @typeParam TData - Resolved mutation result; defaults to unknown and may include undefined.
|
|
36
|
+
* @typeParam TError - Mutation error exposed by TanStack Query; defaults to unknown.
|
|
37
|
+
* @typeParam TVariables - Mutation input supplied to mutate/mutateAsync; defaults to void.
|
|
38
|
+
* @typeParam TContext - Value returned by onMutate for later callbacks; defaults to unknown.
|
|
39
|
+
* @param mutationFn - Host mutation function receiving variables and resolving TData; the host owns authorization and persistence.
|
|
40
|
+
* @param options - TanStack mutation options plus invalidateKeys: a key array or synchronous factory
|
|
41
|
+
* receiving the successful result and variables. Omitted invalidateKeys (or an empty array) invalidates nothing.
|
|
42
|
+
* @returns The TanStack mutation result with status, data/error and mutate/mutateAsync controls.
|
|
43
|
+
* @throws When rendered without a QueryClientProvider.
|
|
44
|
+
* @remarks Requires an outer QueryClientProvider. Query keys use TanStack prefix matching.
|
|
45
|
+
* On success, invalidations run concurrently and are awaited before options.onSuccess is called;
|
|
46
|
+
* that callback's returned promise is not awaited by this wrapper. A key factory or invalidation
|
|
47
|
+
* failure prevents that callback and propagates into mutation error handling. Mutation failures
|
|
48
|
+
* are exposed through the mutation result and reject mutateAsync. This wrapper adds no retry,
|
|
49
|
+
* rollback or default invalidation keys; useCreate/useUpdate supply their own defaults.
|
|
50
|
+
* The normal TanStack options spread also permits options.mutationFn to override the first argument.
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
54
|
+
* import { createQueryClient, useMutationWithInvalidation } from '@alneas/appkit-react/tools/data-access/react';
|
|
17
55
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
56
|
+
* const queryClient = createQueryClient();
|
|
57
|
+
* type SaveInput = { id: string; title: string };
|
|
58
|
+
* type SaveResult = SaveInput | undefined;
|
|
59
|
+
* function SaveButton({ save }: { save: (input: SaveInput) => Promise<SaveResult> }) {
|
|
60
|
+
* const mutation = useMutationWithInvalidation(save, {
|
|
61
|
+
* invalidateKeys: (_result, input) => [['tasks', 'detail', input.id]],
|
|
62
|
+
* });
|
|
63
|
+
* return <button onClick={() => mutation.mutate({ id: 'task-1', title: 'Review' })}>
|
|
64
|
+
* {mutation.data?.title ?? 'Save task'}
|
|
65
|
+
* </button>;
|
|
66
|
+
* }
|
|
67
|
+
* // Supply an authorized host implementation; this example does not fabricate persistence.
|
|
68
|
+
* export function TaskEditor({ save }: { save: (input: SaveInput) => Promise<SaveResult> }) {
|
|
69
|
+
* return <QueryClientProvider client={queryClient}><SaveButton save={save} /></QueryClientProvider>;
|
|
70
|
+
* }
|
|
71
|
+
* ```
|
|
20
72
|
*/
|
|
21
73
|
export declare function useMutationWithInvalidation<TData = unknown, TError = unknown, TVariables = void, TContext = unknown>(mutationFn: MutationFunction<TData, TVariables>, options?: UseMutationOptions<TData, TError, TVariables, TContext> & {
|
|
74
|
+
/** Optional explicit keys or result/variables key factory; omission invalidates nothing. */
|
|
22
75
|
invalidateKeys?: QueryKey[] | ((data: TData, variables: TVariables) => QueryKey[]);
|
|
23
76
|
}): import('@tanstack/react-query').UseMutationResult<TData, TError, TVariables, TContext>;
|
|
24
77
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @param adapter -
|
|
28
|
-
* @param collection -
|
|
29
|
-
* @param filter -
|
|
30
|
-
* @param adapterOptions -
|
|
31
|
-
* @returns
|
|
78
|
+
* Creates adapter-scoped TanStack options for listing records.
|
|
79
|
+
* @typeParam T - Expected record/result shape; defaults to unknown and is not runtime validation.
|
|
80
|
+
* @param adapter - Host adapter performing reads.
|
|
81
|
+
* @param collection - Host collection/table name.
|
|
82
|
+
* @param filter - Optional adapter-specific selection criteria.
|
|
83
|
+
* @param adapterOptions - Optional sort/limit/populate/etc. forwarded with TanStack abort signal.
|
|
84
|
+
* @returns Query key and queryFn options accepted by useQuery or QueryClient methods.
|
|
85
|
+
* @remarks Key includes collection, operation, input options and adapter cache scope. No
|
|
86
|
+
* request is made until queryFn executes. Query errors reject through TanStack; aggregate
|
|
87
|
+
* queryFn rejects if the adapter lacks aggregate. Abort signal support is adapter-owned.
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* import type { ComponentProps } from 'react';
|
|
91
|
+
* import { DataAccessProvider, findQueryOptions } from '@alneas/appkit-react/tools/data-access/react';
|
|
92
|
+
* type DataAccessAdapter = ComponentProps<typeof DataAccessProvider>['adapter'];
|
|
93
|
+
* export function optionsFor(adapter: DataAccessAdapter) { return findQueryOptions<{ id: string }>(adapter, 'tasks', {}, { limit: 20 }); }
|
|
94
|
+
* ```
|
|
32
95
|
*/
|
|
33
96
|
export declare function findQueryOptions<T = unknown>(adapter: DataAccessAdapter, collection: string, filter?: Filter, adapterOptions?: QueryOptions): import('@tanstack/query-core').OmitKeyof<UseQueryOptions<T[], Error, T[], (string | Filter | undefined)[]>, "queryFn"> & {
|
|
34
97
|
queryFn?: import('@tanstack/query-core').QueryFunction<T[], (string | Filter | undefined)[], never> | undefined;
|
|
35
98
|
} & import('@tanstack/query-core').QueryKeyWithDataTag<(string | Filter | undefined)[], T[], Error>;
|
|
36
99
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* @param adapter -
|
|
40
|
-
* @param collection -
|
|
41
|
-
* @param id -
|
|
42
|
-
* @param adapterOptions -
|
|
43
|
-
* @returns
|
|
100
|
+
* Creates adapter-scoped TanStack options for reading one record by ID.
|
|
101
|
+
* @typeParam T - Expected record/result shape; defaults to unknown and is not runtime validation.
|
|
102
|
+
* @param adapter - Host adapter performing reads.
|
|
103
|
+
* @param collection - Host collection/table name.
|
|
104
|
+
* @param id - Record identifier; a falsy ID disables the ordinary useQuery execution.
|
|
105
|
+
* @param adapterOptions - Optional adapter query settings forwarded with TanStack abort signal.
|
|
106
|
+
* @returns Query key and queryFn options accepted by useQuery or QueryClient methods.
|
|
107
|
+
* @remarks Key includes collection, operation, input options and adapter cache scope. No
|
|
108
|
+
* request is made until queryFn executes. Query errors reject through TanStack; aggregate
|
|
109
|
+
* queryFn rejects if the adapter lacks aggregate. Abort signal support is adapter-owned.
|
|
110
|
+
* @example
|
|
111
|
+
* ```ts
|
|
112
|
+
* import type { ComponentProps } from 'react';
|
|
113
|
+
* import { DataAccessProvider, findOneQueryOptions } from '@alneas/appkit-react/tools/data-access/react';
|
|
114
|
+
* type DataAccessAdapter = ComponentProps<typeof DataAccessProvider>['adapter'];
|
|
115
|
+
* export function optionsFor(adapter: DataAccessAdapter) { return findOneQueryOptions<{ id: string }>(adapter, 'tasks', 'task-1'); }
|
|
116
|
+
* ```
|
|
44
117
|
*/
|
|
45
118
|
export declare function findOneQueryOptions<T = unknown>(adapter: DataAccessAdapter, collection: string, id: string, adapterOptions?: QueryOptions): import('@tanstack/query-core').OmitKeyof<UseQueryOptions<T | null, Error, T | null, (string | QueryOptions | undefined)[]>, "queryFn"> & {
|
|
46
119
|
queryFn?: import('@tanstack/query-core').QueryFunction<T | null, (string | QueryOptions | undefined)[], never> | undefined;
|
|
47
120
|
} & import('@tanstack/query-core').QueryKeyWithDataTag<(string | QueryOptions | undefined)[], T | null, Error>;
|
|
48
121
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @param adapter -
|
|
52
|
-
* @param collection -
|
|
53
|
-
* @param pipeline -
|
|
54
|
-
* @param options -
|
|
55
|
-
* @returns
|
|
122
|
+
* Creates adapter-scoped TanStack options for an aggregation pipeline.
|
|
123
|
+
* @typeParam T - Expected record/result shape; defaults to unknown and is not runtime validation.
|
|
124
|
+
* @param adapter - Host adapter performing reads.
|
|
125
|
+
* @param collection - Host collection/table name.
|
|
126
|
+
* @param pipeline - Adapter-specific aggregation stages.
|
|
127
|
+
* @param options - Optional adapter settings forwarded with TanStack abort signal.
|
|
128
|
+
* @returns Query key and queryFn options accepted by useQuery or QueryClient methods.
|
|
129
|
+
* @remarks Key includes collection, operation, input options and adapter cache scope. No
|
|
130
|
+
* request is made until queryFn executes. Query errors reject through TanStack; aggregate
|
|
131
|
+
* queryFn rejects if the adapter lacks aggregate. Abort signal support is adapter-owned.
|
|
132
|
+
* @example
|
|
133
|
+
* ```ts
|
|
134
|
+
* import type { ComponentProps } from 'react';
|
|
135
|
+
* import { DataAccessProvider, aggregateQueryOptions } from '@alneas/appkit-react/tools/data-access/react';
|
|
136
|
+
* type DataAccessAdapter = ComponentProps<typeof DataAccessProvider>['adapter'];
|
|
137
|
+
* export function optionsFor(adapter: DataAccessAdapter) { return aggregateQueryOptions<{ count: number }>(adapter, 'tasks', []); }
|
|
138
|
+
* ```
|
|
56
139
|
*/
|
|
57
140
|
export declare function aggregateQueryOptions<T = unknown>(adapter: DataAccessAdapter, collection: string, pipeline: unknown[], options?: QueryOptions): import('@tanstack/query-core').OmitKeyof<UseQueryOptions<T[], Error, T[], (string | unknown[] | QueryOptions | undefined)[]>, "queryFn"> & {
|
|
58
141
|
queryFn?: import('@tanstack/query-core').QueryFunction<T[], (string | unknown[] | QueryOptions | undefined)[], never> | undefined;
|
|
59
142
|
} & import('@tanstack/query-core').QueryKeyWithDataTag<(string | unknown[] | QueryOptions | undefined)[], T[], Error>;
|
|
60
143
|
/**
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* @param collection -
|
|
64
|
-
* @param filter -
|
|
65
|
-
* @param adapterOptions -
|
|
66
|
-
* @param queryOptions -
|
|
67
|
-
* @returns
|
|
68
|
-
*
|
|
144
|
+
* Queries a collection list through the current adapter.
|
|
145
|
+
* @typeParam T - Expected result record shape, default unknown; not runtime validation.
|
|
146
|
+
* @param collection - Host collection/table name.
|
|
147
|
+
* @param filter - Optional adapter filter.
|
|
148
|
+
* @param adapterOptions - Optional sorting/limit/populate settings.
|
|
149
|
+
* @param queryOptions - TanStack query overrides; omitted values use the generated options.
|
|
150
|
+
* @returns TanStack query result with data/status/error and refetch controls.
|
|
151
|
+
* @throws Error without DataAccessProvider or QueryClientProvider.
|
|
152
|
+
* @remarks No CSS required. Adapter failures appear in query state; keys include adapter
|
|
153
|
+
* scope and input options. Query signals are forwarded, but cancellation depends on the
|
|
154
|
+
* adapter. The host owns backend authorization.
|
|
69
155
|
* @example
|
|
70
156
|
* ```tsx
|
|
71
|
-
*
|
|
157
|
+
* import type { ComponentProps } from 'react';
|
|
158
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
159
|
+
* import { DataAccessProvider, createQueryClient, useFind } from '@alneas/appkit-react/tools/data-access/react';
|
|
160
|
+
* type DataAccessAdapter = ComponentProps<typeof DataAccessProvider>['adapter'];
|
|
161
|
+
* const client = createQueryClient();
|
|
162
|
+
* function Content() { const query = useFind<{ id: string }>('tasks', {}, { limit: 20 }); return <output>{query.isPending ? 'Loading' : query.error ? 'Failed' : 'Ready'}</output>; }
|
|
163
|
+
* export function DataScreen({ adapter }: { adapter: DataAccessAdapter }) { return <QueryClientProvider client={client}><DataAccessProvider adapter={adapter}><Content /></DataAccessProvider></QueryClientProvider>; }
|
|
72
164
|
* ```
|
|
73
165
|
*/
|
|
74
166
|
export declare function useFind<T = unknown>(collection: string, filter?: Filter, adapterOptions?: QueryOptions, queryOptions?: Omit<UseQueryOptions<T[], Error>, 'queryKey' | 'queryFn'>): import('@tanstack/react-query').UseQueryResult<T[], Error>;
|
|
75
167
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* @param collection -
|
|
79
|
-
* @param id -
|
|
80
|
-
* @param adapterOptions -
|
|
81
|
-
* @param queryOptions -
|
|
82
|
-
* @returns
|
|
168
|
+
* Queries one record through the current adapter.
|
|
169
|
+
* @typeParam T - Expected result record shape, default unknown; not runtime validation.
|
|
170
|
+
* @param collection - Host collection/table name.
|
|
171
|
+
* @param id - Record ID; empty ID disables the default query.
|
|
172
|
+
* @param adapterOptions - Optional adapter read settings.
|
|
173
|
+
* @param queryOptions - TanStack query overrides; omitted values use the generated options.
|
|
174
|
+
* @returns TanStack query result with data/status/error and refetch controls. Data resolves to a record or null when absent.
|
|
175
|
+
* @throws Error without DataAccessProvider or QueryClientProvider.
|
|
176
|
+
* @remarks No CSS required. Adapter failures appear in query state; keys include adapter
|
|
177
|
+
* scope and input options. Query signals are forwarded, but cancellation depends on the
|
|
178
|
+
* adapter. The host owns backend authorization.
|
|
179
|
+
* @example
|
|
180
|
+
* ```tsx
|
|
181
|
+
* import type { ComponentProps } from 'react';
|
|
182
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
183
|
+
* import { DataAccessProvider, createQueryClient, useFindOne } from '@alneas/appkit-react/tools/data-access/react';
|
|
184
|
+
* type DataAccessAdapter = ComponentProps<typeof DataAccessProvider>['adapter'];
|
|
185
|
+
* const client = createQueryClient();
|
|
186
|
+
* function Content() { const query = useFindOne<{ id: string }>('tasks', 'task-1'); return <output>{query.isPending ? 'Loading' : query.error ? 'Failed' : 'Ready'}</output>; }
|
|
187
|
+
* export function DataScreen({ adapter }: { adapter: DataAccessAdapter }) { return <QueryClientProvider client={client}><DataAccessProvider adapter={adapter}><Content /></DataAccessProvider></QueryClientProvider>; }
|
|
188
|
+
* ```
|
|
83
189
|
*/
|
|
84
190
|
export declare function useFindOne<T = unknown>(collection: string, id: string, adapterOptions?: QueryOptions, queryOptions?: Omit<UseQueryOptions<T | null, Error>, 'queryKey' | 'queryFn'>): import('@tanstack/react-query').UseQueryResult<T | null, Error>;
|
|
85
191
|
/**
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
* @param collection -
|
|
90
|
-
* @param options
|
|
91
|
-
*
|
|
92
|
-
* @returns
|
|
192
|
+
* Creates one record through the current data-access adapter and invalidates collection queries.
|
|
193
|
+
* @typeParam T - Created record result returned by the adapter; defaults to unknown.
|
|
194
|
+
* @typeParam TVariables - Mutation variables; must contain data and optional adapter options at runtime.
|
|
195
|
+
* @param collection - Adapter collection/table name.
|
|
196
|
+
* @param options - Optional onSuccess callback receiving the created result and variables, plus replacement
|
|
197
|
+
* invalidation keys. Omitted invalidateKeys defaults to [[collection]]; [] disables invalidation.
|
|
198
|
+
* @returns A mutation result whose mutate/mutateAsync accepts { data, options? } by default.
|
|
199
|
+
* @throws When rendered without the required query or data-access provider.
|
|
200
|
+
* @remarks Requires QueryClientProvider and DataAccessProvider with a real host adapter.
|
|
201
|
+
* The adapter owns persistence, authorization and error semantics. Defaults are supplied by this
|
|
202
|
+
* helper, not useMutationWithInvalidation. Callback promises are not awaited by that wrapper.
|
|
203
|
+
* @example
|
|
204
|
+
* ```tsx
|
|
205
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
206
|
+
* import { DataAccessProvider, createQueryClient, useCreate } from '@alneas/appkit-react/tools/data-access/react';
|
|
207
|
+
* import type { ComponentProps } from 'react';
|
|
208
|
+
* const client = createQueryClient();
|
|
209
|
+
* function CreateTask() {
|
|
210
|
+
* const create = useCreate<{ id: string; title: string }>('tasks');
|
|
211
|
+
* return <button onClick={() => create.mutate({ data: { title: 'Review' } })}>Create</button>;
|
|
212
|
+
* }
|
|
213
|
+
* export function TaskCreator({ adapter }: Pick<ComponentProps<typeof DataAccessProvider>, 'adapter'>) {
|
|
214
|
+
* return <QueryClientProvider client={client}><DataAccessProvider adapter={adapter}>
|
|
215
|
+
* <CreateTask />
|
|
216
|
+
* </DataAccessProvider></QueryClientProvider>;
|
|
217
|
+
* }
|
|
218
|
+
* ```
|
|
93
219
|
*/
|
|
94
220
|
export declare function useCreate<T = unknown, TVariables = {
|
|
95
221
|
data: Record<string, unknown>;
|
|
96
222
|
options?: QueryOptions;
|
|
97
223
|
}>(collection: string, options?: {
|
|
224
|
+
/**
|
|
225
|
+
* Callback after successful mutation and awaited invalidations.
|
|
226
|
+
* @param data - Adapter result.
|
|
227
|
+
* @param variables - Original mutation variables.
|
|
228
|
+
* @returns No value; callback promise results are not awaited by the wrapper.
|
|
229
|
+
*/
|
|
98
230
|
onSuccess?: (data: T, variables: TVariables) => void;
|
|
231
|
+
/**
|
|
232
|
+
* Optional replacement query keys using prefix matching; [] disables invalidation, omission uses this hook default.
|
|
233
|
+
*/
|
|
99
234
|
invalidateKeys?: unknown[][];
|
|
100
235
|
}): import('@tanstack/react-query').UseMutationResult<T, Error, TVariables, unknown>;
|
|
101
236
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* @param collection -
|
|
106
|
-
* @param options
|
|
107
|
-
*
|
|
108
|
-
*
|
|
237
|
+
* Updates one record through the current adapter and invalidates list and matching detail queries.
|
|
238
|
+
* @typeParam T - Updated record result returned by the adapter; defaults to unknown.
|
|
239
|
+
* @typeParam TVariables - Mutation variables; must contain id, data and optional adapter options at runtime.
|
|
240
|
+
* @param collection - Adapter collection/table name.
|
|
241
|
+
* @param options - Optional onSuccess callback receiving the updated result and variables, plus replacement
|
|
242
|
+
* invalidation keys. Omitted keys default to [[collection, 'list'], [collection, 'detail', variables.id]];
|
|
243
|
+
* [] disables invalidation.
|
|
244
|
+
* @returns A mutation result whose mutate/mutateAsync accepts { id, data, options? } by default.
|
|
245
|
+
* @throws When rendered without the required query or data-access provider.
|
|
246
|
+
* @remarks Requires QueryClientProvider and DataAccessProvider with a real host adapter.
|
|
247
|
+
* The adapter determines update semantics, authorization, persistence and errors. Invalidation
|
|
248
|
+
* defaults are supplied by this helper; the underlying wrapper has no automatic defaults.
|
|
249
|
+
* @example
|
|
250
|
+
* ```tsx
|
|
251
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
252
|
+
* import { DataAccessProvider, createQueryClient, useUpdate } from '@alneas/appkit-react/tools/data-access/react';
|
|
253
|
+
* import type { ComponentProps } from 'react';
|
|
254
|
+
* const client = createQueryClient();
|
|
255
|
+
* function UpdateTask() {
|
|
256
|
+
* const update = useUpdate<{ id: string; title: string }>('tasks');
|
|
257
|
+
* return <button onClick={() => update.mutate({ id: 'task-1', data: { title: 'Reviewed' } })}>Update</button>;
|
|
258
|
+
* }
|
|
259
|
+
* export function TaskUpdater({ adapter }: Pick<ComponentProps<typeof DataAccessProvider>, 'adapter'>) {
|
|
260
|
+
* return <QueryClientProvider client={client}><DataAccessProvider adapter={adapter}>
|
|
261
|
+
* <UpdateTask />
|
|
262
|
+
* </DataAccessProvider></QueryClientProvider>;
|
|
263
|
+
* }
|
|
264
|
+
* ```
|
|
109
265
|
*/
|
|
110
266
|
export declare function useUpdate<T = unknown, TVariables = {
|
|
111
267
|
id: string;
|
|
112
268
|
data: Record<string, unknown>;
|
|
113
269
|
options?: QueryOptions;
|
|
114
270
|
}>(collection: string, options?: {
|
|
271
|
+
/**
|
|
272
|
+
* Callback after successful mutation and awaited invalidations.
|
|
273
|
+
* @param data - Adapter result.
|
|
274
|
+
* @param variables - Original mutation variables.
|
|
275
|
+
* @returns No value; callback promise results are not awaited by the wrapper.
|
|
276
|
+
*/
|
|
115
277
|
onSuccess?: (data: T, variables: TVariables) => void;
|
|
278
|
+
/**
|
|
279
|
+
* Optional replacement query keys using prefix matching; [] disables invalidation, omission uses this hook default.
|
|
280
|
+
*/
|
|
116
281
|
invalidateKeys?: unknown[][];
|
|
117
282
|
}): import('@tanstack/react-query').UseMutationResult<T, Error, TVariables, unknown>;
|
|
118
283
|
/**
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* @
|
|
122
|
-
* @param
|
|
123
|
-
* @param options
|
|
124
|
-
* @returns
|
|
284
|
+
* Deletes one record through the current adapter.
|
|
285
|
+
* @typeParam T - Adapter result record shape, defaults to unknown.
|
|
286
|
+
* @typeParam TVariables - Mutation variables; must provide id and optional adapter options.
|
|
287
|
+
* @param collection - Host collection/table name.
|
|
288
|
+
* @param options - Optional successful-result callback and replacement invalidation keys.
|
|
289
|
+
* @returns TanStack mutation result with explicit mutate/mutateAsync controls.
|
|
290
|
+
* @throws Error without required providers; adapter failures reject mutateAsync and populate mutation error state.
|
|
291
|
+
* @remarks Requires DataAccessProvider inside QueryClientProvider; no CSS. Omitted
|
|
292
|
+
* invalidation keys default to [[collection]]; [] disables invalidation. Callback promise
|
|
293
|
+
* results are not awaited by the underlying wrapper. Persistence, atomicity and
|
|
294
|
+
* authorization are host-owned; no rollback is supplied.
|
|
295
|
+
* @example
|
|
296
|
+
* ```tsx
|
|
297
|
+
* import type { ComponentProps } from 'react';
|
|
298
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
299
|
+
* import { DataAccessProvider, createQueryClient, useDelete } from '@alneas/appkit-react/tools/data-access/react';
|
|
300
|
+
* type DataAccessAdapter = ComponentProps<typeof DataAccessProvider>['adapter'];
|
|
301
|
+
* const client = createQueryClient();
|
|
302
|
+
* function Action() { const mutation = useDelete('tasks'); return <button onClick={() => mutation.mutate({ id: 'task-1' })}>Run host mutation</button>; }
|
|
303
|
+
* export function DataScreen({ adapter }: { adapter: DataAccessAdapter }) { return <QueryClientProvider client={client}><DataAccessProvider adapter={adapter}><Action /></DataAccessProvider></QueryClientProvider>; }
|
|
304
|
+
* ```
|
|
125
305
|
*/
|
|
126
306
|
export declare function useDelete<T = unknown, TVariables = {
|
|
127
307
|
id: string;
|
|
128
308
|
options?: QueryOptions;
|
|
129
309
|
}>(collection: string, options?: {
|
|
310
|
+
/**
|
|
311
|
+
* Callback after successful mutation and awaited invalidations.
|
|
312
|
+
* @param data - Adapter result.
|
|
313
|
+
* @param variables - Original mutation variables.
|
|
314
|
+
* @returns No value; callback promise results are not awaited by the wrapper.
|
|
315
|
+
*/
|
|
130
316
|
onSuccess?: (data: T, variables: TVariables) => void;
|
|
317
|
+
/**
|
|
318
|
+
* Optional replacement query keys using prefix matching; [] disables invalidation, omission uses this hook default.
|
|
319
|
+
*/
|
|
131
320
|
invalidateKeys?: unknown[][];
|
|
132
321
|
}): import('@tanstack/react-query').UseMutationResult<T, Error, TVariables, unknown>;
|
|
133
322
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* @
|
|
137
|
-
* @param
|
|
138
|
-
* @param options
|
|
139
|
-
* @returns
|
|
323
|
+
* Creates multiple records through the current adapter.
|
|
324
|
+
* @typeParam T - Adapter result record shape, defaults to unknown.
|
|
325
|
+
* @typeParam TVariables - Mutation variables; must provide data array and optional adapter options.
|
|
326
|
+
* @param collection - Host collection/table name.
|
|
327
|
+
* @param options - Optional successful-result callback and replacement invalidation keys.
|
|
328
|
+
* @returns TanStack mutation result with explicit mutate/mutateAsync controls.
|
|
329
|
+
* @throws Error without required providers; mutation rejects if adapter lacks createMany or fails.
|
|
330
|
+
* @remarks Requires DataAccessProvider inside QueryClientProvider; no CSS. Omitted
|
|
331
|
+
* invalidation keys default to [[collection]]; [] disables invalidation. Callback promise
|
|
332
|
+
* results are not awaited by the underlying wrapper. Persistence, atomicity and
|
|
333
|
+
* authorization are host-owned; no rollback is supplied.
|
|
334
|
+
* @example
|
|
335
|
+
* ```tsx
|
|
336
|
+
* import type { ComponentProps } from 'react';
|
|
337
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
338
|
+
* import { DataAccessProvider, createQueryClient, useCreateMany } from '@alneas/appkit-react/tools/data-access/react';
|
|
339
|
+
* type DataAccessAdapter = ComponentProps<typeof DataAccessProvider>['adapter'];
|
|
340
|
+
* const client = createQueryClient();
|
|
341
|
+
* function Action() { const mutation = useCreateMany('tasks'); return <button onClick={() => mutation.mutate({ data: [{ title: 'Review' }] })}>Run host mutation</button>; }
|
|
342
|
+
* export function DataScreen({ adapter }: { adapter: DataAccessAdapter }) { return <QueryClientProvider client={client}><DataAccessProvider adapter={adapter}><Action /></DataAccessProvider></QueryClientProvider>; }
|
|
343
|
+
* ```
|
|
140
344
|
*/
|
|
141
345
|
export declare function useCreateMany<T = unknown, TVariables = {
|
|
142
346
|
data: Record<string, unknown>[];
|
|
143
347
|
options?: QueryOptions;
|
|
144
348
|
}>(collection: string, options?: {
|
|
349
|
+
/**
|
|
350
|
+
* Callback after successful mutation and awaited invalidations.
|
|
351
|
+
* @param data - Adapter result.
|
|
352
|
+
* @param variables - Original mutation variables.
|
|
353
|
+
* @returns No value; callback promise results are not awaited by the wrapper.
|
|
354
|
+
*/
|
|
145
355
|
onSuccess?: (data: T[], variables: TVariables) => void;
|
|
356
|
+
/**
|
|
357
|
+
* Optional replacement query keys using prefix matching; [] disables invalidation, omission uses this hook default.
|
|
358
|
+
*/
|
|
146
359
|
invalidateKeys?: unknown[][];
|
|
147
360
|
}): import('@tanstack/react-query').UseMutationResult<T[], Error, TVariables, unknown>;
|
|
148
361
|
/**
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
* @
|
|
152
|
-
* @param
|
|
153
|
-
* @param options
|
|
154
|
-
* @returns
|
|
362
|
+
* Updates records matching an adapter filter.
|
|
363
|
+
* @typeParam T - Adapter result record shape, defaults to unknown.
|
|
364
|
+
* @typeParam TVariables - Mutation variables; must provide filter, data and optional adapter options.
|
|
365
|
+
* @param collection - Host collection/table name.
|
|
366
|
+
* @param options - Optional successful-result callback and replacement invalidation keys.
|
|
367
|
+
* @returns TanStack mutation result with explicit mutate/mutateAsync controls.
|
|
368
|
+
* @throws Error without required providers; mutation rejects if adapter lacks updateMany or fails.
|
|
369
|
+
* @remarks Requires DataAccessProvider inside QueryClientProvider; no CSS. Omitted
|
|
370
|
+
* invalidation keys default to [[collection], [collection, 'list']]; [] disables invalidation. Callback promise
|
|
371
|
+
* results are not awaited by the underlying wrapper. Persistence, atomicity and
|
|
372
|
+
* authorization are host-owned; no rollback is supplied.
|
|
373
|
+
* @example
|
|
374
|
+
* ```tsx
|
|
375
|
+
* import type { ComponentProps } from 'react';
|
|
376
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
377
|
+
* import { DataAccessProvider, createQueryClient, useUpdateMany } from '@alneas/appkit-react/tools/data-access/react';
|
|
378
|
+
* type DataAccessAdapter = ComponentProps<typeof DataAccessProvider>['adapter'];
|
|
379
|
+
* const client = createQueryClient();
|
|
380
|
+
* function Action() { const mutation = useUpdateMany('tasks'); return <button onClick={() => mutation.mutate({ filter: { state: 'draft' }, data: { state: 'reviewed' } })}>Run host mutation</button>; }
|
|
381
|
+
* export function DataScreen({ adapter }: { adapter: DataAccessAdapter }) { return <QueryClientProvider client={client}><DataAccessProvider adapter={adapter}><Action /></DataAccessProvider></QueryClientProvider>; }
|
|
382
|
+
* ```
|
|
155
383
|
*/
|
|
156
384
|
export declare function useUpdateMany<T = unknown, TVariables = {
|
|
157
385
|
filter: Filter;
|
|
158
386
|
data: Record<string, unknown>;
|
|
159
387
|
options?: QueryOptions;
|
|
160
388
|
}>(collection: string, options?: {
|
|
389
|
+
/**
|
|
390
|
+
* Callback after successful mutation and awaited invalidations.
|
|
391
|
+
* @param data - Adapter result.
|
|
392
|
+
* @param variables - Original mutation variables.
|
|
393
|
+
* @returns No value; callback promise results are not awaited by the wrapper.
|
|
394
|
+
*/
|
|
161
395
|
onSuccess?: (data: T[], variables: TVariables) => void;
|
|
396
|
+
/**
|
|
397
|
+
* Optional replacement query keys using prefix matching; [] disables invalidation, omission uses this hook default.
|
|
398
|
+
*/
|
|
162
399
|
invalidateKeys?: unknown[][];
|
|
163
400
|
}): import('@tanstack/react-query').UseMutationResult<T[], Error, TVariables, unknown>;
|
|
164
401
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
* @
|
|
168
|
-
* @param
|
|
169
|
-
* @param options
|
|
170
|
-
* @returns
|
|
402
|
+
* Deletes records matching an adapter filter.
|
|
403
|
+
* @typeParam T - Adapter result record shape, defaults to unknown.
|
|
404
|
+
* @typeParam TVariables - Mutation variables; must provide filter and optional adapter options.
|
|
405
|
+
* @param collection - Host collection/table name.
|
|
406
|
+
* @param options - Optional successful-result callback and replacement invalidation keys.
|
|
407
|
+
* @returns TanStack mutation result with explicit mutate/mutateAsync controls.
|
|
408
|
+
* @throws Error without required providers; mutation rejects if adapter lacks deleteMany or fails.
|
|
409
|
+
* @remarks Requires DataAccessProvider inside QueryClientProvider; no CSS. Omitted
|
|
410
|
+
* invalidation keys default to [[collection]]; [] disables invalidation. Callback promise
|
|
411
|
+
* results are not awaited by the underlying wrapper. Persistence, atomicity and
|
|
412
|
+
* authorization are host-owned; no rollback is supplied.
|
|
413
|
+
* @example
|
|
414
|
+
* ```tsx
|
|
415
|
+
* import type { ComponentProps } from 'react';
|
|
416
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
417
|
+
* import { DataAccessProvider, createQueryClient, useDeleteMany } from '@alneas/appkit-react/tools/data-access/react';
|
|
418
|
+
* type DataAccessAdapter = ComponentProps<typeof DataAccessProvider>['adapter'];
|
|
419
|
+
* const client = createQueryClient();
|
|
420
|
+
* function Action() { const mutation = useDeleteMany('tasks'); return <button onClick={() => mutation.mutate({ filter: { state: 'obsolete' } })}>Run host mutation</button>; }
|
|
421
|
+
* export function DataScreen({ adapter }: { adapter: DataAccessAdapter }) { return <QueryClientProvider client={client}><DataAccessProvider adapter={adapter}><Action /></DataAccessProvider></QueryClientProvider>; }
|
|
422
|
+
* ```
|
|
171
423
|
*/
|
|
172
424
|
export declare function useDeleteMany<T = unknown, TVariables = {
|
|
173
425
|
filter: Filter;
|
|
174
426
|
options?: QueryOptions;
|
|
175
427
|
}>(collection: string, options?: {
|
|
428
|
+
/**
|
|
429
|
+
* Callback after successful mutation and awaited invalidations.
|
|
430
|
+
* @param data - Adapter result.
|
|
431
|
+
* @param variables - Original mutation variables.
|
|
432
|
+
* @returns No value; callback promise results are not awaited by the wrapper.
|
|
433
|
+
*/
|
|
176
434
|
onSuccess?: (data: T[], variables: TVariables) => void;
|
|
435
|
+
/**
|
|
436
|
+
* Optional replacement query keys using prefix matching; [] disables invalidation, omission uses this hook default.
|
|
437
|
+
*/
|
|
177
438
|
invalidateKeys?: unknown[][];
|
|
178
439
|
}): import('@tanstack/react-query').UseMutationResult<T[], Error, TVariables, unknown>;
|
|
179
440
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* @param collection -
|
|
183
|
-
* @param pipeline -
|
|
184
|
-
* @param options -
|
|
185
|
-
* @param queryOptions -
|
|
186
|
-
* @returns
|
|
441
|
+
* Queries an aggregation pipeline through the current adapter.
|
|
442
|
+
* @typeParam T - Expected result record shape, default unknown; not runtime validation.
|
|
443
|
+
* @param collection - Host collection/table name.
|
|
444
|
+
* @param pipeline - Adapter-specific aggregation stages.
|
|
445
|
+
* @param options - Optional adapter query settings.
|
|
446
|
+
* @param queryOptions - TanStack query overrides; omitted values use the generated options.
|
|
447
|
+
* @returns TanStack query result with data/status/error and refetch controls. Missing aggregate capability becomes a query error.
|
|
448
|
+
* @throws Error without DataAccessProvider or QueryClientProvider.
|
|
449
|
+
* @remarks No CSS required. Adapter failures appear in query state; keys include adapter
|
|
450
|
+
* scope and input options. Query signals are forwarded, but cancellation depends on the
|
|
451
|
+
* adapter. The host owns backend authorization.
|
|
452
|
+
* @example
|
|
453
|
+
* ```tsx
|
|
454
|
+
* import type { ComponentProps } from 'react';
|
|
455
|
+
* import { QueryClientProvider } from '@tanstack/react-query';
|
|
456
|
+
* import { DataAccessProvider, createQueryClient, useAggregate } from '@alneas/appkit-react/tools/data-access/react';
|
|
457
|
+
* type DataAccessAdapter = ComponentProps<typeof DataAccessProvider>['adapter'];
|
|
458
|
+
* const client = createQueryClient();
|
|
459
|
+
* function Content() { const query = useAggregate<{ count: number }>('tasks', []); return <output>{query.isPending ? 'Loading' : query.error ? 'Failed' : 'Ready'}</output>; }
|
|
460
|
+
* export function DataScreen({ adapter }: { adapter: DataAccessAdapter }) { return <QueryClientProvider client={client}><DataAccessProvider adapter={adapter}><Content /></DataAccessProvider></QueryClientProvider>; }
|
|
461
|
+
* ```
|
|
187
462
|
*/
|
|
188
463
|
export declare function useAggregate<T = unknown>(collection: string, pipeline: unknown[], options?: QueryOptions, queryOptions?: Omit<UseQueryOptions<T[], Error>, 'queryKey' | 'queryFn'>): import('@tanstack/react-query').UseQueryResult<T[], Error>;
|