@questpie/admin 3.5.2 → 3.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (195) hide show
  1. package/README.md +8 -0
  2. package/dist/client/blocks/block-renderer.d.mts +2 -2
  3. package/dist/client/builder/index.d.mts +1 -1
  4. package/dist/client/builder/types/collection-types.d.mts +89 -5
  5. package/dist/client/builder/types/common.d.mts +5 -0
  6. package/dist/client/builder/types/field-types.d.mts +41 -1
  7. package/dist/client/builder/view/view.d.mts +3 -2
  8. package/dist/client/components/actions/action-dialog.mjs +5 -0
  9. package/dist/client/components/admin-link.d.mts +2 -2
  10. package/dist/client/components/fields/boolean-field.mjs +2 -1
  11. package/dist/client/components/fields/date-field.mjs +2 -1
  12. package/dist/client/components/fields/datetime-field.mjs +2 -1
  13. package/dist/client/components/fields/email-field.mjs +2 -1
  14. package/dist/client/components/fields/field-utils.d.mts +11 -0
  15. package/dist/client/components/fields/field-utils.mjs +3 -1
  16. package/dist/client/components/fields/field-wrapper.mjs +3 -3
  17. package/dist/client/components/fields/number-field.mjs +2 -1
  18. package/dist/client/components/fields/object-field.mjs +2 -1
  19. package/dist/client/components/fields/relation/displays/types.mjs +3 -3
  20. package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +7 -0
  21. package/dist/client/components/fields/rich-text-editor/extensions.mjs +19 -2
  22. package/dist/client/components/fields/rich-text-editor/image-popover.mjs +6 -2
  23. package/dist/client/components/fields/rich-text-editor/image-upload.mjs +2 -1
  24. package/dist/client/components/fields/rich-text-editor/index.d.mts +5 -3
  25. package/dist/client/components/fields/rich-text-editor/index.mjs +38 -76
  26. package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +30 -7
  27. package/dist/client/components/fields/rich-text-editor/toolbar.mjs +1 -312
  28. package/dist/client/components/fields/rich-text-editor/types.d.mts +4 -0
  29. package/dist/client/components/fields/rich-text-editor/types.mjs +1 -1
  30. package/dist/client/components/fields/rich-text-editor/utils.mjs +6 -12
  31. package/dist/client/components/fields/select-field.mjs +2 -1
  32. package/dist/client/components/fields/text-field.mjs +2 -1
  33. package/dist/client/components/fields/textarea-field.mjs +2 -1
  34. package/dist/client/components/fields/time-field.mjs +2 -1
  35. package/dist/client/components/filter-builder/filter-builder-sheet.mjs +75 -22
  36. package/dist/client/components/layout/field-layout-renderer.mjs +4 -4
  37. package/dist/client/components/media/media-grid.mjs +2 -1
  38. package/dist/client/components/primitives/asset-preview.mjs +4 -2
  39. package/dist/client/components/primitives/dropzone.d.mts +100 -0
  40. package/dist/client/components/primitives/field-select-control.mjs +2 -1
  41. package/dist/client/components/ui/button.d.mts +23 -0
  42. package/dist/client/components/ui/button.mjs +2 -2
  43. package/dist/client/components/ui/dropdown-menu.d.mts +49 -0
  44. package/dist/client/components/ui/dropdown-menu.mjs +7 -19
  45. package/dist/client/components/ui/popover.mjs +1 -1
  46. package/dist/client/components/ui/search-input.d.mts +56 -0
  47. package/dist/client/components/ui/select.mjs +2 -2
  48. package/dist/client/components/ui/sheet.d.mts +40 -0
  49. package/dist/client/components/ui/table.d.mts +49 -0
  50. package/dist/client/components/ui/table.mjs +15 -1
  51. package/dist/client/components/ui/tooltip.d.mts +21 -0
  52. package/dist/client/contexts/focus-context.d.mts +2 -2
  53. package/dist/client/hooks/query-access.d.mts +9 -0
  54. package/dist/client/hooks/query-access.mjs +20 -0
  55. package/dist/client/hooks/typed-hooks.d.mts +4 -2
  56. package/dist/client/hooks/typed-hooks.mjs +30 -29
  57. package/dist/client/hooks/use-admin-config.mjs +20 -1
  58. package/dist/client/hooks/use-autosave.mjs +91 -0
  59. package/dist/client/hooks/use-collection.mjs +65 -23
  60. package/dist/client/hooks/use-reactive-fields.d.mts +1 -0
  61. package/dist/client/hooks/use-reactive-fields.mjs +16 -1
  62. package/dist/client/hooks/use-server-actions.mjs +12 -1
  63. package/dist/client/hooks/use-upload.d.mts +40 -0
  64. package/dist/client/hooks/use-upload.mjs +4 -2
  65. package/dist/client/hooks/use-view-state.mjs +15 -7
  66. package/dist/client/i18n/hooks.d.mts +20 -0
  67. package/dist/client/lib/utils.d.mts +6 -0
  68. package/dist/client/lib/view-filter-utils.mjs +30 -0
  69. package/dist/client/preview/block-scope-context.d.mts +2 -2
  70. package/dist/client/preview/preview-banner.d.mts +2 -2
  71. package/dist/client/preview/preview-field.d.mts +4 -4
  72. package/dist/client/runtime/provider.mjs +22 -3
  73. package/dist/client/scope/picker.d.mts +2 -2
  74. package/dist/client/scope/provider.d.mts +2 -2
  75. package/dist/client/styles/base.css +75 -79
  76. package/dist/client/utils/asset-url.mjs +27 -0
  77. package/dist/client/utils/build-field-definitions-from-schema.mjs +1 -0
  78. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  79. package/dist/client/views/auth/auth-layout.d.mts +3 -3
  80. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  81. package/dist/client/views/auth/login-form.d.mts +2 -2
  82. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  83. package/dist/client/views/auth/setup-form.d.mts +2 -2
  84. package/dist/client/views/collection/auto-form-fields.mjs +7 -6
  85. package/dist/client/views/collection/cells/primitive-cells.mjs +9 -6
  86. package/dist/client/views/collection/cells/shared/asset-thumbnail.d.mts +7 -0
  87. package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +3 -2
  88. package/dist/client/views/collection/cells/shared/cell-helpers.mjs +3 -2
  89. package/dist/client/views/collection/cells/upload-cells.mjs +2 -1
  90. package/dist/client/views/collection/columns/build-columns.mjs +3 -1
  91. package/dist/client/views/collection/document-view.d.mts +30 -0
  92. package/dist/client/views/collection/document-view.mjs +377 -0
  93. package/dist/client/views/collection/field-context.mjs +3 -2
  94. package/dist/client/views/collection/field-renderer.mjs +13 -5
  95. package/dist/client/views/collection/form-view.mjs +221 -282
  96. package/dist/client/views/collection/list-view.mjs +592 -190
  97. package/dist/client/views/collection/outline.mjs +44 -19
  98. package/dist/client/views/collection/quick-filter-bar.mjs +45 -0
  99. package/dist/client/views/collection/table-view.mjs +61 -17
  100. package/dist/client/views/globals/global-form-view.mjs +12 -9
  101. package/dist/client/views/layout/admin-layout-provider.mjs +4 -3
  102. package/dist/client/views/layout/admin-layout.mjs +108 -21
  103. package/dist/client/views/layout/admin-router.mjs +19 -3
  104. package/dist/client/views/layout/admin-sidebar.mjs +70 -20
  105. package/dist/client/views/layout/admin-theme.mjs +5 -4
  106. package/dist/client/views/layout/admin-view-layout.d.mts +36 -0
  107. package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
  108. package/dist/client/views/pages/dashboard-page.d.mts +2 -2
  109. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  110. package/dist/client/views/pages/invite-page.d.mts +2 -2
  111. package/dist/client/views/pages/login-page.d.mts +2 -2
  112. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  113. package/dist/client/views/pages/setup-page.d.mts +2 -2
  114. package/dist/client.d.mts +17 -2
  115. package/dist/client.mjs +17 -2
  116. package/dist/components/rich-text/rich-text-renderer.d.mts +5 -5
  117. package/dist/components/rich-text/rich-text-renderer.mjs +5 -2
  118. package/dist/factories.d.mts +4 -2
  119. package/dist/factories.mjs +2 -2
  120. package/dist/index.d.mts +17 -3
  121. package/dist/index.mjs +17 -2
  122. package/dist/modules/admin.d.mts +1 -1
  123. package/dist/server/adapters/index.d.mts +2 -0
  124. package/dist/server/adapters/nextjs.d.mts +1 -0
  125. package/dist/server/augmentation/actions.d.mts +9 -3
  126. package/dist/server/augmentation/dashboard.d.mts +11 -11
  127. package/dist/server/augmentation/form-layout.d.mts +16 -6
  128. package/dist/server/augmentation/index.d.mts +7 -0
  129. package/dist/server/augmentation/sidebar.d.mts +8 -8
  130. package/dist/server/augmentation/views.d.mts +4 -1
  131. package/dist/server/auth-helpers.d.mts +1 -0
  132. package/dist/server/codegen/admin-client-template.mjs +7 -6
  133. package/dist/server/fields/blocks.mjs +4 -1
  134. package/dist/server/fields/index.d.mts +1 -1
  135. package/dist/server/fields/reactive-runtime.mjs +3 -0
  136. package/dist/server/fields/rich-text.d.mts +16 -17
  137. package/dist/server/fields/rich-text.mjs +18 -7
  138. package/dist/server/i18n/messages/cs.mjs +2 -0
  139. package/dist/server/i18n/messages/de.mjs +2 -0
  140. package/dist/server/i18n/messages/en.mjs +4 -0
  141. package/dist/server/i18n/messages/es.mjs +2 -0
  142. package/dist/server/i18n/messages/fr.mjs +2 -0
  143. package/dist/server/i18n/messages/pl.mjs +2 -0
  144. package/dist/server/i18n/messages/pt.mjs +2 -0
  145. package/dist/server/i18n/messages/sk.mjs +2 -0
  146. package/dist/server/modules/admin/.generated/module.d.mts +1 -1
  147. package/dist/server/modules/admin/auth-helpers.mjs +7 -1
  148. package/dist/server/modules/admin/block/block-builder.d.mts +0 -8
  149. package/dist/server/modules/admin/block/introspection.d.mts +2 -2
  150. package/dist/server/modules/admin/block/introspection.mjs +28 -4
  151. package/dist/server/modules/admin/block/prefetch.d.mts +11 -0
  152. package/dist/server/modules/admin/block/prefetch.mjs +108 -27
  153. package/dist/server/modules/admin/client/.generated/module.d.mts +68 -67
  154. package/dist/server/modules/admin/client/.generated/module.mjs +2 -0
  155. package/dist/server/modules/admin/client/views/collection-document.d.mts +6 -0
  156. package/dist/server/modules/admin/client/views/collection-document.mjs +10 -0
  157. package/dist/server/modules/admin/collections/account.d.mts +53 -52
  158. package/dist/server/modules/admin/collections/admin-locks.d.mts +57 -56
  159. package/dist/server/modules/admin/collections/admin-preferences.d.mts +38 -37
  160. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +50 -49
  161. package/dist/server/modules/admin/collections/apikey.d.mts +76 -67
  162. package/dist/server/modules/admin/collections/assets.d.mts +37 -36
  163. package/dist/server/modules/admin/collections/session.d.mts +42 -41
  164. package/dist/server/modules/admin/collections/user.d.mts +57 -56
  165. package/dist/server/modules/admin/collections/verification.d.mts +34 -33
  166. package/dist/server/modules/admin/dto/admin-config.dto.mjs +34 -4
  167. package/dist/server/modules/admin/factories.mjs +4 -34
  168. package/dist/server/modules/admin/index.d.mts +3 -3
  169. package/dist/server/modules/admin/routes/admin-config.d.mts +4 -2
  170. package/dist/server/modules/admin/routes/admin-config.mjs +56 -24
  171. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  172. package/dist/server/modules/admin/routes/execute-action.mjs +35 -9
  173. package/dist/server/modules/admin/routes/locales.mjs +1 -1
  174. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  175. package/dist/server/modules/admin/routes/preview.mjs +6 -5
  176. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  177. package/dist/server/modules/admin/routes/reactive.mjs +2 -2
  178. package/dist/server/modules/admin/routes/route-helpers.d.mts +11 -7
  179. package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
  180. package/dist/server/modules/admin/routes/setup.d.mts +7 -7
  181. package/dist/server/modules/admin/routes/translations.d.mts +4 -4
  182. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  183. package/dist/server/modules/admin/routes/widget-data.mjs +12 -4
  184. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +45 -45
  185. package/dist/server/modules/audit/.generated/module.d.mts +6 -6
  186. package/dist/server/modules/audit/collections/audit-log.d.mts +81 -80
  187. package/dist/server/modules/audit/jobs/audit-cleanup.d.mts +2 -2
  188. package/dist/server/plugin.mjs +10 -5
  189. package/dist/server/proxy-factories.d.mts +8 -1
  190. package/dist/server/proxy-factories.mjs +33 -1
  191. package/dist/server.d.mts +3 -1
  192. package/dist/shared/types/index.d.mts +1 -0
  193. package/dist/shared/types/saved-views.types.d.mts +14 -7
  194. package/dist/shared.d.mts +3 -2
  195. package/package.json +5 -4
