@questpie/admin 3.0.9 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/augmentation.d.mts +39 -0
  2. package/dist/client/builder/page/page.d.mts +29 -1
  3. package/dist/client/builder/types/field-types.d.mts +10 -14
  4. package/dist/client/components/fields/relation-picker.mjs +2 -2
  5. package/dist/client/components/fields/relation-select.mjs +3 -3
  6. package/dist/client/hooks/use-audit-history.mjs +10 -17
  7. package/dist/client/hooks/use-reactive-prop.mjs +308 -0
  8. package/dist/client/hooks/use-transition-stage.mjs +34 -41
  9. package/dist/client/preview/block-scope-context.d.mts +2 -2
  10. package/dist/client/preview/preview-banner.d.mts +2 -2
  11. package/dist/client/preview/preview-field.d.mts +4 -4
  12. package/dist/client/views/auth/accept-invite-form.d.mts +2 -2
  13. package/dist/client/views/auth/auth-layout.d.mts +3 -3
  14. package/dist/client/views/auth/reset-password-form.d.mts +2 -2
  15. package/dist/client/views/auth/setup-form.d.mts +2 -2
  16. package/dist/client/views/collection/field-renderer.mjs +59 -134
  17. package/dist/client/views/pages/forgot-password-page.d.mts +2 -2
  18. package/dist/client/views/pages/invite-page.d.mts +2 -2
  19. package/dist/client/views/pages/login-page.d.mts +2 -2
  20. package/dist/client/views/pages/reset-password-page.d.mts +2 -2
  21. package/dist/client/views/pages/setup-page.d.mts +2 -2
  22. package/dist/client.d.mts +2 -1
  23. package/dist/client.mjs +2 -1
  24. package/dist/components/rich-text/rich-text-renderer.d.mts +2 -2
  25. package/dist/index.d.mts +2 -1
  26. package/dist/index.mjs +2 -1
  27. package/dist/server/augmentation/form-layout.d.mts +48 -4
  28. package/dist/server/augmentation/index.d.mts +1 -1
  29. package/dist/server/augmentation.d.mts +1 -1
  30. package/dist/server/modules/admin/collections/admin-locks.d.mts +54 -54
  31. package/dist/server/modules/admin/collections/admin-preferences.d.mts +39 -39
  32. package/dist/server/modules/admin/collections/admin-saved-views.d.mts +47 -47
  33. package/dist/server/modules/admin/collections/apikey.d.mts +68 -68
  34. package/dist/server/modules/admin/collections/assets.d.mts +20 -20
  35. package/dist/server/modules/admin/collections/session.d.mts +42 -42
  36. package/dist/server/modules/admin/collections/user.d.mts +32 -32
  37. package/dist/server/modules/admin/collections/verification.d.mts +32 -32
  38. package/dist/server/modules/admin/routes/admin-config.d.mts +2 -2
  39. package/dist/server/modules/admin/routes/execute-action.d.mts +9 -9
  40. package/dist/server/modules/admin/routes/preview.d.mts +11 -11
  41. package/dist/server/modules/admin/routes/reactive.d.mts +13 -11
  42. package/dist/server/modules/admin/routes/reactive.mjs +75 -11
  43. package/dist/server/modules/admin/routes/setup.d.mts +7 -7
  44. package/dist/server/modules/admin/routes/widget-data.d.mts +5 -5
  45. package/dist/server/modules/admin-preferences/collections/saved-views.d.mts +27 -27
  46. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime21 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime23 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/preview/preview-field.d.ts
5
5
 
@@ -45,7 +45,7 @@ declare function PreviewProvider({
45
45
  fieldType?: "regular" | "block" | "relation";
46
46
  }) => void;
47
47
  children: React.ReactNode;
48
- }): react_jsx_runtime21.JSX.Element;
48
+ }): react_jsx_runtime23.JSX.Element;
49
49
  /**
50
50
  * Hook to access preview context.
51
51
  */
