@vef-framework/core 2.0.4 → 2.0.6
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/cjs/api/client.cjs +1 -171
- package/dist/cjs/api/constants.cjs +1 -13
- package/dist/cjs/api/helpers.cjs +1 -12
- package/dist/cjs/api/index.cjs +1 -14
- package/dist/cjs/auth/helpers.cjs +1 -19
- package/dist/cjs/auth/index.cjs +1 -10
- package/dist/cjs/common/index.cjs +1 -3
- package/dist/cjs/context/api-client.cjs +1 -25
- package/dist/cjs/context/app.cjs +1 -15
- package/dist/cjs/context/context-selector.cjs +1 -65
- package/dist/cjs/context/disabled.cjs +1 -15
- package/dist/cjs/context/index.cjs +1 -19
- package/dist/cjs/dnd/index.cjs +1 -102
- package/dist/cjs/http/client.cjs +1 -445
- package/dist/cjs/http/errors.cjs +1 -23
- package/dist/cjs/http/helpers.cjs +1 -17
- package/dist/cjs/http/index.cjs +1 -17
- package/dist/cjs/immer/index.cjs +1 -40
- package/dist/cjs/index.cjs +1 -306
- package/dist/cjs/motion/features.cjs +1 -13
- package/dist/cjs/motion/index.cjs +1 -48
- package/dist/cjs/motion/motion-provider.cjs +1 -29
- package/dist/cjs/query/constants.cjs +1 -8
- package/dist/cjs/query/helpers.cjs +1 -67
- package/dist/cjs/query/hooks.cjs +1 -52
- package/dist/cjs/query/index.cjs +1 -20
- package/dist/cjs/state/index.cjs +1 -41
- package/dist/cjs/state-machine/index.cjs +1 -35
- package/dist/cjs/store/bound.cjs +1 -42
- package/dist/cjs/store/index.cjs +1 -20
- package/dist/cjs/store/unbound.cjs +2 -73
- package/dist/cjs/store/use-deep.cjs +1 -17
- package/dist/es/api/client.js +72 -90
- package/dist/es/api/constants.js +7 -8
- package/dist/es/api/helpers.js +6 -7
- package/dist/es/api/index.js +8 -4
- package/dist/es/auth/helpers.js +9 -14
- package/dist/es/auth/index.js +4 -2
- package/dist/es/common/index.js +1 -1
- package/dist/es/context/api-client.js +16 -17
- package/dist/es/context/app.js +8 -9
- package/dist/es/context/context-selector.js +30 -39
- package/dist/es/context/disabled.js +9 -9
- package/dist/es/context/index.js +13 -5
- package/dist/es/dnd/index.js +30 -7
- package/dist/es/http/client.js +173 -253
- package/dist/es/http/errors.js +6 -9
- package/dist/es/http/helpers.js +10 -10
- package/dist/es/http/index.js +11 -4
- package/dist/es/immer/index.js +15 -8
- package/dist/es/index.js +122 -43
- package/dist/es/motion/features.js +4 -2
- package/dist/es/motion/index.js +11 -5
- package/dist/es/motion/motion-provider.js +15 -17
- package/dist/es/query/constants.js +4 -4
- package/dist/es/query/helpers.js +40 -45
- package/dist/es/query/hooks.js +29 -20
- package/dist/es/query/index.js +14 -4
- package/dist/es/state/index.js +11 -2
- package/dist/es/state-machine/index.js +14 -11
- package/dist/es/store/bound.js +24 -26
- package/dist/es/store/index.js +11 -5
- package/dist/es/store/unbound.js +44 -63
- package/dist/es/store/use-deep.js +10 -11
- package/package.json +3 -3
package/dist/es/http/errors.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
class BusinessError extends Error {
|
|
1
|
+
class o extends Error {
|
|
3
2
|
/**
|
|
4
3
|
* The business error code from the API response.
|
|
5
4
|
*/
|
|
@@ -8,12 +7,10 @@ class BusinessError extends Error {
|
|
|
8
7
|
* The original API response data.
|
|
9
8
|
*/
|
|
10
9
|
data;
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
13
|
-
this.name = "BusinessError";
|
|
14
|
-
this.code = code;
|
|
15
|
-
this.data = data;
|
|
10
|
+
constructor(s, r, e) {
|
|
11
|
+
super(r), this.name = "BusinessError", this.code = s, this.data = e;
|
|
16
12
|
}
|
|
17
13
|
}
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
export {
|
|
15
|
+
o as BusinessError
|
|
16
|
+
};
|
package/dist/es/http/helpers.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function createHttpClient(options) {
|
|
6
|
-
return Object.freeze(new HttpClient(options));
|
|
1
|
+
import { HttpClient as t } from "./client.js";
|
|
2
|
+
import { BusinessError as e } from "./errors.js";
|
|
3
|
+
function o(r) {
|
|
4
|
+
return Object.freeze(new t(r));
|
|
7
5
|
}
|
|
8
|
-
function
|
|
9
|
-
return
|
|
6
|
+
function s(r) {
|
|
7
|
+
return r instanceof e;
|
|
10
8
|
}
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
export {
|
|
10
|
+
o as createHttpClient,
|
|
11
|
+
s as isBusinessError
|
|
12
|
+
};
|
package/dist/es/http/index.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
1
|
+
import { HttpClient as r, skipAuthenticationHeader as i, skipAuthenticationValue as o } from "./client.js";
|
|
2
|
+
import { BusinessError as n } from "./errors.js";
|
|
3
|
+
import { createHttpClient as a, isBusinessError as u } from "./helpers.js";
|
|
4
|
+
export {
|
|
5
|
+
n as BusinessError,
|
|
6
|
+
r as HttpClient,
|
|
7
|
+
a as createHttpClient,
|
|
8
|
+
u as isBusinessError,
|
|
9
|
+
i as skipAuthenticationHeader,
|
|
10
|
+
o as skipAuthenticationValue
|
|
11
|
+
};
|
package/dist/es/immer/index.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { enableMapSet as e, enablePatches as r, setAutoFreeze as t } from "immer";
|
|
2
|
+
import { applyPatches as c, current as m, original as p, produce as u, produceWithPatches as i } from "immer";
|
|
3
|
+
import { useImmer as n, useImmerReducer as f } from "use-immer";
|
|
4
|
+
e();
|
|
5
|
+
r();
|
|
6
|
+
t(!1);
|
|
7
|
+
export {
|
|
8
|
+
c as applyPatches,
|
|
9
|
+
m as currentState,
|
|
10
|
+
p as originalState,
|
|
11
|
+
u as produce,
|
|
12
|
+
i as produceWithPatches,
|
|
13
|
+
n as useImmer,
|
|
14
|
+
f as useImmerReducer
|
|
15
|
+
};
|
package/dist/es/index.js
CHANGED
|
@@ -1,43 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
import
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export {
|
|
43
|
-
|
|
1
|
+
import "./api/index.js";
|
|
2
|
+
import "./auth/index.js";
|
|
3
|
+
import "./common/index.js";
|
|
4
|
+
import "./context/index.js";
|
|
5
|
+
import "./dnd/index.js";
|
|
6
|
+
import "./http/index.js";
|
|
7
|
+
import "./immer/index.js";
|
|
8
|
+
import "./motion/index.js";
|
|
9
|
+
import "./query/index.js";
|
|
10
|
+
import "./state/index.js";
|
|
11
|
+
import { useActor as l } from "./state-machine/index.js";
|
|
12
|
+
import "./store/index.js";
|
|
13
|
+
import { clsx as d } from "clsx";
|
|
14
|
+
import { ApiClient as g } from "./api/client.js";
|
|
15
|
+
import { createApiClient as y } from "./api/helpers.js";
|
|
16
|
+
import { checkPermission as h } from "./auth/helpers.js";
|
|
17
|
+
import { ApiClientProvider as M, useApiClient as C } from "./context/api-client.js";
|
|
18
|
+
import { AppContextProvider as R, useAppContext as b } from "./context/app.js";
|
|
19
|
+
import { createContextWithSelector as w } from "./context/context-selector.js";
|
|
20
|
+
import { DisabledProvider as Q, useDisabled as V } from "./context/disabled.js";
|
|
21
|
+
import { AxisModifier as B, RestrictToHorizontalAxis as E, RestrictToVerticalAxis as H, SnapModifier as z, restrictShapeToBoundingRectangle as F } from "@dnd-kit/abstract/modifiers";
|
|
22
|
+
import { DragDropContext as K, Draggable as L, Droppable as O } from "@hello-pangea/dnd";
|
|
23
|
+
import { DragDropProvider as q, DragOverlay as J, KeyboardSensor as N, PointerSensor as U, useDragDropMonitor as X, useDraggable as Y, useDroppable as Z } from "@dnd-kit/react";
|
|
24
|
+
import { arrayMove as $, move as ee, arraySwap as re, swap as oe } from "@dnd-kit/helpers";
|
|
25
|
+
import { RestrictToElement as ae, RestrictToWindow as ie } from "@dnd-kit/dom/modifiers";
|
|
26
|
+
import { useSortable as se } from "@dnd-kit/react/sortable";
|
|
27
|
+
import { skipAuthenticationHeader as ue, skipAuthenticationValue as ne } from "./http/client.js";
|
|
28
|
+
import { applyPatches as xe, current as fe, original as le, produce as Ae, produceWithPatches as de } from "immer";
|
|
29
|
+
import { useImmer as ge, useImmerReducer as De } from "use-immer";
|
|
30
|
+
import { AnimatePresence as Pe, LayoutGroup as he, Reorder as ve, useInView as Me } from "motion/react";
|
|
31
|
+
import * as c from "motion/react-m";
|
|
32
|
+
import { default as Ie } from "./motion/motion-provider.js";
|
|
33
|
+
import { keepPreviousData as be, matchMutation as ke, matchQuery as we, skipToken as Te, useQueryErrorResetBoundary as Qe } from "@tanstack/react-query";
|
|
34
|
+
import { useInfiniteQuery as We, useIsFetching as Be, useIsMutating as Ee, useMutation as He, useMutationState as ze, useQueries as Fe, useQuery as Ge } from "./query/hooks.js";
|
|
35
|
+
import { Provider as Le, atom as Oe, createStore as je, getDefaultStore as qe, useAtom as Je, useStore as Ne, useAtomValue as Ue, useSetAtom as Xe } from "jotai";
|
|
36
|
+
import { Actor as Ze, createActor as _e, createMachine as $e, assign as er } from "xstate";
|
|
37
|
+
import { useActorRef as or } from "@xstate/react";
|
|
38
|
+
import { createComponentStore as ar } from "./store/unbound.js";
|
|
39
|
+
import { createPersistedStore as pr, createStore as sr } from "./store/bound.js";
|
|
40
|
+
import { useDeep as ur } from "./store/use-deep.js";
|
|
41
|
+
import { useShallow as cr } from "zustand/shallow";
|
|
42
|
+
export {
|
|
43
|
+
Ze as Actor,
|
|
44
|
+
Pe as AnimatePresence,
|
|
45
|
+
g as ApiClient,
|
|
46
|
+
M as ApiClientProvider,
|
|
47
|
+
R as AppContextProvider,
|
|
48
|
+
Le as AtomStoreProvider,
|
|
49
|
+
B as AxisModifier,
|
|
50
|
+
Q as DisabledProvider,
|
|
51
|
+
K as DragDropContext,
|
|
52
|
+
q as DragDropProvider,
|
|
53
|
+
J as DragOverlay,
|
|
54
|
+
L as Draggable,
|
|
55
|
+
O as Droppable,
|
|
56
|
+
N as KeyboardSensor,
|
|
57
|
+
he as LayoutGroup,
|
|
58
|
+
Ie as MotionProvider,
|
|
59
|
+
U as PointerSensor,
|
|
60
|
+
ve as Reorder,
|
|
61
|
+
ae as RestrictToElement,
|
|
62
|
+
E as RestrictToHorizontalAxis,
|
|
63
|
+
H as RestrictToVerticalAxis,
|
|
64
|
+
ie as RestrictToWindow,
|
|
65
|
+
z as SnapModifier,
|
|
66
|
+
xe as applyPatches,
|
|
67
|
+
Oe as atom,
|
|
68
|
+
h as checkPermission,
|
|
69
|
+
d as clsx,
|
|
70
|
+
_e as createActor,
|
|
71
|
+
y as createApiClient,
|
|
72
|
+
je as createAtomStore,
|
|
73
|
+
ar as createComponentStore,
|
|
74
|
+
w as createContextWithSelector,
|
|
75
|
+
$e as createMachine,
|
|
76
|
+
pr as createPersistedStore,
|
|
77
|
+
sr as createStore,
|
|
78
|
+
fe as currentState,
|
|
79
|
+
qe as getDefaultAtomStore,
|
|
80
|
+
be as keepPreviousData,
|
|
81
|
+
ke as matchMutation,
|
|
82
|
+
we as matchQuery,
|
|
83
|
+
c as motion,
|
|
84
|
+
$ as moveArrayItem,
|
|
85
|
+
ee as moveDragItem,
|
|
86
|
+
le as originalState,
|
|
87
|
+
Ae as produce,
|
|
88
|
+
de as produceWithPatches,
|
|
89
|
+
F as restrictShapeToBoundingRectangle,
|
|
90
|
+
ue as skipAuthenticationHeader,
|
|
91
|
+
ne as skipAuthenticationValue,
|
|
92
|
+
Te as skipQueryToken,
|
|
93
|
+
re as swapArrayItem,
|
|
94
|
+
oe as swapDragItem,
|
|
95
|
+
er as updateContext,
|
|
96
|
+
l as useActor,
|
|
97
|
+
or as useActorRef,
|
|
98
|
+
C as useApiClient,
|
|
99
|
+
b as useAppContext,
|
|
100
|
+
Je as useAtom,
|
|
101
|
+
Ne as useAtomStore,
|
|
102
|
+
Ue as useAtomValue,
|
|
103
|
+
ur as useDeep,
|
|
104
|
+
V as useDisabled,
|
|
105
|
+
X as useDragDropMonitor,
|
|
106
|
+
Y as useDraggable,
|
|
107
|
+
Z as useDroppable,
|
|
108
|
+
ge as useImmer,
|
|
109
|
+
De as useImmerReducer,
|
|
110
|
+
Me as useInView,
|
|
111
|
+
We as useInfiniteQuery,
|
|
112
|
+
Be as useIsFetching,
|
|
113
|
+
Ee as useIsMutating,
|
|
114
|
+
He as useMutation,
|
|
115
|
+
ze as useMutationState,
|
|
116
|
+
Fe as useQueries,
|
|
117
|
+
Ge as useQuery,
|
|
118
|
+
Qe as useQueryErrorResetBoundary,
|
|
119
|
+
Xe as useSetAtom,
|
|
120
|
+
cr as useShallow,
|
|
121
|
+
se as useSortable
|
|
122
|
+
};
|
package/dist/es/motion/index.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { default as t } from "./motion-provider.js";
|
|
2
|
+
import { AnimatePresence as i, LayoutGroup as m, Reorder as n, useInView as p } from "motion/react";
|
|
3
|
+
import * as o from "motion/react-m";
|
|
4
|
+
export {
|
|
5
|
+
i as AnimatePresence,
|
|
6
|
+
m as LayoutGroup,
|
|
7
|
+
t as MotionProvider,
|
|
8
|
+
n as Reorder,
|
|
9
|
+
o as motion,
|
|
10
|
+
p as useInView
|
|
11
|
+
};
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const loadFeatures = () => import('./features.js').then((result) => result.default);
|
|
8
|
-
const defaultTransition = {
|
|
1
|
+
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { generateId as r } from "@vef-framework/shared";
|
|
3
|
+
import { LazyMotion as n, MotionConfig as i } from "motion/react";
|
|
4
|
+
import { useMemo as a } from "react";
|
|
5
|
+
const s = () => import("./features.js").then((o) => o.default), u = {
|
|
9
6
|
duration: 0.2,
|
|
10
7
|
ease: "easeInOut"
|
|
11
8
|
};
|
|
12
|
-
function
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
9
|
+
function p({ children: o }) {
|
|
10
|
+
const e = a(() => r(), []);
|
|
11
|
+
return /* @__PURE__ */ t(n, { features: s, children: /* @__PURE__ */ t(
|
|
12
|
+
i,
|
|
16
13
|
{
|
|
17
|
-
nonce,
|
|
14
|
+
nonce: e,
|
|
18
15
|
reducedMotion: "user",
|
|
19
|
-
transition:
|
|
20
|
-
children
|
|
16
|
+
transition: u,
|
|
17
|
+
children: o
|
|
21
18
|
}
|
|
22
19
|
) });
|
|
23
20
|
}
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
export {
|
|
22
|
+
p as default
|
|
23
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const _ = "__vef_query_client_key";
|
|
2
|
+
export {
|
|
3
|
+
_ as QUERY_CLIENT_KEY
|
|
4
|
+
};
|
package/dist/es/query/helpers.js
CHANGED
|
@@ -1,60 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function createQueryClient(options) {
|
|
1
|
+
import { MutationCache as f, QueryClient as m, matchQuery as y } from "@tanstack/react-query";
|
|
2
|
+
import { keepPreviousData as b } from "@tanstack/react-query";
|
|
3
|
+
import { isPlainObject as w, hashKey as p } from "@vef-framework/shared";
|
|
4
|
+
function g(s) {
|
|
7
5
|
const {
|
|
8
|
-
staleTime = 5e3,
|
|
9
|
-
gcTime = 3e5,
|
|
10
|
-
showSuccessMessage
|
|
11
|
-
} =
|
|
12
|
-
function
|
|
13
|
-
return new
|
|
14
|
-
onSuccess: async (
|
|
15
|
-
const { invalidates:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
if (shouldShowSuccessFeedback && isPlainObject(data) && Object.hasOwn(data, "message")) {
|
|
26
|
-
showSuccessMessage?.(data.message);
|
|
27
|
-
}
|
|
6
|
+
staleTime: a = 5e3,
|
|
7
|
+
gcTime: t = 3e5,
|
|
8
|
+
showSuccessMessage: o
|
|
9
|
+
} = s ?? {};
|
|
10
|
+
function u() {
|
|
11
|
+
return new f({
|
|
12
|
+
onSuccess: async (e, O, d, i) => {
|
|
13
|
+
const { invalidates: n, shouldShowSuccessFeedback: c = !0 } = i.meta ?? {};
|
|
14
|
+
n && await r.invalidateQueries({
|
|
15
|
+
stale: !1,
|
|
16
|
+
type: "active",
|
|
17
|
+
predicate(l) {
|
|
18
|
+
return n.some((h) => y({ queryKey: h }, l));
|
|
19
|
+
}
|
|
20
|
+
}), c && w(e) && Object.hasOwn(e, "message") && o?.(e.message);
|
|
28
21
|
}
|
|
29
22
|
});
|
|
30
23
|
}
|
|
31
|
-
const
|
|
32
|
-
mutationCache:
|
|
24
|
+
const r = new m({
|
|
25
|
+
mutationCache: u(),
|
|
33
26
|
defaultOptions: {
|
|
34
27
|
queries: {
|
|
35
|
-
staleTime,
|
|
36
|
-
gcTime,
|
|
28
|
+
staleTime: a,
|
|
29
|
+
gcTime: t,
|
|
37
30
|
networkMode: "online",
|
|
38
|
-
retry:
|
|
39
|
-
structuralSharing:
|
|
40
|
-
throwOnError:
|
|
41
|
-
refetchOnMount:
|
|
42
|
-
refetchOnReconnect:
|
|
43
|
-
refetchOnWindowFocus:
|
|
44
|
-
retryOnMount:
|
|
45
|
-
queryKeyHashFn:
|
|
31
|
+
retry: !1,
|
|
32
|
+
structuralSharing: !0,
|
|
33
|
+
throwOnError: !1,
|
|
34
|
+
refetchOnMount: !0,
|
|
35
|
+
refetchOnReconnect: !0,
|
|
36
|
+
refetchOnWindowFocus: !0,
|
|
37
|
+
retryOnMount: !0,
|
|
38
|
+
queryKeyHashFn: p,
|
|
46
39
|
// eslint-disable-next-line camelcase
|
|
47
|
-
experimental_prefetchInRender:
|
|
40
|
+
experimental_prefetchInRender: !0
|
|
48
41
|
},
|
|
49
42
|
mutations: {
|
|
50
|
-
gcTime,
|
|
43
|
+
gcTime: t,
|
|
51
44
|
networkMode: "online",
|
|
52
|
-
retry:
|
|
53
|
-
throwOnError:
|
|
45
|
+
retry: !1,
|
|
46
|
+
throwOnError: !1
|
|
54
47
|
}
|
|
55
48
|
}
|
|
56
49
|
});
|
|
57
|
-
return
|
|
50
|
+
return r;
|
|
58
51
|
}
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
export {
|
|
53
|
+
g as createQueryClient,
|
|
54
|
+
b as keepPreviousData
|
|
55
|
+
};
|
package/dist/es/query/hooks.js
CHANGED
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function useQuery(options) {
|
|
6
|
-
return useQuery$1(options);
|
|
1
|
+
import { useQuery as u, useInfiniteQuery as t, useQueries as n, useMutation as s, useMutationState as r, useIsFetching as i, useIsMutating as a } from "@tanstack/react-query";
|
|
2
|
+
import { matchMutation as m, matchQuery as p, skipToken as k, useQueryErrorResetBoundary as F } from "@tanstack/react-query";
|
|
3
|
+
function c(e) {
|
|
4
|
+
return u(e);
|
|
7
5
|
}
|
|
8
|
-
function
|
|
9
|
-
return
|
|
6
|
+
function f(e) {
|
|
7
|
+
return t(e);
|
|
10
8
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
9
|
+
function Q(e) {
|
|
10
|
+
return n(e);
|
|
13
11
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
12
|
+
function y(e) {
|
|
13
|
+
return s(e);
|
|
16
14
|
}
|
|
17
|
-
function
|
|
18
|
-
return
|
|
15
|
+
function M(e) {
|
|
16
|
+
return r(e);
|
|
19
17
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
18
|
+
function I(e) {
|
|
19
|
+
return i(e);
|
|
22
20
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
21
|
+
function $(e) {
|
|
22
|
+
return a(e);
|
|
25
23
|
}
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
export {
|
|
25
|
+
m as matchMutation,
|
|
26
|
+
p as matchQuery,
|
|
27
|
+
k as skipQueryToken,
|
|
28
|
+
f as useInfiniteQuery,
|
|
29
|
+
I as useIsFetching,
|
|
30
|
+
$ as useIsMutating,
|
|
31
|
+
y as useMutation,
|
|
32
|
+
M as useMutationState,
|
|
33
|
+
Q as useQueries,
|
|
34
|
+
c as useQuery,
|
|
35
|
+
F as useQueryErrorResetBoundary
|
|
36
|
+
};
|
package/dist/es/query/index.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export {
|
|
1
|
+
import { QUERY_CLIENT_KEY as u } from "./constants.js";
|
|
2
|
+
import { createQueryClient as s } from "./helpers.js";
|
|
3
|
+
import { useInfiniteQuery as o, useIsFetching as n, useIsMutating as a, useMutation as Q, useMutationState as f, useQueries as I, useQuery as m } from "./hooks.js";
|
|
4
|
+
export {
|
|
5
|
+
u as QUERY_CLIENT_KEY,
|
|
6
|
+
s as createQueryClient,
|
|
7
|
+
o as useInfiniteQuery,
|
|
8
|
+
n as useIsFetching,
|
|
9
|
+
a as useIsMutating,
|
|
10
|
+
Q as useMutation,
|
|
11
|
+
f as useMutationState,
|
|
12
|
+
I as useQueries,
|
|
13
|
+
m as useQuery
|
|
14
|
+
};
|
package/dist/es/state/index.js
CHANGED
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
import { Provider as o, atom as r, createStore as a, getDefaultStore as m, useAtom as s, useStore as u, useAtomValue as S, useSetAtom as A } from "jotai";
|
|
2
|
+
export {
|
|
3
|
+
o as AtomStoreProvider,
|
|
4
|
+
r as atom,
|
|
5
|
+
a as createAtomStore,
|
|
6
|
+
m as getDefaultAtomStore,
|
|
7
|
+
s as useAtom,
|
|
8
|
+
u as useAtomStore,
|
|
9
|
+
S as useAtomValue,
|
|
10
|
+
A as useSetAtom
|
|
11
|
+
};
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
import { useActorRef
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const actorRef = useActorRef(logic, options);
|
|
8
|
-
const selected = useSelector(actorRef, selector, Object.is);
|
|
9
|
-
return [selected, actorRef.send, actorRef];
|
|
1
|
+
import { useActorRef as c, useSelector as s } from "@xstate/react";
|
|
2
|
+
import { useActorRef as p } from "@xstate/react";
|
|
3
|
+
import { Actor as d, createActor as m, createMachine as x, assign as l } from "xstate";
|
|
4
|
+
function f(t, o, ...[r]) {
|
|
5
|
+
const e = c(t, r);
|
|
6
|
+
return [s(e, o, Object.is), e.send, e];
|
|
10
7
|
}
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
export {
|
|
9
|
+
d as Actor,
|
|
10
|
+
m as createActor,
|
|
11
|
+
x as createMachine,
|
|
12
|
+
l as updateContext,
|
|
13
|
+
f as useActor,
|
|
14
|
+
p as useActorRef
|
|
15
|
+
};
|
package/dist/es/store/bound.js
CHANGED
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
subscribeWithSelector(
|
|
10
|
-
immer(initializer)
|
|
1
|
+
import { identity as c, constantCase as m } from "@vef-framework/shared";
|
|
2
|
+
import { create as r } from "zustand";
|
|
3
|
+
import { subscribeWithSelector as o, persist as S, createJSONStorage as u } from "zustand/middleware";
|
|
4
|
+
import { immer as s } from "zustand/middleware/immer";
|
|
5
|
+
function b(e) {
|
|
6
|
+
return r()(
|
|
7
|
+
o(
|
|
8
|
+
s(e)
|
|
11
9
|
)
|
|
12
10
|
);
|
|
13
|
-
return useStore;
|
|
14
11
|
}
|
|
15
|
-
function
|
|
12
|
+
function d(e, t) {
|
|
16
13
|
const {
|
|
17
|
-
name,
|
|
18
|
-
storage,
|
|
19
|
-
selector
|
|
20
|
-
} =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
name: a,
|
|
15
|
+
storage: i,
|
|
16
|
+
selector: n
|
|
17
|
+
} = t;
|
|
18
|
+
return r()(
|
|
19
|
+
o(
|
|
20
|
+
S(
|
|
21
|
+
s(e),
|
|
25
22
|
{
|
|
26
|
-
name: `__VEF_STORE__${
|
|
23
|
+
name: `__VEF_STORE__${m(a)}__`,
|
|
27
24
|
version: 1,
|
|
28
|
-
storage:
|
|
29
|
-
partialize:
|
|
25
|
+
storage: u(() => i === "local" ? localStorage : sessionStorage),
|
|
26
|
+
partialize: n ?? c
|
|
30
27
|
}
|
|
31
28
|
)
|
|
32
29
|
)
|
|
33
30
|
);
|
|
34
|
-
return useStore;
|
|
35
31
|
}
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
export {
|
|
33
|
+
d as createPersistedStore,
|
|
34
|
+
b as createStore
|
|
35
|
+
};
|