@plaso-infi/whiteboard-sdk 0.2.0 → 0.2.1
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/cjs/index-2d9fe749.js +73 -0
- package/dist/cjs/{index-302250cc-ecade100.js → index-302250cc-3699586c.js} +1 -1
- package/dist/cjs/index.d.ts +22 -4
- package/dist/cjs/index.js +1 -1
- package/dist/esm/{index-302250cc-ed69f579.js → index-302250cc-59a26a4f.js} +1 -1
- package/dist/esm/{index-ae9c8b77.js → index-78d849ca.js} +11 -18
- package/dist/esm/index.d.ts +22 -4
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-f96b4a50.js +0 -80
- /package/dist/cjs/{hls-e0a51e69-76de2844.js → hls-e0a51e69-bcc658be.js} +0 -0
- /package/dist/cjs/{icon_map-3588278e-1e3a5503.js → icon_map-3588278e-6789e6a8.js} +0 -0
- /package/dist/cjs/{pdf_lib-24f922b4-8eba27c5.js → pdf_lib-24f922b4-b6260916.js} +0 -0
- /package/dist/esm/{hls-e0a51e69-5ec32c80.js → hls-e0a51e69-bf9556ce.js} +0 -0
- /package/dist/esm/{icon_map-3588278e-28a10ae2.js → icon_map-3588278e-c339730f.js} +0 -0
- /package/dist/esm/{pdf_lib-24f922b4-448200f8.js → pdf_lib-24f922b4-ed88d9ab.js} +0 -0
package/dist/esm/index.d.ts
CHANGED
|
@@ -66,6 +66,8 @@ declare enum GridType {
|
|
|
66
66
|
type PreDownloadInfo = any;
|
|
67
67
|
type DownloadConfigT = {
|
|
68
68
|
enable: boolean;
|
|
69
|
+
fileEnable?: boolean;
|
|
70
|
+
imageEnable?: boolean;
|
|
69
71
|
preCheck?: (event: string) => Promise<PreDownloadInfo>;
|
|
70
72
|
};
|
|
71
73
|
type Viewbox = {
|
|
@@ -148,6 +150,8 @@ interface InfiWebsdkInstanceType {
|
|
|
148
150
|
toggleHistoryPanel: () => void;
|
|
149
151
|
/** 修改画板背景 */
|
|
150
152
|
changeGridType: (gridType: GridType) => void;
|
|
153
|
+
/** 设置跳转元素 */
|
|
154
|
+
setAnchorElement: (anchorElement?: string) => void;
|
|
151
155
|
/**
|
|
152
156
|
* 于白板内显示 toast 消息
|
|
153
157
|
* @param message 消息
|
|
@@ -180,6 +184,13 @@ interface InfiWebsdkInstanceType {
|
|
|
180
184
|
type ShadowViewDataT = {
|
|
181
185
|
viewData?: [number, number, number, number];
|
|
182
186
|
};
|
|
187
|
+
type HistoryType = 'browser' | 'hash';
|
|
188
|
+
type RouteConfigT = {
|
|
189
|
+
/** 设置路由history的类型(默认为browser)*/
|
|
190
|
+
historyType: HistoryType;
|
|
191
|
+
/** 路由中指定标识画布唯一性的字段,用于判断是否是跳转至本画布内的其他元素*/
|
|
192
|
+
boardCompositeKey?: string[];
|
|
193
|
+
};
|
|
183
194
|
type WebsdkEventTypeMap = {
|
|
184
195
|
/** 白板未完成初始化 */
|
|
185
196
|
not_initialized: void;
|
|
@@ -199,7 +210,7 @@ type WebsdkEventTypeMap = {
|
|
|
199
210
|
presentation_change: boolean;
|
|
200
211
|
};
|
|
201
212
|
/** 当前白板的用户信息 */
|
|
202
|
-
interface
|
|
213
|
+
interface InfiUserInfoT {
|
|
203
214
|
loginName: string;
|
|
204
215
|
userName: string;
|
|
205
216
|
avatarUrl?: string;
|
|
@@ -240,11 +251,11 @@ interface GetSdkInstanceConfigs {
|
|
|
240
251
|
*/
|
|
241
252
|
getShadowBoardQuery?: () => Promise<string>;
|
|
242
253
|
/** 当前白板的用户信息 */
|
|
243
|
-
userInfo:
|
|
254
|
+
userInfo: InfiUserInfoT;
|
|
244
255
|
/** 用以挂载白板 DOM 的 HTML DOM 元素, 白板相关元素会自动 appendChild 至这个元素之内 */
|
|
245
256
|
containerDom: HTMLDivElement;
|
|
246
257
|
/** 基于 loginName 获取该用户的用户名与头像 url 的方法,由用户提供,方法返回的用户信息用以于白板内作展示 */
|
|
247
|
-
getUsersInfo: (loginNames: string[]) => Promise<
|
|
258
|
+
getUsersInfo: (loginNames: string[]) => Promise<InfiUserInfoT[]>;
|
|
248
259
|
/** 是否应用上一次用户偏好(背景设置、工具栏顺序、视野、颜料色板) */
|
|
249
260
|
preferenceConfigs?: object;
|
|
250
261
|
/** 画布天然提供若干 UI 插槽,分别位于画布页面的左上角与右上角,目前仅支持基于 React 实现 */
|
|
@@ -291,6 +302,13 @@ interface GetSdkInstanceConfigs {
|
|
|
291
302
|
* 尚提供可以切换不同的画布侧环境的配置项入口。后期会移除该配置项,websdk 仅能使用线上环境
|
|
292
303
|
*/
|
|
293
304
|
env?: 'prod' | 'dev' | 'test';
|
|
305
|
+
getElementLink?: (id: string) => string;
|
|
306
|
+
/** 链接跳转,返回值为string表示跳转元素id */
|
|
307
|
+
gotoLink?: (link: string) => string | undefined;
|
|
308
|
+
/**
|
|
309
|
+
* 路由配置,包括设置路由history的类型(默认为browser)、标识画布唯一性的search字段(默认为所有search字段)等
|
|
310
|
+
*/
|
|
311
|
+
routeConfig?: RouteConfigT;
|
|
294
312
|
}
|
|
295
313
|
type CustomizeUploader = {
|
|
296
314
|
loaders: {
|
|
@@ -450,4 +468,4 @@ declare class SvgManager {
|
|
|
450
468
|
private static _isSymbol;
|
|
451
469
|
}
|
|
452
470
|
|
|
453
|
-
export { type ComponentProps, type CustomizeUploader, FULL_TOOLBAR_CONFIG, type GetSdkInstanceConfigs, HoverTip, type InfiSdkPluginType, type InfiWebSdkPlugin, type InfiWebsdkInstanceType, type SdkBottomRightPluginSlotType, type SdkPluginSlotType, Setting, SvgIcon, SvgManager, type ToolBarType, type WebsdkEngineType, InfiWebsdk as default, getDocumentType, getFileType };
|
|
471
|
+
export { type ComponentProps, type CustomizeUploader, FULL_TOOLBAR_CONFIG, type GetSdkInstanceConfigs, HoverTip, type InfiSdkPluginType, type InfiUserInfoT, type InfiWebSdkPlugin, type InfiWebsdkInstanceType, type SdkBottomRightPluginSlotType, type SdkPluginSlotType, Setting, SvgIcon, SvgManager, type ToolBarType, type WebsdkEngineType, InfiWebsdk as default, getDocumentType, getFileType };
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{F as FULL_TOOLBAR_CONFIG,H as HoverTip,b as Setting,c as SvgIcon,d as SvgManager,I as default,a as getDocumentType,g as getFileType}from"./index-
|
|
1
|
+
export{F as FULL_TOOLBAR_CONFIG,H as HoverTip,b as Setting,c as SvgIcon,d as SvgManager,I as default,a as getDocumentType,g as getFileType}from"./index-78d849ca.js";import"react";import"react-dom";import"agora-rtc-sdk-ng";
|