indicator-ui 1.1.113 → 1.1.115

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.
@@ -29,3 +29,4 @@ export * from './elementsRefsAdapteers';
29
29
  export * from './feed';
30
30
  export * from './elementsCommunication';
31
31
  export * from './floatingUIUtils';
32
+ export * from './slotPattern';
@@ -0,0 +1,2 @@
1
+ export * from './useSlot';
2
+ export * from './useSlotsManager';
@@ -0,0 +1,5 @@
1
+ import { SlotsPattern } from '../types';
2
+ import { useSlotsManager } from './useSlotsManager';
3
+ type SlotsManagerReturn<Config extends SlotsPattern.BaseConfig> = ReturnType<typeof useSlotsManager<Config>>;
4
+ export declare function useSlot<Config extends SlotsPattern.BaseConfig>(context: SlotsManagerReturn<Config>['context'], slot: keyof Config): SlotsPattern.Content;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { SlotsPattern } from '../types';
3
+ export declare function useSlotsManager<Config extends SlotsPattern.BaseConfig>(config: Config, children: React.ReactNode): {
4
+ context: SlotsPattern.ResolvedSlots<Config>;
5
+ };
@@ -0,0 +1,2 @@
1
+ export * from './types';
2
+ export * from './hooks';
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export declare namespace SlotsPattern {
3
+ type BaseConfig = Record<string, React.ComponentType<any>>;
4
+ type Content = {
5
+ first: React.ReactElement | undefined;
6
+ all: React.ReactElement[];
7
+ };
8
+ type ResolvedSlots<T extends BaseConfig> = {
9
+ [K in keyof T]?: Content;
10
+ };
11
+ }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "react-components",
12
12
  "ui-kit"
13
13
  ],
14
- "version": "1.1.113",
14
+ "version": "1.1.115",
15
15
  "exports": {
16
16
  ".": {
17
17
  "types": "./dist/types/index.d.ts",