@@ -1,6 +1,6 @@
1
1
  import { adminConfig } from "./server/augmentation/index.mjs";
2
2
  import { component, editView, filterViewsByKind, listView, view } from "./server/registry-helpers.mjs";
3
- import { createActionCallbackProxy, createActionProxy, createComponentCallbackProxy, createComponentProxy, createDashboardCallbackContext, createDashboardContributionProxy, createFieldProxy, createSidebarCallbackContext, createSidebarContributionProxy, createViewCallbackProxy, createViewProxy, resolveDashboardCallback, resolveSidebarCallback } from "./server/proxy-factories.mjs";
3
+ import { createActionCallbackProxy, createActionFieldBuilderProxy, createActionProxy, createComponentCallbackProxy, createComponentProxy, createDashboardCallbackContext, createDashboardContributionProxy, createFieldProxy, createSidebarCallbackContext, createSidebarContributionProxy, createViewCallbackProxy, createViewProxy, resolveDashboardCallback, resolveSidebarCallback } from "./server/proxy-factories.mjs";
4
4
  import { createBlocksPrefetchHook, processBlocksDocument, processDocumentBlocksPrefetch } from "./server/modules/admin/block/prefetch.mjs";
5
5
  import { BlockBuilder, block } from "./server/modules/admin/block/block-builder.mjs";
6
6
  import { getBlocksByCategory, introspectBlock, introspectBlocks } from "./server/modules/admin/block/introspection.mjs";
@@ -8,4 +8,4 @@ import { getAdminSession, isAdminUser, requireAdminAuth } from "./server/modules
8
8
  import { createNextAuthMiddleware, getNextAdminSession } from "./server/adapters/nextjs.mjs";
9
9
  import { createTanStackAuthGuard, createTanStackSessionLoader } from "./server/adapters/tanstack.mjs";
10
10
 
