@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.js CHANGED
@@ -50,7 +50,7 @@ __export(src_exports, {
50
50
  });
51
51
  module.exports = __toCommonJS(src_exports);
52
52
 
53
- // ../../node_modules/.pnpm/svelte@3.46.5/node_modules/svelte/internal/index.mjs
53
+ // ../../node_modules/.pnpm/svelte@3.48.0/node_modules/svelte/internal/index.mjs
54
54
  function noop() {
55
55
  }
56
56
  function assign(tar, src) {
@@ -217,9 +217,9 @@ function set_style(node, key, value, important) {
217
217
  function toggle_class(element2, name10, toggle) {
218
218
  element2.classList[toggle ? "add" : "remove"](name10);
219
219
  }
220
- function custom_event(type, detail, bubbles = false) {
220
+ function custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {
221
221
  const e = document.createEvent("CustomEvent");
222
- e.initCustomEvent(type, bubbles, false, detail);
222
+ e.initCustomEvent(type, bubbles, cancelable, detail);
223
223
  return e;
224
224
  }
225
225
  var current_component;
@@ -236,14 +236,16 @@ function onMount(fn) {
236
236
  }
237
237
  function createEventDispatcher() {
238
238
  const component = get_current_component();
239
- return (type, detail) => {
239
+ return (type, detail, { cancelable = false } = {}) => {
240
240
  const callbacks = component.$$.callbacks[type];
241
241
  if (callbacks) {
242
- const event = custom_event(type, detail);
242
+ const event = custom_event(type, detail, { cancelable });
243
243
  callbacks.slice().forEach((fn) => {
244
244
  fn.call(component, event);
245
245
  });
246
+ return !event.defaultPrevented;
246
247
  }
248
+ return true;
247
249
  };
248
250
  }
249
251
  function bubble(component, event) {
@@ -5516,7 +5518,7 @@ var ZoomControl = class extends SvelteComponent {
5516
5518
  };
5517
5519
  var ZoomControl_default = ZoomControl;
5518
5520
 
5519
- // ../../node_modules/.pnpm/svelte@3.46.5/node_modules/svelte/store/index.mjs
5521
+ // ../../node_modules/.pnpm/svelte@3.48.0/node_modules/svelte/store/index.mjs
5520
5522
  var subscriber_queue = [];
5521
5523
  function writable(value, start = noop) {
5522
5524
  let stop;
@@ -6798,6 +6800,11 @@ function get_each_context4(ctx, list, i) {
6798
6800
  child_ctx[45] = constants_0.onClick;
6799
6801
  const constants_1 = child_ctx[20] && child_ctx[20][child_ctx[44]];
6800
6802
  child_ctx[46] = constants_1;
6803
+ const constants_2 = () => {
6804
+ child_ctx[0] && child_ctx[45](child_ctx[0]);
6805
+ tippy_hide_all();
6806
+ };
6807
+ child_ctx[47] = constants_2;
6801
6808
  return child_ctx;
6802
6809
  }
6803
6810
  function create_if_block_8(ctx) {
@@ -6823,7 +6830,7 @@ function create_if_block_8(ctx) {
6823
6830
  },
6824
6831
  p(ctx2, dirty) {
6825
6832
  const button_changes = dirty[0] & 32768 ? get_spread_update(button_spread_levels, [button_spread_levels[0], get_spread_object(ctx2[15])]) : {};
6826
- if (dirty[0] & 2 | dirty[1] & 262144) {
6833
+ if (dirty[0] & 2 | dirty[1] & 524288) {
6827
6834
  button_changes.$$scope = { dirty, ctx: ctx2 };
6828
6835
  }
6829
6836
  button.$set(button_changes);
@@ -7801,7 +7808,7 @@ function create_if_block_12(ctx) {
7801
7808
  dirty[0] & 16384 && { menu: ctx2[14] },
7802
7809
  button_spread_levels[4]
7803
7810
  ]) : {};
7804
- if (dirty[0] & 2 | dirty[1] & 262144) {
7811
+ if (dirty[0] & 2 | dirty[1] & 524288) {
7805
7812
  button_changes.$$scope = { dirty, ctx: ctx2 };
7806
7813
  }
7807
7814
  button.$set(button_changes);
@@ -7882,7 +7889,7 @@ function create_if_block6(ctx) {
7882
7889
  button_changes.theme = ctx2[1];
7883
7890
  if (dirty[0] & 8)
7884
7891
  button_changes.disabled = ctx2[3];
7885
- if (dirty[0] & 2 | dirty[1] & 262144) {
7892
+ if (dirty[0] & 2 | dirty[1] & 524288) {
7886
7893
  button_changes.$$scope = { dirty, ctx: ctx2 };
7887
7894
  }
7888
7895
  button.$set(button_changes);
@@ -7984,8 +7991,8 @@ function create_each_block4(ctx) {
7984
7991
  append(button, t2);
7985
7992
  if (!mounted) {
7986
7993
  dispose = listen(button, "click", function() {
7987
- if (is_function(ctx[0] && ctx[45].bind(null, ctx[0])))
7988
- (ctx[0] && ctx[45].bind(null, ctx[0])).apply(this, arguments);
7994
+ if (is_function(ctx[47]))
7995
+ ctx[47].apply(this, arguments);
7989
7996
  });
7990
7997
  mounted = true;
7991
7998
  }
@@ -8390,7 +8397,7 @@ function create_fragment55(ctx) {
8390
8397
  dirty[0] & 32768 && get_spread_object(ctx2[15]),
8391
8398
  dirty[0] & 262144 && { content: ctx2[18].clicker }
8392
8399
  ]) : {};
8393
- if (dirty[0] & 258 | dirty[1] & 262144) {
8400
+ if (dirty[0] & 258 | dirty[1] & 524288) {
8394
8401
  button0_changes.$$scope = { dirty, ctx: ctx2 };
8395
8402
  }
8396
8403
  button0.$set(button0_changes);
@@ -8399,7 +8406,7 @@ function create_fragment55(ctx) {
8399
8406
  dirty[0] & 32768 && get_spread_object(ctx2[15]),
8400
8407
  dirty[0] & 262144 && { content: ctx2[18].selector }
8401
8408
  ]) : {};
8402
- if (dirty[0] & 258 | dirty[1] & 262144) {
8409
+ if (dirty[0] & 258 | dirty[1] & 524288) {
8403
8410
  button1_changes.$$scope = { dirty, ctx: ctx2 };
8404
8411
  }
8405
8412
  button1.$set(button1_changes);
@@ -8409,7 +8416,7 @@ function create_fragment55(ctx) {
8409
8416
  dirty[0] & 262144 && { content: ctx2[18].pencil },
8410
8417
  dirty[0] & 2048 && { menu: ctx2[11] }
8411
8418
  ]) : {};
8412
- if (dirty[0] & 258 | dirty[1] & 262144) {
8419
+ if (dirty[0] & 258 | dirty[1] & 524288) {
8413
8420
  button2_changes.$$scope = { dirty, ctx: ctx2 };
8414
8421
  }
8415
8422
  button2.$set(button2_changes);
@@ -8419,7 +8426,7 @@ function create_fragment55(ctx) {
8419
8426
  dirty[0] & 262144 && { content: ctx2[18].text },
8420
8427
  dirty[0] & 4096 && { menu: ctx2[12] }
8421
8428
  ]) : {};
8422
- if (dirty[0] & 258 | dirty[1] & 262144) {
8429
+ if (dirty[0] & 258 | dirty[1] & 524288) {
8423
8430
  button3_changes.$$scope = { dirty, ctx: ctx2 };
8424
8431
  }
8425
8432
  button3.$set(button3_changes);
@@ -8429,7 +8436,7 @@ function create_fragment55(ctx) {
8429
8436
  dirty[0] & 512 && { content: ctx2[9].shapes },
8430
8437
  dirty[0] & 8192 && { menu: ctx2[13] }
8431
8438
  ]) : {};
8432
- if (dirty[0] & 1410 | dirty[1] & 262144) {
8439
+ if (dirty[0] & 1410 | dirty[1] & 524288) {
8433
8440
  button4_changes.$$scope = { dirty, ctx: ctx2 };
8434
8441
  }
8435
8442
  button4.$set(button4_changes);
@@ -8438,7 +8445,7 @@ function create_fragment55(ctx) {
8438
8445
  dirty[0] & 32768 && get_spread_object(ctx2[15]),
8439
8446
  dirty[0] & 262144 && { content: ctx2[18].eraser }
8440
8447
  ]) : {};
8441
- if (dirty[0] & 258 | dirty[1] & 262144) {
8448
+ if (dirty[0] & 258 | dirty[1] & 524288) {
8442
8449
  button5_changes.$$scope = { dirty, ctx: ctx2 };
8443
8450
  }
8444
8451
  button5.$set(button5_changes);
@@ -8447,7 +8454,7 @@ function create_fragment55(ctx) {
8447
8454
  dirty[0] & 32768 && get_spread_object(ctx2[15]),
8448
8455
  dirty[0] & 512 && { content: ctx2[9].clear }
8449
8456
  ]) : {};
8450
- if (dirty[0] & 2 | dirty[1] & 262144) {
8457
+ if (dirty[0] & 2 | dirty[1] & 524288) {
8451
8458
  button6_changes.$$scope = { dirty, ctx: ctx2 };
8452
8459
  }
8453
8460
  button6.$set(button6_changes);
@@ -10138,7 +10145,7 @@ function create_fragment58(ctx) {
10138
10145
  mount_component(playercontrol, div1, null);
10139
10146
  current = true;
10140
10147
  if (!mounted) {
10141
- dispose = listen(div0, "touchstart", tippy_hide_all, true);
10148
+ dispose = listen(div0, "touchstart", tippy_hide_all, { passive: true, capture: true });
10142
10149
  mounted = true;
10143
10150
  }
10144
10151
  },
@@ -10489,7 +10496,7 @@ function create_fragment59(ctx) {
10489
10496
  if_block3.m(div3, null);
10490
10497
  current = true;
10491
10498
  if (!mounted) {
10492
- dispose = listen(div0, "touchstart", tippy_hide_all, true);
10499
+ dispose = listen(div0, "touchstart", tippy_hide_all, { passive: true, capture: true });
10493
10500
  mounted = true;
10494
10501
  }
10495
10502
  },