@vef-framework-react/core 2.12.0 → 2.13.1

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 (70) hide show
  1. package/dist/cjs/http/body-encoding.cjs +1 -0
  2. package/dist/cjs/http/client.cjs +1 -1
  3. package/dist/cjs/http/constants.cjs +1 -1
  4. package/dist/cjs/index.cjs +1 -1
  5. package/dist/cjs/push/client.cjs +1 -0
  6. package/dist/cjs/push/helpers.cjs +1 -0
  7. package/dist/cjs/push/index.cjs +1 -0
  8. package/dist/cjs/push/types.cjs +1 -0
  9. package/dist/es/api/client.js +1 -1
  10. package/dist/es/api/constants.js +1 -1
  11. package/dist/es/api/helpers.js +1 -1
  12. package/dist/es/api/index.js +1 -1
  13. package/dist/es/auth/helpers.js +1 -1
  14. package/dist/es/auth/index.js +1 -1
  15. package/dist/es/context/api-client.js +1 -1
  16. package/dist/es/context/app.js +1 -1
  17. package/dist/es/context/context-selector.js +1 -1
  18. package/dist/es/context/disabled.js +1 -1
  19. package/dist/es/context/index.js +1 -1
  20. package/dist/es/dnd/index.js +1 -1
  21. package/dist/es/http/body-encoding.js +28 -0
  22. package/dist/es/http/client.js +78 -56
  23. package/dist/es/http/constants.js +3 -3
  24. package/dist/es/http/errors.js +1 -1
  25. package/dist/es/http/helpers.js +1 -1
  26. package/dist/es/http/index.js +1 -1
  27. package/dist/es/immer/index.js +1 -1
  28. package/dist/es/index.js +21 -18
  29. package/dist/es/motion/features.js +1 -1
  30. package/dist/es/motion/index.js +1 -1
  31. package/dist/es/motion/motion-provider.js +1 -1
  32. package/dist/es/push/client.js +103 -0
  33. package/dist/es/push/helpers.js +8 -0
  34. package/dist/es/push/index.js +5 -0
  35. package/dist/es/push/types.js +5 -0
  36. package/dist/es/query/constants.js +1 -1
  37. package/dist/es/query/helpers.js +1 -1
  38. package/dist/es/query/hooks.js +1 -1
  39. package/dist/es/query/index.js +1 -1
  40. package/dist/es/sse/client.js +1 -1
  41. package/dist/es/sse/helpers.js +1 -1
  42. package/dist/es/sse/index.js +1 -1
  43. package/dist/es/sse/stream-machine.js +1 -1
  44. package/dist/es/state/index.js +1 -1
  45. package/dist/es/state-machine/index.js +1 -1
  46. package/dist/es/storage/errors.js +1 -1
  47. package/dist/es/storage/index.js +1 -1
  48. package/dist/es/storage/protocol.js +1 -1
  49. package/dist/es/storage/resumable/fingerprint.js +1 -1
  50. package/dist/es/storage/resumable/index.js +1 -1
  51. package/dist/es/storage/resumable/persistence.js +1 -1
  52. package/dist/es/storage/resumable/plan.js +1 -1
  53. package/dist/es/storage/types.js +1 -1
  54. package/dist/es/storage/uploader-machine.js +1 -1
  55. package/dist/es/storage/uploader.js +1 -1
  56. package/dist/es/store/bound.js +1 -1
  57. package/dist/es/store/index.js +1 -1
  58. package/dist/es/store/unbound.js +1 -1
  59. package/dist/es/store/use-deep.js +1 -1
  60. package/dist/types/context/types.d.ts +3 -3
  61. package/dist/types/http/body-encoding.d.ts +18 -0
  62. package/dist/types/http/client.d.ts +9 -1
  63. package/dist/types/http/constants.d.ts +5 -0
  64. package/dist/types/http/types.d.ts +18 -0
  65. package/dist/types/index.d.ts +2 -1
  66. package/dist/types/push/client.d.ts +33 -0
  67. package/dist/types/push/helpers.d.ts +9 -0
  68. package/dist/types/push/index.d.ts +3 -0
  69. package/dist/types/push/types.d.ts +103 -0
  70. package/package.json +2 -2
package/dist/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { SKIP_AUTH_HEADER as e, SKIP_AUTH_VALUE as t } from "./http/constants.js";
3
3
  import { BusinessError as n } from "./http/errors.js";
4
4
  import { isBusinessError as r } from "./http/helpers.js";
