@vef-framework/core 2.0.11 → 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/api/helpers.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { ApiClient as e } from "./client.js";
|
|
3
|
+
//#region src/api/helpers.ts
|
|
4
|
+
function t(t) {
|
|
5
|
+
return new e(t);
|
|
4
6
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { t as createApiClient };
|
package/dist/es/api/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
o as ApiClient,
|
|
6
|
-
p as QUERY_CLIENT,
|
|
7
|
-
f as createApiClient
|
|
8
|
-
};
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import "./constants.js";
|
|
3
|
+
import "./client.js";
|
|
4
|
+
import "./helpers.js";
|
package/dist/es/auth/helpers.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { isNullish as e, isString as t } from "@vef-framework/shared";
|
|
3
|
+
//#region src/auth/helpers.ts
|
|
4
|
+
function n(n, r, i = "any") {
|
|
5
|
+
if (e(r)) return !0;
|
|
6
|
+
let a = t(r) ? [r] : r;
|
|
7
|
+
return i === "any" ? a.some((e) => n(e)) : a.every((e) => n(e));
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
9
|
+
//#endregion
|
|
10
|
+
export { n as checkPermission };
|
package/dist/es/auth/index.js
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { QUERY_CLIENT as e } from "../api/constants.js";
|
|
3
|
+
import { QueryClientProvider as t } from "@tanstack/react-query";
|
|
4
|
+
import { createContext as n, use as r } from "react";
|
|
5
|
+
import { jsx as i } from "@emotion/react/jsx-runtime";
|
|
6
|
+
//#region src/context/api-client.tsx
|
|
7
|
+
var a = n(null);
|
|
8
|
+
function o({ value: n, children: r }) {
|
|
9
|
+
return /* @__PURE__ */ i(a, {
|
|
10
|
+
value: n,
|
|
11
|
+
children: /* @__PURE__ */ i(t, {
|
|
12
|
+
client: n[e],
|
|
13
|
+
children: r
|
|
14
|
+
})
|
|
15
|
+
});
|
|
9
16
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return t;
|
|
17
|
+
function s() {
|
|
18
|
+
let e = r(a);
|
|
19
|
+
if (!e) throw Error("useApiClient must be used within an ApiClientProvider.");
|
|
20
|
+
return e;
|
|
15
21
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
a as useApiClient
|
|
19
|
-
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { o as ApiClientProvider, s as useApiClient };
|
package/dist/es/context/app.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { createContext as e, use as t } from "react";
|
|
3
|
+
//#region src/context/app.ts
|
|
4
|
+
var n = e({}), r = n.Provider;
|
|
5
|
+
function i() {
|
|
6
|
+
return t(n);
|
|
5
7
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
p as useAppContext
|
|
9
|
-
};
|
|
8
|
+
//#endregion
|
|
9
|
+
export { r as AppContextProvider, i as useAppContext };
|
|
@@ -1,52 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
import { isFunction as
|
|
3
|
-
import { createContext as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { isFunction as e } from "@vef-framework/shared";
|
|
3
|
+
import { createContext as t, use as n, useEffect as r, useState as i, useSyncExternalStore as a } from "react";
|
|
4
|
+
import { jsx as o } from "@emotion/react/jsx-runtime";
|
|
5
|
+
//#region src/context/context-selector.tsx
|
|
6
|
+
function s(s) {
|
|
7
|
+
let l = t(c(s));
|
|
8
|
+
function u({ value: e, children: t }) {
|
|
9
|
+
let [n] = i(() => c(e));
|
|
10
|
+
return r(() => {
|
|
11
|
+
Object.is(n.value, e) || (n.value = e, n.notify());
|
|
12
|
+
}), /* @__PURE__ */ o(l, {
|
|
13
|
+
value: n,
|
|
14
|
+
children: t
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
u.displayName = "SelectorContextProvider";
|
|
18
|
+
function d(t) {
|
|
19
|
+
let r = n(l), i = () => e(t) ? t(r.value) : r.value;
|
|
20
|
+
return a(r.subscribe, i, i);
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
Provider: u,
|
|
24
|
+
useContext: d
|
|
25
|
+
};
|
|
27
26
|
}
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
n.delete(e);
|
|
40
|
-
}),
|
|
41
|
-
/**
|
|
42
|
-
* Notify all subscribers that the value has changed
|
|
43
|
-
*/
|
|
44
|
-
notify: () => {
|
|
45
|
-
for (const e of n)
|
|
46
|
-
e();
|
|
47
|
-
}
|
|
48
|
-
};
|
|
27
|
+
function c(e) {
|
|
28
|
+
let t = /* @__PURE__ */ new Set();
|
|
29
|
+
return {
|
|
30
|
+
value: e,
|
|
31
|
+
subscribe(e) {
|
|
32
|
+
return t.add(e), () => t.delete(e);
|
|
33
|
+
},
|
|
34
|
+
notify() {
|
|
35
|
+
for (let e of t) e();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
49
38
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
39
|
+
//#endregion
|
|
40
|
+
export { s as createContextWithSelector };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { createContext as e, use as t } from "react";
|
|
3
|
+
//#region src/context/disabled.ts
|
|
4
|
+
var n = e(!1);
|
|
5
|
+
function r() {
|
|
6
|
+
return t(n);
|
|
5
7
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
s as useDisabled
|
|
10
|
-
};
|
|
8
|
+
var i = n.Provider;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { i as DisabledProvider, r as useDisabled };
|
package/dist/es/context/index.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
o as ApiClientProvider,
|
|
7
|
-
p as AppContextProvider,
|
|
8
|
-
s as DisabledProvider,
|
|
9
|
-
l as createContextWithSelector,
|
|
10
|
-
t as useApiClient,
|
|
11
|
-
x as useAppContext,
|
|
12
|
-
C as useDisabled
|
|
13
|
-
};
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import "./api-client.js";
|
|
3
|
+
import "./app.js";
|
|
4
|
+
import "./context-selector.js";
|
|
5
|
+
import "./disabled.js";
|
package/dist/es/dnd/index.js
CHANGED
|
@@ -1,30 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
I as DragDropContext,
|
|
10
|
-
b as DragDropProvider,
|
|
11
|
-
d as DragOverlay,
|
|
12
|
-
M as Draggable,
|
|
13
|
-
P as Droppable,
|
|
14
|
-
v as KeyboardSensor,
|
|
15
|
-
y as PointerSensor,
|
|
16
|
-
m as RestrictToElement,
|
|
17
|
-
a as RestrictToHorizontalAxis,
|
|
18
|
-
t as RestrictToVerticalAxis,
|
|
19
|
-
D as RestrictToWindow,
|
|
20
|
-
s as SnapModifier,
|
|
21
|
-
n as moveArrayItem,
|
|
22
|
-
l as moveDragItem,
|
|
23
|
-
i as restrictShapeToBoundingRectangle,
|
|
24
|
-
x as swapArrayItem,
|
|
25
|
-
f as swapDragItem,
|
|
26
|
-
S as useDragDropMonitor,
|
|
27
|
-
u as useDraggable,
|
|
28
|
-
w as useDroppable,
|
|
29
|
-
R as useSortable
|
|
30
|
-
};
|
|
1
|
+
/*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
|
|
2
|
+
import { AxisModifier as e, RestrictToHorizontalAxis as t, RestrictToVerticalAxis as n, SnapModifier as r, restrictShapeToBoundingRectangle as i } from "@dnd-kit/abstract/modifiers";
|
|
3
|
+
import { RestrictToElement as a, RestrictToWindow as o } from "@dnd-kit/dom/modifiers";
|
|
4
|
+
import { arrayMove as s, arraySwap as c, move as l, swap as u } from "@dnd-kit/helpers";
|
|
5
|
+
import { DragDropProvider as d, DragOverlay as f, KeyboardSensor as p, PointerSensor as m, useDragDropMonitor as h, useDraggable as g, useDroppable as _ } from "@dnd-kit/react";
|
|
6
|
+
import { useSortable as v } from "@dnd-kit/react/sortable";
|
|
7
|
+
import { DragDropContext as y, Draggable as b, Droppable as x } from "@hello-pangea/dnd";
|
|
8
|
+
export { e as AxisModifier, y as DragDropContext, d as DragDropProvider, f as DragOverlay, b as Draggable, x as Droppable, p as KeyboardSensor, m as PointerSensor, a as RestrictToElement, t as RestrictToHorizontalAxis, n as RestrictToVerticalAxis, o as RestrictToWindow, r as SnapModifier, s as moveArrayItem, l as moveDragItem, i as restrictShapeToBoundingRectangle, c as swapArrayItem, u as swapDragItem, h as useDragDropMonitor, g as useDraggable, _ as useDroppable, v as useSortable };
|