@vef-framework-react/core 2.5.0 → 2.7.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 (71) hide show
  1. package/dist/cjs/api/client.cjs +1 -1
  2. package/dist/cjs/api/index.cjs +1 -1
  3. package/dist/cjs/auth/index.cjs +1 -1
  4. package/dist/cjs/context/index.cjs +1 -1
  5. package/dist/cjs/http/client.cjs +1 -1
  6. package/dist/cjs/http/helpers.cjs +1 -1
  7. package/dist/cjs/http/index.cjs +1 -1
  8. package/dist/cjs/index.cjs +1 -1
  9. package/dist/cjs/motion/index.cjs +1 -1
  10. package/dist/cjs/query/index.cjs +1 -1
  11. package/dist/cjs/sse/client.cjs +1 -1
  12. package/dist/cjs/sse/index.cjs +1 -1
  13. package/dist/cjs/storage/index.cjs +1 -1
  14. package/dist/cjs/storage/resumable/index.cjs +1 -1
  15. package/dist/cjs/storage/resumable/persistence.cjs +1 -1
  16. package/dist/cjs/storage/uploader.cjs +1 -1
  17. package/dist/cjs/store/bound.cjs +1 -1
  18. package/dist/cjs/store/index.cjs +1 -1
  19. package/dist/cjs/store/unbound.cjs +1 -1
  20. package/dist/es/api/client.js +7 -7
  21. package/dist/es/api/constants.js +2 -2
  22. package/dist/es/api/helpers.js +1 -1
  23. package/dist/es/api/index.js +5 -4
  24. package/dist/es/auth/helpers.js +1 -1
  25. package/dist/es/auth/index.js +3 -2
  26. package/dist/es/context/api-client.js +1 -1
  27. package/dist/es/context/app.js +1 -1
  28. package/dist/es/context/context-selector.js +1 -1
  29. package/dist/es/context/disabled.js +1 -1
  30. package/dist/es/context/index.js +6 -5
  31. package/dist/es/dnd/index.js +1 -1
  32. package/dist/es/http/client.js +8 -8
  33. package/dist/es/http/constants.js +1 -1
  34. package/dist/es/http/errors.js +1 -1
  35. package/dist/es/http/helpers.js +9 -6
  36. package/dist/es/http/index.js +5 -4
  37. package/dist/es/immer/index.js +1 -1
  38. package/dist/es/index.js +34 -32
  39. package/dist/es/motion/features.js +1 -1
  40. package/dist/es/motion/index.js +5 -5
  41. package/dist/es/motion/motion-provider.js +1 -1
  42. package/dist/es/query/constants.js +1 -1
  43. package/dist/es/query/helpers.js +1 -1
  44. package/dist/es/query/hooks.js +1 -1
  45. package/dist/es/query/index.js +5 -4
  46. package/dist/es/sse/client.js +29 -29
  47. package/dist/es/sse/helpers.js +1 -1
  48. package/dist/es/sse/index.js +4 -3
  49. package/dist/es/sse/stream-machine.js +1 -1
  50. package/dist/es/state/index.js +1 -1
  51. package/dist/es/state-machine/index.js +1 -1
  52. package/dist/es/storage/errors.js +1 -1
  53. package/dist/es/storage/index.js +9 -8
  54. package/dist/es/storage/protocol.js +1 -1
  55. package/dist/es/storage/resumable/fingerprint.js +1 -1
  56. package/dist/es/storage/resumable/index.js +5 -4
  57. package/dist/es/storage/resumable/persistence.js +20 -20
  58. package/dist/es/storage/resumable/plan.js +1 -1
  59. package/dist/es/storage/types.js +1 -1
  60. package/dist/es/storage/uploader-machine.js +1 -1
  61. package/dist/es/storage/uploader.js +26 -26
  62. package/dist/es/store/bound.js +4 -4
  63. package/dist/es/store/index.js +6 -6
  64. package/dist/es/store/unbound.js +4 -4
  65. package/dist/es/store/use-deep.js +1 -1
  66. package/dist/types/api/client.d.ts +5 -5
  67. package/dist/types/http/client.d.ts +8 -8
  68. package/dist/types/index.d.ts +2 -2
  69. package/dist/types/sse/stream-machine.d.ts +1 -1
  70. package/dist/types/storage/uploader-machine.d.ts +1 -1
  71. package/package.json +13 -13
