@netless/fastboard-ui 0.3.15-canary.0 → 0.3.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/lite.d.ts CHANGED
@@ -23,6 +23,13 @@ interface ToolbarConfig {
23
23
  placement?: "left" | "right";
24
24
  /** @default ["clicker", "selector", "pencil", "text", "shapes", "eraser", "clear"] */
25
25
  items?: ToolbarItem[];
26
+ /**
27
+ * Note: updating this option does not take effect when the element was mounted.
28
+ * Make sure to set this option in `UI.mount(div, { configs: { toolbar: { collapsed: true } } })`.
29
+ * @default false
30
+ */
31
+ collapsed?: boolean;
32
+ /** Control the last button which opens apps stock on toolbar. */
26
33
  apps?: {
27
34
  enable?: boolean;
28
35
  };
@@ -106,6 +113,10 @@ declare interface FastboardProps {
106
113
  app?: FastboardApp | null;
107
114
  theme?: Theme;
108
115
  language?: Language;
116
+ /**
117
+ * Note: updating this option does not take effect when the element was mounted.
118
+ * Make sure to set this option in `UI.mount(div, { containerRef })`.
119
+ */
109
120
  containerRef?: (container: HTMLDivElement | null) => void;
110
121
  config?: FastboardUIConfig;
111
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/fastboard-ui",
3
- "version": "0.3.15-canary.0",
3
+ "version": "0.3.15",
4
4
  "description": "The front-end of @netless/fastboard-core.",
5
5
  "main": "dist/index.js",
6
6
  "svelte": "dist/index.svelte.mjs",
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "repository": "netless-io/fastboard",
13
13
  "peerDependencies": {
14
- "@netless/fastboard-core": "0.3.15-canary.0"
14
+ "@netless/fastboard-core": "0.3.15"
15
15
  },
16
16
  "dependencies": {
17
17
  "tippy.js": "^6.3.7"
@@ -19,7 +19,7 @@
19
19
  "devDependencies": {
20
20
  "@netless/buildtool": "0.1.0",
21
21
  "@netless/esbuild-plugin-inline-sass": "0.1.0",
22
- "@netless/fastboard-core": "0.3.15-canary.0"
22
+ "@netless/fastboard-core": "0.3.15"
23
23
  },
24
24
  "scripts": {
25
25
  "cleanup": "rimraf dist",
@@ -6,6 +6,10 @@ export declare interface FastboardProps {
6
6
  app?: FastboardApp | null;
7
7
  theme?: Theme;
8
8
  language?: Language;
9
+ /**
10
+ * Note: updating this option does not take effect when the element was mounted.
11
+ * Make sure to set this option in `UI.mount(div, { containerRef })`.
12
+ */
9
13
  containerRef?: (container: HTMLDivElement | null) => void;
10
14
  config?: FastboardUIConfig;
11
15
  }
@@ -19,7 +19,7 @@
19
19
  $: phase = app?.phase;
20
20
  $: disabled = !($writable && $phase === "connected");
21
21
 
22
- let collapsed = false;
22
+ let collapsed = config.collapsed;
23
23
  let container_height = svelte_writable(0);
24
24
  let scroll_height = svelte_writable(0);
25
25
 
package/src/typings.ts CHANGED
@@ -39,6 +39,13 @@ export interface ToolbarConfig {
39
39
  placement?: "left" | "right";
40
40
  /** @default ["clicker", "selector", "pencil", "text", "shapes", "eraser", "clear"] */
41
41
  items?: ToolbarItem[];
42
+ /**
43
+ * Note: updating this option does not take effect when the element was mounted.
44
+ * Make sure to set this option in `UI.mount(div, { configs: { toolbar: { collapsed: true } } })`.
45
+ * @default false
46
+ */
47
+ collapsed?: boolean;
48
+ /** Control the last button which opens apps stock on toolbar. */
42
49
  apps?: { enable?: boolean };
43
50
  }
44
51