-
Notifications
You must be signed in to change notification settings - Fork 14
/
index.ts
87 lines (69 loc) · 2.57 KB
/
index.ts
1
2
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import type CSS from 'csstype';
import type { Live2DModel } from 'pixi-live2d-display';
import type { HitAreaFrames } from 'pixi-live2d-display/extra';
import type { Application } from 'pixi.js';
import { CommonStyleType, Item } from './common.js';
import type { ModelOptions } from './model.js';
import type { MenusOptions, Options } from './options.js';
import { StatusBarOptions } from './statusBar.js';
import { TipsOptions } from './tips.js';
import type { DeepRequired } from './utils.js';
import type { DEFAULT_OPTIONS } from '../config/config.js';
export * from './options.js';
export * from './utils.js';
export type HitAreaFramesType = typeof HitAreaFrames;
export type ImportType = 'complete' | 'cubism2' | 'cubism5';
export type PixiLive2dDisplayModule = typeof import('pixi-live2d-display') & {
HitAreaFrames: HitAreaFramesType;
};
export type PixiModule = typeof import('pixi.js');
// export type MotionPreloadStrategy = PIXI_LIVE2D_DISPLAY_MODULE['MotionPreloadStrategy'];
export type ApplicationType = typeof Application;
export type CSSProperties = CSS.Properties;
export type DefaultOptions = Omit<DeepRequired<Options>, 'parentElement' | 'models' | 'tips' | 'statusBar' | 'menus'> & {
parentElement: HTMLElement;
tips: DefaultTipsOptions;
statusBar: DefaultStatusBarOptions;
menus: DefaultMenusOptions;
models: ModelOptions[];
};
export type DefaultTipsOptions = Omit<DeepRequired<TipsOptions>, 'style' | 'mobileStyle'> & {
style?: CommonStyleType;
mobileStyle?: CommonStyleType;
};
export type DefaultStatusBarOptions = Omit<DeepRequired<StatusBarOptions>, 'style' | 'mobileStyle'> & {
style?: CommonStyleType;
mobileStyle?: CommonStyleType;
};
export type DefaultMenusOptions = Omit<DeepRequired<MenusOptions>, 'style' | 'itemStyle' | 'mobileStyle' | 'mobileItemStyle' | 'items'> & {
items: Item[];
style?: CommonStyleType;
itemStyle?: CommonStyleType;
mobileStyle?: CommonStyleType;
mobileItemStyle?: CommonStyleType;
};
export type Live2DModelType = typeof Live2DModel;
export type HitAreaFramesModule = typeof HitAreaFrames;
export type LibraryUrls = {
/**
* 自定义 Cubism2 SDK 地址
* @default oh-my-live2d提供的默认地址
*/
cubism2?: string;
/**
* 自定义 Cubism5 SDK 地址
* @default oh-my-live2d提供的默认地址
*/
cubism5?: string;
complete?: string;
};
export interface ElementConfig {
id: string;
className?: string;
dataName?: string;
tagName: string;
children?: ElementConfig[];
innerHtml?: string;
innerText?: string;
}
export type WelcomeTipesType = typeof DEFAULT_OPTIONS.tips.welcomeTips;