@mcp-consultant-tools/azure-devops 30.0.0-beta.4 → 30.0.0-beta.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-system-prompt.d.ts","sourceRoot":"","sources":["../../src/genui/design-system-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"design-system-prompt.d.ts","sourceRoot":"","sources":["../../src/genui/design-system-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,oBAAoB,QAiLzB,CAAC"}
|
|
@@ -120,30 +120,12 @@ For summary metrics, use KPI cards at the top:
|
|
|
120
120
|
This HTML renders inside a sandboxed iframe. **Links cannot open new tabs** and **file downloads are blocked**.
|
|
121
121
|
You MUST use clipboard-based alternatives for all interactive features.
|
|
122
122
|
|
|
123
|
-
####
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
var ta = document.createElement('textarea');
|
|
130
|
-
ta.value = text;
|
|
131
|
-
ta.style.cssText = 'position:fixed;left:-9999px';
|
|
132
|
-
document.body.appendChild(ta);
|
|
133
|
-
ta.select();
|
|
134
|
-
document.execCommand('copy');
|
|
135
|
-
document.body.removeChild(ta);
|
|
136
|
-
showCopied(btnEl);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
function showCopied(el) {
|
|
140
|
-
if (!el) return;
|
|
141
|
-
var orig = el.textContent;
|
|
142
|
-
el.textContent = 'Copied!';
|
|
143
|
-
el.style.background = '#009900';
|
|
144
|
-
setTimeout(function() { el.textContent = orig; el.style.background = ''; }, 1500);
|
|
145
|
-
}
|
|
146
|
-
\`\`\`
|
|
123
|
+
#### Pre-defined Functions (DO NOT redefine these)
|
|
124
|
+
The following functions are pre-defined by the MCP App shell. Just call them:
|
|
125
|
+
- \`copyText(text, buttonElement)\` — copies text to clipboard with visual "Copied!" feedback
|
|
126
|
+
- \`showCopied(element)\` — shows brief "Copied!" indicator on an element
|
|
127
|
+
- \`captureAsImage(buttonElement)\` — captures the \`#genui-root\` div as a PNG image and copies to clipboard (loads html2canvas automatically)
|
|
128
|
+
**Do NOT define copyText, showCopied, captureAsImage, or copyImage in your \`<script>\` tags.** They already exist on \`window\`.
|
|
147
129
|
|
|
148
130
|
#### Work Item ID Links — Click to Copy URL
|
|
149
131
|
Do NOT use \`<a href="..." target="_blank">\`. Links cannot open in the sandbox.
|
|
@@ -155,56 +137,20 @@ Instead, display the ID as a clickable element that copies the ADO URL to clipbo
|
|
|
155
137
|
\`\`\`
|
|
156
138
|
|
|
157
139
|
#### Copy CSV Button
|
|
158
|
-
Replace download with copy-to-clipboard:
|
|
159
140
|
\`\`\`html
|
|
160
141
|
<button id="csvBtn" onclick="copyCsv()" style="padding:6px 14px; background:var(--link); color:white;
|
|
161
142
|
border:none; border-radius:4px; cursor:pointer; font-size:13px">Copy CSV</button>
|
|
162
143
|
\`\`\`
|
|
163
|
-
|
|
144
|
+
Define \`copyCsv()\` in a \`<script>\` tag — build the CSV string, then call \`copyText(csvString, document.getElementById('csvBtn'))\`.
|
|
164
145
|
|
|
165
146
|
#### Copy as Image Button
|
|
166
|
-
|
|
167
|
-
|
|
147
|
+
The \`captureAsImage\` function is pre-defined. It loads html2canvas automatically,
|
|
148
|
+
captures \`#genui-root\` at 2x resolution, and copies it to clipboard.
|
|
149
|
+
Do NOT include an html2canvas \`<script>\` tag or define copyImage/captureAsImage — just add the button:
|
|
168
150
|
\`\`\`html
|
|
169
|
-
<
|
|
170
|
-
<button id="imgBtn" onclick="copyImage()" style="padding:6px 14px; background:var(--link); color:white;
|
|
151
|
+
<button id="imgBtn" onclick="captureAsImage(this)" style="padding:6px 14px; background:var(--link); color:white;
|
|
171
152
|
border:none; border-radius:4px; cursor:pointer; font-size:13px">Copy as Image</button>
|
|
172
153
|
\`\`\`
|
|
173
|
-
The \`copyImage()\` function:
|
|
174
|
-
\`\`\`javascript
|
|
175
|
-
function copyImage() {
|
|
176
|
-
var btn = document.getElementById('imgBtn');
|
|
177
|
-
btn.textContent = 'Capturing...';
|
|
178
|
-
(function waitH2C() {
|
|
179
|
-
if (typeof html2canvas === 'undefined') { setTimeout(waitH2C, 50); return; }
|
|
180
|
-
html2canvas(document.getElementById('genui-root'), {
|
|
181
|
-
backgroundColor: getComputedStyle(document.documentElement).getPropertyValue('--bg').trim() || '#1E1E1E',
|
|
182
|
-
scale: 2
|
|
183
|
-
}).then(function(canvas) {
|
|
184
|
-
canvas.toBlob(function(blob) {
|
|
185
|
-
try {
|
|
186
|
-
navigator.clipboard.write([new ClipboardItem({'image/png': blob})]).then(
|
|
187
|
-
function() { showCopied(btn); },
|
|
188
|
-
function() { fallbackShowImage(canvas, btn); }
|
|
189
|
-
);
|
|
190
|
-
} catch(e) { fallbackShowImage(canvas, btn); }
|
|
191
|
-
}, 'image/png');
|
|
192
|
-
});
|
|
193
|
-
})();
|
|
194
|
-
}
|
|
195
|
-
function fallbackShowImage(canvas, btn) {
|
|
196
|
-
btn.textContent = 'Copy as Image';
|
|
197
|
-
var img = document.createElement('img');
|
|
198
|
-
img.src = canvas.toDataURL('image/png');
|
|
199
|
-
img.style.cssText = 'max-width:100%;border:1px solid var(--border);border-radius:4px;margin-top:12px';
|
|
200
|
-
var note = document.createElement('div');
|
|
201
|
-
note.style.cssText = 'font-size:12px;color:var(--text-secondary);margin-top:4px';
|
|
202
|
-
note.textContent = 'Right-click the image above to copy or save it.';
|
|
203
|
-
var container = document.getElementById('imgBtn').parentElement;
|
|
204
|
-
container.appendChild(img);
|
|
205
|
-
container.appendChild(note);
|
|
206
|
-
}
|
|
207
|
-
\`\`\`
|
|
208
154
|
|
|
209
155
|
### Button Row
|
|
210
156
|
Place action buttons (Copy CSV, Copy as Image) together in a flex row at the top:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"design-system-prompt.js","sourceRoot":"","sources":["../../src/genui/design-system-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG
|
|
1
|
+
{"version":3,"file":"design-system-prompt.js","sourceRoot":"","sources":["../../src/genui/design-system-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiLnC,CAAC,IAAI,EAAE,CAAC"}
|