feat(pbs): add sprite animation and shared Studio authoring
Implement DEC-0084 with factory-only Sprite/Animator structs, complete result lowering, validated animation sidecars, generated PBS factories and JavaFX/MCP authoring through shared services. Qualify native dev/release with ordinary and optimized producers, zero-allocation playback, private-cycle reclamation, canonical Composer pixels, installed JARs and JavaFX lifecycle. Preserve the runtime checkout and existing host ABI.
This commit is contained in:
@@ -3,7 +3,7 @@ import { LanguageClient } from "vscode-languageclient/node";
|
||||
|
||||
export const externalScheme = "prometeu-source";
|
||||
export type ExternalContent = {
|
||||
descriptor: { uri: string; revision: string; origin: string; name: string; languageId: string; readOnly: true };
|
||||
descriptor: { uri: string; revision: string; origin: string; name: string; languageId: string; readOnly: true; origins?: { startOffset: number; endOffset: number; definitionPath: string; jsonPointer: string; assetUuid: string }[] };
|
||||
text: string;
|
||||
};
|
||||
|
||||
@@ -74,6 +74,27 @@ export class ExternalSources implements vscode.TextDocumentContentProvider, vsco
|
||||
return content.text;
|
||||
}
|
||||
|
||||
originLenses(document: vscode.TextDocument): vscode.CodeLens[] {
|
||||
if (!this.canQuery(document)) return [];
|
||||
const content = this.documents.get(document.uri.toString());
|
||||
return (content?.descriptor.origins ?? []).map(origin => {
|
||||
const offset = Buffer.from(document.getText(), "utf8").subarray(0, origin.startOffset).toString("utf8").length;
|
||||
const position = document.positionAt(offset);
|
||||
return new vscode.CodeLens(new vscode.Range(position, position), {
|
||||
title: "Open animation definition in Studio", command: "prometeu.openAnimationOrigin",
|
||||
arguments: [document.uri, origin.startOffset]
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async openAnimationOrigin(uri: vscode.Uri, byteOffset: number): Promise<void> {
|
||||
const document = vscode.workspace.textDocuments.find(doc => doc.uri.toString() === uri.toString());
|
||||
if (!document || !this.canQuery(document) || !this.client || !this.consumerId)
|
||||
throw new Error("Animation source unavailable: navigate again to obtain the current revision.");
|
||||
await this.client.sendRequest<void>("prometeu/openAnimationOrigin",
|
||||
{ consumerId: this.consumerId, uri: uri.toString(), offset: byteOffset });
|
||||
}
|
||||
|
||||
async opened(document: vscode.TextDocument): Promise<void> {
|
||||
if (document.uri.scheme !== externalScheme) return;
|
||||
const content = this.documents.get(document.uri.toString());
|
||||
|
||||
Reference in New Issue
Block a user