refactor: replace overloaded surface terminology

This commit is contained in:
Turtle
2026-07-24 19:54:25 +08:00
parent c172faed37
commit 0c708cb10d
626 changed files with 1396 additions and 1397 deletions

View File

@@ -6,7 +6,7 @@ export { bindSnapshotSelector } from './bind.ts'
/**
* Selector hook over a session's conversation snapshot. Wide (`object`) by
* default inside this dependency-inverted package; runtime narrows it once at
* its export surface (`UseSession<ConversationSnapshot>`) — the snapshot type
* its exports (`UseSession<ConversationSnapshot>`) — the snapshot type
* never flows back into web-react.
*/
export type UseSession<Snap extends object = object> = SnapshotSelectorHook<Snap>

View File

@@ -20,7 +20,7 @@ export const HostContext = createContext<SlotRendererHost | null>(null)
/**
* Read the installed renderer host; throws outside the rendered root tree
* (framework components must not render detached from the renderer).
* @returns the host surface.
* @returns the host API.
*/
export function useHost(): SlotRendererHost {
const host = useContext(HostContext)
@@ -132,7 +132,7 @@ export function SessionMaybeProvider({ children }: { children: ReactNode }) {
)
}
/** SessionProvider surface: render-prop body plus the no-session branch. */
/** SessionProvider API: render-prop body plus the no-session branch. */
export interface SessionProviderProps {
/** No-session body (also covers a current id whose session cannot be resolved). */
empty?: (() => ReactNode) | undefined