@riverbankcms/sdk 0.78.0 → 0.78.2

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 (152) hide show
  1. package/README.md +45 -43
  2. package/dist/{PreviewEditorSidebar-RIKFQ72L.mjs → PreviewEditorSidebar-4DXLYX2V.mjs} +29 -21
  3. package/dist/{PreviewEditorUI-XO7TUWKK.mjs → PreviewEditorUI-CS5P4N3P.mjs} +4 -4
  4. package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -0
  6. package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
  7. package/dist/_dts/api/src/endpoints.d.ts +9 -0
  8. package/dist/_dts/api/src/index.d.ts +3 -3
  9. package/dist/_dts/api/src/public/types.d.ts +1 -1
  10. package/dist/_dts/api/src/request.d.ts +3 -11
  11. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -0
  12. package/dist/_dts/api/src/sdkContracts.d.ts +7 -1
  13. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -0
  14. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -0
  15. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +15 -19
  16. package/dist/_dts/api/src/types.d.ts +11 -26
  17. package/dist/_dts/block-form/src/fields/types.d.ts +6 -0
  18. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +3 -2
  19. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +6 -3
  20. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +8 -3
  21. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -1
  22. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLinearRepeaterDnd.d.ts +1 -0
  23. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -0
  24. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.d.ts +7 -0
  25. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +1 -0
  26. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/index.d.ts +3 -1
  27. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
  28. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.d.ts +15 -0
  29. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +50 -0
  30. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +591 -0
  31. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +591 -0
  32. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +591 -0
  33. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +591 -0
  34. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +591 -0
  35. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +591 -0
  36. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +591 -0
  37. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -0
  38. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -0
  39. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +591 -0
  40. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +591 -0
  41. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +591 -0
  42. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
  43. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +164 -0
  44. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
  45. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +1 -1
  46. package/dist/_dts/content-editor/src/index.d.ts +1 -1
  47. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -2
  48. package/dist/_dts/content-model/src/content-types/schema.d.ts +14 -0
  49. package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +3 -1
  50. package/dist/_dts/content-model/src/templates/bindingValidation.d.ts +10 -4
  51. package/dist/_dts/content-model/src/templates/fieldPaths.d.ts +20 -0
  52. package/dist/_dts/content-model/src/templates/manifestAdapter.d.ts +5 -2
  53. package/dist/_dts/core/src/branded.d.ts +108 -85
  54. package/dist/_dts/core/src/csv-types.d.ts +2 -2
  55. package/dist/_dts/core/src/editor-state.d.ts +7 -7
  56. package/dist/_dts/core/src/participants.d.ts +2 -2
  57. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +11 -0
  58. package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
  59. package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -1
  60. package/dist/_dts/media-editor/src/MediaPreview.d.ts +3 -1
  61. package/dist/_dts/media-editor/src/fieldUi.d.ts +5 -0
  62. package/dist/_dts/media-editor/src/index.d.ts +1 -1
  63. package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +1 -1
  64. package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +2 -0
  65. package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +3 -3
  66. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +7 -0
  67. package/dist/_dts/sdk/src/cli/commands/push.d.ts +2 -0
  68. package/dist/_dts/sdk/src/cli/content/reader.d.ts +13 -0
  69. package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -1
  70. package/dist/_dts/sdk/src/cli/helpers.d.ts +2 -0
  71. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +6 -6
  72. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +5 -0
  73. package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +4 -0
  74. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +5 -2
  75. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +10 -1
  76. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +1 -1
  77. package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
  78. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  79. package/dist/_dts/sdk/src/config/content-types.d.ts +7 -0
  80. package/dist/_dts/sdk/src/config/field-definitions.d.ts +2 -0
  81. package/dist/_dts/sdk/src/version.d.ts +1 -1
  82. package/dist/_dts/site-commands/src/commands.d.ts +3 -0
  83. package/dist/{altcha-B5XGSXP5.mjs → altcha-EKUEQ4RP.mjs} +1 -1
  84. package/dist/{chunk-NIDXI46P.mjs → chunk-4QEGTLK6.mjs} +1 -1
  85. package/dist/{chunk-TXDES5P2.mjs → chunk-6HYXHRAI.mjs} +5 -5
  86. package/dist/{chunk-SVMMM2NA.mjs → chunk-CR5HKAGU.mjs} +24 -5
  87. package/dist/{chunk-OECWLDHN.mjs → chunk-MCRQMPET.mjs} +1030 -588
  88. package/dist/{chunk-SXOLGNMX.mjs → chunk-OKMBEAXY.mjs} +1 -1
  89. package/dist/{chunk-XGB3TDIC.mjs → chunk-R7POPVJR.mjs} +2 -8
  90. package/dist/{chunk-F7RTCZYN.mjs → chunk-RGTOD4AJ.mjs} +20 -14
  91. package/dist/cli/index.mjs +681 -225
  92. package/dist/cli/init-docs/content/cli-reference.md +3 -2
  93. package/dist/cli/init-docs/content/content-management.md +2 -2
  94. package/dist/cli/init-docs/content/workflow-preview-mode.md +68 -2
  95. package/dist/client/{accordion-EVDEOUPR.mjs → accordion-PLYNJIIM.mjs} +2 -2
  96. package/dist/client/analytics.mjs +1 -1
  97. package/dist/client/{bookingForm-DIHBLC64.mjs → bookingForm-BXAP6AO7.mjs} +55 -48
  98. package/dist/client/bookings.mjs +62 -55
  99. package/dist/client/{carousel-FEBQHIWI.mjs → carousel-TRBXDHGF.mjs} +3 -3
  100. package/dist/client/{cart-7CKSXAE4.mjs → cart-Z7H3HJRS.mjs} +7 -7
  101. package/dist/client/{checkout-WKYCANLV.mjs → checkout-WAFCUBIX.mjs} +7 -7
  102. package/dist/client/{chunk-OFMSCGNY.mjs → chunk-75OUS5MT.mjs} +2 -2
  103. package/dist/client/{chunk-IVNCUVAV.mjs → chunk-AUJ5DBZJ.mjs} +18 -18
  104. package/dist/client/{chunk-36WJCERQ.mjs → chunk-CE7IBGVW.mjs} +3 -1
  105. package/dist/client/{chunk-RZDWX7QW.mjs → chunk-CWGTG37I.mjs} +1 -1
  106. package/dist/client/{chunk-YDSEG6GZ.mjs → chunk-DNRGY432.mjs} +2 -2
  107. package/dist/client/{chunk-RV6FX7UH.mjs → chunk-FUXW6VW2.mjs} +9 -9
  108. package/dist/client/{chunk-65F47D7Y.mjs → chunk-JGXPTEI2.mjs} +43 -36
  109. package/dist/client/{chunk-GUK2FPXQ.mjs → chunk-JRDUHZCT.mjs} +37 -15
  110. package/dist/client/{chunk-VPPMNXCF.mjs → chunk-UVQEJJTN.mjs} +2 -2
  111. package/dist/client/{chunk-F7LHOKEH.mjs → chunk-XSV6KW4D.mjs} +1 -1
  112. package/dist/client/{chunk-PD6NBCEY.mjs → chunk-ZFHRN6W2.mjs} +1 -1
  113. package/dist/client/{chunk-2SAVKN2M.mjs → chunk-ZI3LLBPZ.mjs} +2 -2
  114. package/dist/client/client.mjs +249 -160
  115. package/dist/client/{courseRegistration-5QF2PHKM.mjs → courseRegistration-AHFQHWIJ.mjs} +10 -10
  116. package/dist/client/{eventCalendar-4ZOSETDU.mjs → eventCalendar-LDXTV5R7.mjs} +9 -9
  117. package/dist/client/{eventCombined-WQGU7JUX.mjs → eventCombined-A4JGTNJO.mjs} +9 -9
  118. package/dist/client/{eventDetails-AYWVUJ5Y.mjs → eventDetails-4YXTZ7EG.mjs} +9 -9
  119. package/dist/client/{eventListing-NT7C6UT5.mjs → eventListing-P72TPFFM.mjs} +9 -9
  120. package/dist/client/{eventRegistration-OH24F4ZJ.mjs → eventRegistration-LSYJHGMT.mjs} +9 -9
  121. package/dist/client/{form-7L42SRBB.mjs → form-AOPYOKOW.mjs} +6 -3
  122. package/dist/client/{headerSection-OZRZNZ52.mjs → headerSection-5TFYDFVQ.mjs} +3 -3
  123. package/dist/client/hooks.mjs +78 -48
  124. package/dist/client/{locationMap-ZBXRPQ7C.mjs → locationMap-QSZ3ZVAZ.mjs} +3 -3
  125. package/dist/client/{newsletterForm-SNAGFF2I.mjs → newsletterForm-KTRHZY52.mjs} +2 -2
  126. package/dist/client/{productDetail-I46BOFGV.mjs → productDetail-N4E775RG.mjs} +7 -7
  127. package/dist/client/{productList-BOYHTYI6.mjs → productList-UGUQ2S45.mjs} +7 -7
  128. package/dist/client/rendering/client.mjs +173 -131
  129. package/dist/client/rendering/islands.mjs +19 -19
  130. package/dist/client/rendering.mjs +230 -150
  131. package/dist/client/{shop-XTXPZTKR.mjs → shop-VHSZEEQ2.mjs} +7 -7
  132. package/dist/preview-next/before-render.mjs +10 -1
  133. package/dist/preview-next/client/runtime.mjs +6 -6
  134. package/dist/preview-next/middleware.mjs +10 -1
  135. package/dist/preview-next/tailwind-sources.css +1 -0
  136. package/dist/sdk-runtime-WHPJEF5G.mjs +8 -0
  137. package/dist/server/components.mjs +101 -54
  138. package/dist/server/config-template-validation.mjs +221 -15
  139. package/dist/server/config-validation.mjs +76 -42
  140. package/dist/server/config.mjs +76 -42
  141. package/dist/server/data.mjs +77 -47
  142. package/dist/server/index.mjs +31 -10
  143. package/dist/server/next.mjs +133 -71
  144. package/dist/server/page-converter.mjs +60 -40
  145. package/dist/server/prebuild.mjs +1 -1
  146. package/dist/server/rendering/server.mjs +107 -60
  147. package/dist/server/rendering.mjs +111 -61
  148. package/dist/server/routing.mjs +93 -63
  149. package/dist/server/server.mjs +102 -57
  150. package/package.json +1 -1
  151. package/dist/SdkPreviewModeRuntime-LAGYMPNF.mjs +0 -8
  152. package/dist/sdk-runtime-ZJLKC6DR.mjs +0 -8