11
- export { BlockBuilder, adminConfig, block, component, createActionCallbackProxy, createActionProxy, createBlocksPrefetchHook, createComponentCallbackProxy, createComponentProxy, createDashboardCallbackContext, createDashboardContributionProxy, createFieldProxy, createNextAuthMiddleware, createSidebarCallbackContext, createSidebarContributionProxy, createTanStackAuthGuard, createTanStackSessionLoader, createViewCallbackProxy, createViewProxy, editView, filterViewsByKind, getAdminSession, getBlocksByCategory, getNextAdminSession, introspectBlock, introspectBlocks, isAdminUser, listView, processBlocksDocument, processDocumentBlocksPrefetch, requireAdminAuth, resolveDashboardCallback, resolveSidebarCallback, view };
11
+ export { BlockBuilder, adminConfig, block, component, createActionCallbackProxy, createActionFieldBuilderProxy, createActionProxy, createBlocksPrefetchHook, createComponentCallbackProxy, createComponentProxy, createDashboardCallbackContext, createDashboardContributionProxy, createFieldProxy, createNextAuthMiddleware, createSidebarCallbackContext, createSidebarContributionProxy, createTanStackAuthGuard, createTanStackSessionLoader, createViewCallbackProxy, createViewProxy, editView, filterViewsByKind, getAdminSession, getBlocksByCategory, getNextAdminSession, introspectBlock, introspectBlocks, isAdminUser, listView, processBlocksDocument, processDocumentBlocksPrefetch, requireAdminAuth, resolveDashboardCallback, resolveSidebarCallback, view };
package/dist/index.d.mts CHANGED
@@ -10,13 +10,26 @@ import { Admin, AppAdmin, InferAdminCMS } from "./client/builder/admin.mjs";
10
10
  import { createAdminClient } from "./client/create-admin-client.mjs";
11
11
  import { TypedHooks, createTypedHooks } from "./client/hooks/typed-hooks.mjs";
12
12
  import { createAdminAuthClient, useAuthClient } from "./client/hooks/use-auth.mjs";
13
- import { ComponentRegistry, FieldComponentProps, FormViewConfig } from "./client/builder/types/field-types.mjs";
13
+ import { ComponentRegistry, DocumentViewConfig, FieldComponentProps, FormViewConfig } from "./client/builder/types/field-types.mjs";
14
14
  import { BrandLogoConfig, BrandingConfig } from "./client/types/admin-config.mjs";
15
15
  import { AdminProvider, AdminProviderProps, AdminState, AdminStore, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore } from "./client/runtime/provider.mjs";
16
16
  import { useShallow } from "./client/runtime/index.mjs";
17
17
  import { AdminSidebarBrandProps, AdminSidebarNavItemProps } from "./client/views/layout/admin-sidebar.mjs";
18
18
  import { AdminLayout, AdminShellRailProps } from "./client/views/layout/admin-layout.mjs";
19
19
  import { AdminLayoutProvider } from "./client/views/layout/admin-layout-provider.mjs";
20
+ import { AdminViewHeader, AdminViewLayout } from "./client/views/layout/admin-view-layout.mjs";
21
+ import { DocumentView } from "./client/views/collection/document-view.mjs";
22
+ import { getFileIcon } from "./client/views/collection/cells/shared/asset-thumbnail.mjs";
23
+ import { SearchInput } from "./client/components/ui/search-input.mjs";
24
+ import { Button } from "./client/components/ui/button.mjs";
25
+ import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./client/components/ui/table.mjs";
26
+ import { Tooltip, TooltipContent, TooltipTrigger } from "./client/components/ui/tooltip.mjs";
27
+ import { Dropzone } from "./client/components/primitives/dropzone.mjs";
28
+ import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle } from "./client/components/ui/sheet.mjs";
29
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger } from "./client/components/ui/dropdown-menu.mjs";
30
+ import { sanitizeFilename } from "./client/components/fields/field-utils.mjs";
31
+ import { cn } from "./client/lib/utils.mjs";
32
+ import { useResolveText } from "./client/i18n/hooks.mjs";
20
33
  import { AdminRouter, AdminRouterProps } from "./client/views/layout/admin-router.mjs";
21
34
  import { BlockCategory, BlockContent, BlockNode, BlockRendererProps as BlockRendererProps$1, EMPTY_BLOCK_CONTENT, isBlockContent } from "./client/blocks/types.mjs";
22
35
  import { BlockRenderer, BlockRendererProps } from "./client/blocks/block-renderer.mjs";
@@ -45,6 +58,7 @@ import { LoginPage } from "./client/views/pages/login-page.mjs";
45
58
  import { ResetPasswordPage } from "./client/views/pages/reset-password-page.mjs";
46
59
  import { SetupPage, SetupPageProps } from "./client/views/pages/setup-page.mjs";
47
60
  import { useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions } from "./client/hooks/use-collection.mjs";
61
+ import { Asset, useUpload } from "./client/hooks/use-upload.mjs";
48
62
  import { useCurrentUser } from "./client/hooks/use-current-user.mjs";
49
63
  import { BrandSnapshot, useBrand, useBrandSnapshotRef } from "./client/hooks/use-brand.mjs";
50
64
  import { OptionItem, UseFieldOptionsOptions, UseFieldOptionsResult, useFieldOptions } from "./client/hooks/use-field-options.mjs";
