@bitvea/feedback-toolbar 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/README.md +262 -0
  2. package/dist/FeedbackPanel.d.ts +117 -0
  3. package/dist/FeedbackPanel.d.ts.map +1 -0
  4. package/dist/FeedbackPanel.js +622 -0
  5. package/dist/FeedbackPanel.js.map +1 -0
  6. package/dist/FeedbackToolbar.d.ts +54 -0
  7. package/dist/FeedbackToolbar.d.ts.map +1 -0
  8. package/dist/FeedbackToolbar.js +1149 -0
  9. package/dist/FeedbackToolbar.js.map +1 -0
  10. package/dist/InboxSheet.d.ts +80 -0
  11. package/dist/InboxSheet.d.ts.map +1 -0
  12. package/dist/InboxSheet.js +580 -0
  13. package/dist/InboxSheet.js.map +1 -0
  14. package/dist/PinLayer.d.ts +59 -0
  15. package/dist/PinLayer.d.ts.map +1 -0
  16. package/dist/PinLayer.js +1702 -0
  17. package/dist/PinLayer.js.map +1 -0
  18. package/dist/RichText.d.ts +6 -0
  19. package/dist/RichText.d.ts.map +1 -0
  20. package/dist/RichText.js +135 -0
  21. package/dist/RichText.js.map +1 -0
  22. package/dist/browser/entry.d.ts +3 -0
  23. package/dist/browser/entry.d.ts.map +1 -0
  24. package/dist/browser/entry.js +13 -0
  25. package/dist/browser/entry.js.map +1 -0
  26. package/dist/browser/mount.d.ts +37 -0
  27. package/dist/browser/mount.d.ts.map +1 -0
  28. package/dist/browser/mount.js +150 -0
  29. package/dist/browser/mount.js.map +1 -0
  30. package/dist/browser/toolbar.js +38 -0
  31. package/dist/browser/toolbar.js.map +7 -0
  32. package/dist/capture.d.ts +58 -0
  33. package/dist/capture.d.ts.map +1 -0
  34. package/dist/capture.js +98 -0
  35. package/dist/capture.js.map +1 -0
  36. package/dist/cli/bin.d.ts +3 -0
  37. package/dist/cli/bin.d.ts.map +1 -0
  38. package/dist/cli/bin.js +196 -0
  39. package/dist/cli/bin.js.map +1 -0
  40. package/dist/cli/fs.d.ts +16 -0
  41. package/dist/cli/fs.d.ts.map +1 -0
  42. package/dist/cli/fs.js +33 -0
  43. package/dist/cli/fs.js.map +1 -0
  44. package/dist/cli/init.d.ts +75 -0
  45. package/dist/cli/init.d.ts.map +1 -0
  46. package/dist/cli/init.js +266 -0
  47. package/dist/cli/init.js.map +1 -0
  48. package/dist/cli/register.d.ts +55 -0
  49. package/dist/cli/register.d.ts.map +1 -0
  50. package/dist/cli/register.js +84 -0
  51. package/dist/cli/register.js.map +1 -0
  52. package/dist/cli/registration.d.ts +37 -0
  53. package/dist/cli/registration.d.ts.map +1 -0
  54. package/dist/cli/registration.js +69 -0
  55. package/dist/cli/registration.js.map +1 -0
  56. package/dist/cli/strategies.d.ts +98 -0
  57. package/dist/cli/strategies.d.ts.map +1 -0
  58. package/dist/cli/strategies.js +198 -0
  59. package/dist/cli/strategies.js.map +1 -0
  60. package/dist/client.d.ts +59 -0
  61. package/dist/client.d.ts.map +1 -0
  62. package/dist/client.js +113 -0
  63. package/dist/client.js.map +1 -0
  64. package/dist/config.d.ts +92 -0
  65. package/dist/config.d.ts.map +1 -0
  66. package/dist/config.js +65 -0
  67. package/dist/config.js.map +1 -0
  68. package/dist/deepLink.d.ts +86 -0
  69. package/dist/deepLink.d.ts.map +1 -0
  70. package/dist/deepLink.js +185 -0
  71. package/dist/deepLink.js.map +1 -0
  72. package/dist/fontFace.d.ts +70 -0
  73. package/dist/fontFace.d.ts.map +1 -0
  74. package/dist/fontFace.js +88 -0
  75. package/dist/fontFace.js.map +1 -0
  76. package/dist/gating.d.ts +32 -0
  77. package/dist/gating.d.ts.map +1 -0
  78. package/dist/gating.js +49 -0
  79. package/dist/gating.js.map +1 -0
  80. package/dist/icons.d.ts +68 -0
  81. package/dist/icons.d.ts.map +1 -0
  82. package/dist/icons.js +97 -0
  83. package/dist/icons.js.map +1 -0
  84. package/dist/index.d.ts +14 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.js +68 -0
  87. package/dist/index.js.map +1 -0
  88. package/dist/markdown.d.ts +59 -0
  89. package/dist/markdown.d.ts.map +1 -0
  90. package/dist/markdown.js +130 -0
  91. package/dist/markdown.js.map +1 -0
  92. package/dist/motion.d.ts +178 -0
  93. package/dist/motion.d.ts.map +1 -0
  94. package/dist/motion.js +302 -0
  95. package/dist/motion.js.map +1 -0
  96. package/dist/preferences.d.ts +71 -0
  97. package/dist/preferences.d.ts.map +1 -0
  98. package/dist/preferences.js +195 -0
  99. package/dist/preferences.js.map +1 -0
  100. package/dist/rasterise.d.ts +45 -0
  101. package/dist/rasterise.d.ts.map +1 -0
  102. package/dist/rasterise.js +490 -0
  103. package/dist/rasterise.js.map +1 -0
  104. package/dist/selector.d.ts +19 -0
  105. package/dist/selector.d.ts.map +1 -0
  106. package/dist/selector.js +142 -0
  107. package/dist/selector.js.map +1 -0
  108. package/dist/session.d.ts +19 -0
  109. package/dist/session.d.ts.map +1 -0
  110. package/dist/session.js +36 -0
  111. package/dist/session.js.map +1 -0
  112. package/dist/shortcut.d.ts +88 -0
  113. package/dist/shortcut.d.ts.map +1 -0
  114. package/dist/shortcut.js +149 -0
  115. package/dist/shortcut.js.map +1 -0
  116. package/dist/tokens.d.ts +709 -0
  117. package/dist/tokens.d.ts.map +1 -0
  118. package/dist/tokens.js +749 -0
  119. package/dist/tokens.js.map +1 -0
  120. package/dist/vendor/types/account.d.ts +26 -0
  121. package/dist/vendor/types/account.d.ts.map +1 -0
  122. package/dist/vendor/types/account.js +23 -0
  123. package/dist/vendor/types/account.js.map +1 -0
  124. package/dist/vendor/types/apiKey.d.ts +38 -0
  125. package/dist/vendor/types/apiKey.d.ts.map +1 -0
  126. package/dist/vendor/types/apiKey.js +36 -0
  127. package/dist/vendor/types/apiKey.js.map +1 -0
  128. package/dist/vendor/types/auth.d.ts +10 -0
  129. package/dist/vendor/types/auth.d.ts.map +1 -0
  130. package/dist/vendor/types/auth.js +15 -0
  131. package/dist/vendor/types/auth.js.map +1 -0
  132. package/dist/vendor/types/entity.d.ts +74 -0
  133. package/dist/vendor/types/entity.d.ts.map +1 -0
  134. package/dist/vendor/types/entity.js +111 -0
  135. package/dist/vendor/types/entity.js.map +1 -0
  136. package/dist/vendor/types/feedback.d.ts +285 -0
  137. package/dist/vendor/types/feedback.d.ts.map +1 -0
  138. package/dist/vendor/types/feedback.js +286 -0
  139. package/dist/vendor/types/feedback.js.map +1 -0
  140. package/dist/vendor/types/index.d.ts +14 -0
  141. package/dist/vendor/types/index.d.ts.map +1 -0
  142. package/dist/vendor/types/index.js +16 -0
  143. package/dist/vendor/types/index.js.map +1 -0
  144. package/dist/vendor/types/invite.d.ts +42 -0
  145. package/dist/vendor/types/invite.d.ts.map +1 -0
  146. package/dist/vendor/types/invite.js +30 -0
  147. package/dist/vendor/types/invite.js.map +1 -0
  148. package/dist/vendor/types/mcpToken.d.ts +38 -0
  149. package/dist/vendor/types/mcpToken.d.ts.map +1 -0
  150. package/dist/vendor/types/mcpToken.js +39 -0
  151. package/dist/vendor/types/mcpToken.js.map +1 -0
  152. package/dist/vendor/types/organization.d.ts +13 -0
  153. package/dist/vendor/types/organization.d.ts.map +1 -0
  154. package/dist/vendor/types/organization.js +12 -0
  155. package/dist/vendor/types/organization.js.map +1 -0
  156. package/dist/vendor/types/project.d.ts +73 -0
  157. package/dist/vendor/types/project.d.ts.map +1 -0
  158. package/dist/vendor/types/project.js +117 -0
  159. package/dist/vendor/types/project.js.map +1 -0
  160. package/dist/vendor/types/role.d.ts +12 -0
  161. package/dist/vendor/types/role.d.ts.map +1 -0
  162. package/dist/vendor/types/role.js +20 -0
  163. package/dist/vendor/types/role.js.map +1 -0
  164. package/dist/vendor/types/roleDefinition.d.ts +61 -0
  165. package/dist/vendor/types/roleDefinition.d.ts.map +1 -0
  166. package/dist/vendor/types/roleDefinition.js +45 -0
  167. package/dist/vendor/types/roleDefinition.js.map +1 -0
  168. package/dist/vendor/types/team.d.ts +25 -0
  169. package/dist/vendor/types/team.d.ts.map +1 -0
  170. package/dist/vendor/types/team.js +17 -0
  171. package/dist/vendor/types/team.js.map +1 -0
  172. package/dist/vendor/types/util.d.ts +39 -0
  173. package/dist/vendor/types/util.d.ts.map +1 -0
  174. package/dist/vendor/types/util.js +31 -0
  175. package/dist/vendor/types/util.js.map +1 -0
  176. package/package.json +59 -0
