@netless/fastboard-ui 0.3.0-canary.2 → 0.3.0-canary.5

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.
@@ -3548,6 +3548,13 @@ var tippy = function(node, props) {
3548
3548
  }
3549
3549
  };
3550
3550
  };
3551
+ function tippy_hide_all() {
3552
+ document.querySelectorAll("[data-tippy-root]").forEach((el) => {
3553
+ const instance59 = el._tippy;
3554
+ if (instance59)
3555
+ instance59.hide();
3556
+ });
3557
+ }
3551
3558
  var tippy_menu = {
3552
3559
  delay: 0,
3553
3560
  placement: "right-start",
@@ -8706,10 +8713,6 @@ function instance54($$self, $$props, $$invalidate) {
8706
8713
  $:
8707
8714
  $$subscribe_status($$invalidate(15, status = app == null ? void 0 : app.appsStatus));
8708
8715
  }
8709
- if ($$self.$$.dirty[0] & 536870944 | $$self.$$.dirty[1] & 1) {
8710
- $:
8711
- max_scroll = scrollable ? $scroll_height + (32 + 8) * 2 - computed_height : 0;
8712
- }
8713
8716
  if ($$self.$$.dirty[0] & 192) {
8714
8717
  $:
8715
8718
  if (applianceShapes.includes(appliance)) {
@@ -8718,6 +8721,10 @@ function instance54($$self, $$props, $$invalidate) {
8718
8721
  $$invalidate(9, last_shape = shape);
8719
8722
  }
8720
8723
  }
8724
+ if ($$self.$$.dirty[0] & 536870944 | $$self.$$.dirty[1] & 1) {
8725
+ $:
8726
+ max_scroll = scrollable ? $scroll_height + (32 + 8) * 2 - computed_height : 0;
8727
+ }
8721
8728
  };
8722
8729
  return [
8723
8730
  app,
@@ -10020,6 +10027,7 @@ import {
10020
10027
  element as element13,
10021
10028
  init as init57,
10022
10029
  insert as insert56,
10030
+ listen as listen7,
10023
10031
  mount_component as mount_component9,
10024
10032
  safe_not_equal as safe_not_equal57,
10025
10033
  space as space10,
@@ -10037,6 +10045,8 @@ function create_fragment57(ctx) {
10037
10045
  let div1_class_value;
10038
10046
  let div2_class_value;
10039
10047
  let current;
10048
+ let mounted;
10049
+ let dispose;
10040
10050
  playercontrol = new PlayerControl_default({
10041
10051
  props: {
10042
10052
  player: ctx[0],
@@ -10064,6 +10074,10 @@ function create_fragment57(ctx) {
10064
10074
  append56(div2, div1);
10065
10075
  mount_component9(playercontrol, div1, null);
10066
10076
  current = true;
10077
+ if (!mounted) {
10078
+ dispose = listen7(div0, "touchstart", tippy_hide_all, true);
10079
+ mounted = true;
10080
+ }
10067
10081
  },
10068
10082
  p(ctx2, [dirty]) {
10069
10083
  const playercontrol_changes = {};
@@ -10093,6 +10107,8 @@ function create_fragment57(ctx) {
10093
10107
  detach56(div2);
10094
10108
  ctx[5](null);
10095
10109
  destroy_component9(playercontrol);
10110
+ mounted = false;
10111
+ dispose();
10096
10112
  }
10097
10113
  };
10098
10114
  }
@@ -10101,7 +10117,7 @@ function instance57($$self, $$props, $$invalidate) {
10101
10117
  let { player = null } = $$props;
10102
10118
  let { theme = "light" } = $$props;
10103
10119
  let { language = "en" } = $$props;
10104
- let { ref = void 0 } = $$props;
10120
+ let { containerRef = void 0 } = $$props;
10105
10121
  let container;
10106
10122
  function div0_binding($$value) {
10107
10123
  binding_callbacks3[$$value ? "unshift" : "push"](() => {
@@ -10116,8 +10132,8 @@ function instance57($$self, $$props, $$invalidate) {
10116
10132
  $$invalidate(1, theme = $$props2.theme);
10117
10133
  if ("language" in $$props2)
10118
10134
  $$invalidate(2, language = $$props2.language);
10119
- if ("ref" in $$props2)
10120
- $$invalidate(4, ref = $$props2.ref);
10135
+ if ("containerRef" in $$props2)
10136
+ $$invalidate(4, containerRef = $$props2.containerRef);
10121
10137
  };
10122
10138
  $$self.$$.update = () => {
10123
10139
  if ($$self.$$.dirty & 9) {
@@ -10127,16 +10143,21 @@ function instance57($$self, $$props, $$invalidate) {
10127
10143
  }
10128
10144
  if ($$self.$$.dirty & 24) {
10129
10145
  $:
10130
- if (ref)
10131
- ref(container || null);
10146
+ if (containerRef)
10147
+ containerRef(container || null);
10132
10148
  }
10133
10149
  };
10134
- return [player, theme, language, container, ref, div0_binding];
10150
+ return [player, theme, language, container, containerRef, div0_binding];
10135
10151
  }
10136
10152
  var ReplayFastboard = class extends SvelteComponent57 {
10137
10153
  constructor(options) {
10138
10154
  super();
10139
- init57(this, options, instance57, create_fragment57, safe_not_equal57, { player: 0, theme: 1, language: 2, ref: 4 });
10155
+ init57(this, options, instance57, create_fragment57, safe_not_equal57, {
10156
+ player: 0,
10157
+ theme: 1,
10158
+ language: 2,
10159
+ containerRef: 4
10160
+ });
10140
10161
  }
10141
10162
  };
10142
10163
  var ReplayFastboard_default = ReplayFastboard;
@@ -10153,6 +10174,7 @@ import {
10153
10174
  element as element14,
10154
10175
  init as init58,
10155
10176
  insert as insert57,
10177
+ listen as listen8,
10156
10178
  mount_component as mount_component10,
10157
10179
  safe_not_equal as safe_not_equal58,
10158
10180
  space as space11,
@@ -10160,6 +10182,7 @@ import {
10160
10182
  transition_in as transition_in12,
10161
10183
  transition_out as transition_out12
10162
10184
  } from "svelte/internal";
10185
+ import { onMount } from "svelte";
10163
10186
  function create_fragment58(ctx) {
10164
10187
  let div4;
10165
10188
  let div0;
@@ -10180,6 +10203,8 @@ function create_fragment58(ctx) {
10180
10203
  let div3_class_value;
10181
10204
  let div4_class_value;
10182
10205
  let current;
10206
+ let mounted;
10207
+ let dispose;
10183
10208
  toolbar = new Toolbar_default({
10184
10209
  props: {
10185
10210
  app: ctx[0],
@@ -10246,6 +10271,10 @@ function create_fragment58(ctx) {
10246
10271
  append57(div4, div3);
10247
10272
  mount_component10(pagecontrol, div3, null);
10248
10273
  current = true;
10274
+ if (!mounted) {
10275
+ dispose = listen8(div0, "touchstart", tippy_hide_all, true);
10276
+ mounted = true;
10277
+ }
10249
10278
  },
10250
10279
  p(ctx2, [dirty]) {
10251
10280
  const toolbar_changes = {};
@@ -10308,6 +10337,8 @@ function create_fragment58(ctx) {
10308
10337
  destroy_component10(redoundo);
10309
10338
  destroy_component10(zoomcontrol);
10310
10339
  destroy_component10(pagecontrol);
10340
+ mounted = false;
10341
+ dispose();
10311
10342
  }
10312
10343
  };
10313
10344
  }
@@ -10316,8 +10347,17 @@ function instance58($$self, $$props, $$invalidate) {
10316
10347
  let { app = null } = $$props;
10317
10348
  let { theme = "light" } = $$props;
10318
10349
  let { language = "en" } = $$props;
10319
- let { ref = void 0 } = $$props;
10350
+ let { containerRef = void 0 } = $$props;
10320
10351
  let container;
10352
+ onMount(() => {
10353
+ if (containerRef) {
10354
+ containerRef(container);
10355
+ return () => {
10356
+ if (containerRef)
10357
+ containerRef(null);
10358
+ };
10359
+ }
10360
+ });
10321
10361
  function div0_binding($$value) {
10322
10362
  binding_callbacks4[$$value ? "unshift" : "push"](() => {
10323
10363
  container = $$value;
@@ -10331,8 +10371,8 @@ function instance58($$self, $$props, $$invalidate) {
10331
10371
  $$invalidate(1, theme = $$props2.theme);
10332
10372
  if ("language" in $$props2)
10333
10373
  $$invalidate(2, language = $$props2.language);
10334
- if ("ref" in $$props2)
10335
- $$invalidate(4, ref = $$props2.ref);
10374
+ if ("containerRef" in $$props2)
10375
+ $$invalidate(4, containerRef = $$props2.containerRef);
10336
10376
  };
10337
10377
  $$self.$$.update = () => {
10338
10378
  if ($$self.$$.dirty & 9) {
@@ -10340,18 +10380,18 @@ function instance58($$self, $$props, $$invalidate) {
10340
10380
  if (app && container)
10341
10381
  app.bindContainer(container);
10342
10382
  }
10343
- if ($$self.$$.dirty & 24) {
10344
- $:
10345
- if (ref)
10346
- ref(container || null);
10347
- }
10348
10383
  };
10349
- return [app, theme, language, container, ref, div0_binding];
10384
+ return [app, theme, language, container, containerRef, div0_binding];
10350
10385
  }
10351
10386
  var Fastboard = class extends SvelteComponent58 {
10352
10387
  constructor(options) {
10353
10388
  super();
10354
- init58(this, options, instance58, create_fragment58, safe_not_equal58, { app: 0, theme: 1, language: 2, ref: 4 });
10389
+ init58(this, options, instance58, create_fragment58, safe_not_equal58, {
10390
+ app: 0,
10391
+ theme: 1,
10392
+ language: 2,
10393
+ containerRef: 4
10394
+ });
10355
10395
  }
10356
10396
  };
10357
10397
  var Fastboard_default = Fastboard;