dsh-skill-hub 0.3.2 → 0.3.3

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/lib/client.js CHANGED
@@ -1081,20 +1081,25 @@ window.__ModuleLoader__.load({
1081
1081
  if (nameEl === null) continue;
1082
1082
  const name = (nameEl.textContent ?? "").trim();
1083
1083
  if (name.length === 0) continue;
1084
- if (!modelByName.has(name) && nameEl.textContent !== name) continue;
1085
1084
  const color = modelByName.get(name) ?? true ? modelColor : userColor;
1085
+ const wrapper = document.createElement("span");
1086
+ wrapper.setAttribute("data-skill-dot", "");
1087
+ wrapper.setAttribute("aria-hidden", "true");
1088
+ wrapper.style.width = "16px";
1089
+ wrapper.style.height = "16px";
1090
+ wrapper.style.display = "inline-flex";
1091
+ wrapper.style.justifyContent = "center";
1092
+ wrapper.style.alignItems = "center";
1093
+ wrapper.style.flex = "none";
1086
1094
  const dot = document.createElement("span");
1087
- dot.setAttribute("data-skill-dot", "");
1088
- dot.setAttribute("aria-hidden", "true");
1089
1095
  dot.style.display = "inline-block";
1090
1096
  dot.style.width = "6px";
1091
1097
  dot.style.height = "6px";
1092
1098
  dot.style.borderRadius = "3px";
1093
1099
  dot.style.background = color;
1094
1100
  dot.style.flex = "none";
1095
- const iconEl = opt.querySelector("[class*=\"itemIcon\"]");
1096
- if (iconEl !== null && iconEl.nextSibling !== null) iconEl.parentElement?.insertBefore(dot, iconEl.nextSibling);
1097
- else nameEl.parentElement?.insertBefore(dot, nameEl);
1101
+ wrapper.appendChild(dot);
1102
+ nameEl.parentElement?.insertBefore(wrapper, nameEl);
1098
1103
  }
1099
1104
  };
1100
1105
  requestAnimationFrame(() => setTimeout(run, 0));