fansunited-management-components 1.50.5 → 1.50.7
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/index.es.js +0 -1
- package/index.umd.js +178 -178
- package/package.json +1 -1
- package/src/hooks/useComponentContext.d.ts +7 -1
- package/src/index.d.ts +0 -12
- package/src/constants/components.d.ts +0 -2
- package/src/context/ComponentContext.d.ts +0 -24
package/package.json
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hook to access the registry of public components provided by ComponentProvider.
|
|
3
|
+
* Preserves individual component types and JSDoc documentation.
|
|
3
4
|
*
|
|
4
|
-
* @returns {
|
|
5
|
+
* @returns {ComponentsMap} Registry of components with preserved types and JSDoc
|
|
5
6
|
* @throws {Error} If used outside of a ComponentProvider.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const { Spinner, Login } = useComponentContext();
|
|
11
|
+
* ```
|
|
6
12
|
*/
|
|
7
13
|
export declare const useComponentContext: () => import('../constants/components').ComponentsMap;
|
package/src/index.d.ts
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Centered loading spinner that fills its container.
|
|
3
|
-
*
|
|
4
|
-
* Recommended import:
|
|
5
|
-
* `import { Spinner } from 'fansunited-management-components'`
|
|
6
|
-
*/
|
|
7
|
-
export { default as Spinner } from './components/Spinner/Spinner';
|
|
8
|
-
/**
|
|
9
|
-
* Props for the Spinner component.
|
|
10
|
-
* Provides typed access in consumer projects without importing from deep paths.
|
|
11
|
-
*/
|
|
12
|
-
export type SpinnerProps = import('react').ComponentProps<typeof import('./components/Spinner/Spinner').default>;
|
|
13
1
|
declare const _default: {
|
|
14
2
|
APIProvider: import('react').FC<{
|
|
15
3
|
config: any;
|
|
@@ -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 };
|