@variantic/player 0.0.23 → 0.0.25
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 +4762 -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 -3
- package/libs/schemas/engine/src/lib/documentation.d.ts +0 -9
- package/libs/schemas/engine/src/lib/engine.d.ts +0 -206
- package/libs/schemas/engine/src/lib/publication.d.ts +0 -83
- 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 -526
- 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
package/package.json
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@variantic/player",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"tslib": "^2.3.0"
|
|
10
|
-
},
|
|
11
|
-
"devDependencies": {
|
|
12
|
-
"emittery": "^1.0.2"
|
|
13
|
-
},
|
|
14
8
|
"type": "commonjs",
|
|
15
|
-
"typings": "./
|
|
16
|
-
"
|
|
17
|
-
|
|
9
|
+
"typings": "./index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./assembly": {
|
|
15
|
+
"types": "./assembly.d.ts"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"typesVersions": {
|
|
19
|
+
"*": {
|
|
20
|
+
"assembly": [
|
|
21
|
+
"assembly.d.ts"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
18
25
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from '@variantic/schemas/web-component-apis/player/viewer';
|
|
2
|
-
export * from '@variantic/schemas/web-component-apis/player/ar';
|
|
3
|
-
export * from '@variantic/schemas/web-component-apis/player/configuration';
|
|
4
|
-
export * from '@variantic/schemas/web-component-apis/player/documentation';
|
|
5
|
-
export * from '@variantic/schemas/web-component-apis/player/integrationConnector';
|
|
6
|
-
export * from '@variantic/schemas/web-component-apis/player/layout';
|
|
7
|
-
export * from '@variantic/schemas/web-component-apis/player/snapshot';
|
|
8
|
-
export * from '@variantic/schemas/web-component-apis/player';
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import type { TObjectConfiguration, TInteractionMode, TVasFile } from '@variantic/schemas/file-types/vas';
|
|
2
|
-
import type { TPublication } from './publication';
|
|
3
|
-
import type { TDocumentation } from './documentation';
|
|
4
|
-
type TValue = string | number | boolean;
|
|
5
|
-
export { TInteractionMode };
|
|
6
|
-
export type TSettings = TVasFile['set']['configuration']['settings'] & {
|
|
7
|
-
sceneSettings?: TVasFile['set']['configuration']['sceneSettings'] & {
|
|
8
|
-
backgroundColor?: string | null;
|
|
9
|
-
studioId?: number | null;
|
|
10
|
-
envMap?: string | null;
|
|
11
|
-
};
|
|
12
|
-
cameraSettings?: TVasFile['set']['configuration']['cameraSettings'];
|
|
13
|
-
flowsSettings?: TVasFile['set']['configuration']['flowsSettings'];
|
|
14
|
-
};
|
|
15
|
-
export type TRootObjectData = {
|
|
16
|
-
id: string;
|
|
17
|
-
fileId: string;
|
|
18
|
-
transform: number[];
|
|
19
|
-
showInProductsList?: boolean;
|
|
20
|
-
singleObjectSelected?: boolean;
|
|
21
|
-
};
|
|
22
|
-
export type TRootObjectConfiguration = {
|
|
23
|
-
id: string;
|
|
24
|
-
fileId: string;
|
|
25
|
-
name?: string;
|
|
26
|
-
transform: number[];
|
|
27
|
-
interaction?: TInteractionMode;
|
|
28
|
-
configuration?: Record<string, TObjectConfiguration>;
|
|
29
|
-
};
|
|
30
|
-
export type TRootData = Partial<{
|
|
31
|
-
publication: TPublication;
|
|
32
|
-
documentation: TDocumentation;
|
|
33
|
-
}>;
|
|
34
|
-
export type TRenderDataObjectTag = `subcomponent:${string}`;
|
|
35
|
-
export type TAnimationRenderData = {
|
|
36
|
-
key: string;
|
|
37
|
-
clips: {
|
|
38
|
-
name: string;
|
|
39
|
-
duration: number;
|
|
40
|
-
channels: {
|
|
41
|
-
target: {
|
|
42
|
-
path: 'translation' | 'rotation';
|
|
43
|
-
};
|
|
44
|
-
sampler: {
|
|
45
|
-
start: 'current';
|
|
46
|
-
times: number[];
|
|
47
|
-
easings: string[];
|
|
48
|
-
values: TValue[][];
|
|
49
|
-
};
|
|
50
|
-
}[];
|
|
51
|
-
}[];
|
|
52
|
-
};
|
|
53
|
-
export type TRenderDataObject = Partial<{
|
|
54
|
-
controlledVisibility: boolean;
|
|
55
|
-
inAvailableSpace: boolean;
|
|
56
|
-
count: number;
|
|
57
|
-
positioning: number[];
|
|
58
|
-
transform: number[];
|
|
59
|
-
propagation: number[];
|
|
60
|
-
geometry: [string, Record<string, TValue>];
|
|
61
|
-
dimensionGeometry: [string, Record<string, TValue>];
|
|
62
|
-
importedGeometry: [string, Record<string, TValue>];
|
|
63
|
-
isGroup: boolean;
|
|
64
|
-
isImport: boolean;
|
|
65
|
-
interaction: TInteractionMode;
|
|
66
|
-
movementPlane: number[];
|
|
67
|
-
keyPoint: {
|
|
68
|
-
tags: string[];
|
|
69
|
-
snappedGridPlaneId?: string;
|
|
70
|
-
};
|
|
71
|
-
gridPlane: {
|
|
72
|
-
mode: 'static' | 'sticky';
|
|
73
|
-
priority: TValue;
|
|
74
|
-
tags: string[];
|
|
75
|
-
snaps: TSnap[];
|
|
76
|
-
};
|
|
77
|
-
boxCollider: {
|
|
78
|
-
tags: string[];
|
|
79
|
-
collision: boolean;
|
|
80
|
-
interact: boolean;
|
|
81
|
-
occluder: boolean;
|
|
82
|
-
rangefinder: boolean;
|
|
83
|
-
};
|
|
84
|
-
rangefinder: {
|
|
85
|
-
tags: string[];
|
|
86
|
-
axis: Array<'x' | 'y' | 'z'>;
|
|
87
|
-
near: number;
|
|
88
|
-
far: number;
|
|
89
|
-
};
|
|
90
|
-
dynamicConfiguration: Record<string, number>;
|
|
91
|
-
layers: number[];
|
|
92
|
-
dimensioning: Record<string, never>;
|
|
93
|
-
material: Record<string, {
|
|
94
|
-
blobUrl: string;
|
|
95
|
-
overrides?: Record<string, unknown>;
|
|
96
|
-
}>;
|
|
97
|
-
modifier: 'subtract' | 'intersect';
|
|
98
|
-
textureFit: {
|
|
99
|
-
offset: {
|
|
100
|
-
x: number | 'random';
|
|
101
|
-
y: number | 'random';
|
|
102
|
-
};
|
|
103
|
-
rotation: number | 'random';
|
|
104
|
-
scale: number;
|
|
105
|
-
flip: {
|
|
106
|
-
x: boolean;
|
|
107
|
-
y: boolean;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
rendering: {
|
|
111
|
-
shadow: [boolean, boolean];
|
|
112
|
-
order: number;
|
|
113
|
-
};
|
|
114
|
-
animation: TAnimationRenderData;
|
|
115
|
-
tags: TRenderDataObjectTag[];
|
|
116
|
-
}>;
|
|
117
|
-
type TUniqueRenderDataObject = {
|
|
118
|
-
id: string;
|
|
119
|
-
ref: string;
|
|
120
|
-
} & TRenderDataObject;
|
|
121
|
-
export type TRenderData = {
|
|
122
|
-
entryObjects: number[];
|
|
123
|
-
tree: Record<string, number[]>;
|
|
124
|
-
objects: TUniqueRenderDataObject[];
|
|
125
|
-
activeDrag?: number;
|
|
126
|
-
};
|
|
127
|
-
export type TPricingSection = {
|
|
128
|
-
name: string;
|
|
129
|
-
table: string[][];
|
|
130
|
-
price: number;
|
|
131
|
-
priceColumnIndex: number;
|
|
132
|
-
};
|
|
133
|
-
export type TPricingData = {
|
|
134
|
-
sections: TPricingSection[];
|
|
135
|
-
finalPrice: number;
|
|
136
|
-
};
|
|
137
|
-
export type TTreeObjectOverrides = Partial<{
|
|
138
|
-
transform: number[];
|
|
139
|
-
movementPlane: number[];
|
|
140
|
-
interaction: TInteractionMode;
|
|
141
|
-
}>;
|
|
142
|
-
export type TSnapType = 'point' | 'grid';
|
|
143
|
-
type TSnapTypeMaker<T extends TSnapType, U extends Record<string, unknown>> = {
|
|
144
|
-
id: string;
|
|
145
|
-
type: T;
|
|
146
|
-
data: U;
|
|
147
|
-
snappedKeyPointIds: string[];
|
|
148
|
-
};
|
|
149
|
-
type TSnapPoint = TSnapTypeMaker<'point', {
|
|
150
|
-
x: TValue;
|
|
151
|
-
y: TValue;
|
|
152
|
-
}>;
|
|
153
|
-
type TSnapGrid = TSnapTypeMaker<'grid', {
|
|
154
|
-
cols: TValue;
|
|
155
|
-
rows: TValue;
|
|
156
|
-
}>;
|
|
157
|
-
export type TSnap = TSnapPoint | TSnapGrid;
|
|
158
|
-
/**
|
|
159
|
-
* Snaps because of different types
|
|
160
|
-
* have to be identified in different ways based
|
|
161
|
-
* on the type which snap point belongs to
|
|
162
|
-
*
|
|
163
|
-
* Example
|
|
164
|
-
* { type: 'grid', snapId: 0, data: { row: 0, col: 1 } } }
|
|
165
|
-
*
|
|
166
|
-
* Which means that we are referring to the grid (snaps array index 0) snap point
|
|
167
|
-
* on row 0 and column 1
|
|
168
|
-
*/
|
|
169
|
-
type TSnapIdentifierMaker<T extends TSnapType, U extends Record<string, unknown>> = {
|
|
170
|
-
id: string;
|
|
171
|
-
type: T;
|
|
172
|
-
data: U;
|
|
173
|
-
};
|
|
174
|
-
type TSnapPointIdentifier = TSnapIdentifierMaker<'point', {
|
|
175
|
-
x: number;
|
|
176
|
-
y: number;
|
|
177
|
-
}>;
|
|
178
|
-
type TSnapGridIdentifier = TSnapIdentifierMaker<'grid', {
|
|
179
|
-
col: number;
|
|
180
|
-
row: number;
|
|
181
|
-
}>;
|
|
182
|
-
export type TSnapIdentifier = TSnapPointIdentifier | TSnapGridIdentifier;
|
|
183
|
-
type TCommonMaterialGroupProperties = {
|
|
184
|
-
hash: string;
|
|
185
|
-
selected: string;
|
|
186
|
-
alias: string;
|
|
187
|
-
};
|
|
188
|
-
export type TMaterialGroup = ({
|
|
189
|
-
type: 'list';
|
|
190
|
-
materials: string[];
|
|
191
|
-
} | {
|
|
192
|
-
type: 'query';
|
|
193
|
-
query: Record<string, any>;
|
|
194
|
-
}) & TCommonMaterialGroupProperties;
|
|
195
|
-
type TCommonSubcomponentGroupProperties = {
|
|
196
|
-
hash: string;
|
|
197
|
-
selected: string;
|
|
198
|
-
alias: string;
|
|
199
|
-
};
|
|
200
|
-
export type TSubcomponentGroup = ({
|
|
201
|
-
type: 'list';
|
|
202
|
-
assets: string[];
|
|
203
|
-
} | {
|
|
204
|
-
type: 'query';
|
|
205
|
-
query: Record<string, any>;
|
|
206
|
-
}) & TCommonSubcomponentGroupProperties;
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
export type TPublication = {
|
|
2
|
-
containers: TPublicationContainer[];
|
|
3
|
-
};
|
|
4
|
-
export type TPublicationContainer = {
|
|
5
|
-
id: string;
|
|
6
|
-
panels: TPublicationPanel[];
|
|
7
|
-
};
|
|
8
|
-
export type TPublicationPanel = {
|
|
9
|
-
id: string;
|
|
10
|
-
label: string;
|
|
11
|
-
events: TEvents;
|
|
12
|
-
blocks: TPublicationBlock[];
|
|
13
|
-
};
|
|
14
|
-
export type TPublicationBlock = {
|
|
15
|
-
id: string;
|
|
16
|
-
label: string;
|
|
17
|
-
events: TEvents;
|
|
18
|
-
kind: TBlockNumberRange | TBlockNumberPredefined | TBlockText | TBlockTextInput | TBlockBoolean | TBlockList;
|
|
19
|
-
};
|
|
20
|
-
export type TBlockNumberRange = {
|
|
21
|
-
type: 'number-range';
|
|
22
|
-
value: number;
|
|
23
|
-
range: {
|
|
24
|
-
min: number;
|
|
25
|
-
max: number;
|
|
26
|
-
};
|
|
27
|
-
preferred: number[];
|
|
28
|
-
};
|
|
29
|
-
export type TBlockNumberPredefined = {
|
|
30
|
-
type: 'number-predefined';
|
|
31
|
-
value: number;
|
|
32
|
-
options: number[];
|
|
33
|
-
preferred: number[];
|
|
34
|
-
};
|
|
35
|
-
export type TBlockText = {
|
|
36
|
-
type: 'text';
|
|
37
|
-
value: string;
|
|
38
|
-
};
|
|
39
|
-
export type TBlockTextInput = {
|
|
40
|
-
type: 'text-input';
|
|
41
|
-
value: string;
|
|
42
|
-
maxLength: number;
|
|
43
|
-
placeholder: string;
|
|
44
|
-
};
|
|
45
|
-
export type TBlockBoolean = {
|
|
46
|
-
type: 'boolean';
|
|
47
|
-
value: boolean;
|
|
48
|
-
};
|
|
49
|
-
export type TBlockList = {
|
|
50
|
-
type: 'list';
|
|
51
|
-
style: TBlockListDropdownStyle | TBlockListButtonsStyle | TBlockListDropdownImageStyle | TBlockListButtonsImageStyle;
|
|
52
|
-
selected: string;
|
|
53
|
-
options: Array<{
|
|
54
|
-
value: string;
|
|
55
|
-
label: string;
|
|
56
|
-
imageId?: string;
|
|
57
|
-
}>;
|
|
58
|
-
};
|
|
59
|
-
export type TBlockListDropdownStyle = {
|
|
60
|
-
type: 'dropdown';
|
|
61
|
-
};
|
|
62
|
-
export type TBlockListButtonsStyle = {
|
|
63
|
-
type: 'buttons';
|
|
64
|
-
align: 'content' | 'responsive';
|
|
65
|
-
};
|
|
66
|
-
export type TBlockListDropdownImageStyle = {
|
|
67
|
-
type: 'dropdownImage';
|
|
68
|
-
size: 'sm' | 'md' | 'lg';
|
|
69
|
-
};
|
|
70
|
-
export type TBlockListButtonsImageStyle = {
|
|
71
|
-
type: 'buttonsImage';
|
|
72
|
-
size: 'sm' | 'md' | 'lg';
|
|
73
|
-
shape: 'square' | 'portrait' | 'landscape';
|
|
74
|
-
};
|
|
75
|
-
export type TEvents = {
|
|
76
|
-
hover?: Array<{
|
|
77
|
-
type: 'layer';
|
|
78
|
-
layers: number[];
|
|
79
|
-
} | {
|
|
80
|
-
type: 'dimension';
|
|
81
|
-
ids: string[];
|
|
82
|
-
}>;
|
|
83
|
-
} | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './lib/export-configuration';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Static } from '@sinclair/typebox';
|
|
2
|
-
export declare const exportConfigurationSchema: import("@sinclair/typebox").TObject<{
|
|
3
|
-
exports: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
4
|
-
name: import("@sinclair/typebox").TString;
|
|
5
|
-
bomTemplateId: import("@sinclair/typebox").TNumber;
|
|
6
|
-
bomFilterId: import("@sinclair/typebox").TNumber;
|
|
7
|
-
}>>;
|
|
8
|
-
v: import("@sinclair/typebox").TLiteral<1>;
|
|
9
|
-
}>;
|
|
10
|
-
export type TExportConfigurationFile = Static<typeof exportConfigurationSchema>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type Static } from '@sinclair/typebox';
|
|
2
|
-
export declare const interactionModeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"none">, import("@sinclair/typebox").TLiteral<"select-only">, import("@sinclair/typebox").TLiteral<"select-and-drag">]>;
|
|
3
|
-
export type TInteractionMode = Static<typeof interactionModeSchema>;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type Static } from '@sinclair/typebox';
|
|
2
|
-
export declare const objectConfigurationSchema: import("@sinclair/typebox").TObject<{
|
|
3
|
-
transform: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>>;
|
|
4
|
-
publication: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
5
|
-
blocks: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TAny>;
|
|
6
|
-
}>>;
|
|
7
|
-
materials: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
8
|
-
selected: import("@sinclair/typebox").TString;
|
|
9
|
-
}>>>;
|
|
10
|
-
subcomponent: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
11
|
-
selected: import("@sinclair/typebox").TString;
|
|
12
|
-
}>>>;
|
|
13
|
-
interaction: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"none">, import("@sinclair/typebox").TLiteral<"select-only">, import("@sinclair/typebox").TLiteral<"select-and-drag">]>>;
|
|
14
|
-
draggable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
15
|
-
movementPlane: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>>;
|
|
16
|
-
gridPlane: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
17
|
-
snaps: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
|
|
18
|
-
snappedObjects: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
19
|
-
}>>;
|
|
20
|
-
}>>;
|
|
21
|
-
keyPoint: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
22
|
-
snappedObject: import("@sinclair/typebox").TString;
|
|
23
|
-
}>>;
|
|
24
|
-
}>;
|
|
25
|
-
export type TObjectConfiguration = Static<typeof objectConfigurationSchema>;
|