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:
2026-11-05 15:16:07 +00:00
parent 1d8b8c2101
commit bf31184d4d
151 changed files with 4823 additions and 98 deletions
@@ -6,10 +6,13 @@ import java.util.ArrayList;
import java.util.LinkedHashMap;
public record FESurfaceContext(
ReadOnlyList<Addressable> assets) {
ReadOnlyList<Addressable> assets, ReadOnlyList<p.animation.AnimationSource> animations) {
public FESurfaceContext(ReadOnlyList<Addressable> assets) { this(assets, ReadOnlyList.empty()); }
public FESurfaceContext {
assets = normalizeAssets(assets);
animations = animations == null ? ReadOnlyList.empty() : animations;
}
public static FESurfaceContext empty() {
@@ -10,7 +10,13 @@ import java.util.Objects;
/** A compiler-known source and the semantic context for exactly that content. */
public record FrontendSourceDocument(
Path path, String text, String origin, String name, String languageId,
boolean readOnly, FrontendEditorialContext context) {
boolean readOnly, FrontendEditorialContext context, java.util.List<OriginSpan> origins, String generationRevision) {
public record OriginSpan(int startOffset, int endOffset, Path definitionPath, String jsonPointer, String assetUuid) {
public OriginSpan(int startOffset,int endOffset,Path path,String pointer){this(startOffset,endOffset,path,pointer,null);}
}
public FrontendSourceDocument(Path path,String text,String origin,String name,String languageId,boolean readOnly,FrontendEditorialContext context) {
this(path,text,origin,name,languageId,readOnly,context,java.util.List.of(),"");
}
public FrontendSourceDocument {
path = Objects.requireNonNull(path).toAbsolutePath().normalize();
Objects.requireNonNull(text);
@@ -18,12 +24,13 @@ public record FrontendSourceDocument(
Objects.requireNonNull(name);
Objects.requireNonNull(languageId);
Objects.requireNonNull(context);
origins=java.util.List.copyOf(origins); generationRevision=Objects.requireNonNull(generationRevision);
}
public String revision() {
try {
return HexFormat.of().formatHex(MessageDigest.getInstance("SHA-256")
.digest(text.getBytes(StandardCharsets.UTF_8)));
.digest((generationRevision.isEmpty()?text:text+"\n"+generationRevision).getBytes(StandardCharsets.UTF_8)));
} catch (NoSuchAlgorithmException impossible) {
throw new IllegalStateException(impossible);
}