solid-navigator 0.3.1 → 0.3.3

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/dev.js CHANGED
@@ -297,7 +297,7 @@ var Navigate = (props) => {
297
297
  navigate(props.href, { replace: true });
298
298
  return null;
299
299
  };
300
- var useSearchParams = () => {
300
+ function useSearchParams() {
301
301
  const context = useRouterContext();
302
302
  const navigate = useNavigate();
303
303
  const updateQuery = (query) => {
@@ -308,7 +308,7 @@ var useSearchParams = () => {
308
308
  navigate(url.pathname + url.search + url.hash);
309
309
  };
310
310
  return [context.location.query, updateQuery];
311
- };
311
+ }
312
312
  var Fragment = () => [];
313
313
  var Outlet = (props) => {
314
314
  const context = useRouterContext();
package/dist/dev.jsx CHANGED
@@ -299,7 +299,7 @@ var Navigate = (props) => {
299
299
  navigate(props.href, { replace: true });
300
300
  return null;
301
301
  };
302
- var useSearchParams = () => {
302
+ function useSearchParams() {
303
303
  const context = useRouterContext();
304
304
  const navigate = useNavigate();
305
305
  const updateQuery = (query) => {
@@ -310,7 +310,7 @@ var useSearchParams = () => {
310
310
  navigate(url.pathname + url.search + url.hash);
311
311
  };
312
312
  return [context.location.query, updateQuery];
313
- };
313
+ }
314
314
 
315
315
  // src/Outlet.tsx
316
316
  import { createMemo as createMemo3 } from "solid-js";
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ interface RouteObject {
5
5
  path: string;
6
6
  children?: RouteObject[];
7
7
  component?: () => JSX.Element;
8
- components?: Record<string, () => JSX.Element | undefined>;
8
+ components?: Record<string, (() => JSX.Element) | undefined>;
9
9
  }
10
10
  declare const Route: (props: Omit<RouteObject, 'children'> & {
11
11
  children?: JSX.Element;
@@ -19,7 +19,7 @@ declare const useNavigate: () => (path: string, options?: NavigateOptions | unde
19
19
  declare const Navigate: (props: {
20
20
  href: string;
21
21
  }) => null;
22
- declare const useSearchParams: () => readonly [Record<string, string>, (query: Record<string, string>) => void];
22
+ declare function useSearchParams<T = Record<string, string>>(): readonly [T, (query: T) => void];
23
23
 
24
24
  declare const Outlet: (props: {
25
25
  children?: string;
package/dist/index.js CHANGED
@@ -295,7 +295,7 @@ var Navigate = (props) => {
295
295
  navigate(props.href, { replace: true });
296
296
  return null;
297
297
  };
298
- var useSearchParams = () => {
298
+ function useSearchParams() {
299
299
  const context = useRouterContext();
300
300
  const navigate = useNavigate();
301
301
  const updateQuery = (query) => {
@@ -306,7 +306,7 @@ var useSearchParams = () => {
306
306
  navigate(url.pathname + url.search + url.hash);
307
307
  };
308
308
  return [context.location.query, updateQuery];
309
- };
309
+ }
310
310
  var Fragment = () => [];
311
311
  var Outlet = (props) => {
312
312
  const context = useRouterContext();
package/dist/index.jsx CHANGED
@@ -298,7 +298,7 @@ var Navigate = (props) => {
298
298
  navigate(props.href, { replace: true });
299
299
  return null;
300
300
  };
301
- var useSearchParams = () => {
301
+ function useSearchParams() {
302
302
  const context = useRouterContext();
303
303
  const navigate = useNavigate();
304
304
  const updateQuery = (query) => {
@@ -309,7 +309,7 @@ var useSearchParams = () => {
309
309
  navigate(url.pathname + url.search + url.hash);
310
310
  };
311
311
  return [context.location.query, updateQuery];
312
- };
312
+ }
313
313
 
314
314
  // src/Outlet.tsx
315
315
  import { createMemo as createMemo3 } from "solid-js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-navigator",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "Solid Navigator is a library that is inspired by vue router and solid router.",
5
5
  "license": "MIT",
6
6
  "author": "SupertigerDev",