@@ -16,20 +16,23 @@ import { AxisModifier as A, CollisionPriority as j, DragDropContext as M, DragDr
16
16
  import { applyPatches as ue, currentState as de, originalState as fe, produce as pe, produceWithPatches as me, useImmer as he, useImmerReducer as ge } from "./immer/index.js";
17
17
  import _e from "./motion/motion-provider.js";
18
18
  import { AnimatePresence as ve, LayoutGroup as ye, Reorder as be, motion as xe, useDragControls as Se, useInView as Ce } from "./motion/index.js";
19
- import { SseClient as we } from "./sse/client.js";
20
- import { createSseClient as Te } from "./sse/helpers.js";
21
- import { AtomStoreProvider as Ee, atom as De, createAtomStore as Oe, getDefaultAtomStore as ke, useAtom as Ae, useAtomStore as je, useAtomValue as Me, useSetAtom as Ne } from "./state/index.js";
22
- import { Actor as Pe, createActor as Fe, createMachine as Ie, updateContext as Le, useActor as Re, useActorRef as ze } from "./state-machine/index.js";
23
- import { UploadAbortedError as Be, UploadError as Ve, UploadPartError as He, UploadProtocolError as Ue } from "./storage/errors.js";
24
- import { DEFAULT_API_PATH as We, DEFAULT_RESOURCE as Ge, DEFAULT_VERSION as Ke, abortUpload as qe, completeUpload as Je, initUpload as Ye, listParts as Xe, uploadPart as Ze } from "./storage/protocol.js";
25
- import { PrefixFingerprinter as Qe, WeakFingerprinter as $e } from "./storage/resumable/fingerprint.js";
26
- import { LocalStoragePersistence as et } from "./storage/resumable/persistence.js";
27
- import { resolveResumePlan as tt } from "./storage/resumable/plan.js";
28
- import { PRIVATE_PREFIX as nt, PUBLIC_PREFIX as rt } from "./storage/types.js";
29
- import { Uploader as it, uploadFile as at } from "./storage/uploader.js";
30
- import { createPersistedStore as ot, createStore as st } from "./store/bound.js";
31
- import { createComponentStore as ct } from "./store/unbound.js";
32
- import { useDeep as lt } from "./store/use-deep.js";
33
- import { useShallow as ut } from "./store/index.js";
34
- import { clsx as dt } from "clsx";
35
- export { Pe as Actor, ve as AnimatePresence, y as ApiClient, C as ApiClientProvider, T as AppContextProvider, Ee as AtomStoreProvider, A as AxisModifier, n as BusinessError, j as CollisionPriority, O as DisabledProvider, M as DragDropContext, N as DragDropProvider, P as DragOverlay, F as Draggable, I as Droppable, L as Feedback, _ as HTTP_CLIENT, R as KeyboardSensor, ye as LayoutGroup, et as LocalStoragePersistence, _e as MotionProvider, nt as PRIVATE_PREFIX, rt as PUBLIC_PREFIX, z as PointerActivationConstraints, B as PointerSensor, Qe as PrefixFingerprinter, v as QUERY_CLIENT, be as Reorder, V as RestrictToElement, H as RestrictToHorizontalAxis, U as RestrictToVerticalAxis, W as RestrictToWindow, We as STORAGE_API_PATH, Ge as STORAGE_RESOURCE, Ke as STORAGE_VERSION, G as SnapModifier, we as SseClient, Be as UploadAbortedError, Ve as UploadError, He as UploadPartError, Ue as UploadProtocolError, it as Uploader, $e as WeakFingerprinter, qe as abortUpload, ue as applyPatches, De as atom, S as checkPermission, K as closestCenter, q as closestCorners, dt as clsx, Je as completeUpload, Fe as createActor, b as createApiClient, x as createApiRequest, Oe as createAtomStore, ct as createComponentStore, D as createContextWithSelector, Ie as createMachine, ot as createPersistedStore, Te as createSseClient, st as createStore, de as currentState, J as defaultCollisionDetection, Y as defaultPreset, X as directionBiased, ke as getDefaultAtomStore, Ye as initUpload, r as isBusinessError, i as keepPreviousData, Xe as listParts, a as matchMutation, o as matchQuery, xe as motion, Z as moveArrayItem, Q as moveDragItem, fe as originalState, $ as pointerDistance, ee as pointerIntersection, pe as produce, me as produceWithPatches, tt as resolveResumePlan, te as restrictShapeToBoundingRectangle, ne as shapeIntersection, e as skipAuthenticationHeader, t as skipAuthenticationValue, s as skipQueryToken, re as swapArrayItem, ie as swapDragItem, Le as updateContext, at as uploadFile, Ze as uploadPart, Re as useActor, ze as useActorRef, w as useApiClient, E as useAppContext, Ae as useAtom, je as useAtomStore, Me as useAtomValue, lt as useDeep, k as useDisabled, Se as useDragControls, ae as useDragDropMonitor, oe as useDragOperation, se as useDraggable, ce as useDroppable, he as useImmer, ge as useImmerReducer, Ce as useInView, c as useInfiniteQuery, l as useIsFetching, u as useIsMutating, d as useMutation, f as useMutationState, p as useQueries, m as useQuery, h as useQueryClient, g as useQueryErrorResetBoundary, Ne as useSetAtom, ut as useShallow, le as useSortable };
19
+ import { PUSH_CLOSE_SESSION_INVALID as we, PUSH_CLOSE_TOO_MANY_CONNECTIONS as Te } from "./push/types.js";
20
+ import { PushClient as Ee } from "./push/client.js";
21
+ import { createPushClient as De } from "./push/helpers.js";
22
+ import { SseClient as Oe } from "./sse/client.js";
23
+ import { createSseClient as ke } from "./sse/helpers.js";
24
+ import { AtomStoreProvider as Ae, atom as je, createAtomStore as Me, getDefaultAtomStore as Ne, useAtom as Pe, useAtomStore as Fe, useAtomValue as Ie, useSetAtom as Le } from "./state/index.js";
25
+ import { Actor as Re, createActor as ze, createMachine as Be, updateContext as Ve, useActor as He, useActorRef as Ue } from "./state-machine/index.js";
26
+ import { UploadAbortedError as We, UploadError as Ge, UploadPartError as Ke, UploadProtocolError as qe } from "./storage/errors.js";
27
+ import { DEFAULT_API_PATH as Je, DEFAULT_RESOURCE as Ye, DEFAULT_VERSION as Xe, abortUpload as Ze, completeUpload as Qe, initUpload as $e, listParts as et, uploadPart as tt } from "./storage/protocol.js";
28
+ import { PrefixFingerprinter as nt, WeakFingerprinter as rt } from "./storage/resumable/fingerprint.js";
29
+ import { LocalStoragePersistence as it } from "./storage/resumable/persistence.js";
30
+ import { resolveResumePlan as at } from "./storage/resumable/plan.js";
31
+ import { PRIVATE_PREFIX as ot, PUBLIC_PREFIX as st } from "./storage/types.js";
32
+ import { Uploader as ct, uploadFile as lt } from "./storage/uploader.js";
33
+ import { createPersistedStore as ut, createStore as dt } from "./store/bound.js";
34
+ import { createComponentStore as ft } from "./store/unbound.js";
35
+ import { useDeep as pt } from "./store/use-deep.js";
36
+ import { useShallow as mt } from "./store/index.js";
37
+ import { clsx as ht } from "clsx";
38
+ export { Re as Actor, ve as AnimatePresence, y as ApiClient, C as ApiClientProvider, T as AppContextProvider, Ae as AtomStoreProvider, A as AxisModifier, n as BusinessError, j as CollisionPriority, O as DisabledProvider, M as DragDropContext, N as DragDropProvider, P as DragOverlay, F as Draggable, I as Droppable, L as Feedback, _ as HTTP_CLIENT, R as KeyboardSensor, ye as LayoutGroup, it as LocalStoragePersistence, _e as MotionProvider, ot as PRIVATE_PREFIX, st as PUBLIC_PREFIX, we as PUSH_CLOSE_SESSION_INVALID, Te as PUSH_CLOSE_TOO_MANY_CONNECTIONS, z as PointerActivationConstraints, B as PointerSensor, nt as PrefixFingerprinter, Ee as PushClient, v as QUERY_CLIENT, be as Reorder, V as RestrictToElement, H as RestrictToHorizontalAxis, U as RestrictToVerticalAxis, W as RestrictToWindow, Je as STORAGE_API_PATH, Ye as STORAGE_RESOURCE, Xe as STORAGE_VERSION, G as SnapModifier, Oe as SseClient, We as UploadAbortedError, Ge as UploadError, Ke as UploadPartError, qe as UploadProtocolError, ct as Uploader, rt as WeakFingerprinter, Ze as abortUpload, ue as applyPatches, je as atom, S as checkPermission, K as closestCenter, q as closestCorners, ht as clsx, Qe as completeUpload, ze as createActor, b as createApiClient, x as createApiRequest, Me as createAtomStore, ft as createComponentStore, D as createContextWithSelector, Be as createMachine, ut as createPersistedStore, De as createPushClient, ke as createSseClient, dt as createStore, de as currentState, J as defaultCollisionDetection, Y as defaultPreset, X as directionBiased, Ne as getDefaultAtomStore, $e as initUpload, r as isBusinessError, i as keepPreviousData, et as listParts, a as matchMutation, o as matchQuery, xe as motion, Z as moveArrayItem, Q as moveDragItem, fe as originalState, $ as pointerDistance, ee as pointerIntersection, pe as produce, me as produceWithPatches, at as resolveResumePlan, te as restrictShapeToBoundingRectangle, ne as shapeIntersection, e as skipAuthenticationHeader, t as skipAuthenticationValue, s as skipQueryToken, re as swapArrayItem, ie as swapDragItem, Ve as updateContext, lt as uploadFile, tt as uploadPart, He as useActor, Ue as useActorRef, w as useApiClient, E as useAppContext, Pe as useAtom, Fe as useAtomStore, Ie as useAtomValue, pt as useDeep, k as useDisabled, Se as useDragControls, ae as useDragDropMonitor, oe as useDragOperation, se as useDraggable, ce as useDroppable, he as useImmer, ge as useImmerReducer, Ce as useInView, c as useInfiniteQuery, l as useIsFetching, u as useIsMutating, d as useMutation, f as useMutationState, p as useQueries, m as useQuery, h as useQueryClient, g as useQueryErrorResetBoundary, Le as useSetAtom, mt as useShallow, le as useSortable };
@@ -1,3 +1,3 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { domMax as e } from "motion/react";
3
3
  export { e as default };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import e from "./motion-provider.js";
3
3
  import { AnimatePresence as t, LayoutGroup as n, Reorder as r, useDragControls as i, useInView as a } from "motion/react";
4
4
  import * as o from "motion/react-m";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { generateId as e } from "@vef-framework-react/shared";
3
3
  import { useState as t } from "react";
4
4
  import { jsx as n } from "@emotion/react/jsx-runtime";
@@ -0,0 +1,103 @@
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
+ import "./types.js";
3
+ //#region src/push/client.ts
4
+ var e = "__accessToken", t = .3;
5
+ function n(e) {
6
+ let t = new URL(e, location.href);
7
+ return t.protocol === "http:" ? t.protocol = "ws:" : t.protocol === "https:" && (t.protocol = "wss:"), t;
8
+ }
9
+ var r = class {
10
+ #e;
11
+ #t = /* @__PURE__ */ new Map();
12
+ #n = null;
13
+ #r = "idle";
14
+ #i = 0;
15
+ #a = null;
16
+ #o = !1;
17
+ constructor(e = {}) {
18
+ this.#e = e;
19
+ }
20
+ async #s(t) {
21
+ this.#p(t);
22
+ let r = n(this.#e.url ?? "/ws"), i = await this.#e.getAuthTokens?.();
23
+ if (this.#o) return;
24
+ i?.accessToken && r.searchParams.set(e, i.accessToken);
25
+ let a = new WebSocket(r.href);
26
+ this.#n = a, a.addEventListener("open", () => {
27
+ this.#i = 0, this.#p("open");
28
+ }), a.addEventListener("message", (e) => {
29
+ this.#d(e.data);
30
+ }), a.addEventListener("close", (e) => {
31
+ this.#n === a && (this.#n = null, this.#c(e));
32
+ });
33
+ }
34
+ #c(e) {
35
+ if (this.#o) {
36
+ this.#p("closed");
37
+ return;
38
+ }
39
+ if (e.code === 4401) {
40
+ this.#p("closed"), this.#e.onSessionInvalid?.(e);
41
+ return;
42
+ }
43
+ if (e.code === 4429) {
44
+ this.#p("closed"), this.#e.onConnectionRejected?.(e);
45
+ return;
46
+ }
47
+ if (this.#e.reconnect?.enabled === !1) {
48
+ this.#p("closed");
49
+ return;
50
+ }
51
+ this.#l();
52
+ }
53
+ #l() {
54
+ this.#p("reconnecting");
55
+ let e = this.#e.reconnect?.initialDelay ?? 1e3, n = this.#e.reconnect?.maxDelay ?? 3e4, r = Math.min(n, e * 2 ** this.#i), i = r + r * t * Math.random();
56
+ this.#i += 1, this.#a = setTimeout(() => {
57
+ this.#a = null, this.#s("reconnecting");
58
+ }, i);
59
+ }
60
+ #u() {
61
+ this.#a !== null && (clearTimeout(this.#a), this.#a = null);
62
+ }
63
+ #d(e) {
64
+ if (typeof e != "string") return;
65
+ let t;
66
+ try {
67
+ t = JSON.parse(e);
68
+ } catch {
69
+ console.warn("[vef-push] Dropping malformed push frame");
70
+ return;
71
+ }
72
+ if (typeof t?.type != "string" || t.type === "") {
73
+ console.warn("[vef-push] Dropping push frame without a type");
74
+ return;
75
+ }
76
+ for (let e of this.#f(t.type)) e(t);
77
+ }
78
+ #f(e) {
79
+ return [...this.#t.get(e) ?? [], ...this.#t.get("*") ?? []];
80
+ }
81
+ #p(e) {
82
+ this.#r !== e && (this.#r = e, this.#e.onStatusChange?.(e));
83
+ }
84
+ get status() {
85
+ return this.#r;
86
+ }
87
+ connect() {
88
+ this.#r !== "idle" && this.#r !== "closed" || (this.#o = !1, this.#i = 0, this.#s("connecting"));
89
+ }
90
+ close() {
91
+ this.#o = !0, this.#u();
92
+ let e = this.#n;
93
+ this.#n = null, e && e.close(), this.#p("closed");
94
+ }
95
+ subscribe(e, t) {
96
+ let n = this.#t.get(e);
97
+ return n || (n = /* @__PURE__ */ new Set(), this.#t.set(e, n)), n.add(t), () => {
98
+ n.delete(t), n.size === 0 && this.#t.delete(e);
99
+ };
100
+ }
101
+ };
102
+ //#endregion
103
+ export { r as PushClient };
@@ -0,0 +1,8 @@
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
+ import { PushClient as e } from "./client.js";
3
+ //#region src/push/helpers.ts
4
+ function t(t = {}) {
5
+ return new e(t);
6
+ }
7
+ //#endregion
8
+ export { t as createPushClient };
@@ -0,0 +1,5 @@
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
+ import { PUSH_CLOSE_SESSION_INVALID as e, PUSH_CLOSE_TOO_MANY_CONNECTIONS as t } from "./types.js";
3
+ import { PushClient as n } from "./client.js";
4
+ import { createPushClient as r } from "./helpers.js";
5
+ export { e as PUSH_CLOSE_SESSION_INVALID, t as PUSH_CLOSE_TOO_MANY_CONNECTIONS, n as PushClient, r as createPushClient };
@@ -0,0 +1,5 @@
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
+ //#region src/push/types.ts
3
+ var e = 4401, t = 4429;
4
+ //#endregion
5
+ export { e as PUSH_CLOSE_SESSION_INVALID, t as PUSH_CLOSE_TOO_MANY_CONNECTIONS };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  //#region src/query/constants.ts
3
3
  var e = "__vef_query_client_key";
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { hashKey as e, isPlainObject as t } from "@vef-framework-react/shared";
3
3
  import { MutationCache as n, QueryClient as r, keepPreviousData as i, matchQuery as a } from "@tanstack/react-query";
