@ohhwells/bridge 0.1.69-next.208 → 0.1.70-next.209
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.cjs +16 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1927,6 +1927,17 @@ function applyAiSectionsToDom(state, options) {
|
|
|
1927
1927
|
});
|
|
1928
1928
|
mounted.set(entry.id, { root, container, serialized });
|
|
1929
1929
|
}
|
|
1930
|
+
if (state.hideTemplate === true) {
|
|
1931
|
+
let prev = null;
|
|
1932
|
+
for (const entry of pageSections) {
|
|
1933
|
+
const el = mounted.get(entry.id)?.container;
|
|
1934
|
+
if (!el) continue;
|
|
1935
|
+
if (prev && !(prev.compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING)) {
|
|
1936
|
+
prev.insertAdjacentElement("afterend", el);
|
|
1937
|
+
}
|
|
1938
|
+
prev = el;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1930
1941
|
syncReplacedOriginals(state);
|
|
1931
1942
|
syncRemovedSections(state);
|
|
1932
1943
|
syncTemplateHidden(state, pageSections.length > 0);
|
|
@@ -17475,11 +17486,15 @@ function OhhwellsBridge() {
|
|
|
17475
17486
|
if (typeof content[BRAND_KIT_KEY] === "string") {
|
|
17476
17487
|
applyBrandToDom(parseBrandKit(content[BRAND_KIT_KEY]));
|
|
17477
17488
|
}
|
|
17489
|
+
if (typeof content[AI_SECTIONS_KEY] === "string") {
|
|
17490
|
+
applyAiSectionsToDom(parseAiSectionsState(content[AI_SECTIONS_KEY]));
|
|
17491
|
+
}
|
|
17478
17492
|
if (typeof content[STYLE_STORE_KEY] === "string") {
|
|
17479
17493
|
applyStylesToDom(parseStyleStore(content[STYLE_STORE_KEY]));
|
|
17480
17494
|
}
|
|
17481
17495
|
for (const [key, val] of Object.entries(content)) {
|
|
17482
17496
|
if (key === "__ohw_sections") continue;
|
|
17497
|
+
if (key === AI_SECTIONS_KEY) continue;
|
|
17483
17498
|
if (key === LOGO_PLACEHOLDER_KEY) continue;
|
|
17484
17499
|
if (LOGO_IMAGE_KEYS.includes(key)) continue;
|
|
17485
17500
|
if (key === BRAND_KIT_KEY) continue;
|
|
@@ -20355,7 +20370,7 @@ function OhhwellsBridge() {
|
|
|
20355
20370
|
postToParent2({
|
|
20356
20371
|
type: "ow:ready",
|
|
20357
20372
|
version: "1",
|
|
20358
|
-
bridgeVersion: "0.1.
|
|
20373
|
+
bridgeVersion: "0.1.70",
|
|
20359
20374
|
path: pathname,
|
|
20360
20375
|
nodes: collectEditableNodes(editContentRef.current),
|
|
20361
20376
|
sections
|