@netless/fastboard 0.3.4-canary.0 → 1.0.0-canary.0

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,11 +5,17 @@ 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
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
20
  update(props?: ReplayProps): void;
15
21
  destroy(): void;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"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","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"]}
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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"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","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"]}
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.4-canary.0",
3
+ "version": "1.0.0-canary.0",
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.4-canary.0",
13
- "@netless/fastboard-ui": "0.3.4-canary.0"
12
+ "@netless/fastboard-core": "1.0.0-canary.0",
13
+ "@netless/fastboard-ui": "1.0.0-canary.0"
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