gravity-lite 3.0.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 +126 -0
- package/dist/bridge.d.ts +12 -0
- package/dist/bridge.js +103 -0
- package/dist/bridge.js.map +1 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.js +73 -0
- package/dist/cli.js.map +1 -0
- package/dist/diagnostics.d.ts +67 -0
- package/dist/diagnostics.js +329 -0
- package/dist/diagnostics.js.map +1 -0
- package/dist/mcp-server.d.ts +18 -0
- package/dist/mcp-server.js +517 -0
- package/dist/mcp-server.js.map +1 -0
- package/extension/background.js +197 -0
- package/extension/icon128.svg +1 -0
- package/extension/icon16.svg +1 -0
- package/extension/icon48.svg +1 -0
- package/extension/manifest.json +24 -0
- package/extension/offscreen.html +4 -0
- package/extension/offscreen.js +74 -0
- package/extension/popup.html +105 -0
- package/extension/popup.js +84 -0
- package/package.json +59 -0
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* diagnostics.ts — CSS layout & accessibility analysis helpers.
|
|
3
|
+
* Pure functions — no I/O, no side effects.
|
|
4
|
+
*/
|
|
5
|
+
// ── Box model helpers ─────────────────────────────────────────────────────────
|
|
6
|
+
export function extractBounds(model) {
|
|
7
|
+
const c = model.content;
|
|
8
|
+
return {
|
|
9
|
+
left: Math.round(Math.min(c[0], c[6])),
|
|
10
|
+
top: Math.round(Math.min(c[1], c[3])),
|
|
11
|
+
right: Math.round(Math.max(c[2], c[4])),
|
|
12
|
+
bottom: Math.round(Math.max(c[5], c[7])),
|
|
13
|
+
width: Math.round(model.width),
|
|
14
|
+
height: Math.round(model.height),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
// ── Layout checks ─────────────────────────────────────────────────────────────
|
|
18
|
+
export function checkVisibility(styles) {
|
|
19
|
+
const issues = [];
|
|
20
|
+
if (styles.get('display') === 'none')
|
|
21
|
+
issues.push({ type: 'hidden-display', severity: 'high', message: 'Element has display: none', suggestion: 'Remove display: none to make visible' });
|
|
22
|
+
if (styles.get('visibility') === 'hidden')
|
|
23
|
+
issues.push({ type: 'hidden-visibility', severity: 'high', message: 'Element has visibility: hidden', suggestion: 'Change to visibility: visible' });
|
|
24
|
+
if (parseFloat(styles.get('opacity') ?? '1') === 0)
|
|
25
|
+
issues.push({ type: 'hidden-opacity', severity: 'high', message: 'Element has opacity: 0', suggestion: 'Change to opacity: 1' });
|
|
26
|
+
return issues;
|
|
27
|
+
}
|
|
28
|
+
export function checkOffscreen(bounds, vp) {
|
|
29
|
+
const issues = [];
|
|
30
|
+
const T = 2;
|
|
31
|
+
if (bounds.right > vp.clientWidth + T)
|
|
32
|
+
issues.push({ type: 'offscreen-right', severity: 'high', message: `Element extends ${bounds.right - vp.clientWidth}px beyond right edge`, suggestion: 'Add max-width: 100% or overflow: hidden to parent' });
|
|
33
|
+
if (bounds.left < -T)
|
|
34
|
+
issues.push({ type: 'offscreen-left', severity: 'high', message: `Element starts ${Math.abs(bounds.left)}px left of viewport`, suggestion: 'Check left/margin-left values' });
|
|
35
|
+
if (bounds.top < -T)
|
|
36
|
+
issues.push({ type: 'offscreen-top', severity: 'high', message: `Element starts ${Math.abs(bounds.top)}px above viewport`, suggestion: 'Check top/margin-top values' });
|
|
37
|
+
if (bounds.bottom > vp.clientHeight + T)
|
|
38
|
+
issues.push({ type: 'offscreen-bottom', severity: 'medium', message: `Element extends ${bounds.bottom - vp.clientHeight}px below viewport fold`, suggestion: 'Add max-height or overflow: auto' });
|
|
39
|
+
return issues;
|
|
40
|
+
}
|
|
41
|
+
export function checkOverflow(styles) {
|
|
42
|
+
const issues = [];
|
|
43
|
+
if (styles.get('overflow') === 'hidden')
|
|
44
|
+
issues.push({ type: 'overflow-hidden', severity: 'low', message: 'overflow: hidden may clip child content', suggestion: 'Change to overflow: auto if content is being clipped' });
|
|
45
|
+
return issues;
|
|
46
|
+
}
|
|
47
|
+
// ── z-index / stacking context checks ────────────────────────────────────────
|
|
48
|
+
export function checkZIndex(styles) {
|
|
49
|
+
const issues = [];
|
|
50
|
+
const zRaw = styles.get('z-index') ?? 'auto';
|
|
51
|
+
const position = styles.get('position') ?? 'static';
|
|
52
|
+
const zNum = parseInt(zRaw, 10);
|
|
53
|
+
// z-index has no effect on static elements
|
|
54
|
+
if (!isNaN(zNum) && position === 'static') {
|
|
55
|
+
issues.push({
|
|
56
|
+
type: 'zindex-no-effect',
|
|
57
|
+
severity: 'high',
|
|
58
|
+
message: `z-index: ${zNum} has no effect — element has position: static`,
|
|
59
|
+
suggestion: 'Add position: relative (or absolute/fixed/sticky) for z-index to take effect',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
// Suspiciously high z-index — usually a sign of a stacking context war
|
|
63
|
+
if (!isNaN(zNum) && zNum >= 9999) {
|
|
64
|
+
issues.push({
|
|
65
|
+
type: 'zindex-magic-number',
|
|
66
|
+
severity: 'medium',
|
|
67
|
+
message: `z-index: ${zNum} is a magic number — element may still be trapped in a stacking context`,
|
|
68
|
+
suggestion: 'Check parent elements for: transform, opacity < 1, filter, isolation: isolate, will-change — these create stacking contexts that trap z-index',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
return issues;
|
|
72
|
+
}
|
|
73
|
+
// ── Properties that create stacking contexts ──────────────────────────────────
|
|
74
|
+
export function checkStackingContextCreators(styles) {
|
|
75
|
+
const reasons = [];
|
|
76
|
+
const position = styles.get('position') ?? 'static';
|
|
77
|
+
const zIndex = styles.get('z-index') ?? 'auto';
|
|
78
|
+
const opacity = parseFloat(styles.get('opacity') ?? '1');
|
|
79
|
+
const transform = styles.get('transform') ?? 'none';
|
|
80
|
+
const filter = styles.get('filter') ?? 'none';
|
|
81
|
+
const isolation = styles.get('isolation') ?? 'auto';
|
|
82
|
+
const mixBlend = styles.get('mix-blend-mode') ?? 'normal';
|
|
83
|
+
const willChange = styles.get('will-change') ?? 'auto';
|
|
84
|
+
const contain = styles.get('contain') ?? 'none';
|
|
85
|
+
if (['absolute', 'relative', 'fixed', 'sticky'].includes(position) && zIndex !== 'auto')
|
|
86
|
+
reasons.push(`position: ${position} + z-index: ${zIndex}`);
|
|
87
|
+
if (opacity < 1)
|
|
88
|
+
reasons.push(`opacity: ${opacity}`);
|
|
89
|
+
if (transform !== 'none')
|
|
90
|
+
reasons.push(`transform: ${transform}`);
|
|
91
|
+
if (filter !== 'none')
|
|
92
|
+
reasons.push(`filter: ${filter}`);
|
|
93
|
+
if (isolation === 'isolate')
|
|
94
|
+
reasons.push('isolation: isolate');
|
|
95
|
+
if (mixBlend !== 'normal')
|
|
96
|
+
reasons.push(`mix-blend-mode: ${mixBlend}`);
|
|
97
|
+
if (willChange.includes('transform') || willChange.includes('opacity'))
|
|
98
|
+
reasons.push(`will-change: ${willChange}`);
|
|
99
|
+
if (contain !== 'none' && contain !== '')
|
|
100
|
+
reasons.push(`contain: ${contain}`);
|
|
101
|
+
return { creates: reasons.length > 0, reasons };
|
|
102
|
+
}
|
|
103
|
+
// ── Flexbox/Grid checks ───────────────────────────────────────────────────────
|
|
104
|
+
export function checkFlexGrid(styles) {
|
|
105
|
+
const issues = [];
|
|
106
|
+
const display = styles.get('display') ?? '';
|
|
107
|
+
if (display === 'flex' || display === 'inline-flex') {
|
|
108
|
+
const minWidth = styles.get('min-width') ?? 'auto';
|
|
109
|
+
// flex children with no min-width: 0 can overflow their container
|
|
110
|
+
if (minWidth === 'auto') {
|
|
111
|
+
const overflow = styles.get('overflow') ?? 'visible';
|
|
112
|
+
if (overflow === 'visible') {
|
|
113
|
+
issues.push({
|
|
114
|
+
type: 'flex-min-width',
|
|
115
|
+
severity: 'low',
|
|
116
|
+
message: 'Flex container children default to min-width: auto which can cause overflow',
|
|
117
|
+
suggestion: 'Add min-width: 0 to flex children that should shrink below their content size',
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
const height = styles.get('height') ?? 'auto';
|
|
122
|
+
const alignItems = styles.get('align-items') ?? 'stretch';
|
|
123
|
+
if (height === '0px' || height === '0') {
|
|
124
|
+
issues.push({
|
|
125
|
+
type: 'flex-zero-height',
|
|
126
|
+
severity: 'high',
|
|
127
|
+
message: 'Flex container has height: 0 — children may be invisible',
|
|
128
|
+
suggestion: 'Set an explicit height, min-height, or ensure a parent provides height',
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
if (alignItems === 'stretch') {
|
|
132
|
+
const explicitHeight = styles.get('height');
|
|
133
|
+
if (!explicitHeight || explicitHeight === 'auto') {
|
|
134
|
+
issues.push({
|
|
135
|
+
type: 'flex-stretch-no-height',
|
|
136
|
+
severity: 'low',
|
|
137
|
+
message: 'align-items: stretch (default) with no explicit height — container height depends on content',
|
|
138
|
+
suggestion: 'Set an explicit height on the flex container if you need consistent item sizing',
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (display === 'grid' || display === 'inline-grid') {
|
|
144
|
+
const gridTemplateColumns = styles.get('grid-template-columns') ?? '';
|
|
145
|
+
const gridTemplateRows = styles.get('grid-template-rows') ?? '';
|
|
146
|
+
if (!gridTemplateColumns && !gridTemplateRows) {
|
|
147
|
+
issues.push({
|
|
148
|
+
type: 'grid-no-template',
|
|
149
|
+
severity: 'medium',
|
|
150
|
+
message: 'Grid container has no grid-template-columns or grid-template-rows defined',
|
|
151
|
+
suggestion: 'Define grid-template-columns (e.g. repeat(3, 1fr)) to create a proper grid layout',
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return issues;
|
|
156
|
+
}
|
|
157
|
+
// ── Responsive / sizing checks ────────────────────────────────────────────────
|
|
158
|
+
export function checkResponsive(styles, bounds, vp) {
|
|
159
|
+
const issues = [];
|
|
160
|
+
const width = styles.get('width') ?? '';
|
|
161
|
+
// Fixed pixel width on an element that is nearly as wide as the viewport
|
|
162
|
+
const pxMatch = width.match(/^(\d+(?:\.\d+)?)px$/);
|
|
163
|
+
if (pxMatch && bounds.width > vp.clientWidth * 0.85) {
|
|
164
|
+
issues.push({
|
|
165
|
+
type: 'fixed-width-large',
|
|
166
|
+
severity: 'medium',
|
|
167
|
+
message: `Fixed width of ${width} is ${Math.round((bounds.width / vp.clientWidth) * 100)}% of viewport — will break on smaller screens`,
|
|
168
|
+
suggestion: 'Use max-width instead of width, or switch to a relative unit like % or vw',
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
// Very small touch target
|
|
172
|
+
if (bounds.width > 0 && bounds.height > 0 && (bounds.width < 44 || bounds.height < 44)) {
|
|
173
|
+
issues.push({
|
|
174
|
+
type: 'small-touch-target',
|
|
175
|
+
severity: 'medium',
|
|
176
|
+
message: `Element is ${bounds.width}×${bounds.height}px — below the 44×44px minimum touch target size (WCAG 2.5.5)`,
|
|
177
|
+
suggestion: 'Increase padding or min-width/min-height to at least 44px for touch accessibility',
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
return issues;
|
|
181
|
+
}
|
|
182
|
+
// ── Accessibility checks (from computed styles) ───────────────────────────────
|
|
183
|
+
export function checkAccessibilityStyles(styles) {
|
|
184
|
+
const issues = [];
|
|
185
|
+
// pointer-events: none makes elements unclikable
|
|
186
|
+
if (styles.get('pointer-events') === 'none') {
|
|
187
|
+
issues.push({
|
|
188
|
+
type: 'pointer-events-none',
|
|
189
|
+
severity: 'medium',
|
|
190
|
+
message: 'pointer-events: none — element is not clickable/interactive',
|
|
191
|
+
suggestion: 'Remove pointer-events: none if the element should be interactive',
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
// user-select: none on interactive elements
|
|
195
|
+
if (styles.get('user-select') === 'none' || styles.get('-webkit-user-select') === 'none') {
|
|
196
|
+
issues.push({
|
|
197
|
+
type: 'user-select-none',
|
|
198
|
+
severity: 'low',
|
|
199
|
+
message: 'user-select: none prevents text selection — may frustrate users trying to copy content',
|
|
200
|
+
suggestion: 'Remove user-select: none from text content; keep it only on UI controls like buttons',
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
// cursor: default on something that looks interactive
|
|
204
|
+
const cursor = styles.get('cursor') ?? '';
|
|
205
|
+
if (cursor === 'default') {
|
|
206
|
+
const display = styles.get('display') ?? '';
|
|
207
|
+
if (display === 'inline-flex' || display === 'flex') {
|
|
208
|
+
issues.push({
|
|
209
|
+
type: 'missing-pointer-cursor',
|
|
210
|
+
severity: 'low',
|
|
211
|
+
message: 'Flex element has cursor: default — if this is a button/link, set cursor: pointer',
|
|
212
|
+
suggestion: "Add cursor: pointer to indicate the element is interactive",
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return issues;
|
|
217
|
+
}
|
|
218
|
+
// ── Color contrast check (pure math, no CDP needed) ──────────────────────────
|
|
219
|
+
/**
|
|
220
|
+
* Parse any CSS color string to { r, g, b } (0–255).
|
|
221
|
+
* Supports: rgb(...), rgba(...), #rrggbb, #rgb
|
|
222
|
+
*/
|
|
223
|
+
export function parseColor(color) {
|
|
224
|
+
// rgb / rgba
|
|
225
|
+
const rgbMatch = color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
|
|
226
|
+
if (rgbMatch)
|
|
227
|
+
return { r: +rgbMatch[1], g: +rgbMatch[2], b: +rgbMatch[3] };
|
|
228
|
+
// #rrggbb
|
|
229
|
+
const hex6 = color.match(/^#([0-9a-f]{6})$/i);
|
|
230
|
+
if (hex6) {
|
|
231
|
+
const v = parseInt(hex6[1], 16);
|
|
232
|
+
return { r: (v >> 16) & 0xff, g: (v >> 8) & 0xff, b: v & 0xff };
|
|
233
|
+
}
|
|
234
|
+
// #rgb
|
|
235
|
+
const hex3 = color.match(/^#([0-9a-f]{3})$/i);
|
|
236
|
+
if (hex3) {
|
|
237
|
+
const r = parseInt(hex3[1][0] + hex3[1][0], 16);
|
|
238
|
+
const g = parseInt(hex3[1][1] + hex3[1][1], 16);
|
|
239
|
+
const b = parseInt(hex3[1][2] + hex3[1][2], 16);
|
|
240
|
+
return { r, g, b };
|
|
241
|
+
}
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
244
|
+
/** Relative luminance per WCAG 2.1 */
|
|
245
|
+
export function relativeLuminance(r, g, b) {
|
|
246
|
+
const toLinear = (c) => {
|
|
247
|
+
const s = c / 255;
|
|
248
|
+
return s <= 0.04045 ? s / 12.92 : Math.pow((s + 0.055) / 1.055, 2.4);
|
|
249
|
+
};
|
|
250
|
+
return 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);
|
|
251
|
+
}
|
|
252
|
+
/** Contrast ratio between two colours (1–21) */
|
|
253
|
+
export function contrastRatio(c1, c2) {
|
|
254
|
+
const l1 = relativeLuminance(c1.r, c1.g, c1.b);
|
|
255
|
+
const l2 = relativeLuminance(c2.r, c2.g, c2.b);
|
|
256
|
+
const lighter = Math.max(l1, l2);
|
|
257
|
+
const darker = Math.min(l1, l2);
|
|
258
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
259
|
+
}
|
|
260
|
+
export function checkColorContrast(styles) {
|
|
261
|
+
const issues = [];
|
|
262
|
+
const colorStr = styles.get('color');
|
|
263
|
+
const bgStr = styles.get('background-color');
|
|
264
|
+
const fontSizeStr = styles.get('font-size') ?? '16px';
|
|
265
|
+
const fontWeight = styles.get('font-weight') ?? '400';
|
|
266
|
+
if (!colorStr || !bgStr)
|
|
267
|
+
return issues;
|
|
268
|
+
const fg = parseColor(colorStr);
|
|
269
|
+
const bg = parseColor(bgStr);
|
|
270
|
+
if (!fg || !bg)
|
|
271
|
+
return issues;
|
|
272
|
+
// Skip fully transparent background
|
|
273
|
+
if (bgStr.includes('rgba') && bgStr.includes(', 0)'))
|
|
274
|
+
return issues;
|
|
275
|
+
const ratio = contrastRatio(fg, bg);
|
|
276
|
+
const fontSize = parseFloat(fontSizeStr);
|
|
277
|
+
const isBold = parseInt(fontWeight, 10) >= 700;
|
|
278
|
+
const isLargeText = fontSize >= 18 || (isBold && fontSize >= 14);
|
|
279
|
+
// WCAG AA thresholds
|
|
280
|
+
const minAA = isLargeText ? 3.0 : 4.5;
|
|
281
|
+
// WCAG AAA thresholds
|
|
282
|
+
const minAAA = isLargeText ? 4.5 : 7.0;
|
|
283
|
+
if (ratio < minAA) {
|
|
284
|
+
issues.push({
|
|
285
|
+
type: 'contrast-fail-aa',
|
|
286
|
+
severity: 'high',
|
|
287
|
+
message: `Color contrast ratio is ${ratio.toFixed(2)}:1 — fails WCAG AA (minimum ${minAA}:1 for ${isLargeText ? 'large' : 'normal'} text)`,
|
|
288
|
+
suggestion: `Increase contrast between text color (${colorStr}) and background (${bgStr}). Use a contrast checker to find a compliant combination.`,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
else if (ratio < minAAA) {
|
|
292
|
+
issues.push({
|
|
293
|
+
type: 'contrast-fail-aaa',
|
|
294
|
+
severity: 'low',
|
|
295
|
+
message: `Color contrast ratio is ${ratio.toFixed(2)}:1 — passes WCAG AA but fails AAA (${minAAA}:1)`,
|
|
296
|
+
suggestion: 'Consider increasing contrast for better readability, especially for users with low vision.',
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
return issues;
|
|
300
|
+
}
|
|
301
|
+
// ── CSS custom property resolver ──────────────────────────────────────────────
|
|
302
|
+
export function checkCustomProperties(styles) {
|
|
303
|
+
const issues = [];
|
|
304
|
+
for (const [prop, value] of styles.entries()) {
|
|
305
|
+
// A CSS variable that failed to resolve shows as the initial/empty value or the var() call itself
|
|
306
|
+
if (value.includes('var(--') && value.includes(')')) {
|
|
307
|
+
issues.push({
|
|
308
|
+
type: 'unresolved-css-var',
|
|
309
|
+
severity: 'high',
|
|
310
|
+
message: `Property "${prop}" uses an unresolved CSS variable: ${value}`,
|
|
311
|
+
suggestion: `Define the variable on :root or a parent element. Check spelling and scope.`,
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return issues;
|
|
316
|
+
}
|
|
317
|
+
// ── Utilities ─────────────────────────────────────────────────────────────────
|
|
318
|
+
export function sortBySeverity(issues) {
|
|
319
|
+
const rank = { high: 0, medium: 1, low: 2 };
|
|
320
|
+
return [...issues].sort((a, b) => rank[a.severity] - rank[b.severity]);
|
|
321
|
+
}
|
|
322
|
+
export function validateSelector(selector) {
|
|
323
|
+
if (!selector?.trim())
|
|
324
|
+
return { valid: false, error: 'Selector must be a non-empty string' };
|
|
325
|
+
if (/^\d/.test(selector.trim()))
|
|
326
|
+
return { valid: false, error: 'Selector cannot start with a number' };
|
|
327
|
+
return { valid: true };
|
|
328
|
+
}
|
|
329
|
+
//# sourceMappingURL=diagnostics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH,iFAAiF;AAEjF,MAAM,UAAU,aAAa,CAAC,KAA2D;IACvF,MAAM,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;IACxB,OAAO;QACL,IAAI,EAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,GAAG,EAAK,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,KAAK,EAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,KAAK,EAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;QAC/B,MAAM,EAAE,IAAI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AQ,CAAC,IAAI,EAAE,CAAC;QAC7B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,qCAAqC,EAAE,CAAC;IACxE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* mcp-server.ts — Gravity MCP Server v3
|
|
3
|
+
*
|
|
4
|
+
* Tools built around the top real-world UI debugging pain points:
|
|
5
|
+
* 1. connect_browser — check extension connection status
|
|
6
|
+
* 2. diagnose_layout — offscreen, hidden, overflow issues
|
|
7
|
+
* 3. inspect_stacking — z-index traps, stacking context analysis
|
|
8
|
+
* 4. check_accessibility — contrast ratio, touch targets, ARIA
|
|
9
|
+
* 5. inspect_responsive — fixed widths, breakpoint analysis
|
|
10
|
+
* 6. debug_flexgrid — flexbox/grid container + children analysis
|
|
11
|
+
* 7. get_computed_layout — full computed style snapshot
|
|
12
|
+
* 8. highlight_element — visual overlay in browser
|
|
13
|
+
* 9. screenshot_element — capture element as PNG
|
|
14
|
+
* 10. get_page_performance — layout paint metrics from Chrome
|
|
15
|
+
*/
|
|
16
|
+
export declare class GravityMCPServer {
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
}
|