@ohhwells/bridge 0.1.174-next.465 → 0.1.174-next.468
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 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1321,7 +1321,10 @@ function fixButtonInk(deps, section, painted) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
try {
|
|
1323
1323
|
const own = button;
|
|
1324
|
-
if (picked === "any" || button.hasAttribute("data-ohw-btn-variant") || own.style?.color)
|
|
1324
|
+
if (picked === "any" || button.hasAttribute("data-ohw-btn-variant") || own.style?.color) {
|
|
1325
|
+
iconsFollowLabel(button, icons, chips);
|
|
1326
|
+
continue;
|
|
1327
|
+
}
|
|
1325
1328
|
const fresh = (el) => {
|
|
1326
1329
|
const behind = el?.parentElement ? painted.get(el.parentElement) : void 0;
|
|
1327
1330
|
return el && behind && painted.has(el) ? paintOver(deps.style(el), behind).color : void 0;
|
|
@@ -1337,12 +1340,21 @@ function fixButtonInk(deps, section, painted) {
|
|
|
1337
1340
|
icon.setAttribute(TONE_FIX_ATTR, toneOfColor(behind));
|
|
1338
1341
|
}
|
|
1339
1342
|
}
|
|
1343
|
+
iconsFollowLabel(button, icons, chips);
|
|
1340
1344
|
} finally {
|
|
1341
1345
|
void deps.style(button).color;
|
|
1342
1346
|
for (const el of targets) el.removeAttribute(MEASURING_ATTR);
|
|
1343
1347
|
}
|
|
1344
1348
|
}
|
|
1345
1349
|
}
|
|
1350
|
+
function iconsFollowLabel(button, icons, chips) {
|
|
1351
|
+
const label = Array.from(button.querySelectorAll(`[${TONE_FIX_ATTR}]`)).find((el) => !el.closest("svg") && !chips.includes(el));
|
|
1352
|
+
const ink = label?.getAttribute(TONE_FIX_ATTR);
|
|
1353
|
+
if (!ink) return;
|
|
1354
|
+
for (const icon of icons) {
|
|
1355
|
+
if (icon.parentElement === button && !icon.hasAttribute(TONE_FIX_ATTR)) icon.setAttribute(TONE_FIX_ATTR, ink);
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1346
1358
|
var INK_FIX_CSS = `[${MEASURING_ATTR}] { transition: none !important; }
|
|
1347
1359
|
[${TONE_FIX_ATTR}="dark"] { color: var(--ohw-brand-light, var(--color-light, #FFFFFF)) !important; }
|
|
1348
1360
|
[${TONE_FIX_ATTR}="light"] { color: var(--ohw-brand-dark, var(--color-dark, #0C0A09)) !important; }
|
|
@@ -19433,7 +19445,7 @@ function apiBase() {
|
|
|
19433
19445
|
function bridgeVersion() {
|
|
19434
19446
|
try {
|
|
19435
19447
|
if (true) {
|
|
19436
|
-
return "0.1.174-next.
|
|
19448
|
+
return "0.1.174-next.468";
|
|
19437
19449
|
}
|
|
19438
19450
|
} catch {
|
|
19439
19451
|
}
|
|
@@ -19447,7 +19459,7 @@ function stampBridgeVersionOnDocument() {
|
|
|
19447
19459
|
return;
|
|
19448
19460
|
}
|
|
19449
19461
|
try {
|
|
19450
|
-
const v = true ? "0.1.174-next.
|
|
19462
|
+
const v = true ? "0.1.174-next.468" : "";
|
|
19451
19463
|
if (v) {
|
|
19452
19464
|
document.documentElement.setAttribute("data-ohw-bridge-version", v);
|
|
19453
19465
|
window.__OHW_BRIDGE_VERSION__ = v;
|
|
@@ -34832,7 +34844,7 @@ function OhhwellsBridge() {
|
|
|
34832
34844
|
postToParent2({
|
|
34833
34845
|
type: "ow:ready",
|
|
34834
34846
|
version: "1",
|
|
34835
|
-
bridgeVersion: "0.1.174-next.
|
|
34847
|
+
bridgeVersion: "0.1.174-next.468",
|
|
34836
34848
|
path: pathname,
|
|
34837
34849
|
nodes: collectEditableNodes(editContentRef.current),
|
|
34838
34850
|
sections
|