@kolbo/mcp 1.30.8 → 1.30.9
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/package.json +1 -1
- package/src/apps/html.js +3 -2
- package/src/apps/theme.js +13 -5
- package/src/apps/widgets/generation.js +5 -0
package/package.json
CHANGED
package/src/apps/html.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const { BRIDGE_JS } = require('./bridge');
|
|
4
|
-
const { KOLBO_CSS, KOLBO_LOGO_SVG } = require('./theme');
|
|
4
|
+
const { KOLBO_CSS, KOLBO_LOGO_SVG, KOLBO_LOGO_IMG } = require('./theme');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Assemble a self-contained widget page. No build step — each widget module
|
|
@@ -25,7 +25,8 @@ ${body}
|
|
|
25
25
|
<script>${BRIDGE_JS}</script>
|
|
26
26
|
<script>
|
|
27
27
|
// ---- shared widget runtime ----
|
|
28
|
-
var
|
|
28
|
+
var KOLBO_LOGO_FALLBACK = ${JSON.stringify(KOLBO_LOGO_SVG)};
|
|
29
|
+
var KOLBO_LOGO = ${JSON.stringify(KOLBO_LOGO_IMG)};
|
|
29
30
|
function esc(s) {
|
|
30
31
|
return String(s == null ? '' : s).replace(/[&<>"']/g, function (c) {
|
|
31
32
|
return { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c];
|
package/src/apps/theme.js
CHANGED
|
@@ -115,7 +115,7 @@ body {
|
|
|
115
115
|
.k-skel {
|
|
116
116
|
position: relative; border-radius: 10px; overflow: hidden;
|
|
117
117
|
background: var(--surface-2); border: 1px solid var(--border);
|
|
118
|
-
min-height: 120px;
|
|
118
|
+
min-height: 120px; max-height: 300px;
|
|
119
119
|
}
|
|
120
120
|
.k-skel.video { aspect-ratio: 16 / 9; }
|
|
121
121
|
.k-skel.square { aspect-ratio: 1; }
|
|
@@ -157,9 +157,13 @@ body {
|
|
|
157
157
|
.k-media img, .k-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
158
158
|
.k-media.selected { outline: 2px solid var(--brand); outline-offset: 1px; }
|
|
159
159
|
|
|
160
|
+
/* Keep the whole completed card under the host's iframe height cap (~800px):
|
|
161
|
+
header + prompt + chips + viewer + thumbs + actions + footer must all fit,
|
|
162
|
+
or claude.ai adds an inner scrollbar. Click the image to open it full-size. */
|
|
160
163
|
.k-viewer { margin-bottom: 10px; }
|
|
161
|
-
.k-viewer img, .k-viewer video { display: block; width: 100%; max-height:
|
|
162
|
-
border-radius: 12px; background: #000; border: 1px solid var(--border); }
|
|
164
|
+
.k-viewer img, .k-viewer video { display: block; width: 100%; max-height: 340px; object-fit: contain;
|
|
165
|
+
border-radius: 12px; background: #000; border: 1px solid var(--border); cursor: zoom-in; }
|
|
166
|
+
.k-viewer video { cursor: default; }
|
|
163
167
|
.k-thumbs { display: flex; gap: 6px; margin: 10px 0 2px; }
|
|
164
168
|
.k-thumbs .k-thumb { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; cursor: pointer;
|
|
165
169
|
border: 2px solid transparent; opacity: 0.75; transition: all 150ms var(--smooth); flex: none; }
|
|
@@ -241,7 +245,11 @@ body {
|
|
|
241
245
|
.k-credits { margin-left: auto; font-family: 'JetBrains Mono', monospace; }
|
|
242
246
|
`;
|
|
243
247
|
|
|
244
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* Kolbo mark — the real app icon from the CDN (the host CSP allows it), with
|
|
250
|
+
* the simplified inline SVG only as the onerror fallback.
|
|
251
|
+
*/
|
|
245
252
|
const KOLBO_LOGO_SVG = `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="24" height="24" rx="6" fill="#3b82f6"/><path d="M7 5.5v13M7 12l6.5-6.5M7 12l7 6.5" stroke="#fff" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/></svg>`;
|
|
253
|
+
const KOLBO_LOGO_IMG = `<img src="https://kolbo-general-media.fra1.cdn.digitaloceanspaces.com/models_icons/kolbo-ai.png" alt="Kolbo" style="width:18px;height:18px;border-radius:5px;display:block" onerror="this.outerHTML=KOLBO_LOGO_FALLBACK">`;
|
|
246
254
|
|
|
247
|
-
module.exports = { KOLBO_CSS, KOLBO_LOGO_SVG };
|
|
255
|
+
module.exports = { KOLBO_CSS, KOLBO_LOGO_SVG, KOLBO_LOGO_IMG };
|
|
@@ -173,6 +173,11 @@ function renderImages(sc, urls) {
|
|
|
173
173
|
// instead of a broken empty viewer.
|
|
174
174
|
var viewer = '<div class="k-viewer"><img id="main-img" src="' + esc(urls[selected]) + '" alt="" onerror="window.__imgFail && window.__imgFail()"></div>';
|
|
175
175
|
window.__imgFail = function () { renderLinks(urls); window.kolbo.notifySize(); };
|
|
176
|
+
// Constrained viewer → click opens the original full-size.
|
|
177
|
+
setTimeout(function () {
|
|
178
|
+
var img = el('main-img');
|
|
179
|
+
if (img) img.onclick = function () { window.kolbo.openLink(state.urls[selected]); };
|
|
180
|
+
}, 0);
|
|
176
181
|
var thumbs = '';
|
|
177
182
|
if (urls.length > 1) {
|
|
178
183
|
thumbs = '<div class="k-thumbs">' + urls.map(function (u, i) {
|