lkd-web-kit 0.3.21 → 0.4.0

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/index.cjs CHANGED
@@ -52,7 +52,6 @@ const addBodyJsonHook = require('./utils/ky/addBodyJsonHook.cjs');
52
52
  const parseJson = require('./utils/ky/parseJson.cjs');
53
53
  const groupBy = require('./utils/array/groupBy.cjs');
54
54
  const shuffleArray = require('./utils/array/shuffleArray.cjs');
55
- const newHref = require('./utils/newHref.cjs');
56
55
  const isInfinityEmpty = require('./utils/isInfinityEmpty.cjs');
57
56
  const queryStringify = require('./utils/query-stringify.cjs');
58
57
  const newRoute = require('./utils/new-route.cjs');
@@ -115,7 +114,6 @@ exports.parseJSON = parseJson.parseJSON;
115
114
  exports.groupBy = groupBy.groupBy;
116
115
  exports.indexBy = groupBy.indexBy;
117
116
  exports.shuffleArray = shuffleArray.shuffleArray;
118
- exports.newHref = newHref.newHref;
119
117
  exports.isInfinityEmpty = isInfinityEmpty.isInfinityEmpty;
120
118
  exports.queryStringify = queryStringify.queryStringify;
121
119
  exports.createNewRoute = newRoute.createNewRoute;
package/dist/index.d.ts CHANGED
@@ -56,13 +56,6 @@ export declare interface ApiPagination<T> {
56
56
  data: T[];
57
57
  }
58
58
 
