@industry-theme/file-city-panel 0.5.76 → 0.5.77

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.
@@ -108,13 +108,23 @@ export interface TrailRequestIntroModalProps {
108
108
  */
109
109
  notedBy?: string[];
110
110
  /**
111
- * Display names of visitors who have opened the trail but have
112
- * neither signed off nor left a note. Rendered as the `VISITED BY`
113
- * avatar strip — its own row, below `REVIEWED BY` and `NOTES BY`.
114
- * The panel is responsible for filtering out anyone already
115
- * present in the other two rosters before passing the list in.
111
+ * Visit roster for the `VISITED BY` row its own row below
112
+ * `REVIEWED BY` and `NOTES BY`.
113
+ *
114
+ * - `verified`: display names of identified visitors. The panel is
115
+ * responsible for filtering out anyone already present in the
116
+ * other two rosters before passing the list in.
117
+ * - `anonymousCount`: aggregate count of unverified visits — no
118
+ * per-visitor identity is surfaced.
119
+ *
120
+ * The row renders collapsed by default as `VISITED BY · N` (where
121
+ * N is `verified.length + anonymousCount`) and expands on click
122
+ * into the verified avatars plus an anonymous-count chip.
116
123
  */
117
- visitedBy?: string[];
124
+ visitedBy?: {
125
+ verified: string[];
126
+ anonymousCount: number;
127
+ };
118
128
  /**
119
129
  * Optional `author → markerIds[]` map. When present, avatars in
120
130
  * either strip become clickable: clicking one opens the manifest
@@ -1 +1 @@
1
- {"version":3,"file":"TrailRequestIntroModal.d.ts","sourceRoot":"","sources":["../../../../src/panels/FileCityTrailExplorerPanel/overlays/TrailRequestIntroModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAmCzD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,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C;AA0JF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;IAC/B,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb;;;uDAGmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;8BAC0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CA6CA,CAAC"}
1
+ {"version":3,"file":"TrailRequestIntroModal.d.ts","sourceRoot":"","sources":["../../../../src/panels/FileCityTrailExplorerPanel/overlays/TrailRequestIntroModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAY,KAAK,KAAK,EAAE,MAAM,+BAA+B,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAmCzD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC9D,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B;;;OAGG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;IACxC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC;IAClE,qEAAqE;IACrE,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,EAAE;QACV,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;IACF;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA+pBxE,CAAC;AAoTF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;IAC/B,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb;;;uDAGmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;8BAC0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CA6CA,CAAC"}
@@ -258336,6 +258336,8 @@ const TrailRequestIntroModal = ({
258336
258336
  React.useEffect(() => {
258337
258337
  if (!showManifest) setNoteAuthorFilter(null);
258338
258338
  }, [showManifest]);
258339
+ const [visitedExpanded, setVisitedExpanded] = React.useState(false);
258340
+ const visitTotal = ((visitedBy == null ? void 0 : visitedBy.verified.length) ?? 0) + ((visitedBy == null ? void 0 : visitedBy.anonymousCount) ?? 0);
258339
258341
  const [selectedMode, setSelectedMode] = React.useState(
258340
258342
  defaultMode
258341
258343
  );
@@ -258955,16 +258957,15 @@ ${s2.comment}` : ""}${hasNotes ? "\n(click to highlight their notes on the manif
258955
258957
  })
258956
258958
  }
258957
258959
  ) : null,
258958
- visitedBy && visitedBy.length > 0 ? /* @__PURE__ */ jsx(
258959
- AvatarStrip,
258960
+ visitedBy && visitTotal > 0 ? /* @__PURE__ */ jsx(
258961
+ VisitedByRow,
258960
258962
  {
258961
258963
  theme: theme2,
258962
- label: "VISITED BY",
258963
- entries: visitedBy.map((name2) => ({
258964
- key: name2,
258965
- name: name2,
258966
- tooltip: name2
258967
- }))
258964
+ verified: visitedBy.verified,
258965
+ anonymousCount: visitedBy.anonymousCount,
258966
+ total: visitTotal,
258967
+ expanded: visitedExpanded,
258968
+ onToggle: () => setVisitedExpanded((v) => !v)
258968
258969
  }
258969
258970
  ) : null
258970
258971
  ]
@@ -259092,6 +259093,154 @@ const AvatarStrip = ({ theme: theme2, label, entries, ringed = false }) => {
259092
259093
  }
259093
259094
  );
