@vyr/runtime 0.0.33 → 0.0.34
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/build/DataService.d.ts +3 -2
- package/build/DraggableService.d.ts +2 -2
- package/build/Runtime.d.ts +2 -0
- package/build/ShortcutkeyService.d.ts +2 -0
- package/build/SmartService.d.ts +29 -0
- package/build/data/body.d.ts +0 -2
- package/build/data/footer.d.ts +6 -5
- package/build/data/global.d.ts +1 -20
- package/build/data/inspector.d.ts +3 -2
- package/build/data/sidebar.d.ts +70 -8
- package/build/data/status.d.ts +4 -0
- package/build/index.d.ts +1 -2
- package/build/locale/LanguageProvider.d.ts +25 -25
- package/package.json +1 -1
- package/build/PresetService.d.ts +0 -31
- package/build/navigator/SidebarNavigator.d.ts +0 -51
- package/build/navigator/index.d.ts +0 -1
package/build/DataService.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Service } from "@vyr/service";
|
|
2
|
-
import { Global
|
|
2
|
+
import { Global } from './data/global';
|
|
3
3
|
import { Header } from "./data/header";
|
|
4
4
|
import { Body } from './data/body';
|
|
5
5
|
import { Sidebar } from './data/sidebar';
|
|
@@ -16,7 +16,8 @@ declare class DataService extends Service {
|
|
|
16
16
|
readonly status: Status;
|
|
17
17
|
constructor(name: string);
|
|
18
18
|
setup(): Promise<void>;
|
|
19
|
-
addScripte(script: ScriptOption): void;
|
|
20
19
|
}
|
|
21
20
|
export { DataService };
|
|
21
|
+
export * from './data/sidebar';
|
|
22
|
+
export * from './data/footer';
|
|
22
23
|
export * from './data/global';
|
|
@@ -22,11 +22,11 @@ declare abstract class Draggable<D extends AdditionalData = AdditionalData, T ex
|
|
|
22
22
|
abstract finished(dragData: DraggableData<D>, targetData: DraggableData<T>, type: DraggableEndType): void;
|
|
23
23
|
}
|
|
24
24
|
declare class DraggableKey {
|
|
25
|
-
|
|
26
|
-
scene: string;
|
|
25
|
+
prefab: string;
|
|
27
26
|
asset: string;
|
|
28
27
|
inspector: string;
|
|
29
28
|
footer: string;
|
|
29
|
+
chat: string;
|
|
30
30
|
}
|
|
31
31
|
declare class DraggableService extends Service {
|
|
32
32
|
static readonly key: DraggableKey;
|
package/build/Runtime.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ declare class Runtime {
|
|
|
3
3
|
static services(): Service[];
|
|
4
4
|
get<K extends Service = Service>(name: string): K;
|
|
5
5
|
set(service: Service): void;
|
|
6
|
+
delayExecute(cb: (...args: any[]) => any): (...args: any[]) => void;
|
|
7
|
+
delayExecuteByTime(cb: (...args: any[]) => any, time: number): (...args: any[]) => void;
|
|
6
8
|
}
|
|
7
9
|
declare const runtime: Runtime;
|
|
8
10
|
export { runtime, Runtime };
|
|
@@ -3,6 +3,8 @@ import { Action, ActionGroup } from "./Action";
|
|
|
3
3
|
declare class ShortcutkeyService extends Service {
|
|
4
4
|
static spaced: boolean;
|
|
5
5
|
static update(event: KeyboardEvent, enable: boolean): void;
|
|
6
|
+
static stopWheelDefaultEvent: (e: WheelEvent) => void;
|
|
7
|
+
static stopKeydownDefaultEvent: (e: KeyboardEvent) => void;
|
|
6
8
|
private groupCollection;
|
|
7
9
|
private current;
|
|
8
10
|
private status;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Descriptor } from "@vyr/engine";
|
|
2
|
+
import { Service } from "@vyr/service";
|
|
3
|
+
import { Prefab } from "@vyr/service-gateway";
|
|
4
|
+
import { RemoteInvoker } from "@vyr/remote";
|
|
5
|
+
interface SmartDragdrap {
|
|
6
|
+
id: string;
|
|
7
|
+
data: Descriptor | Prefab;
|
|
8
|
+
}
|
|
9
|
+
interface SmartData<T extends Descriptor = Descriptor> {
|
|
10
|
+
target: T;
|
|
11
|
+
dragdrap: SmartDragdrap;
|
|
12
|
+
}
|
|
13
|
+
type SmartProvider<T extends Descriptor = Descriptor> = (data: SmartData<T>) => Promise<boolean | void>;
|
|
14
|
+
declare class SmartService extends Service {
|
|
15
|
+
private collection;
|
|
16
|
+
private enabled;
|
|
17
|
+
private data;
|
|
18
|
+
protected invoker: RemoteInvoker | null;
|
|
19
|
+
walkUp(data: SmartData): Promise<void>;
|
|
20
|
+
register<T extends Descriptor = Descriptor>(type: string, provider: SmartProvider<T>): void;
|
|
21
|
+
setInvoker(invoker: RemoteInvoker): void;
|
|
22
|
+
active(target: Descriptor, dragdrap: SmartData['dragdrap']): void;
|
|
23
|
+
unactive(): void;
|
|
24
|
+
dispatch(): void;
|
|
25
|
+
listen: () => void;
|
|
26
|
+
unlisten: () => void;
|
|
27
|
+
run: (...args: any[]) => void;
|
|
28
|
+
}
|
|
29
|
+
export { SmartData, SmartProvider, SmartService };
|
package/build/data/body.d.ts
CHANGED
package/build/data/footer.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { VirtualNode } from '@vyr/service-
|
|
1
|
+
import { VirtualNode } from '@vyr/service-gateway';
|
|
2
|
+
interface FooterController {
|
|
3
|
+
expand: (item: VirtualNode, type?: boolean) => void;
|
|
4
|
+
change: (items: VirtualNode[]) => void;
|
|
5
|
+
}
|
|
2
6
|
declare class Status {
|
|
3
7
|
/**鼠标当前所在的区域
|
|
4
8
|
* @directory 目录
|
|
@@ -23,8 +27,6 @@ declare class Status {
|
|
|
23
27
|
stickupItems: VirtualNode[];
|
|
24
28
|
/**全选数组 */
|
|
25
29
|
selectAll: VirtualNode[];
|
|
26
|
-
/**对清单进行筛选时所需的值 */
|
|
27
|
-
search: string;
|
|
28
30
|
}
|
|
29
31
|
declare class Footer {
|
|
30
32
|
readonly root: VirtualNode;
|
|
@@ -37,6 +39,5 @@ declare class Footer {
|
|
|
37
39
|
directory: VirtualNode;
|
|
38
40
|
manifest: VirtualNode[];
|
|
39
41
|
size: number;
|
|
40
|
-
updateManifest(): VirtualNode[];
|
|
41
42
|
}
|
|
42
|
-
export { Footer };
|
|
43
|
+
export { FooterController, Footer };
|
package/build/data/global.d.ts
CHANGED
|
@@ -1,28 +1,9 @@
|
|
|
1
|
-
import { InteractionInput } from "@vyr/engine";
|
|
2
|
-
interface ScriptPropertyOptions extends Array<{
|
|
3
|
-
[k: string]: any;
|
|
4
|
-
}> {
|
|
5
|
-
}
|
|
6
|
-
interface ScriptPropertyOptionsGetters {
|
|
7
|
-
[k: string]: (input: InteractionInput) => ScriptPropertyOptions;
|
|
8
|
-
}
|
|
9
|
-
interface ScriptOption {
|
|
10
|
-
label: string;
|
|
11
|
-
value: string;
|
|
12
|
-
getDefaultInput(): any;
|
|
13
|
-
getPropertyOptions?: () => ScriptPropertyOptionsGetters;
|
|
14
|
-
}
|
|
15
1
|
interface interfaceOption {
|
|
16
2
|
label: string;
|
|
17
3
|
value: string;
|
|
18
4
|
}
|
|
19
|
-
declare class Template {
|
|
20
|
-
visible: boolean;
|
|
21
|
-
}
|
|
22
5
|
declare class Global {
|
|
23
|
-
readonly scripts: ScriptOption[];
|
|
24
|
-
readonly template: Template;
|
|
25
6
|
readonly interfaces: interfaceOption[];
|
|
26
7
|
setInterfaces(interfaces: interfaceOption[]): void;
|
|
27
8
|
}
|
|
28
|
-
export {
|
|
9
|
+
export { Global, };
|
package/build/data/sidebar.d.ts
CHANGED
|
@@ -1,11 +1,73 @@
|
|
|
1
|
-
import
|
|
1
|
+
import z from 'zod';
|
|
2
|
+
import { Descriptor, DeserializationObject } from "@vyr/engine";
|
|
3
|
+
import { DraggableData, DraggableEndType } from "@vyr/declare";
|
|
4
|
+
import { Job } from "@vyr/remote";
|
|
5
|
+
import { api, GatewayService, VirtualNode } from "@vyr/service-gateway";
|
|
6
|
+
import { Action } from "../Action";
|
|
7
|
+
import { Draggable } from "../DraggableService";
|
|
8
|
+
interface SidebarNavigator {
|
|
9
|
+
icon: string;
|
|
10
|
+
key: string;
|
|
11
|
+
}
|
|
12
|
+
interface SidebarController {
|
|
13
|
+
expand: (item: Descriptor, type?: boolean) => void;
|
|
14
|
+
change: (items: Descriptor[]) => void;
|
|
15
|
+
}
|
|
16
|
+
declare abstract class SidebarControllerAction extends Action {
|
|
17
|
+
static id: string;
|
|
18
|
+
controller: SidebarController;
|
|
19
|
+
abstract changeTransformController(clean?: boolean): void;
|
|
20
|
+
abstract changeTransform(): void;
|
|
21
|
+
}
|
|
22
|
+
declare class Status {
|
|
23
|
+
/**目录的修改模式 */
|
|
24
|
+
modifyMode: 'close' | 'add' | 'edit';
|
|
25
|
+
/**场景树的修改模式开启时修改的数据项 */
|
|
26
|
+
modifyValue: Descriptor | null;
|
|
27
|
+
/**场景树的修改模式为`add`时的元数据对象 */
|
|
28
|
+
modifyContent: Descriptor | null;
|
|
29
|
+
/**鼠标在当前区域的激活项 */
|
|
30
|
+
mouseItem: Descriptor | null;
|
|
31
|
+
/**快捷操作的类型 */
|
|
32
|
+
stickup: 'copy' | 'cut' | '';
|
|
33
|
+
/**快捷操作的数据项 */
|
|
34
|
+
stickupItems: Descriptor[];
|
|
35
|
+
}
|
|
2
36
|
declare class Sidebar {
|
|
3
|
-
|
|
4
|
-
|
|
37
|
+
static navigator: {
|
|
38
|
+
asset: string;
|
|
39
|
+
prefab: string;
|
|
40
|
+
};
|
|
41
|
+
readonly root: Descriptor;
|
|
42
|
+
readonly getter: {
|
|
43
|
+
label(item: Descriptor): string;
|
|
44
|
+
value(item: Descriptor): string;
|
|
45
|
+
disabled(): boolean;
|
|
46
|
+
};
|
|
47
|
+
readonly events: Array<{
|
|
48
|
+
key: string;
|
|
49
|
+
bind: (...args: any[]) => void;
|
|
50
|
+
}>;
|
|
51
|
+
readonly status: Status;
|
|
52
|
+
readonly selectAll: Descriptor[];
|
|
53
|
+
readonly navigators: SidebarNavigator[];
|
|
5
54
|
active: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
55
|
+
size: number;
|
|
56
|
+
url: string;
|
|
57
|
+
constructor();
|
|
58
|
+
on(gateway: GatewayService, key: string, cb: (...args: any[]) => void): (...args: any[]) => void;
|
|
59
|
+
unAll(gateway: GatewayService): void;
|
|
60
|
+
mount(): void;
|
|
61
|
+
unmount(): void;
|
|
62
|
+
watchOpen(data: z.infer<typeof api.asset.open.noticeSchema>): void;
|
|
63
|
+
watchClose(data: z.infer<typeof api.asset.close.noticeSchema>): void;
|
|
64
|
+
changeAsset(cur: string): Promise<void>;
|
|
65
|
+
closeAsset(): Promise<void>;
|
|
66
|
+
selectRootNode(): void;
|
|
67
|
+
finishedWhereInspectorDraggable(draggable: Draggable, dragData: DraggableData<VirtualNode>, targetData: DraggableData, type: DraggableEndType): void;
|
|
68
|
+
ensureReadonlyWhereInteraction(client: string): boolean;
|
|
69
|
+
saveWhereInteraction(content: DeserializationObject<Descriptor>): void;
|
|
70
|
+
remoteTransformEvent(task: InstanceType<typeof Job['invoke']['transform']['Response']>): void;
|
|
71
|
+
remotePickEvent(task: InstanceType<typeof Job['invoke']['pick']['Response']>): Promise<void>;
|
|
10
72
|
}
|
|
11
|
-
export { Sidebar };
|
|
73
|
+
export { SidebarController, SidebarControllerAction, Sidebar };
|
package/build/data/status.d.ts
CHANGED
|
@@ -9,9 +9,13 @@ declare class Aniamtion {
|
|
|
9
9
|
currentTime: number;
|
|
10
10
|
enabled: boolean;
|
|
11
11
|
}
|
|
12
|
+
declare class Chat {
|
|
13
|
+
open: boolean;
|
|
14
|
+
}
|
|
12
15
|
declare class Status {
|
|
13
16
|
transform: Transform;
|
|
14
17
|
helper: Helper;
|
|
15
18
|
animation: Aniamtion;
|
|
19
|
+
chat: Chat;
|
|
16
20
|
}
|
|
17
21
|
export { Status };
|
package/build/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export * from './locale';
|
|
2
|
-
export * from './navigator';
|
|
3
2
|
export * from './Action';
|
|
4
3
|
export * from './DataService';
|
|
5
|
-
export * from './PresetService';
|
|
6
4
|
export * from './DraggableService';
|
|
7
5
|
export * from './InspectorService';
|
|
8
6
|
export * from './RemoteService';
|
|
9
7
|
export * from './ShortcutkeyService';
|
|
8
|
+
export * from './SmartService';
|
|
10
9
|
export * from './Runtime';
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { LanguageProvider } from '@vyr/locale';
|
|
2
2
|
interface ZhCNLanguageProvider extends LanguageProvider {
|
|
3
|
-
'
|
|
4
|
-
'
|
|
5
|
-
'
|
|
6
|
-
'
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'
|
|
10
|
-
'
|
|
11
|
-
'
|
|
12
|
-
'
|
|
13
|
-
'
|
|
14
|
-
'
|
|
15
|
-
'
|
|
16
|
-
'
|
|
17
|
-
'
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
3
|
+
'Interaction.type.id.mount': string;
|
|
4
|
+
'Interaction.type.id.click': string;
|
|
5
|
+
'Interaction.type.id.mousedown': string;
|
|
6
|
+
'Interaction.type.id.mouseup': string;
|
|
7
|
+
'Interaction.type.id.mouseenter': string;
|
|
8
|
+
'Interaction.type.id.mouseleave': string;
|
|
9
|
+
'Interaction.type.id.mousemove': string;
|
|
10
|
+
'Interaction.type.id.mouseout': string;
|
|
11
|
+
'Interaction.type.id.mouseover': string;
|
|
12
|
+
'Interaction.type.id.contextmenu': string;
|
|
13
|
+
'Interaction.type.id.dblclick': string;
|
|
14
|
+
'Interaction.type.id.keydown': string;
|
|
15
|
+
'Interaction.type.id.keyup': string;
|
|
16
|
+
'Interaction.type.id.focus': string;
|
|
17
|
+
'Interaction.type.id.blur': string;
|
|
18
|
+
'Interaction.type.id.play': string;
|
|
19
|
+
'Interaction.type.id.pause': string;
|
|
20
|
+
'Interaction.type.id.pointercancel': string;
|
|
21
|
+
'Interaction.type.id.pointerdown': string;
|
|
22
|
+
'Interaction.type.id.pointerenter': string;
|
|
23
|
+
'Interaction.type.id.pointerleave': string;
|
|
24
|
+
'Interaction.type.id.pointermove': string;
|
|
25
|
+
'Interaction.type.id.pointerout': string;
|
|
26
|
+
'Interaction.type.id.pointerover': string;
|
|
27
|
+
'Interaction.type.id.pointerup': string;
|
|
28
28
|
}
|
|
29
29
|
declare const zhCnLanguageProvider: ZhCNLanguageProvider;
|
|
30
30
|
export { ZhCNLanguageProvider, zhCnLanguageProvider, };
|
package/package.json
CHANGED
package/build/PresetService.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Descriptor } from "@vyr/engine";
|
|
2
|
-
import { Service } from "@vyr/service";
|
|
3
|
-
interface Preset {
|
|
4
|
-
type: string;
|
|
5
|
-
value: string;
|
|
6
|
-
label: string;
|
|
7
|
-
executor: (...args: any[]) => Promise<void>;
|
|
8
|
-
}
|
|
9
|
-
type InteractionProvider = {
|
|
10
|
-
id: string;
|
|
11
|
-
label: string;
|
|
12
|
-
ignore: string[] | ((descriptor: Descriptor) => boolean);
|
|
13
|
-
};
|
|
14
|
-
declare class PresetService extends Service {
|
|
15
|
-
private _collection;
|
|
16
|
-
private _typeCollection;
|
|
17
|
-
private _eventProviderCollection;
|
|
18
|
-
constructor(name: string);
|
|
19
|
-
private _addGlobalInteractionProvider;
|
|
20
|
-
private _addHTMLInteractionProvider;
|
|
21
|
-
get(value: string): Preset;
|
|
22
|
-
getByType(type: string): Preset[];
|
|
23
|
-
set(preset: Preset): void;
|
|
24
|
-
addInteractionProvider(provider: InteractionProvider): void;
|
|
25
|
-
getInteractionLabel(id: string): string;
|
|
26
|
-
getByInteractionProvider(descriptor: Descriptor): {
|
|
27
|
-
label: string;
|
|
28
|
-
value: string;
|
|
29
|
-
}[];
|
|
30
|
-
}
|
|
31
|
-
export { Preset, PresetService };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Descriptor, DeserializationObject } from "@vyr/engine";
|
|
2
|
-
import { DraggableData, DraggableEndType } from "@vyr/declare";
|
|
3
|
-
import { RpcService, VirtualNode } from "@vyr/service-rpc";
|
|
4
|
-
import { Job } from "@vyr/remote";
|
|
5
|
-
import { Draggable } from "../DraggableService";
|
|
6
|
-
declare class Status {
|
|
7
|
-
/**目录的修改模式 */
|
|
8
|
-
modifyMode: 'close' | 'add' | 'edit';
|
|
9
|
-
/**场景树的修改模式开启时修改的数据项 */
|
|
10
|
-
modifyValue: Descriptor | null;
|
|
11
|
-
/**场景树的修改模式为`add`时的元数据对象 */
|
|
12
|
-
modifyContent: Descriptor | null;
|
|
13
|
-
/**鼠标在当前区域的激活项 */
|
|
14
|
-
mouseItem: Descriptor | null;
|
|
15
|
-
/**快捷操作的类型 */
|
|
16
|
-
stickup: 'copy' | 'cut' | '';
|
|
17
|
-
/**快捷操作的数据项 */
|
|
18
|
-
stickupItems: Descriptor[];
|
|
19
|
-
/**对场景节点进行筛选时所需的值 */
|
|
20
|
-
search: string;
|
|
21
|
-
}
|
|
22
|
-
/**该类会被响应式对象使用,定义方法时不要使用箭头函数(会导致在方法里修改变量时,直接修改了原始对象) */
|
|
23
|
-
declare abstract class SidebarNavigator {
|
|
24
|
-
abstract readonly key: string;
|
|
25
|
-
readonly label: string;
|
|
26
|
-
readonly icon: string;
|
|
27
|
-
readonly root: Descriptor;
|
|
28
|
-
readonly getter: {
|
|
29
|
-
label(item: Descriptor): string;
|
|
30
|
-
value(item: Descriptor): string;
|
|
31
|
-
disabled(): boolean;
|
|
32
|
-
};
|
|
33
|
-
readonly status: Status;
|
|
34
|
-
readonly events: Array<{
|
|
35
|
-
key: string;
|
|
36
|
-
bind: (...args: any[]) => void;
|
|
37
|
-
}>;
|
|
38
|
-
url: string;
|
|
39
|
-
selectAll: Descriptor[];
|
|
40
|
-
constructor(label: string, icon: string);
|
|
41
|
-
active(): void;
|
|
42
|
-
unactive(): void;
|
|
43
|
-
on(rpc: RpcService, key: string, cb: (...args: any[]) => void): (...args: any[]) => void;
|
|
44
|
-
unAll(rpc: RpcService): void;
|
|
45
|
-
abstract finishedWhereInspectorDraggable(draggable: Draggable, dragData: DraggableData<VirtualNode>, targetData: DraggableData, type: DraggableEndType): void;
|
|
46
|
-
abstract ensureReadonlyWhereInteraction(client: string): boolean;
|
|
47
|
-
abstract saveWhereInteraction(content: DeserializationObject<Descriptor>): void;
|
|
48
|
-
abstract remoteTransformEvent(...args: any[]): void;
|
|
49
|
-
abstract remotePickEvent(task: InstanceType<typeof Job['invoke']['pick']['Response']>): void;
|
|
50
|
-
}
|
|
51
|
-
export { Status, SidebarNavigator, };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SidebarNavigator';
|