@virtualdisplay.io/client 4.0.0-alpha.30 → 4.0.0-alpha.32
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/CHANGELOG.md +36 -0
- package/README.md +13 -3
- package/dist/browser-7qZ1KQYo.cjs +8 -0
- package/dist/browser-B8yql1bQ.js +1226 -0
- package/dist/index.d.ts +20 -8
- package/dist/rolldown-runtime-5iZMYShA.cjs +1 -0
- package/dist/rolldown-runtime-CYdcPHCu.js +12 -0
- package/dist/virtualdisplay.client.cjs.js +152 -67
- package/dist/virtualdisplay.client.es.js +2937 -3572
- package/dist/virtualdisplay.client.umd.js +149 -64
- package/package.json +1 -1
- package/dist/browser-DfB_An57.cjs +0 -8
- package/dist/browser-ey6Iih3j.js +0 -1540
package/dist/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ interface ViewerSettings {
|
|
|
39
39
|
/**
|
|
40
40
|
* Camera movement limits sent to the client via CONFIG.
|
|
41
41
|
* Used to disable camera control buttons when a limit is reached.
|
|
42
|
-
* Units match the camera position: zoom = percentage (
|
|
42
|
+
* Units match the camera position: zoom = percentage (1-200), tilt/rotate = degrees.
|
|
43
43
|
*/
|
|
44
44
|
interface CameraLimits {
|
|
45
45
|
readonly minZoom?: number;
|
|
@@ -55,7 +55,7 @@ interface SelectableAttribute {
|
|
|
55
55
|
readonly selectable: string[];
|
|
56
56
|
/**
|
|
57
57
|
* The control should not render at all: a dimension whose component is
|
|
58
|
-
* currently hidden by its show-when conditions
|
|
58
|
+
* currently hidden by its show-when conditions.
|
|
59
59
|
* Different from an empty `selectable`, which greys values out but keeps
|
|
60
60
|
* the control visible. Absent means visible.
|
|
61
61
|
*/
|
|
@@ -272,9 +272,10 @@ declare class Configuration {
|
|
|
272
272
|
*/
|
|
273
273
|
onChange(callback: (configuration: ResolvedConfiguration | undefined) => void): void;
|
|
274
274
|
/**
|
|
275
|
-
* Register the
|
|
276
|
-
*
|
|
277
|
-
*
|
|
275
|
+
* Register the handler the button hands the configuration to, which switches the button on.
|
|
276
|
+
* `defaultLabel` fills in when no button label was authored. The button reads done when the
|
|
277
|
+
* returned promise resolves and failed when it rejects; reject with a `DOMException` named
|
|
278
|
+
* `AbortError` when the shopper backs out before sending, and it returns to its label.
|
|
278
279
|
*/
|
|
279
280
|
onSubmit(callback: (configuration: SubmittedConfiguration) => void | Promise<unknown>, options?: SubmitOptions): void;
|
|
280
281
|
/**
|
|
@@ -398,6 +399,7 @@ declare class Snapshot {
|
|
|
398
399
|
* @throws VirtualdisplayError if filename is invalid
|
|
399
400
|
*/
|
|
400
401
|
take(filename: string): Photo;
|
|
402
|
+
private request;
|
|
401
403
|
/**
|
|
402
404
|
* Fail any pending photos and forget them. Called from client destroy
|
|
403
405
|
* so callers awaiting onError() see a deterministic outcome instead of
|
|
@@ -417,6 +419,13 @@ declare class Snapshot {
|
|
|
417
419
|
declare class AttributeValue {
|
|
418
420
|
readonly value: string;
|
|
419
421
|
readonly attribute: string;
|
|
422
|
+
/**
|
|
423
|
+
* What to show: the model's own label, or the key made readable where it
|
|
424
|
+
* named none (`redWine` reads as "Red wine"). `value` stays the key, so a
|
|
425
|
+
* control renders this and submits that. On a measurement attribute it is
|
|
426
|
+
* the size in whole millimetres.
|
|
427
|
+
*/
|
|
428
|
+
readonly label: string;
|
|
420
429
|
private isSelectedValue;
|
|
421
430
|
get isSelected(): boolean;
|
|
422
431
|
}
|
|
@@ -481,6 +490,8 @@ interface ResolvedAppInfo {
|
|
|
481
490
|
/** The app's public slug (the address a submit POSTs to). Absent from a pre-slug server. */
|
|
482
491
|
readonly slug?: string;
|
|
483
492
|
readonly submit?: AppSubmitSettings;
|
|
493
|
+
/** Features switched on for the app's owner. Absent when there are none. */
|
|
494
|
+
readonly features?: readonly string[];
|
|
484
495
|
}
|
|
485
496
|
interface VirtualdisplaySelectEvent {
|
|
486
497
|
readonly attribute: string;
|
|
@@ -528,6 +539,7 @@ declare class BaseClient {
|
|
|
528
539
|
private readonly appResolvedCallbacks;
|
|
529
540
|
private createStandardInterface;
|
|
530
541
|
private sendControlAnnotationToggle;
|
|
542
|
+
private sendAnnotationToggle;
|
|
531
543
|
private wireIncomingMessages;
|
|
532
544
|
private handleAppResolved;
|
|
533
545
|
private handleSession;
|
|
@@ -540,7 +552,7 @@ declare class BaseClient {
|
|
|
540
552
|
private echoAnnotationsDifference;
|
|
541
553
|
private trackFullscreen;
|
|
542
554
|
private initializeLogging;
|
|
543
|
-
private
|
|
555
|
+
private mountIframe;
|
|
544
556
|
select(name: string, value: string): void;
|
|
545
557
|
getValues(name: string): AttributeValue[];
|
|
546
558
|
getValue(name: string, value: string): AttributeValue | undefined;
|
|
@@ -600,7 +612,7 @@ interface ClientOptionsBase {
|
|
|
600
612
|
/** W3C traceparent string to propagate to the viewer iframe for end-to-end tracing. */
|
|
601
613
|
readonly traceparent?: string | undefined;
|
|
602
614
|
/**
|
|
603
|
-
* A source viewer session id to restore into this mount
|
|
615
|
+
* A source viewer session id to restore into this mount: the
|
|
604
616
|
* iframe's metadata fetch merges that session's latest configuration into the
|
|
605
617
|
* attribute defaults, so the viewer boots straight into it. Internal option, used
|
|
606
618
|
* by the AR landing, not a customer-facing setting.
|
|
@@ -652,7 +664,7 @@ declare function isDebugMode(): boolean;
|
|
|
652
664
|
declare class VirtualdisplayClient extends BaseClient {
|
|
653
665
|
private readonly syncStatusTracker;
|
|
654
666
|
constructor(options: ClientOptions);
|
|
655
|
-
/** Subscribe to the live sync channel's connection state
|
|
667
|
+
/** Subscribe to the live sync channel's connection state. Latest-wins, no buffering. */
|
|
656
668
|
onSyncChange(callback: (connected: boolean) => void): void;
|
|
657
669
|
}
|
|
658
670
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
|
+
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e = null), t.exports), s = (e, i, o, s) => {
|
|
3
|
+
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
4
|
+
get: ((e) => i[e]).bind(null, d),
|
|
5
|
+
enumerable: !(s = n(i, d)) || s.enumerable
|
|
6
|
+
});
|
|
7
|
+
return e;
|
|
8
|
+
}, c = (n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
|
|
9
|
+
value: n,
|
|
10
|
+
enumerable: !0
|
|
11
|
+
}) : o, n));
|
|
12
|
+
export { c as n, o as t };
|