259094
259095
  };
259096
+ const VisitedByRow = ({ theme: theme2, verified, anonymousCount, total, expanded, onToggle }) => {
259097
+ return /* @__PURE__ */ jsxs(
259098
+ "div",
259099
+ {
259100
+ style: {
259101
+ marginTop: 10,
259102
+ padding: "8px 14px",
259103
+ background: theme2.colors.backgroundSecondary,
259104
+ border: `1px solid ${theme2.colors.border}`,
259105
+ borderRadius: theme2.radii[3],
259106
+ display: "flex",
259107
+ alignItems: "center",
259108
+ gap: 10,
259109
+ flexShrink: 0,
259110
+ boxShadow: theme2.shadows[2]
259111
+ },
259112
+ children: [
259113
+ /* @__PURE__ */ jsxs(
259114
+ "button",
259115
+ {
259116
+ type: "button",
259117
+ onClick: onToggle,
259118
+ title: expanded ? "Collapse visitor breakdown" : `${verified.length} verified · ${anonymousCount} anonymous — click to expand`,
259119
+ style: {
259120
+ display: "inline-flex",
259121
+ alignItems: "center",
259122
+ gap: 8,
259123
+ flexShrink: 0,
259124
+ background: "transparent",
259125
+ border: "none",
259126
+ padding: 0,
259127
+ cursor: "pointer",
259128
+ fontFamily: theme2.fonts.monospace,
259129
+ fontSize: theme2.fontSizes[0],
259130
+ color: theme2.colors.textTertiary,
259131
+ letterSpacing: "0.04em"
259132
+ },
259133
+ children: [
259134
+ /* @__PURE__ */ jsx("span", { children: "VISITED BY" }),
259135
+ /* @__PURE__ */ jsx(
259136
+ "span",
259137
+ {
259138
+ style: {
259139
+ display: "inline-flex",
259140
+ alignItems: "center",
259141
+ justifyContent: "center",
259142
+ minWidth: 24,
259143
+ height: 20,
259144
+ padding: "0 8px",
259145
+ borderRadius: 999,
259146
+ background: `color-mix(in srgb, ${theme2.colors.accent} 14%, transparent)`,
259147
+ border: `1px solid ${theme2.colors.border}`,
259148
+ fontFamily: theme2.fonts.body,
259149
+ fontSize: theme2.fontSizes[0],
259150
+ color: theme2.colors.textSecondary,
259151
+ letterSpacing: 0
259152
+ },
259153
+ children: total
259154
+ }
259155
+ ),
259156
+ /* @__PURE__ */ jsx(
259157
+ "span",
259158
+ {
259159
+ "aria-hidden": true,
259160
+ style: {
259161
+ fontFamily: theme2.fonts.body,
259162
+ fontSize: theme2.fontSizes[0],
259163
+ color: theme2.colors.textTertiary,
259164
+ transform: expanded ? "rotate(90deg)" : "rotate(0deg)",
259165
+ transition: "transform 120ms ease",
259166
+ display: "inline-block",
259167
+ lineHeight: 1
259168
+ },
259169
+ children: "▸"
259170
+ }
259171
+ )
259172
+ ]
259173
+ }
259174
+ ),
259175
+ expanded ? /* @__PURE__ */ jsxs(
259176
+ "div",
259177
+ {
259178
+ style: {
259179
+ display: "flex",
259180
+ alignItems: "center",
259181
+ gap: 6,
259182
+ flex: 1,
259183
+ minWidth: 0,
259184
+ overflowX: "auto"
259185
+ },
259186
+ children: [
259187
+ verified.map((name2) => /* @__PURE__ */ jsxs(
259188
+ "span",
259189
+ {
259190
+ title: name2,
259191
+ style: {
259192
+ display: "inline-flex",
259193
+ alignItems: "center",
259194
+ gap: 6,
259195
+ flexShrink: 0
259196
+ },
259197
+ children: [
259198
+ /* @__PURE__ */ jsx(Avatar, { theme: theme2, name: name2, size: 24 }),
259199
+ /* @__PURE__ */ jsx(
259200
+ "span",
259201
+ {
259202
+ style: {
259203
+ fontFamily: theme2.fonts.body,
259204
+ fontSize: theme2.fontSizes[0],
259205
+ color: theme2.colors.textSecondary
259206
+ },
259207
+ children: name2
259208
+ }
259209
+ )
259210
+ ]
259211
+ },
259212
+ name2
259213
+ )),
259214
+ anonymousCount > 0 ? /* @__PURE__ */ jsxs(
259215
+ "span",
259216
+ {
259217
+ title: `${anonymousCount} anonymous ${anonymousCount === 1 ? "visitor" : "visitors"}`,
259218
+ style: {
259219
+ display: "inline-flex",
259220
+ alignItems: "center",
259221
+ flexShrink: 0,
259222
+ padding: "2px 10px",
259223
+ borderRadius: 999,
259224
+ background: "transparent",
259225
+ border: `1px dashed ${theme2.colors.border}`,
259226
+ fontFamily: theme2.fonts.body,
259227
+ fontSize: theme2.fontSizes[0],
259228
+ color: theme2.colors.textTertiary
259229
+ },
259230
+ children: [
259231
+ "+",
259232
+ anonymousCount,
259233
+ " anonymous"
259234
+ ]
259235
+ }
259236
+ ) : null
259237
+ ]
259238
+ }
259239
+ ) : null
259240
+ ]
259241
+ }
259242
+ );
259243
+ };
259095
259244
  const LgtmStamp = ({ theme: theme2, size, rotated = true, text: text2 = "LGTM" }) => {
259096
259245
  const inkColor = theme2.colors.success;
259097
259246
  const borderWidth = Math.max(2, Math.round(size / 30));
@@ -260897,6 +261046,7 @@ const FileCityTrailSequenceLayout = ({
260897
261046
  return Array.from(noteAuthors);
260898
261047
  })(),
260899
261048
  visitedBy: (() => {
261049
+ if (!trail2.visitors) return void 0;
260900
261050
  const signers = new Set(
260901
261051
  (trail2.signOffs ?? []).map((s2) => s2.author)
260902
261052
  );
@@ -260904,16 +261054,19 @@ const FileCityTrailSequenceLayout = ({
260904
261054
  for (const n of trail2.notes ?? []) {
260905
261055
  if (n.author) noteAuthors.add(n.author);
260906
261056
  }
260907
- const visited = [];
261057
+ const verified = [];
260908
261058
  const dedupe = /* @__PURE__ */ new Set();
260909
- for (const v of trail2.visitors ?? []) {
261059
+ for (const v of trail2.visitors.named) {
260910
261060
  if (!v || v === trail2.author) continue;
260911
261061
  if (signers.has(v) || noteAuthors.has(v)) continue;
260912
261062
  if (dedupe.has(v)) continue;
260913
261063
  dedupe.add(v);
260914
- visited.push(v);
261064
+ verified.push(v);
260915
261065
  }
260916
- return visited;
261066
+ return {
261067
+ verified,
261068
+ anonymousCount: Math.max(0, trail2.visitors.anonymousCount | 0)
261069
+ };
260917
261070
  })(),
260918
261071
  notesByAuthor: (() => {
260919
261072
  const map2 = /* @__PURE__ */ new Map();