@vitus-labs/attrs 0.81.0 → 1.0.0-alpha.1
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/lib/analysis/vitus-labs-attrs.module.js.html +85 -1418
- package/lib/index.d.ts +8 -14
- package/lib/types/attrs.d.ts +3 -3
- package/lib/types/attrs.d.ts.map +1 -1
- package/lib/types/hoc/attrsHoc.d.ts +5 -5
- package/lib/types/hoc/attrsHoc.d.ts.map +1 -1
- package/lib/types/hoc/index.d.ts +2 -2
- package/lib/types/hoc/index.d.ts.map +1 -1
- package/lib/types/hooks/index.d.ts +2 -2
- package/lib/types/hooks/useRef.d.ts +7 -7
- package/lib/types/index.d.ts +11 -11
- package/lib/types/init.d.ts +8 -8
- package/lib/types/isAttrsComponent.d.ts +3 -3
- package/lib/types/types/AttrsComponent.d.ts +267 -269
- package/lib/types/types/AttrsComponent.d.ts.map +1 -1
- package/lib/types/types/InitAttrsComponent.d.ts +5 -5
- package/lib/types/types/InitAttrsComponent.d.ts.map +1 -1
- package/lib/types/types/attrs.d.ts +1 -1
- package/lib/types/types/config.d.ts +9 -9
- package/lib/types/types/configuration.d.ts +20 -20
- package/lib/types/types/hoc.d.ts +3 -3
- package/lib/types/types/utils.d.ts +21 -21
- package/lib/types/types/utils.d.ts.map +1 -1
- package/lib/types/utils/attrs.d.ts +8 -8
- package/lib/types/utils/chaining.d.ts +5 -5
- package/lib/types/utils/collection.d.ts +3 -3
- package/lib/types/utils/compose.d.ts +3 -3
- package/lib/types/utils/statics.d.ts +6 -6
- package/lib/vitus-labs-attrs.module.js +188 -189
- package/lib/vitus-labs-attrs.module.js.map +1 -1
- package/package.json +11 -11
- package/lib/analysis/vitus-labs-attrs.js.html +0 -6638
- package/lib/vitus-labs-attrs.js +0 -224
- package/lib/vitus-labs-attrs.js.map +0 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ComponentType } from 'react';
|
|
2
2
|
import type { ExtractProps } from '@vitus-labs/tools-types';
|
|
3
|
-
import type { ForwardedRef } from 'react';
|
|
4
3
|
import type { ForwardRefExoticComponent } from 'react';
|
|
5
4
|
import type { MergeTypes } from '@vitus-labs/tools-types';
|
|
6
|
-
import type {
|
|
5
|
+
import type { PropsWithoutRef } from 'react';
|
|
6
|
+
import type { RefAttributes } from 'react';
|
|
7
7
|
|
|
8
8
|
export declare type Attrs = <C extends ElementType<any>>({ name, component, }: {
|
|
9
9
|
name: string;
|
|
@@ -23,7 +23,7 @@ export declare type AttrsCb<A> = (props: Partial<A>) => Partial<A>;
|
|
|
23
23
|
* @param HOC High-order components
|
|
24
24
|
* @param DFP Calculated final component props
|
|
25
25
|
*/
|
|
26
|
-
export declare interface AttrsComponent<OA extends TObj = {}, EA extends TObj = {}, S extends TObj = {}, HOC extends TObj = {}, DFP = MergeTypes<[OA, EA]>> extends ExoticComponent<DFP> {
|
|
26
|
+
export declare interface AttrsComponent<OA extends TObj = {}, EA extends TObj = {}, S extends TObj = {}, HOC extends TObj = {}, DFP extends Record<string, any> = MergeTypes<[OA, EA]>> extends ExoticComponent<DFP> {
|
|
27
27
|
/**
|
|
28
28
|
* A chaining method to define default component theme
|
|
29
29
|
* @param param _object_
|
|
@@ -287,21 +287,15 @@ declare type Configuration<C = ElementType | unknown> = InitConfiguration<C> & {
|
|
|
287
287
|
statics: Record<string, any>;
|
|
288
288
|
} & Record<string, any>;
|
|
289
289
|
|
|
290
|
-
export declare type ElementType<T extends TObj | unknown = any> = (ComponentType<T> & {
|
|
290
|
+
export declare type ElementType<T extends TObj | unknown = any> = (ComponentType<T> & Partial<{
|
|
291
291
|
[key: string]: any;
|
|
292
|
-
}) | (ForwardRefExoticComponent<T> & {
|
|
292
|
+
}>) | (ForwardRefExoticComponent<T> & Partial<{
|
|
293
293
|
[key: string]: any;
|
|
294
|
-
});
|
|
294
|
+
}>);
|
|
295
295
|
|
|
296
|
-
declare
|
|
297
|
-
(props: P & {
|
|
298
|
-
$attrsRef?: ForwardedRef<unknown>;
|
|
299
|
-
}): ReactElement<P & {
|
|
300
|
-
$attrsRef?: ForwardedRef<unknown>;
|
|
301
|
-
'data-attrs': string;
|
|
302
|
-
}> | null;
|
|
296
|
+
declare type ExoticComponent<P extends Record<string, unknown> = {}> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<any>> & {
|
|
303
297
|
readonly $$typeof: symbol;
|
|
304
|
-
}
|
|
298
|
+
};
|
|
305
299
|
|
|
306
300
|
export declare type GenericHoc = (component: ElementType) => ElementType;
|
|
307
301
|
|
package/lib/types/attrs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InitAttrsComponent } from "./types/InitAttrsComponent";
|
|
2
|
-
declare const rocketComponent: InitAttrsComponent;
|
|
3
|
-
export default rocketComponent;
|
|
1
|
+
import type { InitAttrsComponent } from "./types/InitAttrsComponent";
|
|
2
|
+
declare const rocketComponent: InitAttrsComponent;
|
|
3
|
+
export default rocketComponent;
|
|
4
4
|
//# sourceMappingURL=attrs.d.ts.map
|
package/lib/types/attrs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attrs.d.ts","sourceRoot":"","sources":["../../src/attrs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"attrs.d.ts","sourceRoot":"","sources":["../../src/attrs.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mCAAkC;AAmCpE,QAAA,MAAM,eAAe,EAAE,kBA8GtB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent, ComponentType } from 'react';
|
|
2
|
-
import type { Configuration } from "../types/configuration";
|
|
3
|
-
export type RocketStyleHOC = ({ attrs, priorityAttrs, }: Pick<Configuration, 'attrs' | 'priorityAttrs'>) => (WrappedComponent: ComponentType<any>) => ForwardRefExoticComponent<any>;
|
|
4
|
-
declare const attrsHOC: RocketStyleHOC;
|
|
5
|
-
export default attrsHOC;
|
|
1
|
+
import { ForwardRefExoticComponent, ComponentType } from 'react';
|
|
2
|
+
import type { Configuration } from "../types/configuration";
|
|
3
|
+
export type RocketStyleHOC = ({ attrs, priorityAttrs, }: Pick<Configuration, 'attrs' | 'priorityAttrs'>) => (WrappedComponent: ComponentType<any>) => ForwardRefExoticComponent<any>;
|
|
4
|
+
declare const attrsHOC: RocketStyleHOC;
|
|
5
|
+
export default attrsHOC;
|
|
6
6
|
//# sourceMappingURL=attrsHoc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attrsHoc.d.ts","sourceRoot":"","sources":["../../../src/hoc/attrsHoc.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"attrsHoc.d.ts","sourceRoot":"","sources":["../../../src/hoc/attrsHoc.tsx"],"names":[],"mappings":"AAAA,OAAc,EAEZ,yBAAyB,EACzB,aAAa,EACd,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EAAE,aAAa,EAAE,+BAA6B;AAE1D,MAAM,MAAM,cAAc,GAAG,CAAC,EAC5B,KAAK,EACL,aAAa,GACd,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,eAAe,CAAC,KAAK,CACpD,gBAAgB,EAAE,aAAa,CAAC,GAAG,CAAC,KACjC,yBAAyB,CAAC,GAAG,CAAC,CAAA;AAEnC,QAAA,MAAM,QAAQ,EAAE,cAqCf,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
package/lib/types/hoc/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import attrsHoc from './attrsHoc';
|
|
2
|
-
export { attrsHoc };
|
|
1
|
+
import attrsHoc from './attrsHoc';
|
|
2
|
+
export { attrsHoc };
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hoc/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hoc/index.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAA;AAEjC,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import useRef from './useRef';
|
|
2
|
-
export { useRef };
|
|
1
|
+
import useRef from './useRef';
|
|
2
|
+
export { useRef };
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ForwardedRef } from 'react';
|
|
2
|
-
type UseAttrsRef = (props: {
|
|
3
|
-
$attrsRef?: ForwardedRef<unknown>;
|
|
4
|
-
ref?: ForwardedRef<unknown>;
|
|
5
|
-
}) => ForwardedRef<unknown>;
|
|
6
|
-
declare const useRocketstyleRef: UseAttrsRef;
|
|
7
|
-
export default useRocketstyleRef;
|
|
1
|
+
import { ForwardedRef } from 'react';
|
|
2
|
+
type UseAttrsRef = (props: {
|
|
3
|
+
$attrsRef?: ForwardedRef<unknown>;
|
|
4
|
+
ref?: ForwardedRef<unknown>;
|
|
5
|
+
}) => ForwardedRef<unknown>;
|
|
6
|
+
declare const useRocketstyleRef: UseAttrsRef;
|
|
7
|
+
export default useRocketstyleRef;
|
|
8
8
|
//# sourceMappingURL=useRef.d.ts.map
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import attrs, { Attrs } from "./init";
|
|
2
|
-
import isAttrsComponent, { IsAttrsComponent } from "./isAttrsComponent";
|
|
3
|
-
import type { ConfigAttrs, AttrsComponentType } from "./types/config";
|
|
4
|
-
import type { TObj, ElementType } from "./types/utils";
|
|
5
|
-
import type { AttrsCb } from "./types/attrs";
|
|
6
|
-
import type { GenericHoc, ComposeParam } from "./types/hoc";
|
|
7
|
-
import type { AttrsComponent } from "./types/AttrsComponent";
|
|
8
|
-
export type { AttrsComponent, Attrs, AttrsComponentType, TObj, ElementType, ConfigAttrs, AttrsCb, GenericHoc, ComposeParam, };
|
|
9
|
-
export { attrs, isAttrsComponent };
|
|
10
|
-
export default attrs;
|
|
11
|
-
export type { IsAttrsComponent };
|
|
1
|
+
import attrs, { Attrs } from "./init";
|
|
2
|
+
import isAttrsComponent, { IsAttrsComponent } from "./isAttrsComponent";
|
|
3
|
+
import type { ConfigAttrs, AttrsComponentType } from "./types/config";
|
|
4
|
+
import type { TObj, ElementType } from "./types/utils";
|
|
5
|
+
import type { AttrsCb } from "./types/attrs";
|
|
6
|
+
import type { GenericHoc, ComposeParam } from "./types/hoc";
|
|
7
|
+
import type { AttrsComponent } from "./types/AttrsComponent";
|
|
8
|
+
export type { AttrsComponent, Attrs, AttrsComponentType, TObj, ElementType, ConfigAttrs, AttrsCb, GenericHoc, ComposeParam, };
|
|
9
|
+
export { attrs, isAttrsComponent };
|
|
10
|
+
export default attrs;
|
|
11
|
+
export type { IsAttrsComponent };
|
|
12
12
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/init.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ElementType } from "./types/utils";
|
|
2
|
-
import type { InitAttrsComponent } from "./types/InitAttrsComponent";
|
|
3
|
-
export type Attrs = <C extends ElementType<any>>({ name, component, }: {
|
|
4
|
-
name: string;
|
|
5
|
-
component: C;
|
|
6
|
-
}) => ReturnType<InitAttrsComponent<C>>;
|
|
7
|
-
declare const attrs: Attrs;
|
|
8
|
-
export default attrs;
|
|
1
|
+
import type { ElementType } from "./types/utils";
|
|
2
|
+
import type { InitAttrsComponent } from "./types/InitAttrsComponent";
|
|
3
|
+
export type Attrs = <C extends ElementType<any>>({ name, component, }: {
|
|
4
|
+
name: string;
|
|
5
|
+
component: C;
|
|
6
|
+
}) => ReturnType<InitAttrsComponent<C>>;
|
|
7
|
+
declare const attrs: Attrs;
|
|
8
|
+
export default attrs;
|
|
9
9
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type IsAttrsComponent = <T>(component: T) => boolean;
|
|
2
|
-
declare const isAttrsComponent: IsAttrsComponent;
|
|
3
|
-
export default isAttrsComponent;
|
|
1
|
+
export type IsAttrsComponent = <T>(component: T) => boolean;
|
|
2
|
+
declare const isAttrsComponent: IsAttrsComponent;
|
|
3
|
+
export default isAttrsComponent;
|
|
4
4
|
//# sourceMappingURL=isAttrsComponent.d.ts.map
|