@netless/fastboard 0.3.3 → 0.3.4-canary.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.
package/README.md CHANGED
@@ -5,7 +5,7 @@ A tiny wrapper of white-web-sdk and @netless/window-manager.
5
5
  ## Usage
6
6
 
7
7
  ```js
8
- import { createFastboard, mount } from "@netless/fastboard";
8
+ import { createFastboard, createUI } from "@netless/fastboard";
9
9
 
10
10
  createFastboard({
11
11
  sdkConfig: {
@@ -20,7 +20,7 @@ createFastboard({
20
20
  cursor: true,
21
21
  },
22
22
  }).then(app => {
23
- mount(app, document.getElementById("app"));
23
+ createUI(app, document.getElementById("app"));
24
24
  });
25
25
  ```
26
26
 
package/dist/index.d.ts CHANGED
@@ -5,13 +5,19 @@ export * from '@netless/fastboard-ui';
5
5
  export { GenericIcon, Language, Theme } from '@netless/fastboard-ui';
6
6
 
7
7
  declare type MountProps = Omit<FastboardProps, "app">;
8
+ /**
9
+ * @deprecated Use `createUI` instead.
10
+ */
8
11
  declare function mount(app: FastboardApp, div: HTMLDivElement, options?: MountProps): {
9
- update(props?: MountProps | undefined): void;
12
+ update(props?: MountProps): void;
10
13
  destroy(): void;
11
14
  };
12
15
  declare type ReplayProps = Omit<ReplayFastboardProps, "player">;
16
+ /**
17
+ * @deprecated Use `createReplayUI` instead.
18
+ */
13
19
  declare function replay(player: FastboardPlayer, div: HTMLDivElement, options?: ReplayProps): {
14
- update(props?: ReplayProps | undefined): void;
20
+ update(props?: ReplayProps): void;
15
21
  destroy(): void;
16
22
  };
17
23
 
package/dist/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ 'use strict';
2
+
1
3
  var __defProp = Object.defineProperty;
