跳转到内容

签名关联类型:ImageFocusDetails – ManagedNodeMigrationAdapter

本页由当前 SDK 声明自动生成。

返回接口索引

ImageFocusDetails · ImageFocusVersion · ImagePixelSource · ImageProjectDocument · ImageProjectDocumentVersion · ImageProjectReferencesRequest · ImageProjectReferencesResult · InputScope · InstalledExtensionView · InstanceDataScope · IntegerSettingDefinition · InteractionQuery · JournalEntry · JournalEntryState · JournalPendingEntry · JournalPlannedEdit · KeyframeMotion · Leg · LegacyImageEditDocument · LogLevel · ManagedNodeCopyContext · ManagedNodeCopyEntry · ManagedNodeLifecycle · ManagedNodeMigrationAdapter

ImageFocusDetails

图片聚焦的瞬时源像素纹理,与规范文档和宿主剪贴板无关。

export type ImageFocusDetails = {
nodeId: string;
width: number;
height: number;
tiles: readonly {
x: number;
y: number;
width: number;
height: number;
pixels: Uint8Array;
}[];
onUploadFailure?: () => void;
};

ImageFocusVersion

export type ImageFocusVersion = typeof IMAGE_FOCUS_VERSION;

ImagePixelSource

export type ImagePixelSource = Uint8Array | NativeImageResource;

关联类型:NativeImageResource

ImageProjectDocument

编辑器工程编辑定义(WooHaa3-image-project-v1,design D4)。

只保存稳定引用与身份,不内嵌文档树、字体或像素。canvasWidth/canvasHeight 是裁剪后 的当前画布尺寸,允许不等于原始来源尺寸;outputAssetId(节点字段)继续指向合成 PNG。

export type ImageProjectDocument = {
version: ImageProjectDocumentVersion;
engine: string;
engineVersion: string;
formatVersion: number;
baseAssetId: string;
sourceWidth: number;
sourceHeight: number;
canvasWidth: number;
canvasHeight: number;
documentContentHash: string;
project: ImageEditProjectObjectRef;
sourceAssetIds: string[];
};

关联类型:ImageProjectDocumentVersion · ImageEditProjectObjectRef

成员说明:

  • engine:固定引擎标识。
  • engineVersion:引擎自身版本标识,兼容性由扩展决定。
  • formatVersion:编辑器原生 文档格式版本。
  • baseAssetId:同画布稳定原图资产引用。
  • sourceWidth:原始来源尺寸(裁剪前,方向归一)。
  • canvasWidth:当前画布尺寸(裁剪后)。
  • documentContentHash:规范文档内容 hash(64 位小写 hex);排除选区/取景/活动层/工具/撤销栈/打包时间。
  • project:工程对象稳定 metadata。
  • sourceAssetIds:使用到的稳定资产引用(含 baseAssetId;去重、稳定顺序、有界)。

ImageProjectDocumentVersion

export type ImageProjectDocumentVersion = typeof IMAGE_PROJECT_DOCUMENT_VERSION;

ImageProjectReferencesRequest

目标画布可写、来源画布可读后,服务端核对实际引用并返回权威资产。

export type ImageProjectReferencesRequest = {
canvasId: string;
sourceCanvasId: string;
nodeIds: string[];
assetIds: string[];
projects: ImageEditProjectObjectRef[];
};

关联类型:ImageEditProjectObjectRef

ImageProjectReferencesResult

export type ImageProjectReferencesResult = {
assets: StoredAsset[];
};

关联类型:StoredAsset

InputScope

export type InputScope = "modal" | "menu" | "editor";

InstalledExtensionView

本次启动扫描并装配的扩展(「在场」信息,只读展示)。

启用/停用不在这里:它是站点控制面的 desiredEnabled,运行中生效。目录名只表达扩展是否 已安装(. 前缀 = 未安装,沿用扫描语义),不表达「已装但停用」。

export type InstalledExtensionView = {
id: string;
label: string;
description: string;
directory: string;
icon?: PluginIcon;
version?: string;
writable: boolean;
managed?: boolean;
previousVersion?: string;
builtinVersion?: string;
sourceId?: string;
trust?: ExtensionTrust;
quarantine?: string;
restartRequired?: boolean;
observeUntil?: string;
};

关联类型:PluginIcon · ExtensionTrust

成员说明:

  • directory:扩展所在绝对目录,仅用于展示。
  • version:扩展声明的版本,设置面按 v<version> 展示。 来源按可信程度取值:宿主已加载的可信元数据(站点声明 / provider metadata)> 浏览器产物 artifact-manifest.json 的 metadata > package.json;都没有时缺省(不展示版本)。
  • writable:所在扩展根是否被声明为可写根;只有可写根允许在面板里安装/卸载。
  • managed:受管扩展。 只有受管扩展在设置面显示卸载 / 回滚 / 来源 / 信任 / 权限;内置根扩展缺省为 false。
  • previousVersion:受管扩展可回滚到的上一版本。
  • builtinVersion:同 id 受管版本覆盖的内置版本。仅在受管版本严格高于内置版本时出现; 卸载受管版本后本机回到这个内置版本(能热切换时立即恢复,否则下一次启动)。
  • sourceId:安装来源(local-file 或某个市场来源)。
  • restartRequired:含后端代码的受管扩展已提交新版本,需要受控重启后生效。
  • observeUntil:观察期截止时间(ISO);观察期内激活失败或健康连续失败会自动回滚。

