@contentful/experiences-sdk-react 1.6.0 → 1.7.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/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ContentfulContainer, Columns, SingleColumn } from '@contentful/experien
|
|
|
10
10
|
import styleInject from 'style-inject';
|
|
11
11
|
import md5 from 'md5';
|
|
12
12
|
|
|
13
|
-
const SDK_VERSION = '1.
|
|
13
|
+
const SDK_VERSION = '1.7.0-beta.0';
|
|
14
14
|
|
|
15
15
|
var util;
|
|
16
16
|
(function (util) {
|
|
@@ -4132,7 +4132,7 @@ const BreakpointSchema = z
|
|
|
4132
4132
|
query: z.string().regex(/^\*$|^<[0-9*]+px$/),
|
|
4133
4133
|
previewSize: z.string(),
|
|
4134
4134
|
displayName: z.string(),
|
|
4135
|
-
|
|
4135
|
+
displayIcon: z.enum(['desktop', 'tablet', 'mobile']).optional(),
|
|
4136
4136
|
})
|
|
4137
4137
|
.strict();
|
|
4138
4138
|
const UnboundValuesSchema = z.record(uuidKeySchema, z.object({
|
|
@@ -4578,15 +4578,15 @@ const resolveCssVariables = (designTokensDefinition) => {
|
|
|
4578
4578
|
const tempResolvedValue = {};
|
|
4579
4579
|
Object.keys(border).forEach((borderKey) => {
|
|
4580
4580
|
const { width, style, color } = border[borderKey];
|
|
4581
|
-
if (CssVarRegex.test(width)) {
|
|
4581
|
+
if (width && CssVarRegex.test(width)) {
|
|
4582
4582
|
const resolvedValue = getSingleCssVariableValue(element, width, 'border-width');
|
|
4583
4583
|
tempResolvedValue[width] = resolvedValue;
|
|
4584
4584
|
}
|
|
4585
|
-
if (CssVarRegex.test(style)) {
|
|
4585
|
+
if (style && CssVarRegex.test(style)) {
|
|
4586
4586
|
const resolvedValue = getSingleCssVariableValue(element, style, 'border-style');
|
|
4587
4587
|
tempResolvedValue[style] = resolvedValue;
|
|
4588
4588
|
}
|
|
4589
|
-
if (CssVarRegex.test(color)) {
|
|
4589
|
+
if (color && CssVarRegex.test(color)) {
|
|
4590
4590
|
const resolvedValue = getSingleCssVariableValue(element, color, 'border-color');
|
|
4591
4591
|
tempResolvedValue[color] = resolvedValue;
|
|
4592
4592
|
}
|
|
@@ -4690,7 +4690,7 @@ const useClassName = ({ node, props, }) => {
|
|
|
4690
4690
|
// class name has been already set on the server side. No need to calculate it on client side anymore
|
|
4691
4691
|
return;
|
|
4692
4692
|
}
|
|
4693
|
-
const cfStyles = buildCfStyles(props
|
|
4693
|
+
const cfStyles = buildCfStyles(props);
|
|
4694
4694
|
if (Object.keys(cfStyles).length === 0) {
|
|
4695
4695
|
return;
|
|
4696
4696
|
}
|
|
@@ -5318,7 +5318,7 @@ const detachExperienceStyles = (experience) => {
|
|
|
5318
5318
|
}, {});
|
|
5319
5319
|
// We convert cryptic prop keys to css variables
|
|
5320
5320
|
// Eg: cfMargin to margin
|
|
5321
|
-
const stylesForBreakpoint = buildCfStyles(propsByBreakpointWithResolvedDesignTokens
|
|
5321
|
+
const stylesForBreakpoint = buildCfStyles(propsByBreakpointWithResolvedDesignTokens);
|
|
5322
5322
|
const stylesForBreakpointWithoutUndefined = Object.fromEntries(Object.entries(stylesForBreakpoint)
|
|
5323
5323
|
.filter(([, value]) => value !== undefined)
|
|
5324
5324
|
.map(([key, value]) => [toCSSAttribute(key), value]));
|