@@ -81,7 +81,7 @@ declare function PreviewField({
81
81
  as: Component,
82
82
  className,
83
83
  onClick
84
- }: PreviewFieldProps): react_jsx_runtime21.JSX.Element;
84
+ }: PreviewFieldProps): react_jsx_runtime23.JSX.Element;
85
85
  /**
86
86
  * Standalone PreviewField that works without context.
87
87
  * Useful when you can't use PreviewProvider.
@@ -102,6 +102,6 @@ declare function StandalonePreviewField({
102
102
  blockId?: string;
103
103
  fieldType?: "regular" | "block" | "relation";
104
104
  }) => void;
105
- }): react_jsx_runtime21.JSX.Element;
105
+ }): react_jsx_runtime23.JSX.Element;
106
106
  //#endregion
107
107
  export { PreviewField, PreviewFieldProps, PreviewProvider, StandalonePreviewField, usePreviewContext };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime2 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/accept-invite-form.d.ts
4
4
  /**
@@ -67,6 +67,6 @@ declare function AcceptInviteForm({
67
67
  className,
68
68
  error,
69
69
  minPasswordLength
70
- }: AcceptInviteFormProps): react_jsx_runtime2.JSX.Element;
70
+ }: AcceptInviteFormProps): react_jsx_runtime0.JSX.Element;
71
71
  //#endregion
72
72
  export { AcceptInviteForm };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/client/views/auth/auth-layout.d.ts
5
5
 
@@ -26,7 +26,7 @@ declare function AuthDefaultLogo({
26
26
  brandName
27
27
  }: {
28
28
  brandName: string;
29
- }): react_jsx_runtime0.JSX.Element;
29
+ }): react_jsx_runtime1.JSX.Element;
30
30
  /**
31
31
  * Minimal split layout for authentication pages (login, register, forgot password, etc.)
32
32
  *
@@ -50,6 +50,6 @@ declare function AuthDefaultLogo({
50
50
  * </AuthLayout>
51
51
  * ```
52
52
  */
53
- declare function AuthLayout(props: AuthLayoutProps): react_jsx_runtime0.JSX.Element;
53
+ declare function AuthLayout(props: AuthLayoutProps): react_jsx_runtime1.JSX.Element;
54
54
  //#endregion
55
55
  export { AuthDefaultLogo, AuthLayout, AuthLayoutProps };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime5 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime6 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/reset-password-form.d.ts
