@netless/fastboard-react 0.2.12 → 0.2.13-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/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/vanilla/index.tsx +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netless/fastboard-react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13-canary.0",
|
|
4
4
|
"description": "A UI kit built on top of @netless/fastboard.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
"@tippyjs/react": "^4.2.6",
|
|
12
12
|
"clsx": "^1.1.1",
|
|
13
13
|
"framer-motion": "^6.2.8",
|
|
14
|
-
"i18next": "^21.6.
|
|
14
|
+
"i18next": "^21.6.14",
|
|
15
15
|
"rc-slider": "^9.7.5"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@netless/fastboard-core": "
|
|
18
|
+
"@netless/fastboard-core": "0.2.13-canary.0",
|
|
19
19
|
"@netless/window-manager": ">=0.4.0",
|
|
20
20
|
"react": "*",
|
|
21
21
|
"react-dom": "*",
|
|
22
22
|
"white-web-sdk": ">=2.16.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@netless/fastboard-core": "0.2.
|
|
26
|
-
"@netless/window-manager": "^0.4.11
|
|
27
|
-
"@types/react": "^17.0.
|
|
25
|
+
"@netless/fastboard-core": "0.2.13-canary.0",
|
|
26
|
+
"@netless/window-manager": "^0.4.11",
|
|
27
|
+
"@types/react": "^17.0.40",
|
|
28
28
|
"@types/react-dom": "^17.0.13",
|
|
29
29
|
"sass": "^1.49.9",
|
|
30
30
|
"tippy.js": "^6.3.7",
|
package/src/vanilla/index.tsx
CHANGED
|
@@ -8,17 +8,17 @@ import { Fastboard } from "../components/Fastboard";
|
|
|
8
8
|
export type MountProps = Omit<FastboardProps & DivProps, "ref">;
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Mount fastboard app to some dom, returns the
|
|
11
|
+
* Mount fastboard app to some dom, returns the updater and disposer.
|
|
12
12
|
* @example
|
|
13
13
|
* let app = await createFastboard({ ...config })
|
|
14
14
|
* const { update, destroy } = mount(app, document.getElementById("whiteboard"))
|
|
15
15
|
* update({ theme: 'dark' })
|
|
16
16
|
* destroy()
|
|
17
17
|
*/
|
|
18
|
-
export function mount(app: FastboardApp, dom: HTMLElement, props: MountProps) {
|
|
18
|
+
export function mount(app: FastboardApp, dom: HTMLElement, props: MountProps = {}) {
|
|
19
19
|
ReactDOM.render(<Fastboard app={app} {...props} />, dom);
|
|
20
20
|
return {
|
|
21
|
-
update(props: MountProps) {
|
|
21
|
+
update(props: MountProps = {}) {
|
|
22
22
|
ReactDOM.render(<Fastboard app={app} {...props} />, dom);
|
|
23
23
|
},
|
|
24
24
|
destroy() {
|