@r2u/javascript-ar-sdk 6.6.5-rc → 6.7.1-rc
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 +2 -63
- package/dist/index.d.ts +3 -0
- package/dist/index.js +57 -48
- package/dist/methods/ar.d.ts +4 -1
- package/dist/methods/types.d.ts +2 -0
- package/dist/services/analytics.d.ts +6 -2
- package/package.json +4 -4
package/dist/methods/ar.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CallToAction } from '@r2u/react-ar-components';
|
|
1
2
|
import type { SKUHandler } from './types';
|
|
2
3
|
interface OpenProps {
|
|
3
4
|
element: HTMLElement;
|
|
@@ -5,7 +6,9 @@ interface OpenProps {
|
|
|
5
6
|
}
|
|
6
7
|
interface AttachProps extends OpenProps {
|
|
7
8
|
sku: string;
|
|
9
|
+
price?: string;
|
|
8
10
|
resize?: boolean;
|
|
11
|
+
callToAction?: CallToAction;
|
|
9
12
|
showFeedback?: boolean;
|
|
10
13
|
showInstructions?: 'once' | 'always' | 'never';
|
|
11
14
|
fallbackOptions?: {
|
|
@@ -14,7 +17,7 @@ interface AttachProps extends OpenProps {
|
|
|
14
17
|
};
|
|
15
18
|
}
|
|
16
19
|
declare function open({ element, event }: OpenProps): Promise<void>;
|
|
17
|
-
declare function attach({ sku, element, event, showInstructions, showFeedback, fallbackOptions, }: AttachProps): Promise<SKUHandler>;
|
|
20
|
+
declare function attach({ sku, price, element, callToAction, event, showInstructions, showFeedback, fallbackOptions, }: AttachProps): Promise<SKUHandler>;
|
|
18
21
|
declare function getLink(sku: string): Promise<string>;
|
|
19
22
|
declare const _default: {
|
|
20
23
|
attach: typeof attach;
|
package/dist/methods/types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ interface GetAnalyticsParams {
|
|
|
7
7
|
info?: DimensionValues;
|
|
8
8
|
}
|
|
9
9
|
declare const arLink: {
|
|
10
|
-
componentDidMount: () => Promise<
|
|
10
|
+
componentDidMount: () => Promise<unknown>;
|
|
11
11
|
onClick: () => Promise<unknown>;
|
|
12
12
|
onFallback: () => Promise<unknown>;
|
|
13
13
|
onLike: () => Promise<unknown>;
|
|
@@ -23,6 +23,10 @@ declare const customizer: {
|
|
|
23
23
|
componentDidMount: () => Promise<unknown>;
|
|
24
24
|
onClick: () => Promise<unknown>;
|
|
25
25
|
onCustomizationChange: () => Promise<unknown>;
|
|
26
|
+
onSessionTimeCollect: (time: number) => Promise<unknown>;
|
|
27
|
+
};
|
|
28
|
+
declare const cta: {
|
|
29
|
+
onClick: () => Promise<unknown>;
|
|
26
30
|
};
|
|
27
31
|
declare const setSku: (sku: string) => void;
|
|
28
32
|
declare const setManufacturerId: (manufacturerId: string) => void;
|
|
@@ -31,5 +35,5 @@ declare const setExperimentId: (experimentId: string) => void;
|
|
|
31
35
|
declare const setVariationId: (variationId: string) => void;
|
|
32
36
|
declare const getFingerprint: () => Promise<string>;
|
|
33
37
|
declare const getAnalytics: ({ client, dataLayerIntegration, sessionDurationMinutes, info, }: GetAnalyticsParams) => Promise<Analytics>;
|
|
34
|
-
export { arLink, arModelViewer, customizer, setExperimentId, setVariationId, setSku, setManufacturerId, isActive3D, getFingerprint, };
|
|
38
|
+
export { arLink, arModelViewer, customizer, cta, setExperimentId, setVariationId, setSku, setManufacturerId, isActive3D, getFingerprint, };
|
|
35
39
|
export default getAnalytics;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@r2u/javascript-ar-sdk",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.1-rc",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"unpkg": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"react-dom": "^16.13.1"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@r2u/analytics": "^4.
|
|
28
|
-
"@r2u/customizer": "^1.
|
|
29
|
-
"@r2u/react-ar-components": "^5.
|
|
27
|
+
"@r2u/analytics": "^4.3.0",
|
|
28
|
+
"@r2u/customizer": "^1.4.1",
|
|
29
|
+
"@r2u/react-ar-components": "^5.4.1",
|
|
30
30
|
"i18next": "^20.2.1",
|
|
31
31
|
"i18next-chained-backend": "^2.1.0",
|
|
32
32
|
"i18next-http-backend": "^1.2.1",
|