@knpkv/rly 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -1
- package/dist/{Dialog-DwSIPb-B.js → Dialog-xSrBk0Vv.js} +21 -19
- package/dist/Dialog-xSrBk0Vv.js.map +1 -0
- package/dist/components.css +3 -2
- package/dist/diff/bounded/index.js +1054 -0
- package/dist/diff/bounded/index.js.map +1 -0
- package/dist/diff/index.js +1531 -1790
- package/dist/diff/index.js.map +1 -1
- package/dist/diff/workbench/index.js +5 -0
- package/dist/diff/workbench/index.js.map +1 -0
- package/dist/dts/diff/DiffCodeView.d.ts.map +1 -1
- package/dist/dts/diff/annotation.d.ts +13 -0
- package/dist/dts/diff/annotation.d.ts.map +1 -0
- package/dist/dts/diff/bounded/BoundedDiffCodeView.d.ts +21 -0
- package/dist/dts/diff/bounded/BoundedDiffCodeView.d.ts.map +1 -0
- package/dist/dts/diff/bounded/index.d.ts +3 -0
- package/dist/dts/diff/bounded/index.d.ts.map +1 -0
- package/dist/dts/diff/index.d.ts +2 -7
- package/dist/dts/diff/index.d.ts.map +1 -1
- package/dist/dts/diff/rendered-line.d.ts +8 -0
- package/dist/dts/diff/rendered-line.d.ts.map +1 -0
- package/dist/dts/diff/types.d.ts +22 -3
- package/dist/dts/diff/types.d.ts.map +1 -1
- package/dist/dts/diff/workbench/index.d.ts +7 -0
- package/dist/dts/diff/workbench/index.d.ts.map +1 -0
- package/dist/dts/primitives/Button.d.ts +1 -1
- package/dist/dts/primitives/Button.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/patterns/index.js +1 -1
- package/dist/{patterns-DEbg7R-A.js → patterns-5N-j-AD2.js} +2 -2
- package/dist/patterns-5N-j-AD2.js.map +1 -0
- package/dist/primitives/index.js +1 -1
- package/dist/workbench-tHBnbqSx.js +331 -0
- package/dist/workbench-tHBnbqSx.js.map +1 -0
- package/package.json +12 -3
- package/registry/components.json +12 -6
- package/registry/schema.json +1 -1
- package/registry/search.json +17 -3
- package/dist/Dialog-DwSIPb-B.js.map +0 -1
- package/dist/patterns-DEbg7R-A.js.map +0 -1
package/dist/primitives/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, x as y, y as b } from "../Dialog-
|
|
2
|
+
import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, o as f, p, r as m, s as h, t as g, u as _, v, x as y, y as b } from "../Dialog-xSrBk0Vv.js";
|
|
3
3
|
import { _ as x, a as S, b as C, c as w, d as T, f as E, g as D, h as O, i as k, l as A, m as j, n as M, o as N, p as P, r as F, s as I, t as L, u as R, v as z, x as B, y as V } from "../primitives-nKxQGSsE.js";
|
|
4
4
|
export { _ as Avatar, o as Button, g as Dialog, V as Divider, D as Field, P as IconButton, i as RLY_AVATAR_DEFAULT_VARIANTS, a as RLY_AVATAR_VARIANTS, e as RLY_BUTTON_DEFAULT_VARIANTS, v as RLY_BUTTON_VARIANTS, d as RLY_DIALOG_DEFAULT_VARIANTS, m as RLY_DIALOG_VARIANTS, C as RLY_DIVIDER_DEFAULT_VARIANTS, B as RLY_DIVIDER_VARIANTS, x as RLY_FIELD_DEFAULT_VARIANTS, z as RLY_FIELD_VARIANTS, j as RLY_ICON_BUTTON_DEFAULT_VARIANTS, O as RLY_ICON_BUTTON_VARIANTS, R as RLY_SELECT_DEFAULT_VARIANTS, T as RLY_SELECT_VARIANTS, b as RLY_SHEET_DEFAULT_VARIANTS, n as RLY_SHEET_VARIANTS, h as RLY_SKELETON_DEFAULT_VARIANTS, r as RLY_SKELETON_VARIANTS, p as RLY_STATE_LABEL_DEFAULT_VARIANTS, u as RLY_STATE_LABEL_VARIANTS, c as RLY_STATE_PANEL_DEFAULT_VARIANTS, t as RLY_STATE_PANEL_VARIANTS, I as RLY_SURFACE_DEFAULT_VARIANTS, w as RLY_SURFACE_VARIANTS, k as RLY_TABS_DEFAULT_VARIANTS, S as RLY_TABS_VARIANTS, L as RLY_TEXT_DEFAULT_VARIANTS, M as RLY_TEXT_VARIANTS, E as Select, y as Sheet, l as Skeleton, s as StateLabel, f as StatePanel, A as Surface, N as Tabs, F as Text };
|
|
5
5
|
|
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { i as e, n as t, t as n } from "./component-BJeeRuSu.js";
|
|
2
|
+
import { useId as r } from "react";
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
var o = {
|
|
5
|
+
root: "rly_DiffFileTree-module__root",
|
|
6
|
+
header: "rly_DiffFileTree-module__header",
|
|
7
|
+
eyebrow: "rly_DiffFileTree-module__eyebrow",
|
|
8
|
+
notice: "rly_DiffFileTree-module__notice",
|
|
9
|
+
empty: "rly_DiffFileTree-module__empty",
|
|
10
|
+
error: "rly_DiffFileTree-module__error",
|
|
11
|
+
change: "rly_DiffFileTree-module__change",
|
|
12
|
+
content: "rly_DiffFileTree-module__content",
|
|
13
|
+
previousPath: "rly_DiffFileTree-module__previousPath",
|
|
14
|
+
count: "rly_DiffFileTree-module__count",
|
|
15
|
+
list: "rly_DiffFileTree-module__list",
|
|
16
|
+
file: "rly_DiffFileTree-module__file",
|
|
17
|
+
index: "rly_DiffFileTree-module__index",
|
|
18
|
+
pathBlock: "rly_DiffFileTree-module__pathBlock",
|
|
19
|
+
path: "rly_DiffFileTree-module__path",
|
|
20
|
+
badges: "rly_DiffFileTree-module__badges"
|
|
21
|
+
}, s = {
|
|
22
|
+
root: "rly_DiffHeader-module__root",
|
|
23
|
+
thesis: "rly_DiffHeader-module__thesis",
|
|
24
|
+
eyebrow: "rly_DiffHeader-module__eyebrow",
|
|
25
|
+
progressCopy: "rly_DiffHeader-module__progressCopy",
|
|
26
|
+
progress: "rly_DiffHeader-module__progress",
|
|
27
|
+
controls: "rly_DiffHeader-module__controls",
|
|
28
|
+
group: "rly_DiffHeader-module__group",
|
|
29
|
+
standalone: "rly_DiffHeader-module__standalone"
|
|
30
|
+
}, c = {
|
|
31
|
+
root: "rly_DiffWorkbench-module__root",
|
|
32
|
+
header: "rly_DiffWorkbench-module__header",
|
|
33
|
+
inventory: "rly_DiffWorkbench-module__inventory",
|
|
34
|
+
viewer: "rly_DiffWorkbench-module__viewer",
|
|
35
|
+
findingItem: "rly_DiffWorkbench-module__findingItem",
|
|
36
|
+
body: "rly_DiffWorkbench-module__body",
|
|
37
|
+
review: "rly_DiffWorkbench-module__review",
|
|
38
|
+
findings: "rly_DiffWorkbench-module__findings",
|
|
39
|
+
scope: "rly_DiffWorkbench-module__scope",
|
|
40
|
+
findingsHeader: "rly_DiffWorkbench-module__findingsHeader",
|
|
41
|
+
scopeLabel: "rly_DiffWorkbench-module__scopeLabel",
|
|
42
|
+
scopeValue: "rly_DiffWorkbench-module__scopeValue",
|
|
43
|
+
notice: "rly_DiffWorkbench-module__notice",
|
|
44
|
+
empty: "rly_DiffWorkbench-module__empty",
|
|
45
|
+
showAll: "rly_DiffWorkbench-module__showAll",
|
|
46
|
+
findingList: "rly_DiffWorkbench-module__findingList"
|
|
47
|
+
}, l = (e) => t(o, e), u = (t) => t.state === "ready" ? "Ready" : t.state === "loading" ? e(t.label, "DiffFileTree loading label") : `${t.state}: ${e(t.reason, `DiffFileTree ${t.state} reason`)}`, d = (t) => {
|
|
48
|
+
let n = /* @__PURE__ */ new Set();
|
|
49
|
+
for (let r of t.files) {
|
|
50
|
+
let t = e(r.id, "DiffFileTree file id");
|
|
51
|
+
if (n.has(t)) throw Error(`DiffFileTree file ids must be unique: ${t}`);
|
|
52
|
+
n.add(t);
|
|
53
|
+
let i = e(r.path, `DiffFileTree path for ${t}`);
|
|
54
|
+
if (r.change === "renamed" && e(r.previousPath, `DiffFileTree previousPath for ${t}`) === i) throw Error(`DiffFileTree renamed paths must differ: ${t}`);
|
|
55
|
+
u(r.content);
|
|
56
|
+
}
|
|
57
|
+
if (t.state === "loading" || t.state === "error") {
|
|
58
|
+
if (!Number.isInteger(t.indexedCount) || !Number.isInteger(t.totalCount)) throw Error("DiffFileTree counts must be integers");
|
|
59
|
+
if (t.indexedCount !== t.files.length || t.totalCount < t.indexedCount) throw Error("DiffFileTree indexedCount must match visible files and cannot exceed totalCount");
|
|
60
|
+
t.state === "loading" && e(t.label, "DiffFileTree loading label"), t.state === "error" && (e(t.title, "DiffFileTree error title"), e(t.description, "DiffFileTree error description"));
|
|
61
|
+
}
|
|
62
|
+
}, f = ({ className: t, data: o, heading: s, onSelectedFileChange: c, selectedFileId: f, ...p }) => {
|
|
63
|
+
let m = e(s, "DiffFileTree heading");
|
|
64
|
+
if (d(o), f !== void 0 && !o.files.some((e) => e.id === f)) throw Error(`DiffFileTree selectedFileId is not in the visible inventory: ${f}`);
|
|
65
|
+
let h = `rly-diff-file-tree-${r()}`, g = o.state === "ready" ? o.files.length : o.indexedCount, _ = o.state === "ready" ? o.files.length : o.totalCount;
|
|
66
|
+
return /* @__PURE__ */ a("nav", {
|
|
67
|
+
...p,
|
|
68
|
+
"aria-busy": o.state === "loading" ? "true" : void 0,
|
|
69
|
+
"aria-labelledby": h,
|
|
70
|
+
className: n(l("root"), t),
|
|
71
|
+
"data-rly-diff-inventory-state": o.state,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ a("header", {
|
|
74
|
+
className: l("header"),
|
|
75
|
+
children: [/* @__PURE__ */ a("span", { children: [/* @__PURE__ */ i("span", {
|
|
76
|
+
className: l("eyebrow"),
|
|
77
|
+
children: "Changed files"
|
|
78
|
+
}), /* @__PURE__ */ i("h2", {
|
|
79
|
+
id: h,
|
|
80
|
+
children: m
|
|
81
|
+
})] }), /* @__PURE__ */ a("strong", {
|
|
82
|
+
"aria-label": `${g} of ${_} files indexed`,
|
|
83
|
+
className: l("count"),
|
|
84
|
+
children: [
|
|
85
|
+
g,
|
|
86
|
+
"/",
|
|
87
|
+
_
|
|
88
|
+
]
|
|
89
|
+
})]
|
|
90
|
+
}),
|
|
91
|
+
o.state === "loading" ? /* @__PURE__ */ i("p", {
|
|
92
|
+
className: l("notice"),
|
|
93
|
+
role: "status",
|
|
94
|
+
children: o.label
|
|
95
|
+
}) : null,
|
|
96
|
+
o.state === "error" ? /* @__PURE__ */ a("section", {
|
|
97
|
+
className: l("error"),
|
|
98
|
+
role: "alert",
|
|
99
|
+
children: [/* @__PURE__ */ i("strong", { children: o.title }), /* @__PURE__ */ i("span", { children: o.description })]
|
|
100
|
+
}) : null,
|
|
101
|
+
o.files.length === 0 ? /* @__PURE__ */ i("p", {
|
|
102
|
+
className: l("empty"),
|
|
103
|
+
children: "No changed files."
|
|
104
|
+
}) : /* @__PURE__ */ i("ol", {
|
|
105
|
+
className: l("list"),
|
|
106
|
+
children: o.files.map((e, t) => {
|
|
107
|
+
let n = f === e.id;
|
|
108
|
+
return /* @__PURE__ */ i("li", {
|
|
109
|
+
"data-rly-diff-file-id": e.id,
|
|
110
|
+
children: /* @__PURE__ */ a("button", {
|
|
111
|
+
"aria-current": n ? "true" : void 0,
|
|
112
|
+
"aria-label": `File ${t + 1} of ${_}: ${e.path}, ${e.change}, ${u(e.content)}`,
|
|
113
|
+
className: l("file"),
|
|
114
|
+
"data-rly-diff-content-state": e.content.state,
|
|
115
|
+
"data-rly-diff-file-change": e.change,
|
|
116
|
+
onClick: () => c(e.id),
|
|
117
|
+
type: "button",
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ i("span", {
|
|
120
|
+
"aria-hidden": "true",
|
|
121
|
+
className: l("index"),
|
|
122
|
+
children: t + 1
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ a("span", {
|
|
125
|
+
className: l("pathBlock"),
|
|
126
|
+
children: [e.change === "renamed" ? /* @__PURE__ */ i("span", {
|
|
127
|
+
className: l("previousPath"),
|
|
128
|
+
children: e.previousPath
|
|
129
|
+
}) : null, /* @__PURE__ */ i("code", {
|
|
130
|
+
className: l("path"),
|
|
131
|
+
children: e.path
|
|
132
|
+
})]
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ a("span", {
|
|
135
|
+
className: l("badges"),
|
|
136
|
+
children: [/* @__PURE__ */ i("span", {
|
|
137
|
+
className: l("change"),
|
|
138
|
+
children: e.change
|
|
139
|
+
}), /* @__PURE__ */ i("span", {
|
|
140
|
+
className: l("content"),
|
|
141
|
+
children: u(e.content)
|
|
142
|
+
})]
|
|
143
|
+
})
|
|
144
|
+
]
|
|
145
|
+
})
|
|
146
|
+
}, e.id);
|
|
147
|
+
})
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
});
|
|
151
|
+
}, p = (e) => t(s, e), m = [
|
|
152
|
+
"all",
|
|
153
|
+
"human",
|
|
154
|
+
"agent",
|
|
155
|
+
"unresolved"
|
|
156
|
+
], h = ["split", "stacked"], g = (e) => `${e.slice(0, 1).toUpperCase()}${e.slice(1)}`, _ = (e, t) => {
|
|
157
|
+
if (!Number.isInteger(e) || !Number.isInteger(t)) throw Error("DiffHeader counts must be integers");
|
|
158
|
+
if (e < 0 || t < 0 || e > t) throw Error("DiffHeader indexedCount must be between zero and totalCount");
|
|
159
|
+
}, v = ({ className: t, findingFilter: o, heading: s, indexedCount: c, isWrapped: l, layout: u, onFindingFilterChange: d, onLayoutChange: f, onWrapChange: v, selectedFileLabel: y, totalCount: b, ...x }) => {
|
|
160
|
+
let S = e(s, "DiffHeader heading");
|
|
161
|
+
y !== void 0 && e(y, "DiffHeader selectedFileLabel"), _(c, b);
|
|
162
|
+
let C = `rly-diff-header-progress-${r()}`;
|
|
163
|
+
return /* @__PURE__ */ a("header", {
|
|
164
|
+
...x,
|
|
165
|
+
className: n(p("root"), t),
|
|
166
|
+
"data-rly-diff-layout": u,
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ a("section", {
|
|
169
|
+
className: p("thesis"),
|
|
170
|
+
children: [
|
|
171
|
+
/* @__PURE__ */ i("span", {
|
|
172
|
+
className: p("eyebrow"),
|
|
173
|
+
children: "Complete diff"
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ i("h1", { children: S }),
|
|
176
|
+
/* @__PURE__ */ i("p", { children: y === void 0 ? "All changed files" : y })
|
|
177
|
+
]
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ a("section", {
|
|
180
|
+
"aria-labelledby": C,
|
|
181
|
+
className: p("progress"),
|
|
182
|
+
children: [/* @__PURE__ */ a("span", {
|
|
183
|
+
className: p("progressCopy"),
|
|
184
|
+
id: C,
|
|
185
|
+
children: [/* @__PURE__ */ i("strong", { children: c }), /* @__PURE__ */ a("span", { children: [
|
|
186
|
+
"of ",
|
|
187
|
+
b,
|
|
188
|
+
" files indexed"
|
|
189
|
+
] })]
|
|
190
|
+
}), /* @__PURE__ */ i("progress", {
|
|
191
|
+
max: Math.max(b, 1),
|
|
192
|
+
value: c
|
|
193
|
+
})]
|
|
194
|
+
}),
|
|
195
|
+
/* @__PURE__ */ a("div", {
|
|
196
|
+
className: p("controls"),
|
|
197
|
+
children: [
|
|
198
|
+
/* @__PURE__ */ i("div", {
|
|
199
|
+
"aria-label": "Diff layout",
|
|
200
|
+
className: p("group"),
|
|
201
|
+
role: "group",
|
|
202
|
+
children: h.map((e) => /* @__PURE__ */ i("button", {
|
|
203
|
+
"aria-pressed": u === e,
|
|
204
|
+
onClick: () => f(e),
|
|
205
|
+
type: "button",
|
|
206
|
+
children: g(e)
|
|
207
|
+
}, e))
|
|
208
|
+
}),
|
|
209
|
+
/* @__PURE__ */ i("button", {
|
|
210
|
+
"aria-pressed": l,
|
|
211
|
+
className: p("standalone"),
|
|
212
|
+
onClick: () => v(!l),
|
|
213
|
+
type: "button",
|
|
214
|
+
children: "Wrap lines"
|
|
215
|
+
}),
|
|
216
|
+
/* @__PURE__ */ i("div", {
|
|
217
|
+
"aria-label": "Finding filter",
|
|
218
|
+
className: p("group"),
|
|
219
|
+
role: "group",
|
|
220
|
+
children: m.map((e) => /* @__PURE__ */ i("button", {
|
|
221
|
+
"aria-pressed": o === e,
|
|
222
|
+
onClick: () => d(e),
|
|
223
|
+
type: "button",
|
|
224
|
+
children: g(e)
|
|
225
|
+
}, e))
|
|
226
|
+
})
|
|
227
|
+
]
|
|
228
|
+
})
|
|
229
|
+
]
|
|
230
|
+
});
|
|
231
|
+
}, y = (e) => t(c, e), b = (t) => {
|
|
232
|
+
let n = /* @__PURE__ */ new Set();
|
|
233
|
+
for (let r of t) {
|
|
234
|
+
let t = e(r.id, "DiffWorkbench finding id");
|
|
235
|
+
if (n.has(t)) throw Error(`DiffWorkbench finding ids must be unique: ${t}`);
|
|
236
|
+
n.add(t);
|
|
237
|
+
}
|
|
238
|
+
}, x = ({ className: t, emptyFindings: r = "No findings match this view.", findings: o, findingsLabel: s = "Semantic findings", header: c, inventory: l, inventoryLabel: u = "Changed files", label: d, onShowAllFiles: f, scope: p, statusNotice: m, viewer: h, viewerLabel: g = "Code changes", ..._ }) => {
|
|
239
|
+
let v = e(d, "DiffWorkbench label"), x = e(p.label, "DiffWorkbench scope label"), S = e(u, "DiffWorkbench inventoryLabel"), C = e(g, "DiffWorkbench viewerLabel"), w = e(s, "DiffWorkbench findingsLabel");
|
|
240
|
+
if (p.mode === "selected-file" && (e(p.fileId, "DiffWorkbench selected file id"), f === void 0)) throw Error("DiffWorkbench selected-file scope requires onShowAllFiles");
|
|
241
|
+
return b(o), /* @__PURE__ */ a("section", {
|
|
242
|
+
..._,
|
|
243
|
+
"aria-label": v,
|
|
244
|
+
className: n(y("root"), t),
|
|
245
|
+
"data-rly-diff-scope": p.mode,
|
|
246
|
+
...p.mode === "selected-file" ? { "data-rly-diff-selected-file": p.fileId } : {},
|
|
247
|
+
children: [/* @__PURE__ */ i("div", {
|
|
248
|
+
className: y("header"),
|
|
249
|
+
"data-rly-diff-workbench-slot": "header",
|
|
250
|
+
children: c
|
|
251
|
+
}), /* @__PURE__ */ a("div", {
|
|
252
|
+
className: y("body"),
|
|
253
|
+
children: [
|
|
254
|
+
/* @__PURE__ */ i("section", {
|
|
255
|
+
"aria-label": S,
|
|
256
|
+
className: y("inventory"),
|
|
257
|
+
"data-rly-diff-workbench-slot": "inventory",
|
|
258
|
+
children: l
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ a("div", {
|
|
261
|
+
className: y("review"),
|
|
262
|
+
children: [
|
|
263
|
+
/* @__PURE__ */ a("header", {
|
|
264
|
+
className: y("scope"),
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ i("span", {
|
|
267
|
+
className: y("scopeLabel"),
|
|
268
|
+
children: p.mode === "all-files" ? "All files" : "Selected file"
|
|
269
|
+
}),
|
|
270
|
+
/* @__PURE__ */ i("strong", {
|
|
271
|
+
className: y("scopeValue"),
|
|
272
|
+
children: x
|
|
273
|
+
}),
|
|
274
|
+
p.mode === "selected-file" ? /* @__PURE__ */ i("button", {
|
|
275
|
+
className: y("showAll"),
|
|
276
|
+
onClick: f,
|
|
277
|
+
type: "button",
|
|
278
|
+
children: "Show all files"
|
|
279
|
+
}) : null
|
|
280
|
+
]
|
|
281
|
+
}),
|
|
282
|
+
m === void 0 ? null : /* @__PURE__ */ i("div", {
|
|
283
|
+
"aria-live": "polite",
|
|
284
|
+
className: y("notice"),
|
|
285
|
+
"data-rly-diff-workbench-slot": "status",
|
|
286
|
+
role: "status",
|
|
287
|
+
children: m
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ i("section", {
|
|
290
|
+
"aria-label": C,
|
|
291
|
+
className: y("viewer"),
|
|
292
|
+
"data-rly-diff-workbench-slot": "viewer",
|
|
293
|
+
children: h
|
|
294
|
+
})
|
|
295
|
+
]
|
|
296
|
+
}),
|
|
297
|
+
/* @__PURE__ */ a("aside", {
|
|
298
|
+
"aria-label": w,
|
|
299
|
+
className: y("findings"),
|
|
300
|
+
"data-rly-diff-workbench-slot": "findings",
|
|
301
|
+
children: [/* @__PURE__ */ a("header", {
|
|
302
|
+
className: y("findingsHeader"),
|
|
303
|
+
children: [
|
|
304
|
+
/* @__PURE__ */ i("span", { children: "Review evidence" }),
|
|
305
|
+
/* @__PURE__ */ i("h2", { children: w }),
|
|
306
|
+
/* @__PURE__ */ i("strong", {
|
|
307
|
+
"aria-label": `${o.length} findings`,
|
|
308
|
+
children: o.length
|
|
309
|
+
})
|
|
310
|
+
]
|
|
311
|
+
}), o.length === 0 ? /* @__PURE__ */ i("div", {
|
|
312
|
+
className: y("empty"),
|
|
313
|
+
children: r
|
|
314
|
+
}) : /* @__PURE__ */ i("ol", {
|
|
315
|
+
"aria-label": `${w} list`,
|
|
316
|
+
className: y("findingList"),
|
|
317
|
+
tabIndex: 0,
|
|
318
|
+
children: o.map((e) => /* @__PURE__ */ i("li", {
|
|
319
|
+
className: y("findingItem"),
|
|
320
|
+
children: e.content
|
|
321
|
+
}, e.id))
|
|
322
|
+
})]
|
|
323
|
+
})
|
|
324
|
+
]
|
|
325
|
+
})]
|
|
326
|
+
});
|
|
327
|
+
};
|
|
328
|
+
//#endregion
|
|
329
|
+
export { v as n, f as r, x as t };
|
|
330
|
+
|
|
331
|
+
//# sourceMappingURL=workbench-tHBnbqSx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workbench-tHBnbqSx.js","names":[],"sources":["../src/diff/DiffFileTree.module.css","../src/diff/DiffHeader.module.css","../src/diff/DiffWorkbench.module.css","../src/diff/DiffFileTree.tsx","../src/diff/DiffHeader.tsx","../src/diff/DiffWorkbench.tsx"],"sourcesContent":["@layer rly.components {\n .root {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-group);\n container-type: inline-size;\n display: grid;\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n }\n\n .header {\n align-items: end;\n display: flex;\n gap: var(--rly-space-16);\n justify-content: space-between;\n padding: var(--rly-space-20);\n }\n\n .header > span {\n display: grid;\n gap: var(--rly-space-2);\n min-inline-size: var(--rly-space-0);\n }\n\n .header h2 {\n color: var(--rly-color-text-1);\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: anywhere;\n }\n\n .eyebrow,\n .notice,\n .empty,\n .error,\n .change,\n .content,\n .previousPath {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n\n .eyebrow,\n .change {\n text-transform: uppercase;\n }\n\n .count {\n color: var(--rly-color-text-1);\n font: var(--rly-type-page-title-weight) var(--rly-type-page-title-size) / 0.8 var(--rly-type-page-title-font);\n letter-spacing: var(--rly-type-page-title-tracking);\n white-space: nowrap;\n }\n\n .notice,\n .empty,\n .error {\n border-block-start: 1px solid var(--rly-color-border-1);\n margin: var(--rly-space-0);\n padding: var(--rly-space-12) var(--rly-space-20);\n }\n\n .error {\n border-inline-start: var(--rly-space-4) solid var(--rly-color-held-ink);\n display: grid;\n gap: var(--rly-space-2);\n }\n\n .error strong {\n color: var(--rly-color-text-1);\n }\n\n .list {\n border-block-start: 1px solid var(--rly-color-border-1);\n list-style: none;\n margin: var(--rly-space-0);\n max-block-size: 34rem;\n overflow: auto;\n padding: var(--rly-space-0);\n }\n\n .list li {\n contain: content;\n contain-intrinsic-block-size: 58px;\n }\n\n .file {\n align-items: center;\n background: transparent;\n border: 0;\n border-block-end: 1px solid var(--rly-color-border-1);\n color: inherit;\n cursor: pointer;\n display: grid;\n gap: var(--rly-space-12);\n grid-template-columns: 3ch minmax(var(--rly-space-0), 1fr) auto;\n inline-size: 100%;\n min-block-size: 58px;\n padding: calc(var(--rly-space-8) + var(--rly-space-2)) var(--rly-space-16);\n text-align: start;\n }\n\n .file:hover {\n background: var(--rly-color-surface-2);\n }\n\n .file[aria-current=\"true\"] {\n background: var(--rly-color-surface-3);\n box-shadow: inset var(--rly-space-4) 0 var(--rly-color-focus);\n }\n\n .file:focus-visible {\n outline: 3px solid var(--rly-color-focus);\n outline-offset: -3px;\n }\n\n .index {\n color: var(--rly-color-text-3);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n text-align: end;\n }\n\n .pathBlock {\n display: grid;\n min-inline-size: var(--rly-space-0);\n }\n\n .path,\n .previousPath {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .path {\n color: var(--rly-color-text-1);\n font: var(--rly-type-code-weight) var(--rly-type-code-size) / var(--rly-type-code-line-height)\n var(--rly-type-code-font);\n }\n\n .previousPath {\n text-decoration: line-through;\n }\n\n .badges {\n align-items: end;\n display: grid;\n justify-items: end;\n }\n\n .content {\n max-inline-size: 24ch;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n @container (max-width: 24rem) {\n .header {\n align-items: start;\n }\n\n .count {\n font-size: var(--rly-type-section-title-size);\n }\n\n .file {\n align-items: start;\n grid-template-columns: 3ch minmax(var(--rly-space-0), 1fr);\n }\n\n .badges {\n align-items: start;\n grid-column: 2;\n justify-items: start;\n }\n\n .content {\n max-inline-size: 100%;\n white-space: normal;\n }\n }\n}\n","@layer rly.components {\n .root {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-group);\n container-type: inline-size;\n display: grid;\n grid-template-columns: minmax(var(--rly-space-0), 1fr) auto;\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n }\n\n .thesis {\n display: grid;\n gap: var(--rly-space-4);\n padding: var(--rly-space-24);\n }\n\n .eyebrow,\n .thesis p,\n .progressCopy span {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n\n .eyebrow {\n text-transform: uppercase;\n }\n\n .thesis h1,\n .thesis p {\n margin: var(--rly-space-0);\n overflow-wrap: anywhere;\n }\n\n .thesis h1 {\n color: var(--rly-color-text-1);\n font: var(--rly-type-page-title-weight) var(--rly-type-page-title-size) / var(--rly-type-page-title-line-height)\n var(--rly-type-page-title-font);\n letter-spacing: var(--rly-type-page-title-tracking);\n }\n\n .progress {\n align-content: center;\n border-inline-start: 1px solid var(--rly-color-border-1);\n display: grid;\n gap: var(--rly-space-12);\n min-inline-size: 15rem;\n padding: var(--rly-space-24);\n }\n\n .progressCopy {\n align-items: end;\n display: flex;\n gap: var(--rly-space-8);\n }\n\n .progressCopy strong {\n color: var(--rly-color-text-1);\n font: var(--rly-type-verdict-weight) var(--rly-type-verdict-size) / 0.75 var(--rly-type-verdict-font);\n letter-spacing: var(--rly-type-verdict-tracking);\n }\n\n .progress progress {\n accent-color: var(--rly-color-focus);\n block-size: var(--rly-space-6);\n inline-size: 100%;\n }\n\n .controls {\n align-items: center;\n border-block-start: 1px solid var(--rly-color-border-1);\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-8);\n grid-column: 1 / -1;\n padding: var(--rly-space-12) var(--rly-space-16);\n }\n\n .group {\n display: inline-flex;\n }\n\n .group button,\n .standalone {\n background: transparent;\n border: 1px solid var(--rly-color-border-2);\n color: var(--rly-color-text-2);\n cursor: pointer;\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n min-block-size: 44px;\n padding: var(--rly-space-8) var(--rly-space-12);\n }\n\n .group button:first-child,\n .standalone {\n border-radius: var(--rly-radius-control) 0 0 var(--rly-radius-control);\n }\n\n .group button:last-child,\n .standalone {\n border-radius: 0 var(--rly-radius-control) var(--rly-radius-control) 0;\n }\n\n .group button + button {\n border-inline-start: 0;\n }\n\n .group button[aria-pressed=\"true\"],\n .standalone[aria-pressed=\"true\"] {\n background: var(--rly-color-surface-3);\n color: var(--rly-color-text-1);\n box-shadow: inset 0 -3px var(--rly-color-focus);\n }\n\n .group button:hover,\n .standalone:hover {\n background: var(--rly-color-surface-2);\n color: var(--rly-color-text-1);\n }\n\n .group button:focus-visible,\n .standalone:focus-visible {\n outline: 3px solid var(--rly-color-focus);\n outline-offset: var(--rly-space-2);\n position: relative;\n z-index: 1;\n }\n\n .standalone {\n border-radius: var(--rly-radius-control);\n }\n\n @container (max-width: 38rem) {\n .root {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .progress {\n border-block-start: 1px solid var(--rly-color-border-1);\n border-inline-start: 0;\n min-inline-size: var(--rly-space-0);\n padding-block-start: var(--rly-space-16);\n }\n\n .controls {\n align-items: stretch;\n display: grid;\n }\n\n .group {\n display: grid;\n grid-template-columns: repeat(2, minmax(var(--rly-space-0), 1fr));\n }\n\n .group button,\n .group button:first-child,\n .group button:last-child,\n .standalone {\n border: 1px solid var(--rly-color-border-2);\n border-radius: var(--rly-radius-control);\n }\n\n .thesis,\n .progress {\n padding-inline: var(--rly-space-16);\n }\n }\n}\n","@layer rly.components {\n .root {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-group);\n color: var(--rly-color-text-1);\n container-type: inline-size;\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n }\n\n .header {\n border-block-end: 1px solid var(--rly-color-border-1);\n min-inline-size: var(--rly-space-0);\n }\n\n .header > *,\n .inventory > *,\n .viewer > *,\n .findingItem > * {\n border: 0;\n border-radius: var(--rly-space-0);\n }\n\n .body {\n display: grid;\n grid-template-columns: minmax(14rem, 0.72fr) minmax(22rem, 2.1fr) minmax(17rem, 0.9fr);\n min-inline-size: var(--rly-space-0);\n }\n\n .inventory,\n .review,\n .viewer,\n .findings {\n min-inline-size: var(--rly-space-0);\n }\n\n .inventory,\n .review {\n border-inline-end: 1px solid var(--rly-color-border-1);\n }\n\n .review {\n display: grid;\n grid-template-rows: auto auto minmax(0, 1fr);\n }\n\n .scope,\n .findingsHeader {\n display: grid;\n gap: var(--rly-space-2);\n padding: var(--rly-space-16) var(--rly-space-20);\n }\n\n .scope {\n grid-template-columns: minmax(var(--rly-space-0), 1fr) auto;\n }\n\n .scopeLabel,\n .scopeValue {\n grid-column: 1;\n }\n\n .scope span,\n .findingsHeader > span,\n .notice,\n .empty {\n color: var(--rly-color-text-2);\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n\n .scope span,\n .findingsHeader > span {\n text-transform: uppercase;\n }\n\n .scopeValue {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n overflow-wrap: anywhere;\n }\n\n .showAll {\n align-self: center;\n background: var(--rly-color-surface-2);\n border: 1px solid var(--rly-color-border-2);\n border-radius: var(--rly-radius-control);\n color: var(--rly-color-text-1);\n cursor: pointer;\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n grid-column: 2;\n grid-row: 1 / 3;\n padding: var(--rly-space-8) var(--rly-space-12);\n }\n\n .showAll:hover {\n background: var(--rly-color-surface-3);\n }\n\n .showAll:focus-visible {\n outline: var(--rly-space-2) solid var(--rly-color-focus);\n outline-offset: var(--rly-space-2);\n }\n\n .notice {\n background: var(--rly-color-surface-2);\n border-block-start: 1px solid var(--rly-color-border-1);\n padding: calc(var(--rly-space-8) + var(--rly-space-2)) var(--rly-space-20);\n }\n\n .viewer {\n border-block-start: 1px solid var(--rly-color-border-1);\n overflow-x: auto;\n }\n\n .findings {\n align-content: start;\n display: grid;\n }\n\n .findingsHeader {\n grid-template-columns: minmax(var(--rly-space-0), 1fr) auto;\n }\n\n .findingsHeader > span {\n grid-column: 1 / -1;\n }\n\n .findingsHeader h2,\n .findingsHeader strong {\n margin: var(--rly-space-0);\n }\n\n .findingsHeader h2 {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n }\n\n .findingsHeader strong {\n align-self: center;\n font: var(--rly-type-section-title-weight) var(--rly-type-section-title-size) /\n var(--rly-type-section-title-line-height) var(--rly-type-section-title-font);\n }\n\n .findingList {\n border-block-start: 1px solid var(--rly-color-border-1);\n list-style: none;\n margin: var(--rly-space-0);\n max-block-size: 48rem;\n overflow-y: auto;\n padding: var(--rly-space-0);\n }\n\n .findingList:focus-visible {\n outline: 2px solid var(--rly-color-focus);\n outline-offset: -2px;\n }\n\n .findingItem + .findingItem {\n border-block-start: 1px solid var(--rly-color-border-1);\n }\n\n .empty {\n border-block-start: 1px solid var(--rly-color-border-1);\n margin: var(--rly-space-0);\n padding: var(--rly-space-24) var(--rly-space-20);\n }\n\n @container (max-width: 58rem) {\n .body {\n grid-template-columns: minmax(var(--rly-space-0), 1fr);\n }\n\n .inventory,\n .review {\n border-block-end: 1px solid var(--rly-color-border-1);\n border-inline-end: 0;\n }\n\n .findingList {\n max-block-size: none;\n }\n }\n\n @container (max-width: 24rem) {\n .scope,\n .findingsHeader {\n padding-inline: calc(var(--rly-space-12) + var(--rly-space-2));\n }\n\n .notice,\n .empty {\n padding-inline: calc(var(--rly-space-12) + var(--rly-space-2));\n }\n }\n\n @media (forced-colors: active) {\n .notice,\n .showAll {\n forced-color-adjust: auto;\n }\n }\n}\n","import { type ComponentPropsWithRef, type ReactElement, useId } from \"react\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport styles from \"./DiffFileTree.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** The provider change recorded for one path in the complete diff inventory. */\nexport type RlyDiffFileChange = \"added\" | \"modified\" | \"deleted\" | \"renamed\"\n\n/** Content readiness is independent from the file change, so exceptional files never disappear. */\nexport type RlyDiffFileContent =\n | { readonly state: \"ready\" }\n | { readonly label: string; readonly state: \"loading\" }\n | {\n readonly reason: string\n readonly state: \"binary\" | \"generated\" | \"oversized\" | \"unavailable\" | \"error\"\n }\n\ninterface RlyDiffFileBase {\n readonly content: RlyDiffFileContent\n readonly id: string\n readonly path: string\n}\n\n/** One indexed path. Renames always preserve both the previous and current path. */\nexport type RlyDiffFile =\n | (RlyDiffFileBase & { readonly change: \"renamed\"; readonly previousPath: string })\n | (RlyDiffFileBase & {\n readonly change: \"added\" | \"modified\" | \"deleted\"\n readonly previousPath?: never\n })\n\ninterface RlyIndexedInventory {\n readonly files: ReadonlyArray<RlyDiffFile>\n readonly indexedCount: number\n readonly totalCount: number\n}\n\n/** Complete or in-progress inventory state. Error states retain every path indexed so far. */\nexport type RlyDiffInventory =\n | { readonly files: ReadonlyArray<RlyDiffFile>; readonly state: \"ready\" }\n | (RlyIndexedInventory & { readonly label: string; readonly state: \"loading\" })\n | (RlyIndexedInventory & {\n readonly description: string\n readonly state: \"error\"\n readonly title: string\n })\n\n/** Props for a complete, application-controlled changed-file inventory. */\nexport type DiffFileTreeProps = Omit<ComponentPropsWithRef<\"nav\">, \"aria-label\" | \"children\"> & {\n readonly data: RlyDiffInventory\n readonly heading: string\n readonly onSelectedFileChange: (fileId: string) => void\n readonly selectedFileId?: string\n}\n\nconst contentLabel = (content: RlyDiffFileContent): string => {\n if (content.state === \"ready\") return \"Ready\"\n if (content.state === \"loading\") return requireText(content.label, \"DiffFileTree loading label\")\n return `${content.state}: ${requireText(content.reason, `DiffFileTree ${content.state} reason`)}`\n}\n\nconst validateInventory = (data: RlyDiffInventory): void => {\n const ids = new Set<string>()\n for (const file of data.files) {\n const id = requireText(file.id, \"DiffFileTree file id\")\n if (ids.has(id)) throw new Error(`DiffFileTree file ids must be unique: ${id}`)\n ids.add(id)\n const path = requireText(file.path, `DiffFileTree path for ${id}`)\n if (file.change === \"renamed\") {\n const previousPath = requireText(file.previousPath, `DiffFileTree previousPath for ${id}`)\n if (previousPath === path) throw new Error(`DiffFileTree renamed paths must differ: ${id}`)\n }\n contentLabel(file.content)\n }\n\n if (data.state === \"loading\" || data.state === \"error\") {\n if (!Number.isInteger(data.indexedCount) || !Number.isInteger(data.totalCount)) {\n throw new Error(\"DiffFileTree counts must be integers\")\n }\n if (data.indexedCount !== data.files.length || data.totalCount < data.indexedCount) {\n throw new Error(\"DiffFileTree indexedCount must match visible files and cannot exceed totalCount\")\n }\n if (data.state === \"loading\") requireText(data.label, \"DiffFileTree loading label\")\n if (data.state === \"error\") {\n requireText(data.title, \"DiffFileTree error title\")\n requireText(data.description, \"DiffFileTree error description\")\n }\n }\n}\n\n/** Render every indexed path as a lightweight row without instantiating file content renderers. */\nexport const DiffFileTree = ({\n className,\n data,\n heading,\n onSelectedFileChange,\n selectedFileId,\n ...props\n}: DiffFileTreeProps): ReactElement => {\n const visibleHeading = requireText(heading, \"DiffFileTree heading\")\n validateInventory(data)\n if (selectedFileId !== undefined && !data.files.some((file) => file.id === selectedFileId)) {\n throw new Error(`DiffFileTree selectedFileId is not in the visible inventory: ${selectedFileId}`)\n }\n const headingId = `rly-diff-file-tree-${useId()}`\n const indexedCount = data.state === \"ready\" ? data.files.length : data.indexedCount\n const totalCount = data.state === \"ready\" ? data.files.length : data.totalCount\n\n return (\n <nav\n {...props}\n aria-busy={data.state === \"loading\" ? \"true\" : undefined}\n aria-labelledby={headingId}\n className={classNames(style(\"root\"), className)}\n data-rly-diff-inventory-state={data.state}\n >\n <header className={style(\"header\")}>\n <span>\n <span className={style(\"eyebrow\")}>Changed files</span>\n <h2 id={headingId}>{visibleHeading}</h2>\n </span>\n <strong aria-label={`${indexedCount} of ${totalCount} files indexed`} className={style(\"count\")}>\n {indexedCount}/{totalCount}\n </strong>\n </header>\n\n {data.state === \"loading\" ? (\n <p className={style(\"notice\")} role=\"status\">\n {data.label}\n </p>\n ) : null}\n {data.state === \"error\" ? (\n <section className={style(\"error\")} role=\"alert\">\n <strong>{data.title}</strong>\n <span>{data.description}</span>\n </section>\n ) : null}\n\n {data.files.length === 0 ? (\n <p className={style(\"empty\")}>No changed files.</p>\n ) : (\n <ol className={style(\"list\")}>\n {data.files.map((file, index) => {\n const isSelected = selectedFileId === file.id\n return (\n <li data-rly-diff-file-id={file.id} key={file.id}>\n <button\n aria-current={isSelected ? \"true\" : undefined}\n aria-label={`File ${index + 1} of ${totalCount}: ${file.path}, ${file.change}, ${contentLabel(file.content)}`}\n className={style(\"file\")}\n data-rly-diff-content-state={file.content.state}\n data-rly-diff-file-change={file.change}\n onClick={() => onSelectedFileChange(file.id)}\n type=\"button\"\n >\n <span aria-hidden=\"true\" className={style(\"index\")}>\n {index + 1}\n </span>\n <span className={style(\"pathBlock\")}>\n {file.change === \"renamed\" ? (\n <span className={style(\"previousPath\")}>{file.previousPath}</span>\n ) : null}\n <code className={style(\"path\")}>{file.path}</code>\n </span>\n <span className={style(\"badges\")}>\n <span className={style(\"change\")}>{file.change}</span>\n <span className={style(\"content\")}>{contentLabel(file.content)}</span>\n </span>\n </button>\n </li>\n )\n })}\n </ol>\n )}\n </nav>\n )\n}\n","import { type ComponentPropsWithRef, type ReactElement, useId } from \"react\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport styles from \"./DiffHeader.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Controlled diff arrangement. */\nexport type RlyDiffLayout = \"split\" | \"stacked\"\n\n/** Controlled semantic finding filter. */\nexport type RlyDiffFindingFilter = \"all\" | \"human\" | \"agent\" | \"unresolved\"\n\n/** Props for the complete diff inventory thesis and its application-controlled view preferences. */\nexport type DiffHeaderProps = Omit<ComponentPropsWithRef<\"header\">, \"children\"> & {\n readonly findingFilter: RlyDiffFindingFilter\n readonly heading: string\n readonly indexedCount: number\n readonly isWrapped: boolean\n readonly layout: RlyDiffLayout\n readonly onFindingFilterChange: (filter: RlyDiffFindingFilter) => void\n readonly onLayoutChange: (layout: RlyDiffLayout) => void\n readonly onWrapChange: (isWrapped: boolean) => void\n readonly selectedFileLabel?: string\n readonly totalCount: number\n}\n\nconst findingFilters = [\"all\", \"human\", \"agent\", \"unresolved\"] satisfies ReadonlyArray<RlyDiffFindingFilter>\nconst layouts = [\"split\", \"stacked\"] satisfies ReadonlyArray<RlyDiffLayout>\n\nconst titleCase = (value: string): string => `${value.slice(0, 1).toUpperCase()}${value.slice(1)}`\n\nconst validateCounts = (indexedCount: number, totalCount: number): void => {\n if (!Number.isInteger(indexedCount) || !Number.isInteger(totalCount)) {\n throw new Error(\"DiffHeader counts must be integers\")\n }\n if (indexedCount < 0 || totalCount < 0 || indexedCount > totalCount) {\n throw new Error(\"DiffHeader indexedCount must be between zero and totalCount\")\n }\n}\n\n/** Render indexed progress and controlled preferences without fetching or rendering provider content. */\nexport const DiffHeader = ({\n className,\n findingFilter,\n heading,\n indexedCount,\n isWrapped,\n layout,\n onFindingFilterChange,\n onLayoutChange,\n onWrapChange,\n selectedFileLabel,\n totalCount,\n ...props\n}: DiffHeaderProps): ReactElement => {\n const visibleHeading = requireText(heading, \"DiffHeader heading\")\n if (selectedFileLabel !== undefined) requireText(selectedFileLabel, \"DiffHeader selectedFileLabel\")\n validateCounts(indexedCount, totalCount)\n const progressId = `rly-diff-header-progress-${useId()}`\n\n return (\n <header {...props} className={classNames(style(\"root\"), className)} data-rly-diff-layout={layout}>\n <section className={style(\"thesis\")}>\n <span className={style(\"eyebrow\")}>Complete diff</span>\n <h1>{visibleHeading}</h1>\n <p>{selectedFileLabel === undefined ? \"All changed files\" : selectedFileLabel}</p>\n </section>\n\n <section aria-labelledby={progressId} className={style(\"progress\")}>\n <span className={style(\"progressCopy\")} id={progressId}>\n <strong>{indexedCount}</strong>\n <span>of {totalCount} files indexed</span>\n </span>\n <progress max={Math.max(totalCount, 1)} value={indexedCount} />\n </section>\n\n <div className={style(\"controls\")}>\n <div aria-label=\"Diff layout\" className={style(\"group\")} role=\"group\">\n {layouts.map((option) => (\n <button aria-pressed={layout === option} key={option} onClick={() => onLayoutChange(option)} type=\"button\">\n {titleCase(option)}\n </button>\n ))}\n </div>\n <button\n aria-pressed={isWrapped}\n className={style(\"standalone\")}\n onClick={() => onWrapChange(!isWrapped)}\n type=\"button\"\n >\n Wrap lines\n </button>\n <div aria-label=\"Finding filter\" className={style(\"group\")} role=\"group\">\n {findingFilters.map((filter) => (\n <button\n aria-pressed={findingFilter === filter}\n key={filter}\n onClick={() => onFindingFilterChange(filter)}\n type=\"button\"\n >\n {titleCase(filter)}\n </button>\n ))}\n </div>\n </div>\n </header>\n )\n}\n","import type { ComponentPropsWithRef, ReactElement, ReactNode } from \"react\"\nimport { classNames, cssClass, requireText } from \"../internal/component.js\"\nimport styles from \"./DiffWorkbench.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** The application-controlled file scope shown by the workbench. */\nexport type RlyDiffWorkbenchScope =\n | { readonly label: string; readonly mode: \"all-files\" }\n | { readonly fileId: string; readonly label: string; readonly mode: \"selected-file\" }\n\n/** One stable semantic finding slot, independent from virtualized line annotations. */\nexport interface RlyDiffWorkbenchFinding {\n readonly content: ReactNode\n readonly id: string\n}\n\n/** Presentation-only slots for a complete diff review surface. */\nexport type DiffWorkbenchProps = Omit<ComponentPropsWithRef<\"section\">, \"aria-label\" | \"children\"> & {\n readonly emptyFindings?: ReactNode\n readonly findings: ReadonlyArray<RlyDiffWorkbenchFinding>\n readonly findingsLabel?: string\n readonly header: ReactNode\n readonly inventory: ReactNode\n readonly inventoryLabel?: string\n readonly label: string\n readonly onShowAllFiles?: () => void\n readonly scope: RlyDiffWorkbenchScope\n readonly statusNotice?: ReactNode\n readonly viewer: ReactNode\n readonly viewerLabel?: string\n}\n\nconst validateFindings = (findings: ReadonlyArray<RlyDiffWorkbenchFinding>): void => {\n const ids = new Set<string>()\n for (const finding of findings) {\n const id = requireText(finding.id, \"DiffWorkbench finding id\")\n if (ids.has(id)) throw new Error(`DiffWorkbench finding ids must be unique: ${id}`)\n ids.add(id)\n }\n}\n\n/** Compose complete inventory, renderer, and semantic evidence without owning application state. */\nexport const DiffWorkbench = ({\n className,\n emptyFindings = \"No findings match this view.\",\n findings,\n findingsLabel = \"Semantic findings\",\n header,\n inventory,\n inventoryLabel = \"Changed files\",\n label,\n onShowAllFiles,\n scope,\n statusNotice,\n viewer,\n viewerLabel = \"Code changes\",\n ...props\n}: DiffWorkbenchProps): ReactElement => {\n const visibleLabel = requireText(label, \"DiffWorkbench label\")\n const visibleScopeLabel = requireText(scope.label, \"DiffWorkbench scope label\")\n const visibleInventoryLabel = requireText(inventoryLabel, \"DiffWorkbench inventoryLabel\")\n const visibleViewerLabel = requireText(viewerLabel, \"DiffWorkbench viewerLabel\")\n const visibleFindingsLabel = requireText(findingsLabel, \"DiffWorkbench findingsLabel\")\n if (scope.mode === \"selected-file\") {\n requireText(scope.fileId, \"DiffWorkbench selected file id\")\n if (onShowAllFiles === undefined) {\n throw new Error(\"DiffWorkbench selected-file scope requires onShowAllFiles\")\n }\n }\n validateFindings(findings)\n\n return (\n <section\n {...props}\n aria-label={visibleLabel}\n className={classNames(style(\"root\"), className)}\n data-rly-diff-scope={scope.mode}\n {...(scope.mode === \"selected-file\" ? { \"data-rly-diff-selected-file\": scope.fileId } : {})}\n >\n <div className={style(\"header\")} data-rly-diff-workbench-slot=\"header\">\n {header}\n </div>\n\n <div className={style(\"body\")}>\n <section\n aria-label={visibleInventoryLabel}\n className={style(\"inventory\")}\n data-rly-diff-workbench-slot=\"inventory\"\n >\n {inventory}\n </section>\n\n <div className={style(\"review\")}>\n <header className={style(\"scope\")}>\n <span className={style(\"scopeLabel\")}>{scope.mode === \"all-files\" ? \"All files\" : \"Selected file\"}</span>\n <strong className={style(\"scopeValue\")}>{visibleScopeLabel}</strong>\n {scope.mode === \"selected-file\" ? (\n <button className={style(\"showAll\")} onClick={onShowAllFiles} type=\"button\">\n Show all files\n </button>\n ) : null}\n </header>\n {statusNotice === undefined ? null : (\n <div aria-live=\"polite\" className={style(\"notice\")} data-rly-diff-workbench-slot=\"status\" role=\"status\">\n {statusNotice}\n </div>\n )}\n <section aria-label={visibleViewerLabel} className={style(\"viewer\")} data-rly-diff-workbench-slot=\"viewer\">\n {viewer}\n </section>\n </div>\n\n <aside aria-label={visibleFindingsLabel} className={style(\"findings\")} data-rly-diff-workbench-slot=\"findings\">\n <header className={style(\"findingsHeader\")}>\n <span>Review evidence</span>\n <h2>{visibleFindingsLabel}</h2>\n <strong aria-label={`${findings.length} findings`}>{findings.length}</strong>\n </header>\n {findings.length === 0 ? (\n <div className={style(\"empty\")}>{emptyFindings}</div>\n ) : (\n <ol aria-label={`${visibleFindingsLabel} list`} className={style(\"findingList\")} tabIndex={0}>\n {findings.map((finding) => (\n <li className={style(\"findingItem\")} key={finding.id}>\n {finding.content}\n </li>\n ))}\n </ol>\n )}\n </aside>\n </div>\n </section>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GGIM,KAAS,MAAyB,EAAS,GAAQ,CAAI,GAoDvD,KAAgB,MAChB,EAAQ,UAAU,UAAgB,UAClC,EAAQ,UAAU,YAAkB,EAAY,EAAQ,OAAO,4BAA4B,IACxF,GAAG,EAAQ,MAAM,IAAI,EAAY,EAAQ,QAAQ,gBAAgB,EAAQ,MAAM,QAAQ,KAG1F,KAAqB,MAAiC;CAC1D,IAAM,oBAAM,IAAI,IAAY;CAC5B,KAAK,IAAM,KAAQ,EAAK,OAAO;EAC7B,IAAM,IAAK,EAAY,EAAK,IAAI,sBAAsB;EACtD,IAAI,EAAI,IAAI,CAAE,GAAG,MAAU,MAAM,yCAAyC,GAAI;EAC9E,EAAI,IAAI,CAAE;EACV,IAAM,IAAO,EAAY,EAAK,MAAM,yBAAyB,GAAI;EACjE,IAAI,EAAK,WAAW,aACG,EAAY,EAAK,cAAc,iCAAiC,GACjF,MAAiB,GAAM,MAAU,MAAM,2CAA2C,GAAI;EAE5F,EAAa,EAAK,OAAO;CAC3B;CAEA,IAAI,EAAK,UAAU,aAAa,EAAK,UAAU,SAAS;EACtD,IAAI,CAAC,OAAO,UAAU,EAAK,YAAY,KAAK,CAAC,OAAO,UAAU,EAAK,UAAU,GAC3E,MAAU,MAAM,sCAAsC;EAExD,IAAI,EAAK,iBAA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;KAAsB,WAAW,EAAM,UAAU;KAAG,gCAA6B;eAApG,CACE,kBAAC,UAAD;MAAQ,WAAW,EAAM,gBAAgB;gBAAzC;OACE,kBAAC,QAAD,EAAA,UAAM,kBAAqB,CAAA;OAC3B,kBAAC,MAAD,EAAA,UAAK,EAAyB,CAAA;OAC9B,kBAAC,UAAD;QAAQ,cAAY,GAAG,EAAS,OAAO;kBAAa,EAAS;OAAe,CAAA;MACtE;SACP,EAAS,WAAW,IACnB,kBAAC,OAAD;MAAK,WAAW,EAAM,OAAO;gBAAI;KAAmB,CAAA,IAEpD,kBAAC,MAAD;MAAI,cAAY,GAAG,EAAqB;MAAQ,WAAW,EAAM,aAAa;MAAG,UAAU;gBACxF,EAAS,KAAK,MACb,kBAAC,MAAD;OAAI,WAAW,EAAM,aAAa;iBAC/B,EAAQ;MACP,GAFsC,EAAQ,EAE9C,CACL;KACC,CAAA,CAED;;GACJ;IACE;;AAEb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knpkv/rly",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Release-oriented design system for human and agent collaboration",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "knpkv",
|
|
@@ -21,6 +21,14 @@
|
|
|
21
21
|
"types": "./dist/dts/diff/index.d.ts",
|
|
22
22
|
"import": "./dist/diff/index.js"
|
|
23
23
|
},
|
|
24
|
+
"./diff/bounded": {
|
|
25
|
+
"types": "./dist/dts/diff/bounded/index.d.ts",
|
|
26
|
+
"import": "./dist/diff/bounded/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./diff/workbench": {
|
|
29
|
+
"types": "./dist/dts/diff/workbench/index.d.ts",
|
|
30
|
+
"import": "./dist/diff/workbench/index.js"
|
|
31
|
+
},
|
|
24
32
|
"./foundations": {
|
|
25
33
|
"types": "./dist/dts/foundations/index.d.ts",
|
|
26
34
|
"import": "./dist/foundations/index.js"
|
|
@@ -61,6 +69,7 @@
|
|
|
61
69
|
},
|
|
62
70
|
"devDependencies": {
|
|
63
71
|
"@effect/platform-node": "4.0.0-beta.98",
|
|
72
|
+
"@effect/vitest": "4.0.0-beta.98",
|
|
64
73
|
"@playwright/test": "1.61.1",
|
|
65
74
|
"@storybook/addon-a11y": "10.5.0",
|
|
66
75
|
"@storybook/addon-docs": "10.5.0",
|
|
@@ -93,12 +102,12 @@
|
|
|
93
102
|
"radix-ui": "1.6.2"
|
|
94
103
|
},
|
|
95
104
|
"scripts": {
|
|
96
|
-
"build": "pnpm codegen:check && pnpm validate:registry && rimraf dist && vite build && tsx scripts/build-assets.ts && tsc -b tsconfig.build.json --force && pnpm validate:dist",
|
|
105
|
+
"build": "pnpm codegen:check && pnpm validate:registry && rimraf dist && vite build && vite build --config vite.bounded.config.ts && tsx scripts/build-assets.ts && tsc -b tsconfig.build.json --force && pnpm validate:dist",
|
|
97
106
|
"check": "pnpm codegen:check && pnpm validate:registry && pnpm lint:colors && tsc -b tsconfig.json",
|
|
98
107
|
"clean": "rimraf dist *.tsbuildinfo",
|
|
99
108
|
"codegen": "tsx scripts/generate-contract.ts write",
|
|
100
109
|
"codegen:check": "tsx scripts/generate-contract.ts check",
|
|
101
|
-
"lint": "eslint \"{src,test,scripts,generated,manifest,stories,visual,.storybook}/**/*.{ts,tsx}\" component-manifest.ts vite.config.ts vitest.config.ts vitest.storybook.config.ts playwright.config.ts && pnpm lint:colors",
|
|
110
|
+
"lint": "eslint \"{src,test,scripts,generated,manifest,stories,visual,.storybook}/**/*.{ts,tsx}\" component-manifest.ts vite.config.ts vite.bounded.config.ts vitest.config.ts vitest.storybook.config.ts playwright.config.ts && pnpm lint:colors",
|
|
102
111
|
"lint:colors": "tsx scripts/tokens/lint-colors.ts",
|
|
103
112
|
"scaffold": "tsx scripts/scaffold-component.ts",
|
|
104
113
|
"storybook": "storybook dev --host 127.0.0.1 --port 6006 --exact-port --no-open --no-version-updates",
|
package/registry/components.json
CHANGED
|
@@ -847,6 +847,7 @@
|
|
|
847
847
|
"standard": "WCAG 2.2 AA"
|
|
848
848
|
},
|
|
849
849
|
"capabilities": [
|
|
850
|
+
"annotate",
|
|
850
851
|
"compare",
|
|
851
852
|
"review"
|
|
852
853
|
],
|
|
@@ -892,10 +893,15 @@
|
|
|
892
893
|
"purpose": "Render a complete, virtualized before-and-after code review",
|
|
893
894
|
"slots": [],
|
|
894
895
|
"states": [
|
|
896
|
+
"annotated",
|
|
895
897
|
"buffered",
|
|
896
898
|
"default",
|
|
899
|
+
"dismissed",
|
|
900
|
+
"draft",
|
|
901
|
+
"resolved",
|
|
897
902
|
"split",
|
|
898
903
|
"stacked",
|
|
904
|
+
"stale",
|
|
899
905
|
"strict"
|
|
900
906
|
],
|
|
901
907
|
"status": "experimental",
|
|
@@ -958,7 +964,7 @@
|
|
|
958
964
|
"storyId": "diff-difffiletree--file-states",
|
|
959
965
|
"storyPath": "?path=/story/diff-difffiletree--file-states"
|
|
960
966
|
},
|
|
961
|
-
"example": "import { DiffFileTree } from \"@knpkv/rly/diff\"",
|
|
967
|
+
"example": "import { DiffFileTree } from \"@knpkv/rly/diff/workbench\"",
|
|
962
968
|
"exports": [
|
|
963
969
|
{
|
|
964
970
|
"kind": "value",
|
|
@@ -995,7 +1001,7 @@
|
|
|
995
1001
|
"test/diff/DiffFileTree.test.tsx"
|
|
996
1002
|
]
|
|
997
1003
|
},
|
|
998
|
-
"importPath": "@knpkv/rly/diff",
|
|
1004
|
+
"importPath": "@knpkv/rly/diff/workbench",
|
|
999
1005
|
"name": "DiffFileTree",
|
|
1000
1006
|
"props": {
|
|
1001
1007
|
"defaults": {},
|
|
@@ -1156,7 +1162,7 @@
|
|
|
1156
1162
|
"storyId": "diff-diffheader--controlled-preferences",
|
|
1157
1163
|
"storyPath": "?path=/story/diff-diffheader--controlled-preferences"
|
|
1158
1164
|
},
|
|
1159
|
-
"example": "import { DiffHeader } from \"@knpkv/rly/diff\"",
|
|
1165
|
+
"example": "import { DiffHeader } from \"@knpkv/rly/diff/workbench\"",
|
|
1160
1166
|
"exports": [
|
|
1161
1167
|
{
|
|
1162
1168
|
"kind": "value",
|
|
@@ -1185,7 +1191,7 @@
|
|
|
1185
1191
|
"test/diff/DiffHeader.test.tsx"
|
|
1186
1192
|
]
|
|
1187
1193
|
},
|
|
1188
|
-
"importPath": "@knpkv/rly/diff",
|
|
1194
|
+
"importPath": "@knpkv/rly/diff/workbench",
|
|
1189
1195
|
"name": "DiffHeader",
|
|
1190
1196
|
"props": {
|
|
1191
1197
|
"defaults": {},
|
|
@@ -1272,7 +1278,7 @@
|
|
|
1272
1278
|
"storyId": "diff-diffworkbench--bird-eye-review",
|
|
1273
1279
|
"storyPath": "?path=/story/diff-diffworkbench--bird-eye-review"
|
|
1274
1280
|
},
|
|
1275
|
-
"example": "import { DiffWorkbench } from \"@knpkv/rly/diff\"",
|
|
1281
|
+
"example": "import { DiffWorkbench } from \"@knpkv/rly/diff/workbench\"",
|
|
1276
1282
|
"exports": [
|
|
1277
1283
|
{
|
|
1278
1284
|
"kind": "value",
|
|
@@ -1301,7 +1307,7 @@
|
|
|
1301
1307
|
"test/diff/DiffWorkbench.test.tsx"
|
|
1302
1308
|
]
|
|
1303
1309
|
},
|
|
1304
|
-
"importPath": "@knpkv/rly/diff",
|
|
1310
|
+
"importPath": "@knpkv/rly/diff/workbench",
|
|
1305
1311
|
"name": "DiffWorkbench",
|
|
1306
1312
|
"props": {
|
|
1307
1313
|
"defaults": {},
|
package/registry/schema.json
CHANGED
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
},
|
|
156
156
|
"importPath": {
|
|
157
157
|
"type": "string",
|
|
158
|
-
"pattern": "^@knpkv/rly(?:/(?:tokens|foundations|primitives|patterns|diff))?$"
|
|
158
|
+
"pattern": "^@knpkv/rly(?:/(?:tokens|foundations|primitives|patterns|diff(?:/workbench)?))?$"
|
|
159
159
|
},
|
|
160
160
|
"name": {
|
|
161
161
|
"type": "string",
|
package/registry/search.json
CHANGED
|
@@ -230,6 +230,7 @@
|
|
|
230
230
|
},
|
|
231
231
|
{
|
|
232
232
|
"capabilities": [
|
|
233
|
+
"annotate",
|
|
233
234
|
"compare",
|
|
234
235
|
"review"
|
|
235
236
|
],
|
|
@@ -237,19 +238,32 @@
|
|
|
237
238
|
"importPath": "@knpkv/rly/diff",
|
|
238
239
|
"name": "DiffCodeView",
|
|
239
240
|
"states": [
|
|
241
|
+
"annotated",
|
|
242
|
+
"buffered",
|
|
240
243
|
"default",
|
|
244
|
+
"dismissed",
|
|
245
|
+
"draft",
|
|
246
|
+
"resolved",
|
|
247
|
+
"split",
|
|
241
248
|
"stacked",
|
|
249
|
+
"stale",
|
|
242
250
|
"strict"
|
|
243
251
|
],
|
|
244
252
|
"terms": [
|
|
253
|
+
"annotate",
|
|
254
|
+
"annotated",
|
|
245
255
|
"buffered",
|
|
246
256
|
"compare",
|
|
247
257
|
"diff",
|
|
248
258
|
"diffcodeview",
|
|
259
|
+
"dismissed",
|
|
260
|
+
"draft",
|
|
249
261
|
"mode",
|
|
262
|
+
"resolved",
|
|
250
263
|
"review",
|
|
251
264
|
"split",
|
|
252
265
|
"stacked",
|
|
266
|
+
"stale",
|
|
253
267
|
"strict",
|
|
254
268
|
"virtualization"
|
|
255
269
|
]
|
|
@@ -260,7 +274,7 @@
|
|
|
260
274
|
"navigate"
|
|
261
275
|
],
|
|
262
276
|
"category": "diff",
|
|
263
|
-
"importPath": "@knpkv/rly/diff",
|
|
277
|
+
"importPath": "@knpkv/rly/diff/workbench",
|
|
264
278
|
"name": "DiffFileTree",
|
|
265
279
|
"states": [
|
|
266
280
|
"added",
|
|
@@ -320,7 +334,7 @@
|
|
|
320
334
|
"filter"
|
|
321
335
|
],
|
|
322
336
|
"category": "diff",
|
|
323
|
-
"importPath": "@knpkv/rly/diff",
|
|
337
|
+
"importPath": "@knpkv/rly/diff/workbench",
|
|
324
338
|
"name": "DiffHeader",
|
|
325
339
|
"states": [
|
|
326
340
|
"agent",
|
|
@@ -353,7 +367,7 @@
|
|
|
353
367
|
"review"
|
|
354
368
|
],
|
|
355
369
|
"category": "diff",
|
|
356
|
-
"importPath": "@knpkv/rly/diff",
|
|
370
|
+
"importPath": "@knpkv/rly/diff/workbench",
|
|
357
371
|
"name": "DiffWorkbench",
|
|
358
372
|
"states": [
|
|
359
373
|
"all-files",
|