@lvce-editor/renderer-process 21.16.0 → 21.18.0

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.
@@ -452,6 +452,11 @@ const getEventListenerOptions$1 = (eventName, value) => {
452
452
  passive: true
453
453
  };
454
454
  }
455
+ if (value.capture) {
456
+ return {
457
+ capture: true
458
+ };
459
+ }
455
460
  switch (eventName) {
456
461
  case 'wheel':
457
462
  return {
@@ -538,6 +543,11 @@ const getOptions = fn => {
538
543
  passive: true
539
544
  };
540
545
  }
546
+ if (fn.capture) {
547
+ return {
548
+ capture: true
549
+ };
550
+ }
541
551
  return undefined;
542
552
  };
543
553
  const attachEvent$1 = ($Node, eventMap, key, value, newEventMap) => {
@@ -941,6 +951,8 @@ const getEventListenerArg = (param, event) => {
941
951
  return event.target.className;
942
952
  case 'event.target.dataset.groupIndex':
943
953
  return event.target.dataset.groupIndex;
954
+ case 'event.target.dataset.id':
955
+ return event.target.dataset.id;
944
956
  case 'event.target.dataset.index':
945
957
  return event.target.dataset.index;
946
958
  case 'event.target.dataset.name':
@@ -1028,6 +1040,10 @@ const createFn = (info, map) => {
1028
1040
  // TODO avoid mutating function property, maybe return an object with function and options
1029
1041
  fn.passive = true;
1030
1042
  }
1043
+ if (info.capture) {
1044
+ // TODO avoid mutating function property, maybe return an object with function and options
1045
+ fn.capture = true;
1046
+ }
1031
1047
  return fn;
1032
1048
  };
1033
1049
  const listeners = Object.create(null);
@@ -3101,6 +3117,23 @@ const create$x = async (canvasId, objectId) => {
3101
3117
  set$6(canvasId, canvas);
3102
3118
  await invokeAndTransfer('Transferrable.transfer', objectId, offscreenCanvas);
3103
3119
  };
3120
+ const create2 = async (canvasId, objectId, width, height) => {
3121
+ const canvas = document.createElement('canvas');
3122
+ if (width) {
3123
+ canvas.width = width;
3124
+ }
3125
+ if (height) {
3126
+ canvas.height = height;
3127
+ }
3128
+ const offscreenCanvas = canvas.transferControlToOffscreen();
3129
+ set$1$1(canvasId, {
3130
+ factory: {},
3131
+ state: {
3132
+ $Viewlet: canvas
3133
+ }
3134
+ });
3135
+ await invokeAndTransfer('Transferrable.transfer', objectId, offscreenCanvas);
3136
+ };
3104
3137
 
3105
3138
  const True = 'true';
3106
3139
  const False = 'false';
@@ -9891,6 +9924,7 @@ const commandMap = {
9891
9924
  'Notification.createWithOptions': createWithOptions,
9892
9925
  'Notification.dispose': dispose$i,
9893
9926
  'OffscreenCanvas.create': create$x,
9927
+ 'OffscreenCanvas.create2': create2,
9894
9928
  'Open.openUrl': openUrl,
9895
9929
  'Performance.getMemory': getMemory,
9896
9930
  'Performance.measureUserAgentSpecificMemory': measureUserAgentSpecificMemory,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "21.16.0",
3
+ "version": "21.18.0",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"