@ohhwells/bridge 0.1.176 → 0.1.177
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; }
|
|
@@ -19359,7 +19371,7 @@ function apiBase() {
|
|
|
19359
19371
|
function bridgeVersion() {
|
|
19360
19372
|
try {
|
|
19361
19373
|
if (true) {
|
|
19362
|
-
return "0.1.
|
|
19374
|
+
return "0.1.177";
|
|
19363
19375
|
}
|
|
19364
19376
|
} catch {
|
|
19365
19377
|
}
|
|
@@ -19373,7 +19385,7 @@ function stampBridgeVersionOnDocument() {
|
|
|
19373
19385
|
return;
|
|
19374
19386
|
}
|
|
19375
19387
|
try {
|
|
19376
|
-
const v = true ? "0.1.
|
|
19388
|
+
const v = true ? "0.1.177" : "";
|
|
19377
19389
|
if (v) {
|
|
19378
19390
|
document.documentElement.setAttribute("data-ohw-bridge-version", v);
|
|
19379
19391
|
window.__OHW_BRIDGE_VERSION__ = v;
|
|
@@ -34709,7 +34721,7 @@ function OhhwellsBridge() {
|
|
|
34709
34721
|
postToParent2({
|
|
34710
34722
|
type: "ow:ready",
|
|
34711
34723
|
version: "1",
|
|
34712
|
-
bridgeVersion: "0.1.
|
|
34724
|
+
bridgeVersion: "0.1.177",
|
|
34713
34725
|
path: pathname,
|
|
34714
34726
|
nodes: collectEditableNodes(editContentRef.current),
|
|
34715
34727
|
sections
|