@ilokesto/utilinent 1.1.2 → 1.1.4
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/dist/components/For/types.d.ts +1 -0
- package/dist/components/Mount/types.d.ts +1 -0
- package/dist/components/Observer/index.d.ts +2 -1
- package/dist/components/Observer/types.d.ts +1 -0
- package/dist/components/OptionalWrapper/index.d.ts +1 -0
- package/dist/components/OptionalWrapper/types.d.ts +1 -0
- package/dist/components/Repeat/types.d.ts +1 -0
- package/dist/components/Show/types.d.ts +1 -0
- package/dist/components/Slacker/types.d.ts +1 -0
- package/dist/components/Slot/Slot.d.ts +1 -0
- package/dist/components/Slot/Slottable.d.ts +1 -0
- package/dist/components/Switch/Match.d.ts +7 -3
- package/dist/components/Switch/types.d.ts +7 -2
- package/dist/core/createProxy.d.ts +1 -0
- package/dist/types/tagHelper.d.ts +1 -0
- package/dist/types/utils.d.ts +1 -0
- package/dist/utils/resolveWhen.d.ts +3 -1
- package/dist/utils/resolveWhen.js +3 -1
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ObserverProps } from "./types";
|
|
2
3
|
export declare const Observer: import("react").ForwardRefExoticComponent<ObserverProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
3
|
-
ref?: ((instance: HTMLDivElement | null) => void
|
|
4
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
4
5
|
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { MatchProps, MatchPropsArray } from "./types";
|
|
3
|
+
type MatchElementProps = MatchProps | MatchPropsArray<readonly unknown[]>;
|
|
4
|
+
export declare function Match<const T extends readonly unknown[]>(props: MatchPropsArray<T>): React.ReactNode;
|
|
5
|
+
export declare function Match<T>(props: MatchProps<T>): React.ReactNode;
|
|
6
|
+
export declare const isMatchElement: (child: React.ReactNode) => child is import("react").ReactElement<MatchElementProps, string | import("react").JSXElementConstructor<any>>;
|
|
7
|
+
export {};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BaseTypeHelperFn, Fallback, NonNullableElements, ProxyType } from "../../types";
|
|
2
3
|
export interface MatchProps<T = unknown> {
|
|
3
|
-
when: T
|
|
4
|
+
when: T;
|
|
4
5
|
children: React.ReactNode | ((item: NonNullable<T>) => React.ReactNode);
|
|
5
6
|
}
|
|
7
|
+
export interface MatchPropsArray<T extends readonly unknown[]> {
|
|
8
|
+
when: T;
|
|
9
|
+
children: React.ReactNode | ((item: NonNullableElements<T>) => React.ReactNode);
|
|
10
|
+
}
|
|
6
11
|
export interface SwitchProps extends Fallback {
|
|
7
12
|
children: React.ReactNode;
|
|
8
13
|
}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { RegistryCategory } from "../types";
|
|
2
3
|
export declare function createProxy<TProxy extends object, TBase extends object = TProxy>(base: TBase, renderForTag: (tag: any) => React.ForwardRefExoticComponent<any>, category: RegistryCategory): TProxy;
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { NonNullableElements } from "../types";
|
|
2
|
+
export declare function resolveWhen<T extends readonly unknown[]>(value: T): value is NonNullableElements<T>;
|
|
3
|
+
export declare function resolveWhen<T>(value: T): value is NonNullable<T>;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilokesto/utilinent",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/ilokesto/utilinent.git"
|
|
7
7
|
},
|
|
8
|
-
"homepage": "https://ilokesto.
|
|
8
|
+
"homepage": "https://ilokesto.ayden94.com/en/utilinent",
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
11
|
"module": "dist/index.js",
|