4
4
  /**
@@ -60,6 +60,6 @@ declare function ResetPasswordForm({
60
60
  minPasswordLength,
61
61
  className,
62
62
  error
63
- }: ResetPasswordFormProps): react_jsx_runtime5.JSX.Element;
63
+ }: ResetPasswordFormProps): react_jsx_runtime6.JSX.Element;
64
64
  //#endregion
65
65
  export { ResetPasswordForm };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime6 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime5 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/client/views/auth/setup-form.d.ts
4
4
  /**
@@ -55,6 +55,6 @@ declare function SetupForm({
55
55
  className,
56
56
  error,
57
57
  minPasswordLength
58
- }: SetupFormProps): react_jsx_runtime6.JSX.Element;
58
+ }: SetupFormProps): react_jsx_runtime5.JSX.Element;
59
59
  //#endregion
60
60
  export { SetupForm, SetupFormValues };
@@ -6,12 +6,19 @@ import { Skeleton } from "../../components/ui/skeleton.mjs";
6
6
  import { scopeDependencies, trackDependencies } from "../../utils/dependency-tracker.mjs";
7
7
  import { buildComponentProps, getFieldContext, getFieldOptions, getFullFieldName } from "./field-context.mjs";
8
8
  import { useFieldHooks } from "../../hooks/use-field-hooks.mjs";
9
+ import { useReactiveProps } from "../../hooks/use-reactive-prop.mjs";
9
10
  import { c } from "react/compiler-runtime";
10
- import "react";
11
+ import * as React from "react";
11
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
13
  import { useFormContext, useWatch } from "react-hook-form";
13
14
 
14
15
  //#region src/client/views/collection/field-renderer.tsx
16
+ /**
17
+ * FieldRenderer Component
18
+ *
19
+ * Renders a single form field using FieldDefinition.
20
+ * Shared between AutoFormFields and BlockEditor.
21
+ */
15
22
  function renderConfigError(message) {
16
23
  return /* @__PURE__ */ jsx("div", {
17
24
  className: "border-destructive/40 bg-destructive/5 text-destructive rounded border p-3 text-sm",
@@ -88,23 +95,19 @@ function computeDynamicDependencyPaths({ fieldOptions, form, fieldPrefix }) {
88
95
  /**
89
96
  * Render field using FieldDefinition.field.component
90
97
  *
91
- * This is the primary rendering method. Field components receive:
92
- * - Base props (name, value, onChange, label, etc.) from componentProps
93
- * - Field-specific options from FieldDefinition["~options"]
98
+ * The caller has already merged field-instance options + layout `extraProps`
99
+ * + base props (label/value/onChange/…) into `componentProps` and resolved
100
+ * any `ReactivePropPlaceholder`s via `useReactiveProps`. The component just
101
+ * receives the final flat record.
94
102
  */
95
103
  function renderDefinitionComponent({ context, componentProps, blocks }) {
96
104
  const Component = context.component;
97
105
  if (!Component) return null;
98
- const options = stripFieldUiOptions(getFieldOptions(context.fieldDef));
99
106
  if (context.type === "blocks" && blocks) return /* @__PURE__ */ jsx(Component, {
100
107
  ...componentProps,
101
- ...options,
102
108
  blocks
103
109
  });
104
- return /* @__PURE__ */ jsx(Component, {
105
- ...componentProps,
106
- ...options
107
- });
110
+ return /* @__PURE__ */ jsx(Component, { ...componentProps });
108
111
  }
109
112
  /**
110
113
  * Render embedded collection field
@@ -115,15 +118,13 @@ function renderDefinitionComponent({ context, componentProps, blocks }) {
115
118
  */
116
119
  function renderEmbeddedField({ context, registry, allCollectionsConfig, componentProps, renderEmbeddedFields }) {
117
120
  if (context.type !== "embedded") return null;
118
- const options = stripFieldUiOptions(getFieldOptions(context.fieldDef));
119
- const embeddedCollection = options.collection;
121
+ const embeddedCollection = componentProps.collection;
120
122
  if (!embeddedCollection) return renderConfigError(`Missing collection for embedded field "${context.fieldName}".`);
121
123
  const embeddedCollectionConfig = allCollectionsConfig?.[embeddedCollection];
122
124
  const EmbeddedComponent = context.component || registry?.fields?.embedded;
123
125
  if (!EmbeddedComponent) return renderConfigError(`No component found for embedded field "${context.fieldName}".`);
124
126
  return /* @__PURE__ */ jsx(EmbeddedComponent, {
125
127
  ...componentProps,
126
- ...options,
127
128
  value: context.fieldValue || [],
128
129
  collection: embeddedCollection,
129
130
  renderFields: (index) => renderEmbeddedFields?.({
@@ -142,90 +143,38 @@ function renderEmbeddedField({ context, registry, allCollectionsConfig, componen
142
143
  * 2. FieldDefinition.field.component (registry-first approach)
143
144
  * 3. Error message if no component registered
144
145
  */
145
- function FieldRenderer(t0) {
146
- const $ = c(31);
147
- const { fieldName, fieldDef, collection, mode: t1, registry, fieldPrefix, allCollectionsConfig, renderEmbeddedFields, className, entityMeta: entityMetaProp, extraProps } = t0;
148
- const mode = t1 === void 0 ? "collection" : t1;
146
+ function FieldRenderer({ fieldName, fieldDef, collection, mode = "collection", registry, fieldPrefix, allCollectionsConfig, renderEmbeddedFields, className, entityMeta: entityMetaProp, extraProps }) {
149
147
  const form = useFormContext();
150
148
  const { locale } = useScopedLocale();
151
149
  const resolveText = useResolveText();
152
150
  const { data: adminConfig } = useAdminConfig();
153
- let t2;
154
- if ($[0] !== fieldName || $[1] !== fieldPrefix) {
155
- t2 = getFullFieldName(fieldName, fieldPrefix);
156
- $[0] = fieldName;
157
- $[1] = fieldPrefix;
158
- $[2] = t2;
159
- } else t2 = $[2];
160
- const fullFieldName = t2;
161
- let t3;
162
- if ($[3] !== fieldDef) {
163
- t3 = getFieldOptions(fieldDef);
164
- $[3] = fieldDef;
165
- $[4] = t3;
166
- } else t3 = $[4];
167
- const fieldOptions = t3;
168
- let t4;
169
- if ($[5] !== fieldOptions || $[6] !== fieldPrefix || $[7] !== form) {
170
- t4 = computeDynamicDependencyPaths({
171
- fieldOptions,
172
- form,
173
- fieldPrefix
174
- });
175
- $[5] = fieldOptions;
176
- $[6] = fieldPrefix;
177
- $[7] = form;
178
- $[8] = t4;
179
- } else t4 = $[8];
180
- const dynamicDependencyPaths = t4;
181
- let t5;
182
- if ($[9] !== dynamicDependencyPaths || $[10] !== fullFieldName) {
183
- t5 = new Set([fullFieldName, ...dynamicDependencyPaths]);
184
- $[9] = dynamicDependencyPaths;
185
- $[10] = fullFieldName;
186
- $[11] = t5;
187
- } else t5 = $[11];
188
- let t6;
189
- if ($[12] !== t5) {
190
- t6 = [...t5];
191
- $[12] = t5;
192
- $[13] = t6;
193
- } else t6 = $[13];
194
- const t7 = t6;
195
- let t8;
196
- if ($[14] !== form.control || $[15] !== t7) {
197
- t8 = {
198
- control: form.control,
199
- name: t7
200
- };
201
- $[14] = form.control;
202
- $[15] = t7;
203
- $[16] = t8;
204
- } else t8 = $[16];
205
- const watchedDependencyValues = useWatch(t8);
151
+ const fullFieldName = getFullFieldName(fieldName, fieldPrefix);
152
+ const fieldOptions = React.useMemo(() => getFieldOptions(fieldDef), [fieldDef]);
153
+ const dynamicDependencyPaths = React.useMemo(() => computeDynamicDependencyPaths({
154
+ fieldOptions,
155
+ form,
156
+ fieldPrefix
157
+ }), [
158
+ fieldOptions,
159
+ form,
160
+ fieldPrefix
161
+ ]);
162
+ const watchNames = React.useMemo(() => {
163
+ return [...new Set([fullFieldName, ...dynamicDependencyPaths])];
164
+ }, [fullFieldName, dynamicDependencyPaths]);
165
+ const watchedDependencyValues = useWatch({
166
+ control: form.control,
167
+ name: watchNames
168
+ });
206
169
  const watchedFieldValue = Array.isArray(watchedDependencyValues) ? watchedDependencyValues[0] : watchedDependencyValues;
207
- let t9;
208
- bb0: {
209
- if (!fieldPrefix) {
210
- let t10$2;
211
- if ($[17] !== form) {
212
- t10$2 = form.getValues() ?? {};
213
- $[17] = form;
214
- $[18] = t10$2;
215
- } else t10$2 = $[18];
216
- t9 = t10$2;
217
- break bb0;
218
- }
219
- let t10$1;
220
- if ($[19] !== fieldPrefix || $[20] !== form) {
221
- t10$1 = form.getValues(fieldPrefix) ?? {};
222
- $[19] = fieldPrefix;
223
- $[20] = form;
224
- $[21] = t10$1;
225
- } else t10$1 = $[21];
226
- t9 = t10$1;
227
- }
228
- const formValues = t9;
170
+ const formValues = React.useMemo(() => {
171
+ if (!fieldPrefix) return form.getValues() ?? {};
172
+ return form.getValues(fieldPrefix) ?? {};
173
+ }, [
174
+ form,
175
+ fieldPrefix,
176
+ watchedDependencyValues
177
+ ]);
229
178
  const context = getFieldContext({
230
179
  fieldName,
231
180
  fieldDef,
@@ -249,21 +198,22 @@ function FieldRenderer(t0) {
249
198
  staticOptions: context.options
250
199
  });
251
200
  if (context.isHidden) return null;
252
- if (!fieldDef) {
253
- const t10$1 = `Field "${fieldName}" not found in ${mode === "global" ? "global" : "collection"} "${collection}" config.`;
254
- let t11;
255
- if ($[22] !== t10$1) {
256
- t11 = renderConfigError(t10$1);
257
- $[22] = t10$1;
258
- $[23] = t11;
259
- } else t11 = $[23];
260
- return t11;
261
- }
201
+ if (!fieldDef) return renderConfigError(`Field "${fieldName}" not found in ${mode === "global" ? "global" : "collection"} "${collection}" config.`);
262
202
  const resolvedOptions = hookOptions ?? context.options;
263
203
  const rawComponentProps = buildComponentProps(context);
204
+ const { props: resolvedFieldProps } = useReactiveProps({
205
+ entity: collection,
206
+ entityType: mode,
207
+ field: fullFieldName,
208
+ props: React.useMemo(() => ({
209
+ ...stripFieldUiOptions(getFieldOptions(fieldDef)),
210
+ ...extraProps ?? {}
211
+ }), [fieldDef, extraProps])
212
+ });
264
213
  const fieldValue = isComputed ? computedValue : watchedFieldValue === void 0 ? rawComponentProps.value : watchedFieldValue;
265
214
  const componentProps = {
266
215
  ...rawComponentProps,
216
+ ...resolvedFieldProps,
267
217
  value: fieldValue,
268
218
  onChange: handleChange,
269
219
  options: resolvedOptions,
@@ -271,8 +221,7 @@ function FieldRenderer(t0) {
271
221
  readOnly: rawComponentProps.readOnly || isComputed,
272
222
  label: resolveText(rawComponentProps.label, "", formValues),
273
223
  description: resolveText(rawComponentProps.description, "", formValues),
274
- placeholder: resolveText(rawComponentProps.placeholder, "", formValues),
275
- ...extraProps ?? {}
224
+ placeholder: resolveText(rawComponentProps.placeholder, "", formValues)
276
225
  };
277
226
  let content = null;
278
227
  if (context.type === "embedded") content = renderEmbeddedField({
@@ -294,36 +243,12 @@ function FieldRenderer(t0) {
294
243
  componentProps,
295
244
  blocks: adminConfig?.blocks
296
245
  });
297
- if (!content) {
298
- const t10$1 = `No component registered for field type "${context.type}" (field: "${context.fieldName}").`;
299
- let t11;
300
- if ($[24] !== t10$1) {
301
- t11 = renderConfigError(t10$1);
302
- $[24] = t10$1;
303
- $[25] = t11;
304
- } else t11 = $[25];
305
- content = t11;
306
- }
307
- if (className) {
308
- let t10$1;
309
- if ($[26] !== className || $[27] !== content) {
310
- t10$1 = /* @__PURE__ */ jsx("div", {
311
- className,
312
- children: content
313
- });
314
- $[26] = className;
315
- $[27] = content;
316
- $[28] = t10$1;
317
- } else t10$1 = $[28];
318
- return t10$1;
319
- }
320
- let t10;
321
- if ($[29] !== content) {
322
- t10 = /* @__PURE__ */ jsx(Fragment, { children: content });
323
- $[29] = content;
324
- $[30] = t10;
325
- } else t10 = $[30];
326
- return t10;
246
+ if (!content) content = renderConfigError(`No component registered for field type "${context.type}" (field: "${context.fieldName}").`);
247
+ if (className) return /* @__PURE__ */ jsx("div", {
248
+ className,
249
+ children: content
250
+ });
251
+ return /* @__PURE__ */ jsx(Fragment, { children: content });
327
252
  }
328
253
 
329
254
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime10 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime9 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): react_jsx_runtime10.JSX.Element;
54
+ }: ForgotPasswordPageProps): react_jsx_runtime9.JSX.Element;
55
55
  //#endregion
56
56
  export { ForgotPasswordPage };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime9 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime10 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): react_jsx_runtime9.JSX.Element;
68
+ }: InvitePageProps): react_jsx_runtime10.JSX.Element;
69
69
  //#endregion
70
70
  export { InvitePage };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime12 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime11 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): react_jsx_runtime12.JSX.Element;
67
+ }: LoginPageProps): react_jsx_runtime11.JSX.Element;
68
68
  //#endregion
69
69
  export { LoginPage };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime11 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime13 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): react_jsx_runtime11.JSX.Element;
61
+ }: ResetPasswordPageProps): react_jsx_runtime13.JSX.Element;
62
62
  //#endregion
63
63
  export { ResetPasswordPage };
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import * as react_jsx_runtime13 from "react/jsx-runtime";
2
+ import * as react_jsx_runtime12 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): react_jsx_runtime13.JSX.Element;
59
+ }: SetupPageProps): react_jsx_runtime12.JSX.Element;
60
60
  //#endregion
