reykit 1.0.71 → 1.0.72

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.
@@ -13,7 +13,7 @@
13
13
  * - `withLoading` : Execute a function in the context.
14
14
  */
15
15
  export declare function useLoading(): {
16
- withLoading: <T>(fn: () => T | Promise<T>) => Promise<T>;
16
+ withLoading: <T, Args extends any[]>(fn: (...args: Args) => T | Promise<T>, ...args: Args) => Promise<T>;
17
17
  isLoading: boolean;
18
18
  setIsLoading: (value: boolean) => void;
19
19
  };
package/dist/index.js CHANGED
@@ -27562,13 +27562,13 @@ function GE({ children: j }) {
27562
27562
  }
27563
27563
  function XE() {
27564
27564
  const j = mE(L2);
27565
- if (!j) throw new Error("not used in the context");
27565
+ if (!j) throw new Error("must be used within Loading component");
27566
27566
  return {
27567
27567
  ...j,
27568
- withLoading: async (K) => {
27568
+ withLoading: async (K, ...W) => {
27569
27569
  j.setIsLoading(!0);
27570
27570
  try {
27571
- return await K();
27571
+ return await K(...W);
27572
27572
  } finally {
27573
27573
  j.setIsLoading(!1);
27574
27574
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reykit",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "Kit method set.",
5
5
  "author": "reyxbo",
6
6
  "keywords": [
@@ -17,15 +17,25 @@
17
17
  "url": "https://github.com/reyxbo/reykit-js.git"
18
18
  },
19
19
  "license": "MIT",
20
- "files": ["./dist"],
20
+ "files": [
21
+ "./dist"
22
+ ],
21
23
  "type": "module",
22
24
  "main": "./dist/index.js",
23
25
  "types": "./dist/index.d.ts",
24
26
  "exports": {
25
- ".": {"default": "./dist/index.js"},
26
- "./base": {"style": "./dist/index.css"},
27
- "./debug": {"style": "./dist/style/debug.css"},
28
- "./shadcn": {"style": "./dist/style/shadcn.css"},
27
+ ".": {
28
+ "default": "./dist/index.js"
29
+ },
30
+ "./base": {
31
+ "style": "./dist/index.css"
32
+ },
33
+ "./debug": {
34
+ "style": "./dist/style/debug.css"
35
+ },
36
+ "./shadcn": {
37
+ "style": "./dist/style/shadcn.css"
38
+ },
29
39
  "./*": "./dist/*"
30
40
  },
31
41
  "dependencies": {