@netless/window-manager 1.0.13 → 1.0.15

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/index.d.ts CHANGED
@@ -1227,6 +1227,7 @@ declare function getExtendClass<T extends ExtendClassAble>(baseClass: T, extendC
1227
1227
  declare const BuiltinApps: {
1228
1228
  DocsViewer: string;
1229
1229
  MediaPlayer: string;
1230
+ Presentation: string;
1230
1231
  };
1231
1232
 
1232
1233
  type WindowMangerAttributes = {
@@ -1247,6 +1248,15 @@ type AddAppOptions = {
1247
1248
  type setAppOptions = AddAppOptions & {
1248
1249
  appOptions?: any;
1249
1250
  };
1251
+ type DocsEvent = "prevPage" | "nextPage" | "prevStep" | "nextStep" | "jumpToPage" | "scalePage";
1252
+ type DocsEventOptions = {
1253
+ /** If provided, will dispatch to the specific app. Default to the focused app. */
1254
+ appId?: string;
1255
+ /** Used by `jumpToPage` event, range from 1 to total pages count. */
1256
+ page?: number;
1257
+ /** Used by `scalePage` event. Range from 1 to 4, decimals allowed. `1` means default fitted size. */
1258
+ scale?: number;
1259
+ };
1250
1260
  type AddAppParams<TAttributes = any> = {
1251
1261
  kind: string;
1252
1262
  src?: string;
@@ -1489,6 +1499,13 @@ declare class WindowManager extends InvisiblePlugin<WindowMangerAttributes, any>
1489
1499
  * 查询单个 App
1490
1500
  */
1491
1501
  queryOne(appId: string): AppProxy | undefined;
1502
+ /**
1503
+ * Send specific command to DocsViewer / Presentation / Slide app.
1504
+ *
1505
+ * Static docs and Presentation do not have animation steps, so `prevStep` / `nextStep`
1506
+ * are treated as `prevPage` / `nextPage`.
1507
+ */
1508
+ dispatchDocsEvent(event: DocsEvent, options?: DocsEventOptions): boolean;
1492
1509
  /**
1493
1510
  * 关闭 APP
1494
1511
  */
@@ -1536,4 +1553,4 @@ declare class WindowManager extends InvisiblePlugin<WindowMangerAttributes, any>
1536
1553
  }
1537
1554
 
1538
1555
  export { AppContext, AppCreateError, AppManager, AppManagerNotInitError, AppNotRegisterError, AppProxy, AttributesDelegate, BindContainerRoomPhaseInvalidError, BoxManager, BoxManagerNotFoundError, BoxNotCreatedError, BuiltinApps, CursorManager, ExtendPlugin, ExtendPluginManager, InvalidScenePath, ParamsInvalidError, Storage, WhiteWebSDKInvalidError, WindowManager, calculateNextIndex, getExtendClass, reconnectRefresher };
1539
- export type { AddAppOptions, AddAppParams, AddPageParams, AppEmitterEvent, AppInitState, AppListenerKeys, AppPayload, AppSyncAttributes, ApplianceIcons, BaseInsertParams, CursorMovePayload, CursorOptions, ExtendClass, ExtendClassAble, ExtendContext, ExtendManagerOptions, ExtendPluginInstance, MountParams, NetlessApp, PageController, PageRemoveService, PageState, PublicEvent, RegisterEventData, RegisterEvents, RegisterParams, StorageStateChangedEvent, StorageStateChangedListener, WindowMangerAttributes, apps, setAppOptions };
1556
+ export type { AddAppOptions, AddAppParams, AddPageParams, AppEmitterEvent, AppInitState, AppListenerKeys, AppPayload, AppSyncAttributes, ApplianceIcons, BaseInsertParams, CursorMovePayload, CursorOptions, DocsEvent, DocsEventOptions, ExtendClass, ExtendClassAble, ExtendContext, ExtendManagerOptions, ExtendPluginInstance, MountParams, NetlessApp, PageController, PageRemoveService, PageState, PublicEvent, RegisterEventData, RegisterEvents, RegisterParams, StorageStateChangedEvent, StorageStateChangedListener, WindowMangerAttributes, apps, setAppOptions };