shadok-ai 0.2.65 → 0.2.66

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/index.html +14 -25
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.2.65",
3
+ "version": "0.2.66",
4
4
  "main": "dist/session.js",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test test/*.ts .claude/skills/shadok-ai-agents/test/*.test.mjs",
package/public/index.html CHANGED
@@ -1092,10 +1092,10 @@
1092
1092
  #chanBar .gauge .label { display: none; } /* valeurs seules, plus compact */
1093
1093
  #chanBar { gap: 6px; padding: 6px 10px; }
1094
1094
  header { flex-wrap: wrap; row-gap: 6px; gap: 8px; padding: 8px 12px; }
1095
- /* One header row: brand + dials + as many tool icons as fit. The spacer that
1096
- right-aligns them on desktop is dropped so they pack left; whatever doesn't
1097
- fit is moved into the menu by reflowHeaderTools (JS). .hdr-tools keeps
1098
- its base `display: contents`, so the icons stay direct header flex items. */
1095
+ /* One header row: brand + dials + ⋯. reflowHeaderTools (JS) moves ALL tool
1096
+ icons into the ⋯ menu on a phone, so nothing wraps to a second line. The
1097
+ spacer that right-aligns them on desktop is dropped so what remains packs
1098
+ left. .hdr-tools keeps its base `display: contents`. */
1099
1099
  header .spacer { display: none; }
1100
1100
  header button.icon { padding: 5px 7px; }
1101
1101
  /* The star pill is the widest tool and would push an icon off the row; on a
@@ -4849,34 +4849,23 @@
4849
4849
  window.open("https://github.com/shadok-ai/shadok-ai", "_blank", "noopener");
4850
4850
  });
4851
4851
 
4852
- // ── Header tool overflow ─────────────────────────────────────────────
4853
- // The header is one row: brand + dials + as many tool icons as fit. Any icon
4854
- // that would push the button onto a second line is moved INTO the ⋯ menu —
4855
- // the real button element, so its click handler travels with it. Desktop has
4856
- // room for them all. Recomputed on load, on resize, and when the name changes.
4852
+ // ── Header tools placement ───────────────────────────────────────────
4853
+ // Desktop keeps every tool icon in the header. A phone keeps the header to a
4854
+ // SINGLE row (brand + dials + ⋯) by moving EVERY tool icon into the ⋯ menu —
4855
+ // the real button elements, so their click handlers travel with them.
4856
+ // Recomputed on load, on resize, and when the instance name changes.
4857
4857
  const OVERFLOW_TOOLS = ["secretsBtn", "profilesBtn", "telegramBtn", "muteNotif"];
4858
4858
  function reflowHeaderTools() {
4859
4859
  const hdrTools = document.querySelector(".hdr-tools");
4860
4860
  const moreWrap = document.querySelector(".more-wrap");
4861
- const moreBtn = $("moreBtn");
4862
4861
  const overflow = $("overflowTools");
4863
- const brand = $("brandName");
4864
- if (!hdrTools || !moreWrap || !moreBtn || !overflow || !brand) return;
4865
- // 1. Reset: every tool back in the header, in the declared order.
4862
+ if (!hdrTools || !moreWrap || !overflow) return;
4863
+ const mobile = matchMedia("(max-width: 640px)").matches;
4866
4864
  for (const id of OVERFLOW_TOOLS) {
4867
4865
  const el = $(id);
4868
- if (el) hdrTools.insertBefore(el, moreWrap);
4869
- }
4870
- // 2. Only a narrow screen needs to shed icons.
4871
- if (!matchMedia("(max-width: 640px)").matches) return;
4872
- // 3. Move icons from the end into the menu until ⋯ is back on the first row.
4873
- // Two rows → ⋯ sits a line-height below the brand; the 8px threshold
4874
- // ignores sub-pixel jitter.
4875
- const rowTop = () => brand.getBoundingClientRect().top;
4876
- for (let i = OVERFLOW_TOOLS.length - 1; i >= 0; i--) {
4877
- if (moreBtn.getBoundingClientRect().top - rowTop() < 8) break; // it fits now
4878
- const el = $(OVERFLOW_TOOLS[i]);
4879
- if (el) overflow.insertBefore(el, overflow.firstChild); // keep original order
4866
+ if (!el) continue;
4867
+ if (mobile) overflow.appendChild(el); // all into the ⋯ menu
4868
+ else hdrTools.insertBefore(el, moreWrap); // back in the header, in order
4880
4869
  }
4881
4870
  }
4882
4871
  let reflowPending = false;