@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 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 disposer, which will unmount the app.
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: MountProps): {
142
- update(props: MountProps): void;
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);