@@ -1,4 +1,5 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
2
- import "./constants.js";
3
- import "./helpers.js";
4
- import "./hooks.js";
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
2
+ import { QUERY_CLIENT_KEY as e } from "./constants.js";
3
+ import { createQueryClient as t } from "./helpers.js";
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";
5
+ export { e as QUERY_CLIENT_KEY, t as createQueryClient, n as useInfiniteQuery, r as useIsFetching, i as useIsMutating, a as useMutation, o as useMutationState, s as useQueries, c as useQuery };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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";
@@ -21,34 +21,6 @@ var s = class {
21
21
  ...e
22
22
  };
23
23
  }
24
- stream(e, n) {
25
- let r, a = i(t({
26
- runAttempt: () => this.#n(e, n),
27
- refreshToken: () => this.#a(),
28
- reportAuthFailure: () => {
29
- let e = /* @__PURE__ */ Error("Authentication failed: token expired");
30
- n.onError?.(e), this.#e.showErrorMessage?.(e.message);
31
- },
32
- recordFailure: (e) => {
33
- r = e;
34
- }
35
- }));
36
- return new Promise((e, t) => {
37
- a.subscribe((n) => {
38
- if (n.status === "done") {
39
- if (n.value === "failed") {
40
- t(r);
41
- return;
42
- }
43
- e();
44
- }
45
- }), a.start();
46
- });
47
- }
48
- abort() {
49
- for (let e of this.#t) e.abort();
50
- this.#t.clear();
51
- }
52
24
  async #n(t, n) {
53
25
  let i = new AbortController();
54
26
  this.#t.add(i);
@@ -122,6 +94,34 @@ var s = class {
122
94
  return console.error("Failed to refresh token:", e), !1;
123
95
  }
124
96
  }
97
+ stream(e, n) {
98
+ let r, a = i(t({
99
+ runAttempt: () => this.#n(e, n),
100
+ refreshToken: () => this.#a(),
101
+ reportAuthFailure: () => {
102
+ let e = /* @__PURE__ */ Error("Authentication failed: token expired");
103
+ n.onError?.(e), this.#e.showErrorMessage?.(e.message);
104
+ },
105
+ recordFailure: (e) => {
106
+ r = e;
107
+ }
108
+ }));
109
+ return new Promise((e, t) => {
110
+ a.subscribe((n) => {
111
+ if (n.status === "done") {
112
+ if (n.value === "failed") {
113
+ t(r);
114
+ return;
115
+ }
116
+ e();
117
+ }
118
+ }), a.start();
119
+ });
120
+ }
121
+ abort() {
122
+ for (let e of this.#t) e.abort();
123
+ this.#t.clear();
124
+ }
125
125
  };
126
126
  //#endregion
127
127
  export { s as SseClient };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
2
2
  import { SseClient as e } from "./client.js";
3
3
  //#region src/sse/helpers.ts
