import { toTaskListModel, type TaskListData, type TaskListModel } from "@toolctrl/view-models"; import { renderTaskList } from "@toolctrl/ui-subframe"; import { defineAdapter } from "./defineAdapter.js"; /** * Normalizes the domain {@link TaskListData} into the {@link TaskListModel} * prop-model the UI implementation renders (M015). Reuses the VM's pure * `toTaskListModel` mapper so the Subframe / mock renderers stay dumb and * swappable (M017 hot-swap drill). Backs both the standalone `/tasks` browser * and the embedded entity "Tasks tab" (DoD 8). */ export function toTaskListProps(vm: TaskListData): TaskListModel { return toTaskListModel(vm); } export const taskListAdapter = defineAdapter({ name: "taskList", toProps: toTaskListProps, defaultRenderer: renderTaskList, });