@cmssy/react 12.8.0 → 12.10.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.
package/dist/index.cjs CHANGED
@@ -403,15 +403,18 @@ async function resolveCmssyLayoutSlot(config, options) {
403
403
  forms,
404
404
  appContext,
405
405
  path,
406
- locale: explicitLocale
406
+ locale: explicitLocale,
407
+ retry
407
408
  } = options;
408
- const siteLocales = await locale.resolveSiteLocales(config);
409
+ const requestOptions = { retry: retry ?? {} };
410
+ const siteLocales = await locale.resolveSiteLocales(config, requestOptions);
409
411
  const fromPath = path ? locale.splitLocaleFromPath(path, siteLocales) : { locale: siteLocales.defaultLocale, path: [] };
410
412
  const locale$1 = explicitLocale ?? fromPath.locale;
411
413
  const slugSegments = fromPath.path ?? [];
412
414
  const pageSlug = page ?? "/" + slugSegments.join("/");
413
415
  const groups = await internal.fetchLayouts(config, pageSlug, {
414
- previewSecret: editMode ? config.draftSecret : void 0
416
+ previewSecret: editMode ? config.draftSecret : void 0,
417
+ ...requestOptions
415
418
  });
416
419
  const base = {
417
420
  groups,
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { CmssyPageData, CmssyClientConfig, CmssyFormDefinition, CmssyBlockAuthContext, CmssyBlockWorkspace, CmssyLayoutGroup, CmssyConfig, RawBlock, CmssyBlockContext } from '@cmssy/core';
1
+ import { CmssyPageData, CmssyClientConfig, CmssyFormDefinition, CmssyBlockAuthContext, CmssyBlockWorkspace, CmssyLayoutGroup, RetryPolicy, CmssyConfig, RawBlock, CmssyBlockContext } from '@cmssy/core';
2
2
  export { AppToEditorMessage, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BoundsMessage, BuildBlockContextExtra, ClickMessage, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyClient, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLayoutSettings, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssyRequestError, CmssySiteConfig, CmssyTypedDocument, EditorToAppMessage, FetchLike, FetchLikeResponse, FetchPageOptions, FieldControl, FieldDefinition, FieldType, GraphqlRequestOptions, InferBlockContent, LayoutPosition, MediaLike, PROTOCOL_VERSION, ParentReadyMessage, PatchMessage, PostTarget, QueryScopedOptions, RawBlock, RawLayoutBlock, ReadyMessage, RetryPolicy, SelectMessage, SubmitFormInput, TypedField, createCmssyClient, fields, graphqlRequest, isProtocolCompatible, layoutPositionValues, mediaAlt, mediaUrl, mediaUrls, normalizeOrigin, parseEditorMessage, postToEditor } from '@cmssy/core';
3
3
  import { B as BlockDefinition, a as BlockMap } from './registry-CwJ2cby4.cjs';
4
4
  export { b as BlockProps, c as buildBlockMap, d as defineBlock } from './registry-CwJ2cby4.cjs';
@@ -31,6 +31,7 @@ interface ResolveCmssyLayoutSlotBase {
31
31
  page?: string;
32
32
  forms?: Record<string, CmssyFormDefinition>;
33
33
  appContext?: Record<string, unknown>;
34
+ retry?: RetryPolicy | false;
34
35
  }
35
36
  type CmssyLayoutSlotLocaleSource = {
36
37
  path: string[];
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CmssyPageData, CmssyClientConfig, CmssyFormDefinition, CmssyBlockAuthContext, CmssyBlockWorkspace, CmssyLayoutGroup, CmssyConfig, RawBlock, CmssyBlockContext } from '@cmssy/core';
1
+ import { CmssyPageData, CmssyClientConfig, CmssyFormDefinition, CmssyBlockAuthContext, CmssyBlockWorkspace, CmssyLayoutGroup, RetryPolicy, CmssyConfig, RawBlock, CmssyBlockContext } from '@cmssy/core';
2
2
  export { AppToEditorMessage, BlockMeta, BlockPropsSchema, BlockRect, BlockSchema, BoundsMessage, BuildBlockContextExtra, ClickMessage, CmssyBlockAuthContext, CmssyBlockContext, CmssyBlockMember, CmssyBlockPage, CmssyBlockWorkspace, CmssyBranding, CmssyClient, CmssyClientConfig, CmssyFormDefinition, CmssyFormField, CmssyFormSettings, CmssyFormSubmitResponse, CmssyLayoutGroup, CmssyLayoutSettings, CmssyLocaleContext, CmssyLocalizedValue, CmssyModelDefinition, CmssyModelRecord, CmssyPageData, CmssyPageMeta, CmssyPageSummary, CmssyRecordList, CmssyRequestError, CmssySiteConfig, CmssyTypedDocument, EditorToAppMessage, FetchLike, FetchLikeResponse, FetchPageOptions, FieldControl, FieldDefinition, FieldType, GraphqlRequestOptions, InferBlockContent, LayoutPosition, MediaLike, PROTOCOL_VERSION, ParentReadyMessage, PatchMessage, PostTarget, QueryScopedOptions, RawBlock, RawLayoutBlock, ReadyMessage, RetryPolicy, SelectMessage, SubmitFormInput, TypedField, createCmssyClient, fields, graphqlRequest, isProtocolCompatible, layoutPositionValues, mediaAlt, mediaUrl, mediaUrls, normalizeOrigin, parseEditorMessage, postToEditor } from '@cmssy/core';
3
3
  import { B as BlockDefinition, a as BlockMap } from './registry-CwJ2cby4.js';
4
4
  export { b as BlockProps, c as buildBlockMap, d as defineBlock } from './registry-CwJ2cby4.js';
@@ -31,6 +31,7 @@ interface ResolveCmssyLayoutSlotBase {
31
31
  page?: string;
32
32
  forms?: Record<string, CmssyFormDefinition>;
33
33
  appContext?: Record<string, unknown>;
34
+ retry?: RetryPolicy | false;
34
35
  }
35
36
  type CmssyLayoutSlotLocaleSource = {
36
37
  path: string[];
package/dist/index.js CHANGED
@@ -403,15 +403,18 @@ async function resolveCmssyLayoutSlot(config, options) {
403
403
  forms,
404
404
  appContext,
405
405
  path,
406
- locale: explicitLocale
406
+ locale: explicitLocale,
407
+ retry
407
408
  } = options;
408
- const siteLocales = await resolveSiteLocales(config);
409
+ const requestOptions = { retry: retry ?? {} };
410
+ const siteLocales = await resolveSiteLocales(config, requestOptions);
409
411
  const fromPath = path ? splitLocaleFromPath(path, siteLocales) : { locale: siteLocales.defaultLocale, path: [] };
410
412
  const locale = explicitLocale ?? fromPath.locale;
411
413
  const slugSegments = fromPath.path ?? [];
412
414
  const pageSlug = page ?? "/" + slugSegments.join("/");
413
415
  const groups = await fetchLayouts(config, pageSlug, {
414
- previewSecret: editMode ? config.draftSecret : void 0
416
+ previewSecret: editMode ? config.draftSecret : void 0,
417
+ ...requestOptions
415
418
  });
416
419
  const base = {
417
420
  groups,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmssy/react",
3
- "version": "12.8.0",
3
+ "version": "12.10.0",
4
4
  "description": "React blocks, renderers, data client and editor bridge for cmssy headless sites",
5
5
  "keywords": [
6
6
  "cmssy",
@@ -97,7 +97,7 @@
97
97
  },
98
98
  "dependencies": {
99
99
  "@cmssy/types": "0.35.0",
100
- "@cmssy/core": "12.8.0"
100
+ "@cmssy/core": "12.10.0"
101
101
  },
102
102
  "scripts": {
103
103
  "build": "tsup",