@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.
- package/README.md +35 -3
- package/assembly.d.ts +4771 -0
- package/index.d.ts +2198 -0
- package/package.json +17 -10
- package/libs/packages/player/src/index.d.ts +0 -8
- package/libs/schemas/engine/src/index.d.ts +0 -4
- package/libs/schemas/engine/src/lib/documentation.d.ts +0 -9
- package/libs/schemas/engine/src/lib/engine.d.ts +0 -215
- package/libs/schemas/engine/src/lib/publication.d.ts +0 -82
- package/libs/schemas/engine/src/lib/studio.d.ts +0 -81
- package/libs/schemas/file-types/export-configuration/src/index.d.ts +0 -1
- package/libs/schemas/file-types/export-configuration/src/lib/export-configuration.d.ts +0 -10
- package/libs/schemas/file-types/vas/src/index.d.ts +0 -3
- package/libs/schemas/file-types/vas/src/lib/interaction.d.ts +0 -3
- package/libs/schemas/file-types/vas/src/lib/object-configuration.d.ts +0 -25
- package/libs/schemas/file-types/vas/src/lib/vas.d.ts +0 -612
- package/libs/schemas/library-api/src/index.d.ts +0 -1
- package/libs/schemas/library-api/src/lib/library-api.d.ts +0 -27
- package/libs/schemas/web-component/api/player/ar/src/index.d.ts +0 -1
- package/libs/schemas/web-component/api/player/ar/src/lib/ar.d.ts +0 -22
- package/libs/schemas/web-component/api/player/configuration/src/index.d.ts +0 -1
- package/libs/schemas/web-component/api/player/configuration/src/lib/configuration.d.ts +0 -27
- package/libs/schemas/web-component/api/player/documentation/src/index.d.ts +0 -1
- package/libs/schemas/web-component/api/player/documentation/src/lib/documentation.d.ts +0 -26
- package/libs/schemas/web-component/api/player/events/src/index.d.ts +0 -1
- package/libs/schemas/web-component/api/player/events/src/lib/events.d.ts +0 -19
- package/libs/schemas/web-component/api/player/integration-connector/src/index.d.ts +0 -1
- package/libs/schemas/web-component/api/player/integration-connector/src/lib/integration-connector.d.ts +0 -30
- package/libs/schemas/web-component/api/player/layout/src/index.d.ts +0 -1
- package/libs/schemas/web-component/api/player/layout/src/lib/layout.d.ts +0 -18
- package/libs/schemas/web-component/api/player/player/src/index.d.ts +0 -1
- package/libs/schemas/web-component/api/player/player/src/lib/player.d.ts +0 -46
- package/libs/schemas/web-component/api/player/snapshot/src/index.d.ts +0 -1
- package/libs/schemas/web-component/api/player/snapshot/src/lib/snapshot.d.ts +0 -29
- package/libs/schemas/web-component/api/player/viewer/src/index.d.ts +0 -1
- package/libs/schemas/web-component/api/player/viewer/src/lib/viewer.d.ts +0 -471
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/library-api';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { TExportConfigurationFile } from '@variantic/schemas/file-types/export-configuration';
|
|
2
|
-
export interface ILibraryApi {
|
|
3
|
-
/**
|
|
4
|
-
* Returns the URL for the asset with the given ID for current library version.
|
|
5
|
-
*/
|
|
6
|
-
getAssetUrl(id: string): string;
|
|
7
|
-
/**
|
|
8
|
-
* Returns the thumbnail URL for the asset with the given ID for current library version.
|
|
9
|
-
*/
|
|
10
|
-
getAssetThumbnailUrl(id: string): string;
|
|
11
|
-
/**
|
|
12
|
-
* Retrieves the asset content by ID for current library version, or null if not found.
|
|
13
|
-
*/
|
|
14
|
-
getAssetById(id: string): Promise<Response | null>;
|
|
15
|
-
/**
|
|
16
|
-
* Retrieves the assembly data for current library version.
|
|
17
|
-
*/
|
|
18
|
-
getAssemblyData(): Promise<unknown>;
|
|
19
|
-
/**
|
|
20
|
-
* Retrieves the configuration data for current library version.
|
|
21
|
-
*/
|
|
22
|
-
getConfigurationData(): Promise<unknown>;
|
|
23
|
-
/**
|
|
24
|
-
* Retrieves the export configuration data for current library version.
|
|
25
|
-
*/
|
|
26
|
-
getExportConfiguration(): Promise<TExportConfigurationFile>;
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/ar';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type Emittery from 'emittery';
|
|
2
|
-
import type { TWebComponentEvents } from '@variantic/schemas/web-component-apis/player/events';
|
|
3
|
-
/**
|
|
4
|
-
* @category Addons API
|
|
5
|
-
*/
|
|
6
|
-
export type TARApi = {
|
|
7
|
-
events: Emittery<TARApiEvents>;
|
|
8
|
-
/**
|
|
9
|
-
* Generates and uploads the current project for AR viewing, returning a QR image and URL.
|
|
10
|
-
*/
|
|
11
|
-
generateAndUpload(): Promise<{
|
|
12
|
-
qrImage: string;
|
|
13
|
-
url: string;
|
|
14
|
-
}>;
|
|
15
|
-
/**
|
|
16
|
-
* Generates and returns the project data as a Blob for AR viewing.
|
|
17
|
-
*/
|
|
18
|
-
generate(): Promise<Blob>;
|
|
19
|
-
};
|
|
20
|
-
export type TARApiEvents = TWebComponentEvents<{
|
|
21
|
-
generated: Blob;
|
|
22
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/configuration';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type Emittery from 'emittery';
|
|
2
|
-
import type { TWebComponentEvents } from '@variantic/schemas/web-component-apis/player/events';
|
|
3
|
-
/**
|
|
4
|
-
* @category Addons API
|
|
5
|
-
*/
|
|
6
|
-
export type TConfigurationApi = {
|
|
7
|
-
events: Emittery<TConfigurationApiEvents>;
|
|
8
|
-
/**
|
|
9
|
-
* Generates and returns the current configuration content
|
|
10
|
-
*/
|
|
11
|
-
generate(): TConfigurationContent;
|
|
12
|
-
/**
|
|
13
|
-
* Generates and uploads the current configuration, returning a URL for later use.
|
|
14
|
-
*/
|
|
15
|
-
generateAndUpload(): Promise<TConfigurationUrl>;
|
|
16
|
-
};
|
|
17
|
-
export type TConfigurationApiEvents = TWebComponentEvents<{
|
|
18
|
-
generated: TConfigurationContent;
|
|
19
|
-
uploaded: TConfigurationUrl;
|
|
20
|
-
}>;
|
|
21
|
-
export type TConfigurationUrl = {
|
|
22
|
-
id: string;
|
|
23
|
-
url: string;
|
|
24
|
-
dataUrl: string;
|
|
25
|
-
configuration: TConfigurationContent;
|
|
26
|
-
};
|
|
27
|
-
export type TConfigurationContent = Record<string, unknown>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/documentation';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type Emittery from 'emittery';
|
|
2
|
-
import type { TWebComponentEvents } from '@variantic/schemas/web-component-apis/player/events';
|
|
3
|
-
export type TPrimitive = bigint | boolean | null | number | string | symbol | undefined;
|
|
4
|
-
/**
|
|
5
|
-
* @category Addons API
|
|
6
|
-
*/
|
|
7
|
-
export type TDocumentationApi = {
|
|
8
|
-
events: Emittery<TDocumentationApiEvents>;
|
|
9
|
-
/**
|
|
10
|
-
* Checks if documentation generation is available.
|
|
11
|
-
*/
|
|
12
|
-
getDocumentationAvailability(): boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Generates the documentation PDF as a Blob using optional source data.
|
|
15
|
-
*/
|
|
16
|
-
generate(sourceData?: Record<string, TPrimitive>): Promise<Blob>;
|
|
17
|
-
/**
|
|
18
|
-
* Generates and triggers download of the documentation PDF using optional source data.
|
|
19
|
-
*/
|
|
20
|
-
generateAndDownload(sourceData?: Record<string, TPrimitive>): Promise<void>;
|
|
21
|
-
};
|
|
22
|
-
export type TDocumentationApiEvents = TWebComponentEvents<{
|
|
23
|
-
availabilityChanged: boolean;
|
|
24
|
-
generated: Blob;
|
|
25
|
-
downloaded: Blob;
|
|
26
|
-
}>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/events';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type TCommonWebComponentEvents = {
|
|
2
|
-
ready: TTimestampEventPayload;
|
|
3
|
-
scriptsLoaded: TTimestampEventPayload;
|
|
4
|
-
};
|
|
5
|
-
export type TWebComponentEvents<T extends Record<string, unknown> = TCommonWebComponentEvents> = TCommonWebComponentEvents & T;
|
|
6
|
-
export type TTimestampEventPayload = {
|
|
7
|
-
timestamp: number;
|
|
8
|
-
};
|
|
9
|
-
export type TMouseClickedPayload = {
|
|
10
|
-
position: T2DPosition;
|
|
11
|
-
mouseButton: number;
|
|
12
|
-
};
|
|
13
|
-
export type TMouseMovedPayload = {
|
|
14
|
-
position: T2DPosition;
|
|
15
|
-
};
|
|
16
|
-
export type T2DPosition = {
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/integration-connector';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type Emittery from 'emittery';
|
|
2
|
-
import type { TWebComponentEvents } from '@variantic/schemas/web-component-apis/player/events';
|
|
3
|
-
/**
|
|
4
|
-
* @category Addons API
|
|
5
|
-
*/
|
|
6
|
-
export type TIntegrationConnectorApi = {
|
|
7
|
-
events: Emittery<TIntegrationConnectorApiEvents>;
|
|
8
|
-
/**
|
|
9
|
-
* Executes a flow immediately with the given parameters and returns the response.
|
|
10
|
-
*/
|
|
11
|
-
execute: (params: TExecuteParams) => Promise<TExecutionResponse>;
|
|
12
|
-
/**
|
|
13
|
-
* Hooks specified flows by their IDs to the current project.
|
|
14
|
-
*/
|
|
15
|
-
hookFlowsByIds: (ids: string[]) => Promise<void>;
|
|
16
|
-
};
|
|
17
|
-
export type TIntegrationConnectorApiEvents = TWebComponentEvents<{
|
|
18
|
-
executed: TExecutionResponse & {
|
|
19
|
-
id: string;
|
|
20
|
-
name: string;
|
|
21
|
-
};
|
|
22
|
-
}>;
|
|
23
|
-
export type TExecuteParams = {
|
|
24
|
-
id: string;
|
|
25
|
-
inputData?: unknown;
|
|
26
|
-
};
|
|
27
|
-
export type TExecutionResponse = {
|
|
28
|
-
isSuccess: boolean;
|
|
29
|
-
data: unknown;
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/layout';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type Emittery from 'emittery';
|
|
2
|
-
import type { TWebComponentEvents } from '@variantic/schemas/web-component-apis/player/events';
|
|
3
|
-
import type { TLayoutSettings } from '@variantic/schemas/web-component-apis/player/viewer';
|
|
4
|
-
/**
|
|
5
|
-
* @category Addons API
|
|
6
|
-
*/
|
|
7
|
-
export type TLayoutApi = {
|
|
8
|
-
events: Emittery<TLayoutApiEvents>;
|
|
9
|
-
/**
|
|
10
|
-
* Enables or disables fullscreen mode based on the given state.
|
|
11
|
-
*/
|
|
12
|
-
toggleFullscreen: (state: boolean) => void;
|
|
13
|
-
/**
|
|
14
|
-
* Applies a subset of layout settings without remounting the addon.
|
|
15
|
-
*/
|
|
16
|
-
applyLayoutSettings: (settingsPatch: Partial<TLayoutSettings>) => void;
|
|
17
|
-
};
|
|
18
|
-
export type TLayoutApiEvents = TWebComponentEvents;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/player';
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type Emittery from 'emittery';
|
|
2
|
-
import type { TViewerApi } from '@variantic/schemas/web-component-apis/player/viewer';
|
|
3
|
-
import type { TARApi } from '@variantic/schemas/web-component-apis/player/ar';
|
|
4
|
-
import type { TConfigurationApi } from '@variantic/schemas/web-component-apis/player/configuration';
|
|
5
|
-
import type { TDocumentationApi } from '@variantic/schemas/web-component-apis/player/documentation';
|
|
6
|
-
import type { TIntegrationConnectorApi } from '@variantic/schemas/web-component-apis/player/integrationConnector';
|
|
7
|
-
import type { TLayoutApi } from '@variantic/schemas/web-component-apis/player/layout';
|
|
8
|
-
import type { TSnapshotApi } from '@variantic/schemas/web-component-apis/player/snapshot';
|
|
9
|
-
import type { TWebComponentEvents } from '@variantic/schemas/web-component-apis/player/events';
|
|
10
|
-
import type { ILibraryApi } from '@variantic/schemas/library-api';
|
|
11
|
-
/**
|
|
12
|
-
* @category Addons API
|
|
13
|
-
*/
|
|
14
|
-
export type TPlayerApi = {
|
|
15
|
-
events: Emittery<TPlayerApiEvents>;
|
|
16
|
-
viewer: TViewerApi;
|
|
17
|
-
/**
|
|
18
|
-
* Returns the current site identifier as a string.
|
|
19
|
-
*/
|
|
20
|
-
getSiteId: () => string;
|
|
21
|
-
isDevelopmentMode: () => boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Returns the current library version as a string.
|
|
24
|
-
*/
|
|
25
|
-
getLibraryVersion: () => string;
|
|
26
|
-
/**
|
|
27
|
-
* Returns the current configuration ID, or null if none is set.
|
|
28
|
-
*/
|
|
29
|
-
getCurrentConfigurationId: () => string | null;
|
|
30
|
-
/**
|
|
31
|
-
* Asynchronously loads a configuration by ID; returns success status and optional error code.
|
|
32
|
-
*/
|
|
33
|
-
loadConfiguration: (id: string | null) => Promise<{
|
|
34
|
-
result: boolean;
|
|
35
|
-
error?: 'INVALID_CONFIGURATION_ID_OR_URL' | 'INVALID_CONFIGURATION' | 'COMPONENT_ID_MISMATCH' | 'LIBRARY_VERSION_MISMATCH';
|
|
36
|
-
}>;
|
|
37
|
-
libraryApi: ILibraryApi;
|
|
38
|
-
} & Partial<{
|
|
39
|
-
ar: TARApi;
|
|
40
|
-
configuration: TConfigurationApi;
|
|
41
|
-
documentation: TDocumentationApi;
|
|
42
|
-
ic: TIntegrationConnectorApi;
|
|
43
|
-
layout: TLayoutApi;
|
|
44
|
-
snapshot: TSnapshotApi;
|
|
45
|
-
}>;
|
|
46
|
-
export type TPlayerApiEvents = TWebComponentEvents;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/snapshot';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type Emittery from 'emittery';
|
|
2
|
-
import type { TWebComponentEvents } from '@variantic/schemas/web-component-apis/player/events';
|
|
3
|
-
/**
|
|
4
|
-
* @category Addons API
|
|
5
|
-
*/
|
|
6
|
-
export type TSnapshotApi = {
|
|
7
|
-
events: Emittery<TSnapshotApiEvents>;
|
|
8
|
-
/**
|
|
9
|
-
* Generates a snapshot of current view and returns it as a Blob.
|
|
10
|
-
*/
|
|
11
|
-
generate(): Promise<Blob>;
|
|
12
|
-
/**
|
|
13
|
-
* Generates and triggers download of a snapshot of current view.
|
|
14
|
-
*/
|
|
15
|
-
generateAndDownload(): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Generates and uploads a snapshot of current view, returning its URL.
|
|
18
|
-
*/
|
|
19
|
-
generateAndUpload(): Promise<TSnapshotUrl>;
|
|
20
|
-
};
|
|
21
|
-
export type TSnapshotApiEvents = TWebComponentEvents<{
|
|
22
|
-
generated: Blob;
|
|
23
|
-
downloaded: Blob;
|
|
24
|
-
uploaded: TSnapshotUrl;
|
|
25
|
-
}>;
|
|
26
|
-
export type TSnapshotUrl = {
|
|
27
|
-
url: string;
|
|
28
|
-
snapshotBlob: Blob;
|
|
29
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/viewer';
|