@design-parity/report-html 0.1.2 → 0.1.4
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 +19 -6
- package/dist/index-page.d.ts +14 -0
- package/dist/index-page.d.ts.map +1 -1
- package/dist/index-page.js +68 -14
- package/dist/index-page.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -51,14 +51,27 @@ machine-named directories. Given the run's components it returns
|
|
|
51
51
|
`{ readme, html }`:
|
|
52
52
|
|
|
53
53
|
- `README.md` — what GitHub renders when you open the branch: a "generated, do
|
|
54
|
-
not edit" banner, the source commit,
|
|
55
|
-
its report.
|
|
56
|
-
- `index.html` — a self-contained landing page for GitHub Pages / local view
|
|
54
|
+
not edit" banner, the source commit, an "open the board" link, and a table
|
|
55
|
+
linking each component to its report.
|
|
56
|
+
- `index.html` — a self-contained landing page for GitHub Pages / local view,
|
|
57
|
+
with a small **preview thumbnail of the real candidate render** (reality, not
|
|
58
|
+
the mock) next to each component, inlined as a `data:` URI.
|
|
57
59
|
|
|
58
60
|
Because GitHub serves a linked `.html` blob as source (the slider JS won't run),
|
|
59
|
-
pass the published `repoSlug` + `branch` to wrap
|
|
60
|
-
through `htmlpreview.github.io` so they
|
|
61
|
-
|
|
61
|
+
pass the published `repoSlug` + `branch` to wrap every report link — and the
|
|
62
|
+
"open the board" link to `index.html` — through `htmlpreview.github.io` so they
|
|
63
|
+
render on click without GitHub Pages; without them the links are relative (right
|
|
64
|
+
for Pages / local view). Per-entry thumbnails come from the caller as `data:`
|
|
65
|
+
URIs (`orchestrate` inlines the candidate's first render), keeping this package a
|
|
66
|
+
leaf with no disk reads. Deterministic, same as `renderHtmlReport`.
|
|
67
|
+
|
|
68
|
+
When `repoSlug` + `branch` are set, each entry also gets a **History** link to
|
|
69
|
+
GitHub's commit history for that screen's `report.html`. Since `report.html` is
|
|
70
|
+
regenerated whenever a screen's code or mock changes, its commit log is that
|
|
71
|
+
screen's change timeline. design-parity's `publishBaseline` re-parents each run
|
|
72
|
+
on the branch tip (a linear commit chain, no force), so this works out of the
|
|
73
|
+
box; a force-pushing publisher would flatten the branch to one commit and the
|
|
74
|
+
link would show only the latest run.
|
|
62
75
|
|
|
63
76
|
## CLI
|
|
64
77
|
|
package/dist/index-page.d.ts
CHANGED
|
@@ -29,6 +29,12 @@ export interface IndexEntry {
|
|
|
29
29
|
status: IndexStatus;
|
|
30
30
|
/** Path to the component's `report.html`, relative to the branch root. */
|
|
31
31
|
reportPath?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The real candidate render (reality, not the mock) as a `data:` URI, shown as
|
|
34
|
+
* a small preview on the landing page. Inlined so `index.html` stays
|
|
35
|
+
* self-contained. Omitted when there's no candidate (e.g. a skipped component).
|
|
36
|
+
*/
|
|
37
|
+
thumbnail?: string;
|
|
32
38
|
}
|
|
33
39
|
export interface IndexInput {
|
|
34
40
|
/** Page title (default `Design parity`). */
|
|
@@ -47,6 +53,14 @@ export interface IndexInput {
|
|
|
47
53
|
/** One row per component, in display order. */
|
|
48
54
|
entries: IndexEntry[];
|
|
49
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* A compact display label for a component handle. Component ids are often a full
|
|
58
|
+
* source path (`…/ui/DeviceBodyPreviews.kt#DeviceBodyPreview`) which overflows the
|
|
59
|
+
* landing-page table on narrow screens, so show just the file basename and member
|
|
60
|
+
* (`DeviceBodyPreviews.kt#DeviceBodyPreview`). The full handle stays available —
|
|
61
|
+
* as the row's `title` tooltip in `index.html` and on each report's own heading.
|
|
62
|
+
*/
|
|
63
|
+
export declare function shortCode(code: string): string;
|
|
50
64
|
/** Render the branch's `README.md`. */
|
|
51
65
|
export declare function renderReadme(input: IndexInput): string;
|
|
52
66
|
/** Render the branch's self-contained `index.html` landing page. */
|
package/dist/index-page.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-page.d.ts","sourceRoot":"","sources":["../src/index-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD,gFAAgF;AAChF,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,MAAM,EAAE,WAAW,CAAC;IACpB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index-page.d.ts","sourceRoot":"","sources":["../src/index-page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD,gFAAgF;AAChF,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,MAAM,EAAE,WAAW,CAAC;IACpB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAsBD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM9C;AAkCD,uCAAuC;AACvC,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAoDtD;AA0CD,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAoCzD;AAED,2DAA2D;AAC3D,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAE/E"}
|
package/dist/index-page.js
CHANGED
|
@@ -16,17 +16,48 @@ const STATUS_EMOJI = {
|
|
|
16
16
|
function short(sha) {
|
|
17
17
|
return /^[0-9a-f]{7,40}$/i.test(sha) ? sha.slice(0, 7) : sha;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* A compact display label for a component handle. Component ids are often a full
|
|
21
|
+
* source path (`…/ui/DeviceBodyPreviews.kt#DeviceBodyPreview`) which overflows the
|
|
22
|
+
* landing-page table on narrow screens, so show just the file basename and member
|
|
23
|
+
* (`DeviceBodyPreviews.kt#DeviceBodyPreview`). The full handle stays available —
|
|
24
|
+
* as the row's `title` tooltip in `index.html` and on each report's own heading.
|
|
25
|
+
*/
|
|
26
|
+
export function shortCode(code) {
|
|
27
|
+
const hash = code.indexOf("#");
|
|
28
|
+
const path = hash >= 0 ? code.slice(0, hash) : code;
|
|
29
|
+
const member = hash >= 0 ? code.slice(hash) : "";
|
|
30
|
+
const base = path.slice(path.lastIndexOf("/") + 1);
|
|
31
|
+
return `${base}${member}`;
|
|
32
|
+
}
|
|
19
33
|
/** Escape a cell for a GitHub-flavored markdown table. */
|
|
20
34
|
function mdCell(value) {
|
|
21
35
|
return value.replace(/\\/g, "\\\\").replace(/\|/g, "\\|");
|
|
22
36
|
}
|
|
23
|
-
/**
|
|
24
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Link target for a branch-relative `.html` path. GitHub serves a linked `.html`
|
|
39
|
+
* blob as source, so when the published repo + branch are known the link is
|
|
40
|
+
* wrapped through htmlpreview.github.io to render on click (works without Pages);
|
|
41
|
+
* otherwise it stays relative (right for Pages / local view).
|
|
42
|
+
*/
|
|
43
|
+
function previewHref(path, input) {
|
|
25
44
|
if (input.repoSlug && input.branch) {
|
|
26
|
-
const blob = `https://github.com/${input.repoSlug}/blob/${input.branch}/${
|
|
45
|
+
const blob = `https://github.com/${input.repoSlug}/blob/${input.branch}/${path}`;
|
|
27
46
|
return `https://htmlpreview.github.io/?${blob}`;
|
|
28
47
|
}
|
|
29
|
-
return `./${
|
|
48
|
+
return `./${path}`;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* GitHub commit-history URL for a branch-relative path, or `undefined` when the
|
|
52
|
+
* repo isn't known. Since `report.html` is regenerated whenever a screen's code
|
|
53
|
+
* or mock changes, its history is that screen's change timeline — provided the
|
|
54
|
+
* publish step commits each run rather than force-updating the branch.
|
|
55
|
+
*/
|
|
56
|
+
function historyHref(path, input) {
|
|
57
|
+
if (input.repoSlug && input.branch) {
|
|
58
|
+
return `https://github.com/${input.repoSlug}/commits/${input.branch}/${path}`;
|
|
59
|
+
}
|
|
60
|
+
return undefined;
|
|
30
61
|
}
|
|
31
62
|
/** Render the branch's `README.md`. */
|
|
32
63
|
export function renderReadme(input) {
|
|
@@ -36,16 +67,28 @@ export function renderReadme(input) {
|
|
|
36
67
|
? ` Rendered from \`${short(input.sourceCommit)}\` — see [\`SOURCE_COMMIT\`](./SOURCE_COMMIT).`
|
|
37
68
|
: " Rendered from the commit in [`SOURCE_COMMIT`](./SOURCE_COMMIT).";
|
|
38
69
|
lines.push(`> **Generated by [design-parity](https://github.com/yschimke/design-parity) — do not edit by hand.**`, `> This branch is rebuilt on every run.${commit}`, "");
|
|
70
|
+
// A one-click previewable entry to the whole board (renders the rendered
|
|
71
|
+
// `index.html` with thumbnails), only useful once it resolves to htmlpreview.
|
|
72
|
+
if (input.repoSlug && input.branch) {
|
|
73
|
+
lines.push(`[**Open the board →**](${previewHref("index.html", input)}) — rendered previews of every screen.`, "");
|
|
74
|
+
}
|
|
39
75
|
if (input.bundleImage) {
|
|
40
76
|
lines.push(``, "");
|
|
41
77
|
}
|
|
42
|
-
|
|
78
|
+
const hasHistory = !!(input.repoSlug && input.branch);
|
|
79
|
+
lines.push(hasHistory ? "| Component | Status | Report | History |" : "| Component | Status | Report |", hasHistory ? "| --- | --- | --- | --- |" : "| --- | --- | --- |");
|
|
43
80
|
for (const e of input.entries) {
|
|
44
81
|
const status = `${STATUS_EMOJI[e.status]} ${STATUS_TEXT[e.status]}`;
|
|
45
82
|
const report = e.reportPath
|
|
46
|
-
? `[report](${
|
|
83
|
+
? `[report](${previewHref(e.reportPath, input)})`
|
|
84
|
+
: "—";
|
|
85
|
+
const history = e.reportPath && historyHref(e.reportPath, input)
|
|
86
|
+
? `[history](${historyHref(e.reportPath, input)})`
|
|
47
87
|
: "—";
|
|
48
|
-
|
|
88
|
+
const name = mdCell(shortCode(e.code));
|
|
89
|
+
lines.push(hasHistory
|
|
90
|
+
? `| ${name} | ${status} | ${report} | ${history} |`
|
|
91
|
+
: `| ${name} | ${status} | ${report} |`);
|
|
49
92
|
}
|
|
50
93
|
lines.push("");
|
|
51
94
|
lines.push("Each report is a self-contained HTML page — open one in a browser to view the", "reference / candidate / diff comparison. GitHub shows a linked `.html` as", "source; use the rendered links above, GitHub Pages, or download and open it.", "");
|
|
@@ -62,9 +105,11 @@ header.page h1{margin:0 0 6px;font-size:18px}
|
|
|
62
105
|
main{padding:20px 28px;max-width:900px}
|
|
63
106
|
.overview{max-width:100%;border:1px solid #26262f;border-radius:10px;margin-bottom:20px}
|
|
64
107
|
table{border-collapse:collapse;width:100%}
|
|
65
|
-
th,td{text-align:left;padding:8px 12px;border-bottom:1px solid #26262f;font-size:13px}
|
|
108
|
+
th,td{text-align:left;padding:8px 12px;border-bottom:1px solid #26262f;font-size:13px;vertical-align:top}
|
|
66
109
|
th{color:#9a9ab0;font-weight:600;text-transform:uppercase;letter-spacing:.04em;font-size:11px}
|
|
67
|
-
td.code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
|
|
110
|
+
td.code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;word-break:break-word}
|
|
111
|
+
.thumb{display:block;max-height:140px;max-width:200px;border:1px solid #26262f;border-radius:6px;background:#0c0c11;image-rendering:auto}
|
|
112
|
+
@media (max-width:560px){main{padding:16px}th,td{padding:6px 8px}.thumb{max-width:110px;max-height:90px}}
|
|
68
113
|
.status{display:inline-block;padding:2px 10px;border-radius:999px;font-weight:600;font-size:12px}
|
|
69
114
|
.status-pass{background:#16351f;color:#7ee29a}
|
|
70
115
|
.status-warn{background:#3a3115;color:#e8c66b}
|
|
@@ -72,12 +117,20 @@ td.code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
|
|
|
72
117
|
.status-skipped{background:#222230;color:#b8b8cc}
|
|
73
118
|
.status-error{background:#3a1820;color:#f08a9c}
|
|
74
119
|
.muted{color:#666}`;
|
|
75
|
-
function rowMarkup(e) {
|
|
120
|
+
function rowMarkup(e, input, hasHistory) {
|
|
76
121
|
const status = `<span class="status status-${e.status}">${STATUS_TEXT[e.status]}</span>`;
|
|
77
122
|
const report = e.reportPath
|
|
78
|
-
? `<a href="
|
|
123
|
+
? `<a href="${escapeHtml(previewHref(e.reportPath, input))}">report</a>`
|
|
79
124
|
: `<span class="muted">—</span>`;
|
|
80
|
-
|
|
125
|
+
const preview = e.thumbnail
|
|
126
|
+
? `<img class="thumb" src="${e.thumbnail}" alt="${escapeHtml(e.code)} candidate render" loading="lazy" />`
|
|
127
|
+
: `<span class="muted">—</span>`;
|
|
128
|
+
const href = e.reportPath ? historyHref(e.reportPath, input) : undefined;
|
|
129
|
+
const historyCell = hasHistory
|
|
130
|
+
? `<td>${href ? `<a href="${escapeHtml(href)}">history</a>` : `<span class="muted">—</span>`}</td>`
|
|
131
|
+
: "";
|
|
132
|
+
const code = `<td class="code" title="${escapeHtml(e.code)}">${escapeHtml(shortCode(e.code))}</td>`;
|
|
133
|
+
return `<tr><td>${preview}</td>${code}<td>${status}</td><td>${report}</td>${historyCell}</tr>`;
|
|
81
134
|
}
|
|
82
135
|
/** Render the branch's self-contained `index.html` landing page. */
|
|
83
136
|
export function renderIndexHtml(input) {
|
|
@@ -88,7 +141,8 @@ export function renderIndexHtml(input) {
|
|
|
88
141
|
const overview = input.bundleImage
|
|
89
142
|
? `<img class="overview" src="./${escapeHtml(input.bundleImage)}" alt="Candidate overview" />`
|
|
90
143
|
: "";
|
|
91
|
-
const
|
|
144
|
+
const hasHistory = !!(input.repoSlug && input.branch);
|
|
145
|
+
const rows = input.entries.map((e) => rowMarkup(e, input, hasHistory)).join("\n");
|
|
92
146
|
return `<!doctype html>
|
|
93
147
|
<html lang="en">
|
|
94
148
|
<head>
|
|
@@ -105,7 +159,7 @@ export function renderIndexHtml(input) {
|
|
|
105
159
|
<main>
|
|
106
160
|
${overview}
|
|
107
161
|
<table>
|
|
108
|
-
<thead><tr><th>Component</th><th>Status</th><th>Report</th
|
|
162
|
+
<thead><tr><th>Preview</th><th>Component</th><th>Status</th><th>Report</th>${hasHistory ? "<th>History</th>" : ""}</tr></thead>
|
|
109
163
|
<tbody>
|
|
110
164
|
${rows}
|
|
111
165
|
</tbody>
|
package/dist/index-page.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-page.js","sourceRoot":"","sources":["../src/index-page.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index-page.js","sourceRoot":"","sources":["../src/index-page.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAsCvC,MAAM,WAAW,GAAgC;IAC/C,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;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UAAU,eAAe,CAAC,KAAiB;IAC/C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,eAAe,CAAC;IAC7C,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY;QAC/B,CAAC,CAAC,uBAAuB,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,SAAS;QACvE,CAAC,CAAC,4BAA4B,CAAC;IACjC,MAAM,QAAQ,GAAG,KAAK,CAAC,WAAW;QAChC,CAAC,CAAC,gCAAgC,UAAU,CAAC,KAAK,CAAC,WAAW,CAAC,+BAA+B;QAC9F,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAElF,OAAO;;;;;SAKA,UAAU,CAAC,KAAK,CAAC;SACjB,KAAK;;;;QAIN,UAAU,CAAC,KAAK,CAAC;0BACC,MAAM;;;EAG9B,QAAQ;;6EAEmE,UAAU,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;;EAE/G,IAAI;;;;;;CAML,CAAC;AACF,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,WAAW,CAAC,KAAiB;IAC3C,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;AACvE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,6 @@ export { pairVariants } from "./variants.js";
|
|
|
14
14
|
export type { Variant } from "./variants.js";
|
|
15
15
|
export { groupFindings, tokenDelta, SECTIONS } from "./findings.js";
|
|
16
16
|
export type { FindingSection, GroupedSection, TokenDelta } from "./findings.js";
|
|
17
|
-
export { renderIndex, renderReadme, renderIndexHtml } from "./index-page.js";
|
|
17
|
+
export { renderIndex, renderReadme, renderIndexHtml, shortCode } from "./index-page.js";
|
|
18
18
|
export type { IndexEntry, IndexInput, IndexStatus } from "./index-page.js";
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxF,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
export { renderHtmlReport } from "./render.js";
|
|
12
12
|
export { pairVariants } from "./variants.js";
|
|
13
13
|
export { groupFindings, tokenDelta, SECTIONS } from "./findings.js";
|
|
14
|
-
export { renderIndex, renderReadme, renderIndexHtml } from "./index-page.js";
|
|
14
|
+
export { renderIndex, renderReadme, renderIndexHtml, shortCode } from "./index-page.js";
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@design-parity/report-html",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Self-contained HTML comparison page per parity run: reference | candidate | diff side by side with the verdict findings, inlined to one offline .html file (data-URI PNGs + inline CSS/JS, no external assets).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"test": "vitest run"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@design-parity/core": "^0.1.
|
|
23
|
+
"@design-parity/core": "^0.1.4"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|