@vvfx/sdk 0.2.2-beta.1 → 0.2.2-beta.3
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/dist/{src/config.d.ts → config.d.ts} +8 -1
- package/dist/{src/html-overlay → html-overlay}/auto-height-runtime.d.ts +5 -0
- package/dist/{src/html-overlay → html-overlay}/manager.d.ts +5 -0
- package/dist/{src/html-overlay → html-overlay}/overlay-transform.d.ts +3 -1
- package/dist/index.js +369 -305
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +369 -305
- package/dist/index.mjs.map +1 -1
- package/dist/{src/sdk-item → sdk-item}/card-item.d.ts +1 -6
- package/dist/{src/sdk.d.ts → sdk.d.ts} +8 -2
- package/dist/{src/types.d.ts → types.d.ts} +8 -8
- package/dist/wireframe/common/box.d.ts +1 -0
- package/dist/wireframe/common/dashed-line.d.ts +1 -0
- package/dist/wireframe/common/line.d.ts +1 -0
- package/package.json +1 -1
- /package/dist/{src/exporter → exporter}/config.d.ts +0 -0
- /package/dist/{src/exporter → exporter}/const.d.ts +0 -0
- /package/dist/{src/exporter → exporter}/export-media.d.ts +0 -0
- /package/dist/{src/exporter → exporter}/exporter.d.ts +0 -0
- /package/dist/{src/exporter → exporter}/index.d.ts +0 -0
- /package/dist/{src/exporter → exporter}/types.d.ts +0 -0
- /package/dist/{src/exporter → exporter}/utils.d.ts +0 -0
- /package/dist/{src/exporter → exporter}/wav-audio.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/adsorption-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/control-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/icon-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/index.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/item-create-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/loading-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/mask-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/picture-cut-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/picture-expand-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/preference-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/selector-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/sprite-text-edit-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/text-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/transform-gizmo.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/gizmo/type.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/index.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/src/gesture-handler.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/src/icons.d.ts +0 -0
- /package/dist/{src/gesture-handler → gesture-handler}/utils.d.ts +0 -0
- /package/dist/{src/wireframe/common/box.d.ts → html-overlay/auto-height-runtime.test.d.ts} +0 -0
- /package/dist/{src/html-overlay → html-overlay}/document-runtime.d.ts +0 -0
- /package/dist/{src/html-overlay → html-overlay}/document-transform.d.ts +0 -0
- /package/dist/{src/html-overlay → html-overlay}/dom-order.d.ts +0 -0
- /package/dist/{src/html-overlay → html-overlay}/host-message-runtime.d.ts +0 -0
- /package/dist/{src/html-overlay → html-overlay}/html-viewport-style.d.ts +0 -0
- /package/dist/{src/html-overlay → html-overlay}/index.d.ts +0 -0
- /package/dist/{src/wireframe/common/dashed-line.d.ts → html-overlay/manager.test.d.ts} +0 -0
- /package/dist/{src/html-overlay → html-overlay}/mime-utils.d.ts +0 -0
- /package/dist/{src/wireframe/common/line.d.ts → html-overlay/overlay-transform.test.d.ts} +0 -0
- /package/dist/{src/html-overlay → html-overlay}/path-utils.d.ts +0 -0
- /package/dist/{src/html-overlay → html-overlay}/shell-runtime.d.ts +0 -0
- /package/dist/{src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{src/math → math}/box2.d.ts +0 -0
- /package/dist/{src/math → math}/circle.d.ts +0 -0
- /package/dist/{src/math → math}/euler.d.ts +0 -0
- /package/dist/{src/math → math}/index.d.ts +0 -0
- /package/dist/{src/math → math}/line2.d.ts +0 -0
- /package/dist/{src/math → math}/line3.d.ts +0 -0
- /package/dist/{src/math → math}/matrix4.d.ts +0 -0
- /package/dist/{src/math → math}/plane.d.ts +0 -0
- /package/dist/{src/math → math}/quaternion.d.ts +0 -0
- /package/dist/{src/math → math}/ray-caster.d.ts +0 -0
- /package/dist/{src/math → math}/ray.d.ts +0 -0
- /package/dist/{src/math → math}/type.d.ts +0 -0
- /package/dist/{src/math → math}/utils.d.ts +0 -0
- /package/dist/{src/math → math}/vector2.d.ts +0 -0
- /package/dist/{src/math → math}/vector3.d.ts +0 -0
- /package/dist/{src/screen-shot → screen-shot}/index.d.ts +0 -0
- /package/dist/{src/screen-shot → screen-shot}/screen-shot.d.ts +0 -0
- /package/dist/{src/sdk-item → sdk-item}/base-item.d.ts +0 -0
- /package/dist/{src/sdk-item → sdk-item}/effects-item.d.ts +0 -0
- /package/dist/{src/sdk-item → sdk-item}/frame-item.d.ts +0 -0
- /package/dist/{src/sdk-item → sdk-item}/generator-item.d.ts +0 -0
- /package/dist/{src/sdk-item → sdk-item}/group-item.d.ts +0 -0
- /package/dist/{src/sdk-item → sdk-item}/index.d.ts +0 -0
- /package/dist/{src/sdk-item → sdk-item}/sprite-item.d.ts +0 -0
- /package/dist/{src/sdk-item → sdk-item}/text-item.d.ts +0 -0
- /package/dist/{src/sdk-item → sdk-item}/types.d.ts +0 -0
- /package/dist/{src/sdk-item → sdk-item}/video-item.d.ts +0 -0
- /package/dist/{src/service → service}/UndoRedo.d.ts +0 -0
- /package/dist/{src/shared → shared}/index.d.ts +0 -0
- /package/dist/{src/shared → shared}/player.d.ts +0 -0
- /package/dist/{src/size-adapte → size-adapte}/index.d.ts +0 -0
- /package/dist/{src/size-adapte → size-adapte}/size-adapt.d.ts +0 -0
- /package/dist/{src/utils → utils}/background-manager.d.ts +0 -0
- /package/dist/{src/utils → utils}/common-utils.d.ts +0 -0
- /package/dist/{src/utils → utils}/index.d.ts +0 -0
- /package/dist/{src/utils → utils}/interaction-utils.d.ts +0 -0
- /package/dist/{src/utils → utils}/json-data-utils.d.ts +0 -0
- /package/dist/{src/utils → utils}/layout-utils.d.ts +0 -0
- /package/dist/{src/utils → utils}/page-data-utils.d.ts +0 -0
- /package/dist/{src/utils → utils}/player-data-utils.d.ts +0 -0
- /package/dist/{src/utils → utils}/types.d.ts +0 -0
- /package/dist/{src/wireframe → wireframe}/common/pixi-ext.d.ts +0 -0
- /package/dist/{src/wireframe → wireframe}/common/pixi.d.ts +0 -0
- /package/dist/{src/wireframe → wireframe}/index.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CardItemProperty, CardCreateInfo
|
|
1
|
+
import type { CardItemProperty, CardCreateInfo } from '../types';
|
|
2
2
|
import { SDKItemType, type CardItemOptions } from './types';
|
|
3
3
|
import { BaseItem } from './base-item';
|
|
4
4
|
/**
|
|
@@ -21,11 +21,6 @@ export declare class CardItem extends BaseItem {
|
|
|
21
21
|
*/
|
|
22
22
|
get cardType(): string;
|
|
23
23
|
set cardType(value: string);
|
|
24
|
-
/**
|
|
25
|
-
* @description HTML 覆盖层配置
|
|
26
|
-
*/
|
|
27
|
-
get html(): CardHTML | undefined;
|
|
28
|
-
set html(value: CardHTML | undefined);
|
|
29
24
|
/**
|
|
30
25
|
* @description 位置
|
|
31
26
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Player, spec } from './shared';
|
|
2
|
-
import type { SDKInputParam, PageConfig, PageData, SetItemPropertyParam, ViewProperty, ViewParam, ExportParam, SDKBackgroundType, SpriteCreateInfo, GroupCreateInfo, ItemCreateInfo, TextCreateInfo, ViewportFitShiftParam, SceneCreaetInfo, VideoCreateInfo, GeneratorCreateInfo, GeneratorResource, VideoGeneratorResource, SpriteGeneratorResource, EffectsCreateInfo, FrameCreateInfo, CardCreateInfo, CardItemTransformInfo, PageAutoLayoutParam } from './types';
|
|
2
|
+
import type { SDKInputParam, PageConfig, PageData, SetItemPropertyParam, ViewProperty, ViewParam, ExportParam, SDKBackgroundType, SpriteCreateInfo, GroupCreateInfo, ItemCreateInfo, TextCreateInfo, ViewportFitShiftParam, SceneCreaetInfo, VideoCreateInfo, GeneratorCreateInfo, GeneratorResource, VideoGeneratorResource, SpriteGeneratorResource, EffectsCreateInfo, FrameCreateInfo, CardCreateInfo, CardHTML, CardItemTransformInfo, PageAutoLayoutParam } from './types';
|
|
3
3
|
import { SDKItemType } from './sdk-item/types';
|
|
4
4
|
import type { CardTypeConfig } from './config';
|
|
5
5
|
import { ItemOrderAction } from './types';
|
|
@@ -10,7 +10,7 @@ import { Box2, Vector2 } from './math';
|
|
|
10
10
|
import { GizmoOperation, Operation, UndoRedo } from './service/UndoRedo';
|
|
11
11
|
import { GestureHandlerInteractType, GizmoType, ItemCreateType, SpriteTextInitParam } from './gesture-handler/gizmo';
|
|
12
12
|
import { AlignType, DistributeType } from './utils/types';
|
|
13
|
-
import { SDKItem } from './sdk-item';
|
|
13
|
+
import { SDKItem, type CardItem } from './sdk-item';
|
|
14
14
|
import type { LoadingGizmoItemOptions, LoadingGizmoTip } from './gesture-handler/gizmo/loading-gizmo';
|
|
15
15
|
import type { MaskUndoRedoData } from './gesture-handler/gizmo/mask-gizmo';
|
|
16
16
|
import type { PictureCutUndoRedoData } from './gesture-handler/gizmo/picture-cut-gizmo';
|
|
@@ -507,6 +507,12 @@ export declare class SDK {
|
|
|
507
507
|
* @returns 是否已注册
|
|
508
508
|
*/
|
|
509
509
|
isCardTypeRegistered(type: string): boolean;
|
|
510
|
+
/**
|
|
511
|
+
* @description 按 cardType 从注册表解析卡片的 HTML 渲染配置。
|
|
512
|
+
* @param item 卡片元素
|
|
513
|
+
* @returns HTML 渲染配置
|
|
514
|
+
*/
|
|
515
|
+
resolveCardHTML(item: CardItem): CardHTML | undefined;
|
|
510
516
|
/**
|
|
511
517
|
* @description 创建卡片元素
|
|
512
518
|
* @description 底层以透明 SpriteItem 形式渲染,支持 cardType 属性
|
|
@@ -222,7 +222,7 @@ export type CardHTML = {
|
|
|
222
222
|
*/
|
|
223
223
|
export type CardItemProperty = BaseItemProperty & {
|
|
224
224
|
/**
|
|
225
|
-
* @description
|
|
225
|
+
* @description 卡片类型(动态配置,需通过 SDK.registerCardType/registerCardTypes 注册)
|
|
226
226
|
*/
|
|
227
227
|
cardType: string;
|
|
228
228
|
/**
|
|
@@ -230,9 +230,9 @@ export type CardItemProperty = BaseItemProperty & {
|
|
|
230
230
|
*/
|
|
231
231
|
autoHeight?: boolean;
|
|
232
232
|
/**
|
|
233
|
-
* @description HTML
|
|
233
|
+
* @description HTML 内容是否跟随卡片 scale 缩放,关闭后 HTML 按最终显示尺寸重新布局
|
|
234
234
|
*/
|
|
235
|
-
|
|
235
|
+
autoScale?: boolean;
|
|
236
236
|
};
|
|
237
237
|
/**
|
|
238
238
|
* @description Frame 画板元素布局模式
|
|
@@ -927,7 +927,7 @@ export type CardItemTransformInfo = {
|
|
|
927
927
|
size: [number, number];
|
|
928
928
|
};
|
|
929
929
|
/**
|
|
930
|
-
* @description
|
|
930
|
+
* @description 卡片类型(动态配置,需通过 SDK.registerCardType/registerCardTypes 注册)
|
|
931
931
|
*/
|
|
932
932
|
export type CardType = string;
|
|
933
933
|
/**
|
|
@@ -974,6 +974,10 @@ export type CardCreateInfo = {
|
|
|
974
974
|
* @description 是否根据 HTML 挂载内容的自然高度自动更新卡片高度
|
|
975
975
|
*/
|
|
976
976
|
autoHeight?: boolean;
|
|
977
|
+
/**
|
|
978
|
+
* @description HTML 内容是否跟随卡片 scale 缩放,关闭后 HTML 按最终显示尺寸重新布局
|
|
979
|
+
*/
|
|
980
|
+
autoScale?: boolean;
|
|
977
981
|
/**
|
|
978
982
|
* @description 卡片元素位置
|
|
979
983
|
*/
|
|
@@ -986,10 +990,6 @@ export type CardCreateInfo = {
|
|
|
986
990
|
* @description 卡片元素缩放
|
|
987
991
|
*/
|
|
988
992
|
scale?: [number, number];
|
|
989
|
-
/**
|
|
990
|
-
* @description HTML 覆盖层配置;存在该字段时由 DOM overlay 渲染
|
|
991
|
-
*/
|
|
992
|
-
html?: CardHTML;
|
|
993
993
|
};
|
|
994
994
|
};
|
|
995
995
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|