61
61
  export { SetupPage, SetupPageProps };
package/dist/client.d.mts CHANGED
@@ -2,6 +2,7 @@ import { BaseWidgetAdminMeta, WidgetTypeRegistry } from "./augmentation.mjs";
2
2
  import { I18nContext, I18nText } from "./client/i18n/types.mjs";
3
3
  import { BaseFieldProps, IconComponent, MaybeLazyComponent } from "./client/builder/types/common.mjs";
4
4
  import { FieldDefinition, FieldInstance, configureField, field } from "./client/builder/field/field.mjs";
5
+ import { PageDefinition, page } from "./client/builder/page/page.mjs";
5
6
  import { AnyWidgetConfig, BaseWidgetConfig, ChartWidgetConfig, CustomWidgetConfig, ProgressWidgetConfig, QuickActionsWidgetConfig, RecentItemsWidgetConfig, StatsWidgetConfig, TableWidgetConfig, TimelineWidgetConfig, ValueWidgetConfig, WidgetComponentProps, WidgetConfig } from "./client/builder/types/widget-types.mjs";
6
7
  import { FormViewDefinition, ListViewDefinition, ViewDefinition, ViewKind, view } from "./client/builder/view/view.mjs";
7
8
  import { WidgetDefinition, widget } from "./client/builder/widget/widget.mjs";
