@ohhwells/bridge 0.1.78-next.234 → 0.1.79-next.238
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 +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -410,7 +410,9 @@ var NODE_WROTE_ATTR = "data-ohw-style-node";
|
|
|
410
410
|
var NODE_PROPS = ["color", "font-family", "font-size", "background"];
|
|
411
411
|
function saveInline(el, prop) {
|
|
412
412
|
const attr = `data-ohw-style-prev-${prop}`;
|
|
413
|
-
if (
|
|
413
|
+
if (el.hasAttribute(attr)) return;
|
|
414
|
+
const value = el.style.getPropertyValue(prop) || (prop === "background" ? el.style.getPropertyValue("background-color") : "");
|
|
415
|
+
el.setAttribute(attr, value);
|
|
414
416
|
}
|
|
415
417
|
function restoreInline(el, prop) {
|
|
416
418
|
const attr = `data-ohw-style-prev-${prop}`;
|
|
@@ -461,7 +463,8 @@ function applyStylesToDom(store) {
|
|
|
461
463
|
const sections = document.querySelectorAll(
|
|
462
464
|
`[data-ohw-section="${CSS.escape(sectionId)}"]`
|
|
463
465
|
);
|
|
464
|
-
for (const
|
|
466
|
+
for (const marker of Array.from(sections)) {
|
|
467
|
+
const section = marker.querySelector(":scope > [data-ai-section]") ?? marker;
|
|
465
468
|
for (const [prop, attr] of Object.entries(SECTION_ATTRS)) {
|
|
466
469
|
const value = override[prop];
|
|
467
470
|
if (value === void 0) continue;
|
|
@@ -21135,7 +21138,7 @@ function OhhwellsBridge() {
|
|
|
21135
21138
|
postToParent2({
|
|
21136
21139
|
type: "ow:ready",
|
|
21137
21140
|
version: "1",
|
|
21138
|
-
bridgeVersion: "0.1.
|
|
21141
|
+
bridgeVersion: "0.1.79",
|
|
21139
21142
|
path: pathname,
|
|
21140
21143
|
nodes: collectEditableNodes(editContentRef.current),
|
|
21141
21144
|
sections
|