59
- export declare type Args<T, S> = {
60
- params?: T;
61
- searchParams?: S & {
62
- [QP_BACK_URL_NAME]?: string;
63
- };
64
- };
65
-
66
59
  export declare const breakpointsWithPx: {
67
60
  xs: string;
68
61
  sm: string;
@@ -385,8 +378,6 @@ export declare interface NavItemsProps {
385
378
  activeStrategy?: 'equals' | 'includes';
386
379
  }
387
380
 
388
- export declare const newHref: <T extends TParams, S extends TSearchParams = TSearchParams>(fn: string | ((args: Args<T, S>) => string)) => (args?: Args<T, S>) => string;
389
-
390
381
  export declare const newRoute: {
391
382
  <LocalQuery extends object = {}, Path extends string = string>(path: Path, options?: RouteOptions<LocalQuery, ExtractPathParams<Path>> | undefined): (params?: RouteInput<ExtractPathParams<Path>, LocalQuery> | undefined) => string;
392
383
  <LocalQuery extends object = {}, PathParams extends Params = {}>(path: string, options?: RouteOptions<LocalQuery, PathParams> | undefined): (params?: RouteInput<PathParams, LocalQuery> | undefined) => string;
@@ -510,12 +501,6 @@ export declare const timeInputToNumber: (timeInput: string) => number;
510
501
 
511
502
  export declare const toTailwindColors: (colors: MantineThemeColors) => Record<DefaultMantineColor, Record<MantineColorShade, string>>;
512
503
 
513
- export declare type TParams = Record<string, any> | unknown;
514
-
515
- export declare type TSearchParams = {
516
- [x: string]: any;
517
- };
518
-
519
504
  export declare const useBreakpoint: (breakpoint: keyof typeof breakpointsWithPx) => boolean;
520
505
 
521
506
  export declare const useFetchNextPageOnScroll: ({ infinity, scrollRef, disabled, }: FetchNextPageOnScrollOptions) => void;
package/dist/index.js CHANGED
@@ -48,7 +48,6 @@ export { addBodyJsonHook } from './utils/ky/addBodyJsonHook.js';
48
48
  export { parseJSON } from './utils/ky/parseJson.js';
49
49
  export { groupBy, indexBy } from './utils/array/groupBy.js';
50
50
  export { shuffleArray } from './utils/array/shuffleArray.js';
51
- export { newHref } from './utils/newHref.js';
52
51
  export { isInfinityEmpty } from './utils/isInfinityEmpty.js';
53
52
  export { queryStringify } from './utils/query-stringify.js';
54
53
  export { createNewRoute, newRoute } from './utils/new-route.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkd-web-kit",
3
- "version": "0.3.21",
3
+ "version": "0.4.0",
4
4
  "description": "A template for creating React component libraries with Vite.",
5
5
  "author": "LKD",
6
6
  "license": "MIT",
@@ -31,38 +31,36 @@
31
31
  "@testing-library/jest-dom": "^6.6.3",
32
32
  "@testing-library/react": "^16.3.0",
33
33
  "@testing-library/user-event": "^14.6.1",
34
- "@types/node": "^22.15.21",
35
- "@types/qs": "^6.14.0",
36
- "@types/react": "^19.1.5",
37
- "@types/react-dom": "^19.1.5",
38
- "@typescript-eslint/eslint-plugin": "^8.32.1",
39
- "@typescript-eslint/parser": "^8.32.1",
40
- "@vitejs/plugin-react-swc": "^3.9.0",
41
- "@vitest/coverage-v8": "^3.1.4",
42
- "eslint": "^9.27.0",
34
+ "@types/node": "^22.15.33",
35
+ "@types/react": "^19.1.8",
36
+ "@types/react-dom": "^19.1.6",
37
+ "@typescript-eslint/eslint-plugin": "^8.35.0",
38
+ "@typescript-eslint/parser": "^8.35.0",
39
+ "@vitejs/plugin-react-swc": "^3.10.2",
40
+ "@vitest/coverage-v8": "^3.2.4",
41
+ "eslint": "^9.29.0",
43
42
  "eslint-config-prettier": "^10.1.5",
44
43
  "eslint-plugin-jest-dom": "^5.5.0",
45
44
  "eslint-plugin-react": "^7.37.5",
46
45
  "eslint-plugin-react-hooks": "^5.2.0",
47
46
  "eslint-plugin-react-refresh": "^0.4.20",
48
47
  "jsdom": "^26.1.0",
49
- "prettier": "^3.5.3",
48
+ "prettier": "^3.6.1",
50
49
  "rollup-preserve-directives": "^1.1.3",
51
50
  "typescript": "^5.8.3",
52
- "vite": "^6.3.5",
51
+ "vite": "^7.0.0",
53
52
  "vite-plugin-dts": "^4.5.4",
54
- "vitest": "^3.1.4"
53
+ "vitest": "^3.2.4"
55
54
  },
56
55
  "peerDependencies": {
57
- "@mantine/core": "^8.1.1",
58
- "@mantine/dates": "^8.1.1",
59
- "@mantine/hooks": "^8.1.1",
60
- "@mantine/notifications": "^8.1.1",
61
- "@tanstack/react-query": "^5.80.7",
56
+ "@mantine/core": "^8.1.2",
57
+ "@mantine/dates": "^8.1.2",
58
+ "@mantine/hooks": "^8.1.2",
59
+ "@mantine/notifications": "^8.1.2",
60
+ "@tanstack/react-query": "^5.81.2",
62
61
  "clsx": "^2.1.1",
63
62
  "ky": "^1.8.1",
64
- "next": "^15.3.3",
65
- "qs": "^6.14.0",
63
+ "next": "^15.3.4",
66
64
  "react": "^19.1.0",
67
65
  "react-dom": "^19.1.0",
68
66
  "react-hook-form": "^7.58.1",
@@ -1,23 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- const qs = require('qs');
6
-
7
- const newHref = (fn) => (args) => {
8
- const href = typeof fn === "string" ? fn : fn(
9
- args ?? {
10
- params: {},
11
- searchParams: {}
12
- }
13
- );
14
- if (args?.searchParams) {
15
- const stringify = qs.stringify(args.searchParams, {
16
- skipNulls: true
17
- });
18
- return `${href}${stringify ? `?${stringify}` : ""}`;
19
- }
20
- return href;
21
- };
22
-
23
- exports.newHref = newHref;
@@ -1,19 +0,0 @@
1
- import qs from 'qs';
2
-
3
- const newHref = (fn) => (args) => {
4
- const href = typeof fn === "string" ? fn : fn(
5
- args ?? {
6
- params: {},
7
- searchParams: {}
8
- }
9
- );
10
- if (args?.searchParams) {
11
- const stringify = qs.stringify(args.searchParams, {
12
- skipNulls: true
13
- });
14
- return `${href}${stringify ? `?${stringify}` : ""}`;
15
- }
16
- return href;
17
- };
18
-
19
- export { newHref };