@@ -104,4 +105,4 @@ type CollectionFieldKeys<TApp extends QuestpieApp, TCollectionName extends strin
104
105
  select: infer TSelect;
105
106
  } ? keyof TSelect : never : never : never;
106
107
  //#endregion
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 };
108
+ 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, type PageDefinition, 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, 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 };
package/dist/client.mjs CHANGED
@@ -18,6 +18,7 @@ import { createAdminAuthClient, useAuthClient } from "./client/hooks/use-auth.mj
18
18
  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
+ import { page } from "./client/builder/page/page.mjs";
21
22
  import { widget } from "./client/builder/widget/widget.mjs";
22
23
  import { createAdminClient } from "./client/create-admin-client.mjs";
23
24
  import { createTypedHooks } from "./client/hooks/typed-hooks.mjs";
@@ -54,4 +55,4 @@ import { useServerWidgetData } from "./client/hooks/use-server-widget-data.mjs";
54
55
  import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
55
56
  import { ScopePicker } from "./client/scope/picker.mjs";
56
57
 
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 };
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 };
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime25 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime20 from "react/jsx-runtime";
2
2
 
3
3
  //#region src/components/rich-text/rich-text-renderer.d.ts
4
4
  /**
@@ -98,6 +98,6 @@ declare function RichTextRenderer({
98
98
  content,
99
99
  styles: customStyles,
100
100
  className
101
- }: RichTextRendererProps): react_jsx_runtime25.JSX.Element | null;
101
+ }: RichTextRendererProps): react_jsx_runtime20.JSX.Element | null;
102
102
  //#endregion
103
103
  export { RichTextRenderer, RichTextStyles, TipTapDoc, TipTapNode };
package/dist/index.d.mts CHANGED
@@ -2,6 +2,7 @@ import { AnyAdminMeta, ArrayFieldAdminMeta, BaseAdminMeta, BaseWidgetAdminMeta,
2
2
  import { I18nContext, I18nText } from "./client/i18n/types.mjs";
3
3
  import { BaseFieldProps, IconComponent, MaybeLazyComponent } from "./client/builder/types/common.mjs";
4
4
  import { FieldDefinition, FieldInstance, configureField, field } from "./client/builder/field/field.mjs";
5
+ import { PageDefinition, page } from "./client/builder/page/page.mjs";
5
6
  import { AnyWidgetConfig, BaseWidgetConfig, ChartWidgetConfig, CustomWidgetConfig, ProgressWidgetConfig, QuickActionsWidgetConfig, RecentItemsWidgetConfig, StatsWidgetConfig, TableWidgetConfig, TimelineWidgetConfig, ValueWidgetConfig, WidgetComponentProps, WidgetConfig } from "./client/builder/types/widget-types.mjs";
6
7
  import { FormViewDefinition, ListViewDefinition, ViewDefinition, ViewKind, view } from "./client/builder/view/view.mjs";
7
8
  import { WidgetDefinition, widget } from "./client/builder/widget/widget.mjs";
@@ -64,4 +65,4 @@ import { ScopeContextValue, ScopeOption, ScopePickerProps, ScopeProviderProps }
64
65
  import { ScopePicker } from "./client/scope/picker.mjs";
65
66
  import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
66
67
  import { AnyQuestpieClient, CollectionFieldKeys, CollectionItem, CollectionNames, GlobalNames } from "./client.mjs";
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 };
68
+ 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, PageDefinition, 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, 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 };
package/dist/index.mjs CHANGED
@@ -18,6 +18,7 @@ import { createAdminAuthClient, useAuthClient } from "./client/hooks/use-auth.mj
18
18
  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
+ import { page } from "./client/builder/page/page.mjs";
21
22
  import { widget } from "./client/builder/widget/widget.mjs";
22
23
  import { createAdminClient } from "./client/create-admin-client.mjs";
23
24
  import { createTypedHooks } from "./client/hooks/typed-hooks.mjs";
@@ -54,4 +55,4 @@ import { useServerWidgetData } from "./client/hooks/use-server-widget-data.mjs";
54
55
  import { ScopeProvider, createScopedFetch, useScope, useScopeSafe, useScopedFetch } from "./client/scope/provider.mjs";
55
56
  import { ScopePicker } from "./client/scope/picker.mjs";
56
57
 
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 };
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 };
@@ -219,6 +219,20 @@ interface FormTabsLayout {
219
219
  type: "tabs";
220
220
  tabs: FormTabConfig[];
221
221
  }
222
+ /**
223
+ * Per-prop value type for `FormFieldLayoutItem.props` — accepts JSON, a
224
+ * handler function, or a `{ handler, deps?, debounce? }` config.
225
+ *
226
+ * Functions / config objects are resolved server-side via the
227
+ * `/admin/reactive` `prop` endpoint; static JSON is shipped through
228
+ * introspection unchanged. See `FormFieldLayoutItem.props` for the
229
+ * full description.
230
+ */
231
+ type FormReactivePropValue<TData = any> = unknown | ((ctx: FormReactiveContext<TData>) => unknown | Promise<unknown>) | {
232
+ handler: (ctx: FormReactiveContext<TData>) => unknown | Promise<unknown>;
233
+ deps?: string[] | ((ctx: FormReactiveContext<TData>) => any[]);
234
+ debounce?: number;
235
+ };
222
236
  /**
223
237
  * Field entry with optional reactive form behavior.
224
238
  */
