@contentful/experiences-sdk-react 1.7.1 → 1.7.2-dev-20240613T1745-9217fd8.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.d.ts +2 -4
- package/dist/index.js +9 -433
- package/dist/index.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/sdkVersion.d.ts +1 -1
- package/package.json +5 -5
- package/dist/src/utils/ssrStyles.d.ts +0 -155
- package/dist/src/utils/ssrStyles.spec.d.ts +0 -1
- package/dist/src/utils/ssrStylesCustomComponentWithBuiltInStyles.spec.d.ts +0 -1
- package/dist/src/utils/ssrStylesDesignTokenResolution.spec.d.ts +0 -1
- package/dist/src/utils/ssrStylesPattern.spec.d.ts +0 -1
- package/dist/src/utils/ssrStylesStructureComponent.spec.d.ts +0 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ export { useFetchById, useFetchBySlug } from './hooks';
|
|
|
3
3
|
export { defineComponents, maintainBasicComponentIdsWithoutPrefix } from './core/componentRegistry';
|
|
4
4
|
export { defineDesignTokens, defineBreakpoints, VisualEditorMode, fetchById, fetchBySlug, createExperience, } from '@contentful/experiences-core';
|
|
5
5
|
export { CONTENTFUL_COMPONENTS, LATEST_SCHEMA_VERSION, CF_STYLE_ATTRIBUTES, } from '@contentful/experiences-core/constants';
|
|
6
|
-
export { detachExperienceStyles } from './utils/ssrStyles';
|
|
7
6
|
export type { ExternalSDKMode, ComponentDefinition } from '@contentful/experiences-core/types';
|
|
7
|
+
export { detachExperienceStyles } from '@contentful/experiences-core';
|
package/dist/src/sdkVersion.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.7.
|
|
1
|
+
export declare const SDK_VERSION = "1.7.2-dev-20240613T1745-9217fd8.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/experiences-sdk-react",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2-dev-20240613T1745-9217fd8.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.js",
|
|
6
6
|
"typings": "./dist/src/index.d.ts",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"depcruise": "depcruise src"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@contentful/experiences-components-react": "1.7.
|
|
37
|
-
"@contentful/experiences-core": "1.7.
|
|
38
|
-
"@contentful/experiences-visual-editor-react": "1.7.
|
|
36
|
+
"@contentful/experiences-components-react": "1.7.2-dev-20240613T1745-9217fd8.0",
|
|
37
|
+
"@contentful/experiences-core": "1.7.2-dev-20240613T1745-9217fd8.0",
|
|
38
|
+
"@contentful/experiences-visual-editor-react": "1.7.2-dev-20240613T1745-9217fd8.0",
|
|
39
39
|
"@contentful/rich-text-types": "^16.2.1",
|
|
40
40
|
"classnames": "^2.3.2",
|
|
41
41
|
"csstype": "^3.1.2",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"dist",
|
|
93
93
|
"package.json"
|
|
94
94
|
],
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "c36947456ec80bed2a5d0732367ef2bb8cc630eb"
|
|
96
96
|
}
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import { DesignTokensDefinition, Experience, StyleProps } from '@contentful/experiences-core/types';
|
|
2
|
-
import { ComponentPropertyValue, ExperienceComponentSettings, ExperienceDataSource, ExperienceUnboundValues } from '@contentful/experiences-validators';
|
|
3
|
-
import { Asset, Entry } from 'contentful/dist/types/types';
|
|
4
|
-
export declare const detachExperienceStyles: (experience: Experience) => string | undefined;
|
|
5
|
-
export declare const isCfStyleAttribute: (variableName: any) => variableName is keyof StyleProps;
|
|
6
|
-
export declare const maybePopulateDesignTokenValue: (variableName: string, variableValue: any, mapOfDesignVariableKeys: Record<string, any>) => any;
|
|
7
|
-
export declare const resolveBackgroundImageBinding: ({ variableData, getBoundEntityById, dataSource, unboundValues, componentVariablesOverwrites, componentSettings, }: {
|
|
8
|
-
variableData: ComponentPropertyValue;
|
|
9
|
-
getBoundEntityById: (id: string) => Entry | Asset | undefined;
|
|
10
|
-
unboundValues?: Record<string, {
|
|
11
|
-
value?: string | number | boolean | Record<any, any> | undefined;
|
|
12
|
-
}> | undefined;
|
|
13
|
-
dataSource?: Record<string, {
|
|
14
|
-
sys: {
|
|
15
|
-
type: "Link";
|
|
16
|
-
id: string;
|
|
17
|
-
linkType: "Entry" | "Asset";
|
|
18
|
-
};
|
|
19
|
-
}> | undefined;
|
|
20
|
-
componentSettings?: {
|
|
21
|
-
variableDefinitions: Record<string, {
|
|
22
|
-
type: "Text" | "RichText" | "Number" | "Date" | "Boolean" | "Location" | "Media" | "Object" | "Hyperlink";
|
|
23
|
-
displayName?: string | undefined;
|
|
24
|
-
defaultValue?: string | number | boolean | Record<any, any> | {
|
|
25
|
-
type: "DesignValue";
|
|
26
|
-
valuesByBreakpoint: Record<string, string | number | boolean | Record<any, any> | undefined>;
|
|
27
|
-
} | {
|
|
28
|
-
path: string;
|
|
29
|
-
type: "BoundValue";
|
|
30
|
-
} | {
|
|
31
|
-
type: "HyperlinkValue";
|
|
32
|
-
linkTargetKey: string;
|
|
33
|
-
overrides?: {} | undefined;
|
|
34
|
-
} | {
|
|
35
|
-
type: "UnboundValue";
|
|
36
|
-
key: string;
|
|
37
|
-
} | {
|
|
38
|
-
type: "ComponentValue";
|
|
39
|
-
key: string;
|
|
40
|
-
} | undefined;
|
|
41
|
-
description?: string | undefined;
|
|
42
|
-
group?: string | undefined;
|
|
43
|
-
validations?: {
|
|
44
|
-
required?: boolean | undefined;
|
|
45
|
-
format?: "URL" | undefined;
|
|
46
|
-
in?: {
|
|
47
|
-
value: string | number;
|
|
48
|
-
displayName?: string | undefined;
|
|
49
|
-
}[] | undefined;
|
|
50
|
-
} | undefined;
|
|
51
|
-
}>;
|
|
52
|
-
} | undefined;
|
|
53
|
-
componentVariablesOverwrites?: Record<string, {
|
|
54
|
-
type: "DesignValue";
|
|
55
|
-
valuesByBreakpoint: Record<string, string | number | boolean | Record<any, any> | undefined>;
|
|
56
|
-
} | {
|
|
57
|
-
path: string;
|
|
58
|
-
type: "BoundValue";
|
|
59
|
-
} | {
|
|
60
|
-
type: "UnboundValue";
|
|
61
|
-
key: string;
|
|
62
|
-
} | {
|
|
63
|
-
type: "HyperlinkValue";
|
|
64
|
-
linkTargetKey: string;
|
|
65
|
-
overrides?: {} | undefined;
|
|
66
|
-
} | {
|
|
67
|
-
type: "ComponentValue";
|
|
68
|
-
key: string;
|
|
69
|
-
}> | undefined;
|
|
70
|
-
}) => string | undefined;
|
|
71
|
-
export declare const indexByBreakpoint: ({ variables, breakpointIds, getBoundEntityById, unboundValues, dataSource, componentVariablesOverwrites, componentSettings, }: {
|
|
72
|
-
variables: Record<string, ComponentPropertyValue>;
|
|
73
|
-
breakpointIds: string[];
|
|
74
|
-
getBoundEntityById: (id: string) => Entry | Asset | undefined;
|
|
75
|
-
unboundValues?: Record<string, {
|
|
76
|
-
value?: string | number | boolean | Record<any, any> | undefined;
|
|
77
|
-
}> | undefined;
|
|
78
|
-
dataSource?: Record<string, {
|
|
79
|
-
sys: {
|
|
80
|
-
type: "Link";
|
|
81
|
-
id: string;
|
|
82
|
-
linkType: "Entry" | "Asset";
|
|
83
|
-
};
|
|
84
|
-
}> | undefined;
|
|
85
|
-
componentVariablesOverwrites?: Record<string, {
|
|
86
|
-
type: "DesignValue";
|
|
87
|
-
valuesByBreakpoint: Record<string, string | number | boolean | Record<any, any> | undefined>;
|
|
88
|
-
} | {
|
|
89
|
-
path: string;
|
|
90
|
-
type: "BoundValue";
|
|
91
|
-
} | {
|
|
92
|
-
type: "UnboundValue";
|
|
93
|
-
key: string;
|
|
94
|
-
} | {
|
|
95
|
-
type: "HyperlinkValue";
|
|
96
|
-
linkTargetKey: string;
|
|
97
|
-
overrides?: {} | undefined;
|
|
98
|
-
} | {
|
|
99
|
-
type: "ComponentValue";
|
|
100
|
-
key: string;
|
|
101
|
-
}> | undefined;
|
|
102
|
-
componentSettings?: {
|
|
103
|
-
variableDefinitions: Record<string, {
|
|
104
|
-
type: "Text" | "RichText" | "Number" | "Date" | "Boolean" | "Location" | "Media" | "Object" | "Hyperlink";
|
|
105
|
-
displayName?: string | undefined;
|
|
106
|
-
defaultValue?: string | number | boolean | Record<any, any> | {
|
|
107
|
-
type: "DesignValue";
|
|
108
|
-
valuesByBreakpoint: Record<string, string | number | boolean | Record<any, any> | undefined>;
|
|
109
|
-
} | {
|
|
110
|
-
path: string;
|
|
111
|
-
type: "BoundValue";
|
|
112
|
-
} | {
|
|
113
|
-
type: "HyperlinkValue";
|
|
114
|
-
linkTargetKey: string;
|
|
115
|
-
overrides?: {} | undefined;
|
|
116
|
-
} | {
|
|
117
|
-
type: "UnboundValue";
|
|
118
|
-
key: string;
|
|
119
|
-
} | {
|
|
120
|
-
type: "ComponentValue";
|
|
121
|
-
key: string;
|
|
122
|
-
} | undefined;
|
|
123
|
-
description?: string | undefined;
|
|
124
|
-
group?: string | undefined;
|
|
125
|
-
validations?: {
|
|
126
|
-
required?: boolean | undefined;
|
|
127
|
-
format?: "URL" | undefined;
|
|
128
|
-
in?: {
|
|
129
|
-
value: string | number;
|
|
130
|
-
displayName?: string | undefined;
|
|
131
|
-
}[] | undefined;
|
|
132
|
-
} | undefined;
|
|
133
|
-
}>;
|
|
134
|
-
} | undefined;
|
|
135
|
-
}) => Record<string, Record<string, any>>;
|
|
136
|
-
/**
|
|
137
|
-
* Flattens the object from
|
|
138
|
-
* {
|
|
139
|
-
* color: {
|
|
140
|
-
* [key]: [value]
|
|
141
|
-
* }
|
|
142
|
-
* }
|
|
143
|
-
*
|
|
144
|
-
* to
|
|
145
|
-
*
|
|
146
|
-
* {
|
|
147
|
-
* 'color.key': [value]
|
|
148
|
-
* }
|
|
149
|
-
*/
|
|
150
|
-
export declare const flattenDesignTokenRegistry: (designTokenRegistry: DesignTokensDefinition) => Record<string, string | object>;
|
|
151
|
-
export declare const toCSSString: (breakpointStyles: Record<string, string>) => string;
|
|
152
|
-
export declare const toMediaQuery: (breakpointPayload: {
|
|
153
|
-
condition: string;
|
|
154
|
-
cssByClassName: Record<string, string>;
|
|
155
|
-
}) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|