Clarify independent nested plugin projection
This commit is contained in:
parent
ab8560e1fb
commit
fbab91d069
7 changed files with 27 additions and 13 deletions
|
|
@ -176,6 +176,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "story.choose",
|
||||
documentId: firstString(props.storyId, component.id),
|
||||
semanticOwner: "Sai",
|
||||
availability: "required",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -189,6 +190,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "graph.node.activate",
|
||||
documentId: firstString(props.sourceUri, props.documentId, component.id),
|
||||
semanticOwner: "Norn",
|
||||
availability: "optional-nested",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -202,6 +204,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "",
|
||||
documentId: firstString(props.sourceUri, props.source, component.id),
|
||||
semanticOwner: "EvePlugins",
|
||||
availability: "optional-nested",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,14 +32,14 @@ test("builds Unity scene projection capture artifact from provider advertisement
|
|||
assert.equal(projection.root.children[1].children[0].sceneObjectKind, "world-projection-node");
|
||||
});
|
||||
|
||||
test("keeps Sai, Norn, and TeX semantics in sidecar plugin projections", () => {
|
||||
test("marks Sai required and Norn TeX optional sidecar plugin projections", () => {
|
||||
const advertisement = structuredClone(saiAdvertisement);
|
||||
advertisement.surfaces[0].worldInteraction = {
|
||||
projectionKind: "provider-authored-visual-novel-surface",
|
||||
commandBoundary: "sai.vn.plugin.commands",
|
||||
receiptSchema: "gamecult.eve.command_receipt.v1",
|
||||
loweringTargets: ["unity-scene"],
|
||||
ownership: "provider-owns-story-state-plugin-sidecars-own-nested-semantics",
|
||||
ownership: "provider-owns-story-state-independent-plugin-sidecars-own-semantics",
|
||||
};
|
||||
|
||||
const projection = buildUnitySceneProjection(saiSurfaceDocument, advertisement, "sai.visual_novel.surface");
|
||||
|
|
@ -49,8 +49,11 @@ test("keeps Sai, Norn, and TeX semantics in sidecar plugin projections", () => {
|
|||
|
||||
assert.equal(projection.root.pluginProjection.pluginId, "sai.vn");
|
||||
assert.equal(projection.root.pluginProjection.semanticOwner, "Sai");
|
||||
assert.equal(projection.root.pluginProjection.availability, "required");
|
||||
assert.equal(graphNode.pluginProjection.pluginId, "norn.graph");
|
||||
assert.equal(graphNode.pluginProjection.semanticOwner, "Norn");
|
||||
assert.equal(graphNode.pluginProjection.availability, "optional-nested");
|
||||
assert.equal(texNode.pluginProjection.pluginId, "tex.math");
|
||||
assert.equal(texNode.pluginProjection.semanticOwner, "EvePlugins");
|
||||
assert.equal(texNode.pluginProjection.availability, "optional-nested");
|
||||
});
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "story.choose",
|
||||
documentId: firstString(props.storyId, component.id),
|
||||
semanticOwner: "Sai",
|
||||
availability: "required",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -202,6 +203,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "graph.focus",
|
||||
documentId: firstString(props.sourceUri, props.documentId, component.id),
|
||||
semanticOwner: "Norn",
|
||||
availability: "optional-nested",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -215,6 +217,7 @@ function buildPluginProjection(componentKind, component) {
|
|||
command: "",
|
||||
documentId: firstString(props.sourceUri, props.source, component.id),
|
||||
semanticOwner: "EvePlugins",
|
||||
availability: "optional-nested",
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ test("builds Unity UI Toolkit projection capture artifact from provider advertis
|
|||
assert.deepEqual(projection.root.classNames.slice(0, 2), ["eve-component", "eve-kind-surface"]);
|
||||
});
|
||||
|
||||
test("keeps Sai, Norn, and TeX semantics in sidecar plugin UI projections", () => {
|
||||
test("marks Sai required and Norn TeX optional sidecar plugin UI projections", () => {
|
||||
const advertisement = structuredClone(saiAdvertisement);
|
||||
advertisement.surfaces[0].worldInteraction = {
|
||||
projectionKind: "provider-authored-visual-novel-surface",
|
||||
commandBoundary: "sai.vn.plugin.commands",
|
||||
receiptSchema: "gamecult.eve.command_receipt.v1",
|
||||
loweringTargets: ["unity-uitoolkit"],
|
||||
ownership: "provider-owns-story-state-plugin-sidecars-own-nested-semantics",
|
||||
ownership: "provider-owns-story-state-independent-plugin-sidecars-own-semantics",
|
||||
};
|
||||
|
||||
const projection = buildUnityUiToolkitProjection(saiSurfaceDocument, advertisement, "sai.visual_novel.surface");
|
||||
|
|
@ -50,11 +50,14 @@ test("keeps Sai, Norn, and TeX semantics in sidecar plugin UI projections", () =
|
|||
|
||||
assert.equal(projection.root.pluginProjection.pluginId, "sai.vn");
|
||||
assert.equal(projection.root.pluginProjection.semanticOwner, "Sai");
|
||||
assert.equal(projection.root.pluginProjection.availability, "required");
|
||||
assert.equal(projection.root.visualElementKind, "SaiVisualNovelStageElement");
|
||||
assert.equal(graphNode.pluginProjection.pluginId, "norn.graph");
|
||||
assert.equal(graphNode.pluginProjection.semanticOwner, "Norn");
|
||||
assert.equal(graphNode.pluginProjection.availability, "optional-nested");
|
||||
assert.equal(graphNode.visualElementKind, "NornGraphElement");
|
||||
assert.equal(texNode.pluginProjection.pluginId, "tex.math");
|
||||
assert.equal(texNode.pluginProjection.semanticOwner, "EvePlugins");
|
||||
assert.equal(texNode.pluginProjection.availability, "optional-nested");
|
||||
assert.equal(texNode.visualElementKind, "TeXMathElement");
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue