@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.
Files changed (152) hide show
  1. package/dist/cjs/_internal/_rolldown/runtime.cjs +1 -0
  2. package/dist/cjs/ai/index.cjs +1 -0
  3. package/dist/cjs/api/client.cjs +1 -1
  4. package/dist/cjs/api/constants.cjs +1 -1
  5. package/dist/cjs/api/helpers.cjs +1 -1
  6. package/dist/cjs/api/index.cjs +1 -1
  7. package/dist/cjs/auth/helpers.cjs +1 -1
  8. package/dist/cjs/auth/index.cjs +1 -1
  9. package/dist/cjs/context/api-client.cjs +1 -1
  10. package/dist/cjs/context/app.cjs +1 -1
  11. package/dist/cjs/context/context-selector.cjs +1 -1
  12. package/dist/cjs/context/disabled.cjs +1 -1
  13. package/dist/cjs/context/index.cjs +1 -1
  14. package/dist/cjs/dnd/index.cjs +1 -1
  15. package/dist/cjs/http/client.cjs +1 -1
  16. package/dist/cjs/http/constants.cjs +1 -0
  17. package/dist/cjs/http/errors.cjs +1 -1
  18. package/dist/cjs/http/helpers.cjs +1 -1
  19. package/dist/cjs/http/index.cjs +1 -1
  20. package/dist/cjs/immer/index.cjs +1 -1
  21. package/dist/cjs/index.cjs +1 -1
  22. package/dist/cjs/motion/features.cjs +1 -1
  23. package/dist/cjs/motion/index.cjs +1 -1
  24. package/dist/cjs/motion/motion-provider.cjs +1 -1
  25. package/dist/cjs/query/constants.cjs +1 -1
  26. package/dist/cjs/query/helpers.cjs +1 -1
  27. package/dist/cjs/query/hooks.cjs +1 -1
  28. package/dist/cjs/query/index.cjs +1 -1
  29. package/dist/cjs/sse/client.cjs +1 -0
  30. package/dist/cjs/sse/helpers.cjs +1 -0
  31. package/dist/cjs/sse/index.cjs +1 -0
  32. package/dist/cjs/state/index.cjs +1 -1
  33. package/dist/cjs/state-machine/index.cjs +1 -1
  34. package/dist/cjs/store/bound.cjs +1 -1
  35. package/dist/cjs/store/index.cjs +1 -1
  36. package/dist/cjs/store/unbound.cjs +1 -3
  37. package/dist/cjs/store/use-deep.cjs +1 -1
  38. package/dist/es/ai/index.js +3 -0
  39. package/dist/es/api/client.js +72 -147
  40. package/dist/es/api/constants.js +14 -7
  41. package/dist/es/api/helpers.js +7 -6
  42. package/dist/es/api/index.js +4 -8
  43. package/dist/es/auth/helpers.js +9 -9
  44. package/dist/es/auth/index.js +2 -4
  45. package/dist/es/context/api-client.js +21 -17
  46. package/dist/es/context/app.js +8 -8
  47. package/dist/es/context/context-selector.js +38 -50
  48. package/dist/es/context/disabled.js +9 -9
  49. package/dist/es/context/index.js +5 -13
  50. package/dist/es/dnd/index.js +8 -30
  51. package/dist/es/http/client.js +186 -359
  52. package/dist/es/http/constants.js +5 -0
  53. package/dist/es/http/errors.js +10 -15
  54. package/dist/es/http/helpers.js +8 -11
  55. package/dist/es/http/index.js +5 -11
  56. package/dist/es/immer/index.js +6 -15
  57. package/dist/es/index.js +27 -122
  58. package/dist/es/motion/features.js +3 -4
  59. package/dist/es/motion/index.js +5 -11
  60. package/dist/es/motion/motion-provider.js +22 -21
  61. package/dist/es/query/constants.js +5 -4
  62. package/dist/es/query/helpers.js +40 -54
  63. package/dist/es/query/hooks.js +18 -28
  64. package/dist/es/query/index.js +4 -14
  65. package/dist/es/sse/client.js +121 -0
  66. package/dist/es/sse/helpers.js +8 -0
  67. package/dist/es/sse/index.js +3 -0
  68. package/dist/es/state/index.js +3 -11
  69. package/dist/es/state-machine/index.js +13 -14
  70. package/dist/es/store/bound.js +18 -33
  71. package/dist/es/store/index.js +6 -11
  72. package/dist/es/store/unbound.js +43 -50
  73. package/dist/es/store/use-deep.js +12 -11
  74. package/dist/types/ai/index.d.ts +6 -0
  75. package/dist/types/api/client.d.ts +15 -35
  76. package/dist/types/api/constants.d.ts +7 -3
  77. package/dist/types/api/index.d.ts +1 -1
  78. package/dist/types/auth/helpers.d.ts +5 -5
  79. package/dist/types/auth/index.d.ts +2 -2
  80. package/dist/types/common/index.d.ts +1 -1
  81. package/dist/types/common/types.d.ts +3 -0
  82. package/dist/types/context/api-client.d.ts +9 -10
  83. package/dist/types/context/app.d.ts +9 -1
  84. package/dist/types/context/context-selector.d.ts +7 -19
  85. package/dist/types/context/disabled.d.ts +2 -2
  86. package/dist/types/context/index.d.ts +3 -2
  87. package/dist/types/context/types.d.ts +0 -1
  88. package/dist/types/dnd/index.d.ts +4 -2
  89. package/dist/types/http/client.d.ts +39 -71
  90. package/dist/types/http/constants.d.ts +24 -0
  91. package/dist/types/http/index.d.ts +2 -1
  92. package/dist/types/index.d.ts +4 -2
  93. package/dist/types/motion/index.d.ts +2 -2
  94. package/dist/types/motion/motion-provider.d.ts +8 -3
  95. package/dist/types/query/helpers.d.ts +1 -4
  96. package/dist/types/query/hooks.d.ts +6 -45
  97. package/dist/types/query/types.d.ts +12 -12
  98. package/dist/types/src/ai/index.d.ts +6 -0
  99. package/dist/types/src/api/client.d.ts +55 -0
  100. package/dist/types/src/api/constants.d.ts +12 -0
  101. package/dist/types/src/api/helpers.d.ts +9 -0
  102. package/dist/types/src/api/index.d.ts +4 -0
  103. package/dist/types/src/api/types.d.ts +48 -0
  104. package/dist/types/src/auth/helpers.d.ts +11 -0
  105. package/dist/types/src/auth/index.d.ts +2 -0
  106. package/dist/types/src/auth/types.d.ts +1 -0
  107. package/dist/types/src/common/index.d.ts +1 -0
  108. package/dist/types/src/common/types.d.ts +98 -0
  109. package/dist/types/src/context/api-client.d.ts +17 -0
  110. package/dist/types/src/context/app.d.ts +12 -0
  111. package/dist/types/src/context/context-selector.d.ts +32 -0
  112. package/dist/types/src/context/disabled.d.ts +9 -0
  113. package/dist/types/src/context/index.d.ts +6 -0
  114. package/dist/types/src/context/types.d.ts +26 -0
  115. package/dist/types/src/dnd/index.d.ts +8 -0
  116. package/dist/types/src/http/client.d.ts +112 -0
  117. package/dist/types/src/http/constants.d.ts +24 -0
  118. package/dist/types/src/http/errors.d.ts +14 -0
  119. package/dist/types/src/http/helpers.d.ts +17 -0
  120. package/dist/types/src/http/index.d.ts +5 -0
  121. package/dist/types/src/http/types.d.ts +101 -0
  122. package/dist/types/src/immer/index.d.ts +2 -0
  123. package/dist/types/src/index.d.ts +16 -0
  124. package/dist/types/src/motion/features.d.ts +1 -0
  125. package/dist/types/src/motion/index.d.ts +4 -0
  126. package/dist/types/src/motion/motion-provider.d.ts +10 -0
  127. package/dist/types/src/query/constants.d.ts +1 -0
  128. package/dist/types/src/query/helpers.d.ts +7 -0
  129. package/dist/types/src/query/hooks.d.ts +27 -0
  130. package/dist/types/src/query/index.d.ts +4 -0
  131. package/dist/types/src/query/types.d.ts +51 -0
  132. package/dist/types/src/sse/client.d.ts +16 -0
  133. package/dist/types/src/sse/helpers.d.ts +9 -0
  134. package/dist/types/src/sse/index.d.ts +3 -0
  135. package/dist/types/src/sse/types.d.ts +98 -0
  136. package/dist/types/src/state/index.d.ts +1 -0
  137. package/dist/types/src/state-machine/index.d.ts +15 -0
  138. package/dist/types/src/store/bound.d.ts +28 -0
  139. package/dist/types/src/store/index.d.ts +5 -0
  140. package/dist/types/src/store/types.d.ts +50 -0
  141. package/dist/types/src/store/unbound.d.ts +26 -0
  142. package/dist/types/src/store/use-deep.d.ts +8 -0
  143. package/dist/types/sse/client.d.ts +16 -0
  144. package/dist/types/sse/helpers.d.ts +9 -0
  145. package/dist/types/sse/index.d.ts +3 -0
  146. package/dist/types/sse/types.d.ts +98 -0
  147. package/dist/types/state-machine/index.d.ts +2 -1
  148. package/dist/types/store/unbound.d.ts +6 -6
  149. package/dist/types/store/use-deep.d.ts +4 -3
  150. package/package.json +18 -16
  151. package/dist/cjs/common/index.cjs +0 -1
  152. package/dist/es/common/index.js +0 -1
@@ -1,7 +1,8 @@
1
- import { ApiClient as t } from "./client.js";
2
- function n(e) {
3
- return new t(e);
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
- export {
6
- n as createApiClient
7
- };
7
+ //#endregion
8
+ export { t as createApiClient };
@@ -1,8 +1,4 @@
1
- import { ApiClient as o } from "./client.js";
2
- import { QUERY_CLIENT as p } from "./constants.js";
3
- import { createApiClient as f } from "./helpers.js";
4
- export {
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";
@@ -1,10 +1,10 @@
1
- import { isNullish as u, isString as o } from "@vef-framework/shared";
2
- function f(t, r, e = "any") {
3
- if (u(r))
4
- return !0;
5
- const n = o(r) ? [r] : r;
6
- return e === "any" ? n.some((i) => t(i)) : n.every((i) => t(i));
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
- export {
9
- f as checkPermission
10
- };
9
+ //#endregion
10
+ export { n as checkPermission };
@@ -1,4 +1,2 @@
1
- import { checkPermission as r } from "./helpers.js";
2
- export {
3
- r as checkPermission
4
- };
1
+ /*! @vef-framework/core v2.1.0 made by Venus | 2026-03-27T07:13:02.254Z */
2
+ import "./helpers.js";
@@ -1,19 +1,23 @@
1
- import { jsx as r } from "@emotion/react/jsx-runtime";
2
- import { QueryClientProvider as i } from "@tanstack/react-query";
3
- import { createContext as n, use as p } from "react";
4
- import "../api/index.js";
5
- import { QUERY_CLIENT as l } from "../api/constants.js";
6
- const e = n(null);
7
- function s({ value: t, children: o }) {
8
- return /* @__PURE__ */ r(e, { value: t, children: /* @__PURE__ */ r(i, { client: t[l], children: o }) });
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 a() {
11
- const t = p(e);
12
- if (!t)
13
- throw new Error("No 'ApiClientContext' found in the React app, please use 'ApiClientProvider' to wrap your app.");
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
- export {
17
- s as ApiClientProvider,
18
- a as useApiClient
19
- };
22
+ //#endregion
23
+ export { o as ApiClientProvider, s as useApiClient };
@@ -1,9 +1,9 @@
1
- import { createContext as e, use as o } from "react";
2
- const t = e({}), n = t.Provider;
3
- function p() {
4
- return o(t);
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
- export {
7
- n as AppContextProvider,
8
- p as useAppContext
9
- };
8
+ //#endregion
9
+ export { r as AppContextProvider, i as useAppContext };
@@ -1,52 +1,40 @@
1
- import { jsx as f } from "@emotion/react/jsx-runtime";
2
- import { isFunction as i } from "@vef-framework/shared";
3
- import { createContext as a, useState as l, useEffect as x, use as m, useSyncExternalStore as v } from "react";
4
- function p(u) {
5
- const n = a(s(u));
6
- function e({ value: t, children: r }) {
7
- const [o] = l(() => s(t));
8
- return x(() => {
9
- Object.is(o.value, t) || (o.value = t, o.notify());
10
- }), /* @__PURE__ */ f(n, { value: o, children: r });
11
- }
12
- e.displayName = "SelectorContextProvider";
13
- function c(t) {
14
- const r = m(n);
15
- return v(
16
- r.subscribe,
17
- // Get current value, applying selector if provided
18
- () => i(t) ? t(r.value) : r.value,
19
- // Server-side snapshot (same as client-side for consistency)
20
- () => i(t) ? t(r.value) : r.value
21
- );
22
- }
23
- return {
24
- Provider: e,
25
- useContext: c
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 s(u) {
29
- const n = /* @__PURE__ */ new Set();
30
- return {
31
- value: u,
32
- /**
33
- * Subscribe to store changes
34
- *
35
- * @param listener - Function to call when store value changes
36
- * @returns Unsubscribe function
37
- */
38
- subscribe: (e) => (n.add(e), () => {
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
- export {
51
- p as createContextWithSelector
52
- };
39
+ //#endregion
40
+ export { s as createContextWithSelector };
@@ -1,10 +1,10 @@
1
- import { createContext as t, use as o } from "react";
2
- const e = t(!1);
3
- function s() {
4
- return o(e);
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
- const i = e.Provider;
7
- export {
8
- i as DisabledProvider,
9
- s as useDisabled
10
- };
8
+ var i = n.Provider;
9
+ //#endregion
10
+ export { i as DisabledProvider, r as useDisabled };
@@ -1,13 +1,5 @@
1
- import { ApiClientProvider as o, useApiClient as t } from "./api-client.js";
2
- import { AppContextProvider as p, useAppContext as x } from "./app.js";
3
- import { createContextWithSelector as l } from "./context-selector.js";
4
- import { DisabledProvider as s, useDisabled as C } from "./disabled.js";
5
- export {
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";
@@ -1,30 +1,8 @@
1
- import { AxisModifier as o, RestrictToHorizontalAxis as a, RestrictToVerticalAxis as t, SnapModifier as s, restrictShapeToBoundingRectangle as i } from "@dnd-kit/abstract/modifiers";
2
- import { RestrictToElement as m, RestrictToWindow as D } from "@dnd-kit/dom/modifiers";
3
- import { arrayMove as n, move as l, arraySwap as x, swap as f } from "@dnd-kit/helpers";
4
- import { DragDropProvider as b, DragOverlay as d, KeyboardSensor as v, PointerSensor as y, useDragDropMonitor as S, useDraggable as u, useDroppable as w } from "@dnd-kit/react";
5
- import { useSortable as R } from "@dnd-kit/react/sortable";
6
- import { DragDropContext as I, Draggable as M, Droppable as P } from "@hello-pangea/dnd";
7
- export {
8
- o as AxisModifier,
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 };