@@ -5,7 +5,7 @@ import type { PageDesignEditorReadModel, PageDesignIntent, AppearancePresetId, B
5
5
  import type { ButtonPersonalityId } from '../../theme-core/src/buttons/index';
6
6
  import type { PaletteOverrides, PaletteVariantId } from '../../theme-core/src/palette/index';
7
7
  import type { APIEndpoint } from './apiEndpointTypes';
8
- import type { AnalyticsReportFilters, AnalyticsReportResponse } from './analytics';
8
+ import type { AnalyticsReportQuery, AnalyticsReportResponse } from './analytics';
9
9
  import type { CreateMediaAssetBody, MediaAssetResponse, MediaAssetFileFilterContract, MediaBulkDeleteResponse, MediaClassifyJobResponse, MediaJobSummaryResponse, MediaLabelSummary, MediaSettingsResponse } from './media';
10
10
  import type { MediaUsageCheckResponse } from './shared-contracts';
11
11
  import type { BlockWithContentResponse, BlockListItem, ContentEntryListStage, ListPublishedEntriesResponse, PageDraftRecord, PublishedBlockBaseline, PublishedContentEntryPreviewResponse, PublishedPostPreviewResponse, SdkBlockContent, SdkRuntimeContentByPathResponse, SdkTemplate, SiteBySlugResponse, ThemeGenerationTurn, ThemePreferencesRecord, ThemeRow } from './contentRuntime';
@@ -181,7 +181,7 @@ export type SiteRuntimeAPIEndpoints = {
181
181
  type: string;
182
182
  limit?: string;
183
183
  offset?: string;
184
- order?: 'published_at.asc' | 'published_at.desc' | 'title.asc' | 'title.desc' | 'updated_at.asc' | 'updated_at.desc';
184
+ order?: 'published_at.asc' | 'published_at.desc' | 'title.asc' | 'title.desc' | 'manual.asc' | 'updated_at.asc' | 'updated_at.desc';
185
185
  stage?: ContentEntryListStage;
186
186
  meta?: string;
187
187
  mode?: 'manual';
@@ -337,26 +337,24 @@ export type SiteRuntimeAPIEndpoints = {
337
337
  }>;
338
338
  }>;
339
339
  createInstagramZipUploadUrl: APIEndpoint<CreateInstagramZipUploadUrlRequest, never, CreateInstagramZipUploadUrlResponse>;
340
- getAnalyticsReport: APIEndpoint<AnalyticsReportFilters, {
341
- siteId: string;
342
- } & AnalyticsReportFilters, AnalyticsReportResponse>;
340
+ getAnalyticsReport: APIEndpoint<never, AnalyticsReportQuery, AnalyticsReportResponse>;
343
341
  createMediaAsset: APIEndpoint<CreateMediaAssetBody, undefined, MediaAssetResponse>;
344
- mediaList: APIEndpoint<{
342
+ mediaList: APIEndpoint<never, {
345
343
  siteId: string;
346
344
  q?: string;
347
345
  limit?: number;
348
346
  offset?: number;
349
347
  labels?: string;
350
348
  fileFilter?: MediaAssetFileFilterContract;
351
- }, never, ListMediaAssetsResult>;
352
- mediaProductFileList: APIEndpoint<{
349
+ }, ListMediaAssetsResult>;
350
+ mediaProductFileList: APIEndpoint<never, {
353
351
  siteId: string;
354
352
  q?: string;
355
353
  limit?: number;
356
354
  offset?: number;
357
355
  labels?: string;
358
356
  fileFilter?: MediaAssetFileFilterContract;
359
- }, never, ListMediaAssetsResult>;
357
+ }, ListMediaAssetsResult>;
360
358
  mediaGet: APIEndpoint<never, {
361
359
  assetId: string;
362
360
  }, MediaAssetWithLabels>;
@@ -544,17 +542,15 @@ export type SiteRuntimeAPIEndpoints = {
544
542
  siteId: string;
545
543
  pageId: string;
546
544
  }, ApplyPageDesignEditorActionResponse>;
547
- getContentByPath: APIEndpoint<{
545
+ getContentByPath: APIEndpoint<never, {
546
+ siteId: string;
548
547
  path: string;
549
548
  preview?: boolean;
550
- }, {
551
- siteId: string;
552
549
  }, SdkRuntimeContentByPathResponse>;
553
- getPageByPath: APIEndpoint<{
550
+ getPageByPath: APIEndpoint<never, {
551
+ siteId: string;
554
552
  path: string;
555
553
  preview?: boolean;
556
- }, {
557
- siteId: string;
558
554
  }, SdkRuntimeContentByPathResponse>;
559
555
  initSiteContent: APIEndpoint<{}, {
560
556
  siteId: string;
@@ -563,9 +559,9 @@ export type SiteRuntimeAPIEndpoints = {
563
559
  created: number;
564
560
  totalBlocks: number;
565
561
  }>;
566
- getMediaLabels: APIEndpoint<{
562
+ getMediaLabels: APIEndpoint<never, {
567
563
  siteId: string;
568
- }, never, {
564
+ }, {
569
565
  items: MediaLabelSummary[];
570
566
  }>;
571
567
  getMediaSettings: APIEndpoint<never, {
@@ -643,11 +639,11 @@ export type SiteRuntimeAPIEndpoints = {
643
639
  summary?: MediaJobSummaryResponse;
644
640
  }>;
645
641
  }>;
646
- mediaJobsStatus: APIEndpoint<{
642
+ mediaJobsStatus: APIEndpoint<never, {
647
643
  siteId: string;
648
644
  limit?: number;
649
645
  statuses?: string;
650
- }, never, {
646
+ }, {
651
647
  jobs: MediaClassifyJobResponse[];
652
648
  }>;
653
649
  devToolsImpersonateAdmin: APIEndpoint<undefined, never, DevToolsImpersonationResponse>;
@@ -1,4 +1,5 @@
1
1
  import type { CamelizeKeys, DbDatabase, DbRow } from "../../db/src/index";
2
+ import type { APIEndpoint } from "./apiEndpointTypes";
2
3
  export type { AccessPolicyContract, AccessPolicyTag, CreateMediaAssetBody, EntitledCustomerAccessScopeContract, FileKindContract, FileKindTag, FileUseContract, FileUseTag, ImageFileFormat, MediaAssetResponse, MediaAssetFileFilterContract, MediaBulkDeleteAssetFailure, MediaBulkDeleteResponse, MediaClassifyJobResponse, MediaJobSummaryResponse, MediaLabelSummary, MediaSettingsResponse, RenderableFileKindTag, StorageClass, UploadIntentContract, UploadIntentTag, } from "./media";
3
4
  export type { AnalyticsPreset, AnalyticsReferrer, AnalyticsReportFilters, AnalyticsReportQuery, AnalyticsReportResponse, AnalyticsSeriesPoint, AnalyticsTopPage, AnalyticsTotals, } from "./analytics";
4
5
  export type { AIChatMessage, AiBriefTurn, JsonPrimitive, JsonValue, MediaUsageCheckItem, MediaUsageCheckResponse, MediaUsageLocation, } from "./shared-contracts";
@@ -121,48 +122,32 @@ type EndpointPath<E extends keyof APIEndpoints> = E extends keyof typeof API_END
121
122
  type PathParams<E extends keyof APIEndpoints> = ExtractPathParamNames<EndpointPath<E>> extends infer TParam ? [TParam] extends [never] ? {} : {
122
123
  [K in Extract<TParam, string>]: string;
123
124
  } : {};
124
- type QueryParams<E extends keyof APIEndpoints> = IsNonEmptyQuery<APIEndpoints[E]["query"]> extends false ? {} : QueryToStringParams<APIEndpoints[E]["query"]>;
125
+ type EndpointQuery<E extends keyof APIEndpoints> = APIEndpoints[E] extends APIEndpoint<unknown, infer TQuery, unknown> ? TQuery : never;
126
+ type QueryParams<E extends keyof APIEndpoints> = IsNonEmptyQuery<EndpointQuery<E>> extends false ? {} : QueryToStringParams<EndpointQuery<E>>;
125
127
  type HasPathParams<E extends keyof APIEndpoints> = keyof PathParams<E> extends never ? false : true;
126
128
  type ParamsPart<E extends keyof APIEndpoints> = HasPathParams<E> extends true ? {
127
129
  params: PathParams<E> & QueryParams<E>;
128
- } : IsNonEmptyQuery<APIEndpoints[E]["query"]> extends false ? {
130
+ } : IsNonEmptyQuery<EndpointQuery<E>> extends false ? {
129
131
  params?: Record<string, string>;
130
- } : HasRequiredKeys<APIEndpoints[E]["query"]> extends true ? {
132
+ } : HasRequiredKeys<EndpointQuery<E>> extends true ? {
131
133
  params: QueryParams<E>;
132
134
  } : {
133
135
  params?: QueryParams<E>;
134
136
  };
135
- export type APICallParams<E extends keyof APIEndpoints> = APIEndpoints[E] extends {
136
- method: "GET";
137
- } ? {
138
- endpoint: E;
139
- body?: APIEndpoints[E]["body"];
140
- options?: RequestInit;
141
- } & ParamsPart<E> : APIEndpoints[E] extends {
142
- method: "POST" | "PUT" | "PATCH";
143
- } ? {
144
- endpoint: E;
145
- body: APIEndpoints[E]["body"];
146
- options?: RequestInit;
147
- } & ParamsPart<E> : {
148
- endpoint: E;
149
- body?: APIEndpoints[E]["body"];
150
- options?: RequestInit;
151
- } & ParamsPart<E>;
152
137
  type EndpointMethod<E extends keyof APIEndpoints> = E extends keyof typeof API_ENDPOINTS ? (typeof API_ENDPOINTS)[E]["method"] : HTTPMethod;
153
- type EndpointBody<E extends keyof APIEndpoints> = APIEndpoints[E]["body"];
138
+ type EndpointBody<E extends keyof APIEndpoints> = APIEndpoints[E] extends APIEndpoint<infer TBody, unknown, unknown> ? TBody : never;
154
139
  type StrictBodyPart<E extends keyof APIEndpoints> = EndpointMethod<E> extends "GET" ? {
155
140
  body?: never;
156
141
  } : [EndpointBody<E>] extends [never | undefined] ? {
157
142
  body?: never;
143
+ } : undefined extends EndpointBody<E> ? {
144
+ body?: Exclude<EndpointBody<E>, undefined>;
158
145
  } : {
159
- body: NonNullable<EndpointBody<E>>;
146
+ body: EndpointBody<E>;
160
147
  };
161
148
  /**
162
- * Strict variant of APICallParams that uses endpoint metadata (method + body type)
163
- * to enforce whether `body` is required/forbidden.
164
- *
165
- * Intended for new code. Existing code can continue using APICallParams until migrated.
149
+ * API call parameters derived from endpoint metadata.
150
+ * Enforces whether `body` is required, optional, or forbidden for each endpoint.
166
151
  */
167
152
  export type APICallParamsStrict<E extends keyof APIEndpoints> = {
168
153
  endpoint: E;
@@ -170,6 +170,12 @@ export type RepeaterFieldConfig = BaseFieldConfig & ({
170
170
  * Useful for complex constraints that aren't expressible via field-level config.
171
171
  */
172
172
  validation?: ZodTypeAny;
173
+ /** Whether compact row summaries should be rendered. Defaults to true. */
174
+ showSummary?: boolean;
175
+ /** Optional ordered field IDs to use for compact row summaries. */
176
+ summaryFields?: string[];
177
+ /** Optional positive max character count for compact row summaries. */
178
+ summaryMaxChars?: number;
173
179
  } & ({
174
180
  type: 'repeater';
175
181
  itemLabel?: string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Repeater list - DnD context wrapper for sortable items
3
3
  */
4
- import type { ReactNode } from 'react';
4
+ import { type ReactNode, type RefObject } from 'react';
5
5
  import type { RepeaterFieldConfig, FieldConfig } from '../../../fields/types';
6
6
  import type { FormBackend } from '../../../backend/types';
7
7
  export interface RepeaterListProps {
@@ -15,5 +15,6 @@ export interface RepeaterListProps {
15
15
  onMove: (from: number, to: number) => void;
16
16
  onRemove: (index: number) => void;
17
17
  renderChild: (field: FieldConfig, path: string) => ReactNode;
18
+ focusFallbackRef?: RefObject<HTMLButtonElement | null>;
18
19
  }
19
- export declare function RepeaterList({ config, backend, basePath, items, minItems, onMove, onRemove, renderChild, }: RepeaterListProps): ReactNode;
20
+ export declare function RepeaterList({ config, backend, basePath, items, minItems, onMove, onRemove, renderChild, focusFallbackRef, }: RepeaterListProps): ReactNode;
@@ -4,9 +4,10 @@
4
4
  *
5
5
  * Routes non-content item fields into a settings modal in the row header.
6
6
  */
7
- import type { ReactNode } from 'react';
7
+ import type { ReactNode, Ref } from 'react';
8
8
  import type { RepeaterFieldConfig, FieldConfig } from '../../../fields/types';
9
9
  import type { FormBackend } from '../../../backend/types';
10
+ import type { RepeaterRowActionFocusTarget } from './RepeaterRowActions';
10
11
  export interface RepeaterRowProps {
11
12
  id: string;
12
13
  index: number;
@@ -15,9 +16,11 @@ export interface RepeaterRowProps {
15
16
  basePath: string;
16
17
  itemsLength: number;
17
18
  minItems: number;
18
- onMove: (from: number, to: number) => void;
19
+ containerWidth: number;
20
+ onMove: (from: number, to: number, focusTarget: RepeaterRowActionFocusTarget) => void;
19
21
  onRemove: (index: number) => void;
20
22
  renderChild: (field: FieldConfig, path: string) => ReactNode;
21
23
  canDrag: boolean;
24
+ actionControlRefs?: Partial<Record<RepeaterRowActionFocusTarget, Ref<HTMLButtonElement>>>;
22
25
  }
23
- export declare function RepeaterRow({ id, index, config, backend, basePath, itemsLength, minItems, onMove, onRemove, renderChild, canDrag, }: RepeaterRowProps): ReactNode;
26
+ export declare function RepeaterRow({ id, index, config, backend, basePath, itemsLength, minItems, containerWidth, onMove, onRemove, renderChild, canDrag, actionControlRefs, }: RepeaterRowProps): ReactNode;
@@ -1,16 +1,21 @@
1
1
  /**
2
- * Repeater row action buttons - move up/down, delete
2
+ * Repeater row action controls - direct reorder buttons plus compact menu.
3
3
  */
4
- import type { ReactNode } from 'react';
4
+ import type { ReactNode, Ref } from 'react';
5
5
  export interface RepeaterRowActionsProps {
6
6
  index: number;
7
7
  itemsLength: number;
8
8
  minItems: number;
9
+ containerWidth?: number;
10
+ actionPresentation?: 'auto' | 'wide' | 'compact';
11
+ itemLabel: string;
9
12
  onMoveUp: () => void;
10
13
  onMoveDown: () => void;
11
14
  onRemove: () => void;
15
+ actionControlRefs?: Partial<Record<RepeaterRowActionFocusTarget, Ref<HTMLButtonElement>>>;
12
16
  showReorderActions?: boolean;
13
17
  disableMoveUp?: boolean;
14
18
  disableMoveDown?: boolean;
15
19
  }
16
- export declare function RepeaterRowActions({ index, itemsLength, minItems, onMoveUp, onMoveDown, onRemove, showReorderActions, disableMoveUp, disableMoveDown, }: RepeaterRowActionsProps): ReactNode;
20
+ export type RepeaterRowActionFocusTarget = 'moveEarlier' | 'moveLater' | 'menu';
21
+ export declare function RepeaterRowActions({ index, itemsLength, minItems, containerWidth, actionPresentation, itemLabel, onMoveUp, onMoveDown, onRemove, actionControlRefs, showReorderActions, disableMoveUp, disableMoveDown, }: RepeaterRowActionsProps): ReactNode;
@@ -1,6 +1,6 @@
1
1
  export { useRepeaterVisibility } from './useRepeaterVisibility';
2
2
  export { useRepeaterRowErrors, type RowFieldError } from './useRepeaterRowErrors';
3
- export { useResolvedItemLabel } from './useResolvedItemLabel';
3
+ export { useResolvedItemLabel, useResolvedRepeaterItemLabel, type ResolvedRepeaterItemLabel, } from './useResolvedItemLabel';
4
4
  export { useLayoutGridCapacity } from './useLayoutGridCapacity';
5
5
  export { useLinearRepeaterDnd, type LinearRepeaterSortingStrategyKind } from './useLinearRepeaterDnd';
6
6
  export { useRepeaterPointerDragCapability } from './useRepeaterPointerDragCapability';
@@ -10,6 +10,7 @@ interface UseLinearRepeaterDndInput {
10
10
  }
11
11
  export interface UseLinearRepeaterDndResult {
12
12
  containerRef: ReturnType<typeof useRepeaterPointerDragCapability>['containerRef'];
13
+ containerWidth: ReturnType<typeof useRepeaterPointerDragCapability>['containerWidth'];
13
14
  breakpoint: ReturnType<typeof useRepeaterPointerDragCapability>['breakpoint'];
14
15
  pointerDragCapability: ReturnType<typeof useRepeaterPointerDragCapability>['pointerDragCapability'];
15
16
  canUsePointerDrag: boolean;
@@ -3,6 +3,7 @@ import { resolveRepeaterGridBreakpointForWidth } from '../../../../../blocks/src
3
3
  import { type RepeaterPointerDragCapability } from '../utils';
4
4
  export interface UseRepeaterPointerDragCapabilityResult {
5
5
  containerRef: RefObject<HTMLDivElement | null>;
6
+ containerWidth: number;
6
7
  breakpoint: ReturnType<typeof resolveRepeaterGridBreakpointForWidth>;
7
8
  pointerDragCapability: RepeaterPointerDragCapability;
8
9
  canUsePointerDrag: boolean;
@@ -1,5 +1,11 @@
1
1
  import type { RepeaterFieldConfig } from '../../../fields/types';
2
2
  import type { FormBackend } from '../../../backend/types';
3
+ import { type RepeaterLabelSource } from '../utils';
4
+ export type ResolvedRepeaterItemLabel = {
5
+ label: string;
6
+ sourceFieldId?: string;
7
+ labelSource: RepeaterLabelSource;
8
+ };
3
9
  /**
4
10
  * Resolves a display label for a repeater item.
5
11
  *
@@ -10,3 +16,4 @@ import type { FormBackend } from '../../../backend/types';
10
16
  * is returned.
11
17
  */
12
18
  export declare function useResolvedItemLabel(config: RepeaterFieldConfig, index: number, backend: FormBackend, basePath: string): string;
19
+ export declare function useResolvedRepeaterItemLabel(config: RepeaterFieldConfig, index: number, backend: FormBackend, basePath: string): ResolvedRepeaterItemLabel;
@@ -4,4 +4,5 @@
4
4
  */
5
5
  import type { RepeaterFieldConfig } from '../../../fields/types';
6
6
  import type { FormBackend } from '../../../backend/types';
7
+ export declare const DEFAULT_REPEATER_SUMMARY_MAX_CHARS = 96;
7
8
  export declare function buildSummary(field: RepeaterFieldConfig, index: number, backend: FormBackend, basePath: string): string;
@@ -1,8 +1,10 @@
1
1
  export { createDefaultItem } from './createDefaultItem';
2
2
  export { buildItemLabel } from './buildItemLabel';
3
- export { buildSummary } from './buildSummary';
3
+ export { buildSummary, DEFAULT_REPEATER_SUMMARY_MAX_CHARS, } from './buildSummary';
4
4
  export { getRepeaterItemFields } from './getRepeaterItemFields';
5
5
  export { getRepeaterItemFieldGroups } from './getRepeaterItemFieldGroups';
6
+ export { resolveRepeaterLabelSource, type RepeaterLabelSource, } from './repeaterLabelSource';
7
+ export { REPEATER_ROW_COMPACT_ACTIONS_WIDTH, isRepeaterRowActionDisabled, resolveRepeaterRowActionRenderPlan, type RepeaterRowActionAvailability, type RepeaterRowActionId, type RepeaterRowActionMenu, type RepeaterRowMenuAction, type RepeaterRowActionPresentation, type RepeaterRowActionRenderPlan, } from './repeaterRowActionsDomain';
6
8
  export { areLayoutGridCapacityContextsEqual } from './layoutGridCapacityContext';
7
9
  export { handleLinearRepeaterDragEnd, resolveLinearRepeaterMoveIntent, resolveRepeaterPointerDragCapability, type LinearRepeaterDragEndEvent, type LinearRepeaterMoveIntent, type RepeaterPointerDragCapability, } from './repeaterDndDomain';
8
10
  export { resolveRepeaterPresentation } from './repeaterPresentation';
@@ -5,7 +5,7 @@ export type RepeaterPointerDragCapability = {
5
5
  } | {
6
6
  kind: 'disabled';
7
7
  breakpoint: RepeaterGridBreakpoint;
8
- reason: 'insufficient-items' | 'small-breakpoint' | 'coarse-pointer';
8
+ reason: 'insufficient-items' | 'coarse-pointer';
9
9
  };
10
10
  export type LinearRepeaterMoveIntent = {
11
11
  kind: 'none';
@@ -0,0 +1,15 @@
1
+ import type { FieldConfig, RepeaterFieldConfig } from '../../../fields/types';
2
+ export type RepeaterLabelSource = {
3
+ kind: 'field';
4
+ fieldId: string;
5
+ source: 'explicit' | 'auto';
6
+ } | {
7
+ kind: 'none';
8
+ };
9
+ type RepeaterItemValue = Record<string, unknown>;
10
+ export declare function resolveRepeaterLabelSource(input: {
11
+ config: Pick<RepeaterFieldConfig, 'itemLabelSource'>;
12
+ fields: readonly FieldConfig[];
13
+ itemValue: RepeaterItemValue | null;
14
+ }): RepeaterLabelSource;
15
+ export {};
@@ -0,0 +1,50 @@
1
+ export declare const REPEATER_ROW_COMPACT_ACTIONS_WIDTH = 640;
2
+ export type RepeaterRowActionId = 'moveEarlier' | 'moveLater' | 'delete';
3
+ export type RepeaterRowActionAvailability = {
4
+ kind: 'enabled';
5
+ } | {
6
+ kind: 'disabled';
7
+ reason: 'first-item' | 'last-item' | 'minimum-items' | 'unavailable';
8
+ };
9
+ export type RepeaterRowMenuAction = {
10
+ id: RepeaterRowActionId;
11
+ availability: RepeaterRowActionAvailability;
12
+ };
13
+ export type RepeaterRowActionMenu = {
14
+ kind: 'hidden';
15
+ } | {
16
+ kind: 'visible';
17
+ actions: readonly RepeaterRowMenuAction[];
18
+ };
19
+ export type RepeaterRowActionPresentation = {
20
+ kind: 'wide';
21
+ moveEarlier: RepeaterRowActionAvailability;
22
+ moveLater: RepeaterRowActionAvailability;
23
+ menu: RepeaterRowActionMenu;
24
+ } | {
25
+ kind: 'compact';
26
+ moveEarlier: RepeaterRowActionAvailability;
27
+ moveLater: RepeaterRowActionAvailability;
28
+ menu: RepeaterRowActionMenu;
29
+ };
30
+ export type RepeaterRowActionPresentationInput = {
31
+ containerWidth?: number;
32
+ index: number;
33
+ itemsLength: number;
34
+ minItems: number;
35
+ actionPresentation?: 'auto' | 'wide' | 'compact';
36
+ };
37
+ export type RepeaterRowActionRenderPlanInput = RepeaterRowActionPresentationInput & {
38
+ showReorderActions?: boolean;
39
+ disableMoveUp?: boolean;
40
+ disableMoveDown?: boolean;
41
+ };
42
+ export type RepeaterRowActionRenderPlan = {
43
+ kind: RepeaterRowActionPresentation['kind'];
44
+ showDirectMoveActions: boolean;
45
+ moveEarlier: RepeaterRowActionAvailability;
46
+ moveLater: RepeaterRowActionAvailability;
47
+ menu: RepeaterRowActionMenu;
48
+ };
49
+ export declare function isRepeaterRowActionDisabled(availability: RepeaterRowActionAvailability): boolean;
50
+ export declare function resolveRepeaterRowActionRenderPlan(input: RepeaterRowActionRenderPlanInput): RepeaterRowActionRenderPlan;