@@ -64,5 +78,5 @@ import { FocusContextValue, FocusProvider, FocusProviderProps, FocusState, parse
64
78
  import { ScopeContextValue, ScopeOption, ScopePickerProps, ScopeProviderProps } from "./client/scope/types.mjs";
65
79
  import { ScopePicker } from "./client/scope/picker.mjs";
66
80
  import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
67
- import { AnyQuestpieClient, CollectionFieldKeys, CollectionItem, CollectionNames, GlobalNames } from "./client.mjs";
68
- export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminProviderProps, AdminRouter, AdminRouterProps, AdminShellRailProps, AdminSidebarBrandProps, AdminSidebarNavItemProps, AdminState, AdminStore, AdminToPreviewMessage, type AnyAdminMeta, AnyQuestpieClient, AnyWidgetConfig, AppAdmin, type ArrayFieldAdminMeta, AuthDefaultLogo, AuthGuard, AuthLayout, AuthLayoutProps, AuthLoading, Badge, BadgeProps, type BaseAdminMeta, BaseFieldProps, BaseWidgetAdminMeta, BaseWidgetConfig, BlockCategory, BlockClickedMessage, BlockContent, BlockNode, BlockRenderer, BlockRendererProps as BlockRendererComponentProps, BlockRendererProps$1 as BlockRendererProps, BlockScopeContextValue, BlockScopeProvider, BlockScopeProviderProps, type BooleanFieldAdminMeta, BrandLogoConfig, BrandLogoMark, BrandLogoMarkProps, BrandSnapshot, BrandingConfig, ChartWidgetConfig, CollectionFieldKeys, CollectionFormViewProps, CollectionItem, CollectionListViewProps, CollectionNames, CommitMessage, ComponentRegistry, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, CustomWidgetConfig, DashboardPage, type DateFieldAdminMeta, EMPTY_BLOCK_CONTENT, FieldClickedMessage, FieldComponentProps, FieldDefinition, FieldInstance, FieldValueEditedMessage, FlagConfig, FocusContextValue, FocusFieldMessage, FocusProvider, FocusProviderProps, FocusState, ForgotPasswordForm, ForgotPasswordPage, FormViewConfig, FormViewDefinition, FullResyncMessage, GlobalFormViewProps, GlobalNames, I18nContext, I18nText, IconComponent, IconifyIcon, IconifyIconProps, InferAdminCMS, InitSnapshotMessage, InvitePage, type JsonFieldAdminMeta, ListViewDefinition, LoginForm, LoginPage, MaybeLazyComponent, type NumberFieldAdminMeta, type ObjectFieldAdminMeta, OptionItem, PageDefinition, PatchAppliedMessage, PatchBatchMessage, PreviewBanner, PreviewBannerProps, PreviewConfig, PreviewField, PreviewFieldProps, PreviewPatchOp, PreviewProvider, PreviewReadyMessage, PreviewRefreshMessage, PreviewToAdminMessage, ProgressWidgetConfig, QuickActionsWidgetConfig, ReactiveFieldResult, ReactiveFieldState, RecentItemsWidgetConfig, RefreshCompleteMessage, type RelationFieldAdminMeta, ResetPasswordForm, ResetPasswordPage, ResyncRequestMessage, RichTextEditor, RichTextEditorProps, RichTextRenderer, RichTextStyles, ScopeContextValue, ScopeOption, ScopePicker, ScopePickerProps, ScopeProvider, ScopeProviderProps, SelectBlockMessage, type SelectFieldAdminMeta, SetupForm, SetupFormValues, SetupPage, SetupPageProps, SetupStatus, StandalonePreviewField, StatsWidgetConfig, TableWidgetConfig, type TextFieldAdminMeta, type TextareaFieldAdminMeta, type TimeFieldAdminMeta, TimelineWidgetConfig, TipTapDoc, TipTapNode, TypedHooks, type UploadFieldAdminMeta, UseCollectionPreviewOptions, UseCollectionPreviewResult, UseFieldOptionsOptions, UseFieldOptionsResult, UseReactiveFieldsOptions, UseReactiveFieldsResult, ValueWidgetConfig, ViewDefinition, ViewKind, WidgetComponentProps, WidgetConfig, WidgetDefinition, WidgetTypeRegistry, buildValidationSchema, buildZodFromIntrospection, configureField, createAdminAuthClient, createAdminClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, page, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, useBrand, useBrandSnapshotRef, useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionPreview, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions, useCurrentUser, useFieldOptions, useFocus, useFocusOptional, useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions, useIsBlockFocused, useIsDesktop, useIsFieldFocused, useIsMobile, useMediaQuery, usePreviewContext, useReactiveFields, useResolveFieldPath, useScope, useScopeSafe, useScopedFetch, useSearchParamToggle, useServerWidgetData, useSetupStatus, useShallow, useSidebarSearchParam, view, widget };
81
+ import { AnyQuestpieClient, CollectionFieldKeys, CollectionItem, CollectionNames, GlobalNames, toast } from "./client.mjs";
82
+ export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminProviderProps, AdminRouter, AdminRouterProps, AdminShellRailProps, AdminSidebarBrandProps, AdminSidebarNavItemProps, AdminState, AdminStore, AdminToPreviewMessage, AdminViewHeader, AdminViewLayout, type AnyAdminMeta, AnyQuestpieClient, AnyWidgetConfig, AppAdmin, type ArrayFieldAdminMeta, Asset, AuthDefaultLogo, AuthGuard, AuthLayout, AuthLayoutProps, AuthLoading, Badge, BadgeProps, type BaseAdminMeta, BaseFieldProps, BaseWidgetAdminMeta, BaseWidgetConfig, BlockCategory, BlockClickedMessage, BlockContent, BlockNode, BlockRenderer, BlockRendererProps as BlockRendererComponentProps, BlockRendererProps$1 as BlockRendererProps, BlockScopeContextValue, BlockScopeProvider, BlockScopeProviderProps, type BooleanFieldAdminMeta, BrandLogoConfig, BrandLogoMark, BrandLogoMarkProps, BrandSnapshot, BrandingConfig, Button, ChartWidgetConfig, CollectionFieldKeys, CollectionFormViewProps, CollectionItem, CollectionListViewProps, CollectionNames, CommitMessage, ComponentRegistry, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, CustomWidgetConfig, DashboardPage, type DateFieldAdminMeta, DocumentView, DocumentViewConfig, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, Dropzone, EMPTY_BLOCK_CONTENT, FieldClickedMessage, FieldComponentProps, FieldDefinition, FieldInstance, FieldValueEditedMessage, FlagConfig, FocusContextValue, FocusFieldMessage, FocusProvider, FocusProviderProps, FocusState, ForgotPasswordForm, ForgotPasswordPage, FormViewConfig, FormViewDefinition, FullResyncMessage, GlobalFormViewProps, GlobalNames, I18nContext, I18nText, IconComponent, IconifyIcon, IconifyIconProps, InferAdminCMS, InitSnapshotMessage, InvitePage, type JsonFieldAdminMeta, ListViewDefinition, LoginForm, LoginPage, MaybeLazyComponent, type NumberFieldAdminMeta, type ObjectFieldAdminMeta, OptionItem, PageDefinition, PatchAppliedMessage, PatchBatchMessage, PreviewBanner, PreviewBannerProps, PreviewConfig, PreviewField, PreviewFieldProps, PreviewPatchOp, PreviewProvider, PreviewReadyMessage, PreviewRefreshMessage, PreviewToAdminMessage, ProgressWidgetConfig, QuickActionsWidgetConfig, ReactiveFieldResult, ReactiveFieldState, RecentItemsWidgetConfig, RefreshCompleteMessage, type RelationFieldAdminMeta, ResetPasswordForm, ResetPasswordPage, ResyncRequestMessage, RichTextEditor, RichTextEditorProps, RichTextRenderer, RichTextStyles, ScopeContextValue, ScopeOption, ScopePicker, ScopePickerProps, ScopeProvider, ScopeProviderProps, SearchInput, SelectBlockMessage, type SelectFieldAdminMeta, SetupForm, SetupFormValues, SetupPage, SetupPageProps, SetupStatus, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, StandalonePreviewField, StatsWidgetConfig, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableWidgetConfig, type TextFieldAdminMeta, type TextareaFieldAdminMeta, type TimeFieldAdminMeta, TimelineWidgetConfig, TipTapDoc, TipTapNode, Tooltip, TooltipContent, TooltipTrigger, TypedHooks, type UploadFieldAdminMeta, UseCollectionPreviewOptions, UseCollectionPreviewResult, UseFieldOptionsOptions, UseFieldOptionsResult, UseReactiveFieldsOptions, UseReactiveFieldsResult, ValueWidgetConfig, ViewDefinition, ViewKind, WidgetComponentProps, WidgetConfig, WidgetDefinition, WidgetTypeRegistry, buildValidationSchema, buildZodFromIntrospection, cn, configureField, createAdminAuthClient, createAdminClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFileIcon, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, page, parsePreviewFieldPath, resolveIconElement, sanitizeFilename, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, toast, useAdminStore, useAuthClient, useBlockScope, useBrand, useBrandSnapshotRef, useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionPreview, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions, useCurrentUser, useFieldOptions, useFocus, useFocusOptional, useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions, useIsBlockFocused, useIsDesktop, useIsFieldFocused, useIsMobile, useMediaQuery, usePreviewContext, useReactiveFields, useResolveFieldPath, useResolveText, useScope, useScopeSafe, useScopedFetch, useSearchParamToggle, useServerWidgetData, useSetupStatus, useShallow, useSidebarSearchParam, useUpload, view, widget };
package/dist/index.mjs CHANGED
@@ -1,14 +1,23 @@
1
1
  import { view } from "./client/builder/view/view.mjs";
2
2
  import { Admin } from "./client/builder/admin.mjs";
3
+ import { useResolveText } from "./client/i18n/hooks.mjs";
4
+ import { cn } from "./client/lib/utils.mjs";
3
5
  import { AdminProvider, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore } from "./client/runtime/provider.mjs";
4
6
  import { useShallow } from "./client/runtime/index.mjs";
5
7
  import { Badge, ComponentRenderer, IconifyIcon, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
6
8
  import { configureField, field } from "./client/builder/field/field.mjs";
9
+ import { Button } from "./client/components/ui/button.mjs";
7
10
  import { getCountryCode, getFlagConfig, getFlagUrl } from "./client/utils/locale-to-flag.mjs";
11
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger } from "./client/components/ui/dropdown-menu.mjs";
12
+ import { Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle } from "./client/components/ui/sheet.mjs";
13
+ import { sanitizeFilename } from "./client/components/fields/field-utils.mjs";
8
14
  import { EMPTY_BLOCK_CONTENT, isBlockContent } from "./client/blocks/types.mjs";
