@lvce-editor/renderer-process 13.13.0 → 13.14.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.
- package/dist/rendererProcessMain.js +35 -14
- package/package.json +1 -1
|
@@ -2265,55 +2265,63 @@ class AssertionError extends Error {
|
|
|
2265
2265
|
this.name = 'AssertionError';
|
|
2266
2266
|
}
|
|
2267
2267
|
}
|
|
2268
|
+
const Object$1 = 1;
|
|
2269
|
+
const Number$1 = 2;
|
|
2270
|
+
const Array$1 = 3;
|
|
2271
|
+
const String$1 = 4;
|
|
2272
|
+
const Boolean$1 = 5;
|
|
2273
|
+
const Function = 6;
|
|
2274
|
+
const Null = 7;
|
|
2275
|
+
const Unknown$1 = 8;
|
|
2268
2276
|
const getType = value => {
|
|
2269
2277
|
switch (typeof value) {
|
|
2270
2278
|
case 'number':
|
|
2271
|
-
return
|
|
2279
|
+
return Number$1;
|
|
2272
2280
|
case 'function':
|
|
2273
|
-
return
|
|
2281
|
+
return Function;
|
|
2274
2282
|
case 'string':
|
|
2275
|
-
return
|
|
2283
|
+
return String$1;
|
|
2276
2284
|
case 'object':
|
|
2277
2285
|
if (value === null) {
|
|
2278
|
-
return
|
|
2286
|
+
return Null;
|
|
2279
2287
|
}
|
|
2280
2288
|
if (Array.isArray(value)) {
|
|
2281
|
-
return
|
|
2289
|
+
return Array$1;
|
|
2282
2290
|
}
|
|
2283
|
-
return
|
|
2291
|
+
return Object$1;
|
|
2284
2292
|
case 'boolean':
|
|
2285
|
-
return
|
|
2293
|
+
return Boolean$1;
|
|
2286
2294
|
default:
|
|
2287
|
-
return
|
|
2295
|
+
return Unknown$1;
|
|
2288
2296
|
}
|
|
2289
2297
|
};
|
|
2290
2298
|
const object = value => {
|
|
2291
2299
|
const type = getType(value);
|
|
2292
|
-
if (type !==
|
|
2300
|
+
if (type !== Object$1) {
|
|
2293
2301
|
throw new AssertionError('expected value to be of type object');
|
|
2294
2302
|
}
|
|
2295
2303
|
};
|
|
2296
2304
|
const number = value => {
|
|
2297
2305
|
const type = getType(value);
|
|
2298
|
-
if (type !==
|
|
2306
|
+
if (type !== Number$1) {
|
|
2299
2307
|
throw new AssertionError('expected value to be of type number');
|
|
2300
2308
|
}
|
|
2301
2309
|
};
|
|
2302
2310
|
const array = value => {
|
|
2303
2311
|
const type = getType(value);
|
|
2304
|
-
if (type !==
|
|
2312
|
+
if (type !== Array$1) {
|
|
2305
2313
|
throw new AssertionError('expected value to be of type array');
|
|
2306
2314
|
}
|
|
2307
2315
|
};
|
|
2308
2316
|
const string = value => {
|
|
2309
2317
|
const type = getType(value);
|
|
2310
|
-
if (type !==
|
|
2318
|
+
if (type !== String$1) {
|
|
2311
2319
|
throw new AssertionError('expected value to be of type string');
|
|
2312
2320
|
}
|
|
2313
2321
|
};
|
|
2314
2322
|
const boolean = value => {
|
|
2315
2323
|
const type = getType(value);
|
|
2316
|
-
if (type !==
|
|
2324
|
+
if (type !== Boolean$1) {
|
|
2317
2325
|
throw new AssertionError('expected value to be of type boolean');
|
|
2318
2326
|
}
|
|
2319
2327
|
};
|
|
@@ -5789,7 +5797,7 @@ const toHaveAttribute = (locator, {
|
|
|
5789
5797
|
}
|
|
5790
5798
|
const actual = element.getAttribute(key);
|
|
5791
5799
|
return {
|
|
5792
|
-
wasFound:
|
|
5800
|
+
wasFound: true,
|
|
5793
5801
|
actual
|
|
5794
5802
|
};
|
|
5795
5803
|
};
|
|
@@ -10426,6 +10434,13 @@ const createPlaceholder = (viewletId, parentId, top, left, width, height) => {
|
|
|
10426
10434
|
}
|
|
10427
10435
|
};
|
|
10428
10436
|
};
|
|
10437
|
+
const setDragData = (viewletId, dragData) => {
|
|
10438
|
+
const instance = state$6.instances[viewletId];
|
|
10439
|
+
if (!instance) {
|
|
10440
|
+
return;
|
|
10441
|
+
}
|
|
10442
|
+
instance.state.dragData = dragData;
|
|
10443
|
+
};
|
|
10429
10444
|
const setDom = (viewletId, dom) => {
|
|
10430
10445
|
const instance = state$6.instances[viewletId];
|
|
10431
10446
|
if (!instance) {
|
|
@@ -10600,6 +10615,10 @@ const sendMultiple = commands => {
|
|
|
10600
10615
|
// @ts-ignore
|
|
10601
10616
|
setUid(viewletId, method, ...args);
|
|
10602
10617
|
break;
|
|
10618
|
+
case 'Viewlet.setDragData':
|
|
10619
|
+
// @ts-ignore
|
|
10620
|
+
setDragData(viewletId, method, ...args);
|
|
10621
|
+
break;
|
|
10603
10622
|
case 'Viewlet.addCss':
|
|
10604
10623
|
case 'Viewlet.setCss':
|
|
10605
10624
|
case 'Css.addCssStyleSheet':
|
|
@@ -10777,6 +10796,8 @@ const getFn = command => {
|
|
|
10777
10796
|
return registerEventListeners;
|
|
10778
10797
|
case 'Viewlet.setPatches':
|
|
10779
10798
|
return setPatches;
|
|
10799
|
+
case 'Viewlet.setDragData':
|
|
10800
|
+
return setDragData;
|
|
10780
10801
|
case 'Viewlet.focusSelector':
|
|
10781
10802
|
return focusSelector;
|
|
10782
10803
|
case 'Css.addCssStyleSheet':
|