@contentful/experiences-sdk-react 0.0.1 → 1.0.1-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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
- import { containerDefinition, sectionDefinition, columnsDefinition, singleColumnDefinition, builtInStyles, optionalBuiltInStyles, sendMessage, designTokensRegistry, buildStyleTag, checkIsAssemblyNode, transformBoundContentValue, buildCfStyles, isEmptyStructureWithRelativeHeight, mediaQueryMatcher, getFallbackBreakpointIndex, getActiveBreakpointIndex, getValueForBreakpoint, doesMismatchMessageSchema, tryParseMessage, fetchById, fetchBySlug, validateExperienceBuilderConfig, VisualEditorMode } from '@contentful/experiences-core';
2
+ import { containerDefinition, sectionDefinition, columnsDefinition, singleColumnDefinition, dividerDefinition, builtInStyles, optionalBuiltInStyles, sendMessage, designTokensRegistry, buildStyleTag, checkIsAssemblyNode, transformBoundContentValue, buildCfStyles, isEmptyStructureWithRelativeHeight, mediaQueryMatcher, getFallbackBreakpointIndex, getActiveBreakpointIndex, getValueForBreakpoint, doesMismatchMessageSchema, tryParseMessage, fetchById, fetchBySlug, validateExperienceBuilderConfig, VisualEditorMode } from '@contentful/experiences-core';
3
3
  export { VisualEditorMode, createExperience, defineDesignTokens, fetchById, fetchBySlug } from '@contentful/experiences-core';
4
4
  import React, { useMemo, useLayoutEffect, useState, useEffect, useCallback, useRef, Suspense } from 'react';
5
5
  import { omit } from 'lodash-es';
@@ -9,7 +9,7 @@ import * as Components from '@contentful/experiences-components-react';
9
9
  import { ContentfulContainer, Columns, SingleColumn } from '@contentful/experiences-components-react';
10
10
  import styleInject from 'style-inject';
11
11
 
12
- const SDK_VERSION = '0.0.1-beta.1';
12
+ const SDK_VERSION = '1.0.0';
13
13
 
14
14
  var util;
15
15
  (function (util) {
@@ -4456,6 +4456,13 @@ const DEFAULT_COMPONENT_REGISTRATIONS = {
4456
4456
  wrapComponent: false,
4457
4457
  },
4458
4458
  }),
4459
+ divider: {
4460
+ component: Components.ContentfulDivider,
4461
+ definition: dividerDefinition,
4462
+ options: {
4463
+ wrapComponent: false,
4464
+ },
4465
+ },
4459
4466
  };
4460
4467
  // pre-filling with the default component registrations
4461
4468
  const componentRegistry = new Map([
@@ -4477,6 +4484,7 @@ const componentRegistry = new Map([
4477
4484
  DEFAULT_COMPONENT_REGISTRATIONS.richText,
4478
4485
  ],
4479
4486
  [DEFAULT_COMPONENT_REGISTRATIONS.text.definition.id, DEFAULT_COMPONENT_REGISTRATIONS.text],
4487
+ [DEFAULT_COMPONENT_REGISTRATIONS.divider.definition.id, DEFAULT_COMPONENT_REGISTRATIONS.divider],
4480
4488
  ]);
4481
4489
  const optionalBuiltInComponents = [
4482
4490
  DEFAULT_COMPONENT_REGISTRATIONS.button.definition.id,
@@ -4733,7 +4741,7 @@ const CompositionBlock = ({ node: rawNode, locale, entityStore, resolveDesignVal
4733
4741
  return acc;
4734
4742
  }, propMap);
4735
4743
  }, [componentRegistration, isAssembly, node.variables, resolveDesignValue, entityStore]);
4736
- const cfStyles = buildCfStyles(nodeProps);
4744
+ const cfStyles = buildCfStyles(nodeProps, node.definitionId);
4737
4745
  if (isEmptyStructureWithRelativeHeight(node.children.length, node.definitionId, cfStyles.height)) {
4738
4746
  cfStyles.minHeight = EMPTY_CONTAINER_HEIGHT;
4739
4747
  }