@r2u/javascript-ar-sdk 6.8.23 → 6.9.2

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.
@@ -1,7 +1,10 @@
1
1
  import React, { MouseEvent } from 'react';
2
- import type { ModelViewerProps } from '@r2u/react-ar-components';
3
2
  import Viewer from '@r2u/sdk/dist/viewer';
4
- interface Props extends ModelViewerProps {
3
+ import { ViewerRef, ViewerProps } from '../../methods/types';
4
+ interface Props extends ViewerProps {
5
+ alt?: string;
6
+ autoRotate?: boolean;
7
+ poster?: string;
5
8
  exitImgSrc?: string;
6
9
  expandImgSrc?: string;
7
10
  popup?: boolean;
@@ -10,6 +13,7 @@ interface Props extends ModelViewerProps {
10
13
  waterMarkPosition?: string;
11
14
  refViewer: React.RefObject<HTMLDivElement>;
12
15
  refViewerPopup: React.RefObject<HTMLDivElement>;
16
+ refViewerFunctions: React.RefObject<ViewerRef>;
13
17
  ModelViewerElement: typeof Viewer;
14
18
  onClick?: (e: MouseEvent<HTMLElement>) => void;
15
19
  }
package/dist/index.d.ts CHANGED
@@ -8,7 +8,7 @@ import analytics from './methods/analytics';
8
8
  import customizer from './methods/customizer';
9
9
  import qrCode from './methods/qrCode';
10
10
  import config from './methods/config';
11
- import { SKUHandler } from './methods/types';
11
+ import { SKUHandler, ViewerRef } from './methods/types';
12
12
  import { Product } from '@services/product';
13
13
  export default interface R2U {
14
14
  init: (params: {
@@ -57,7 +57,7 @@ export default interface R2U {
57
57
  progressBarPosition?: 'top' | 'middle' | 'bottom';
58
58
  poster?: string;
59
59
  autoRotate?: boolean;
60
- }) => Promise<SKUHandler>;
60
+ }) => Promise<SKUHandler & ViewerRef>;
61
61
  };
62
62
  analytics: {
63
63
  send: (params: {