15
+ import { Tooltip, TooltipContent, TooltipTrigger } from "./client/components/ui/tooltip.mjs";
16
+ import { getFileIcon } from "./client/views/collection/cells/shared/asset-thumbnail.mjs";
9
17
  import { FocusProvider, parsePreviewFieldPath, scrollFieldIntoView, useFocus, useFocusOptional, useIsBlockFocused, useIsFieldFocused } from "./client/contexts/focus-context.mjs";
10
18
  import { useIsDesktop, useIsMobile, useMediaQuery } from "./client/hooks/use-media-query.mjs";
11
19
  import { buildValidationSchema, buildZodFromIntrospection, createFormSchema } from "./client/builder/validation.mjs";
20
+ import { useReactiveFields } from "./client/hooks/use-reactive-fields.mjs";
12
21
  import { isAdminToPreviewMessage, isPreviewToAdminMessage } from "./client/preview/types.mjs";
13
22
  import { useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions } from "./client/hooks/use-global.mjs";
14
23
  import { useSearchParamToggle } from "./client/hooks/use-search-param-toggle.mjs";
@@ -16,8 +25,11 @@ import { useSidebarSearchParam } from "./client/hooks/use-sidebar-search-param.m
16
25
  import { useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions } from "./client/hooks/use-collection.mjs";
17
26
  import { createAdminAuthClient, useAuthClient } from "./client/hooks/use-auth.mjs";
18
27
  import { useCurrentUser } from "./client/hooks/use-current-user.mjs";
19
- import { useReactiveFields } from "./client/hooks/use-reactive-fields.mjs";
28
+ import { AdminViewHeader, AdminViewLayout } from "./client/views/layout/admin-view-layout.mjs";
29
+ import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./client/components/ui/table.mjs";
20
30
  import { AdminLink } from "./client/components/admin-link.mjs";
31
+ import { useUpload } from "./client/hooks/use-upload.mjs";
32
+ import { Dropzone } from "./client/components/primitives/dropzone.mjs";
21
33
  import { page } from "./client/builder/page/page.mjs";
22
34
  import { widget } from "./client/builder/widget/widget.mjs";
23
35
  import { createAdminClient } from "./client/create-admin-client.mjs";
@@ -27,6 +39,8 @@ import { AdminLayout } from "./client/views/layout/admin-layout.mjs";
27
39
  import { AuthLoading } from "./client/components/auth/auth-loading.mjs";
28
40
  import { AuthGuard } from "./client/components/auth/auth-guard.mjs";
29
41
  import { AdminLayoutProvider } from "./client/views/layout/admin-layout-provider.mjs";
42
+ import DocumentView from "./client/views/collection/document-view.mjs";
43
+ import { SearchInput } from "./client/components/ui/search-input.mjs";
30
44
  import { AdminRouter } from "./client/views/layout/admin-router.mjs";
31
45
  import { BlockScopeProvider, useBlockScope, useResolveFieldPath } from "./client/preview/block-scope-context.mjs";
32
46
  import { BlockRenderer } from "./client/blocks/block-renderer.mjs";
@@ -54,5 +68,6 @@ import { useFieldOptions } from "./client/hooks/use-field-options.mjs";
54
68
  import { useServerWidgetData } from "./client/hooks/use-server-widget-data.mjs";
55
69
  import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
56
70
  import { ScopePicker } from "./client/scope/picker.mjs";
71
+ import { toast } from "./client.mjs";
57
72
 
58
- export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminRouter, AuthDefaultLogo, AuthGuard, AuthLayout, AuthLoading, Badge, BlockRenderer, BlockScopeProvider, BrandLogoMark, ComponentRenderer, DashboardPage, EMPTY_BLOCK_CONTENT, FocusProvider, ForgotPasswordForm, ForgotPasswordPage, IconifyIcon, InvitePage, LoginForm, LoginPage, PreviewBanner, PreviewField, PreviewProvider, ResetPasswordForm, ResetPasswordPage, RichTextEditor, RichTextRenderer, ScopePicker, ScopeProvider, SetupForm, SetupPage, StandalonePreviewField, buildValidationSchema, buildZodFromIntrospection, configureField, createAdminAuthClient, createAdminClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, page, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, useBrand, useBrandSnapshotRef, useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionPreview, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions, useCurrentUser, useFieldOptions, useFocus, useFocusOptional, useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions, useIsBlockFocused, useIsDesktop, useIsFieldFocused, useIsMobile, useMediaQuery, usePreviewContext, useReactiveFields, useResolveFieldPath, useScope, useScopeSafe, useScopedFetch, useSearchParamToggle, useServerWidgetData, useSetupStatus, useShallow, useSidebarSearchParam, view, widget };
73
+ export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminRouter, AdminViewHeader, AdminViewLayout, AuthDefaultLogo, AuthGuard, AuthLayout, AuthLoading, Badge, BlockRenderer, BlockScopeProvider, BrandLogoMark, Button, ComponentRenderer, DashboardPage, DocumentView, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, Dropzone, EMPTY_BLOCK_CONTENT, FocusProvider, ForgotPasswordForm, ForgotPasswordPage, IconifyIcon, InvitePage, LoginForm, LoginPage, PreviewBanner, PreviewField, PreviewProvider, ResetPasswordForm, ResetPasswordPage, RichTextEditor, RichTextRenderer, ScopePicker, ScopeProvider, SearchInput, SetupForm, SetupPage, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, StandalonePreviewField, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tooltip, TooltipContent, TooltipTrigger, buildValidationSchema, buildZodFromIntrospection, cn, configureField, createAdminAuthClient, createAdminClient, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFileIcon, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, page, parsePreviewFieldPath, resolveIconElement, sanitizeFilename, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, toast, useAdminStore, useAuthClient, useBlockScope, useBrand, useBrandSnapshotRef, useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionPreview, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions, useCurrentUser, useFieldOptions, useFocus, useFocusOptional, useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions, useIsBlockFocused, useIsDesktop, useIsFieldFocused, useIsMobile, useMediaQuery, usePreviewContext, useReactiveFields, useResolveFieldPath, useResolveText, useScope, useScopeSafe, useScopedFetch, useSearchParamToggle, useServerWidgetData, useSetupStatus, useShallow, useSidebarSearchParam, useUpload, view, widget };
@@ -1,10 +1,10 @@
1
+ import { FilterOperator, FilterRule, SortConfig, ViewConfiguration } from "../shared/types/saved-views.types.mjs";
1
2
  import { ExecuteActionRequest, ExecuteActionResponse, actionFunctions, executeAction, executeActionFn, getActionsConfig, getActionsConfigFn } from "../server/modules/admin/routes/execute-action.mjs";
2
3
  import { PreviewTokenPayload, createPreviewFunctions, createPreviewTokenVerifier, verifyPreviewTokenDirect } from "../server/modules/admin/routes/preview.mjs";
3
4
  import { batchReactive, fieldOptions, reactiveFunctions } from "../server/modules/admin/routes/reactive.mjs";
4
5
  import { createFirstAdmin, isSetupRequired, setupFunctions } from "../server/modules/admin/routes/setup.mjs";
5
6
  import { fetchWidgetData, widgetDataFunctions } from "../server/modules/admin/routes/widget-data.mjs";
6
7
  import { AdminCollections } from "../server/modules/admin/.generated/module.mjs";
7
- import { FilterOperator, FilterRule, SortConfig, ViewConfiguration } from "../shared/types/saved-views.types.mjs";
8
8
  import { savedViewsCollection } from "../server/modules/admin-preferences/collections/saved-views.mjs";
9
9
  import { AdminModule, adminModule, adminRoutes } from "../server/modules/admin/index.mjs";
10
10
  export { type AdminCollections, type AdminModule, type ExecuteActionRequest, type ExecuteActionResponse, type FilterOperator, type FilterRule, type PreviewTokenPayload, type SortConfig, type ViewConfiguration, actionFunctions, adminModule, adminRoutes, batchReactive, createFirstAdmin, createPreviewFunctions, createPreviewTokenVerifier, executeAction, executeActionFn, fetchWidgetData, fieldOptions, getActionsConfig, getActionsConfigFn, isSetupRequired, reactiveFunctions, savedViewsCollection, setupFunctions, verifyPreviewTokenDirect, widgetDataFunctions };
