@vef-framework/core 2.0.10 → 2.1.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/cjs/_internal/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/ai/index.cjs +1 -0
- package/dist/cjs/api/client.cjs +1 -1
- package/dist/cjs/api/constants.cjs +1 -1
- package/dist/cjs/api/helpers.cjs +1 -1
- package/dist/cjs/api/index.cjs +1 -1
- package/dist/cjs/auth/helpers.cjs +1 -1
- package/dist/cjs/auth/index.cjs +1 -1
- package/dist/cjs/context/api-client.cjs +1 -1
- package/dist/cjs/context/app.cjs +1 -1
- package/dist/cjs/context/context-selector.cjs +1 -1
- package/dist/cjs/context/disabled.cjs +1 -1
- package/dist/cjs/context/index.cjs +1 -1
- package/dist/cjs/dnd/index.cjs +1 -1
- package/dist/cjs/http/client.cjs +1 -1
- package/dist/cjs/http/constants.cjs +1 -0
- package/dist/cjs/http/errors.cjs +1 -1
- package/dist/cjs/http/helpers.cjs +1 -1
- package/dist/cjs/http/index.cjs +1 -1
- package/dist/cjs/immer/index.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/motion/features.cjs +1 -1
- package/dist/cjs/motion/index.cjs +1 -1
- package/dist/cjs/motion/motion-provider.cjs +1 -1
- package/dist/cjs/query/constants.cjs +1 -1
- package/dist/cjs/query/helpers.cjs +1 -1
- package/dist/cjs/query/hooks.cjs +1 -1
- package/dist/cjs/query/index.cjs +1 -1
- package/dist/cjs/sse/client.cjs +1 -0
- package/dist/cjs/sse/helpers.cjs +1 -0
- package/dist/cjs/sse/index.cjs +1 -0
- package/dist/cjs/state/index.cjs +1 -1
- package/dist/cjs/state-machine/index.cjs +1 -1
- package/dist/cjs/store/bound.cjs +1 -1
- package/dist/cjs/store/index.cjs +1 -1
- package/dist/cjs/store/unbound.cjs +1 -3
- package/dist/cjs/store/use-deep.cjs +1 -1
- package/dist/es/ai/index.js +3 -0
- package/dist/es/api/client.js +72 -147
- package/dist/es/api/constants.js +14 -7
- package/dist/es/api/helpers.js +7 -6
- package/dist/es/api/index.js +4 -8
- package/dist/es/auth/helpers.js +9 -9
- package/dist/es/auth/index.js +2 -4
- package/dist/es/context/api-client.js +21 -17
- package/dist/es/context/app.js +8 -8
- package/dist/es/context/context-selector.js +38 -50
- package/dist/es/context/disabled.js +9 -9
- package/dist/es/context/index.js +5 -13
- package/dist/es/dnd/index.js +8 -30
- package/dist/es/http/client.js +186 -359
- package/dist/es/http/constants.js +5 -0
- package/dist/es/http/errors.js +10 -15
- package/dist/es/http/helpers.js +8 -11
- package/dist/es/http/index.js +5 -11
- package/dist/es/immer/index.js +6 -15
- package/dist/es/index.js +27 -122
- package/dist/es/motion/features.js +3 -4
- package/dist/es/motion/index.js +5 -11
- package/dist/es/motion/motion-provider.js +22 -21
- package/dist/es/query/constants.js +5 -4
- package/dist/es/query/helpers.js +40 -54
- package/dist/es/query/hooks.js +18 -28
- package/dist/es/query/index.js +4 -14
- package/dist/es/sse/client.js +121 -0
- package/dist/es/sse/helpers.js +8 -0
- package/dist/es/sse/index.js +3 -0
- package/dist/es/state/index.js +3 -11
- package/dist/es/state-machine/index.js +13 -14
- package/dist/es/store/bound.js +18 -33
- package/dist/es/store/index.js +6 -11
- package/dist/es/store/unbound.js +43 -50
- package/dist/es/store/use-deep.js +12 -11
- package/dist/types/ai/index.d.ts +6 -0
- package/dist/types/api/client.d.ts +15 -35
- package/dist/types/api/constants.d.ts +7 -3
- package/dist/types/api/index.d.ts +1 -1
- package/dist/types/auth/helpers.d.ts +5 -5
- package/dist/types/auth/index.d.ts +2 -2
- package/dist/types/common/index.d.ts +1 -1
- package/dist/types/common/types.d.ts +3 -0
- package/dist/types/context/api-client.d.ts +9 -10
- package/dist/types/context/app.d.ts +9 -1
- package/dist/types/context/context-selector.d.ts +7 -19
- package/dist/types/context/disabled.d.ts +2 -2
- package/dist/types/context/index.d.ts +3 -2
- package/dist/types/context/types.d.ts +0 -1
- package/dist/types/dnd/index.d.ts +4 -2
- package/dist/types/http/client.d.ts +39 -71
- package/dist/types/http/constants.d.ts +24 -0
- package/dist/types/http/index.d.ts +2 -1
- package/dist/types/index.d.ts +4 -2
- package/dist/types/motion/index.d.ts +2 -2
- package/dist/types/motion/motion-provider.d.ts +8 -3
- package/dist/types/query/helpers.d.ts +1 -4
- package/dist/types/query/hooks.d.ts +6 -45
- package/dist/types/query/types.d.ts +12 -12
- package/dist/types/src/ai/index.d.ts +6 -0
- package/dist/types/src/api/client.d.ts +55 -0
- package/dist/types/src/api/constants.d.ts +12 -0
- package/dist/types/src/api/helpers.d.ts +9 -0
- package/dist/types/src/api/index.d.ts +4 -0
- package/dist/types/src/api/types.d.ts +48 -0
- package/dist/types/src/auth/helpers.d.ts +11 -0
- package/dist/types/src/auth/index.d.ts +2 -0
- package/dist/types/src/auth/types.d.ts +1 -0
- package/dist/types/src/common/index.d.ts +1 -0
- package/dist/types/src/common/types.d.ts +98 -0
- package/dist/types/src/context/api-client.d.ts +17 -0
- package/dist/types/src/context/app.d.ts +12 -0
- package/dist/types/src/context/context-selector.d.ts +32 -0
- package/dist/types/src/context/disabled.d.ts +9 -0
- package/dist/types/src/context/index.d.ts +6 -0
- package/dist/types/src/context/types.d.ts +26 -0
- package/dist/types/src/dnd/index.d.ts +8 -0
- package/dist/types/src/http/client.d.ts +112 -0
- package/dist/types/src/http/constants.d.ts +24 -0
- package/dist/types/src/http/errors.d.ts +14 -0
- package/dist/types/src/http/helpers.d.ts +17 -0
- package/dist/types/src/http/index.d.ts +5 -0
- package/dist/types/src/http/types.d.ts +101 -0
- package/dist/types/src/immer/index.d.ts +2 -0
- package/dist/types/src/index.d.ts +16 -0
- package/dist/types/src/motion/features.d.ts +1 -0
- package/dist/types/src/motion/index.d.ts +4 -0
- package/dist/types/src/motion/motion-provider.d.ts +10 -0
- package/dist/types/src/query/constants.d.ts +1 -0
- package/dist/types/src/query/helpers.d.ts +7 -0
- package/dist/types/src/query/hooks.d.ts +27 -0
- package/dist/types/src/query/index.d.ts +4 -0
- package/dist/types/src/query/types.d.ts +51 -0
- package/dist/types/src/sse/client.d.ts +16 -0
- package/dist/types/src/sse/helpers.d.ts +9 -0
- package/dist/types/src/sse/index.d.ts +3 -0
- package/dist/types/src/sse/types.d.ts +98 -0
- package/dist/types/src/state/index.d.ts +1 -0
- package/dist/types/src/state-machine/index.d.ts +15 -0
- package/dist/types/src/store/bound.d.ts +28 -0
- package/dist/types/src/store/index.d.ts +5 -0
- package/dist/types/src/store/types.d.ts +50 -0
- package/dist/types/src/store/unbound.d.ts +26 -0
- package/dist/types/src/store/use-deep.d.ts +8 -0
- package/dist/types/sse/client.d.ts +16 -0
- package/dist/types/sse/helpers.d.ts +9 -0
- package/dist/types/sse/index.d.ts +3 -0
- package/dist/types/sse/types.d.ts +98 -0
- package/dist/types/state-machine/index.d.ts +2 -1
- package/dist/types/store/unbound.d.ts +6 -6
- package/dist/types/store/use-deep.d.ts +4 -3
- package/package.json +18 -16
- package/dist/cjs/common/index.cjs +0 -1
- package/dist/es/common/index.js +0 -1
package/dist/es/index.js
CHANGED
|
@@ -1,122 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
import "./
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
11
|
-
import {
|
|
12
|
-
import "./
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
|
|
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
|
-
};
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { DefaultChatTransport as e, TextStreamChatTransport as t, getToolName as n, getToolOrDynamicToolName as r, isDataUIPart as i, isDeepEqualData as a, isFileUIPart as o, isReasoningUIPart as s, isTextUIPart as c, isToolOrDynamicToolUIPart as l, isToolUIPart as u, parsePartialJson as d } from "./ai/index.js";
|
|
3
|
+
import { SKIP_AUTH_HEADER as f, SKIP_AUTH_VALUE as p } from "./http/constants.js";
|
|
4
|
+
import { keepPreviousData as m } from "./query/helpers.js";
|
|
5
|
+
import { matchMutation as h, matchQuery as g, skipQueryToken as _, useInfiniteQuery as v, useIsFetching as y, useIsMutating as b, useMutation as x, useMutationState as S, useQueries as C, useQuery as w, useQueryErrorResetBoundary as T } from "./query/hooks.js";
|
|
6
|
+
import { HTTP_CLIENT as E, QUERY_CLIENT as D } from "./api/constants.js";
|
|
7
|
+
import { ApiClient as O } from "./api/client.js";
|
|
8
|
+
import { createApiClient as k } from "./api/helpers.js";
|
|
9
|
+
import { checkPermission as A } from "./auth/helpers.js";
|
|
10
|
+
import { ApiClientProvider as j, useApiClient as M } from "./context/api-client.js";
|
|
11
|
+
import { AppContextProvider as N, useAppContext as P } from "./context/app.js";
|
|
12
|
+
import { createContextWithSelector as F } from "./context/context-selector.js";
|
|
13
|
+
import { DisabledProvider as I, useDisabled as L } from "./context/disabled.js";
|
|
14
|
+
import { AxisModifier as R, DragDropContext as z, DragDropProvider as B, DragOverlay as V, Draggable as H, Droppable as U, KeyboardSensor as W, PointerSensor as G, RestrictToElement as K, RestrictToHorizontalAxis as q, RestrictToVerticalAxis as J, RestrictToWindow as Y, SnapModifier as X, moveArrayItem as Z, moveDragItem as Q, restrictShapeToBoundingRectangle as $, swapArrayItem as ee, swapDragItem as te, useDragDropMonitor as ne, useDraggable as re, useDroppable as ie, useSortable as ae } from "./dnd/index.js";
|
|
15
|
+
import { applyPatches as oe, currentState as se, originalState as ce, produce as le, produceWithPatches as ue, useImmer as de, useImmerReducer as fe } from "./immer/index.js";
|
|
16
|
+
import pe from "./motion/motion-provider.js";
|
|
17
|
+
import { AnimatePresence as me, LayoutGroup as he, Reorder as ge, motion as _e, useDragControls as ve, useInView as ye } from "./motion/index.js";
|
|
18
|
+
import { SseClient as be } from "./sse/client.js";
|
|
19
|
+
import { createSseClient as xe } from "./sse/helpers.js";
|
|
20
|
+
import { AtomStoreProvider as Se, atom as Ce, createAtomStore as we, getDefaultAtomStore as Te, useAtom as Ee, useAtomStore as De, useAtomValue as Oe, useSetAtom as ke } from "./state/index.js";
|
|
21
|
+
import { Actor as Ae, createActor as je, createMachine as Me, updateContext as Ne, useActor as Pe, useActorRef as Fe } from "./state-machine/index.js";
|
|
22
|
+
import { createPersistedStore as Ie, createStore as Le } from "./store/bound.js";
|
|
23
|
+
import { createComponentStore as Re } from "./store/unbound.js";
|
|
24
|
+
import { useDeep as ze } from "./store/use-deep.js";
|
|
25
|
+
import { useShallow as Be } from "./store/index.js";
|
|
26
|
+
import { clsx as Ve } from "clsx";
|
|
27
|
+
export { Ae as Actor, me as AnimatePresence, O as ApiClient, j as ApiClientProvider, N as AppContextProvider, Se as AtomStoreProvider, R as AxisModifier, e as DefaultChatTransport, I as DisabledProvider, z as DragDropContext, B as DragDropProvider, V as DragOverlay, H as Draggable, U as Droppable, E as HTTP_CLIENT, W as KeyboardSensor, he as LayoutGroup, pe as MotionProvider, G as PointerSensor, D as QUERY_CLIENT, ge as Reorder, K as RestrictToElement, q as RestrictToHorizontalAxis, J as RestrictToVerticalAxis, Y as RestrictToWindow, X as SnapModifier, be as SseClient, t as TextStreamChatTransport, oe as applyPatches, Ce as atom, A as checkPermission, Ve as clsx, je as createActor, k as createApiClient, we as createAtomStore, Re as createComponentStore, F as createContextWithSelector, Me as createMachine, Ie as createPersistedStore, xe as createSseClient, Le as createStore, se as currentState, Te as getDefaultAtomStore, n as getToolName, r as getToolOrDynamicToolName, i as isDataUIPart, a as isDeepEqualData, o as isFileUIPart, s as isReasoningUIPart, c as isTextUIPart, l as isToolOrDynamicToolUIPart, u as isToolUIPart, m as keepPreviousData, h as matchMutation, g as matchQuery, _e as motion, Z as moveArrayItem, Q as moveDragItem, ce as originalState, d as parsePartialJson, le as produce, ue as produceWithPatches, $ as restrictShapeToBoundingRectangle, f as skipAuthenticationHeader, p as skipAuthenticationValue, _ as skipQueryToken, ee as swapArrayItem, te as swapDragItem, Ne as updateContext, Pe as useActor, Fe as useActorRef, M as useApiClient, P as useAppContext, Ee as useAtom, De as useAtomStore, Oe as useAtomValue, ze as useDeep, L as useDisabled, ve as useDragControls, ne as useDragDropMonitor, re as useDraggable, ie as useDroppable, de as useImmer, fe as useImmerReducer, ye as useInView, v as useInfiniteQuery, y as useIsFetching, b as useIsMutating, x as useMutation, S as useMutationState, C as useQueries, w as useQuery, T as useQueryErrorResetBoundary, ke as useSetAtom, Be as useShallow, ae as useSortable };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { domMax as e } from "motion/react";
|
|
3
|
+
export { e as default };
|
package/dist/es/motion/index.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
m as LayoutGroup,
|
|
7
|
-
t as MotionProvider,
|
|
8
|
-
n as Reorder,
|
|
9
|
-
o as motion,
|
|
10
|
-
p as useInView
|
|
11
|
-
};
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import "./motion-provider.js";
|
|
3
|
+
import { AnimatePresence as e, LayoutGroup as t, Reorder as n, useDragControls as r, useInView as i } from "motion/react";
|
|
4
|
+
import * as a from "motion/react-m";
|
|
5
|
+
export { e as AnimatePresence, t as LayoutGroup, n as Reorder, a as motion, r as useDragControls, i as useInView };
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
import { generateId as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { generateId as e } from "@vef-framework/shared";
|
|
3
|
+
import { useState as t } from "react";
|
|
4
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
5
|
+
import { LazyMotion as r, MotionConfig as i } from "motion/react";
|
|
6
|
+
//#region src/motion/motion-provider.tsx
|
|
7
|
+
var a = () => import("./features.js").then((e) => e.default), o = {
|
|
8
|
+
duration: .2,
|
|
9
|
+
ease: "easeInOut"
|
|
8
10
|
};
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
function s({ children: s }) {
|
|
12
|
+
let [c] = t(e);
|
|
13
|
+
return /* @__PURE__ */ n(r, {
|
|
14
|
+
features: a,
|
|
15
|
+
children: /* @__PURE__ */ n(i, {
|
|
16
|
+
nonce: c,
|
|
17
|
+
reducedMotion: "user",
|
|
18
|
+
transition: o,
|
|
19
|
+
children: s
|
|
20
|
+
})
|
|
21
|
+
});
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { s as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
//#region src/query/constants.ts
|
|
3
|
+
var e = "__vef_query_client_key";
|
|
4
|
+
//#endregion
|
|
5
|
+
export { e as QUERY_CLIENT_KEY };
|
package/dist/es/query/helpers.js
CHANGED
|
@@ -1,55 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
// eslint-disable-next-line camelcase
|
|
40
|
-
experimental_prefetchInRender: !0
|
|
41
|
-
},
|
|
42
|
-
mutations: {
|
|
43
|
-
gcTime: t,
|
|
44
|
-
networkMode: "online",
|
|
45
|
-
retry: !1,
|
|
46
|
-
throwOnError: !1
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
return r;
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { hashKey as e, isPlainObject as t } from "@vef-framework/shared";
|
|
3
|
+
import { MutationCache as n, QueryClient as r, keepPreviousData as i, matchQuery as a } from "@tanstack/react-query";
|
|
4
|
+
//#region src/query/helpers.ts
|
|
5
|
+
function o(i) {
|
|
6
|
+
let { staleTime: o = 5e3, gcTime: s = 3e5, showSuccessMessage: c } = i ?? {}, l = new r({
|
|
7
|
+
mutationCache: new n({ onSuccess: async (e, n, r, i) => {
|
|
8
|
+
let { invalidates: o, shouldShowSuccessFeedback: s = !0 } = i.meta ?? {};
|
|
9
|
+
o && await l.invalidateQueries({
|
|
10
|
+
stale: !1,
|
|
11
|
+
type: "all",
|
|
12
|
+
predicate: (e) => o.some((t) => a({ queryKey: t }, e))
|
|
13
|
+
}), s && t(e) && Object.hasOwn(e, "message") && c?.(e.message);
|
|
14
|
+
} }),
|
|
15
|
+
defaultOptions: {
|
|
16
|
+
queries: {
|
|
17
|
+
staleTime: o,
|
|
18
|
+
gcTime: s,
|
|
19
|
+
networkMode: "online",
|
|
20
|
+
retry: !1,
|
|
21
|
+
structuralSharing: !0,
|
|
22
|
+
throwOnError: !1,
|
|
23
|
+
refetchOnMount: !0,
|
|
24
|
+
refetchOnReconnect: !0,
|
|
25
|
+
refetchOnWindowFocus: !0,
|
|
26
|
+
retryOnMount: !0,
|
|
27
|
+
queryKeyHashFn: e,
|
|
28
|
+
experimental_prefetchInRender: !0
|
|
29
|
+
},
|
|
30
|
+
mutations: {
|
|
31
|
+
gcTime: s,
|
|
32
|
+
networkMode: "online",
|
|
33
|
+
retry: !1,
|
|
34
|
+
throwOnError: !1
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
return l;
|
|
51
39
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
b as keepPreviousData
|
|
55
|
-
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { o as createQueryClient, i as keepPreviousData };
|
package/dist/es/query/hooks.js
CHANGED
|
@@ -1,36 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
import { matchMutation as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { matchMutation as e, matchQuery as t, skipToken as n, useInfiniteQuery as r, useIsFetching as i, useIsMutating as a, useMutation as o, useMutationState as s, useQueries as c, useQuery as l, useQueryErrorResetBoundary as u } from "@tanstack/react-query";
|
|
3
|
+
//#region src/query/hooks.ts
|
|
4
|
+
function d(e) {
|
|
5
|
+
return l(e);
|
|
5
6
|
}
|
|
6
7
|
function f(e) {
|
|
7
|
-
|
|
8
|
+
return r(e);
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
10
|
+
function p(e) {
|
|
11
|
+
return c(e);
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
13
|
+
function m(e) {
|
|
14
|
+
return o(e);
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
-
|
|
16
|
+
function h(e) {
|
|
17
|
+
return s(e);
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
-
|
|
19
|
+
function g(e) {
|
|
20
|
+
return i(e);
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
-
|
|
22
|
+
function _(e) {
|
|
23
|
+
return a(e);
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { e as matchMutation, t as matchQuery, n as skipQueryToken, f as useInfiniteQuery, g as useIsFetching, _ as useIsMutating, m as useMutation, h as useMutationState, p as useQueries, d as useQuery, u as useQueryErrorResetBoundary };
|
package/dist/es/query/index.js
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
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
|
-
};
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import "./constants.js";
|
|
3
|
+
import "./helpers.js";
|
|
4
|
+
import "./hooks.js";
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { isString as e } from "@vef-framework/shared";
|
|
3
|
+
import { fetchEventSource as t } from "@microsoft/fetch-event-source";
|
|
4
|
+
//#region src/sse/client.ts
|
|
5
|
+
var n = class extends Error {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("Token expired"), this.name = "TokenExpiredError";
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
function r(e, t) {
|
|
11
|
+
let n = t.toLowerCase();
|
|
12
|
+
return Object.keys(e).some((e) => e.toLowerCase() === n);
|
|
13
|
+
}
|
|
14
|
+
function i(t, n) {
|
|
15
|
+
if (t !== void 0) return e(t) ? t : (r(n, "content-type") || (n["Content-Type"] = "application/json"), JSON.stringify(t));
|
|
16
|
+
}
|
|
17
|
+
var a = class {
|
|
18
|
+
#e;
|
|
19
|
+
#t = /* @__PURE__ */ new Set();
|
|
20
|
+
constructor(e = {}) {
|
|
21
|
+
this.#e = {
|
|
22
|
+
enableRetry: !0,
|
|
23
|
+
maxRetries: 3,
|
|
24
|
+
...e
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
stream(e, t) {
|
|
28
|
+
return this.#n(e, t, !1);
|
|
29
|
+
}
|
|
30
|
+
abort() {
|
|
31
|
+
for (let e of this.#t) e.abort();
|
|
32
|
+
this.#t.clear();
|
|
33
|
+
}
|
|
34
|
+
async #n(e, r, a) {
|
|
35
|
+
let o = new AbortController();
|
|
36
|
+
this.#t.add(o);
|
|
37
|
+
let s = this.#r(e.signal, o), c = await this.#i(e.headers), l = i(e.body, c), u = 0, d = !1, f = () => {
|
|
38
|
+
d || (d = !0, s?.(), this.#t.delete(o));
|
|
39
|
+
};
|
|
40
|
+
try {
|
|
41
|
+
await t(e.url, {
|
|
42
|
+
method: e.method ?? "POST",
|
|
43
|
+
headers: c,
|
|
44
|
+
body: l,
|
|
45
|
+
signal: o.signal,
|
|
46
|
+
onopen: async (e) => {
|
|
47
|
+
if (e.status === 401) throw new n();
|
|
48
|
+
if (!e.ok) throw Error(`HTTP ${e.status}: ${e.statusText}`);
|
|
49
|
+
let t = e.headers.get("content-type");
|
|
50
|
+
if (t && !t.includes("text/event-stream")) throw Error(`Expected content-type to be text/event-stream, got ${t}`);
|
|
51
|
+
u = 0, await r.onOpen?.(e);
|
|
52
|
+
},
|
|
53
|
+
onmessage: (e) => {
|
|
54
|
+
r.onMessage({
|
|
55
|
+
id: e.id,
|
|
56
|
+
event: e.event,
|
|
57
|
+
data: e.data
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
onerror: (e) => {
|
|
61
|
+
if (o.signal.aborted) return;
|
|
62
|
+
if (e instanceof n) throw e;
|
|
63
|
+
if (this.#e.enableRetry && u < this.#e.maxRetries) {
|
|
64
|
+
u++, console.warn(`SSE connection error, retrying (${u}/${this.#e.maxRetries})...`);
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
let t = e;
|
|
68
|
+
throw r.onError?.(t), this.#e.showErrorMessage?.(t.message), e;
|
|
69
|
+
},
|
|
70
|
+
onclose: () => {
|
|
71
|
+
r.onClose?.();
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
} catch (t) {
|
|
75
|
+
if (!await this.#a(t, e, r, a, f)) throw t;
|
|
76
|
+
} finally {
|
|
77
|
+
f();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
#r(e, t) {
|
|
81
|
+
if (!e) return;
|
|
82
|
+
let n = () => {
|
|
83
|
+
t.abort(e.reason);
|
|
84
|
+
};
|
|
85
|
+
if (e.aborted) {
|
|
86
|
+
n();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
return e.addEventListener("abort", n, { once: !0 }), () => e.removeEventListener("abort", n);
|
|
90
|
+
}
|
|
91
|
+
async #i(e) {
|
|
92
|
+
let t = { ...e };
|
|
93
|
+
try {
|
|
94
|
+
let e = await this.#e.getAuthTokens?.();
|
|
95
|
+
e?.accessToken && !r(t, "authorization") && (t.Authorization = `Bearer ${e.accessToken}`);
|
|
96
|
+
} catch (e) {
|
|
97
|
+
console.error("Failed to get auth tokens:", e);
|
|
98
|
+
}
|
|
99
|
+
return t;
|
|
100
|
+
}
|
|
101
|
+
async #a(e, t, r, i, a) {
|
|
102
|
+
if (e instanceof Error && e.name === "AbortError") return !0;
|
|
103
|
+
if (e instanceof n && !i) {
|
|
104
|
+
if (await this.#o()) return a(), await this.#n(t, r, !0), !0;
|
|
105
|
+
let e = /* @__PURE__ */ Error("Authentication failed: token expired");
|
|
106
|
+
return r.onError?.(e), this.#e.showErrorMessage?.(e.message), !0;
|
|
107
|
+
}
|
|
108
|
+
return !1;
|
|
109
|
+
}
|
|
110
|
+
async #o() {
|
|
111
|
+
let { onTokenExpired: e } = this.#e;
|
|
112
|
+
if (!e) return !1;
|
|
113
|
+
try {
|
|
114
|
+
return await e();
|
|
115
|
+
} catch (e) {
|
|
116
|
+
return console.error("Failed to refresh token:", e), !1;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
//#endregion
|
|
121
|
+
export { a as SseClient };
|
package/dist/es/state/index.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { Provider as e, atom as t, createStore as n, getDefaultStore as r, useAtom as i, useAtomValue as a, useSetAtom as o, useStore as s } from "jotai";
|
|
3
|
+
export { e as AtomStoreProvider, t as atom, n as createAtomStore, r as getDefaultAtomStore, i as useAtom, s as useAtomStore, a as useAtomValue, o as useSetAtom };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import { useActorRef as
|
|
3
|
-
import { Actor as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { useActorRef as e, useActorRef as t, useSelector as n } from "@xstate/react";
|
|
3
|
+
import { Actor as r, assign as i, createActor as a, createMachine as o } from "xstate";
|
|
4
|
+
//#region src/state-machine/index.ts
|
|
5
|
+
function s(t, r, ...[i]) {
|
|
6
|
+
let a = e(t, i);
|
|
7
|
+
return [
|
|
8
|
+
n(a, r, Object.is),
|
|
9
|
+
a.send,
|
|
10
|
+
a
|
|
11
|
+
];
|
|
7
12
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
m as createActor,
|
|
11
|
-
x as createMachine,
|
|
12
|
-
l as updateContext,
|
|
13
|
-
f as useActor,
|
|
14
|
-
p as useActorRef
|
|
15
|
-
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { r as Actor, a as createActor, o as createMachine, i as updateContext, s as useActor, t as useActorRef };
|
package/dist/es/store/bound.js
CHANGED
|
@@ -1,35 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
)
|
|
10
|
-
);
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { constantCase as e, identity as t } from "@vef-framework/shared";
|
|
3
|
+
import { create as n } from "zustand";
|
|
4
|
+
import { createJSONStorage as r, persist as i, subscribeWithSelector as a } from "zustand/middleware";
|
|
5
|
+
import { immer as o } from "zustand/middleware/immer";
|
|
6
|
+
//#region src/store/bound.ts
|
|
7
|
+
function s(e) {
|
|
8
|
+
return n()(a(o(e)));
|
|
11
9
|
}
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
S(
|
|
21
|
-
s(e),
|
|
22
|
-
{
|
|
23
|
-
name: `__VEF_STORE__${m(a)}__`,
|
|
24
|
-
version: 1,
|
|
25
|
-
storage: u(() => i === "local" ? localStorage : sessionStorage),
|
|
26
|
-
partialize: n ?? c
|
|
27
|
-
}
|
|
28
|
-
)
|
|
29
|
-
)
|
|
30
|
-
);
|
|
10
|
+
function c(s, c) {
|
|
11
|
+
let { name: l, storage: u, selector: d } = c, f = `__VEF_STORE__${e(l)}__`, p = u === "local" ? localStorage : sessionStorage;
|
|
12
|
+
return n()(a(i(o(s), {
|
|
13
|
+
name: f,
|
|
14
|
+
version: 1,
|
|
15
|
+
storage: r(() => p),
|
|
16
|
+
partialize: d ?? t
|
|
17
|
+
})));
|
|
31
18
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
b as createStore
|
|
35
|
-
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { c as createPersistedStore, s as createStore };
|