@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.js CHANGED
@@ -1152,7 +1152,10 @@ function fixButtonInk(deps, section, painted) {
1152
1152
  }
1153
1153
  try {
1154
1154
  const own = button;
1155
- if (picked === "any" || button.hasAttribute("data-ohw-btn-variant") || own.style?.color) continue;
1155
+ if (picked === "any" || button.hasAttribute("data-ohw-btn-variant") || own.style?.color) {
1156
+ iconsFollowLabel(button, icons, chips);
1157
+ continue;
1158
+ }
1156
1159
  const fresh = (el) => {
1157
1160
  const behind = el?.parentElement ? painted.get(el.parentElement) : void 0;
1158
1161
  return el && behind && painted.has(el) ? paintOver(deps.style(el), behind).color : void 0;
@@ -1168,12 +1171,21 @@ function fixButtonInk(deps, section, painted) {
1168
1171
  icon.setAttribute(TONE_FIX_ATTR, toneOfColor(behind));
1169
1172
  }
1170
1173
  }
1174
+ iconsFollowLabel(button, icons, chips);
1171
1175
  } finally {
1172
1176
  void deps.style(button).color;
1173
1177
  for (const el of targets) el.removeAttribute(MEASURING_ATTR);
1174
1178
  }
1175
1179
  }
1176
1180
  }
1181
+ function iconsFollowLabel(button, icons, chips) {
1182
+ const label = Array.from(button.querySelectorAll(`[${TONE_FIX_ATTR}]`)).find((el) => !el.closest("svg") && !chips.includes(el));
1183
+ const ink = label?.getAttribute(TONE_FIX_ATTR);
1184
+ if (!ink) return;
1185
+ for (const icon of icons) {
1186
+ if (icon.parentElement === button && !icon.hasAttribute(TONE_FIX_ATTR)) icon.setAttribute(TONE_FIX_ATTR, ink);
1187
+ }
1188
+ }
1177
1189
  var INK_FIX_CSS = `[${MEASURING_ATTR}] { transition: none !important; }
1178
1190
  [${TONE_FIX_ATTR}="dark"] { color: var(--ohw-brand-light, var(--color-light, #FFFFFF)) !important; }
1179
1191
  [${TONE_FIX_ATTR}="light"] { color: var(--ohw-brand-dark, var(--color-dark, #0C0A09)) !important; }
@@ -19190,7 +19202,7 @@ function apiBase() {
19190
19202
  function bridgeVersion() {
19191
19203
  try {
19192
19204
  if (true) {
19193
- return "0.1.176";
19205
+ return "0.1.177";
19194
19206
  }
19195
19207
  } catch {
19196
19208
  }
@@ -19204,7 +19216,7 @@ function stampBridgeVersionOnDocument() {
19204
19216
  return;
19205
19217
  }
19206
19218
  try {
19207
- const v = true ? "0.1.176" : "";
19219
+ const v = true ? "0.1.177" : "";
19208
19220
  if (v) {
19209
19221
  document.documentElement.setAttribute("data-ohw-bridge-version", v);
19210
19222
  window.__OHW_BRIDGE_VERSION__ = v;
@@ -34546,7 +34558,7 @@ function OhhwellsBridge() {
34546
34558
  postToParent2({
34547
34559
  type: "ow:ready",
34548
34560
  version: "1",
34549
- bridgeVersion: "0.1.176",
34561
+ bridgeVersion: "0.1.177",
34550
34562
  path: pathname,
34551
34563
  nodes: collectEditableNodes(editContentRef.current),
34552
34564
  sections