feat(plugin-sdk): add TypeScript SDK for Infinite Canvas plugins with automatic JSX and build support

This commit is contained in:
HouYunFei
2026-07-15 15:31:48 +08:00
parent 8d3f244524
commit 75aafc115f
82 changed files with 3228 additions and 3288 deletions
+5 -5
View File
@@ -232,7 +232,7 @@ export default function ImagePage() {
data: { dataUrl: stored.url, storageKey: stored.storageKey, width: stored.width, height: stored.height, bytes: stored.bytes, mimeType: stored.mimeType },
metadata: { source: "image-page", prompt },
});
message.success("已加入我的素材");
message.success("已加入我的资产");
};
const insertPickedAsset = async (payload: InsertAssetPayload) => {
@@ -242,7 +242,7 @@ export default function ImagePage() {
const stored = await uploadImage(payload.dataUrl);
setReferences((value) => [...value, { id: nanoid(), name: payload.title, type: stored.mimeType, dataUrl: stored.url, storageKey: stored.storageKey }]);
} else {
message.warning("生图工作台只能使用文本或图片素材");
message.warning("生图工作台只能使用文本或图片资产");
}
setAssetPickerOpen(false);
};
@@ -388,7 +388,7 @@ export default function ImagePage() {
</Button>
<Button size="small" icon={<FolderPlus className="size-3.5" />} onClick={() => setAssetPickerOpen(true)}>
</Button>
</div>
</div>
@@ -560,9 +560,9 @@ function ResultImageCard({
<span>{formatDuration(image.durationMs)}</span>
</div>
<div className="grid min-w-0 grid-cols-3 gap-2">
<Tooltip title="添加到素材">
<Tooltip title="添加到资产">
<Button className={RESULT_ACTION_BUTTON_CLASS} size="small" icon={<FolderPlus className="size-3.5" />} onClick={() => void onSaveAsset(image, index)}>
</Button>
</Tooltip>
<Tooltip title="加入参考图">