@cloudinary/asset-management-mcp 0.9.1 → 0.9.2
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/README.md +12 -15
- package/bin/mcp-server.js +209 -359
- package/bin/mcp-server.js.map +13 -13
- package/esm/landing-page.d.ts.map +1 -1
- package/esm/landing-page.js +9 -3
- package/esm/landing-page.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/mcp-server/apps/app-shared.d.ts +5 -4
- package/esm/mcp-server/apps/app-shared.d.ts.map +1 -1
- package/esm/mcp-server/apps/app-shared.js +79 -12
- package/esm/mcp-server/apps/app-shared.js.map +1 -1
- package/esm/mcp-server/apps/asset-details-app.d.ts.map +1 -1
- package/esm/mcp-server/apps/asset-details-app.js +7 -14
- package/esm/mcp-server/apps/asset-details-app.js.map +1 -1
- package/esm/mcp-server/apps/asset-gallery-app.d.ts.map +1 -1
- package/esm/mcp-server/apps/asset-gallery-app.js +75 -298
- package/esm/mcp-server/apps/asset-gallery-app.js.map +1 -1
- package/esm/mcp-server/apps/asset-upload-app.d.ts.map +1 -1
- package/esm/mcp-server/apps/asset-upload-app.js +29 -24
- package/esm/mcp-server/apps/asset-upload-app.js.map +1 -1
- package/esm/mcp-server/apps/config.d.ts.map +1 -1
- package/esm/mcp-server/apps/config.js +1 -2
- package/esm/mcp-server/apps/config.js.map +1 -1
- package/esm/mcp-server/apps/extensions.d.ts.map +1 -1
- package/esm/mcp-server/apps/extensions.js +6 -1
- package/esm/mcp-server/apps/extensions.js.map +1 -1
- package/esm/mcp-server/cli/serve/impl.js +1 -1
- package/esm/mcp-server/cli/serve/impl.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/types/bigint.d.ts.map +1 -1
- package/esm/types/bigint.js +4 -3
- package/esm/types/bigint.js.map +1 -1
- package/package.json +1 -1
- package/src/landing-page.ts +9 -3
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/apps/app-shared.ts +80 -12
- package/src/mcp-server/apps/asset-details-app.ts +7 -13
- package/src/mcp-server/apps/asset-gallery-app.ts +75 -297
- package/src/mcp-server/apps/asset-upload-app.ts +29 -23
- package/src/mcp-server/apps/config.ts +1 -2
- package/src/mcp-server/apps/extensions.ts +6 -1
- package/src/mcp-server/cli/serve/impl.ts +1 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/types/bigint.ts +18 -17
|
@@ -111,6 +111,7 @@ export const SHARED_CSS_TOKENS = /* css */ `
|
|
|
111
111
|
[data-theme="dark"] .status-warn, .dark .status-warn { background: #854d0e; color: #fef08a; }
|
|
112
112
|
[data-theme="dark"] .status-err, .dark .status-err { background: #991b1b; color: #fecaca; }
|
|
113
113
|
|
|
114
|
+
html { overflow: hidden; }
|
|
114
115
|
body {
|
|
115
116
|
font-family: var(--cld-font);
|
|
116
117
|
background: var(--cld-bg);
|
|
@@ -121,16 +122,35 @@ body {
|
|
|
121
122
|
position: relative;
|
|
122
123
|
}
|
|
123
124
|
.theme-btn {
|
|
124
|
-
position: absolute; top: 4px; right: 4px; z-index: 900;
|
|
125
125
|
width: 22px; height: 22px; border-radius: 50%;
|
|
126
126
|
border: 1px solid transparent; background: transparent;
|
|
127
127
|
color: var(--cld-text3); cursor: pointer;
|
|
128
128
|
display: flex; align-items: center; justify-content: center;
|
|
129
129
|
padding: 0; transition: background 0.15s, color 0.15s, border-color 0.15s;
|
|
130
|
-
opacity: 0.5;
|
|
130
|
+
opacity: 0.5; flex-shrink: 0;
|
|
131
131
|
}
|
|
132
132
|
.theme-btn:hover { background: var(--cld-bg3); color: var(--cld-text); border-color: var(--cld-border); opacity: 1; }
|
|
133
133
|
.theme-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
134
|
+
/* Shared icon-button — square pill, same family as theme-btn */
|
|
135
|
+
.icon-btn {
|
|
136
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 5px;
|
|
137
|
+
background: none; border: 1px solid var(--cld-border); border-radius: var(--cld-radius-sm);
|
|
138
|
+
color: var(--cld-text2); cursor: pointer; padding: 4px 8px;
|
|
139
|
+
font-size: 12px; font-weight: 500; font-family: inherit; line-height: 1;
|
|
140
|
+
transition: background 0.15s, color 0.15s, border-color 0.15s;
|
|
141
|
+
white-space: nowrap; flex-shrink: 0;
|
|
142
|
+
}
|
|
143
|
+
.icon-btn:hover { background: var(--cld-bg3); color: var(--cld-text); border-color: var(--cld-border2); }
|
|
144
|
+
.icon-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
|
|
145
|
+
/* icon-only variant (no text label) */
|
|
146
|
+
.icon-btn.icon-only { padding: 4px; width: 28px; height: 28px; }
|
|
147
|
+
/* header state icon (decorative, not a button) */
|
|
148
|
+
.upload-header-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
|
|
149
|
+
.upload-header-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
150
|
+
.upload-header-icon.icon-success { color: var(--cld-success); }
|
|
151
|
+
.upload-header-icon.icon-error { color: var(--cld-error); }
|
|
152
|
+
.upload-header-icon.icon-warning { color: var(--cld-warning); }
|
|
153
|
+
.upload-header-icon.icon-accent { color: var(--cld-accent); }
|
|
134
154
|
`;
|
|
135
155
|
// ── CSS: Shared component styles ────────────────────────────────────
|
|
136
156
|
export const SHARED_CSS_COMPONENTS = /* css */ `
|
|
@@ -383,7 +403,8 @@ details.detail-section > summary.detail-section-title::-webkit-details-marker {
|
|
|
383
403
|
}
|
|
384
404
|
.upload-zone:hover { border-color: var(--cld-accent); background: var(--cld-accent-bg); }
|
|
385
405
|
.upload-zone.dragover { border-color: var(--cld-accent); background: var(--cld-accent-bg); }
|
|
386
|
-
.upload-zone-icon {
|
|
406
|
+
.upload-zone-icon { margin-bottom: 8px; color: var(--cld-text3); display: flex; align-items: center; justify-content: center; }
|
|
407
|
+
.upload-zone-icon svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
387
408
|
.upload-zone-text { font-size: 14px; color: var(--cld-text2); margin-bottom: 4px; }
|
|
388
409
|
.upload-zone-hint { font-size: 12px; color: var(--cld-text3); }
|
|
389
410
|
.upload-zone-btn {
|
|
@@ -429,8 +450,9 @@ details.detail-section > summary.detail-section-title::-webkit-details-marker {
|
|
|
429
450
|
.upload-preview-icon {
|
|
430
451
|
width: 56px; height: 56px; border-radius: var(--cld-radius-sm);
|
|
431
452
|
background: var(--cld-bg3); flex-shrink: 0; display: flex;
|
|
432
|
-
align-items: center; justify-content: center;
|
|
453
|
+
align-items: center; justify-content: center; color: var(--cld-text3);
|
|
433
454
|
}
|
|
455
|
+
.upload-preview-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
434
456
|
.upload-preview-info { flex: 1; min-width: 0; }
|
|
435
457
|
.upload-preview-name { font-size: 13px; font-weight: 600; color: var(--cld-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
436
458
|
.upload-preview-meta { font-size: 11px; color: var(--cld-text3); margin-top: 2px; }
|
|
@@ -579,19 +601,15 @@ details.upload-section > .upload-form { margin: 0; padding: 10px 12px; }
|
|
|
579
601
|
background: var(--cld-accent-bg); border: 1px solid var(--cld-accent);
|
|
580
602
|
border-radius: var(--cld-radius); margin-bottom: 4px; position: relative;
|
|
581
603
|
}
|
|
582
|
-
.upload-staged-icon {
|
|
604
|
+
.upload-staged-icon { flex-shrink: 0; display: flex; align-items: center; color: var(--cld-accent); }
|
|
605
|
+
.upload-staged-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
583
606
|
.upload-staged-info { flex: 1; min-width: 0; }
|
|
584
607
|
.upload-staged-name {
|
|
585
608
|
font-size: 13px; font-weight: 600; color: var(--cld-text);
|
|
586
609
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
587
610
|
}
|
|
588
611
|
.upload-staged-meta { font-size: 11px; color: var(--cld-text3); margin-top: 2px; }
|
|
589
|
-
.upload-staged-clear {
|
|
590
|
-
background: none; border: none; cursor: pointer; font-size: 16px;
|
|
591
|
-
color: var(--cld-text3); padding: 4px 6px; border-radius: var(--cld-radius-sm);
|
|
592
|
-
transition: color 0.15s, background 0.15s; flex-shrink: 0;
|
|
593
|
-
}
|
|
594
|
-
.upload-staged-clear:hover { color: var(--cld-error); background: rgba(206,25,13,0.08); }
|
|
612
|
+
.upload-staged-clear:hover { color: var(--cld-error); border-color: var(--cld-error); background: rgba(206,25,13,0.08); }
|
|
595
613
|
|
|
596
614
|
/* Upload submit button */
|
|
597
615
|
.upload-submit {
|
|
@@ -638,6 +656,23 @@ details.upload-section > .upload-form { margin: 0; padding: 10px 12px; }
|
|
|
638
656
|
.json-null { color: #868e96; }
|
|
639
657
|
}
|
|
640
658
|
`;
|
|
659
|
+
// ── JS: SVG icon strings (Lucide-style, 24px viewBox, stroke-based) ──
|
|
660
|
+
export const SHARED_JS_ICONS = /* js */ `
|
|
661
|
+
var IC = {
|
|
662
|
+
refresh: '<svg viewBox="0 0 24 24"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M3 21v-5h5"/></svg>',
|
|
663
|
+
chevronLeft:'<svg viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"/></svg>',
|
|
664
|
+
arrowDown: '<svg viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"/><polyline points="19 12 12 19 5 12"/></svg>',
|
|
665
|
+
x: '<svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',
|
|
666
|
+
zap: '<svg viewBox="0 0 24 24"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>',
|
|
667
|
+
uploadCloud:'<svg viewBox="0 0 24 24"><polyline points="16 16 12 12 8 16"/><line x1="12" y1="12" x2="12" y2="21"/><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"/></svg>',
|
|
668
|
+
alertTriangle:'<svg viewBox="0 0 24 24"><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',
|
|
669
|
+
folderOpen: '<svg viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/><polyline points="22 13 17 13 15 16 9 16 7 13 2 13"/></svg>',
|
|
670
|
+
checkCircle:'<svg viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>',
|
|
671
|
+
clock: '<svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>',
|
|
672
|
+
file: '<svg viewBox="0 0 24 24"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/><polyline points="13 2 13 9 20 9"/></svg>',
|
|
673
|
+
image: '<svg viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>',
|
|
674
|
+
};
|
|
675
|
+
`;
|
|
641
676
|
// ── JS: MCPApp client class ─────────────────────────────────────────
|
|
642
677
|
export const SHARED_JS_MCP_CLIENT = /* js */ `
|
|
643
678
|
var RPC_TIMEOUT_MS = 15000;
|
|
@@ -726,6 +761,29 @@ class MCPApp {
|
|
|
726
761
|
`;
|
|
727
762
|
// ── JS: Helper functions ────────────────────────────────────────────
|
|
728
763
|
export const SHARED_JS_HELPERS = /* js */ `
|
|
764
|
+
function copyText(text) {
|
|
765
|
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
766
|
+
return navigator.clipboard.writeText(text).catch(function() { return _copyFallback(text); });
|
|
767
|
+
}
|
|
768
|
+
return _copyFallback(text);
|
|
769
|
+
}
|
|
770
|
+
function _copyFallback(text) {
|
|
771
|
+
return new Promise(function(resolve, reject) {
|
|
772
|
+
try {
|
|
773
|
+
var ta = document.createElement("textarea");
|
|
774
|
+
ta.value = text;
|
|
775
|
+
ta.setAttribute("readonly", "");
|
|
776
|
+
ta.style.position = "fixed"; ta.style.top = "0"; ta.style.left = "0";
|
|
777
|
+
ta.style.opacity = "0"; ta.style.pointerEvents = "none";
|
|
778
|
+
document.body.appendChild(ta);
|
|
779
|
+
ta.select(); ta.setSelectionRange(0, text.length);
|
|
780
|
+
var ok = document.execCommand("copy");
|
|
781
|
+
document.body.removeChild(ta);
|
|
782
|
+
if (ok) resolve(); else reject(new Error("Clipboard unavailable"));
|
|
783
|
+
} catch (e) { reject(e); }
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
|
|
729
787
|
function fmtBytes(b) {
|
|
730
788
|
if (!b) return "";
|
|
731
789
|
var u = ["B","KB","MB","GB"], i = Math.min(Math.floor(Math.log(b)/Math.log(1024)), 3);
|
|
@@ -1955,7 +2013,16 @@ function renderThemeToggle() {
|
|
|
1955
2013
|
applyTheme();
|
|
1956
2014
|
renderThemeToggle();
|
|
1957
2015
|
});
|
|
1958
|
-
document.
|
|
2016
|
+
var slot = document.getElementById("header-actions");
|
|
2017
|
+
if (slot) {
|
|
2018
|
+
slot.appendChild(btn);
|
|
2019
|
+
} else {
|
|
2020
|
+
btn.style.position = "absolute";
|
|
2021
|
+
btn.style.top = "4px";
|
|
2022
|
+
btn.style.right = "4px";
|
|
2023
|
+
btn.style.zIndex = "900";
|
|
2024
|
+
document.body.appendChild(btn);
|
|
2025
|
+
}
|
|
1959
2026
|
}
|
|
1960
2027
|
|
|
1961
2028
|
function setupHostContext(app) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-shared.js","sourceRoot":"","sources":["../../../src/mcp-server/apps/app-shared.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,uEAAuE;AACvE,SAAS,yBAAyB,CAChC,MAA+B;IAE/B,MAAM,KAAK,GAAI,MAAmD;SAC/D,UAAU,IAAI,EAAE,CAAC;IACpB,MAAM,MAAM,GAA2B,EAAE,CAAC;IAC1C,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAChD,MAAM,CAAC,GAAG,IAAuC,CAAC;QAClD,IAAI,CAAC,EAAE,WAAW;YAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC;IAClD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,WAAW,GAAG,YAAY,CAAC,cAAc,EAAE;IAC/C,eAAe,EAAE,KAAK;CACvB,CAA4B,CAAC;AAC9B,MAAM,aAAa,GAAG,YAAY,CAAC,wBAAwB,EAAE;IAC3D,eAAe,EAAE,KAAK;CACvB,CAA4B,CAAC;AAC9B,MAAM,gBAAgB,GAAG,IAAI,CAAC,SAAS,CAAC;IACtC,GAAG,yBAAyB,CAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAs5BlD,CAAC;AAEF,uEAAuE;AACvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmG9C,CAAC;AAEF,+EAA+E;AAC/E,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,oBAAoB,gBAAgB;;;;;;;;CAQ9E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-details-app.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/apps/asset-details-app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asset-details-app.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/apps/asset-details-app.ts"],"names":[],"mappings":"AAqBA,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7D"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Shares CLDS tokens, MCPApp client, helpers, and detail renderers
|
|
6
6
|
* with the gallery app via app-shared.ts.
|
|
7
7
|
*/
|
|
8
|
-
import { SHARED_CSS_TOKENS, SHARED_CSS_COMPONENTS, SHARED_JS_MCP_CLIENT, SHARED_JS_HELPERS, SHARED_JS_TOOLTIPS, SHARED_JS_MODAL, SHARED_JS_DETAIL_RENDERERS, SHARED_JS_HOST_CONTEXT, } from "./app-shared.js";
|
|
8
|
+
import { SHARED_CSS_TOKENS, SHARED_CSS_COMPONENTS, SHARED_JS_ICONS, SHARED_JS_MCP_CLIENT, SHARED_JS_HELPERS, SHARED_JS_TOOLTIPS, SHARED_JS_MODAL, SHARED_JS_DETAIL_RENDERERS, SHARED_JS_HOST_CONTEXT, } from "./app-shared.js";
|
|
9
9
|
import { injectToolName } from "./uri.js";
|
|
10
10
|
export function getAssetDetailsHtml(toolName) {
|
|
11
11
|
return injectToolName(ASSET_DETAILS_HTML, toolName);
|
|
@@ -47,16 +47,6 @@ const ASSET_DETAILS_CSS = /* css */ `
|
|
|
47
47
|
padding: 2px 7px; border-radius: 4px; border: 1px solid var(--cld-border);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.open-link {
|
|
51
|
-
padding: 6px 14px; border-radius: var(--cld-radius-sm);
|
|
52
|
-
font-size: 12px; font-weight: 500; cursor: pointer;
|
|
53
|
-
border: 1px solid var(--cld-accent); background: transparent;
|
|
54
|
-
color: var(--cld-accent); font-family: inherit;
|
|
55
|
-
transition: background 0.15s;
|
|
56
|
-
white-space: nowrap; flex-shrink: 0;
|
|
57
|
-
}
|
|
58
|
-
.open-link:hover { background: var(--cld-accent-bg); }
|
|
59
|
-
|
|
60
50
|
.hero-container {
|
|
61
51
|
position: relative; margin-bottom: var(--cld-sp-md);
|
|
62
52
|
border-radius: var(--cld-radius); overflow: hidden;
|
|
@@ -118,9 +108,9 @@ function renderPage(r) {
|
|
|
118
108
|
if (dur) h += '<span class="pill">' + dur + "</span>";
|
|
119
109
|
if (size) h += '<span class="pill">' + size + "</span>";
|
|
120
110
|
h += "</div></div>";
|
|
121
|
-
h += '<div style="display:flex;gap:
|
|
122
|
-
h += '<button class="
|
|
123
|
-
|
|
111
|
+
h += '<div id="header-actions" style="display:flex;gap:8px;flex-shrink:0;align-items:center">';
|
|
112
|
+
if (url) h += '<button class="icon-btn" id="open-asset">Open</button>';
|
|
113
|
+
h += '<button class="icon-btn icon-only" id="refresh-asset" title="Refresh">' + IC.refresh + '</button>';
|
|
124
114
|
h += "</div>";
|
|
125
115
|
h += "</div>";
|
|
126
116
|
|
|
@@ -162,6 +152,7 @@ function renderPage(r) {
|
|
|
162
152
|
h += "</div>";
|
|
163
153
|
|
|
164
154
|
root.innerHTML = h;
|
|
155
|
+
renderThemeToggle();
|
|
165
156
|
|
|
166
157
|
// Event delegation
|
|
167
158
|
root.addEventListener("click", function handler(e) {
|
|
@@ -207,6 +198,7 @@ function showFetchPrompt() {
|
|
|
207
198
|
h += '<button class="prompt-btn prompt-btn-primary" id="fetch-direct-btn">Fetch Directly</button>';
|
|
208
199
|
h += "</div></div>";
|
|
209
200
|
root.innerHTML = h;
|
|
201
|
+
renderThemeToggle();
|
|
210
202
|
document.getElementById("fetch-direct-btn").addEventListener("click", function() { fetchDirect(); });
|
|
211
203
|
}
|
|
212
204
|
|
|
@@ -286,6 +278,7 @@ ${ASSET_DETAILS_CSS}
|
|
|
286
278
|
<div id="app"><div class="status">Loading asset details…</div></div>
|
|
287
279
|
|
|
288
280
|
<script>
|
|
281
|
+
${SHARED_JS_ICONS}
|
|
289
282
|
${SHARED_JS_MCP_CLIENT}
|
|
290
283
|
${SHARED_JS_HELPERS}
|
|
291
284
|
${SHARED_JS_TOOLTIPS}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-details-app.js","sourceRoot":"","sources":["../../../src/mcp-server/apps/asset-details-app.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,UAAU,mBAAmB,CAAC,QAAiB;IACnD,OAAO,cAAc,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,iBAAiB,GAAG,SAAS,CAAC
|
|
1
|
+
{"version":3,"file":"asset-details-app.js","sourceRoot":"","sources":["../../../src/mcp-server/apps/asset-details-app.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,UAAU,mBAAmB,CAAC,QAAiB;IACnD,OAAO,cAAc,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,iBAAiB,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4DnC,CAAC;AAEF,MAAM,gBAAgB,GAAG,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8LjC,CAAC;AAEF,MAAM,kBAAkB,GAAG,UAAU,CAAC;;;;;;;EAOpC,iBAAiB;EACjB,qBAAqB;EACrB,iBAAiB;;;;;;;EAOjB,eAAe;EACf,oBAAoB;EACpB,iBAAiB;EACjB,kBAAkB;EAClB,eAAe;EACf,0BAA0B;EAC1B,sBAAsB;EACtB,gBAAgB;;;QAGV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-gallery-app.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/apps/asset-gallery-app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asset-gallery-app.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/apps/asset-gallery-app.ts"],"names":[],"mappings":"AAsBA,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAE7D"}
|