@contentful/experiences-core 1.37.1-dev-20250515T1211-cc16b86.0 → 1.37.1-dev-20250515T1454-bbf6982.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 +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2177,10 +2177,11 @@ const detachExperienceStyles = (experience) => {
|
|
|
2177
2177
|
/* [Data format] `generatedCss` is the minimized CSS string that will be added to the DOM:
|
|
2178
2178
|
* generatedCss = "margin: 1px;width: 100%;..."
|
|
2179
2179
|
*/
|
|
2180
|
-
//
|
|
2181
|
-
// Adding breakpointId to ensure not using the same IDs between breakpoints as this leads to
|
|
2180
|
+
// - Adding breakpointId to ensure not using the same IDs between breakpoints as this leads to
|
|
2182
2181
|
// conflicts between different breakpoint values from multiple nodes where the hash would be equal
|
|
2183
|
-
|
|
2182
|
+
// - Adding wrapping pattern nodes IDs to avoid conflicts between similar nested patterns as those
|
|
2183
|
+
// could override each others CSS for some breakpoints just through the order of `<style>` tags in the DOM.
|
|
2184
|
+
const styleHash = md5(currentPatternNodeIdsChain + breakpointId + generatedCss);
|
|
2184
2185
|
// and prefix the className to make sure the value can be processed
|
|
2185
2186
|
const className = `cf-${styleHash}`;
|
|
2186
2187
|
// I save the generated hashes into an array to later save it in the tree node
|