@contentful/experiences-core 1.32.0 → 1.33.0-beta.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/exports.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export { ASSEMBLY_BLOCK_NODE_TYPE, ASSEMBLY_DEFAULT_CATEGORY, ASSEMBLY_NODE_TYPE, ASSEMBLY_NODE_TYPES, CF_STYLE_ATTRIBUTES, CONTENTFUL_COMPONENTS, CONTENTFUL_COMPONENT_CATEGORY, CONTENTFUL_DEFAULT_CATEGORY, DEFAULT_IMAGE_WIDTH, EMPTY_CONTAINER_HEIGHT, HYPERLINK_DEFAULT_PATTERN, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, SUPPORTED_IMAGE_FORMATS, StudioCanvasMode, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS } from './constants.js';
2
2
  export { AssembliesAddedPayload, AssembliesRegisteredPayload, BackgroundImageAlignmentOption, BackgroundImageOptions, BackgroundImageScalingOption, Binding, BindingMap, BindingMapByBlockId, BoundComponentPropertyTypes, CSSProperties, CanvasErrorPayload, 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, DragWrapperProps, 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, StyleProps, UpdateSelectedComponentCoordinatesPayload, UpdatedEntityPayload, ValidationOption, VariableFormats, WrapperTags } from './types.js';
3
- export { BoundValue, Breakpoint, ComponentDefinitionPropertyType as ComponentDefinitionVariableType, ComponentPropertyValue, ComponentTreeNode, ComponentValue, DesignValue, ExperienceComponentSettings, ExperienceDataSource, ExperienceUnboundValues, PatternProperty, PatternPropertyDefinition, PrimitiveValue, SchemaVersions, UnboundValue, ValuesByBreakpoint, VariableMapping } from '@contentful/experiences-validators';
3
+ export { BoundValue, Breakpoint, ComponentDefinitionPropertyType as ComponentDefinitionVariableType, ComponentPropertyValue, ComponentTreeNode, ComponentValue, DesignValue, ExperienceComponentSettings, ExperienceDataSource, ExperienceUnboundValues, NoValue, PatternProperty, PatternPropertyDefinition, PrimitiveValue, SchemaVersions, UnboundValue, ValuesByBreakpoint, VariableMapping } from '@contentful/experiences-validators';
package/dist/index.js CHANGED
@@ -1155,14 +1155,14 @@ const ComponentValueSchema = z
1155
1155
  .strict();
1156
1156
  // TODO: finalize schema structure before release
1157
1157
  // https://contentful.atlassian.net/browse/LUMOS-523
1158
- const EmptyObjectSchema = z.object({ type: z.undefined() });
1158
+ const NoValueSchema = z.object({ type: z.literal('NoValue') }).strict();
1159
1159
  const ComponentPropertyValueSchema = z.discriminatedUnion('type', [
1160
1160
  DesignValueSchema,
1161
1161
  BoundValueSchema,
1162
1162
  UnboundValueSchema,
1163
1163
  HyperlinkValueSchema,
1164
1164
  ComponentValueSchema,
1165
- EmptyObjectSchema,
1165
+ NoValueSchema,
1166
1166
  ]);
1167
1167
  // TODO: finalize schema structure before release
1168
1168
  // https://contentful.atlassian.net/browse/LUMOS-523
@@ -1175,13 +1175,12 @@ const VariableMappingsSchema = z.record(propertyKeySchema, VariableMappingSchema
1175
1175
  // TODO: finalize schema structure before release
1176
1176
  // https://contentful.atlassian.net/browse/LUMOS-523
1177
1177
  const PatternPropertyDefinitionSchema = z.object({
1178
- defaultValue: z.union([
1179
- z.object({
1180
- path: z.string(),
1181
- type: z.literal('BoundValue'),
1182
- }),
1183
- z.null(),
1184
- ]),
1178
+ defaultValue: z
1179
+ .object({
1180
+ path: z.string(),
1181
+ type: z.literal('BoundValue'),
1182
+ })
1183
+ .optional(),
1185
1184
  contentTypes: z.record(z.string(), z.any()),
1186
1185
  });
1187
1186
  const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternPropertyDefinitionSchema);
@@ -1190,6 +1189,7 @@ const PatternPropertyDefinitionsSchema = z.record(propertyKeySchema, PatternProp
1190
1189
  const PatternPropertySchema = z.object({
1191
1190
  type: z.literal('BoundValue'),
1192
1191
  path: z.string(),
1192
+ contentType: z.string(),
1193
1193
  });
1194
1194
  const PatternPropertysSchema = z.record(propertyKeySchema, PatternPropertySchema);
1195
1195
  const BreakpointSchema = z