@kolbo/mcp 1.30.6 → 1.30.7

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/src/apps/bridge.js +21 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolbo/mcp",
3
- "version": "1.30.6",
3
+ "version": "1.30.7",
4
4
  "description": "Kolbo AI MCP Server - Generate images, videos, music, speech, and sound effects from Claude Code",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -102,10 +102,28 @@ const BRIDGE_JS = `
102
102
  }
103
103
 
104
104
  var sizeTimer = null;
105
- new MutationObserver(function () {
105
+ function queueSize(delay) {
106
106
  clearTimeout(sizeTimer);
107
- sizeTimer = setTimeout(notifySize, 120);
108
- }).observe(document.documentElement, { childList: true, subtree: true, attributes: true });
107
+ sizeTimer = setTimeout(notifySize, delay || 120);
108
+ }
109
+ new MutationObserver(function () { queueSize(120); })
110
+ .observe(document.documentElement, { childList: true, subtree: true, attributes: true });
111
+ // DOM mutations don't fire when an <img>/<video> finishes loading and reflows
112
+ // the card — without this the host keeps the pre-image height and the card
113
+ // gets an inner scrollbar. ResizeObserver catches every layout change.
114
+ if (window.ResizeObserver) {
115
+ var ro = new ResizeObserver(function () { queueSize(60); });
116
+ ro.observe(document.documentElement);
117
+ ro.observe(document.body);
118
+ var card = document.querySelector('.k-card');
119
+ if (card) ro.observe(card);
120
+ }
121
+ // Belt and suspenders: media load events bubble as capture-phase 'load'.
122
+ document.addEventListener('load', function (e) {
123
+ var t = e.target && e.target.tagName;
124
+ if (t === 'IMG' || t === 'VIDEO') queueSize(60);
125
+ }, true);
126
+ document.addEventListener('loadedmetadata', function () { queueSize(60); }, true);
109
127
 
110
128
  window.kolbo = {
111
129
  ready: function (f) { if (initialized) f(hostContext); else readyFns.push(f); },