@contentful/experiences-core 3.3.1-dev-20250825T0713-34ae1b3.0 → 3.4.0-dev-20250825T1512-8bcc4b9.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.
@@ -0,0 +1,11 @@
1
+ import { SdkOptions } from '../types.js';
2
+
3
+ declare const sdkOptionsRegistry: SdkOptions;
4
+ /**
5
+ * Used inside defineComponents to forward registry arguments to this registry
6
+ * of SDK options.
7
+ */
8
+ declare const defineSdkOptions: (options: typeof sdkOptionsRegistry) => void;
9
+ declare const getSdkOptions: () => Readonly<typeof sdkOptionsRegistry>;
10
+
11
+ export { defineSdkOptions, getSdkOptions, sdkOptionsRegistry };
package/dist/types.d.ts CHANGED
@@ -65,6 +65,8 @@ type ComponentDefinition<T extends ComponentDefinitionPropertyType = ComponentDe
65
65
  thumbnailId?: string;
66
66
  hyperlinkPattern?: string;
67
67
  variables: Partial<DesignVariableMap> & Record<string, ComponentDefinitionVariable<T>>;
68
+ /** Render child components in specified slots. This is an advanced version of the `children`
69
+ * configuration. We don't recommend using both together, as it can lead to unexpected behavior. */
68
70
  slots?: Record<string, {
69
71
  displayName: string;
70
72
  }>;
@@ -111,6 +113,17 @@ type ComponentRegistrationOptions = {
111
113
  experimentalComponents?: {
112
114
  carousel?: boolean;
113
115
  };
116
+ /**
117
+ * Originally, the persisted values for `cfTextAlign` were plainly rendered
118
+ * when generating the CSS code for a components styles. To enable right-to-left
119
+ * directions natively, the alignment values were recently switched from
120
+ * `left`/`right` to `start`/`end`. To save customers from manually replacing old
121
+ * with new alignment values in every experience, we're translating them automatically
122
+ * in the rendering logic as well. If this new behaviour introduces any issues,
123
+ * customers can opt-out by setting this flag.
124
+ * @deprecated This is a temporary solution and will be removed in a future major version.
125
+ */
126
+ __disableTextAlignmentTransform?: boolean;
114
127
  };
115
128
  type Binding = {
116
129
  spaceId: string;
@@ -287,6 +300,9 @@ type DesignTokensDefinition = {
287
300
  color?: string;
288
301
  }>;
289
302
  } & RecursiveDesignTokenDefinition;
303
+ type SdkOptions = {
304
+ __disableTextAlignmentTransform?: ComponentRegistrationOptions['__disableTextAlignmentTransform'];
305
+ };
290
306
  /** Type of experience entry JSON data structure as returned by CPA/CDA */
