@powerhousedao/connect 1.0.20-dev.0 → 1.0.20-dev.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.
- package/dist/assets/{app-DULISSV9.js → app-BRmEr17M.js} +977 -587
- package/dist/assets/app-BRmEr17M.js.map +1 -0
- package/dist/assets/{app-b1jkE5Vo.css → app-BzvMUA_5.css} +3 -0
- package/dist/assets/{app-loader-B74nopv_.css → app-loader-DaCxVT0x.css} +4 -0
- package/dist/assets/{app-loader-CS6aHo9m.js → app-loader-_6yU4PFI.js} +105 -108
- package/dist/assets/app-loader-_6yU4PFI.js.map +1 -0
- package/dist/assets/{browser-ClaMQmoS.js → browser--PdVaTAw.js} +4 -4
- package/dist/assets/{browser-ClaMQmoS.js.map → browser--PdVaTAw.js.map} +1 -1
- package/dist/assets/{ccip-HqktEv5j.js → ccip-oTEe2poK.js} +4 -4
- package/dist/assets/{ccip-HqktEv5j.js.map → ccip-oTEe2poK.js.map} +1 -1
- package/dist/assets/{content-CwQswwKt.js → content-B1Gquii9.js} +26 -16
- package/dist/assets/{content-CwQswwKt.js.map → content-B1Gquii9.js.map} +1 -1
- package/dist/assets/{index-q1LnGFn2.js → index-C47jzF-n.js} +14 -14
- package/dist/assets/index-C47jzF-n.js.map +1 -0
- package/dist/assets/index-CXljh8x6.js +208 -0
- package/dist/assets/index-CXljh8x6.js.map +1 -0
- package/dist/assets/{index-4Y8IZCoL.js → index-Csy31V2Q.js} +4 -4
- package/dist/assets/{index-4Y8IZCoL.js.map → index-Csy31V2Q.js.map} +1 -1
- package/dist/assets/{index-DzXmrci3.js → index-DSo3d6TG.js} +7 -7
- package/dist/assets/{index-DzXmrci3.js.map → index-DSo3d6TG.js.map} +1 -1
- package/dist/assets/{main.uPY9aYSk.js → main.CUjcRUhx.js} +2 -2
- package/dist/assets/{main.uPY9aYSk.js.map → main.CUjcRUhx.js.map} +1 -1
- package/dist/assets/reactor-analytics-C7JH8QS3.js +44 -0
- package/dist/assets/reactor-analytics-C7JH8QS3.js.map +1 -0
- package/dist/assets/{router-CvCplkfB.js → router-B-9X40Vx.js} +20 -613
- package/dist/assets/router-B-9X40Vx.js.map +1 -0
- package/dist/assets/{style-Ce3V83BE.css → style-BPUyhu8E.css} +3 -0
- package/dist/index.html +1 -1
- package/dist/vite-envs.sh +1 -1
- package/package.json +9 -9
- package/dist/assets/app-DULISSV9.js.map +0 -1
- package/dist/assets/app-loader-CS6aHo9m.js.map +0 -1
- package/dist/assets/index-q1LnGFn2.js.map +0 -1
- package/dist/assets/reactor-analytics-C3XNgGME.js +0 -15
- package/dist/assets/reactor-analytics-C3XNgGME.js.map +0 -1
- package/dist/assets/router-CvCplkfB.js.map +0 -1
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/content-
|
|
2
|
-
|
|
3
|
-
throw TypeError(msg);
|
|
4
|
-
};
|
|
5
|
-
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
6
|
-
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
7
|
-
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
8
|
-
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
9
|
-
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
10
|
-
var _client, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn, _a;
|
|
11
|
-
import { _ as __vitePreload } from "./main.uPY9aYSk.js";
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/content-B1Gquii9.js","assets/app-BRmEr17M.js","assets/main.CUjcRUhx.js","assets/app-loader-_6yU4PFI.js","assets/app-loader-DaCxVT0x.css","assets/app-BzvMUA_5.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import { _ as __vitePreload } from "./main.CUjcRUhx.js";
|
|
12
3
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
13
|
-
import { $ as Icon, _ as logger, a1 as LOCAL, aB as FILE, aR as DRIVE,
|
|
4
|
+
import { $ as Icon, _ as logger, a1 as LOCAL, aB as FILE, aR as DRIVE, aX as gql, aY as request, ah as connectConfig } from "./app-loader-_6yU4PFI.js";
|
|
14
5
|
import * as React from "react";
|
|
15
6
|
import React__default, { useRef, useState, useEffect, useCallback, useContext, useSyncExternalStore, useMemo, Component, createElement, createContext, Suspense } from "react";
|
|
16
7
|
import * as ReactDOM from "react-dom";
|
|
17
|
-
import { P as Popover, a as PopoverTrigger, b as PopoverContent, t as twMerge, B as Button, g as getEnsAvatar$1, c as getEnsName$1, d as BaseError$1, W as WagmiContext,
|
|
8
|
+
import { P as Popover, a as PopoverTrigger, b as PopoverContent, t as twMerge, B as Button, g as getEnsAvatar$1, c as getEnsName$1, d as BaseError$1, W as WagmiContext, u as useQuery$1, e as useDocumentDriveServer, f as createRouter$1, h as createBrowserHistory, l as logV6DeprecationWarnings, D as DataRouterContext, i as DataRouterStateContext, R as Router, E as ErrorResponseImpl, j as useRoutesImpl, m as mapRouteProperties, k as useLocation, n as useNavigate, o as useTranslation, p as useUiNodes, q as useDocumentDrives, r as useReadModeContext, s as useAsyncReactor, v as useConnectConfig, S as SUCCESS, w as toast, C as CONFLICT, x as ERROR, y as isLatestVersion, z as useParams, A as useUiNodesContext, F as useUnwrappedReactor, G as useModal, H as useLogin, M as ModalManager, I as isElectron, J as isMac, O as Outlet, K as useGetAppNameForEditorId, L as createMemoryRouter } from "./app-BRmEr17M.js";
|
|
18
9
|
const AccountPopover = ({ children, content }) => {
|
|
19
10
|
return jsxs(Popover, { children: [jsx(PopoverTrigger, { asChild: true, children: jsx("div", { className: "cursor-pointer", children }) }), jsx(PopoverContent, { className: "w-52 p-0", align: "start", children: content })] });
|
|
20
11
|
};
|
|
@@ -147,455 +138,6 @@ function useConfig(parameters = {}) {
|
|
|
147
138
|
throw new WagmiProviderNotFoundError();
|
|
148
139
|
return config;
|
|
149
140
|
}
|
|
150
|
-
var QueryObserver = (_a = class extends Subscribable {
|
|
151
|
-
constructor(client, options) {
|
|
152
|
-
super();
|
|
153
|
-
__privateAdd(this, _QueryObserver_instances);
|
|
154
|
-
__privateAdd(this, _client);
|
|
155
|
-
__privateAdd(this, _currentQuery);
|
|
156
|
-
__privateAdd(this, _currentQueryInitialState);
|
|
157
|
-
__privateAdd(this, _currentResult);
|
|
158
|
-
__privateAdd(this, _currentResultState);
|
|
159
|
-
__privateAdd(this, _currentResultOptions);
|
|
160
|
-
__privateAdd(this, _currentThenable);
|
|
161
|
-
__privateAdd(this, _selectError);
|
|
162
|
-
__privateAdd(this, _selectFn);
|
|
163
|
-
__privateAdd(this, _selectResult);
|
|
164
|
-
// This property keeps track of the last query with defined data.
|
|
165
|
-
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
166
|
-
__privateAdd(this, _lastQueryWithDefinedData);
|
|
167
|
-
__privateAdd(this, _staleTimeoutId);
|
|
168
|
-
__privateAdd(this, _refetchIntervalId);
|
|
169
|
-
__privateAdd(this, _currentRefetchInterval);
|
|
170
|
-
__privateAdd(this, _trackedProps, /* @__PURE__ */ new Set());
|
|
171
|
-
this.options = options;
|
|
172
|
-
__privateSet(this, _client, client);
|
|
173
|
-
__privateSet(this, _selectError, null);
|
|
174
|
-
__privateSet(this, _currentThenable, pendingThenable());
|
|
175
|
-
if (!this.options.experimental_prefetchInRender) {
|
|
176
|
-
__privateGet(this, _currentThenable).reject(
|
|
177
|
-
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
this.bindMethods();
|
|
181
|
-
this.setOptions(options);
|
|
182
|
-
}
|
|
183
|
-
bindMethods() {
|
|
184
|
-
this.refetch = this.refetch.bind(this);
|
|
185
|
-
}
|
|
186
|
-
onSubscribe() {
|
|
187
|
-
if (this.listeners.size === 1) {
|
|
188
|
-
__privateGet(this, _currentQuery).addObserver(this);
|
|
189
|
-
if (shouldFetchOnMount(__privateGet(this, _currentQuery), this.options)) {
|
|
190
|
-
__privateMethod(this, _QueryObserver_instances, executeFetch_fn).call(this);
|
|
191
|
-
} else {
|
|
192
|
-
this.updateResult();
|
|
193
|
-
}
|
|
194
|
-
__privateMethod(this, _QueryObserver_instances, updateTimers_fn).call(this);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
onUnsubscribe() {
|
|
198
|
-
if (!this.hasListeners()) {
|
|
199
|
-
this.destroy();
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
shouldFetchOnReconnect() {
|
|
203
|
-
return shouldFetchOn(
|
|
204
|
-
__privateGet(this, _currentQuery),
|
|
205
|
-
this.options,
|
|
206
|
-
this.options.refetchOnReconnect
|
|
207
|
-
);
|
|
208
|
-
}
|
|
209
|
-
shouldFetchOnWindowFocus() {
|
|
210
|
-
return shouldFetchOn(
|
|
211
|
-
__privateGet(this, _currentQuery),
|
|
212
|
-
this.options,
|
|
213
|
-
this.options.refetchOnWindowFocus
|
|
214
|
-
);
|
|
215
|
-
}
|
|
216
|
-
destroy() {
|
|
217
|
-
this.listeners = /* @__PURE__ */ new Set();
|
|
218
|
-
__privateMethod(this, _QueryObserver_instances, clearStaleTimeout_fn).call(this);
|
|
219
|
-
__privateMethod(this, _QueryObserver_instances, clearRefetchInterval_fn).call(this);
|
|
220
|
-
__privateGet(this, _currentQuery).removeObserver(this);
|
|
221
|
-
}
|
|
222
|
-
setOptions(options) {
|
|
223
|
-
const prevOptions = this.options;
|
|
224
|
-
const prevQuery = __privateGet(this, _currentQuery);
|
|
225
|
-
this.options = __privateGet(this, _client).defaultQueryOptions(options);
|
|
226
|
-
if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) !== "boolean") {
|
|
227
|
-
throw new Error(
|
|
228
|
-
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
229
|
-
);
|
|
230
|
-
}
|
|
231
|
-
__privateMethod(this, _QueryObserver_instances, updateQuery_fn).call(this);
|
|
232
|
-
__privateGet(this, _currentQuery).setOptions(this.options);
|
|
233
|
-
if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {
|
|
234
|
-
__privateGet(this, _client).getQueryCache().notify({
|
|
235
|
-
type: "observerOptionsUpdated",
|
|
236
|
-
query: __privateGet(this, _currentQuery),
|
|
237
|
-
observer: this
|
|
238
|
-
});
|
|
239
|
-
}
|
|
240
|
-
const mounted = this.hasListeners();
|
|
241
|
-
if (mounted && shouldFetchOptionally(
|
|
242
|
-
__privateGet(this, _currentQuery),
|
|
243
|
-
prevQuery,
|
|
244
|
-
this.options,
|
|
245
|
-
prevOptions
|
|
246
|
-
)) {
|
|
247
|
-
__privateMethod(this, _QueryObserver_instances, executeFetch_fn).call(this);
|
|
248
|
-
}
|
|
249
|
-
this.updateResult();
|
|
250
|
-
if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) !== resolveEnabled(prevOptions.enabled, __privateGet(this, _currentQuery)) || resolveStaleTime(this.options.staleTime, __privateGet(this, _currentQuery)) !== resolveStaleTime(prevOptions.staleTime, __privateGet(this, _currentQuery)))) {
|
|
251
|
-
__privateMethod(this, _QueryObserver_instances, updateStaleTimeout_fn).call(this);
|
|
252
|
-
}
|
|
253
|
-
const nextRefetchInterval = __privateMethod(this, _QueryObserver_instances, computeRefetchInterval_fn).call(this);
|
|
254
|
-
if (mounted && (__privateGet(this, _currentQuery) !== prevQuery || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) !== resolveEnabled(prevOptions.enabled, __privateGet(this, _currentQuery)) || nextRefetchInterval !== __privateGet(this, _currentRefetchInterval))) {
|
|
255
|
-
__privateMethod(this, _QueryObserver_instances, updateRefetchInterval_fn).call(this, nextRefetchInterval);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
getOptimisticResult(options) {
|
|
259
|
-
const query = __privateGet(this, _client).getQueryCache().build(__privateGet(this, _client), options);
|
|
260
|
-
const result = this.createResult(query, options);
|
|
261
|
-
if (shouldAssignObserverCurrentProperties(this, result)) {
|
|
262
|
-
__privateSet(this, _currentResult, result);
|
|
263
|
-
__privateSet(this, _currentResultOptions, this.options);
|
|
264
|
-
__privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state);
|
|
265
|
-
}
|
|
266
|
-
return result;
|
|
267
|
-
}
|
|
268
|
-
getCurrentResult() {
|
|
269
|
-
return __privateGet(this, _currentResult);
|
|
270
|
-
}
|
|
271
|
-
trackResult(result, onPropTracked) {
|
|
272
|
-
const trackedResult = {};
|
|
273
|
-
Object.keys(result).forEach((key) => {
|
|
274
|
-
Object.defineProperty(trackedResult, key, {
|
|
275
|
-
configurable: false,
|
|
276
|
-
enumerable: true,
|
|
277
|
-
get: () => {
|
|
278
|
-
this.trackProp(key);
|
|
279
|
-
onPropTracked == null ? void 0 : onPropTracked(key);
|
|
280
|
-
return result[key];
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
});
|
|
284
|
-
return trackedResult;
|
|
285
|
-
}
|
|
286
|
-
trackProp(key) {
|
|
287
|
-
__privateGet(this, _trackedProps).add(key);
|
|
288
|
-
}
|
|
289
|
-
getCurrentQuery() {
|
|
290
|
-
return __privateGet(this, _currentQuery);
|
|
291
|
-
}
|
|
292
|
-
refetch({ ...options } = {}) {
|
|
293
|
-
return this.fetch({
|
|
294
|
-
...options
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
fetchOptimistic(options) {
|
|
298
|
-
const defaultedOptions = __privateGet(this, _client).defaultQueryOptions(options);
|
|
299
|
-
const query = __privateGet(this, _client).getQueryCache().build(__privateGet(this, _client), defaultedOptions);
|
|
300
|
-
return query.fetch().then(() => this.createResult(query, defaultedOptions));
|
|
301
|
-
}
|
|
302
|
-
fetch(fetchOptions) {
|
|
303
|
-
return __privateMethod(this, _QueryObserver_instances, executeFetch_fn).call(this, {
|
|
304
|
-
...fetchOptions,
|
|
305
|
-
cancelRefetch: fetchOptions.cancelRefetch ?? true
|
|
306
|
-
}).then(() => {
|
|
307
|
-
this.updateResult();
|
|
308
|
-
return __privateGet(this, _currentResult);
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
createResult(query, options) {
|
|
312
|
-
var _a2;
|
|
313
|
-
const prevQuery = __privateGet(this, _currentQuery);
|
|
314
|
-
const prevOptions = this.options;
|
|
315
|
-
const prevResult = __privateGet(this, _currentResult);
|
|
316
|
-
const prevResultState = __privateGet(this, _currentResultState);
|
|
317
|
-
const prevResultOptions = __privateGet(this, _currentResultOptions);
|
|
318
|
-
const queryChange = query !== prevQuery;
|
|
319
|
-
const queryInitialState = queryChange ? query.state : __privateGet(this, _currentQueryInitialState);
|
|
320
|
-
const { state } = query;
|
|
321
|
-
let newState = { ...state };
|
|
322
|
-
let isPlaceholderData = false;
|
|
323
|
-
let data;
|
|
324
|
-
if (options._optimisticResults) {
|
|
325
|
-
const mounted = this.hasListeners();
|
|
326
|
-
const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
|
|
327
|
-
const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
|
|
328
|
-
if (fetchOnMount || fetchOptionally) {
|
|
329
|
-
newState = {
|
|
330
|
-
...newState,
|
|
331
|
-
...fetchState(state.data, query.options)
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
if (options._optimisticResults === "isRestoring") {
|
|
335
|
-
newState.fetchStatus = "idle";
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
let { error, errorUpdatedAt, status } = newState;
|
|
339
|
-
if (options.select && newState.data !== void 0) {
|
|
340
|
-
if (prevResult && newState.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === __privateGet(this, _selectFn)) {
|
|
341
|
-
data = __privateGet(this, _selectResult);
|
|
342
|
-
} else {
|
|
343
|
-
try {
|
|
344
|
-
__privateSet(this, _selectFn, options.select);
|
|
345
|
-
data = options.select(newState.data);
|
|
346
|
-
data = replaceData(prevResult == null ? void 0 : prevResult.data, data, options);
|
|
347
|
-
__privateSet(this, _selectResult, data);
|
|
348
|
-
__privateSet(this, _selectError, null);
|
|
349
|
-
} catch (selectError) {
|
|
350
|
-
__privateSet(this, _selectError, selectError);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
} else {
|
|
354
|
-
data = newState.data;
|
|
355
|
-
}
|
|
356
|
-
if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
|
|
357
|
-
let placeholderData;
|
|
358
|
-
if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {
|
|
359
|
-
placeholderData = prevResult.data;
|
|
360
|
-
} else {
|
|
361
|
-
placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
|
|
362
|
-
(_a2 = __privateGet(this, _lastQueryWithDefinedData)) == null ? void 0 : _a2.state.data,
|
|
363
|
-
__privateGet(this, _lastQueryWithDefinedData)
|
|
364
|
-
) : options.placeholderData;
|
|
365
|
-
if (options.select && placeholderData !== void 0) {
|
|
366
|
-
try {
|
|
367
|
-
placeholderData = options.select(placeholderData);
|
|
368
|
-
__privateSet(this, _selectError, null);
|
|
369
|
-
} catch (selectError) {
|
|
370
|
-
__privateSet(this, _selectError, selectError);
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
if (placeholderData !== void 0) {
|
|
375
|
-
status = "success";
|
|
376
|
-
data = replaceData(
|
|
377
|
-
prevResult == null ? void 0 : prevResult.data,
|
|
378
|
-
placeholderData,
|
|
379
|
-
options
|
|
380
|
-
);
|
|
381
|
-
isPlaceholderData = true;
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
if (__privateGet(this, _selectError)) {
|
|
385
|
-
error = __privateGet(this, _selectError);
|
|
386
|
-
data = __privateGet(this, _selectResult);
|
|
387
|
-
errorUpdatedAt = Date.now();
|
|
388
|
-
status = "error";
|
|
389
|
-
}
|
|
390
|
-
const isFetching = newState.fetchStatus === "fetching";
|
|
391
|
-
const isPending = status === "pending";
|
|
392
|
-
const isError = status === "error";
|
|
393
|
-
const isLoading = isPending && isFetching;
|
|
394
|
-
const hasData = data !== void 0;
|
|
395
|
-
const result = {
|
|
396
|
-
status,
|
|
397
|
-
fetchStatus: newState.fetchStatus,
|
|
398
|
-
isPending,
|
|
399
|
-
isSuccess: status === "success",
|
|
400
|
-
isError,
|
|
401
|
-
isInitialLoading: isLoading,
|
|
402
|
-
isLoading,
|
|
403
|
-
data,
|
|
404
|
-
dataUpdatedAt: newState.dataUpdatedAt,
|
|
405
|
-
error,
|
|
406
|
-
errorUpdatedAt,
|
|
407
|
-
failureCount: newState.fetchFailureCount,
|
|
408
|
-
failureReason: newState.fetchFailureReason,
|
|
409
|
-
errorUpdateCount: newState.errorUpdateCount,
|
|
410
|
-
isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
|
|
411
|
-
isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
|
|
412
|
-
isFetching,
|
|
413
|
-
isRefetching: isFetching && !isPending,
|
|
414
|
-
isLoadingError: isError && !hasData,
|
|
415
|
-
isPaused: newState.fetchStatus === "paused",
|
|
416
|
-
isPlaceholderData,
|
|
417
|
-
isRefetchError: isError && hasData,
|
|
418
|
-
isStale: isStale(query, options),
|
|
419
|
-
refetch: this.refetch,
|
|
420
|
-
promise: __privateGet(this, _currentThenable)
|
|
421
|
-
};
|
|
422
|
-
const nextResult = result;
|
|
423
|
-
if (this.options.experimental_prefetchInRender) {
|
|
424
|
-
const finalizeThenableIfPossible = (thenable) => {
|
|
425
|
-
if (nextResult.status === "error") {
|
|
426
|
-
thenable.reject(nextResult.error);
|
|
427
|
-
} else if (nextResult.data !== void 0) {
|
|
428
|
-
thenable.resolve(nextResult.data);
|
|
429
|
-
}
|
|
430
|
-
};
|
|
431
|
-
const recreateThenable = () => {
|
|
432
|
-
const pending = __privateSet(this, _currentThenable, nextResult.promise = pendingThenable());
|
|
433
|
-
finalizeThenableIfPossible(pending);
|
|
434
|
-
};
|
|
435
|
-
const prevThenable = __privateGet(this, _currentThenable);
|
|
436
|
-
switch (prevThenable.status) {
|
|
437
|
-
case "pending":
|
|
438
|
-
if (query.queryHash === prevQuery.queryHash) {
|
|
439
|
-
finalizeThenableIfPossible(prevThenable);
|
|
440
|
-
}
|
|
441
|
-
break;
|
|
442
|
-
case "fulfilled":
|
|
443
|
-
if (nextResult.status === "error" || nextResult.data !== prevThenable.value) {
|
|
444
|
-
recreateThenable();
|
|
445
|
-
}
|
|
446
|
-
break;
|
|
447
|
-
case "rejected":
|
|
448
|
-
if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) {
|
|
449
|
-
recreateThenable();
|
|
450
|
-
}
|
|
451
|
-
break;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
return nextResult;
|
|
455
|
-
}
|
|
456
|
-
updateResult() {
|
|
457
|
-
const prevResult = __privateGet(this, _currentResult);
|
|
458
|
-
const nextResult = this.createResult(__privateGet(this, _currentQuery), this.options);
|
|
459
|
-
__privateSet(this, _currentResultState, __privateGet(this, _currentQuery).state);
|
|
460
|
-
__privateSet(this, _currentResultOptions, this.options);
|
|
461
|
-
if (__privateGet(this, _currentResultState).data !== void 0) {
|
|
462
|
-
__privateSet(this, _lastQueryWithDefinedData, __privateGet(this, _currentQuery));
|
|
463
|
-
}
|
|
464
|
-
if (shallowEqualObjects(nextResult, prevResult)) {
|
|
465
|
-
return;
|
|
466
|
-
}
|
|
467
|
-
__privateSet(this, _currentResult, nextResult);
|
|
468
|
-
const shouldNotifyListeners = () => {
|
|
469
|
-
if (!prevResult) {
|
|
470
|
-
return true;
|
|
471
|
-
}
|
|
472
|
-
const { notifyOnChangeProps } = this.options;
|
|
473
|
-
const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
|
|
474
|
-
if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !__privateGet(this, _trackedProps).size) {
|
|
475
|
-
return true;
|
|
476
|
-
}
|
|
477
|
-
const includedProps = new Set(
|
|
478
|
-
notifyOnChangePropsValue ?? __privateGet(this, _trackedProps)
|
|
479
|
-
);
|
|
480
|
-
if (this.options.throwOnError) {
|
|
481
|
-
includedProps.add("error");
|
|
482
|
-
}
|
|
483
|
-
return Object.keys(__privateGet(this, _currentResult)).some((key) => {
|
|
484
|
-
const typedKey = key;
|
|
485
|
-
const changed = __privateGet(this, _currentResult)[typedKey] !== prevResult[typedKey];
|
|
486
|
-
return changed && includedProps.has(typedKey);
|
|
487
|
-
});
|
|
488
|
-
};
|
|
489
|
-
__privateMethod(this, _QueryObserver_instances, notify_fn).call(this, { listeners: shouldNotifyListeners() });
|
|
490
|
-
}
|
|
491
|
-
onQueryUpdate() {
|
|
492
|
-
this.updateResult();
|
|
493
|
-
if (this.hasListeners()) {
|
|
494
|
-
__privateMethod(this, _QueryObserver_instances, updateTimers_fn).call(this);
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
}, _client = new WeakMap(), _currentQuery = new WeakMap(), _currentQueryInitialState = new WeakMap(), _currentResult = new WeakMap(), _currentResultState = new WeakMap(), _currentResultOptions = new WeakMap(), _currentThenable = new WeakMap(), _selectError = new WeakMap(), _selectFn = new WeakMap(), _selectResult = new WeakMap(), _lastQueryWithDefinedData = new WeakMap(), _staleTimeoutId = new WeakMap(), _refetchIntervalId = new WeakMap(), _currentRefetchInterval = new WeakMap(), _trackedProps = new WeakMap(), _QueryObserver_instances = new WeakSet(), executeFetch_fn = function(fetchOptions) {
|
|
498
|
-
__privateMethod(this, _QueryObserver_instances, updateQuery_fn).call(this);
|
|
499
|
-
let promise = __privateGet(this, _currentQuery).fetch(
|
|
500
|
-
this.options,
|
|
501
|
-
fetchOptions
|
|
502
|
-
);
|
|
503
|
-
if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {
|
|
504
|
-
promise = promise.catch(noop$1);
|
|
505
|
-
}
|
|
506
|
-
return promise;
|
|
507
|
-
}, updateStaleTimeout_fn = function() {
|
|
508
|
-
__privateMethod(this, _QueryObserver_instances, clearStaleTimeout_fn).call(this);
|
|
509
|
-
const staleTime = resolveStaleTime(
|
|
510
|
-
this.options.staleTime,
|
|
511
|
-
__privateGet(this, _currentQuery)
|
|
512
|
-
);
|
|
513
|
-
if (isServer || __privateGet(this, _currentResult).isStale || !isValidTimeout(staleTime)) {
|
|
514
|
-
return;
|
|
515
|
-
}
|
|
516
|
-
const time = timeUntilStale(__privateGet(this, _currentResult).dataUpdatedAt, staleTime);
|
|
517
|
-
const timeout = time + 1;
|
|
518
|
-
__privateSet(this, _staleTimeoutId, setTimeout(() => {
|
|
519
|
-
if (!__privateGet(this, _currentResult).isStale) {
|
|
520
|
-
this.updateResult();
|
|
521
|
-
}
|
|
522
|
-
}, timeout));
|
|
523
|
-
}, computeRefetchInterval_fn = function() {
|
|
524
|
-
return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(__privateGet(this, _currentQuery)) : this.options.refetchInterval) ?? false;
|
|
525
|
-
}, updateRefetchInterval_fn = function(nextInterval) {
|
|
526
|
-
__privateMethod(this, _QueryObserver_instances, clearRefetchInterval_fn).call(this);
|
|
527
|
-
__privateSet(this, _currentRefetchInterval, nextInterval);
|
|
528
|
-
if (isServer || resolveEnabled(this.options.enabled, __privateGet(this, _currentQuery)) === false || !isValidTimeout(__privateGet(this, _currentRefetchInterval)) || __privateGet(this, _currentRefetchInterval) === 0) {
|
|
529
|
-
return;
|
|
530
|
-
}
|
|
531
|
-
__privateSet(this, _refetchIntervalId, setInterval(() => {
|
|
532
|
-
if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {
|
|
533
|
-
__privateMethod(this, _QueryObserver_instances, executeFetch_fn).call(this);
|
|
534
|
-
}
|
|
535
|
-
}, __privateGet(this, _currentRefetchInterval)));
|
|
536
|
-
}, updateTimers_fn = function() {
|
|
537
|
-
__privateMethod(this, _QueryObserver_instances, updateStaleTimeout_fn).call(this);
|
|
538
|
-
__privateMethod(this, _QueryObserver_instances, updateRefetchInterval_fn).call(this, __privateMethod(this, _QueryObserver_instances, computeRefetchInterval_fn).call(this));
|
|
539
|
-
}, clearStaleTimeout_fn = function() {
|
|
540
|
-
if (__privateGet(this, _staleTimeoutId)) {
|
|
541
|
-
clearTimeout(__privateGet(this, _staleTimeoutId));
|
|
542
|
-
__privateSet(this, _staleTimeoutId, void 0);
|
|
543
|
-
}
|
|
544
|
-
}, clearRefetchInterval_fn = function() {
|
|
545
|
-
if (__privateGet(this, _refetchIntervalId)) {
|
|
546
|
-
clearInterval(__privateGet(this, _refetchIntervalId));
|
|
547
|
-
__privateSet(this, _refetchIntervalId, void 0);
|
|
548
|
-
}
|
|
549
|
-
}, updateQuery_fn = function() {
|
|
550
|
-
const query = __privateGet(this, _client).getQueryCache().build(__privateGet(this, _client), this.options);
|
|
551
|
-
if (query === __privateGet(this, _currentQuery)) {
|
|
552
|
-
return;
|
|
553
|
-
}
|
|
554
|
-
const prevQuery = __privateGet(this, _currentQuery);
|
|
555
|
-
__privateSet(this, _currentQuery, query);
|
|
556
|
-
__privateSet(this, _currentQueryInitialState, query.state);
|
|
557
|
-
if (this.hasListeners()) {
|
|
558
|
-
prevQuery == null ? void 0 : prevQuery.removeObserver(this);
|
|
559
|
-
query.addObserver(this);
|
|
560
|
-
}
|
|
561
|
-
}, notify_fn = function(notifyOptions) {
|
|
562
|
-
notifyManager.batch(() => {
|
|
563
|
-
if (notifyOptions.listeners) {
|
|
564
|
-
this.listeners.forEach((listener) => {
|
|
565
|
-
listener(__privateGet(this, _currentResult));
|
|
566
|
-
});
|
|
567
|
-
}
|
|
568
|
-
__privateGet(this, _client).getQueryCache().notify({
|
|
569
|
-
query: __privateGet(this, _currentQuery),
|
|
570
|
-
type: "observerResultsUpdated"
|
|
571
|
-
});
|
|
572
|
-
});
|
|
573
|
-
}, _a);
|
|
574
|
-
function shouldLoadOnMount(query, options) {
|
|
575
|
-
return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
|
|
576
|
-
}
|
|
577
|
-
function shouldFetchOnMount(query, options) {
|
|
578
|
-
return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
|
|
579
|
-
}
|
|
580
|
-
function shouldFetchOn(query, options, field) {
|
|
581
|
-
if (resolveEnabled(options.enabled, query) !== false) {
|
|
582
|
-
const value = typeof field === "function" ? field(query) : field;
|
|
583
|
-
return value === "always" || value !== false && isStale(query, options);
|
|
584
|
-
}
|
|
585
|
-
return false;
|
|
586
|
-
}
|
|
587
|
-
function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
|
|
588
|
-
return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
|
|
589
|
-
}
|
|
590
|
-
function isStale(query, options) {
|
|
591
|
-
return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));
|
|
592
|
-
}
|
|
593
|
-
function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
|
594
|
-
if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {
|
|
595
|
-
return true;
|
|
596
|
-
}
|
|
597
|
-
return false;
|
|
598
|
-
}
|
|
599
141
|
function hashFn(queryKey) {
|
|
600
142
|
return JSON.stringify(queryKey, (_, value) => {
|
|
601
143
|
if (isPlainObject(value))
|
|
@@ -700,140 +242,6 @@ function getEnsNameQueryOptions(config, options = {}) {
|
|
|
700
242
|
function getEnsNameQueryKey(options = {}) {
|
|
701
243
|
return ["ensName", filterQueryOptions(options)];
|
|
702
244
|
}
|
|
703
|
-
var IsRestoringContext = React.createContext(false);
|
|
704
|
-
var useIsRestoring = () => React.useContext(IsRestoringContext);
|
|
705
|
-
IsRestoringContext.Provider;
|
|
706
|
-
function createValue() {
|
|
707
|
-
let isReset = false;
|
|
708
|
-
return {
|
|
709
|
-
clearReset: () => {
|
|
710
|
-
isReset = false;
|
|
711
|
-
},
|
|
712
|
-
reset: () => {
|
|
713
|
-
isReset = true;
|
|
714
|
-
},
|
|
715
|
-
isReset: () => {
|
|
716
|
-
return isReset;
|
|
717
|
-
}
|
|
718
|
-
};
|
|
719
|
-
}
|
|
720
|
-
var QueryErrorResetBoundaryContext = React.createContext(createValue());
|
|
721
|
-
var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
|
|
722
|
-
function shouldThrowError(throwError, params) {
|
|
723
|
-
if (typeof throwError === "function") {
|
|
724
|
-
return throwError(...params);
|
|
725
|
-
}
|
|
726
|
-
return !!throwError;
|
|
727
|
-
}
|
|
728
|
-
function noop() {
|
|
729
|
-
}
|
|
730
|
-
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
|
|
731
|
-
if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
|
|
732
|
-
if (!errorResetBoundary.isReset()) {
|
|
733
|
-
options.retryOnMount = false;
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
|
-
var useClearResetErrorBoundary = (errorResetBoundary) => {
|
|
738
|
-
React.useEffect(() => {
|
|
739
|
-
errorResetBoundary.clearReset();
|
|
740
|
-
}, [errorResetBoundary]);
|
|
741
|
-
};
|
|
742
|
-
var getHasError = ({
|
|
743
|
-
result,
|
|
744
|
-
errorResetBoundary,
|
|
745
|
-
throwOnError,
|
|
746
|
-
query,
|
|
747
|
-
suspense
|
|
748
|
-
}) => {
|
|
749
|
-
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
750
|
-
};
|
|
751
|
-
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
752
|
-
const originalStaleTime = defaultedOptions.staleTime;
|
|
753
|
-
if (defaultedOptions.suspense) {
|
|
754
|
-
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => Math.max(originalStaleTime(...args), 1e3) : Math.max(originalStaleTime ?? 1e3, 1e3);
|
|
755
|
-
if (typeof defaultedOptions.gcTime === "number") {
|
|
756
|
-
defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, 1e3);
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
};
|
|
760
|
-
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
|
|
761
|
-
var shouldSuspend = (defaultedOptions, result) => (defaultedOptions == null ? void 0 : defaultedOptions.suspense) && result.isPending;
|
|
762
|
-
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
|
|
763
|
-
errorResetBoundary.clearReset();
|
|
764
|
-
});
|
|
765
|
-
function useBaseQuery(options, Observer, queryClient) {
|
|
766
|
-
var _a2, _b, _c, _d, _e;
|
|
767
|
-
const client = useQueryClient();
|
|
768
|
-
const isRestoring = useIsRestoring();
|
|
769
|
-
const errorResetBoundary = useQueryErrorResetBoundary();
|
|
770
|
-
const defaultedOptions = client.defaultQueryOptions(options);
|
|
771
|
-
(_b = (_a2 = client.getDefaultOptions().queries) == null ? void 0 : _a2._experimental_beforeQuery) == null ? void 0 : _b.call(
|
|
772
|
-
_a2,
|
|
773
|
-
defaultedOptions
|
|
774
|
-
);
|
|
775
|
-
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
|
|
776
|
-
ensureSuspenseTimers(defaultedOptions);
|
|
777
|
-
ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);
|
|
778
|
-
useClearResetErrorBoundary(errorResetBoundary);
|
|
779
|
-
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
|
|
780
|
-
const [observer] = React.useState(
|
|
781
|
-
() => new Observer(
|
|
782
|
-
client,
|
|
783
|
-
defaultedOptions
|
|
784
|
-
)
|
|
785
|
-
);
|
|
786
|
-
const result = observer.getOptimisticResult(defaultedOptions);
|
|
787
|
-
const shouldSubscribe = !isRestoring && options.subscribed !== false;
|
|
788
|
-
React.useSyncExternalStore(
|
|
789
|
-
React.useCallback(
|
|
790
|
-
(onStoreChange) => {
|
|
791
|
-
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;
|
|
792
|
-
observer.updateResult();
|
|
793
|
-
return unsubscribe;
|
|
794
|
-
},
|
|
795
|
-
[observer, shouldSubscribe]
|
|
796
|
-
),
|
|
797
|
-
() => observer.getCurrentResult(),
|
|
798
|
-
() => observer.getCurrentResult()
|
|
799
|
-
);
|
|
800
|
-
React.useEffect(() => {
|
|
801
|
-
observer.setOptions(defaultedOptions);
|
|
802
|
-
}, [defaultedOptions, observer]);
|
|
803
|
-
if (shouldSuspend(defaultedOptions, result)) {
|
|
804
|
-
throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
|
|
805
|
-
}
|
|
806
|
-
if (getHasError({
|
|
807
|
-
result,
|
|
808
|
-
errorResetBoundary,
|
|
809
|
-
throwOnError: defaultedOptions.throwOnError,
|
|
810
|
-
query: client.getQueryCache().get(defaultedOptions.queryHash),
|
|
811
|
-
suspense: defaultedOptions.suspense
|
|
812
|
-
})) {
|
|
813
|
-
throw result.error;
|
|
814
|
-
}
|
|
815
|
-
(_d = (_c = client.getDefaultOptions().queries) == null ? void 0 : _c._experimental_afterQuery) == null ? void 0 : _d.call(
|
|
816
|
-
_c,
|
|
817
|
-
defaultedOptions,
|
|
818
|
-
result
|
|
819
|
-
);
|
|
820
|
-
if (defaultedOptions.experimental_prefetchInRender && !isServer && willFetch(result, isRestoring)) {
|
|
821
|
-
const promise = isNewCacheEntry ? (
|
|
822
|
-
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
823
|
-
fetchOptimistic(defaultedOptions, observer, errorResetBoundary)
|
|
824
|
-
) : (
|
|
825
|
-
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
826
|
-
(_e = client.getQueryCache().get(defaultedOptions.queryHash)) == null ? void 0 : _e.promise
|
|
827
|
-
);
|
|
828
|
-
promise == null ? void 0 : promise.catch(noop).finally(() => {
|
|
829
|
-
observer.updateResult();
|
|
830
|
-
});
|
|
831
|
-
}
|
|
832
|
-
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
833
|
-
}
|
|
834
|
-
function useQuery$1(options, queryClient) {
|
|
835
|
-
return useBaseQuery(options, QueryObserver);
|
|
836
|
-
}
|
|
837
245
|
function useQuery(parameters) {
|
|
838
246
|
const result = useQuery$1({
|
|
839
247
|
...parameters,
|
|
@@ -1023,7 +431,7 @@ const useClientErrorHandler = () => {
|
|
|
1023
431
|
);
|
|
1024
432
|
const handleDriveNotFound = useCallback(
|
|
1025
433
|
async (driveId, trigger, handlerCode) => {
|
|
1026
|
-
var
|
|
434
|
+
var _a;
|
|
1027
435
|
setHandlingInProgress((state) => [...state, handlerCode]);
|
|
1028
436
|
try {
|
|
1029
437
|
const drive = documentDrives.find(
|
|
@@ -1036,10 +444,10 @@ const useClientErrorHandler = () => {
|
|
|
1036
444
|
drive.state.global.name + ` (${drive.state.global.id})`
|
|
1037
445
|
);
|
|
1038
446
|
await setDriveSharingType(driveId, LOCAL);
|
|
1039
|
-
if (((
|
|
447
|
+
if (((_a = trigger.data) == null ? void 0 : _a.url) && drive.slug) {
|
|
1040
448
|
const newId = await getDriveIdBySlug(
|
|
1041
449
|
trigger.data.url,
|
|
1042
|
-
drive.
|
|
450
|
+
drive.slug
|
|
1043
451
|
);
|
|
1044
452
|
if (newId) {
|
|
1045
453
|
const urlParts = trigger.data.url.split("/");
|
|
@@ -1072,12 +480,12 @@ const useClientErrorHandler = () => {
|
|
|
1072
480
|
);
|
|
1073
481
|
const strandsErrorHandler = useCallback(
|
|
1074
482
|
async (driveId, trigger, status, errorMessage) => {
|
|
1075
|
-
var
|
|
483
|
+
var _a;
|
|
1076
484
|
switch (status) {
|
|
1077
485
|
case 400: {
|
|
1078
486
|
if (isListenerIdNotFound(
|
|
1079
487
|
errorMessage,
|
|
1080
|
-
(
|
|
488
|
+
(_a = trigger.data) == null ? void 0 : _a.listenerId
|
|
1081
489
|
)) {
|
|
1082
490
|
const autoRegisterPullResponder = localStorage.getItem(
|
|
1083
491
|
"AUTO_REGISTER_PULL_RESPONDER"
|
|
@@ -2001,8 +1409,8 @@ function Root() {
|
|
|
2001
1409
|
const navigate = useNavigate();
|
|
2002
1410
|
const { login } = useLogin();
|
|
2003
1411
|
useEffect(() => {
|
|
2004
|
-
var
|
|
2005
|
-
(
|
|
1412
|
+
var _a;
|
|
1413
|
+
(_a = window.electronAPI) == null ? void 0 : _a.ready();
|
|
2006
1414
|
}, []);
|
|
2007
1415
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
2008
1416
|
useEffect(() => {
|
|
@@ -2015,8 +1423,8 @@ function Root() {
|
|
|
2015
1423
|
}
|
|
2016
1424
|
}, [login, searchParams, setSearchParams]);
|
|
2017
1425
|
useEffect(() => {
|
|
2018
|
-
var
|
|
2019
|
-
const unsubscribe = (
|
|
1426
|
+
var _a;
|
|
1427
|
+
const unsubscribe = (_a = window.electronAPI) == null ? void 0 : _a.handleURL((_e, url) => {
|
|
2020
1428
|
navigate(`/${url}`);
|
|
2021
1429
|
});
|
|
2022
1430
|
return unsubscribe;
|
|
@@ -2100,11 +1508,11 @@ function Home() {
|
|
|
2100
1508
|
}, [showAddDriveModal]);
|
|
2101
1509
|
return /* @__PURE__ */ jsxs(HomeScreen, { children: [
|
|
2102
1510
|
driveNodes.map((driveNode) => {
|
|
2103
|
-
var
|
|
1511
|
+
var _a;
|
|
2104
1512
|
const drive = documentDrives.find(
|
|
2105
1513
|
(d) => d.state.global.id === driveNode.id
|
|
2106
1514
|
);
|
|
2107
|
-
const editorId = (
|
|
1515
|
+
const editorId = (_a = drive == null ? void 0 : drive.meta) == null ? void 0 : _a.preferredEditor;
|
|
2108
1516
|
const appName = editorId ? getAppDescriptionForEditorId(editorId) : void 0;
|
|
2109
1517
|
return /* @__PURE__ */ jsx(
|
|
2110
1518
|
HomeScreenItem,
|
|
@@ -2120,10 +1528,10 @@ function Home() {
|
|
|
2120
1528
|
/* @__PURE__ */ jsx(HomeScreenAddDriveItem, { onClick: onAddDriveClick })
|
|
2121
1529
|
] });
|
|
2122
1530
|
}
|
|
2123
|
-
const Content = React__default.lazy(() => __vitePreload(() => import("./content-
|
|
1531
|
+
const Content = React__default.lazy(() => __vitePreload(() => import("./content-B1Gquii9.js"), true ? __vite__mapDeps([0,1,2,3,4,5]) : void 0));
|
|
2124
1532
|
async function createRouter(routes2) {
|
|
2125
|
-
var
|
|
2126
|
-
const isPackaged = await ((
|
|
1533
|
+
var _a;
|
|
1534
|
+
const isPackaged = await ((_a = window.electronAPI) == null ? void 0 : _a.isPackaged());
|
|
2127
1535
|
const createRouter2 = isPackaged ? createMemoryRouter : createBrowserRouter;
|
|
2128
1536
|
return createRouter2(routes2, {
|
|
2129
1537
|
basename: connectConfig.routerBasename,
|
|
@@ -2172,7 +1580,6 @@ const router = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
2172
1580
|
export {
|
|
2173
1581
|
ENSAvatar as E,
|
|
2174
1582
|
ErrorBoundary as a,
|
|
2175
|
-
router as r
|
|
2176
|
-
useQuery$1 as u
|
|
1583
|
+
router as r
|
|
2177
1584
|
};
|
|
2178
|
-
//# sourceMappingURL=router-
|
|
1585
|
+
//# sourceMappingURL=router-B-9X40Vx.js.map
|