@lvce-editor/renderer-process 21.17.0 → 21.19.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.
@@ -247,6 +247,7 @@ const Html$1 = 'html';
247
247
  const Head$1 = 'head';
248
248
  const Title$1 = 'title';
249
249
  const Meta$1 = 'meta';
250
+ const Canvas$1 = 'canvas';
250
251
  const Audio$1$1 = 0;
251
252
  const Button$1 = 1;
252
253
  const Col$1 = 2;
@@ -308,6 +309,7 @@ const Html = 73;
308
309
  const Head = 74;
309
310
  const Title = 75;
310
311
  const Meta = 76;
312
+ const Canvas = 77;
311
313
  const Reference$1 = 100;
312
314
  const VirtualDomElements$1 = {
313
315
  __proto__: null,
@@ -327,6 +329,8 @@ const getElementTag$1 = type => {
327
329
  return Br$2;
328
330
  case Button$1:
329
331
  return Button$2;
332
+ case Canvas:
333
+ return Canvas$1;
330
334
  case Cite$1:
331
335
  return Cite$2;
332
336
  case Code$1:
@@ -3117,6 +3121,23 @@ const create$x = async (canvasId, objectId) => {
3117
3121
  set$6(canvasId, canvas);
3118
3122
  await invokeAndTransfer('Transferrable.transfer', objectId, offscreenCanvas);
3119
3123
  };
3124
+ const create2 = async (canvasId, objectId, width, height) => {
3125
+ const canvas = document.createElement('canvas');
3126
+ if (width) {
3127
+ canvas.width = width;
3128
+ }
3129
+ if (height) {
3130
+ canvas.height = height;
3131
+ }
3132
+ const offscreenCanvas = canvas.transferControlToOffscreen();
3133
+ set$1$1(canvasId, {
3134
+ factory: {},
3135
+ state: {
3136
+ $Viewlet: canvas
3137
+ }
3138
+ });
3139
+ await invokeAndTransfer('Transferrable.transfer', objectId, offscreenCanvas);
3140
+ };
3120
3141
 
3121
3142
  const True = 'true';
3122
3143
  const False = 'false';
@@ -9907,6 +9928,7 @@ const commandMap = {
9907
9928
  'Notification.createWithOptions': createWithOptions,
9908
9929
  'Notification.dispose': dispose$i,
9909
9930
  'OffscreenCanvas.create': create$x,
9931
+ 'OffscreenCanvas.create2': create2,
9910
9932
  'Open.openUrl': openUrl,
9911
9933
  'Performance.getMemory': getMemory,
9912
9934
  'Performance.measureUserAgentSpecificMemory': measureUserAgentSpecificMemory,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "21.17.0",
3
+ "version": "21.19.0",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"