@polishd/next 0.2.3-dev.5 → 0.2.3-dev.7

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.
Files changed (90) hide show
  1. package/AGENTS.md +1 -1
  2. package/CHANGELOG.md +79 -14
  3. package/README.md +13 -3
  4. package/dist/ai/actions.d.ts +13 -1
  5. package/dist/ai/actions.d.ts.map +1 -1
  6. package/dist/ai/actions.js +20 -1
  7. package/dist/ai/actions.js.map +1 -1
  8. package/dist/ai/design.d.ts +5 -1
  9. package/dist/ai/design.d.ts.map +1 -1
  10. package/dist/ai/design.js +21 -4
  11. package/dist/ai/design.js.map +1 -1
  12. package/dist/ai/fix.d.ts +14 -0
  13. package/dist/ai/fix.d.ts.map +1 -0
  14. package/dist/ai/fix.js +254 -0
  15. package/dist/ai/fix.js.map +1 -0
  16. package/dist/ai/guard.d.ts.map +1 -1
  17. package/dist/ai/guard.js +8 -32
  18. package/dist/ai/guard.js.map +1 -1
  19. package/dist/ai/issues.d.ts +29 -6
  20. package/dist/ai/issues.d.ts.map +1 -1
  21. package/dist/ai/issues.js +113 -40
  22. package/dist/ai/issues.js.map +1 -1
  23. package/dist/ai/types.d.ts +52 -0
  24. package/dist/ai/types.d.ts.map +1 -1
  25. package/dist/dashboard/design-review-card.d.ts +3 -1
  26. package/dist/dashboard/design-review-card.d.ts.map +1 -1
  27. package/dist/dashboard/design-review-card.js +14 -6
  28. package/dist/dashboard/design-review-card.js.map +1 -1
  29. package/dist/dashboard/design.d.ts.map +1 -1
  30. package/dist/dashboard/design.js +75 -17
  31. package/dist/dashboard/design.js.map +1 -1
  32. package/dist/dashboard/file-bug-button.d.ts +14 -0
  33. package/dist/dashboard/file-bug-button.d.ts.map +1 -0
  34. package/dist/dashboard/file-bug-button.js +37 -0
  35. package/dist/dashboard/file-bug-button.js.map +1 -0
  36. package/dist/dashboard/index.d.ts.map +1 -1
  37. package/dist/dashboard/index.js +4 -2
  38. package/dist/dashboard/index.js.map +1 -1
  39. package/dist/dashboard/issue-list.d.ts +11 -0
  40. package/dist/dashboard/issue-list.d.ts.map +1 -0
  41. package/dist/dashboard/issue-list.js +159 -0
  42. package/dist/dashboard/issue-list.js.map +1 -0
  43. package/dist/dashboard/issues.d.ts +31 -2
  44. package/dist/dashboard/issues.d.ts.map +1 -1
  45. package/dist/dashboard/issues.js +4 -71
  46. package/dist/dashboard/issues.js.map +1 -1
  47. package/dist/dashboard/markdown-parse.d.ts +87 -0
  48. package/dist/dashboard/markdown-parse.d.ts.map +1 -0
  49. package/dist/dashboard/markdown-parse.js +244 -0
  50. package/dist/dashboard/markdown-parse.js.map +1 -0
  51. package/dist/dashboard/markdown.d.ts +5 -0
  52. package/dist/dashboard/markdown.d.ts.map +1 -0
  53. package/dist/dashboard/markdown.js +65 -0
  54. package/dist/dashboard/markdown.js.map +1 -0
  55. package/dist/dashboard/snapshot-actions.d.ts.map +1 -1
  56. package/dist/dashboard/snapshot-actions.js +22 -54
  57. package/dist/dashboard/snapshot-actions.js.map +1 -1
  58. package/dist/dashboard/snapshots.d.ts.map +1 -1
  59. package/dist/dashboard/snapshots.js +7 -20
  60. package/dist/dashboard/snapshots.js.map +1 -1
  61. package/dist/dashboard/summary.d.ts.map +1 -1
  62. package/dist/dashboard/summary.js +8 -36
  63. package/dist/dashboard/summary.js.map +1 -1
  64. package/dist/dashboard/ui.d.ts +1 -0
  65. package/dist/dashboard/ui.d.ts.map +1 -1
  66. package/dist/dashboard/ui.js +1 -0
  67. package/dist/dashboard/ui.js.map +1 -1
  68. package/dist/dashboard/value-preview.d.ts +47 -0
  69. package/dist/dashboard/value-preview.d.ts.map +1 -0
  70. package/dist/dashboard/value-preview.js +138 -0
  71. package/dist/dashboard/value-preview.js.map +1 -0
  72. package/dist/dashboard.css +234 -62
  73. package/dist/server/snapshot-blob.d.ts +38 -0
  74. package/dist/server/snapshot-blob.d.ts.map +1 -0
  75. package/dist/server/snapshot-blob.js +75 -0
  76. package/dist/server/snapshot-blob.js.map +1 -0
  77. package/dist/server/snapshots.d.ts +32 -4
  78. package/dist/server/snapshots.d.ts.map +1 -1
  79. package/dist/server/snapshots.js +195 -55
  80. package/dist/server/snapshots.js.map +1 -1
  81. package/dist/server/value-previews.d.ts +47 -0
  82. package/dist/server/value-previews.d.ts.map +1 -0
  83. package/dist/server/value-previews.js +313 -0
  84. package/dist/server/value-previews.js.map +1 -0
  85. package/dist/shared/design-values.d.ts +71 -0
  86. package/dist/shared/design-values.d.ts.map +1 -0
  87. package/dist/shared/design-values.js +98 -0
  88. package/dist/shared/design-values.js.map +1 -0
  89. package/docs/SETUP.md +4 -2
  90. package/package.json +1 -1
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Polishd — pictures of where a flagged design value renders (server only).
3
+ *
4
+ * The Design tab knows a one-off 17px type style exists and which page it was
5
+ * measured on; this finds the element that carries it and photographs it in
6
+ * place. It runs inside a snapshot capture, right after a route's full shots,
7
+ * on the browser that capture already launched: load the route, find each
8
+ * target value's element with the same rules the client scanner tallies by,
9
+ * scroll it into view, ring it, and screenshot a crop around it.
10
+ *
11
+ * Matching is by value, not by selector. The visitor's scan never recorded
12
+ * *which* element carried a value — only that one did — and a selector shot
13
+ * at a different viewport would often point at nothing anyway. Re-measuring
14
+ * the page as the capture browser renders it means every picture shows the
15
+ * value genuinely there, at the size and theme it was shot in.
16
+ *
17
+ * Best-effort throughout: a value that never turns up (only shown after a
18
+ * click, only at a width we don't shoot) is reported as missed, and any
19
+ * failure ends the pass with whatever was already pictured. The route's full
20
+ * shots never depend on it.
21
+ */
22
+ import type { Browser } from "playwright-core";
23
+ import { type DesignPreviewTarget } from "../shared/design-values";
24
+ /** One rendering a pass can look in: an allpages device name and a theme. */
25
+ export interface PreviewRendering {
26
+ device: string;
27
+ theme: "light" | "dark";
28
+ }
29
+ export interface ValuePreviewCrop {
30
+ key: string;
31
+ device: string;
32
+ theme: string;
33
+ bytes: Buffer;
34
+ }
35
+ export interface ValuePreviewResult {
36
+ crops: ValuePreviewCrop[];
37
+ /** Keys looked for in every rendering and not found on screen in any. */
38
+ missed: string[];
39
+ }
40
+ /**
41
+ * Picture each target on one route. Renderings are tried in order — the
42
+ * gallery's default view first — and a value found in an earlier one isn't
43
+ * looked for again, so the usual cost is a single extra page load. Stops early
44
+ * when `budgetMs` runs out, reporting the rest as neither found nor missed.
45
+ */
46
+ export declare function captureValuePreviews(browser: Browser, origin: string, route: string, targets: DesignPreviewTarget[], renderings: PreviewRendering[], budgetMs: number): Promise<ValuePreviewResult>;
47
+ //# sourceMappingURL=value-previews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-previews.d.ts","sourceRoot":"","sources":["../../src/server/value-previews.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAQ,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAe,KAAK,mBAAmB,EAAuB,MAAM,yBAAyB,CAAC;AAErG,6EAA6E;AAC7E,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,yEAAyE;IACzE,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAiRD;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,mBAAmB,EAAE,EAC9B,UAAU,EAAE,gBAAgB,EAAE,EAC9B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,kBAAkB,CAAC,CA0D7B"}
@@ -0,0 +1,313 @@
1
+ import { previewClip } from "../shared/design-values";
2
+ /** Attribute the locator tags candidate elements with: space-separated target indices. */
3
+ const LOCATE_ATTR = "data-polishd-locate";
4
+ const OVERLAY_ID = "__polishd_locate_ring";
5
+ /** Candidate elements remembered per value — the first may be off-canvas. */
6
+ const CANDIDATES_PER_TARGET = 3;
7
+ /** Same accent as the dashboard's one-off badges. */
8
+ const RING_COLOR = "#f59e0b";
9
+ /**
10
+ * Walk the page with the client scanner's rules (src/client/design-scan.ts —
11
+ * keep the two in step) and tag up to `perTarget` elements carrying each
12
+ * target value. Returns how many were tagged per target.
13
+ */
14
+ function markDesignTargets({ refs, attr, perTarget }) {
15
+ const SKIP_TAGS = new Set([
16
+ "SCRIPT", "STYLE", "NOSCRIPT", "TEMPLATE", "META", "LINK", "HEAD", "TITLE", "IFRAME", "BR", "WBR",
17
+ ]);
18
+ const INTERACTIVE_TAGS = new Set(["BUTTON", "A", "INPUT", "SELECT", "TEXTAREA", "SUMMARY"]);
19
+ const normalizeColor = (value) => {
20
+ const m = value.match(/^rgba?\(\s*([\d.]+)\s*[, ]\s*([\d.]+)\s*[, ]\s*([\d.]+)\s*(?:[,/]\s*([\d.]+%?)\s*)?\)$/);
21
+ if (!m)
22
+ return null;
23
+ const to255 = (s) => Math.max(0, Math.min(255, Math.round(parseFloat(s))));
24
+ let a = 1;
25
+ if (m[4] !== undefined)
26
+ a = m[4].endsWith("%") ? parseFloat(m[4]) / 100 : parseFloat(m[4]);
27
+ if (!(a > 0.02))
28
+ return null;
29
+ const hex = (n) => n.toString(16).padStart(2, "0");
30
+ const rgb = `#${hex(to255(m[1]))}${hex(to255(m[2]))}${hex(to255(m[3]))}`;
31
+ return a >= 0.98 ? rgb : `${rgb}${hex(Math.round(a * 255))}`;
32
+ };
33
+ const primaryFamily = (fontFamily) => (fontFamily.split(",")[0]?.trim() ?? "").replace(/^["']|["']$/g, "").slice(0, 60);
34
+ const hasOwnText = (el) => {
35
+ for (let n = el.firstChild; n; n = n.nextSibling) {
36
+ if (n.nodeType === 3 && n.textContent && n.textContent.trim().length > 0)
37
+ return true;
38
+ }
39
+ return false;
40
+ };
41
+ // value → indices of the targets wanting it, per channel the scanner tallies.
42
+ const fonts = new Map();
43
+ const text = new Map();
44
+ const bg = new Map();
45
+ const border = new Map();
46
+ const radii = new Map();
47
+ const pad = new Map();
48
+ const want = (map, key, i) => {
49
+ const list = map.get(key);
50
+ if (list)
51
+ list.push(i);
52
+ else
53
+ map.set(key, [i]);
54
+ };
55
+ refs.forEach((ref, i) => {
56
+ if (ref.kind === "font")
57
+ want(fonts, `${ref.family}|${ref.sizePx}|${ref.weight}`, i);
58
+ else if (ref.kind === "radius")
59
+ want(radii, ref.value, i);
60
+ else if (ref.kind === "spacing")
61
+ want(pad, String(ref.px), i);
62
+ else {
63
+ const hex = ref.hex.toLowerCase();
64
+ if (ref.roles.length === 0 || ref.roles.includes("text"))
65
+ want(text, hex.slice(0, 7), i);
66
+ if (ref.roles.length === 0 || ref.roles.includes("background"))
67
+ want(bg, hex, i);
68
+ if (ref.roles.length === 0 || ref.roles.includes("border"))
69
+ want(border, hex, i);
70
+ }
71
+ });
72
+ const counts = refs.map(() => 0);
73
+ let unfilled = refs.length;
74
+ const tag = (el, list) => {
75
+ if (!list)
76
+ return;
77
+ for (const i of list) {
78
+ if (counts[i] >= perTarget)
79
+ continue;
80
+ const tokens = (el.getAttribute(attr) ?? "").split(" ").filter(Boolean);
81
+ if (tokens.includes(String(i)))
82
+ continue;
83
+ tokens.push(String(i));
84
+ el.setAttribute(attr, tokens.join(" "));
85
+ if (++counts[i] === perTarget)
86
+ unfilled--;
87
+ }
88
+ };
89
+ const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
90
+ let sampled = 0;
91
+ let visited = 0;
92
+ // Looser bounds than the scanner's: this runs once, server-side, and the
93
+ // visitor's DOM may have reached the value later in the walk than ours does.
94
+ for (let node = walker.nextNode(); node && sampled < 5000 && visited < 20000 && unfilled > 0; node = walker.nextNode()) {
95
+ visited++;
96
+ const el = node;
97
+ if (SKIP_TAGS.has(el.tagName))
98
+ continue;
99
+ if (el.closest("svg") && el.tagName !== "svg")
100
+ continue;
101
+ const cs = getComputedStyle(el);
102
+ if (cs.display === "none" || cs.visibility === "hidden")
103
+ continue;
104
+ const rect = el.getBoundingClientRect();
105
+ if (rect.width <= 0 || rect.height <= 0)
106
+ continue;
107
+ sampled++;
108
+ const ownBg = normalizeColor(cs.backgroundColor);
109
+ const hasBorder = cs.borderStyle !== "none" &&
110
+ (parseFloat(cs.borderTopWidth) > 0 ||
111
+ parseFloat(cs.borderBottomWidth) > 0 ||
112
+ parseFloat(cs.borderLeftWidth) > 0 ||
113
+ parseFloat(cs.borderRightWidth) > 0);
114
+ const boxy = ownBg !== null || hasBorder || INTERACTIVE_TAGS.has(el.tagName);
115
+ if (hasOwnText(el)) {
116
+ const family = primaryFamily(cs.fontFamily);
117
+ const size = Math.round(parseFloat(cs.fontSize) * 10) / 10;
118
+ const weight = Math.round(parseFloat(cs.fontWeight)) || 400;
119
+ if (family && size > 0)
120
+ tag(el, fonts.get(`${family}|${size}|${weight}`));
121
+ const fg = normalizeColor(cs.color);
122
+ if (fg)
123
+ tag(el, text.get(fg.slice(0, 7)));
124
+ }
125
+ if (ownBg)
126
+ tag(el, bg.get(ownBg));
127
+ if (hasBorder) {
128
+ const bc = normalizeColor(cs.borderTopColor);
129
+ if (bc)
130
+ tag(el, border.get(bc));
131
+ }
132
+ if (boxy) {
133
+ const rtl = cs.borderTopLeftRadius;
134
+ if (rtl && rtl !== "0px") {
135
+ const corners = [rtl, cs.borderTopRightRadius, cs.borderBottomLeftRadius, cs.borderBottomRightRadius];
136
+ const px = parseFloat(rtl);
137
+ const label = rtl.endsWith("%") && px >= 50
138
+ ? "full"
139
+ : px >= Math.min(rect.width, rect.height) / 2
140
+ ? "full"
141
+ : corners.every((c) => c === rtl)
142
+ ? `${Math.round(px)}px`
143
+ : `${Math.round(px)}px (mixed)`;
144
+ tag(el, radii.get(label));
145
+ }
146
+ for (const side of [cs.paddingTop, cs.paddingRight, cs.paddingBottom, cs.paddingLeft]) {
147
+ const v = Math.round(parseFloat(side));
148
+ if (v > 0)
149
+ tag(el, pad.get(String(v)));
150
+ }
151
+ }
152
+ }
153
+ return counts;
154
+ }
155
+ /**
156
+ * Scroll the first on-screen candidate for target `index` into view and ring
157
+ * it — an outline in the badge's amber with the rest of the page dimmed, so
158
+ * the eye lands on the element in a crop full of neighbours.
159
+ */
160
+ function focusDesignTarget({ attr, index, overlayId, color }) {
161
+ document.getElementById(overlayId)?.remove();
162
+ const vw = document.documentElement.clientWidth || window.innerWidth;
163
+ const vh = window.innerHeight;
164
+ for (const el of Array.from(document.querySelectorAll(`[${attr}~="${index}"]`))) {
165
+ el.scrollIntoView({ block: "center", inline: "nearest", behavior: "instant" });
166
+ const r = el.getBoundingClientRect();
167
+ if (r.width <= 0 || r.height <= 0)
168
+ continue;
169
+ if (r.right <= 0 || r.bottom <= 0 || r.left >= vw || r.top >= vh)
170
+ continue;
171
+ const gap = 3;
172
+ const radius = parseFloat(getComputedStyle(el).borderTopLeftRadius) || 0;
173
+ const ring = document.createElement("div");
174
+ ring.id = overlayId;
175
+ Object.assign(ring.style, {
176
+ position: "fixed",
177
+ left: `${r.left - gap}px`,
178
+ top: `${r.top - gap}px`,
179
+ width: `${r.width + gap * 2}px`,
180
+ height: `${r.height + gap * 2}px`,
181
+ boxSizing: "border-box",
182
+ margin: "0",
183
+ border: `2px solid ${color}`,
184
+ borderRadius: `${radius + gap}px`,
185
+ boxShadow: "0 0 0 9999px rgba(0, 0, 0, 0.3)",
186
+ pointerEvents: "none",
187
+ zIndex: "2147483647",
188
+ });
189
+ document.documentElement.appendChild(ring);
190
+ return { x: r.left, y: r.top, width: r.width, height: r.height, viewportWidth: vw, viewportHeight: vh };
191
+ }
192
+ return null;
193
+ }
194
+ function clearDesignFocus(overlayId) {
195
+ document.getElementById(overlayId)?.remove();
196
+ }
197
+ // ── The pass ─────────────────────────────────────────────────────────────────
198
+ /**
199
+ * Load the route as the snapshot shot it — same viewport, scale, theme and
200
+ * user agent, same consent-dismissal pass — and leave it ready to measure.
201
+ * Polishd's own beacons are answered locally: this is a measurement, and the
202
+ * page stays open long enough that its design scan would otherwise land in
203
+ * the store as a visit.
204
+ */
205
+ async function openRendering(browser, origin, route, rendering) {
206
+ const { DEVICES, preparePage, userAgentFor } = await import("allpages");
207
+ const device = DEVICES[rendering.device];
208
+ if (!device)
209
+ return null;
210
+ const ctx = await browser.newContext({
211
+ viewport: { width: device.width, height: device.height },
212
+ deviceScaleFactor: device.scale,
213
+ isMobile: device.mobile,
214
+ hasTouch: device.mobile,
215
+ colorScheme: rendering.theme,
216
+ reducedMotion: "reduce",
217
+ // A service worker would answer requests before the beacon route below sees them.
218
+ serviceWorkers: "block",
219
+ userAgent: userAgentFor(device, browser.version()),
220
+ locale: "en-US",
221
+ extraHTTPHeaders: { "accept-language": "en-US,en;q=0.9" },
222
+ });
223
+ const close = () => ctx.close().catch(() => { });
224
+ try {
225
+ const site = new URL(origin).origin;
226
+ await ctx.route((url) => url.origin === site && !url.pathname.startsWith("/_next/"), (r) => {
227
+ const req = r.request();
228
+ if (req.method() === "POST" && (req.postData() ?? "").startsWith('{"events":')) {
229
+ return r.fulfill({ status: 200, contentType: "application/json", body: '{"ok":true,"stored":0}' });
230
+ }
231
+ return r.continue();
232
+ });
233
+ const page = await ctx.newPage();
234
+ await page.goto(new URL(route, origin).toString(), { waitUntil: "domcontentloaded", timeout: 15_000 });
235
+ await page.waitForLoadState("networkidle", { timeout: 1500 }).catch(() => { });
236
+ await page.evaluate("document.fonts && document.fonts.ready").catch(() => { });
237
+ await preparePage(page, { hide: [], delayMs: 0, lazyLoad: true, dismissBanners: true });
238
+ return { page, close };
239
+ }
240
+ catch {
241
+ await close();
242
+ return null;
243
+ }
244
+ }
245
+ /**
246
+ * Picture each target on one route. Renderings are tried in order — the
247
+ * gallery's default view first — and a value found in an earlier one isn't
248
+ * looked for again, so the usual cost is a single extra page load. Stops early
249
+ * when `budgetMs` runs out, reporting the rest as neither found nor missed.
250
+ */
251
+ export async function captureValuePreviews(browser, origin, route, targets, renderings, budgetMs) {
252
+ const started = Date.now();
253
+ const crops = [];
254
+ let pending = targets;
255
+ let exhausted = true;
256
+ for (const rendering of renderings) {
257
+ if (pending.length === 0)
258
+ break;
259
+ if (Date.now() - started > budgetMs) {
260
+ exhausted = false;
261
+ break;
262
+ }
263
+ const opened = await openRendering(browser, origin, route, rendering);
264
+ if (!opened) {
265
+ exhausted = false;
266
+ continue;
267
+ }
268
+ const { page, close } = opened;
269
+ const found = new Set();
270
+ try {
271
+ const counts = await page.evaluate(markDesignTargets, {
272
+ refs: pending.map((t) => t.ref),
273
+ attr: LOCATE_ATTR,
274
+ perTarget: CANDIDATES_PER_TARGET,
275
+ });
276
+ for (const [i, target] of pending.entries()) {
277
+ if (!counts[i])
278
+ continue;
279
+ if (Date.now() - started > budgetMs) {
280
+ exhausted = false;
281
+ break;
282
+ }
283
+ const box = await page.evaluate(focusDesignTarget, {
284
+ attr: LOCATE_ATTR,
285
+ index: i,
286
+ overlayId: OVERLAY_ID,
287
+ color: RING_COLOR,
288
+ });
289
+ const clip = box
290
+ ? previewClip(box, { width: box.viewportWidth, height: box.viewportHeight })
291
+ : null;
292
+ if (!clip)
293
+ continue;
294
+ // One frame for the scroll to paint and anything it lazily revealed.
295
+ await page.waitForTimeout(80);
296
+ const bytes = await page.screenshot({ clip, animations: "disabled", type: "png" });
297
+ await page.evaluate(clearDesignFocus, OVERLAY_ID);
298
+ crops.push({ key: target.key, device: rendering.device, theme: rendering.theme, bytes });
299
+ found.add(target.key);
300
+ }
301
+ }
302
+ catch {
303
+ // The page navigated or crashed mid-pass; keep what was pictured.
304
+ exhausted = false;
305
+ }
306
+ finally {
307
+ await close();
308
+ }
309
+ pending = pending.filter((t) => !found.has(t.key));
310
+ }
311
+ return { crops, missed: exhausted ? pending.map((t) => t.key) : [] };
312
+ }
313
+ //# sourceMappingURL=value-previews.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-previews.js","sourceRoot":"","sources":["../../src/server/value-previews.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,WAAW,EAAiD,MAAM,yBAAyB,CAAC;AAqBrG,0FAA0F;AAC1F,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAC1C,MAAM,UAAU,GAAG,uBAAuB,CAAC;AAC3C,6EAA6E;AAC7E,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAChC,qDAAqD;AACrD,MAAM,UAAU,GAAG,SAAS,CAAC;AAc7B;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAY;IAC5D,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC;QACxB,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK;KAClG,CAAC,CAAC;IACH,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IAE5F,MAAM,cAAc,GAAG,CAAC,KAAa,EAAiB,EAAE;QACtD,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CACnB,wFAAwF,CACzF,CAAC;QACF,IAAI,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QACpB,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnF,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,IAAI,CAAC,CAAC,CAAC,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G,KAAK,CAAC;QACpB,CAAC;gBAAS,CAAC;YACT,MAAM,KAAK,EAAE,CAAC;QAChB,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACvE,CAAC"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Polishd — naming a measured design value, and framing a picture of it.
3
+ *
4
+ * The Design tab flags values that break the system (a one-off 17px type
5
+ * style, a stray #fafafa, a 7px padding). A flag alone says *what*; a picture
6
+ * of the element carrying it says *where*. Those pictures are shot while a
7
+ * site snapshot is captured (see server/value-previews.ts), and this module
8
+ * holds the pure pieces both ends of that agree on:
9
+ *
10
+ * • **Keys.** One string per value — `font:Inter|17|500`, `color:#fafafa`,
11
+ * `radius:6px`, `spacing:7` — so a preview shot at capture time can be
12
+ * found again from the row the dashboard renders.
13
+ * • **Targets.** Which values are worth picturing: the ones flagged one-off
14
+ * or off-grid. Every other value is the system working as intended.
15
+ * • **Framing.** The crop around a located element: wide enough to show the
16
+ * component it sits in, never so wide the element disappears.
17
+ *
18
+ * Pure: no DOM, no store, no React — the test file pins the edge cases.
19
+ */
20
+ import type { PolishdDesignData } from "../server/design";
21
+ /** The identity of one measured value, as the design scan tallies it. */
22
+ export type DesignValueRef = {
23
+ kind: "font";
24
+ family: string;
25
+ sizePx: number;
26
+ weight: number;
27
+ } | {
28
+ kind: "color";
29
+ hex: string;
30
+ roles: ("text" | "background" | "border")[];
31
+ } | {
32
+ kind: "radius";
33
+ value: string;
34
+ } | {
35
+ kind: "spacing";
36
+ px: number;
37
+ };
38
+ /** A value to picture at capture time, and the pages it was measured on. */
39
+ export interface DesignPreviewTarget {
40
+ key: string;
41
+ ref: DesignValueRef;
42
+ pages: string[];
43
+ }
44
+ /** A stable key per value. Colors key on the hex alone, whatever the roles. */
45
+ export declare function designValueKey(ref: DesignValueRef): string;
46
+ /** Hard cap on values pictured per capture, bounding its extra screenshots. */
47
+ export declare const MAX_PREVIEW_TARGETS = 48;
48
+ /**
49
+ * The values worth a picture: every one-off font, color and radius, plus the
50
+ * most used off-grid paddings. One-offs come first so a site drowning in
51
+ * off-grid spacing still gets its one-offs pictured under the cap.
52
+ */
53
+ export declare function designPreviewTargets(data: PolishdDesignData): DesignPreviewTarget[];
54
+ export interface Box {
55
+ x: number;
56
+ y: number;
57
+ width: number;
58
+ height: number;
59
+ }
60
+ /**
61
+ * The clip to screenshot for an element at `el` (viewport coordinates, after
62
+ * it was scrolled into view): the element plus context, grown to 16:10,
63
+ * centered on the element's visible part and kept inside the viewport.
64
+ * Null when no part of the element is on screen — a drawer parked off-canvas,
65
+ * say — since a crop of whatever sits there instead would be a lie.
66
+ */
67
+ export declare function previewClip(el: Box, viewport: {
68
+ width: number;
69
+ height: number;
70
+ }): Box | null;
71
+ //# sourceMappingURL=design-values.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"design-values.d.ts","sourceRoot":"","sources":["../../src/shared/design-values.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,yEAAyE;AACzE,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAChE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,GAAG,YAAY,GAAG,QAAQ,CAAC,EAAE,CAAA;CAAE,GAC3E;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpC,4EAA4E;AAC5E,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,cAAc,CAAC;IACpB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,CAW1D;AAID,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,EAAE,CA4BnF;AAID,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AASD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,GAAG,GAAG,IAAI,CA4B5F"}
@@ -0,0 +1,98 @@
1
+ /** A stable key per value. Colors key on the hex alone, whatever the roles. */
2
+ export function designValueKey(ref) {
3
+ switch (ref.kind) {
4
+ case "font":
5
+ return `font:${ref.family}|${ref.sizePx}|${ref.weight}`;
6
+ case "color":
7
+ return `color:${ref.hex.toLowerCase()}`;
8
+ case "radius":
9
+ return `radius:${ref.value}`;
10
+ case "spacing":
11
+ return `spacing:${ref.px}`;
12
+ }
13
+ }
14
+ /** Off-grid paddings pictured per capture, most used first. */
15
+ const MAX_SPACING_TARGETS = 8;
16
+ /** Hard cap on values pictured per capture, bounding its extra screenshots. */
17
+ export const MAX_PREVIEW_TARGETS = 48;
18
+ /**
19
+ * The values worth a picture: every one-off font, color and radius, plus the
20
+ * most used off-grid paddings. One-offs come first so a site drowning in
21
+ * off-grid spacing still gets its one-offs pictured under the cap.
22
+ */
23
+ export function designPreviewTargets(data) {
24
+ const refs = [];
25
+ for (const f of data.fonts) {
26
+ if (!f.outlier)
27
+ continue;
28
+ refs.push({
29
+ ref: { kind: "font", family: f.family, sizePx: f.sizePx, weight: f.weight },
30
+ pages: f.pages,
31
+ });
32
+ }
33
+ for (const c of data.colors) {
34
+ if (!c.outlier)
35
+ continue;
36
+ const roles = ["text", "background", "border"].filter((r) => c.roles[r] > 0);
37
+ refs.push({ ref: { kind: "color", hex: c.hex, roles: [...roles] }, pages: c.pages });
38
+ }
39
+ for (const r of data.radii) {
40
+ if (!r.outlier)
41
+ continue;
42
+ refs.push({ ref: { kind: "radius", value: r.value }, pages: r.pages });
43
+ }
44
+ const offGrid = data.spacing
45
+ .filter((s) => s.offGrid)
46
+ .sort((a, b) => b.count - a.count)
47
+ .slice(0, MAX_SPACING_TARGETS);
48
+ for (const s of offGrid) {
49
+ refs.push({ ref: { kind: "spacing", px: s.px }, pages: s.pages });
50
+ }
51
+ return refs
52
+ .slice(0, MAX_PREVIEW_TARGETS)
53
+ .map(({ ref, pages }) => ({ key: designValueKey(ref), ref, pages }));
54
+ }
55
+ /** Context kept around the element on every side, in CSS px. */
56
+ const CONTEXT_PX = 40;
57
+ /** Crops come out 16:10 — the hover card's shape — unless the viewport can't fit it. */
58
+ const ASPECT = 1.6;
59
+ /** Small elements still get a component's worth of surroundings. */
60
+ const MIN_WIDTH = 360;
61
+ /**
62
+ * The clip to screenshot for an element at `el` (viewport coordinates, after
63
+ * it was scrolled into view): the element plus context, grown to 16:10,
64
+ * centered on the element's visible part and kept inside the viewport.
65
+ * Null when no part of the element is on screen — a drawer parked off-canvas,
66
+ * say — since a crop of whatever sits there instead would be a lie.
67
+ */
68
+ export function previewClip(el, viewport) {
69
+ const vw = Math.floor(viewport.width);
70
+ const vh = Math.floor(viewport.height);
71
+ if (vw <= 0 || vh <= 0 || el.width <= 0 || el.height <= 0)
72
+ return null;
73
+ // The part of the element actually on screen.
74
+ const left = Math.max(el.x, 0);
75
+ const top = Math.max(el.y, 0);
76
+ const right = Math.min(el.x + el.width, vw);
77
+ const bottom = Math.min(el.y + el.height, vh);
78
+ if (right <= left || bottom <= top)
79
+ return null;
80
+ let width = right - left + CONTEXT_PX * 2;
81
+ let height = bottom - top + CONTEXT_PX * 2;
82
+ if (width / height < ASPECT)
83
+ width = height * ASPECT;
84
+ else
85
+ height = width / ASPECT;
86
+ if (width < MIN_WIDTH) {
87
+ width = MIN_WIDTH;
88
+ height = MIN_WIDTH / ASPECT;
89
+ }
90
+ width = Math.min(Math.ceil(width), vw);
91
+ height = Math.min(Math.ceil(height), vh);
92
+ const cx = (left + right) / 2;
93
+ const cy = (top + bottom) / 2;
94
+ const x = Math.min(Math.max(Math.round(cx - width / 2), 0), vw - width);
95
+ const y = Math.min(Math.max(Math.round(cy - height / 2), 0), vh - height);
96
+ return { x, y, width, height };
97
+ }
98
+ //# sourceMappingURL=design-values.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"design-values.js","sourceRoot":"","sources":["../../src/shared/design-values.ts"],"names":[],"mappings":"AAmCA,+EAA+E;AAC/E,MAAM,UAAU,cAAc,CAAC,GAAmB;IAChD,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,MAAM;YACT,OAAO,QAAQ,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QAC1D,KAAK,OAAO;YACV,OAAO,SAAS,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC;QAC1C,KAAK,QAAQ;YACX,OAAO,UAAU,GAAG,CAAC,KAAK,EAAE,CAAC;QAC/B,KAAK,SAAS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AAK,CAAC,EAAE,EAAE,CAAC,CAAC;IACvC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;IAEzC,MAAM,EAAE,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;IAC9B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,CAAC;IACxE,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC;IAC1E,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AACjC,CAAC"}
package/docs/SETUP.md CHANGED
@@ -441,8 +441,10 @@ SQLite file cannot persist there. Production capture needs Postgres.
441
441
  4. Deploy. Tables are created automatically on first use.
442
442
 
443
443
  For **site snapshots** in production on Vercel, connect a
444
- [Blob store](https://vercel.com/docs/vercel-blob) — its `BLOB_READ_WRITE_TOKEN`
445
- switches image storage over automatically. Capture runs as one short server
444
+ [Blob store](https://vercel.com/docs/vercel-blob) — whichever variable the
445
+ connection injects, `BLOB_STORE_ID` (OIDC) or `BLOB_READ_WRITE_TOKEN`, switches
446
+ image storage over automatically. `BLOB_WEBHOOK_PUBLIC_KEY` isn't needed, and
447
+ public and private stores both work. Capture runs as one short server
446
448
  call per page so it fits inside function time limits; keeping
447
449
  `export const maxDuration = 300` on the dashboard's `page.tsx` adds headroom
448
450
  for heavy pages.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polishd/next",
3
- "version": "0.2.3-dev.5",
3
+ "version": "0.2.3-dev.7",
4
4
  "description": "Drop-in product analytics for Next.js — capture real user behavioral signals (rage/dead clicks, scroll depth, errors, web vitals) and explore them on a built-in dashboard. What gets measured gets improved.",
5
5
  "type": "module",
6
6
  "license": "MIT",