indicator-ui 1.1.67 → 1.1.69

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.
@@ -41,4 +41,5 @@ export type InstanceRefAttributes<T> = {
41
41
  };
42
42
  export type ComponentInstanceRef<T extends ElementType> = React.ComponentProps<T> extends InstanceRefAttributes<infer Method> ? Method : never;
43
43
  export type AcceptsComponentProps<T extends ElementType, P extends ComponentAttributes> = React.ComponentPropsWithoutRef<T> extends P ? T : never;
44
+ export type InferRefObjectElement<T> = T extends React.RefObject<infer K | null> ? K : never;
44
45
  export {};
@@ -1,14 +1,13 @@
1
1
  import { default as React } from 'react';
2
- import { ComponentPropsWithoutInstanceRef } from '../../../types';
3
2
  import { CloseButton } from '../ui/controlBar';
4
3
  import { Wrapper } from '../ui/components';
5
4
  import { useRefInterface } from './useRefInterface';
6
- type PropsType = ComponentPropsWithoutInstanceRef<typeof Wrapper> & Pick<Parameters<typeof useRefInterface>[number], 'instanceRef'> & {
5
+ type PropsType = React.ComponentProps<typeof Wrapper> & Pick<Parameters<typeof useRefInterface>[number], 'servicesRef'> & {
7
6
  onClose?: React.ComponentProps<typeof CloseButton>['onClose'];
8
7
  };
9
8
  export declare function useMediaViewerV2(props: PropsType): {
10
9
  contentFeedRef: React.RefObject<HTMLDivElement | null>;
11
- wrapperRef: React.RefObject<HTMLDivElement | null>;
10
+ instanceRef: React.Ref<HTMLDivElement> | undefined;
12
11
  wrapperProps: {
13
12
  slot?: string | undefined | undefined;
14
13
  style?: React.CSSProperties | undefined;
@@ -1,13 +1,11 @@
1
- import { ComponentInstanceRef, InstanceRefAttributes } from '../../../types';
2
- import { Wrapper } from '../ui/components';
1
+ import { default as React } from 'react';
3
2
  import { useFeedScroll } from './useFeedScroll';
4
3
  type RefType = {
5
- element: ComponentInstanceRef<typeof Wrapper>;
6
4
  goTo: (index: number, behavior?: ScrollBehavior) => void;
7
5
  goToElement: (instance: Element, behavior?: ScrollBehavior) => void;
8
6
  };
9
- type PropsType = InstanceRefAttributes<RefType> & Pick<ReturnType<typeof useFeedScroll>, 'scrollTo' | 'contentFeedRef'>;
10
- export declare function useRefInterface(props: PropsType): {
11
- wrapperRef: import('react').RefObject<HTMLDivElement | null>;
7
+ type PropsType = Pick<ReturnType<typeof useFeedScroll>, 'scrollTo' | 'contentFeedRef'> & {
8
+ servicesRef?: React.Ref<RefType>;
12
9
  };
10
+ export declare function useRefInterface(props: PropsType): void;
13
11
  export {};
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "react-components",
12
12
  "ui-kit"
13
13
  ],
14
- "version": "1.1.67",
14
+ "version": "1.1.69",
15
15
  "exports": {
16
16
  ".": {
17
17
  "types": "./dist/types/index.d.ts",