@hitgrab/finder 0.1.13-alpha → 0.1.15-alpha

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.
@@ -1,7 +1,7 @@
1
1
  import { FinderContentProps } from "../types/react-types";
2
- import { ElementType, ReactNode } from "react";
2
+ import { ElementType, ReactElement, ReactNode } from "react";
3
3
  interface FinderContentEmptyProps<FItem, FContext> {
4
- children: ElementType<FinderContentProps<FItem, FContext>["empty"]> | Iterable<ReactNode>;
4
+ children: ElementType<FinderContentProps<FItem, FContext>["empty"]> | ReactElement<FinderContentProps<FItem, FContext>["empty"]> | Iterable<ReactNode>;
5
5
  }
6
6
  declare function FinderContentEmpty<FItem = any, FContext = any>({ children: Component }: FinderContentEmptyProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
7
7
  export { FinderContentEmpty };
@@ -1,7 +1,7 @@
1
- import { ElementType, ReactNode } from "react";
1
+ import { ElementType, ReactElement, ReactNode } from "react";
2
2
  import { FinderContentProps } from "../..";
3
3
  interface FinderContentGroupsProps<FItem, FContext> {
4
- children: ElementType<FinderContentProps<FItem, FContext>["groups"]> | Iterable<ReactNode>;
4
+ children: ElementType<FinderContentProps<FItem, FContext>["groups"]> | ReactElement<FinderContentProps<FItem, FContext>["groups"]> | Iterable<ReactNode>;
5
5
  }
6
6
  declare function FinderContentGroups<FItem = any, FContext = any>({ children: Component }: FinderContentGroupsProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
7
7
  export { FinderContentGroups };
@@ -1,7 +1,7 @@
1
- import { ElementType, ReactNode } from "react";
1
+ import { ElementType, ReactElement, ReactNode } from "react";
2
2
  import { FinderContentProps } from "../types/react-types";
3
3
  interface FinderContentItemsProps<FItem, FContext> {
4
- children: ElementType<FinderContentProps<FItem, FContext>["items"]> | Iterable<ReactNode>;
4
+ children: ElementType<FinderContentProps<FItem, FContext>["items"]> | ReactElement<FinderContentProps<FItem, FContext>["items"]> | Iterable<ReactNode>;
5
5
  }
6
6
  declare function FinderContentItems<FItem = any, FContext = any>({ children: Component }: FinderContentItemsProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
7
7
  export { FinderContentItems };
@@ -1,7 +1,7 @@
1
1
  import { FinderContentProps } from "../types/react-types";
2
- import { ElementType, ReactNode } from "react";
2
+ import { ElementType, ReactElement, ReactNode } from "react";
3
3
  interface FinderContentLoadingProps<FItem, FContext> {
4
- children: ElementType<FinderContentProps<FItem, FContext>["loading"]> | Iterable<ReactNode>;
4
+ children: ElementType<FinderContentProps<FItem, FContext>["loading"]> | ReactElement<FinderContentProps<FItem, FContext>["loading"]> | Iterable<ReactNode>;
5
5
  }
6
6
  declare function FinderContentLoading<FItem, FContext>({ children: Component }: FinderContentLoadingProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
7
7
  export { FinderContentLoading };
@@ -1,7 +1,7 @@
1
1
  import { FinderContentProps } from "../types/react-types";
2
- import { ElementType, ReactNode } from "react";
2
+ import { ElementType, ReactElement, ReactNode } from "react";
3
3
  interface FinderContentNoMatchesProps<FItem, FContext> {
4
- children: ElementType<FinderContentProps<FItem, FContext>["loading"]> | Iterable<ReactNode>;
4
+ children: ElementType<FinderContentProps<FItem, FContext>["noMatches"]> | ReactElement<FinderContentProps<FItem, FContext>["noMatches"]> | Iterable<ReactNode>;
5
5
  }
6
6
  declare function FinderContentNoMatches<FItem = any, FContext = any>({ children: Component }: FinderContentNoMatchesProps<FItem, FContext>): Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null;
7
7
  export { FinderContentNoMatches };
@@ -1,4 +1,4 @@
1
- import { ElementType, ReactNode } from "react";
1
+ import { ElementType, ReactElement, ReactNode } from "react";
2
2
  import { FinderContentProps } from "../types/react-types";
3
3
  import { FinderContentLoading } from "./finder-content-loading";
4
4
  import { FinderContentEmpty } from "./finder-content-empty";
@@ -7,11 +7,11 @@ import { FinderContentItems } from "./finder-content-items";
7
7
  import { FinderContentGroups } from "./finder-content-groups";
8
8
  interface FinderContentContainerProps<FItem, FContext> {
9
9
  children: {
10
- loading?: ElementType<FinderContentProps<FItem, FContext>["loading"]> | Iterable<ReactNode>;
11
- empty?: ElementType<FinderContentProps<FItem, FContext>["empty"]> | Iterable<ReactNode>;
12
- noMatches?: ElementType<FinderContentProps<FItem, FContext>["noMatches"]> | Iterable<ReactNode>;
13
- items?: ElementType<FinderContentProps<FItem, FContext>["items"]> | Iterable<ReactNode>;
14
- groups?: ElementType<FinderContentProps<FItem, FContext>["groups"]> | Iterable<ReactNode>;
10
+ loading?: ElementType<FinderContentProps<FItem, FContext>["loading"]> | ReactElement<FinderContentProps<FItem, FContext>["loading"]> | Iterable<ReactNode>;
11
+ empty?: ElementType<FinderContentProps<FItem, FContext>["empty"]> | ReactElement<FinderContentProps<FItem, FContext>["empty"]> | Iterable<ReactNode>;
12
+ noMatches?: ElementType<FinderContentProps<FItem, FContext>["noMatches"]> | ReactElement<FinderContentProps<FItem, FContext>["noMatches"]> | Iterable<ReactNode>;
13
+ items?: ElementType<FinderContentProps<FItem, FContext>["items"]> | ReactElement<FinderContentProps<FItem, FContext>["items"]> | Iterable<ReactNode>;
14
+ groups?: ElementType<FinderContentProps<FItem, FContext>["groups"]> | ReactElement<FinderContentProps<FItem, FContext>["groups"]> | Iterable<ReactNode>;
15
15
  };
16
16
  }
17
17
  declare function FinderContent<FItem = any, FContext = any>({ children: renderProps }: FinderContentContainerProps<FItem, FContext>): (import("react/jsx-runtime").JSX.Element | undefined)[];
@@ -1,3 +1,3 @@
1
- import { FinderCore } from "../../core/finder-core";
2
- declare const FinderCoreContext: import("react").Context<[FinderCore<any, any>, number | undefined] | null>;
1
+ import { FinderCoreContextProps } from "../types/react-types";
2
+ declare const FinderCoreContext: import("react").Context<FinderCoreContextProps | null>;
3
3
  export { FinderCoreContext };
@@ -33,6 +33,7 @@ export interface FinderContentProps<FItem = any, FContext = any> {
33
33
  context: FContext;
34
34
  };
35
35
  }
36
+ export type FinderCoreContextProps = [FinderCore, number];
36
37
  export interface StringMatchSegmentProps {
37
38
  segment: StringMatchSegment;
38
39
  segmentIndex: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitgrab/finder",
3
- "version": "0.1.13-alpha",
3
+ "version": "0.1.15-alpha",
4
4
  "description": "Headless datatables for things that aren't tables.",
5
5
  "type": "module",
6
6
  "files": [
@@ -48,24 +48,24 @@
48
48
  "url": "https://github.com/HitGrab/finder/issues"
49
49
  },
50
50
  "homepage": "https://github.com/HitGrab/finder#readme",
51
- "dependencies": {
52
- "lodash": "^4.17.21",
53
- "react": "^19.1.0"
54
- },
55
51
  "devDependencies": {
52
+ "@eslint/js": "^9.36.0",
56
53
  "@types/lodash": "^4.17.16",
57
54
  "@types/react": "^19.1.3",
58
55
  "@vitejs/plugin-react": "^4.3.2",
59
- "@eslint/js": "^9.36.0",
60
56
  "eslint": "^9.36.0",
61
- "eslint-plugin-jsx-a11y": "^6.10.2",
62
57
  "eslint-plugin-react": "^7.37.5",
63
58
  "eslint-plugin-react-hooks": "^5.2.0",
64
- "typescript-eslint": "^8.45.0",
65
- "prettier": "^3.5.3",
66
- "typescript": "^5.9.2",
67
- "vite": "^6.3.5",
68
- "vite-plugin-checker": "^0.9.0",
69
- "vitest": "^3.1.3"
59
+ "prettier": "^3.6.2",
60
+ "typescript": "^5.9.3",
61
+ "typescript-eslint": "^8.46.1",
62
+ "vite": "^7.1.9",
63
+ "vite-plugin-checker": "^0.11.0",
64
+ "vitest": "^3.2.4"
65
+ },
66
+ "peerDependencies": {
67
+ "lodash": "^4.17.21",
68
+ "react": ">=18",
69
+ "react-dom": ">=18"
70
70
  }
71
71
  }