@laplace.live/persona-sdk 1.1.0 → 1.3.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/values/hotkeys.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Hotkey } from '../wire/types.ts';
|
|
1
2
|
/** True when the combo carries a command modifier and so may be registered globally. */
|
|
2
3
|
export declare function hasCommandModifier(accelerator: string | null): boolean;
|
|
3
4
|
/**
|
|
@@ -6,3 +7,9 @@ export declare function hasCommandModifier(accelerator: string | null): boolean;
|
|
|
6
7
|
* every writer canonicalizes; it does not validate one.
|
|
7
8
|
*/
|
|
8
9
|
export declare function canRunInBackground(accelerator: string | null): boolean;
|
|
10
|
+
/** True when a model hotkey is meant to fire while Persona sits in the background — what main registers on, and what the globe shows. */
|
|
11
|
+
export declare function hotkeyRunsInBackground(h: Hotkey): boolean;
|
|
12
|
+
/** Accelerators bound by more than one entry — the warning every shortcut list raises. */
|
|
13
|
+
export declare function duplicateAccelerators(bindings: readonly {
|
|
14
|
+
accelerator: string | null;
|
|
15
|
+
}[]): Set<string>;
|
package/dist/values/hotkeys.js
CHANGED
|
@@ -20,3 +20,20 @@ export function canRunInBackground(accelerator) {
|
|
|
20
20
|
return false;
|
|
21
21
|
return hasCommandModifier(accelerator) || accelerator.split('+').every(isControllerTriggerName);
|
|
22
22
|
}
|
|
23
|
+
/** True when a model hotkey is meant to fire while Persona sits in the background — what main registers on, and what the globe shows. */
|
|
24
|
+
export function hotkeyRunsInBackground(h) {
|
|
25
|
+
return h.global && h.active && h.action !== null && canRunInBackground(h.accelerator);
|
|
26
|
+
}
|
|
27
|
+
/** Accelerators bound by more than one entry — the warning every shortcut list raises. */
|
|
28
|
+
export function duplicateAccelerators(bindings) {
|
|
29
|
+
const seen = new Set();
|
|
30
|
+
const dupes = new Set();
|
|
31
|
+
for (const b of bindings) {
|
|
32
|
+
if (b.accelerator === null)
|
|
33
|
+
continue;
|
|
34
|
+
if (seen.has(b.accelerator))
|
|
35
|
+
dupes.add(b.accelerator);
|
|
36
|
+
seen.add(b.accelerator);
|
|
37
|
+
}
|
|
38
|
+
return dupes;
|
|
39
|
+
}
|
package/dist/wire/methods.d.ts
CHANGED
|
@@ -409,8 +409,6 @@ export interface StageResetTransformRequest {
|
|
|
409
409
|
export type StageResetTransformResponse = EmptyResponse;
|
|
410
410
|
export type StageResetCameraRequest = EmptyRequest;
|
|
411
411
|
export type StageResetCameraResponse = EmptyResponse;
|
|
412
|
-
export type StageShockwaveRequest = EmptyRequest;
|
|
413
|
-
export type StageShockwaveResponse = EmptyResponse;
|
|
414
412
|
export type AppInfoRequest = EmptyRequest;
|
|
415
413
|
export interface AppInfoResponse {
|
|
416
414
|
name: string;
|
|
@@ -923,10 +921,6 @@ export interface MethodMap {
|
|
|
923
921
|
request: StageResetCameraRequest;
|
|
924
922
|
response: StageResetCameraResponse;
|
|
925
923
|
};
|
|
926
|
-
'stage.shockwave': {
|
|
927
|
-
request: StageShockwaveRequest;
|
|
928
|
-
response: StageShockwaveResponse;
|
|
929
|
-
};
|
|
930
924
|
'app.info': {
|
|
931
925
|
request: AppInfoRequest;
|
|
932
926
|
response: AppInfoResponse;
|
package/dist/wire/protocol.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InjectTarget } from './types.ts';
|
|
2
2
|
/** Bumped on breaking wire changes; the server reports it in `hello` and clients warn on mismatch. */
|
|
3
|
-
export declare const PROTOCOL_VERSION =
|
|
3
|
+
export declare const PROTOCOL_VERSION = 3;
|
|
4
4
|
/** Default port the Persona API server listens on (user-configurable in the app). */
|
|
5
5
|
export declare const DEFAULT_API_PORT = 25034;
|
|
6
6
|
/** Default host clients dial: the server binds loopback unless LAN is opted in. */
|
package/dist/wire/protocol.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Bumped on breaking wire changes; the server reports it in `hello` and clients warn on mismatch. */
|
|
2
|
-
export const PROTOCOL_VERSION =
|
|
2
|
+
export const PROTOCOL_VERSION = 3;
|
|
3
3
|
/** Default port the Persona API server listens on (user-configurable in the app). */
|
|
4
4
|
export const DEFAULT_API_PORT = 25034;
|
|
5
5
|
/** Default host clients dial: the server binds loopback unless LAN is opted in. */
|