@volcengine/amk-editor 0.0.4 → 0.0.5-beta.0

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/README.md CHANGED
@@ -65,7 +65,7 @@ editor.destroy();
65
65
  ## 接入说明
66
66
  - `projectId`、`endpoint` 必填。`endpoint` 指向你的业务代理。
67
67
  - `theme` 默认 `light`。未传或传入其他值时按浅色渲染;只有显式 `theme: 'dark'` 才走暗色。
68
- - 产物是面向浏览器的单文件 ESM。依赖里的 AMD `define(["./core"])` 和 Node `require('crypto')` 兜底已在构建时剔除,避免 Next.js / webpack / Rspack 误解析依赖或报告动态 require 警告;浏览器加密仍使用 Web Crypto。
68
+ - 产物是面向浏览器的单文件 ESM。依赖里的 AMD `define(["./core"])`、`define(["dayjs"])` 和 Node `require('crypto')` 兜底已在构建时剔除或中和,避免 Next.js / webpack / Rspack 误解析依赖或报告动态 require 警告;浏览器加密仍使用 Web Crypto。
69
69
  - `getHeaders` 可选,每次请求前都会重新调用;SDK 不解析、不缓存、不改写返回值,仅将其合并到发往 `endpoint` 的工程、素材、tools、tasks、导出等请求中。闭包内 Token 更新会自动用于下一次请求。
70
70
  - 本地上传、URL 导入由业务回调完成。返回的素材必须带业务主键 `source_material_id`,不必填写 `material_id`。
71
71
  - 播放地址、封面、雪碧图可能有时效。通过 `onRefreshPlayInfo` 返回新的访问地址;补丁按 `material_id`、`source_material_id`、无标识时数组顺序依次匹配,未返回的字段保持原值。
@@ -0,0 +1,13 @@
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
+ /** AMK 弹窗统一使用 VEVEditor 已采用的组件库 Modal。 */
13
+ export declare function AmkModal({ visible, className, width, popupContainer, ariaLabelledBy, ariaDescribedBy, onCancel, children, }: AmkModalProps): React.ReactElement;
@@ -2,7 +2,8 @@ import React from 'react';
2
2
  import type { AmkI18nInstance } from './i18n';
3
3
  export interface AsrProgressModalViewProps {
4
4
  visible: boolean;
5
+ popupContainer: HTMLElement;
5
6
  t: AmkI18nInstance['t'];
6
7
  onCancel: () => void;
7
8
  }
8
- export declare function AsrProgressModalView({ visible, t, onCancel, }: AsrProgressModalViewProps): React.ReactElement;
9
+ export declare function AsrProgressModalView({ visible, popupContainer, t, onCancel, }: AsrProgressModalViewProps): React.ReactElement;
@@ -0,0 +1,6 @@
1
+ <svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="Loading-progress">
3
+ <path id="Vector (Stroke)" opacity="0.3" d="M33.75 20C33.75 12.4061 27.5939 6.25 20 6.25C12.4061 6.25 6.25 12.4061 6.25 20C6.25 27.5939 12.4061 33.75 20 33.75C27.5939 33.75 33.75 27.5939 33.75 20ZM36.25 20C36.25 28.9746 28.9746 36.25 20 36.25C11.0254 36.25 3.75 28.9746 3.75 20C3.75 11.0254 11.0254 3.75 20 3.75C28.9746 3.75 36.25 11.0254 36.25 20Z" fill="#101013"/>
4
+ <path id="Vector (Stroke)_2" d="M33.75 20C33.75 19.3096 34.3096 18.75 35 18.75C35.6904 18.75 36.25 19.3096 36.25 20C36.25 28.9746 28.9746 36.25 20 36.25C19.3096 36.25 18.75 35.6904 18.75 35C18.75 34.3096 19.3096 33.75 20 33.75C27.5939 33.75 33.75 27.5939 33.75 20Z" fill="#101013"/>
5
+ </g>
6
+ </svg>
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import type { AmkI18nInstance } from './i18n';
3
3
  export interface ConfirmModalViewProps {
4
4
  visible: boolean;
5
+ popupContainer: HTMLElement;
5
6
  title: string;
6
7
  desc: string;
7
8
  theme?: 'light' | 'dark';
@@ -12,4 +13,4 @@ export interface ConfirmModalViewProps {
12
13
  /**
13
14
  * 对齐 VeVeditor 节点报错弹窗(EditorErrorDialog)的居中 Modal 结构与按钮层级。
14
15
  */
15
- export declare function ConfirmModalView({ visible, title, desc, theme, t, onConfirm, onCancel, }: ConfirmModalViewProps): React.ReactElement;
16
+ export declare function ConfirmModalView({ visible, popupContainer, title, desc, theme, t, onConfirm, onCancel, }: ConfirmModalViewProps): React.ReactElement;
@@ -4,9 +4,10 @@ import type { AmkI18nInstance } from './i18n';
4
4
  export interface ExportModalViewProps {
5
5
  videoName: string;
6
6
  visible: boolean;
7
+ popupContainer: HTMLElement;
7
8
  t: AmkI18nInstance['t'];
8
9
  showQualityEnhancement?: boolean;
9
10
  onConfirm: (params: ExportVideoParams) => Promise<void> | void;
10
11
  onClose: () => void;
11
12
  }
12
- export declare function ExportModalView({ videoName, visible, t, showQualityEnhancement, onConfirm, onClose, }: ExportModalViewProps): React.ReactElement;
13
+ export declare function ExportModalView({ videoName, visible, popupContainer, t, showQualityEnhancement, onConfirm, onClose, }: ExportModalViewProps): React.ReactElement;
package/dist/header.d.ts CHANGED
@@ -47,6 +47,7 @@ export interface AmkEditorLayout {
47
47
  updateExportTask: (task: AmkExportTaskListItem) => void;
48
48
  setExportTasksLoading: (loading: boolean) => void;
49
49
  openExportTasks: () => void;
50
+ setProjectLoading: (loading: boolean) => void;
50
51
  destroy: () => void;
51
52
  }
52
53
  export declare function resolveHeaderTitle(options: ResolveHeaderTitleOptions): string;
@@ -3,6 +3,7 @@ export declare const AMK_I18N_KEYS: {
3
3
  readonly close: "amk.common.close";
4
4
  readonly cancel: "amk.common.cancel";
5
5
  readonly confirm: "amk.common.confirm";
6
+ readonly projectLoading: "amk.common.projectLoading";
6
7
  readonly uploading: "amk.common.uploading";
7
8
  readonly uploadFailed: "amk.common.uploadFailed";
8
9
  };