@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.
- package/README.md +8 -0
- package/dist/client/blocks/block-renderer.d.mts +2 -2
- package/dist/client/builder/index.d.mts +1 -1
- package/dist/client/builder/types/collection-types.d.mts +89 -5
- package/dist/client/builder/types/common.d.mts +5 -0
- package/dist/client/builder/types/field-types.d.mts +41 -1
- package/dist/client/builder/view/view.d.mts +3 -2
- package/dist/client/components/actions/action-dialog.mjs +5 -0
- package/dist/client/components/admin-link.d.mts +2 -2
- package/dist/client/components/fields/boolean-field.mjs +2 -1
- package/dist/client/components/fields/date-field.mjs +2 -1
- package/dist/client/components/fields/datetime-field.mjs +2 -1
- package/dist/client/components/fields/email-field.mjs +2 -1
- package/dist/client/components/fields/field-utils.d.mts +11 -0
- package/dist/client/components/fields/field-utils.mjs +3 -1
- package/dist/client/components/fields/field-wrapper.mjs +3 -3
- package/dist/client/components/fields/number-field.mjs +2 -1
- package/dist/client/components/fields/object-field.mjs +2 -1
- package/dist/client/components/fields/relation/displays/types.mjs +3 -3
- package/dist/client/components/fields/rich-text-editor/bubble-menu.mjs +7 -0
- package/dist/client/components/fields/rich-text-editor/extensions.mjs +19 -2
- package/dist/client/components/fields/rich-text-editor/image-popover.mjs +6 -2
- package/dist/client/components/fields/rich-text-editor/image-upload.mjs +2 -1
- package/dist/client/components/fields/rich-text-editor/index.d.mts +5 -3
- package/dist/client/components/fields/rich-text-editor/index.mjs +38 -76
- package/dist/client/components/fields/rich-text-editor/slash-commands.mjs +30 -7
- package/dist/client/components/fields/rich-text-editor/toolbar.mjs +1 -312
- package/dist/client/components/fields/rich-text-editor/types.d.mts +4 -0
- package/dist/client/components/fields/rich-text-editor/types.mjs +1 -1
- package/dist/client/components/fields/rich-text-editor/utils.mjs +6 -12
- package/dist/client/components/fields/select-field.mjs +2 -1
- package/dist/client/components/fields/text-field.mjs +2 -1
- package/dist/client/components/fields/textarea-field.mjs +2 -1
- package/dist/client/components/fields/time-field.mjs +2 -1
- package/dist/client/components/filter-builder/filter-builder-sheet.mjs +75 -22
- package/dist/client/components/layout/field-layout-renderer.mjs +4 -4
- package/dist/client/components/media/media-grid.mjs +2 -1
- package/dist/client/components/primitives/asset-preview.mjs +4 -2
- package/dist/client/components/primitives/dropzone.d.mts +100 -0
- package/dist/client/components/primitives/field-select-control.mjs +2 -1
- package/dist/client/components/ui/button.d.mts +23 -0
- package/dist/client/components/ui/button.mjs +2 -2
- package/dist/client/components/ui/dropdown-menu.d.mts +49 -0
- package/dist/client/components/ui/dropdown-menu.mjs +7 -19
- package/dist/client/components/ui/popover.mjs +1 -1
- package/dist/client/components/ui/search-input.d.mts +56 -0
- package/dist/client/components/ui/select.mjs +2 -2
- package/dist/client/components/ui/sheet.d.mts +40 -0
- package/dist/client/components/ui/table.d.mts +49 -0
- package/dist/client/components/ui/table.mjs +15 -1
- package/dist/client/components/ui/tooltip.d.mts +21 -0
- package/dist/client/contexts/focus-context.d.mts +2 -2
- package/dist/client/hooks/query-access.d.mts +9 -0
- package/dist/client/hooks/query-access.mjs +20 -0
- package/dist/client/hooks/typed-hooks.d.mts +4 -2
- package/dist/client/hooks/typed-hooks.mjs +30 -29
- package/dist/client/hooks/use-admin-config.mjs +20 -1
- package/dist/client/hooks/use-autosave.mjs +91 -0
- package/dist/client/hooks/use-collection.mjs +65 -23
- package/dist/client/hooks/use-reactive-fields.d.mts +1 -0
- package/dist/client/hooks/use-reactive-fields.mjs +16 -1
- package/dist/client/hooks/use-server-actions.mjs +12 -1
- package/dist/client/hooks/use-upload.d.mts +40 -0
- package/dist/client/hooks/use-upload.mjs +4 -2
- package/dist/client/hooks/use-view-state.mjs +15 -7
- package/dist/client/i18n/hooks.d.mts +20 -0
- package/dist/client/lib/utils.d.mts +6 -0
- package/dist/client/lib/view-filter-utils.mjs +30 -0
- package/dist/client/preview/block-scope-context.d.mts +2 -2
- package/dist/client/preview/preview-banner.d.mts +2 -2
- package/dist/client/preview/preview-field.d.mts +4 -4
- package/dist/client/runtime/provider.mjs +22 -3
- package/dist/client/scope/picker.d.mts +2 -2
- package/dist/client/scope/provider.d.mts +2 -2
- package/dist/client/styles/base.css +75 -79
- package/dist/client/utils/asset-url.mjs +27 -0
- package/dist/client/utils/build-field-definitions-from-schema.mjs +1 -0
- package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
- package/dist/client/views/auth/auth-layout.d.mts +3 -3
- package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
- package/dist/client/views/auth/login-form.d.mts +2 -2
- package/dist/client/views/auth/reset-password-form.d.mts +2 -2
- package/dist/client/views/auth/setup-form.d.mts +2 -2
- package/dist/client/views/collection/auto-form-fields.mjs +7 -6
- package/dist/client/views/collection/cells/primitive-cells.mjs +9 -6
- package/dist/client/views/collection/cells/shared/asset-thumbnail.d.mts +7 -0
- package/dist/client/views/collection/cells/shared/asset-thumbnail.mjs +3 -2
- package/dist/client/views/collection/cells/shared/cell-helpers.mjs +3 -2
- package/dist/client/views/collection/cells/upload-cells.mjs +2 -1
- package/dist/client/views/collection/columns/build-columns.mjs +3 -1
- package/dist/client/views/collection/document-view.d.mts +30 -0
- package/dist/client/views/collection/document-view.mjs +377 -0
- package/dist/client/views/collection/field-context.mjs +3 -2
- package/dist/client/views/collection/field-renderer.mjs +13 -5
- package/dist/client/views/collection/form-view.mjs +221 -282
- package/dist/client/views/collection/list-view.mjs +592 -190
- package/dist/client/views/collection/outline.mjs +44 -19
- package/dist/client/views/collection/quick-filter-bar.mjs +45 -0
- package/dist/client/views/collection/table-view.mjs +61 -17
- package/dist/client/views/globals/global-form-view.mjs +12 -9
- package/dist/client/views/layout/admin-layout-provider.mjs +4 -3
- package/dist/client/views/layout/admin-layout.mjs +108 -21
- package/dist/client/views/layout/admin-router.mjs +19 -3
- package/dist/client/views/layout/admin-sidebar.mjs +70 -20
- package/dist/client/views/layout/admin-theme.mjs +5 -4
- package/dist/client/views/layout/admin-view-layout.d.mts +36 -0
- package/dist/client/views/pages/accept-invite-page.d.mts +2 -2
- package/dist/client/views/pages/dashboard-page.d.mts +2 -2
- package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
- package/dist/client/views/pages/invite-page.d.mts +2 -2
- package/dist/client/views/pages/login-page.d.mts +2 -2
- package/dist/client/views/pages/reset-password-page.d.mts +2 -2
- package/dist/client/views/pages/setup-page.d.mts +2 -2
- package/dist/client.d.mts +17 -2
- package/dist/client.mjs +17 -2
- package/dist/components/rich-text/rich-text-renderer.d.mts +5 -5
- package/dist/components/rich-text/rich-text-renderer.mjs +5 -2
- package/dist/factories.d.mts +4 -2
- package/dist/factories.mjs +2 -2
- package/dist/index.d.mts +17 -3
- package/dist/index.mjs +17 -2
- package/dist/modules/admin.d.mts +1 -1
- package/dist/server/adapters/index.d.mts +2 -0
- package/dist/server/adapters/nextjs.d.mts +1 -0
- package/dist/server/augmentation/actions.d.mts +9 -3
- package/dist/server/augmentation/dashboard.d.mts +11 -11
- package/dist/server/augmentation/form-layout.d.mts +16 -6
- package/dist/server/augmentation/index.d.mts +7 -0
- package/dist/server/augmentation/sidebar.d.mts +8 -8
- package/dist/server/augmentation/views.d.mts +4 -1
- package/dist/server/auth-helpers.d.mts +1 -0
- package/dist/server/codegen/admin-client-template.mjs +7 -6
- package/dist/server/fields/blocks.mjs +4 -1
- package/dist/server/fields/index.d.mts +1 -1
- package/dist/server/fields/reactive-runtime.mjs +3 -0
- package/dist/server/fields/rich-text.d.mts +16 -17
- package/dist/server/fields/rich-text.mjs +18 -7
- package/dist/server/i18n/messages/cs.mjs +2 -0
- package/dist/server/i18n/messages/de.mjs +2 -0
- package/dist/server/i18n/messages/en.mjs +4 -0
- package/dist/server/i18n/messages/es.mjs +2 -0
- package/dist/server/i18n/messages/fr.mjs +2 -0
- package/dist/server/i18n/messages/pl.mjs +2 -0
- package/dist/server/i18n/messages/pt.mjs +2 -0
- package/dist/server/i18n/messages/sk.mjs +2 -0
- package/dist/server/modules/admin/.generated/module.d.mts +1 -1
- package/dist/server/modules/admin/auth-helpers.mjs +7 -1
- package/dist/server/modules/admin/block/block-builder.d.mts +0 -8
- package/dist/server/modules/admin/block/introspection.d.mts +2 -2
- package/dist/server/modules/admin/block/introspection.mjs +28 -4
- package/dist/server/modules/admin/block/prefetch.d.mts +11 -0
- package/dist/server/modules/admin/block/prefetch.mjs +108 -27
- package/dist/server/modules/admin/client/.generated/module.d.mts +68 -67
- package/dist/server/modules/admin/client/.generated/module.mjs +2 -0
- package/dist/server/modules/admin/client/views/collection-document.d.mts +6 -0
- package/dist/server/modules/admin/client/views/collection-document.mjs +10 -0
- package/dist/server/modules/admin/collections/account.d.mts +53 -52
- package/dist/server/modules/admin/collections/admin-locks.d.mts +57 -56
- package/dist/server/modules/admin/collections/admin-preferences.d.mts +38 -37
- package/dist/server/modules/admin/collections/admin-saved-views.d.mts +50 -49
- package/dist/server/modules/admin/collections/apikey.d.mts +76 -67
- package/dist/server/modules/admin/collections/assets.d.mts +37 -36
- package/dist/server/modules/admin/collections/session.d.mts +42 -41
- package/dist/server/modules/admin/collections/user.d.mts +57 -56
- package/dist/server/modules/admin/collections/verification.d.mts +34 -33
- package/dist/server/modules/admin/dto/admin-config.dto.mjs +34 -4
- package/dist/server/modules/admin/factories.mjs +4 -34
- package/dist/server/modules/admin/index.d.mts +3 -3
- package/dist/server/modules/admin/routes/admin-config.d.mts +4 -2
- package/dist/server/modules/admin/routes/admin-config.mjs +56 -24
- package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
- package/dist/server/modules/admin/routes/execute-action.mjs +35 -9
- package/dist/server/modules/admin/routes/locales.mjs +1 -1
- package/dist/server/modules/admin/routes/preview.d.mts +11 -11
- package/dist/server/modules/admin/routes/preview.mjs +6 -5
- package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
- package/dist/server/modules/admin/routes/reactive.mjs +2 -2
- package/dist/server/modules/admin/routes/route-helpers.d.mts +11 -7
- package/dist/server/modules/admin/routes/route-helpers.mjs +1 -1
- package/dist/server/modules/admin/routes/setup.d.mts +7 -7
- package/dist/server/modules/admin/routes/translations.d.mts +4 -4
- package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
- package/dist/server/modules/admin/routes/widget-data.mjs +12 -4
- package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +45 -45
- package/dist/server/modules/audit/.generated/module.d.mts +6 -6
- package/dist/server/modules/audit/collections/audit-log.d.mts +81 -80
- package/dist/server/modules/audit/jobs/audit-cleanup.d.mts +2 -2
- package/dist/server/plugin.mjs +10 -5
- package/dist/server/proxy-factories.d.mts +8 -1
- package/dist/server/proxy-factories.mjs +33 -1
- package/dist/server.d.mts +3 -1
- package/dist/shared/types/index.d.mts +1 -0
- package/dist/shared/types/saved-views.types.d.mts +14 -7
- package/dist/shared.d.mts +3 -2
- package/package.json +5 -4
|
@@ -112,6 +112,10 @@ function matchRoute(segments, _collections = {}, globals = {}, pages = {}) {
|
|
|
112
112
|
}
|
|
113
113
|
return { type: "not-found" };
|
|
114
114
|
}
|
|
115
|
+
function isAuthRoute(segments) {
|
|
116
|
+
const [first] = segments;
|
|
117
|
+
return first ? AUTH_ROUTE_SEGMENTS.has(first) : false;
|
|
118
|
+
}
|
|
115
119
|
function formatDocumentTitle(pageTitle, appTitle) {
|
|
116
120
|
const title = pageTitle.trim();
|
|
117
121
|
const app = appTitle.trim() || "Admin";
|
|
@@ -478,7 +482,7 @@ function LazyPageRenderer({ config }) {
|
|
|
478
482
|
error: null
|
|
479
483
|
});
|
|
480
484
|
if (typeof component === "function") {
|
|
481
|
-
const result = component();
|
|
485
|
+
const result = component.constructor?.name === "AsyncFunction" ? component() : null;
|
|
482
486
|
let isThenable = false;
|
|
483
487
|
if (result != null) {
|
|
484
488
|
if (typeof result.then === "function") isThenable = true;
|
|
@@ -559,11 +563,22 @@ function LazyPageRenderer({ config }) {
|
|
|
559
563
|
* Uses Suspense internally - shows skeleton while config loads.
|
|
560
564
|
*/
|
|
561
565
|
function AdminRouter(props) {
|
|
566
|
+
if (isAuthRoute(props.segments)) return /* @__PURE__ */ jsx(React.Suspense, {
|
|
567
|
+
fallback: /* @__PURE__ */ jsx(AuthPageSkeleton, {}),
|
|
568
|
+
children: /* @__PURE__ */ jsx(AdminAuthRouter, { ...props })
|
|
569
|
+
});
|
|
562
570
|
return /* @__PURE__ */ jsx(React.Suspense, {
|
|
563
571
|
fallback: getFallbackForSegments(props.segments),
|
|
564
572
|
children: /* @__PURE__ */ jsx(AdminRouterInner, { ...props })
|
|
565
573
|
});
|
|
566
574
|
}
|
|
575
|
+
function AdminAuthRouter({ segments, pages: pagesProp, NotFoundComponent }) {
|
|
576
|
+
const admin = useAdminStore((state) => state.admin);
|
|
577
|
+
const pages = pagesProp ?? admin.getPages();
|
|
578
|
+
const route = React.useMemo(() => matchRoute(segments, {}, {}, pages), [segments, pages]);
|
|
579
|
+
if (route.type === "page") return /* @__PURE__ */ jsx(LazyPageRenderer, { config: route.config });
|
|
580
|
+
return /* @__PURE__ */ jsx(NotFoundComponent || DefaultNotFound, {});
|
|
581
|
+
}
|
|
567
582
|
/**
|
|
568
583
|
* Inner router component that uses Suspense for data loading.
|
|
569
584
|
* Guaranteed to have config loaded when rendering.
|
|
@@ -729,11 +744,12 @@ function AdminRouterInner({ segments, navigate, basePath = "/admin", searchParam
|
|
|
729
744
|
const selectedFormViewDefinition = views[selectedFormView];
|
|
730
745
|
const selectedFormViewConfig = mergeViewConfig(getViewBaseConfig(selectedFormViewDefinition), config?.form?.config ?? config?.form ?? activeCollectionSchema?.admin?.form);
|
|
731
746
|
const formViewLoader = getViewLoader(selectedFormViewDefinition);
|
|
732
|
-
|
|
747
|
+
const resolvedEditViewKind = selectedFormViewDefinition?.kind === "document" ? "document" : "form";
|
|
748
|
+
if (selectedFormViewDefinition && selectedFormViewDefinition.kind !== "form" && selectedFormViewDefinition.kind !== "document" && process.env.NODE_ENV !== "production") console.warn(`View "${selectedFormView}" kind "${selectedFormViewDefinition.kind}" != expected "form" | "document"`);
|
|
733
749
|
if (custom?.Form) return /* @__PURE__ */ jsx(custom.Form, {});
|
|
734
750
|
return /* @__PURE__ */ jsx(RegistryViewRenderer, {
|
|
735
751
|
loader: formViewLoader,
|
|
736
|
-
viewKind:
|
|
752
|
+
viewKind: resolvedEditViewKind,
|
|
737
753
|
viewId: selectedFormView,
|
|
738
754
|
componentProps: {
|
|
739
755
|
collection: name,
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { useResolveText, useSafeI18n, useTranslation } from "../../i18n/hooks.mjs";
|
|
2
2
|
import { cn, formatLabel } from "../../lib/utils.mjs";
|
|
3
|
-
import { selectAdmin, selectBasePath, selectContentLocale, selectNavigate, selectSetContentLocale, useAdminStore, useAdminStoreRaw } from "../../runtime/provider.mjs";
|
|
3
|
+
import { selectAdmin, selectBasePath, selectClient, selectContentLocale, selectNavigate, selectSetContentLocale, useAdminStore, useAdminStoreRaw } from "../../runtime/provider.mjs";
|
|
4
4
|
import { useSafeContentLocales } from "../../runtime/content-locales-provider.mjs";
|
|
5
5
|
import { ComponentRenderer } from "../../components/component-renderer.mjs";
|
|
6
6
|
import { Button } from "../../components/ui/button.mjs";
|
|
7
7
|
import { getFlagUrl } from "../../utils/locale-to-flag.mjs";
|
|
8
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem,
|
|
8
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../../components/ui/dropdown-menu.mjs";
|
|
9
9
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../components/ui/tooltip.mjs";
|
|
10
10
|
import { useAdminConfig } from "../../hooks/use-admin-config.mjs";
|
|
11
|
+
import { resolveAssetUrl } from "../../utils/asset-url.mjs";
|
|
11
12
|
import { useLazyComponent } from "../../utils/use-lazy-component.mjs";
|
|
12
13
|
import { Skeleton } from "../../components/ui/skeleton.mjs";
|
|
13
14
|
import { useAuthClientSafe } from "../../hooks/use-auth.mjs";
|
|
@@ -17,7 +18,7 @@ import { BrandLogoMark } from "../../components/brand-logo.mjs";
|
|
|
17
18
|
import { getAdminPreferenceQueryKey, useAdminPreference, useSetAdminPreference } from "../../hooks/use-admin-preferences.mjs";
|
|
18
19
|
import { Icon } from "@iconify/react";
|
|
19
20
|
import * as React from "react";
|
|
20
|
-
import { useQueryClient } from "@tanstack/react-query";
|
|
21
|
+
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
|
21
22
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
23
|
import { toast } from "sonner";
|
|
23
24
|
|
|
@@ -28,6 +29,24 @@ import { toast } from "sonner";
|
|
|
28
29
|
* Navigation sidebar for the admin UI using shadcn sidebar primitives.
|
|
29
30
|
* Automatically reads from AdminProvider context when props are not provided.
|
|
30
31
|
*/
|
|
32
|
+
function getStringValue(value, key) {
|
|
33
|
+
if (!value || typeof value !== "object") return null;
|
|
34
|
+
const candidate = value[key];
|
|
35
|
+
return typeof candidate === "string" && candidate.length > 0 ? candidate : null;
|
|
36
|
+
}
|
|
37
|
+
function getAssetUrl(value) {
|
|
38
|
+
if (!value || typeof value !== "object") return null;
|
|
39
|
+
return resolveAssetUrl(getStringValue(value, "url") ?? getStringValue(value, "src")) ?? null;
|
|
40
|
+
}
|
|
41
|
+
function getUserAvatarUrl(user) {
|
|
42
|
+
if (!user || typeof user !== "object") return null;
|
|
43
|
+
const obj = user;
|
|
44
|
+
const avatarUrl = getAssetUrl(obj.avatar);
|
|
45
|
+
if (avatarUrl) return avatarUrl;
|
|
46
|
+
const imageUrl = getStringValue(obj, "image") ?? getAssetUrl(obj.image);
|
|
47
|
+
if (imageUrl) return resolveAssetUrl(imageUrl) ?? null;
|
|
48
|
+
return getAssetUrl(obj.photo) ?? getAssetUrl(obj.profileImage);
|
|
49
|
+
}
|
|
31
50
|
/**
|
|
32
51
|
* Extract typed props from untyped sidebar config items.
|
|
33
52
|
* Server sidebar items come as plain objects without strict typing.
|
|
@@ -406,6 +425,7 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
406
425
|
const collapsed = state === "collapsed";
|
|
407
426
|
const authClient = useAuthClientSafe();
|
|
408
427
|
const { user, isPending } = useSessionState();
|
|
428
|
+
const client = useAdminStore(selectClient);
|
|
409
429
|
const navigate = useAdminStore(selectNavigate);
|
|
410
430
|
const basePath = useAdminStore(selectBasePath);
|
|
411
431
|
const admin = useAdminStore(selectAdmin);
|
|
@@ -422,6 +442,29 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
422
442
|
const contentLocale = useAdminStore(selectContentLocale);
|
|
423
443
|
const setContentLocale = useAdminStore(selectSetContentLocale);
|
|
424
444
|
const hasMultipleContentLocales = (contentLocales?.locales?.length ?? 0) > 1;
|
|
445
|
+
const profileUser = useQuery({
|
|
446
|
+
queryKey: [
|
|
447
|
+
"questpie",
|
|
448
|
+
"collections",
|
|
449
|
+
"user",
|
|
450
|
+
"findOne",
|
|
451
|
+
contentLocale,
|
|
452
|
+
"current-profile",
|
|
453
|
+
user?.id
|
|
454
|
+
],
|
|
455
|
+
queryFn: async () => {
|
|
456
|
+
if (!user?.id) return null;
|
|
457
|
+
const userApi = client.collections?.user;
|
|
458
|
+
if (!userApi?.findOne) return null;
|
|
459
|
+
return userApi.findOne({
|
|
460
|
+
where: { id: user.id },
|
|
461
|
+
locale: contentLocale,
|
|
462
|
+
with: { avatar: true }
|
|
463
|
+
});
|
|
464
|
+
},
|
|
465
|
+
enabled: !!authClient && !!user?.id,
|
|
466
|
+
staleTime: 3e4
|
|
467
|
+
}).data ?? user;
|
|
425
468
|
const shouldShowThemeToggle = !!setTheme && showThemeToggle !== false;
|
|
426
469
|
const themeOptions = React.useMemo(() => [
|
|
427
470
|
{
|
|
@@ -440,6 +483,7 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
440
483
|
icon: "ph:monitor"
|
|
441
484
|
}
|
|
442
485
|
], [t]);
|
|
486
|
+
const currentThemeOption = themeOptions.find((option) => option.value === theme) ?? themeOptions[2];
|
|
443
487
|
const handleThemeChange = React.useCallback((value) => {
|
|
444
488
|
setTheme?.(value);
|
|
445
489
|
}, [setTheme]);
|
|
@@ -470,16 +514,17 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
470
514
|
};
|
|
471
515
|
if (isPending) return /* @__PURE__ */ jsx(UserFooterSkeleton, { collapsed });
|
|
472
516
|
if (!authClient || !user) return null;
|
|
473
|
-
const displayName =
|
|
474
|
-
const displayEmail =
|
|
517
|
+
const displayName = profileUser.name || profileUser.email?.split("@")[0] || "User";
|
|
518
|
+
const displayEmail = profileUser.email || "";
|
|
519
|
+
const avatarUrl = getUserAvatarUrl(profileUser) ?? getUserAvatarUrl(user);
|
|
475
520
|
return /* @__PURE__ */ jsx(SidebarFooter, {
|
|
476
521
|
className: "qa-sidebar__footer border-sidebar-border/70 border-t p-2",
|
|
477
522
|
children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsxs(DropdownMenuTrigger, {
|
|
478
523
|
className: cn("qa-sidebar__user-trigger flex w-full items-center gap-2.5 rounded-md p-2 text-left transition-[background-color,color,transform] duration-150 ease-out active:scale-[0.96]", "hover:bg-sidebar-accent text-sidebar-foreground", "focus-visible:ring-sidebar-ring focus-visible:ring-1 focus-visible:outline-none", collapsed && "justify-center"),
|
|
479
524
|
children: [/* @__PURE__ */ jsx("div", {
|
|
480
525
|
className: "qa-sidebar__user-avatar border-sidebar-border bg-sidebar-accent text-sidebar-accent-foreground flex size-8 shrink-0 items-center justify-center rounded-md border",
|
|
481
|
-
children:
|
|
482
|
-
src:
|
|
526
|
+
children: avatarUrl ? /* @__PURE__ */ jsx("img", {
|
|
527
|
+
src: avatarUrl,
|
|
483
528
|
alt: "",
|
|
484
529
|
className: "image-outline size-full rounded-md object-cover"
|
|
485
530
|
}) : /* @__PURE__ */ jsx(Icon, {
|
|
@@ -530,21 +575,26 @@ function UserFooter({ theme = "system", setTheme, showThemeToggle }) {
|
|
|
530
575
|
className: "size-4"
|
|
531
576
|
}), t("auth.myAccount")]
|
|
532
577
|
}),
|
|
533
|
-
shouldShowThemeToggle && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
534
|
-
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
children: themeOptions.map((option) => /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
|
|
540
|
-
value: option.value,
|
|
541
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
578
|
+
shouldShowThemeToggle && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DropdownMenuSeparator, {}), /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx(Icon, { icon: currentThemeOption.icon }), t("ui.toggleTheme")] }), /* @__PURE__ */ jsx(DropdownMenuSubContent, {
|
|
579
|
+
className: "min-w-40",
|
|
580
|
+
children: themeOptions.map((option) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
581
|
+
onClick: () => handleThemeChange(option.value),
|
|
582
|
+
children: [
|
|
583
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
542
584
|
icon: option.icon,
|
|
543
585
|
className: "size-4"
|
|
544
|
-
}),
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
586
|
+
}),
|
|
587
|
+
/* @__PURE__ */ jsx("span", {
|
|
588
|
+
className: "flex-1",
|
|
589
|
+
children: option.label
|
|
590
|
+
}),
|
|
591
|
+
option.value === theme && /* @__PURE__ */ jsx(Icon, {
|
|
592
|
+
icon: "ph:check",
|
|
593
|
+
className: "text-foreground size-4"
|
|
594
|
+
})
|
|
595
|
+
]
|
|
596
|
+
}, option.value))
|
|
597
|
+
})] })] }),
|
|
548
598
|
hasMultipleUiLocales && /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { children: [/* @__PURE__ */ jsx(Icon, { icon: "ph:globe" }), t("locale.uiLanguage")] }), /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: uiLocaleOptions.map((locale) => /* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
549
599
|
onClick: () => setUiLocale(locale.code),
|
|
550
600
|
children: [
|
|
@@ -10,10 +10,11 @@ function getStoredAdminTheme() {
|
|
|
10
10
|
}
|
|
11
11
|
function useManagedAdminTheme(controlledTheme, controlledSetTheme, options = {}) {
|
|
12
12
|
const enabled = options.enabled ?? true;
|
|
13
|
-
const
|
|
14
|
-
const
|
|
13
|
+
const isControlled = controlledTheme !== void 0 && controlledSetTheme !== void 0;
|
|
14
|
+
const [uncontrolledTheme, setUncontrolledTheme] = React.useState(() => controlledTheme ?? getStoredAdminTheme());
|
|
15
|
+
const theme = isControlled ? controlledTheme : uncontrolledTheme;
|
|
15
16
|
const setTheme = React.useCallback((next) => {
|
|
16
|
-
if (
|
|
17
|
+
if (isControlled) {
|
|
17
18
|
controlledSetTheme(next);
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
@@ -21,7 +22,7 @@ function useManagedAdminTheme(controlledTheme, controlledSetTheme, options = {})
|
|
|
21
22
|
try {
|
|
22
23
|
window.localStorage.setItem(ADMIN_THEME_STORAGE_KEY, next);
|
|
23
24
|
} catch {}
|
|
24
|
-
}, [controlledSetTheme]);
|
|
25
|
+
}, [controlledSetTheme, isControlled]);
|
|
25
26
|
React.useEffect(() => {
|
|
26
27
|
if (!enabled) return;
|
|
27
28
|
const root = document.documentElement;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/client/views/layout/admin-view-layout.d.ts
|
|
4
|
+
|
|
5
|
+
interface AdminViewLayoutProps {
|
|
6
|
+
header?: React.ReactNode;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
contentClassName?: string;
|
|
10
|
+
}
|
|
11
|
+
declare function AdminViewLayout({
|
|
12
|
+
header,
|
|
13
|
+
children,
|
|
14
|
+
className,
|
|
15
|
+
contentClassName
|
|
16
|
+
}: AdminViewLayoutProps): React.ReactElement;
|
|
17
|
+
interface AdminViewHeaderProps {
|
|
18
|
+
title: React.ReactNode;
|
|
19
|
+
titleAccessory?: React.ReactNode;
|
|
20
|
+
description?: React.ReactNode;
|
|
21
|
+
meta?: React.ReactNode;
|
|
22
|
+
actions?: React.ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
titleClassName?: string;
|
|
25
|
+
}
|
|
26
|
+
declare function AdminViewHeader({
|
|
27
|
+
title,
|
|
28
|
+
titleAccessory,
|
|
29
|
+
description,
|
|
30
|
+
meta,
|
|
31
|
+
actions,
|
|
32
|
+
className,
|
|
33
|
+
titleClassName
|
|
34
|
+
}: AdminViewHeaderProps): React.ReactElement;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { AdminViewHeader, AdminViewLayout };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime43 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/accept-invite-page.d.ts
|
|
5
5
|
|
|
@@ -61,6 +61,6 @@ declare function AcceptInvitePage({
|
|
|
61
61
|
redirectTo,
|
|
62
62
|
loginPath,
|
|
63
63
|
minPasswordLength
|
|
64
|
-
}: AcceptInvitePageProps):
|
|
64
|
+
}: AcceptInvitePageProps): react_jsx_runtime43.JSX.Element;
|
|
65
65
|
//#endregion
|
|
66
66
|
export { AcceptInvitePage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime41 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/client/views/pages/dashboard-page.d.ts
|
|
4
4
|
|
|
@@ -38,6 +38,6 @@ declare function DashboardPage({
|
|
|
38
38
|
title,
|
|
39
39
|
description,
|
|
40
40
|
className
|
|
41
|
-
}: DashboardPageProps):
|
|
41
|
+
}: DashboardPageProps): react_jsx_runtime41.JSX.Element;
|
|
42
42
|
//#endregion
|
|
43
43
|
export { DashboardPage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime42 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/forgot-password-page.d.ts
|
|
5
5
|
|
|
@@ -51,6 +51,6 @@ declare function ForgotPasswordPage({
|
|
|
51
51
|
logo,
|
|
52
52
|
loginPath,
|
|
53
53
|
resetPasswordRedirectUrl
|
|
54
|
-
}: ForgotPasswordPageProps):
|
|
54
|
+
}: ForgotPasswordPageProps): react_jsx_runtime42.JSX.Element;
|
|
55
55
|
//#endregion
|
|
56
56
|
export { ForgotPasswordPage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime45 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/invite-page.d.ts
|
|
5
5
|
|
|
@@ -65,6 +65,6 @@ declare function InvitePage({
|
|
|
65
65
|
defaultRole,
|
|
66
66
|
showMessage,
|
|
67
67
|
onSuccess
|
|
68
|
-
}: InvitePageProps):
|
|
68
|
+
}: InvitePageProps): react_jsx_runtime45.JSX.Element;
|
|
69
69
|
//#endregion
|
|
70
70
|
export { InvitePage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime44 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/login-page.d.ts
|
|
5
5
|
|
|
@@ -64,6 +64,6 @@ declare function LoginPage({
|
|
|
64
64
|
signUpPath,
|
|
65
65
|
showForgotPassword,
|
|
66
66
|
showSignUp
|
|
67
|
-
}: LoginPageProps):
|
|
67
|
+
}: LoginPageProps): react_jsx_runtime44.JSX.Element;
|
|
68
68
|
//#endregion
|
|
69
69
|
export { LoginPage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime47 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/reset-password-page.d.ts
|
|
5
5
|
|
|
@@ -58,6 +58,6 @@ declare function ResetPasswordPage({
|
|
|
58
58
|
loginPath,
|
|
59
59
|
minPasswordLength,
|
|
60
60
|
getToken
|
|
61
|
-
}: ResetPasswordPageProps):
|
|
61
|
+
}: ResetPasswordPageProps): react_jsx_runtime47.JSX.Element;
|
|
62
62
|
//#endregion
|
|
63
63
|
export { ResetPasswordPage };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime46 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/views/pages/setup-page.d.ts
|
|
5
5
|
|
|
@@ -56,6 +56,6 @@ declare function SetupPage({
|
|
|
56
56
|
redirectTo,
|
|
57
57
|
loginPath,
|
|
58
58
|
showLoginLink
|
|
59
|
-
}: SetupPageProps):
|
|
59
|
+
}: SetupPageProps): react_jsx_runtime46.JSX.Element;
|
|
60
60
|
//#endregion
|
|
61
61
|
export { SetupPage, SetupPageProps };
|
package/dist/client.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";
|
|
@@ -48,6 +61,7 @@ import { LoginPage } from "./client/views/pages/login-page.mjs";
|
|
|
48
61
|
import { ResetPasswordPage } from "./client/views/pages/reset-password-page.mjs";
|
|
49
62
|
import { SetupPage, SetupPageProps } from "./client/views/pages/setup-page.mjs";
|
|
50
63
|
import { useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions } from "./client/hooks/use-collection.mjs";
|
|
64
|
+
import { Asset, useUpload } from "./client/hooks/use-upload.mjs";
|
|
51
65
|
import { useCurrentUser } from "./client/hooks/use-current-user.mjs";
|
|
52
66
|
import { BrandSnapshot, useBrand, useBrandSnapshotRef } from "./client/hooks/use-brand.mjs";
|
|
53
67
|
import { OptionItem, UseFieldOptionsOptions, UseFieldOptionsResult, useFieldOptions } from "./client/hooks/use-field-options.mjs";
|
|
@@ -68,6 +82,7 @@ import { ScopeContextValue, ScopeOption, ScopePickerProps, ScopeProviderProps }
|
|
|
68
82
|
import { ScopePicker } from "./client/scope/picker.mjs";
|
|
69
83
|
import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
|
|
70
84
|
import "./client/scope/index.mjs";
|
|
85
|
+
import { toast } from "sonner";
|
|
71
86
|
import { QuestpieApp, QuestpieClient } from "questpie/client";
|
|
72
87
|
import { CollectionInfer } from "questpie";
|
|
73
88
|
|
|
@@ -105,4 +120,4 @@ type CollectionFieldKeys<TApp extends QuestpieApp, TCollectionName extends strin
|
|
|
105
120
|
select: infer TSelect;
|
|
106
121
|
} ? keyof TSelect : never : never : never;
|
|
107
122
|
//#endregion
|
|
108
|
-
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, type AdminProviderProps, AdminRouter, type AdminRouterProps, type AdminShellRailProps, type AdminSidebarBrandProps, type AdminSidebarNavItemProps, type AdminState, type AdminStore, type AdminToPreviewMessage, AnyQuestpieClient, type AnyWidgetConfig, type AppAdmin, AuthDefaultLogo, AuthGuard, AuthLayout, type AuthLayoutProps, AuthLoading, Badge, type BadgeProps, type BaseFieldProps, type BaseWidgetAdminMeta, type BaseWidgetConfig, type BlockCategory, type BlockClickedMessage, type BlockContent, type BlockNode, BlockRenderer, type BlockRendererProps as BlockRendererComponentProps, type BlockRendererProps$1 as BlockRendererProps, type BlockScopeContextValue, BlockScopeProvider, type BlockScopeProviderProps, type BrandLogoConfig, BrandLogoMark, type BrandLogoMarkProps, type BrandSnapshot, type BrandingConfig, type ChartWidgetConfig, CollectionFieldKeys, type CollectionFormViewProps, CollectionItem, type CollectionListViewProps, CollectionNames, type CommitMessage, type ComponentRegistry, ComponentRenderer, type ComponentRendererProps, type ComponentRendererRegistry, type CustomWidgetConfig, DashboardPage, EMPTY_BLOCK_CONTENT, type FieldClickedMessage, type FieldComponentProps, type FieldDefinition, type FieldInstance, type FieldValueEditedMessage, type FlagConfig, type FocusContextValue, type FocusFieldMessage, FocusProvider, type FocusProviderProps, type FocusState, ForgotPasswordForm, ForgotPasswordPage, type FormViewConfig, type FormViewDefinition, type FullResyncMessage, type GlobalFormViewProps, GlobalNames, type I18nContext, type I18nText, type IconComponent, IconifyIcon, type IconifyIconProps, type InferAdminCMS, type InitSnapshotMessage, InvitePage, type ListViewDefinition, LoginForm, LoginPage, type MaybeLazyComponent, type OptionItem, type PageDefinition, type PatchAppliedMessage, type PatchBatchMessage, PreviewBanner, type PreviewBannerProps, type PreviewConfig, PreviewField, type PreviewFieldProps, type PreviewPatchOp, PreviewProvider, type PreviewReadyMessage, type PreviewRefreshMessage, type PreviewToAdminMessage, type ProgressWidgetConfig, type QuickActionsWidgetConfig, type ReactiveFieldResult, type ReactiveFieldState, type RecentItemsWidgetConfig, type RefreshCompleteMessage, ResetPasswordForm, ResetPasswordPage, type ResyncRequestMessage, RichTextEditor, type RichTextEditorProps, RichTextRenderer, type RichTextStyles, type ScopeContextValue, type ScopeOption, ScopePicker, type ScopePickerProps, ScopeProvider, type ScopeProviderProps, type SelectBlockMessage, SetupForm, type SetupFormValues, SetupPage, type SetupPageProps, type SetupStatus, StandalonePreviewField, type StatsWidgetConfig, type TableWidgetConfig, type TimelineWidgetConfig, type TipTapDoc, type TipTapNode, type TypedHooks, type UseCollectionPreviewOptions, type UseCollectionPreviewResult, type UseFieldOptionsOptions, type UseFieldOptionsResult, type UseReactiveFieldsOptions, type UseReactiveFieldsResult, type ValueWidgetConfig, type ViewDefinition, type ViewKind, type WidgetComponentProps, type WidgetConfig, type WidgetDefinition, type 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 };
|
|
123
|
+
export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, type AdminProviderProps, AdminRouter, type AdminRouterProps, type AdminShellRailProps, type AdminSidebarBrandProps, type AdminSidebarNavItemProps, type AdminState, type AdminStore, type AdminToPreviewMessage, AdminViewHeader, AdminViewLayout, AnyQuestpieClient, type AnyWidgetConfig, type AppAdmin, type Asset, AuthDefaultLogo, AuthGuard, AuthLayout, type AuthLayoutProps, AuthLoading, Badge, type BadgeProps, type BaseFieldProps, type BaseWidgetAdminMeta, type BaseWidgetConfig, type BlockCategory, type BlockClickedMessage, type BlockContent, type BlockNode, BlockRenderer, type BlockRendererProps as BlockRendererComponentProps, type BlockRendererProps$1 as BlockRendererProps, type BlockScopeContextValue, BlockScopeProvider, type BlockScopeProviderProps, type BrandLogoConfig, BrandLogoMark, type BrandLogoMarkProps, type BrandSnapshot, type BrandingConfig, Button, type ChartWidgetConfig, CollectionFieldKeys, type CollectionFormViewProps, CollectionItem, type CollectionListViewProps, CollectionNames, type CommitMessage, type ComponentRegistry, ComponentRenderer, type ComponentRendererProps, type ComponentRendererRegistry, type CustomWidgetConfig, DashboardPage, DocumentView, type DocumentViewConfig, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, Dropzone, EMPTY_BLOCK_CONTENT, type FieldClickedMessage, type FieldComponentProps, type FieldDefinition, type FieldInstance, type FieldValueEditedMessage, type FlagConfig, type FocusContextValue, type FocusFieldMessage, FocusProvider, type FocusProviderProps, type FocusState, ForgotPasswordForm, ForgotPasswordPage, type FormViewConfig, type FormViewDefinition, type FullResyncMessage, type GlobalFormViewProps, GlobalNames, type I18nContext, type I18nText, type IconComponent, IconifyIcon, type IconifyIconProps, type InferAdminCMS, type InitSnapshotMessage, InvitePage, type ListViewDefinition, LoginForm, LoginPage, type MaybeLazyComponent, type OptionItem, type PageDefinition, type PatchAppliedMessage, type PatchBatchMessage, PreviewBanner, type PreviewBannerProps, type PreviewConfig, PreviewField, type PreviewFieldProps, type PreviewPatchOp, PreviewProvider, type PreviewReadyMessage, type PreviewRefreshMessage, type PreviewToAdminMessage, type ProgressWidgetConfig, type QuickActionsWidgetConfig, type ReactiveFieldResult, type ReactiveFieldState, type RecentItemsWidgetConfig, type RefreshCompleteMessage, ResetPasswordForm, ResetPasswordPage, type ResyncRequestMessage, RichTextEditor, type RichTextEditorProps, RichTextRenderer, type RichTextStyles, type ScopeContextValue, type ScopeOption, ScopePicker, type ScopePickerProps, ScopeProvider, type ScopeProviderProps, SearchInput, type SelectBlockMessage, SetupForm, type SetupFormValues, SetupPage, type SetupPageProps, type SetupStatus, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, StandalonePreviewField, type StatsWidgetConfig, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, type TableWidgetConfig, type TimelineWidgetConfig, type TipTapDoc, type TipTapNode, Tooltip, TooltipContent, TooltipTrigger, type TypedHooks, type UseCollectionPreviewOptions, type UseCollectionPreviewResult, type UseFieldOptionsOptions, type UseFieldOptionsResult, type UseReactiveFieldsOptions, type UseReactiveFieldsResult, type ValueWidgetConfig, type ViewDefinition, type ViewKind, type WidgetComponentProps, type WidgetConfig, type WidgetDefinition, type 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/client.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 {
|
|
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 "sonner";
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime53 from "react/jsx-runtime";
|
|
2
2
|
|
|
3
3
|
//#region src/components/rich-text/rich-text-renderer.d.ts
|
|
4
4
|
/**
|
|
@@ -10,9 +10,9 @@ type TipTapNode = {
|
|
|
10
10
|
text?: string;
|
|
11
11
|
marks?: Array<{
|
|
12
12
|
type: string;
|
|
13
|
-
attrs?: Record<string,
|
|
13
|
+
attrs?: Record<string, unknown>;
|
|
14
14
|
}>;
|
|
15
|
-
attrs?: Record<string,
|
|
15
|
+
attrs?: Record<string, unknown>;
|
|
16
16
|
};
|
|
17
17
|
type TipTapDoc = {
|
|
18
18
|
type: "doc";
|
|
@@ -53,7 +53,7 @@ interface RichTextRendererProps {
|
|
|
53
53
|
/**
|
|
54
54
|
* TipTap JSON content to render
|
|
55
55
|
*/
|
|
56
|
-
content:
|
|
56
|
+
content: unknown;
|
|
57
57
|
/**
|
|
58
58
|
* Custom styles for elements
|
|
59
59
|
*/
|
|
@@ -98,6 +98,6 @@ declare function RichTextRenderer({
|
|
|
98
98
|
content,
|
|
99
99
|
styles: customStyles,
|
|
100
100
|
className
|
|
101
|
-
}: RichTextRendererProps):
|
|
101
|
+
}: RichTextRendererProps): react_jsx_runtime53.JSX.Element | null;
|
|
102
102
|
//#endregion
|
|
103
103
|
export { RichTextRenderer, RichTextStyles, TipTapDoc, TipTapNode };
|
|
@@ -30,6 +30,9 @@ const defaultStyles = {
|
|
|
30
30
|
strike: "line-through",
|
|
31
31
|
underline: "underline"
|
|
32
32
|
};
|
|
33
|
+
function isRenderableTipTapDoc(content) {
|
|
34
|
+
return !!content && typeof content === "object" && content.type === "doc" && Array.isArray(content.content);
|
|
35
|
+
}
|
|
33
36
|
/**
|
|
34
37
|
* Renders a single TipTap node
|
|
35
38
|
*/
|
|
@@ -85,7 +88,7 @@ function renderNode(node, index, styles) {
|
|
|
85
88
|
}
|
|
86
89
|
return textNode;
|
|
87
90
|
}
|
|
88
|
-
const nodeKey = `${node.type}-${
|
|
91
|
+
const nodeKey = `${node.type}-${index}`;
|
|
89
92
|
const children = node.content?.map((child, i) => renderNode(child, i, styles));
|
|
90
93
|
switch (node.type) {
|
|
91
94
|
case "doc": return /* @__PURE__ */ jsx("div", { children }, nodeKey);
|
|
@@ -198,7 +201,7 @@ function renderNode(node, index, styles) {
|
|
|
198
201
|
* ```
|
|
199
202
|
*/
|
|
200
203
|
function RichTextRenderer({ content, styles: customStyles, className }) {
|
|
201
|
-
if (!content ||
|
|
204
|
+
if (!isRenderableTipTapDoc(content) || content.content.length === 0) return null;
|
|
202
205
|
const styles = {
|
|
203
206
|
...defaultStyles,
|
|
204
207
|
...customStyles
|
package/dist/factories.d.mts
CHANGED
|
@@ -12,8 +12,10 @@ import { BlockSchema, getBlocksByCategory, introspectBlock, introspectBlocks } f
|
|
|
12
12
|
import { BlocksPrefetchContext, createBlocksPrefetchHook, processBlocksDocument, processDocumentBlocksPrefetch } from "./server/modules/admin/block/prefetch.mjs";
|
|
13
13
|
import "./server/block/index.mjs";
|
|
14
14
|
import { component, editView, filterViewsByKind, listView, view } from "./server/registry-helpers.mjs";
|
|
15
|
-
import { createActionCallbackProxy, createActionProxy, createComponentCallbackProxy, createComponentProxy, createDashboardCallbackContext, createDashboardContributionProxy, createFieldProxy, createSidebarCallbackContext, createSidebarContributionProxy, createViewCallbackProxy, createViewProxy, resolveDashboardCallback, resolveSidebarCallback } from "./server/proxy-factories.mjs";
|
|
15
|
+
import { createActionCallbackProxy, createActionFieldBuilderProxy, createActionProxy, createComponentCallbackProxy, createComponentProxy, createDashboardCallbackContext, createDashboardContributionProxy, createFieldProxy, createSidebarCallbackContext, createSidebarContributionProxy, createViewCallbackProxy, createViewProxy, resolveDashboardCallback, resolveSidebarCallback } from "./server/proxy-factories.mjs";
|
|
16
16
|
import { AuthSession, GetAdminSessionOptions, RequireAdminAuthOptions, getAdminSession, isAdminUser, requireAdminAuth } from "./server/modules/admin/auth-helpers.mjs";
|
|
17
|
+
import "./server/auth-helpers.mjs";
|
|
17
18
|
import { NextAuthMiddlewareOptions, createNextAuthMiddleware, getNextAdminSession } from "./server/adapters/nextjs.mjs";
|
|
18
19
|
import { BeforeLoadContext, TanStackAuthGuardOptions, createTanStackAuthGuard, createTanStackSessionLoader } from "./server/adapters/tanstack.mjs";
|
|
19
|
-
|
|
20
|
+
import "./server/adapters/index.mjs";
|
|
21
|
+
export { type ActionReference, type ActionsConfigContext, type AdminBlockConfig, type AdminCollectionConfig, type AdminConfigContext, type AdminConfigInput, type AdminGlobalConfig, type AdminLocaleConfig, type AdminShellRailPlacement, type AdminShellRouteRules, type AnyBlockBuilder, type AnyBlockDefinition, type AuthSession, BeforeLoadContext, BlockBuilder, type BlockBuilderState, type BlockCategoryConfig, type BlockDefinition, type BlockPrefetchContext, type BlockPrefetchFn, type BlockPrefetchWith, type BlockPrefetchWithOptions, type BlockSchema, type BlocksPrefetchContext, type BuiltinActionType, type ComponentDefinition, type ComponentFactory, type ComponentReference, type ComponentType, type ComponentTypeRegistry, type DashboardActionFactory, type DashboardActionProxy, type DashboardCallback, type DashboardCallbackContext, type DashboardConfigContext, type DashboardContribution, type DashboardItemDef, type DashboardProxy, type DashboardSectionDef, type EditViewDefinition, type EditViewFactory, type ExpandWithResult, type ExpandedRecord, type FieldLayoutItem, type FilterViewsByKind, type FormFieldLayoutItem, type FormReactiveConfig, type FormReactiveContext, type FormSectionLayout, type FormSidebarConfig, type FormTabConfig, type FormTabsLayout, type FormViewConfig, type FormViewConfigContext, type GetAdminSessionOptions, type InferBlockData, type InferBlockValues, type ListViewConfig, type ListViewConfigContext, type ListViewDefinition, type ListViewFactory, NextAuthMiddlewareOptions, type PreviewConfig, type RequireAdminAuthOptions, type ServerActionContext, type ServerActionDefinition, type ServerActionDownload, type ServerActionEffects, type ServerActionError, type ServerActionForm, type ServerActionFormField, type ServerActionHandler, type ServerActionRedirect, type ServerActionResult, type ServerActionSuccess, type ServerActionsConfig, type ServerAdminShellConfig, type ServerAdminShellRailConfig, type ServerBrandingConfig, type ServerChartWidget, type ServerCustomWidget, type ServerDashboardAction, type ServerDashboardConfig, type ServerDashboardItem, type ServerDashboardSection, type ServerDashboardTab, type ServerDashboardTabs, type ServerDashboardWidget, type ServerProgressWidget, type ServerQuickAction, type ServerQuickActionsWidget, type ServerRecentItemsWidget, type ServerSidebarCollectionItem, type ServerSidebarConfig, type ServerSidebarDividerItem, type ServerSidebarGlobalItem, type ServerSidebarItem, type ServerSidebarLinkItem, type ServerSidebarPageItem, type ServerSidebarSection, type ServerStatsWidget, type ServerTableWidget, type ServerTimelineWidget, type ServerValueWidget, type SidebarCallback, type SidebarCallbackContext, type SidebarConfigContext, type SidebarContribution, type SidebarItemDef, type SidebarProxy, type SidebarSectionDef, TanStackAuthGuardOptions, type ViewDefinition, type ViewKind, type ViewKindRegistry, type WidgetAccessRule, type WidgetFetchContext, 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 };
|