291
307
  type ExperienceEntry = {
292
308
  sys: Entry['sys'];
@@ -572,4 +588,4 @@ type StructuralEditorModeProps = {
572
588
  };
573
589
  type StructureComponentProps<OtherProps> = React.PropsWithChildren<StructuralEditorModeProps & OtherProps>;
574
590
 
575
- export type { AssembliesAddedPayload, AssembliesRegisteredPayload, BackgroundImageAlignmentOption, BackgroundImageOptions, BackgroundImageScalingOption, Binding, BindingMap, BindingMapByBlockId, BoundComponentPropertyTypes, CSSProperties, CanvasErrorPayload, CanvasGeometryUpdateSourceEvent, CanvasReloadPayload, CanvasResizedPayload, CanvasScrollPayload, ComponentBinding, ComponentDefinition, ComponentDefinitionVariable, ComponentDefinitionVariableBase, ComponentDefinitionVariableTypeMap, ComponentDefinitionVariableValidation, ComponentDragCanceledPayload, ComponentDragEndedPayload, ComponentDragStartedPayload, ComponentDraggingChangedPayload, ComponentDroppedPayload, ComponentMoveEndedPayload, ComponentMoveStartedPayload, ComponentMovedPayload, ComponentRegistration, ComponentRegistrationOptions, ComponentSelectedPayload, ConnectedPayload, ContainerStyleVariableName, Coordinates, DataSourceEntryValueType, DesignTokensDefinition, DesignTokensPayload, DesignVariableMap, DesignVariableTypes, Experience, ExperienceEntry, ExperienceFields, ExperienceTree, ExperienceTreeNode, ExperienceUpdatedPayload, HoverComponentPayload, HoveredElement, ImageLoadingOption, ImageObjectFitOption, ImageObjectPositionOption, ImageOptions, IncomingComponentDragCanceledPayload, IncomingComponentMoveEndedPayload, IncomingEvent, IncomingMessage, IncomingMouseMovePayload, InternalEvent, Link, ManagementEntity, MouseMovePayload, NewHoveredElementPayload, OptimizedBackgroundImageAsset, OptimizedImageAsset, OutgoingEvent, OutgoingMessage, OutsideCanvasClickPayload, RawCoordinates, RecursiveDesignTokenDefinition, RegisteredBreakpointsPayload, RegisteredComponentsPayload, RequestComponentTreeUpdatePayload, RequestEditorModePayload, RequestEntitiesMessage, RequestEntitiesPayload, RequestReadOnlyModePayload, RequestedEntitiesMessage, RequestedEntitiesPayload, ResolveDesignValueType, SDKFeaturesPayload, ScrollState, SelectComponentPayload, SendMessageParams, StructureComponentProps, StyleProps, UpdateSelectedComponentCoordinatesPayload, UpdatedEntityPayload, ValidationOption, VariableFormats };
591
+ export type { AssembliesAddedPayload, AssembliesRegisteredPayload, BackgroundImageAlignmentOption, BackgroundImageOptions, BackgroundImageScalingOption, Binding, BindingMap, BindingMapByBlockId, BoundComponentPropertyTypes, CSSProperties, CanvasErrorPayload, CanvasGeometryUpdateSourceEvent, CanvasReloadPayload, CanvasResizedPayload, CanvasScrollPayload, ComponentBinding, ComponentDefinition, ComponentDefinitionVariable, ComponentDefinitionVariableBase, ComponentDefinitionVariableTypeMap, ComponentDefinitionVariableValidation, ComponentDragCanceledPayload, ComponentDragEndedPayload, ComponentDragStartedPayload, ComponentDraggingChangedPayload, ComponentDroppedPayload, ComponentMoveEndedPayload, ComponentMoveStartedPayload, ComponentMovedPayload, ComponentRegistration, ComponentRegistrationOptions, ComponentSelectedPayload, ConnectedPayload, ContainerStyleVariableName, Coordinates, DataSourceEntryValueType, DesignTokensDefinition, DesignTokensPayload, DesignVariableMap, DesignVariableTypes, Experience, ExperienceEntry, ExperienceFields, ExperienceTree, ExperienceTreeNode, ExperienceUpdatedPayload, HoverComponentPayload, HoveredElement, ImageLoadingOption, ImageObjectFitOption, ImageObjectPositionOption, ImageOptions, IncomingComponentDragCanceledPayload, IncomingComponentMoveEndedPayload, IncomingEvent, IncomingMessage, IncomingMouseMovePayload, InternalEvent, Link, ManagementEntity, MouseMovePayload, NewHoveredElementPayload, OptimizedBackgroundImageAsset, OptimizedImageAsset, OutgoingEvent, OutgoingMessage, OutsideCanvasClickPayload, RawCoordinates, RecursiveDesignTokenDefinition, RegisteredBreakpointsPayload, RegisteredComponentsPayload, RequestComponentTreeUpdatePayload, RequestEditorModePayload, RequestEntitiesMessage, RequestEntitiesPayload, RequestReadOnlyModePayload, RequestedEntitiesMessage, RequestedEntitiesPayload, ResolveDesignValueType, SDKFeaturesPayload, ScrollState, SdkOptions, SelectComponentPayload, SendMessageParams, StructureComponentProps, StyleProps, UpdateSelectedComponentCoordinatesPayload, UpdatedEntityPayload, ValidationOption, VariableFormats };
@@ -0,0 +1,12 @@
1
+ import { ExperienceTreeNode, ComponentRegistration } from '../types.js';
2
+ import { ComponentTreeNode } from '@contentful/experiences-validators';
3
+
4
+ declare const splitDirectAndSlotChildren: <T extends ExperienceTreeNode | ComponentTreeNode>(allChildNodes: T[], componentDefinition: ComponentRegistration["definition"]) => {
5
+ slotNodesMap: Record<string, T[] | null>;
6
+ directChildNodes: undefined;
7
+ } | {
8
+ slotNodesMap: Record<string, T[] | null>;
9
+ directChildNodes: T[];
10
+ };
11
+
12
+ export { splitDirectAndSlotChildren };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experiences-core",
3
- "version": "3.3.1-dev-20250825T0713-34ae1b3.0",
3
+ "version": "3.4.0-dev-20250825T1512-8bcc4b9.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -70,7 +70,7 @@
70
70
  "vitest": "^2.1.1"
71
71
  },
72
72
  "dependencies": {
73
- "@contentful/experiences-validators": "3.3.1-dev-20250825T0713-34ae1b3.0",
73
+ "@contentful/experiences-validators": "3.4.0-dev-20250825T1512-8bcc4b9.0",
74
74
  "@contentful/rich-text-types": "^17.0.0",
75
75
  "lodash-es": "^4.17.21",
76
76
  "zustand": "^4.4.7"
@@ -78,5 +78,5 @@
78
78
  "peerDependencies": {
79
79
  "contentful": ">=10.6.0"
80
80
  },
81
- "gitHead": "5f8a95f923c5195d258a4ca7719c1a83d4c4a627"
81
+ "gitHead": "55fb97f50102ac9ea0f969a22c63f0ffdd629b36"
82
82
  }