@netless/appliance-plugin 1.0.0-beta.0 → 1.0.0-beta.2

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.
@@ -10,7 +10,7 @@ export declare class ApplianceMultiPlugin extends InvisiblePlugin<AppliancePlugi
10
10
  static currentManager?: ApplianceMultiManager;
11
11
  static logger: Logger;
12
12
  static options: AppliancePluginOptions;
13
- static getInstance(remake: WindowManager, adaptor?: ApplianceAdaptor): Promise<AppliancePluginInstance>;
13
+ static getInstance(remake: WindowManager, adaptor: ApplianceAdaptor): Promise<AppliancePluginInstance>;
14
14
  static onCreate(plugin: InvisiblePlugin<AppliancePluginAttributes, any>): void;
15
15
  static createApplianceMultiPlugin(d: Room, kind: string): Promise<ApplianceMultiPlugin>;
16
16
  static createCurrentManager: (remake: WindowManager, options: AppliancePluginOptions, plugin: ApplianceMultiPlugin) => void;
@@ -10,7 +10,7 @@ export declare class ApplianceSinglePlugin extends InvisiblePlugin<AppliancePlug
10
10
  static currentManager?: ApplianceSingleManager;
11
11
  static logger: Logger;
12
12
  static options: AppliancePluginOptions;
13
- static getInstance(remake: Displayer, adaptor?: ApplianceAdaptor): Promise<AppliancePluginInstance>;
13
+ static getInstance(remake: Displayer, adaptor: ApplianceAdaptor): Promise<AppliancePluginInstance>;
14
14
  static onCreate(plugin: InvisiblePlugin<AppliancePluginAttributes, any>): void;
15
15
  static createAppliancePlugin(d: Room, kind: string): Promise<ApplianceSinglePlugin>;
16
16
  static createCurrentManager: (displayer: Displayer, options: AppliancePluginOptions, plugin?: ApplianceSinglePlugin) => void;
@@ -15,7 +15,7 @@ import { HotkeyManager } from "../hotkey";
15
15
  export interface BaseApplianceManagerProps {
16
16
  displayer: Displayer<DisplayerCallbacks>;
17
17
  plugin?: AppliancePluginLike;
18
- options?: AppliancePluginOptions;
18
+ options: AppliancePluginOptions;
19
19
  }
20
20
  /** 插件管理器 */
21
21
  export declare abstract class BaseApplianceManager {
@@ -28,7 +28,7 @@ export declare abstract class BaseApplianceManager {
28
28
  snapshootStateMap?: Map<string, unknown>;
29
29
  effectResolve?: (value: boolean) => void;
30
30
  readonly hotkeyManager: HotkeyManager;
31
- readonly pluginOptions?: AppliancePluginOptions;
31
+ readonly pluginOptions: AppliancePluginOptions;
32
32
  readonly roomMember: RoomMemberManager;
33
33
  readonly cursor: CursorManager;
34
34
  readonly textEditorManager: TextEditorManager;
@@ -1,6 +1,5 @@
1
- import { ApplianceAdaptor, AppliancePluginOptions, ApplianceNames, MemberState } from "./types";
2
- export type { ApplianceAdaptor, AppliancePluginOptions, ApplianceNames, MemberState };
3
- export { ECanvasContextType } from "../core/enum";
1
+ export * from "./types";
2
+ export * from "../core/enum";
4
3
  export { ApplianceMultiPlugin } from "./applianceMultiPlugin";
5
4
  export { ApplianceSinglePlugin } from "./applianceSinglePlugin";
6
5
  export { ApplianceSigleWrapper } from "../plugin/single/applianceDisplayer";
@@ -121,8 +121,8 @@ export interface BaseSubWorkModuleProps {
121
121
  internalMsgEmitter: EventEmitter2;
122
122
  }
123
123
  export type ApplianceAdaptor = {
124
+ options: AppliancePluginOptions;
124
125
  logger?: Logger;
125
- options?: AppliancePluginOptions;
126
126
  cursorAdapter?: CursorAdapter;
127
127
  };
128
128
  export type canBindMethodType = keyof Omit<AppliancePluginInstance, 'displayer' | 'windowManager' | 'injectMethodToObject' | 'callbacksOn' | 'callbacksOnce' | 'callbacksOff' | '_injectTargetObject'>;
@@ -187,6 +187,8 @@ export type Logger = {
187
187
  readonly error: (...messages: any[]) => void;
188
188
  };
189
189
  export type AppliancePluginOptions = {
190
+ /** cdn配置项 */
191
+ cdn: CdnOpt;
190
192
  /** 同步数据配置项 */
191
193
  syncOpt?: SyncOpt;
192
194
  /** 画布配置项 */
@@ -241,6 +243,11 @@ export type CanvasOpt = {
241
243
  /** 画布上下文类型 */
242
244
  contextType: ECanvasContextType;
243
245
  };
246
+ export type CdnOpt = {
247
+ /** 画布上下文类型 */
248
+ fullWorkerUrl: string;
249
+ subWorkerUrl: string;
250
+ };
244
251
  export declare enum EmitEventType {
245
252
  /** 无 */
246
253
  None = "None",