@questpie/admin 3.0.5 → 3.0.7

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 (59) hide show
  1. package/README.md +99 -1
  2. package/dist/client/builder/types/field-types.d.mts +11 -0
  3. package/dist/client/components/brand-logo.d.mts +25 -0
  4. package/dist/client/components/brand-logo.mjs +174 -0
  5. package/dist/client/create-admin-client.d.mts +7 -0
  6. package/dist/client/create-admin-client.mjs +25 -0
  7. package/dist/client/hooks/use-brand.d.mts +22 -0
  8. package/dist/client/hooks/use-brand.mjs +52 -0
  9. package/dist/client/runtime/index.mjs +1 -1
  10. package/dist/client/runtime/provider.d.mts +4 -0
  11. package/dist/client/runtime/provider.mjs +38 -8
  12. package/dist/client/styles/base.css +4 -0
  13. package/dist/client/types/admin-config.d.mts +24 -0
  14. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  15. package/dist/client/views/auth/auth-layout.d.mts +8 -3
  16. package/dist/client/views/auth/auth-layout.mjs +116 -102
  17. package/dist/client/views/auth/forgot-password-form.d.mts +2 -2
  18. package/dist/client/views/auth/login-form.d.mts +2 -2
  19. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  20. package/dist/client/views/auth/setup-form.d.mts +2 -2
  21. package/dist/client/views/collection/auto-form-fields.mjs +2 -0
  22. package/dist/client/views/collection/field-renderer.mjs +3 -2
  23. package/dist/client/views/globals/global-form-view.mjs +908 -863
  24. package/dist/client/views/layout/admin-sidebar.mjs +153 -141
  25. package/dist/client/views/pages/accept-invite-page.mjs +122 -144
  26. package/dist/client/views/pages/forgot-password-page.mjs +22 -30
  27. package/dist/client/views/pages/invite-page.mjs +24 -33
  28. package/dist/client/views/pages/login-page.d.mts +2 -2
  29. package/dist/client/views/pages/login-page.mjs +24 -32
  30. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  31. package/dist/client/views/pages/reset-password-page.mjs +77 -92
  32. package/dist/client/views/pages/setup-page.mjs +31 -39
  33. package/dist/client.d.mts +6 -2
  34. package/dist/client.mjs +5 -2
  35. package/dist/index.d.mts +6 -2
  36. package/dist/index.mjs +5 -2
  37. package/dist/server/augmentation/dashboard.d.mts +23 -5
  38. package/dist/server/augmentation/form-layout.d.mts +10 -0
  39. package/dist/server/augmentation/index.d.mts +1 -1
  40. package/dist/server/augmentation.d.mts +1 -1
  41. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  42. package/dist/server/modules/admin/collections/user.d.mts +32 -32
  43. package/dist/server/modules/admin/collections/verification.d.mts +36 -36
  44. package/dist/server/modules/admin/dto/admin-config.dto.mjs +19 -1
  45. package/dist/server/modules/admin/index.d.mts +1 -1
  46. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  47. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  48. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  49. package/dist/server/modules/admin/routes/preview.mjs +1 -1
  50. package/dist/server/modules/admin/routes/reactive.d.mts +9 -9
  51. package/dist/server/modules/admin/routes/setup.d.mts +7 -7
  52. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  53. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +23 -23
  54. package/dist/server.d.mts +4 -4
  55. package/dist/shared/preview-utils.d.mts +34 -1
  56. package/dist/shared/preview-utils.mjs +79 -1
  57. package/dist/shared.d.mts +2 -2
  58. package/dist/shared.mjs +2 -2
  59. package/package.json +3 -3
@@ -1,8 +1,8 @@
1
1
  import { useTranslation } from "../../i18n/hooks.mjs";
