@polishd/next 0.2.3-dev.4 → 0.2.3-dev.5
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/CHANGELOG.md +37 -39
- package/README.md +7 -5
- package/bin/init.mjs +4 -1
- package/dist/ai/actions.d.ts +1 -7
- package/dist/ai/actions.d.ts.map +1 -1
- package/dist/ai/actions.js +0 -10
- package/dist/ai/actions.js.map +1 -1
- package/dist/ai/guard.d.ts.map +1 -1
- package/dist/ai/guard.js +32 -8
- package/dist/ai/guard.js.map +1 -1
- package/dist/ai/issues.d.ts +0 -12
- package/dist/ai/issues.d.ts.map +1 -1
- package/dist/ai/issues.js +2 -16
- package/dist/ai/issues.js.map +1 -1
- package/dist/ai/types.d.ts +0 -49
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +2 -4
- package/dist/dashboard/index.js.map +1 -1
- package/dist/dashboard/issues.d.ts +2 -31
- package/dist/dashboard/issues.d.ts.map +1 -1
- package/dist/dashboard/issues.js +71 -4
- package/dist/dashboard/issues.js.map +1 -1
- package/dist/dashboard/snapshot-actions.d.ts +15 -5
- package/dist/dashboard/snapshot-actions.d.ts.map +1 -1
- package/dist/dashboard/snapshot-actions.js +102 -25
- package/dist/dashboard/snapshot-actions.js.map +1 -1
- package/dist/dashboard/snapshots.d.ts.map +1 -1
- package/dist/dashboard/snapshots.js +71 -8
- package/dist/dashboard/snapshots.js.map +1 -1
- package/dist/dashboard.css +18 -70
- package/dist/server/snapshots.d.ts +37 -6
- package/dist/server/snapshots.d.ts.map +1 -1
- package/dist/server/snapshots.js +271 -144
- package/dist/server/snapshots.js.map +1 -1
- package/docs/SETUP.md +10 -0
- package/package.json +1 -1
- package/dist/ai/fix.d.ts +0 -14
- package/dist/ai/fix.d.ts.map +0 -1
- package/dist/ai/fix.js +0 -254
- package/dist/ai/fix.js.map +0 -1
- package/dist/dashboard/issue-list.d.ts +0 -11
- package/dist/dashboard/issue-list.d.ts.map +0 -1
- package/dist/dashboard/issue-list.js +0 -159
- package/dist/dashboard/issue-list.js.map +0 -1
- package/dist/dashboard/markdown-parse.d.ts +0 -87
- package/dist/dashboard/markdown-parse.d.ts.map +0 -1
- package/dist/dashboard/markdown-parse.js +0 -244
- package/dist/dashboard/markdown-parse.js.map +0 -1
- package/dist/dashboard/markdown.d.ts +0 -5
- package/dist/dashboard/markdown.d.ts.map +0 -1
- package/dist/dashboard/markdown.js +0 -65
- package/dist/dashboard/markdown.js.map +0 -1
|
@@ -10,7 +10,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
10
10
|
* expands into a full-height lightbox.
|
|
11
11
|
*/
|
|
12
12
|
import { useEffect, useState, useTransition } from "react";
|
|
13
|
-
import {
|
|
13
|
+
import { beginSnapshotCaptureAction, captureSnapshotRouteAction, finishSnapshotCaptureAction, getSnapshotImageAction, } from "./snapshot-actions";
|
|
14
14
|
import { border, card, labelCls, primaryBtn, relTime, RefreshIcon } from "./ui";
|
|
15
15
|
const DEVICES = ["desktop", "phone"];
|
|
16
16
|
const THEMES = ["light", "dark"];
|
|
@@ -53,20 +53,77 @@ export default function SnapshotsCard({ initial, captureIssue }) {
|
|
|
53
53
|
const [error, setError] = useState(null);
|
|
54
54
|
const [zoom, setZoom] = useState(null);
|
|
55
55
|
const [pending, startCapture] = useTransition();
|
|
56
|
+
const [progress, setProgress] = useState(null);
|
|
56
57
|
const selected = snapshots.find((s) => s.id === selectedId) ?? snapshots[0] ?? null;
|
|
57
58
|
// A site with no dark mode has its identical dark shots dropped at capture
|
|
58
59
|
// time — hide the toggle rather than offering an empty view.
|
|
59
60
|
const effectiveTheme = selected?.noDarkMode ? "light" : theme;
|
|
61
|
+
// What a rejected action call can tell us, phrased for the error box. In
|
|
62
|
+
// production Next masks a thrown server error to a generic message plus a
|
|
63
|
+
// digest — the digest is the correlation id to grep the host's function
|
|
64
|
+
// logs for, so it is worth surfacing. A transport-level death (the function
|
|
65
|
+
// killed at its time limit, a network drop) has no digest and keeps its
|
|
66
|
+
// fetch-layer message.
|
|
67
|
+
const describeRejection = (err) => {
|
|
68
|
+
console.error("[polishd] capture action rejected:", err);
|
|
69
|
+
if (err instanceof Error) {
|
|
70
|
+
const digest = err.digest;
|
|
71
|
+
return `${err.message}${digest ? ` [digest ${digest}]` : ""}`;
|
|
72
|
+
}
|
|
73
|
+
return String(err);
|
|
74
|
+
};
|
|
60
75
|
const capture = () => {
|
|
61
76
|
setError(null);
|
|
62
77
|
startCapture(async () => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
78
|
+
// The capture is one action call per route, so no single request has to
|
|
79
|
+
// outlive a serverless host's function time limit — and every await is
|
|
80
|
+
// caught: a rejected action must land in the error box, never in the
|
|
81
|
+
// error boundary (which would take the whole tab down).
|
|
82
|
+
try {
|
|
83
|
+
const begun = await beginSnapshotCaptureAction();
|
|
84
|
+
if (!begun.ok) {
|
|
85
|
+
setError(begun.message);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
setProgress({ done: 0, total: begun.routes.length });
|
|
89
|
+
const failed = [];
|
|
90
|
+
let failure = null;
|
|
91
|
+
for (const [i, route] of begun.routes.entries()) {
|
|
92
|
+
try {
|
|
93
|
+
const res = await captureSnapshotRouteAction(begun.id, route);
|
|
94
|
+
if (!res.ok) {
|
|
95
|
+
failed.push(route);
|
|
96
|
+
failure = res.message;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
failed.push(route);
|
|
101
|
+
failure = `the request died mid-shoot: ${describeRejection(err)}`;
|
|
102
|
+
}
|
|
103
|
+
setProgress({ done: i + 1, total: begun.routes.length });
|
|
104
|
+
}
|
|
105
|
+
// Finish even when every route failed: it sweeps the capture's state
|
|
106
|
+
// and reports "every page failed" — the per-route failure is more
|
|
107
|
+
// specific, so it wins the error box when there is one.
|
|
108
|
+
const fin = await finishSnapshotCaptureAction(begun.id);
|
|
109
|
+
if (fin.ok) {
|
|
110
|
+
setSnapshots((prev) => [fin.snapshot, ...prev]);
|
|
111
|
+
setSelectedId(fin.snapshot.id);
|
|
112
|
+
if (failed.length > 0) {
|
|
113
|
+
setError(`${failed.length} of ${begun.routes.length} page${begun.routes.length === 1 ? "" : "s"} failed to capture (${failure}). The rest are in the snapshot.`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
setError(failure ? `Capture failed: ${failure}.` : fin.message);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
catch (err) {
|
|
121
|
+
setError(`The capture request itself failed: ${describeRejection(err)}. ` +
|
|
122
|
+
"The same error is in the browser console, and your host's function " +
|
|
123
|
+
"logs have the server side of it.");
|
|
67
124
|
}
|
|
68
|
-
|
|
69
|
-
|
|
125
|
+
finally {
|
|
126
|
+
setProgress(null);
|
|
70
127
|
}
|
|
71
128
|
});
|
|
72
129
|
};
|
|
@@ -81,7 +138,13 @@ export default function SnapshotsCard({ initial, captureIssue }) {
|
|
|
81
138
|
// clicks group under these on the collecting side, so "does anyone shoot
|
|
82
139
|
// a second snapshot?" is answerable. Inert for host apps.
|
|
83
140
|
_jsxs("section", { "data-component": "design-snapshots", className: `mb-8 ${card} overflow-hidden`, children: [_jsxs("div", { className: `flex flex-wrap items-center justify-between gap-3 border-b ${border} px-4 py-3 sm:px-5`, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: labelCls, children: "Site snapshots" }), selected && (_jsx("span", { className: "hidden rounded-full bg-[#1a1a1a] px-2 py-0.5 text-[10px] font-medium text-[#888] sm:inline", children: selected.origin }))] }), _jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [selected && (_jsxs(_Fragment, { children: [_jsx(TogglePills, { options: DEVICES, value: device, onChange: setDevice, component: "design-snapshot-device" }), !selected.noDarkMode && (_jsx(TogglePills, { options: THEMES, value: theme, onChange: setTheme, component: "design-snapshot-theme" })), snapshots.length > 1 && (_jsx("select", { "data-component": "design-snapshot-history", value: selected.id, onChange: (e) => setSelectedId(e.target.value), className: "rounded-md border border-[#2e2e2e] bg-[#111] px-2 py-1 text-[11px] text-[#aaa] focus:border-[#555] focus:outline-none", children: snapshots.map((s) => (_jsx("option", { value: s.id, children: relTime(s.capturedAt) }, s.id))) }))] })), _jsx("button", { type: "button", "data-component": "design-snapshot-capture", onClick: capture, disabled: pending || captureIssue !== null, title: captureIssue ??
|
|
84
|
-
"Screenshot every scanned page — phone and desktop, light and dark", className: primaryBtn, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(RefreshIcon, { spinning: pending }), pending
|
|
141
|
+
"Screenshot every scanned page — phone and desktop, light and dark", className: primaryBtn, children: _jsxs("span", { className: "flex items-center gap-1.5", children: [_jsx(RefreshIcon, { spinning: pending }), pending
|
|
142
|
+
? progress
|
|
143
|
+
? `Shooting page ${Math.min(progress.done + 1, progress.total)} of ${progress.total}…`
|
|
144
|
+
: "Shooting pages…"
|
|
145
|
+
: selected
|
|
146
|
+
? "Capture again"
|
|
147
|
+
: "Capture snapshot"] }) })] })] }), _jsxs("div", { className: "px-4 py-4 sm:px-5 sm:py-5", children: [captureIssue && (_jsx("div", { className: "mb-3 rounded-md border border-amber-900/50 bg-amber-950/30 px-3 py-2 text-[12px] text-amber-400", children: captureIssue })), error && (_jsx("div", { className: "mb-3 rounded-md border border-red-900/50 bg-red-950/30 px-3 py-2 text-[12px] text-red-400", children: error })), pending && (_jsx("p", { className: "mb-3 text-[12px] text-[#888]", children: "Shooting every scanned page at two sizes in two themes, one page at a time \u2014 this can take a minute. Keep this tab open." })), !selected && !pending && (_jsx("p", { className: "text-[13px] leading-relaxed text-[#888]", children: "No snapshots yet. Capture one to see every page of the site as it renders right now \u2014 the \u201Cbefore\u201D to hold future design changes against." })), selected && (_jsxs(_Fragment, { children: [shots.length === 0 ? (_jsxs("p", { className: "text-[13px] text-[#888]", children: ["No ", device, "/", theme, " shots in this snapshot."] })) : (_jsx("div", { className: `grid gap-4 ${device === "phone"
|
|
85
148
|
? "grid-cols-3 sm:grid-cols-5 lg:grid-cols-6"
|
|
86
149
|
: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"}`, children: shots.map((s) => (_jsx(ShotTile, { snapshotId: selected.id, shot: s, onZoom: (src, route) => setZoom({ src, route }) }, `${selected.id}|${s.file}`))) })), _jsxs("div", { className: "mt-3 flex flex-wrap items-center gap-x-3 gap-y-1 text-[11px] text-[#555]", children: [_jsxs("span", { children: ["Captured ", relTime(selected.capturedAt)] }), selected.noDarkMode && (_jsx("span", { className: "rounded-full bg-[#1a1a1a] px-2 py-0.5 text-[#777]", children: "Site renders identically in dark mode" })), skipped.length > 0 && (_jsxs("span", { className: "text-amber-400/80", children: [skipped.length, " page", skipped.length === 1 ? "" : "s", " skipped", skipped[0].skipped ? ` (${skipped[0].skipped})` : ""] })), selected.authWalled.length > 0 && (_jsxs("span", { className: "text-amber-400/80", children: ["behind login: ", selected.authWalled.slice(0, 3).join(", "), selected.authWalled.length > 3 ? ", …" : ""] }))] })] }))] }), zoom && (_jsx("div", { role: "dialog", "aria-label": `${zoom.route} screenshot`, onClick: () => setZoom(null), className: "fixed inset-0 z-50 flex cursor-zoom-out items-start justify-center overflow-y-auto bg-black/85 p-6", children: _jsx("img", { src: zoom.src, alt: `${zoom.route} full screenshot`, className: "w-full max-w-3xl rounded-md border border-[#333]" }) }))] }));
|
|
87
150
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshots.js","sourceRoot":"","sources":["../../src/dashboard/snapshots.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;;;;GAQG;AACH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,
|
|
1
|
+
{"version":3,"file":"snapshots.js","sourceRoot":"","sources":["../../src/dashboard/snapshots.tsx"],"names":[],"mappings":"A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,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,IAChD,CACR,EACA,QAAQ,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CACjC,gBAAM,SAAS,EAAC,mBAAmB,+BAClB,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EACxD,QAAQ,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IACvC,CACR,IACG,IACL,CACJ,IACG,EAEL,IAAI,IAAI,CACP,cACE,IAAI,EAAC,QAAQ,gBACD,GAAG,IAAI,CAAC,KAAK,aAAa,EACtC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,EAC5B,SAAS,EAAC,oGAAoG,YAG9G,cACE,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,kBAAkB,EACpC,SAAS,EAAC,kDAAkD,GAC5D,GACE,CACP,IACO,CACX,CAAC;AACJ,CAAC"}
|
package/dist/dashboard.css
CHANGED
|
@@ -93,7 +93,6 @@
|
|
|
93
93
|
--color-purple-300: oklch(82.7% .119 306.383);
|
|
94
94
|
--color-purple-400: oklch(71.4% .203 305.504);
|
|
95
95
|
--color-purple-500: oklch(62.7% .265 303.9);
|
|
96
|
-
--color-purple-950: oklch(29.1% .149 302.717);
|
|
97
96
|
--color-black: #000;
|
|
98
97
|
--color-white: #fff;
|
|
99
98
|
--spacing: .25rem;
|
|
@@ -402,10 +401,6 @@
|
|
|
402
401
|
margin-inline: auto;
|
|
403
402
|
}
|
|
404
403
|
|
|
405
|
-
.polishd-root.polishd-root .my-1 {
|
|
406
|
-
margin-block: var(--spacing);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
404
|
.polishd-root.polishd-root .mt-0\.5 {
|
|
410
405
|
margin-top: calc(var(--spacing) * .5);
|
|
411
406
|
}
|
|
@@ -662,6 +657,10 @@
|
|
|
662
657
|
height: 1px;
|
|
663
658
|
}
|
|
664
659
|
|
|
660
|
+
.polishd-root.polishd-root .max-h-96 {
|
|
661
|
+
max-height: calc(var(--spacing) * 96);
|
|
662
|
+
}
|
|
663
|
+
|
|
665
664
|
.polishd-root.polishd-root .max-h-\[80vh\] {
|
|
666
665
|
max-height: 80vh;
|
|
667
666
|
}
|
|
@@ -995,12 +994,8 @@
|
|
|
995
994
|
resize: vertical;
|
|
996
995
|
}
|
|
997
996
|
|
|
998
|
-
.polishd-root.polishd-root .list-
|
|
999
|
-
list-style-type:
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
.polishd-root.polishd-root .list-disc {
|
|
1003
|
-
list-style-type: disc;
|
|
997
|
+
.polishd-root.polishd-root .list-none {
|
|
998
|
+
list-style-type: none;
|
|
1004
999
|
}
|
|
1005
1000
|
|
|
1006
1001
|
.polishd-root.polishd-root .grid-cols-1 {
|
|
@@ -1099,12 +1094,6 @@
|
|
|
1099
1094
|
gap: 1px;
|
|
1100
1095
|
}
|
|
1101
1096
|
|
|
1102
|
-
.polishd-root.polishd-root :where(.space-y-1 > :not(:last-child)) {
|
|
1103
|
-
--tw-space-y-reverse: 0;
|
|
1104
|
-
margin-block-start: calc(var(--spacing) * var(--tw-space-y-reverse));
|
|
1105
|
-
margin-block-end: calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)));
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
1097
|
.polishd-root.polishd-root :where(.space-y-1\.5 > :not(:last-child)) {
|
|
1109
1098
|
--tw-space-y-reverse: 0;
|
|
1110
1099
|
margin-block-start: calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));
|
|
@@ -1272,11 +1261,6 @@
|
|
|
1272
1261
|
border-left-width: 1px;
|
|
1273
1262
|
}
|
|
1274
1263
|
|
|
1275
|
-
.polishd-root.polishd-root .border-l-2 {
|
|
1276
|
-
border-left-style: var(--tw-border-style);
|
|
1277
|
-
border-left-width: 2px;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
1264
|
.polishd-root.polishd-root .border-dashed {
|
|
1281
1265
|
--tw-border-style: dashed;
|
|
1282
1266
|
border-style: dashed;
|
|
@@ -1290,10 +1274,6 @@
|
|
|
1290
1274
|
border-color: oklab(34.6182% -.0177443 -.0713795 / .6);
|
|
1291
1275
|
}
|
|
1292
1276
|
|
|
1293
|
-
.polishd-root.polishd-root .border-\[\#1f1f1f\] {
|
|
1294
|
-
border-color: #1f1f1f;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
1277
|
.polishd-root.polishd-root .border-\[\#2e2e2e\] {
|
|
1298
1278
|
border-color: #2e2e2e;
|
|
1299
1279
|
}
|
|
@@ -1580,10 +1560,6 @@
|
|
|
1580
1560
|
background-color: var(--color-purple-500);
|
|
1581
1561
|
}
|
|
1582
1562
|
|
|
1583
|
-
.polishd-root.polishd-root .bg-purple-950 {
|
|
1584
|
-
background-color: var(--color-purple-950);
|
|
1585
|
-
}
|
|
1586
|
-
|
|
1587
1563
|
.polishd-root.polishd-root .bg-red-500 {
|
|
1588
1564
|
background-color: var(--color-red-500);
|
|
1589
1565
|
}
|
|
@@ -1764,10 +1740,6 @@
|
|
|
1764
1740
|
padding-block: 1px;
|
|
1765
1741
|
}
|
|
1766
1742
|
|
|
1767
|
-
.polishd-root.polishd-root .pt-1 {
|
|
1768
|
-
padding-top: var(--spacing);
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
1743
|
.polishd-root.polishd-root .pt-3 {
|
|
1772
1744
|
padding-top: calc(var(--spacing) * 3);
|
|
1773
1745
|
}
|
|
@@ -1848,10 +1820,6 @@
|
|
|
1848
1820
|
padding-left: calc(var(--spacing) * 1.5);
|
|
1849
1821
|
}
|
|
1850
1822
|
|
|
1851
|
-
.polishd-root.polishd-root .pl-3 {
|
|
1852
|
-
padding-left: calc(var(--spacing) * 3);
|
|
1853
|
-
}
|
|
1854
|
-
|
|
1855
1823
|
.polishd-root.polishd-root .pl-4 {
|
|
1856
1824
|
padding-left: calc(var(--spacing) * 4);
|
|
1857
1825
|
}
|
|
@@ -1892,10 +1860,6 @@
|
|
|
1892
1860
|
font-family: var(--font-sans);
|
|
1893
1861
|
}
|
|
1894
1862
|
|
|
1895
|
-
.polishd-root.polishd-root .text-\[0\.92em\] {
|
|
1896
|
-
font-size: .92em;
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
1863
|
.polishd-root.polishd-root .text-\[8px\] {
|
|
1900
1864
|
font-size: 8px;
|
|
1901
1865
|
}
|
|
@@ -2196,10 +2160,6 @@
|
|
|
2196
2160
|
color: #8a6a6a;
|
|
2197
2161
|
}
|
|
2198
2162
|
|
|
2199
|
-
.polishd-root.polishd-root .text-\[\#8ab4f8\] {
|
|
2200
|
-
color: #8ab4f8;
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
2163
|
.polishd-root.polishd-root .text-\[\#444\] {
|
|
2204
2164
|
color: #444;
|
|
2205
2165
|
}
|
|
@@ -2482,6 +2442,14 @@
|
|
|
2482
2442
|
transition-timing-function: var(--ease-out);
|
|
2483
2443
|
}
|
|
2484
2444
|
|
|
2445
|
+
.polishd-root.polishd-root .group-open\:hidden:is(:where(.group):is([open], :popover-open, :open) *) {
|
|
2446
|
+
display: none;
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
.polishd-root.polishd-root .group-open\:inline:is(:where(.group):is([open], :popover-open, :open) *) {
|
|
2450
|
+
display: inline;
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2485
2453
|
@media (hover: hover) {
|
|
2486
2454
|
.polishd-root.polishd-root .group-hover\:scale-100:is(:where(.group):hover *) {
|
|
2487
2455
|
--tw-scale-x: 100%;
|
|
@@ -2519,22 +2487,6 @@
|
|
|
2519
2487
|
opacity: 1;
|
|
2520
2488
|
}
|
|
2521
2489
|
|
|
2522
|
-
.polishd-root.polishd-root .marker\:text-\[\#555\] ::marker {
|
|
2523
|
-
color: #555;
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
.polishd-root.polishd-root .marker\:text-\[\#555\]::marker {
|
|
2527
|
-
color: #555;
|
|
2528
|
-
}
|
|
2529
|
-
|
|
2530
|
-
.polishd-root.polishd-root .marker\:text-\[\#555\] ::-webkit-details-marker {
|
|
2531
|
-
color: #555;
|
|
2532
|
-
}
|
|
2533
|
-
|
|
2534
|
-
.polishd-root.polishd-root .marker\:text-\[\#555\]::-webkit-details-marker {
|
|
2535
|
-
color: #555;
|
|
2536
|
-
}
|
|
2537
|
-
|
|
2538
2490
|
.polishd-root.polishd-root .placeholder\:text-\[\#555\]::placeholder {
|
|
2539
2491
|
color: #555;
|
|
2540
2492
|
}
|
|
@@ -2605,10 +2557,6 @@
|
|
|
2605
2557
|
color: var(--color-white);
|
|
2606
2558
|
}
|
|
2607
2559
|
|
|
2608
|
-
.polishd-root.polishd-root .hover\:underline:hover {
|
|
2609
|
-
text-decoration-line: underline;
|
|
2610
|
-
}
|
|
2611
|
-
|
|
2612
2560
|
.polishd-root.polishd-root .hover\:opacity-90:hover {
|
|
2613
2561
|
opacity: .9;
|
|
2614
2562
|
}
|
|
@@ -2716,10 +2664,6 @@
|
|
|
2716
2664
|
max-width: var(--container-md);
|
|
2717
2665
|
}
|
|
2718
2666
|
|
|
2719
|
-
.polishd-root.polishd-root .sm\:max-w-xl {
|
|
2720
|
-
max-width: var(--container-xl);
|
|
2721
|
-
}
|
|
2722
|
-
|
|
2723
2667
|
.polishd-root.polishd-root .sm\:grid-cols-2 {
|
|
2724
2668
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
2725
2669
|
}
|
|
@@ -2904,6 +2848,10 @@
|
|
|
2904
2848
|
}
|
|
2905
2849
|
}
|
|
2906
2850
|
|
|
2851
|
+
.polishd-root.polishd-root .\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker {
|
|
2852
|
+
display: none;
|
|
2853
|
+
}
|
|
2854
|
+
|
|
2907
2855
|
@property --tw-translate-x {
|
|
2908
2856
|
syntax: "*";
|
|
2909
2857
|
inherits: false;
|
|
@@ -49,7 +49,7 @@ export declare function listSnapshots(): Promise<PolishdSnapshot[]>;
|
|
|
49
49
|
* are only ever fetched from the URL the index recorded at capture time.
|
|
50
50
|
*/
|
|
51
51
|
export declare function readSnapshotImage(snapshotId: string, file: string): Promise<string | null>;
|
|
52
|
-
export interface
|
|
52
|
+
export interface BeginSnapshotInput {
|
|
53
53
|
/** The site to shoot, scheme included. */
|
|
54
54
|
origin: string;
|
|
55
55
|
/** Paths to shoot — discovery is skipped, these are shot exactly. */
|
|
@@ -57,6 +57,21 @@ export interface CaptureSnapshotInput {
|
|
|
57
57
|
/** Design-metrics fingerprint at capture time, for later pairing. */
|
|
58
58
|
fingerprint: string | null;
|
|
59
59
|
}
|
|
60
|
+
export type BeginSnapshotResult = {
|
|
61
|
+
ok: true;
|
|
62
|
+
id: string;
|
|
63
|
+
routes: string[];
|
|
64
|
+
} | {
|
|
65
|
+
ok: false;
|
|
66
|
+
message: string;
|
|
67
|
+
};
|
|
68
|
+
export type CaptureRouteResult = {
|
|
69
|
+
ok: true;
|
|
70
|
+
shots: PolishdSnapshotShot[];
|
|
71
|
+
} | {
|
|
72
|
+
ok: false;
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
60
75
|
export type CaptureSnapshotResult = {
|
|
61
76
|
ok: true;
|
|
62
77
|
snapshot: PolishdSnapshot;
|
|
@@ -64,6 +79,27 @@ export type CaptureSnapshotResult = {
|
|
|
64
79
|
ok: false;
|
|
65
80
|
message: string;
|
|
66
81
|
};
|
|
82
|
+
/**
|
|
83
|
+
* Start a capture: run the environment preflight, sweep any unfinished
|
|
84
|
+
* predecessor's images, and park the plan in the store. The returned routes
|
|
85
|
+
* are what the caller should then feed to `captureSnapshotRoute`, one call
|
|
86
|
+
* each, before `finishSnapshot` records the run.
|
|
87
|
+
*/
|
|
88
|
+
export declare function beginSnapshot(input: BeginSnapshotInput): Promise<BeginSnapshotResult>;
|
|
89
|
+
/**
|
|
90
|
+
* Shoot one route of the capture `beginSnapshot` started — both devices, both
|
|
91
|
+
* themes — store its images, and append the results to the pending record.
|
|
92
|
+
* Bounded work per call by design: this is the request that has to fit inside
|
|
93
|
+
* a serverless host's function time limit.
|
|
94
|
+
*/
|
|
95
|
+
export declare function captureSnapshotRoute(id: string, route: string): Promise<CaptureRouteResult>;
|
|
96
|
+
/**
|
|
97
|
+
* Close out the capture: record the accumulated shots in the snapshot index
|
|
98
|
+
* and prune old snapshots past `MAX_SNAPSHOTS`, images included. Called once
|
|
99
|
+
* every route has been attempted — routes whose calls failed outright are
|
|
100
|
+
* simply absent from the snapshot.
|
|
101
|
+
*/
|
|
102
|
+
export declare function finishSnapshot(id: string): Promise<CaptureSnapshotResult>;
|
|
67
103
|
/**
|
|
68
104
|
* A problem that will make the next capture fail, detectable from the
|
|
69
105
|
* environment alone — or null when none is. Covers the two setup gaps a
|
|
@@ -75,9 +111,4 @@ export type CaptureSnapshotResult = {
|
|
|
75
111
|
* the dashboard.
|
|
76
112
|
*/
|
|
77
113
|
export declare function snapshotCaptureIssue(): Promise<string | null>;
|
|
78
|
-
/**
|
|
79
|
-
* Shoot the given routes and record the run in the snapshot index. Old
|
|
80
|
-
* snapshots past `MAX_SNAPSHOTS` are pruned, images included.
|
|
81
|
-
*/
|
|
82
|
-
export declare function captureSnapshot(input: CaptureSnapshotInput): Promise<CaptureSnapshotResult>;
|
|
83
114
|
//# sourceMappingURL=snapshots.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapshots.d.ts","sourceRoot":"","sources":["../../src/server/snapshots.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"snapshots.d.ts","sourceRoot":"","sources":["../../src/server/snapshots.ts"],"names":[],"mappings":"AAsCA,2EAA2E;A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