@netless/fastboard-ui 0.3.0-canary.0 → 0.3.0-canary.1

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
@@ -58,6 +58,7 @@ declare interface ReplayFastboardProps {
58
58
  player?: FastboardPlayer | null;
59
59
  theme?: Theme;
60
60
  language?: Language;
61
+ ref?: (container: HTMLElement) => void;
61
62
  }
62
63
  declare class ReplayFastboard extends SvelteComponentTyped<ReplayFastboardProps> {
63
64
  }
@@ -66,6 +67,7 @@ declare interface FastboardProps {
66
67
  app?: FastboardApp | null;
67
68
  theme?: Theme;
68
69
  language?: Language;
70
+ ref?: (container: HTMLElement) => void;
69
71
  }
70
72
  declare class Fastboard extends SvelteComponentTyped<FastboardProps> {
71
73
  }
package/dist/index.js CHANGED
@@ -9861,7 +9861,7 @@ function create_fragment57(ctx) {
9861
9861
  m(target, anchor) {
9862
9862
  insert(target, div2, anchor);
9863
9863
  append(div2, div0);
9864
- ctx[4](div0);
9864
+ ctx[5](div0);
9865
9865
  append(div2, t);
9866
9866
  append(div2, div1);
9867
9867
  mount_component(playercontrol, div1, null);
@@ -9893,7 +9893,7 @@ function create_fragment57(ctx) {
9893
9893
  d(detaching) {
9894
9894
  if (detaching)
9895
9895
  detach(div2);
9896
- ctx[4](null);
9896
+ ctx[5](null);
9897
9897
  destroy_component(playercontrol);
9898
9898
  }
9899
9899
  };
@@ -9903,6 +9903,7 @@ function instance57($$self, $$props, $$invalidate) {
9903
9903
  let { player = null } = $$props;
9904
9904
  let { theme = "light" } = $$props;
9905
9905
  let { language = "en" } = $$props;
9906
+ let { ref = void 0 } = $$props;
9906
9907
  let container;
9907
9908
  function div0_binding($$value) {
9908
9909
  binding_callbacks[$$value ? "unshift" : "push"](() => {
@@ -9917,6 +9918,8 @@ function instance57($$self, $$props, $$invalidate) {
9917
9918
  $$invalidate(1, theme = $$props2.theme);
9918
9919
  if ("language" in $$props2)
9919
9920
  $$invalidate(2, language = $$props2.language);
9921
+ if ("ref" in $$props2)
9922
+ $$invalidate(4, ref = $$props2.ref);
9920
9923
  };
9921
9924
  $$self.$$.update = () => {
9922
9925
  if ($$self.$$.dirty & 9) {
@@ -9924,13 +9927,18 @@ function instance57($$self, $$props, $$invalidate) {
9924
9927
  if (player && container)
9925
9928
  player.bindContainer(container);
9926
9929
  }
9930
+ if ($$self.$$.dirty & 24) {
9931
+ $:
9932
+ if (ref && container)
9933
+ ref(container);
9934
+ }
9927
9935
  };
9928
- return [player, theme, language, container, div0_binding];
9936
+ return [player, theme, language, container, ref, div0_binding];
9929
9937
  }
9930
9938
  var ReplayFastboard = class extends SvelteComponent {
9931
9939
  constructor(options) {
9932
9940
  super();
9933
- init(this, options, instance57, create_fragment57, safe_not_equal, { player: 0, theme: 1, language: 2 });
9941
+ init(this, options, instance57, create_fragment57, safe_not_equal, { player: 0, theme: 1, language: 2, ref: 4 });
9934
9942
  }
9935
9943
  };
9936
9944
  var ReplayFastboard_default = ReplayFastboard;
@@ -10009,7 +10017,7 @@ function create_fragment58(ctx) {
10009
10017
  m(target, anchor) {
10010
10018
  insert(target, div4, anchor);
10011
10019
  append(div4, div0);
10012
- ctx[4](div0);
10020
+ ctx[5](div0);
10013
10021
  append(div4, t0);
10014
10022
  append(div4, div1);
10015
10023
  mount_component(toolbar, div1, null);
@@ -10079,7 +10087,7 @@ function create_fragment58(ctx) {
10079
10087
  d(detaching) {
10080
10088
  if (detaching)
10081
10089
  detach(div4);
10082
- ctx[4](null);
10090
+ ctx[5](null);
10083
10091
  destroy_component(toolbar);
10084
10092
  destroy_component(redoundo);
10085
10093
  destroy_component(zoomcontrol);
@@ -10092,6 +10100,7 @@ function instance58($$self, $$props, $$invalidate) {
10092
10100
  let { app = null } = $$props;
10093
10101
  let { theme = "light" } = $$props;
10094
10102
  let { language = "en" } = $$props;
10103
+ let { ref = void 0 } = $$props;
10095
10104
  let container;
10096
10105
  function div0_binding($$value) {
10097
10106
  binding_callbacks[$$value ? "unshift" : "push"](() => {
@@ -10106,6 +10115,8 @@ function instance58($$self, $$props, $$invalidate) {
10106
10115
  $$invalidate(1, theme = $$props2.theme);
10107
10116
  if ("language" in $$props2)
10108
10117
  $$invalidate(2, language = $$props2.language);
10118
+ if ("ref" in $$props2)
10119
+ $$invalidate(4, ref = $$props2.ref);
10109
10120
  };
10110
10121
  $$self.$$.update = () => {
10111
10122
  if ($$self.$$.dirty & 9) {
@@ -10113,13 +10124,18 @@ function instance58($$self, $$props, $$invalidate) {
10113
10124
  if (app && container)
10114
10125
  app.bindContainer(container);
10115
10126
  }
10127
+ if ($$self.$$.dirty & 24) {
10128
+ $:
10129
+ if (ref && container)
10130
+ ref(container);
10131
+ }
10116
10132
  };
10117
- return [app, theme, language, container, div0_binding];
10133
+ return [app, theme, language, container, ref, div0_binding];
10118
10134
  }
10119
10135
  var Fastboard = class extends SvelteComponent {
10120
10136
  constructor(options) {
10121
10137
  super();
10122
- init(this, options, instance58, create_fragment58, safe_not_equal, { app: 0, theme: 1, language: 2 });
10138
+ init(this, options, instance58, create_fragment58, safe_not_equal, { app: 0, theme: 1, language: 2, ref: 4 });
10123
10139
  }
10124
10140
  };
10125
10141
  var Fastboard_default = Fastboard;