feat(web): SpaceInviteCard component with snapshot/live/revoked render states

Renders space invite system messages in DMs as embed-style cards on the chat
surface. Three render states: snapshot-only on mount (Join enabled, loading
dot), live-confirmed (memberCount refreshed from preview), revoked (gray-out
+ glass-pill indicator). Join targets the space's home origin via
joinByCode(code, spaceInstanceOrigin || undefined) — the three-way
federation correctness rule. Re-exports getApiForOrigin from api/client to
expose the cross-store resolver under a natural import surface.
This commit is contained in:
Jannis Braun
2026-04-29 21:50:01 +02:00
parent 657cc0e1b9
commit 82533c1434
3 changed files with 206 additions and 0 deletions
+7
View File
@@ -812,3 +812,10 @@ export function createApiClient(origin: string, getToken: () => string | null, o
const baseUrl = origin ? `${origin}/api` : '/api';
return new BackspaceApiClient(baseUrl, getToken, onUnauthorized);
}
// Re-export the cross-store origin resolver so consumers can do
// `import { getApiForOrigin } from '../api/client'`. The real implementation
// lives in `utils/crossStoreResolvers` to avoid TDZ cycles between stores;
// re-exporting here keeps the public import surface clean for callers that
// don't need to know about the internal indirection.
export { getApiForOrigin } from '../utils/crossStoreResolvers';