@variantic/player 0.0.24 → 0.0.26

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 (36) hide show
  1. package/README.md +35 -3
  2. package/assembly.d.ts +4771 -0
  3. package/index.d.ts +2198 -0
  4. package/package.json +17 -10
  5. package/libs/packages/player/src/index.d.ts +0 -8
  6. package/libs/schemas/engine/src/index.d.ts +0 -4
  7. package/libs/schemas/engine/src/lib/documentation.d.ts +0 -9
  8. package/libs/schemas/engine/src/lib/engine.d.ts +0 -215
  9. package/libs/schemas/engine/src/lib/publication.d.ts +0 -82
  10. package/libs/schemas/engine/src/lib/studio.d.ts +0 -81
  11. package/libs/schemas/file-types/export-configuration/src/index.d.ts +0 -1
  12. package/libs/schemas/file-types/export-configuration/src/lib/export-configuration.d.ts +0 -10
  13. package/libs/schemas/file-types/vas/src/index.d.ts +0 -3
  14. package/libs/schemas/file-types/vas/src/lib/interaction.d.ts +0 -3
  15. package/libs/schemas/file-types/vas/src/lib/object-configuration.d.ts +0 -25
  16. package/libs/schemas/file-types/vas/src/lib/vas.d.ts +0 -612
  17. package/libs/schemas/library-api/src/index.d.ts +0 -1
  18. package/libs/schemas/library-api/src/lib/library-api.d.ts +0 -27
  19. package/libs/schemas/web-component/api/player/ar/src/index.d.ts +0 -1
  20. package/libs/schemas/web-component/api/player/ar/src/lib/ar.d.ts +0 -22
  21. package/libs/schemas/web-component/api/player/configuration/src/index.d.ts +0 -1
  22. package/libs/schemas/web-component/api/player/configuration/src/lib/configuration.d.ts +0 -27
  23. package/libs/schemas/web-component/api/player/documentation/src/index.d.ts +0 -1
  24. package/libs/schemas/web-component/api/player/documentation/src/lib/documentation.d.ts +0 -26
  25. package/libs/schemas/web-component/api/player/events/src/index.d.ts +0 -1
  26. package/libs/schemas/web-component/api/player/events/src/lib/events.d.ts +0 -19
  27. package/libs/schemas/web-component/api/player/integration-connector/src/index.d.ts +0 -1
  28. package/libs/schemas/web-component/api/player/integration-connector/src/lib/integration-connector.d.ts +0 -30
  29. package/libs/schemas/web-component/api/player/layout/src/index.d.ts +0 -1
  30. package/libs/schemas/web-component/api/player/layout/src/lib/layout.d.ts +0 -18
  31. package/libs/schemas/web-component/api/player/player/src/index.d.ts +0 -1
  32. package/libs/schemas/web-component/api/player/player/src/lib/player.d.ts +0 -46
  33. package/libs/schemas/web-component/api/player/snapshot/src/index.d.ts +0 -1
  34. package/libs/schemas/web-component/api/player/snapshot/src/lib/snapshot.d.ts +0 -29
  35. package/libs/schemas/web-component/api/player/viewer/src/index.d.ts +0 -1
  36. package/libs/schemas/web-component/api/player/viewer/src/lib/viewer.d.ts +0 -471
package/README.md CHANGED
@@ -6,10 +6,10 @@ Future versions will introduce functionalities for controlling the embedded play
6
6
 
7
7
  ## 📦 Installation
8
8
 
9
- You can install this package via npm:
9
+ Install this type-only package as a development dependency:
10
10
 
11
11
  ```sh
12
- npm install @variantic/player
12
+ npm install --save-dev @variantic/player
13
13
  ```
14
14
 
15
15
  ## 🚀 Usage
@@ -17,7 +17,7 @@ npm install @variantic/player
17
17
  Import the necessary types into your TypeScript project:
18
18
 
19
19
  ```ts
20
- import { TSnapshotUrl } from '@variantic/player';
20
+ import type { TSnapshotUrl } from '@variantic/player';
21
21
 
22
22
  const snapshotUrl: TSnapshotUrl = {
23
23
  url: 'testUrl',
@@ -25,6 +25,38 @@ const snapshotUrl: TSnapshotUrl = {
25
25
  };
26
26
  ```
27
27
 
28
+ ## Assembly player (player-ng)
29
+
30
+ Use the `/assembly` entrypoint for the assembly player's public API, query store,
31
+ and addon types:
32
+
33
+ ```ts
34
+ import type { TPlayerComponent } from '@variantic/player/assembly';
35
+
36
+ await customElements.whenDefined('variantic-player-ng');
37
+
38
+ const player = document.querySelector('variantic-player-ng') as TPlayerComponent | null;
39
+ if (!player) {
40
+ throw new Error('The player element was not found');
41
+ }
42
+ await player.api.ready();
43
+
44
+ console.log('Current status:', player.api.query.get('status'));
45
+
46
+ const unsubscribe = player.api.query.subscribe('status', (status) => {
47
+ console.log('Player status:', status);
48
+ });
49
+
50
+ // Call this when your integration is disposed.
51
+ function destroyPlayerIntegration() {
52
+ unsubscribe();
53
+ }
54
+ ```
55
+
56
+ Run this setup after embedding `<variantic-player-ng>` and loading its script.
57
+ `api.ready()` waits for addon APIs, the initial scene, and query state, including
58
+ when the player has already finished initializing.
59
+
28
60
  ## 📜 License
29
61
 
30
62
  This package is licensed under the MIT License. See [LICENSE](./LICENSE) for details.