@virtualdisplay.io/client 4.0.0-alpha.11 → 4.0.0-alpha.14

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +1 -1
  3. package/dist/browser-DfB_An57.cjs +8 -0
  4. package/dist/browser-ey6Iih3j.js +1540 -0
  5. package/dist/src/attributes/attribute.d.ts +2 -0
  6. package/dist/src/attributes/attribute.d.ts.map +1 -1
  7. package/dist/src/attributes/attributes.d.ts +2 -0
  8. package/dist/src/attributes/attributes.d.ts.map +1 -1
  9. package/dist/src/attributes/selections.d.ts +2 -1
  10. package/dist/src/attributes/selections.d.ts.map +1 -1
  11. package/dist/src/client/client.d.ts +20 -0
  12. package/dist/src/client/client.d.ts.map +1 -1
  13. package/dist/src/client/events.d.ts +22 -0
  14. package/dist/src/client/events.d.ts.map +1 -0
  15. package/dist/src/client/types.d.ts +5 -4
  16. package/dist/src/client/types.d.ts.map +1 -1
  17. package/dist/src/configuration/configuration.d.ts +113 -0
  18. package/dist/src/configuration/configuration.d.ts.map +1 -0
  19. package/dist/src/configuration/index.d.ts +2 -0
  20. package/dist/src/configuration/index.d.ts.map +1 -0
  21. package/dist/src/configuration/resolver.d.ts +16 -0
  22. package/dist/src/configuration/resolver.d.ts.map +1 -0
  23. package/dist/src/focus/focus.d.ts +43 -0
  24. package/dist/src/focus/focus.d.ts.map +1 -0
  25. package/dist/src/focus/index.d.ts +2 -0
  26. package/dist/src/focus/index.d.ts.map +1 -0
  27. package/dist/src/index.d.ts +4 -0
  28. package/dist/src/index.d.ts.map +1 -1
  29. package/dist/src/snapshot/snapshot.d.ts +6 -0
  30. package/dist/src/snapshot/snapshot.d.ts.map +1 -1
  31. package/dist/src/ui/commerce-panel.d.ts +31 -0
  32. package/dist/src/ui/commerce-panel.d.ts.map +1 -0
  33. package/dist/src/ui/controls/attribute-group.d.ts.map +1 -1
  34. package/dist/src/ui/layouts/inframe-layout.d.ts +13 -0
  35. package/dist/src/ui/layouts/inframe-layout.d.ts.map +1 -0
  36. package/dist/src/ui/layouts/layout.d.ts +15 -0
  37. package/dist/src/ui/layouts/layout.d.ts.map +1 -0
  38. package/dist/src/ui/layouts/null-layout.d.ts +12 -0
  39. package/dist/src/ui/layouts/null-layout.d.ts.map +1 -0
  40. package/dist/src/ui/layouts/registry.d.ts +4 -0
  41. package/dist/src/ui/layouts/registry.d.ts.map +1 -0
  42. package/dist/src/ui/layouts/sidebar-layout.d.ts +24 -0
  43. package/dist/src/ui/layouts/sidebar-layout.d.ts.map +1 -0
  44. package/dist/src/ui/standard-interface.d.ts +6 -0
  45. package/dist/src/ui/standard-interface.d.ts.map +1 -1
  46. package/dist/src/ui/styles.d.ts.map +1 -1
  47. package/dist/virtualdisplay.client.cjs.js +193 -42
  48. package/dist/virtualdisplay.client.es.js +3099 -1945
  49. package/dist/virtualdisplay.client.umd.js +198 -47
  50. package/package.json +1 -1
  51. package/dist/browser-CDLfpTNV.cjs +0 -8
  52. package/dist/browser-DxtIwHNu.js +0 -1227
  53. package/dist/chunk-BcutgqC9.cjs +0 -1
  54. package/dist/chunk-C_CI6nMA.js +0 -13
