@livedesk/hub 0.1.53 → 0.1.54
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/package.json
CHANGED
|
@@ -465,8 +465,10 @@ export function normalizeRemoteClipboardCommandResult(action, operationId, value
|
|
|
465
465
|
response.manifest = normalizeRemoteClipboardManifest(result.manifest, operationId);
|
|
466
466
|
response.kind = response.manifest.contentKind;
|
|
467
467
|
} else {
|
|
468
|
-
const
|
|
469
|
-
|
|
468
|
+
const explicitContentKind = String(result.contentKind || '').trim().toLowerCase();
|
|
469
|
+
const legacyKind = String(result.kind || '').trim().toLowerCase();
|
|
470
|
+
if (explicitContentKind) response.kind = normalizeContentKind(explicitContentKind);
|
|
471
|
+
else if (['text', 'image', 'files'].includes(legacyKind)) response.kind = legacyKind;
|
|
470
472
|
}
|
|
471
473
|
for (const key of ['receivedBytes', 'totalBytes']) {
|
|
472
474
|
if (result[key] !== undefined) {
|
package/src/remote-hub.js
CHANGED
|
@@ -1334,9 +1334,10 @@ function normalizeRemoteInputEvent(value = {}) {
|
|
|
1334
1334
|
// input must prove the exact monitor owned by its capture generation.
|
|
1335
1335
|
monitorIndex,
|
|
1336
1336
|
normalizedX: Number.isFinite(normalizedX) ? Math.max(0, Math.min(1, normalizedX)) : undefined,
|
|
1337
|
-
normalizedY: Number.isFinite(normalizedY) ? Math.max(0, Math.min(1, normalizedY)) : undefined,
|
|
1338
|
-
button: safeString(input.button || input.Button, 24),
|
|
1339
|
-
|
|
1337
|
+
normalizedY: Number.isFinite(normalizedY) ? Math.max(0, Math.min(1, normalizedY)) : undefined,
|
|
1338
|
+
button: safeString(input.button || input.Button, 24),
|
|
1339
|
+
inputSource: safeString(input.inputSource || input.InputSource, 48).toLowerCase(),
|
|
1340
|
+
deltaX: Number.isFinite(deltaX) ? Math.max(-4096, Math.min(4096, deltaX)) : 0,
|
|
1340
1341
|
deltaY: Number.isFinite(deltaY) ? Math.max(-4096, Math.min(4096, deltaY)) : 0,
|
|
1341
1342
|
key,
|
|
1342
1343
|
code,
|