spequi 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +290 -2
- package/bin/spequi.mjs +47 -0
- package/docs/agent-workflow.md +470 -0
- package/package.json +70 -4
- package/public/app.css +62 -0
- package/public/app.js +228 -0
- package/public/diff.css +217 -0
- package/public/fonts/README.md +22 -0
- package/public/fonts/dm-sans-OFL.txt +93 -0
- package/public/fonts/dm-sans-variable-latin-ext.woff2 +0 -0
- package/public/fonts/dm-sans-variable-latin.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-400-cyrillic-ext.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-400-cyrillic.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-400-latin-ext.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-400-latin.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-400-vietnamese.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-500-cyrillic-ext.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-500-cyrillic.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-500-latin-ext.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-500-latin.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-500-vietnamese.woff2 +0 -0
- package/public/fonts/ibm-plex-mono-OFL.txt +93 -0
- package/public/fonts.css +109 -0
- package/public/lifecycle.css +93 -0
- package/public/lifecycle.js +84 -0
- package/public/review.css +272 -0
- package/public/review.js +358 -0
- package/public/session.js +50 -0
- package/public/studio.css +161 -0
- package/public/studio.js +188 -0
- package/skills/spequi/SKILL.md +74 -0
- package/src/agent-session.mjs +32 -0
- package/src/commands.mjs +49 -0
- package/src/comment-controls.mjs +10 -0
- package/src/comment-view.mjs +51 -0
- package/src/creation-view.mjs +13 -0
- package/src/diff-comments.mjs +8 -0
- package/src/diff-view.mjs +70 -0
- package/src/diffs.mjs +88 -0
- package/src/direct-preview.mjs +168 -0
- package/src/document-view.mjs +75 -0
- package/src/feedback.mjs +86 -0
- package/src/files.mjs +50 -0
- package/src/highlighting.mjs +91 -0
- package/src/impact-view.mjs +30 -0
- package/src/impact.mjs +161 -0
- package/src/job-dialogue.mjs +41 -0
- package/src/jobs.mjs +174 -0
- package/src/lifecycle-view.mjs +58 -0
- package/src/lifecycle.mjs +119 -0
- package/src/openspec-cli.mjs +40 -0
- package/src/preview-view.mjs +83 -0
- package/src/previews.mjs +112 -0
- package/src/project.mjs +59 -0
- package/src/review-store.mjs +150 -0
- package/src/review-view.mjs +23 -0
- package/src/server.mjs +175 -0
- package/src/source-preview-view.mjs +14 -0
- package/src/spec-context-view.mjs +37 -0
- package/src/spec-context.mjs +147 -0
- package/src/spec-impact.mjs +145 -0
- package/src/specs.mjs +80 -0
- package/src/studio-documents.mjs +25 -0
- package/src/studio-plans.mjs +71 -0
- package/src/studio-view.mjs +93 -0
- package/src/views.mjs +101 -0
- package/templates/cli.mjs +38 -0
package/public/app.js
ADDED
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const themeToggle = document.getElementById('theme-toggle');
|
|
3
|
+
function applyTheme(theme) {
|
|
4
|
+
const dark = theme === 'dark' || theme === 'developer';
|
|
5
|
+
document.documentElement.dataset.theme = dark ? 'dark' : 'enterprise';
|
|
6
|
+
const label = dark ? 'Switch to light mode' : 'Switch to dark mode';
|
|
7
|
+
themeToggle?.setAttribute('aria-label', label);
|
|
8
|
+
themeToggle?.setAttribute('title', label);
|
|
9
|
+
}
|
|
10
|
+
try { applyTheme(localStorage.getItem('spequi-theme')); } catch { applyTheme('enterprise'); }
|
|
11
|
+
themeToggle?.addEventListener('click', () => {
|
|
12
|
+
applyTheme(document.documentElement.dataset.theme === 'dark' ? 'enterprise' : 'dark');
|
|
13
|
+
try { localStorage.setItem('spequi-theme', document.documentElement.dataset.theme); } catch {}
|
|
14
|
+
});
|
|
15
|
+
let pendingRefresh = false, refreshing = false, followUpRefresh = false;
|
|
16
|
+
const drafts = {};
|
|
17
|
+
const specDisclosures = new Map();
|
|
18
|
+
const sourceDrafts = new Map(), sourcePending = new Set(), sourceMessages = new Map();
|
|
19
|
+
const initialDetailsToggle = document.getElementById('toggle-review-details');
|
|
20
|
+
let reviewDetailsOpen = initialDetailsToggle ? initialDetailsToggle.getAttribute('aria-expanded') === 'true' : undefined, preserveReader = null;
|
|
21
|
+
function toast(message) { const node = document.getElementById('toast'); node.textContent = message; node.classList.add('visible'); clearTimeout(node.hideTimer); node.hideTimer = setTimeout(() => node.classList.remove('visible'), 4500); }
|
|
22
|
+
function remember() {
|
|
23
|
+
for (const node of document.querySelectorAll('.spec-context-quote[id]')) specDisclosures.set(node.id, node.open);
|
|
24
|
+
for (const name of ['instructions', 'workflow-action', 'file-filter']) { const input = document.getElementById(name); if (input) drafts[name] = input.value; }
|
|
25
|
+
const scope = document.getElementById('workspace')?.dataset.change;
|
|
26
|
+
const tools = document.querySelector('.source-preview-body');
|
|
27
|
+
if (tools && scope) sourceDrafts.set(scope, { patch: document.getElementById('source-preview-patch')?.value || '', analysisId: tools.dataset.analysisId, files: [...tools.querySelectorAll('input[name="files"]:checked')].map(input => input.value) });
|
|
28
|
+
}
|
|
29
|
+
function restore() {
|
|
30
|
+
for (const node of document.querySelectorAll('.spec-context-quote[id]')) if (specDisclosures.has(node.id)) node.open = specDisclosures.get(node.id);
|
|
31
|
+
for (const [name, value] of Object.entries(drafts)) { const input = document.getElementById(name); if (input) input.value = value; }
|
|
32
|
+
const scope = document.getElementById('workspace')?.dataset.change, saved = sourceDrafts.get(scope);
|
|
33
|
+
const tools = document.querySelector('.source-preview-body');
|
|
34
|
+
if (saved && tools) {
|
|
35
|
+
const patch = document.getElementById('source-preview-patch'); if (patch) patch.value = saved.patch;
|
|
36
|
+
if (saved.analysisId === tools.dataset.analysisId) for (const input of tools.querySelectorAll('input[name="files"]')) input.checked = saved.files.includes(input.value);
|
|
37
|
+
}
|
|
38
|
+
if (sourcePending.has(scope)) for (const button of document.querySelectorAll('[data-source-action] button')) button.disabled = true;
|
|
39
|
+
const message = sourceMessages.get(scope), feedback = document.getElementById('source-preview-feedback');
|
|
40
|
+
if (message && feedback) { feedback.textContent = message.text; feedback.className = message.error ? 'error-message' : 'success-message'; }
|
|
41
|
+
}
|
|
42
|
+
function readingViewport() { return document.querySelector('.diff-code-scroll') || document.querySelector('.reader'); }
|
|
43
|
+
function refresh() {
|
|
44
|
+
if (sourcePending.size) { pendingRefresh = true; return; }
|
|
45
|
+
if (refreshing) { pendingRefresh = true; followUpRefresh = true; return; }
|
|
46
|
+
if (!window.htmx) { pendingRefresh = true; return; }
|
|
47
|
+
if (document.activeElement?.matches('input,textarea,select') || document.getElementById('apply-dialog').open) { pendingRefresh = true; return; }
|
|
48
|
+
refreshing = true; pendingRefresh = false; remember();
|
|
49
|
+
const reader = readingViewport(), top = reader?.scrollTop || 0, left = reader?.scrollLeft || 0;
|
|
50
|
+
const disclosures = [...document.querySelectorAll('#workspace details[id]')].filter(node => node.id !== 'review-comment-composer').map(node => ({ id: node.id, open: node.hasAttribute('open') }));
|
|
51
|
+
const focused = document.activeElement;
|
|
52
|
+
const focusID = focused?.id;
|
|
53
|
+
const focusHref = focused?.closest('a')?.getAttribute('href');
|
|
54
|
+
const focusDetails = focused?.matches('summary') ? focused.closest('details')?.id : null;
|
|
55
|
+
const menuOpen = document.getElementById('workspace').classList.contains('navigation-open');
|
|
56
|
+
const refreshURL = document.getElementById('workspace').dataset.refreshUrl || location.pathname + location.search;
|
|
57
|
+
window.htmx.ajax('GET', refreshURL, { target: '#workspace', swap: 'outerHTML' }).then(() => {
|
|
58
|
+
restore(); const updated = readingViewport(); if (updated) { updated.scrollTop = top; updated.scrollLeft = left; }
|
|
59
|
+
for (const state of disclosures) { const node = document.getElementById(state.id); if (node) node.toggleAttribute('open', state.open || node.hasAttribute('data-lifecycle-waiting') || node.hasAttribute('data-lifecycle-failed')); }
|
|
60
|
+
if (menuOpen) { document.getElementById('workspace').classList.add('navigation-open'); document.querySelector('.mobile-menu')?.setAttribute('aria-expanded', 'true'); }
|
|
61
|
+
const target = focusID ? document.getElementById(focusID) : focusHref ? [...document.querySelectorAll('#workspace a')].find(node => node.getAttribute('href') === focusHref) : focusDetails ? document.getElementById(focusDetails)?.querySelector('summary') : null;
|
|
62
|
+
if (target && !target.disabled) target.focus({ preventScroll: true });
|
|
63
|
+
else if (focused?.closest('#workspace')) document.getElementById('document')?.focus({ preventScroll: true });
|
|
64
|
+
}).catch(() => { pendingRefresh = true; }).finally(() => {
|
|
65
|
+
refreshing = false;
|
|
66
|
+
if (followUpRefresh) { followUpRefresh = false; setTimeout(refresh, 100); }
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
document.addEventListener('htmx:configRequest', event => { event.detail.headers['X-CSRF-Token'] = document.querySelector('meta[name="csrf-token"]').content; });
|
|
70
|
+
document.addEventListener('htmx:beforeRequest', event => {
|
|
71
|
+
remember();
|
|
72
|
+
if (event.detail.elt?.closest('[data-preserve-reader]')) { const reader = readingViewport(); preserveReader = reader ? { top: reader.scrollTop, left: reader.scrollLeft } : null; }
|
|
73
|
+
});
|
|
74
|
+
document.addEventListener('htmx:afterSwap', () => {
|
|
75
|
+
restore(); initializeDiff();
|
|
76
|
+
if (preserveReader) { const reader = readingViewport(); if (reader) { reader.scrollTop = preserveReader.top; reader.scrollLeft = preserveReader.left; } preserveReader = null; }
|
|
77
|
+
});
|
|
78
|
+
// HTMX restores incoming class attributes during settling, after afterSwap.
|
|
79
|
+
document.addEventListener('htmx:afterSettle', initializeDiff);
|
|
80
|
+
document.addEventListener('htmx:beforeSwap', event => { if (event.detail.xhr.status >= 400 && event.detail.xhr.status < 500) { event.detail.shouldSwap = true; event.detail.isError = false; } });
|
|
81
|
+
document.addEventListener('htmx:sendError', () => toast('Could not reach the viewer. Check that the local server is running.'));
|
|
82
|
+
document.addEventListener('workspace-updated', () => { pendingRefresh = true; refresh(); });
|
|
83
|
+
document.addEventListener('focusout', () => { if (pendingRefresh) setTimeout(refresh, 100); });
|
|
84
|
+
let navigationOpener;
|
|
85
|
+
function setNavigation(open, opener) {
|
|
86
|
+
if (open) navigationOpener = opener || document.querySelector('.mobile-menu');
|
|
87
|
+
document.getElementById('workspace')?.classList.toggle('navigation-open', open);
|
|
88
|
+
document.querySelector('.mobile-menu')?.setAttribute('aria-expanded', String(open));
|
|
89
|
+
if (!open) (navigationOpener?.isConnected ? navigationOpener : document.querySelector('.mobile-menu'))?.focus({ preventScroll: true });
|
|
90
|
+
}
|
|
91
|
+
function filterFiles() {
|
|
92
|
+
const query = (document.getElementById('file-filter')?.value || '').toLowerCase();
|
|
93
|
+
const links = [...document.querySelectorAll('[data-file-path]')];
|
|
94
|
+
for (const link of links) link.hidden = !link.dataset.filePath.toLowerCase().includes(query);
|
|
95
|
+
const empty = document.getElementById('file-filter-empty');
|
|
96
|
+
if (empty) empty.hidden = !links.length || links.some(link => !link.hidden);
|
|
97
|
+
}
|
|
98
|
+
function initializeDiff() {
|
|
99
|
+
const workspace = document.getElementById('workspace');
|
|
100
|
+
const toggle = document.getElementById('toggle-review-details'), panel = document.getElementById('review-details');
|
|
101
|
+
if (toggle && panel) {
|
|
102
|
+
reviewDetailsOpen ??= toggle.getAttribute('aria-expanded') === 'true';
|
|
103
|
+
workspace?.classList.toggle('review-details-open', reviewDetailsOpen);
|
|
104
|
+
toggle.setAttribute('aria-expanded', String(reviewDetailsOpen));
|
|
105
|
+
if (toggle.classList.contains('details-icon-toggle')) {
|
|
106
|
+
const label = `${reviewDetailsOpen ? 'Hide' : 'Show'} review details`;
|
|
107
|
+
toggle.setAttribute('aria-label', label);
|
|
108
|
+
toggle.setAttribute('title', label);
|
|
109
|
+
}
|
|
110
|
+
panel.hidden = !reviewDetailsOpen;
|
|
111
|
+
} else workspace?.classList.remove('review-details-open');
|
|
112
|
+
filterFiles();
|
|
113
|
+
}
|
|
114
|
+
document.addEventListener('input', event => { if (event.target.id === 'file-filter') { drafts['file-filter'] = event.target.value; filterFiles(); } });
|
|
115
|
+
document.addEventListener('click', event => {
|
|
116
|
+
const filesButton = event.target.closest('[data-studio-files]');
|
|
117
|
+
if (filesButton) {
|
|
118
|
+
if (window.matchMedia?.('(max-width:760px)').matches) setNavigation(true, filesButton);
|
|
119
|
+
document.querySelector('[data-preview-navigation]')?.scrollIntoView?.({ block: 'nearest' });
|
|
120
|
+
const files = document.querySelector('.studio-changed-files');
|
|
121
|
+
(document.getElementById('file-filter') || files?.querySelector('[aria-current=page]') || files?.querySelector('[data-file-path]') || files)?.focus();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
if (event.target.closest('#navigation [data-file-path]') && document.getElementById('workspace')?.classList.contains('navigation-open')) { setNavigation(false); return; }
|
|
125
|
+
if (event.target.closest('[data-review-details]')) { reviewDetailsOpen = !reviewDetailsOpen; initializeDiff(); return; }
|
|
126
|
+
const jump = event.target.closest('[data-diff-jump]');
|
|
127
|
+
if (jump) {
|
|
128
|
+
const panel = document.querySelector('.diff-panel');
|
|
129
|
+
const hunks = [...(panel?.querySelectorAll('[data-diff-hunk]') || [])];
|
|
130
|
+
if (hunks.length) {
|
|
131
|
+
const previous = Number(panel.dataset.hunkIndex ?? -1);
|
|
132
|
+
const index = jump.dataset.diffJump === 'next' ? (previous + 1) % hunks.length : previous < 0 ? hunks.length - 1 : (previous - 1 + hunks.length) % hunks.length;
|
|
133
|
+
panel.dataset.hunkIndex = index;
|
|
134
|
+
hunks[index].scrollIntoView({ block: 'center', behavior: 'instant' });
|
|
135
|
+
const position = panel.querySelector('.hunk-position'); if (position) position.textContent = `Change ${index + 1} of ${hunks.length}`;
|
|
136
|
+
}
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const menu = event.target.closest('.mobile-menu');
|
|
140
|
+
if (menu) { setNavigation(!document.getElementById('workspace').classList.contains('navigation-open'), menu); return; }
|
|
141
|
+
if (event.target.closest('.navigation-close')) { setNavigation(false); return; }
|
|
142
|
+
if (document.getElementById('workspace')?.classList.contains('navigation-open') && !event.target.closest('#navigation')) setNavigation(false);
|
|
143
|
+
});
|
|
144
|
+
document.addEventListener('keydown', event => {
|
|
145
|
+
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 'k') { event.preventDefault(); setNavigation(true); document.getElementById('search')?.focus(); }
|
|
146
|
+
if (event.key === 'Escape' && document.getElementById('workspace')?.classList.contains('navigation-open')) setNavigation(false);
|
|
147
|
+
});
|
|
148
|
+
document.addEventListener('input', event => { if (event.target.closest('.source-preview-tools')) remember(); });
|
|
149
|
+
document.addEventListener('change', event => { if (event.target.closest('.source-preview-tools')) remember(); });
|
|
150
|
+
document.addEventListener('submit', async event => {
|
|
151
|
+
const form = event.target.closest('[data-source-action]');
|
|
152
|
+
if (!form) return;
|
|
153
|
+
event.preventDefault(); event.stopImmediatePropagation();
|
|
154
|
+
const change = form.querySelector('[name="change"]').value;
|
|
155
|
+
if (sourcePending.has(change)) return;
|
|
156
|
+
const kind = form.dataset.sourceAction, feedback = document.getElementById('source-preview-feedback');
|
|
157
|
+
const files = [...document.querySelectorAll('.source-preview-tools input[name="files"]:checked')].map(input => input.value);
|
|
158
|
+
if (kind === 'model' && (!files.length || files.length > 12)) { feedback.textContent = 'Select between 1 and 12 source files for model context.'; feedback.className = 'error-message'; return; }
|
|
159
|
+
remember(); sourcePending.add(change);
|
|
160
|
+
const buttons = [...document.querySelectorAll('[data-source-action] button')].map(button => ({ button, disabled: button.disabled }));
|
|
161
|
+
for (const { button } of buttons) button.disabled = true;
|
|
162
|
+
form.setAttribute('aria-busy', 'true');
|
|
163
|
+
feedback.className = ''; feedback.textContent = kind === 'analyze' ? 'Analyzing project files locally…' : 'Preparing proposed edits in a temporary copy…';
|
|
164
|
+
let navigate = '';
|
|
165
|
+
try {
|
|
166
|
+
const payload = { change, ...(kind === 'patch' ? { patch: form.querySelector('[name="patch"]').value } : {}), ...(kind === 'model' ? { analysisId: form.querySelector('[name="analysisId"]').value, files } : {}) };
|
|
167
|
+
const response = await fetch(form.getAttribute('action'), { method: 'POST', headers: { 'Content-Type': 'application/json', Accept: 'application/json', 'X-CSRF-Token': document.querySelector('meta[name="csrf-token"]').content }, body: JSON.stringify(payload) });
|
|
168
|
+
const result = await response.json();
|
|
169
|
+
if (!response.ok) throw new Error(result.error || 'The request failed. Retry with the local viewer running.');
|
|
170
|
+
if (result.url) { navigate = result.url; if (kind === 'patch') sourceDrafts.delete(change); }
|
|
171
|
+
else { feedback.className = 'success-message'; feedback.textContent = 'Affected-file analysis saved.'; sourceMessages.set(change, { text: feedback.textContent }); pendingRefresh = true; }
|
|
172
|
+
} catch (error) { feedback.className = 'error-message'; feedback.textContent = error.message || 'Could not reach the viewer. Retry when it is running.'; sourceMessages.set(change, { text: feedback.textContent, error: true }); }
|
|
173
|
+
finally {
|
|
174
|
+
sourcePending.delete(change); form.removeAttribute('aria-busy');
|
|
175
|
+
for (const { button, disabled } of buttons) button.disabled = disabled;
|
|
176
|
+
if (navigate && form.isConnected) location.assign(navigate);
|
|
177
|
+
else if (navigate) toast('The proposed file preview is ready on Files.');
|
|
178
|
+
else if (pendingRefresh) { if (window.htmx) refresh(); else location.reload(); }
|
|
179
|
+
}
|
|
180
|
+
}, true);
|
|
181
|
+
document.addEventListener('submit', event => {
|
|
182
|
+
const form = event.target.closest('[data-apply-form]');
|
|
183
|
+
if (!form || form.dataset.confirmed) { if (form) delete form.dataset.confirmed; return; }
|
|
184
|
+
event.preventDefault(); event.stopImmediatePropagation();
|
|
185
|
+
const dialog = document.getElementById('apply-dialog');
|
|
186
|
+
dialog.returnValue = ''; dialog.showModal();
|
|
187
|
+
dialog.addEventListener('close', () => { if (dialog.returnValue === 'confirm') { form.dataset.confirmed = 'true'; form.requestSubmit(); } }, { once: true });
|
|
188
|
+
}, true);
|
|
189
|
+
let retry = 1000, hasConnected = false;
|
|
190
|
+
async function updateAgent() {
|
|
191
|
+
try {
|
|
192
|
+
const response = await fetch('/api/agent-status');
|
|
193
|
+
if (!response.ok) return;
|
|
194
|
+
const agent = await response.json(); document.dispatchEvent(new window.CustomEvent('agent-status', {detail:agent})); const node = document.querySelector('.agent-state');
|
|
195
|
+
if (node) { node.classList.toggle('online', agent.connected); node.querySelector('span').textContent = agent.connected ? agent.agent || 'Agent attached' : 'Waiting for your agent'; }
|
|
196
|
+
for (const note of document.querySelectorAll('[data-lifecycle-agent-note]')) {
|
|
197
|
+
note.textContent = agent.connected ? `${agent.agent || 'Agent'} is attached. Ready to update the spec and preview code.` : agent.status === 'unresponsive' ? 'Agent heartbeat stopped. Resume the spequi skill in the same coding session. Open the agent indicator for recovery steps.' : 'No agent attached. Run the spequi skill in your coding agent to process requests.';
|
|
198
|
+
note.hidden = Boolean(agent.connected) || note.closest('[data-awaiting-input=true]') !== null;
|
|
199
|
+
}
|
|
200
|
+
for (const form of document.querySelectorAll('[data-studio-stalled-action]')) form.hidden = Boolean(agent.connected);
|
|
201
|
+
for (const caption of document.querySelectorAll('[data-lifecycle-agent-caption]')) caption.textContent = agent.connected ? 'Same agent session' : 'Requests wait until your agent is attached';
|
|
202
|
+
} catch {}
|
|
203
|
+
}
|
|
204
|
+
function connect() {
|
|
205
|
+
const socket = new WebSocket(`${location.protocol === 'https:' ? 'wss' : 'ws'}://${location.host}/live`);
|
|
206
|
+
const status = document.getElementById('connection');
|
|
207
|
+
socket.addEventListener('open', () => {
|
|
208
|
+
retry = 1000; status.textContent = 'Local workspace'; status.classList.add('online');
|
|
209
|
+
if (hasConnected) { pendingRefresh = true; refresh(); }
|
|
210
|
+
hasConnected = true;
|
|
211
|
+
});
|
|
212
|
+
socket.addEventListener('message', event => { try { const message = JSON.parse(event.data); if (message.type === 'changed') refresh(); if (['agent', 'heartbeat', 'connected'].includes(message.type)) updateAgent(); } catch {} });
|
|
213
|
+
socket.addEventListener('close', () => { status.textContent = 'Reconnecting to server'; status.classList.remove('online'); setTimeout(connect, retry); retry = Math.min(retry * 2, 15000); });
|
|
214
|
+
socket.addEventListener('error', () => socket.close());
|
|
215
|
+
}
|
|
216
|
+
function loadHTMX() {
|
|
217
|
+
const script = document.createElement('script');
|
|
218
|
+
script.src = '/vendor/htmx.js';
|
|
219
|
+
script.addEventListener('load', () => { if (pendingRefresh) refresh(); });
|
|
220
|
+
script.addEventListener('error', () => toast('HTMX could not load. Reload the viewer to retry.'));
|
|
221
|
+
document.head.append(script);
|
|
222
|
+
}
|
|
223
|
+
initializeDiff();
|
|
224
|
+
// Dynamically loading HTMX between DOMContentLoaded and load can miss its ready callback.
|
|
225
|
+
if (document.readyState === 'complete') loadHTMX();
|
|
226
|
+
else window.addEventListener('load', loadHTMX, { once: true });
|
|
227
|
+
connect();
|
|
228
|
+
})();
|
package/public/diff.css
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/* The review surface uses the enterprise shell and a dedicated code palette. */
|
|
2
|
+
:root{--diff-added:#e7f5eb;--diff-removed:#fff0ee;--diff-add-gutter:#cef0d7;--diff-remove-gutter:#ffdcd7;--diff-add-word:#a7e5b7;--diff-remove-word:#ffc0b8;--diff-gap:#f4f6fa;--diff-gutter:#f8f9fc;--diff-code:#24292e;--diff-border:#dbe2ec;--diff-code-size:12px}
|
|
3
|
+
[data-theme=dark]{--diff-added:#183428;--diff-removed:#382326;--diff-add-gutter:#214b34;--diff-remove-gutter:#542b30;--diff-add-word:#275e3b;--diff-remove-word:#79383d;--diff-gap:#192331;--diff-gutter:#1a2432;--diff-code:#e1e4e8;--diff-border:#344156}
|
|
4
|
+
.diff-workspace .inspector{display:none}
|
|
5
|
+
.diff-workspace.review-details-open .inspector{display:flex}
|
|
6
|
+
@media(min-width:761px){.workspace.diff-workspace{grid-template-columns:var(--rail-width) minmax(0,1fr)}.workspace.diff-workspace.review-details-open{grid-template-columns:var(--rail-width) minmax(0,1fr) var(--panel-width)}}
|
|
7
|
+
.diff-workspace .change-header{padding:17px 24px;flex-direction:row;align-items:center;justify-content:space-between;gap:14px}
|
|
8
|
+
.diff-workspace .change-title-line h1{font-size:21px}
|
|
9
|
+
.diff-workspace .change-header p{display:none}
|
|
10
|
+
.diff-workspace .breadcrumbs{min-height:44px;padding-inline:24px}
|
|
11
|
+
.diff-workspace .document-tabs{min-height:42px;padding-inline:22px}
|
|
12
|
+
.diff-workspace .document-tab{padding-block:11px}
|
|
13
|
+
.diff-workspace .review-reader{background:var(--surface);min-width:0;max-width:100%}
|
|
14
|
+
.diff-workspace .file-review-intro{padding:17px 24px 14px;border-bottom:1px solid var(--diff-border)}
|
|
15
|
+
.diff-workspace .file-review-title{align-items:center;gap:12px}
|
|
16
|
+
.diff-workspace .file-review-title h2{font-size:17px;letter-spacing:-.25px;margin:0}
|
|
17
|
+
.diff-workspace .diff-version-form{margin:0}
|
|
18
|
+
.diff-workspace .preview-actions{margin-top:13px;gap:8px}
|
|
19
|
+
.diff-workspace .preview-actions>span{font-size:12px}
|
|
20
|
+
.diff-workspace .preview-actions .button{min-height:31px;padding:6px 9px}
|
|
21
|
+
.diff-workspace .file-review-intro [role=status]:empty{display:none}
|
|
22
|
+
.diff-workspace .preview-actions form .primary{box-shadow:none}
|
|
23
|
+
.file-filter{padding:0 6px 7px}
|
|
24
|
+
.file-filter input{width:100%;background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:5px;padding:8px 10px;font-size:11px;min-height:34px}
|
|
25
|
+
.file-filter input::placeholder{color:var(--muted)}
|
|
26
|
+
.changed-files-nav{max-height:none}
|
|
27
|
+
.changed-file-link{padding:9px 9px;grid-template-columns:13px minmax(0,1fr) auto;gap:6px}
|
|
28
|
+
.changed-file-link[hidden],#file-filter-empty[hidden]{display:none}
|
|
29
|
+
.changed-file-name{font-family:'DM Sans',sans-serif;font-size:11px;line-height:1.55}
|
|
30
|
+
.changed-file-link.selected{background:var(--accent-soft);color:var(--accent-text)}
|
|
31
|
+
.changed-file-link .file-state{font-weight:500}
|
|
32
|
+
.file-line-count{font-size:9px;gap:3px}
|
|
33
|
+
.file-diff{min-width:0;max-width:100%}
|
|
34
|
+
.review-diff-table .spec-context-row>td{padding:0;background:var(--panel);border-block:1px solid var(--line);white-space:normal}
|
|
35
|
+
.spec-context-inline{padding:12px 18px;max-width:90ch;color:var(--text);font:12px/1.6 'DM Sans',sans-serif;overflow-wrap:anywhere}
|
|
36
|
+
.spec-context-heading{display:flex;align-items:center;gap:10px;margin-bottom:7px}
|
|
37
|
+
.spec-context-heading>svg{width:14px;height:14px;color:var(--muted)}
|
|
38
|
+
.spec-context-heading>strong{font-size:12px;font-weight:600}
|
|
39
|
+
.spec-context-provenance{color:var(--accent-text);font-size:10px;font-weight:500}
|
|
40
|
+
.spec-context-provenance.suggested{color:var(--muted)}
|
|
41
|
+
.spec-context-quote{margin:0}
|
|
42
|
+
.spec-context-quote+.spec-context-quote{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
|
|
43
|
+
.spec-context-quote>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;font-size:12px;font-weight:500;line-height:1.6}
|
|
44
|
+
.spec-context-quote>summary::-webkit-details-marker{display:none}
|
|
45
|
+
.spec-context-quote>summary>svg{width:12px;height:12px;color:var(--muted)}
|
|
46
|
+
.spec-context-quote[open]>summary>svg{transform:rotate(90deg)}
|
|
47
|
+
.spec-context-quote blockquote{margin:7px 0 0;padding:0;border:0;max-height:220px;overflow:auto;font-size:12px;line-height:1.7;white-space:normal}
|
|
48
|
+
.spec-context-quote blockquote>:first-child{margin-top:0}
|
|
49
|
+
.spec-context-quote blockquote>:last-child{margin-bottom:0}
|
|
50
|
+
.spec-context-quote blockquote h1,.spec-context-quote blockquote h2,.spec-context-quote blockquote h3,.spec-context-quote blockquote h4{font-size:12px;font-weight:600;margin:12px 0 6px}
|
|
51
|
+
.spec-context-quote blockquote p,.spec-context-quote blockquote ul,.spec-context-quote blockquote ol{margin:7px 0}
|
|
52
|
+
.spec-context-quote blockquote ul,.spec-context-quote blockquote ol{padding-left:20px}
|
|
53
|
+
.spec-context-quote blockquote pre{white-space:pre-wrap}
|
|
54
|
+
.spec-context-quote blockquote a{text-decoration:underline;text-underline-offset:3px;color:var(--accent-text)}
|
|
55
|
+
.spec-context-source{display:flex;align-items:flex-start;gap:6px;margin:7px 0 0;color:var(--muted);font:10px/1.6 'IBM Plex Mono',monospace;overflow-wrap:anywhere}
|
|
56
|
+
.spec-context-source>svg{width:13px;height:13px;margin-top:2px}
|
|
57
|
+
.spec-context-caveat{font-size:11px;line-height:1.6;color:var(--muted);margin:0 0 10px}
|
|
58
|
+
.spec-context-repeat{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--accent-text);padding-block:4px}
|
|
59
|
+
.spec-context-repeat svg{width:13px;height:13px}
|
|
60
|
+
.spec-context-notice{margin:0;padding:9px 16px;border-bottom:1px solid var(--line);background:var(--panel);color:var(--muted);font:11px/1.6 'DM Sans',sans-serif}
|
|
61
|
+
.diff-file-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:13px 20px;background:var(--panel);border-bottom:1px solid var(--diff-border);position:relative;flex-shrink:0}
|
|
62
|
+
.diff-file-identity{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
|
|
63
|
+
.diff-file-identity>svg{width:17px;color:var(--muted)}
|
|
64
|
+
.diff-file-identity>div{min-width:0}
|
|
65
|
+
.diff-file-identity strong{display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere;font-size:12px;font-weight:600}
|
|
66
|
+
.diff-file-identity .badge{font-size:9px}
|
|
67
|
+
.diff-file-identity .file-diff-count{white-space:nowrap;margin-left:auto;font-size:11px}
|
|
68
|
+
.diff-file-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;min-width:0;max-width:100%}
|
|
69
|
+
.syntax-language{font-size:10px;color:var(--muted);text-transform:capitalize}
|
|
70
|
+
.diff-file-tools .segmented a{padding:5px 9px;font-size:10px}
|
|
71
|
+
.diff-file-tools .diff-wrap{font-size:10px;min-height:29px;padding:5px 8px;font-weight:450}
|
|
72
|
+
.diff-wrap.is-on{background:var(--accent-soft);color:var(--accent-text);border-color:transparent}
|
|
73
|
+
.diff-file-paging{display:flex;align-items:center;gap:5px;border-inline-start:1px solid var(--line);padding-inline-start:7px}
|
|
74
|
+
.diff-file-paging>span{font-size:10px;color:var(--muted);font-variant-numeric:tabular-nums;min-width:34px;text-align:center}
|
|
75
|
+
.diff-icon-button{width:28px;height:28px;min-height:28px;padding:5px;border-color:transparent;background:transparent;display:inline-flex;align-items:center;justify-content:center}
|
|
76
|
+
.diff-icon-button svg{width:14px;height:14px}
|
|
77
|
+
.diff-icon-button:hover:not(:disabled){background:var(--rail)}
|
|
78
|
+
.diff-icon-button:disabled{opacity:.32}
|
|
79
|
+
.diff-context-toolbar{display:flex;align-items:center;justify-content:space-between;padding:5px 18px;gap:12px;border-bottom:1px solid var(--diff-border);font-size:10px;background:var(--surface);color:var(--muted);flex-shrink:0;flex-wrap:wrap}
|
|
80
|
+
.diff-context-toolbar>div{display:flex;align-items:center;gap:1px}
|
|
81
|
+
.hunk-position{margin-left:7px;font-variant-numeric:tabular-nums}
|
|
82
|
+
.diff-context-toolbar .text-link{font-size:10px;padding:5px}
|
|
83
|
+
.highlight-note{font-size:11px;line-height:1.6;color:var(--muted);padding:10px 20px;margin:0;border-bottom:1px solid var(--diff-border);background:var(--panel)}
|
|
84
|
+
.diff-code-scroll{overflow:auto;padding:0!important;font-size:var(--diff-code-size)!important;min-width:0;min-height:0;width:100%;max-width:100%;isolation:isolate;overscroll-behavior:contain}
|
|
85
|
+
.review-diff-table{width:100%;min-width:640px;table-layout:fixed;border-collapse:collapse;font-family:'IBM Plex Mono',monospace;font-size:var(--diff-code-size);line-height:22px;color:var(--diff-code)}
|
|
86
|
+
.review-diff-table .number-col{width:47px}
|
|
87
|
+
.review-diff-table .sign-col{width:22px}
|
|
88
|
+
.review-diff-table th{padding:10px 15px;background:var(--diff-gutter);border-bottom:1px solid var(--diff-border);text-align:left;color:var(--text);font-family:'DM Sans',sans-serif;font-size:11px;font-weight:550;line-height:1.5}
|
|
89
|
+
.review-diff-table th+th{border-inline-start:1px solid var(--diff-border)}
|
|
90
|
+
.review-diff-table th span{margin-left:7px;color:var(--muted);font-weight:400;font-size:10px}
|
|
91
|
+
.review-diff-table thead th{position:sticky;top:0;z-index:1;box-shadow:0 1px 0 var(--diff-border)}
|
|
92
|
+
.review-diff-table td{padding:0;vertical-align:top}
|
|
93
|
+
.review-diff-table .diff-number{color:var(--muted);background:var(--diff-gutter);text-align:right;padding-right:9px;font-size:10px;user-select:none;font-variant-numeric:tabular-nums;border-inline-start:1px solid transparent}
|
|
94
|
+
.review-diff-table .diff-sign{color:var(--muted);text-align:center;user-select:none;font-size:12px;opacity:.9}
|
|
95
|
+
.review-diff-table .diff-code{padding:0 12px 0 3px;tab-size:2;white-space:pre-wrap;overflow-wrap:anywhere}
|
|
96
|
+
.review-diff-table .diff-code code{font:inherit;display:block;white-space:inherit;overflow-wrap:inherit}
|
|
97
|
+
.review-diff-table .diff-code:nth-child(3){border-inline-end:1px solid var(--diff-border)}
|
|
98
|
+
.review-diff-table .addition{background:var(--diff-added)}
|
|
99
|
+
.review-diff-table .deletion{background:var(--diff-removed)}
|
|
100
|
+
.review-diff-table .diff-number.addition,.review-diff-table .addition>.diff-number{background:var(--diff-add-gutter);color:var(--green)}
|
|
101
|
+
.review-diff-table .diff-number.deletion,.review-diff-table .deletion>.diff-number{background:var(--diff-remove-gutter);color:var(--red)}
|
|
102
|
+
.review-diff-table .diff-sign.addition,.review-diff-table .addition>.diff-sign{color:var(--green)}
|
|
103
|
+
.review-diff-table .diff-sign.deletion,.review-diff-table .deletion>.diff-sign{color:var(--red)}
|
|
104
|
+
.review-diff-table .diff-gap{background:var(--diff-gap)}
|
|
105
|
+
.review-diff-table .syntax-token{color:var(--syntax-light,inherit);background:transparent}
|
|
106
|
+
[data-theme=dark] .review-diff-table .syntax-token{color:var(--syntax-dark,inherit)}
|
|
107
|
+
.review-diff-table .syntax-token.word-change.addition{background:var(--diff-add-word);border-radius:2px}
|
|
108
|
+
.review-diff-table .syntax-token.word-change.deletion{background:var(--diff-remove-word);border-radius:2px}
|
|
109
|
+
.review-diff-table tr[data-diff-hunk]{scroll-margin-top:100px}
|
|
110
|
+
.diff-context-gap td{background:var(--diff-gap)!important;border-block:1px solid var(--diff-border);padding:6px 12px!important;line-height:1.6}
|
|
111
|
+
.expand-context{display:inline-flex;align-items:center;gap:7px;color:var(--accent-text);font-family:'DM Sans',sans-serif;font-size:11px;padding:3px 4px;min-height:26px}
|
|
112
|
+
.expand-context:hover{text-decoration:underline;text-underline-offset:3px}
|
|
113
|
+
.expand-context svg{width:13px;height:13px}
|
|
114
|
+
.gap-location{float:right;font-size:10px;color:var(--muted);padding:6px}
|
|
115
|
+
.review-diff-table tfoot td{padding:10px 15px;border-top:1px solid var(--diff-border);font:11px 'DM Sans',sans-serif;color:var(--muted);background:var(--panel)}
|
|
116
|
+
.no-wrap .review-diff-table{table-layout:auto;width:max-content;min-width:100%}
|
|
117
|
+
.no-wrap .review-diff-table .diff-code{white-space:pre;overflow-wrap:normal}
|
|
118
|
+
.no-wrap .review-diff-table .diff-code code{min-width:28ch}
|
|
119
|
+
.wrap-lines .review-diff-table{min-width:0;width:100%;table-layout:fixed}
|
|
120
|
+
.wrap-lines .review-diff-table .diff-code{min-width:0;overflow-wrap:anywhere;word-break:normal}
|
|
121
|
+
.wrap-lines .review-diff-table .diff-code code{max-width:100%;min-width:0;overflow-wrap:anywhere}
|
|
122
|
+
.unified-diff-table .diff-code{border-inline-end:0!important}
|
|
123
|
+
.unified-diff-table{min-width:440px}
|
|
124
|
+
@media(min-width:761px){
|
|
125
|
+
.diff-workspace .main{overflow:hidden}
|
|
126
|
+
.diff-workspace .main>.breadcrumbs,.diff-workspace .main>.change-header,.diff-workspace .main>.document-tabs,.diff-workspace .main>.workspace-footer{flex-shrink:0}
|
|
127
|
+
.diff-workspace .review-reader{display:flex;flex-direction:column;overflow:hidden}
|
|
128
|
+
.diff-workspace .file-review-intro{flex-shrink:0}
|
|
129
|
+
.diff-workspace .diff-panel{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;overflow:hidden}
|
|
130
|
+
.diff-workspace .file-diff{display:flex;flex-direction:column;flex:1;min-height:0}
|
|
131
|
+
.diff-workspace .diff-code-scroll{flex:1}
|
|
132
|
+
.diff-workspace .highlight-note{flex-shrink:0}
|
|
133
|
+
.diff-workspace .diff-empty-state{min-height:0;overflow:auto}
|
|
134
|
+
}
|
|
135
|
+
@media(max-width:760px){.diff-code-scroll{max-height:65dvh}.wrap-lines .review-diff-table .number-col{width:32px}.wrap-lines .review-diff-table .sign-col{width:16px}}
|
|
136
|
+
@media(max-width:1000px){.diff-file-toolbar{padding:11px 15px;gap:10px}.diff-file-tools{width:100%;justify-content:flex-end}.diff-file-identity .file-diff-count{margin-left:auto}.review-diff-table{--diff-code-size:11px}.syntax-language{margin-right:auto}}
|
|
137
|
+
@media(max-width:760px){.workspace.diff-workspace{grid-template-columns:minmax(0,1fr)}.diff-workspace .change-header{padding:16px;flex-wrap:wrap}.diff-workspace .change-title-line h1{font-size:21px}.diff-workspace .breadcrumbs{padding-inline:12px}.diff-workspace .document-tabs{padding-inline:13px}.diff-workspace .file-review-intro{padding:15px 16px}.diff-workspace .preview-actions>span{flex-basis:100%;font-size:11px}.diff-workspace .header-actions .button{font-size:10px}.diff-file-toolbar{position:relative;top:auto;padding:12px}.diff-file-identity{gap:8px}.diff-file-tools{gap:7px}.diff-context-toolbar{padding-inline:9px}.review-diff-table th{padding:9px 10px}.review-diff-table th span{display:block;margin:4px 0 0}.diff-workspace .reader{overflow:visible}.diff-workspace .inspector{border-top:1px solid var(--line)}.gap-location{display:none}.diff-context-gap td{padding:6px 8px!important}.diff-workspace .changed-files-nav{max-height:none}.unified-diff-table{min-width:360px}}
|
|
138
|
+
|
|
139
|
+
/* Breadcrumbs and tabs share one header; workflow context stays visible. */
|
|
140
|
+
.compact-workspace .main{container:review-main / inline-size}
|
|
141
|
+
.compact-workspace .inspector{display:none}
|
|
142
|
+
.compact-workspace.review-details-open .inspector{display:flex}
|
|
143
|
+
.inspector[hidden]{display:none!important}
|
|
144
|
+
.compact-workspace .workspace-footer{display:none}
|
|
145
|
+
.compact-change-header{display:grid;grid-template-columns:minmax(0,1fr) auto 32px;align-items:center;gap:16px;padding:0 16px;min-height:46px;background:var(--surface);border-bottom:1px solid var(--line);flex-shrink:0;z-index:3}
|
|
146
|
+
.details-icon-toggle{width:32px;min-height:32px;padding:6px;background:transparent;border-color:transparent}
|
|
147
|
+
.details-icon-toggle[aria-expanded=true]{background:var(--accent-soft);color:var(--accent-text)}
|
|
148
|
+
.details-icon-toggle:hover{background:var(--rail)}
|
|
149
|
+
.compact-change-header .document-tabs{padding:0;min-height:44px;min-width:0;max-width:100%;gap:12px;border-bottom:0;overflow-x:auto;overscroll-behavior-inline:contain}
|
|
150
|
+
.compact-change-header .document-tab{flex-shrink:0;font-size:11px;padding:13px 1px;gap:6px}
|
|
151
|
+
.compact-change-header .document-tab svg{width:13px;height:13px}
|
|
152
|
+
.compact-change-header .tab-count{font-size:9px;padding:2px 4px}
|
|
153
|
+
.compact-workspace .breadcrumbs{min-height:44px;min-width:0;padding:0;gap:10px;flex-wrap:nowrap;border-bottom:0;overflow:hidden}
|
|
154
|
+
.compact-workspace .breadcrumbs>strong{min-width:0}
|
|
155
|
+
.compact-workspace .breadcrumbs>span{white-space:nowrap;flex-shrink:0}.compact-workspace .breadcrumbs>span:first-of-type{flex:0 1 auto;min-width:0;max-width:35%;overflow:hidden;text-overflow:ellipsis}
|
|
156
|
+
.compact-workspace .breadcrumbs>.mobile-menu{flex-shrink:0}
|
|
157
|
+
.compact-review-feedback{flex-shrink:0}
|
|
158
|
+
.source-preview-tools{flex-shrink:0;min-width:0;border-bottom:1px solid var(--line);font-size:12px;background:var(--panel)}
|
|
159
|
+
.source-preview-tools>summary{display:grid;grid-template-columns:18px auto minmax(0,1fr) 16px;align-items:center;gap:9px;cursor:pointer;padding:12px 16px;list-style:none}
|
|
160
|
+
.source-preview-tools>summary>svg:last-child{margin-inline-start:auto;width:16px;height:16px;color:var(--accent-text)}
|
|
161
|
+
.source-preview-tools[open]>summary>svg:last-child{transform:rotate(90deg)}
|
|
162
|
+
.source-preview-tools>summary>span{font-size:11px;color:var(--muted)}
|
|
163
|
+
.source-preview-body{padding:0 16px 16px;max-height:44dvh;overflow:auto;line-height:1.7}
|
|
164
|
+
.source-preview-body>form,.source-preview-body>details{margin-top:16px}
|
|
165
|
+
.source-preview-body>form:first-child{margin-top:4px}
|
|
166
|
+
.source-preview-body p{max-width:75ch;color:var(--muted);overflow-wrap:anywhere}
|
|
167
|
+
.source-analysis-note strong{color:var(--red)}
|
|
168
|
+
.source-candidate{display:grid;grid-template-columns:26px minmax(0,1fr);border-top:1px solid var(--line);padding:7px 0;align-items:start}
|
|
169
|
+
.source-context-choice{display:flex;align-items:center;justify-content:center;min-height:32px;cursor:pointer}
|
|
170
|
+
.source-context-choice input{accent-color:var(--accent);width:16px;height:16px;margin:0}
|
|
171
|
+
.source-context-choice>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
|
|
172
|
+
.source-candidate summary{cursor:pointer;min-height:32px;overflow-wrap:anywhere;padding:4px 0}
|
|
173
|
+
.source-candidate summary code{font-size:11px}.source-candidate .badge{margin-inline-start:8px}
|
|
174
|
+
.source-candidate ul,.source-coverage ul{padding-inline-start:20px;margin-block:8px}
|
|
175
|
+
.source-candidate li{overflow-wrap:anywhere}.source-candidate li small{display:block}
|
|
176
|
+
.source-candidate pre{max-height:180px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;background:var(--code);padding:10px;font-size:11px;line-height:1.7}
|
|
177
|
+
.source-preview-body details>summary{cursor:pointer}
|
|
178
|
+
.source-preview-body textarea{display:block;width:100%;max-width:100%;padding:10px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--text);font-family:'IBM Plex Mono',monospace;font-size:12px;line-height:1.7;resize:vertical;min-height:100px;margin-block:8px 12px}
|
|
179
|
+
.source-preview-status{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex-shrink:0;padding:10px 16px;border-bottom:1px solid var(--line);font-size:11px}
|
|
180
|
+
.source-preview-status>span{flex:1;min-width:180px}.source-preview-status small{display:block;margin-top:4px;line-height:1.6}
|
|
181
|
+
.source-preview-status form{margin:0}.source-preview-status .button{font-size:11px}
|
|
182
|
+
@media(max-width:760px){.source-preview-body{max-height:55dvh}.source-preview-tools>summary>span{grid-column:2/4}.source-preview-tools>summary>svg:last-child{grid-column:4;grid-row:1}.source-preview-body textarea{font-size:16px}.source-preview-status>span{flex-basis:100%}}
|
|
183
|
+
.compact-review-feedback [role=status]:empty{display:none}
|
|
184
|
+
.compact-review-feedback>p,.compact-review-feedback [role=status]:not(:empty){margin:0;padding:8px 16px;font-size:11px}
|
|
185
|
+
.compact-workspace .diff-file-toolbar{padding:7px 16px;min-height:44px;gap:12px}
|
|
186
|
+
.compact-workspace .diff-file-identity{gap:8px}
|
|
187
|
+
.compact-workspace .diff-file-identity strong{font-size:11px}
|
|
188
|
+
.compact-workspace .diff-file-tools{gap:8px;width:auto}
|
|
189
|
+
.compact-workspace .syntax-language{display:none}
|
|
190
|
+
.diff-hunk-tools{display:flex;align-items:center;gap:0;padding-inline-end:8px;border-inline-end:1px solid var(--line);color:var(--muted);font-size:10px}
|
|
191
|
+
.diff-hunk-tools .hunk-position{white-space:nowrap;margin-inline-start:4px}
|
|
192
|
+
.compact-workspace .review-diff-table th{padding:6px 12px;line-height:1.5}
|
|
193
|
+
.compact-workspace .review-diff-table th span{display:none}
|
|
194
|
+
@media(min-width:761px){.workspace.compact-workspace{grid-template-columns:var(--rail-width) minmax(0,1fr)}.workspace.compact-workspace.review-details-open{grid-template-columns:var(--rail-width) minmax(0,1fr) var(--panel-width)}}
|
|
195
|
+
@container review-main (max-width:640px){
|
|
196
|
+
.compact-change-header{grid-template-columns:minmax(0,1fr) 32px;gap:0 8px}
|
|
197
|
+
.compact-change-header .breadcrumbs{grid-column:1 / -1}
|
|
198
|
+
.compact-change-header .document-tabs{justify-self:stretch}
|
|
199
|
+
}
|
|
200
|
+
@container review-main (max-width:1050px){
|
|
201
|
+
.compact-workspace .diff-file-tools{flex-wrap:wrap;margin-inline-start:auto}
|
|
202
|
+
.diff-hunk-tools .hunk-position{display:none}
|
|
203
|
+
}
|
|
204
|
+
@container review-main (max-width:520px){
|
|
205
|
+
.compact-change-header{padding-inline:12px;gap:4px 8px}
|
|
206
|
+
.compact-workspace .diff-file-tools{width:100%;justify-content:space-between;gap:4px}
|
|
207
|
+
.compact-workspace .diff-file-toolbar{padding-inline:12px}
|
|
208
|
+
.diff-hunk-tools{padding-inline-end:4px}
|
|
209
|
+
}
|
|
210
|
+
/* Completed work keeps review actions available without implying new work. */
|
|
211
|
+
.change-link.tasks-complete .nav-icon{color:var(--green)}
|
|
212
|
+
.completed-change-state .empty-state>svg{color:var(--green)}
|
|
213
|
+
.completed-change-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
|
|
214
|
+
.completed-diff-option{max-width:46ch;margin-top:24px;font-size:11px;color:var(--muted)}
|
|
215
|
+
.completed-diff-option>summary{cursor:pointer;min-height:32px;padding:7px;color:var(--accent-text)}
|
|
216
|
+
.completed-diff-option>p{margin:6px 0 12px;font-size:11px;line-height:1.7}
|
|
217
|
+
.completed-diff-option .generate-diff-form{display:flex;justify-content:center}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Bundled fonts
|
|
2
|
+
|
|
3
|
+
DM Sans (variable weights 400–700) and IBM Plex Mono (weights 400 and 500), normal style, are distributed under the SIL Open Font License 1.1. See `dm-sans-OFL.txt` and `ibm-plex-mono-OFL.txt`.
|
|
4
|
+
|
|
5
|
+
Downloaded from the official Google Fonts CSS API on 2026-11-10. The stylesheet retains the supplied Unicode subsets and uses only local URLs. No download or font build step is needed at installation or runtime.
|
|
6
|
+
|
|
7
|
+
Source stylesheet: https://fonts.googleapis.com/css2?family=DM+Sans:wght@400..700&family=IBM+Plex+Mono:wght@400;500&display=swap
|
|
8
|
+
|
|
9
|
+
## Original files
|
|
10
|
+
|
|
11
|
+
- `dm-sans-variable-latin-ext.woff2`: https://fonts.gstatic.com/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6z9mXgjU0.woff2
|
|
12
|
+
- `dm-sans-variable-latin.woff2`: https://fonts.gstatic.com/s/dmsans/v17/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K6z9mXg.woff2
|
|
13
|
+
- `ibm-plex-mono-400-cyrillic-ext.woff2`: https://fonts.gstatic.com/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1iIq131nj-otFQ.woff2
|
|
14
|
+
- `ibm-plex-mono-400-cyrillic.woff2`: https://fonts.gstatic.com/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1isq131nj-otFQ.woff2
|
|
15
|
+
- `ibm-plex-mono-400-vietnamese.woff2`: https://fonts.gstatic.com/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1iAq131nj-otFQ.woff2
|
|
16
|
+
- `ibm-plex-mono-400-latin-ext.woff2`: https://fonts.gstatic.com/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1iEq131nj-otFQ.woff2
|
|
17
|
+
- `ibm-plex-mono-400-latin.woff2`: https://fonts.gstatic.com/s/ibmplexmono/v20/-F63fjptAgt5VM-kVkqdyU8n1i8q131nj-o.woff2
|
|
18
|
+
- `ibm-plex-mono-500-cyrillic-ext.woff2`: https://fonts.gstatic.com/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwl1FgsAXHNlYzg.woff2
|
|
19
|
+
- `ibm-plex-mono-500-cyrillic.woff2`: https://fonts.gstatic.com/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwlRFgsAXHNlYzg.woff2
|
|
20
|
+
- `ibm-plex-mono-500-vietnamese.woff2`: https://fonts.gstatic.com/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwl9FgsAXHNlYzg.woff2
|
|
21
|
+
- `ibm-plex-mono-500-latin-ext.woff2`: https://fonts.gstatic.com/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwl5FgsAXHNlYzg.woff2
|
|
22
|
+
- `ibm-plex-mono-500-latin.woff2`: https://fonts.gstatic.com/s/ibmplexmono/v20/-F6qfjptAgt5VM-kVkqdyU8n3twJwlBFgsAXHNk.woff2
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2014 The DM Sans Project Authors (https://github.com/googlefonts/dm-fonts)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|