4
4
  //#region src/query/helpers.ts
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
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, useQueryClient as u, useQueryErrorResetBoundary as d } from "@tanstack/react-query";
3
3
  //#region src/query/hooks.ts
4
4
  function f(e) {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { QUERY_CLIENT_KEY as e } from "./constants.js";
3
3
  import { createQueryClient as t } from "./helpers.js";
4
4
  import { useInfiniteQuery as n, useIsFetching as r, useIsMutating as i, useMutation as a, useMutationState as o, useQueries as s, useQuery as c } from "./hooks.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { TokenExpiredError as e, createStreamMachine as t } from "./stream-machine.js";
3
3
  import { isString as n } from "@vef-framework-react/shared";
4
4
  import { fetchEventSource as r } from "@microsoft/fetch-event-source";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { SseClient as e } from "./client.js";
3
3
  //#region src/sse/helpers.ts
4
4
  function t(t) {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { SseClient as e } from "./client.js";
3
3
  import { createSseClient as t } from "./helpers.js";
4
4
  export { e as SseClient, t as createSseClient };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { fromPromise as e, setup as t } from "xstate";
3
3
  //#region src/sse/stream-machine.ts
4
4
  var n = class extends Error {
@@ -1,3 +1,3 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
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
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,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { Actor as e, assign as t, createActor as n, createMachine as r } from "xstate";
3
3
  import { useActorRef as i, useActorRef as a, useSelector as o } from "@xstate/react";
4
4
  //#region src/state-machine/index.ts
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  //#region src/storage/errors.ts
3
3
  var e = class extends Error {
4
4
  constructor(e, t) {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { UploadAbortedError as e, UploadError as t, UploadPartError as n, UploadProtocolError as r } from "./errors.js";
3
3
  import { DEFAULT_API_PATH as i, DEFAULT_RESOURCE as a, DEFAULT_VERSION as o, abortUpload as s, completeUpload as c, initUpload as l, listParts as u, uploadPart as d } from "./protocol.js";
4
4
  import { PrefixFingerprinter as f, WeakFingerprinter as p } from "./resumable/fingerprint.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { createApiRequest as e } from "../api/helpers.js";
3
3
  import { UploadProtocolError as t } from "./errors.js";
4
4
  //#region src/storage/protocol.ts
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  //#region src/storage/resumable/fingerprint.ts
3
3
  var e = class {
4
4
  fingerprint(e) {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { PrefixFingerprinter as e, WeakFingerprinter as t } from "./fingerprint.js";
3
3
  import { LocalStoragePersistence as n } from "./persistence.js";
4
4
  import { resolveResumePlan as r } from "./plan.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  //#region src/storage/resumable/persistence.ts
3
3
  var e = class {
4
4
  #e;
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { abortUpload as e, listParts as t } from "../protocol.js";
3
3
  //#region src/storage/resumable/plan.ts
4
4
  async function n(n) {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  //#region src/storage/types.ts
3
3
  var e = "pub/", t = "priv/";
4
4
  //#endregion
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { assertEvent as e, fromPromise as t, setup as n } from "xstate";
3
3
  //#region src/storage/uploader-machine.ts
4
4
  function r(r) {
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { UploadAbortedError as e, UploadError as t, UploadPartError as n, UploadProtocolError as r } from "./errors.js";
3
3
  import { abortUpload as i, completeUpload as a, initUpload as o, uploadPart as s } from "./protocol.js";
4
4
  import { createUploaderMachine as c } from "./uploader-machine.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { constantCase as e, identity as t } from "@vef-framework-react/shared";
3
3
  import { create as n } from "zustand";
4
4
  import { createJSONStorage as r, persist as i, subscribeWithSelector as a } from "zustand/middleware";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { createPersistedStore as e, createStore as t } from "./bound.js";
3
3
  import { createComponentStore as n } from "./unbound.js";
4
4
  import { useDeep as r } from "./use-deep.js";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { constantCase as e, identity as t, isPlainObject as n, mergeWith as r } from "@vef-framework-react/shared";
3
3
  import { createContext as i, use as a, useRef as o } from "react";
4
4
  import { jsx as s } from "@emotion/react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.12.0 made by Venus | 2026-07-17T09:22:36.986Z */
1
+ /*! @vef-framework-react/core v2.13.1 made by Venus | 2026-07-28T11:21:11.377Z */
2
2
  import { isDeepEqual as e } from "@vef-framework-react/shared";
3
3
  import { useRef as t } from "react";
4
4
  //#region src/store/use-deep.ts
@@ -16,10 +16,10 @@ export interface AppContext {
16
16
  */
17
17
  hasPermission?: (token: string) => boolean;
18
18
  /**
19
- * The query function for fetching data dictionary entries.
20
- * Accepts an array of dictionary keys and returns a record mapping each key to its options.
19
+ * The query function for fetching host code set entries (the data-dictionary seam).
20
+ * Accepts an array of code set keys and returns a record mapping each key to its options.
21
21
  */
22
- dictionaryQueryFn?: QueryFunction<Record<string, DataOption[]>, string[]>;
22
+ codeSetQueryFn?: QueryFunction<Record<string, DataOption[]>, string[]>;
23
23
  /**
24
24
  * The base URL for file access.
25
25
  */
@@ -0,0 +1,18 @@
1
+ import { BodyEncoding } from './types';
2
+ /**
3
+ * The transport encoding actually applied to a request body, paired with the
4
+ * encoded text. `gzip+base64` degrades to `base64` when the runtime has no
5
+ * `CompressionStream`, so the reported encoding can differ from the request.
6
+ */
7
+ export interface EncodedRequestBody {
8
+ body: string;
9
+ encoding: Exclude<BodyEncoding, "none">;
10
+ }
11
+ /**
12
+ * Encode a serialized JSON payload for transport so a code-shaped body (an
13
+ * integration adapter or envelope/auth script) survives middleboxes that
14
+ * false-positive on it; the server's body-encoding middleware reverses it
15
+ * before parsing. `gzip+base64` compresses first — smaller on the wire and
16
+ * still text-shaped — and falls back to `base64` when the runtime cannot gzip.
17
+ */
18
+ export declare function encodeRequestBody(payload: string, encoding: Exclude<BodyEncoding, "none">): Promise<EncodedRequestBody>;
@@ -1,5 +1,5 @@
1
1
  import { AxiosProgressEvent } from 'axios';
2
- import { ApiResult, HttpClientOptions, HttpFileResponse, RequestOptions } from './types';
2
+ import { ApiResult, BodyEncoding, HttpClientOptions, HttpFileResponse, RequestOptions } from './types';
3
3
  /**
4
4
  * The HTTP client.
5
5
  */
@@ -103,6 +103,12 @@ export declare class HttpClient {
103
103
  * Extract a filename from Content-Disposition.
104
104
  */
105
105
  private getResponseFilename;
106
+ /**
107
+ * Apply the resolved transport body encoding to a request, adding the
108
+ * `X-Body-Encoding` header for the server to reverse. A non-JSON body or a
109
+ * resolved `none` encoding passes through untouched.
110
+ */
111
+ private encodeRequestData;
106
112
  /**
107
113
  * Ensure the token is refreshed. Can be called proactively by external code
108
114
  * (e.g., fetch-based SSE) to refresh token before/after request.
@@ -123,6 +129,7 @@ export declare class HttpClient {
123
129
  post<R = unknown, D = unknown, P = unknown>(url: string, options?: RequestOptions & {
124
130
  data?: D;
125
131
  params?: P;
132
+ bodyEncoding?: BodyEncoding;
126
133
  }): Promise<ApiResult<R>>;
127
134
  /**
128
135
  * PUT request.
@@ -130,6 +137,7 @@ export declare class HttpClient {
130
137
  put<R = unknown, D = unknown, P = unknown>(url: string, options?: RequestOptions & {
131
138
  data?: D;
132
139
  params?: P;
140
+ bodyEncoding?: BodyEncoding;
133
141
  }): Promise<ApiResult<R>>;
134
142
  /**
135
143
  * DELETE request.
@@ -21,6 +21,11 @@ export declare const SKIP_AUTH_HEADER = "X-Skip-Authentication";
21
21
  * The header value for skipping authentication.
22
22
  */
23
23
  export declare const SKIP_AUTH_VALUE = "1";
24
+ /**
25
+ * The header naming the transport encoding applied to a request body, which the
26
+ * server's body-encoding middleware reverses before parsing.
27
+ */
28
+ export declare const BODY_ENCODING_HEADER = "X-Body-Encoding";
24
29
  /**
25
30
  * Default request timeout in milliseconds (30 seconds).
26
31
  */
@@ -18,6 +18,18 @@ export interface ApiResult<T = unknown> {
18
18
  */
19
19
  readonly data: T;
20
20
  }
21
+ /**
22
+ * How a request body is transport-encoded so a code-shaped payload survives
23
+ * middleboxes (WAF / proxy) that false-positive on it; the server's
24
+ * body-encoding middleware reverses it before parsing.
25
+ *
26
+ * - `none` — send the body verbatim (also opts a single request out of a
27
+ * client-wide `defaultBodyEncoding`).
28
+ * - `base64` — base64 of the UTF-8 JSON body.
29
+ * - `gzip+base64` — base64 of a gzip stream of the UTF-8 JSON body; smaller on
30
+ * the wire and still text-shaped.
31
+ */
32
+ export type BodyEncoding = "none" | "base64" | "gzip+base64";
21
33
  /**
22
34
  * The authenticated tokens.
23
35
  */
@@ -87,6 +99,12 @@ export interface HttpClientOptions {
87
99
  * The function to show the error message.
88
100
  */
89
101
  showErrorMessage?: (message: string) => void;
102
+ /**
103
+ * The transport encoding applied to every request body by default. Individual
104
+ * requests override it (including `"none"` to opt out); absent means the body
105
+ * is sent verbatim.
106
+ */
107
+ defaultBodyEncoding?: BodyEncoding;
90
108
  }
91
109
  /**
92
110
  * A file fetched through the HTTP client.
@@ -3,10 +3,11 @@ export { checkPermission, type PermissionCheckMode } from './auth';
3
3
  export { type DataOption, type DataOptionWithPinyin, type PaginationParams, type PaginationResult } from './common';
4
4
  export { ApiClientProvider, AppContextProvider, createContextWithSelector, DisabledProvider, useApiClient, useAppContext, useDisabled, type AppContext, type SelectorContextProviderProps, type SelectorContextResult, type UseSelectorContext } from './context';
5
5
  export { AxisModifier, closestCenter, closestCorners, CollisionPriority, defaultCollisionDetection, defaultPreset, directionBiased, DragDropContext, DragDropProvider, Draggable, DragOverlay, Droppable, Feedback, KeyboardSensor, moveArrayItem, moveDragItem, PointerActivationConstraints, pointerDistance, pointerIntersection, PointerSensor, restrictShapeToBoundingRectangle, RestrictToElement, RestrictToHorizontalAxis, RestrictToVerticalAxis, RestrictToWindow, shapeIntersection, SnapModifier, swapArrayItem, swapDragItem, useDragDropMonitor, useDraggable, useDragOperation, useDroppable, useSortable, type BeforeDragStartEvent, type CollisionDetector, type CollisionEvent, type DragDropContextProps, type DragDropEventHandlers, type DragEndEvent, type DraggableChildrenFn, type DraggableId, type DraggableLocation, type DraggableProps, type DraggableProvided, type DraggableProvidedDraggableProps, type DraggableProvidedDragHandleProps, type DraggableRubric, type DraggableStateSnapshot, type DragMoveEvent, type DragOverEvent, type DragStartEvent, type DroppableId, type DroppableProps, type DroppableProvided, type DroppableProvidedProps, type DroppableStateSnapshot, type DropResult, type FeedbackInput, type FeedbackOptions, type FeedbackType, type OnBeforeCaptureResponder, type OnBeforeDragStartResponder, type OnDragEndResponder, type OnDragStartResponder, type OnDragUpdateResponder } from './dnd';
6
- export type { ApiResult, AuthTokens, HttpClient, HttpClientOptions, HttpFileResponse, ProgressEvent, RequestOptions } from './http';
6
+ export type { ApiResult, AuthTokens, BodyEncoding, HttpClient, HttpClientOptions, HttpFileResponse, ProgressEvent, RequestOptions } from './http';
7
7
  export { BusinessError, isBusinessError, skipAuthenticationHeader, skipAuthenticationValue } from './http';
8
8
  export { applyPatches, currentState, originalState, produce, produceWithPatches, useImmer, useImmerReducer } from './immer';
9
9
  export { AnimatePresence, LayoutGroup, motion, MotionProvider, Reorder, useDragControls, useInView, type MotionProps, type ResolvedValues, type TargetAndTransition, type Transition, type Variant, type VariantLabels, type Variants } from './motion';
10
+ export { createPushClient, PUSH_CLOSE_SESSION_INVALID, PUSH_CLOSE_TOO_MANY_CONNECTIONS, PushClient, type PushClientOptions, type PushMessage, type PushMessageHandler, type PushReconnectOptions, type PushStatus } from './push';
10
11
  export { keepPreviousData, matchMutation, matchQuery, skipQueryToken, useInfiniteQuery, useIsFetching, useIsMutating, useMutation, useMutationState, useQueries, useQuery, useQueryClient, useQueryErrorResetBoundary, type DefinedInitialDataOptions, type DefinedUseQueryResult, type InitialDataFunction, type MutationFunctionContext, type MutationMeta, type MutationScope, type PlaceholderDataFunction, type QueryClientOptions, type QueryKeyHashFunction, type QueryMeta, type RefetchOptions, type RetryDelayFunction, type RetryDelayValue, type RetryValue, type ShouldRetryFunction, type SkipQueryToken, type StaleTime, type UndefinedInitialDataOptions, type UseInfiniteQueryOptions, type UseMutationResult, type UseQueryOptions, type UseQueryResult } from './query';
11
12
  export { createSseClient, SseClient, type SseClientOptions, type SseEventHandlers, type SseMessageEvent, type SseRequestConfig } from './sse';
12
13
  export { atom, AtomStoreProvider, createAtomStore, getDefaultAtomStore, useAtom, useAtomStore, useAtomValue, useSetAtom, type Atom, type AtomGetter, type AtomSetter, type ExtractAtomArgs, type ExtractAtomResult, type ExtractAtomValue, type PrimitiveAtom, type SetStateAction, type WritableAtom } from './state';
@@ -0,0 +1,33 @@
1
+ import { PushClientOptions, PushMessageHandler, PushStatus } from './types';
2
+ /**
3
+ * Client for the vef server push channel (`vef.push`, WebSocket, downstream
4
+ * only). Delivery is best-effort by the server contract — this channel is the
5
+ * real-time hint, while reliable state lives behind the regular API.
6
+ *
7
+ * Handlers subscribe by envelope `type` (`"*"` receives everything).
8
+ * Transport-level losses reconnect with jittered exponential backoff and a
9
+ * freshly read access token; the terminal close codes 4401 (session invalid)
10
+ * and 4429 (connection cap) surface through their callbacks and never
11
+ * reconnect. `close()` is the app-driven exit (e.g. logout).
12
+ */
13
+ export declare class PushClient {
14
+ #private;
15
+ constructor(options?: PushClientOptions);
16
+ /**
17
+ * Current connection status.
18
+ */
19
+ get status(): PushStatus;
20
+ /**
21
+ * Open the connection. Safe to call repeatedly; an active session is kept.
22
+ */
23
+ connect(): void;
24
+ /**
25
+ * Close the connection and stop reconnecting (the logout path).
26
+ */
27
+ close(): void;
28
+ /**
29
+ * Subscribe a handler to messages of one envelope type (`"*"` receives
30
+ * every message). Returns the unsubscribe function.
31
+ */
32
+ subscribe<TPayload = unknown>(type: string, handler: PushMessageHandler<TPayload>): () => void;
33
+ }
@@ -0,0 +1,9 @@
1
+ import { PushClientOptions } from './types';
2
+ import { PushClient } from './client';
3
+ /**
4
+ * Create a push client instance (factory).
5
+ *
6
+ * @param options - Push client options.
7
+ * @returns Push client instance.
8
+ */
9
+ export declare function createPushClient(options?: PushClientOptions): PushClient;
@@ -0,0 +1,3 @@
1
+ export { PushClient } from './client';
2
+ export { createPushClient } from './helpers';
3
+ export * from './types';