@tangle-network/agent-app 0.45.32 → 0.45.34
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/dist/{DesignCanvas-RSWQCXM3.js → DesignCanvas-EODMDQMT.js} +2 -2
- package/dist/{DesignCanvasEditor-XZMGIST7.js → DesignCanvasEditor-DRRZ6ZD3.js} +4 -4
- package/dist/{InvitationsPanel-CJ7DR4F7.js → InvitationsPanel-BATXZHY4.js} +2 -2
- package/dist/{MembersPanel-BB4OD2KB.js → MembersPanel-XNLF3SA4.js} +2 -2
- package/dist/agent-session-controls-1q1XR3j8.d.ts +257 -0
- package/dist/assistant/index.d.ts +1 -1
- package/dist/assistant/index.js +11 -10
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-react/index.d.ts +1 -1
- package/dist/chat-react/index.js +1 -1
- package/dist/{chunk-YIQHOAHN.js → chunk-3UBAO3N5.js} +3 -3
- package/dist/{chunk-YIQHOAHN.js.map → chunk-3UBAO3N5.js.map} +1 -1
- package/dist/{chunk-PURHUAOR.js → chunk-556RB3XI.js} +5 -5
- package/dist/chunk-556RB3XI.js.map +1 -0
- package/dist/{chunk-HZ4WCA37.js → chunk-5MZXWPFN.js} +9 -9
- package/dist/chunk-5MZXWPFN.js.map +1 -0
- package/dist/{chunk-FNM7JYME.js → chunk-5N434BGF.js} +17 -17
- package/dist/chunk-5N434BGF.js.map +1 -0
- package/dist/{chunk-5SXS3YAB.js → chunk-7MV23XBW.js} +2 -2
- package/dist/chunk-7MV23XBW.js.map +1 -0
- package/dist/{chunk-IFYJDX3J.js → chunk-AIHKKLKY.js} +47 -46
- package/dist/chunk-AIHKKLKY.js.map +1 -0
- package/dist/{chunk-S564OFTL.js → chunk-F4XLTVQ3.js} +3 -3
- package/dist/{chunk-S564OFTL.js.map → chunk-F4XLTVQ3.js.map} +1 -1
- package/dist/{chunk-LSQR6HM6.js → chunk-IN6LNZ7O.js} +35 -34
- package/dist/chunk-IN6LNZ7O.js.map +1 -0
- package/dist/chunk-MIZMWCKW.js +904 -0
- package/dist/chunk-MIZMWCKW.js.map +1 -0
- package/dist/{chunk-QGOU3VXH.js → chunk-UXRJAUJL.js} +3 -3
- package/dist/design-canvas-react/index.js +8 -8
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/studio-react/index.js +27 -27
- package/dist/studio-react/index.js.map +1 -1
- package/dist/teams-react/index.js +2 -2
- package/dist/teams-react/lazy.js +2 -2
- package/dist/theme/index.js +1 -1
- package/dist/theme/tailwind-preset.d.ts +5 -1
- package/dist/theme/tailwind-preset.js +11 -2
- package/dist/theme/tailwind-preset.js.map +1 -1
- package/dist/theme/tokens.css +126 -79
- package/dist/web-react/async/index.js +1 -1
- package/dist/web-react/index.d.ts +31 -91
- package/dist/web-react/index.js +13 -3
- package/dist/work-product-react/index.js +3 -3
- package/dist/work-product-react/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/agent-session-controls-BwImzYKC.d.ts +0 -129
- package/dist/chunk-5SXS3YAB.js.map +0 -1
- package/dist/chunk-FNM7JYME.js.map +0 -1
- package/dist/chunk-HZ4WCA37.js.map +0 -1
- package/dist/chunk-IFYJDX3J.js.map +0 -1
- package/dist/chunk-L7FHRORY.js +0 -763
- package/dist/chunk-L7FHRORY.js.map +0 -1
- package/dist/chunk-LSQR6HM6.js.map +0 -1
- package/dist/chunk-PURHUAOR.js.map +0 -1
- /package/dist/{DesignCanvas-RSWQCXM3.js.map → DesignCanvas-EODMDQMT.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-XZMGIST7.js.map → DesignCanvasEditor-DRRZ6ZD3.js.map} +0 -0
- /package/dist/{InvitationsPanel-CJ7DR4F7.js.map → InvitationsPanel-BATXZHY4.js.map} +0 -0
- /package/dist/{MembersPanel-BB4OD2KB.js.map → MembersPanel-XNLF3SA4.js.map} +0 -0
- /package/dist/{chunk-QGOU3VXH.js.map → chunk-UXRJAUJL.js.map} +0 -0
package/dist/web-react/index.js
CHANGED
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
withoutRecordGridCreated,
|
|
111
111
|
withoutRecordGridRemoved,
|
|
112
112
|
withoutRecordGridUpdate
|
|
113
|
-
} from "../chunk-
|
|
113
|
+
} from "../chunk-AIHKKLKY.js";
|
|
114
114
|
import "../chunk-FBVLEGEG.js";
|
|
115
115
|
import {
|
|
116
116
|
EvidenceLineageTable,
|
|
@@ -123,20 +123,25 @@ import {
|
|
|
123
123
|
reviewQueueStateLabel,
|
|
124
124
|
workProductPartsFromMessageParts,
|
|
125
125
|
workProductStatusLabel
|
|
126
|
-
} from "../chunk-
|
|
126
|
+
} from "../chunk-5MZXWPFN.js";
|
|
127
127
|
import {
|
|
128
128
|
parseReviewQueueItem
|
|
129
129
|
} from "../chunk-GEYACSFW.js";
|
|
130
130
|
import {
|
|
131
131
|
AgentSessionControls,
|
|
132
132
|
DEFAULT_EFFORT_LEVELS,
|
|
133
|
+
EFFORT_METER_SEGMENTS,
|
|
134
|
+
EffortMeter,
|
|
133
135
|
EffortPicker,
|
|
136
|
+
HarnessGlyph,
|
|
134
137
|
ModelPicker,
|
|
138
|
+
OVERLAY_SHADOW,
|
|
135
139
|
ProviderLogo,
|
|
140
|
+
effortMeterFill,
|
|
136
141
|
useComposerAttachments,
|
|
137
142
|
usePending,
|
|
138
143
|
usePopover
|
|
139
|
-
} from "../chunk-
|
|
144
|
+
} from "../chunk-MIZMWCKW.js";
|
|
140
145
|
import {
|
|
141
146
|
tabTerminalConnectionId,
|
|
142
147
|
useSandboxTerminalConnection
|
|
@@ -215,11 +220,14 @@ export {
|
|
|
215
220
|
DurableChatCards,
|
|
216
221
|
DurablePlanCard,
|
|
217
222
|
DurablePlanClientError,
|
|
223
|
+
EFFORT_METER_SEGMENTS,
|
|
218
224
|
EMPTY_RECORD_GRID_OVERLAY,
|
|
225
|
+
EffortMeter,
|
|
219
226
|
EffortPicker,
|
|
220
227
|
EvidenceLineageTable,
|
|
221
228
|
ExceptionList,
|
|
222
229
|
FlowWaterfall,
|
|
230
|
+
HarnessGlyph,
|
|
223
231
|
INDEX_REFRESH_AFTER_MS,
|
|
224
232
|
INTERACTION_CANCEL_EVENT,
|
|
225
233
|
INTERACTION_EVENT,
|
|
@@ -233,6 +241,7 @@ export {
|
|
|
233
241
|
MessageAttachments,
|
|
234
242
|
MissionActivityLane,
|
|
235
243
|
ModelPicker,
|
|
244
|
+
OVERLAY_SHADOW,
|
|
236
245
|
PROVENANCE_BASES,
|
|
237
246
|
ProvenanceLegend,
|
|
238
247
|
ProvenanceStamp,
|
|
@@ -272,6 +281,7 @@ export {
|
|
|
272
281
|
describeProvenanceSourceStatus,
|
|
273
282
|
dispatchChatStreamLine,
|
|
274
283
|
durableChatCardsFromParts,
|
|
284
|
+
effortMeterFill,
|
|
275
285
|
fieldAcceptsFreeText,
|
|
276
286
|
fieldAnswer,
|
|
277
287
|
fieldValuesFromAnswers,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
ProvenanceStamp,
|
|
5
5
|
QualityCheckList,
|
|
6
6
|
workProductStatusLabel
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-5MZXWPFN.js";
|
|
8
8
|
import "../chunk-GEYACSFW.js";
|
|
9
9
|
import {
|
|
10
10
|
unresolvedBlockingExceptions
|
|
@@ -147,7 +147,7 @@ function WorkProductPane({
|
|
|
147
147
|
{
|
|
148
148
|
type: "button",
|
|
149
149
|
onClick: () => void loadCompare(prior, entry),
|
|
150
|
-
className: "rounded-md border border-border px-2 py-0.5 text-[11px] font-medium text-foreground transition hover:bg-accent
|
|
150
|
+
className: "rounded-md border border-border px-2 py-0.5 text-[11px] font-medium text-foreground transition hover:bg-accent",
|
|
151
151
|
children: [
|
|
152
152
|
"Compare v",
|
|
153
153
|
prior.version,
|
|
@@ -157,7 +157,7 @@ function WorkProductPane({
|
|
|
157
157
|
}
|
|
158
158
|
)
|
|
159
159
|
] }),
|
|
160
|
-
entry.reviewNote && /* @__PURE__ */ jsx("p", { className: "mt-1 text-
|
|
160
|
+
entry.reviewNote && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm leading-snug text-foreground", children: entry.reviewNote }),
|
|
161
161
|
/* @__PURE__ */ jsx(ProvenanceStamp, { provenance: entry.provenance, className: "mt-1" })
|
|
162
162
|
] }, `${entry.version}:${entry.status}:${entry.at}`);
|
|
163
163
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/work-product-react/index.tsx"],"sourcesContent":["/**\n * `./work-product-react` — the sandbox-ui-composed review pane. It follows the\n * optional-peer rule: this is the ONLY work-product surface\n * that imports `@tangle-network/sandbox-ui` (its `workbench` primitives:\n * `PillTabs`, `CodeSurface`, `DiffView`, `FileBreadcrumb`,\n * `computeDiffStats`). `/web-react`'s queue/card/lineage components stay\n * sandbox-ui-free; importing THIS subpath requires the otherwise optional\n * sandbox-ui peer.\n *\n * The pane never fetches: bodies arrive as resolved strings\n * (`currentContent`/`baselineContent`) and history compares load through the\n * injected `loadVersionBody(ref)` seam. The default tab is a PROP — tax\n * passes `'lineage'` (lineage before diff for tax), legal passes `'diff'`\n * (the redline IS the artifact), gtm passes `'artifact'`.\n */\n\nimport { useCallback, useMemo, useState } from 'react'\nimport {\n CodeSurface,\n DiffView,\n FileBreadcrumb,\n PillTabs,\n computeDiffStats,\n type PillTabItem,\n} from '@tangle-network/sandbox-ui/workbench'\n\nimport {\n EvidenceLineageTable,\n ExceptionList,\n ProvenanceStamp,\n QualityCheckList,\n workProductStatusLabel,\n} from '../web-react/work-product'\nimport type {\n EvidenceEntry,\n ProfileBacktestSummary,\n WorkProductRecord,\n WorkProductVersionEntry,\n} from '../work-product/types'\nimport { unresolvedBlockingExceptions } from '../work-product/types'\n\nexport type WorkProductPaneTab = 'artifact' | 'diff' | 'lineage' | 'exceptions' | 'checks' | 'history'\n\n/** Properties for the tabbed work-product review pane */\nexport interface WorkProductPaneProps {\n workProduct: WorkProductRecord\n /** Which tab opens first — a product choice, not a heuristic: tax passes\n * 'lineage', legal 'diff', gtm 'artifact'. Default 'artifact'. */\n defaultTab?: WorkProductPaneTab\n /** Resolved artifact body when it lives at `artifact.path` rather than\n * inline. Falls back to `artifact.content`. */\n currentContent?: string\n /** Resolved baseline body for diff-first products. Falls back to\n * `artifact.baseline.content`. */\n baselineContent?: string\n /** Load a frozen version body by its `history[].artifactPath` ref for the\n * vN-1 → vN compare. Omit to hide history compares. */\n loadVersionBody?: (ref: string) => Promise<string | null>\n /** Resolve one evidence entry's source to an openable URL (lineage\n * click-through). */\n resolveSourceUrl?: (entry: EvidenceEntry) => string\n /** Backtest summary for the record's profile hash, rendered on the\n * provenance stamp. */\n backtest?: ProfileBacktestSummary\n className?: string\n}\n\ninterface VersionCompare {\n fromVersion: number\n toVersion: number\n baseline: string\n current: string\n}\n\n/** Trailing path segment for a diff header. */\nfunction filenameOf(path: string | undefined, fallback: string): string {\n if (!path) return fallback\n const segments = path.split('/')\n return segments[segments.length - 1] || fallback\n}\n\n/**\n * The tabbed review pane over one work product: Artifact | Diff | Lineage |\n * Exceptions | Checks | History. Diff renders baseline→current for redline\n * artifacts and vN-1→vN for history compares; lineage is the\n * every-value-traceable table; provenance is stamped across the header.\n */\nexport function WorkProductPane({\n workProduct,\n defaultTab = 'artifact',\n currentContent,\n baselineContent,\n loadVersionBody,\n resolveSourceUrl,\n backtest,\n className,\n}: WorkProductPaneProps) {\n const artifact = workProduct.artifact\n const body = currentContent ?? artifact?.content ?? ''\n const baseline = baselineContent ?? artifact?.baseline?.content\n const hasDiff = baseline !== undefined\n\n const tabs = useMemo(() => {\n const items: PillTabItem<WorkProductPaneTab>[] = [{ value: 'artifact', label: 'Artifact' }]\n if (hasDiff) items.push({ value: 'diff', label: 'Diff' })\n items.push(\n { value: 'lineage', label: `Lineage (${workProduct.evidence.length})` },\n { value: 'exceptions', label: `Exceptions (${workProduct.exceptions.length})` },\n { value: 'checks', label: `Checks (${workProduct.checks.length})` },\n { value: 'history', label: `History (${workProduct.history.length})` },\n )\n return items\n }, [hasDiff, workProduct.evidence.length, workProduct.exceptions.length, workProduct.checks.length, workProduct.history.length])\n\n const initialTab = tabs.some((tab) => tab.value === defaultTab) ? defaultTab : 'artifact'\n const [tab, setTab] = useState<WorkProductPaneTab>(initialTab)\n const [compare, setCompare] = useState<VersionCompare | null>(null)\n const [compareError, setCompareError] = useState<string | null>(null)\n\n const diffFilename = filenameOf(artifact?.path, artifact?.title ?? workProduct.scopeKey)\n const diffStats = useMemo(\n () => (hasDiff ? computeDiffStats(baseline ?? '', body) : null),\n [hasDiff, baseline, body],\n )\n\n const loadCompare = useCallback(\n async (from: WorkProductVersionEntry, to: WorkProductVersionEntry) => {\n if (!loadVersionBody || !from.artifactPath || !to.artifactPath) return\n setCompareError(null)\n try {\n const [fromBody, toBody] = await Promise.all([\n loadVersionBody(from.artifactPath),\n loadVersionBody(to.artifactPath),\n ])\n if (fromBody === null || toBody === null) {\n setCompareError('A version snapshot could not be loaded.')\n return\n }\n setCompare({ fromVersion: from.version, toVersion: to.version, baseline: fromBody, current: toBody })\n } catch (error) {\n setCompareError(error instanceof Error ? error.message : String(error))\n }\n },\n [loadVersionBody],\n )\n\n return (\n <div className={`flex min-h-0 flex-col gap-3 ${className ?? ''}`}>\n <div className=\"flex flex-wrap items-center gap-3\">\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-semibold text-foreground\">\n {artifact?.title ?? workProduct.scopeKey}\n <span className=\"ml-1.5 text-[11px] font-normal text-muted-foreground\">v{workProduct.version}</span>\n </p>\n <p className=\"text-[11px] text-muted-foreground\">\n {artifact?.kind && <span className=\"font-mono\">{artifact.kind} · </span>}\n {workProductStatusLabel(workProduct.status)}\n {unresolvedBlockingExceptions(workProduct.exceptions).length > 0 && (\n <span className=\"text-destructive\"> · {unresolvedBlockingExceptions(workProduct.exceptions).length} blocking</span>\n )}\n </p>\n </div>\n <ProvenanceStamp provenance={workProduct.provenance} backtest={backtest} />\n </div>\n\n <PillTabs items={tabs} value={tab} onChange={setTab} aria-label=\"Work product views\" />\n\n {tab === 'artifact' && (\n <div className=\"min-h-0 flex-1 overflow-auto rounded-lg border border-border\">\n {artifact?.path && <FileBreadcrumb path={artifact.path} className=\"border-b border-border px-3 py-2\" />}\n {body ? (\n <CodeSurface code={body} filename={diffFilename} />\n ) : artifact?.fields ? (\n <CodeSurface code={JSON.stringify(artifact.fields, null, 2)} filename={`${diffFilename}.json`} language=\"json\" />\n ) : (\n <p className=\"px-4 py-6 text-center text-xs text-muted-foreground\">No artifact body yet.</p>\n )}\n </div>\n )}\n\n {tab === 'diff' && hasDiff && (\n <div className=\"min-h-0 flex-1 overflow-auto rounded-lg border border-border\">\n {diffStats && (\n <p className=\"border-b border-border px-3 py-2 text-[11px] text-muted-foreground\">\n <span className=\"text-success\">+{diffStats.added}</span>{' '}\n <span className=\"text-destructive\">−{diffStats.removed}</span>\n </p>\n )}\n <DiffView filename={diffFilename} baseline={baseline ?? ''} current={body} />\n </div>\n )}\n\n {tab === 'lineage' && (\n <EvidenceLineageTable evidence={workProduct.evidence} resolveSourceUrl={resolveSourceUrl} />\n )}\n\n {tab === 'exceptions' && <ExceptionList exceptions={workProduct.exceptions} />}\n\n {tab === 'checks' && <QualityCheckList checks={workProduct.checks} />}\n\n {tab === 'history' && (\n <div className=\"space-y-2\">\n {workProduct.history.length === 0 && <p className=\"text-xs text-muted-foreground\">No versions yet.</p>}\n {workProduct.history.map((entry, index) => {\n const prior = workProduct.history\n .slice(0, index)\n .reverse()\n .find((candidate) => candidate.version < entry.version && candidate.artifactPath)\n return (\n <div key={`${entry.version}:${entry.status}:${entry.at}`} className=\"rounded-lg border border-border bg-card px-3 py-2\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <span className=\"text-sm font-medium text-foreground\">v{entry.version}</span>\n <span className=\"text-[11px] text-muted-foreground\">{workProductStatusLabel(entry.status)}</span>\n {entry.reviewedBy && <span className=\"text-[11px] text-muted-foreground\">by {entry.reviewedBy}</span>}\n <span className=\"flex-1\" />\n {loadVersionBody && prior?.artifactPath && entry.artifactPath && (\n <button\n type=\"button\"\n onClick={() => void loadCompare(prior, entry)}\n className=\"rounded-md border border-border px-2 py-0.5 text-[11px] font-medium text-foreground transition hover:bg-accent/30\"\n >\n Compare v{prior.version} → v{entry.version}\n </button>\n )}\n </div>\n {entry.reviewNote && <p className=\"mt-1 text-[13px] leading-snug text-foreground\">{entry.reviewNote}</p>}\n <ProvenanceStamp provenance={entry.provenance} className=\"mt-1\" />\n </div>\n )\n })}\n {compareError && <p className=\"rounded-md bg-destructive/10 px-3 py-2 text-xs text-destructive\">{compareError}</p>}\n {compare && (\n <div className=\"overflow-auto rounded-lg border border-border\">\n <p className=\"border-b border-border px-3 py-2 text-[11px] text-muted-foreground\">\n v{compare.fromVersion} → v{compare.toVersion}\n </p>\n <DiffView filename={diffFilename} baseline={compare.baseline} current={compare.current} />\n </div>\n )}\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAS,aAAa,SAAS,gBAAgB;AAC/C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAgIK,SAUJ,KAVI;AA7EZ,SAAS,WAAW,MAA0B,UAA0B;AACtE,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,WAAW,KAAK,MAAM,GAAG;AAC/B,SAAO,SAAS,SAAS,SAAS,CAAC,KAAK;AAC1C;AAQO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAyB;AACvB,QAAM,WAAW,YAAY;AAC7B,QAAM,OAAO,kBAAkB,UAAU,WAAW;AACpD,QAAM,WAAW,mBAAmB,UAAU,UAAU;AACxD,QAAM,UAAU,aAAa;AAE7B,QAAM,OAAO,QAAQ,MAAM;AACzB,UAAM,QAA2C,CAAC,EAA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MAAM;AAAA,eAAW;AAAA,YAC9F,oBAAC,UAAK,WAAU,UAAS;AAAA,YACxB,mBAAmB,OAAO,gBAAgB,MAAM,gBAC/C;AAAA,cAAC;AAAA;AAAA,gBACC,MAAK;AAAA,gBACL,SAAS,MAAM,KAAK,YAAY,OAAO,KAAK;AAAA,gBAC5C,WAAU;AAAA,gBACX;AAAA;AAAA,kBACW,MAAM;AAAA,kBAAQ;AAAA,kBAAK,MAAM;AAAA;AAAA;AAAA,YACrC;AAAA,aAEJ;AAAA,UACC,MAAM,cAAc,oBAAC,OAAE,WAAU,iDAAiD,gBAAM,YAAW;AAAA,UACpG,oBAAC,mBAAgB,YAAY,MAAM,YAAY,WAAU,QAAO;AAAA,aAjBxD,GAAG,MAAM,OAAO,IAAI,MAAM,MAAM,IAAI,MAAM,EAAE,EAkBtD;AAAA,MAEJ,CAAC;AAAA,MACA,gBAAgB,oBAAC,OAAE,WAAU,mEAAmE,wBAAa;AAAA,MAC7G,WACC,qBAAC,SAAI,WAAU,iDACb;AAAA,6BAAC,OAAE,WAAU,sEAAqE;AAAA;AAAA,UAC9E,QAAQ;AAAA,UAAY;AAAA,UAAK,QAAQ;AAAA,WACrC;AAAA,QACA,oBAAC,YAAS,UAAU,cAAc,UAAU,QAAQ,UAAU,SAAS,QAAQ,SAAS;AAAA,SAC1F;AAAA,OAEJ;AAAA,KAEJ;AAEJ;","names":["tab"]}
|
|
1
|
+
{"version":3,"sources":["../../src/work-product-react/index.tsx"],"sourcesContent":["/**\n * `./work-product-react` — the sandbox-ui-composed review pane. It follows the\n * optional-peer rule: this is the ONLY work-product surface\n * that imports `@tangle-network/sandbox-ui` (its `workbench` primitives:\n * `PillTabs`, `CodeSurface`, `DiffView`, `FileBreadcrumb`,\n * `computeDiffStats`). `/web-react`'s queue/card/lineage components stay\n * sandbox-ui-free; importing THIS subpath requires the otherwise optional\n * sandbox-ui peer.\n *\n * The pane never fetches: bodies arrive as resolved strings\n * (`currentContent`/`baselineContent`) and history compares load through the\n * injected `loadVersionBody(ref)` seam. The default tab is a PROP — tax\n * passes `'lineage'` (lineage before diff for tax), legal passes `'diff'`\n * (the redline IS the artifact), gtm passes `'artifact'`.\n */\n\nimport { useCallback, useMemo, useState } from 'react'\nimport {\n CodeSurface,\n DiffView,\n FileBreadcrumb,\n PillTabs,\n computeDiffStats,\n type PillTabItem,\n} from '@tangle-network/sandbox-ui/workbench'\n\nimport {\n EvidenceLineageTable,\n ExceptionList,\n ProvenanceStamp,\n QualityCheckList,\n workProductStatusLabel,\n} from '../web-react/work-product'\nimport type {\n EvidenceEntry,\n ProfileBacktestSummary,\n WorkProductRecord,\n WorkProductVersionEntry,\n} from '../work-product/types'\nimport { unresolvedBlockingExceptions } from '../work-product/types'\n\nexport type WorkProductPaneTab = 'artifact' | 'diff' | 'lineage' | 'exceptions' | 'checks' | 'history'\n\n/** Properties for the tabbed work-product review pane */\nexport interface WorkProductPaneProps {\n workProduct: WorkProductRecord\n /** Which tab opens first — a product choice, not a heuristic: tax passes\n * 'lineage', legal 'diff', gtm 'artifact'. Default 'artifact'. */\n defaultTab?: WorkProductPaneTab\n /** Resolved artifact body when it lives at `artifact.path` rather than\n * inline. Falls back to `artifact.content`. */\n currentContent?: string\n /** Resolved baseline body for diff-first products. Falls back to\n * `artifact.baseline.content`. */\n baselineContent?: string\n /** Load a frozen version body by its `history[].artifactPath` ref for the\n * vN-1 → vN compare. Omit to hide history compares. */\n loadVersionBody?: (ref: string) => Promise<string | null>\n /** Resolve one evidence entry's source to an openable URL (lineage\n * click-through). */\n resolveSourceUrl?: (entry: EvidenceEntry) => string\n /** Backtest summary for the record's profile hash, rendered on the\n * provenance stamp. */\n backtest?: ProfileBacktestSummary\n className?: string\n}\n\ninterface VersionCompare {\n fromVersion: number\n toVersion: number\n baseline: string\n current: string\n}\n\n/** Trailing path segment for a diff header. */\nfunction filenameOf(path: string | undefined, fallback: string): string {\n if (!path) return fallback\n const segments = path.split('/')\n return segments[segments.length - 1] || fallback\n}\n\n/**\n * The tabbed review pane over one work product: Artifact | Diff | Lineage |\n * Exceptions | Checks | History. Diff renders baseline→current for redline\n * artifacts and vN-1→vN for history compares; lineage is the\n * every-value-traceable table; provenance is stamped across the header.\n */\nexport function WorkProductPane({\n workProduct,\n defaultTab = 'artifact',\n currentContent,\n baselineContent,\n loadVersionBody,\n resolveSourceUrl,\n backtest,\n className,\n}: WorkProductPaneProps) {\n const artifact = workProduct.artifact\n const body = currentContent ?? artifact?.content ?? ''\n const baseline = baselineContent ?? artifact?.baseline?.content\n const hasDiff = baseline !== undefined\n\n const tabs = useMemo(() => {\n const items: PillTabItem<WorkProductPaneTab>[] = [{ value: 'artifact', label: 'Artifact' }]\n if (hasDiff) items.push({ value: 'diff', label: 'Diff' })\n items.push(\n { value: 'lineage', label: `Lineage (${workProduct.evidence.length})` },\n { value: 'exceptions', label: `Exceptions (${workProduct.exceptions.length})` },\n { value: 'checks', label: `Checks (${workProduct.checks.length})` },\n { value: 'history', label: `History (${workProduct.history.length})` },\n )\n return items\n }, [hasDiff, workProduct.evidence.length, workProduct.exceptions.length, workProduct.checks.length, workProduct.history.length])\n\n const initialTab = tabs.some((tab) => tab.value === defaultTab) ? defaultTab : 'artifact'\n const [tab, setTab] = useState<WorkProductPaneTab>(initialTab)\n const [compare, setCompare] = useState<VersionCompare | null>(null)\n const [compareError, setCompareError] = useState<string | null>(null)\n\n const diffFilename = filenameOf(artifact?.path, artifact?.title ?? workProduct.scopeKey)\n const diffStats = useMemo(\n () => (hasDiff ? computeDiffStats(baseline ?? '', body) : null),\n [hasDiff, baseline, body],\n )\n\n const loadCompare = useCallback(\n async (from: WorkProductVersionEntry, to: WorkProductVersionEntry) => {\n if (!loadVersionBody || !from.artifactPath || !to.artifactPath) return\n setCompareError(null)\n try {\n const [fromBody, toBody] = await Promise.all([\n loadVersionBody(from.artifactPath),\n loadVersionBody(to.artifactPath),\n ])\n if (fromBody === null || toBody === null) {\n setCompareError('A version snapshot could not be loaded.')\n return\n }\n setCompare({ fromVersion: from.version, toVersion: to.version, baseline: fromBody, current: toBody })\n } catch (error) {\n setCompareError(error instanceof Error ? error.message : String(error))\n }\n },\n [loadVersionBody],\n )\n\n return (\n <div className={`flex min-h-0 flex-col gap-3 ${className ?? ''}`}>\n <div className=\"flex flex-wrap items-center gap-3\">\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-semibold text-foreground\">\n {artifact?.title ?? workProduct.scopeKey}\n <span className=\"ml-1.5 text-[11px] font-normal text-muted-foreground\">v{workProduct.version}</span>\n </p>\n <p className=\"text-[11px] text-muted-foreground\">\n {artifact?.kind && <span className=\"font-mono\">{artifact.kind} · </span>}\n {workProductStatusLabel(workProduct.status)}\n {unresolvedBlockingExceptions(workProduct.exceptions).length > 0 && (\n <span className=\"text-destructive\"> · {unresolvedBlockingExceptions(workProduct.exceptions).length} blocking</span>\n )}\n </p>\n </div>\n <ProvenanceStamp provenance={workProduct.provenance} backtest={backtest} />\n </div>\n\n <PillTabs items={tabs} value={tab} onChange={setTab} aria-label=\"Work product views\" />\n\n {tab === 'artifact' && (\n <div className=\"min-h-0 flex-1 overflow-auto rounded-lg border border-border\">\n {artifact?.path && <FileBreadcrumb path={artifact.path} className=\"border-b border-border px-3 py-2\" />}\n {body ? (\n <CodeSurface code={body} filename={diffFilename} />\n ) : artifact?.fields ? (\n <CodeSurface code={JSON.stringify(artifact.fields, null, 2)} filename={`${diffFilename}.json`} language=\"json\" />\n ) : (\n <p className=\"px-4 py-6 text-center text-xs text-muted-foreground\">No artifact body yet.</p>\n )}\n </div>\n )}\n\n {tab === 'diff' && hasDiff && (\n <div className=\"min-h-0 flex-1 overflow-auto rounded-lg border border-border\">\n {diffStats && (\n <p className=\"border-b border-border px-3 py-2 text-[11px] text-muted-foreground\">\n <span className=\"text-success\">+{diffStats.added}</span>{' '}\n <span className=\"text-destructive\">−{diffStats.removed}</span>\n </p>\n )}\n <DiffView filename={diffFilename} baseline={baseline ?? ''} current={body} />\n </div>\n )}\n\n {tab === 'lineage' && (\n <EvidenceLineageTable evidence={workProduct.evidence} resolveSourceUrl={resolveSourceUrl} />\n )}\n\n {tab === 'exceptions' && <ExceptionList exceptions={workProduct.exceptions} />}\n\n {tab === 'checks' && <QualityCheckList checks={workProduct.checks} />}\n\n {tab === 'history' && (\n <div className=\"space-y-2\">\n {workProduct.history.length === 0 && <p className=\"text-xs text-muted-foreground\">No versions yet.</p>}\n {workProduct.history.map((entry, index) => {\n const prior = workProduct.history\n .slice(0, index)\n .reverse()\n .find((candidate) => candidate.version < entry.version && candidate.artifactPath)\n return (\n <div key={`${entry.version}:${entry.status}:${entry.at}`} className=\"rounded-lg border border-border bg-card px-3 py-2\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <span className=\"text-sm font-medium text-foreground\">v{entry.version}</span>\n <span className=\"text-[11px] text-muted-foreground\">{workProductStatusLabel(entry.status)}</span>\n {entry.reviewedBy && <span className=\"text-[11px] text-muted-foreground\">by {entry.reviewedBy}</span>}\n <span className=\"flex-1\" />\n {loadVersionBody && prior?.artifactPath && entry.artifactPath && (\n <button\n type=\"button\"\n onClick={() => void loadCompare(prior, entry)}\n className=\"rounded-md border border-border px-2 py-0.5 text-[11px] font-medium text-foreground transition hover:bg-accent\"\n >\n Compare v{prior.version} → v{entry.version}\n </button>\n )}\n </div>\n {entry.reviewNote && <p className=\"mt-1 text-sm leading-snug text-foreground\">{entry.reviewNote}</p>}\n <ProvenanceStamp provenance={entry.provenance} className=\"mt-1\" />\n </div>\n )\n })}\n {compareError && <p className=\"rounded-md bg-destructive/10 px-3 py-2 text-xs text-destructive\">{compareError}</p>}\n {compare && (\n <div className=\"overflow-auto rounded-lg border border-border\">\n <p className=\"border-b border-border px-3 py-2 text-[11px] text-muted-foreground\">\n v{compare.fromVersion} → v{compare.toVersion}\n </p>\n <DiffView filename={diffFilename} baseline={compare.baseline} current={compare.current} />\n </div>\n )}\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,SAAS,a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WAAU,sEAAqE;AAAA;AAAA,UAC9E,QAAQ;AAAA,UAAY;AAAA,UAAK,QAAQ;AAAA,WACrC;AAAA,QACA,oBAAC,YAAS,UAAU,cAAc,UAAU,QAAQ,UAAU,SAAS,QAAQ,SAAS;AAAA,SAC1F;AAAA,OAEJ;AAAA,KAEJ;AAEJ;","names":["tab"]}
|
package/package.json
CHANGED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { F as FileMention } from './wire-DOZ-O6hD.js';
|
|
4
|
-
import { Harness } from './harness/index.js';
|
|
5
|
-
import { CatalogModel } from './catalog/index.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* `useFileMentions` — the glue a host passes straight into `AgentComposer`'s
|
|
9
|
-
* `mention` prop (`@tangle-network/sandbox-ui#184`) to wire up `@`-file
|
|
10
|
-
* mentions against `createSandboxFileIndexRoute` (`/chat-routes`).
|
|
11
|
-
*
|
|
12
|
-
* Fetches the index once per session from `indexUrl`, refreshes it in the
|
|
13
|
-
* background whenever the popover opens (a `fetchItems` call) if the cached
|
|
14
|
-
* copy has aged past `refreshAfterMs`, and answers every keystroke from an
|
|
15
|
-
* in-memory fuzzy filter — no per-keystroke network round trip. The returned
|
|
16
|
-
* `refresh()` lets a caller force a re-fetch immediately instead of waiting
|
|
17
|
-
* on `refreshAfterMs` — e.g. right after the agent creates a file mid-session.
|
|
18
|
-
*
|
|
19
|
-
* `MentionItem`/the `mention` prop shape mirror the FROZEN contract from
|
|
20
|
-
* sandbox-ui#184 structurally (no import: `/web-react` stays dependency-free
|
|
21
|
-
* beyond React, and `@tangle-network/sandbox-ui` is an optional peer).
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
/** Mirrors sandbox-ui#184's `MentionItem` — the atomic pill's payload. For a
|
|
25
|
-
* file mention, `id` is the workspace-relative path (the pill's stable
|
|
26
|
-
* identity and the `@<id>` serialization sandbox-ui uses to round-trip
|
|
27
|
-
* `value`), `label` is the display name, and `detail` carries the full path
|
|
28
|
-
* for the popover row's secondary line. */
|
|
29
|
-
interface MentionItem {
|
|
30
|
-
id: string;
|
|
31
|
-
label: string;
|
|
32
|
-
detail?: string;
|
|
33
|
-
kind?: string;
|
|
34
|
-
}
|
|
35
|
-
/** Mirrors sandbox-ui#184's `AgentComposerProps['mention']` shape — plug the
|
|
36
|
-
* hook's `mention` return value straight into that prop. */
|
|
37
|
-
interface ComposerMentionProp {
|
|
38
|
-
trigger?: string;
|
|
39
|
-
fetchItems(query: string): Promise<MentionItem[]>;
|
|
40
|
-
onMentionsChange?(mentions: MentionItem[]): void;
|
|
41
|
-
renderItem?(item: MentionItem): ReactNode;
|
|
42
|
-
emptyText?: string;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Ranks `files` against `query` (case-insensitive), capped to `limit`:
|
|
46
|
-
* name-prefix matches first, then name-substring, then path-substring.
|
|
47
|
-
* Within a tier, shorter names sort first (the more specific match), then
|
|
48
|
-
* alphabetically by path for a stable order. An empty query returns the
|
|
49
|
-
* first `limit` entries unranked — the popover's default list before typing.
|
|
50
|
-
* Pure and dependency-free (no fuzzy-match library) so it's cheap enough to
|
|
51
|
-
* re-run on every keystroke against a 10k-entry index.
|
|
52
|
-
*/
|
|
53
|
-
declare function rankFileMentions(files: readonly FileMention[], query: string, limit: number): FileMention[];
|
|
54
|
-
/** Max popover results per query — enough to show a useful spread of matches
|
|
55
|
-
* without pushing the fuzzy-filtered list past what a popover can usefully
|
|
56
|
-
* render in one screen. */
|
|
57
|
-
declare const DEFAULT_MENTION_LIMIT = 20;
|
|
58
|
-
/** How long a `ready` index is served before a background refetch — long
|
|
59
|
-
* enough that a full session's worth of popover opens don't repeatedly hit
|
|
60
|
-
* the index endpoint, short enough that a stale listing doesn't linger too
|
|
61
|
-
* far past workspace file changes. Callers who need the index current right
|
|
62
|
-
* now (e.g. just after the agent creates a file) call `refresh()` instead of
|
|
63
|
-
* waiting on this window. */
|
|
64
|
-
declare const INDEX_REFRESH_AFTER_MS: number;
|
|
65
|
-
/** Popover empty-state copy for a `ready` index whose query matched nothing.
|
|
66
|
-
* Loading/warming/error states have their own copy — see `emptyTextFor`. */
|
|
67
|
-
declare const DEFAULT_MENTION_EMPTY_TEXT = "No matching files";
|
|
68
|
-
/** Define options for configuring file mention fetching, caching, and display behavior */
|
|
69
|
-
interface UseFileMentionsOptions {
|
|
70
|
-
/** GET endpoint returning `FileIndexResponse` (a `createSandboxFileIndexRoute`). */
|
|
71
|
-
indexUrl: string;
|
|
72
|
-
/** Max popover results per query. Default {@link DEFAULT_MENTION_LIMIT}. */
|
|
73
|
-
limit?: number;
|
|
74
|
-
/** How long a `ready` index is served without a background refetch.
|
|
75
|
-
* Default {@link INDEX_REFRESH_AFTER_MS}. */
|
|
76
|
-
refreshAfterMs?: number;
|
|
77
|
-
/** `fetch` override for tests / non-global-fetch hosts. Default `fetch`. */
|
|
78
|
-
fetchImpl?: typeof fetch;
|
|
79
|
-
/** Text shown in the popover's empty state once the index is loaded and
|
|
80
|
-
* the query matched nothing. Default {@link DEFAULT_MENTION_EMPTY_TEXT}. */
|
|
81
|
-
emptyText?: string;
|
|
82
|
-
}
|
|
83
|
-
/** Provide properties and methods to manage and refresh file mentions in a composer interface */
|
|
84
|
-
interface UseFileMentionsResult {
|
|
85
|
-
/** Spread straight into `AgentComposer`'s `mention` prop. */
|
|
86
|
-
mention: ComposerMentionProp;
|
|
87
|
-
/** The files currently referenced by mentions in the composer's value —
|
|
88
|
-
* the send-body list (map through `fileMentionsToParts`). */
|
|
89
|
-
mentions: FileMention[];
|
|
90
|
-
/** Drop all currently-referenced mentions (e.g. after a successful send). */
|
|
91
|
-
clearMentions: () => void;
|
|
92
|
-
/** Force a re-fetch of the index right now, ignoring `refreshAfterMs` — for
|
|
93
|
-
* example right after the agent creates a file mid-session, so the next
|
|
94
|
-
* popover open sees it. Dedupes against an already-in-flight load rather
|
|
95
|
-
* than firing a second request. */
|
|
96
|
-
refresh: () => Promise<void>;
|
|
97
|
-
}
|
|
98
|
-
/** Resolve and manage file mention data with configurable fetching and state handling */
|
|
99
|
-
declare function useFileMentions(options: UseFileMentionsOptions): UseFileMentionsResult;
|
|
100
|
-
|
|
101
|
-
interface AgentSessionControlsProps {
|
|
102
|
-
/** Catalog models — canonical provider-prefixed ids. */
|
|
103
|
-
models: CatalogModel[];
|
|
104
|
-
modelsLoading?: boolean;
|
|
105
|
-
/** Selected canonical model id. */
|
|
106
|
-
model: string;
|
|
107
|
-
onModelChange(modelId: string): void;
|
|
108
|
-
/** Current harness; harness↔model coherence is enforced on every change. */
|
|
109
|
-
harness: Harness;
|
|
110
|
-
onHarnessChange(harness: Harness): void;
|
|
111
|
-
/** Harnesses to offer; defaults to the labeled set. */
|
|
112
|
-
availableHarnesses?: ReadonlyArray<Harness>;
|
|
113
|
-
/** Reasoning-effort value + setter. Shown only when the selected model
|
|
114
|
-
* `supportsReasoning`, matching `EffortPicker`'s guidance. */
|
|
115
|
-
effort: string;
|
|
116
|
-
onEffortChange(effort: string): void;
|
|
117
|
-
/**
|
|
118
|
-
* `inline` (default): model, harness, effort side by side — the prior
|
|
119
|
-
* behavior. `compact`: model inline, harness + effort behind a gear popover.
|
|
120
|
-
*/
|
|
121
|
-
layout?: 'inline' | 'compact';
|
|
122
|
-
/** Hide the harness control entirely (single-harness products). */
|
|
123
|
-
showHarness?: boolean;
|
|
124
|
-
renderProviderBadge?: (provider: string) => ReactNode;
|
|
125
|
-
className?: string;
|
|
126
|
-
}
|
|
127
|
-
declare function AgentSessionControls(props: AgentSessionControlsProps): react.JSX.Element;
|
|
128
|
-
|
|
129
|
-
export { type AgentSessionControlsProps as A, type ComposerMentionProp as C, DEFAULT_MENTION_EMPTY_TEXT as D, INDEX_REFRESH_AFTER_MS as I, type MentionItem as M, type UseFileMentionsResult as U, AgentSessionControls as a, DEFAULT_MENTION_LIMIT as b, type UseFileMentionsOptions as c, rankFileMentions as r, useFileMentions as u };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/teams-react/components/InvitationsPanel.tsx"],"sourcesContent":["/**\n * Email-invitation panel: invite by email + role, and a history of every\n * invitation (pending / accepted / expired / revoked) with its email-delivery\n * status. Pending rows expose copy-link / resend / revoke. Fully callback-driven\n * — the host supplies the data and the async `onInvite` / `onResend` / `onRevoke`\n * callbacks (backed by `./teams/invitations-api`), so this imports no app router,\n * fetch client, or toast. Styled with the shipped Tangle Quiet tokens (`var(--*)`).\n *\n * Mount alongside a list-only `MembersPanel` (`showInviteForm={false}`): the\n * members panel shows accepted members, this owns the invite flow + pending list.\n */\n\nimport { useState } from 'react'\nimport type { WorkspaceRole } from '../../teams/roles'\nimport { hasWorkspaceRole } from '../../teams/roles'\nimport type { InvitationView, InvitationsPanelProps } from '../contracts'\n\nconst ASSIGNABLE: { value: WorkspaceRole; label: string }[] = [\n { value: 'viewer', label: 'Viewer' },\n { value: 'editor', label: 'Editor' },\n { value: 'admin', label: 'Admin' },\n]\n\nconst BADGE_BASE = 'inline-flex items-center rounded border px-2 py-0.5 text-[10px] font-medium uppercase'\n\n// Lifecycle status: green = in, amber = awaiting, red = killed, muted = lapsed.\nconst STATUS_BADGE: Record<InvitationView['status'], string> = {\n accepted: 'border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]',\n pending: 'border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)] text-[var(--surface-warning-text)]',\n revoked: 'border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]',\n expired: 'border-[var(--border-default)] text-[var(--text-muted)]',\n}\n\n// Delivery status: red = bounced, amber = not yet attempted, muted = the normal happy path.\nconst EMAIL_BADGE: Record<InvitationView['emailStatus'], string> = {\n sent: 'border-[var(--border-default)] text-[var(--text-muted)]',\n not_sent: 'border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)] text-[var(--surface-warning-text)]',\n failed: 'border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)]',\n}\n\nexport function InvitationsPanel({\n invitations,\n currentRole,\n onInvite,\n onResend,\n onRevoke,\n onCopy,\n onNotice,\n}: InvitationsPanelProps) {\n const [inviteEmail, setInviteEmail] = useState('')\n const [inviteRole, setInviteRole] = useState<WorkspaceRole>('editor')\n const [inviting, setInviting] = useState(false)\n const [busyId, setBusyId] = useState<string | null>(null)\n\n const canManage = hasWorkspaceRole(currentRole, 'admin')\n\n function notify(kind: 'success' | 'error', message: string) {\n onNotice?.({ kind, message })\n }\n\n async function submitInvite() {\n const email = inviteEmail.trim()\n if (!email || inviting) return\n setInviting(true)\n try {\n await onInvite({ email, role: inviteRole })\n notify('success', `Invitation sent to ${email}`)\n setInviteEmail('')\n } catch (err) {\n notify('error', err instanceof Error ? err.message : 'Failed to invite')\n } finally {\n setInviting(false)\n }\n }\n\n async function copyLink(inviteUrl: string) {\n try {\n if (onCopy) await onCopy({ inviteUrl })\n else await navigator.clipboard.writeText(inviteUrl)\n notify('success', 'Invite link copied')\n } catch (err) {\n notify('error', err instanceof Error ? err.message : 'Failed to copy link')\n }\n }\n\n async function resend(invitationId: string) {\n setBusyId(invitationId)\n try {\n await onResend({ invitationId })\n notify('success', 'Invitation resent')\n } catch (err) {\n notify('error', err instanceof Error ? err.message : 'Failed to resend invitation')\n } finally {\n setBusyId(null)\n }\n }\n\n async function revoke(invitationId: string) {\n setBusyId(invitationId)\n try {\n await onRevoke({ invitationId })\n notify('success', 'Invitation revoked')\n } catch (err) {\n notify('error', err instanceof Error ? err.message : 'Failed to revoke invitation')\n } finally {\n setBusyId(null)\n }\n }\n\n return (\n <section className=\"flex flex-col gap-4\">\n {canManage && (\n <div className=\"flex flex-col gap-1.5\">\n <label className=\"text-xs font-medium text-[var(--text-muted)]\">Invite by email</label>\n <div className=\"flex gap-2\">\n <input\n type=\"email\"\n placeholder=\"colleague@example.com\"\n value={inviteEmail}\n aria-label=\"Invite email address\"\n onChange={(event) => setInviteEmail(event.target.value)}\n onKeyDown={(event) => { if (event.key === 'Enter') void submitInvite() }}\n className=\"flex-1 rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-3 py-1.5 text-sm text-[var(--text-primary)] placeholder:text-[var(--text-muted)]\"\n />\n <select\n value={inviteRole}\n aria-label=\"Invite role\"\n onChange={(event) => setInviteRole(event.target.value as WorkspaceRole)}\n className=\"rounded border border-[var(--border-default)] bg-[var(--bg-input)] px-2 py-1.5 text-xs text-[var(--text-secondary)]\"\n >\n {ASSIGNABLE.map((option) => (\n <option key={option.value} value={option.value}>{option.label}</option>\n ))}\n </select>\n <button\n type=\"button\"\n onClick={() => void submitInvite()}\n disabled={inviting || !inviteEmail.trim()}\n className=\"rounded bg-[var(--brand-primary)] px-3 py-1.5 text-sm text-white disabled:opacity-50\"\n >\n {inviting ? 'Inviting…' : 'Invite'}\n </button>\n </div>\n </div>\n )}\n\n <div className=\"flex flex-col gap-2 border-t border-[var(--border-default)] pt-3\">\n <div className=\"flex items-center justify-between\">\n <h4 className=\"text-xs font-semibold text-[var(--text-primary)]\">Invitation history</h4>\n <span className=\"text-xs text-[var(--text-muted)]\">{invitations.length} total</span>\n </div>\n {invitations.length === 0 ? (\n <p className=\"text-sm text-[var(--text-muted)]\">No invitations yet.</p>\n ) : (\n invitations.map((invitation) => (\n <InvitationRow\n key={invitation.id}\n invitation={invitation}\n canManage={canManage}\n busy={busyId === invitation.id}\n onCopy={() => void copyLink(invitation.inviteUrl)}\n onResend={() => void resend(invitation.id)}\n onRevoke={() => void revoke(invitation.id)}\n />\n ))\n )}\n </div>\n </section>\n )\n}\n\ninterface InvitationRowProps {\n invitation: InvitationView\n canManage: boolean\n busy: boolean\n onCopy(): void\n onResend(): void\n onRevoke(): void\n}\n\nfunction InvitationRow({ invitation, canManage, busy, onCopy, onResend, onRevoke }: InvitationRowProps) {\n const isPending = invitation.status === 'pending'\n const emailFailed = invitation.emailStatus === 'failed'\n const expiry = new Date(invitation.expiresAt).toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return (\n <div className=\"rounded-lg border border-[var(--border-default)] p-3\">\n <div className=\"flex items-start justify-between gap-3\">\n <div className=\"min-w-0\">\n <p className=\"truncate text-sm font-medium text-[var(--text-primary)]\">{invitation.email}</p>\n <p className=\"text-xs capitalize text-[var(--text-muted)]\">\n {invitation.permissions} · expires {expiry}\n </p>\n {emailFailed && (\n <p className=\"mt-1 text-xs text-[var(--surface-danger-text)]\">Email was not sent — copy the link to share it.</p>\n )}\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n <span className={`${BADGE_BASE} ${STATUS_BADGE[invitation.status]}`}>\n {invitation.status}\n </span>\n <span className={`${BADGE_BASE} ${EMAIL_BADGE[invitation.emailStatus]}`}>\n {invitation.emailStatus.replace('_', ' ')}\n </span>\n </div>\n </div>\n {canManage && isPending && (\n <div className=\"mt-3 flex items-center justify-end gap-2\">\n <button\n type=\"button\"\n onClick={onCopy}\n disabled={busy}\n className=\"rounded border border-[var(--border-default)] px-2 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] disabled:opacity-50\"\n >\n Copy link\n </button>\n <button\n type=\"button\"\n onClick={onResend}\n disabled={busy}\n className=\"rounded border border-[var(--border-default)] px-2 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] disabled:opacity-50\"\n >\n {busy ? 'Working…' : 'Resend'}\n </button>\n <button\n type=\"button\"\n onClick={onRevoke}\n disabled={busy}\n className=\"rounded px-2 py-1 text-xs text-[var(--text-danger)] hover:bg-[var(--border-default)] disabled:opacity-50\"\n >\n Revoke\n </button>\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;AAYA,SAAS,gBAAgB;AAqGf,cACA,YADA;AAhGV,IAAM,aAAwD;AAAA,EAC5D,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,EACnC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,EACnC,EAAE,OAAO,SA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