4
4
  function t(t) {
@@ -1,3 +1,4 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
2
- import "./client.js";
3
- import "./helpers.js";
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
2
+ import { SseClient as e } from "./client.js";
3
+ import { createSseClient as t } from "./helpers.js";
4
+ export { e as SseClient, t as createSseClient };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
2
2
  //#region src/storage/errors.ts
3
3
  var e = class extends Error {
4
4
  constructor(e, t) {
@@ -1,8 +1,9 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
2
- import "./errors.js";
3
- import "./protocol.js";
4
- import "./resumable/fingerprint.js";
5
- import "./resumable/persistence.js";
6
- import "./resumable/plan.js";
7
- import "./types.js";
8
- import "./uploader.js";
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
2
+ import { UploadAbortedError as e, UploadError as t, UploadPartError as n, UploadProtocolError as r } from "./errors.js";
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
+ import { PrefixFingerprinter as f, WeakFingerprinter as p } from "./resumable/fingerprint.js";
5
+ import { LocalStoragePersistence as m } from "./resumable/persistence.js";
6
+ import { resolveResumePlan as h } from "./resumable/plan.js";
7
+ import { PRIVATE_PREFIX as g, PUBLIC_PREFIX as _ } from "./types.js";
8
+ import { Uploader as v, uploadFile as y } from "./uploader.js";
9
+ export { i as DEFAULT_API_PATH, a as DEFAULT_RESOURCE, o as DEFAULT_VERSION, m as LocalStoragePersistence, g as PRIVATE_PREFIX, _ as PUBLIC_PREFIX, f as PrefixFingerprinter, e as UploadAbortedError, t as UploadError, n as UploadPartError, r as UploadProtocolError, v as Uploader, p as WeakFingerprinter, s as abortUpload, c as completeUpload, l as initUpload, u as listParts, h as resolveResumePlan, y as uploadFile, d as uploadPart };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
2
2
  //#region src/storage/resumable/fingerprint.ts
3
3
  var e = class {
4
4
  fingerprint(e) {
@@ -1,4 +1,5 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
2
- import "./fingerprint.js";
3
- import "./persistence.js";
4
- import "./plan.js";
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
2
+ import { PrefixFingerprinter as e, WeakFingerprinter as t } from "./fingerprint.js";
3
+ import { LocalStoragePersistence as n } from "./persistence.js";
4
+ import { resolveResumePlan as r } from "./plan.js";
5
+ export { n as LocalStoragePersistence, e as PrefixFingerprinter, t as WeakFingerprinter, r as resolveResumePlan };
@@ -1,9 +1,23 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
2
2
  //#region src/storage/resumable/persistence.ts
3
- var e = "__VEF_UPLOAD_RESUME__", t = class {
3
+ var e = class {
4
4
  #e;
5
- constructor(t = e) {
6
- this.#e = t;
5
+ constructor(e = "__VEF_UPLOAD_RESUME__") {
6
+ this.#e = e;
7
+ }
8
+ #t(e) {
9
+ if (typeof localStorage > "u") return null;
10
+ let n = localStorage.getItem(this.#n(e));
11
+ if (!n) return null;
12
+ try {
13
+ let e = JSON.parse(n);
14
+ return t(e) ? e : null;
15
+ } catch {
16
+ return null;
17
+ }
18
+ }
19
+ #n(e) {
20
+ return `${this.#e}${e}`;
7
21
  }
8
22
  load(e) {
9
23
  return Promise.resolve(this.#t(e));
@@ -24,23 +38,9 @@ var e = "__VEF_UPLOAD_RESUME__", t = class {
24
38
  for (let t of e) localStorage.removeItem(t);
25
39
  return Promise.resolve();
26
40
  }
27
- #t(e) {
28
- if (typeof localStorage > "u") return null;
29
- let t = localStorage.getItem(this.#n(e));
30
- if (!t) return null;
31
- try {
32
- let e = JSON.parse(t);
33
- return n(e) ? e : null;
34
- } catch {
35
- return null;
36
- }
37
- }
38
- #n(e) {
39
- return `${this.#e}${e}`;
40
- }
41
41
  };
42
- function n(e) {
42
+ function t(e) {
43
43
  return typeof e.fingerprint == "string" && typeof e.claimId == "string" && typeof e.key == "string" && typeof e.partSize == "number" && typeof e.partCount == "number" && typeof e.expiresAt == "string" && typeof e.savedAt == "number";
44
44
  }
45
45
  //#endregion
46
- export { t as LocalStoragePersistence };
46
+ export { e as LocalStoragePersistence };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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";
@@ -79,31 +79,6 @@ var g = class {
79
79
  this.#O(e.value), e.status === "done" && this.#k(e.value);
80
80
  }), this.#m.start();
81
81
  }
82
- get status() {
83
- return this.#h;
84
- }
85
- get progress() {
86
- return this.#g;
87
- }
88
- start(e) {
89
- return this.#_ ? this.#_ : (this.#_ = new Promise((e, t) => {
90
- this.#v = {
91
- resolve: e,
92
- reject: t
93
- };
94
- }), this.#m.send({
95
- type: "START",
96
- plan: e ?? { kind: "fresh" }
97
- }), this.#_);
98
- }
99
- async abort() {
100
- if (this.#m.getSnapshot().status === "done") return;
101
- this.#E();
102
- let e = this.#_;
103
- if (e) try {
104
- await e;
105
- } catch {}
106
- }
107
82
  #E() {
108
83
  this.#m.send({ type: "ABORT" }), this.#f.abort();
109
84
  }
@@ -261,6 +236,31 @@ var g = class {
261
236
  #V(e) {
262
237
  return e instanceof t ? e : e instanceof Error ? new r("unknown", e.message, { cause: e }) : new r("unknown", String(e));
263
238
  }
239
+ get status() {
240
+ return this.#h;
241
+ }
242
+ get progress() {
243
+ return this.#g;
244
+ }
245
+ start(e) {
246
+ return this.#_ ? this.#_ : (this.#_ = new Promise((e, t) => {
247
+ this.#v = {
248
+ resolve: e,
249
+ reject: t
250
+ };
251
+ }), this.#m.send({
252
+ type: "START",
253
+ plan: e ?? { kind: "fresh" }
254
+ }), this.#_);
255
+ }
256
+ async abort() {
257
+ if (this.#m.getSnapshot().status === "done") return;
258
+ this.#E();
259
+ let e = this.#_;
260
+ if (e) try {
261
+ await e;
262
+ } catch {}
263
+ }
264
264
  };