2
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { FastboardApp, FastboardPlayer } from \"@netless/fastboard-core\";\nimport type {\n FastboardProps,\n GenericIcon,\n Language,\n ReplayFastboardProps,\n Theme,\n} from \"@netless/fastboard-ui\";\n\nimport { Fastboard, ReplayFastboard } from \"@netless/fastboard-ui\";\n\nimport \"./style.scss\";\n\nexport * from \"@netless/fastboard-core\";\nexport * from \"@netless/fastboard-ui\";\nexport type { Theme, Language, GenericIcon };\n\nexport type MountProps = Omit<FastboardProps, \"app\">;\n\nexport function mount(app: FastboardApp, div: HTMLDivElement, options?: MountProps) {\n const fastboard = new Fastboard({ target: div, props: { app, ...options } });\n\n return {\n update(props?: MountProps) {\n fastboard.$set(props);\n },\n destroy() {\n fastboard.$destroy();\n },\n };\n}\n\nexport type ReplayProps = Omit<ReplayFastboardProps, \"player\">;\n\nexport function replay(player: FastboardPlayer, div: HTMLDivElement, options?: ReplayProps) {\n const replayFastboard = new ReplayFastboard({ target: div, props: { player, ...options } });\n\n return {\n update(props?: ReplayProps) {\n replayFastboard.$set(props);\n },\n destroy() {\n replayFastboard.$destroy();\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,0BAA2C;;;;;;;;;;;;;;;;;;;AAI3C,wBAAc,oCAbd;AAcA,wBAAc,kCAdd;AAmBO,eAAe,KAAmB,KAAqB,SAAsB;AAClF,QAAM,YAAY,IAAI,8BAAU,EAAE,QAAQ,KAAK,OAAO,iBAAE,OAAQ,SAAU,CAAC;AAE3E,SAAO;AAAA,IACL,OAAO,OAAoB;AACzB,gBAAU,KAAK,KAAK;AAAA,IACtB;AAAA,IACA,UAAU;AACR,gBAAU,SAAS;AAAA,IACrB;AAAA,EACF;AACF;AAIO,gBAAgB,QAAyB,KAAqB,SAAuB;AAC1F,QAAM,kBAAkB,IAAI,oCAAgB,EAAE,QAAQ,KAAK,OAAO,iBAAE,UAAW,SAAU,CAAC;AAE1F,SAAO;AAAA,IACL,OAAO,OAAqB;AAC1B,sBAAgB,KAAK,KAAK;AAAA,IAC5B;AAAA,IACA,UAAU;AACR,sBAAgB,SAAS;AAAA,IAC3B;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,0BAA2C;;;;;;;;;;;;;;;;;;;AAI3C,wBAAc,oCAbd;AAcA,wBAAc,kCAdd;AAsBO,eAAe,KAAmB,KAAqB,SAAsB;AAClF,QAAM,YAAY,IAAI,8BAAU,EAAE,QAAQ,KAAK,OAAO,iBAAE,OAAQ,SAAU,CAAC;AAE3E,SAAO;AAAA,IACL,OAAO,OAAoB;AACzB,gBAAU,KAAK,KAAK;AAAA,IACtB;AAAA,IACA,UAAU;AACR,gBAAU,SAAS;AAAA,IACrB;AAAA,EACF;AACF;AAOO,gBAAgB,QAAyB,KAAqB,SAAuB;AAC1F,QAAM,kBAAkB,IAAI,oCAAgB,EAAE,QAAQ,KAAK,OAAO,iBAAE,UAAW,SAAU,CAAC;AAE1F,SAAO;AAAA,IACL,OAAO,OAAqB;AAC1B,sBAAgB,KAAK,KAAK;AAAA,IAC5B;AAAA,IACA,UAAU;AACR,sBAAgB,SAAS;AAAA,IAC3B;AAAA,EACF;AACF","sourcesContent":["import type { FastboardApp, FastboardPlayer } from \"@netless/fastboard-core\";\nimport type {\n FastboardProps,\n GenericIcon,\n Language,\n ReplayFastboardProps,\n Theme,\n} from \"@netless/fastboard-ui\";\n\nimport { Fastboard, ReplayFastboard } from \"@netless/fastboard-ui\";\n\nimport \"./style.scss\";\n\nexport * from \"@netless/fastboard-core\";\nexport * from \"@netless/fastboard-ui\";\nexport type { Theme, Language, GenericIcon };\n\nexport type MountProps = Omit<FastboardProps, \"app\">;\n\n/**\n * @deprecated Use `createUI` instead.\n */\nexport function mount(app: FastboardApp, div: HTMLDivElement, options?: MountProps) {\n const fastboard = new Fastboard({ target: div, props: { app, ...options } });\n\n return {\n update(props?: MountProps) {\n fastboard.$set(props);\n },\n destroy() {\n fastboard.$destroy();\n },\n };\n}\n\nexport type ReplayProps = Omit<ReplayFastboardProps, \"player\">;\n\n/**\n * @deprecated Use `createReplayUI` instead.\n */\nexport function replay(player: FastboardPlayer, div: HTMLDivElement, options?: ReplayProps) {\n const replayFastboard = new ReplayFastboard({ target: div, props: { player, ...options } });\n\n return {\n update(props?: ReplayProps) {\n replayFastboard.$set(props);\n },\n destroy() {\n replayFastboard.$destroy();\n },\n };\n}\n"]}
package/dist/index.mjs CHANGED
@@ -1,3 +1,7 @@
1
+ import { Fastboard, ReplayFastboard } from '@netless/fastboard-ui';
2
+ export * from '@netless/fastboard-ui';
3
+ export * from '@netless/fastboard-core';
4
+
1
5
  var __defProp = Object.defineProperty;
2
6
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
@@ -15,9 +19,6 @@ var __spreadValues = (a, b) => {
15
19
  return a;
16
20
  };
17
21
 
