Package ordinary PresentationMount contracts and typed React hosting

This commit is contained in:
Timothy J. Aveni
2026-09-25 12:26:34 -07:00
parent e7778b3518
commit c482a99aca
4 changed files with 19 additions and 6 deletions
+2 -2
View File
@@ -37,8 +37,8 @@ export function validatePresentations(workspace: WorkspaceRevision): CapabilityV
?.modules?.find((entry) => entry.id === presentation.componentId);
if (module) {
const contract = moduleContract(workspace.interfaceImports, module);
if (contract?.contract !== "org.quixos.react.subject-only/1")
fail(`${path}.componentId`, "Standalone presentation requires a subject-only module contract");
if (!contract || !["org.quixos.react.subject-only/1", "org.quixos.react.component/2"].includes(contract.contract))
fail(`${path}.componentId`, "Standalone presentation requires a supported React presentation contract");
if (contract?.subject?.kind !== "interface" || contract.subject.interfaceRevisionId !== presentation.subject)
fail(`${path}.subject`, "Component requires its exact declared subject interface");
continue;