@byteplus/amk-editor 0.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +11 -0
- package/README.md +217 -0
- package/dist/amk-editor.d.ts +411 -0
- package/dist/amk-modal.d.ts +16 -0
- package/dist/api/client.d.ts +63 -0
- package/dist/api/preset-library.d.ts +18 -0
- package/dist/api/project.d.ts +47 -0
- package/dist/asr-progress-modal-view.d.ts +9 -0
- package/dist/asr-progress-modal.d.ts +11 -0
- package/dist/asr-provider.d.ts +17 -0
- package/dist/asr-text-layout.d.ts +4 -0
- package/dist/assets/asr-subtitle-dark.svg +3 -0
- package/dist/assets/asr-subtitle.svg +3 -0
- package/dist/assets/export-empty-dark.svg +66 -0
- package/dist/assets/export-empty-ellipse749.svg +3 -0
- package/dist/assets/export-empty-ellipse750.svg +3 -0
- package/dist/assets/export-empty-ellipse751.svg +3 -0
- package/dist/assets/export-empty-ellipse753.svg +3 -0
- package/dist/assets/export-empty-img2.svg +10 -0
- package/dist/assets/export-empty-img3.svg +10 -0
- package/dist/assets/export-empty-subtract.svg +14 -0
- package/dist/assets/export-modal-ai.png +0 -0
- package/dist/assets/export-modal-close.png +0 -0
- package/dist/assets/export-modal-info.png +0 -0
- package/dist/assets/export-modal-question.png +0 -0
- package/dist/assets/export-modal-select.png +0 -0
- package/dist/assets/export-task-error.svg +5 -0
- package/dist/assets/export-task-loading.svg +6 -0
- package/dist/assets/header-back.png +0 -0
- package/dist/assets/header-close.png +0 -0
- package/dist/assets/header-close.svg +5 -0
- package/dist/assets/header-edit.png +0 -0
- package/dist/assets/header-export-download.svg +5 -0
- package/dist/assets/header-export-history.svg +5 -0
- package/dist/assets/header-export.png +0 -0
- package/dist/assets/import-local.svg +3 -0
- package/dist/assets/import-menu-chevron-down.svg +3 -0
- package/dist/assets/import-menu-local.svg +3 -0
- package/dist/assets/import-menu-system-arrow.svg +3 -0
- package/dist/assets/import-menu-system-cloud.svg +3 -0
- package/dist/assets/import-menu-url.svg +3 -0
- package/dist/assets/import-url.svg +10 -0
- package/dist/assets/project-loading.svg +6 -0
- package/dist/byteplus-export-source-adapter.d.ts +9 -0
- package/dist/config-validation.d.ts +3 -0
- package/dist/confirm-modal-view.d.ts +16 -0
- package/dist/confirm-modal.d.ts +14 -0
- package/dist/distribution.d.ts +16 -0
- package/dist/export-modal-view.d.ts +13 -0
- package/dist/export-modal.d.ts +63 -0
- package/dist/export-project-adapter.d.ts +14 -0
- package/dist/export-task-polling.d.ts +15 -0
- package/dist/header.d.ts +57 -0
- package/dist/i18n/index.d.ts +17 -0
- package/dist/i18n/keys.d.ts +107 -0
- package/dist/i18n/locales/en-US.d.ts +2 -0
- package/dist/i18n/locales/zh-CN.d.ts +2 -0
- package/dist/import-actions-dropdown-view.d.ts +15 -0
- package/dist/import-actions.d.ts +29 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +2907 -0
- package/dist/legacy-export-adapter.d.ts +7 -0
- package/dist/local-upload-modal-view.d.ts +13 -0
- package/dist/local-upload-modal.d.ts +13 -0
- package/dist/material-source.d.ts +5 -0
- package/dist/modal-page-overscroll.d.ts +4 -0
- package/dist/project-bootstrap.d.ts +11 -0
- package/dist/public-types.d.ts +147 -0
- package/dist/react-mount.d.ts +10 -0
- package/dist/refresh-play-info.d.ts +34 -0
- package/dist/remote-edit-param-schema.d.ts +29 -0
- package/dist/runtime/veveditor.d.ts +6 -0
- package/dist/task-polling.d.ts +9 -0
- package/dist/task-query-status.d.ts +10 -0
- package/dist/toast.d.ts +36 -0
- package/dist/tos-upload.d.ts +74 -0
- package/dist/types.d.ts +344 -0
- package/dist/upload-queue.d.ts +6 -0
- package/dist/url-upload-modal-view.d.ts +13 -0
- package/dist/url-upload-modal.d.ts +12 -0
- package/dist/utils/material-extract.d.ts +62 -0
- package/dist/utils/signed-media-url-expiration.d.ts +2 -0
- package/dist/veveditor.css +1 -0
- package/dist/vod-openapi.d.ts +17 -0
- package/dist/vod-upload.d.ts +65 -0
- package/dist/xg-player-style-isolation.d.ts +6 -0
- package/package.json +43 -0
- package/third_party_notice.txt +1207 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Copyright 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. All Rights Reserved.
|
|
2
|
+
|
|
3
|
+
The AMK Editor SDK was developed by Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates (hereinafter “Volcano Engine”). Any rights, including but not limited to any copyrights or patent rights, are owned by and proprietary material of the Volcano Engine.
|
|
4
|
+
|
|
5
|
+
The AMK Editor SDK is licensed solely for integration within AI MediaKit which shall be used under a valid commercial license. Customers can contact service@volcengine.com for such commercial license. Here is also a link to AI MediaKit: https://www.volcengine.com/docs/6448/69e744e0d6af160501b2d70b?lang=zh.
|
|
6
|
+
|
|
7
|
+
Without Volcano Engine's prior written permission, any use of the AMK Editor SDK beyond its incorporation into AI MediaKit, in particular any use for commercial purposes, is strictly prohibited. This includes, without limitation, incorporation in a commercial product, use in a commercial service, or production of other artefacts for commercial purposes.
|
|
8
|
+
|
|
9
|
+
Without Volcano Engine's prior written permission, you shall not reproduce, modify, decompile, disassemble, reverse-engineer, or create derivative works of the AMK Editor SDK, nor access, extract, or obtain its source code by any means, or make it available in any form to any third party in any form. Any unauthorized modifications, derivative works, or adaptations of the AMK Editor SDK, along with all associated intellectual property rights, shall automatically and exclusively vest in Volcano Engine.
|
|
10
|
+
|
|
11
|
+
Except otherwise provided by Volcano Engine, the AMK Editor SDK is provided “AS IS” without any warranties. Volcano Engine disclaims all liability for damages arising from its use.
|
package/README.md
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# @byteplus/amk-editor
|
|
2
|
+
|
|
3
|
+
The official BytePlus AI MediaKit web video editor SDK.
|
|
4
|
+
|
|
5
|
+
## Automatic subtitles
|
|
6
|
+
|
|
7
|
+
The existing subtitle toolbar button uses the MaaS pipeline by default:
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
const editor = new AmkEditor({
|
|
11
|
+
container, projectId, endpoint,
|
|
12
|
+
toolbar: {
|
|
13
|
+
asr: { provider: 'maas' }, // Optional: this is the BytePlus default.
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Videos are processed by `extract-audio` with `format: 'mp3'`, followed by
|
|
19
|
+
`call-maas-proxy` with `api: 'doubao.asr'` and `show_utterances: true`.
|
|
20
|
+
HTTP(S) MP3/WAV/OGG audio is submitted directly; other or unknown audio
|
|
21
|
+
formats are converted using `transcode-audio` with `container_format: 'MP3'`.
|
|
22
|
+
The intermediate audio is not added to the project library. These requests
|
|
23
|
+
omit `media_output_destination` to obtain temporary HTTP(S) audio URLs.
|
|
24
|
+
All requests use your configured `endpoint` and `getHeaders`; no domestic
|
|
25
|
+
endpoint or credential is embedded in the SDK.
|
|
26
|
+
|
|
27
|
+
Sentence timestamps are converted from milliseconds and mapped to the
|
|
28
|
+
existing trimmed/speed-adjusted timeline. The existing
|
|
29
|
+
`toolbar.builtInVisibility.asrSubtitle` setting still controls visibility.
|
|
30
|
+
Cancelling the modal or destroying the editor stops local waiting and prevents
|
|
31
|
+
subsequent stages/subtitle insertion, but does not cancel already submitted
|
|
32
|
+
remote jobs or their charges.
|
|
33
|
+
|
|
34
|
+
Your proxy/account must support the above tools and task queries, with the
|
|
35
|
+
required model service and cross-service permissions enabled. Source URLs
|
|
36
|
+
must remain accessible to the backend. The pipeline has been verified on
|
|
37
|
+
Volcengine; availability on your BytePlus endpoint/account must be verified
|
|
38
|
+
separately. BytePlus rejects `toolbar.asr.provider: 'asr-subtitles'`, because that legacy
|
|
39
|
+
tool is unavailable. Volcengine defaults to `asr-subtitles` and can opt into `maas`.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install @byteplus/amk-editor
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
React 18 and React 19 are supported. Use of this SDK requires a valid BytePlus
|
|
48
|
+
commercial license. See [LICENSE](./LICENSE). Third-party open-source components
|
|
49
|
+
remain subject to their respective licenses.
|
|
50
|
+
|
|
51
|
+
## Quick start
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
import { AmkEditor } from '@byteplus/amk-editor';
|
|
55
|
+
|
|
56
|
+
const editor = new AmkEditor({
|
|
57
|
+
container,
|
|
58
|
+
projectId: 'your-project-id',
|
|
59
|
+
endpoint: 'https://your-backend.example.com',
|
|
60
|
+
source: 'your-app-name',
|
|
61
|
+
// Called before every request. The SDK does not parse or persist the headers.
|
|
62
|
+
getHeaders: async () => ({
|
|
63
|
+
Authorization: `Bearer ${await getLatestToken()}`,
|
|
64
|
+
}),
|
|
65
|
+
// Optional. Custom uploads take priority over built-in storage uploads.
|
|
66
|
+
material: {
|
|
67
|
+
onUploadFile: async file => uploadOneFile(file),
|
|
68
|
+
onUploadUrlMaterial: async urls => uploadUrls(urls),
|
|
69
|
+
onRefreshPlayInfo: async materials => refreshPlayableUrls(materials),
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
await editor.whenReady();
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Destroy the editor when the page is unmounted:
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
editor.destroy();
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Built-in VOD upload
|
|
83
|
+
|
|
84
|
+
BytePlus AMK does not currently support TOS or VOD output transfer through
|
|
85
|
+
`media_output_destination`. The BytePlus build therefore never sends this field
|
|
86
|
+
to AMK tool APIs, including when the same field is supplied explicitly in tool
|
|
87
|
+
parameters. This restriction applies only to AMK-side output transfer; it does
|
|
88
|
+
not disable browser-side VOD upload.
|
|
89
|
+
|
|
90
|
+
When `storage.media_output_destination` is `vod://<space>` and
|
|
91
|
+
`storage.getUploadSTS` is configured, the SDK uploads local files with its
|
|
92
|
+
distribution-specific VOD dependency:
|
|
93
|
+
|
|
94
|
+
These two fields must be configured together. Supplying only one of them causes
|
|
95
|
+
initialization to fail. If neither built-in storage nor a custom upload callback
|
|
96
|
+
is configured, the local-upload entry is hidden.
|
|
97
|
+
|
|
98
|
+
- `@byteplus/amk-editor` uses `@byteplus/uploader`, `ap-southeast-1`, and
|
|
99
|
+
`https://vod.byteplusapi.com`.
|
|
100
|
+
- `@volcengine/amk-editor` uses `tt-uploader`, `cn-north-1`, and
|
|
101
|
+
`https://vod.volcengineapi.com`.
|
|
102
|
+
|
|
103
|
+
The uploader is selected while building the SDK package. A BytePlus application
|
|
104
|
+
does not need to import or pass an uploader instance.
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
const editor = new AmkEditor({
|
|
108
|
+
// ...required options
|
|
109
|
+
storage: {
|
|
110
|
+
media_output_destination: 'vod://your-byteplus-space',
|
|
111
|
+
getUploadSTS: () => fetch('/api/vod-upload-sts', {
|
|
112
|
+
method: 'POST',
|
|
113
|
+
}).then(response => response.json()),
|
|
114
|
+
},
|
|
115
|
+
});
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Playback URL refreshes do not publish media. Publishing happens only after a successful built-in upload. Each VOD refresh batch shares one STS request and deduplicates playback queries by Vid.
|
|
119
|
+
|
|
120
|
+
`getUploadSTS` must return short-lived BytePlus VOD credentials containing
|
|
121
|
+
`AccessKeyId`, `SecretAccessKey`, `SessionToken`, `ExpiredTime`, and
|
|
122
|
+
`CurrentTime`. Keep permanent AK/SK credentials on your server. The SDK uploads
|
|
123
|
+
the file, publishes the resulting Vid, obtains an HTTP(S) playback URL, and
|
|
124
|
+
stores `vod://<space>/<Vid>` as the stable material identity.
|
|
125
|
+
|
|
126
|
+
Built-in BytePlus TOS browser upload is not enabled yet. Use
|
|
127
|
+
`material.onUploadFile` for TOS or another business storage service until the
|
|
128
|
+
BytePlus TOS endpoint integration is available.
|
|
129
|
+
|
|
130
|
+
## Custom upload priority
|
|
131
|
+
|
|
132
|
+
To use a business-owned upload flow, provide a custom callback:
|
|
133
|
+
|
|
134
|
+
```ts
|
|
135
|
+
material: {
|
|
136
|
+
onUploadFile: async file => uploadToYourStorage(file),
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Upload selection priority is:
|
|
141
|
+
|
|
142
|
+
1. `material.onUploadFile(file)`
|
|
143
|
+
2. Legacy `material.onUploadMaterial(files)`
|
|
144
|
+
3. SDK built-in VOD/TOS upload, when supported and configured
|
|
145
|
+
|
|
146
|
+
This means a configured custom upload callback always takes precedence over
|
|
147
|
+
`storage`.
|
|
148
|
+
|
|
149
|
+
## Material identity and playable URLs
|
|
150
|
+
|
|
151
|
+
`source_material_id` is the stable material identifier. A material may use a
|
|
152
|
+
TOS/VOD-style identifier while its `url` remains a long-lived or temporary
|
|
153
|
+
HTTP(S) playback URL.
|
|
154
|
+
|
|
155
|
+
Without a supported and fully configured built-in storage integration, the SDK
|
|
156
|
+
does not sign a material merely because `source_material_id` starts with
|
|
157
|
+
`tos://` or `vod://`:
|
|
158
|
+
|
|
159
|
+
- An existing HTTP(S) `url` is used as-is.
|
|
160
|
+
- If the URL is missing or expires, implement `material.onRefreshPlayInfo` and
|
|
161
|
+
return a fresh HTTP(S) URL.
|
|
162
|
+
- A material without a playable URL is not added to the editor.
|
|
163
|
+
|
|
164
|
+
## Upload concurrency
|
|
165
|
+
|
|
166
|
+
Use `material.uploadConcurrency` to limit concurrent local uploads in one editor:
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
material: {
|
|
170
|
+
uploadConcurrency: 3,
|
|
171
|
+
onUploadFile: async file => uploadToYourStorage(file),
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
The limit applies to `onUploadFile` and built-in local uploads. It does not apply
|
|
176
|
+
to URL imports or system-library imports.
|
|
177
|
+
|
|
178
|
+
## Common APIs
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
editor.requestMaterialImport('local');
|
|
182
|
+
editor.requestMaterialImport('url');
|
|
183
|
+
editor.requestMaterialImport('system');
|
|
184
|
+
|
|
185
|
+
await editor.refreshProject();
|
|
186
|
+
const materials = await editor.refreshMaterials();
|
|
187
|
+
const projectInfo = await editor.refreshProjectInfo();
|
|
188
|
+
await editor.updateTitle('New project title');
|
|
189
|
+
|
|
190
|
+
const task = await editor.getTask('your-task-id');
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
`container`, `projectId`, and `endpoint` are required. `getHeaders` is evaluated
|
|
194
|
+
before each request, so refreshed business credentials are used automatically.
|
|
195
|
+
All AMK service requests include `X-Amk-Task-Source: vibe-editing`; allow this
|
|
196
|
+
header in the CORS configuration of your proxy.
|
|
197
|
+
|
|
198
|
+
## Capture the current frame
|
|
199
|
+
|
|
200
|
+
```ts
|
|
201
|
+
await editor.whenReady();
|
|
202
|
+
const image = editor.getEditor()?.getFrame?.({ type: 'image/png' });
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
The method returns a data URL, or `null` before the canvas is initialized. Native
|
|
206
|
+
rendering mode does not support this API.
|
|
207
|
+
|
|
208
|
+
## Styling and isolation
|
|
209
|
+
|
|
210
|
+
Importing `@byteplus/amk-editor` automatically includes the SDK styles. The
|
|
211
|
+
editor uses normal DOM rather than Shadow DOM, so broad host-page selectors such
|
|
212
|
+
as `section`, `nav`, or `aside` can affect its layout. Size the mount container
|
|
213
|
+
directly and avoid tag-level layout overrides inside the editor.
|
|
214
|
+
|
|
215
|
+
## Temporary export Source compatibility
|
|
216
|
+
|
|
217
|
+
当前 BP SDK 在提交导出时遍历 Track 元素:元素 Source 为 vod:// 或 tos:// 地址时,优先使用刚刷新的素材播放 URL;仅运行时副本回退 UserData.url,因为服务端工程不会保存 UserData。其他 Source(例如文本、特效的协议或业务 ID)原样保留。该转换仅作用于导出副本,不处理 Extra,也不改变上传或工程中保存的 vod:// / tos:// 地址。缺少有效素材播放 URL 时,错误会指出元素 ID 和类型。BP 接口支持协议地址后,可删除 `src/byteplus-export-source-adapter.ts` 和 `src/amk-editor.ts` 中的调用。
|
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import './veveditor.css';
|
|
2
|
+
import type { AmkMaterialImportType, AmkMaterialImportRequestOptions, AmkEditorOptions, AmkExportRequestResult, AmkProjectSnapshot, AmkProjectInfo, MaterialItem, VeVeditorInstance } from './types';
|
|
3
|
+
import { type AmkI18nInstance } from './i18n';
|
|
4
|
+
import { type AmkInvokeToolParams } from './api/client';
|
|
5
|
+
export declare class AmkEditor {
|
|
6
|
+
private readonly options;
|
|
7
|
+
private config;
|
|
8
|
+
private readonly i18n;
|
|
9
|
+
private editor?;
|
|
10
|
+
private layout?;
|
|
11
|
+
private exportModal?;
|
|
12
|
+
private exportRequestInFlight?;
|
|
13
|
+
private readonly exportTaskPollingControllers;
|
|
14
|
+
private readonly exportTaskPollingTokens;
|
|
15
|
+
private exportTasks;
|
|
16
|
+
private exportTaskListLoaded;
|
|
17
|
+
private exportTaskListRequest?;
|
|
18
|
+
private readonly message;
|
|
19
|
+
private readonly notifiedToolErrors;
|
|
20
|
+
private importActions?;
|
|
21
|
+
/** 完整 VeVeditor 挂载前承载外部素材导入入口的隐藏节点。 */
|
|
22
|
+
private bootstrapImportHost?;
|
|
23
|
+
private asrProgressModal?;
|
|
24
|
+
private confirmModal?;
|
|
25
|
+
private emptyTrackConfirmInFlight?;
|
|
26
|
+
private readonly apiClient;
|
|
27
|
+
private readonly ready;
|
|
28
|
+
private readonly bootstrapAbortController;
|
|
29
|
+
private destroyed;
|
|
30
|
+
private projectName?;
|
|
31
|
+
private projectInfo?;
|
|
32
|
+
private editorRevision;
|
|
33
|
+
private projectHydrated;
|
|
34
|
+
private lastKnownTrack;
|
|
35
|
+
private intentionalEmptyTrackChange;
|
|
36
|
+
private emptyTrackSaveNeedsConfirmation;
|
|
37
|
+
private emptyTrackSaveBlocked;
|
|
38
|
+
private savedMaterials;
|
|
39
|
+
/** 工程初始化慢请求期间已完成的导入,防止最终快照将其覆盖。 */
|
|
40
|
+
private preMountImportedMaterials;
|
|
41
|
+
private saveQueue;
|
|
42
|
+
/** 初始化 URL refresh 的远端回写;允许先挂载 UI,但 whenReady 仍等待它完成。 */
|
|
43
|
+
private bootstrapRefreshSync;
|
|
44
|
+
/** 非轨道素材刷新必须在 VeVeditor 挂载后才启动,避免继续阻塞预览首帧。 */
|
|
45
|
+
private bootstrapRemainingMaterialRefresh?;
|
|
46
|
+
/** 初始化素材播放地址是否刷新成功;失败时禁止用工程旧 URL 新建抽帧任务。 */
|
|
47
|
+
private bootstrapMaterialRefreshSucceeded;
|
|
48
|
+
/** 最近一次 GET 或成功 PUT 后的服务端 editor 深比较基线。 */
|
|
49
|
+
private latestEditorFingerprint;
|
|
50
|
+
private latestEditorHasTrack;
|
|
51
|
+
/** 正在等待或执行的 editor 文档快照,用于合并高频重复事件。 */
|
|
52
|
+
private readonly pendingEditorSaveFingerprints;
|
|
53
|
+
/** 完整工程与轻量 editor 刷新共用队列,保证后发请求最后应用。 */
|
|
54
|
+
private runtimeRefreshQueue;
|
|
55
|
+
private projectRefreshInFlight?;
|
|
56
|
+
private materialsRefreshInFlight?;
|
|
57
|
+
private projectInfoRefreshInFlight?;
|
|
58
|
+
private editParamRefreshInFlight?;
|
|
59
|
+
private pendingSaveCount;
|
|
60
|
+
private readonly asrPollingControllers;
|
|
61
|
+
/** 当前前台 ASR 会话;取消、关闭或销毁后直接丢弃,不写入工程 JSON。 */
|
|
62
|
+
private activeAsrElementId?;
|
|
63
|
+
private asrSession?;
|
|
64
|
+
/** 提交 ASR 前的同步锁,防止连点在任务创建前重复提交 */
|
|
65
|
+
private readonly asrStartingElementIds;
|
|
66
|
+
/** sprite 抽帧任务轮询:key = material_id / source */
|
|
67
|
+
private readonly spritePollingControllers;
|
|
68
|
+
private readonly posterPollingControllers;
|
|
69
|
+
/** 同一素材的抽帧检查共享一条 Promise,避免初始化与热刷新重复建任务。 */
|
|
70
|
+
private readonly materialExtractInFlight;
|
|
71
|
+
/** 每个素材在本次会话只检查一次抽帧;新导入的素材仍会获得自己的首次检查。 */
|
|
72
|
+
private readonly materialExtractChecked;
|
|
73
|
+
/** 同一素材的过期图片只刷新一次地址;并发失败共享同一请求。 */
|
|
74
|
+
private readonly thumbnailErrorHandled;
|
|
75
|
+
/** 图片确实加载失败时,每个素材的封面/雪碧图各只补抽一次。 */
|
|
76
|
+
private readonly thumbnailReextractHandled;
|
|
77
|
+
private readonly thumbnailErrorInFlight;
|
|
78
|
+
/** TOS 上传完成前的素材面板占位:key = source_material_id。 */
|
|
79
|
+
private readonly tosUploadPlaceholders;
|
|
80
|
+
/** URL 上传完成前的素材面板占位:按本次导入批次暂存占位卡片 id。 */
|
|
81
|
+
private readonly urlUploadPlaceholders;
|
|
82
|
+
/** 同一素材的封面/雪碧图转存结果串行写回,避免自定义字段互相覆盖。 */
|
|
83
|
+
private readonly materialPatchQueues;
|
|
84
|
+
/** 等待批量落盘的素材;同一素材在窗口内只保留合并后的最新状态。 */
|
|
85
|
+
private readonly pendingMaterialPatches;
|
|
86
|
+
/** 包含等待中和提交中的最新本地状态,用于合并跨批次的并发字段。 */
|
|
87
|
+
private readonly latestMaterialPatches;
|
|
88
|
+
private materialPatchBatchTimer?;
|
|
89
|
+
/** 批次串行提交,避免先发批次晚返回后覆盖更新批次。 */
|
|
90
|
+
private materialPatchFlushQueue;
|
|
91
|
+
/** 前端抽帧封面缓存(不落盘):key = materialKey,value = dataURL */
|
|
92
|
+
private readonly posterCache;
|
|
93
|
+
/** 本次会话展示 URL 对应的原始 TOS/VOD 身份,供产物落盘后续签。 */
|
|
94
|
+
private readonly taskOutputIdentityByDisplayUrl;
|
|
95
|
+
/** 同一 URL 的封面抽帧只执行一次,避免初始化与上传回调重复请求。 */
|
|
96
|
+
private readonly posterCaptureInFlight;
|
|
97
|
+
/** 销毁编辑器时中断尚未完成的前端抽帧或 AMK 首帧轮询。 */
|
|
98
|
+
private readonly posterCaptureControllers;
|
|
99
|
+
/** 启动时加载的内置预设资源,供编辑器面板和 ASR 字幕复用。 */
|
|
100
|
+
private presetLibrary;
|
|
101
|
+
/** 所有 TOS 素材共用一个刷新定时器,避免按素材创建大量 timer。 */
|
|
102
|
+
private tosSignedUrlRefreshTimer?;
|
|
103
|
+
/** 同一组未变化的 TOS 签名 URL 只自动重签一次,避免失败后固定间隔空转。 */
|
|
104
|
+
private readonly tosSignedUrlRefreshAttempted;
|
|
105
|
+
private tosSignedUrlRefreshInFlight?;
|
|
106
|
+
/** 同一轮播放地址刷新合并 materialId,并串行执行各批次,避免并发覆盖轨道和 revision。 */
|
|
107
|
+
private readonly pendingPlayInfoRefreshes;
|
|
108
|
+
private playInfoRefreshBatchScheduled;
|
|
109
|
+
private playInfoRefreshQueue;
|
|
110
|
+
private readonly handleVisibilityChange;
|
|
111
|
+
private readonly handleTrackChanged;
|
|
112
|
+
private readonly handleEditParamChanged;
|
|
113
|
+
private readonly uploadQueue;
|
|
114
|
+
private activeUploadBatches;
|
|
115
|
+
constructor(options: AmkEditorOptions);
|
|
116
|
+
/** 等待工程拉取 / canvas 校正 / 挂载完成 */
|
|
117
|
+
whenReady(): Promise<this>;
|
|
118
|
+
getEditor(): VeVeditorInstance | undefined;
|
|
119
|
+
getI18n(): AmkI18nInstance;
|
|
120
|
+
/** 通用工具调用:POST /api/v1/tools/{toolName} */
|
|
121
|
+
invokeTool<T = unknown>(options: AmkInvokeToolParams): Promise<T>;
|
|
122
|
+
private wasToolErrorNotified;
|
|
123
|
+
/**
|
|
124
|
+
* Queries an asynchronous AMK task through the editor's configured endpoint
|
|
125
|
+
* and headers. Intended for host UI cards that track tasks created by editor
|
|
126
|
+
* operations such as {@link requestExport}.
|
|
127
|
+
*/
|
|
128
|
+
getTask<T = unknown>(taskId: string, options?: {
|
|
129
|
+
headers?: Record<string, string>;
|
|
130
|
+
signal?: AbortSignal;
|
|
131
|
+
}): Promise<T>;
|
|
132
|
+
/**
|
|
133
|
+
* Opens the existing export modal and resolves after the user confirms or cancels.
|
|
134
|
+
* Intended for Agent frontend tools (`request_export_task`). Header export still
|
|
135
|
+
* uses `open()` + direct submit and is unchanged.
|
|
136
|
+
*/
|
|
137
|
+
requestExport(): Promise<AmkExportRequestResult>;
|
|
138
|
+
/**
|
|
139
|
+
* 从外部工具栏打开 AMK Editor 已配置的素材导入入口。
|
|
140
|
+
* 本地、URL、资产库均复用素材面板中的同一套弹窗、回调和入库链路。
|
|
141
|
+
* @returns 当前入口存在且已触发时返回 true;未配置时返回 false。
|
|
142
|
+
*/
|
|
143
|
+
requestMaterialImport(type: AmkMaterialImportType, options?: AmkMaterialImportRequestOptions): boolean;
|
|
144
|
+
/**
|
|
145
|
+
* 直接导入外部 URL 素材,不打开 URL 输入弹窗。
|
|
146
|
+
* 供 Agent / 宿主前端 Tool 复用 material.onUploadUrlMaterial,并继续走
|
|
147
|
+
* AMK Editor 的素材持久化、面板更新与 onMaterialsImported 链路。
|
|
148
|
+
*/
|
|
149
|
+
uploadUrlMaterials(urls: string[]): Promise<MaterialItem[]>;
|
|
150
|
+
/**
|
|
151
|
+
* 从外部更新 AMK 工程标题。
|
|
152
|
+
* 保存成功后会同步编辑器顶栏与工程快照,并触发 header.onTitleUpdateSuccess。
|
|
153
|
+
*/
|
|
154
|
+
updateTitle(title: string): Promise<void>;
|
|
155
|
+
/**
|
|
156
|
+
* 获取工程全量参数(materials + editParam + projectName)。
|
|
157
|
+
* 从 VeVeditor 当前素材/草稿快照读取;未挂载时回落内置拉取到的快照。
|
|
158
|
+
*/
|
|
159
|
+
getProject(): AmkProjectSnapshot;
|
|
160
|
+
/**
|
|
161
|
+
* 从 Editing 工程接口重新拉取完整素材列表。
|
|
162
|
+
* 与 `getProject()` 的当前编辑器快照不同,该方法每次都会请求服务端,
|
|
163
|
+
* 适合素材引用面板等必须包含最新导出产物的场景。
|
|
164
|
+
*/
|
|
165
|
+
fetchProjectMaterials(): Promise<MaterialItem[]>;
|
|
166
|
+
/** 重新拉取全部素材并更新素材面板;不重新拉取或替换 Track、工程名。 */
|
|
167
|
+
refreshMaterials(): Promise<MaterialItem[]>;
|
|
168
|
+
/** 拉取完整工程元信息并应用相关字段;不刷新素材或 Track,也不回写工程。 */
|
|
169
|
+
refreshProjectInfo(): Promise<AmkProjectInfo>;
|
|
170
|
+
/**
|
|
171
|
+
* 重新拉取服务端工程,并把最新素材与 Track 热更新到当前编辑器。
|
|
172
|
+
* 用于 Agent 完成远端编辑后刷新右侧预览;不会产生撤销记录,也不会把回灌事件再次保存到服务端。
|
|
173
|
+
*/
|
|
174
|
+
refreshProject(): Promise<AmkProjectSnapshot>;
|
|
175
|
+
/**
|
|
176
|
+
* 只重新拉取服务端 editor 文档并热更新 Track。
|
|
177
|
+
* 不请求或替换工程名称、素材列表,适合 Agent 运行过程中的轻量预览刷新。
|
|
178
|
+
*/
|
|
179
|
+
refreshEditParam(): Promise<Record<string, unknown>>;
|
|
180
|
+
private enqueueRuntimeRefresh;
|
|
181
|
+
private refreshEditParamFromServer;
|
|
182
|
+
private refreshProjectFromServer;
|
|
183
|
+
/**
|
|
184
|
+
* 刷新素材播放信息(按需触发,如播放前 / 初始化)。
|
|
185
|
+
* - TOS 直传素材会先使用临时 STS 重签私有对象 URL
|
|
186
|
+
* - VOD 直传素材按 Vid 换取最新播放地址
|
|
187
|
+
* - 配置 `material.onRefreshPlayInfo` 后,宿主可继续覆盖播放字段
|
|
188
|
+
* - 三者都未配置时直接返回当前素材,不发请求
|
|
189
|
+
* @param materialIdOrIds 单个 material_id、material_id 列表;省略则刷新当前全部有 material_id 的素材
|
|
190
|
+
*/
|
|
191
|
+
refreshPlayInfo(materialIdOrIds?: string | string[]): Promise<MaterialItem | MaterialItem[] | undefined>;
|
|
192
|
+
private flushPlayInfoRefreshBatch;
|
|
193
|
+
private refreshPlayInfoInternal;
|
|
194
|
+
/**
|
|
195
|
+
* 异步初始化入口:并行加载工程与预设,完成数据归一化后再挂载编辑器,
|
|
196
|
+
* 最后注册运行期的 URL 刷新和页面可见性监听。destroy() 可随时中断该流程。
|
|
197
|
+
*/
|
|
198
|
+
private bootstrap;
|
|
199
|
+
/** 内置拉取工程:project + materials + editor → 归一化 → 组装 initialData。 */
|
|
200
|
+
private resolveAndApplyProject;
|
|
201
|
+
/**
|
|
202
|
+
* 初始化时批量 refresh 指定素材(未指定时保持全量刷新),
|
|
203
|
+
* 再把轨道元素里的 URL 回填到当前运行时。UserData 与素材媒体 HTTP Source
|
|
204
|
+
* 的变化都不作为主动回写 editor 文档的理由;其他剪辑变化保存时可附带最新 Source。
|
|
205
|
+
*/
|
|
206
|
+
private refreshProjectOnInit;
|
|
207
|
+
/**
|
|
208
|
+
* 首屏编辑器已经挂载后再刷新非轨道素材。刷新成功先热更新素材面板,
|
|
209
|
+
* 再后台持久化;失败只保留旧地址,不影响预览与 whenReady 收敛。
|
|
210
|
+
*/
|
|
211
|
+
private refreshRemainingMaterialsOnInit;
|
|
212
|
+
/** TOS 私有桶签名刷新优先,宿主刷新回调随后可继续覆盖播放信息。 */
|
|
213
|
+
private refreshMaterialTargets;
|
|
214
|
+
/**
|
|
215
|
+
* 将重签后的素材 URL 按 material_id 同步到轨道节点并重建媒体节点。
|
|
216
|
+
* URL 是运行时数据:只更新 SDK 内存与渲染节点,不主动保存工程,也不产生撤销步骤。
|
|
217
|
+
*/
|
|
218
|
+
private applyTrackMaterialUrls;
|
|
219
|
+
private resolveTosSignedResourceUrls;
|
|
220
|
+
private isTosSignedUrlRefreshAttempted;
|
|
221
|
+
private getExpiringTosMaterialIds;
|
|
222
|
+
private scheduleTosSignedUrlRefresh;
|
|
223
|
+
private refreshExpiringTosUrls;
|
|
224
|
+
private readonly handlePreviewNodeRefresh;
|
|
225
|
+
private resolveAndApplyPresetLibrary;
|
|
226
|
+
mount(): VeVeditorInstance;
|
|
227
|
+
/**
|
|
228
|
+
* 只挂载项目 header、弹窗和导入控制器,不创建重量级 VeVeditor。
|
|
229
|
+
* 该阶段只依赖工程基础 GET,可提前首屏可见与输入框上传响应。
|
|
230
|
+
*/
|
|
231
|
+
private mountLayout;
|
|
232
|
+
private mountVeVeditor;
|
|
233
|
+
private destroyLayout;
|
|
234
|
+
/** 在重量级编辑器创建前提供外部上传入口;节点本身不展示按钮。 */
|
|
235
|
+
private mountBootstrapImportActions;
|
|
236
|
+
/** 素材面板按钮与输入框「+」共用同一导入控制器。 */
|
|
237
|
+
private mountConfiguredImportActions;
|
|
238
|
+
destroy(): void;
|
|
239
|
+
private assertNotDestroyed;
|
|
240
|
+
private resolveConfig;
|
|
241
|
+
/** 与 VeVeditor 同一套顶层扁平资源字段:boolean 面板开关 + 内部 xgplayer 组装 */
|
|
242
|
+
private resolveVeVeditorOptions;
|
|
243
|
+
private resolveInternalConfig;
|
|
244
|
+
private enqueueSave;
|
|
245
|
+
private queueProjectNameSave;
|
|
246
|
+
private updateProjectTitle;
|
|
247
|
+
/**
|
|
248
|
+
* VeVeditor 删除前置钩子:远端删除成功后返回 true,底层才清理本地素材和轨道;
|
|
249
|
+
* 请求失败返回 false,保留当前素材。
|
|
250
|
+
*/
|
|
251
|
+
private deleteMaterial;
|
|
252
|
+
private queueEditorSave;
|
|
253
|
+
private setLatestEditorSnapshot;
|
|
254
|
+
private confirmAbnormalEmptyTrackSave;
|
|
255
|
+
private enqueueEditorSaveWithCurrentEditParam;
|
|
256
|
+
/**
|
|
257
|
+
* AMK 内部导出入口。
|
|
258
|
+
* 适配只作用于即将提交给导出接口的 editParam 副本,不写回工程或当前预览。
|
|
259
|
+
*/
|
|
260
|
+
private submitExport;
|
|
261
|
+
private startExportTaskStatusPolling;
|
|
262
|
+
private refreshExportTasksAfterSubmission;
|
|
263
|
+
private refreshLatestExportTasks;
|
|
264
|
+
private loadLatestExportTasks;
|
|
265
|
+
private clearExportTaskPolling;
|
|
266
|
+
private attach;
|
|
267
|
+
private detach;
|
|
268
|
+
private clearAsrPollingTimers;
|
|
269
|
+
private isAsrMediaElement;
|
|
270
|
+
/** 前台 ASR 弹窗打开期间,只允许当前素材对应的一个任务运行。 */
|
|
271
|
+
private isAsrBusy;
|
|
272
|
+
private cancelActiveAsrTask;
|
|
273
|
+
private completeAsrTask;
|
|
274
|
+
private createId;
|
|
275
|
+
private getTrackSnapshot;
|
|
276
|
+
private setTrackSnapshot;
|
|
277
|
+
private findTrackElementIndexById;
|
|
278
|
+
private resolveAsrMediaUrl;
|
|
279
|
+
private extractTaskId;
|
|
280
|
+
private submitAsrTask;
|
|
281
|
+
private queryAsrTask;
|
|
282
|
+
private isTaskCompleted;
|
|
283
|
+
private isTaskFailed;
|
|
284
|
+
private extractUtterances;
|
|
285
|
+
private normalizeAsrRange;
|
|
286
|
+
private resolveAsrTimelineMapping;
|
|
287
|
+
private createAsrTextElement;
|
|
288
|
+
private finishAsrAndCreateTextTrack;
|
|
289
|
+
private startAsrPolling;
|
|
290
|
+
private startAsrTask;
|
|
291
|
+
private resolveLocalFileType;
|
|
292
|
+
private createTosUploadPlaceholder;
|
|
293
|
+
private createUrlUploadPlaceholder;
|
|
294
|
+
private removeUrlUploadPlaceholders;
|
|
295
|
+
/** 资产库选中后立即展示 0% 上传占位卡片,写入素材库成功后再切换为完成态。 */
|
|
296
|
+
private addSystemTosImportPlaceholders;
|
|
297
|
+
private removeTosUploadPlaceholders;
|
|
298
|
+
private hasTosUploadPlaceholders;
|
|
299
|
+
private uploadFileWithPlaceholder;
|
|
300
|
+
private uploadCustomFile;
|
|
301
|
+
private uploadTosFile;
|
|
302
|
+
private uploadVodFile;
|
|
303
|
+
private hasVodStorage;
|
|
304
|
+
private hasTosStorage;
|
|
305
|
+
private getVodConfig;
|
|
306
|
+
private extractToolResult;
|
|
307
|
+
private requirePositiveNumber;
|
|
308
|
+
private waitForToolTask;
|
|
309
|
+
private probeAsyncMetadata;
|
|
310
|
+
private resolveMetadataProbeUrl;
|
|
311
|
+
private isPositiveNumber;
|
|
312
|
+
/**
|
|
313
|
+
* 单文件、批量、URL 与资产库导入的统一元信息兜底。
|
|
314
|
+
* 只探测当前缺失的必需字段,业务已经返回的合法值保持不变。
|
|
315
|
+
*/
|
|
316
|
+
private ensureImportedMaterialMetadata;
|
|
317
|
+
private prepareTosMaterial;
|
|
318
|
+
/** 将业务资产库的原始条目归一化为 SDK 素材;TOS 地址随后由 SDK 自行签发。 */
|
|
319
|
+
private normalizeSystemMaterial;
|
|
320
|
+
/**
|
|
321
|
+
* 资产库条目按项准备:启用 SDK TOS 存储时仅为 tos:// 条目签名;
|
|
322
|
+
* 未启用时保留业务长期 URL,缺少播放地址的条目交给业务刷新回调补齐。
|
|
323
|
+
*/
|
|
324
|
+
private prepareSystemMaterials;
|
|
325
|
+
private ingestTosImportedMaterials;
|
|
326
|
+
/**
|
|
327
|
+
* 本地 / URL 上传入库后的统一收口:
|
|
328
|
+
* POST 远端素材库 → 按 sprite/poster 判断发起抽帧并 PUT 更新。
|
|
329
|
+
*/
|
|
330
|
+
private ingestImportedMaterials;
|
|
331
|
+
/**
|
|
332
|
+
* 通知宿主素材已入库。抽帧仍在后台进行,不阻塞对话引用。
|
|
333
|
+
*/
|
|
334
|
+
private notifyMaterialsImported;
|
|
335
|
+
/**
|
|
336
|
+
* 本地上传 / URL 上传完成后,将新素材 POST 到 Editing API。
|
|
337
|
+
* 先确保远端持久化并合并 Editing API 返回的 material_id;成功后调用方
|
|
338
|
+
* 才写入素材面板(业务不用传 material_id;不覆盖本地 source / kid / 预览字段)。
|
|
339
|
+
*/
|
|
340
|
+
private persistUploadedMaterials;
|
|
341
|
+
/** 所有上传方式共用的入库边界:仅补探测缺失元信息,再创建远端素材。 */
|
|
342
|
+
private createImportedMaterials;
|
|
343
|
+
private rememberPreMountImportedMaterials;
|
|
344
|
+
private isHttpUrl;
|
|
345
|
+
private resolveDisplayPoster;
|
|
346
|
+
/**
|
|
347
|
+
* DataURL 已上屏时保留到本次会话结束,HTTP poster 只负责落库。
|
|
348
|
+
* 没有前端预览或当前缓存也是 HTTP 时,才切换到新的 HTTP 地址。
|
|
349
|
+
*/
|
|
350
|
+
private cachePersistedPosterForDisplay;
|
|
351
|
+
private withDisplayPosters;
|
|
352
|
+
private blobToDataUrl;
|
|
353
|
+
/** AMK 视频抽帧:指定第 0 帧并轮询任务结果。 */
|
|
354
|
+
private captureVideoPosterFromAmk;
|
|
355
|
+
/** 前端 Range + WebCodecs 解第一张同步帧。 */
|
|
356
|
+
private captureVideoPosterFromFrontend;
|
|
357
|
+
private isThumbnailFrontendDecodeEnabled;
|
|
358
|
+
/**
|
|
359
|
+
* 浏览器先解一帧仅作会话展示(DataURL 不落库)。
|
|
360
|
+
* 正式封面仍由 AMK 接口返回的 HTTP URL 负责持久化。
|
|
361
|
+
*/
|
|
362
|
+
private previewPosterFromFrontend;
|
|
363
|
+
/**
|
|
364
|
+
* 正式封面只走 AMK 抽帧接口;返回可落库的 HTTP URL。
|
|
365
|
+
* 前端预览由 {@link previewPosterFromFrontend} 并行触发。
|
|
366
|
+
*/
|
|
367
|
+
private captureVideoPosterFromUrl;
|
|
368
|
+
/**
|
|
369
|
+
* 抽帧临时 http 转存;失败回落临时链。
|
|
370
|
+
* 调用方应先上屏临时链,再后台调用本方法换链。
|
|
371
|
+
*/
|
|
372
|
+
private persistExtractUrls;
|
|
373
|
+
/**
|
|
374
|
+
* 后台转存:临时链已上屏/落盘后,换成长效地址再 PUT + 刷新面板。
|
|
375
|
+
* 未配置回调、转存失败或结果未变时不二次写盘。
|
|
376
|
+
*/
|
|
377
|
+
private schedulePersistExtractUrlsAndSwap;
|
|
378
|
+
/**
|
|
379
|
+
* 统一入口:初始化 / 新素材入库后,每个素材在本次会话只检查一次抽帧。
|
|
380
|
+
* - sprite / poster 缺失时创建任务;图片加载失败不再触发重抽
|
|
381
|
+
* - http 结果:先临时链上屏/PUT;若配置 onPersistExtractUrls 则后台转存换链
|
|
382
|
+
* - 封面:浏览器可并行解一帧作会话预览(DataURL 不落盘);正式封面始终走 AMK 接口 URL 落库
|
|
383
|
+
* - enableThumbnailDecode=true:跳过 sprite 接口,轨道缩略图走前端解码
|
|
384
|
+
*/
|
|
385
|
+
private ensureMaterialExtractTasks;
|
|
386
|
+
private ensureMaterialExtractTasksUnchecked;
|
|
387
|
+
private ensureTrackMaterialExtractTasks;
|
|
388
|
+
private ensureMaterialExtractTasksInBackground;
|
|
389
|
+
private createExtractFramesTask;
|
|
390
|
+
/** 导出结果是资源身份时,先换取浏览器可访问的播放地址。 */
|
|
391
|
+
private resolveExportOutputUrl;
|
|
392
|
+
/** 任务产物的 TOS/VOD 身份先换成浏览器可访问的 HTTP URL。 */
|
|
393
|
+
private signTaskOutputUrls;
|
|
394
|
+
private startSpritePolling;
|
|
395
|
+
private startPosterPolling;
|
|
396
|
+
private buildSpriteFromExtractResult;
|
|
397
|
+
private extractFirstSnapshotUrl;
|
|
398
|
+
/** 图片真实加载失败时先换一次过期签名,仍不可用则每类图片最多补抽一次。 */
|
|
399
|
+
private handleThumbnailError;
|
|
400
|
+
private resolveMaterialFromThumbnailError;
|
|
401
|
+
private findMaterialByKey;
|
|
402
|
+
private applyMaterialToPanel;
|
|
403
|
+
private enqueueMaterialPatch;
|
|
404
|
+
private patchMaterialRemote;
|
|
405
|
+
private flushPendingMaterialPatches;
|
|
406
|
+
private clearSpriteTimer;
|
|
407
|
+
private clearSpritePollingTimers;
|
|
408
|
+
private clearPosterTimer;
|
|
409
|
+
private clearPosterPollingTimers;
|
|
410
|
+
}
|
|
411
|
+
export declare function createAmkEditor(options: AmkEditorOptions): AmkEditor;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface AmkModalProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
className: string;
|
|
5
|
+
width: number;
|
|
6
|
+
popupContainer: HTMLElement;
|
|
7
|
+
ariaLabelledBy: string;
|
|
8
|
+
ariaDescribedBy?: string;
|
|
9
|
+
onCancel: () => void;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* AMK 弹窗只复用 VEVEditor 的样式类,避免旧 Modal 运行时依赖 React 19
|
|
14
|
+
* 已移除的 ReactDOM.findDOMNode。
|
|
15
|
+
*/
|
|
16
|
+
export declare function AmkModal({ visible, className, width, popupContainer, ariaLabelledBy, ariaDescribedBy, onCancel, children, }: AmkModalProps): React.ReactPortal | null;
|