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

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
+ containerRef?: (container: HTMLDivElement | null) => 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
+ containerRef?: (container: HTMLDivElement | null) => 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 { containerRef = 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 ("containerRef" in $$props2)
9922
+ $$invalidate(4, containerRef = $$props2.containerRef);
9920
9923
  };
9921
9924
  $$self.$$.update = () => {
9922
9925
  if ($$self.$$.dirty & 9) {
@@ -9924,13 +9927,23 @@ 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 (containerRef)
9933
+ containerRef(container || null);
9934
+ }
9927
9935
  };
9928
- return [player, theme, language, container, div0_binding];
9936
+ return [player, theme, language, container, containerRef, 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, {
9942
+ player: 0,
9943
+ theme: 1,
9944
+ language: 2,
9945
+ containerRef: 4
9946
+ });
9934
9947
  }
9935
9948
  };
9936
9949
  var ReplayFastboard_default = ReplayFastboard;
@@ -10009,7 +10022,7 @@ function create_fragment58(ctx) {
10009
10022
  m(target, anchor) {
10010
10023
  insert(target, div4, anchor);
10011
10024
  append(div4, div0);
10012
- ctx[4](div0);
10025
+ ctx[5](div0);
10013
10026
  append(div4, t0);
10014
10027
  append(div4, div1);
10015
10028
  mount_component(toolbar, div1, null);
@@ -10079,7 +10092,7 @@ function create_fragment58(ctx) {
10079
10092
  d(detaching) {
10080
10093
  if (detaching)
10081
10094
  detach(div4);
10082
- ctx[4](null);
10095
+ ctx[5](null);
10083
10096
  destroy_component(toolbar);
10084
10097
  destroy_component(redoundo);
10085
10098
  destroy_component(zoomcontrol);
@@ -10092,6 +10105,7 @@ function instance58($$self, $$props, $$invalidate) {
10092
10105
  let { app = null } = $$props;
10093
10106
  let { theme = "light" } = $$props;
10094
10107
  let { language = "en" } = $$props;
10108
+ let { containerRef = void 0 } = $$props;
10095
10109
  let container;
10096
10110
  function div0_binding($$value) {
10097
10111
  binding_callbacks[$$value ? "unshift" : "push"](() => {
@@ -10106,6 +10120,8 @@ function instance58($$self, $$props, $$invalidate) {
10106
10120
  $$invalidate(1, theme = $$props2.theme);
10107
10121
  if ("language" in $$props2)
10108
10122
  $$invalidate(2, language = $$props2.language);
10123
+ if ("containerRef" in $$props2)
10124
+ $$invalidate(4, containerRef = $$props2.containerRef);
10109
10125
  };
10110
10126
  $$self.$$.update = () => {
10111
10127
  if ($$self.$$.dirty & 9) {
@@ -10113,13 +10129,23 @@ function instance58($$self, $$props, $$invalidate) {
10113
10129
  if (app && container)
10114
10130
  app.bindContainer(container);
10115
10131
  }
10132
+ if ($$self.$$.dirty & 24) {
10133
+ $:
10134
+ if (containerRef)
10135
+ containerRef(container || null);
10136
+ }
10116
10137
  };
10117
- return [app, theme, language, container, div0_binding];
10138
+ return [app, theme, language, container, containerRef, div0_binding];
10118
10139
  }
10119
10140
  var Fastboard = class extends SvelteComponent {
10120
10141
  constructor(options) {
10121
10142
  super();
10122
- init(this, options, instance58, create_fragment58, safe_not_equal, { app: 0, theme: 1, language: 2 });
10143
+ init(this, options, instance58, create_fragment58, safe_not_equal, {
10144
+ app: 0,
10145
+ theme: 1,
10146
+ language: 2,
10147
+ containerRef: 4
10148
+ });
10123
10149
  }
10124
10150
  };
10125
10151
  var Fastboard_default = Fastboard;