@netless/fastboard 1.0.0-canary.8 → 1.0.0-canary.9

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.js CHANGED
@@ -5,6 +5,10 @@ var fastboardUi = require('@netless/fastboard-ui');
5
5
  var windowManager = require('@netless/window-manager');
6
6
  var NetlessAppSlide = require('@netless/app-slide');
7
7
 
8
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
+
10
+ var NetlessAppSlide__default = /*#__PURE__*/_interopDefault(NetlessAppSlide);
11
+
8
12
  // inline-sass-helper:inline-sass-style-helper.js
9
13
  function injectStyle(text) {
10
14
  if (typeof document !== "undefined") {
@@ -21,12 +25,12 @@ var style_default = '.netless-window-manager-playground{width:100%;height:100%;p
21
25
  // inline-sass-stub:./src/style.scss
22
26
  injectStyle(style_default);
23
27
  function registerSlide() {
24
- if (windowManager.WindowManager.registered.has(NetlessAppSlide.kind))
28
+ if (windowManager.WindowManager.registered.has(NetlessAppSlide__default.default.kind))
25
29
  return;
26
30
  windowManager.WindowManager.register({
27
- kind: NetlessAppSlide.kind,
31
+ kind: NetlessAppSlide__default.default.kind,
28
32
  appOptions: { debug: false },
29
- src: NetlessAppSlide,
33
+ src: NetlessAppSlide__default.default,
30
34
  addHooks: NetlessAppSlide.addHooks
31
35
  });
32
36
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/behaviors/netless-app.ts","../src/create.ts","../src/replay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,cAAc;AACd,cAAc;;;ACKd,SAAS,qBAAqB;AAE9B,OAAO,mBAAmB,UAAU,cAAc,OAAO,mBAAmB;AAKrE,SAAS,gBAAgB;AAC9B,MAAI,cAAc,WAAW,IAAI,gBAAgB,IAAI;AAAG;AACxD,gBAAc,SAAS;AAAA,IACrB,MAAM,gBAAgB;AAAA,IACtB,YAAY,EAAE,OAAO,MAAM;AAAA,IAC3B,KAAK;AAAA,IACL;AAAA,EACF,CAAC;AACH;AAEA,IAAM,cAEF,CAAC;AAEE,SAAS,sBAAsB;AACpC,SAAO,KAAK,WAAW,EAAE,QAAQ,UAAQ;AACvC,QAAI,cAAc,WAAW,IAAI,IAAI;AAAG;AACxC,kBAAc,SAAS,EAAE,MAAM,GAAG,YAAY,MAAM,CAAC;AAAA,EACvD,CAAC;AACH;;;AChCA,SAAS,2BAA2B;AAkBpC,eAAsB,gBACpB,SACmC;AACnC,gBAAc;AACd,sBAAoB;AACpB,SAAO,oBAAgC,OAAO;AAChD;;;ACxBA,SAAS,2BAA2B;AAmBpC,eAAsB,gBACpB,SACsC;AACtC,gBAAc;AACd,sBAAoB;AACpB,SAAO,oBAAgC,OAAO;AAChD","sourcesContent":["import \"./style.scss\";\n\nexport * from \"@netless/fastboard-core\";\nexport * from \"@netless/fastboard-ui\";\n\nexport * from \"./behaviors\";\nexport * from \"./create\";\nexport * from \"./replay\";\n","import type {\n AppOptions as NetlessAppSlideAppOptions,\n Attributes as NetlessAppSlideAttributes,\n SlideState,\n SlideViewerOptions,\n} from \"@netless/app-slide\";\nimport type { RegisterParams } from \"@netless/window-manager\";\n\nimport { WindowManager } from \"@netless/window-manager\";\n\nimport NetlessAppSlide, { addHooks, previewSlide, Slide, SlideViewer } from \"@netless/app-slide\";\n\nexport { Slide, SlideViewer, previewSlide };\nexport type { NetlessAppSlideAttributes, SlideState, SlideViewerOptions };\n\nexport function registerSlide() {\n if (WindowManager.registered.has(NetlessAppSlide.kind)) return;\n WindowManager.register({\n kind: NetlessAppSlide.kind,\n appOptions: { debug: false } as NetlessAppSlideAppOptions,\n src: NetlessAppSlide,\n addHooks,\n });\n}\n\nconst DefaultApps: {\n [kind: string]: Omit<RegisterParams, \"kind\">;\n} = {};\n\nexport function registerDefaultApps() {\n Object.keys(DefaultApps).forEach(kind => {\n if (WindowManager.registered.has(kind)) return;\n WindowManager.register({ kind, ...DefaultApps[kind] });\n });\n}\n","import type { FastboardApp, FastboardOptions } from \"@netless/fastboard-core\";\n\nimport { createFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardApp instance.\n * @example\n * let app = await createFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * joinRoom: {\n * uid: unique_id,\n * uuid: import.meta.env.VITE_ROOM_UUID,\n * roomToken: import.meta.env.VITE_ROOM_TOKEN,\n * },\n * })\n */\nexport async function createFastboard<TEventData extends Record<string, any> = any>(\n options: FastboardOptions\n): Promise<FastboardApp<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return createFastboardCore<TEventData>(options);\n}\n","import type { FastboardPlayer, FastboardReplayOptions } from \"@netless/fastboard-core\";\n\nimport { replayFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardPlayer instance.\n * @example\n * let player = await replayFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * replayRoom: {\n * room: \"room uuid\",\n * roomToken: \"NETLESSROOM_...\",\n * beginTimestamp: 1646619090394,\n * duration: 70448,\n * },\n * })\n */\nexport async function replayFastboard<TEventData extends Record<string, any> = any>(\n options: FastboardReplayOptions\n): Promise<FastboardPlayer<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return replayFastboardCore<TEventData>(options);\n}\n"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/behaviors/netless-app.ts","../src/create.ts","../src/replay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,cAAc;AACd,cAAc;;;ACKd,SAAS,qBAAqB;AAE9B,OAAO,mBAAmB,UAAU,cAAc,OAAO,mBAAmB;AAKrE,SAAS,gBAAgB;AAC9B,MAAI,cAAc,WAAW,IAAI,gBAAgB,IAAI;AAAG;AACxD,gBAAc,SAAS;AAAA,IACrB,MAAM,gBAAgB;AAAA,IACtB,YAAY,EAAE,OAAO,MAAM;AAAA,IAC3B,KAAK;AAAA,IACL;AAAA,EACF,CAAC;AACH;AAEA,IAAM,cAEF,CAAC;AAEE,SAAS,sBAAsB;AACpC,SAAO,KAAK,WAAW,EAAE,QAAQ,UAAQ;AACvC,QAAI,cAAc,WAAW,IAAI,IAAI;AAAG;AACxC,kBAAc,SAAS,EAAE,MAAM,GAAG,YAAY,IAAI,EAAE,CAAC;AAAA,EACvD,CAAC;AACH;;;AChCA,SAAS,2BAA2B;AAkBpC,eAAsB,gBACpB,SACmC;AACnC,gBAAc;AACd,sBAAoB;AACpB,SAAO,oBAAgC,OAAO;AAChD;;;ACxBA,SAAS,2BAA2B;AAmBpC,eAAsB,gBACpB,SACsC;AACtC,gBAAc;AACd,sBAAoB;AACpB,SAAO,oBAAgC,OAAO;AAChD","sourcesContent":["import \"./style.scss\";\n\nexport * from \"@netless/fastboard-core\";\nexport * from \"@netless/fastboard-ui\";\n\nexport * from \"./behaviors\";\nexport * from \"./create\";\nexport * from \"./replay\";\n","import type {\n AppOptions as NetlessAppSlideAppOptions,\n Attributes as NetlessAppSlideAttributes,\n SlideState,\n SlideViewerOptions,\n} from \"@netless/app-slide\";\nimport type { RegisterParams } from \"@netless/window-manager\";\n\nimport { WindowManager } from \"@netless/window-manager\";\n\nimport NetlessAppSlide, { addHooks, previewSlide, Slide, SlideViewer } from \"@netless/app-slide\";\n\nexport { Slide, SlideViewer, previewSlide };\nexport type { NetlessAppSlideAttributes, SlideState, SlideViewerOptions };\n\nexport function registerSlide() {\n if (WindowManager.registered.has(NetlessAppSlide.kind)) return;\n WindowManager.register({\n kind: NetlessAppSlide.kind,\n appOptions: { debug: false } as NetlessAppSlideAppOptions,\n src: NetlessAppSlide,\n addHooks,\n });\n}\n\nconst DefaultApps: {\n [kind: string]: Omit<RegisterParams, \"kind\">;\n} = {};\n\nexport function registerDefaultApps() {\n Object.keys(DefaultApps).forEach(kind => {\n if (WindowManager.registered.has(kind)) return;\n WindowManager.register({ kind, ...DefaultApps[kind] });\n });\n}\n","import type { FastboardApp, FastboardOptions } from \"@netless/fastboard-core\";\n\nimport { createFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardApp instance.\n * @example\n * let app = await createFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * joinRoom: {\n * uid: unique_id,\n * uuid: import.meta.env.VITE_ROOM_UUID,\n * roomToken: import.meta.env.VITE_ROOM_TOKEN,\n * },\n * })\n */\nexport async function createFastboard<TEventData extends Record<string, any> = any>(\n options: FastboardOptions\n): Promise<FastboardApp<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return createFastboardCore<TEventData>(options);\n}\n","import type { FastboardPlayer, FastboardReplayOptions } from \"@netless/fastboard-core\";\n\nimport { replayFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardPlayer instance.\n * @example\n * let player = await replayFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * replayRoom: {\n * room: \"room uuid\",\n * roomToken: \"NETLESSROOM_...\",\n * beginTimestamp: 1646619090394,\n * duration: 70448,\n * },\n * })\n */\nexport async function replayFastboard<TEventData extends Record<string, any> = any>(\n options: FastboardReplayOptions\n): Promise<FastboardPlayer<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return replayFastboardCore<TEventData>(options);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/behaviors/netless-app.ts","../src/create.ts","../src/replay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,cAAc;AACd,cAAc;;;ACKd,SAAS,qBAAqB;AAE9B,OAAO,mBAAmB,UAAU,cAAc,OAAO,mBAAmB;AAKrE,SAAS,gBAAgB;AAC9B,MAAI,cAAc,WAAW,IAAI,gBAAgB,IAAI;AAAG;AACxD,gBAAc,SAAS;AAAA,IACrB,MAAM,gBAAgB;AAAA,IACtB,YAAY,EAAE,OAAO,MAAM;AAAA,IAC3B,KAAK;AAAA,IACL;AAAA,EACF,CAAC;AACH;AAEA,IAAM,cAEF,CAAC;AAEE,SAAS,sBAAsB;AACpC,SAAO,KAAK,WAAW,EAAE,QAAQ,UAAQ;AACvC,QAAI,cAAc,WAAW,IAAI,IAAI;AAAG;AACxC,kBAAc,SAAS,EAAE,MAAM,GAAG,YAAY,MAAM,CAAC;AAAA,EACvD,CAAC;AACH;;;AChCA,SAAS,2BAA2B;AAkBpC,eAAsB,gBACpB,SACmC;AACnC,gBAAc;AACd,sBAAoB;AACpB,SAAO,oBAAgC,OAAO;AAChD;;;ACxBA,SAAS,2BAA2B;AAmBpC,eAAsB,gBACpB,SACsC;AACtC,gBAAc;AACd,sBAAoB;AACpB,SAAO,oBAAgC,OAAO;AAChD","sourcesContent":["import \"./style.scss\";\n\nexport * from \"@netless/fastboard-core\";\nexport * from \"@netless/fastboard-ui\";\n\nexport * from \"./behaviors\";\nexport * from \"./create\";\nexport * from \"./replay\";\n","import type {\n AppOptions as NetlessAppSlideAppOptions,\n Attributes as NetlessAppSlideAttributes,\n SlideState,\n SlideViewerOptions,\n} from \"@netless/app-slide\";\nimport type { RegisterParams } from \"@netless/window-manager\";\n\nimport { WindowManager } from \"@netless/window-manager\";\n\nimport NetlessAppSlide, { addHooks, previewSlide, Slide, SlideViewer } from \"@netless/app-slide\";\n\nexport { Slide, SlideViewer, previewSlide };\nexport type { NetlessAppSlideAttributes, SlideState, SlideViewerOptions };\n\nexport function registerSlide() {\n if (WindowManager.registered.has(NetlessAppSlide.kind)) return;\n WindowManager.register({\n kind: NetlessAppSlide.kind,\n appOptions: { debug: false } as NetlessAppSlideAppOptions,\n src: NetlessAppSlide,\n addHooks,\n });\n}\n\nconst DefaultApps: {\n [kind: string]: Omit<RegisterParams, \"kind\">;\n} = {};\n\nexport function registerDefaultApps() {\n Object.keys(DefaultApps).forEach(kind => {\n if (WindowManager.registered.has(kind)) return;\n WindowManager.register({ kind, ...DefaultApps[kind] });\n });\n}\n","import type { FastboardApp, FastboardOptions } from \"@netless/fastboard-core\";\n\nimport { createFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardApp instance.\n * @example\n * let app = await createFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * joinRoom: {\n * uid: unique_id,\n * uuid: import.meta.env.VITE_ROOM_UUID,\n * roomToken: import.meta.env.VITE_ROOM_TOKEN,\n * },\n * })\n */\nexport async function createFastboard<TEventData extends Record<string, any> = any>(\n options: FastboardOptions\n): Promise<FastboardApp<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return createFastboardCore<TEventData>(options);\n}\n","import type { FastboardPlayer, FastboardReplayOptions } from \"@netless/fastboard-core\";\n\nimport { replayFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardPlayer instance.\n * @example\n * let player = await replayFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * replayRoom: {\n * room: \"room uuid\",\n * roomToken: \"NETLESSROOM_...\",\n * beginTimestamp: 1646619090394,\n * duration: 70448,\n * },\n * })\n */\nexport async function replayFastboard<TEventData extends Record<string, any> = any>(\n options: FastboardReplayOptions\n): Promise<FastboardPlayer<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return replayFastboardCore<TEventData>(options);\n}\n"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/behaviors/netless-app.ts","../src/create.ts","../src/replay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEA,cAAc;AACd,cAAc;;;ACKd,SAAS,qBAAqB;AAE9B,OAAO,mBAAmB,UAAU,cAAc,OAAO,mBAAmB;AAKrE,SAAS,gBAAgB;AAC9B,MAAI,cAAc,WAAW,IAAI,gBAAgB,IAAI;AAAG;AACxD,gBAAc,SAAS;AAAA,IACrB,MAAM,gBAAgB;AAAA,IACtB,YAAY,EAAE,OAAO,MAAM;AAAA,IAC3B,KAAK;AAAA,IACL;AAAA,EACF,CAAC;AACH;AAEA,IAAM,cAEF,CAAC;AAEE,SAAS,sBAAsB;AACpC,SAAO,KAAK,WAAW,EAAE,QAAQ,UAAQ;AACvC,QAAI,cAAc,WAAW,IAAI,IAAI;AAAG;AACxC,kBAAc,SAAS,EAAE,MAAM,GAAG,YAAY,IAAI,EAAE,CAAC;AAAA,EACvD,CAAC;AACH;;;AChCA,SAAS,2BAA2B;AAkBpC,eAAsB,gBACpB,SACmC;AACnC,gBAAc;AACd,sBAAoB;AACpB,SAAO,oBAAgC,OAAO;AAChD;;;ACxBA,SAAS,2BAA2B;AAmBpC,eAAsB,gBACpB,SACsC;AACtC,gBAAc;AACd,sBAAoB;AACpB,SAAO,oBAAgC,OAAO;AAChD","sourcesContent":["import \"./style.scss\";\n\nexport * from \"@netless/fastboard-core\";\nexport * from \"@netless/fastboard-ui\";\n\nexport * from \"./behaviors\";\nexport * from \"./create\";\nexport * from \"./replay\";\n","import type {\n AppOptions as NetlessAppSlideAppOptions,\n Attributes as NetlessAppSlideAttributes,\n SlideState,\n SlideViewerOptions,\n} from \"@netless/app-slide\";\nimport type { RegisterParams } from \"@netless/window-manager\";\n\nimport { WindowManager } from \"@netless/window-manager\";\n\nimport NetlessAppSlide, { addHooks, previewSlide, Slide, SlideViewer } from \"@netless/app-slide\";\n\nexport { Slide, SlideViewer, previewSlide };\nexport type { NetlessAppSlideAttributes, SlideState, SlideViewerOptions };\n\nexport function registerSlide() {\n if (WindowManager.registered.has(NetlessAppSlide.kind)) return;\n WindowManager.register({\n kind: NetlessAppSlide.kind,\n appOptions: { debug: false } as NetlessAppSlideAppOptions,\n src: NetlessAppSlide,\n addHooks,\n });\n}\n\nconst DefaultApps: {\n [kind: string]: Omit<RegisterParams, \"kind\">;\n} = {};\n\nexport function registerDefaultApps() {\n Object.keys(DefaultApps).forEach(kind => {\n if (WindowManager.registered.has(kind)) return;\n WindowManager.register({ kind, ...DefaultApps[kind] });\n });\n}\n","import type { FastboardApp, FastboardOptions } from \"@netless/fastboard-core\";\n\nimport { createFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardApp instance.\n * @example\n * let app = await createFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * joinRoom: {\n * uid: unique_id,\n * uuid: import.meta.env.VITE_ROOM_UUID,\n * roomToken: import.meta.env.VITE_ROOM_TOKEN,\n * },\n * })\n */\nexport async function createFastboard<TEventData extends Record<string, any> = any>(\n options: FastboardOptions\n): Promise<FastboardApp<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return createFastboardCore<TEventData>(options);\n}\n","import type { FastboardPlayer, FastboardReplayOptions } from \"@netless/fastboard-core\";\n\nimport { replayFastboardCore } from \"@netless/fastboard-core\";\nimport { registerDefaultApps, registerSlide } from \"./behaviors/netless-app\";\n\n/**\n * Create a FastboardPlayer instance.\n * @example\n * let player = await replayFastboard({\n * sdkConfig: {\n * appIdentifier: import.meta.env.VITE_APPID,\n * region: 'cn-hz',\n * },\n * replayRoom: {\n * room: \"room uuid\",\n * roomToken: \"NETLESSROOM_...\",\n * beginTimestamp: 1646619090394,\n * duration: 70448,\n * },\n * })\n */\nexport async function replayFastboard<TEventData extends Record<string, any> = any>(\n options: FastboardReplayOptions\n): Promise<FastboardPlayer<TEventData>> {\n registerSlide();\n registerDefaultApps();\n return replayFastboardCore<TEventData>(options);\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/fastboard",
3
- "version": "1.0.0-canary.8",
3
+ "version": "1.0.0-canary.9",
4
4
  "description": "A tiny wrapper of white-web-sdk and @netless/window-manager.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -13,9 +13,9 @@
13
13
  "white-web-sdk": ">=2.16.0"
14
14
  },
15
15
  "dependencies": {
16
- "@netless/app-slide": "^0.3.0-canary.13",
17
- "@netless/fastboard-core": "1.0.0-canary.8",
18
- "@netless/fastboard-ui": "1.0.0-canary.8"
16
+ "@netless/app-slide": "^0.3.0-canary.17",
17
+ "@netless/fastboard-ui": "1.0.0-canary.9",
18
+ "@netless/fastboard-core": "1.0.0-canary.9"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@netless/esbuild-plugin-inline-sass": "0.1.0"