@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/dist/index.d.ts
CHANGED
|
@@ -131,15 +131,15 @@ declare const ReplayFastboard: React__default.ForwardRefExoticComponent<Pick<Rep
|
|
|
131
131
|
|
|
132
132
|
declare type MountProps = Omit<FastboardProps & DivProps, "ref">;
|
|
133
133
|
/**
|
|
134
|
-
* Mount fastboard app to some dom, returns the
|
|
134
|
+
* Mount fastboard app to some dom, returns the updater and disposer.
|
|
135
135
|
* @example
|
|
136
136
|
* let app = await createFastboard({ ...config })
|
|
137
137
|
* const { update, destroy } = mount(app, document.getElementById("whiteboard"))
|
|
138
138
|
* update({ theme: 'dark' })
|
|
139
139
|
* destroy()
|
|
140
140
|
*/
|
|
141
|
-
declare function mount(app: FastboardApp, dom: HTMLElement, props
|
|
142
|
-
update(props
|
|
141
|
+
declare function mount(app: FastboardApp, dom: HTMLElement, props?: MountProps): {
|
|
142
|
+
update(props?: MountProps): void;
|
|
143
143
|
destroy(): void;
|
|
144
144
|
};
|
|
145
145
|
|
package/dist/index.js
CHANGED
|
@@ -2159,12 +2159,12 @@ var ReplayFastboard = /* @__PURE__ */ (0, import_react71.forwardRef)(function Re
|
|
|
2159
2159
|
// src/vanilla/index.tsx
|
|
2160
2160
|
var import_react72 = __toESM(require("react"));
|
|
2161
2161
|
var import_react_dom = __toESM(require("react-dom"));
|
|
2162
|
-
function mount(app, dom, props) {
|
|
2162
|
+
function mount(app, dom, props = {}) {
|
|
2163
2163
|
import_react_dom.default.render(/* @__PURE__ */ import_react72.default.createElement(Fastboard, __spreadValues({
|
|
2164
2164
|
app
|
|
2165
2165
|
}, props)), dom);
|
|
2166
2166
|
return {
|
|
2167
|
-
update(props2) {
|
|
2167
|
+
update(props2 = {}) {
|
|
2168
2168
|
import_react_dom.default.render(/* @__PURE__ */ import_react72.default.createElement(Fastboard, __spreadValues({
|
|
2169
2169
|
app
|
|
2170
2170
|
}, props2)), dom);
|