@@ -0,0 +1,580 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ // The inbox: a collapsible sheet down the right edge of the host page,
4
+ // listing the feedback filed against it.
5
+ //
6
+ // It exists because the pins alone do not answer "what is left on this
7
+ // review". A pin is where a problem is, not a list of problems: an item on a
8
+ // part of the page nobody has scrolled to is invisible, an item whose anchor
9
+ // has gone is invisible by design, and an item on another page of the same
10
+ // site cannot be a marker here at all. The sheet is the one surface that can
11
+ // name all three.
12
+ //
13
+ // Two hard constraints shape everything below.
14
+ //
15
+ // It OVERLAYS. Every rule here is `position: fixed`, nothing is added to the
16
+ // host's flow, and the sheet neither locks body scroll nor pads the document
17
+ // aside. A review tool that reflows the layout under review is worse than no
18
+ // review tool - the reviewer would be looking at a page nobody ships.
19
+ //
20
+ // It survives navigation. On a host MPA every link is a fresh page load and a
21
+ // fresh toolbar, so "I left the inbox open" has to live outside React. It
22
+ // lives in `localStorage` under one key, read by the shell that owns the
23
+ // open/closed flag.
24
+ import { useCallback, useEffect, useMemo, useState } from "react";
25
+ import { FEEDBACK_STATUS_LABELS } from "./vendor/types/index.js";
26
+ import { buildDeepLink, currentPageUrl } from "./deepLink.js";
27
+ import { Avatar, formatStamp } from "./FeedbackPanel.js";
28
+ import { CloseIcon } from "./icons.js";
29
+ import { surfaceMotion, useEntered, usePrefersReducedMotion, usePresence, } from "./motion.js";
30
+ import { exitFor, layers, motion, radii, resetBox, sizes, spacing, transition, typeScale, } from "./tokens.js";
31
+ /**
32
+ * Where "is the inbox open" is remembered. `localStorage` on the host origin,
33
+ * because the answer belongs to this person on this app: a reviewer who
34
+ * opened the sheet is mid-review and clicking through pages, and closing it
35
+ * on every navigation would make it useless for the one job it has.
36
+ */
37
+ export const INBOX_OPEN_STORAGE_KEY = "bitvea.feedback-toolbar.inbox-open";
38
+ /**
39
+ * Exported because the shell has to know it: the sheet is `right: 0` and the
40
+ * bar is centred on the viewport, so without an offset the sheet covers the
41
+ * right end of the bar on any viewport under about 1024px.
42
+ */
43
+ export const SHEET_WIDTH = 340;
44
+ /**
45
+ * How many project-wide items one open of the sheet asks for.
46
+ *
47
+ * The page-scoped list is bounded by the page. This one is not bounded by
48
+ * anything, and it is issued from a widget on the customer's own deployment
49
+ * against the one table that grows for the life of a project - with every
50
+ * item's reply thread attached. So it asks for a page of the newest work and
51
+ * says so at the bottom of the list when there is more; the alternative is a
52
+ * response whose size is a project's entire history, on every open.
53
+ */
54
+ const PROJECT_SCOPE_LIMIT = 100;
55
+ export function InboxSheet({ client, organizationId, theme, open, onClose, showResolved, onShowResolvedChange, onFocusPin, }) {
56
+ const [scope, setScope] = useState("page");
57
+ // `null` is "not loaded yet", which is a different thing from the empty
58
+ // list: one shows a spinner-shaped message, the other says the page is
59
+ // clean, and conflating them tells a reviewer a page has no feedback while
60
+ // the request is still in flight.
61
+ const [items, setItems] = useState(null);
62
+ const [error, setError] = useState(null);
63
+ // Read once per mount. The toolbar remounts on a real navigation, which is
64
+ // what a host MPA does; a client-side route change inside an SPA keeps this
65
+ // value, and re-querying on every render is worse than being one route
66
+ // behind on a surface the reviewer refreshes by reopening.
67
+ const here = useMemo(() => currentPageUrl(), []);
68
+ const load = useCallback(async () => {
69
+ setError(null);
70
+ try {
71
+ setItems(scope === "page"
72
+ ? await client.listForPage(organizationId, here)
73
+ : await client.listForProject(organizationId, PROJECT_SCOPE_LIMIT));
74
+ }
75
+ catch {
76
+ // An inbox that will not load must not take the toolbar with it: pins
77
+ // and the note composer are unaffected, and both still work.
78
+ setItems([]);
79
+ setError("Could not load the inbox.");
80
+ }
81
+ }, [client, organizationId, scope, here]);
82
+ // Only while open, and again on every open: the sheet is a list of other
83
+ // people's work, so it is stale the moment it is closed. This is the same
84
+ // fetch-on-mount shape the pin layer and the session hook already use, and
85
+ // it trips the same `set-state-in-effect` warning for the same reason: the
86
+ // load IS the synchronisation with an external system, and the state it
87
+ // sets is that system's answer arriving.
88
+ useEffect(() => {
89
+ if (!open)
90
+ return;
91
+ void load();
92
+ }, [open, load]);
93
+ const visible = useMemo(() => (items ?? []).filter((item) => showResolved || item.status !== "DONE"), [items, showResolved]);
94
+ // `exitFor(fast)` rather than `instant` spelled out: the slide below enters
95
+ // at `surfaceMotion`'s default step, and this timer is the same value that
96
+ // helper puts in the transition - DESIGN.md defers the removal "by exactly
97
+ // the exit duration", which two independent literals only happen to be.
98
+ const presence = usePresence(open, exitFor(motion.duration.fast));
99
+ // Gated on `open`, not on mount: the toolbar renders this component for the
100
+ // whole session and toggles it with a prop, so a mount-based enter would
101
+ // have been spent on page load. See `useEntered`.
102
+ // `settledAtMount`: `open` comes out of `localStorage`, so a sheet the
103
+ // reviewer left open is restored state on the next page rather than
104
+ // something they just did. See `useEntered`.
105
+ const entered = useEntered(open, true);
106
+ const reduced = usePrefersReducedMotion();
107
+ // Collapsed still means GONE, not hidden behind a zero width: markup left in
108
+ // a host app's DOM is markup their own queries and audits trip over, and two
109
+ // e2e specs assert this sheet reaches zero elements. What has changed since
110
+ // that was written is only that the removal is now deferred by one exit -
111
+ // `open` is already false, so nothing the reviewer did is waiting on it.
112
+ //
113
+ // The slide is a `transform`, never a change to `right` or `width`. Those
114
+ // are layout, and this element is 340px of overlay on somebody else's page.
115
+ if (!presence.mounted)
116
+ return null;
117
+ return (_jsxs("aside", { "data-testid": "inbox-sheet", "aria-label": "BitVea Feedback inbox", style: {
118
+ position: "fixed",
119
+ top: 0,
120
+ right: 0,
121
+ bottom: 0,
122
+ width: `${SHEET_WIDTH}px`,
123
+ maxWidth: "calc(100vw - 24px)",
124
+ // Set rather than inherited. The host page may have no CSS reset at
125
+ // all, and under `content-box` this sheet would be 340px plus its own
126
+ // border - see the note on `boxSizing` in FeedbackToolbar.tsx.
127
+ boxSizing: "border-box",
128
+ display: "flex",
129
+ flexDirection: "column",
130
+ // Under the bar, deliberately: the bar is what opened this sheet and
131
+ // has to stay clickable to close it again. See `layers`.
132
+ zIndex: layers.surface,
133
+ // `canvasSoft` - the page ground - rather than `canvas`. The rows are
134
+ // the cards now, and a card only reads as raised if the thing behind
135
+ // it is not the same tone. This is the surface ladder the dashboard's
136
+ // list screens use, and the dark palette was realigned so the two
137
+ // ladders finally run the same direction.
138
+ background: theme.colors.canvasSoft,
139
+ borderLeft: `1px solid ${theme.colors.hairline}`,
140
+ boxShadow: theme.shadows.popover,
141
+ color: theme.colors.body,
142
+ ...typeScale.bodySm,
143
+ // Repeated from the toolbar root because a host that replaces the
144
+ // inbox renders this sheet wherever it likes, and because every one of
145
+ // these is a property a host can set on `*` and re-typeset the sheet
146
+ // with. `typeScale.bodySm` above states the letter-spacing; these are
147
+ // the ones no type role covers.
148
+ wordSpacing: "normal",
149
+ textTransform: "none",
150
+ fontStyle: "normal",
151
+ fontVariant: "normal",
152
+ textAlign: "left",
153
+ textIndent: 0,
154
+ textDecoration: "none",
155
+ whiteSpace: "normal",
156
+ colorScheme: theme.resolved,
157
+ // In from its own edge and back out again: `enterShift`, a few pixels,
158
+ // not the full 340px. This is a working surface a reviewer opens to
159
+ // act on a list, and DESIGN.md's posture here is that nothing may make
160
+ // them wait - a full-width slide is a showpiece with a cost.
161
+ //
162
+ // Note what does NOT move with it: `FeedbackToolbar` pads its dock by
163
+ // this sheet's width off the same `open` flag, and that padding is
164
+ // layout. It flips in the frame the slide starts, which is correct -
165
+ // the rule against animating layout is about the HOST page, and this
166
+ // is the toolbar's own dock.
167
+ ...surfaceMotion({
168
+ visible: entered,
169
+ leaving: presence.leaving,
170
+ reduced,
171
+ slide: "x",
172
+ }),
173
+ }, children: [_jsxs("header", { style: {
174
+ ...resetBox,
175
+ display: "flex",
176
+ alignItems: "center",
177
+ gap: spacing.xs,
178
+ // On `canvas`, which is what makes it a header band over the
179
+ // `canvasSoft` list below it rather than one more thing on the page.
180
+ background: theme.colors.canvas,
181
+ padding: `${spacing.sm} ${spacing.sm}`,
182
+ borderBottom: `1px solid ${theme.colors.hairline}`,
183
+ }, children: [_jsx("span", { style: {
184
+ flex: 1,
185
+ color: theme.colors.ink,
186
+ ...typeScale.bodySmStrong,
187
+ }, children: "Inbox" }), _jsx("span", { "data-testid": "inbox-count", style: {
188
+ // `body`, not `mute`: #888888 is 3.4:1 on this ground at 12px, and
189
+ // the count is the one number in the sheet.
190
+ color: theme.colors.body,
191
+ ...typeScale.captionMono,
192
+ }, children: visible.length }), _jsx(CloseButton, { theme: theme, onClose: onClose })] }), _jsxs("div", { style: {
193
+ display: "flex",
194
+ flexDirection: "column",
195
+ gap: spacing.xs,
196
+ padding: spacing.sm,
197
+ background: theme.colors.canvas,
198
+ borderBottom: `1px solid ${theme.colors.hairline}`,
199
+ }, children: [_jsxs("div", { role: "group", "aria-label": "Scope", style: {
200
+ display: "flex",
201
+ // 4px, the base unit, replacing an off-grid 2px - and it makes the
202
+ // track and thumb radii concentric, 8px outside and 4px inside.
203
+ padding: spacing.xxs,
204
+ gap: spacing.xxs,
205
+ borderRadius: radii.md,
206
+ background: theme.colors.canvasSoft2,
207
+ }, children: [_jsx(ScopeButton, { theme: theme, testId: "inbox-scope-page", label: "This page", active: scope === "page", onClick: () => setScope("page") }), _jsx(ScopeButton, { theme: theme, testId: "inbox-scope-project", label: "Whole project", active: scope === "project", onClick: () => setScope("project") })] }), _jsxs("label", { style: {
208
+ ...resetBox,
209
+ display: "flex",
210
+ alignItems: "center",
211
+ gap: spacing.xs,
212
+ color: theme.colors.body,
213
+ ...typeScale.bodySm,
214
+ cursor: "pointer",
215
+ }, children: [_jsx("input", { type: "checkbox", "data-testid": "inbox-show-resolved", checked: showResolved, onChange: (e) => onShowResolvedChange(e.target.checked),
216
+ // Drawn from tokens rather than handed to the platform.
217
+ //
218
+ // `accentColor` alone still leaves the browser drawing the
219
+ // control: its size came from the UA (13px, beside 16px icons and
220
+ // 22px avatars) and every other property - border, ground, the
221
+ // tick - stayed the platform's, so a host rule as ordinary as
222
+ // `input[type=checkbox] { width: 100%; appearance: auto }` could
223
+ // reshape the toolbar's only toggle. `appearance: none` takes the
224
+ // whole control, which then has to supply its own tick; the tick
225
+ // is a data URI built from the palette rather than a hardcoded
226
+ // colour, because `onInk` is #ffffff light and #171717 dark.
227
+ //
228
+ // It stays a real, visible `<input>`: toolbar-inbox.spec.ts drives
229
+ // it with Playwright's `.check()` / `.uncheck()`, which act on the
230
+ // element itself.
231
+ style: {
232
+ appearance: "none",
233
+ WebkitAppearance: "none",
234
+ width: sizes.control,
235
+ height: sizes.control,
236
+ margin: 0,
237
+ flex: "0 0 auto",
238
+ boxSizing: "border-box",
239
+ borderRadius: radii.xs,
240
+ border: showResolved
241
+ ? `1px solid ${theme.colors.ink}`
242
+ : `1px solid ${theme.colors.hairlineStrong}`,
243
+ background: showResolved ? theme.colors.ink : theme.colors.canvas,
244
+ backgroundImage: showResolved ? tickImage(theme) : "none",
245
+ backgroundRepeat: "no-repeat",
246
+ backgroundPosition: "center",
247
+ cursor: "pointer",
248
+ outline: "revert",
249
+ } }), "Show resolved"] })] }), _jsxs("div", {
250
+ // The only scroller in the sheet, so a long list never grows the
251
+ // sheet past the viewport and never scrolls the host page instead.
252
+ style: { flex: 1, minHeight: 0, overflowY: "auto", padding: spacing.xs }, children: [error ? (_jsx("p", { role: "alert", "data-testid": "inbox-error", style: {
253
+ ...resetBox,
254
+ margin: spacing.xs,
255
+ color: theme.colors.error,
256
+ ...typeScale.caption,
257
+ }, children: error })) : null, items === null ? (_jsx(Frame, { theme: theme, children: _jsx("p", { style: { ...resetBox, ...typeScale.captionMono }, children: "Loading\u2026" }) })) : visible.length === 0 ? (_jsx(Frame, { theme: theme, children: _jsx("p", { "data-testid": "inbox-empty", style: { ...resetBox, ...typeScale.bodySm }, children: scope === "page"
258
+ ? "Nothing on this page yet."
259
+ : "Nothing in this project yet." }) })) : (_jsxs(_Fragment, { children: [visible.map((item) => (_jsx(InboxRow, { item: item, theme: theme, here: here, onFocusPin: onFocusPin }, item.id))), items.length >= PROJECT_SCOPE_LIMIT ? (_jsxs("p", { "data-testid": "inbox-capped", style: {
260
+ ...resetBox,
261
+ margin: spacing.xs,
262
+ color: theme.colors.body,
263
+ ...typeScale.caption,
264
+ }, children: ["Showing the newest ", PROJECT_SCOPE_LIMIT, ". Older items are in the dashboard."] })) : null] }))] })] }));
265
+ }
266
+ /* ── One entry ────────────────────────────────────────────────────────── */
267
+ function InboxRow({ item, theme, here, onFocusPin, }) {
268
+ const resolved = item.status === "DONE";
269
+ // Hover and focus in state, because inline styles cannot express `:hover` or
270
+ // `:focus-visible` and this package ships no stylesheet. The focus half is
271
+ // not a nicety: a host with `*:focus { outline: none }` left the inbox
272
+ // keyboard-navigable but with nothing to show for it.
273
+ const [hovered, setHovered] = useState(false);
274
+ const [focused, setFocused] = useState(false);
275
+ const reduced = usePrefersReducedMotion();
276
+ // A row is a CARD on the sheet's `canvasSoft` ground, which is what turns a
277
+ // run of paragraphs into a table. `minHeight` is what keeps the rows a
278
+ // regular rhythm when one report is a single word and the next is two
279
+ // clamped lines.
280
+ const rowStyle = {
281
+ display: "flex",
282
+ gap: spacing.xs,
283
+ width: "100%",
284
+ minHeight: "56px",
285
+ boxSizing: "border-box",
286
+ textAlign: "left",
287
+ padding: spacing.xs,
288
+ // 4px, the base unit. It was 2px, which is on no grid this system has.
289
+ marginBottom: spacing.xxs,
290
+ border: "none",
291
+ borderRadius: radii.md,
292
+ background: hovered ? theme.colors.canvasSoft2 : theme.colors.canvas,
293
+ // DESIGN.md's Level 1: the inset hairline ring that is the brand's
294
+ // universal "you can see this card" cue, plus the focus ring when the row
295
+ // has keyboard focus.
296
+ boxShadow: focused
297
+ ? `${theme.shadows.focusRing}, ${theme.shadows.insetHairline}`
298
+ : theme.shadows.insetHairline,
299
+ color: theme.colors.body,
300
+ ...typeScale.bodySm,
301
+ textDecoration: "none",
302
+ outline: "revert",
303
+ // Resolved entries stay legible while reading as settled, which is the
304
+ // same treatment their markers get on the page.
305
+ //
306
+ // Safe on the container here, unlike the pin wrapper issue #23 was about:
307
+ // `opacity` composites the whole subtree and creates a stacking context,
308
+ // and this row is a leaf - nothing inside it is a surface that has to
309
+ // escape the row or stay opaque while the row is dimmed. Anything nested
310
+ // under a row later has to answer that question again.
311
+ opacity: resolved ? 0.55 : 1,
312
+ // So a row resolved from inside the sheet dims rather than snaps - the
313
+ // same acknowledgement the marker on the page gets, on the surface the
314
+ // reviewer is actually looking at when they press the button here.
315
+ // `background-color` is in the list because the hover fill is the other
316
+ // thing this row changes under a pointer.
317
+ transition: transition(["opacity", "background-color"], motion.duration.fast, motion.easing.inOut, reduced),
318
+ };
319
+ const interaction = {
320
+ onPointerEnter: () => setHovered(true),
321
+ onPointerLeave: () => setHovered(false),
322
+ onFocus: () => setFocused(true),
323
+ onBlur: () => setFocused(false),
324
+ };
325
+ // The repeated row anatomy, the same one the dashboard's lists use: sans
326
+ // prose on top, one dot-separated mono line of identifiers beneath, and a
327
+ // mono stamp in its own right-hand column. Every fact on that second line is
328
+ // already on the DTO and was already being thrown away - the list read as a
329
+ // notification feed when the data it holds is a deployment log.
330
+ const replyCount = item.replies.length;
331
+ const facts = [
332
+ item.kind === "GENERAL" ? "page note" : "pinned",
333
+ replyCount > 0
334
+ ? `${replyCount} ${replyCount === 1 ? "reply" : "replies"}`
335
+ : null,
336
+ ].filter((fact) => fact !== null);
337
+ const content = (_jsxs(_Fragment, { children: [_jsx(Avatar, { theme: theme, name: item.author.name, email: item.author.email, size: 22 }), _jsxs("span", { style: { flex: 1, minWidth: 0 }, children: [_jsx("span", { style: {
338
+ display: "-webkit-box",
339
+ color: theme.colors.ink,
340
+ // Two lines of the report, then an ellipsis. The thread is one
341
+ // click away, and a wall of text here makes the list unscannable.
342
+ overflow: "hidden",
343
+ WebkitBoxOrient: "vertical",
344
+ WebkitLineClamp: 2,
345
+ }, children: item.body }), _jsxs("span", { style: {
346
+ display: "block",
347
+ marginTop: spacing.xxs,
348
+ color: theme.colors.body,
349
+ ...typeScale.captionMono,
350
+ overflow: "hidden",
351
+ textOverflow: "ellipsis",
352
+ whiteSpace: "nowrap",
353
+ }, children: [_jsx("span", { "data-testid": `inbox-status-${item.id}`, children: FEEDBACK_STATUS_LABELS[item.status] }), facts.map((fact) => ` · ${fact}`).join("")] })] })] }));
354
+ /** The right-hand column: when it happened, then where. */
355
+ const rail = (hint) => (_jsxs("span", { style: {
356
+ display: "flex",
357
+ flexDirection: "column",
358
+ alignItems: "flex-end",
359
+ gap: spacing.xxs,
360
+ flex: "0 0 auto",
361
+ color: theme.colors.body,
362
+ ...typeScale.captionMono,
363
+ // A column of stamps only lines up if the digits do.
364
+ fontVariantNumeric: "tabular-nums",
365
+ whiteSpace: "nowrap",
366
+ }, children: [_jsx("time", { dateTime: item.createdAt, children: formatStamp(item.createdAt) }), hint] }));
367
+ // On this page: focusing scrolls to the marker and opens its thread, which
368
+ // is the whole point of the list. Comparison ignores the fragment, because
369
+ // ours has just been consumed off the URL and the host's is not ours to
370
+ // treat as a different page.
371
+ if (sameLocation(item.pageUrl, here)) {
372
+ return (_jsxs("button", { type: "button", "data-testid": `inbox-item-${item.id}`, onClick: () => onFocusPin(item.id), style: { ...rowStyle, cursor: "pointer" }, ...interaction, children: [content, rail(null)] }));
373
+ }
374
+ // Another page. `pageUrl` is CLIENT-SUBMITTED - anyone holding a deploy key
375
+ // can register a project and file feedback whose page URL points anywhere -
376
+ // so it becomes an anchor only when it is the origin the reviewer is
377
+ // already on. Everything else renders as inert text with the host named, so
378
+ // the sheet can never be the thing that walks somebody to a hostile page.
379
+ if (sameOrigin(item.pageUrl, here)) {
380
+ return (_jsxs("a", { "data-testid": `inbox-item-${item.id}`, href: buildDeepLink(item.pageUrl, item.id), style: { ...rowStyle, cursor: "pointer" }, ...interaction, children: [content, rail(_jsx(PageHint, { theme: theme, pageUrl: item.pageUrl }))] }));
381
+ }
382
+ return (_jsxs("div", { "data-testid": `inbox-item-${item.id}`, style: rowStyle, children: [content, rail(_jsx("span", { "data-testid": `inbox-foreign-${item.id}`, title: item.pageUrl, style: { color: theme.colors.mute }, children: "another site" }))] }));
383
+ }
384
+ /**
385
+ * The frame the empty and loading states sit in.
386
+ *
387
+ * `spacing.lg` rather than the `spacing.3xl` DESIGN.md's ex-empty-state-card
388
+ * specifies, and that is a stated divergence: 48px of padding inside a 340px
389
+ * sheet leaves 244px of content width, so the message would wrap to four
390
+ * lines to make room for the whitespace around it. The FRAME is the part that
391
+ * matters - a bordered region that says "this is where the list would be" -
392
+ * and a bare sentence floating in a scroller is what it replaces.
393
+ */
394
+ function Frame({ theme, children, }) {
395
+ return (_jsx("div", { style: {
396
+ display: "flex",
397
+ flexDirection: "column",
398
+ alignItems: "flex-start",
399
+ gap: spacing.xs,
400
+ padding: spacing.lg,
401
+ boxSizing: "border-box",
402
+ borderRadius: radii.md,
403
+ background: theme.colors.canvasSoft2,
404
+ boxShadow: theme.shadows.insetHairline,
405
+ color: theme.colors.body,
406
+ }, children: children }));
407
+ }
408
+ function CloseButton({ theme, onClose, }) {
409
+ const [focused, setFocused] = useState(false);
410
+ return (_jsx("button", { type: "button", "data-testid": "inbox-close", "aria-label": "Close inbox", onClick: onClose, onFocus: () => setFocused(true), onBlur: () => setFocused(false), style: {
411
+ display: "inline-flex",
412
+ alignItems: "center",
413
+ justifyContent: "center",
414
+ width: sizes.icon,
415
+ height: sizes.icon,
416
+ padding: 0,
417
+ border: "none",
418
+ borderRadius: radii.pill,
419
+ background: "transparent",
420
+ // `body`, not `mute`: this is the only way out of the sheet.
421
+ color: theme.colors.body,
422
+ cursor: "pointer",
423
+ outline: "revert",
424
+ boxShadow: focused ? theme.shadows.focusRing : "none",
425
+ }, children: _jsx(CloseIcon, {}) }));
426
+ }
427
+ /**
428
+ * The checkbox's tick, as a data URI drawn in the palette's own ink.
429
+ *
430
+ * `appearance: none` takes the platform's tick away with everything else, and
431
+ * a background image is the only way to put one back without adding an element
432
+ * the `<input>` cannot contain. Built from the theme rather than hardcoded:
433
+ * `onInk` is #ffffff on the light palette and #171717 on the dark one.
434
+ */
435
+ function tickImage(theme) {
436
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" ` +
437
+ `stroke="${theme.colors.onInk}" stroke-width="3" stroke-linecap="round" ` +
438
+ `stroke-linejoin="round"><path d="M5 12.5l4.5 4.5L19 7.5"/></svg>`;
439
+ return `url("data:image/svg+xml,${encodeURIComponent(svg)}")`;
440
+ }
441
+ function PageHint({ theme, pageUrl, }) {
442
+ return (_jsx("span", { title: pageUrl, style: {
443
+ maxWidth: "96px",
444
+ overflow: "hidden",
445
+ whiteSpace: "nowrap",
446
+ textOverflow: "ellipsis",
447
+ // The path is read head-first, so the ELLIPSIS belongs at the tail;
448
+ // the colour is `mute` because it is the least of the three facts in
449
+ // this column.
450
+ color: theme.colors.mute,
451
+ }, children: pathOf(pageUrl) }));
452
+ }
453
+ function ScopeButton({ theme, testId, label, active, onClick, }) {
454
+ const [focused, setFocused] = useState(false);
455
+ return (_jsx("button", { type: "button", "data-testid": testId, "aria-pressed": active, onClick: onClick, onFocus: () => setFocused(true), onBlur: () => setFocused(false), style: {
456
+ flex: 1,
457
+ padding: `${spacing.xxs} ${spacing.xs}`,
458
+ border: "none",
459
+ // 4px, concentric inside the track's 8px.
460
+ borderRadius: radii.xs,
461
+ background: active ? theme.colors.canvas : "transparent",
462
+ boxShadow: focused
463
+ ? theme.shadows.focusRing
464
+ : active
465
+ ? theme.shadows.insetHairline
466
+ : "none",
467
+ // `body`, not `mute`: the inactive half of a two-way control is not
468
+ // decoration, and #888888 at 12px is 3.4:1 on this ground.
469
+ color: active ? theme.colors.ink : theme.colors.body,
470
+ ...typeScale.caption,
471
+ fontWeight: active ? 500 : 400,
472
+ cursor: "pointer",
473
+ outline: "revert",
474
+ }, children: label }));
475
+ }
476
+ /* ── URL comparison ───────────────────────────────────────────────────── */
477
+ /**
478
+ * Both `URL` calls are guarded because `pageUrl` came off the wire. The
479
+ * schema validates it at submission, but a row written before a schema change
480
+ * must not be able to throw out of a render and blank the sheet.
481
+ */
482
+ function parse(url) {
483
+ try {
484
+ return new URL(url);
485
+ }
486
+ catch {
487
+ return null;
488
+ }
489
+ }
490
+ /** Same page, ignoring the fragment. Query strings do distinguish pages. */
491
+ export function sameLocation(a, b) {
492
+ const left = parse(a);
493
+ const right = parse(b);
494
+ if (!left || !right)
495
+ return false;
496
+ return (left.origin === right.origin &&
497
+ left.pathname === right.pathname &&
498
+ left.search === right.search);
499
+ }
500
+ export function sameOrigin(a, b) {
501
+ const left = parse(a);
502
+ const right = parse(b);
503
+ return left !== null && right !== null && left.origin === right.origin;
504
+ }
505
+ function pathOf(url) {
506
+ return parse(url)?.pathname ?? url;
507
+ }
508
+ /* ── Persisted open/closed ────────────────────────────────────────────── */
509
+ const inboxListeners = new Set();
510
+ /**
511
+ * Only used when `localStorage` is unreachable - private mode, a blocked
512
+ * origin, a host that disabled storage. The choice then holds for this page
513
+ * and no longer, which beats the toggle appearing not to work at all.
514
+ */
515
+ let memoryOpen = null;
516
+ /**
517
+ * Whether the sheet was left open, from storage. Every access is guarded:
518
+ * private mode, a blocked origin and a host that disabled storage all throw
519
+ * on `localStorage` itself rather than returning null, and a `ReferenceError`
520
+ * out of the toolbar takes the host app's render down with it.
521
+ */
522
+ export function readInboxOpen() {
523
+ try {
524
+ const raw = window.localStorage.getItem(INBOX_OPEN_STORAGE_KEY);
525
+ if (raw !== null)
526
+ return raw === "1";
527
+ }
528
+ catch {
529
+ // Fall through to the in-memory value.
530
+ }
531
+ return memoryOpen ?? false;
532
+ }
533
+ export function writeInboxOpen(open) {
534
+ try {
535
+ window.localStorage.setItem(INBOX_OPEN_STORAGE_KEY, open ? "1" : "0");
536
+ memoryOpen = null;
537
+ }
538
+ catch {
539
+ memoryOpen = open;
540
+ }
541
+ inboxListeners.forEach((listener) => listener());
542
+ }
543
+ /**
544
+ * "Is the inbox open" as an external store, not as component state read from
545
+ * `localStorage` in a `useState` initialiser.
546
+ *
547
+ * The initialiser is what this used to be, and it produced a hydration
548
+ * mismatch inside the host app: on the server `window.localStorage` throws, the
549
+ * guard answers false, and on the client the same call answers true - so a
550
+ * reviewer who left the sheet open got React's "server rendered HTML didn't
551
+ * match the client" in the customer's own console on every page load, plus the
552
+ * dev error overlay on their page. The flag reaches the DOM as `aria-expanded`
553
+ * and `aria-pressed` on the inbox button and decides its inline `background`,
554
+ * so it is not an invisible difference React can paper over.
555
+ *
556
+ * `useSyncExternalStore` is the shape that fixes it, and it is the shape the
557
+ * theme in FeedbackToolbar.tsx already uses for the same reason: the server
558
+ * snapshot is a deterministic false, and the stored value is adopted after
559
+ * hydration instead of during it.
560
+ */
561
+ export const INBOX_OPEN_STORE = {
562
+ // Arrow properties rather than shorthand methods: these are handed to
563
+ // `useSyncExternalStore` detached from the object, so nothing here may
564
+ // depend on `this`.
565
+ subscribe: (listener) => {
566
+ inboxListeners.add(listener);
567
+ return () => {
568
+ inboxListeners.delete(listener);
569
+ };
570
+ },
571
+ /** The client's answer: storage, else whatever this page last chose. */
572
+ getSnapshot: readInboxOpen,
573
+ /**
574
+ * The server's answer, and the first client render's. Closed: a sheet that
575
+ * appears one frame late is a paint, and a sheet that appears where the
576
+ * server said there was none is an error in somebody else's app.
577
+ */
578
+ getServerSnapshot: () => false,
579
+ };
580
+ //# sourceMappingURL=InboxSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InboxSheet.js","sourceRoot":"","sources":["../src/InboxSheet.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,uEAAuE;AACvE,yCAAyC;AACzC,EAAE;AACF,uEAAuE;AACvE,6EAA6E;AAC7E,6EAA6E;AAC7E,2EAA2E;AAC3E,6EAA6E;AAC7E,kBAAkB;AAClB,EAAE;AACF,+CAA+C;AAC/C,EAAE;AAC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