@netless/fastboard-ui 0.3.2 → 0.3.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.mjs CHANGED
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
 
21
- // ../../node_modules/.pnpm/svelte@3.46.5/node_modules/svelte/internal/index.mjs
21
+ // ../../node_modules/.pnpm/svelte@3.48.0/node_modules/svelte/internal/index.mjs
22
22
  function noop() {
23
23
  }
24
24
  function assign(tar, src) {
@@ -185,9 +185,9 @@ function set_style(node, key, value, important) {
185
185
  function toggle_class(element2, name10, toggle) {
186
186
  element2.classList[toggle ? "add" : "remove"](name10);
187
187
  }
188
- function custom_event(type, detail, bubbles = false) {
188
+ function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {
189
189
  const e = document.createEvent("CustomEvent");
190
- e.initCustomEvent(type, bubbles, false, detail);
190
+ e.initCustomEvent(type, bubbles, cancelable, detail);
191
191
  return e;
192
192
  }
193
193
  var current_component;
@@ -204,14 +204,16 @@ function onMount(fn) {
204
204
  }
205
205
  function createEventDispatcher() {
206
206
  const component = get_current_component();
207
- return (type, detail) => {
207
+ return (type, detail, { cancelable = false } = {}) => {
208
208
  const callbacks = component.$$.callbacks[type];
209
209
  if (callbacks) {
210
- const event = custom_event(type, detail);
210
+ const event = custom_event(type, detail, { cancelable });
211
211
  callbacks.slice().forEach((fn) => {
212
212
  fn.call(component, event);
213
213
  });
214
+ return !event.defaultPrevented;
214
215
  }
216
+ return true;
215
217
  };
216
218
  }
217
219
  function bubble(component, event) {
@@ -5484,7 +5486,7 @@ var ZoomControl = class extends SvelteComponent {
5484
5486
  };
5485
5487
  var ZoomControl_default = ZoomControl;
5486
5488
 
5487
- // ../../node_modules/.pnpm/svelte@3.46.5/node_modules/svelte/store/index.mjs
5489
+ // ../../node_modules/.pnpm/svelte@3.48.0/node_modules/svelte/store/index.mjs
5488
5490
  var subscriber_queue = [];
5489
5491
  function writable(value, start = noop) {
5490
5492
  let stop;
@@ -6766,6 +6768,11 @@ function get_each_context4(ctx, list, i) {
6766
6768
  child_ctx[45] = constants_0.onClick;
6767
6769
  const constants_1 = child_ctx[20] && child_ctx[20][child_ctx[44]];
6768
6770
  child_ctx[46] = constants_1;
6771
+ const constants_2 = () => {
6772
+ child_ctx[0] && child_ctx[45](child_ctx[0]);
6773
+ tippy_hide_all();
6774
+ };
6775
+ child_ctx[47] = constants_2;
6769
6776
  return child_ctx;
6770
6777
  }
6771
6778
  function create_if_block_8(ctx) {
@@ -6791,7 +6798,7 @@ function create_if_block_8(ctx) {
6791
6798
  },
6792
6799
  p(ctx2, dirty) {
6793
6800
  const button_changes = dirty[0] & 32768 ? get_spread_update(button_spread_levels, [button_spread_levels[0], get_spread_object(ctx2[15])]) : {};
6794
- if (dirty[0] & 2 | dirty[1] & 262144) {
6801
+ if (dirty[0] & 2 | dirty[1] & 524288) {
6795
6802
  button_changes.$$scope = { dirty, ctx: ctx2 };
6796
6803
  }
6797
6804
  button.$set(button_changes);
@@ -7769,7 +7776,7 @@ function create_if_block_12(ctx) {
7769
7776
  dirty[0] & 16384 && { menu: ctx2[14] },
7770
7777
  button_spread_levels[4]
7771
7778
  ]) : {};
7772
- if (dirty[0] & 2 | dirty[1] & 262144) {
7779
+ if (dirty[0] & 2 | dirty[1] & 524288) {
7773
7780
  button_changes.$$scope = { dirty, ctx: ctx2 };
7774
7781
  }
7775
7782
  button.$set(button_changes);
@@ -7850,7 +7857,7 @@ function create_if_block6(ctx) {
7850
7857
  button_changes.theme = ctx2[1];
7851
7858
  if (dirty[0] & 8)
7852
7859
  button_changes.disabled = ctx2[3];
7853
- if (dirty[0] & 2 | dirty[1] & 262144) {
7860
+ if (dirty[0] & 2 | dirty[1] & 524288) {
7854
7861
  button_changes.$$scope = { dirty, ctx: ctx2 };
7855
7862
  }
7856
7863
  button.$set(button_changes);
@@ -7952,8 +7959,8 @@ function create_each_block4(ctx) {
7952
7959
  append(button, t2);
7953
7960
  if (!mounted) {
7954
7961
  dispose = listen(button, "click", function() {
7955
- if (is_function(ctx[0] && ctx[45].bind(null, ctx[0])))
7956
- (ctx[0] && ctx[45].bind(null, ctx[0])).apply(this, arguments);
7962
+ if (is_function(ctx[47]))
7963
+ ctx[47].apply(this, arguments);
7957
7964
  });
7958
7965
  mounted = true;
7959
7966
  }
@@ -8358,7 +8365,7 @@ function create_fragment55(ctx) {
8358
8365
  dirty[0] & 32768 && get_spread_object(ctx2[15]),
8359
8366
  dirty[0] & 262144 && { content: ctx2[18].clicker }
8360
8367
  ]) : {};
8361
- if (dirty[0] & 258 | dirty[1] & 262144) {
8368
+ if (dirty[0] & 258 | dirty[1] & 524288) {
8362
8369
  button0_changes.$$scope = { dirty, ctx: ctx2 };
8363
8370
  }
8364
8371
  button0.$set(button0_changes);
@@ -8367,7 +8374,7 @@ function create_fragment55(ctx) {
8367
8374
  dirty[0] & 32768 && get_spread_object(ctx2[15]),
8368
8375
  dirty[0] & 262144 && { content: ctx2[18].selector }
8369
8376
  ]) : {};
8370
- if (dirty[0] & 258 | dirty[1] & 262144) {
8377
+ if (dirty[0] & 258 | dirty[1] & 524288) {
8371
8378
  button1_changes.$$scope = { dirty, ctx: ctx2 };
8372
8379
  }
8373
8380
  button1.$set(button1_changes);
@@ -8377,7 +8384,7 @@ function create_fragment55(ctx) {
8377
8384
  dirty[0] & 262144 && { content: ctx2[18].pencil },
8378
8385
  dirty[0] & 2048 && { menu: ctx2[11] }
8379
8386
  ]) : {};
8380
- if (dirty[0] & 258 | dirty[1] & 262144) {
8387
+ if (dirty[0] & 258 | dirty[1] & 524288) {
8381
8388
  button2_changes.$$scope = { dirty, ctx: ctx2 };
8382
8389
  }
8383
8390
  button2.$set(button2_changes);
@@ -8387,7 +8394,7 @@ function create_fragment55(ctx) {
8387
8394
  dirty[0] & 262144 && { content: ctx2[18].text },
8388
8395
  dirty[0] & 4096 && { menu: ctx2[12] }
8389
8396
  ]) : {};
8390
- if (dirty[0] & 258 | dirty[1] & 262144) {
8397
+ if (dirty[0] & 258 | dirty[1] & 524288) {
8391
8398
  button3_changes.$$scope = { dirty, ctx: ctx2 };
8392
8399
  }
8393
8400
  button3.$set(button3_changes);
@@ -8397,7 +8404,7 @@ function create_fragment55(ctx) {
8397
8404
  dirty[0] & 512 && { content: ctx2[9].shapes },
8398
8405
  dirty[0] & 8192 && { menu: ctx2[13] }
8399
8406
  ]) : {};
8400
- if (dirty[0] & 1410 | dirty[1] & 262144) {
8407
+ if (dirty[0] & 1410 | dirty[1] & 524288) {
8401
8408
  button4_changes.$$scope = { dirty, ctx: ctx2 };
8402
8409
  }
8403
8410
  button4.$set(button4_changes);
@@ -8406,7 +8413,7 @@ function create_fragment55(ctx) {
8406
8413
  dirty[0] & 32768 && get_spread_object(ctx2[15]),
8407
8414
  dirty[0] & 262144 && { content: ctx2[18].eraser }
8408
8415
  ]) : {};
8409
- if (dirty[0] & 258 | dirty[1] & 262144) {
8416
+ if (dirty[0] & 258 | dirty[1] & 524288) {
8410
8417
  button5_changes.$$scope = { dirty, ctx: ctx2 };
8411
8418
  }
8412
8419
  button5.$set(button5_changes);
@@ -8415,7 +8422,7 @@ function create_fragment55(ctx) {
8415
8422
  dirty[0] & 32768 && get_spread_object(ctx2[15]),
8416
8423
  dirty[0] & 512 && { content: ctx2[9].clear }
8417
8424
  ]) : {};
8418
- if (dirty[0] & 2 | dirty[1] & 262144) {
8425
+ if (dirty[0] & 2 | dirty[1] & 524288) {
8419
8426
  button6_changes.$$scope = { dirty, ctx: ctx2 };
8420
8427
  }
8421
8428
  button6.$set(button6_changes);
@@ -10106,7 +10113,7 @@ function create_fragment58(ctx) {
10106
10113
  mount_component(playercontrol, div1, null);
10107
10114
  current = true;
10108
10115
  if (!mounted) {
10109
- dispose = listen(div0, "touchstart", tippy_hide_all, true);
10116
+ dispose = listen(div0, "touchstart", tippy_hide_all, { passive: true, capture: true });
10110
10117
  mounted = true;
10111
10118
  }
10112
10119
  },
@@ -10457,7 +10464,7 @@ function create_fragment59(ctx) {
10457
10464
  if_block3.m(div3, null);
10458
10465
  current = true;
10459
10466
  if (!mounted) {
10460
- dispose = listen(div0, "touchstart", tippy_hide_all, true);
10467
+ dispose = listen(div0, "touchstart", tippy_hide_all, { passive: true, capture: true });
10461
10468
  mounted = true;
10462
10469
  }
10463
10470
  },