18
- // src/index.ts
19
- import { Fastboard, ReplayFastboard } from "@netless/fastboard-ui";
20
-
21
22
  // inline-sass-helper:inline-sass-style-helper.js
22
23
  function injectStyle(text) {
23
24
  if (typeof document !== "undefined") {
@@ -33,10 +34,6 @@ var style_default = '@charset "UTF-8";.vjs-modal-dialog .vjs-modal-dialog-conten
33
34
 
34
35
  // inline-sass-stub:./src/style.scss
35
36
  injectStyle(style_default);
36
-
37
- // src/index.ts
38
- export * from "@netless/fastboard-core";
39
- export * from "@netless/fastboard-ui";
40
37
  function mount(app, div, options) {
41
38
  const fastboard = new Fastboard({ target: div, props: __spreadValues({ app }, options) });
42
39
  return {
@@ -59,8 +56,6 @@ function replay(player, div, options) {
59
56
  }
60
57
  };
61
58
  }
62
- export {
63
- mount,
64
- replay
65
- };
59
+
60
+ export { mount, replay };
66
61
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { FastboardApp, FastboardPlayer } from \"@netless/fastboard-core\";\nimport type {\n FastboardProps,\n GenericIcon,\n Language,\n ReplayFastboardProps,\n Theme,\n} from \"@netless/fastboard-ui\";\n\nimport { Fastboard, ReplayFastboard } from \"@netless/fastboard-ui\";\n\nimport \"./style.scss\";\n\nexport * from \"@netless/fastboard-core\";\nexport * from \"@netless/fastboard-ui\";\nexport type { Theme, Language, GenericIcon };\n\nexport type MountProps = Omit<FastboardProps, \"app\">;\n\nexport function mount(app: FastboardApp, div: HTMLDivElement, options?: MountProps) {\n const fastboard = new Fastboard({ target: div, props: { app, ...options } });\n\n return {\n update(props?: MountProps) {\n fastboard.$set(props);\n },\n destroy() {\n fastboard.$destroy();\n },\n };\n}\n\nexport type ReplayProps = Omit<ReplayFastboardProps, \"player\">;\n\nexport function replay(player: FastboardPlayer, div: HTMLDivElement, options?: ReplayProps) {\n const replayFastboard = new ReplayFastboard({ target: div, props: { player, ...options } });\n\n return {\n update(props?: ReplayProps) {\n replayFastboard.$set(props);\n },\n destroy() {\n replayFastboard.$destroy();\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;AAIA;AACA;AAKO,eAAe,KAAmB,KAAqB,SAAsB;AAClF,QAAM,YAAY,IAAI,UAAU,EAAE,QAAQ,KAAK,OAAO,iBAAE,OAAQ,SAAU,CAAC;AAE3E,SAAO;AAAA,IACL,OAAO,OAAoB;AACzB,gBAAU,KAAK,KAAK;AAAA,IACtB;AAAA,IACA,UAAU;AACR,gBAAU,SAAS;AAAA,IACrB;AAAA,EACF;AACF;AAIO,gBAAgB,QAAyB,KAAqB,SAAuB;AAC1F,QAAM,kBAAkB,IAAI,gBAAgB,EAAE,QAAQ,KAAK,OAAO,iBAAE,UAAW,SAAU,CAAC;AAE1F,SAAO;AAAA,IACL,OAAO,OAAqB;AAC1B,sBAAgB,KAAK,KAAK;AAAA,IAC5B;AAAA,IACA,UAAU;AACR,sBAAgB,SAAS;AAAA,IAC3B;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AASA;;;;;;;;;;;;;;;;;;;AAIA;AACA;AAQO,eAAe,KAAmB,KAAqB,SAAsB;AAClF,QAAM,YAAY,IAAI,UAAU,EAAE,QAAQ,KAAK,OAAO,iBAAE,OAAQ,SAAU,CAAC;AAE3E,SAAO;AAAA,IACL,OAAO,OAAoB;AACzB,gBAAU,KAAK,KAAK;AAAA,IACtB;AAAA,IACA,UAAU;AACR,gBAAU,SAAS;AAAA,IACrB;AAAA,EACF;AACF;AAOO,gBAAgB,QAAyB,KAAqB,SAAuB;AAC1F,QAAM,kBAAkB,IAAI,gBAAgB,EAAE,QAAQ,KAAK,OAAO,iBAAE,UAAW,SAAU,CAAC;AAE1F,SAAO;AAAA,IACL,OAAO,OAAqB;AAC1B,sBAAgB,KAAK,KAAK;AAAA,IAC5B;AAAA,IACA,UAAU;AACR,sBAAgB,SAAS;AAAA,IAC3B;AAAA,EACF;AACF","sourcesContent":["import type { FastboardApp, FastboardPlayer } from \"@netless/fastboard-core\";\nimport type {\n FastboardProps,\n GenericIcon,\n Language,\n ReplayFastboardProps,\n Theme,\n} from \"@netless/fastboard-ui\";\n\nimport { Fastboard, ReplayFastboard } from \"@netless/fastboard-ui\";\n\nimport \"./style.scss\";\n\nexport * from \"@netless/fastboard-core\";\nexport * from \"@netless/fastboard-ui\";\nexport type { Theme, Language, GenericIcon };\n\nexport type MountProps = Omit<FastboardProps, \"app\">;\n\n/**\n * @deprecated Use `createUI` instead.\n */\nexport function mount(app: FastboardApp, div: HTMLDivElement, options?: MountProps) {\n const fastboard = new Fastboard({ target: div, props: { app, ...options } });\n\n return {\n update(props?: MountProps) {\n fastboard.$set(props);\n },\n destroy() {\n fastboard.$destroy();\n },\n };\n}\n\nexport type ReplayProps = Omit<ReplayFastboardProps, \"player\">;\n\n/**\n * @deprecated Use `createReplayUI` instead.\n */\nexport function replay(player: FastboardPlayer, div: HTMLDivElement, options?: ReplayProps) {\n const replayFastboard = new ReplayFastboard({ target: div, props: { player, ...options } });\n\n return {\n update(props?: ReplayProps) {\n replayFastboard.$set(props);\n },\n destroy() {\n replayFastboard.$destroy();\n },\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/fastboard",
3
- "version": "0.3.3",
3
+ "version": "0.3.4-canary.2",
4
4
  "description": "A tiny wrapper of white-web-sdk and @netless/window-manager.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -9,8 +9,8 @@
9
9
  ],
10
10
  "repository": "netless-io/fastboard",
11
11
  "dependencies": {
12
- "@netless/fastboard-core": "0.3.3",
13
- "@netless/fastboard-ui": "0.3.3"
12
+ "@netless/fastboard-core": "0.3.4-canary.2",
13
+ "@netless/fastboard-ui": "0.3.4-canary.2"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@netless/esbuild-plugin-inline-sass": "0.1.0"
package/src/index.ts CHANGED
@@ -17,6 +17,9 @@ export type { Theme, Language, GenericIcon };
17
17
 
18
18
  export type MountProps = Omit<FastboardProps, "app">;
19
19
 
20
+ /**
21
+ * @deprecated Use `createUI` instead.
22
+ */
20
23
  export function mount(app: FastboardApp, div: HTMLDivElement, options?: MountProps) {
21
24
  const fastboard = new Fastboard({ target: div, props: { app, ...options } });
22
25
 
@@ -32,6 +35,9 @@ export function mount(app: FastboardApp, div: HTMLDivElement, options?: MountPro
32
35
 
33
36
  export type ReplayProps = Omit<ReplayFastboardProps, "player">;
34
37
 
38
+ /**
39
+ * @deprecated Use `createReplayUI` instead.
40
+ */
35
41
  export function replay(player: FastboardPlayer, div: HTMLDivElement, options?: ReplayProps) {
36
42
  const replayFastboard = new ReplayFastboard({ target: div, props: { player, ...options } });
37
43