InstanceDataScope

export type InstanceDataScope = DataScopeFields & Readonly<{
kind: "instance";
}>;

关联类型:DataScopeFields

成员说明:

  • ownerId:会话仓库中的兼容定位键。
  • credentialOwnerId:加密凭据的兼容定位键,不改变加密 AAD。

IntegerSettingDefinition

export type IntegerSettingDefinition = SettingBase & {
kind: "integer";
default?: number;
min?: number;
max?: number;
};

关联类型:SettingBase

成员说明:

  • label:设置页上的名称。
  • reload:hot:运行中生效;restart:写入后需要重启进程。
  • legacyEnv:过渡期兼容的旧环境变量名;新配置项不要再声明。
  • group:设置页上的分组(插件配置项按插件分组)。
  • ownerExtensionId:声明这段配置的扩展 id(宿主装载器按插件名填入)。设置面据此把「这个配置段的启停」 放到配置旁边,而不是留在插件清单里。

InteractionQuery

版本化 2D 查询结果:命中或 null(合法空白),或 ok:false(unavailable/stale)。

export type InteractionQuery<T> = {
ok: true;
generation: number;
value: T;
} | {
ok: false;
reason: "unavailable" | "stale" | "unsupported";
};

JournalEntry

export type JournalEntry = CanvasJournalEntry | ParameterJournalEntry | ExternalJournalEntry;

关联类型:CanvasJournalEntry · ParameterJournalEntry · ExternalJournalEntry

成员说明:

  • state:只有正式撤销栈中的记录才是 committed。

JournalEntryState

export type JournalEntryState = "pending" | "committed" | "conflict" | "dropped" | "unknown";

JournalPendingEntry

等待结算/等待对账的记录(只显示状态,不参与已确认历史)。

export type JournalPendingEntry = {
kind: "canvas";
id: string;
commandId: string;
label: string;
state: "pending" | "unknown" | "conflict" | "dropped";
enqueuedAt: number;
submittedAt: string | null;
slow: boolean;
undoRequested: boolean;
redoRequested: boolean;
error: string | null;
};

成员说明:

  • slow:等待时间超过提示阈值(只影响提示,不改变终态)。
  • error:拒绝/失败原因。

JournalPlannedEdit

export type JournalPlannedEdit = {
preconditions: EditPrecondition[];
operations: EditOperation[];
};

关联类型:EditPrecondition · EditOperation

KeyframeMotion

export type KeyframeMotion = {
kind: "keyframes";
property: ModelTrackProperty;
frames: ModelKeyframe[];
};

关联类型:ModelTrackProperty · ModelKeyframe

Leg

type Leg = {
hipLocal: Vec3;
upperLength: number;
lowerLength: number;
soleLocal: Vec3;
};

关联类型:Vec3

LegacyImageEditDocument

旧标注编辑定义(WooHaa3-image-edit-v1,design D4:完整保留其语义与限制)。

仅保存当前内容;完整历史集合由 canvas-node-generation-history 持有。 sourceWidth/sourceHeight 为统一方向(EXIF 归一化)后的原始像素尺寸。

export type LegacyImageEditDocument = {
version: ImageEditDocumentVersion;
baseAssetId: string;
sourceWidth: number;
sourceHeight: number;
shapes: ImageEditShape[];
};

关联类型:ImageEditDocumentVersion · ImageEditShape

成员说明:

  • baseAssetId:同画布稳定原图资产引用(StoredAsset.id)。
  • shapes:有序 shapes:顺序即绘制顺序(后画先覆盖)。

LogLevel

export type LogLevel = "debug" | "info" | "warn" | "error";

ManagedNodeCopyContext

export type ManagedNodeCopyContext = {
readonly nodes: readonly ServerCanvas["document"]["nodes"][number][];
readonly nodeData: Readonly<ServerCanvas["nodeData"]>;
readonly nodeIds: ReadonlyMap<string, string>;
createId(prefix: string, index: number): string;
};

关联类型:ServerCanvas

ManagedNodeCopyEntry

export type ManagedNodeCopyEntry = {
sourceNodeId: string;
nodeId: string;
data: CanvasNodeData;
};

关联类型:CanvasNodeData

ManagedNodeLifecycle

Neutral, persistent ownership for extension managed nodes.

The canvas core deliberately treats entityId as opaque. Business codecs belong to the extension which registered the lifecycle implementation.

export type ManagedNodeLifecycle = "owner-managed";

ManagedNodeMigrationAdapter

Explicit offline boundary, called before repositories or live rooms open.

export type ManagedNodeMigrationAdapter = {
readonly extensionId: string;
readonly schemaVersion: 1;
migrate(canvas: ServerCanvas): {
canvas: ServerCanvas;
changed: boolean;
};
};

关联类型:ServerCanvas