fansunited-management-components 1.50.5 → 1.50.6
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/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { ComponentsMap } from '../constants/components';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Hook to access the registry of public components provided by ComponentProvider.
|
|
3
5
|
*
|
|
4
|
-
*
|
|
6
|
+
* Returns a strongly-typed ComponentsMap so each component retains its own props and JSDoc in consumers.
|
|
7
|
+
*
|
|
5
8
|
* @throws {Error} If used outside of a ComponentProvider.
|
|
6
9
|
*/
|
|
7
|
-
export declare const useComponentContext: () =>
|
|
10
|
+
export declare const useComponentContext: () => ComponentsMap;
|
package/src/index.d.ts
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { default as React, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Provides a registry of public Fans United components by name.
|
|
5
|
-
* Use `useComponentContext()` to resolve components dynamically.
|
|
6
|
-
*
|
|
7
|
-
* @property {object} [config] - Reserved for future component registry configuration.
|
|
8
|
-
*/
|
|
9
|
-
type ComponentProviderProps = {
|
|
10
|
-
config?: any;
|
|
11
|
-
children?: ReactNode;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* React context mapping component names to their React function components.
|
|
15
|
-
*/
|
|
16
|
-
declare const ComponentContext: React.Context<Record<string, React.FunctionComponent<any>> | null>;
|
|
17
|
-
/**
|
|
18
|
-
* Provider that exposes the components registry to descendants.
|
|
19
|
-
*
|
|
20
|
-
* @param {{ config?: any; children?: React.ReactNode }} props
|
|
21
|
-
* @returns {JSX.Element}
|
|
22
|
-
*/
|
|
23
|
-
declare const ComponentProvider: React.FC<ComponentProviderProps & PropsWithChildren>;
|
|
24
|
-
export { ComponentContext, ComponentProvider };
|