@lvce-editor/renderer-process 30.59.0 → 30.60.1
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 +63 -18
- package/dist/sessionReplayPlayer.js +243 -443
- package/dist/sessionReplayWorkerMain.js +11962 -94
- package/package.json +1 -1
|
@@ -2592,7 +2592,7 @@ const Span = 8;
|
|
|
2592
2592
|
const Table = 9;
|
|
2593
2593
|
const TBody = 10;
|
|
2594
2594
|
const Td = 11;
|
|
2595
|
-
const Text$
|
|
2595
|
+
const Text$2 = 12;
|
|
2596
2596
|
const Th = 13;
|
|
2597
2597
|
const THead = 14;
|
|
2598
2598
|
const Tr = 15;
|
|
@@ -2733,7 +2733,7 @@ const VirtualDomElements = {
|
|
|
2733
2733
|
THead,
|
|
2734
2734
|
Table,
|
|
2735
2735
|
Td,
|
|
2736
|
-
Text: Text$
|
|
2736
|
+
Text: Text$2,
|
|
2737
2737
|
TextArea,
|
|
2738
2738
|
Tfoot,
|
|
2739
2739
|
Th,
|
|
@@ -3324,6 +3324,10 @@ const removeProp = ($Element, key) => {
|
|
|
3324
3324
|
$Element.style[key] = '';
|
|
3325
3325
|
return;
|
|
3326
3326
|
}
|
|
3327
|
+
if (key === 'playsInline') {
|
|
3328
|
+
// Firefox does not reflect playsInline as an HTMLVideoElement property.
|
|
3329
|
+
$Element[key] = false;
|
|
3330
|
+
}
|
|
3327
3331
|
const attributeName = removedAttributeProps.get(key) || key;
|
|
3328
3332
|
$Element.removeAttribute(attributeName);
|
|
3329
3333
|
};
|
|
@@ -3372,6 +3376,10 @@ const setHtmlProp = ($Element, key, value) => {
|
|
|
3372
3376
|
}
|
|
3373
3377
|
return;
|
|
3374
3378
|
}
|
|
3379
|
+
if (key === 'autocorrect' || key === 'autocapitalize') {
|
|
3380
|
+
$Element.setAttribute(key, String(value));
|
|
3381
|
+
return;
|
|
3382
|
+
}
|
|
3375
3383
|
if (key === 'inputType') {
|
|
3376
3384
|
// @ts-ignore
|
|
3377
3385
|
$Element.type = value;
|
|
@@ -3432,7 +3440,7 @@ const {
|
|
|
3432
3440
|
Polyline,
|
|
3433
3441
|
Rect,
|
|
3434
3442
|
Svg,
|
|
3435
|
-
Text,
|
|
3443
|
+
Text: Text$1,
|
|
3436
3444
|
Use,
|
|
3437
3445
|
Reference} = VirtualDomElements;
|
|
3438
3446
|
|
|
@@ -3461,19 +3469,19 @@ const render$1 = (element, eventMap, newEventMap) => {
|
|
|
3461
3469
|
switch (element.type) {
|
|
3462
3470
|
case Reference:
|
|
3463
3471
|
return renderReferenceNode(element, eventMap, newEventMap);
|
|
3464
|
-
case Text:
|
|
3472
|
+
case Text$1:
|
|
3465
3473
|
return renderDomTextNode(element);
|
|
3466
3474
|
default:
|
|
3467
3475
|
return renderDomElement(element, eventMap, newEventMap);
|
|
3468
3476
|
}
|
|
3469
3477
|
};
|
|
3470
3478
|
|
|
3471
|
-
const renderInternal = ($Parent, elements, eventMap, newEventMap) => {
|
|
3479
|
+
const renderInternal = ($Parent, elements, eventMap, newEventMap, renderElement = render$1) => {
|
|
3472
3480
|
const max = elements.length - 1;
|
|
3473
3481
|
let stack = [];
|
|
3474
3482
|
for (let i = max; i >= 0; i--) {
|
|
3475
3483
|
const element = elements[i];
|
|
3476
|
-
const $Element =
|
|
3484
|
+
const $Element = renderElement(element, eventMap, newEventMap);
|
|
3477
3485
|
if (element.childCount > 0) {
|
|
3478
3486
|
// @ts-expect-error
|
|
3479
3487
|
$Element.append(...stack.slice(0, element.childCount));
|
|
@@ -3775,7 +3783,10 @@ const restoreFocusedElement = ($Hidden, $New, focused) => {
|
|
|
3775
3783
|
const renderWithUid = ($Viewlet, dom, eventMap, uid, inputMap, focused, activeElement) => {
|
|
3776
3784
|
const newEventMap = getEventListenerMap(uid);
|
|
3777
3785
|
const $New = render(dom, eventMap, newEventMap).firstChild;
|
|
3778
|
-
|
|
3786
|
+
// A referenced pane can be temporarily absent from the new layout. Leave its
|
|
3787
|
+
// focused input in that pane unless there is a replacement to transfer it to.
|
|
3788
|
+
const hasReplacement = focused && $New.querySelector(`[name="${CSS.escape(focused)}"]`);
|
|
3789
|
+
const $Hidden = createHiddenContainer(hasReplacement && !$New.contains(activeElement || null) ? activeElement : undefined, focused);
|
|
3779
3790
|
setComponentUid($New, uid);
|
|
3780
3791
|
const $$NewInputs = queryInputs($New);
|
|
3781
3792
|
for (const $Input of $$NewInputs) {
|
|
@@ -5355,6 +5366,32 @@ const start = async (id, options) => {
|
|
|
5355
5366
|
}
|
|
5356
5367
|
};
|
|
5357
5368
|
|
|
5369
|
+
// Wire protocol IDs shared with test-worker. Keep existing string callers compatible.
|
|
5370
|
+
const conditionNames = {
|
|
5371
|
+
1: 'toBeFocused',
|
|
5372
|
+
10: 'toHaveJSProperty',
|
|
5373
|
+
11: 'toHaveText',
|
|
5374
|
+
12: 'toHaveValue',
|
|
5375
|
+
2: 'toBeHidden',
|
|
5376
|
+
3: 'toBeVisible',
|
|
5377
|
+
4: 'toContainText',
|
|
5378
|
+
5: 'toHaveAttribute',
|
|
5379
|
+
6: 'toHaveClass',
|
|
5380
|
+
7: 'toHaveCount',
|
|
5381
|
+
8: 'toHaveCss',
|
|
5382
|
+
9: 'toHaveId'
|
|
5383
|
+
};
|
|
5384
|
+
const getConditionName = condition => {
|
|
5385
|
+
if (typeof condition === 'string') {
|
|
5386
|
+
return condition;
|
|
5387
|
+
}
|
|
5388
|
+
const name = conditionNames[condition];
|
|
5389
|
+
if (!name) {
|
|
5390
|
+
throw new Error(`unexpected condition type ${condition}`);
|
|
5391
|
+
}
|
|
5392
|
+
return name;
|
|
5393
|
+
};
|
|
5394
|
+
|
|
5358
5395
|
const getEventClass = eventType => {
|
|
5359
5396
|
switch (eventType) {
|
|
5360
5397
|
case ContextMenu:
|
|
@@ -5447,6 +5484,11 @@ const ElementActions = {
|
|
|
5447
5484
|
type
|
|
5448
5485
|
};
|
|
5449
5486
|
|
|
5487
|
+
const Css = 1;
|
|
5488
|
+
const Text = 2;
|
|
5489
|
+
const HasText = 3;
|
|
5490
|
+
const Nth = 4;
|
|
5491
|
+
|
|
5450
5492
|
const querySelectorByText = (root, text) => {
|
|
5451
5493
|
let node;
|
|
5452
5494
|
const elements = [];
|
|
@@ -5473,7 +5515,7 @@ const querySelectorByCssFromRoot = (root, selector) => {
|
|
|
5473
5515
|
const selectorToString = parsedSelector => {
|
|
5474
5516
|
let result = '';
|
|
5475
5517
|
for (const part of parsedSelector) {
|
|
5476
|
-
if (part.type === 'css') {
|
|
5518
|
+
if (part.type === Css || part.type === 'css') {
|
|
5477
5519
|
if (!result) {
|
|
5478
5520
|
result = part.selector;
|
|
5479
5521
|
continue;
|
|
@@ -5481,7 +5523,7 @@ const selectorToString = parsedSelector => {
|
|
|
5481
5523
|
result += ` >> ${part.selector}`;
|
|
5482
5524
|
continue;
|
|
5483
5525
|
}
|
|
5484
|
-
if (part.type === 'text') {
|
|
5526
|
+
if (part.type === Text || part.type === 'text') {
|
|
5485
5527
|
if (!result) {
|
|
5486
5528
|
result = `text=${part.text}`;
|
|
5487
5529
|
continue;
|
|
@@ -5489,11 +5531,13 @@ const selectorToString = parsedSelector => {
|
|
|
5489
5531
|
result += ` text=${part.text}`;
|
|
5490
5532
|
continue;
|
|
5491
5533
|
}
|
|
5492
|
-
if (part.type === 'has-text') {
|
|
5534
|
+
if (part.type === HasText || part.type === 'has-text') {
|
|
5493
5535
|
result += ` "${part.text}"`;
|
|
5494
5536
|
continue;
|
|
5495
5537
|
}
|
|
5496
|
-
|
|
5538
|
+
if (part.type === Nth || part.type === 'nth') {
|
|
5539
|
+
result += `:nth(${part.index})`;
|
|
5540
|
+
}
|
|
5497
5541
|
}
|
|
5498
5542
|
return result;
|
|
5499
5543
|
};
|
|
@@ -5503,23 +5547,23 @@ const querySelector = parsedSelector => {
|
|
|
5503
5547
|
}
|
|
5504
5548
|
let elements = [document.body];
|
|
5505
5549
|
for (const part of parsedSelector) {
|
|
5506
|
-
if (part.type === 'text') {
|
|
5550
|
+
if (part.type === Text || part.type === 'text') {
|
|
5507
5551
|
elements = elements.flatMap(element => {
|
|
5508
5552
|
return querySelectorByText(element, part.text);
|
|
5509
5553
|
});
|
|
5510
5554
|
continue;
|
|
5511
5555
|
}
|
|
5512
|
-
if (part.type === 'css') {
|
|
5556
|
+
if (part.type === Css || part.type === 'css') {
|
|
5513
5557
|
elements = elements.flatMap(element => {
|
|
5514
5558
|
return querySelectorByCssFromRoot(element, part.selector);
|
|
5515
5559
|
});
|
|
5516
5560
|
continue;
|
|
5517
5561
|
}
|
|
5518
|
-
if (part.type === 'has-text') {
|
|
5562
|
+
if (part.type === HasText || part.type === 'has-text') {
|
|
5519
5563
|
elements = elements.filter(element => element.textContent === part.text);
|
|
5520
5564
|
continue;
|
|
5521
5565
|
}
|
|
5522
|
-
if (part.type === 'nth') {
|
|
5566
|
+
if (part.type === Nth || part.type === 'nth') {
|
|
5523
5567
|
const element = elements[part.index];
|
|
5524
5568
|
elements = element ? [element] : [];
|
|
5525
5569
|
continue;
|
|
@@ -6019,7 +6063,7 @@ const performKeyboardAction = (fnName, options) => {
|
|
|
6019
6063
|
fn(options);
|
|
6020
6064
|
};
|
|
6021
6065
|
const checkSingleElementCondition = async (locator, fnName, options) => {
|
|
6022
|
-
const fn = SingleElementConditions[fnName];
|
|
6066
|
+
const fn = SingleElementConditions[getConditionName(fnName)];
|
|
6023
6067
|
const parsedSelector = getParsedSelector(locator);
|
|
6024
6068
|
return waitForCondition(() => {
|
|
6025
6069
|
const element = querySelectorOne(parsedSelector);
|
|
@@ -6027,7 +6071,7 @@ const checkSingleElementCondition = async (locator, fnName, options) => {
|
|
|
6027
6071
|
});
|
|
6028
6072
|
};
|
|
6029
6073
|
const checkMultiElementCondition = async (locator, fnName, options) => {
|
|
6030
|
-
const fn = MultiElementConditions[fnName];
|
|
6074
|
+
const fn = MultiElementConditions[getConditionName(fnName)];
|
|
6031
6075
|
const parsedSelector = getParsedSelector(locator);
|
|
6032
6076
|
return waitForCondition(() => {
|
|
6033
6077
|
const elements = querySelector(parsedSelector);
|
|
@@ -6035,7 +6079,7 @@ const checkMultiElementCondition = async (locator, fnName, options) => {
|
|
|
6035
6079
|
});
|
|
6036
6080
|
};
|
|
6037
6081
|
const checkConditionError = (fnName, ...params) => {
|
|
6038
|
-
const fn = ConditionValues[fnName];
|
|
6082
|
+
const fn = ConditionValues[getConditionName(fnName)];
|
|
6039
6083
|
return fn(...params);
|
|
6040
6084
|
};
|
|
6041
6085
|
|
|
@@ -11754,6 +11798,7 @@ const createTerminal = async uid => {
|
|
|
11754
11798
|
}] = await Promise.all([import('./xterm.js'), import('./xterm.js'), import('./xterm.js')]);
|
|
11755
11799
|
const terminal = new Terminal({
|
|
11756
11800
|
allowTransparency: true,
|
|
11801
|
+
altClickMovesCursor: false,
|
|
11757
11802
|
cols: defaultColumns,
|
|
11758
11803
|
convertEol: true,
|
|
11759
11804
|
cursorBlink: true,
|