docs(architecture): consolidate domain protocols

This commit is contained in:
2026-07-21 10:08:12 +08:00
parent 8d6fe1e550
commit 17e5656f53
11 changed files with 524 additions and 149 deletions
+1 -3
View File
@@ -1,8 +1,6 @@
"use client";
/**
* PaymentContext:基于 XState v5 的 React Context Provider
*/
/** Route UI reads this projection instead of the Payment machine snapshot. */
import type { Dispatch, ReactNode } from "react";
import { createActorContext, shallowEqual } from "@xstate/react";
import type { SnapshotFrom } from "xstate";
+1 -3
View File
@@ -1,6 +1,4 @@
/**
* Payment 状态机:事件联合
*/
/** Public events for one route-scoped Payment actor. */
import type { PayChannel } from "@/data/schemas/payment";
import type { PaymentPlanCatalog } from "./payment-state";
+1 -3
View File
@@ -1,6 +1,4 @@
/**
* Payment 状态机:State 形状 + 初始值
*/
/** Context shared by the default and Tip payment catalogs. */
import type {
PayChannel,
PaymentOrderStatus,
@@ -10,6 +10,7 @@ import type {
PrivateRoomState as MachineContext,
} from "./private-room-machine";
/** Route UI reads this projection instead of the Private Room snapshot. */
export interface PrivateRoomContextState {
characterId: string;
status: string;
@@ -1,3 +1,4 @@
/** Public events for one character-scoped Private Room actor. */
export type PrivateRoomEvent =
| { type: "PrivateRoomInit" }
| { type: "PrivateRoomRefresh" }