@whzxc/agent-design-gallery 0.14.1 → 0.16.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/README.md +29 -16
- package/package.json +2 -1
- package/public/access.css +15 -2
- package/public/app.js +1284 -521
- package/public/arrangement-worker.js +7 -7
- package/public/arrangement.js +35 -30
- package/public/assets.js +85 -48
- package/public/auth.js +59 -4
- package/public/boards.js +129 -0
- package/public/comment-anchors.js +50 -0
- package/public/comments.css +400 -0
- package/public/comments.js +1106 -0
- package/public/context-menu.js +97 -0
- package/public/frame-identity.js +51 -14
- package/public/hub.css +25 -3
- package/public/hub.html +10 -2
- package/public/hub.js +127 -23
- package/public/icons.js +9 -0
- package/public/index.html +26 -10
- package/public/instance-actions.js +9 -2
- package/public/layout.js +156 -86
- package/public/motion-flow.js +28 -0
- package/public/motion-identity.js +100 -0
- package/public/motion-paint.js +332 -0
- package/public/motion-scene.js +165 -0
- package/public/motion-specimens.js +335 -0
- package/public/player.css +270 -0
- package/public/player.js +753 -0
- package/public/recent-updates.js +535 -0
- package/public/selection.js +1 -1
- package/public/style.css +91 -154
- package/public/switcher.css +5 -4
- package/public/switcher.js +109 -34
- package/public/token-catalog.js +8 -3
- package/public/tokens.css +20 -1
- package/public/view-boards.css +131 -0
- package/public/view-boards.js +350 -0
- package/public/view-route.js +1 -2
- package/src/boards/board.mjs +30 -0
- package/src/boards/motion-board.mjs +202 -0
- package/src/boards/token-board.mjs +200 -0
- package/src/cli-output.mjs +10 -5
- package/src/cli.mjs +89 -35
- package/src/comments.mjs +293 -0
- package/src/http.mjs +7 -5
- package/src/hub/project-link.mjs +41 -0
- package/src/hub/registry.mjs +5 -0
- package/src/hub.mjs +14 -10
- package/src/link.mjs +13 -1
- package/src/recent-frames.mjs +295 -0
- package/src/recent-history.mjs +100 -0
- package/src/recent-job.mjs +63 -0
- package/src/recent-worker.mjs +171 -0
- package/src/server.mjs +285 -110
- package/src/service.mjs +46 -12
- package/src/toolkit/arch-git.mjs +8 -14
- package/src/toolkit/arch.mjs +3 -2
- package/src/toolkit/asset-rules.mjs +24 -1
- package/src/toolkit/browser.mjs +1 -13
- package/src/toolkit/build-store.mjs +9 -1
- package/src/toolkit/build-worker.mjs +6 -0
- package/src/toolkit/build.mjs +22 -16
- package/src/toolkit/commands.mjs +105 -9
- package/src/toolkit/compare.mjs +13 -11
- package/src/toolkit/config.mjs +2 -2
- package/{public/review.js → src/toolkit/diff-document.mjs} +137 -43
- package/src/toolkit/diff-inputs.mjs +97 -52
- package/src/toolkit/diff.mjs +198 -43
- package/src/toolkit/frame-declarations.mjs +36 -0
- package/src/toolkit/git-blobs.mjs +50 -0
- package/src/toolkit/impact-inputs.mjs +11 -19
- package/src/toolkit/impact-selection.mjs +27 -12
- package/src/toolkit/impact.mjs +49 -15
- package/src/toolkit/implementation-map.mjs +17 -6
- package/src/toolkit/input-generation.mjs +15 -0
- package/src/toolkit/inspect-output.mjs +1 -1
- package/src/toolkit/inspect.d.ts +9 -1
- package/src/toolkit/inspect.mjs +25 -1
- package/src/toolkit/motion-check.mjs +382 -0
- package/src/toolkit/motion-css.mjs +105 -0
- package/src/toolkit/motion-flows.mjs +95 -0
- package/src/toolkit/motion-impact.mjs +87 -0
- package/src/toolkit/motion-inventory.mjs +202 -0
- package/src/toolkit/motion-label.mjs +111 -0
- package/src/toolkit/motion-patterns.mjs +216 -0
- package/src/toolkit/motion-primitives.mjs +94 -0
- package/src/toolkit/motion-queries.mjs +169 -0
- package/src/toolkit/motion.mjs +300 -0
- package/src/toolkit/move-pairing.mjs +140 -0
- package/src/toolkit/owner.mjs +19 -6
- package/src/toolkit/play-endpoint.mjs +66 -0
- package/src/toolkit/project-index.mjs +4 -4
- package/src/toolkit/recent-structure.mjs +201 -0
- package/src/toolkit/results.mjs +3 -3
- package/src/toolkit/review-document.mjs +440 -0
- package/src/toolkit/review-embed-document.mjs +671 -0
- package/src/toolkit/review-filmstrip.mjs +76 -0
- package/src/toolkit/review-groups.mjs +29 -0
- package/src/toolkit/review-motion-card.mjs +51 -0
- package/src/toolkit/review-motion.mjs +159 -0
- package/src/toolkit/review-observation.mjs +131 -0
- package/src/toolkit/review-playback.js +123 -0
- package/src/toolkit/review-sheet.mjs +125 -0
- package/src/toolkit/review-specimens.mjs +60 -0
- package/src/toolkit/review.mjs +240 -0
- package/src/toolkit/runtime.mjs +8 -2
- package/src/toolkit/theme.mjs +16 -0
- package/src/viewer-cache.mjs +48 -12
- package/public/annotations.js +0 -816
- package/public/labels.js +0 -122
- package/src/annotations.mjs +0 -238
package/public/switcher.js
CHANGED
|
@@ -4,14 +4,14 @@ import { instanceCloseButton } from './instance-actions.js';
|
|
|
4
4
|
|
|
5
5
|
const route = location.pathname.match(/^\/(p|i)\/([^/]+)\//);
|
|
6
6
|
if (route) document.documentElement.dataset.hubViewer = 'true';
|
|
7
|
-
let current, kind, targets = [], triggers = [], opener;
|
|
7
|
+
let current, kind, targets = [], triggers = [], opener, refreshingTargets = null;
|
|
8
8
|
const menu = document.createElement('nav');
|
|
9
9
|
menu.id = 'project-switcher';
|
|
10
10
|
menu.setAttribute('popover', 'auto');
|
|
11
11
|
menu.setAttribute('aria-label', 'Project switcher');
|
|
12
12
|
const element = (tag, className, text) => {
|
|
13
13
|
const node = document.createElement(tag);
|
|
14
|
-
node.className = className;
|
|
14
|
+
if (className) node.className = className;
|
|
15
15
|
if (text !== undefined) node.textContent = text;
|
|
16
16
|
return node;
|
|
17
17
|
};
|
|
@@ -20,6 +20,11 @@ const glyph = (name, size = 16) => {
|
|
|
20
20
|
node.innerHTML = icon(name, size);
|
|
21
21
|
return node;
|
|
22
22
|
};
|
|
23
|
+
function proxyReason(reason) {
|
|
24
|
+
if (reason === 'proxy-auth-unsupported') return 'Update ADG to proxy';
|
|
25
|
+
if (reason === 'health-unavailable') return 'Viewer not responding';
|
|
26
|
+
return 'Proxy unavailable';
|
|
27
|
+
}
|
|
23
28
|
export function updateSwitcherLabels() {
|
|
24
29
|
if (!current) return;
|
|
25
30
|
for (const trigger of triggers) {
|
|
@@ -41,40 +46,104 @@ function close() {
|
|
|
41
46
|
menu.hidePopover();
|
|
42
47
|
opener?.focus({ preventScroll: true });
|
|
43
48
|
}
|
|
49
|
+
async function loadTargets() {
|
|
50
|
+
const responses = await Promise.all(['/api/projects', '/api/instances'].map(url => dataFetch(url)));
|
|
51
|
+
for (const response of responses) if (!response.ok) throw new Error(`Cannot load project switcher: HTTP ${response.status}`);
|
|
52
|
+
const [projects, instances] = await Promise.all(responses.map(response => response.json()));
|
|
53
|
+
return {
|
|
54
|
+
projects,
|
|
55
|
+
all: [...projects.map(item => ({ ...item, kind: 'p' })), ...instances.map(item => ({ ...item, kind: 'i' }))],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function makeSearchField() {
|
|
59
|
+
const field = element('div', 'switcher-search');
|
|
60
|
+
const input = element('input', '');
|
|
61
|
+
input.type = 'search';
|
|
62
|
+
input.placeholder = 'Find project or instance…';
|
|
63
|
+
input.setAttribute('aria-label', 'Find project or instance');
|
|
64
|
+
input.autocomplete = 'off';
|
|
65
|
+
const clear = element('button', 'switcher-clear');
|
|
66
|
+
clear.type = 'button';
|
|
67
|
+
clear.setAttribute('aria-label', 'Clear project search');
|
|
68
|
+
clear.append(glyph('x'));
|
|
69
|
+
clear.hidden = true;
|
|
70
|
+
clear.onclick = () => { input.value = ''; input.dispatchEvent(new Event('input')); input.focus(); };
|
|
71
|
+
field.append(glyph('search'), input, clear);
|
|
72
|
+
input.oninput = () => { clear.hidden = !input.value; renderTargets(input.value); };
|
|
73
|
+
return field;
|
|
74
|
+
}
|
|
75
|
+
async function refreshOpenMenu() {
|
|
76
|
+
if (refreshingTargets) return refreshingTargets;
|
|
77
|
+
refreshingTargets = (async () => {
|
|
78
|
+
try {
|
|
79
|
+
const { all } = await loadTargets();
|
|
80
|
+
targets = all;
|
|
81
|
+
const nextCurrent = targets.find(item => item.kind === kind && (item.slug ?? item.id) === route[2]);
|
|
82
|
+
if (nextCurrent) {
|
|
83
|
+
current = nextCurrent;
|
|
84
|
+
updateSwitcherLabels();
|
|
85
|
+
}
|
|
86
|
+
if (!menu.matches(':popover-open')) return;
|
|
87
|
+
const existingSearch = menu.querySelector('.switcher-search');
|
|
88
|
+
if (targets.length >= 5 && !existingSearch) {
|
|
89
|
+
menu.querySelector('.switcher-error')?.before(makeSearchField());
|
|
90
|
+
} else if (targets.length < 5 && existingSearch && !existingSearch.querySelector('input')?.value) {
|
|
91
|
+
existingSearch.remove();
|
|
92
|
+
}
|
|
93
|
+
const query = menu.querySelector('input')?.value ?? '';
|
|
94
|
+
const activeHref = document.activeElement?.getAttribute?.('href');
|
|
95
|
+
const searchFocused = document.activeElement?.tagName === 'INPUT';
|
|
96
|
+
renderTargets(query);
|
|
97
|
+
position();
|
|
98
|
+
if (!searchFocused && activeHref) {
|
|
99
|
+
menu.querySelector(`a[href="${CSS.escape(activeHref)}"]`)?.focus({ preventScroll: true });
|
|
100
|
+
}
|
|
101
|
+
} catch {} finally {
|
|
102
|
+
refreshingTargets = null;
|
|
103
|
+
}
|
|
104
|
+
})();
|
|
105
|
+
return refreshingTargets;
|
|
106
|
+
}
|
|
44
107
|
function open(trigger) {
|
|
45
108
|
opener = trigger;
|
|
46
109
|
render();
|
|
47
110
|
position();
|
|
48
111
|
menu.showPopover();
|
|
49
|
-
(menu.querySelector('a[aria-current="page"]') ?? menu.querySelector('a'))
|
|
112
|
+
(menu.querySelector('a[aria-current="page"]') ?? menu.querySelector('a'))?.focus({ preventScroll: true });
|
|
113
|
+
void refreshOpenMenu();
|
|
114
|
+
}
|
|
115
|
+
function showSwitcherError(message) {
|
|
116
|
+
const inline = menu.querySelector('.switcher-error');
|
|
117
|
+
if (menu.matches(':popover-open') && inline) {
|
|
118
|
+
inline.textContent = message;
|
|
119
|
+
inline.hidden = !message;
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const alert = document.querySelector('#error');
|
|
123
|
+
if (alert) {
|
|
124
|
+
alert.textContent = message;
|
|
125
|
+
alert.hidden = !message;
|
|
126
|
+
}
|
|
50
127
|
}
|
|
51
128
|
function render() {
|
|
52
129
|
const home = element('a', 'switcher-home', 'All projects');
|
|
53
130
|
home.href = '/';
|
|
54
131
|
home.append(glyph('arrow-up-left', 14));
|
|
132
|
+
const inlineError = element('p', 'switcher-error');
|
|
133
|
+
inlineError.setAttribute('role', 'alert');
|
|
134
|
+
inlineError.hidden = true;
|
|
55
135
|
menu.replaceChildren(home, element('div', 'switcher-rule'));
|
|
56
|
-
if (targets.length >= 5)
|
|
57
|
-
|
|
58
|
-
const input = element('input', '');
|
|
59
|
-
input.type = 'search';
|
|
60
|
-
input.placeholder = 'Find project or instance…';
|
|
61
|
-
input.setAttribute('aria-label', 'Find project or instance');
|
|
62
|
-
input.autocomplete = 'off';
|
|
63
|
-
const clear = element('button', 'switcher-clear');
|
|
64
|
-
clear.type = 'button'; clear.setAttribute('aria-label', 'Clear project search');
|
|
65
|
-
clear.append(glyph('x')); clear.hidden = true;
|
|
66
|
-
clear.onclick = () => { input.value = ''; input.dispatchEvent(new Event('input')); input.focus(); };
|
|
67
|
-
field.append(glyph('search'), input, clear);
|
|
68
|
-
input.oninput = () => { clear.hidden = !input.value; renderTargets(input.value); };
|
|
69
|
-
menu.append(field);
|
|
70
|
-
}
|
|
71
|
-
menu.append(element('div', 'switcher-targets'));
|
|
136
|
+
if (targets.length >= 5) menu.append(makeSearchField());
|
|
137
|
+
menu.append(inlineError, element('div', 'switcher-targets'));
|
|
72
138
|
renderTargets('');
|
|
73
139
|
}
|
|
74
140
|
function renderTargets(query) {
|
|
75
141
|
const container = menu.querySelector('.switcher-targets');
|
|
142
|
+
if (!container) return;
|
|
76
143
|
container.replaceChildren();
|
|
77
|
-
const
|
|
144
|
+
const normalized = query.trim().toLowerCase();
|
|
145
|
+
const matches = targets.filter(item => [item.name, item.design, item.path, item.directory, item.branch, item.port != null ? `:${item.port}` : '']
|
|
146
|
+
.some(value => value?.toLowerCase().includes(normalized)));
|
|
78
147
|
for (const [type, title] of [['p', 'Projects'], ['i', 'Live instances']]) {
|
|
79
148
|
const items = matches.filter(item => item.kind === type);
|
|
80
149
|
if (!items.length) continue;
|
|
@@ -92,10 +161,10 @@ function renderTargets(query) {
|
|
|
92
161
|
if (selected) row.setAttribute('aria-current', 'page');
|
|
93
162
|
row.append(glyph(type === 'i' ? 'radio' : 'folder'));
|
|
94
163
|
const labels = element('span', 'switcher-labels');
|
|
95
|
-
labels.append(element('span', 'switcher-name', item.name));
|
|
164
|
+
labels.append(element('span', 'switcher-name', item.name ?? item.projectName ?? item.id));
|
|
96
165
|
const detail = item.compatibility?.compatible === false
|
|
97
166
|
? `Requires ADG ${item.compatibility.requires?.replace(/>=/g, '≥')} · hub ${item.compatibility.version}`
|
|
98
|
-
: item.proxyable === false ?
|
|
167
|
+
: item.proxyable === false ? proxyReason(item.reason) : type === 'i' ? [item.port != null ? `:${item.port}` : null, item.directory].filter(Boolean).join(' · ')
|
|
99
168
|
: item.error ?? item.design ?? item.path ?? item.directory;
|
|
100
169
|
const meta = element('span', `switcher-detail${disabled ? ' switcher-danger' : ''}`, detail);
|
|
101
170
|
meta.title = detail ?? '';
|
|
@@ -107,14 +176,11 @@ function renderTargets(query) {
|
|
|
107
176
|
if (selected) instance.classList.add('switcher-instance-current');
|
|
108
177
|
const stop = instanceCloseButton(item, 'icon-button switcher-close', () => {
|
|
109
178
|
if (selected) { location.replace('/'); return; }
|
|
179
|
+
showSwitcherError('');
|
|
110
180
|
targets = targets.filter(target => target !== item);
|
|
111
181
|
renderTargets(menu.querySelector('input')?.value ?? '');
|
|
112
|
-
(menu.querySelector('a[aria-current="page"]') ?? menu.querySelector('a'))
|
|
113
|
-
}, failure =>
|
|
114
|
-
const alert = document.querySelector('#error');
|
|
115
|
-
alert.textContent = failure.message;
|
|
116
|
-
alert.hidden = false;
|
|
117
|
-
});
|
|
182
|
+
(menu.querySelector('a[aria-current="page"]') ?? menu.querySelector('a'))?.focus({ preventScroll: true });
|
|
183
|
+
}, failure => showSwitcherError(failure.message));
|
|
118
184
|
instance.append(row, stop);
|
|
119
185
|
section.append(instance);
|
|
120
186
|
}
|
|
@@ -125,14 +191,22 @@ function renderTargets(query) {
|
|
|
125
191
|
export async function initSwitcher() {
|
|
126
192
|
if (!route) return;
|
|
127
193
|
kind = route[1];
|
|
128
|
-
triggers = [...document.querySelectorAll('#
|
|
194
|
+
triggers = [...document.querySelectorAll('#app-directory')];
|
|
129
195
|
try {
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
const [projects, instances] = await Promise.all(responses.map(response => response.json()));
|
|
133
|
-
targets = [...projects.map(item => ({ ...item, kind: 'p' })), ...instances.map(item => ({ ...item, kind: 'i' }))];
|
|
196
|
+
const { projects, all } = await loadTargets();
|
|
197
|
+
targets = all;
|
|
134
198
|
current = targets.find(item => item.kind === kind && (item.slug ?? item.id) === route[2]);
|
|
135
|
-
if (!current)
|
|
199
|
+
if (!current) {
|
|
200
|
+
if (kind === 'p') {
|
|
201
|
+
const matches = projects.filter(project => project.path.split(/[/\\]/).at(-1) === route[2]);
|
|
202
|
+
if (matches.length === 1) {
|
|
203
|
+
const url = new URL(location.href);
|
|
204
|
+
url.pathname = matches[0].url + url.pathname.slice(route[0].length);
|
|
205
|
+
location.replace(url);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
136
210
|
document.body.append(menu);
|
|
137
211
|
for (const trigger of triggers) {
|
|
138
212
|
trigger.setAttribute('aria-expanded', 'false');
|
|
@@ -163,6 +237,7 @@ export async function initSwitcher() {
|
|
|
163
237
|
if (!['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) return;
|
|
164
238
|
if (event.target.matches('input') && ['Home', 'End'].includes(event.key)) return;
|
|
165
239
|
const actions = [...menu.querySelectorAll('a, .switcher-close:not(:disabled)')];
|
|
240
|
+
if (!actions.length) return;
|
|
166
241
|
const index = actions.indexOf(document.activeElement);
|
|
167
242
|
const next = event.key === 'Home' ? 0 : event.key === 'End' ? actions.length - 1
|
|
168
243
|
: (index + (event.key === 'ArrowDown' ? 1 : -1) + actions.length) % actions.length;
|
package/public/token-catalog.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { icon } from './icons.js';
|
|
2
2
|
|
|
3
3
|
const categories = [
|
|
4
|
-
['Colors', 'palette'], ['Typography', 'type'], ['Spacing & size', 'ruler'
|
|
5
|
-
['
|
|
4
|
+
['Colors', 'palette', 'colour'], ['Typography', 'type', 'type'], ['Spacing & size', 'ruler', 'sizing'],
|
|
5
|
+
['Radii', 'corner-up-right', 'shape'], ['Shadows', 'layers', 'elevation'], ['Motion', 'timer', 'motion'],
|
|
6
|
+
['Other', 'list', null],
|
|
6
7
|
];
|
|
7
8
|
|
|
9
|
+
export function tokenBoardSection(category) {
|
|
10
|
+
return categories.find(([label]) => label === category)?.[2] ?? null;
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
function resolveValue(name, values) {
|
|
9
14
|
const seen = new Set();
|
|
10
15
|
while (!seen.has(name)) {
|
|
@@ -90,7 +95,7 @@ function tokenName(name, onCopyError) {
|
|
|
90
95
|
button.onclick = async () => {
|
|
91
96
|
try {
|
|
92
97
|
await navigator.clipboard.writeText(name);
|
|
93
|
-
button.setAttribute('data-copied', '');
|
|
98
|
+
button.setAttribute('data-copied', 'true');
|
|
94
99
|
button.setAttribute('aria-label', `Copied ${name}`);
|
|
95
100
|
glyph.innerHTML = icon('check', 12);
|
|
96
101
|
clearTimeout(timer);
|
package/public/tokens.css
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* Shared tokens for TSX design frames and the viewer. */
|
|
2
2
|
:root {
|
|
3
|
+
/* Typography */
|
|
3
4
|
--font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", Inter, "WenQuanYi Zen Hei", sans-serif;
|
|
4
5
|
--font-mono: "SF Mono", ui-monospace, Menlo, Consolas, "JetBrains Mono", monospace;
|
|
5
6
|
--text-title: 15px;
|
|
@@ -7,28 +8,42 @@
|
|
|
7
8
|
--text-body: 13px;
|
|
8
9
|
--text-meta: 12px;
|
|
9
10
|
--text-caption: 11px;
|
|
11
|
+
|
|
12
|
+
/* Motion */
|
|
13
|
+
--motion-navigation: 0ms;
|
|
14
|
+
--motion-switcher: 160ms;
|
|
15
|
+
--motion-spinner: 900ms;
|
|
16
|
+
--ease-switcher: ease-out;
|
|
17
|
+
|
|
18
|
+
/* Shape */
|
|
10
19
|
--radius-dialog: 16px;
|
|
11
20
|
--radius-panel: 14px;
|
|
12
21
|
--radius-menu: 12px;
|
|
22
|
+
--radius-card: 12px;
|
|
13
23
|
--radius-field: 9px;
|
|
14
24
|
--radius-row: 8px;
|
|
15
25
|
--radius-artboard: 6px;
|
|
16
26
|
--radius-keycap: 6px;
|
|
27
|
+
--radius-pill: 999px;
|
|
28
|
+
|
|
29
|
+
/* Control sizing */
|
|
17
30
|
--toolbar-height: 44px;
|
|
18
31
|
--field-height: 32px;
|
|
19
32
|
--row-height: 28px;
|
|
20
|
-
--row-height-two-line: 44px;
|
|
21
33
|
--menu-item-height: 30px;
|
|
22
34
|
--menu-label-height: 24px;
|
|
23
35
|
--control-size: 32px;
|
|
24
36
|
--keycap-size: 22px;
|
|
25
37
|
|
|
38
|
+
/* Surfaces and borders */
|
|
26
39
|
--canvas: #ecece9;
|
|
27
40
|
--dot: #d2d2ce;
|
|
28
41
|
--surface: #ffffff;
|
|
29
42
|
--surface-section: #f5f5f3;
|
|
30
43
|
--surface-sunken: #f1f1ee;
|
|
31
44
|
--border: #e2e2de;
|
|
45
|
+
|
|
46
|
+
/* Text and accents */
|
|
32
47
|
--text: #1c1c1a;
|
|
33
48
|
--text-secondary: #5b5b57;
|
|
34
49
|
--text-tertiary: #7c7c77;
|
|
@@ -37,6 +52,9 @@
|
|
|
37
52
|
--danger: #c2453b;
|
|
38
53
|
--tooltip: #1c1c1a;
|
|
39
54
|
--on-tooltip: #ffffff;
|
|
55
|
+
|
|
56
|
+
/* Elevation */
|
|
57
|
+
--shadow-comment-pin: 0 2px 7px rgb(0 0 0 / 36%);
|
|
40
58
|
--shadow-float: 0 1px 2px rgb(0 0 0 / 6%), 0 8px 24px rgb(0 0 0 / 8%);
|
|
41
59
|
--shadow-menu: 0 2px 4px rgb(0 0 0 / 6%), 0 12px 32px rgb(0 0 0 / 14%);
|
|
42
60
|
}
|
|
@@ -56,6 +74,7 @@
|
|
|
56
74
|
--danger: #f08b80;
|
|
57
75
|
--tooltip: #efefed;
|
|
58
76
|
--on-tooltip: #1c1c1a;
|
|
77
|
+
--shadow-comment-pin: 0 2px 8px rgb(0 0 0 / 55%);
|
|
59
78
|
--shadow-float: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 45%);
|
|
60
79
|
--shadow-menu: 0 2px 4px rgb(0 0 0 / 40%), 0 12px 32px rgb(0 0 0 / 55%);
|
|
61
80
|
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
#view-board {
|
|
2
|
+
position: absolute;
|
|
3
|
+
inset: var(--view-board-top, 64px) 0 0;
|
|
4
|
+
overflow: auto;
|
|
5
|
+
overscroll-behavior: contain;
|
|
6
|
+
outline: none;
|
|
7
|
+
}
|
|
8
|
+
.view-board-page { max-width: 1680px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 64px) 64px; }
|
|
9
|
+
.view-board-heading { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
|
|
10
|
+
.view-board-heading h1 { font-size: clamp(23px, 3vw, 34px); letter-spacing: -.025em; }
|
|
11
|
+
#view-board-content { display: grid; gap: 16px; }
|
|
12
|
+
.view-board-section { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-panel); padding: 20px; }
|
|
13
|
+
.view-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
|
|
14
|
+
.view-section-heading > div { min-width: 0; }
|
|
15
|
+
.view-section-heading h2 { overflow-wrap: anywhere; }
|
|
16
|
+
.view-board-status { color: var(--text-secondary); font-size: var(--text-body); }
|
|
17
|
+
.view-board-action {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 6px;
|
|
21
|
+
min-height: var(--control-size);
|
|
22
|
+
padding: 0 10px;
|
|
23
|
+
background: var(--surface-sunken);
|
|
24
|
+
border-radius: var(--radius-row);
|
|
25
|
+
font-weight: 550;
|
|
26
|
+
}
|
|
27
|
+
.view-board-action:hover { color: var(--accent); }
|
|
28
|
+
.recent-ranges { display: flex; flex-wrap: wrap; gap: 4px; }
|
|
29
|
+
.recent-ranges > button:enabled[aria-pressed="false"]:hover {
|
|
30
|
+
background: color-mix(in srgb, var(--text) 6%, transparent);
|
|
31
|
+
}
|
|
32
|
+
.recent-ranges > button:disabled { background: transparent; }
|
|
33
|
+
.recent-period > header { align-items: start; }
|
|
34
|
+
.recent-period > header > div { flex: 1 1 240px; }
|
|
35
|
+
.recent-global { margin-top: 5px; }
|
|
36
|
+
.recent-global summary { display: flex; align-items: center; white-space: nowrap; cursor: pointer; }
|
|
37
|
+
.recent-global summary::before {
|
|
38
|
+
content: '';
|
|
39
|
+
flex: none;
|
|
40
|
+
width: 5px;
|
|
41
|
+
height: 5px;
|
|
42
|
+
margin: 0 8px 0 2px;
|
|
43
|
+
border: solid currentColor;
|
|
44
|
+
border-width: 0 1px 1px 0;
|
|
45
|
+
transform: rotate(-45deg);
|
|
46
|
+
}
|
|
47
|
+
.recent-global[open] summary::before { transform: translateY(-1px) rotate(45deg); }
|
|
48
|
+
.recent-global-sample { margin-inline-start: .3em; overflow: hidden; text-overflow: ellipsis; }
|
|
49
|
+
.recent-global-list {
|
|
50
|
+
display: grid;
|
|
51
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
|
|
52
|
+
gap: 12px 20px;
|
|
53
|
+
margin-top: 9px;
|
|
54
|
+
overflow-wrap: anywhere;
|
|
55
|
+
}
|
|
56
|
+
.recent-global-list ul { margin: 3px 0 0; padding-inline-start: 18px; color: var(--text-secondary); font-size: var(--text-meta); }
|
|
57
|
+
.recent-source { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
|
|
58
|
+
.view-source-name { font: var(--text-meta)/1.45 var(--font-mono); color: var(--text-secondary); overflow-wrap: anywhere; }
|
|
59
|
+
.recent-source-heading { margin-bottom: 12px; color: var(--text); }
|
|
60
|
+
.recent-frame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 222px), 1fr)); align-items: start; gap: 12px; }
|
|
61
|
+
.recent-shared { margin-top: 8px; color: var(--text-secondary); font-size: var(--text-meta); }
|
|
62
|
+
.recent-shared summary { width: fit-content; cursor: pointer; padding: 7px 0; overflow-wrap: anywhere; }
|
|
63
|
+
.recent-shared[open] .recent-frame-grid { padding-top: 5px; }
|
|
64
|
+
.recent-removed { margin: 12px 0 0; padding-inline-start: 20px; font: var(--text-meta)/1.65 var(--font-mono); color: var(--text-secondary); }
|
|
65
|
+
.recent-visual { display: block; padding-top: 4px; color: var(--text-secondary); }
|
|
66
|
+
.view-frame { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
|
|
67
|
+
.view-frame-well { position: relative; display: grid; place-items: center; height: 148px; border-radius: var(--radius-card) var(--radius-card) 0 0; background: var(--surface-sunken); }
|
|
68
|
+
.view-frame-well canvas { position: absolute; inset: 0; margin: auto; pointer-events: none; width: auto; height: auto; max-width: calc(100% - 16px); max-height: calc(100% - 16px); }
|
|
69
|
+
.view-frame-well canvas:not([data-preview="ready"]) { visibility: hidden; }
|
|
70
|
+
.view-frame-caption { display: grid; padding: 8px 10px 0; gap: 3px; }
|
|
71
|
+
.view-frame-title, .view-frame-caption small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
72
|
+
.view-frame-title { font: 600 var(--text-body)/18px var(--font-ui); }
|
|
73
|
+
.view-frame-footer { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px 8px 7px 10px; }
|
|
74
|
+
.view-badge { padding: 3px 7px; background: var(--surface-sunken); color: var(--text-secondary); border-radius: var(--radius-pill, 999px); font-size: var(--text-caption); }
|
|
75
|
+
.view-show-in-board { min-height: 25px; margin-inline-start: auto; padding: 2px 4px; color: var(--text-secondary); font-size: var(--text-meta); }
|
|
76
|
+
.view-show-in-board:hover { color: var(--text); text-decoration: underline; }
|
|
77
|
+
.prototype-scroll { overflow: auto; margin-top: 12px; }
|
|
78
|
+
.prototype-map { position: relative; }
|
|
79
|
+
.prototype-map > svg { position: absolute; inset: 0; pointer-events: none; }
|
|
80
|
+
.prototype-map > svg > path { fill: none; stroke: var(--text-tertiary); stroke-width: 1.25; }
|
|
81
|
+
.prototype-map marker path { fill: var(--text-tertiary); }
|
|
82
|
+
.prototype-map .view-frame { position: absolute; width: 248px; height: 230px; }
|
|
83
|
+
.prototype-trigger {
|
|
84
|
+
position: absolute;
|
|
85
|
+
translate: -50% -100%;
|
|
86
|
+
max-width: 188px;
|
|
87
|
+
white-space: nowrap;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
text-overflow: ellipsis;
|
|
90
|
+
padding: 3px 6px;
|
|
91
|
+
border-radius: var(--radius-field);
|
|
92
|
+
background: var(--surface-sunken);
|
|
93
|
+
color: var(--text);
|
|
94
|
+
font-size: var(--text-caption);
|
|
95
|
+
text-align: center;
|
|
96
|
+
}
|
|
97
|
+
.frame-play {
|
|
98
|
+
position: absolute;
|
|
99
|
+
right: 6px;
|
|
100
|
+
top: 6px;
|
|
101
|
+
z-index: 1;
|
|
102
|
+
display: grid;
|
|
103
|
+
place-items: center;
|
|
104
|
+
width: var(--frame-play-size, 26px);
|
|
105
|
+
height: var(--frame-play-size, 26px);
|
|
106
|
+
padding: 0;
|
|
107
|
+
border-radius: var(--radius-field);
|
|
108
|
+
background: var(--surface);
|
|
109
|
+
color: var(--text);
|
|
110
|
+
box-shadow: var(--shadow-float);
|
|
111
|
+
}
|
|
112
|
+
.frame-play svg { width: 55%; height: 55%; }
|
|
113
|
+
.frame-play:hover { background: var(--surface-sunken); }
|
|
114
|
+
.view-frame .frame-play { top: calc(-4px - var(--frame-play-size, 26px)); opacity: 0; pointer-events: none; }
|
|
115
|
+
.view-frame .frame-play[data-outside]::after { content: ''; position: absolute; inset: 100% 0 -5px; }
|
|
116
|
+
.view-frame:is(:hover, :focus-within) .frame-play { opacity: 1; pointer-events: auto; }
|
|
117
|
+
@media (hover: none) { .view-frame .frame-play { opacity: 1; pointer-events: auto; } }
|
|
118
|
+
.derived-mode .gallery-viewport > :not(#canvas-background),
|
|
119
|
+
.derived-mode #minimap,
|
|
120
|
+
.derived-mode #comment-layer,
|
|
121
|
+
.derived-mode #comments-panel { visibility: hidden; }
|
|
122
|
+
.derived-mode #app-bar { right: auto; max-width: calc(100% - 66px); }
|
|
123
|
+
.recent-feed > h2, .recent-impacts > h2 { margin-bottom: 12px; }
|
|
124
|
+
.recent-more, .recent-removed-heading { margin-top: 16px; }
|
|
125
|
+
.recent-change {
|
|
126
|
+
display: grid;
|
|
127
|
+
gap: 2px;
|
|
128
|
+
color: var(--text-secondary);
|
|
129
|
+
font-size: var(--text-meta);
|
|
130
|
+
}
|
|
131
|
+
.recent-change span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|