@@ -23,6 +23,8 @@ export declare class Attribute {
23
23
  select(value: string): void;
24
24
  getValues(): AttributeValue[];
25
25
  getValue(value: string): AttributeValue | undefined;
26
+ /** The currently selected value, or undefined before any selection lands. */
27
+ get selected(): string | undefined;
26
28
  /**
27
29
  * Register callback that fires when selection changes
28
30
  * Receives the newly selected AttributeValue
@@ -1 +1 @@
1
- {"version":3,"file":"attribute.d.ts","sourceRoot":"","sources":["../../../src/attributes/attribute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,CA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CAAC;IAE7B,SAAgB,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IAEjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8B;IAErD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwC;IAEjE,OAAO,CAAC,gBAAgB,CAAC,CAA2C;gBAExD,OAAO,EAAE,gBAAgB;IAOrC;;;OAGG;IACI,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAQ3B,SAAS,IAAI,cAAc,EAAE;IAI7B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAI1D,6EAA6E;IAC7E,IAAW,QAAQ,IAAI,MAAM,GAAG,SAAS,CAOxC;IAED;;;OAGG;IACI,QAAQ,CAAC,QAAQ,EAAE,CAAC,aAAa,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI;IAIxE;;;OAGG;IACI,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAgB9C,OAAO,CAAC,YAAY;CAarB"}
@@ -36,6 +36,8 @@ export declare class Attributes {
36
36
  */
37
37
  onChange(name: string, callback: (selectedValue: AttributeValue) => void): void;
38
38
  getAttribute(name: string): Attribute | undefined;
39
+ /** The current selection as attribute name→value pairs, empty before the mapping arrives. */
40
+ getSelection(): Record<string, string>;
39
41
  get hasMapping(): boolean;
40
42
  private sendMutation;
41
43
  private replayPendingCallbacks;
@@ -1 +1 @@
1
- {"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/attributes/attributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,eAAe,EAGpB,KAAK,qBAAqB,EAC3B,MAAM,8BAA8B,CAAC;AAGtC;;;;;;;;;GASG;AACH,qBAAa,UAAU;IAMnB,OAAO,CAAC,QAAQ,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,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IANpC,OAAO,CAAC,QAAQ,CAAgC;IAEhD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAkF;gBAGhG,IAAI,EAAE,eAAe,EACrB,gBAAgB,CAAC,GAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,aAAA;IAGhF;;OAEG;IACI,qBAAqB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;IAepD,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI;IAIjE;;;;OAIG;IACI,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIzC,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,EAAE;IAIzC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IAIxE;;;OAGG;IACI,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,aAAa,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI;IAe/E,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAIxD,6FAA6F;IACtF,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAI7C,IAAW,UAAU,IAAI,OAAO,CAE/B;IAED,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,sBAAsB;CAU/B"}
@@ -9,7 +9,8 @@ export declare class AttributeRegistry {
9
9
  constructor(definitions: AttributeDefinition[], sendMutation: (mutations: MutationDto[], isInitial: boolean) => void, onMutationFailed?: (attribute: string, value: string) => void);
10
10
  private readonly onMutationFailed;
11
11
  get(name: string): Attribute | undefined;
12
- defaults(): MutationDto[];
12
+ /** The current selection as attribute name→value pairs, skipping unset attributes. */
13
+ getSelection(): Record<string, string>;
13
14
  handleResults(results: MutationResult[]): void;
14
15
  private buildOptions;
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"selections.d.ts","sourceRoot":"","sources":["../../../src/attributes/selections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAErG;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgC;gBAGzD,WAAW,EAAE,mBAAmB,EAAE,EAClC,YAAY,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,EACpE,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI;IAS/D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2D;IAErF,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAIxC,QAAQ,IAAI,WAAW,EAAE;IAezB,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI;IAWrD,OAAO,CAAC,YAAY;CAkBrB"}
1
+ {"version":3,"file":"selections.d.ts","sourceRoot":"","sources":["../../../src/attributes/selections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,aAAa,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAErG;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAgC;gBAGzD,WAAW,EAAE,mBAAmB,EAAE,EAClC,YAAY,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,OAAO,KAAK,IAAI,EACpE,gBAAgB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI;IAS/D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA2D;IAErF,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAI/C,sFAAsF;IAC/E,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAWtC,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI;IAWrD,OAAO,CAAC,YAAY;CAkBrB"}
@@ -4,6 +4,8 @@ import { Annotations } from '../annotations';
4
4
  import { Attribute } from '../attributes/attribute';
5
5
  import { AttributeValue } from '../attributes/value';
6
6
  import { Camera, CameraPosition } from '../camera';
7
+ import { Focus } from '../focus';
8
+ import { Configuration } from '../configuration';
7
9
  import { ViewerSettings } from '@virtualdisplay.io/messaging';
8
10
  import { Snapshot } from '../snapshot';
9
11
  /**
@@ -16,6 +18,8 @@ export declare class VirtualdisplayClient {
16
18
  private readonly messenger;
17
19
  private readonly cameraApi;
18
20
  private readonly cameraPositionApi;
21
+ private readonly focusApi;
22
+ private readonly configurationApi;
19
23
  private readonly snapshotApi;
20
24
  private readonly annotationsApi;
21
25
  private readonly eventBus;
@@ -28,6 +32,20 @@ export declare class VirtualdisplayClient {
28
32
  private readonly mutationFailedCallbacks;
29
33
  constructor(options: ClientOptions);
30
34
  private registerHandlers;
35
+ /** Handlers that feed viewer-reported state into the facades (focus, pricing). */
36
+ private registerFacadeStateHandlers;
37
+ /**
38
+ * Dispatch a bubbling `vd:focus-change` event on the container so a page can
39
+ * react to focus without registering an `onChange` callback.
40
+ */
41
+ private dispatchFocusChange;
42
+ /**
43
+ * Dispatch a bubbling `vd:configuration-change` event on the container so a
44
+ * page or tag manager can react to price changes without a client callback.
45
+ */
46
+ private dispatchConfigurationChange;
47
+ /** Dispatch a bubbling `vd:configuration-submit` event when the CTA is used. */
48
+ private dispatchConfigurationSubmit;
31
49
  private handleConfig;
32
50
  private activateAr;
33
51
  private initializeLogging;
@@ -43,6 +61,8 @@ export declare class VirtualdisplayClient {
43
61
  on<T extends VirtualdisplayUiEventType>(type: T, callback: (event: VirtualdisplayUiEventMap[T]) => void): void;
44
62
  get annotations(): Annotations;
45
63
  get camera(): Camera;
64
+ get focus(): Focus;
65
+ get configuration(): Configuration;
46
66
  get cameraPosition(): CameraPosition;
47
67
  get snapshot(): Snapshot;
48
68
  get viewerSettings(): ViewerSettings;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client/client.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACxG,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAWL,KAAK,cAAc,EACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAOvC;;;GAGG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IACxC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAiB;IACnD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAW;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAc;IAC7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAa;IACtC,OAAO,CAAC,QA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,IAAI,GAAG,IAAI;IAItE,EAAE,CAAC,CAAC,SAAS,yBAAyB,EAC3C,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC,KAAK,IAAI,GACrD,IAAI;IAIP,IAAW,WAAW,IAAI,WAAW,CAAgC;IACrE,IAAW,MAAM,IAAI,MAAM,CAA2B;IACtD,IAAW,KAAK,IAAI,KAAK,CAA0B;IACnD,IAAW,aAAa,IAAI,aAAa,CAAkC;IAC3E,IAAW,cAAc,IAAI,cAAc,CAAmC;IAC9E,IAAW,QAAQ,IAAI,QAAQ,CAA6B;IAE5D,IAAW,cAAc,IAAI,cAAc,CAE1C;IAEM,OAAO,IAAI,IAAI;CAevB"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The Virtualdisplay client's DOM event names, in one registry.
3
+ *
4
+ * - `ui:*` events dispatch on the container (non-bubbling). They are the typed
5
+ * surface of `client.on(...)` — payloads in `VirtualdisplayUiEventMap` (./types).
6
+ * - `vd:*` events bubble into the customer's page, so a page can react with
7
+ * `addEventListener` without registering a client callback.
8
+ */
9
+ export declare const VD_EVENTS: {
10
+ /** Attribute selection requested (cancelable). `detail`: `{ attribute, value }`. */
11
+ readonly SELECT: "ui:select";
12
+ /** Attribute selection applied. `detail`: `{ attribute, value }`. */
13
+ readonly SELECTED: "ui:selected";
14
+ /** Focus changed (bubbles). `detail`: `{ component, attributes }`, or `null` for the overview. */
15
+ readonly FOCUS_CHANGE: "vd:focus-change";
16
+ /** Resolved configuration changed (bubbles). `detail`: the resolved configuration, or `null` when nothing matches. */
17
+ readonly CONFIGURATION_CHANGE: "vd:configuration-change";
18
+ /** Configuration submitted (bubbles). `detail`: the resolved configuration handed to the host. */
19
+ readonly CONFIGURATION_SUBMIT: "vd:configuration-submit";
20
+ };
21
+ export type VdEvent = typeof VD_EVENTS[keyof typeof VD_EVENTS];
22
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/client/events.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS;IACpB,oFAAoF;;IAEpF,qEAAqE;;IAErE,kGAAkG;;IAElG,sHAAsH;;IAEtH,kGAAkG;;CAE1F,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,OAAO,SAAS,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
+ import { VD_EVENTS } from './events';
1
2
  export interface MutationFailedEvent {
2
- attribute: string;
3
- value: string;
3
+ readonly attribute: string;
4
+ readonly value: string;
4
5
  }
5
6
  export interface VirtualdisplaySelectEvent {
6
7
  readonly attribute: string;
@@ -12,8 +13,8 @@ export interface VirtualdisplaySelectedEvent {
12
13
  readonly value: string;
13
14
  }
14
15
  export type VirtualdisplayUiEventMap = {
15
- 'ui:select': VirtualdisplaySelectEvent;
16
- 'ui:selected': VirtualdisplaySelectedEvent;
16
+ [VD_EVENTS.SELECT]: VirtualdisplaySelectEvent;
17
+ [VD_EVENTS.SELECTED]: VirtualdisplaySelectedEvent;
17
18
  };
18
19
  export type VirtualdisplayUiEventType = keyof VirtualdisplayUiEventMap;
19
20
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,cAAc,IAAI,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,WAAW,EAAE,yBAAyB,CAAC;IACvC,aAAa,EAAE,2BAA2B,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,cAAc,IAAI,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,yBAAyB,CAAC;IAC9C,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,2BAA2B,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,113 @@
1
+ import { Selection } from './resolver';
2
+ import { PricingDocument } from '@virtualdisplay.io/messaging';
3
+ /**
4
+ * The buyer's current configuration once it resolves to a price. `availability`
5
+ * is `available` (price + submit) or `view_only` (price, no submit); a matched
6
+ * `hidden` rule and a no-match both surface as `undefined` instead.
7
+ */
8
+ export interface ResolvedConfiguration {
9
+ readonly attributes: Record<string, string>;
10
+ readonly reference: string;
11
+ /** Price in minor units (cents), exactly as the source displays it. */
12
+ readonly price: number;
13
+ readonly currency: string;
14
+ readonly availability: 'available' | 'view_only';
15
+ }
16
+ /**
17
+ * What submit hands to the host: the buyer's selection and the reference to act
18
+ * on. Deliberately carries no price — the shop's checkout price is binding and
19
+ * ours is display-only, so handing it into the cart hand-off would only invite a
20
+ * wrong-price error. Price stays on the display side (`current`, `onChange`).
21
+ */
22
+ export interface SubmittedConfiguration {
23
+ readonly attributes: Record<string, string>;
24
+ readonly reference: string;
25
+ }
26
+ type ChangeCallback = (configuration: ResolvedConfiguration | undefined) => void;
27
+ type SubmitCallback = (configuration: SubmittedConfiguration) => void | Promise<unknown>;
28
+ type Dispatch<T> = (detail: T) => void;
29
+ /** Options for {@link Configuration.onSubmit}. */
30
+ export interface SubmitOptions {
31
+ /** Fallback button label when the customer authored none (the adapter brings it). */
32
+ readonly defaultLabel?: string;
33
+ }
34
+ /**
35
+ * Configuration API — resolves the buyer's selection to a reference + price and
36
+ * carries it to the host page.
37
+ *
38
+ * Follows the existing facade style (`client.camera`, `client.focus`). It holds
39
+ * the pricing document and the latest selection, re-resolving on every change.
40
+ * `onChange` fires with the resolved configuration (or `undefined` when nothing
41
+ * matches); alongside it the container dispatches a bubbling `vd:configuration-change`
42
+ * CustomEvent so a page reacts without registering a callback. `onSubmit` registers
43
+ * the host handler that the CTA hands the configuration to.
44
+ */
45
+ export declare class Configuration {
46
+ private readonly dispatchChange;
47
+ private readonly dispatchSubmit;
48
+ private pricing;
49
+ private selection;
50
+ private resolved;
51
+ private readonly changeCallbacks;
52
+ private readonly renderCallbacks;
53
+ private submitCallback;
54
+ private submitDefaultLabel;
55
+ constructor(dispatchChange: Dispatch<ResolvedConfiguration | undefined>, dispatchSubmit: Dispatch<SubmittedConfiguration>);
56
+ /** The resolved configuration, or undefined when nothing matches. */
57
+ get current(): ResolvedConfiguration | undefined;
58
+ /** The VAT label for bare embeds (e.g. "incl. btw"), or undefined without pricing. */
59
+ get vatDisplay(): string | undefined;
60
+ /**
61
+ * The CTA label: the customer's `button_label`, or the adapter's `defaultLabel`
62
+ * when that is empty. Undefined when neither is set — a button must know what
63
+ * it says, so the CTA does not render.
64
+ */
65
+ get buttonLabel(): string | undefined;
66
+ /**
67
+ * Whether the current configuration may be submitted: a handler is registered
68
+ * and the configuration is either price-less or an `available` priced one. The
69
+ * CTA's visibility ({@link submitEnabled}) layers a label requirement on top of
70
+ * this; a programmatic `submit()` does not need a label.
71
+ */
72
+ private get submittable();
73
+ /**
74
+ * Whether the CTA should render: the configuration is submittable and a label
75
+ * exists. A button must say something, so an empty label hides the CTA rather
76
+ * than rendering blank.
77
+ */
78
+ get submitEnabled(): boolean;
79
+ /**
80
+ * Subscribe to configuration changes. Fires after every selection change with
81
+ * the resolved configuration, including undefined when nothing matches.
82
+ */
83
+ onChange(callback: ChangeCallback): void;
84
+ /**
85
+ * Register the submit handler the CTA hands the configuration to. Registering
86
+ * one is what switches the button on (capability driven). `defaultLabel` fills
87
+ * in when the customer authored no button label.
88
+ */
89
+ onSubmit(callback: SubmitCallback, options?: SubmitOptions): void;
90
+ /**
91
+ * Subscribe the built-in UI to re-render the price + CTA. Fires on every
92
+ * resolve and when a submit handler is registered (which can switch the button
93
+ * on without a configuration change). Separate from `onChange`, which stays the
94
+ * host-facing, mutation-driven contract. Returns a disposer.
95
+ */
96
+ onRender(callback: () => void): () => void;
97
+ /**
98
+ * Hand the current configuration to the registered handler and fire the
99
+ * bubbling `vd:configuration-submit` event. No-op without a handler or a
100
+ * resolved configuration. Returns the handler's promise so the caller can
101
+ * reflect the result (bezig / gelukt / mislukt).
102
+ */
103
+ submit(): Promise<void>;
104
+ /** Called by the client when a PRICING message arrives from the viewer. */
105
+ handlePricingReceived(pricing: PricingDocument): void;
106
+ /** Called by the client after every mutation result, with the full selection. */
107
+ handleSelectionChanged(selection: Selection): void;
108
+ private recompute;
109
+ private notifyRender;
110
+ private resolve;
111
+ }
112
+ export {};
113
+ //# sourceMappingURL=configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../../src/configu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AQ,CAAC,eAAe,CAAwB;IACxD,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAyB;IACzD,OAAO,CAAC,cAAc,CAA6B;IACnD,OAAO,CAAC,kBAAkB,CAAqB;gBAG5B,cAAc,EAAE,QAAQ,CAAC,qBAAqB,GAAG,SAAS,CAAC,EAC3D,cAAc,EAAE,QAAQ,CAAC,sBAAsB,CAAC;IAGnE,qEAAqE;IACrE,IAAW,OAAO,IAAI,qBAAqB,GAAG,SAAS,CAEtD;IAED,sFAAsF;IACtF,IAAW,UAAU,IAAI,MAAM,GAAG,SAAS,CAE1C;IAED;;;;OAIG;IACH,IAAW,WAAW,IAAI,MAAM,GAAG,SAAS,CAW3C;IAED;;;;;OAKG;IACH,OAAO,KAAK,WAAW,GAYtB;IAED;;;;OAIG;IACH,IAAW,aAAa,IAAI,OAAO,CAElC;IAED;;;OAGG;IACI,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAI/C;;;;OAIG;IACI,QAAQ,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI;IAMxE;;;;;OAKG;IACI,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAQjD;;;;;OAKG;IACU,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAmBpC,2EAA2E;IACpE,qBAAqB,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAK5D,iFAAiF;IAC1E,sBAAsB,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAKzD,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,OAAO;CAkBhB"}
@@ -0,0 +1,2 @@
1
+ export { Configuration, type ResolvedConfiguration, type SubmittedConfiguration, type SubmitOptions, } from './configuration';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/configuration/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { PricingRule } from '@virtualdisplay.io/messaging';
2
+ /** The buyer's current configuration as attribute name→value pairs. */
3
+ export type Selection = Record<string, string>;
4
+ /**
5
+ * Find the rule that prices the current selection.
6
+ *
7
+ * Matching is subset-based, most-specific wins: a rule matches when every
8
+ * attribute value it names equals the selection, and the rule naming the most
9
+ * attributes is chosen. Returns undefined when nothing matches, or when two
10
+ * rules tie as the most specific match — the latter is rejected at save time,
11
+ * so a runtime tie is fail-safe handled as "no price" rather than a wrong one.
12
+ *
13
+ * Pure and dependency-free: the viewer bundle is size-critical.
14
+ */
15
+ export declare function resolveRule(rules: PricingRule[], selection: Selection): PricingRule | undefined;
16
+ //# sourceMappingURL=resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/configuration/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,uEAAuE;AACvE,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAU/F"}
@@ -0,0 +1,43 @@
1
+ import { FocusStateMessage, MessageCallback } from '@virtualdisplay.io/messaging';
2
+ /** The focus state reported to `onChange` and the `vd:focus-change` event. */
3
+ export interface FocusState {
4
+ readonly component: string;
5
+ readonly attributes: string[];
6
+ }
7
+ type FocusChange = FocusState | null;
8
+ type FocusChangeCallback = (state: FocusChange) => void;
9
+ type DispatchFn = (state: FocusChange) => void;
10
+ /**
11
+ * Focus control API — isolate and frame a component, or return to overview.
12
+ *
13
+ * Programmatic by design: `set('Seat')` needs no user selection, which is how the
14
+ * (future) component menu and the portal/admin editors drive it over the same
15
+ * message bus. Alongside `onChange`, the container dispatches a bubbling
16
+ * `vd:focus-change` CustomEvent so a page can react without registering a callback.
17
+ */
18
+ export declare class Focus {
19
+ private readonly send;
20
+ private readonly dispatch;
21
+ private focused;
22
+ private attributes;
23
+ private readonly changeCallbacks;
24
+ constructor(send: MessageCallback, dispatch: DispatchFn);
25
+ /** The focused component name, or null in overview. */
26
+ get current(): string | null;
27
+ /**
28
+ * Focus a component by name. Sends a focus message to the viewer.
29
+ * @throws VirtualdisplayError if component is not a non-empty string
30
+ */
31
+ set(component: string): void;
32
+ /** Return to the overview — unfocus the current component. */
33
+ clear(): void;
34
+ /**
35
+ * Subscribe to focus changes. The callback fires with the focus state when a
36
+ * component is focused, and with null when returning to overview.
37
+ */
38
+ onChange(callback: FocusChangeCallback): void;
39
+ /** Called by the client when a FocusStateMessage is received from the viewer. */
40
+ handleStateReceived(message: FocusStateMessage): void;
41
+ }
42
+ export {};
43
+ //# sourceMappingURL=focus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus.d.ts","sourceRoot":"","sources":["../../../src/focus/focus.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACrB,MAAM,8BAA8B,CAAC;AAEtC,8EAA8E;AAC9E,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;CAC/B;AAED,KAAK,WAAW,GAAG,UAAU,GAAG,IAAI,CAAC;AACrC,KAAK,mBAAmB,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AACxD,KAAK,UAAU,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE/C;;;;;;;GAOG;AACH,qBAAa,KAAK;IAMd,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAN3B,OAAO,CAAC,OAAO,CAAuB;IACtC,OAAO,CAAC,UAAU,CAAgB;IAClC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAA6B;gBAG1C,IAAI,EAAE,eAAe,EACrB,QAAQ,EAAE,UAAU;IAGvC,uDAAuD;IACvD,IAAW,OAAO,IAAI,MAAM,GAAG,IAAI,CAElC;IAED;;;OAGG;IACI,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAUnC,8DAA8D;IACvD,KAAK,IAAI,IAAI;IAIpB;;;OAGG;IACI,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,GAAG,IAAI;IAIpD,iFAAiF;IAC1E,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;CAkB7D"}
@@ -0,0 +1,2 @@
1
+ export { Focus, type FocusState } from './focus';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/focus/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { VirtualdisplayClient } from './client/client';
2
+ export { VD_EVENTS, type VdEvent } from './client/events';
2
3
  export type { ClientOptions } from './client/options';
3
4
  export { VirtualdisplayError, ERROR_CODES, type ErrorCode } from './client/error';
4
5
  export type { MutationFailedEvent, VirtualdisplaySelectEvent, VirtualdisplaySelectedEvent, VirtualdisplayUiEventMap, VirtualdisplayUiEventType, } from './client/types';
@@ -6,6 +7,9 @@ export { Attribute } from './attributes/attribute';
6
7
  export { AttributeValue } from './attributes/value';
7
8
  export { Annotations } from './annotations';
8
9
  export { Camera } from './camera';
10
+ export { Focus, type FocusState } from './focus';
11
+ export { Configuration, type ResolvedConfiguration, type SubmittedConfiguration, type SubmitOptions, } from './configuration';
12
+ export type { PricingDocument, PricingRule, Availability } from '@virtualdisplay.io/messaging';
9
13
  export { Snapshot, Photo, type PhotoData } from './snapshot';
10
14
  export type { ViewerSettings, AnnotationPosition } from '@virtualdisplay.io/messaging';
11
15
  export { logger, enableDebugMode, isDebugMode } from './utils/logger';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAClF,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAG7D,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGvF,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAClF,YAAY,EACV,mBAAmB,EACnB,yBAAyB,EACzB,2BAA2B,EAC3B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAGjD,OAAO,EACL,aAAa,EACb,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,aAAa,GACnB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG/F,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAG7D,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGvF,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
@@ -22,6 +22,12 @@ export declare class Snapshot {
22
22
  * Matches the message to a pending photo by filename, then develops or fails it
23
23
  */
24
24
  handleSnapshotResult(message: SnapshotResultMessage): void;
25
+ /**
26
+ * Fail any pending photos and forget them. Called from client destroy
27
+ * so callers awaiting onError() see a deterministic outcome instead of
28
+ * leaking captures whose results will never arrive.
29
+ */
30
+ clear(): void;
25
31
  /**
26
32
  * Validate filename has a valid image extension
27
33
  */
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../src/snapshot/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAiB,KAAK,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAG/G;;;GAGG;AACH,qBAAa,QAAQ;IAMjB,OAAO,CAAC,QAAQ,CAAC,IAAI;IALvB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAY;IAE5C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA4B;gBAGvC,IAAI,EAAE,eAAe;IAGxC;;;;;;OAMG;IACI,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK;IAgBpC;;;OAGG;IACI,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI;IAuBjE;;OAEG;IACH,OAAO,CAAC,gBAAgB;CA2BzB"}
1
+ {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../../src/snapshot/snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAiB,KAAK,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAG/G;;;GAGG;AACH,qBAAa,QAAQ;IAMjB,OAAO,CAAC,QAAQ,CAAC,IAAI;IALvB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAY;IAE5C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA4B;gBAGvC,IAAI,EAAE,eAAe;IAGxC;;;;;;OAMG;IACI,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,KAAK;IAgBpC;;;OAGG;IACI,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI;IAuBjE;;;;OAIG;IACI,KAAK,IAAI,IAAI;IAcpB;;OAEG;IACH,OAAO,CAAC,gBAAgB;CA2BzB"}
@@ -0,0 +1,31 @@
1
+ import { Configuration } from '../configuration';
2
+ /**
3
+ * Price + call-to-action, shown under the attribute controls. Reads the resolved
4
+ * configuration from the facade and renders the formatted price, the VAT label,
5
+ * and a customer-labelled submit button that reflects bezig / gelukt / mislukt.
6
+ *
7
+ * It lives inside the attribute panel, so the active configurator layout places
8
+ * it in both the in-frame and sidebar variants with no layout-specific code.
9
+ */
10
+ export declare class CommercePanel {
11
+ private readonly configuration;
12
+ private readonly resetMs;
13
+ readonly element: HTMLElement;
14
+ private readonly priceEl;
15
+ private readonly vatEl;
16
+ private readonly button;
17
+ private readonly unsubscribe;
18
+ private state;
19
+ private resetTimer;
20
+ constructor(configuration: Configuration, resetMs?: number);
21
+ /** Re-render from the facade. Called on every resolve and on submit-handler registration. */
22
+ update(): void;
23
+ destroy(): void;
24
+ private renderPrice;
25
+ private renderButton;
26
+ private handleSubmit;
27
+ private scheduleReset;
28
+ private setState;
29
+ private setButtonText;
30
+ }
31
+ //# sourceMappingURL=commerce-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commerce-panel.d.ts","sourceRoot":"","sources":["../../../src/ui/commerce-panel.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAyB,MAAM,kBAAkB,CAAC;AAU7E;;;;;;;GAOG;AACH,qBAAa,aAAa;IAWtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO;IAX1B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAE9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAc;IACtC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;IACpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,UAAU,CAA4C;gBAG3C,aAAa,EAAE,aAAa,EAC5B,OAAO,GAAE,MAAwB;IAwBpD,6FAA6F;IAC7F,MAAM,IAAI,IAAI;IAWd,OAAO,IAAI,IAAI;IAMf,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,YAAY;YASN,YAAY;IAY1B,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,aAAa;CAItB"}
@@ -1 +1 @@
1
- {"version":3,"file":"attribute-group.d.ts","sourceRoot":"","sources":["../../../../src/ui/controls/attribute-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU/C,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,mBAAmB,EACxB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,EAC/C,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,KAAK,IAAI,GACzE,WAAW,CA4Bb"}
1
+ {"version":3,"file":"attribute-group.d.ts","sourceRoot":"","sources":["../../../../src/ui/controls/attribute-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa/C,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,mBAAmB,EACxB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,EAC/C,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,KAAK,IAAI,GACzE,WAAW,CAiCb"}
@@ -0,0 +1,13 @@
1
+ import { ConfiguratorLayout } from './layout';
2
+ /**
3
+ * Default layout: the attribute controls sit in the bottom-left corner of the
4
+ * viewer, as a compact frosted card.
5
+ */
6
+ export declare class InframeLayout implements ConfiguratorLayout {
7
+ private slot;
8
+ private panel;
9
+ attach(container: HTMLElement, panel: HTMLElement): void;
10
+ setVisible(visible: boolean): void;
11
+ destroy(): void;
12
+ }
13
+ //# sourceMappingURL=inframe-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inframe-layout.d.ts","sourceRoot":"","sources":["../../../../src/ui/layouts/inframe-layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD;;;GAGG;AACH,qBAAa,aAAc,YAAW,kBAAkB;IACtD,OAAO,CAAC,IAAI,CAA4B;IACxC,OAAO,CAAC,KAAK,CAA4B;IAEzC,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI;IASxD,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIlC,OAAO,IAAI,IAAI;CAKhB"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A configurator layout decides where and how the attribute controls are shown
3
+ * in the viewer. Each variant (in-frame, sidebar, future ones) is a self-contained
4
+ * implementation of this interface; the standard interface never branches on the
5
+ * layout key itself — it asks the registry for the active layout and delegates.
6
+ */
7
+ export interface ConfiguratorLayout {
8
+ /** Place the attribute panel into the viewer container. */
9
+ attach(container: HTMLElement, panel: HTMLElement): void;
10
+ /** Reveal or hide the controls (revealed once CONFIG/MAPPING have arrived). */
11
+ setVisible(visible: boolean): void;
12
+ /** Remove all DOM and observers this layout created. */
13
+ destroy(): void;
14
+ }
15
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/ui/layouts/layout.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,2DAA2D;IAC3D,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAAC;IACzD,+EAA+E;IAC/E,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,wDAAwD;IACxD,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,12 @@
1
+ import { ConfiguratorLayout } from './layout';
2
+ /**
3
+ * The "no controls" layout. Selected when the attribute selectors are turned off
4
+ * (`attributeControls: false`). It renders nothing, so turning the controls off is
5
+ * just another layout rather than a special case in the standard interface.
6
+ */
7
+ export declare class NullLayout implements ConfiguratorLayout {
8
+ attach(_container: HTMLElement, _panel: HTMLElement): void;
9
+ setVisible(_visible: boolean): void;
10
+ destroy(): void;
11
+ }
12
+ //# sourceMappingURL=null-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"null-layout.d.ts","sourceRoot":"","sources":["../../../../src/ui/layouts/null-layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD;;;;GAIG;AACH,qBAAa,UAAW,YAAW,kBAAkB;IACnD,MAAM,CAAC,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI;IAI1D,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAInC,OAAO,IAAI,IAAI;CAGhB"}
@@ -0,0 +1,4 @@
1
+ import { ConfiguratorLayout } from './layout';
2
+ /** Resolve the active layout, falling back to the in-frame default for unknown keys. */
3
+ export declare function createConfiguratorLayout(key: string | undefined): ConfiguratorLayout;
4
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/ui/layouts/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAkBnD,wFAAwF;AACxF,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,kBAAkB,CAGpF"}
@@ -0,0 +1,24 @@
1
+ import { ConfiguratorLayout } from './layout';
2
+ /**
3
+ * Docked right-hand panel that holds the attribute controls. Same controls as the
4
+ * in-frame layout, just relocated and given room to breathe. On narrow embeds it
5
+ * collapses to a toggle button so the viewer is never fully covered.
6
+ */
7
+ export declare class SidebarLayout implements ConfiguratorLayout {
8
+ private element;
9
+ private body;
10
+ private openButton;
11
+ private closeButton;
12
+ private container;
13
+ private observer;
14
+ private collapsible;
15
+ private expanded;
16
+ private visible;
17
+ attach(container: HTMLElement, panel: HTMLElement): void;
18
+ setVisible(visible: boolean): void;
19
+ destroy(): void;
20
+ private observe;
21
+ private setCollapsible;
22
+ private render;
23
+ }
24
+ //# sourceMappingURL=sidebar-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar-layout.d.ts","sourceRoot":"","sources":["../../../../src/ui/layouts/sidebar-layout.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAMnD;;;;GAIG;AACH,qBAAa,aAAc,YAAW,kBAAkB;IACtD,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,IAAI,CAA4B;IACxC,OAAO,CAAC,UAAU,CAAuB;IACzC,OAAO,CAAC,WAAW,CAAuB;IAC1C,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,OAAO,CAAS;IAExB,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI;IAmCxD,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAKlC,OAAO,IAAI,IAAI;IASf,OAAO,CAAC,OAAO;IASf,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,MAAM;CAWf"}
@@ -4,11 +4,13 @@ import { Camera, CameraPosition } from '../camera';
4
4
  import { Attributes } from '../attributes/attributes';
5
5
  import { AttributeValue } from '../attributes/value';
6
6
  import { UiEventBus } from './event-bus';
7
+ import { Configuration } from '../configuration';
7
8
  export interface StandardInterfaceOptions {
8
9
  snapshotApi: Snapshot;
9
10
  cameraApi: Camera;
10
11
  cameraPositionApi: CameraPosition;
11
12
  eventBus: UiEventBus;
13
+ configuration: Configuration;
12
14
  onSelect: (name: string, value: string) => void;
13
15
  onSubscribe: (name: string, callback: (v: AttributeValue) => void) => void;
14
16
  onAr?: () => void;
@@ -23,6 +25,8 @@ export declare class StandardInterface {
23
25
  private actionBar;
24
26
  private cameraControls;
25
27
  private attributes;
28
+ private layout;
29
+ private commerce;
26
30
  constructor(options: StandardInterfaceOptions);
27
31
  attach(container: HTMLElement): void;
28
32
  onReady(): void;
@@ -33,6 +37,8 @@ export declare class StandardInterface {
33
37
  applyViewerSettings(settings: ViewerSettings): void;
34
38
  renderAttributeControls(attributes: Attributes, definitions: AttributeDefinition[]): void;
35
39
  get viewerSettings(): ViewerSettings;
40
+ /** Tear down the configurator panel: price + CTA, attribute controls, layout. */
41
+ private teardownConfigurator;
36
42
  destroy(): void;
37
43
  private createSlot;
38
44
  private syncScreenshotButton;
@@ -1 +1 @@
1
- {"version":3,"file":"standard-interface.d.ts","sourceRoot":"","sources":["../../../src/ui/standard-interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAKxF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,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ui/styles.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,MAAM,QA8LlB,CAAC;AAEF,wBAAgB,YAAY,IAAI,IAAI,CAOnC"}