@panneau/data 4.0.55 → 4.0.58

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.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { UseQueryOptions, UseQueryResult, UseMutationResult, UseMutationOptions, QueryClient } from '@tanstack/react-query';
3
3
  import { Item, Pagination, Resource, ResourceItem } from '@panneau/core';
4
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import * as react from 'react';
5
5
  import { ReactNode } from 'react';
6
6
 
7
7
  declare function useItem<T = Item>(scope: any, id: any, loader: (id: any) => Promise<T>, opts?: any): {
@@ -27,10 +27,10 @@ declare function useItem<T = Item>(scope: any, id: any, loader: (id: any) => Pro
27
27
  isRefetching: boolean;
28
28
  isStale: boolean;
29
29
  isEnabled: boolean;
30
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<_tanstack_react_query.NoInfer<T>, Error>>;
30
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<T>, Error>>;
31
31
  fetchStatus: _tanstack_react_query.FetchStatus;
32
- promise: Promise<_tanstack_react_query.NoInfer<T>>;
33
- item: _tanstack_react_query.NoInfer<T>;
32
+ promise: Promise<NoInfer<T>>;
33
+ item: T;
34
34
  } | {
35
35
  error: null;
36
36
  isError: false;
@@ -54,10 +54,10 @@ declare function useItem<T = Item>(scope: any, id: any, loader: (id: any) => Pro
54
54
  isRefetching: boolean;
55
55
  isStale: boolean;
56
56
  isEnabled: boolean;
57
- refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<_tanstack_react_query.NoInfer<T>, Error>>;
57
+ refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<NoInfer<T>, Error>>;
58
58
  fetchStatus: _tanstack_react_query.FetchStatus;
59
- promise: Promise<_tanstack_react_query.NoInfer<T>>;
60
- item: _tanstack_react_query.NoInfer<T>;
59
+ promise: Promise<NoInfer<T>>;
60
+ item: T;
61
61
  };
62
62
 
63
63
  type UseItemsResponse<T> = {
@@ -227,7 +227,7 @@ interface ApiProviderProps {
227
227
  children: ReactNode;
228
228
  }
229
229
  declare function useApi(): Api;
230
- declare function ApiProvider({ api: initialApi, baseUrl, onUnauthorized, children, }: ApiProviderProps): react_jsx_runtime.JSX.Element;
230
+ declare function ApiProvider({ api: initialApi, baseUrl, onUnauthorized, children, }: ApiProviderProps): react.JSX.Element;
231
231
 
232
232
  type QueryInitialData = Record<string, unknown> | Array<Record<string, unknown>>;
233
233
  interface QueryProviderProps {
@@ -237,14 +237,14 @@ interface QueryProviderProps {
237
237
  children: ReactNode;
238
238
  }
239
239
  declare function useQueryContext(): QueryClient;
240
- declare function QueryProvider({ config: initialConfig, initialKey, initialData, children, }: QueryProviderProps): react_jsx_runtime.JSX.Element;
240
+ declare function QueryProvider({ config: initialConfig, initialKey, initialData, children, }: QueryProviderProps): react.JSX.Element;
241
241
 
242
242
  interface DataProviderProps {
243
243
  api?: Api | null;
244
244
  apiBaseUrl?: string;
245
245
  children?: ReactNode;
246
246
  }
247
- declare function DataProvider({ api, apiBaseUrl, children }: DataProviderProps): react_jsx_runtime.JSX.Element;
247
+ declare function DataProvider({ api, apiBaseUrl, children }: DataProviderProps): react.JSX.Element;
248
248
 
249
249
  export { Api, ApiProvider, Base as BaseApi, DataProvider, QueryProvider, useApi, useItem, useItems, useQueryContext, useResourceClone, useResourceDestroy, useResourceItem, useResourceItems, useResourceRestore, useResourceCreate as useResourceStore, useResourceUpdate };
250
250
  export type { UseItemsResponse };
package/dist/index.js CHANGED
@@ -6,9 +6,9 @@ import queryString from 'query-string';
6
6
  import { jsx } from 'react/jsx-runtime';
7
7
  import { useQuery, keepPreviousData, useMutation, QueryClient, QueryClientProvider } from '@tanstack/react-query';
8
8
  import { c } from 'react/compiler-runtime';
9
- import isArray from 'lodash/isArray';
10
- import isObject from 'lodash/isObject';
11
- import isString from 'lodash/isString';
9
+ import isArray from 'lodash-es/isArray';
10
+ import isObject from 'lodash-es/isObject';
11
+ import isString from 'lodash-es/isString';
12
12
 
13
13
  function useItem(scope, id, loader, t0) {
14
14
  const $ = c(15);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panneau/data",
3
- "version": "4.0.55",
3
+ "version": "4.0.58",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -10,6 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/folkloreinc/panneau-js.git"
12
12
  },
13
+ "license": "ISC",
13
14
  "author": {
14
15
  "name": "Folklore",
15
16
  "email": "info@folklore.email"
@@ -32,43 +33,43 @@
32
33
  "email": "tg@folklore.email"
33
34
  }
34
35
  ],
35
- "license": "ISC",
36
+ "sideEffects": false,
36
37
  "type": "module",
37
- "module": "dist/index.js",
38
- "types": "dist/index.d.ts",
39
38
  "exports": {
40
39
  ".": {
41
40
  "types": "./dist/index.d.ts",
42
41
  "default": "./dist/index.js"
43
42
  }
44
43
  },
44
+ "module": "dist/index.js",
45
+ "types": "dist/index.d.ts",
45
46
  "files": [
46
47
  "dist",
47
48
  "assets"
48
49
  ],
49
50
  "scripts": {
50
- "prepublishOnly": "npm run build",
51
- "build": "../../scripts/prepare-package.sh --types"
52
- },
53
- "devDependencies": {
54
- "react": "^19.2.0",
55
- "react-dom": "^19.0.0"
56
- },
57
- "peerDependencies": {
58
- "react": "^19.2.0",
59
- "react-dom": "^19.0.0"
51
+ "build": "../../scripts/prepare-package.sh --types",
52
+ "prepublishOnly": "npm run build"
60
53
  },
61
54
  "dependencies": {
62
55
  "@babel/runtime": "^7.28.6",
63
56
  "@folklore/fetch": "^0.1.21",
64
57
  "@folklore/routes": "^0.2.44",
65
- "@panneau/core": "^4.0.55",
58
+ "@panneau/core": "^4.0.58",
66
59
  "@tanstack/react-query": "^5.100.9",
67
60
  "lodash": "^4.17.21",
68
61
  "query-string": "^9.0.0"
69
62
  },
63
+ "devDependencies": {
64
+ "react": "^19.2.0",
65
+ "react-dom": "^19.0.0"
66
+ },
67
+ "peerDependencies": {
68
+ "react": "^19.2.0",
69
+ "react-dom": "^19.0.0"
70
+ },
70
71
  "publishConfig": {
71
72
  "access": "public"
72
73
  },
73
- "gitHead": "1c9183567fc5bf98ba10fa57c63cf2ed2ae4a054"
74
+ "gitHead": "408b9bef2c15c0a6c55588721d13a965ead50a5f"
74
75
  }