@@ -233,12 +247,42 @@ interface FormFieldLayoutItem<TData = any> {
233
247
  * Extra props forwarded to the field component (escape hatch for
234
248
  * component-specific config like relation `filter`).
235
249
  *
236
- * @example
250
+ * Each prop value can be:
251
+ * - **Static JSON** (string, number, boolean, array, object) — passed
252
+ * through introspection unchanged and given to the field component
253
+ * as-is. Use this when the value doesn't depend on form state.
254
+ * - **A function** `(ctx) => T` — stays on the server. Introspection
255
+ * emits a `ReactivePropPlaceholder` in its place; the client resolves
256
+ * the value via `/admin/reactive` (type `"prop"`) whenever the
257
+ * tracked dependencies change.
258
+ * - **A `{ handler, deps?, debounce? }` config** — same as a function
259
+ * but with explicit dependency control + debouncing.
260
+ *
261
+ * @example Static
262
+ * ```ts
263
+ * { field: f.counselorId, props: { filter: { role: "admin" } } }
264
+ * ```
265
+ *
266
+ * @example Reactive (deps inferred from handler)
267
+ * ```ts
268
+ * { field: f.author, props: { filter: ({ data }) => ({ team: data.team }) } }
269
+ * ```
270
+ *
271
+ * @example Reactive with explicit deps + debounce
237
272
  * ```ts
238
- * { field: f.counselorId, props: { filter: () => ({ role: "admin" }) } }
273
+ * {
274
+ * field: f.author,
275
+ * props: {
276
+ * filter: {
277
+ * handler: ({ data }) => ({ team: data.team }),
278
+ * deps: ["team"],
279
+ * debounce: 200,
280
+ * },
281
+ * },
282
+ * }
239
283
  * ```
240
284
  */
241
- props?: Record<string, any>;
285
+ props?: Record<string, FormReactivePropValue<TData>>;
242
286
  }
243
287
  /**
244
288
  * Field layout item - union of field reference or layout container.
@@ -331,4 +375,4 @@ interface AdminGlobalConfig {
331
375
  audit?: boolean;
332
376
  }
333
377
  //#endregion
334
- export { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, PreviewConfig };
378
+ export { AdminBlockConfig, AdminCollectionConfig, AdminGlobalConfig, BlockCategoryConfig, FieldLayoutItem, FormFieldLayoutItem, FormReactiveConfig, FormReactiveContext, FormReactivePropValue, FormSectionLayout, FormSidebarConfig, FormTabConfig, FormTabsLayout, FormViewConfig, ListViewConfig, PreviewConfig };