@@ -0,0 +1,2 @@
1
+ import { NextAuthMiddlewareOptions, createNextAuthMiddleware, getNextAdminSession } from "./nextjs.mjs";
2
+ import { BeforeLoadContext, TanStackAuthGuardOptions, createTanStackAuthGuard, createTanStackSessionLoader } from "./tanstack.mjs";
@@ -1,4 +1,5 @@
1
1
  import { AuthSession } from "../modules/admin/auth-helpers.mjs";
2
+ import "../auth-helpers.mjs";
2
3
  import { Questpie } from "questpie";
3
4
 
4
5
  //#region src/server/adapters/nextjs.d.ts
@@ -1,6 +1,7 @@
1
- import { ComponentReference } from "./common.mjs";
1
+ import { ComponentReference as ComponentReference$1 } from "./common.mjs";
2
2
  import { ComponentFactory } from "./views.mjs";
3
3
  import { I18nText } from "questpie/shared";
4
+ import { ZodType } from "zod";
4
5
 
5
6
  //#region src/server/augmentation/actions.d.ts
6
7
 
@@ -91,6 +92,11 @@ interface ServerActionContext<TData = Record<string, unknown>> {
91
92
  locale?: string;
92
93
  /** Translation function for admin messages */
93
94
  t: (key: string, params?: Record<string, unknown>) => string;
95
+ /**
96
+ * Workflows API — present when a workflows plugin is registered.
97
+ * Resolved from the app like route handler contexts.
98
+ */
99
+ workflows?: unknown;
94
100
  }
95
101
  /**
96
102
  * Action handler function type
@@ -146,7 +152,7 @@ interface ServerActionFormFieldDefinition {
146
152
  required?: boolean;
147
153
  };
148
154
  /** Generate Zod schema for validation */
149
- toZodSchema(): unknown;
155
+ toZodSchema(): ZodType;
150
156
  }
151
157
  /**
152
158
  * Server-side action form configuration
@@ -176,7 +182,7 @@ interface ServerActionDefinition<TData = Record<string, unknown>> {
176
182
  /** Action description */
177
183
  description?: I18nText;
178
184
  /** Icon reference */
179
- icon?: ComponentReference;
185
+ icon?: ComponentReference$1;
180
186
  /** Button variant */
181
187
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost";
182
188
  /** Where the action appears */
@@ -1,4 +1,4 @@
1
- import { ComponentReference } from "./common.mjs";
1
+ import { ComponentReference as ComponentReference$1 } from "./common.mjs";
2
2
  import { ComponentFactory } from "./views.mjs";
3
3
  import { I18nText } from "questpie/shared";
4
4
  import { AppContext } from "questpie";
