@hortiview/modulebase 0.0.13100-beta → 0.0.13102-beta

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.
@@ -1,6 +1,6 @@
1
1
  import { useCallback as r } from "react";
2
2
  import { useBasePropsStore as t } from "./stores/BasePropsStore.js";
3
- import { A as R, B as F, F as E, H as N, I as l, a as A, b as _, L as v, c as d, M as m, d as U, N as g, e as h, f as C, O as p, P, R as H, g as y, h as L, i as k, S as x, j as D, k as w, l as I, m as M, D as O, n as b, E as B, o as T, p as f, q as V, r as q, s as z, t as G, u as K, v as W, V as j, w as J, x as Q, y as X, z as Y, C as Z, G as $, J as aa, K as ea, Q as sa, T as ta, U as ra, W as oa, X as ia, Y as ua, Z as na, _ as ca, $ as Sa, a0 as Ra, a1 as Fa, a2 as Ea, a3 as Na, a4 as la, a5 as Aa, a6 as _a, a7 as va, a8 as da, a9 as ma, aa as Ua, ab as ga, ac as ha, ad as Ca, ae as pa, af as Pa, ag as Ha, ah as ya, ai as La, aj as ka, ak as xa, al as Da, am as wa, an as Ia, ao as Ma, ap as Oa, aq as ba, ar as Ba, as as Ta, at as fa, au as Va, av as qa, aw as za, ax as Ga, ay as Ka, az as Wa, aA as ja, aB as Ja, aC as Qa, aD as Xa, aE as Ya, aF as Za, aG as $a, aH as ae, aI as ee, aJ as se, aK as te, aL as re, aM as oe, aN as ie, aO as ue, aP as ne, aQ as ce, aR as Se, aS as Re, aT as Fe } from "./chunk-IR6S3I6Y-BmDdD3SP.js";
3
+ import { A as R, B as F, F as E, H as N, I as _, a as l, b as A, L as d, c as U, M as v, d as h, N as m, e as g, f as C, O as p, P, R as y, g as H, h as x, i as k, S as L, j as w, k as D, l as b, m as I, D as B, n as M, E as O, o as T, p as f, q as V, r as W, s as q, t as z, u as G, v as K, V as j, w as J, x as Q, y as X, z as Y, C as Z, G as $, J as aa, K as ea, Q as sa, T as ta, U as ra, W as oa, X as ia, Y as ua, Z as na, _ as ca, $ as Sa, a0 as Ra, a1 as Fa, a2 as Ea, a3 as Na, a4 as _a, a5 as la, a6 as Aa, a7 as da, a8 as Ua, a9 as va, aa as ha, ab as ma, ac as ga, ad as Ca, ae as pa, af as Pa, ag as ya, ah as Ha, ai as xa, aj as ka, ak as La, al as wa, am as Da, an as ba, ao as Ia, ap as Ba, aq as Ma, ar as Oa, as as Ta, at as fa, au as Va, av as Wa, aw as qa, ax as za, ay as Ga, az as Ka, aA as ja, aB as Ja, aC as Qa, aD as Xa, aE as Ya, aF as Za, aG as $a, aH as ae, aI as ee, aJ as se, aK as te, aL as re, aM as oe, aN as ie, aO as ue, aP as ne, aQ as ce, aR as Se, aS as Re, aT as Fe, aU as Ee, aV as Ne, aW as _e, aX as le, aY as Ae, aZ as de, a_ as Ue, a$ as ve } from "./chunk-QMGIS6GS-C4bgXQXY.js";
4
4
  const n = () => {
5
5
  const s = t((a) => a.navigateTo), e = t((a) => a.navigateInHortiview);
6
6
  return r(
@@ -19,38 +19,38 @@ export {
19
19
  F as BrowserRouter,
20
20
  E as Form,
21
21
  N as HashRouter,
22
- l as IDLE_BLOCKER,
23
- A as IDLE_FETCHER,
24
- _ as IDLE_NAVIGATION,
25
- v as Link,
26
- d as Links,
27
- m as MemoryRouter,
28
- U as Meta,
29
- g as NavLink,
30
- h as Navigate,
22
+ _ as IDLE_BLOCKER,
23
+ l as IDLE_FETCHER,
24
+ A as IDLE_NAVIGATION,
25
+ d as Link,
26
+ U as Links,
27
+ v as MemoryRouter,
28
+ h as Meta,
29
+ m as NavLink,
30
+ g as Navigate,
31
31
  C as NavigationType,
32
32
  p as Outlet,
33
33
  P as PrefetchPageLinks,
34
- H as Route,
35
- y as Router,
36
- L as RouterProvider,
34
+ y as Route,
35
+ H as Router,
36
+ x as RouterProvider,
37
37
  k as Routes,
38
- x as Scripts,
39
- D as ScrollRestoration,
40
- w as ServerRouter,
41
- I as StaticRouter,
42
- M as StaticRouterProvider,
43
- O as UNSAFE_DataRouterContext,
44
- b as UNSAFE_DataRouterStateContext,
45
- B as UNSAFE_ErrorResponseImpl,
38
+ L as Scripts,
39
+ w as ScrollRestoration,
40
+ D as ServerRouter,
41
+ b as StaticRouter,
42
+ I as StaticRouterProvider,
43
+ B as UNSAFE_DataRouterContext,
44
+ M as UNSAFE_DataRouterStateContext,
45
+ O as UNSAFE_ErrorResponseImpl,
46
46
  T as UNSAFE_FetchersContext,
47
47
  f as UNSAFE_FrameworkContext,
48
48
  V as UNSAFE_LocationContext,
49
- q as UNSAFE_NavigationContext,
50
- z as UNSAFE_RemixErrorBoundary,
51
- G as UNSAFE_RouteContext,
52
- K as UNSAFE_ServerMode,
53
- W as UNSAFE_SingleFetchRedirectSymbol,
49
+ W as UNSAFE_NavigationContext,
50
+ q as UNSAFE_RemixErrorBoundary,
51
+ z as UNSAFE_RouteContext,
52
+ G as UNSAFE_ServerMode,
53
+ K as UNSAFE_SingleFetchRedirectSymbol,
54
54
  j as UNSAFE_ViewTransitionContext,
55
55
  J as UNSAFE_createBrowserHistory,
56
56
  Q as UNSAFE_createClientRoutes,
@@ -58,72 +58,80 @@ export {
58
58
  Y as UNSAFE_createRouter,
59
59
  Z as UNSAFE_decodeViaTurboStream,
60
60
  $ as UNSAFE_deserializeErrors,
61
- aa as UNSAFE_getPatchRoutesOnNavigationFunction,
62
- ea as UNSAFE_getSingleFetchDataStrategy,
63
- sa as UNSAFE_invariant,
64
- ta as UNSAFE_mapRouteProperties,
65
- ra as UNSAFE_shouldHydrateRouteLoader,
66
- oa as UNSAFE_useFogOFWarDiscovery,
67
- ia as UNSAFE_useScrollRestoration,
68
- ua as createBrowserRouter,
69
- na as createCookie,
70
- ca as createCookieSessionStorage,
71
- Sa as createHashRouter,
72
- Ra as createMemoryRouter,
73
- Fa as createMemorySessionStorage,
74
- Ea as createPath,
75
- Na as createRequestHandler,
76
- la as createRoutesFromChildren,
77
- Aa as createRoutesFromElements,
78
- _a as createRoutesStub,
79
- va as createSearchParams,
80
- da as createSession,
81
- ma as createSessionStorage,
82
- Ua as createStaticHandler,
83
- ga as createStaticRouter,
84
- ha as data,
85
- Ca as generatePath,
86
- pa as isCookie,
87
- Pa as isRouteErrorResponse,
88
- Ha as isSession,
89
- ya as matchPath,
90
- La as matchRoutes,
91
- ka as parsePath,
92
- xa as redirect,
93
- Da as redirectDocument,
94
- wa as renderMatches,
95
- Ia as replace,
96
- Ma as resolvePath,
97
- Oa as unstable_HistoryRouter,
98
- ba as unstable_setDevServerHooks,
99
- Ba as unstable_usePrompt,
100
- Ta as useActionData,
101
- fa as useAsyncError,
102
- Va as useAsyncValue,
103
- qa as useBeforeUnload,
104
- za as useBlocker,
105
- Ga as useFetcher,
106
- Ka as useFetchers,
107
- Wa as useFormAction,
108
- ja as useHref,
109
- Ja as useInRouterContext,
110
- Qa as useLinkClickHandler,
111
- Xa as useLoaderData,
112
- Ya as useLocation,
113
- Za as useMatch,
114
- $a as useMatches,
61
+ aa as UNSAFE_getHydrationData,
62
+ ea as UNSAFE_getPatchRoutesOnNavigationFunction,
63
+ sa as UNSAFE_getTurboStreamSingleFetchDataStrategy,
64
+ ta as UNSAFE_hydrationRouteProperties,
65
+ ra as UNSAFE_invariant,
66
+ oa as UNSAFE_mapRouteProperties,
67
+ ia as UNSAFE_shouldHydrateRouteLoader,
68
+ ua as UNSAFE_useFogOFWarDiscovery,
69
+ na as UNSAFE_useScrollRestoration,
70
+ ca as UNSAFE_withComponentProps,
71
+ Sa as UNSAFE_withErrorBoundaryProps,
72
+ Ra as UNSAFE_withHydrateFallbackProps,
73
+ Fa as createBrowserRouter,
74
+ Ea as createCookie,
75
+ Na as createCookieSessionStorage,
76
+ _a as createHashRouter,
77
+ la as createMemoryRouter,
78
+ Aa as createMemorySessionStorage,
79
+ da as createPath,
80
+ Ua as createRequestHandler,
81
+ va as createRoutesFromChildren,
82
+ ha as createRoutesFromElements,
83
+ ma as createRoutesStub,
84
+ ga as createSearchParams,
85
+ Ca as createSession,
86
+ pa as createSessionStorage,
87
+ Pa as createStaticHandler,
88
+ ya as createStaticRouter,
89
+ Ha as data,
90
+ xa as generatePath,
91
+ ka as href,
92
+ La as isCookie,
93
+ wa as isRouteErrorResponse,
94
+ Da as isSession,
95
+ ba as matchPath,
96
+ Ia as matchRoutes,
97
+ Ba as parsePath,
98
+ Ma as redirect,
99
+ Oa as redirectDocument,
100
+ Ta as renderMatches,
101
+ fa as replace,
102
+ Va as resolvePath,
103
+ Wa as unstable_HistoryRouter,
104
+ qa as unstable_RouterContextProvider,
105
+ za as unstable_createContext,
106
+ Ga as unstable_setDevServerHooks,
107
+ Ka as unstable_usePrompt,
108
+ ja as useActionData,
109
+ Ja as useAsyncError,
110
+ Qa as useAsyncValue,
111
+ Xa as useBeforeUnload,
112
+ Ya as useBlocker,
113
+ Za as useFetcher,
114
+ $a as useFetchers,
115
+ ae as useFormAction,
116
+ ee as useHref,
117
+ se as useInRouterContext,
118
+ te as useLinkClickHandler,
119
+ re as useLoaderData,
120
+ oe as useLocation,
121
+ ie as useMatch,
122
+ ue as useMatches,
115
123
  n as useNavigate,
116
- ae as useNavigation,
117
- ee as useNavigationType,
118
- se as useOutlet,
119
- te as useOutletContext,
120
- re as useParams,
121
- oe as useResolvedPath,
122
- ie as useRevalidator,
123
- ue as useRouteError,
124
- ne as useRouteLoaderData,
125
- ce as useRoutes,
126
- Se as useSearchParams,
127
- Re as useSubmit,
128
- Fe as useViewTransitionState
124
+ ne as useNavigation,
125
+ ce as useNavigationType,
126
+ Se as useOutlet,
127
+ Re as useOutletContext,
128
+ Fe as useParams,
129
+ Ee as useResolvedPath,
130
+ Ne as useRevalidator,
131
+ _e as useRouteError,
132
+ le as useRouteLoaderData,
133
+ Ae as useRoutes,
134
+ de as useSearchParams,
135
+ Ue as useSubmit,
136
+ ve as useViewTransitionState
129
137
  };
@@ -1,10 +1,10 @@
1
- import { R as o, c as a, n as r } from "./QueryClientProvider-Beog9TR7.js";
2
- var d = class extends o {
1
+ import { R as a, c as r, n as u } from "./QueryClientProvider-C7EHlqBQ.js";
2
+ var d = class extends a {
3
3
  #e;
4
4
  #t;
5
5
  #i;
6
6
  constructor(t) {
7
- super(), this.mutationId = t.mutationId, this.#t = t.mutationCache, this.#e = [], this.state = t.state || u(), this.setOptions(t.options), this.scheduleGc();
7
+ super(), this.mutationId = t.mutationId, this.#t = t.mutationCache, this.#e = [], this.state = t.state || h(), this.setOptions(t.options), this.scheduleGc();
8
8
  }
9
9
  setOptions(t) {
10
10
  this.options = t, this.updateGcTime(this.options.gcTime);
@@ -34,7 +34,10 @@ var d = class extends o {
34
34
  this.execute(this.state.variables);
35
35
  }
36
36
  async execute(t) {
37
- this.#i = a({
37
+ const i = () => {
38
+ this.#s({ type: "continue" });
39
+ };
40
+ this.#i = r({
38
41
  fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
39
42
  onFail: (e, n) => {
40
43
  this.#s({ type: "failed", failureCount: e, error: n });
@@ -42,18 +45,18 @@ var d = class extends o {
42
45
  onPause: () => {
43
46
  this.#s({ type: "pause" });
44
47
  },
45
- onContinue: () => {
46
- this.#s({ type: "continue" });
47
- },
48
+ onContinue: i,
48
49
  retry: this.options.retry ?? 0,
49
50
  retryDelay: this.options.retryDelay,
50
51
  networkMode: this.options.networkMode,
51
52
  canRun: () => this.#t.canRun(this)
52
53
  });
53
- const i = this.state.status === "pending", s = !this.#i.canStart();
54
+ const s = this.state.status === "pending", o = !this.#i.canStart();
54
55
  try {
55
- if (!i) {
56
- this.#s({ type: "pending", variables: t, isPaused: s }), await this.#t.config.onMutate?.(
56
+ if (s)
57
+ i();
58
+ else {
59
+ this.#s({ type: "pending", variables: t, isPaused: o }), await this.#t.config.onMutate?.(
57
60
  t,
58
61
  this
59
62
  );
@@ -62,7 +65,7 @@ var d = class extends o {
62
65
  type: "pending",
63
66
  context: n,
64
67
  variables: t,
65
- isPaused: s
68
+ isPaused: o
66
69
  });
67
70
  }
68
71
  const e = await this.#i.start();
@@ -162,7 +165,7 @@ var d = class extends o {
162
165
  };
163
166
  }
164
167
  };
165
- this.state = i(this.state), r.batch(() => {
168
+ this.state = i(this.state), u.batch(() => {
166
169
  this.#e.forEach((s) => {
167
170
  s.onMutationUpdate(t);
168
171
  }), this.#t.notify({
@@ -173,7 +176,7 @@ var d = class extends o {
173
176
  });
174
177
  }
175
178
  };
176
- function u() {
179
+ function h() {
177
180
  return {
178
181
  context: void 0,
179
182
  data: void 0,
@@ -188,5 +191,5 @@ function u() {
188
191
  }
189
192
  export {
190
193
  d as M,
191
- u as g
194
+ h as g
192
195
  };
@@ -1,4 +1,4 @@
1
- var D = /* @__PURE__ */ ((E) => (E.ENQUEUED = "ENQUEUED", E.PENDING = "PENDING", E.SUCCESS = "RESOLVED", E.ERROR = "REJECTED", E))(D || {});
1
+ var N = /* @__PURE__ */ ((E) => (E.ENQUEUED = "ENQUEUED", E.PENDING = "PENDING", E.RESOLVING = "RESOLVING", E.SUCCESS = "RESOLVED", E.ERROR = "REJECTED", E))(N || {});
2
2
  export {
3
- D as ActionState
3
+ N as ActionState
4
4
  };
@@ -1,7 +1,6 @@
1
- import * as o from "react";
2
- import { g as l } from "./mutation-DSKlaYzY.js";
3
- import { S as d, s as p, h, n as a, u as b } from "./QueryClientProvider-Beog9TR7.js";
4
- import { n as m, s as f } from "./utils-DxRR_XLb.js";
1
+ import * as n from "react";
2
+ import { g as l } from "./mutation-CJplExaP.js";
3
+ import { S as d, s as p, h, n as a, u as b, a as m, b as f } from "./QueryClientProvider-C7EHlqBQ.js";
5
4
  var v = class extends d {
6
5
  #e;
7
6
  #i = void 0;
@@ -25,13 +24,13 @@ var v = class extends d {
25
24
  this.hasListeners() || this.#t?.removeObserver(this);
26
25
  }
27
26
  onMutationUpdate(t) {
28
- this.#r(), this.#o(t);
27
+ this.#r(), this.#n(t);
29
28
  }
30
29
  getCurrentResult() {
31
30
  return this.#i;
32
31
  }
33
32
  reset() {
34
- this.#t?.removeObserver(this), this.#t = void 0, this.#r(), this.#o();
33
+ this.#t?.removeObserver(this), this.#t = void 0, this.#r(), this.#n();
35
34
  }
36
35
  mutate(t, s) {
37
36
  return this.#s = s, this.#t?.removeObserver(this), this.#t = this.#e.getMutationCache().build(this.#e, this.options), this.#t.addObserver(this), this.#t.execute(t);
@@ -48,7 +47,7 @@ var v = class extends d {
48
47
  reset: this.reset
49
48
  };
50
49
  }
51
- #o(t) {
50
+ #n(t) {
52
51
  a.batch(() => {
53
52
  if (this.#s && this.hasListeners()) {
54
53
  const s = this.#i.variables, i = this.#i.context;
@@ -65,26 +64,26 @@ var v = class extends d {
65
64
  });
66
65
  }
67
66
  };
68
- function M(t, s) {
69
- const i = b(s), [e] = o.useState(
67
+ function g(t, s) {
68
+ const i = b(s), [e] = n.useState(
70
69
  () => new v(
71
70
  i,
72
71
  t
73
72
  )
74
73
  );
75
- o.useEffect(() => {
74
+ n.useEffect(() => {
76
75
  e.setOptions(t);
77
76
  }, [e, t]);
78
- const r = o.useSyncExternalStore(
79
- o.useCallback(
80
- (n) => e.subscribe(a.batchCalls(n)),
77
+ const r = n.useSyncExternalStore(
78
+ n.useCallback(
79
+ (o) => e.subscribe(a.batchCalls(o)),
81
80
  [e]
82
81
  ),
83
82
  () => e.getCurrentResult(),
84
83
  () => e.getCurrentResult()
85
- ), u = o.useCallback(
86
- (n, c) => {
87
- e.mutate(n, c).catch(m);
84
+ ), u = n.useCallback(
85
+ (o, c) => {
86
+ e.mutate(o, c).catch(m);
88
87
  },
89
88
  [e]
90
89
  );
@@ -93,5 +92,5 @@ function M(t, s) {
93
92
  return { ...r, mutate: u, mutateAsync: r.mutate };
94
93
  }
95
94
  export {
96
- M as u
95
+ g as u
97
96
  };