265
265
  function _(e, t, n) {
266
266
  return new g(e, t, n).start();
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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";
@@ -8,13 +8,13 @@ function s(e) {
8
8
  return n()(a(o(e)));
9
9
  }
10
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), {
11
+ let { name: l, storage: u, selector: d } = c, f = `__VEF_STORE__${e(l)}__`, p = u === "local" ? localStorage : sessionStorage, m = i(o(s), {
13
12
  name: f,
14
13
  version: 1,
15
14
  storage: r(() => p),
16
15
  partialize: d ?? t
17
- })));
16
+ });
17
+ return n()(a(m));
18
18
  }
19
19
  //#endregion
20
20
  export { c as createPersistedStore, s as createStore };
@@ -1,6 +1,6 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
2
- import "./bound.js";
3
- import "./unbound.js";
4
- import "./use-deep.js";
5
- import { useShallow as e } from "zustand/shallow";
6
- export { e as useShallow };
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
2
+ import { createPersistedStore as e, createStore as t } from "./bound.js";
3
+ import { createComponentStore as n } from "./unbound.js";
4
+ import { useDeep as r } from "./use-deep.js";
5
+ import { useShallow as i } from "zustand/shallow";
6
+ export { n as createComponentStore, e as createPersistedStore, t as createStore, r as useDeep, i as useShallow };
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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";
@@ -17,13 +17,13 @@ function _(_, v, y) {
17
17
  if (b.current = a, !g.current || !_.current) {
18
18
  let n = v;
19
19
  if (u && y) {
20
- let r = `${h}${e(u)}__`, i = y.storage === "local" ? localStorage : sessionStorage;
21
- g.current = l()(p(f(m(n), {
20
+ let r = `${h}${e(u)}__`, i = y.storage === "local" ? localStorage : sessionStorage, a = f(m(n), {
22
21
  name: r,
23
22
  version: 1,
24
23
  storage: d(() => i),
25
24
  partialize: y.selector ?? t
26
- })));
25
+ });
26
+ g.current = l()(p(a));
27
27
  } else g.current = l()(p(m(n)));
28
28
  _.current = !0;
29
29
  }
@@ -1,4 +1,4 @@
1
- /*! @vef-framework-react/core v2.5.0 made by Venus | 2026-06-25T04:02:55.216Z */
1
+ /*! @vef-framework-react/core v2.7.0 made by Venus | 2026-07-06T01:40:54.909Z */
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
@@ -8,6 +8,11 @@ import { HTTP_CLIENT, QUERY_CLIENT } from './constants';
8
8
  */
9
9
  export declare class ApiClient {
10
10
  #private;
11
+ constructor(options: ApiClientOptions);
12
+ /**
13
+ * Create a proxied HttpClient that injects the current abort signal.
14
+ */
15
+ private createProxiedHttpClient;
11
16
  /**
12
17
  * Access the underlying QueryClient.
13
18
  */
@@ -16,11 +21,6 @@ export declare class ApiClient {
16
21
  * Access the underlying HttpClient.
17
22
  */
18
23
  get [HTTP_CLIENT](): Readonly<HttpClient>;
19
- constructor(options: ApiClientOptions);
20
- /**
21
- * Create a proxied HttpClient that injects the current abort signal.
22
- */
23
- private createProxiedHttpClient;
24
24
  /**
25
25
  * Create a query function with automatic signal injection.
26
26
  */
@@ -51,14 +51,6 @@ export declare class HttpClient {
51
51
  * Replace path parameters in the URL (e.g., /users/:id -> /users/123).
52
52
  */
53
53
  private replacePathParams;
54
- /**
55
- * Ensure the token is refreshed. Can be called proactively by external code
56
- * (e.g., fetch-based SSE) to refresh token before/after request.
57
- *
58
- * @param triggerCallback - Whether to trigger onUnauthenticated callback on failure.
59
- * @returns True if token refresh succeeded, false otherwise.
60
- */
61
- ensureTokenRefreshed(triggerCallback?: boolean): Promise<boolean>;
62
54
  /**
63
55
  * Try to refresh the token using the provided refresh callback.
64
56
  */
@@ -67,6 +59,14 @@ export declare class HttpClient {
67
59
  * Retry the request with refreshed token.
68
60
  */
69
61
  private retryRequest;
62
+ /**
63
+ * Ensure the token is refreshed. Can be called proactively by external code
64
+ * (e.g., fetch-based SSE) to refresh token before/after request.
65
+ *
66
+ * @param triggerCallback - Whether to trigger onUnauthenticated callback on failure.
67
+ * @returns True if token refresh succeeded, false otherwise.
68
+ */
69
+ ensureTokenRefreshed(triggerCallback?: boolean): Promise<boolean>;
70
70
  /**
71
71
  * GET request.
72
72
  */
@@ -3,8 +3,8 @@ 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, BusinessError, HttpClient, HttpClientOptions, isBusinessError, ProgressEvent, RequestOptions } from './http';
7
- export { skipAuthenticationHeader, skipAuthenticationValue } from './http';
6
+ export type { ApiResult, AuthTokens, HttpClient, HttpClientOptions, ProgressEvent, RequestOptions } from './http';
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
10
  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';
@@ -60,7 +60,7 @@ export interface StreamMachineDeps {
60
60
  * itself, not a boolean threaded through call frames.
61
61
  */
62
62
  export declare function createStreamMachine(deps: StreamMachineDeps): StateMachine<MachineContext, AnyEventObject, {
63
- [x: string]: ActorRefFromLogic<PromiseActorLogic<boolean, NonReducibleUnknown, EventObject>> | ActorRefFromLogic<PromiseActorLogic<void, NonReducibleUnknown, EventObject>> | undefined;
63
+ [x: string]: ActorRefFromLogic< PromiseActorLogic<void, NonReducibleUnknown, EventObject> | PromiseActorLogic<boolean, NonReducibleUnknown, EventObject>> | undefined;
64
64
  }, {
65
65
  src: "refreshToken";
66
66
  logic: PromiseActorLogic<boolean, NonReducibleUnknown, EventObject>;
@@ -65,7 +65,7 @@ export declare function createUploaderMachine(deps: UploaderMachineDeps): StateM
65
65
  } | {
66
66
  type: "ABORT";
67
67
  }, {
68
- [x: string]: ActorRefFromLogic<PromiseActorLogic<void, NonReducibleUnknown, EventObject>> | ActorRefFromLogic<PromiseActorLogic<void, ResumePlan, EventObject>> | undefined;
68
+ [x: string]: ActorRefFromLogic< PromiseActorLogic<void, NonReducibleUnknown, EventObject> | PromiseActorLogic<void, ResumePlan, EventObject>> | undefined;
69
69
  }, {
70
70
  src: "prepareSession";
71
71
  logic: PromiseActorLogic<void, ResumePlan, EventObject>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vef-framework-react/core",
3
- "version": "2.5.0",
3
+ "version": "2.7.0",
4
4
  "private": false,
5
5
  "description": "Core features for VEF framework",
6
6
  "keywords": [
@@ -39,25 +39,25 @@
39
39
  "dist"
40
40
  ],
41
41
  "dependencies": {
42
- "@dnd-kit/abstract": "^0.4.0",
43
- "@dnd-kit/collision": "^0.4.0",
44
- "@dnd-kit/dom": "^0.4.0",
45
- "@dnd-kit/helpers": "^0.4.0",
46
- "@dnd-kit/react": "^0.4.0",
42
+ "@dnd-kit/abstract": "^0.5.0",
43
+ "@dnd-kit/collision": "^0.5.0",
44
+ "@dnd-kit/dom": "^0.5.0",
45
+ "@dnd-kit/helpers": "^0.5.0",
46
+ "@dnd-kit/react": "^0.5.0",
47
47
  "@emotion/react": "^11.14.0",
48
48
  "@hello-pangea/dnd": "^18.0.1",
49
49
  "@microsoft/fetch-event-source": "^2.0.1",
50
- "@tanstack/react-query": "^5.101.0",
50
+ "@tanstack/react-query": "^5.101.2",
51
51
  "@xstate/react": "^6.1.0",
52
- "axios": "^1.17.0",
52
+ "axios": "^1.18.1",
53
53
  "clsx": "^2.1.1",
54
- "immer": "^11.1.7",
55
- "jotai": "^2.20.0",
56
- "motion": "^12.40.0",
54
+ "immer": "^11.1.9",
55
+ "jotai": "^2.20.1",
56
+ "motion": "^12.42.2",
57
57
  "use-immer": "^0.11.0",
58
- "xstate": "^5.32.0",
58
+ "xstate": "^5.32.3",
59
59
  "zustand": "^5.0.14",
60
- "@vef-framework-react/shared": "2.5.0"
60
+ "@vef-framework-react/shared": "2.7.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "react": "^19.2.7"