@@ -39,7 +39,7 @@ interface ServerStatsWidget {
39
39
  /** Widget label */
40
40
  label?: I18nText;
41
41
  /** Icon reference */
42
- icon?: ComponentReference;
42
+ icon?: ComponentReference$1;
43
43
  /** Collection to count */
44
44
  collection: string;
45
45
  /** Filter to apply */
@@ -141,7 +141,7 @@ interface ServerQuickAction {
141
141
  /** Action label */
142
142
  label: I18nText;
143
143
  /** Action icon */
144
- icon?: ComponentReference;
144
+ icon?: ComponentReference$1;
145
145
  /** Visual variant */
146
146
  variant?: "default" | "primary" | "secondary" | "outline";
147
147
  /** Action to perform */
@@ -189,7 +189,7 @@ interface ServerValueWidget {
189
189
  /** Widget label */
190
190
  label?: I18nText;
191
191
  /** Icon reference */
192
- icon?: ComponentReference;
192
+ icon?: ComponentReference$1;
193
193
  /** Card visual variant */
194
194
  cardVariant?: "default" | "compact" | "featured";
195
195
  /** Grid span (1-4) */
@@ -205,10 +205,10 @@ interface ServerValueWidget {
205
205
  label?: I18nText | string;
206
206
  subtitle?: I18nText | string;
207
207
  footer?: I18nText | string;
208
- icon?: ComponentReference;
208
+ icon?: ComponentReference$1;
209
209
  trend?: {
210
210
  value: string;
211
- icon?: ComponentReference;
211
+ icon?: ComponentReference$1;
212
212
  };
213
213
  classNames?: Record<string, string>;
214
214
  }>;
@@ -275,7 +275,7 @@ interface ServerTimelineWidget {
275
275
  title: string;
276
276
  description?: string;
277
277
  timestamp: Date | string;
278
- icon?: ComponentReference;
278
+ icon?: ComponentReference$1;
279
279
  variant?: "default" | "success" | "warning" | "error" | "info";
280
280
  href?: string;
281
281
  }>>;
@@ -321,7 +321,7 @@ interface ServerDashboardSection {
321
321
  /** Section description */
322
322
  description?: I18nText;
323
323
  /** Section icon */
324
- icon?: ComponentReference;
324
+ icon?: ComponentReference$1;
325
325
  /** Layout mode */
326
326
  layout?: "grid" | "stack";
327
327
  /** Grid columns */
@@ -362,7 +362,7 @@ interface ServerDashboardTab {
362
362
  /** Tab label */
363
363
  label: I18nText;
364
364
  /** Tab icon */
365
- icon?: ComponentReference;
365
+ icon?: ComponentReference$1;
366
366
  /** Tab items */
367
367
  items: ServerDashboardItem[];
368
368
  /** Grid columns for this tab */
@@ -387,7 +387,7 @@ interface ServerDashboardAction {
387
387
  /** Action label */
388
388
  label: I18nText;
389
389
  /** Action icon */
390
- icon?: ComponentReference;
390
+ icon?: ComponentReference$1;
391
391
  /** Action URL */
392
392
  href: string;
393
393
  /** Visual variant */
@@ -427,7 +427,7 @@ type BrandLogo = string | {
427
427
  alt?: string;
428
428
  width?: number;
429
429
  height?: number;
430
- } | ComponentReference;
430
+ } | ComponentReference$1;
431
431
  /**
432
432
  * Branding configuration for the admin panel. Covers content only — name,
433
433
  * logo, tagline, favicon. Visual tokens (colors, fonts, radius, shadows)
@@ -1,4 +1,5 @@
1
- import { ActionReference, ComponentReference } from "./common.mjs";
1
+ import { ActionReference, ComponentReference as ComponentReference$1 } from "./common.mjs";
2
+ import { FilterRule, QuickFilterConfig } from "../../shared/types/saved-views.types.mjs";
2
3
  import { I18nText } from "questpie/shared";
3
4
 
4
5
  //#region src/server/augmentation/form-layout.d.ts
@@ -13,7 +14,7 @@ interface AdminCollectionConfig {
13
14
  /** Description shown in tooltips/help text */
14
15
  description?: I18nText;
15
16
  /** Icon reference (resolved by client's icon component) */
16
- icon?: ComponentReference;
17
+ icon?: ComponentReference$1;
17
18
  /** Hide from admin sidebar */
18
19
  hidden?: boolean;
19
20
  /** Group in sidebar */
@@ -37,7 +38,7 @@ interface BlockCategoryConfig {
37
38
  /** Display label for the category */
38
39
  label: I18nText;
39
40
  /** Icon for the category */
40
- icon?: ComponentReference;
41
+ icon?: ComponentReference$1;
41
42
  /** Order in block picker (lower = first) */
42
43
  order?: number;
43
44
  }
@@ -64,7 +65,7 @@ interface AdminBlockConfig {
64
65
  /** Description shown in tooltips/help text */
65
66
  description?: I18nText;
66
67
  /** Icon reference (resolved by client's icon component) */
67
- icon?: ComponentReference;
68
+ icon?: ComponentReference$1;
68
69
  /** Category for grouping in block picker */
69
70
  category?: BlockCategoryConfig;
70
71
  /** Order within category in block picker (lower = first) */
@@ -137,6 +138,10 @@ interface ListViewConfig {
137
138
  field: string;
138
139
  direction: "asc" | "desc";
139
140
  };
141
+ /** Initial filters used when the user has no saved view state */
142
+ defaultFilters?: FilterRule[];
143
+ /** Header-level quick filter presets */
144
+ quickFilters?: QuickFilterConfig[];
140
145
  /**
141
146
  * Enables reorder mode for this list.
142
147
  * Requires a numeric field named `order` on the collection.
@@ -151,6 +156,11 @@ interface ListViewConfig {
151
156
  searchable?: string[];
152
157
  /** Filterable fields */
153
158
  filterable?: string[];
159
+ /**
160
+ * Enable realtime invalidation for list queries.
161
+ * Falls back to AdminProvider realtime config when undefined.
162
+ */
163
+ realtime?: boolean;
154
164
  /** Client-side grouping options for the current fetched page */
155
165
  grouping?: {
156
166
  /** Fields users can group by */
@@ -250,7 +260,7 @@ interface FormTabConfig {
250
260
  /** Tab label */
251
261
  label: I18nText;
252
262
  /** Tab icon */
253
- icon?: ComponentReference;
263
+ icon?: ComponentReference$1;
254
264
  /** Fields in this tab */
255
265
  fields: FieldLayoutItem[];
256
266
  /** Conditional visibility */
@@ -416,7 +426,7 @@ interface AdminGlobalConfig {
416
426
  /** Description */
417
427
  description?: I18nText;
418
428
  /** Icon reference */
419
- icon?: ComponentReference;
429
+ icon?: ComponentReference$1;
420
430
  /** Hide from admin */
421
431
  hidden?: boolean;
422
432
  /** Group in sidebar */
@@ -5,6 +5,7 @@ import { BrandLogo, DashboardActionFactory, DashboardActionProxy, DashboardCallb
5
5
  import { ServerSidebarCollectionItem, ServerSidebarConfig, ServerSidebarDividerItem, ServerSidebarGlobalItem, ServerSidebarItem, ServerSidebarLinkItem, ServerSidebarPageItem, ServerSidebarSection, SidebarCallback, SidebarCallbackContext, SidebarConfigContext, SidebarContribution, SidebarItemDef, SidebarProxy, SidebarSectionDef } from "./sidebar.mjs";
6
6
  import { AdminShellRailPlacement, AdminShellRouteRules, ServerAdminShellConfig, ServerAdminShellRailConfig } from "./shell.mjs";
7
7
  import { ActionsConfigContext, BuiltinActionType, ServerActionContext, ServerActionDefinition, ServerActionDownload, ServerActionEffects, ServerActionError, ServerActionForm, ServerActionFormField, ServerActionFormFieldConfig, ServerActionFormFieldDefinition, ServerActionHandler, ServerActionRedirect, ServerActionResult, ServerActionSuccess, ServerActionsConfig } from "./actions.mjs";
8
+ import { AdminSidebarMode } from "questpie";
8
9
 
9
10
  //#region src/server/augmentation/index.d.ts
10
11
 
@@ -27,6 +28,12 @@ import { ActionsConfigContext, BuiltinActionType, ServerActionContext, ServerAct
27
28
  * ```
28
29
  */
29
30
  interface AdminConfigInput {
31
+ /**
32
+ * How module `sidebar` contributions combine with the app config.
33
+ * `append` (default): merge module items into the app sidebar.
34
+ * `replace`: keep only this file's `sidebar` (no module nav injection).
35
+ */
36
+ sidebarMode?: AdminSidebarMode;
30
37
  sidebar?: SidebarContribution;
31
38
  dashboard?: DashboardContribution | ServerDashboardConfig;
32
39
  shell?: ServerAdminShellConfig;
@@ -1,4 +1,4 @@
1
- import { ComponentReference } from "./common.mjs";
1
+ import { ComponentReference as ComponentReference$1 } from "./common.mjs";
2
2
  import { ComponentFactory } from "./views.mjs";
3
3
  import { I18nText } from "questpie/shared";
4
4
 
@@ -18,7 +18,7 @@ interface ServerSidebarCollectionItem {
18
18
  /** Override display label */
19
19
  label?: I18nText;
20
20
  /** Override icon */
21
- icon?: ComponentReference;
21
+ icon?: ComponentReference$1;
22
22
  }
23
23
  /**
24
24
  * Global item in sidebar
@@ -30,7 +30,7 @@ interface ServerSidebarGlobalItem {
30
30
  /** Override display label */
31
31
  label?: I18nText;
32
32
  /** Override icon */
33
- icon?: ComponentReference;
33
+ icon?: ComponentReference$1;
34
34
  }
35
35
  /**
36
36
  * Custom page item in sidebar
@@ -42,7 +42,7 @@ interface ServerSidebarPageItem {
42
42
  /** Display label */
43
43
  label?: I18nText;
44
44
  /** Icon */
45
- icon?: ComponentReference;
45
+ icon?: ComponentReference$1;
46
46
  }
47
47
  /**
48
48
  * External link item in sidebar
@@ -54,7 +54,7 @@ interface ServerSidebarLinkItem {
54
54
  /** Link URL */
55
55
  href: string;
56
56
  /** Icon */
57
- icon?: ComponentReference;
57
+ icon?: ComponentReference$1;
58
58
  /** Open in new tab */
59
59
  external?: boolean;
60
60
  }
@@ -73,7 +73,7 @@ interface ServerSidebarSection {
73
73
  /** Section title */
74
74
  title?: I18nText;
75
75
  /** Section icon */
76
- icon?: ComponentReference;
76
+ icon?: ComponentReference$1;
77
77
  /** Whether this section can be collapsed/expanded by the user */
78
78
  collapsible?: boolean;
79
79
  /** Section items */
@@ -108,7 +108,7 @@ interface SidebarSectionDef {
108
108
  /** Section title. */
109
109
  title?: I18nText;
110
110
  /** Section icon. */
111
- icon?: ComponentReference;
111
+ icon?: ComponentReference$1;
112
112
  /** Whether section is collapsible. */
113
113
  collapsible?: boolean;
114
114
  }
@@ -134,7 +134,7 @@ interface SidebarItemDef extends Omit<ServerSidebarItem, "type"> {
134
134
  /** URL (for links). */
135
135
  href?: string;
136
136
  /** Icon reference. */
137
- icon?: ComponentReference;
137
+ icon?: ComponentReference$1;
138
138
  /** Open in new tab (for links). */
139
139
  external?: boolean;
140
140
  }
@@ -31,6 +31,7 @@ import { FormViewConfig, ListViewConfig } from "./form-layout.mjs";
31
31
  interface ViewKindRegistry {
32
32
  list: {};
33
33
  form: {};
34
+ document: {};
34
35
  }
35
36
  /**
36
37
  * Union of all registered view kind names.
@@ -191,7 +192,7 @@ type EditViewFactory<TEditViews extends Record<string, any> | string = string> =
191
192
  * `TListViews` can be either a views record (per-view typed config)
192
193
  * or a string union (backward-compatible, all views use `ListViewConfig`).
193
194
  */
194
- interface ListViewConfigContext<TFields extends Record<string, any> = Record<string, any>, TListViews extends Record<string, any> | string = string> {
195
+ interface ListViewConfigContext<TFields extends Record<string, any> = Record<string, any>, TListViews extends Record<string, any> | string = string, TComponents extends Record<string, any> | string = string> {
195
196
  /** View factory — per-view typed config extracted from ViewDefinition */
196
197
  v: ListViewFactory<TListViews>;
197
198
  /** Field reference proxy - returns field names as strings */
@@ -211,6 +212,8 @@ interface ListViewConfigContext<TFields extends Record<string, any> = Record<str
211
212
  config?: unknown;
212
213
  };
213
214
  };
215
+ /** Component factory — produces ComponentReference objects */
216
+ c: ComponentFactory<TComponents>;
214
217
  }
215
218
  /**
216
219
  * Context for form view config functions.
@@ -0,0 +1 @@
1
+ import { AuthSession, GetAdminSessionOptions, RequireAdminAuthOptions, getAdminSession, isAdminUser, requireAdminAuth } from "./modules/admin/auth-helpers.mjs";
@@ -61,11 +61,12 @@ function generateAdminClientTemplate(ctx) {
61
61
  lines.push("");
62
62
  if (modulesFile) {
63
63
  lines.push(importStatement(modulesFile));
64
- lines.push(`const _mergedModules = Array.isArray(${modulesFile.varName})`);
65
- lines.push(`\t? ${modulesFile.varName}.reduce((acc: any, m: any) => {`);
66
- lines.push(" for (const [k, v] of Object.entries(m)) acc[k] = typeof v === \"object\" && v !== null && !Array.isArray(v) ? { ...acc[k], ...v } : v;");
64
+ lines.push("type _AdminModuleMergeAcc = Record<string, unknown>;");
65
+ lines.push(`const _mergedModules = (Array.isArray(${modulesFile.varName})`);
66
+ lines.push(`\t? ${modulesFile.varName}.reduce<_AdminModuleMergeAcc>((acc, mod) => {`);
67
+ lines.push(" for (const [k, v] of Object.entries(mod)) acc[k] = typeof v === \"object\" && v !== null && !Array.isArray(v) ? { ...(typeof acc[k] === \"object\" && acc[k] !== null && !Array.isArray(acc[k]) ? acc[k] as Record<string, unknown> : {}), ...(v as Record<string, unknown>) } : v;");
67
68
  lines.push(" return acc;");
68
- lines.push(`\t}, {} as any) : ${modulesFile.varName};`);
69
+ lines.push(`\t}, {}) : ${modulesFile.varName}) as _AdminModuleMergeAcc;`);
69
70
  }
70
71
  const categoryFiles = /* @__PURE__ */ new Map();
71
72
  for (const [cat, fileMap] of ctx.discovered.categories) if (fileMap.size > 0) {
@@ -95,8 +96,8 @@ function generateAdminClientTemplate(ctx) {
95
96
  const catDecl = ctx.target.categories?.[cat];
96
97
  if (modulesFile && files && files.length > 0) {
97
98
  const entries = files.map((f) => categoryRecordEntry(f, catDecl)).join(", ");
98
- lines.push(`\t${cat}: { ..._mergedModules.${cat}, ${entries} },`);
99
- } else if (modulesFile && (!files || files.length === 0)) lines.push(`\t${cat}: { ..._mergedModules.${cat} },`);
99
+ lines.push(`\t${cat}: { ...(_mergedModules[${JSON.stringify(cat)}] as Record<string, unknown>), ${entries} },`);
100
+ } else if (modulesFile && (!files || files.length === 0)) lines.push(`\t${cat}: { ...(_mergedModules[${JSON.stringify(cat)}] as Record<string, unknown>) },`);
100
101
  else if (files && files.length > 0) {
101
102
  const entries = files.map((f) => categoryRecordEntry(f, catDecl)).join(", ");
102
103
  lines.push(`\t${cat}: { ${entries} },`);
@@ -125,13 +125,16 @@ function createBlocksState() {
125
125
  const doc = value;
126
126
  if (!doc._tree || !doc._values) return value;
127
127
  try {
128
- const { app, db, locale } = getContext();
128
+ const { app, db, locale, session, accessMode, stage } = getContext();
129
129
  const blockDefs = app.state?.blocks;
130
130
  if (!blockDefs || Object.keys(blockDefs).length === 0) return value;
131
131
  return await processBlocksDocument(doc, blockDefs, {
132
132
  app,
133
133
  db,
134
+ session,
134
135
  locale,
136
+ accessMode,
137
+ stage,
135
138
  collections: app.collections,
136
139
  globals: app.globals
137
140
  });
@@ -1,5 +1,5 @@
1
1
  import { BlockNode, BlockValues, BlocksDocument, BlocksFieldMeta, BlocksFieldState, blocks, blocksFieldType } from "./blocks.mjs";
2
- import { RichTextFeature, RichTextFieldMeta, RichTextFieldState, TipTapDocument, TipTapNode, richText, richTextFieldType } from "./rich-text.mjs";
2
+ import { RichTextFeature, RichTextFieldMeta, RichTextFieldState, RichTextMode, RichTextOptions, TipTapDocument, TipTapNode, richText, richTextFieldType } from "./rich-text.mjs";
3
3
 
4
4
  //#region src/server/fields/index.d.ts
5
5
 
@@ -0,0 +1,3 @@
1
+ import { serializeFormLayoutProps, serializeReactivePropsRecord } from "questpie";
2
+
3
+ export { serializeFormLayoutProps, serializeReactivePropsRecord };
@@ -1,5 +1,5 @@
1
1
  import { DefaultFieldState, Field, FieldTypeDefinition } from "questpie";
2
- import { PgJsonbBuilder } from "questpie/drizzle-pg-core";
2
+ import { PgJsonbBuilder, PgTextBuilder } from "questpie/drizzle-pg-core";
3
3
 
4
4
  //#region src/server/fields/rich-text.d.ts
5
5
 
@@ -48,28 +48,27 @@ interface RichTextFieldMeta {
48
48
  * Available rich text editor features.
49
49
  */
50
50
  type RichTextFeature = "bold" | "italic" | "underline" | "strike" | "code" | "subscript" | "superscript" | "heading" | "bulletList" | "orderedList" | "taskList" | "blockquote" | "codeBlock" | "horizontalRule" | "link" | "image" | "table" | "textAlign" | "textColor" | "highlight" | "mention";
51
- /**
52
- * Rich text field factory.
53
- * Creates a TipTap-based rich text editor field.
54
- *
55
- * @example
56
- * ```ts
57
- * // In collection fields callback:
58
- * content: f.richText().required().localized()
59
- * ```
60
- */
61
- type RichTextFieldState = DefaultFieldState & {
51
+ type RichTextMode = "json" | "markdown";
52
+ type RichTextOptions = {
53
+ mode?: RichTextMode;
54
+ };
55
+ type RichTextData<TMode extends RichTextMode> = TMode extends "markdown" ? string : TipTapDocument;
56
+ type RichTextColumn<TMode extends RichTextMode> = TMode extends "markdown" ? PgTextBuilder : PgJsonbBuilder;
57
+ type RichTextFieldState<TMode extends RichTextMode = "json"> = DefaultFieldState & {
62
58
  type: "richText";
63
- data: TipTapDocument;
64
- column: PgJsonbBuilder;
59
+ data: RichTextData<TMode>;
60
+ column: RichTextColumn<TMode>;
65
61
  };
66
- declare function richText(): Field<RichTextFieldState>;
62
+ declare function richText(): Field<RichTextFieldState<"json">>;
63
+ declare function richText<const TMode extends RichTextMode>(options: {
64
+ mode: TMode;
65
+ }): Field<RichTextFieldState<TMode>>;
67
66
  /**
68
67
  * Rich text field type definition (v3 API).
69
68
  *
70
69
  * Use this with the `fieldType()` discovery system instead of the
71
70
  * legacy `richText()` factory function.
72
71
  */
73
- declare const richTextFieldType: FieldTypeDefinition<"richText", []>;
72
+ declare const richTextFieldType: FieldTypeDefinition<"richText", [RichTextOptions?]>;
74
73
  //#endregion
75
- export { RichTextFeature, RichTextFieldMeta, RichTextFieldState, TipTapDocument, TipTapNode, richText, richTextFieldType };
74
+ export { RichTextFeature, RichTextFieldMeta, RichTextFieldState, RichTextMode, RichTextOptions, TipTapDocument, TipTapNode, richText, richTextFieldType };