2
- import { selectBasePath, selectBrandName, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
2
+ import { selectBasePath, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
3
3
  import { Button } from "../../components/ui/button.mjs";
4
4
  import { useAuthClient } from "../../hooks/use-auth.mjs";
5
- import { AuthDefaultLogo, AuthLayout } from "../auth/auth-layout.mjs";
5
+ import { AuthLayout } from "../auth/auth-layout.mjs";
6
6
  import { ResetPasswordForm } from "../auth/reset-password-form.mjs";
7
7
  import { c } from "react/compiler-runtime";
8
8
  import * as React from "react";
@@ -33,14 +33,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
33
33
  * ```
34
34
  */
35
35
  function ResetPasswordPage(t0) {
36
- const $ = c(54);
36
+ const $ = c(48);
37
37
  const { title, description, logo, loginPath, minPasswordLength: t1, getToken } = t0;
38
38
  const minPasswordLength = t1 === void 0 ? 8 : t1;
39
39
  const { t } = useTranslation();
40
40
  const authClient = useAuthClient();
41
41
  const navigate = useAdminStore(selectNavigate);
42
42
  const basePath = useAdminStore(selectBasePath);
43
- const brandName = useAdminStore(selectBrandName);
44
43
  const [error, setError] = React.useState(null);
45
44
  let t2;
46
45
  bb0: {
@@ -116,124 +115,110 @@ function ResetPasswordPage(t0) {
116
115
  $[13] = t6$1;
117
116
  } else t6$1 = $[13];
118
117
  let t7$1;
119
- if ($[14] !== brandName || $[15] !== logo) {
120
- t7$1 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
121
- $[14] = brandName;
122
- $[15] = logo;
123
- $[16] = t7$1;
124
- } else t7$1 = $[16];
118
+ if ($[14] !== t) {
119
+ t7$1 = t("auth.requestNewResetLink");
120
+ $[14] = t;
121
+ $[15] = t7$1;
122
+ } else t7$1 = $[15];
125
123
  let t8$1;
126
- if ($[17] !== t) {
127
- t8$1 = t("auth.requestNewResetLink");
128
- $[17] = t;
129
- $[18] = t8$1;
130
- } else t8$1 = $[18];
131
- let t9$1;
132
- if ($[19] !== t8$1) {
133
- t9$1 = /* @__PURE__ */ jsx("p", {
124
+ if ($[16] !== t7$1) {
125
+ t8$1 = /* @__PURE__ */ jsx("p", {
134
126
  className: "text-muted-foreground text-sm",
135
- children: t8$1
127
+ children: t7$1
136
128
  });
137
- $[19] = t8$1;
138
- $[20] = t9$1;
139
- } else t9$1 = $[20];
129
+ $[16] = t7$1;
130
+ $[17] = t8$1;
131
+ } else t8$1 = $[17];
132
+ let t9;
133
+ if ($[18] !== t) {
134
+ t9 = t("auth.backToLogin");
135
+ $[18] = t;
136
+ $[19] = t9;
137
+ } else t9 = $[19];
140
138
  let t10;
141
- if ($[21] !== t) {
142
- t10 = t("auth.backToLogin");
143
- $[21] = t;
144
- $[22] = t10;
145
- } else t10 = $[22];
146
- let t11;
147
- if ($[23] !== handleBackToLoginClick || $[24] !== t10) {
148
- t11 = /* @__PURE__ */ jsx(Button, {
139
+ if ($[20] !== handleBackToLoginClick || $[21] !== t9) {
140
+ t10 = /* @__PURE__ */ jsx(Button, {
149
141
  type: "button",
150
142
  variant: "link",
151
143
  onClick: handleBackToLoginClick,
152
- children: t10
144
+ children: t9
145
+ });
146
+ $[20] = handleBackToLoginClick;
147
+ $[21] = t9;
148
+ $[22] = t10;
149
+ } else t10 = $[22];
150
+ let t11;
151
+ if ($[23] !== t10 || $[24] !== t8$1) {
152
+ t11 = /* @__PURE__ */ jsxs("div", {
153
+ className: "space-y-4 text-center",
154
+ children: [t8$1, t10]
153
155
  });
154
- $[23] = handleBackToLoginClick;
155
- $[24] = t10;
156
+ $[23] = t10;
157
+ $[24] = t8$1;
156
158
  $[25] = t11;
157
159
  } else t11 = $[25];
158
160
  let t12;
159
- if ($[26] !== t11 || $[27] !== t9$1) {
160
- t12 = /* @__PURE__ */ jsxs("div", {
161
- className: "space-y-4 text-center",
162
- children: [t9$1, t11]
163
- });
164
- $[26] = t11;
165
- $[27] = t9$1;
166
- $[28] = t12;
167
- } else t12 = $[28];
168
- let t13;
169
- if ($[29] !== t12 || $[30] !== t5$1 || $[31] !== t6$1 || $[32] !== t7$1) {
170
- t13 = /* @__PURE__ */ jsx(AuthLayout, {
161
+ if ($[26] !== logo || $[27] !== t11 || $[28] !== t5$1 || $[29] !== t6$1) {
162
+ t12 = /* @__PURE__ */ jsx(AuthLayout, {
171
163
  title: t5$1,
172
164
  description: t6$1,
173
- logo: t7$1,
174
- children: t12
165
+ logo,
166
+ children: t11
175
167
  });
176
- $[29] = t12;
177
- $[30] = t5$1;
178
- $[31] = t6$1;
179
- $[32] = t7$1;
180
- $[33] = t13;
181
- } else t13 = $[33];
182
- return t13;
168
+ $[26] = logo;
169
+ $[27] = t11;
170
+ $[28] = t5$1;
171
+ $[29] = t6$1;
172
+ $[30] = t12;
173
+ } else t12 = $[30];
174
+ return t12;
183
175
  }
184
176
  let t5;
185
- if ($[34] !== t || $[35] !== title) {
177
+ if ($[31] !== t || $[32] !== title) {
186
178
  t5 = title ?? t("auth.resetPassword");
187
- $[34] = t;
188
- $[35] = title;
189
- $[36] = t5;
190
- } else t5 = $[36];
179
+ $[31] = t;
180
+ $[32] = title;
181
+ $[33] = t5;
182
+ } else t5 = $[33];
191
183
  let t6;
192
- if ($[37] !== description || $[38] !== t) {
184
+ if ($[34] !== description || $[35] !== t) {
193
185
  t6 = description ?? t("auth.enterNewPassword");
194
- $[37] = description;
195
- $[38] = t;
196
- $[39] = t6;
197
- } else t6 = $[39];
186
+ $[34] = description;
187
+ $[35] = t;
188
+ $[36] = t6;
189
+ } else t6 = $[36];
198
190
  let t7;
199
- if ($[40] !== brandName || $[41] !== logo) {
200
- t7 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
201
- $[40] = brandName;
202
- $[41] = logo;
203
- $[42] = t7;
204
- } else t7 = $[42];
205
- let t8;
206
- if ($[43] !== error || $[44] !== handleBackToLoginClick || $[45] !== handleSubmit || $[46] !== minPasswordLength || $[47] !== token) {
207
- t8 = /* @__PURE__ */ jsx(ResetPasswordForm, {
191
+ if ($[37] !== error || $[38] !== handleBackToLoginClick || $[39] !== handleSubmit || $[40] !== minPasswordLength || $[41] !== token) {
192
+ t7 = /* @__PURE__ */ jsx(ResetPasswordForm, {
208
193
  token,
209
194
  onSubmit: handleSubmit,
210
195
  onBackToLoginClick: handleBackToLoginClick,
211
196
  minPasswordLength,
212
197
  error
213
198
  });
214
- $[43] = error;
215
- $[44] = handleBackToLoginClick;
216
- $[45] = handleSubmit;
217
- $[46] = minPasswordLength;
218
- $[47] = token;
219
- $[48] = t8;
220
- } else t8 = $[48];
221
- let t9;
222
- if ($[49] !== t5 || $[50] !== t6 || $[51] !== t7 || $[52] !== t8) {
223
- t9 = /* @__PURE__ */ jsx(AuthLayout, {
199
+ $[37] = error;
200
+ $[38] = handleBackToLoginClick;
201
+ $[39] = handleSubmit;
202
+ $[40] = minPasswordLength;
203
+ $[41] = token;
204
+ $[42] = t7;
205
+ } else t7 = $[42];
206
+ let t8;
207
+ if ($[43] !== logo || $[44] !== t5 || $[45] !== t6 || $[46] !== t7) {
208
+ t8 = /* @__PURE__ */ jsx(AuthLayout, {
224
209
  title: t5,
225
210
  description: t6,
226
- logo: t7,
211
+ logo,
227
212
  className: "qa-reset-password-page",
228
- children: t8
213
+ children: t7
229
214
  });
230
- $[49] = t5;
231
- $[50] = t6;
232
- $[51] = t7;
233
- $[52] = t8;
234
- $[53] = t9;
235
- } else t9 = $[53];
236
- return t9;
215
+ $[43] = logo;
216
+ $[44] = t5;
217
+ $[45] = t6;
218
+ $[46] = t7;
219
+ $[47] = t8;
220
+ } else t8 = $[47];
221
+ return t8;
237
222
  }
238
223
 
239
224
  //#endregion
@@ -1,6 +1,6 @@
1
1
  import { useTranslation } from "../../i18n/hooks.mjs";
2
- import { selectBasePath, selectBrandName, selectClient, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
3
- import { AuthDefaultLogo, AuthLayout } from "../auth/auth-layout.mjs";
2
+ import { selectBasePath, selectClient, selectNavigate, useAdminStore } from "../../runtime/provider.mjs";
3
+ import { AuthLayout } from "../auth/auth-layout.mjs";
4
4
  import { SetupForm } from "../auth/setup-form.mjs";
5
5
  import { c } from "react/compiler-runtime";
6
6
  import * as React from "react";
@@ -29,14 +29,13 @@ import { jsx, jsxs } from "react/jsx-runtime";
29
29
  * ```
30
30
  */
31
31
  function SetupPage(t0) {
32
- const $ = c(32);
32
+ const $ = c(29);
33
33
  const { title, description, logo, redirectTo, loginPath, showLoginLink: t1 } = t0;
34
34
  const showLoginLink = t1 === void 0 ? true : t1;
35
35
  const { t } = useTranslation();
36
36
  const client = useAdminStore(selectClient);
37
37
  const navigate = useAdminStore(selectNavigate);
38
38
  const basePath = useAdminStore(selectBasePath);
39
- const brandName = useAdminStore(selectBrandName);
40
39
  const [error, setError] = React.useState(null);
41
40
  let t2;
42
41
  if ($[0] !== basePath || $[1] !== client || $[2] !== navigate || $[3] !== redirectTo || $[4] !== t) {
@@ -95,15 +94,8 @@ function SetupPage(t0) {
95
94
  $[15] = t5;
96
95
  } else t5 = $[15];
97
96
  let t6;
98
- if ($[16] !== brandName || $[17] !== logo) {
99
- t6 = logo ?? /* @__PURE__ */ jsx(AuthDefaultLogo, { brandName });
100
- $[16] = brandName;
101
- $[17] = logo;
102
- $[18] = t6;
103
- } else t6 = $[18];
104
- let t7;
105
- if ($[19] !== handleLoginClick || $[20] !== showLoginLink || $[21] !== t) {
106
- t7 = showLoginLink && /* @__PURE__ */ jsxs("p", {
97
+ if ($[16] !== handleLoginClick || $[17] !== showLoginLink || $[18] !== t) {
98
+ t6 = showLoginLink && /* @__PURE__ */ jsxs("p", {
107
99
  className: "text-muted-foreground text-center text-xs",
108
100
  children: [
109
101
  t("auth.alreadyHaveAccount"),
@@ -116,39 +108,39 @@ function SetupPage(t0) {
116
108
  })
117
109
  ]
118
110
  });
119
- $[19] = handleLoginClick;
120
- $[20] = showLoginLink;
121
- $[21] = t;
122
- $[22] = t7;
123
- } else t7 = $[22];
124
- let t8;
125
- if ($[23] !== error || $[24] !== handleSubmit) {
126
- t8 = /* @__PURE__ */ jsx(SetupForm, {
111
+ $[16] = handleLoginClick;
112
+ $[17] = showLoginLink;
113
+ $[18] = t;
114
+ $[19] = t6;
115
+ } else t6 = $[19];
116
+ let t7;
117
+ if ($[20] !== error || $[21] !== handleSubmit) {
118
+ t7 = /* @__PURE__ */ jsx(SetupForm, {
127
119
  onSubmit: handleSubmit,
128
120
  error
129
121
  });
130
- $[23] = error;
131
- $[24] = handleSubmit;
132
- $[25] = t8;
133
- } else t8 = $[25];
134
- let t9;
135
- if ($[26] !== t4 || $[27] !== t5 || $[28] !== t6 || $[29] !== t7 || $[30] !== t8) {
136
- t9 = /* @__PURE__ */ jsx(AuthLayout, {
122
+ $[20] = error;
123
+ $[21] = handleSubmit;
124
+ $[22] = t7;
125
+ } else t7 = $[22];
126
+ let t8;
127
+ if ($[23] !== logo || $[24] !== t4 || $[25] !== t5 || $[26] !== t6 || $[27] !== t7) {
128
+ t8 = /* @__PURE__ */ jsx(AuthLayout, {
137
129
  title: t4,
138
130
  description: t5,
139
- logo: t6,
131
+ logo,
140
132
  className: "qa-setup-page",
141
- footer: t7,
142
- children: t8
133
+ footer: t6,
134
+ children: t7
143
135
  });
144
- $[26] = t4;
145
- $[27] = t5;
146
- $[28] = t6;
147
- $[29] = t7;
148
- $[30] = t8;
149
- $[31] = t9;
150
- } else t9 = $[31];
151
- return t9;
136
+ $[23] = logo;
137
+ $[24] = t4;
138
+ $[25] = t5;
139
+ $[26] = t6;
140
+ $[27] = t7;
141
+ $[28] = t8;
142
+ } else t8 = $[28];
143
+ return t8;
152
144
  }
153
145
 
154
146
  //#endregion
package/dist/client.d.mts CHANGED
@@ -6,9 +6,11 @@ import { AnyWidgetConfig, BaseWidgetConfig, ChartWidgetConfig, CustomWidgetConfi
6
6
  import { FormViewDefinition, ListViewDefinition, ViewDefinition, ViewKind, view } from "./client/builder/view/view.mjs";
7
7
  import { WidgetDefinition, widget } from "./client/builder/widget/widget.mjs";
8
8
  import { Admin, AppAdmin, InferAdminCMS } from "./client/builder/admin.mjs";
9
+ import { createAdminClient } from "./client/create-admin-client.mjs";
9
10
  import { TypedHooks, createTypedHooks } from "./client/hooks/typed-hooks.mjs";
10
11
  import { createAdminAuthClient, useAuthClient } from "./client/hooks/use-auth.mjs";
11
12
  import { ComponentRegistry, FieldComponentProps, FormViewConfig } from "./client/builder/types/field-types.mjs";
13
+ import { BrandLogoConfig, BrandingConfig } from "./client/types/admin-config.mjs";
12
14
  import { AdminProvider, AdminProviderProps, AdminState, AdminStore, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore } from "./client/runtime/provider.mjs";
13
15
  import { useShallow } from "./client/runtime/index.mjs";
14
16
  import { AdminSidebarBrandProps, AdminSidebarNavItemProps } from "./client/views/layout/admin-sidebar.mjs";
@@ -32,7 +34,8 @@ import { AuthGuard } from "./client/components/auth/auth-guard.mjs";
32
34
  import { AuthLoading } from "./client/components/auth/auth-loading.mjs";
33
35
  import { Badge, BadgeProps, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, IconifyIcon, IconifyIconProps, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
34
36
  import { AcceptInviteForm } from "./client/views/auth/accept-invite-form.mjs";
35
- import { AuthLayout, AuthLayoutProps } from "./client/views/auth/auth-layout.mjs";
37
+ import { AuthDefaultLogo, AuthLayout, AuthLayoutProps } from "./client/views/auth/auth-layout.mjs";
38
+ import { BrandLogoMark, BrandLogoMarkProps } from "./client/components/brand-logo.mjs";
36
39
  import { ForgotPasswordForm } from "./client/views/auth/forgot-password-form.mjs";
37
40
  import { LoginForm } from "./client/views/auth/login-form.mjs";
38
41
  import { ResetPasswordForm } from "./client/views/auth/reset-password-form.mjs";
@@ -46,6 +49,7 @@ import { ResetPasswordPage } from "./client/views/pages/reset-password-page.mjs"
46
49
  import { SetupPage, SetupPageProps } from "./client/views/pages/setup-page.mjs";
47
50
  import { useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions } from "./client/hooks/use-collection.mjs";
48
51
  import { useCurrentUser } from "./client/hooks/use-current-user.mjs";
52
+ import { BrandSnapshot, useBrand, useBrandSnapshotRef } from "./client/hooks/use-brand.mjs";
49
53
  import { OptionItem, UseFieldOptionsOptions, UseFieldOptionsResult, useFieldOptions } from "./client/hooks/use-field-options.mjs";
50
54
  import { useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions } from "./client/hooks/use-global.mjs";
51
55
  import { useIsDesktop, useIsMobile, useMediaQuery } from "./client/hooks/use-media-query.mjs";
@@ -100,4 +104,4 @@ type CollectionFieldKeys<TApp extends QuestpieApp, TCollectionName extends strin
100
104
  select: infer TSelect;
101
105
  } ? keyof TSelect : never : never : never;
102
106
  //#endregion
103
- export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, type AdminProviderProps, AdminRouter, type AdminRouterProps, type AdminSidebarBrandProps, type AdminSidebarNavItemProps, type AdminState, type AdminStore, type AdminToPreviewMessage, AnyQuestpieClient, type AnyWidgetConfig, type AppAdmin, 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 ChartWidgetConfig, CollectionFieldKeys, type CollectionFormViewProps, CollectionItem, type CollectionListViewProps, CollectionNames, type ComponentRegistry, ComponentRenderer, type ComponentRendererProps, type ComponentRendererRegistry, type CustomWidgetConfig, DashboardPage, EMPTY_BLOCK_CONTENT, type FieldClickedMessage, type FieldComponentProps, type FieldDefinition, type FieldInstance, type FlagConfig, type FocusContextValue, type FocusFieldMessage, FocusProvider, type FocusProviderProps, type FocusState, ForgotPasswordForm, ForgotPasswordPage, type FormViewConfig, type FormViewDefinition, type GlobalFormViewProps, GlobalNames, type I18nContext, type I18nText, type IconComponent, IconifyIcon, type IconifyIconProps, type InferAdminCMS, InvitePage, type ListViewDefinition, LoginForm, LoginPage, type MaybeLazyComponent, type OptionItem, PreviewBanner, type PreviewBannerProps, type PreviewConfig, PreviewField, type PreviewFieldProps, PreviewProvider, type PreviewReadyMessage, type PreviewRefreshMessage, type PreviewToAdminMessage, type ProgressWidgetConfig, type QuickActionsWidgetConfig, type ReactiveFieldResult, type ReactiveFieldState, type RecentItemsWidgetConfig, type RefreshCompleteMessage, ResetPasswordForm, ResetPasswordPage, 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, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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 };
107
+ export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, type AdminProviderProps, AdminRouter, type AdminRouterProps, 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 ComponentRegistry, ComponentRenderer, type ComponentRendererProps, type ComponentRendererRegistry, type CustomWidgetConfig, DashboardPage, EMPTY_BLOCK_CONTENT, type FieldClickedMessage, type FieldComponentProps, type FieldDefinition, type FieldInstance, type FlagConfig, type FocusContextValue, type FocusFieldMessage, FocusProvider, type FocusProviderProps, type FocusState, ForgotPasswordForm, ForgotPasswordPage, type FormViewConfig, type FormViewDefinition, type GlobalFormViewProps, GlobalNames, type I18nContext, type I18nText, type IconComponent, IconifyIcon, type IconifyIconProps, type InferAdminCMS, InvitePage, type ListViewDefinition, LoginForm, LoginPage, type MaybeLazyComponent, type OptionItem, PreviewBanner, type PreviewBannerProps, type PreviewConfig, PreviewField, type PreviewFieldProps, PreviewProvider, type PreviewReadyMessage, type PreviewRefreshMessage, type PreviewToAdminMessage, type ProgressWidgetConfig, type QuickActionsWidgetConfig, type ReactiveFieldResult, type ReactiveFieldState, type RecentItemsWidgetConfig, type RefreshCompleteMessage, ResetPasswordForm, ResetPasswordPage, 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, 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 };
package/dist/client.mjs CHANGED
@@ -19,7 +19,9 @@ import { useCurrentUser } from "./client/hooks/use-current-user.mjs";
19
19
  import { useReactiveFields } from "./client/hooks/use-reactive-fields.mjs";
20
20
  import { AdminLink } from "./client/components/admin-link.mjs";
21
21
  import { widget } from "./client/builder/widget/widget.mjs";
22
+ import { createAdminClient } from "./client/create-admin-client.mjs";
22
23
  import { createTypedHooks } from "./client/hooks/typed-hooks.mjs";
24
+ import { BrandLogoMark } from "./client/components/brand-logo.mjs";
23
25
  import { AdminLayout } from "./client/views/layout/admin-layout.mjs";
24
26
  import { AuthLoading } from "./client/components/auth/auth-loading.mjs";
25
27
  import { AuthGuard } from "./client/components/auth/auth-guard.mjs";
@@ -33,7 +35,8 @@ import { PreviewBanner } from "./client/preview/preview-banner.mjs";
33
35
  import { PreviewField, PreviewProvider, StandalonePreviewField, usePreviewContext } from "./client/preview/preview-field.mjs";
34
36
  import { useCollectionPreview } from "./client/preview/use-collection-preview.mjs";
35
37
  import { AcceptInviteForm } from "./client/views/auth/accept-invite-form.mjs";
36
- import { AuthLayout } from "./client/views/auth/auth-layout.mjs";
38
+ import { useBrand, useBrandSnapshotRef } from "./client/hooks/use-brand.mjs";
39
+ import { AuthDefaultLogo, AuthLayout } from "./client/views/auth/auth-layout.mjs";
37
40
  import { ForgotPasswordForm } from "./client/views/auth/forgot-password-form.mjs";
38
41
  import { LoginForm } from "./client/views/auth/login-form.mjs";
39
42
  import { ResetPasswordForm } from "./client/views/auth/reset-password-form.mjs";
@@ -51,4 +54,4 @@ import { useServerWidgetData } from "./client/hooks/use-server-widget-data.mjs";
51
54
  import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
52
55
  import { ScopePicker } from "./client/scope/picker.mjs";
53
56
 
54
- export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminRouter, AuthGuard, AuthLayout, AuthLoading, Badge, BlockRenderer, BlockScopeProvider, 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, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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 };
57
+ 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, 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 };
package/dist/index.d.mts CHANGED
@@ -6,9 +6,11 @@ import { AnyWidgetConfig, BaseWidgetConfig, ChartWidgetConfig, CustomWidgetConfi
6
6
  import { FormViewDefinition, ListViewDefinition, ViewDefinition, ViewKind, view } from "./client/builder/view/view.mjs";
7
7
  import { WidgetDefinition, widget } from "./client/builder/widget/widget.mjs";
8
8
  import { Admin, AppAdmin, InferAdminCMS } from "./client/builder/admin.mjs";
9
+ import { createAdminClient } from "./client/create-admin-client.mjs";
9
10
  import { TypedHooks, createTypedHooks } from "./client/hooks/typed-hooks.mjs";
10
11
  import { createAdminAuthClient, useAuthClient } from "./client/hooks/use-auth.mjs";
11
12
  import { ComponentRegistry, FieldComponentProps, FormViewConfig } from "./client/builder/types/field-types.mjs";
13
+ import { BrandLogoConfig, BrandingConfig } from "./client/types/admin-config.mjs";
12
14
  import { AdminProvider, AdminProviderProps, AdminState, AdminStore, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore } from "./client/runtime/provider.mjs";
13
15
  import { useShallow } from "./client/runtime/index.mjs";
14
16
  import { AdminSidebarBrandProps, AdminSidebarNavItemProps } from "./client/views/layout/admin-sidebar.mjs";
@@ -29,7 +31,8 @@ import { AuthGuard } from "./client/components/auth/auth-guard.mjs";
29
31
  import { AuthLoading } from "./client/components/auth/auth-loading.mjs";
30
32
  import { Badge, BadgeProps, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, IconifyIcon, IconifyIconProps, createIconRenderer, isComponentReference, resolveIconElement } from "./client/components/component-renderer.mjs";
31
33
  import { AcceptInviteForm } from "./client/views/auth/accept-invite-form.mjs";
32
- import { AuthLayout, AuthLayoutProps } from "./client/views/auth/auth-layout.mjs";
34
+ import { AuthDefaultLogo, AuthLayout, AuthLayoutProps } from "./client/views/auth/auth-layout.mjs";
35
+ import { BrandLogoMark, BrandLogoMarkProps } from "./client/components/brand-logo.mjs";
33
36
  import { ForgotPasswordForm } from "./client/views/auth/forgot-password-form.mjs";
34
37
  import { LoginForm } from "./client/views/auth/login-form.mjs";
35
38
  import { ResetPasswordForm } from "./client/views/auth/reset-password-form.mjs";
@@ -43,6 +46,7 @@ import { ResetPasswordPage } from "./client/views/pages/reset-password-page.mjs"
43
46
  import { SetupPage, SetupPageProps } from "./client/views/pages/setup-page.mjs";
44
47
  import { useCollectionCreate, useCollectionDelete, useCollectionItem, useCollectionList, useCollectionRestore, useCollectionRevertVersion, useCollectionUpdate, useCollectionVersions } from "./client/hooks/use-collection.mjs";
45
48
  import { useCurrentUser } from "./client/hooks/use-current-user.mjs";
49
+ import { BrandSnapshot, useBrand, useBrandSnapshotRef } from "./client/hooks/use-brand.mjs";
46
50
  import { OptionItem, UseFieldOptionsOptions, UseFieldOptionsResult, useFieldOptions } from "./client/hooks/use-field-options.mjs";
47
51
  import { useGlobal, useGlobalRevertVersion, useGlobalUpdate, useGlobalVersions } from "./client/hooks/use-global.mjs";
48
52
  import { useIsDesktop, useIsMobile, useMediaQuery } from "./client/hooks/use-media-query.mjs";
@@ -60,4 +64,4 @@ import { ScopeContextValue, ScopeOption, ScopePickerProps, ScopeProviderProps }
60
64
  import { ScopePicker } from "./client/scope/picker.mjs";
61
65
  import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
62
66
  import { AnyQuestpieClient, CollectionFieldKeys, CollectionItem, CollectionNames, GlobalNames } from "./client.mjs";
63
- export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminProviderProps, AdminRouter, AdminRouterProps, AdminSidebarBrandProps, AdminSidebarNavItemProps, AdminState, AdminStore, AdminToPreviewMessage, type AnyAdminMeta, AnyQuestpieClient, AnyWidgetConfig, AppAdmin, type ArrayFieldAdminMeta, 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, ChartWidgetConfig, CollectionFieldKeys, CollectionFormViewProps, CollectionItem, CollectionListViewProps, CollectionNames, ComponentRegistry, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, CustomWidgetConfig, DashboardPage, type DateFieldAdminMeta, EMPTY_BLOCK_CONTENT, FieldClickedMessage, FieldComponentProps, FieldDefinition, FieldInstance, FlagConfig, FocusContextValue, FocusFieldMessage, FocusProvider, FocusProviderProps, FocusState, ForgotPasswordForm, ForgotPasswordPage, FormViewConfig, FormViewDefinition, GlobalFormViewProps, GlobalNames, I18nContext, I18nText, IconComponent, IconifyIcon, IconifyIconProps, InferAdminCMS, InvitePage, type JsonFieldAdminMeta, ListViewDefinition, LoginForm, LoginPage, MaybeLazyComponent, type NumberFieldAdminMeta, type ObjectFieldAdminMeta, OptionItem, PreviewBanner, PreviewBannerProps, PreviewConfig, PreviewField, PreviewFieldProps, PreviewProvider, PreviewReadyMessage, PreviewRefreshMessage, PreviewToAdminMessage, ProgressWidgetConfig, QuickActionsWidgetConfig, ReactiveFieldResult, ReactiveFieldState, RecentItemsWidgetConfig, RefreshCompleteMessage, type RelationFieldAdminMeta, ResetPasswordForm, ResetPasswordPage, 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, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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 };
67
+ export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminProviderProps, AdminRouter, AdminRouterProps, 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, ComponentRegistry, ComponentRenderer, ComponentRendererProps, ComponentRendererRegistry, CustomWidgetConfig, DashboardPage, type DateFieldAdminMeta, EMPTY_BLOCK_CONTENT, FieldClickedMessage, FieldComponentProps, FieldDefinition, FieldInstance, FlagConfig, FocusContextValue, FocusFieldMessage, FocusProvider, FocusProviderProps, FocusState, ForgotPasswordForm, ForgotPasswordPage, FormViewConfig, FormViewDefinition, GlobalFormViewProps, GlobalNames, I18nContext, I18nText, IconComponent, IconifyIcon, IconifyIconProps, InferAdminCMS, InvitePage, type JsonFieldAdminMeta, ListViewDefinition, LoginForm, LoginPage, MaybeLazyComponent, type NumberFieldAdminMeta, type ObjectFieldAdminMeta, OptionItem, PreviewBanner, PreviewBannerProps, PreviewConfig, PreviewField, PreviewFieldProps, PreviewProvider, PreviewReadyMessage, PreviewRefreshMessage, PreviewToAdminMessage, ProgressWidgetConfig, QuickActionsWidgetConfig, ReactiveFieldResult, ReactiveFieldState, RecentItemsWidgetConfig, RefreshCompleteMessage, type RelationFieldAdminMeta, ResetPasswordForm, ResetPasswordPage, 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, 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 };
package/dist/index.mjs CHANGED
@@ -19,7 +19,9 @@ import { useCurrentUser } from "./client/hooks/use-current-user.mjs";
19
19
  import { useReactiveFields } from "./client/hooks/use-reactive-fields.mjs";
20
20
  import { AdminLink } from "./client/components/admin-link.mjs";
21
21
  import { widget } from "./client/builder/widget/widget.mjs";
22
+ import { createAdminClient } from "./client/create-admin-client.mjs";
22
23
  import { createTypedHooks } from "./client/hooks/typed-hooks.mjs";
24
+ import { BrandLogoMark } from "./client/components/brand-logo.mjs";
23
25
  import { AdminLayout } from "./client/views/layout/admin-layout.mjs";
24
26
  import { AuthLoading } from "./client/components/auth/auth-loading.mjs";
25
27
  import { AuthGuard } from "./client/components/auth/auth-guard.mjs";
@@ -33,7 +35,8 @@ import { PreviewBanner } from "./client/preview/preview-banner.mjs";
33
35
  import { PreviewField, PreviewProvider, StandalonePreviewField, usePreviewContext } from "./client/preview/preview-field.mjs";
34
36
  import { useCollectionPreview } from "./client/preview/use-collection-preview.mjs";
35
37
  import { AcceptInviteForm } from "./client/views/auth/accept-invite-form.mjs";
36
- import { AuthLayout } from "./client/views/auth/auth-layout.mjs";
38
+ import { useBrand, useBrandSnapshotRef } from "./client/hooks/use-brand.mjs";
39
+ import { AuthDefaultLogo, AuthLayout } from "./client/views/auth/auth-layout.mjs";
37
40
  import { ForgotPasswordForm } from "./client/views/auth/forgot-password-form.mjs";
38
41
  import { LoginForm } from "./client/views/auth/login-form.mjs";
39
42
  import { ResetPasswordForm } from "./client/views/auth/reset-password-form.mjs";
@@ -51,4 +54,4 @@ import { useServerWidgetData } from "./client/hooks/use-server-widget-data.mjs";
51
54
  import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
52
55
  import { ScopePicker } from "./client/scope/picker.mjs";
53
56
 
54
- export { AcceptInviteForm, AcceptInvitePage, Admin, AdminLayout, AdminLayoutProvider, AdminLink, AdminProvider, AdminRouter, AuthGuard, AuthLayout, AuthLoading, Badge, BlockRenderer, BlockScopeProvider, 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, createFormSchema, createIconRenderer, createScopedFetch, createTypedHooks, field, getCountryCode, getFlagConfig, getFlagUrl, isAdminToPreviewMessage, isBlockContent, isComponentReference, isPreviewToAdminMessage, parsePreviewFieldPath, resolveIconElement, scrollFieldIntoView, selectAdmin, selectBasePath, selectClient, selectNavigate, useAdminStore, useAuthClient, useBlockScope, 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 };
57
+ 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, 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 };
@@ -417,13 +417,31 @@ interface ServerDashboardConfig {
417
417
  refreshInterval?: number;
418
418
  }
419
419
  /**
420
- * Branding configuration for the admin panel.
420
+ * Brand logo. Either a URL string (same image both modes), an object with
421
+ * separate light/dark sources, or a server-registered component reference
422
+ * (e.g. an SVG component you ship in your own package).
423
+ */
424
+ type BrandLogo = string | {
425
+ src: string;
426
+ srcDark?: string;
427
+ alt?: string;
428
+ width?: number;
429
+ height?: number;
430
+ } | ComponentReference;
431
+ /**
432
+ * Branding configuration for the admin panel. Covers content only — name,
433
+ * logo, tagline, favicon. Visual tokens (colors, fonts, radius, shadows)
434
+ * are customized via `admin.css` overrides; see the admin theming docs.
421
435
  */
422
436
  interface ServerBrandingConfig {
423
- /** Admin panel name */
437
+ /** Admin panel name. Shown in sidebar header, document title, auth pages. */
424
438
  name?: I18nText;
425
- /** Logo configuration */
426
- logo?: unknown;
439
+ /** Logo. Renders next to the brand name in the sidebar and on auth pages. */
440
+ logo?: BrandLogo;
441
+ /** Optional sub-headline rendered on auth pages. Replaces "Built with QUESTPIE". */
442
+ tagline?: I18nText;
443
+ /** Favicon URL. Injected as `<link rel="icon">` during SSR head render. */
444
+ favicon?: string;
427
445
  }
428
446
  /**
429
447
  * Action factory for dashboard header actions.
@@ -608,4 +626,4 @@ interface DashboardCallbackContext {
608
626
  */
609
627
  type DashboardCallback = (ctx: DashboardCallbackContext) => DashboardContribution;
610
628
  //#endregion
611
- export { DashboardActionFactory, DashboardActionProxy, DashboardCallback, DashboardCallbackContext, DashboardConfigContext, DashboardContribution, DashboardItemDef, DashboardProxy, DashboardSectionDef, ServerBrandingConfig, ServerChartWidget, ServerCustomWidget, ServerDashboardAction, ServerDashboardConfig, ServerDashboardItem, ServerDashboardSection, ServerDashboardTab, ServerDashboardTabs, ServerDashboardWidget, ServerProgressWidget, ServerQuickAction, ServerQuickActionsWidget, ServerRecentItemsWidget, ServerStatsWidget, ServerTableWidget, ServerTimelineWidget, ServerValueWidget, WidgetAccessRule, WidgetFetchContext };
629
+ export { BrandLogo, DashboardActionFactory, DashboardActionProxy, DashboardCallback, DashboardCallbackContext, DashboardConfigContext, DashboardContribution, DashboardItemDef, DashboardProxy, DashboardSectionDef, ServerBrandingConfig, ServerChartWidget, ServerCustomWidget, ServerDashboardAction, ServerDashboardConfig, ServerDashboardItem, ServerDashboardSection, ServerDashboardTab, ServerDashboardTabs, ServerDashboardWidget, ServerProgressWidget, ServerQuickAction, ServerQuickActionsWidget, ServerRecentItemsWidget, ServerStatsWidget, ServerTableWidget, ServerTimelineWidget, ServerValueWidget, WidgetAccessRule, WidgetFetchContext };
@@ -229,6 +229,16 @@ interface FormFieldLayoutItem<TData = any> {
229
229
  readOnly?: boolean | FormReactiveConfig<TData, boolean>;
230
230
  disabled?: boolean | FormReactiveConfig<TData, boolean>;
231
231
  compute?: FormReactiveConfig<TData, any>;
232
+ /**
233
+ * Extra props forwarded to the field component (escape hatch for
234
+ * component-specific config like relation `filter`).
235
+ *
236
+ * @example
237
+ * ```ts
238
+ * { field: f.counselorId, props: { filter: () => ({ role: "admin" }) } }
239
+ * ```
240
+ */
241
+ props?: Record<string, any>;
232
242
  }
233
243
  /**
234
244
  * Field layout item - union of field reference or layout container.
@@ -1,7 +1,7 @@
1
1
  import { ActionReference, AdminLocaleConfig, ComponentReference, ComponentType, ComponentTypeRegistry } from "./common.mjs";
2
2
  import { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, PreviewConfig } from "./form-layout.mjs";
3
3
  import { AdminConfigContext, ComponentDefinition, ComponentFactory, EditViewDefinition, EditViewFactory, FilterViewsByKind, FormViewConfigContext, ListViewConfigContext, ListViewDefinition, ListViewFactory, ViewDefinition, ViewKind, ViewKindRegistry } from "./views.mjs";
4
- import { DashboardActionFactory, DashboardActionProxy, DashboardCallback, DashboardCallbackContext, DashboardConfigContext, DashboardContribution, DashboardItemDef, DashboardProxy, DashboardSectionDef, ServerBrandingConfig, ServerChartWidget, ServerCustomWidget, ServerDashboardAction, ServerDashboardConfig, ServerDashboardItem, ServerDashboardSection, ServerDashboardTab, ServerDashboardTabs, ServerDashboardWidget, ServerProgressWidget, ServerQuickAction, ServerQuickActionsWidget, ServerRecentItemsWidget, ServerStatsWidget, ServerTableWidget, ServerTimelineWidget, ServerValueWidget, WidgetAccessRule, WidgetFetchContext } from "./dashboard.mjs";
4
+ import { BrandLogo, DashboardActionFactory, DashboardActionProxy, DashboardCallback, DashboardCallbackContext, DashboardConfigContext, DashboardContribution, DashboardItemDef, DashboardProxy, DashboardSectionDef, ServerBrandingConfig, ServerChartWidget, ServerCustomWidget, ServerDashboardAction, ServerDashboardConfig, ServerDashboardItem, ServerDashboardSection, ServerDashboardTab, ServerDashboardTabs, ServerDashboardWidget, ServerProgressWidget, ServerQuickAction, ServerQuickActionsWidget, ServerRecentItemsWidget, ServerStatsWidget, ServerTableWidget, ServerTimelineWidget, ServerValueWidget, WidgetAccessRule, WidgetFetchContext } from "./dashboard.mjs";
5
5
  import { ServerSidebarCollectionItem, ServerSidebarConfig, ServerSidebarDividerItem, ServerSidebarGlobalItem, ServerSidebarItem, ServerSidebarLinkItem, ServerSidebarPageItem, ServerSidebarSection, SidebarCallback, SidebarCallbackContext, SidebarConfigContext, SidebarContribution, SidebarItemDef, SidebarProxy, SidebarSectionDef } from "./sidebar.mjs";
6
6
  import { ActionsConfigContext, BuiltinActionType, ServerActionContext, ServerActionDefinition, ServerActionDownload, ServerActionEffects, ServerActionError, ServerActionForm, ServerActionFormField, ServerActionFormFieldConfig, ServerActionFormFieldDefinition, ServerActionHandler, ServerActionRedirect, ServerActionResult, ServerActionSuccess, ServerActionsConfig } from "./actions.mjs";
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { ActionReference, AdminLocaleConfig, ComponentReference, ComponentType, ComponentTypeRegistry } from "./augmentation/common.mjs";
2
2
  import { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, PreviewConfig } from "./augmentation/form-layout.mjs";
3
3
  import { AdminConfigContext, ComponentDefinition, ComponentFactory, EditViewDefinition, EditViewFactory, FilterViewsByKind, FormViewConfigContext, ListViewConfigContext, ListViewDefinition, ListViewFactory, ViewDefinition, ViewKind, ViewKindRegistry } from "./augmentation/views.mjs";
4
- import { DashboardActionFactory, DashboardActionProxy, DashboardCallback, DashboardCallbackContext, DashboardConfigContext, DashboardContribution, DashboardItemDef, DashboardProxy, DashboardSectionDef, ServerBrandingConfig, ServerChartWidget, ServerCustomWidget, ServerDashboardAction, ServerDashboardConfig, ServerDashboardItem, ServerDashboardSection, ServerDashboardTab, ServerDashboardTabs, ServerDashboardWidget, ServerProgressWidget, ServerQuickAction, ServerQuickActionsWidget, ServerRecentItemsWidget, ServerStatsWidget, ServerTableWidget, ServerTimelineWidget, ServerValueWidget, WidgetAccessRule, WidgetFetchContext } from "./augmentation/dashboard.mjs";
4
+ import { BrandLogo, DashboardActionFactory, DashboardActionProxy, DashboardCallback, DashboardCallbackContext, DashboardConfigContext, DashboardContribution, DashboardItemDef, DashboardProxy, DashboardSectionDef, ServerBrandingConfig, ServerChartWidget, ServerCustomWidget, ServerDashboardAction, ServerDashboardConfig, ServerDashboardItem, ServerDashboardSection, ServerDashboardTab, ServerDashboardTabs, ServerDashboardWidget, ServerProgressWidget, ServerQuickAction, ServerQuickActionsWidget, ServerRecentItemsWidget, ServerStatsWidget, ServerTableWidget, ServerTimelineWidget, ServerValueWidget, WidgetAccessRule, WidgetFetchContext } from "./augmentation/dashboard.mjs";
5
5
  import { ServerSidebarCollectionItem, ServerSidebarConfig, ServerSidebarDividerItem, ServerSidebarGlobalItem, ServerSidebarItem, ServerSidebarLinkItem, ServerSidebarPageItem, ServerSidebarSection, SidebarCallback, SidebarCallbackContext, SidebarConfigContext, SidebarContribution, SidebarItemDef, SidebarProxy, SidebarSectionDef } from "./augmentation/sidebar.mjs";
6
6
  import { ActionsConfigContext, BuiltinActionType, ServerActionContext, ServerActionDefinition, ServerActionDownload, ServerActionEffects, ServerActionError, ServerActionForm, ServerActionFormField, ServerActionFormFieldConfig, ServerActionFormFieldDefinition, ServerActionHandler, ServerActionRedirect, ServerActionResult, ServerActionSuccess, ServerActionsConfig } from "./augmentation/actions.mjs";
7
7
  import { AdminConfigInput, adminConfig } from "./augmentation/index.mjs";